mirror of
https://github.com/gryf/wmdocklib.git
synced 2025-12-19 04:20:17 +01:00
Added simple DockApp base class
This commit is contained in:
@@ -1,12 +1,24 @@
|
|||||||
"""\
|
import sys
|
||||||
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.
|
|
||||||
|
|
||||||
to get help about a contained package, try:
|
from wmdocklib import helpers
|
||||||
help(wmdocklib.<name>)
|
|
||||||
"""
|
|
||||||
from pywmgeneral import *
|
|
||||||
from pywmhelpers import *
|
|
||||||
|
|
||||||
__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