Re: deprecated gtk_cairo_create

2016-12-30 Thread rbd
On Fri, 30 Dec 2016, cecas...@aol.com wrote: Hi Roger, Would this be similar to using a GtkLayout and a GtkDrawingArea? If you add a drawing area to a layout you get draw scrolling and the layout can update the part of the drawing area shown on the screen even though the drawing might be on

Re: deprecated gtk_cairo_create

2016-12-30 Thread Eric Cashon via gtk-app-devel-list
Hi Roger, Would this be similar to using a GtkLayout and a GtkDrawingArea? If you add a drawing area to a layout you get draw scrolling and the layout can update the part of the drawing area shown on the screen even though the drawing might be on a larger area. Eric -Original

Re: deprecated gtk_cairo_create

2016-12-30 Thread rbd
Hello Sergei, Unfortunately the use of the gtk3 DrawingArea is a bit obscure and difficult to figure out. However, I have been able to make use of it very effectively in conjunction with Cairo drawing ops. For various reasons I have created a GUI toolkit library which lies between my app

Re: deprecated gtk_cairo_create

2016-12-30 Thread Emmanuele Bassi
Hi; On 30 December 2016 at 13:45, Colomban Wendling wrote: > [1] which says "CairoContext", but that's a weird lie on the API… not > sure why, maybe the GType has this name so introspection is confused. > Anyway, it's cairo_t. The API reference is generated via

Re: deprecated gtk_cairo_create

2016-12-30 Thread Emmanuele Bassi
Hi; On 30 December 2016 at 17:25, Jim Charlton wrote: > If one does want to draw into a cairo_surface_t, one can create a cairo > context for drawing? E.g. Yes, that's the expected approach. You either create your own Cairo surface, or you ask GDK to create a similar

Re: deprecated gtk_cairo_create

2016-12-30 Thread Colomban Wendling
Le 30/12/2016 à 18:25, Jim Charlton a écrit : > If one does want to draw into a cairo_surface_t, one can create a cairo > context for drawing? E.g. > > cairo_t * > cairo_create (/|cairo_surface_t >

Re: deprecated gtk_cairo_create

2016-12-30 Thread Jim Charlton
On 2016-12-30 05:45 AM, Colomban Wendling wrote: Hi, Le 30/12/2016 à 12:20, Sergei Kolomeeyets a écrit : Hi, everyone […] {draw_callback} gboolean draw_callback(GtkWidget *area, GdkEventExpose *event, GArray *ptLinePoints) { That's not the right signature for the GtkWidget::draw signal: it

Re: deprecated gtk_cairo_create

2016-12-30 Thread Colomban Wendling
Le 30/12/2016 à 15:09, Sergei Kolomeeyets a écrit : > Hi, Colomban > Thanks a lot for you hint! I realised the idea of wrong event hanling. > Do you mean that I SHOULD DO NOTHING to create a cairo context BECAUSE > IT IS in the draw event callback function obligatory parameters? And, if > yes, I

Re: deprecated gtk_cairo_create

2016-12-30 Thread Colomban Wendling
Hi, Le 30/12/2016 à 12:20, Sergei Kolomeeyets a écrit : > Hi, everyone > […] > > {draw_callback} > > gboolean draw_callback(GtkWidget *area, GdkEventExpose *event, GArray > *ptLinePoints) { That's not the right signature for the GtkWidget::draw signal: it takes a cairo_t* as the second

deprecated gtk_cairo_create

2016-12-30 Thread Sergei Kolomeeyets
Hi, everyone I'm struggling with migration from gtk2. Well gtk_cairo_create is deprecated in gtk3. And it looks the changes are very serious (or I'm sach silly that even do not understand what should I do instead of it ). Is there anybody who use Drawing Area in GTK3 and can explain the right way