Main Page | Modules | Alphabetical List | Data Structures | Directories | File List | Data Fields | Globals | Examples

ctk.c File Reference


Detailed Description

The Contiki Toolkit CTK, the Contiki GUI.

Author:
Adam Dunkels <adam@dunkels.com>

Definition in file ctk.c.

#include <string.h>
#include "contiki.h"
#include "ctk/ctk.h"
#include "ctk/ctk-draw.h"
#include "ctk/ctk-mouse.h"

Go to the source code of this file.

Defines

#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
#define UP   0
#define DOWN   1
#define LEFT   2
#define RIGHT   3

Functions

void ctk_restore (void)
void ctk_mode_set (unsigned char m)
 Sets the current CTK mode.
unsigned char ctk_mode_get (void)
 Retrieves the current CTK mode.
void ctk_icon_add (CC_REGISTER_ARG struct ctk_widget *icon, struct process *p)
 Add an icon to the desktop.
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_window_open (CC_REGISTER_ARG struct ctk_window *w)
 Open a window, or bring window to front if already open.
void ctk_window_close (struct ctk_window *w)
 Close a window if it is open.
void ctk_window_clear (struct ctk_window *w)
 Remove all widgets from a window.
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_desktop_redraw (struct ctk_desktop *d)
 Redraw the entire desktop.
void ctk_window_redraw (struct ctk_window *w)
 Redraw a window.
void ctk_window_new (struct ctk_window *window, unsigned char w, unsigned char h, char *title)
 Create a new window.
void ctk_dialog_new (CC_REGISTER_ARG struct ctk_window *dialog, unsigned char w, unsigned char h)
 Creates a new dialog.
void ctk_menu_new (CC_REGISTER_ARG struct ctk_menu *menu, char *title)
 Creates a new menu.
unsigned char ctk_menuitem_add (CC_REGISTER_ARG struct ctk_menu *menu, char *name)
 Adds a menu item to a menu.
void ctk_widget_redraw (struct ctk_widget *widget)
 Redraws a widget.
void CC_FASTCALL ctk_widget_add (CC_REGISTER_ARG struct ctk_window *window, CC_REGISTER_ARG struct ctk_widget *widget)
 Adds a widget to a window.
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.
 PROCESS_THREAD (ctk_process, ev, data)

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_button_activate
 Same as ctk_signal_widget_activate.
process_event_t ctk_signal_widget_select
 Emitted when a widget is selected.
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.
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.
unsigned short ctk_screensaver_timeout = (5*60)


Generated on Thu Jun 22 17:45:43 2006 for Contiki 2.x by  doxygen 1.4.4