diff options
author | pk33 <pk33@pk33.space> | 2024-11-01 23:51:15 +0100 |
---|---|---|
committer | pk33 <pk33@pk33.space> | 2024-11-01 23:51:15 +0100 |
commit | 294b585994da4427ac98a8353ff41aed5f301d54 (patch) | |
tree | aafcd885c1fe28819ef1a511da5e6344411b5597 /include/display.h | |
parent | f0958551b43959174d28b2056f584d2081494e6c (diff) | |
download | engine33-294b585994da4427ac98a8353ff41aed5f301d54.tar.gz |
Import and fix old code
Diffstat (limited to 'include/display.h')
-rw-r--r-- | include/display.h | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/include/display.h b/include/display.h new file mode 100644 index 0000000..efaf6f9 --- /dev/null +++ b/include/display.h @@ -0,0 +1,47 @@ +#ifndef __DISPLAY_H__ +#define __DISPLAY_H__ + +#include "libdrm/drm_mode.h" + +#include "types.h" +/* TEMP */ +typedef struct { + u32 *data; + Size w, h; +} Surface; +/**/ + + +typedef struct { + Size id[2]; + u16 *map[2]; + Size stride; + Size size; +} Framebuffer; + + +typedef struct { + Framebuffer fb; + Surface surface; + + struct drm_mode_get_connector connector; + struct drm_mode_get_encoder encoder; + struct drm_mode_crtc crtc; + + Size devFd, ttyFd; + Size active; +} Display; + + +extern Display __display; + + +Size display_init( void ); + +void display_flip( void ); +void display_vtswitcher_poll( int timeout ); + +void display_term( void ); + + +#endif /* __DISPLAY_H__ */ |