OESF | ELSI | pdaXrom | OpenZaurus | Zaurus Themes | Community Links | Ibiblio

IPB

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Xlib Assistance, Please
Capn_Fish
post Dec 12 2007, 06:54 PM
Post #1





Group: Members
Posts: 2,350
Joined: 30-July 06
Member No.: 10,575



I'm trying to write an app to draw to the root window with Xlib (using C/C++). I can't find a good answer as to how to do this, so could somebody less search-impaired perhaps point me to such a place? Or perhaps provide a brief description/code sample?

Thanks.
Go to the top of the page
 
+Quote Post
ernestus
post Dec 17 2007, 08:41 AM
Post #2





Group: Members
Posts: 49
Joined: 21-July 06
From: Cambridge (UK)
Member No.: 10,479



Doesn't work for you painting on the root directly as an usual window?
haven't tried that, but I think you are allowed to use the "normal" xlib routines to draw on it like it were another, non-root, window.
There is a very simple example in:
http://zez.org/article/articleprint/87/
The only thing you may need to change in that example is the creation of an application window, you don't need it so you can try to paint directly on the root.
I repeat I haven't tried that, but it should work
Go to the top of the page
 
+Quote Post
Capn_Fish
post Dec 17 2007, 11:22 AM
Post #3





Group: Members
Posts: 2,350
Joined: 30-July 06
Member No.: 10,575



Ah, thank you! I will look at that ASAP.

EDIT: That works! Thank you!
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
2 User(s) are reading this topic (2 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 23rd September 2014 - 02:22 AM