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: border1.nntp.ams3.giganews.com!border1.nntp.ams2.giganews.com!border2.nntp.ams2.giganews.com!border4.nntp.ams.giganews.com!border2.nntp.ams.giganews.com!nntp.giganews.com!de-l.enfer-du-nord.net!feeder2.enfer-du-nord.net!cs.uu.nl!news.stack.nl!aioe.org!.POSTED!not-for-mail From: "Dmitry A. Kazakov" Newsgroups: comp.lang.ada Subject: Re: How to add a GTKAda? Date: Mon, 17 Jun 2013 09:26:59 +0200 Organization: cbb software GmbH Message-ID: <18skv8a27id6j$.zmpapixyu2ak$.dlg@40tude.net> References: Reply-To: mailbox@dmitry-kazakov.de NNTP-Posting-Host: IenaDxMXK2hi7fvYcb+MlQ.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 X-Original-Bytes: 2417 Xref: number.nntp.dca.giganews.com comp.lang.ada:181880 Date: 2013-06-17T09:26:59+02:00 List-Id: On Sun, 16 Jun 2013 21:50:14 -0700 (PDT), Marcus F wrote: > I'm certainly new to Ada (A few days in), but I'm not new to programming, > I usually learn best by examples and by altering code, which is why I > wanted to play with GTK, I've done minimal GUI programming before in > PortablE. 1. Rosetta Code has plenty GtkAda examples: http://rosettacode.org/wiki/Rosetta_Code Note that these are GTK 2.x (GtkAda 2.24.x). Don't expect them working with GTK 3.x (GtkAda 3.4.x). None will. But it is relatively straightforward to fix them. I presume, the biggest issue for a beginner would be generic packages defining signal handlers. They cannot be instantiated deeper than on the library level. Examples tend to be single source file, which will require unchecked conversions for a locally defined handler to the library level callback procedure. (For a real-life project it is not an issue because it will put this stuff into library level packages.) 2. Refer to GTK documentation and tutorials: https://developer.gnome.org/gtk3/stable/ GtkAda is thin bindings, so C examples are relatively simple to translate into Ada. Except for signal handlers which are made Ada way (e.g. type safe). 3. You should probably switch to GPS. AdaGIDE is nice but not suitable for large projects. It is much comfortable for GtkAda and other large projects deploying GNAT project files (*.gpr). -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de