summaryrefslogtreecommitdiffstats
path: root/minui/graphics.h
diff options
context:
space:
mode:
authorEthan Yonker <dees_troy@teamw.in>2017-09-08 13:50:54 +0200
committerEthan Yonker <dees_troy@teamw.in>2017-09-08 14:14:59 +0200
commit8373cfe28cf1b5ad758faa1d502e21787c3665e4 (patch)
tree2f567c52cd6f89e1052481497d236b58d230b7e2 /minui/graphics.h
parentDO NOT MERGE Android 8.0 stuff (diff)
parentrelease-request-f4ecf242-5d1c-45e0-8c7c-ede48d1a9e82-for-git_oc-release-4111650 snap-temp-L02200000075283731 (diff)
downloadandroid_bootable_recovery-8373cfe28cf1b5ad758faa1d502e21787c3665e4.tar
android_bootable_recovery-8373cfe28cf1b5ad758faa1d502e21787c3665e4.tar.gz
android_bootable_recovery-8373cfe28cf1b5ad758faa1d502e21787c3665e4.tar.bz2
android_bootable_recovery-8373cfe28cf1b5ad758faa1d502e21787c3665e4.tar.lz
android_bootable_recovery-8373cfe28cf1b5ad758faa1d502e21787c3665e4.tar.xz
android_bootable_recovery-8373cfe28cf1b5ad758faa1d502e21787c3665e4.tar.zst
android_bootable_recovery-8373cfe28cf1b5ad758faa1d502e21787c3665e4.zip
Diffstat (limited to 'minui/graphics.h')
-rw-r--r--minui/graphics.h32
1 files changed, 13 insertions, 19 deletions
diff --git a/minui/graphics.h b/minui/graphics.h
index a4115fd50..3c45a406b 100644
--- a/minui/graphics.h
+++ b/minui/graphics.h
@@ -17,28 +17,22 @@
#ifndef _GRAPHICS_H_
#define _GRAPHICS_H_
-#include "minui.h"
+#include "minui/minui.h"
-// TODO: lose the function pointers.
-struct minui_backend {
- // Initializes the backend and returns a GRSurface* to draw into.
- GRSurface* (*init)(minui_backend*);
+class MinuiBackend {
+ public:
+ // Initializes the backend and returns a GRSurface* to draw into.
+ virtual GRSurface* Init() = 0;
- // Causes the current drawing surface (returned by the most recent
- // call to flip() or init()) to be displayed, and returns a new
- // drawing surface.
- GRSurface* (*flip)(minui_backend*);
+ // Causes the current drawing surface (returned by the most recent call to Flip() or Init()) to
+ // be displayed, and returns a new drawing surface.
+ virtual GRSurface* Flip() = 0;
- // Blank (or unblank) the screen.
- void (*blank)(minui_backend*, bool);
+ // Blank (or unblank) the screen.
+ virtual void Blank(bool) = 0;
- // Device cleanup when drawing is done.
- void (*exit)(minui_backend*);
+ // Device cleanup when drawing is done.
+ virtual ~MinuiBackend() {};
};
-minui_backend* open_fbdev();
-minui_backend* open_adf();
-minui_backend* open_drm();
-minui_backend* open_overlay();
-
-#endif
+#endif // _GRAPHICS_H_