summaryrefslogtreecommitdiff
path: root/apps/plugins/lib
diff options
context:
space:
mode:
Diffstat (limited to 'apps/plugins/lib')
-rw-r--r--apps/plugins/lib/gray.h10
-rw-r--r--apps/plugins/lib/gray_parm.c10
2 files changed, 10 insertions, 10 deletions
diff --git a/apps/plugins/lib/gray.h b/apps/plugins/lib/gray.h
index dadac9298f..f82cf389c3 100644
--- a/apps/plugins/lib/gray.h
+++ b/apps/plugins/lib/gray.h
@@ -51,11 +51,11 @@ void gray_update_rect(int x, int y, int width, int height);
51void gray_set_position(int x, int by); 51void gray_set_position(int x, int by);
52void gray_set_drawmode(int mode); 52void gray_set_drawmode(int mode);
53int gray_get_drawmode(void); 53int gray_get_drawmode(void);
54void gray_set_foreground(int brightness); 54void gray_set_foreground(unsigned brightness);
55int gray_get_foreground(void); 55unsigned gray_get_foreground(void);
56void gray_set_background(int brightness); 56void gray_set_background(unsigned brightness);
57int gray_get_background(void); 57unsigned gray_get_background(void);
58void gray_set_drawinfo(int mode, int fg_brightness, int bg_brightness); 58void gray_set_drawinfo(int mode, unsigned fg_brightness, unsigned bg_brightness);
59void gray_setfont(int newfont); 59void gray_setfont(int newfont);
60int gray_getstringsize(const unsigned char *str, int *w, int *h); 60int gray_getstringsize(const unsigned char *str, int *w, int *h);
61 61
diff --git a/apps/plugins/lib/gray_parm.c b/apps/plugins/lib/gray_parm.c
index a8c238a4eb..c4ee92f9cc 100644
--- a/apps/plugins/lib/gray_parm.c
+++ b/apps/plugins/lib/gray_parm.c
@@ -53,7 +53,7 @@ int gray_get_drawmode(void)
53} 53}
54 54
55/* Set the foreground shade for subsequent drawing operations */ 55/* Set the foreground shade for subsequent drawing operations */
56void gray_set_foreground(int brightness) 56void gray_set_foreground(unsigned brightness)
57{ 57{
58 unsigned data = MULU16(_gray_info.depth, brightness & 0xFF) + 127; 58 unsigned data = MULU16(_gray_info.depth, brightness & 0xFF) + 127;
59 59
@@ -61,14 +61,14 @@ void gray_set_foreground(int brightness)
61} 61}
62 62
63/* Return the current foreground shade */ 63/* Return the current foreground shade */
64int gray_get_foreground(void) 64unsigned gray_get_foreground(void)
65{ 65{
66 return (_gray_info.fg_brightness * 255 + (_gray_info.depth >> 1)) 66 return (_gray_info.fg_brightness * 255 + (_gray_info.depth >> 1))
67 / _gray_info.depth; 67 / _gray_info.depth;
68} 68}
69 69
70/* Set the background shade for subsequent drawing operations */ 70/* Set the background shade for subsequent drawing operations */
71void gray_set_background(int brightness) 71void gray_set_background(unsigned brightness)
72{ 72{
73 unsigned data = MULU16(_gray_info.depth, brightness & 0xFF) + 127; 73 unsigned data = MULU16(_gray_info.depth, brightness & 0xFF) + 127;
74 74
@@ -76,14 +76,14 @@ void gray_set_background(int brightness)
76} 76}
77 77
78/* Return the current background shade */ 78/* Return the current background shade */
79int gray_get_background(void) 79unsigned gray_get_background(void)
80{ 80{
81 return (_gray_info.bg_brightness * 255 + (_gray_info.depth >> 1)) 81 return (_gray_info.bg_brightness * 255 + (_gray_info.depth >> 1))
82 / _gray_info.depth; 82 / _gray_info.depth;
83} 83}
84 84
85/* Set draw mode, foreground and background shades at once */ 85/* Set draw mode, foreground and background shades at once */
86void gray_set_drawinfo(int mode, int fg_brightness, int bg_brightness) 86void gray_set_drawinfo(int mode, unsigned fg_brightness, unsigned bg_brightness)
87{ 87{
88 gray_set_drawmode(mode); 88 gray_set_drawmode(mode);
89 gray_set_foreground(fg_brightness); 89 gray_set_foreground(fg_brightness);