comp.lang.ada
 help / color / mirror / Atom feed
From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Subject: Re: Where do I get my Cairo context from (in GTK3)?
Date: Mon, 25 Apr 2016 13:58:07 +0200
Date: 2016-04-25T13:58:07+02:00	[thread overview]
Message-ID: <nfl0pa$23u$1@gioia.aioe.org> (raw)
In-Reply-To: do68anFkub2U1@mid.individual.net

On 25/04/2016 12:03, hreba wrote:
> On 04/25/2016 09:40 AM, Dmitry A. Kazakov wrote:
>
>> If you instantiate it with GObject, why using Gtk_Widget instead?
>
> I use Glade and Gtk_Builder.Get_Object returns GObject. Nearly all
> examples for handler connection use Gtk_Widget so I did the same.

But it is still GObject_Record.

>> I suppose sn_draw is "draw".
>>
> Correct.

Is it Signal_Name in Connect? Recent GtkAda changes broke a lot of 
things. Try a plain string literal instead.

>>> So where do I get the cairo context from?
>>
>> As you did. Just make sure that all parameters of Connect match. Instead
>> of pointer conversion use object conversion. E.g.
>>
>>     Gtk_Widget_Record'Class (Obj.all)'Unchecked_Access
>
> So I changed my call of Connect to
>
>        DA_Ret_Callback.Connect
>     (Gtk.Widget.Gtk_Widget_Record'Class(obj.all)'Unchecked_Access,
>      sn_draw,
>      DA_Ret_Callback.To_Marshaller(Draw_Handler'Access),
>      hd);
>
> but I still get the same error message from the compiler.

Try to specify a concrete marshaller in conversion, to narrow the 
problem. To_Marshaler is a renaming. Use the original full name from the 
marshaler package that instantiates the Draw's profile. You have a type 
mismatch in some of the parameters.

-- 
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de

  reply	other threads:[~2016-04-25 11:58 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-24 20:44 Where do I get my Cairo context from (in GTK3)? hreba
2016-04-25  7:40 ` Dmitry A. Kazakov
2016-04-25 10:03   ` hreba
2016-04-25 11:58     ` Dmitry A. Kazakov [this message]
2016-04-26  7:22       ` briot.emmanuel
2016-04-26  7:34         ` hreba
2016-04-27  7:47           ` briot.emmanuel
2016-04-27  8:08             ` Dmitry A. Kazakov
2016-04-28  7:48               ` briot.emmanuel
2016-04-27 13:15             ` hreba
2016-04-27 13:37               ` Dmitry A. Kazakov
2016-04-28  7:49                 ` briot.emmanuel
2016-08-05 15:56 ` borisgaertner56
replies disabled

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