From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Subject: Re: Declaring GLADE callbacks with G_MODULE_EXPORT.
Date: Thu, 31 Mar 2016 11:34:25 +0200
Date: 2016-03-31T11:34:25+02:00 [thread overview]
Message-ID: <ndiqvp$khc$1@gioia.aioe.org> (raw)
In-Reply-To: 68f13969-e3ff-45ae-b797-4f7bfc96203b@googlegroups.com
On 31/03/2016 11:21, George J wrote:
> On Thursday, 31 March 2016 12:11:12 UTC+3, George J wrote:
>> Hi all! I've got a problem with connecting signals with
>> Builder.Connect_Signals. It's said in description that "...When
>> compiling applications for Windows, you must declare callbacks with
>> G_MODULE_EXPORT...". So my question is "how to do this?" and what does
>> it mean?
>
> For example how I can link this way procedure like
> ---------------------------------------------------------
> procedure Test(Self:Gtk_Some_Object) is
> begin
> null;
> end Test;
> ---------------------------------------------------------
> I couldn't find any example for Ada with this declaration, and really
> can't understand, how I can do it. Thanks.
I don't use GLADE, of course, so it is just guessing. Under Windows
G_MODULE_EXPORT is likely DLL export used to bind to the procedure after
loading the DLL. In Ada terms it must be
pragma Export (C, Test, "Test");
or, if GLADE uses Windows API conventions:
pragma Export (Stdcal, Test, "Test");
The external name "Test" is up to experiments. It could be "_test" or
some Windows mangled name "Test@...". I have no idea what external names
GLADE uses. An error message upon loading/linking should hint at it.
--
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de
next prev parent reply other threads:[~2016-03-31 9:34 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-31 9:11 Declaring GLADE callbacks with G_MODULE_EXPORT George J
2016-03-31 9:21 ` George J
2016-03-31 9:34 ` Dmitry A. Kazakov [this message]
2016-03-31 9:51 ` George J
2016-03-31 13:27 ` George J
2016-04-01 8:07 ` briot.emmanuel
2016-04-01 8:31 ` George J
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox