aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorElliott Hughes2015-04-10 15:12:05 -0500
committerElliott Hughes2015-04-10 15:42:55 -0500
commit07cfb8fe799901948afd6af05ef4674173713bcb (patch)
treedbb3c6ea45cb910397cec50054460d46c99b454f /minui/graphics.h
parent5d1630a926a02ca13a66eb1e385eabba16b04cfc (diff)
downloadplatform-bootable-recovery-07cfb8fe799901948afd6af05ef4674173713bcb.tar.gz
platform-bootable-recovery-07cfb8fe799901948afd6af05ef4674173713bcb.tar.xz
platform-bootable-recovery-07cfb8fe799901948afd6af05ef4674173713bcb.zip
Switch minui over to C++.
Change-Id: I59e08a304ae514a3fdb6fab58721f11670bc1b01
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 993e986e..ed229a0c 100644
--- a/minui/graphics.h
+++ b/minui/graphics.h
@@ -17,34 +17,26 @@
17#ifndef _GRAPHICS_H_ 17#ifndef _GRAPHICS_H_
18#define _GRAPHICS_H_ 18#define _GRAPHICS_H_
19 19
20#ifdef __cplusplus
21extern "C" {
22#endif
23
24#include <stdbool.h>
25#include "minui.h" 20#include "minui.h"
26 21
27typedef struct minui_backend { 22// TODO: lose the function pointers.
23struct minui_backend {
28 // Initializes the backend and returns a gr_surface to draw into. 24 // Initializes the backend and returns a gr_surface to draw into.
29 gr_surface (*init)(struct minui_backend*); 25 gr_surface (*init)(minui_backend*);
30 26
31 // Causes the current drawing surface (returned by the most recent 27 // Causes the current drawing surface (returned by the most recent
32 // call to flip() or init()) to be displayed, and returns a new 28 // call to flip() or init()) to be displayed, and returns a new
33 // drawing surface. 29 // drawing surface.
34 gr_surface (*flip)(struct minui_backend*); 30 gr_surface (*flip)(minui_backend*);
35 31
36 // Blank (or unblank) the screen. 32 // Blank (or unblank) the screen.
37 void (*blank)(struct minui_backend*, bool); 33 void (*blank)(minui_backend*, bool);
38 34
39 // Device cleanup when drawing is done. 35 // Device cleanup when drawing is done.
40 void (*exit)(struct minui_backend*); 36 void (*exit)(minui_backend*);
41} minui_backend; 37};
42 38
43minui_backend* open_fbdev(); 39minui_backend* open_fbdev();
44minui_backend* open_adf(); 40minui_backend* open_adf();
45 41
46#ifdef __cplusplus
47}
48#endif
49
50#endif 42#endif