Contiki 2.6
|
CTK header file. More...
#include "contiki-conf.h"
#include "contiki.h"
Go to the source code of this file.
Data Structures | |
struct | ctk_widget_button |
Instantiating macro for the ctk_icon widget. More... | |
struct | ctk_widget |
The generic CTK widget structure that contains all other widget structures. More... | |
struct | ctk_window |
Representation of a CTK window. More... | |
struct | ctk_menuitem |
Representation of an individual menu item. More... | |
struct | ctk_menu |
Representation of an individual menu. More... | |
struct | ctk_menus |
Representation of the menu bar. More... | |
Defines | |
#define | CTK_WIDGET_SEPARATOR 1 |
Widget number: The CTK separator widget. | |
#define | CTK_WIDGET_LABEL 2 |
Widget number: The CTK label widget. | |
#define | CTK_WIDGET_BUTTON 3 |
Widget number: The CTK button widget. | |
#define | CTK_WIDGET_HYPERLINK 4 |
Widget number: The CTK hyperlink widget. | |
#define | CTK_WIDGET_TEXTENTRY 5 |
Widget number: The CTK textentry widget. | |
#define | CTK_WIDGET_BITMAP 6 |
Widget number: The CTK bitmap widget. | |
#define | CTK_WIDGET_ICON 7 |
Widget number: The CTK icon widget. | |
#define | CTK_SEPARATOR(x, y, w) NULL, NULL, x, y, CTK_WIDGET_SEPARATOR, w, 1, CTK_WIDGET_FLAG_INITIALIZER(0) |
Instantiating macro for the ctk_separator widget. | |
#define | CTK_BUTTON(x, y, w, text) NULL, NULL, x, y, CTK_WIDGET_BUTTON, w, 1, CTK_WIDGET_FLAG_INITIALIZER(0) text |
Instantiating macro for the ctk_button widget. | |
#define | CTK_LABEL(x, y, w, h, text) NULL, NULL, x, y, CTK_WIDGET_LABEL, w, h, CTK_WIDGET_FLAG_INITIALIZER(0) text, |
Instantiating macro for the ctk_label widget. | |
#define | CTK_HYPERLINK(x, y, w, text, url) NULL, NULL, x, y, CTK_WIDGET_HYPERLINK, w, 1, CTK_WIDGET_FLAG_INITIALIZER(0) text, url |
Instantiating macro for the ctk_hyperlink widget. | |
#define | CTK_TEXTENTRY_CLEAR(e) |
Clears a text entry widget and sets the cursor to the start of the text line. | |
#define | CTK_TEXTENTRY(x, y, w, h, text, len) |
Instantiating macro for the ctk_textentry widget. | |
#define | CTK_ICON_ADD(icon, p) ctk_icon_add((struct ctk_widget *)icon, p) |
Add an icon to the desktop. | |
#define | CTK_WIDGET_ADD(win, widg) ctk_widget_add(win, (struct ctk_widget *)widg) |
Add a widget to a window. | |
#define | CTK_WIDGET_FOCUS(win, widg) (win)->focused = (struct ctk_widget *)(widg) |
Set focus to a widget. | |
#define | CTK_WIDGET_REDRAW(widg) ctk_widget_redraw((struct ctk_widget *)widg) |
Add a widget to the redraw queue. | |
#define | CTK_WIDGET_TYPE(w) ((w)->type) |
Obtain the type of a widget. | |
#define | CTK_WIDGET_SET_WIDTH(widget, width) |
Sets the width of a widget. | |
#define | CTK_WIDGET_XPOS(w) (((struct ctk_widget *)(w))->x) |
Retrieves the x position of a widget, relative to the window in which the widget is contained. | |
#define | CTK_WIDGET_SET_XPOS(w, xpos) ((struct ctk_widget *)(w))->x = (xpos) |
Sets the x position of a widget, relative to the window in which the widget is contained. | |
#define | CTK_WIDGET_YPOS(w) (((struct ctk_widget *)(w))->y) |
Retrieves the y position of a widget, relative to the window in which the widget is contained. | |
#define | CTK_WIDGET_SET_YPOS(w, ypos) ((struct ctk_widget *)(w))->y = (ypos) |
Sets the y position of a widget, relative to the window in which the widget is contained. | |
#define | ctk_label_set_height(w, height) (w)->widget.label.h = (height) |
Set the height of a label. | |
#define | ctk_label_set_text(l, t) (l)->text = (t) |
Set the text of a label. | |
#define | ctk_button_set_text(b, t) (b)->text = (t) |
Set the text of a button. | |
#define | CTK_FOCUS_NONE 0 |
Widget focus flag: no focus. | |
#define | CTK_FOCUS_WIDGET 1 |
Widget focus flag: widget has focus. | |
#define | CTK_FOCUS_WINDOW 2 |
Widget focus flag: widget's window is the foremost one. | |
#define | CTK_FOCUS_DIALOG 4 |
Widget focus flag: widget is in a dialog. | |
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. | |
void | ctk_widget_redraw (struct ctk_widget *widget) |
Redraws a widget. | |
unsigned char | ctk_desktop_width (struct ctk_desktop *d) |
Gets the width of the desktop. | |
unsigned char | ctk_desktop_height (struct ctk_desktop *d) |
Gets the height of the desktop. | |
Variables | |
CCIF process_event_t | ctk_signal_keypress |
Emitted for every key being pressed. | |
CCIF process_event_t | ctk_signal_widget_activate |
Emitted when a widget is activated (pressed). | |
CCIF process_event_t | ctk_signal_widget_select |
Emitted when a widget is selected. | |
CCIF process_event_t | ctk_signal_menu_activate |
Emitted when a menu item is activated. | |
CCIF process_event_t | ctk_signal_window_close |
Emitted when a window is closed. | |
CCIF process_event_t | ctk_signal_button_activate |
Same as ctk_signal_widget_activate. | |
CCIF process_event_t | ctk_signal_button_hover |
Same as ctk_signal_widget_select. | |
CCIF process_event_t | ctk_signal_hyperlink_activate |
Emitted when a hyperlink is activated. | |
CCIF process_event_t | ctk_signal_hyperlink_hover |
Same as ctk_signal_widget_select. |
CTK header file.
The CTK header file contains functioin declarations and definitions of CTK structures and macros.
Definition in file ctk.h.