Re: libseed-list GTK+3 example?
- From: "Alan Knowles" <alan akbkhome com>
- To: "august" <libseed-list-bounces gnome org>
- Cc: libseed-list gnome org
- Subject: Re: libseed-list GTK+3 example?
- Date: Wed, 18 May 2011 07:42:39 +0800
Gtk3 docs have been generated now,
At the bottom of my rant about unity, there are some details on the major changes in Gtk3 that affect seed.
http://roojs.com/index.php/View/236/.html
In this case,
http://www.roojs.com/seed/gir-1.2-gtk-3.0/seed/Gtk.DrawingArea.html
The signal signature is this,
draw (Widget self, Context cr) : gboolean
function draw_arc(ctx,cr){
print(cr); // should output [object CairoContext]
}
Regards
Alan
--- On 18/May/2011, august wrote:
> Hi Everyone,
>
> I'm struggling with a problem. With GTK2, seed was able to draw in a
> widget using the expose_event signal and a callback such as this:
>
> function draw_arc(drawing_area){
> var cr = new cairo.Context.from_drawable(drawing_area.window);
> // .. do soem cairo stuff on cr
> return false;
> }
> var d = new Gtk.DrawingArea();
> d.signal.expose_event.connect(draw_arc);
>
>
> In GTK3, I see there is a "draw" signal that one can connect to.
> However, instead of a Cairo.context as a parameter, I still get a
> [object GtkDrawingArea].
>
> function draw_arc(ctx){
> print(ctx); // outputs [object GtkDrawingArea]
> }
> var d = new Gtk.DrawingArea();
> d.signal.draw.connect(draw_arc);
>
>
> Any ideas or suggestions here? How do I get a Cario context in
> GTK+-3?
>
>
> Thanks -august.
>
> _______________________________________________
> libseed-list mailing list
> libseed-list gnome org
> http://mail.gnome.org/mailman/listinfo/libseed-list
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]