Delivered-To: garrigue at math.nagoya-u.ac.jp Delivered-To: lablgtk at yquem.inria.fr Message-ID: <4C9201FA.2050608 at gmail.com> Date: Thu, 16 Sep 2010 13:39:38 +0200 From: Johan Mazel MIME-Version: 1.0 To: Jacques Garrigue Subject: Re: [Lablgtk] Update of window through GMain.Timeout and "gdk_window_invalidate_rect" References: <20100915233406.69D12889F at mailhost.math.nagoya-u.ac.jp> In-Reply-To: <20100915233406.69D12889F at mailhost.math.nagoya-u.ac.jp> Cc: lablgtk at yquem.inria.fr Content-Type: multipart/mixed; boundary="===============0847105056==" Mime-version: 1.0 Status: U This is a multi-part message in MIME format. --===============0847105056== Content-Type: multipart/alternative; boundary="------------040808050105080908060308" This is a multi-part message in MIME format. --------------040808050105080908060308 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Hi It's working. Thansk for the fast help. Regards. Johan Mazel Le 16/09/2010 01:34, Jacques Garrigue a écrit : > Dear Johan, > > It should be sufficient to call > w#misc#draw (Some rect) > with w the widget you are drawing on. > gtk_widget_draw calls gdk_window_invalidate_rect internally. > > Jacques > > ----- > From: Johan Mazel > > I am currently trying to learn lablgtk through translating this > example > (http://www.ralph-glass.homepage.t-online.de/clock/readme.html) in Ocaml. > The graphical part is working. > The code in python is using a timer (which can be added in Ocaml by > GMain.Timeout.add) in order to launch periodically a function that > update the window. > This function is called gtk.gdk.Window.invalidate_rect in PyGTK and > gdk_window_invalidate_rect in GTK. > However, I cannot find any function by that name or a name close (eg. > invalidate) in lablgtk. > > I tried to call the rewriting of the whole window through the timer > but it produces an hideous effect close to the vertical refresh on a > CRT monitor. > > Thanks in advance for your time. > > Regards. > Johan Mazel --------------040808050105080908060308 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit Hi
It's working.
Thansk for the fast help.
Regards.
Johan Mazel

Le 16/09/2010 01:34, Jacques Garrigue a écrit :
Dear Johan,

It should be sufficient to call
w#misc#draw (Some rect)
with w the widget you are drawing on.
gtk_widget_draw calls gdk_window_invalidate_rect internally.

Jacques

-----
From: Johan Mazel <johan.mazel@gmail.com>

I am currently trying to learn lablgtk through translating this example (http://www.ralph-glass.homepage.t-online.de/clock/readme.html) in Ocaml.
The graphical part is working.
The code in python is using a timer (which can be added in Ocaml by GMain.Timeout.add) in order to launch periodically a function that update the window.
This function is called gtk.gdk.Window.invalidate_rect in PyGTK and gdk_window_invalidate_rect in GTK.
However, I cannot find any function by that name or a name close (eg. invalidate) in lablgtk.

I tried to call the rewriting of the whole window through the timer but it produces an hideous effect close to the vertical refresh on a CRT monitor.

Thanks in advance for your time.

Regards.
Johan Mazel

--------------040808050105080908060308-- --===============0847105056== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Lablgtk mailing list Lablgtk@yquem.inria.fr http://yquem.inria.fr/cgi-bin/mailman/listinfo/lablgtk --===============0847105056==--