libseed-list GTK+3 example?



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.



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]