aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ui/drawable.go
diff options
context:
space:
mode:
Diffstat (limited to 'lib/ui/drawable.go')
-rw-r--r--lib/ui/drawable.go10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/ui/drawable.go b/lib/ui/drawable.go
new file mode 100644
index 00000000..ef094519
--- /dev/null
+++ b/lib/ui/drawable.go
@@ -0,0 +1,10 @@
+package ui
+
+type Drawable interface {
+ // Called when this renderable should draw itself
+ Draw(ctx *Context)
+ // Specifies a function to call when this cell needs to be redrawn
+ OnInvalidate(callback func(d Drawable))
+ // Invalidates the drawable
+ Invalidate()
+}