Definition in file ctk.h.
#include "contiki-conf.h"
#include "contiki.h"
Go to the source code of this file.
Data Structures | |
struct | ctk_separator |
struct | ctk_button |
struct | ctk_label |
struct | ctk_hyperlink |
struct | ctk_textentry |
struct | ctk_icon |
struct | ctk_bitmap |
struct | ctk_textmap |
struct | ctk_widget_button |
struct | ctk_widget_label |
struct | ctk_widget_hyperlink |
struct | ctk_widget_textentry |
struct | ctk_widget_icon |
struct | ctk_widget_bitmap |
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... | |
struct | ctk_desktop |
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_WIDGET_FLAG_INITIALIZER(x) |
#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_NORMAL 0 |
#define | CTK_TEXTENTRY_EDIT 1 |
#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_TEXTENTRY_INPUT(x, y, w, h, text, len, input) |
#define | CTK_ICON_BITMAP(bitmap) NULL |
#define | CTK_ICON_TEXTMAP(textmap) NULL |
#define | CTK_ICON(title, bitmap, textmap) |
Instantiating macro for the ctk_icon widget. | |
#define | CTK_BITMAP(x, y, w, h, bitmap, bitmap_width, bitmap_height) |
#define | CTK_TEXTMAP_NORMAL 0 |
#define | CTK_TEXTMAP_ACTIVE 1 |
#define | CTK_TEXTMAP(x, y, w, h, textmap) NULL, NULL, x, y, CTK_WIDGET_LABEL, w, h, CTK_WIDGET_FLAG_INITIALIZER(0) text, CTK_TEXTMAP_NORMAL |
#define | CTK_WIDGET_FLAG_NONE 0 |
#define | CTK_WIDGET_FLAG_MONOSPACE 1 |
#define | CTK_WIDGET_FLAG_CENTER 2 |
#define | CTK_WIDGET_SET_FLAG(w, f) |
#define | CTK_MAXMENUITEMS 8 |
#define | CTK_REDRAW_NONE 0 |
#define | CTK_REDRAW_ALL 1 |
#define | CTK_REDRAW_WINDOWS 2 |
#define | CTK_REDRAW_WIDGETS 4 |
#define | CTK_REDRAW_MENUS 8 |
#define | CTK_REDRAW_PART 16 |
#define | CTK_CONF_MAX_REDRAWWIDGETS 8 |
#define | CTK_CONF_MAX_REDRAWWINDOWS 8 |
#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 | 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_bitmap_set_bitmap(b, m) (b)->bitmap = (m) |
#define | CTK_BUTTON_NEW(widg, xpos, ypos, width, buttontext) |
#define | CTK_LABEL_NEW(widg, xpos, ypos, width, height, labeltext) |
#define | CTK_BITMAP_NEW(widg, xpos, ypos, width, height, bmap) |
#define | CTK_TEXTENTRY_NEW(widg, xxpos, yypos, width, height, textptr, textlen) |
#define | CTK_TEXTENTRY_INPUT_NEW(widg, xxpos, yypos, width, height, textptr, textlen, iinput) |
#define | CTK_HYPERLINK_NEW(widg, xpos, ypos, width, linktext, linkurl) |
#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. | |
Typedefs | |
typedef char | ctk_arch_key_t |
The keyboard character type of the system. | |
typedef unsigned char(* | ctk_textentry_input )(ctk_arch_key_t c, struct ctk_textentry *t) |
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. | |
void | ctk_widget_redraw (struct ctk_widget *widget) |
Redraws a widget. | |
void | ctk_desktop_redraw (struct ctk_desktop *d) |
Redraw the entire desktop. | |
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 | |
process_event_t | ctk_signal_keypress |
Emitted for every key being pressed. | |
process_event_t | ctk_signal_widget_activate |
Emitted when a widget is activated (pressed). | |
process_event_t | ctk_signal_widget_select |
Emitted when a widget is selected. | |
process_event_t | ctk_signal_menu_activate |
Emitted when a menu item is activated. | |
process_event_t | ctk_signal_window_close |
Emitted when a window is closed. | |
process_event_t | ctk_signal_pointer_move |
Emitted when the mouse pointer is moved. | |
process_event_t | ctk_signal_pointer_button |
Emitted when a mouse button is pressed. | |
process_event_t | ctk_signal_button_activate |
Same as ctk_signal_widget_activate. | |
process_event_t | ctk_signal_button_hover |
Same as ctk_signal_widget_select. | |
process_event_t | ctk_signal_hyperlink_activate |
Emitted when a hyperlink is activated. | |
process_event_t | ctk_signal_hyperlink_hover |
Same as ctk_signal_widget_select. |