summaryrefslogtreecommitdiff
path: root/utils/nwztools/plattools/nwz_lib.h
diff options
context:
space:
mode:
Diffstat (limited to 'utils/nwztools/plattools/nwz_lib.h')
-rw-r--r--utils/nwztools/plattools/nwz_lib.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/utils/nwztools/plattools/nwz_lib.h b/utils/nwztools/plattools/nwz_lib.h
index 18d7f9dd07..23bb80986d 100644
--- a/utils/nwztools/plattools/nwz_lib.h
+++ b/utils/nwztools/plattools/nwz_lib.h
@@ -32,6 +32,7 @@
32#include <fcntl.h> 32#include <fcntl.h>
33#include <string.h> 33#include <string.h>
34#include <stdlib.h> 34#include <stdlib.h>
35#include <sys/mman.h>
35 36
36#include "nwz_keys.h" 37#include "nwz_keys.h"
37#include "nwz_fb.h" 38#include "nwz_fb.h"
@@ -72,11 +73,19 @@ typedef int nwz_color_t;
72#define NWZ_COLOR_GREEN(col) (((col) >> 8) & 0xff) 73#define NWZ_COLOR_GREEN(col) (((col) >> 8) & 0xff)
73#define NWZ_COLOR_BLUE(col) ((col) & 0xff) 74#define NWZ_COLOR_BLUE(col) ((col) & 0xff)
74#define NWZ_COLOR_NO_KEY (1 << 24) 75#define NWZ_COLOR_NO_KEY (1 << 24)
76
77#define NWZ_FONT_W(big_font) ((big_font) ? 14 : 8)
78#define NWZ_FONT_H(big_font) ((big_font) ? 24 : 14)
79
75void nwz_display_clear(nwz_color_t color); 80void nwz_display_clear(nwz_color_t color);
76void nwz_display_text(int x, int y, bool big_font, nwz_color_t foreground_col, 81void nwz_display_text(int x, int y, bool big_font, nwz_color_t foreground_col,
77 nwz_color_t background_col, int background_alpha, const char *text); 82 nwz_color_t background_col, int background_alpha, const char *text);
83void nwz_display_text_center(int width, int y, bool big_font, nwz_color_t foreground_col,
84 nwz_color_t background_col, int background_alpha, const char *text);
78void nwz_display_textf(int x, int y, bool big_font, nwz_color_t foreground_col, 85void nwz_display_textf(int x, int y, bool big_font, nwz_color_t foreground_col,
79 nwz_color_t background_col, int background_alpha, const char *fmt, ...); 86 nwz_color_t background_col, int background_alpha, const char *fmt, ...);
87void nwz_display_textf_center(int width, int y, bool big_font, nwz_color_t foreground_col,
88 nwz_color_t background_col, int background_alpha, const char *fmt, ...);
80void nwz_display_bitmap(int x, int y, const char *file, int left, int top, 89void nwz_display_bitmap(int x, int y, const char *file, int left, int top,
81 int width, int height, nwz_color_t key, int bmp_alpha); 90 int width, int height, nwz_color_t key, int bmp_alpha);
82 91
@@ -113,6 +122,10 @@ int nwz_fb_set_brightness(int fd, struct nwz_fb_brightness *bl);
113/* setup framebuffer to its standard mode: LCD output, page 0, no transparency 122/* setup framebuffer to its standard mode: LCD output, page 0, no transparency
114 * and no rotation, 2D only updates */ 123 * and no rotation, 2D only updates */
115int nwz_fb_set_standard_mode(int fd); 124int nwz_fb_set_standard_mode(int fd);
125/* change framebuffer page and update screen */
126int nwz_fb_set_page(int fd, int page);
127/* map framebuffer */
128void *nwz_fb_mmap(int fd, int offset, int size);
116 129
117/* open adc device */ 130/* open adc device */
118int nwz_adc_open(void); 131int nwz_adc_open(void);