From: hreba <f_hreba@yahoo.com.br>
Subject: Re: Where do I get my Cairo context from (in GTK3)?
Date: Mon, 25 Apr 2016 12:03:03 +0200
Date: 2016-04-25T12:03:03+02:00 [thread overview]
Message-ID: <do68anFkub2U1@mid.individual.net> (raw)
In-Reply-To: <nfkhm1$18de$1@gioia.aioe.org>
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.
>
> I suppose sn_draw is "draw".
>
Correct.
>> 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.
--
Frank Hrebabetzky +49 / 6355 / 989 5070
next prev parent reply other threads:[~2016-04-25 10:03 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 [this message]
2016-04-25 11:58 ` Dmitry A. Kazakov
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