From 07cfb8fe799901948afd6af05ef4674173713bcb Mon Sep 17 00:00:00 2001 From: Elliott Hughes Date: Fri, 10 Apr 2015 13:12:05 -0700 Subject: Switch minui over to C++. Change-Id: I59e08a304ae514a3fdb6fab58721f11670bc1b01 --- minui/graphics.h | 22 +++++++--------------- 1 file changed, 7 insertions(+), 15 deletions(-) (limited to 'minui/graphics.h') 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 #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 -- cgit v1.2.3 From 0a5cb0c7cd995ae0330a7d54a8d0db5d892a48a9 Mon Sep 17 00:00:00 2001 From: Elliott Hughes Date: Wed, 15 Apr 2015 10:58:56 -0700 Subject: Don't use typedefs that hide *s. gr_surface was causing confusion for no good reason. Change-Id: If7120187f9a00dd16297877fc49352185a4d4ea6 --- minui/graphics.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'minui/graphics.h') diff --git a/minui/graphics.h b/minui/graphics.h index ed229a0c8..81a923383 100644 --- a/minui/graphics.h +++ b/minui/graphics.h @@ -21,13 +21,13 @@ // TODO: lose the function pointers. struct minui_backend { - // Initializes the backend and returns a gr_surface to draw into. - gr_surface (*init)(minui_backend*); + // Initializes the backend and returns a GRSurface* to draw into. + GRSurface* (*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)(minui_backend*); + GRSurface* (*flip)(minui_backend*); // Blank (or unblank) the screen. void (*blank)(minui_backend*, bool); -- cgit v1.2.3 From 1a92c4458dcc983f624a60fb75f9679c213e6814 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Marchesin?= Date: Mon, 29 Jun 2015 20:05:48 -0700 Subject: Add drm support to minui MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bug: 22231636 Change-Id: I103c8e906b7dd9862b7bb89d8642268e9a3006b4 Signed-off-by: Stéphane Marchesin --- minui/graphics.h | 1 + 1 file changed, 1 insertion(+) (limited to 'minui/graphics.h') diff --git a/minui/graphics.h b/minui/graphics.h index 81a923383..52968eb10 100644 --- a/minui/graphics.h +++ b/minui/graphics.h @@ -38,5 +38,6 @@ struct minui_backend { minui_backend* open_fbdev(); minui_backend* open_adf(); +minui_backend* open_drm(); #endif -- cgit v1.2.3