author | Radek Brich <radek.brich@devl.cz> |
Wed, 27 Aug 2014 23:09:53 +0200 | |
changeset 103 | 49f212aa0228 |
parent 82 | 2bead23b1262 |
permissions | -rw-r--r-- |
23
4e72fd2a0e14
Rename BackendCurses to DriverCurses. Add DriverDummy - dummy driver for debugging purposes. Move clipping stack from driver to common.ClipStack class.
Radek Brich <radek.brich@devl.cz>
parents:
diff
changeset
|
1 |
# -*- coding: utf-8 -*- |
4e72fd2a0e14
Rename BackendCurses to DriverCurses. Add DriverDummy - dummy driver for debugging purposes. Move clipping stack from driver to common.ClipStack class.
Radek Brich <radek.brich@devl.cz>
parents:
diff
changeset
|
2 |
'''Dummy driver. |
4e72fd2a0e14
Rename BackendCurses to DriverCurses. Add DriverDummy - dummy driver for debugging purposes. Move clipping stack from driver to common.ClipStack class.
Radek Brich <radek.brich@devl.cz>
parents:
diff
changeset
|
3 |
|
4e72fd2a0e14
Rename BackendCurses to DriverCurses. Add DriverDummy - dummy driver for debugging purposes. Move clipping stack from driver to common.ClipStack class.
Radek Brich <radek.brich@devl.cz>
parents:
diff
changeset
|
4 |
Implements basic driver interface. |
4e72fd2a0e14
Rename BackendCurses to DriverCurses. Add DriverDummy - dummy driver for debugging purposes. Move clipping stack from driver to common.ClipStack class.
Radek Brich <radek.brich@devl.cz>
parents:
diff
changeset
|
5 |
This is useful for debugging or when writing new driver. |
4e72fd2a0e14
Rename BackendCurses to DriverCurses. Add DriverDummy - dummy driver for debugging purposes. Move clipping stack from driver to common.ClipStack class.
Radek Brich <radek.brich@devl.cz>
parents:
diff
changeset
|
6 |
|
4e72fd2a0e14
Rename BackendCurses to DriverCurses. Add DriverDummy - dummy driver for debugging purposes. Move clipping stack from driver to common.ClipStack class.
Radek Brich <radek.brich@devl.cz>
parents:
diff
changeset
|
7 |
''' |
4e72fd2a0e14
Rename BackendCurses to DriverCurses. Add DriverDummy - dummy driver for debugging purposes. Move clipping stack from driver to common.ClipStack class.
Radek Brich <radek.brich@devl.cz>
parents:
diff
changeset
|
8 |
|
4e72fd2a0e14
Rename BackendCurses to DriverCurses. Add DriverDummy - dummy driver for debugging purposes. Move clipping stack from driver to common.ClipStack class.
Radek Brich <radek.brich@devl.cz>
parents:
diff
changeset
|
9 |
import logging |
4e72fd2a0e14
Rename BackendCurses to DriverCurses. Add DriverDummy - dummy driver for debugging purposes. Move clipping stack from driver to common.ClipStack class.
Radek Brich <radek.brich@devl.cz>
parents:
diff
changeset
|
10 |
|
82
2bead23b1262
Fix original modules and demos.
Radek Brich <radek.brich@devl.cz>
parents:
70
diff
changeset
|
11 |
from tuikit.driver_base import Driver |
23
4e72fd2a0e14
Rename BackendCurses to DriverCurses. Add DriverDummy - dummy driver for debugging purposes. Move clipping stack from driver to common.ClipStack class.
Radek Brich <radek.brich@devl.cz>
parents:
diff
changeset
|
12 |
|
4e72fd2a0e14
Rename BackendCurses to DriverCurses. Add DriverDummy - dummy driver for debugging purposes. Move clipping stack from driver to common.ClipStack class.
Radek Brich <radek.brich@devl.cz>
parents:
diff
changeset
|
13 |
|
24
b248ef500557
Add DriverPygame (incomplete). Move unicode graphics constants to UnicodeGraphics class. Move shared parts of drivers to Driver base class.
Radek Brich <radek.brich@devl.cz>
parents:
23
diff
changeset
|
14 |
class DriverDummy(Driver): |
48
1f00e90fd72a
Add SDL driver prototype. Update sdlterm: Handle keyboard, mouse events. Add glyph cache.
Radek Brich <radek.brich@devl.cz>
parents:
29
diff
changeset
|
15 |
|
23
4e72fd2a0e14
Rename BackendCurses to DriverCurses. Add DriverDummy - dummy driver for debugging purposes. Move clipping stack from driver to common.ClipStack class.
Radek Brich <radek.brich@devl.cz>
parents:
diff
changeset
|
16 |
'''Dummy driver class''' |
48
1f00e90fd72a
Add SDL driver prototype. Update sdlterm: Handle keyboard, mouse events. Add glyph cache.
Radek Brich <radek.brich@devl.cz>
parents:
29
diff
changeset
|
17 |
|
23
4e72fd2a0e14
Rename BackendCurses to DriverCurses. Add DriverDummy - dummy driver for debugging purposes. Move clipping stack from driver to common.ClipStack class.
Radek Brich <radek.brich@devl.cz>
parents:
diff
changeset
|
18 |
def __init__(self): |
4e72fd2a0e14
Rename BackendCurses to DriverCurses. Add DriverDummy - dummy driver for debugging purposes. Move clipping stack from driver to common.ClipStack class.
Radek Brich <radek.brich@devl.cz>
parents:
diff
changeset
|
19 |
'''Initialize instance attributes''' |
24
b248ef500557
Add DriverPygame (incomplete). Move unicode graphics constants to UnicodeGraphics class. Move shared parts of drivers to Driver base class.
Radek Brich <radek.brich@devl.cz>
parents:
23
diff
changeset
|
20 |
Driver.__init__(self) |
23
4e72fd2a0e14
Rename BackendCurses to DriverCurses. Add DriverDummy - dummy driver for debugging purposes. Move clipping stack from driver to common.ClipStack class.
Radek Brich <radek.brich@devl.cz>
parents:
diff
changeset
|
21 |
self.log = logging.getLogger('tuikit') |
24
b248ef500557
Add DriverPygame (incomplete). Move unicode graphics constants to UnicodeGraphics class. Move shared parts of drivers to Driver base class.
Radek Brich <radek.brich@devl.cz>
parents:
23
diff
changeset
|
22 |
self.size.w, self.size.h = 80, 25 |
48
1f00e90fd72a
Add SDL driver prototype. Update sdlterm: Handle keyboard, mouse events. Add glyph cache.
Radek Brich <radek.brich@devl.cz>
parents:
29
diff
changeset
|
23 |
|
23
4e72fd2a0e14
Rename BackendCurses to DriverCurses. Add DriverDummy - dummy driver for debugging purposes. Move clipping stack from driver to common.ClipStack class.
Radek Brich <radek.brich@devl.cz>
parents:
diff
changeset
|
24 |
def start(self, mainfunc): |
4e72fd2a0e14
Rename BackendCurses to DriverCurses. Add DriverDummy - dummy driver for debugging purposes. Move clipping stack from driver to common.ClipStack class.
Radek Brich <radek.brich@devl.cz>
parents:
diff
changeset
|
25 |
'''Start driver and run mainfunc.''' |
4e72fd2a0e14
Rename BackendCurses to DriverCurses. Add DriverDummy - dummy driver for debugging purposes. Move clipping stack from driver to common.ClipStack class.
Radek Brich <radek.brich@devl.cz>
parents:
diff
changeset
|
26 |
mainfunc() |
4e72fd2a0e14
Rename BackendCurses to DriverCurses. Add DriverDummy - dummy driver for debugging purposes. Move clipping stack from driver to common.ClipStack class.
Radek Brich <radek.brich@devl.cz>
parents:
diff
changeset
|
27 |
|
4e72fd2a0e14
Rename BackendCurses to DriverCurses. Add DriverDummy - dummy driver for debugging purposes. Move clipping stack from driver to common.ClipStack class.
Radek Brich <radek.brich@devl.cz>
parents:
diff
changeset
|
28 |
|
24
b248ef500557
Add DriverPygame (incomplete). Move unicode graphics constants to UnicodeGraphics class. Move shared parts of drivers to Driver base class.
Radek Brich <radek.brich@devl.cz>
parents:
23
diff
changeset
|
29 |
## input ## |
48
1f00e90fd72a
Add SDL driver prototype. Update sdlterm: Handle keyboard, mouse events. Add glyph cache.
Radek Brich <radek.brich@devl.cz>
parents:
29
diff
changeset
|
30 |
|
24
b248ef500557
Add DriverPygame (incomplete). Move unicode graphics constants to UnicodeGraphics class. Move shared parts of drivers to Driver base class.
Radek Brich <radek.brich@devl.cz>
parents:
23
diff
changeset
|
31 |
def getevents(self, timeout=None): |
b248ef500557
Add DriverPygame (incomplete). Move unicode graphics constants to UnicodeGraphics class. Move shared parts of drivers to Driver base class.
Radek Brich <radek.brich@devl.cz>
parents:
23
diff
changeset
|
32 |
'''Process input, return list of events. |
48
1f00e90fd72a
Add SDL driver prototype. Update sdlterm: Handle keyboard, mouse events. Add glyph cache.
Radek Brich <radek.brich@devl.cz>
parents:
29
diff
changeset
|
33 |
|
57
911927edbdde
DriverSDL: Add support for timeouts.
Radek Brich <radek.brich@devl.cz>
parents:
48
diff
changeset
|
34 |
timeout -- float, in seconds |
911927edbdde
DriverSDL: Add support for timeouts.
Radek Brich <radek.brich@devl.cz>
parents:
48
diff
changeset
|
35 |
|
24
b248ef500557
Add DriverPygame (incomplete). Move unicode graphics constants to UnicodeGraphics class. Move shared parts of drivers to Driver base class.
Radek Brich <radek.brich@devl.cz>
parents:
23
diff
changeset
|
36 |
This dummy implementation just returns 'q' and Escape key presses. |
48
1f00e90fd72a
Add SDL driver prototype. Update sdlterm: Handle keyboard, mouse events. Add glyph cache.
Radek Brich <radek.brich@devl.cz>
parents:
29
diff
changeset
|
37 |
|
24
b248ef500557
Add DriverPygame (incomplete). Move unicode graphics constants to UnicodeGraphics class. Move shared parts of drivers to Driver base class.
Radek Brich <radek.brich@devl.cz>
parents:
23
diff
changeset
|
38 |
''' |
b248ef500557
Add DriverPygame (incomplete). Move unicode graphics constants to UnicodeGraphics class. Move shared parts of drivers to Driver base class.
Radek Brich <radek.brich@devl.cz>
parents:
23
diff
changeset
|
39 |
events = [('keypress', None, 'q'), ('keypress', 'escape', None)] |
b248ef500557
Add DriverPygame (incomplete). Move unicode graphics constants to UnicodeGraphics class. Move shared parts of drivers to Driver base class.
Radek Brich <radek.brich@devl.cz>
parents:
23
diff
changeset
|
40 |
return events |
b248ef500557
Add DriverPygame (incomplete). Move unicode graphics constants to UnicodeGraphics class. Move shared parts of drivers to Driver base class.
Radek Brich <radek.brich@devl.cz>
parents:
23
diff
changeset
|
41 |
|
b248ef500557
Add DriverPygame (incomplete). Move unicode graphics constants to UnicodeGraphics class. Move shared parts of drivers to Driver base class.
Radek Brich <radek.brich@devl.cz>
parents:
23
diff
changeset
|
42 |
|
b248ef500557
Add DriverPygame (incomplete). Move unicode graphics constants to UnicodeGraphics class. Move shared parts of drivers to Driver base class.
Radek Brich <radek.brich@devl.cz>
parents:
23
diff
changeset
|
43 |
## drawing ## |
48
1f00e90fd72a
Add SDL driver prototype. Update sdlterm: Handle keyboard, mouse events. Add glyph cache.
Radek Brich <radek.brich@devl.cz>
parents:
29
diff
changeset
|
44 |
|
24
b248ef500557
Add DriverPygame (incomplete). Move unicode graphics constants to UnicodeGraphics class. Move shared parts of drivers to Driver base class.
Radek Brich <radek.brich@devl.cz>
parents:
23
diff
changeset
|
45 |
def erase(self): |
b248ef500557
Add DriverPygame (incomplete). Move unicode graphics constants to UnicodeGraphics class. Move shared parts of drivers to Driver base class.
Radek Brich <radek.brich@devl.cz>
parents:
23
diff
changeset
|
46 |
'''Clear screen.''' |
b248ef500557
Add DriverPygame (incomplete). Move unicode graphics constants to UnicodeGraphics class. Move shared parts of drivers to Driver base class.
Radek Brich <radek.brich@devl.cz>
parents:
23
diff
changeset
|
47 |
self.log.info('DummyDriver.erase()') |
b248ef500557
Add DriverPygame (incomplete). Move unicode graphics constants to UnicodeGraphics class. Move shared parts of drivers to Driver base class.
Radek Brich <radek.brich@devl.cz>
parents:
23
diff
changeset
|
48 |
|
b248ef500557
Add DriverPygame (incomplete). Move unicode graphics constants to UnicodeGraphics class. Move shared parts of drivers to Driver base class.
Radek Brich <radek.brich@devl.cz>
parents:
23
diff
changeset
|
49 |
def putch(self, x, y, c): |
b248ef500557
Add DriverPygame (incomplete). Move unicode graphics constants to UnicodeGraphics class. Move shared parts of drivers to Driver base class.
Radek Brich <radek.brich@devl.cz>
parents:
23
diff
changeset
|
50 |
'''Output one unicode character to specified coordinates.''' |
48
1f00e90fd72a
Add SDL driver prototype. Update sdlterm: Handle keyboard, mouse events. Add glyph cache.
Radek Brich <radek.brich@devl.cz>
parents:
29
diff
changeset
|
51 |
if not self.clipstack.test(x, y): |
1f00e90fd72a
Add SDL driver prototype. Update sdlterm: Handle keyboard, mouse events. Add glyph cache.
Radek Brich <radek.brich@devl.cz>
parents:
29
diff
changeset
|
52 |
return |
24
b248ef500557
Add DriverPygame (incomplete). Move unicode graphics constants to UnicodeGraphics class. Move shared parts of drivers to Driver base class.
Radek Brich <radek.brich@devl.cz>
parents:
23
diff
changeset
|
53 |
self.log.info('DummyDriver.putch(x=%r, y=%r, c=%r)', x, y, c) |
b248ef500557
Add DriverPygame (incomplete). Move unicode graphics constants to UnicodeGraphics class. Move shared parts of drivers to Driver base class.
Radek Brich <radek.brich@devl.cz>
parents:
23
diff
changeset
|
54 |
|
b248ef500557
Add DriverPygame (incomplete). Move unicode graphics constants to UnicodeGraphics class. Move shared parts of drivers to Driver base class.
Radek Brich <radek.brich@devl.cz>
parents:
23
diff
changeset
|
55 |
def commit(self): |
b248ef500557
Add DriverPygame (incomplete). Move unicode graphics constants to UnicodeGraphics class. Move shared parts of drivers to Driver base class.
Radek Brich <radek.brich@devl.cz>
parents:
23
diff
changeset
|
56 |
'''Commit changes to the screen.''' |
b248ef500557
Add DriverPygame (incomplete). Move unicode graphics constants to UnicodeGraphics class. Move shared parts of drivers to Driver base class.
Radek Brich <radek.brich@devl.cz>
parents:
23
diff
changeset
|
57 |
self.log.info('DummyDriver.commit()') |
b248ef500557
Add DriverPygame (incomplete). Move unicode graphics constants to UnicodeGraphics class. Move shared parts of drivers to Driver base class.
Radek Brich <radek.brich@devl.cz>
parents:
23
diff
changeset
|
58 |
|
b248ef500557
Add DriverPygame (incomplete). Move unicode graphics constants to UnicodeGraphics class. Move shared parts of drivers to Driver base class.
Radek Brich <radek.brich@devl.cz>
parents:
23
diff
changeset
|
59 |
|
b248ef500557
Add DriverPygame (incomplete). Move unicode graphics constants to UnicodeGraphics class. Move shared parts of drivers to Driver base class.
Radek Brich <radek.brich@devl.cz>
parents:
23
diff
changeset
|
60 |
## colors ## |
48
1f00e90fd72a
Add SDL driver prototype. Update sdlterm: Handle keyboard, mouse events. Add glyph cache.
Radek Brich <radek.brich@devl.cz>
parents:
29
diff
changeset
|
61 |
|
70
db2eab0beb45
Update drivers: Rename setcolor to defcolor, add real setcolor which ignores color stack.
Radek Brich <radek.brich@devl.cz>
parents:
69
diff
changeset
|
62 |
def defcolor(self, name, desc): |
23
4e72fd2a0e14
Rename BackendCurses to DriverCurses. Add DriverDummy - dummy driver for debugging purposes. Move clipping stack from driver to common.ClipStack class.
Radek Brich <radek.brich@devl.cz>
parents:
diff
changeset
|
63 |
'''Define color name. |
48
1f00e90fd72a
Add SDL driver prototype. Update sdlterm: Handle keyboard, mouse events. Add glyph cache.
Radek Brich <radek.brich@devl.cz>
parents:
29
diff
changeset
|
64 |
|
69
4e7be77bafff
Add sdlterm to setup.py. Simplify color description, allow missing bg.
Radek Brich <radek.brich@devl.cz>
parents:
57
diff
changeset
|
65 |
Args: |
4e7be77bafff
Add sdlterm to setup.py. Simplify color description, allow missing bg.
Radek Brich <radek.brich@devl.cz>
parents:
57
diff
changeset
|
66 |
name: name of color (e.g. 'normal', 'active') |
4e7be77bafff
Add sdlterm to setup.py. Simplify color description, allow missing bg.
Radek Brich <radek.brich@devl.cz>
parents:
57
diff
changeset
|
67 |
desc: color description - foreground, background, attributes |
4e7be77bafff
Add sdlterm to setup.py. Simplify color description, allow missing bg.
Radek Brich <radek.brich@devl.cz>
parents:
57
diff
changeset
|
68 |
Format: '<fg> [on <bg>][, <attr>[, <attr> ...]] |
4e7be77bafff
Add sdlterm to setup.py. Simplify color description, allow missing bg.
Radek Brich <radek.brich@devl.cz>
parents:
57
diff
changeset
|
69 |
eg. 'white on black, bold' |
48
1f00e90fd72a
Add SDL driver prototype. Update sdlterm: Handle keyboard, mouse events. Add glyph cache.
Radek Brich <radek.brich@devl.cz>
parents:
29
diff
changeset
|
70 |
|
23
4e72fd2a0e14
Rename BackendCurses to DriverCurses. Add DriverDummy - dummy driver for debugging purposes. Move clipping stack from driver to common.ClipStack class.
Radek Brich <radek.brich@devl.cz>
parents:
diff
changeset
|
71 |
''' |
70
db2eab0beb45
Update drivers: Rename setcolor to defcolor, add real setcolor which ignores color stack.
Radek Brich <radek.brich@devl.cz>
parents:
69
diff
changeset
|
72 |
self.log.info('DummyDriver.defcolor(name=%r, desc=%r)', name, desc) |
db2eab0beb45
Update drivers: Rename setcolor to defcolor, add real setcolor which ignores color stack.
Radek Brich <radek.brich@devl.cz>
parents:
69
diff
changeset
|
73 |
|
db2eab0beb45
Update drivers: Rename setcolor to defcolor, add real setcolor which ignores color stack.
Radek Brich <radek.brich@devl.cz>
parents:
69
diff
changeset
|
74 |
def setcolor(self, name): |
db2eab0beb45
Update drivers: Rename setcolor to defcolor, add real setcolor which ignores color stack.
Radek Brich <radek.brich@devl.cz>
parents:
69
diff
changeset
|
75 |
"""Set defined color. |
db2eab0beb45
Update drivers: Rename setcolor to defcolor, add real setcolor which ignores color stack.
Radek Brich <radek.brich@devl.cz>
parents:
69
diff
changeset
|
76 |
|
db2eab0beb45
Update drivers: Rename setcolor to defcolor, add real setcolor which ignores color stack.
Radek Brich <radek.brich@devl.cz>
parents:
69
diff
changeset
|
77 |
Previous color is forgotten. |
db2eab0beb45
Update drivers: Rename setcolor to defcolor, add real setcolor which ignores color stack.
Radek Brich <radek.brich@devl.cz>
parents:
69
diff
changeset
|
78 |
Color prefix is ignored. |
db2eab0beb45
Update drivers: Rename setcolor to defcolor, add real setcolor which ignores color stack.
Radek Brich <radek.brich@devl.cz>
parents:
69
diff
changeset
|
79 |
|
db2eab0beb45
Update drivers: Rename setcolor to defcolor, add real setcolor which ignores color stack.
Radek Brich <radek.brich@devl.cz>
parents:
69
diff
changeset
|
80 |
See pushcolor, popcolor for more advanced work with colors. |
db2eab0beb45
Update drivers: Rename setcolor to defcolor, add real setcolor which ignores color stack.
Radek Brich <radek.brich@devl.cz>
parents:
69
diff
changeset
|
81 |
|
db2eab0beb45
Update drivers: Rename setcolor to defcolor, add real setcolor which ignores color stack.
Radek Brich <radek.brich@devl.cz>
parents:
69
diff
changeset
|
82 |
""" |
db2eab0beb45
Update drivers: Rename setcolor to defcolor, add real setcolor which ignores color stack.
Radek Brich <radek.brich@devl.cz>
parents:
69
diff
changeset
|
83 |
self.log.info('DummyDriver.setcolor(name=%r)', name) |
23
4e72fd2a0e14
Rename BackendCurses to DriverCurses. Add DriverDummy - dummy driver for debugging purposes. Move clipping stack from driver to common.ClipStack class.
Radek Brich <radek.brich@devl.cz>
parents:
diff
changeset
|
84 |
|
4e72fd2a0e14
Rename BackendCurses to DriverCurses. Add DriverDummy - dummy driver for debugging purposes. Move clipping stack from driver to common.ClipStack class.
Radek Brich <radek.brich@devl.cz>
parents:
diff
changeset
|
85 |
def pushcolor(self, name): |
24
b248ef500557
Add DriverPygame (incomplete). Move unicode graphics constants to UnicodeGraphics class. Move shared parts of drivers to Driver base class.
Radek Brich <radek.brich@devl.cz>
parents:
23
diff
changeset
|
86 |
'''Add color on top of stack and use this color for following output.''' |
23
4e72fd2a0e14
Rename BackendCurses to DriverCurses. Add DriverDummy - dummy driver for debugging purposes. Move clipping stack from driver to common.ClipStack class.
Radek Brich <radek.brich@devl.cz>
parents:
diff
changeset
|
87 |
self.log.info('DummyDriver.pushcolor(name=%r)', name) |
48
1f00e90fd72a
Add SDL driver prototype. Update sdlterm: Handle keyboard, mouse events. Add glyph cache.
Radek Brich <radek.brich@devl.cz>
parents:
29
diff
changeset
|
88 |
|
23
4e72fd2a0e14
Rename BackendCurses to DriverCurses. Add DriverDummy - dummy driver for debugging purposes. Move clipping stack from driver to common.ClipStack class.
Radek Brich <radek.brich@devl.cz>
parents:
diff
changeset
|
89 |
def popcolor(self): |
24
b248ef500557
Add DriverPygame (incomplete). Move unicode graphics constants to UnicodeGraphics class. Move shared parts of drivers to Driver base class.
Radek Brich <radek.brich@devl.cz>
parents:
23
diff
changeset
|
90 |
'''Remove color from top of stack and use new top color for following output.''' |
23
4e72fd2a0e14
Rename BackendCurses to DriverCurses. Add DriverDummy - dummy driver for debugging purposes. Move clipping stack from driver to common.ClipStack class.
Radek Brich <radek.brich@devl.cz>
parents:
diff
changeset
|
91 |
self.log.info('DummyDriver.popcolor()') |
4e72fd2a0e14
Rename BackendCurses to DriverCurses. Add DriverDummy - dummy driver for debugging purposes. Move clipping stack from driver to common.ClipStack class.
Radek Brich <radek.brich@devl.cz>
parents:
diff
changeset
|
92 |
|
4e72fd2a0e14
Rename BackendCurses to DriverCurses. Add DriverDummy - dummy driver for debugging purposes. Move clipping stack from driver to common.ClipStack class.
Radek Brich <radek.brich@devl.cz>
parents:
diff
changeset
|
93 |
|
24
b248ef500557
Add DriverPygame (incomplete). Move unicode graphics constants to UnicodeGraphics class. Move shared parts of drivers to Driver base class.
Radek Brich <radek.brich@devl.cz>
parents:
23
diff
changeset
|
94 |
## cursor ## |
23
4e72fd2a0e14
Rename BackendCurses to DriverCurses. Add DriverDummy - dummy driver for debugging purposes. Move clipping stack from driver to common.ClipStack class.
Radek Brich <radek.brich@devl.cz>
parents:
diff
changeset
|
95 |
|
24
b248ef500557
Add DriverPygame (incomplete). Move unicode graphics constants to UnicodeGraphics class. Move shared parts of drivers to Driver base class.
Radek Brich <radek.brich@devl.cz>
parents:
23
diff
changeset
|
96 |
def showcursor(self, x, y): |
b248ef500557
Add DriverPygame (incomplete). Move unicode graphics constants to UnicodeGraphics class. Move shared parts of drivers to Driver base class.
Radek Brich <radek.brich@devl.cz>
parents:
23
diff
changeset
|
97 |
'''Set cursor to be shown at x, y coordinates.''' |
b248ef500557
Add DriverPygame (incomplete). Move unicode graphics constants to UnicodeGraphics class. Move shared parts of drivers to Driver base class.
Radek Brich <radek.brich@devl.cz>
parents:
23
diff
changeset
|
98 |
self.log.info('DummyDriver.showcursor(x=%r, y=%r)', x, y) |
23
4e72fd2a0e14
Rename BackendCurses to DriverCurses. Add DriverDummy - dummy driver for debugging purposes. Move clipping stack from driver to common.ClipStack class.
Radek Brich <radek.brich@devl.cz>
parents:
diff
changeset
|
99 |
|
24
b248ef500557
Add DriverPygame (incomplete). Move unicode graphics constants to UnicodeGraphics class. Move shared parts of drivers to Driver base class.
Radek Brich <radek.brich@devl.cz>
parents:
23
diff
changeset
|
100 |
def hidecursor(self): |
b248ef500557
Add DriverPygame (incomplete). Move unicode graphics constants to UnicodeGraphics class. Move shared parts of drivers to Driver base class.
Radek Brich <radek.brich@devl.cz>
parents:
23
diff
changeset
|
101 |
'''Hide cursor.''' |
b248ef500557
Add DriverPygame (incomplete). Move unicode graphics constants to UnicodeGraphics class. Move shared parts of drivers to Driver base class.
Radek Brich <radek.brich@devl.cz>
parents:
23
diff
changeset
|
102 |
self.log.info('DummyDriver.hidecursor()') |
23
4e72fd2a0e14
Rename BackendCurses to DriverCurses. Add DriverDummy - dummy driver for debugging purposes. Move clipping stack from driver to common.ClipStack class.
Radek Brich <radek.brich@devl.cz>
parents:
diff
changeset
|
103 |
|
29
c0cdef06fd16
Import only one driver from application.
Radek Brich <radek.brich@devl.cz>
parents:
24
diff
changeset
|
104 |
|
c0cdef06fd16
Import only one driver from application.
Radek Brich <radek.brich@devl.cz>
parents:
24
diff
changeset
|
105 |
driverclass = DriverDummy |
c0cdef06fd16
Import only one driver from application.
Radek Brich <radek.brich@devl.cz>
parents:
24
diff
changeset
|
106 |