Re: Rendering to the X Root Window???
- From: "Tara M" <learfox furry ao net>
 
- To: "LIST: GTKAppDevel" <gtk-app-devel-list gnome org>
 
- Subject: Re: Rendering to the X Root Window???
 
- Date: 19 Jun 2001 17:38:53 PDT
 
On 20 Jun 2001 00:55:12 +0200, Joachim Rosskopf said:
 Hmm,
 
 first: Thank you for your answer.
 second: Do you have some sourcecode. As I think I do the way you tell
 me. But nothing is shown on the root window.
Not for GDK, no. :(
I have a ton of Xlib code but they arn't exactly equivs in this
situation.
Here, it's simpler than you think though.
In gdk/gdkx.h (you need to #include that btw!!), there is
GDK_ROOT_PARENT
This is a macro that returns the initialized root window
(after gtk/gdk is initialized ofcourse).
Now to get the root window is easy:
GdkWindow root = (GdkWindow *)GDK_ROOT_PARENT();
if(root != NULL)
{
        DoSomethingNeatToAWindow(root);
}
Do not deallocate or unref it though, but you can do any
gdk draw stuff to it. :)
Including clear and getting an XImage of it. I think there
are other issues that limit what you can do with it though...
but I don't know how to check for them.
I just get the root window and check its size for centering
of dialogs...
-- 
--
Sincerely,                  ,"-_                         \|/
-Capt. Taura M.             ,   O=__                    --X--
.__                          ,_JNMNNEO=_                 /|\
OMNOUMmnne.                  {OMMNNNEEEEOO=_
UOOOBIOOOEOMMn.               'LONMMMMNNEEEOOO=.__..,,..
UUOOEUUOOOOOOOObe              '"=OMMMMWNEEEOOOOO,"=OEEEOO=,._
OOUUUIEEIOONNOIUbe.                "7OMMMMNNNNNWWEEEEOOOOOO"   "'.
EEBNNMMMNWNWWEEIMMNe.             __  7EMMMNNNNNWWWEEEEEEEOO.     " .
NNMMMMWWWMMMWEINMMMNn            "=BBEEEEMMMMMMMMNNNWWWEEOOOOO=._     .
                  http://furry.ao.net/~learfox/
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]