Gaurav Jain wrote: > For the purpose of my application, I need to programmatically > determine the actual 'exposed' region of a gdk window. The exposed > region should not include any obscured regions of the window. For > example, if there's some external window in front of my application's > window, then the exposed region should not include the area obscured > by that external window, but should include all other area that's > visible. > > I tried using the API gdk_drawable_get_visible_region() but this > doesn't exclude the obscured regions, so it's not of my use. > > Does somebody know of any suitable API that I can use to achieve what > I want? Or is there a method that somebody could suggest that I could > use to calculate this region?
I'm pretty much a beginner with gtk but I do know a bit about X and you haven't had an answer, so here's what I understand: What is currently exposed is dynamic, of course, so it's event driven. I believe you need to get the GdkEventExpose structure from a GdkEvent of type GDK_EXPOSE and then look at the GdkRegion structure within it, which contains the information you're looking for. You'll need to enable such events on your window. You can also cause such an event any time you want by calling queue_redraw. HTH, Dave _______________________________________________ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list