<div dir="ltr">Hi,<br><div class="gmail_extra"><br><div class="gmail_quote">2013/4/9 Ken Resander <span dir="ltr"><<a href="mailto:kresander@yahoo.com" target="_blank">kresander@yahoo.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div><div style="font-size:12pt;font-family:times new roman,new york,times,serif"><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:</div>
</div></div></blockquote><div><br></div><div style>As you correctly read, there is no more "expose-event" signal in GTK3.0,</div><div style>as it is replaced by "draw".</div><div><br></div><div> </div>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div style="font-size:12pt;font-family:times new roman,new york,times,serif"><div>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>
</div></div></div></blockquote><div><br></div><div style>You can read about it <a href="https://developer.gnome.org/gtk3/3.5/chap-drawing-model.html">here</a>. Basically, the clip region is already applied</div><div style>
to the cairo context before signal emission. I think you could query it</div><div style>explicitly using calls you will find in the cairo docs, but I think for simple</div><div style>cases simply drawing and letting cairo take care of clip based</div>
<div style>optimizations is the easiest solution.</div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div style="font-size:12pt;font-family:times new roman,new york,times,serif">
<div>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></div></blockquote><div><br></div><div style>AFAIK, there is absolutely no problem with having two GTK versions</div><div style>installed in parallel. After all, the library version number takes care of</div><div style>
any collisions. Most people have been running applications with both</div><div style>versions along side each other for as long as GTK3.0 has been released.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div style="font-size:12pt;font-family:times new roman,new york,times,serif"><span class="HOEnZb"><font color="#888888"><div style="font-style:normal;font-size:16px;background-color:transparent;font-family:times new roman,new york,times,serif">
Ken</div></font></span></div></blockquote><div><br></div><div style>Jonas</div><div style><br></div></div><br></div></div>