comp.lang.ada
 help / color / mirror / Atom feed
From: hreba <hreba@terra.com.br>
Subject: Re: GTK and tasking (GNAT)
Date: Sun, 04 May 2014 15:36:55 -0300
Date: 2014-05-04T15:36:55-03:00	[thread overview]
Message-ID: <bsnfm9Fslp5U1@mid.individual.net> (raw)
In-Reply-To: <1db3ntu987ypk$.6zu9ghm9azm0.dlg@40tude.net>

On 05/04/2014 04:31 AM, Dmitry A. Kazakov wrote:
> On Sat, 03 May 2014 17:30:08 -0300, hreba wrote:
>
>> Can somebody tell me what is wrong and how to do it right?
>
> 1. Gtk is not task-safe, which also includes Glib, Cairo etc.
>
> 2. Gtk are synchronous calls, when performed between tasks this may lead to
> deadlocking even in a task-safe environment, which Gtk is not.
>
> If you want to call to Gtk operations from an independent Ada task you must
> marshal it to the main task (the task running Gtk messages loop). An
> implementation of this mechanism is here:
>
> http://www.dmitry-kazakov.de/ada/gtkada_contributions.htm#1
>

Is 'task-safe' more or less the same as 'thread-safe'?

I have a little experience with GTK programming using Oberon, which 
doesn't contain a task concept on the language level.

I am somewhat disappointed about the details you have to understand 
about GTK and tasking in order to use a GUI in an Ada program.

Given that what I want is

  - libraries available on Linux and Windows (as GTK)
  - a GUI builder for the layout (as Glade)
  - no fancy things, but:
     * buttons
     * text boxes
     * drawing areas
     * keyboard, mouse click and mouse movement events
  - basic tasking: life output (progress) during lengthy calculations

What GUI library would you recommend?

I would be happy and grateful to use your GtkAda contributions, I just 
want to be sure to use more or less common software.

Thanks for your answer.
-- 
Frank Hrebabetzky		+55 / 48 / 3235 1106
Florianopolis, Brazil

  reply	other threads:[~2014-05-04 18:36 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-03 20:30 GTK and tasking (GNAT) hreba
2014-05-03 21:23 ` Simon Wright
2014-05-04 18:10   ` hreba
2014-05-04 18:29     ` Simon Wright
2014-05-04 22:10   ` hreba
2014-05-04  7:31 ` Dmitry A. Kazakov
2014-05-04 18:36   ` hreba [this message]
2014-05-04 19:26     ` Dmitry A. Kazakov
2014-05-04 20:40       ` hreba
2014-05-04 21:07         ` Shark8
2014-05-04 21:32           ` hreba
2014-05-04 21:44             ` Shark8
2014-05-04 21:57               ` hreba
2014-05-05  7:33             ` Dmitry A. Kazakov
2014-05-06 12:43               ` hreba
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox