summaryrefslogtreecommitdiffstats
path: root/minui/graphics.h
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2015-04-10 22:57:37 +0200
committerGerrit Code Review <noreply-gerritcodereview@google.com>2015-04-10 22:57:37 +0200
commit23017c5d5c145a1040ee49466d30489d6e11bb61 (patch)
treedbb3c6ea45cb910397cec50054460d46c99b454f /minui/graphics.h
parentMerge "Fix ScreenRecoveryUI to handle devices without power/up/down." (diff)
parentSwitch minui over to C++. (diff)
downloadandroid_bootable_recovery-23017c5d5c145a1040ee49466d30489d6e11bb61.tar
android_bootable_recovery-23017c5d5c145a1040ee49466d30489d6e11bb61.tar.gz
android_bootable_recovery-23017c5d5c145a1040ee49466d30489d6e11bb61.tar.bz2
android_bootable_recovery-23017c5d5c145a1040ee49466d30489d6e11bb61.tar.lz
android_bootable_recovery-23017c5d5c145a1040ee49466d30489d6e11bb61.tar.xz
android_bootable_recovery-23017c5d5c145a1040ee49466d30489d6e11bb61.tar.zst
android_bootable_recovery-23017c5d5c145a1040ee49466d30489d6e11bb61.zip
Diffstat (limited to 'minui/graphics.h')
-rw-r--r--minui/graphics.h22
1 files changed, 7 insertions, 15 deletions
diff --git a/minui/graphics.h b/minui/graphics.h
index 993e986ee..ed229a0c8 100644
--- a/minui/graphics.h
+++ b/minui/graphics.h
@@ -17,34 +17,26 @@
#ifndef _GRAPHICS_H_
#define _GRAPHICS_H_
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <stdbool.h>
#include "minui.h"
-typedef struct minui_backend {
+// TODO: lose the function pointers.
+struct minui_backend {
// Initializes the backend and returns a gr_surface to draw into.
- gr_surface (*init)(struct minui_backend*);
+ gr_surface (*init)(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.
- gr_surface (*flip)(struct minui_backend*);
+ gr_surface (*flip)(minui_backend*);
// Blank (or unblank) the screen.
- void (*blank)(struct minui_backend*, bool);
+ void (*blank)(minui_backend*, bool);
// Device cleanup when drawing is done.
- void (*exit)(struct minui_backend*);
-} minui_backend;
+ void (*exit)(minui_backend*);
+};
minui_backend* open_fbdev();
minui_backend* open_adf();
-#ifdef __cplusplus
-}
-#endif
-
#endif