1
0
mirror of https://github.com/gryf/wmdocklib.git synced 2025-12-19 20:38:03 +01:00

adding pywmnop.py and renaming pywmPhoto.py to pywmphoto.py.

This commit is contained in:
mfrasca
2007-01-17 17:02:51 +00:00
parent 695d29b2a5
commit 620a8e229a
2 changed files with 37 additions and 2 deletions

35
examples/pywmnop.py Normal file
View File

@@ -0,0 +1,35 @@
#!/usr/bin/env python
"""pywmnop.py
WindowMaker dockapp doing nothing
Copyright (C) 2006 Mario Frasca
Licensed under the GNU General Public License.
"""
import sys, time
import wmdocklib
def checkForEvents():
event = wmdocklib.getEvent()
while not event is None:
if event['type'] == 'destroynotify':
sys.exit(0)
event = wmdocklib.getEvent()
def mainLoop():
while 1:
checkForEvents()
wmdocklib.redraw()
time.sleep(0.5)
def main():
wmdocklib.initPixmap()
wmdocklib.openXwindow(sys.argv, 64, 64)
mainLoop()
if __name__ == '__main__':
main()

View File

@@ -1,6 +1,6 @@
#!/usr/bin/env python #!/usr/bin/env python
"""pywmPhoto.py """pywmphoto.py
WindowMaker dockapp that displays a static xpm WindowMaker dockapp that displays a static xpm
@@ -13,7 +13,7 @@ Changes:
2006-10-27 Mario Frasca 2006-10-27 Mario Frasca
First workingish version First workingish version
""" """
usage = """pywmPhoto.py [options] usage = """pywmphoto.py [options]
Available options are: Available options are:
-h, --help print this help -h, --help print this help
-f, --file <file> set the xpm name -f, --file <file> set the xpm name