| | |
Python Xlib . Looking for basis docs or tut.
Please support our Python advertiser: Programming Forums - DaniWeb Sister Site
![]() |
•
•
Join Date: Jul 2009
Posts: 8
Reputation:
Solved Threads: 1
Just want to create a flexible desktop that is independent from system. For my linux system.
Like to have Clean Window and Transparent.
1. Looking for the basic on Xlib. Most of what i found is unclear where i start.
I like to start simple and expand.
a. Want to just open a clear transparent(150) window at size(400,300) with darken borders.
b. Set graphics myself. No Titlebar or Close.
c. Have it set in System tray for quick recall.
d. have it launch it own apps from icons.
2. Any other options with easy documents ?
3. Is gtk slow for this. I know many light window manger don't like including gtk libs. .
or am i wrong.
4. Can this be done with wxpython.
Like to have Clean Window and Transparent.
1. Looking for the basic on Xlib. Most of what i found is unclear where i start.
I like to start simple and expand.
a. Want to just open a clear transparent(150) window at size(400,300) with darken borders.
b. Set graphics myself. No Titlebar or Close.
c. Have it set in System tray for quick recall.
d. have it launch it own apps from icons.
2. Any other options with easy documents ?
3. Is gtk slow for this. I know many light window manger don't like including gtk libs. .
or am i wrong.
4. Can this be done with wxpython.
Last edited by DrakeMagi; Sep 22nd, 2009 at 12:57 pm.
•
•
Join Date: Jul 2009
Posts: 8
Reputation:
Solved Threads: 1
One i'm looking for docs or other options. For xlib
Most docs i find are for c.
Two not making an Desktop that take over the other .
Just something small i want to add.
Three it fine it blows up in my face.
Learning is about failures.
in time i will succeed.
I'm self taught. And i learned from reading different docs.
Start off simple and expand.
All i'm asking for where can i find good docs or tutorials.
Point me in the right direction. Thanks.
Most docs i find are for c.
Two not making an Desktop that take over the other .
Just something small i want to add.
Three it fine it blows up in my face.
Learning is about failures.
in time i will succeed.
I'm self taught. And i learned from reading different docs.
Start off simple and expand.
All i'm asking for where can i find good docs or tutorials.
Point me in the right direction. Thanks.
Last edited by DrakeMagi; Sep 22nd, 2009 at 7:35 pm.
•
•
Join Date: Jul 2009
Posts: 8
Reputation:
Solved Threads: 1
Still looking for python docs.
reading some docs. and some source code.
This is what i come up with so far.
Still don't know if there some stuff i could get rid of for the basic.
understand about what half i did.
reading some docs. and some source code.
This is what i come up with so far.
Still don't know if there some stuff i could get rid of for the basic.
understand about what half i did.
Python Syntax (Toggle Plain Text)
import sys , os # Change path so we find Xlib sys.path.insert(1, os.path.join(sys.path[0], '..')) from Xlib import X, display, Xutil class Bluebird: def __init__(self,display): self.dis = display self.screen = self.dis.screen() self.window = self.screen.root.create_window( 50, 50, 400, 300, 2, self.screen.root_depth, X.InputOutput, X.CopyFromParent, background_pixel = self.screen.white_pixel, event_mask = (X.ExposureMask | X.StructureNotifyMask | X.ButtonPressMask | X.ButtonReleaseMask | X.Button1MotionMask), colormap = X.CopyFromParent, ) self.window.map() self.WM_DELETE_WINDOW = self.dis.intern_atom('WM_DELETE_WINDOW') self.WM_PROTOCOLS = self.dis.intern_atom('WM_PROTOCOLS') self.window.set_wm_protocols([self.WM_DELETE_WINDOW]) def loop(self): while 1: e = self.dis.next_event() if e.type == X.ClientMessage: if e.client_type == self.WM_PROTOCOLS: fmt, data = e.data if fmt == 32 and data[0] == self.WM_DELETE_WINDOW: sys.exit(0) if __name__ == '__main__': Desktop = Bluebird(display.Display()) Desktop.loop()
![]() |
Similar Threads
- python language on symbian operating system (Python)
- Xflush and Xlib extension (like in PyPanel) (Python)
- Incomprehensible syntax error (Python)
- Beginner Pygame and Python help (Python)
- Controlling mouse with Python in X (Python)
- help with while loop (Python)
- Reading data from XML files (Python)
- problem in multi filed code? (Python)
- Is Python any good? (Python)
- Why use a Python class? (Python)
Other Threads in the Python Forum
- Previous Thread: racquetball simulation program
- Next Thread: Moving an object with control keys in a sprite
| Thread Tools | Search this Thread |
address aliased anydbm bash beginner bits calling casino changecolor class clear conversion convert corners count cturtle cursor curves definedlines dictionary digital dynamic dynamically events examples excel external file float format frange function gui handling hints homework i/o iframe import info input java line linux list lists loan loop matching mouse multiple number numbers output parsing path port prime programming projects py py2exe pygame python random rational raw_input recursion recursive scrolledtext searchingfile shebang signal singleton string strings subprocess table tails terminal text thread threading time tkinter tlapse tooltip tuple tutorial type ubuntu unicode urllib urllib2 valueerror variable web-scrape whileloop word wxpython






