Skip to content

Commit b2eb093

Browse files
committed
Complete high-level interface implemented.
1 parent 14218a0 commit b2eb093

3 files changed

Lines changed: 75 additions & 3 deletions

File tree

TODO

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
2+
*** Necessary for complete X11R6 implementation
3+
4+
* Bitmap support: Drawable.GetImage and Drawable.PutImage must be
5+
implemented, possibly with support of special fields and optional
6+
hooks to PIL.
7+
8+
9+
*** Frameworks
10+
11+
* Multi-platform: the X library should be portable to other operating
12+
systems than Unix (it might even only work with XFree86 if the
13+
display is ":0" right now). There are two things which might be OS
14+
specific: finding out and parsing the display name for establishing
15+
a connection, and finding authoritative data.
16+
17+
* Thread support: Currently, it would suffice to make the lowlevel
18+
Xlib.protocol.display.Display thread-safe, as no parts of the
19+
high-level interface modify shared data. This should be done in
20+
such a way that one can still use the library without the thread
21+
support, for systems where the thread module is missing.
22+
23+
* Extensions: There should be hooks for adding requests, events,
24+
errors and high-level methods for X extensions. Preferably,
25+
Xlib.display.Display would itself find all extensions supported by
26+
the server and install corresponding code automatically.
27+
28+
29+
*** To be a real C Xlib replacement
30+
31+
* High-level functions: currently, there are only methods which
32+
directly correspond to X requests. Perhaps there should be some
33+
simpler functions (e.g. Window.resize_window() in addition to
34+
Window.configure(), Drawable.rectangle() in addition to
35+
Drawable.poly_rectangle(), etc), and possibly also compound
36+
functions (e.g. create_pixmap_from_image() which would load an image
37+
file and create a pixmap of it).
38+
39+
* Events: advanced event queue handling, e.g. filtering out events,
40+
only process events for a certain window, etc.
41+
42+
* Extensions: as many extensions as possible should be implemented,
43+
using the yet-to-be-written framework.
44+
45+
* Resource database: an implementation of the Xlib resource database
46+
must be implemented.
47+
48+
49+
*** Miscellaneous
50+
51+
* Documentation.
52+
53+
* Test suite: a test suite which exercises the entire library would
54+
definitely be a nice thing to have.
55+
56+
* Porting: the library should be runnable wherever there is a Python
57+
interpreter (with the necessary IPC support, that is.) Major
58+
porting targets are Windows and OpenVMS.
59+
60+
* Widget set: a Python-optimized widget set using the X library would
61+
be really cute.
62+
63+
* Server-side support: while we're at it, why not extend the library
64+
to provide at least the server-side parsing of the X protocol? It
65+
could be usable for writing X proxies, or for that matter, a
66+
complete X server in Python (this might be a little too spaced-out,
67+
though...)

Xlib/__init__.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# $Id: __init__.py,v 1.1 2000-07-21 09:54:49 petli Exp $
1+
# $Id: __init__.py,v 1.2 2000-08-08 09:59:45 petli Exp $
22
#
33
# Xlib.__init__ -- glue for Xlib package
44
#
@@ -20,6 +20,11 @@
2020

2121
__all__ = [
2222
'X',
23+
'display',
2324
'error',
2425
'protocol',
26+
'xobject',
2527
]
28+
29+
__version__ = (0, 2)
30+

Xlib/display.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# $Id: display.py,v 1.3 2000-08-08 09:47:45 petli Exp $
1+
# $Id: display.py,v 1.4 2000-08-08 09:55:18 petli Exp $
22
#
33
# Xlib.display -- high level display object
44
#
@@ -69,7 +69,7 @@ def pending_events(self):
6969
###
7070

7171
def screen(self, sno = None):
72-
if sno is None
72+
if sno is None:
7373
return self.display.info.roots[self.display.default_screen]
7474
else:
7575
return self.display.info.roots[sno]

0 commit comments

Comments
 (0)