diff options
Diffstat (limited to 'minui/graphics.c')
-rw-r--r-- | minui/graphics.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/minui/graphics.c b/minui/graphics.c index b79631a31..fa8e5109a 100644 --- a/minui/graphics.c +++ b/minui/graphics.c @@ -14,6 +14,7 @@ * limitations under the License. */ +#include <stdbool.h> #include <stdlib.h> #include <unistd.h> @@ -201,6 +202,12 @@ int gr_measure(const char *s) return gr_font->cwidth * strlen(s); } +void gr_font_size(int *x, int *y) +{ + *x = gr_font->cwidth; + *y = gr_font->cheight; +} + int gr_text(int x, int y, const char *s) { GGLContext *gl = gr_context; @@ -358,3 +365,12 @@ gr_pixel *gr_fb_data(void) { return (unsigned short *) gr_mem_surface.data; } + +void gr_fb_blank(bool blank) +{ + int ret; + + ret = ioctl(gr_fb_fd, FBIOBLANK, blank ? FB_BLANK_POWERDOWN : FB_BLANK_UNBLANK); + if (ret < 0) + perror("ioctl(): blank"); +} |