diff options
Diffstat (limited to 'minui/include')
-rw-r--r-- | minui/include/minui/minui.h | 36 |
1 files changed, 23 insertions, 13 deletions
diff --git a/minui/include/minui/minui.h b/minui/include/minui/minui.h index 27e603136..f9da19999 100644 --- a/minui/include/minui/minui.h +++ b/minui/include/minui/minui.h @@ -28,17 +28,24 @@ // struct GRSurface { - int width; - int height; - int row_bytes; - int pixel_bytes; - unsigned char* data; + int width; + int height; + int row_bytes; + int pixel_bytes; + unsigned char* data; }; struct GRFont { - GRSurface* texture; - int char_width; - int char_height; + GRSurface* texture; + int char_width; + int char_height; +}; + +enum GRRotation { + ROTATION_NONE = 0, + ROTATION_RIGHT = 1, + ROTATION_DOWN = 2, + ROTATION_LEFT = 3, }; int gr_init(); @@ -58,14 +65,17 @@ void gr_texticon(int x, int y, GRSurface* icon); const GRFont* gr_sys_font(); int gr_init_font(const char* name, GRFont** dest); -void gr_text(const GRFont* font, int x, int y, const char *s, bool bold); -int gr_measure(const GRFont* font, const char *s); -void gr_font_size(const GRFont* font, int *x, int *y); +void gr_text(const GRFont* font, int x, int y, const char* s, bool bold); +int gr_measure(const GRFont* font, const char* s); +void gr_font_size(const GRFont* font, int* x, int* y); void gr_blit(GRSurface* source, int sx, int sy, int w, int h, int dx, int dy); unsigned int gr_get_width(GRSurface* surface); unsigned int gr_get_height(GRSurface* surface); +// Set rotation, flips gr_fb_width/height if 90 degree rotation difference +void gr_rotate(GRRotation rotation); + // // Input events. // @@ -115,8 +125,8 @@ int res_create_display_surface(const char* name, GRSurface** pSurface); // should have a 'Frames' text chunk whose value is the number of // frames this image represents. The pixel data itself is interlaced // by row. -int res_create_multi_display_surface(const char* name, int* frames, - int* fps, GRSurface*** pSurface); +int res_create_multi_display_surface(const char* name, int* frames, int* fps, + GRSurface*** pSurface); // Load a single alpha surface from a grayscale PNG image. int res_create_alpha_surface(const char* name, GRSurface** pSurface); |