summaryrefslogtreecommitdiff
path: root/apps/plugins/lib/grey.h
diff options
context:
space:
mode:
Diffstat (limited to 'apps/plugins/lib/grey.h')
-rw-r--r--apps/plugins/lib/grey.h28
1 files changed, 24 insertions, 4 deletions
diff --git a/apps/plugins/lib/grey.h b/apps/plugins/lib/grey.h
index 7c990ad792..d63d19ee4a 100644
--- a/apps/plugins/lib/grey.h
+++ b/apps/plugins/lib/grey.h
@@ -60,6 +60,16 @@ void grey_release(void);
60void grey_show(bool enable); 60void grey_show(bool enable);
61void grey_deferred_lcd_update(void); 61void grey_deferred_lcd_update(void);
62 62
63/* Viewports and framebuffers */
64void grey_clear_viewport(void);
65void grey_set_viewport(struct viewport *vp);
66void grey_viewport_set_fullscreen(struct viewport *vp,
67 const enum screen_type screen);
68void grey_viewport_set_pos(struct viewport *vp,
69 int x, int y, int width, int height);
70void grey_set_framebuffer(unsigned char *buffer);
71void grey_framebuffer_set_pos(int x, int y, int width, int height);
72
63/* Update functions */ 73/* Update functions */
64void grey_update(void); 74void grey_update(void);
65void grey_update_rect(int x, int y, int width, int height); 75void grey_update_rect(int x, int y, int width, int height);
@@ -175,13 +185,23 @@ struct _grey_info
175 unsigned char *values; /* start of greyscale pixel values */ 185 unsigned char *values; /* start of greyscale pixel values */
176 unsigned char *phases; /* start of greyscale pixel phases */ 186 unsigned char *phases; /* start of greyscale pixel phases */
177 unsigned char *buffer; /* start of chunky pixel buffer (for buffered mode) */ 187 unsigned char *buffer; /* start of chunky pixel buffer (for buffered mode) */
188 unsigned char *curbuffer; /* start of current framebuffer (for buffered mode) */
189 int cb_x; /* horizontal position of current framebuffer (for buffered mode) */
190 int cb_y; /* vertical position of current framebuffer (for buffered mode) */
191 int cb_width; /* width of current framebuffer (for buffered mode) */
192 int cb_height; /* height of current framebuffer (for buffered mode) */
193 int clip_l;
194 int clip_t;
195 int clip_r;
196 int clip_b;
178 unsigned char gvalue[256]; /* calculated brightness -> greyvalue table */ 197 unsigned char gvalue[256]; /* calculated brightness -> greyvalue table */
179 int fg_brightness; /* current foreground brightness */ 198 struct viewport *vp; /* current viewport in use */
180 int bg_brightness; /* current background brightness */
181 int drawmode; /* current draw mode */
182 int curfont; /* current selected font */
183}; 199};
184 200
201/* Stuff these here for now. LCD depth of 1 has no 'pattern' members. */
202#define _GREY_FG_BRIGHTNESS(vp) ((vp)->flags)
203#define _GREY_BG_BRIGHTNESS(vp) ((vp)->line_height)
204
185/* Global variable, defined in the plugin */ 205/* Global variable, defined in the plugin */
186extern struct _grey_info _grey_info; 206extern struct _grey_info _grey_info;
187 207