Re: GTK+3 - A common event handler - Gone OT into cairo and draw territory

2013-05-30 Thread Donn
Bernhard, thanks for all your comments and advice. \d ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

Re: GTK+3 - A common event handler - Gone OT into cairo and draw territory

2013-05-30 Thread Donn
On 27/05/2013 09:44, Bernhard Schuster wrote: Store the matrix, convert the mouse pointer to canvas space (or polygonspace), not the other way round. Can you give me some sample code (pseudo or whatever)? Once in the draw() handler, I can use the Context to get the matrix (somehow - I'd look i

Re: GTK+3 - A common event handler - Gone OT into cairo and draw territory

2013-05-23 Thread Donn
Thanks for your thoughts, I have pushed my luck and replied :) On 22/05/2013 17:18, Bernhard Schuster wrote: If you compose your stuff of polygons (which I am pretty sure you do), there is pretty neat math to check if your cursor is in or outside of a polygon (for low vertex count polygons, for

Re: GTK+3 - A common event handler - possible?

2013-05-22 Thread Donn
On 22/05/2013 09:29, Bernhard Schuster wrote: In general factoring code is good (at least that's my opinion) - what you are trying to do is the reverse and will give you one very big function, hardly readable. I take your very good point. I really suggest you to go with seperate handlers. If y

GTK+3 - A common event handler - possible?

2013-05-21 Thread Donn
This is very general - I can't offer code - but is it possible to have all events (mouse, keys and other) come into a single event handler somehow? I've got a Gtk Window onto which I am drawing shapes (override the draw method and use cairo) and I want to make various shapes react to mouse eve

Re: GTK+3 motion events and is_hint

2013-05-17 Thread Donn
On 17/05/2013 11:29, Tristan Van Berkom wrote: This is a good question, actually I haven't used this feature since GTK+2... I'd be curious to know the answer but here is my input anyway. Tristan, Thanks so much for responding. I will try your suggestions and perhaps clarity will come in time.

Re: GTK+3 motion events and is_hint

2013-05-17 Thread Donn
Anyone? \d ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

GTK+3 motion events and is_hint

2013-05-04 Thread Donn
Hi, (Like in idiot I sent the first version of this to the wrong list!) Hi, I'm new to GTK (and Vala). This is a Gtk+3.x question. Can anyone explain why the event->is_hint always seems to return 1? AFAICT the HINT_MASK is supposed to reduce the number of motion events *and* send the occasiona

Re: How to compile tictactoe widget example in tutorial

2010-02-07 Thread donn
On 07/02/2010 14:30, Tor Lillqvist wrote: You need to compile and link *both* the .c files into *one* executable. Thanks, I think ... these concepts are not well introduced in the tutorial. I.e.: gcc -Wall -g `pkg-config --cflags gtk+-2.0` tictactoe.c test_tictactoe.c -o ttt `pkg-config --lib

How to compile tictactoe widget example in tutorial

2010-02-07 Thread donn
config --cflags --libs gtk+-2.0` /tmp/cccS33ns.o: In function `win': /home/donn/Projects/cing/gtk_tuts/test_tictactoe.c:9: undefined reference to `tictactoe_get_type' /home/donn/Projects/cing/gtk_tuts/test_tictactoe.c:9: undefined reference to `tictactoe_clear' /tmp/cccS33ns.o: