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= mime-version:from:subject:date:to:content-type:message-id; s= alpha; bh=O5UdK/qeXiJYjUbTr96KLZdnK/s=; b=O8X5jf3fRoQo7BfeNnKuJr Y7+wuRrcRZ87zj6c+VezOmB1PonrtZrGAQKX2lkv1hpA+pEEg6Z4vB84uZIGyqqv rUqfM40im/PJOvhQB6r/ty3xULkrru8pnafaH/ZualEtGiWRXWT21QJ6ChsjoAxN adwyMZY2AkAifw3dp1yEA= DomainKey-Signature: a=rsa-sha1; h=Received:MIME-Version:content-class:From:Subject:Date:Importance:X-Priority:To:Content-Type:Message-Id; b=pk6TaMopvDs+ZJtlF1X7lwi6E1rJQTYps5KAFtZXXWSDLw4LYKCAJ+uwdabf7Ewj5Nd6e/x1K4UDTAeyIc9OrG01OojGk7V+yyTTmhWqFK7ONFQ1reppIOpEAbQf7e8wOKwweMxw1Tu5Deu6J54cKMpkEe1KAsoY9p/bUWBeU5Q=; c=nofws; d=math.nagoya-u.ac.jp; q=dns; s=alpha MIME-Version: 1.0 content-class: From: Jacques Garrigue Subject: RE: [Lablgtk] Update of window through GMain.Timeout and "gdk_window_invalidate_rect" Date: Thu, 16 Sep 2010 08:34:20 +0900 Importance: normal To: Johan Mazel , Message-Id: <20100915233406.69D12889F at mailhost.math.nagoya-u.ac.jp> Content-Type: multipart/mixed; boundary="===============1954625047==" Mime-version: 1.0 Status: U --===============1954625047== content-class: Content-Type: multipart/alternative; boundary="_486DF668-C6C3-35D0-BDED-68B26E64B15D_" --_486DF668-C6C3-35D0-BDED-68B26E64B15D_ Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" 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 -----=20 From: Johan Mazel I am currently trying to learn lablgtk through translating this example (ht= tp://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.T= imeout.add) in order to launch periodically a function that update the wind= ow. This function is called gtk.gdk.Window.invalidate_rect in PyGTK and gdk_win= dow_invalidate_rect in GTK. However, I cannot find any function by that name or a name close (eg. inval= idate) 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 --_486DF668-C6C3-35D0-BDED-68B26E64B15D_ Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset="utf-8" Dear Johan,

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

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

I am cu= rrently trying to learn lablgtk through translating this example (http://ww= w.ralph-glass.homepage.t-online.de/clock/readme.html) in Ocaml.
The grap= hical 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 fun= ction that update the window.
This function is called gtk.gdk.Window.inv= alidate_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 l= ablgtk.

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

Thanks in advance for your time.

Regards.
J= ohan Mazel
= --_486DF668-C6C3-35D0-BDED-68B26E64B15D_-- --===============1954625047== 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 --===============1954625047==--