comp.lang.ada
 help / color / mirror / Atom feed
From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Subject: Re: How to add a GTKAda?
Date: Mon, 17 Jun 2013 09:26:59 +0200
Date: 2013-06-17T09:26:59+02:00	[thread overview]
Message-ID: <18skv8a27id6j$.zmpapixyu2ak$.dlg@40tude.net> (raw)
In-Reply-To: e101081e-3847-42a7-a4a8-7aafe8e3c056@googlegroups.com

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


  parent reply	other threads:[~2013-06-17  7:26 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-17  2:51 How to add a GTKAda? Marcus F
2013-06-17  4:11 ` Jeffrey Carter
2013-06-17  4:50   ` Marcus F
2013-06-17  5:01     ` J-P. Rosen
2013-06-17  7:26     ` Dmitry A. Kazakov [this message]
2013-06-17  7:34       ` Marcus F
2013-06-18 10:45         ` Stephen Leake
2013-06-18 17:17           ` Marcus F
2013-06-18 22:44             ` Adam Beneschan
2013-06-19  7:05             ` Simon Wright
replies disabled

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