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. | |
file | ctk.c |
The Contiki Toolkit CTK, the Contiki GUI. | |
file | ctk.h |
CTK header file. | |
Functions | |
void | ctk_mode_set (unsigned char mode) |
Sets the current CTK mode. | |
unsigned char | ctk_mode_get (void) |
Retrieves the current CTK mode. | |
CCIF void | ctk_window_new (struct ctk_window *window, unsigned char w, unsigned char h, char *title) |
Create a new window. | |
CCIF void | ctk_window_clear (struct ctk_window *w) |
Remove all widgets from a window. | |
CCIF void | ctk_window_close (struct ctk_window *w) |
Close a window if it is open. | |
CCIF void | ctk_window_redraw (struct ctk_window *w) |
Redraw a window. | |
CCIF void | ctk_menu_add (struct ctk_menu *menu) |
Add a menu to the menu bar. | |
CCIF void | ctk_menu_remove (struct ctk_menu *menu) |
Remove a menu from the menu bar. |
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 505 of file ctk.c.
References ctk_menu::next.
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 533 of file ctk.c.
References ctk_menu::next.
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 486 of file ctk.c.
References ctk_window::active, ctk_window::focused, and ctk_window::inactive.
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 401 of file ctk.c.
References ctk_window::next, and ctk_window::prev.
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 653 of file ctk.c.
References ctk_draw_dialog(), ctk_draw_window(), and CTK_FOCUS_WINDOW.