[gtkada] gtkada Digest, Vol 37, Issue 4

Petr Holub hopet at ics.muni.cz
Fri Apr 20 15:52:45 CEST 2007


Why doesn't that work in a task? Just an idea - a trap, in which I got
caught several times in the past, was missing/improper locking in that
task (as Gtk itself is not thread/task-safe).

Petr

================================================================
                            Petr Holub
CESNET z.s.p.o.                       Supercomputing Center Brno
Zikova 4                             Institute of Compt. Science
162 00 Praha 6, CZ                            Masaryk University
Czech Republic                     Botanicka 68a, 60200 Brno, CZ
e-mail: Petr.Holub at cesnet.cz               phone: +420-549493944
                                             fax: +420-541212747
                                       e-mail: hopet at ics.muni.cz




  -----Original Message-----
  From: gtkada-bounces at lists.eu.adacore.com
[mailto:gtkada-bounces at lists.eu.adacore.com]On Behalf Of Hervé Guillaume
  Sent: Friday, April 20, 2007 3:38 PM
  To: Nicolas Setton
  Cc: gtkada at lists.eu.adacore.com
  Subject: Re: [gtkada] gtkada Digest, Vol 37, Issue 4


  Yes ! It works with a timeout callback and the procedure "Show" inside.
Thank you.
  However , I don't understand why it didn't work before. What the
difference between put procedure "Show" inside a task and put "Show" inside
a timeout callback ?
  In either case, the procedure "show" is called regularly, no ?


  2007/4/20, Nicolas Setton <setton at adacore.com>:

    On Apr 20, 2007, at 13:45 , Hervé Guillaume wrote:

    > Dmitry :
    > I have tried your proposition : Queue_Draw on the Gtk_Image or on
    > Window. It doesn't work.
    > I use Gtk_Image. It seems to me that using Gtk_Drawing_Area +
    > Gdk.RGB.Draw_Rgb_Image is slower, isn't it ?
    > Nico :
    > I'm not very good in Gtkada. I don't know how use Invalidate_Rect
    > (Gdk_Window) on a Gtk_Window

    Try Get_Window on the Gtk_Image.

    Note that, if you're using tasking, you might want to register a
    timeout callback to refresh your image in the main task.

    Nico

-------------- next part --------------
An HTML attachment was scrubbed...
URL: /pipermail/gtkada/attachments/20070420/e8c56c61/attachment.htm 


More information about the gtkada mailing list