Delivered-To: garrigue at math.nagoya-u.ac.jp Delivered-To: lablgtk at yquem.inria.fr Date: Tue, 2 Dec 2008 11:54:07 +1100 From: Erik de Castro Lopo To: lablgtk at yquem.inria.fr Message-Id: <20081202115407.abc82b31.mle+ocaml at mega-nerd.com> Organization: Erik Conspiracy Secret Labs Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: [Lablgtk] Gdk.cursor / Gtk.Window type error Reply-To: lablgtk at yquem.inria.fr Hi all, I am trying to temporarily hide the mouse cursor and for that I need a transparent cursor object which I'm trying to create as follows: let create_null_cursor win:Gdk.window = let w, h = 10, 10 in let mask = Gdk.Bitmap.create ~window:win ~width:w ~height:h () in let pixmap = Gdk.Pixmap.create ~window:win ~width:w ~height:h ~depth:1 () in let color = Gdk.Color.alloc (Gdk.Color.get_system_colormap ()) (`RGB (255, 0, 0)) in Gdk.Cursor.create_from_pixmap pixmap mask color color w h but that fails to compile with the following error message: This expression has type Gdk.cursor but is here used with type Gdk.window = [ `drawable | `gdkwindow ] Gobject.obj My experimentation so far seems to suggest that the type of the win parameter is not fully known, but I'm not sure how to make the compiler happy about this. Anyone have any clues about this? Cheers, Erik -- ----------------------------------------------------------------- Erik de Castro Lopo ----------------------------------------------------------------- Rule 1: Spammers lie. Rule 2: If a spammer seems to be telling the truth, see Rule #1. _______________________________________________ Lablgtk mailing list Lablgtk@yquem.inria.fr http://yquem.inria.fr/cgi-bin/mailman/listinfo/lablgtk