aboutsummaryrefslogtreecommitdiff
path: root/include/display33.h
diff options
context:
space:
mode:
authorpk33 <pk33@pk33.space>2024-11-11 18:06:18 +0100
committerpk33 <pk33@pk33.space>2024-11-11 18:06:18 +0100
commit5a54774474f43ae29716751d6415563a59b92c7d (patch)
tree151e865845b09b85992d8be20d8cc771d4110448 /include/display33.h
parent146a683b8d8315ef15dc1c9286f0983834f48d88 (diff)
downloadengine33-5a54774474f43ae29716751d6415563a59b92c7d.tar.gz
tidying up and basic input
Diffstat (limited to 'include/display33.h')
-rw-r--r--include/display33.h51
1 files changed, 51 insertions, 0 deletions
diff --git a/include/display33.h b/include/display33.h
new file mode 100644
index 0000000..85e0172
--- /dev/null
+++ b/include/display33.h
@@ -0,0 +1,51 @@
+#ifndef __DISPLAY33_H__
+#define __DISPLAY33_H__
+
+
+#include "libdrm/drm_mode.h"
+
+#include "types33.h"
+
+
+/* TEMP XXX */
+typedef struct {
+ u32 *data;
+ Size w, h;
+} Surface33;
+/**/
+
+
+typedef struct {
+ Size id[2];
+ u8 *map[2];
+ Size stride;
+ Size size;
+} Framebuffer33;
+
+
+typedef struct {
+ Framebuffer33 fb;
+ Surface33 surface;
+
+ struct drm_mode_crtc crtc;
+ struct drm_mode_modeinfo mode;
+ struct drm_mode_get_connector connector;
+
+ Size devFd, ttyFd;
+
+ Boolean active;
+} Display33;
+
+
+extern Display33 __display;
+
+
+Error display33_init( void );
+
+void display33_flip( void );
+void display33_vtswitcher_poll( int timeout );
+
+void display33_term( void );
+
+
+#endif /* __DISPLAY33_H__ */