Delivered-To: garrigue at math.nagoya-u.ac.jp Authentication-Results: mailhost.math.nagoya-u.ac.jp sender=lablgtk-bounces at yquem.inria.fr; domainkey=neutral (domain does not match address; no policy for yquem.inria.fr) Delivered-To: lablgtk at yquem.inria.fr DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=math.nagoya-u.ac.jp; h= date:message-id:to:subject:from:in-reply-to:references :mime-version:content-type:content-transfer-encoding; s=alpha; bh=FB5w8vtE8A/dOEymV2TAIOEIjQE=; b=XVudkpkQCTXyOghv2RqwHQDBoZTc rYcCPR4cuLUamPJJSF9jG0KewTAl2beoMOG3VG3VeMsVciKS6Ys01eHgQSy5OeuO ZA6Um0jYrPoU074SziNL6L6+mCdBK9yXn8TcTXmVLLCesP04OOfb/GBdnC/JxKfk n/OHe7Lf8oA2LvU= DomainKey-Signature: a=rsa-sha1; h=Received:Date:Message-Id:To:Subject:From:In-Reply-To:References:X-Mailer:Mime-Version:Content-Type:Content-Transfer-Encoding; b=ceKK2+wEyGIj7dPo9D0a2u/GFbURxUxegVHLaDrk/JMTsip+kzdkzjXRhLW2+o/dGqDhBanqc5JJOeT4+/IZo5StfpCkQ+LErnxt27FUZvJRWkxuJpbyTsicrVUjw6LamqAlIsLeaSkaITT43aG9h8HC65ILvtNj1eMYpaiyt8c=; c=nofws; d=math.nagoya-u.ac.jp; q=dns; s=alpha Date: Tue, 02 Dec 2008 11:18:33 +0900 (JST) Message-Id: <20081202.111833.33962760.garrigue at math.nagoya-u.ac.jp> To: lablgtk at yquem.inria.fr, mle+ocaml at mega-nerd.com Subject: Re: [Lablgtk] Gdk.cursor / Gtk.Window type error From: Jacques GARRIGUE In-Reply-To: <20081202115407.abc82b31.mle+ocaml at mega-nerd.com> References: <20081202115407.abc82b31.mle+ocaml at mega-nerd.com> Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit You just forgot the parentheses around (win:Gdk.window) Without them, this does not specify the type of win, but the return type of the function. Hence the error. Cheers, Jacques From: Erik de Castro Lopo > 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 _______________________________________________ Lablgtk mailing list Lablgtk@yquem.inria.fr http://yquem.inria.fr/cgi-bin/mailman/listinfo/lablgtk