Re: GDK/Cairo question

2011-05-19 Thread Fabian Greffrath
Am 18.05.2011 08:01, schrieb David Nečas: P.S.: This cannot hapen: if (!win) GLib would abort the program if a new object could not be allocated. It can. If you e.g. comment out the line attr.window_type = GDK_WINDOW_TOPLEVEL; then the program will abort with $ ./cairo_test (cairo_test

Re: GDK/Cairo question

2011-05-18 Thread David Nečas
On Wed, May 18, 2011 at 03:50:57PM -0700, Fabian Greffrath wrote: > > Unfortunately not. :( Maybe something similar to what you are trying to do could work - with considerable effort. But it is completely upside down from the point of view how normal Gtk+ applications work. Gtk+ runs an event lo

Re: GDK/Cairo question

2011-05-18 Thread Fabian Greffrath
Am 18.05.2011 06:35, schrieb Lance Dillon: Some code I maintain does something like: while(g_main_context_iteration(NULL,0)); Maybe that will work? Unfortunately not. :( ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail

Re: GDK/Cairo question

2011-05-18 Thread Lance Dillon
- Original Message > From: Fabian Greffrath > To: gtk-app-devel-list@gnome.org > Sent: Wed, May 18, 2011 5:04:12 PM > Subject: Re: GDK/Cairo question > > Am 18.05.2011 03:50, schrieb Miroslav Rajcic: > > You need to add a call like gtk_main_iteration_do() wi

Re: GDK/Cairo question

2011-05-18 Thread Fabian Greffrath
Am 18.05.2011 03:50, schrieb Miroslav Rajcic: You need to add a call like gtk_main_iteration_do() within your while loop. Thanks for the reply, but, no, adding gtk_main_iteration_do(FALSE) to the loop did not improve anything. Furthermore, I think the image should be drawn into the window aro

Re: GDK/Cairo question

2011-05-18 Thread Miroslav Rajcic
The source compiles fine and the application runs, but instead of displaying the PNG file, it only shows a black square with no apparent content. Please help me, what am I missing or doing wrong? You are running the program within an loop that does not process GTK events. You need to add a ca

GDK/Cairo question

2011-05-18 Thread Fabian Greffrath
Dear GTK+-gurus, I am currently in the process of teaching myself a bit of GDK/Cairo by porting a small application from using Pixmaps and Bitmaps to Cairo. Please find a short sample source attached below. The source compiles fine and the application runs, but instead of displaying the PNG