In-Reply-To: <15602.16562.502575.568104 at tkb.mpl.com> References: <200205091721.g49HLX988829 at tkb.mpl.com> <20020527194041I.garrigue@kurims.kyoto-u.ac.jp> <15602.16562.502575.568104@tkb.mpl.com> Subject: Re: Getting primary selection in Lablgtk? To: tkb at tkb.mpl.com, lablgtk at kaba.or.jp Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-Id: <20020528183606E.garrigue at kurims.kyoto-u.ac.jp> Date: Tue, 28 May 2002 18:36:06 +0900 From: Jacques Garrigue Lines: 34 From: "T. Kurt Bond" > This looks good, but I couldn't find the selection_received or > selection_received methods in the lablgtk-20020527.tar.gz snapshot at > http://wwwfun.kurims.kyoto-u.ac.jp/soft/olabl/lablgtk.html and I don't > know how to access the lablgtk CVS archive. Sorry: I built the snapshot without commiting... Here is a new one: lablgtk-20020528.tar.gz. (Beware, if you got it before reading this mail, this is a wrong one, which was on the server for a few hours. The correct checksum is 767183889) I've also added support for exporting a selection: $ lablgtk -thread Objective Caml version 3.04+12 (2002-05-27) # let w = GWindow.window ~show:true ();; val w : GWindow.window = # w#misc#connect#selection_received (fun sel ~time -> prerr_endline sel#data);; - : GtkSignal.id = # w#misc#convert_selection `PRIMARY ~target:"STRING";; - : bool = true .... the selection .... # w#misc#connect#selection_get (fun sel ~info ~time -> sel#return "HELLO");; - : GtkSignal.id = # w#misc#grab_selection `PRIMARY;; - : bool = true # w#misc#add_selection_target ~target:"STRING" `PRIMARY;; - : unit = () Jacques