source: branches/reyalp-flt/include/gui.h @ 1467

Revision 1467, 1.4 KB checked in by reyalp, 17 months ago (diff)

apply 1459_elf3.patch from tsvstar in http://chdk.setepontos.com/index.php?topic=847.msg77723#msg77723
workaround in kbd.c for trunk changesets 1461 and 1464
set eol-style props

  • Property svn:eol-style set to native
Line 
1#ifndef GUI_H
2#define GUI_H
3
4typedef unsigned int      coord;
5typedef unsigned short    color;
6
7#define MAKE_COLOR(bg, fg)    ((color)((((char)(bg))<<8)|((char)(fg))))
8
9// Don't delete or re-order entries unless guiHandlers (gui.c) table is updated to match
10enum Gui_Mode_ {
11    GUI_MODE_NONE = 0,
12    GUI_MODE_ALT,
13    GUI_MODE_MENU,
14    GUI_MODE_MBOX,
15    GUI_MODE_OSD,
16        GUI_MODE_COUNT
17};
18
19typedef unsigned int gui_mode_t;
20
21#define GUI_MODE_MAGICNUM       0xd36c1559
22
23// Specific behaviour of gui mode
24#define GUI_MODE_FLAG_NODRAWRESTORE       1
25#define GUI_MODE_FLAG_NORESTORE_ON_SWITCH 2
26
27
28// Values (bit-flag) for gui_draw argument
29#define GUI_REDRAWFLAG_ERASEGUARD       1
30#define GUI_REDRAWFLAG_MODE_WAS_CHANGED 2
31#define GUI_REDRAWFLAG_DRAW_RESTORED    4
32
33// Structure to store gui redraw and kbd process handlers for each mode
34typedef struct
35{
36    void (*redraw)(int);                    // Called to redraw screen
37    void (*kbd_process)(void);              // Main button handler for mode
38    void (*kbd_process_menu_btn)(void);     // Menu button handler for mode
39        int flags;
40        unsigned int magicnum;                                  // Safety check for modules
41} gui_handler;
42
43void gui_default_kbd_process_menu_btn();
44
45
46extern void gui_redraw();
47extern void gui_force_restore();
48
49extern void draw_pixel(coord x, coord y, color cl);
50
51extern gui_mode_t gui_get_mode();
52extern void gui_set_mode(gui_mode_t mode);
53
54
55
56#ifdef OPT_SCRIPTING
57extern void gui_update_script_submenu();
58#endif
59
60#endif
Note: See TracBrowser for help on using the repository browser.