From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!mx02.eternal-september.org!feeder.eternal-september.org!aioe.org!.POSTED!not-for-mail From: "Dmitry A. Kazakov" Newsgroups: comp.lang.ada Subject: Re: Gtkada on Mac using Quartz Date: Sun, 23 Aug 2015 15:32:41 +0200 Organization: cbb software GmbH Message-ID: <1jvvjthr4ppqc.1abmx4e18bfbm$.dlg@40tude.net> References: <0d2ca159-baab-4781-bc56-d957f5bd61b6@googlegroups.com> <93a04416-8e92-45a8-bdb0-b975ef18562f@googlegroups.com> Reply-To: mailbox@dmitry-kazakov.de NNTP-Posting-Host: se3iTW6QYgtZe5ofWsxzmg.user.speranza.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Complaints-To: abuse@aioe.org User-Agent: 40tude_Dialog/2.0.15.1 X-Notice: Filtered by postfilter v. 0.8.2 Xref: news.eternal-september.org comp.lang.ada:27578 Date: 2015-08-23T15:32:41+02:00 List-Id: 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