2 - Touch pan gestures

2017-03-21 Thread Prashant Kumar
Hi everyone, As you might know Gtk currently supports pan gesture with single touch only. I want my application to support 2 - touch panning. More Specifically,I want to keep track of 2nd finger while panning in the process. Is there any way I achieve this ? Thank you.

Re: Best practise inheritance

2017-03-21 Thread Emmanuele Bassi
On Tue, 21 Mar 2017 at 21:23, S. Jacobi wrote: > On Tue, 21 Mar 2017 20:53:04 + > Emmanuele Bassi wrote: > > > > > Also, do not store a private pointer in your instance structure, and > > use the get_private_instance() function that the

Re: Best practise inheritance

2017-03-21 Thread S. Jacobi
On Tue, 21 Mar 2017 20:53:04 + Emmanuele Bassi wrote: > > Also, do not store a private pointer in your instance structure, and > use the get_private_instance() function that the G_DEFINE_TYPE macro > creates for you. > So you say whenever I need access to the objects

Re: Best practise inheritance

2017-03-21 Thread Emmanuele Bassi
Don't use g_type_class_add_privat(). Either use the define type with private macro, or the define type with code macro with G_ADD_PRIVATE. Also, do not store a private pointer in your instance structure, and use the get_private_instance() function that the G_DEFINE_TYPE macro creates for you.

Re: Best practise inheritance

2017-03-21 Thread Nicola Fontana
Il Tue, 21 Mar 2017 17:55:31 + Tristan Van Berkom scrisse: > ... >   o I believe the lookups with G_TYPE_INSTANCE_GET_PRIVATE() are just >     as cheap as the pointer dereference (as it will be implemented >     using simple pointer arithmetic). Hi

Re: Best practise inheritance

2017-03-21 Thread Tristan Van Berkom
On Tue, 2017-03-21 at 18:27 +0100, S. Jacobi wrote: > On Mon, 20 Mar 2017 16:01:39 + > Tristan Van Berkom wrote: > > > > > > > Use instance private data, this will not need any priv pointer and > > can be done with th G_DEFINE_TYPE_WITH_PRIVATE() macro,

Re: Best practise inheritance

2017-03-21 Thread S. Jacobi
On Mon, 20 Mar 2017 16:01:39 + Tristan Van Berkom wrote: > > Use instance private data, this will not need any priv pointer and > can be done with th G_DEFINE_TYPE_WITH_PRIVATE() macro, and another > to lookup your private data inside your C file (under

Re: Re-drawing GtkDrawingArea surface on motion-notify-event

2017-03-21 Thread Joël Krähemann
Hi If you do it using cairo you might be interested in the following function. cairo_image_surface_get_data() You get the pixels stored in your picture. It can be restored using memcpy() what is actually quiet fast. Bests, Joël On Tue, Mar 21, 2017 at 8:26 AM, F.Reiter

Re: Re-drawing GtkDrawingArea surface on motion-notify-event

2017-03-21 Thread F.Reiter
Hallo, for lightning-fast, xor, rubberbanding, zooming, clipping ..  why not consider Open-GL ? Franz (https://github.com/gcad3d/gcad3d) ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org