<html><body><div style="color:#000; background-color:#fff; font-family:times new roman, new york, times, serif;font-size:12pt"><div>I am a cairo newbie on Ubuntu 12.04 LTS using GTK+3.0.<br><br>I have read 'Changes that need to be done at the time of the switch' at Gnome Dev Centre which explains what is new for GTK+3.0. It mentions that "expose-event" signal has been replaced by a new "draw" signal. That is very clear, but I have seen examples in other forums of expose event used together with gtk_drawing_area_new, so I tried using it too:<br><br>...<br>darea = gtk_drawing_area_new();<br>gtk_container_add(GTK_CONTAINER(window), darea);<br>g_signal_connect(G_OBJECT(darea), "expose-event",<br> G_CALLBACK(on_expose_event), &h);<br><br>It compiled and built but generated <br>(gv:2938): GLib-GObject-WARNING **:
/build/buildd/glib2.0-2.32.3/./gobject/gsignal.c:2455: signal `expose-event' is invalid for instance `0x78d020' when executing the g_signal_connect. (0x78d020 refers to darea). That suggests that expose event does not work/is not available for GTK+3.0. Is this so?<br><br>Event handlers for expose-event have a GdkEventExpose *event parameter that allows 'regions' to be updated. The draw handler does not have this parameter. Has updating regions been dropped in GTK+3.0 or can it be done in some other way? If so, where can I read about it?<br><br>GTK+3.0 came with Ubuntu 12.04LTS. I will also need to support GTK+2. Can GTK 3 and GTK 2 coexist on the same Ubuntu/Linux PC, for example as different shared object libraries or do I need to use two PCs? <br><br>I could build GTK3-only and GTK2-only versions or build a combined version that switches on gtk version as needed. Pros and cons?</div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: times
new roman,new york,times,serif; background-color: transparent; font-style: normal;"><br></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: times new roman,new york,times,serif; background-color: transparent; font-style: normal;">Ken</div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: times new roman,new york,times,serif; background-color: transparent; font-style: normal;"> <br> </div></div></body></html>