Contiki 3.x
|
The Contiki Toolkit (CTK) provides the graphical user interface for the Contiki system. More...
Modules | |
CTK device driver functions | |
The CTK device driver functions are divided into two modules, the ctk-draw module and the ctk-arch module. | |
CTK events | |
CTK application functions | |
The CTK functions used by an application program. | |
Files | |
file | ctk-draw.h |
CTK screen drawing module interface, ctk-draw. | |
Functions | |
void | ctk_mode_set (unsigned char mode) |
Sets the current CTK mode. More... | |
unsigned char | ctk_mode_get (void) |
Retrieves the current CTK mode. More... | |
CCIF void | ctk_window_new (struct ctk_window *window, unsigned char w, unsigned char h, char *title) |
Create a new window. More... | |
CCIF void | ctk_window_clear (struct ctk_window *w) |
Remove all widgets from a window. More... | |
CCIF void | ctk_window_close (struct ctk_window *w) |
Close a window if it is open. More... | |
CCIF void | ctk_window_redraw (struct ctk_window *w) |
Redraw a window. More... | |
CCIF void | ctk_menu_add (struct ctk_menu *menu) |
Add a menu to the menu bar. More... | |
CCIF void | ctk_menu_remove (struct ctk_menu *menu) |
Remove a menu from the menu bar. More... | |
The Contiki Toolkit (CTK) provides the graphical user interface for the Contiki system.
CCIF void ctk_menu_add | ( | struct ctk_menu * | menu | ) |
Add a menu to the menu bar.
menu | The menu to be added. |
Definition at line 504 of file ctk.c.
References ctk_menu::next, and NULL.
CCIF void ctk_menu_remove | ( | struct ctk_menu * | menu | ) |
Remove a menu from the menu bar.
menu | The menu to be removed. |
Definition at line 532 of file ctk.c.
References ctk_menu::next, and NULL.
unsigned char ctk_mode_get | ( | void | ) |
void ctk_mode_set | ( | unsigned char | m | ) |
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.
m | The mode. |
CCIF void ctk_window_clear | ( | struct ctk_window * | w | ) |
Remove all widgets from a window.
w | The window to be cleared. |
Definition at line 485 of file ctk.c.
References ctk_window::active, ctk_window::focused, ctk_window::inactive, and NULL.
CCIF void ctk_window_close | ( | struct ctk_window * | w | ) |
Close a window if it is open.
If the window is not open, this function does nothing.
w | The window to be closed. |
Definition at line 400 of file ctk.c.
References ctk_window::next, NULL, ctk_window::prev, and ctk_window::w.
CCIF void ctk_window_new | ( | struct ctk_window * | window, |
unsigned char | w, | ||
unsigned char | h, | ||
char * | title | ||
) |
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.
window | The window to be created. |
w | The width of the new window. |
h | The height of the new window. |
title | The title of the new window. |
CCIF void ctk_window_redraw | ( | struct ctk_window * | w | ) |
Redraw a window.
This function redraws the window, but only if it is the foremost one on the desktop.
w | The window to be redrawn. |
Definition at line 652 of file ctk.c.
References ctk_draw_dialog(), ctk_draw_window(), CTK_FOCUS_WINDOW, and NULL.