mirror of
https://github.com/gryf/wmdocklib.git
synced 2025-12-18 12:00:20 +01:00
Added simple DockApp base class
This commit is contained in:
@@ -1,12 +1,24 @@
|
||||
"""\
|
||||
wmdocklib is a python module that will help you develop WindowMaker dockapps
|
||||
in python. It is mostly a wrapper around the functions from the popular
|
||||
wmgeneral.c, but some new functions are added too.
|
||||
import sys
|
||||
|
||||
to get help about a contained package, try:
|
||||
help(wmdocklib.<name>)
|
||||
"""
|
||||
from pywmgeneral import *
|
||||
from pywmhelpers import *
|
||||
from wmdocklib import helpers
|
||||
|
||||
__all__ = ['wmoo']
|
||||
|
||||
class DockApp:
|
||||
width = 64
|
||||
height = 64
|
||||
x_offset = 4
|
||||
y_offset = 4
|
||||
palette = {"1": "black",
|
||||
"2": "white"}
|
||||
|
||||
def __init__(self, args=None):
|
||||
self._args = args
|
||||
self._charset_start = None
|
||||
self._charset_width = None
|
||||
|
||||
def check_for_events(self):
|
||||
event = helpers.get_event()
|
||||
while event is not None:
|
||||
if event['type'] == 'destroynotify':
|
||||
sys.exit(0)
|
||||
event = helpers.get_event()
|
||||
|
||||
Reference in New Issue
Block a user