comp.lang.ada
 help / color / mirror / Atom feed
* Declaring GLADE callbacks with G_MODULE_EXPORT.
@ 2016-03-31  9:11 George J
  2016-03-31  9:21 ` George J
  0 siblings, 1 reply; 7+ messages in thread
From: George J @ 2016-03-31  9:11 UTC (permalink / raw)


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?". I couldn't find any example for Ada with this declaration, and really can't understand, how I can do it. Thanks.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Declaring GLADE callbacks with G_MODULE_EXPORT.
  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
  0 siblings, 1 reply; 7+ messages in thread
From: George J @ 2016-03-31  9:21 UTC (permalink / raw)


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.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Declaring GLADE callbacks with G_MODULE_EXPORT.
  2016-03-31  9:21 ` George J
@ 2016-03-31  9:34   ` Dmitry A. Kazakov
  2016-03-31  9:51     ` George J
  0 siblings, 1 reply; 7+ messages in thread
From: Dmitry A. Kazakov @ 2016-03-31  9:34 UTC (permalink / raw)


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


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Declaring GLADE callbacks with G_MODULE_EXPORT.
  2016-03-31  9:34   ` Dmitry A. Kazakov
@ 2016-03-31  9:51     ` George J
  2016-03-31 13:27       ` George J
  0 siblings, 1 reply; 7+ messages in thread
From: George J @ 2016-03-31  9:51 UTC (permalink / raw)


Thanks Dmitry, I'll try to declare in this way and post later the result.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Declaring GLADE callbacks with G_MODULE_EXPORT.
  2016-03-31  9:51     ` George J
@ 2016-03-31 13:27       ` George J
  2016-04-01  8:07         ` briot.emmanuel
  0 siblings, 1 reply; 7+ messages in thread
From: George J @ 2016-03-31 13:27 UTC (permalink / raw)


On Thursday, 31 March 2016 12:51:53 UTC+3, George J  wrote:
> Thanks Dmitry, I'll try to declare in this way and post later the result.

I can't connect signals to my GUI ADA Application with GLADE. So I will be grateful to the one who will be able to make a simple example of usage Gtk.Builder.Connect_Signals (in Ada). Thanks!

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Declaring GLADE callbacks with G_MODULE_EXPORT.
  2016-03-31 13:27       ` George J
@ 2016-04-01  8:07         ` briot.emmanuel
  2016-04-01  8:31           ` George J
  0 siblings, 1 reply; 7+ messages in thread
From: briot.emmanuel @ 2016-04-01  8:07 UTC (permalink / raw)


> I can't connect signals to my GUI ADA Application with GLADE. So I will be grateful to the one who will be able to make a simple example of usage Gtk.Builder.Connect_Signals (in Ada). Thanks!


testgtk/create_builder.adb in the GtkAda distribution


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Declaring GLADE callbacks with G_MODULE_EXPORT.
  2016-04-01  8:07         ` briot.emmanuel
@ 2016-04-01  8:31           ` George J
  0 siblings, 0 replies; 7+ messages in thread
From: George J @ 2016-04-01  8:31 UTC (permalink / raw)


On Friday, 1 April 2016 11:07:24 UTC+3, briot.e...@gmail.com  wrote:
> > I can't connect signals to my GUI ADA Application with GLADE. So I will be grateful to the one who will be able to make a simple example of usage Gtk.Builder.Connect_Signals (in Ada). Thanks!
> 
> 
> testgtk/create_builder.adb in the GtkAda distribution

Thanks a lot!

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2016-04-01  8:31 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
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

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