diff options
Diffstat (limited to 'src/objects.nim')
-rw-r--r-- | src/objects.nim | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/src/objects.nim b/src/objects.nim new file mode 100644 index 0000000..ed83fa8 --- /dev/null +++ b/src/objects.nim @@ -0,0 +1,31 @@ +import tables, x11/[x, xlib] + +type + KeyFunc* = enum + closeWindow, + nextWindow, + setMaster, + spawnCustom + + Key* = object + mods*: cuint + key*: string + keyfunc*: KeyFunc + command*: string + + WindowManager* = ref object + display*: PDisplay + screen*: PScreen + colormap*: Colormap + root*: Window + + clients*: seq[Window] + focused*: int + keys*: Table[cuint, objects.Key] + +proc initKey* (keyfunc: KeyFunc, mods: cuint, key: string, command = ""): Key = + return Key( + mods: mods, + key: key, + command: command, + keyfunc: keyfunc)
\ No newline at end of file |