WindowManagement Library

Hiroyuki Komatsu komatsu at taiyaki.org
Fri Dec 12 17:22:09 CST 2003


I made a WindowManagement library, it is available at
<http://www.accessgrid.org/~komatsu/tmp/WindowManager-0.1.tar.gz>
After expanding it, you can run test_wm.py for testing on both Windows
and X.


The code of test_wm.py is the following:
----
from window_manager import WindowManager
wm = WindowManager()

print "= Window List ==="
for window in wm.get_window_list():
    print window
print 

print "= Space List ===="
for space in wm.get_space_list():
    print space
print

print "= Available Space List of 50x50 ===="
for space in wm.query_available_space_list(50, 50):
    print space
----


The result sample is here:
----
WindowManager-0.1% ./test_wm.py
= Window List ===
None: (-10, -10) 10 x 10
: (0, 0) 1024 x 26
emacs: +draft/33: (477, 74) 516 x 645
MGT - [ ./test_wm.py ]: (132, 45) 514 x 588
None: (-100, -100) 10 x 10

= Space List ====
(0, 26) 1024 x 19
(0, 26) 132 x 742
(0, 633) 477 x 135
(0, 719) 1024 x 49
(646, 26) 378 x 48
(993, 26) 31 x 742

= Available Space List of 50x50 ====
(0, 26) 132 x 742
(0, 633) 477 x 135

----

The objects of Window and Space are defined in 'window.py' (The object
Space is defined as Geometry).

If it is necessary to control windows from this WindowManger lib. like
to move or resize windows I am going to make those functions, though I
am sure if it is possible.

--
Hiro




More information about the ag-dev mailing list