tags:

views:

318

answers:

2

I am working on a demo application for a library me and two colleagues are writing to allow GNOME applications that run audio events though libCanberra to allow users to select visual events to replace them. This is an accessibility-minded effort to help both visually and aurally impaired users gain the benefits of audio alerts and such.

For our first demo we're simply trying to make the entire screen flash with a color when a button is pressed in our simple GTK sample app. I've been looking at the GTK documentation and all drawing that I've seen has had to do with drawing directly to a window or other widget. I want to control the entire screen's hue. Would this be a GDK thing? Am I completely off base?

Any links/help will be much appreciated! Thanks.

PS: This is being written in C, though functions should be the same between languages with proper bindings, I assume.

+2  A: 

You cannot. Your application has access only to its own window, and does not (and should not) know anything about other windows, or the screen. The "screen" is managed by whatever back-end GTK uses (X? Win32? DirectFB?).

That said, you could try to create a "full-screen" window that covers the entire screen area. That is the way full-screen apps are implemented in most windowing systems.

stormsoul
Be careful with this as if you paint a fullscreen window that just shows what's underneath it, you may runto problems with a compositing manager like Compiz.
MighMoS
A: 

GTK doesn't have such option AFAIK, you probably want to use the backend: Xlib (or Xcb) for that.

felipec
Thanks for the responses. Not having the time to learn Xlib for that portion specifically, we've gotten by for this iteration of the project by creating a completely transparent window via GDK. Unfortunately, this requires that users have compositing enabled, but we've made equivalent solutions for those who don't. That said, it works..somewhat.
RyanG