Files | |
file | ctk.h |
CTK header file. | |
file | ctk.c |
The Contiki Toolkit CTK, the Contiki GUI. | |
file | ctk-draw.h |
CTK screen drawing module interface, ctk-draw. | |
Modules | |
CTK application functions | |
The CTK functions used by an application program. | |
CTK events | |
CTK device driver functions | |
The CTK device driver functions are divided into two modules, the ctk-draw module and the ctk-arch module. | |
Defines | |
#define | CTK_WIDGET_FLAG_INITIALIZER(x) |
#define | CTK_MODE_NORMAL 0 |
#define | CTK_MODE_WINDOWMOVE 1 |
#define | CTK_MODE_SCREENSAVER 2 |
#define | CTK_MODE_EXTERNAL 3 |
#define | ctk_window_move(w, xpos, ypos) do { (w)->x=xpos; (w)->y=ypos; } while(0) |
#define | ctk_window_isopen(w) ((w)->next != NULL) |
#define | NULL (void *)0 |
#define | REDRAW_NONE 0 |
#define | REDRAW_ALL 1 |
#define | REDRAW_FOCUS 2 |
#define | REDRAW_WIDGETS 4 |
#define | REDRAW_MENUS 8 |
#define | REDRAW_MENUPART 16 |
#define | MAX_REDRAWWIDGETS 4 |
#define | ICONX_START (width - 6) |
#define | ICONY_START (height - 7) |
#define | ICONX_DELTA -16 |
#define | ICONY_DELTA -5 |
#define | ICONY_MAX height |
#define | ICONY_MIN 0 |
Functions | |
void | ctk_restore (void) |
void | ctk_mode_set (unsigned char mode) |
Sets the current CTK mode. | |
unsigned char | ctk_mode_get (void) |
Retrieves the current CTK mode. | |
void | ctk_window_new (struct ctk_window *window, unsigned char w, unsigned char h, char *title) |
Create a new window. | |
void | ctk_window_clear (struct ctk_window *w) |
Remove all widgets from a window. | |
void | ctk_window_close (struct ctk_window *w) |
Close a window if it is open. | |
void | ctk_window_redraw (struct ctk_window *w) |
Redraw a window. | |
void | ctk_dialog_open (struct ctk_window *d) |
Open a dialog box. | |
void | ctk_dialog_close (void) |
Close the dialog box, if one is open. | |
void | ctk_menu_add (struct ctk_menu *menu) |
Add a menu to the menu bar. | |
void | ctk_menu_remove (struct ctk_menu *menu) |
Remove a menu from the menu bar. | |
Variables | |
unsigned short | ctk_screensaver_timeout = (5*60) |
|
Open a dialog box.
Definition at line 313 of file ctk.c. References REDRAW_FOCUS. Referenced by PROCESS_THREAD(), and program_handler_load(). |
|
Add a menu to the menu bar.
Definition at line 488 of file ctk.c. References ctk_menus::menus, ctk_menu::next, NULL, and REDRAW_MENUPART. Referenced by PROCESS_THREAD(). |
|
Remove a menu from the menu bar.
Definition at line 516 of file ctk.c. References ctk_menus::menus, ctk_menu::next, NULL, and REDRAW_MENUPART. |
|
Retrieves the current CTK mode.
|
|
Sets the current CTK mode. The CTK mode can be either CTK_MODE_NORMAL, CTK_MODE_SCREENSAVER or CTK_MODE_EXTERNAL. CTK_MODE_NORMAL is the normal mode, in which keypresses and mouse pointer movements are processed and the screen is redrawn. In CTK_MODE_SCREENSAVER, no screen redraws are performed and the first key press or pointer movement will cause the ctk_signal_screensaver_stop to be emitted. In the CTK_MODE_EXTERNAL mode, key presses and pointer movements are ignored and no screen redraws are made.
|
|
Remove all widgets from a window.
Definition at line 471 of file ctk.c. References ctk_window::active, ctk_window::focused, ctk_window::inactive, and NULL. |
|
Close a window if it is open. If the window is not open, this function does nothing.
Definition at line 387 of file ctk.c. References ctk_window::next, NULL, ctk_window::prev, and REDRAW_ALL. Referenced by PROCESS_THREAD(). |
|
Create a new window. Creates a new window. The memory for the window structure must already be allocated by the caller, and is usually done with a static declaration. This function sets up the internal structure of the ctk_window struct and creates the move and close buttons, but it does not open the window. The window must be explicitly opened by calling the ctk_window_open() function.
|
|
Redraw a window. This function redraws the window, but only if it is the foremost one on the desktop.
Definition at line 628 of file ctk.c. References ctk_draw_dialog(), ctk_draw_window(), CTK_FOCUS_WINDOW, CTK_MODE_NORMAL, NULL, and ctk_menus::open. Referenced by PROCESS_THREAD(). |