source: trunk/core/gui_draw.h @ 1414

Revision 1414, 29.9 KB checked in by philmoz, 19 months ago (diff)

Add ALPHA version for SX40HS, firmware 1.00f and 1.00g (thx ERR99).

  • Property svn:eol-style set to native
Line 
1#ifndef GUI_DRAW_H
2#define GUI_DRAW_H
3
4#include        "camera.h"              // ensure the camera defintion is loaded
5
6//-------------------------------------------------------------------
7
8// Moved from gui_bench.c, gui_debug.c, gui_calendar.c, gui_reversi.c & gui_sokoban.c so it can be overridden
9// Default value is white in SX30 & G12 palette making white text hard to read
10#define SCREEN_COLOR        0xF7
11
12//-------------------------------------------------------------------
13
14// Common colors that are the same in all palettes
15#define COLOR_TRANSPARENT   0x00
16#define COLOR_BLACK         0xFF
17
18//-------------------------------------------------------------------
19
20#if CAM_BITMAP_PALETTE==1
21
22// Default palette used unless overridden - see list of cameras using each palette below
23
24#define COLOR_WHITE         0x11
25#define COLOR_RED           0x22
26#define COLOR_GREY          0x3F
27#define COLOR_GREEN         0x55
28#define COLOR_BLUE_LT       0xDD
29#define COLOR_BLUE          0xDF
30#define COLOR_YELLOW        0xEE
31#define COLOR_BG            0x44
32#define COLOR_FG            COLOR_WHITE
33#define COLOR_SELECTED_BG   COLOR_RED
34#define COLOR_SELECTED_FG   COLOR_WHITE
35#define COLOR_ALT_BG        0xD4
36#define COLOR_SPLASH_RED    0x2E
37#define COLOR_SPLASH_PINK   0x21
38#define COLOR_SPLASH_GREY   0x1F
39// colors for blended histo
40#define COLOR_HISTO_R       COLOR_RED
41#define COLOR_HISTO_R_PLAY  COLOR_RED
42#define COLOR_HISTO_B       COLOR_BLUE
43#define COLOR_HISTO_G       COLOR_GREEN
44#define COLOR_HISTO_G_PLAY  COLOR_GREEN
45#define COLOR_HISTO_BG      COLOR_BLUE_LT
46#define COLOR_HISTO_RG      COLOR_YELLOW
47#define COLOR_HISTO_RB      0x66
48#define COLOR_HISTO_RB_PLAY 0xE2
49#define COLOR_HISTO_B_PLAY  0xCC
50#define COLOR_HISTO_BG_PLAY 0x99
51#define COLOR_HISTO_RG_PLAY 0x66
52
53// Icon colors
54// 3 shades of Red, Green, Yellow and Grey
55// Separate definitions for record and playback mode
56// to cater for cameras with variable palettes
57#if defined(CAMERA_ixus70_sd1000) || defined(CAMERA_ixus75_sd750)
58        #define COLOR_ICON_REC_RED                      0x88
59        #define COLOR_ICON_REC_RED_DK           0x83
60        #define COLOR_ICON_REC_RED_LT           0x81
61        #define COLOR_ICON_REC_GREEN            0x55
62        #define COLOR_ICON_REC_GREEN_DK         0x53
63        #define COLOR_ICON_REC_GREEN_LT         0x51
64        #define COLOR_ICON_REC_YELLOW           0x66
65        #define COLOR_ICON_REC_YELLOW_DK        0x36
66        #define COLOR_ICON_REC_YELLOW_LT        0x61
67        #define COLOR_ICON_REC_GREY                     COLOR_GREY
68        #define COLOR_ICON_REC_GREY_DK          0x33
69        #define COLOR_ICON_REC_GREY_LT          0x11
70#endif
71#if defined (CAMERA_a610)
72        #define COLOR_ICON_REC_RED                      0x22
73        #define COLOR_ICON_REC_RED_DK           0x2F
74        #define COLOR_ICON_REC_RED_LT           0x26
75        #define COLOR_ICON_REC_GREEN            0x5F
76        #define COLOR_ICON_REC_GREEN_DK         0x25
77        #define COLOR_ICON_REC_GREEN_LT         0x51
78        #define COLOR_ICON_REC_YELLOW           0x9F
79        #define COLOR_ICON_REC_YELLOW_DK        0x9F
80        #define COLOR_ICON_REC_YELLOW_LT        0x99
81        #define COLOR_ICON_REC_GREY                     COLOR_GREY
82        #define COLOR_ICON_REC_GREY_DK          0x33
83        #define COLOR_ICON_REC_GREY_LT          0x13
84#endif
85
86#elif CAM_BITMAP_PALETTE==2
87
88// Used by :- G10, IXUS95_SD1200, IXUS980_SD990
89
90#define COLOR_WHITE         0xD3
91#define COLOR_RED           0x64
92#define COLOR_GREY          0x12
93#define COLOR_GREEN         0xC4
94#define COLOR_BLUE_LT       0x6A
95#define COLOR_BLUE          0x87
96#define COLOR_YELLOW        0x44
97#define COLOR_BG            0x22
98#define COLOR_FG            COLOR_WHITE
99#define COLOR_SELECTED_BG   COLOR_RED
100#define COLOR_SELECTED_FG   COLOR_WHITE
101#define COLOR_ALT_BG        0x22
102#define COLOR_SPLASH_RED    0x58
103#define COLOR_SPLASH_PINK   0x4C
104#define COLOR_SPLASH_GREY   0x16
105// colors for blended histo
106// many of these probably wrong on this cam
107#define COLOR_HISTO_R       COLOR_RED
108#define COLOR_HISTO_R_PLAY  COLOR_RED
109#define COLOR_HISTO_B       COLOR_BLUE
110#define COLOR_HISTO_G       COLOR_GREEN
111#define COLOR_HISTO_G_PLAY  COLOR_GREEN
112#define COLOR_HISTO_BG      COLOR_BLUE_LT
113#define COLOR_HISTO_RG      COLOR_YELLOW
114#define COLOR_HISTO_RB      0x66
115#define COLOR_HISTO_RB_PLAY 0xE2
116#define COLOR_HISTO_B_PLAY  0xCC
117#define COLOR_HISTO_BG_PLAY 0x99
118#define COLOR_HISTO_RG_PLAY 0x66
119
120// Icon colors
121// 3 shades of Red, Green, Yellow and Grey
122// Separate definitions for record and playback mode
123// to cater for cameras with variable palettes
124#if defined (CAMERA_g10)
125        #define COLOR_ICON_REC_RED                      0x5F
126        #define COLOR_ICON_REC_RED_DK           0x69
127        #define COLOR_ICON_REC_RED_LT           0x55
128        #define COLOR_ICON_REC_GREEN            0x80
129        #define COLOR_ICON_REC_GREEN_DK         0x87
130        #define COLOR_ICON_REC_GREEN_LT         0x79
131        #define COLOR_ICON_REC_YELLOW           0x40
132        #define COLOR_ICON_REC_YELLOW_DK        0x47
133        #define COLOR_ICON_REC_YELLOW_LT        0x3D
134        #define COLOR_ICON_REC_GREY                     COLOR_GREY
135        #define COLOR_ICON_REC_GREY_DK          0x15
136        #define COLOR_ICON_REC_GREY_LT          0x08
137        #define COLOR_ICON_PLY_RED                      COLOR_ICON_REC_RED
138        #define COLOR_ICON_PLY_RED_DK           COLOR_ICON_REC_RED_DK
139        #define COLOR_ICON_PLY_RED_LT           COLOR_ICON_REC_RED_LT
140        #define COLOR_ICON_PLY_GREEN            0xCD
141        #define COLOR_ICON_PLY_GREEN_DK         0xD2
142        #define COLOR_ICON_PLY_GREEN_LT         0xC4
143        #define COLOR_ICON_PLY_YELLOW           COLOR_ICON_REC_YELLOW
144        #define COLOR_ICON_PLY_YELLOW_DK        COLOR_ICON_REC_YELLOW_DK
145        #define COLOR_ICON_PLY_YELLOW_LT        COLOR_ICON_REC_YELLOW_LT
146        #define COLOR_ICON_PLY_GREY                     COLOR_ICON_REC_GREY
147        #define COLOR_ICON_PLY_GREY_DK          COLOR_ICON_REC_GREY_DK
148        #define COLOR_ICON_PLY_GREY_LT          COLOR_ICON_REC_GREY_LT
149#endif
150
151#elif CAM_BITMAP_PALETTE==3
152
153// Used by :- IXUS120_SD940, SX200IS
154
155#define COLOR_WHITE         0x01
156#define COLOR_RED           0x2B
157#define COLOR_GREY          0x17
158#define COLOR_GREEN         0x99
159#define COLOR_BLUE_LT       0x2D
160#define COLOR_BLUE          0x3B
161#define COLOR_YELLOW        0x9A
162#define COLOR_BG            0x81
163#define COLOR_FG            COLOR_WHITE
164#define COLOR_SELECTED_BG   COLOR_RED
165#define COLOR_SELECTED_FG   COLOR_WHITE
166#define COLOR_ALT_BG        COLOR_GREY
167#define COLOR_SPLASH_RED    0x29
168#define COLOR_SPLASH_PINK   0x1E
169#define COLOR_SPLASH_GREY   0x16
170// colors for blended histo
171#define COLOR_HISTO_R       COLOR_RED
172#define COLOR_HISTO_R_PLAY  COLOR_HISTO_R
173#define COLOR_HISTO_B       COLOR_BLUE
174#define COLOR_HISTO_G       COLOR_GREEN
175#define COLOR_HISTO_G_PLAY  COLOR_HISTO_G
176#define COLOR_HISTO_BG      COLOR_BLUE_LT
177#define COLOR_HISTO_RG      COLOR_YELLOW
178#define COLOR_HISTO_RB      COLOR_BLACK // there isn't purplish on this cam I guess
179#define COLOR_HISTO_RB_PLAY COLOR_HISTO_RB
180#define COLOR_HISTO_B_PLAY  COLOR_HISTO_B
181#define COLOR_HISTO_BG_PLAY COLOR_BLUE_LT
182#define COLOR_HISTO_RG_PLAY COLOR_YELLOW
183
184// Icon colors
185// 3 shades of Red, Green, Yellow and Grey
186// Separate definitions for record and playback mode
187// to cater for cameras with variable palettes
188#if defined (CAMERA_sx200is)
189        #define COLOR_ICON_REC_RED                      0x2C
190        #define COLOR_ICON_REC_RED_DK           0x2C
191        #define COLOR_ICON_REC_RED_LT           0x20
192        #define COLOR_ICON_REC_GREEN            0x68
193        #define COLOR_ICON_REC_GREEN_DK         0x68
194        #define COLOR_ICON_REC_GREEN_LT         0x60
195        #define COLOR_ICON_REC_YELLOW           0x8F
196        #define COLOR_ICON_REC_YELLOW_DK        0x93
197        #define COLOR_ICON_REC_YELLOW_LT        0x87
198        #define COLOR_ICON_REC_GREY                     COLOR_GREY
199        #define COLOR_ICON_REC_GREY_DK          0x15
200        #define COLOR_ICON_REC_GREY_LT          0x10
201        #define COLOR_ICON_PLY_RED                      COLOR_ICON_REC_RED
202        #define COLOR_ICON_PLY_RED_DK           COLOR_ICON_REC_RED_DK
203        #define COLOR_ICON_PLY_RED_LT           COLOR_ICON_REC_RED_LT
204        #define COLOR_ICON_PLY_GREEN            0xA0
205        #define COLOR_ICON_PLY_GREEN_DK         0xA0
206        #define COLOR_ICON_PLY_GREEN_LT         0xA0
207        #define COLOR_ICON_PLY_YELLOW           0x6A
208        #define COLOR_ICON_PLY_YELLOW_DK        0x6C
209        #define COLOR_ICON_PLY_YELLOW_LT        0x66
210        #define COLOR_ICON_PLY_GREY                     COLOR_ICON_REC_GREY
211        #define COLOR_ICON_PLY_GREY_DK          COLOR_ICON_REC_GREY_DK
212        #define COLOR_ICON_PLY_GREY_LT          COLOR_ICON_REC_GREY_LT
213#endif
214#if defined (CAMERA_ixus120_sd940)
215        #define COLOR_ICON_REC_RED                      0xE7
216        #define COLOR_ICON_REC_RED_DK           0xEA
217        #define COLOR_ICON_REC_RED_LT           0xE3
218        #define COLOR_ICON_REC_GREEN            0x7F
219        #define COLOR_ICON_REC_GREEN_DK         0x86
220        #define COLOR_ICON_REC_GREEN_LT         0x78
221        #define COLOR_ICON_REC_YELLOW           0x92
222        #define COLOR_ICON_REC_YELLOW_DK        0x87
223        #define COLOR_ICON_REC_YELLOW_LT        0xA9
224        #define COLOR_ICON_REC_GREY                     COLOR_GREY
225        #define COLOR_ICON_REC_GREY_DK          0x1A
226        #define COLOR_ICON_REC_GREY_LT          0x11
227       
228        #define COLOR_ICON_PLY_RED                      0x15
229        #define COLOR_ICON_PLY_RED_DK           0x1E
230        #define COLOR_ICON_PLY_RED_LT           0x2c
231        #define COLOR_ICON_PLY_GREEN            0x9E
232        #define COLOR_ICON_PLY_GREEN_DK         0x9E
233        #define COLOR_ICON_PLY_GREEN_LT         0x9E
234        #define COLOR_ICON_PLY_YELLOW           0xCC
235        #define COLOR_ICON_PLY_YELLOW_DK        0xCD
236        #define COLOR_ICON_PLY_YELLOW_LT        0xCB
237        #define COLOR_ICON_PLY_GREY                     COLOR_GREY
238        #define COLOR_ICON_PLY_GREY_DK          0x1A
239        #define COLOR_ICON_PLY_GREY_LT          0x11
240#endif
241
242#elif CAM_BITMAP_PALETTE==4
243
244// Used by :- G11, S90, SX120IS
245
246#define COLOR_WHITE         0x01
247#define COLOR_RED           0x2B
248#define COLOR_GREY          0x17
249#define COLOR_GREEN         0x99
250#define COLOR_BLUE_LT       0xA9
251#define COLOR_BLUE          0xA1
252#define COLOR_YELLOW        0x9A
253#define COLOR_BG            0x61
254#define COLOR_FG            COLOR_WHITE
255#define COLOR_SELECTED_BG   COLOR_RED
256#define COLOR_SELECTED_FG   COLOR_WHITE
257#define COLOR_ALT_BG        COLOR_GREY
258#define COLOR_SPLASH_RED    0x29
259#define COLOR_SPLASH_PINK   0x1E
260#define COLOR_SPLASH_GREY   0x16
261// colors for blended histo
262#define COLOR_HISTO_R       COLOR_RED
263#define COLOR_HISTO_R_PLAY  COLOR_HISTO_R
264#define COLOR_HISTO_B       COLOR_BLUE
265#define COLOR_HISTO_G       COLOR_GREEN
266#define COLOR_HISTO_G_PLAY  COLOR_HISTO_G
267#define COLOR_HISTO_BG      COLOR_BLUE_LT
268#define COLOR_HISTO_RG      COLOR_YELLOW
269#define COLOR_HISTO_RB      COLOR_BLACK // there isn't purplish on this cam I guess
270#define COLOR_HISTO_RB_PLAY COLOR_HISTO_RB
271#define COLOR_HISTO_B_PLAY  COLOR_HISTO_B
272#define COLOR_HISTO_BG_PLAY COLOR_BLUE_LT
273#define COLOR_HISTO_RG_PLAY COLOR_YELLOW
274
275// Icon colors
276// 3 shades of Red, Green, Yellow and Grey
277// Separate definitions for record and playback mode
278// to cater for cameras with variable palettes
279#if defined (CAMERA_sx120is)
280        #define COLOR_ICON_REC_RED                      0x1E
281        #define COLOR_ICON_REC_RED_DK           0xA0
282        #define COLOR_ICON_REC_RED_LT           0x26
283        #define COLOR_ICON_REC_GREEN            0x47
284        #define COLOR_ICON_REC_GREEN_DK         0x4A
285        #define COLOR_ICON_REC_GREEN_LT         0x44
286        #define COLOR_ICON_REC_YELLOW           0x69
287        #define COLOR_ICON_REC_YELLOW_DK        0x9A
288        #define COLOR_ICON_REC_YELLOW_LT        0x78
289        #define COLOR_ICON_REC_GREY                     COLOR_GREY
290        #define COLOR_ICON_REC_GREY_DK          0x10
291        #define COLOR_ICON_REC_GREY_LT          0x19
292        #define COLOR_ICON_PLY_RED                      0x27
293        #define COLOR_ICON_PLY_RED_DK           0x2C
294        #define COLOR_ICON_PLY_RED_LT           0x20
295        #define COLOR_ICON_PLY_GREEN            0xCB
296        #define COLOR_ICON_PLY_GREEN_DK         0xCB
297        #define COLOR_ICON_PLY_GREEN_LT         0xCB
298        #define COLOR_ICON_PLY_YELLOW           0xBE
299        #define COLOR_ICON_PLY_YELLOW_DK        0x76
300        #define COLOR_ICON_PLY_YELLOW_LT        0x5A
301        #define COLOR_ICON_PLY_GREY                     COLOR_ICON_REC_GREY
302        #define COLOR_ICON_PLY_GREY_DK          COLOR_ICON_REC_GREY_DK
303        #define COLOR_ICON_PLY_GREY_LT          COLOR_ICON_REC_GREY_LT
304#endif
305
306#elif CAM_BITMAP_PALETTE==5
307
308// Used by :- D10, IXUS100_SD780
309
310#define COLOR_WHITE         0xD3
311#define COLOR_RED           0x6A
312#define COLOR_GREY          0x12
313#define COLOR_GREEN         0xBF
314#define COLOR_BLUE_LT       0x7C
315#define COLOR_BLUE          0x90
316#define COLOR_YELLOW        0x53
317#define COLOR_BG            0x22
318#define COLOR_FG            COLOR_WHITE
319#define COLOR_SELECTED_BG   COLOR_RED
320#define COLOR_SELECTED_FG   COLOR_WHITE
321#define COLOR_ALT_BG        0x22
322#define COLOR_SPLASH_RED    0x72
323#define COLOR_SPLASH_PINK   0x5C
324#define COLOR_SPLASH_GREY   0x16
325#define COLOR_HISTO_R       COLOR_RED
326#define COLOR_HISTO_R_PLAY  COLOR_RED
327#define COLOR_HISTO_B       COLOR_BLUE
328#define COLOR_HISTO_G       COLOR_GREEN
329#define COLOR_HISTO_G_PLAY  COLOR_GREEN
330#define COLOR_HISTO_BG      COLOR_BLUE_LT
331#define COLOR_HISTO_RG      COLOR_YELLOW
332#define COLOR_HISTO_RB      0x72
333#define COLOR_HISTO_RB_PLAY COLOR_HISTO_RB
334#define COLOR_HISTO_B_PLAY  COLOR_HISTO_B
335#define COLOR_HISTO_BG_PLAY COLOR_BLUE_LT
336#define COLOR_HISTO_RG_PLAY COLOR_YELLOW
337
338#elif CAM_BITMAP_PALETTE==6
339
340// Used by :- SX20
341
342#define COLOR_WHITE         0x01
343#define COLOR_RED           0x2B
344#define COLOR_GREY          0x0F
345#define COLOR_GREEN         0xA9
346#define COLOR_BLUE_LT       0x2D
347#define COLOR_BLUE          0x3B
348#define COLOR_YELLOW        0x8B
349#define COLOR_BG            0xFE
350#define COLOR_FG            COLOR_WHITE
351#define COLOR_SELECTED_BG   COLOR_RED
352#define COLOR_SELECTED_FG   COLOR_WHITE
353#define COLOR_ALT_BG        COLOR_BG
354#define COLOR_SPLASH_RED    COLOR_RED
355#define COLOR_SPLASH_PINK   0xEA
356#define COLOR_SPLASH_GREY   0x16
357#define COLOR_HISTO_R       COLOR_RED
358#define COLOR_HISTO_R_PLAY  COLOR_RED
359#define COLOR_HISTO_B       COLOR_BLUE
360#define COLOR_HISTO_G       COLOR_GREEN
361#define COLOR_HISTO_G_PLAY  COLOR_GREEN
362#define COLOR_HISTO_BG      COLOR_BLUE_LT
363#define COLOR_HISTO_RG      COLOR_YELLOW
364#define COLOR_HISTO_RB      COLOR_RED
365#define COLOR_HISTO_RB_PLAY COLOR_HISTO_RB
366#define COLOR_HISTO_B_PLAY  COLOR_HISTO_B
367#define COLOR_HISTO_BG_PLAY COLOR_BLUE_LT
368#define COLOR_HISTO_RG_PLAY COLOR_YELLOW
369
370// Icon colors
371// 3 shades of Red, Green, Yellow and Grey
372// Separate definitions for record and playback mode
373// to cater for cameras with variable palettes
374#define COLOR_ICON_REC_RED                      0x2C
375#define COLOR_ICON_REC_RED_DK           0x91
376#define COLOR_ICON_REC_RED_LT           0x26
377#define COLOR_ICON_REC_GREEN            0xB0
378#define COLOR_ICON_REC_GREEN_DK         0xB7
379#define COLOR_ICON_REC_GREEN_LT         0xA9
380#define COLOR_ICON_REC_YELLOW           0xDB
381#define COLOR_ICON_REC_YELLOW_DK        0xD9
382#define COLOR_ICON_REC_YELLOW_LT        0xDD
383#define COLOR_ICON_REC_GREY                     COLOR_GREY
384#define COLOR_ICON_REC_GREY_DK          0x11
385#define COLOR_ICON_REC_GREY_LT          0x10
386#define COLOR_ICON_PLY_RED                      0x25
387#define COLOR_ICON_PLY_RED_DK           0x2C
388#define COLOR_ICON_PLY_RED_LT           0x1E
389#define COLOR_ICON_PLY_GREEN            0xA5
390#define COLOR_ICON_PLY_GREEN_DK         0xAC
391#define COLOR_ICON_PLY_GREEN_LT         0x9E
392#define COLOR_ICON_PLY_YELLOW           0x75
393#define COLOR_ICON_PLY_YELLOW_DK        0x7A
394#define COLOR_ICON_PLY_YELLOW_LT        0x71
395#define COLOR_ICON_PLY_GREY                     COLOR_ICON_REC_GREY
396#define COLOR_ICON_PLY_GREY_DK          COLOR_ICON_REC_GREY_DK
397#define COLOR_ICON_PLY_GREY_LT          COLOR_ICON_REC_GREY_LT
398
399#elif CAM_BITMAP_PALETTE==7
400
401// Used by :- S95, SX130IS
402
403#define COLOR_WHITE         0x01
404#define COLOR_RED           0x1e
405#define COLOR_GREY          0x1a
406#define COLOR_GREEN         0x17
407#define COLOR_BLUE_LT       0x10
408#define COLOR_BLUE          0x14
409#define COLOR_YELLOW        0x60
410#define COLOR_BG            0x62
411#define COLOR_FG            COLOR_WHITE
412#define COLOR_SELECTED_BG   0x0e
413#define COLOR_SELECTED_FG   COLOR_BLACK
414#define COLOR_ALT_BG        COLOR_BG
415#define COLOR_SPLASH_RED    COLOR_RED
416#define COLOR_SPLASH_PINK   0x1e    // Orange
417#define COLOR_SPLASH_GREY   0x16
418#define COLOR_HISTO_R       0x66
419#define COLOR_HISTO_R_PLAY  0xA0
420#define COLOR_HISTO_B       0x61
421#define COLOR_HISTO_B_PLAY  0xA2
422#define COLOR_HISTO_G       0x5F
423#define COLOR_HISTO_G_PLAY  0xA1
424#define COLOR_HISTO_BG      COLOR_BLUE_LT
425#define COLOR_HISTO_RG      COLOR_YELLOW
426#define COLOR_HISTO_RB      COLOR_RED
427#define COLOR_HISTO_RB_PLAY COLOR_HISTO_RB
428#define COLOR_HISTO_BG_PLAY COLOR_BLUE_LT
429#define COLOR_HISTO_RG_PLAY 0x80
430#undef SCREEN_COLOR
431#define SCREEN_COLOR            0x1D
432
433#if defined(CAMERA_sx130is)
434        #define COLOR_ICON_REC_RED                      0x66
435        #define COLOR_ICON_REC_RED_DK           0x66
436        #define COLOR_ICON_REC_RED_LT           0x66
437        #define COLOR_ICON_REC_GREEN            0x6B
438        #define COLOR_ICON_REC_GREEN_DK         0x6B
439        #define COLOR_ICON_REC_GREEN_LT         0x69
440        #define COLOR_ICON_REC_YELLOW           0x60
441        #define COLOR_ICON_REC_YELLOW_DK        0x45
442        #define COLOR_ICON_REC_YELLOW_LT        0x6C
443        #define COLOR_ICON_REC_GREY                     COLOR_GREY
444        #define COLOR_ICON_REC_GREY_DK          0x19
445        #define COLOR_ICON_REC_GREY_LT          0x10
446        #define COLOR_ICON_PLY_RED                      0xA0
447        #define COLOR_ICON_PLY_RED_DK           0xA0
448        #define COLOR_ICON_PLY_RED_LT           0xA0
449        #define COLOR_ICON_PLY_GREEN            0xA1
450        #define COLOR_ICON_PLY_GREEN_DK         0xA1
451        #define COLOR_ICON_PLY_GREEN_LT         0xA1
452        #define COLOR_ICON_PLY_YELLOW           0x6A
453        #define COLOR_ICON_PLY_YELLOW_DK        0x6F
454        #define COLOR_ICON_PLY_YELLOW_LT        0x63
455        #define COLOR_ICON_PLY_GREY                     COLOR_ICON_REC_GREY
456        #define COLOR_ICON_PLY_GREY_DK          COLOR_ICON_REC_GREY_DK
457        #define COLOR_ICON_PLY_GREY_LT          COLOR_ICON_REC_GREY_LT
458#endif
459
460#elif CAM_BITMAP_PALETTE==8
461
462// Used by :- A490, A495
463
464#define COLOR_WHITE         0x01
465#define COLOR_RED           0x66
466#define COLOR_GREY          0x6D
467#define COLOR_GREEN         0x69
468#define COLOR_BLUE_LT       0x68
469#define COLOR_BLUE          0x67
470#define COLOR_YELLOW        0x60
471#define COLOR_BG            0x20
472#define COLOR_FG            COLOR_WHITE
473#define COLOR_SELECTED_BG   COLOR_RED
474#define COLOR_SELECTED_FG   COLOR_WHITE
475#define COLOR_ALT_BG        0x20
476#define COLOR_SPLASH_RED    COLOR_RED
477#define COLOR_SPLASH_PINK   COLOR_GREY
478#define COLOR_SPLASH_GREY   0xDE
479#define COLOR_HISTO_R       COLOR_RED
480#define COLOR_HISTO_R_PLAY  COLOR_RED
481#define COLOR_HISTO_B       COLOR_BLUE
482#define COLOR_HISTO_G       COLOR_GREEN
483#define COLOR_HISTO_G_PLAY  COLOR_GREEN
484#define COLOR_HISTO_BG      COLOR_BLUE_LT
485#define COLOR_HISTO_RG      COLOR_YELLOW
486#define COLOR_HISTO_RB      COLOR_RED
487#define COLOR_HISTO_RB_PLAY COLOR_HISTO_RB
488#define COLOR_HISTO_B_PLAY  COLOR_HISTO_B
489#define COLOR_HISTO_BG_PLAY COLOR_BLUE_LT
490#define COLOR_HISTO_RG_PLAY COLOR_YELLOW
491
492#elif CAM_BITMAP_PALETTE==9
493
494// Used by :- SX220HS, SX230HS
495
496#define COLOR_WHITE         0x01
497#define COLOR_RED           0x9f
498#define COLOR_GREY          0x1a
499#define COLOR_GREY_LIGHT    0x0B
500#define COLOR_GREY_DARK     0x19
501#define COLOR_GREEN         0xa0
502#define COLOR_BLUE_LT       0x96
503#define COLOR_BLUE          0xa1
504#define COLOR_YELLOW        0x92
505#define COLOR_BG            0x62
506#define COLOR_FG            COLOR_WHITE
507#define COLOR_SELECTED_BG   0x0e
508#define COLOR_SELECTED_FG   COLOR_BLACK
509#define COLOR_ALT_BG        COLOR_BG
510#define COLOR_SPLASH_RED    COLOR_RED
511#define COLOR_SPLASH_PINK   0x1e    // Orange
512#define COLOR_SPLASH_GREY   0x16
513#define COLOR_HISTO_R       0x6C
514#define COLOR_HISTO_R_PLAY  COLOR_RED
515#define COLOR_HISTO_B       0x6D
516#define COLOR_HISTO_B_PLAY  COLOR_BLUE
517#define COLOR_HISTO_G       0x90
518#define COLOR_HISTO_G_PLAY  COLOR_GREEN
519#define COLOR_HISTO_BG      0x52    // COLOR_BLUE_LT
520#define COLOR_HISTO_RG      0x51    // COLOR_YELLOW
521#define COLOR_HISTO_RB      0x3D    // COLOR_RED
522#define COLOR_HISTO_RB_PLAY COLOR_HISTO_RB
523#define COLOR_HISTO_BG_PLAY COLOR_BLUE_LT
524#define COLOR_HISTO_RG_PLAY COLOR_YELLOW
525#undef SCREEN_COLOR
526#define SCREEN_COLOR            0x1D
527
528// Icon colors
529// 3 shades of Red, Green, Yellow and Grey
530// Separate definitions for record and playback mode
531// to cater for cameras with variable palettes
532#define COLOR_ICON_REC_RED                      0x3D
533#define COLOR_ICON_REC_RED_DK           0x6C
534#define COLOR_ICON_REC_RED_LT           0x1E
535#define COLOR_ICON_REC_GREEN            0x90
536#define COLOR_ICON_REC_GREEN_DK         0x5A
537#define COLOR_ICON_REC_GREEN_LT         0x59
538#define COLOR_ICON_REC_YELLOW           0x2D
539#define COLOR_ICON_REC_YELLOW_DK        0x1E
540#define COLOR_ICON_REC_YELLOW_LT        0x20
541#define COLOR_ICON_REC_GREY                     COLOR_GREY
542#define COLOR_ICON_REC_GREY_DK          0x1A
543#define COLOR_ICON_REC_GREY_LT          0x11
544#define COLOR_ICON_PLY_RED                      0x9F
545#define COLOR_ICON_PLY_RED_DK           0x9F
546#define COLOR_ICON_PLY_RED_LT           0x1E
547#define COLOR_ICON_PLY_GREEN            0xA0
548#define COLOR_ICON_PLY_GREEN_DK         0xA0
549#define COLOR_ICON_PLY_GREEN_LT         0x9E
550#define COLOR_ICON_PLY_YELLOW           0x55
551#define COLOR_ICON_PLY_YELLOW_DK        0x55
552#define COLOR_ICON_PLY_YELLOW_LT        0x4C
553#define COLOR_ICON_PLY_GREY                     COLOR_ICON_REC_GREY
554#define COLOR_ICON_PLY_GREY_DK          COLOR_ICON_REC_GREY_DK
555#define COLOR_ICON_PLY_GREY_LT          COLOR_ICON_REC_GREY_LT
556
557#elif CAM_BITMAP_PALETTE==10
558
559// Used by :- A1100
560
561#define COLOR_WHITE         0x0A
562#define COLOR_RED           0x6B
563#define COLOR_GREY          0x17
564#define COLOR_GREEN         0x96
565#define COLOR_BLUE_LT       0x79
566#define COLOR_BLUE          0x8A
567#define COLOR_YELLOW        0x54
568#define COLOR_BG            0x1F
569#define COLOR_FG            COLOR_WHITE
570#define COLOR_SELECTED_BG   COLOR_RED
571#define COLOR_SELECTED_FG   COLOR_WHITE
572#define COLOR_ALT_BG        0x87
573#define COLOR_SPLASH_RED    0x60
574#define COLOR_SPLASH_PINK   0xBD
575#define COLOR_SPLASH_GREY   0x16
576// colors for blended histo
577#define COLOR_HISTO_R       COLOR_RED
578#define COLOR_HISTO_R_PLAY  COLOR_RED
579#define COLOR_HISTO_B       COLOR_BLUE
580#define COLOR_HISTO_G       COLOR_GREEN
581#define COLOR_HISTO_G_PLAY  COLOR_GREEN
582#define COLOR_HISTO_BG      COLOR_BLUE_LT
583#define COLOR_HISTO_RG      COLOR_YELLOW
584#define COLOR_HISTO_RB      0x66
585#define COLOR_HISTO_RB_PLAY 0xE2
586#define COLOR_HISTO_B_PLAY  0xCC
587#define COLOR_HISTO_BG_PLAY 0x99
588#define COLOR_HISTO_RG_PLAY 0x66
589#undef SCREEN_COLOR
590#define SCREEN_COLOR            0x1D
591
592#elif CAM_BITMAP_PALETTE==11
593
594// Used by :- IXUS300_SD4000
595
596// pallete changes almost completely depenting on mode and if canon menu is active or not
597// playback, playback with menu, photo record mode, photo record mode with menu, ...
598#define COLOR_WHITE         0x01    // always the same
599#define COLOR_RED           0x1E    // always the same, bright orange (red is only available in record more without menu)
600#define COLOR_GREY          0x16    // always the same
601#define COLOR_GREEN         0x9F    // playback only, without menu
602#define COLOR_BLUE_LT       0x0C    // playback: light brown
603#define COLOR_BLUE          0x12    // playback: dark brown (almost like sh.t)
604#define COLOR_YELLOW        0x90    // playback only, without menu
605#define COLOR_BG            0x1D    // greyisch
606#define COLOR_FG            COLOR_WHITE
607#define COLOR_SELECTED_BG   COLOR_RED    // always the same, light grey
608#define COLOR_SELECTED_FG   COLOR_BLACK
609#define COLOR_ALT_BG        COLOR_BG
610#define COLOR_SPLASH_RED    COLOR_RED
611#define COLOR_SPLASH_PINK   COLOR_BLUE
612#define COLOR_SPLASH_GREY   0x16    // darker grey
613#define COLOR_HISTO_R       0x66    // record only, without menu
614#define COLOR_HISTO_R_PLAY  COLOR_RED
615#define COLOR_HISTO_B       0x3C
616#define COLOR_HISTO_B_PLAY  0x50    // playback without menu dont have blue at all, bright Orange
617#define COLOR_HISTO_G       0x6B
618#define COLOR_HISTO_G_PLAY  COLOR_GREEN
619#define COLOR_HISTO_BG      COLOR_BLUE_LT
620#define COLOR_HISTO_RG      COLOR_YELLOW
621#define COLOR_HISTO_RB      COLOR_RED
622#define COLOR_HISTO_RB_PLAY COLOR_HISTO_RB
623#define COLOR_HISTO_BG_PLAY COLOR_BLUE_LT
624#define COLOR_HISTO_RG_PLAY COLOR_YELLOW
625
626#elif CAM_BITMAP_PALETTE==12
627
628// Used by :- G12, SX30, SX40HS, IXUS310_ELPH500HS
629
630// Default Canon colors
631#define COLOR_WHITE         0x01
632#define COLOR_GREY_DK       0x1a
633#define COLOR_GREY          0x16
634#define COLOR_GREY_LT       0x0E
635#undef SCREEN_COLOR
636#define SCREEN_COLOR        0x1D
637
638// CHDK colors loaded into these locations in the camera palette by load_chdk_palette()
639#define COLOR_RED           (CHDK_COLOR_BASE+0)
640#define COLOR_RED_DK        (CHDK_COLOR_BASE+1)
641#define COLOR_RED_LT        (CHDK_COLOR_BASE+2)
642#define COLOR_GREEN         (CHDK_COLOR_BASE+3)
643#define COLOR_GREEN_DK      (CHDK_COLOR_BASE+4)
644#define COLOR_GREEN_LT      (CHDK_COLOR_BASE+5)
645#define COLOR_BLUE          (CHDK_COLOR_BASE+6)
646#define COLOR_BLUE_DK       (CHDK_COLOR_BASE+7)
647#define COLOR_BLUE_LT       (CHDK_COLOR_BASE+8)
648#define COLOR_MAGENTA       (CHDK_COLOR_BASE+9)
649#define COLOR_YELLOW        (CHDK_COLOR_BASE+10)
650#define COLOR_YELLOW_DK     (CHDK_COLOR_BASE+11)
651#define COLOR_YELLOW_LT     (CHDK_COLOR_BASE+12)
652
653#define COLOR_CYAN          COLOR_BLUE_LT
654#define COLOR_BG            COLOR_GREY_DK
655#define COLOR_FG            COLOR_WHITE
656#define COLOR_SELECTED_BG   COLOR_GREY_LT
657#define COLOR_SELECTED_FG   COLOR_BLACK
658#define COLOR_ALT_BG        COLOR_BG
659
660#define COLOR_SPLASH_RED    COLOR_RED_DK
661#define COLOR_SPLASH_PINK   COLOR_RED_LT
662#define COLOR_SPLASH_GREY   COLOR_GREY_LT
663
664#define COLOR_HISTO_R       COLOR_RED
665#define COLOR_HISTO_R_PLAY  COLOR_RED
666#define COLOR_HISTO_B       COLOR_BLUE
667#define COLOR_HISTO_B_PLAY  COLOR_BLUE
668#define COLOR_HISTO_G       COLOR_GREEN
669#define COLOR_HISTO_G_PLAY  COLOR_GREEN
670#define COLOR_HISTO_BG      COLOR_CYAN
671#define COLOR_HISTO_BG_PLAY COLOR_CYAN
672#define COLOR_HISTO_RG      COLOR_YELLOW
673#define COLOR_HISTO_RG_PLAY COLOR_YELLOW
674#define COLOR_HISTO_RB      COLOR_MAGENTA
675#define COLOR_HISTO_RB_PLAY COLOR_MAGENTA
676
677// Icon colors
678// 3 shades of Red, Green, Yellow and Grey
679// Separate definitions for record and playback mode
680// to cater for cameras with variable palettes
681#define COLOR_ICON_REC_RED                      COLOR_RED
682#define COLOR_ICON_REC_RED_DK           COLOR_RED_DK
683#define COLOR_ICON_REC_RED_LT           COLOR_RED_LT
684#define COLOR_ICON_REC_GREEN            COLOR_GREEN
685#define COLOR_ICON_REC_GREEN_DK         COLOR_GREEN_DK
686#define COLOR_ICON_REC_GREEN_LT         COLOR_GREEN_LT
687#define COLOR_ICON_REC_YELLOW           COLOR_YELLOW
688#define COLOR_ICON_REC_YELLOW_DK        COLOR_YELLOW_DK
689#define COLOR_ICON_REC_YELLOW_LT        COLOR_YELLOW_LT
690#define COLOR_ICON_REC_GREY                     COLOR_GREY
691#define COLOR_ICON_REC_GREY_DK          COLOR_GREY_DK
692#define COLOR_ICON_REC_GREY_LT          COLOR_GREY_LT
693
694#elif CAM_BITMAP_PALETTE==13
695
696// Used by :- A3000IS
697
698#define COLOR_TRANSPARENT   0x00
699#define COLOR_WHITE         0x01
700#define COLOR_RED           0x22
701#define COLOR_GREY          0xF3
702#define COLOR_GREEN         0xcF
703#define COLOR_BLUE_LT       0x61
704#define COLOR_BLUE          0xE7
705#define COLOR_YELLOW        0xDD
706#define COLOR_BLACK         0xFF
707#define COLOR_BG            0x0F
708#define COLOR_FG            COLOR_WHITE
709#define COLOR_SELECTED_BG   COLOR_RED
710#define COLOR_SELECTED_FG   COLOR_GREY
711#define COLOR_ALT_BG        0xf0
712#define COLOR_SPLASH_RED    COLOR_RED
713#define COLOR_SPLASH_PINK   0x4E
714#define COLOR_SPLASH_GREY   0x6F
715// colors for blended histo
716#define COLOR_HISTO_R       COLOR_RED
717#define COLOR_HISTO_R_PLAY  COLOR_RED
718#define COLOR_HISTO_B       COLOR_BLUE
719#define COLOR_HISTO_G       COLOR_GREEN
720#define COLOR_HISTO_G_PLAY  COLOR_GREEN
721#define COLOR_HISTO_BG      COLOR_BLUE_LT
722#define COLOR_HISTO_RG      COLOR_YELLOW
723#define COLOR_HISTO_RB      COLOR_RED
724#define COLOR_HISTO_RB_PLAY COLOR_HISTO_RB
725#define COLOR_HISTO_B_PLAY  COLOR_HISTO_B
726#define COLOR_HISTO_BG_PLAY COLOR_BLUE_LT
727#define COLOR_HISTO_RG_PLAY COLOR_YELLOW
728
729#else
730#error CAM_BITMAP_PALETTE not defined
731#endif
732
733// Define default icon colors if not already defined above
734// 3 shades of Red, Green, Yellow and Grey
735// Separate definitions for record and playback mode
736// to cater for cameras with variable palettes
737#if !defined(COLOR_ICON_REC_RED)        // Record mode colors
738#define COLOR_ICON_REC_RED                      0x22
739#define COLOR_ICON_REC_RED_DK           0x2F
740#define COLOR_ICON_REC_RED_LT           0x26
741#define COLOR_ICON_REC_GREEN            0x5F
742#define COLOR_ICON_REC_GREEN_DK         0x25
743#define COLOR_ICON_REC_GREEN_LT         0x51
744#define COLOR_ICON_REC_YELLOW           0x6F
745#define COLOR_ICON_REC_YELLOW_DK        0x6F
746#define COLOR_ICON_REC_YELLOW_LT        0x66
747#define COLOR_ICON_REC_GREY                     COLOR_GREY
748#define COLOR_ICON_REC_GREY_DK          0x33
749#define COLOR_ICON_REC_GREY_LT          0x13
750#endif
751#if !defined(COLOR_ICON_PLY_RED)        // Playback mode colors
752#define COLOR_ICON_PLY_RED                      COLOR_ICON_REC_RED
753#define COLOR_ICON_PLY_RED_DK           COLOR_ICON_REC_RED_DK
754#define COLOR_ICON_PLY_RED_LT           COLOR_ICON_REC_RED_LT
755#define COLOR_ICON_PLY_GREEN            COLOR_ICON_REC_GREEN
756#define COLOR_ICON_PLY_GREEN_DK         COLOR_ICON_REC_GREEN_DK
757#define COLOR_ICON_PLY_GREEN_LT         COLOR_ICON_REC_GREEN_LT
758#define COLOR_ICON_PLY_YELLOW           COLOR_ICON_REC_YELLOW
759#define COLOR_ICON_PLY_YELLOW_DK        COLOR_ICON_REC_YELLOW_DK
760#define COLOR_ICON_PLY_YELLOW_LT        COLOR_ICON_REC_YELLOW_LT
761#define COLOR_ICON_PLY_GREY                     COLOR_ICON_REC_GREY
762#define COLOR_ICON_PLY_GREY_DK          COLOR_ICON_REC_GREY_DK
763#define COLOR_ICON_PLY_GREY_LT          COLOR_ICON_REC_GREY_LT
764#endif
765
766#define FONT_WIDTH          8
767#define FONT_HEIGHT         16
768
769//-------------------------------------------------------------------
770extern unsigned int         screen_width, screen_height, screen_size;
771extern unsigned int         screen_buffer_width, screen_buffer_height, screen_buffer_size;
772
773//-------------------------------------------------------------------
774extern void draw_init();
775extern void draw_set_draw_proc(void (*pixel_proc)(unsigned int offset, color cl));
776
777#ifdef CAM_DETECT_SCREEN_ERASE
778extern void draw_set_guard();
779extern int draw_test_guard();
780extern int draw_test_pixel(coord x, coord y, color c);
781#endif
782
783extern color draw_get_pixel(coord x, coord y);
784
785extern void draw_line(coord x1, coord y1, coord x2, coord y2, color cl);
786extern void draw_hline(coord x, coord y, int len, color cl);
787extern void draw_vline(coord x, coord y, int len, color cl);
788
789// draw frame
790extern void draw_rect(coord x1, coord y1, coord x2, coord y2, color cl);
791extern void draw_rect_thick(coord x1, coord y1, coord x2, coord y2, color cl, int thickness);
792extern void draw_rect_shadow(coord x1, coord y1, coord x2, coord y2, color cl, int thickness);
793extern void draw_round_rect(coord x1, coord y1, coord x2, coord y2, color cl);
794extern void draw_round_rect_thick(coord x1, coord y1, coord x2, coord y2, color cl, int thickness);
795// color: hi_byte - BG; lo_byte - FG
796extern void draw_filled_rect(coord x1, coord y1, coord x2, coord y2, color cl);
797extern void draw_filled_rect_thick(coord x1, coord y1, coord x2, coord y2, color cl, int thickness);
798extern void draw_filled_round_rect(coord x1, coord y1, coord x2, coord y2, color cl);
799extern void draw_filled_round_rect_thick(coord x1, coord y1, coord x2, coord y2, color cl, int thickness);
800
801extern void draw_char(coord x, coord y, const char ch, color cl);
802extern void draw_string(coord x, coord y, const char *s, color cl);
803
804extern void draw_txt_rect(coord col, coord row, unsigned int length, unsigned int height, color cl);
805extern void draw_txt_rect_exp(coord col, coord row, unsigned int length, unsigned int height, unsigned int exp, color cl);
806extern void draw_txt_filled_rect(coord col, coord row, unsigned int length, unsigned int height, color cl);
807extern void draw_txt_filled_rect_exp(coord col, coord row, unsigned int length, unsigned int height, unsigned int exp, color cl);
808extern void draw_txt_string(coord col, coord row, const char *str, color cl);
809extern void draw_txt_char(coord col, coord row, const char ch, color cl);
810
811extern void draw_clear();
812extern void draw_restore();
813
814extern void draw_fill(coord x, coord y, color cl_fill, color cl_bound);
815extern void draw_circle(coord x, coord y, const unsigned int r, color cl);
816extern void draw_ellipse(coord xc, coord yc, unsigned int a, unsigned int b, color cl);
817extern void draw_filled_ellipse(coord xc, coord yc, unsigned int a, unsigned int b, color cl);
818   
819#if defined(CAM_USE_COLORED_ICONS)
820extern void draw_get_icon_colors();
821extern color icon_green[3], icon_red[3], icon_yellow[3], icon_grey[3];
822#endif
823
824//-------------------------------------------------------------------
825#endif
Note: See TracBrowser for help on using the repository browser.