Re: Update of window through GMain.Timeout and "gdk_window_invalidate_rect"

Johan Mazel <[email protected]> Thu, 16 Sep 2010 13:39:38 +0200
Newsgroups gmane.comp.lang.ocaml.lib.gtk
Message-ID <[email protected]>
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 <[email protected]>
>
> 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

_______________________________________________
Lablgtk mailing list
[email protected]
http://yquem.inria.fr/cgi-bin/mailman/listinfo/lablgtk