comp.lang.ada
 help / color / mirror / Atom feed
From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Subject: Re: Gtkada on Mac using Quartz
Date: Sun, 23 Aug 2015 15:32:41 +0200
Date: 2015-08-23T15:32:41+02:00	[thread overview]
Message-ID: <1jvvjthr4ppqc.1abmx4e18bfbm$.dlg@40tude.net> (raw)
In-Reply-To: 93a04416-8e92-45a8-bdb0-b975ef18562f@googlegroups.com

On Sun, 23 Aug 2015 06:05:55 -0700 (PDT), ahlan@marriott.org wrote:

> The problem seems to be that I execute all my Gtk calls in a task rather
> than in the main program. If I call Gtk.Main.init then create and show a
> Gtk.window followed by Gtk.Main.Main in the body of the main program then
> this works.

GTK calls must be done on the context of the same task/thread running the
messages loop.

> Is there anything special about Ada tasks on a mac that might prevent Gtk
> from working?

Special is GTK, GDK, Gobject, GIO and the rest, which are not
multi-threaded. 

I don't think it must be the main task of the process, it could be any
task, but just one task.

I didn't try GTK running on a non-main task, because it would not make much
sense anyway. It is possible that Mac OS could have some limitations on
this, that depends on the Mac OS GDK backend. I doubt it is the case,
though.

> Has anyone been able to use Gtk from a task rather than from the program body?

See:

http://www.dmitry-kazakov.de/ada/gtkada_contributions.htm#1

-- 
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de

  reply	other threads:[~2015-08-23 13:32 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-22  8:30 Gtkada on Mac using Quartz ahlan
2015-08-22  8:46 ` Dmitry A. Kazakov
2015-08-22 12:44   ` ahlan
2015-08-22 15:46 ` ahlan
2015-08-23  8:50 ` ahlan
2015-08-23 13:05 ` ahlan
2015-08-23 13:32   ` Dmitry A. Kazakov [this message]
2015-08-23 14:39 ` ahlan
2015-08-23 15:05   ` Dmitry A. Kazakov
2015-08-23 16:06     ` Simon Wright
2015-08-24  9:43   ` Stephen Leake
2015-08-24 12:53 ` ahlan
2015-09-05 19:50 ` ahlan
replies disabled

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