Delivered-To: lablgtk at yquem.inria.fr DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:received:date:to:subject:message-id:mail-followup-to:references:mime-version:content-type:content-disposition:in-reply-to:user-agent:from; bh=BohPG5CgEb9bRiZbEilDF2crwiFaFOvDhWrHllIbwss=; b=oTj0jcZZLgEdRyLGmGzJqgfBT8xmVIdOEHqoujFmm1rObeSP8M+9fmhFEWDKF484tYcrbKLsjPCFt/i1AZGFVEUc4gQ4Ql7pQfw+p4m+B5VHW4yigBOBKJAgdwA3CfbwYWHMrz801Hd7ujwXpVTg7dHW1bXBfGrMEtx4Ewlso/s= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:to:subject:message-id:mail-followup-to:references:mime-version:content-type:content-disposition:in-reply-to:user-agent:from; b=F4TGgss5ebVmYZE5ldtB/DygxtHz5ACnzIVxTUjHLTX4yUfP8kYjJL0932eZdP/eqevzEzwTk+g86uo9giTP9Gb4Gz6c1lIASZbBqzmImmIYsuO4Wrq1UWJnWqqxlixJrmbmeuRTp7N0pK0qjvA9YRroVXyAj1OxwC19DGHybjE= Date: Tue, 8 Jan 2008 13:44:02 +0100 To: lablgtk at yquem.inria.fr Subject: Re: [Lablgtk] Resize event Message-ID: <20080108124402.GA28864 at localhost> Mail-Followup-To: Julien Moutinho , lablgtk@yquem.inria.fr References: <200801081014.34152.jon at ffconsultancy.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <200801081014.34152.jon at ffconsultancy.com> From: Julien Moutinho Content-Type: text/plain; charset=utf-8 Content-Length: 1494 On Tue, Jan 08, 2008 at 10:14:34AM +0000, Jon Harrop wrote: > Hi! Hi! > I've got a window with a drawable area in it that I'm blitting a pixmap into. > However, I'd like to resize the pixmap when the window/drawable gets resized. > How do I hook into that event? #misc#connect#size_allocate may be what you're looking for: % lablgtk2 Objective Caml version 3.10.1+rc2 # let w = GWindow.window ();; val w : GWindow.window = # let print_rect { Gtk . x = x ; y = y ; width = width ; height = height } = print_endline (Printf.sprintf "{ x = %i; y = %i; width = %i; height = %i }" x y width height) ;; val print_rect : Gtk.rectangle -> unit = # w#misc#connect#size_allocate ~callback: print_rect;; - : GtkSignal.id = # w#show ();; { x = 0; y = 0; width = 200; height = 200 } - : unit = () # GMain.main ();; { x = 0; y = 0; width = 260; height = 267 } { x = 0; y = 0; width = 260; height = 267 } { x = 0; y = 0; width = 445; height = 374 } { x = 0; y = 0; width = 445; height = 374 } { x = 0; y = 0; width = 278; height = 185 } { x = 0; y = 0; width = 278; height = 185 } { x = 0; y = 0; width = 106; height = 115 } { x = 0; y = 0; width = 106; height = 115 } { x = 0; y = 0; width = 1; height = 1 } { x = 0; y = 0; width = 1; height = 1 } HTH. _______________________________________________ Lablgtk mailing list Lablgtk@yquem.inria.fr http://yquem.inria.fr/cgi-bin/mailman/listinfo/lablgtk