diff options
Diffstat (limited to 'apps/plugins/lib/grey.h')
-rw-r--r-- | apps/plugins/lib/grey.h | 28 |
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); | |||
60 | void grey_show(bool enable); | 60 | void grey_show(bool enable); |
61 | void grey_deferred_lcd_update(void); | 61 | void grey_deferred_lcd_update(void); |
62 | 62 | ||
63 | /* Viewports and framebuffers */ | ||
64 | void grey_clear_viewport(void); | ||
65 | void grey_set_viewport(struct viewport *vp); | ||
66 | void grey_viewport_set_fullscreen(struct viewport *vp, | ||
67 | const enum screen_type screen); | ||
68 | void grey_viewport_set_pos(struct viewport *vp, | ||
69 | int x, int y, int width, int height); | ||
70 | void grey_set_framebuffer(unsigned char *buffer); | ||
71 | void grey_framebuffer_set_pos(int x, int y, int width, int height); | ||
72 | |||
63 | /* Update functions */ | 73 | /* Update functions */ |
64 | void grey_update(void); | 74 | void grey_update(void); |
65 | void grey_update_rect(int x, int y, int width, int height); | 75 | void 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 */ |
186 | extern struct _grey_info _grey_info; | 206 | extern struct _grey_info _grey_info; |
187 | 207 | ||