aboutsummaryrefslogtreecommitdiff
path: root/lib/python/Components/Sources
diff options
context:
space:
mode:
Diffstat (limited to 'lib/python/Components/Sources')
-rw-r--r--lib/python/Components/Sources/CanvasSource.py20
-rw-r--r--lib/python/Components/Sources/Makefile.am2
2 files changed, 21 insertions, 1 deletions
diff --git a/lib/python/Components/Sources/CanvasSource.py b/lib/python/Components/Sources/CanvasSource.py
new file mode 100644
index 00000000..4fd0e02a
--- /dev/null
+++ b/lib/python/Components/Sources/CanvasSource.py
@@ -0,0 +1,20 @@
+from Source import Source
+
+class CanvasSource(Source):
+ def __init__(self):
+ Source.__init__(self)
+ self.sequence = 0
+ self.clear()
+
+ def clear(self):
+ self.sequence += 1
+ self._drawlist = (self.sequence, [ ])
+
+ def get_drawlist(self):
+ return self._drawlist
+
+ drawlist = property(get_drawlist)
+
+ def fill(self, x, y, width, height, color):
+ self.drawlist[1].append( (1, x, y, width, height, color) )
+ self.changed()
diff --git a/lib/python/Components/Sources/Makefile.am b/lib/python/Components/Sources/Makefile.am
index 6deb423d..2e0dd449 100644
--- a/lib/python/Components/Sources/Makefile.am
+++ b/lib/python/Components/Sources/Makefile.am
@@ -3,4 +3,4 @@ installdir = $(LIBDIR)/enigma2/python/Components/Sources
install_PYTHON = \
__init__.py Clock.py EventInfo.py Source.py List.py CurrentService.py \
FrontendStatus.py Boolean.py Config.py ServiceList.py RdsDecoder.py StreamService.py \
- StaticText.py
+ StaticText.py CanvasSource.py