summaryrefslogtreecommitdiffstats
path: root/src/target/ui-experiment/display.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/target/ui-experiment/display.h')
-rw-r--r--src/target/ui-experiment/display.h46
1 files changed, 46 insertions, 0 deletions
diff --git a/src/target/ui-experiment/display.h b/src/target/ui-experiment/display.h
new file mode 100644
index 0000000..5591370
--- /dev/null
+++ b/src/target/ui-experiment/display.h
@@ -0,0 +1,46 @@
+
+#ifndef _UI_DISPLAY_H
+#define _UI_DISPLAY_H
+
+#include <ui/pixel.h>
+#include <ui/image.h>
+
+/**
+ * Displays - physical display devices
+ *
+ * This layer is introduced tentatively, expecting use
+ * of OSMOCOM on multi-display phones, most likely
+ * with a main screen and a cover screen.
+ *
+ */
+struct display {
+ const char *name;
+
+ pxtype_t pixeltype;
+ pxsize_t width;
+ pxsize_t height;
+
+ /* We always operate on an in-memory frame buffer that
+ * can be put on display using damage functions provided
+ * by the image class.
+ */
+ struct image *fbuf;
+
+ /*
+ * We display a top-level widget.
+ */
+ struct widget *widget;
+
+ /*
+ * We hold a graphics context, configured for the target
+ * pixel format.
+ */
+ struct graphics *graphics;
+
+
+ void (*draw) (struct display *display);
+
+ void *priv;
+};
+
+#endif