[cairo] graphics problem
mail at ssalewski.de
Tue Oct 13 09:46:05 PDT 2015
On Tue, 2015-10-13 at 15:54 +0300, Roman Goldov wrote:
> Hello, i installed CentOS 7 and gtk-devel libaries. I learn GTK+ and
> Cairo. I downloaded (copied) from Internet an exmple of cairo file
> (file9.c that is attached) where i tried to draw lines (graphics) on
> the window. However, the window is opened and it is empty, and also
> theer is warning message in the terminal:
> [... at localhost ~]$ gcc -Wall -g file9.c -o file9.exe `pkg-config -
> -cflags gtk+-2.0` `pkg-config --libs gtk+-2.0`
> [... at localhost ~]$ ./file9.exe
> (file9.exe:9678): GLib-GObject-WARNING **: gsignal.c:2462: signal
> 'draw' is invalid for instance '0x968440' of type 'GtkDrawingArea'
> I would appreciate help in solving the problem. A detailed answer
> would be appreciated because i am a new user of Linux.
> Thank you.
> Roman Goldov
You took that example from zcode.com -- so why do you not tell us?
That example is for GTK3 now. It will not work in its current state with
GTK2. You may asks the author if he still has the very old GTK2 version.
Or you may use other examples which have not been ported to GTK3 jet, I
guess there will exists some in internet. Or, you you may port that
example back to GTK2, I think there is not very much to modify, but I do
not know exactly what, because I am using GTK3 for years now.
Is there no GTK3 available for your OS, or have you a good reason for
using old GTK2?
If you really need a GTK2 example and can not find one, let us know, I
may provide one in the next few days...
More information about the cairo