42 static struct ctk_label aboutlabel1 =
43 {
CTK_LABEL(2, 0, 28, 1,
"The Contiki Operating System")};
44 static struct ctk_label aboutlabel2 =
45 {
CTK_LABEL(3, 2, 28, 1,
"A modern, Internet-enabled")};
46 static struct ctk_label aboutlabel3 =
47 {
CTK_LABEL(6, 3, 20, 1,
"operating system and")};
48 static struct ctk_label aboutlabel4 =
49 {
CTK_LABEL(6, 4, 20, 1,
"desktop environment.")};
51 static char abouturl_petscii[] =
"http://www.sics.se/~adam/contiki/";
52 static char abouturl_ascii[40];
53 static struct ctk_hyperlink abouturl =
56 static struct ctk_button aboutclose =
60 PROCESS(about_process,
"About Contiki");
62 AUTOSTART_PROCESSES(&about_process);
81 strcpy(abouturl_ascii, abouturl_petscii);
82 petsciiconv_toascii(abouturl_ascii,
sizeof(abouturl_ascii));
85 ctk_dialog_new(&aboutdialog, 32, 9);
87 ctk_dialog_new(&aboutdialog, width - 2, 9);
95 CTK_WIDGET_SET_FLAG(&abouturl, CTK_WIDGET_FLAG_MONOSPACE);
107 ctk_dialog_open(&aboutdialog);
111 if(ev == PROCESS_EVENT_EXIT) {
115 if(data == (process_data_t)&aboutclose) {
#define CTK_WIDGET_ADD(win, widg)
Add a widget to a window.
process_event_t ctk_signal_button_activate
Same as ctk_signal_widget_activate.
#define CTK_WIDGET_FOCUS(win, widg)
Set focus to a widget.
#define PROCESS_EXIT()
Exit the currently running process.
#define PROCESS_BEGIN()
Define the beginning of a process.
unsigned char ctk_desktop_width(struct ctk_desktop *d)
Gets the width of the desktop.
#define NULL
The null pointer.
#define CTK_LABEL(x, y, w, h, text)
Instantiating macro for the ctk_label widget.
#define PROCESS_THREAD(name, ev, data)
Define the body of a process.
#define PROCESS_END()
Define the end of a process.
#define CTK_WIDGET_SET_XPOS(w, xpos)
Sets the x position of a widget, relative to the window in which the widget is contained.
PETSCII/ASCII conversion functions.
#define LOADER_UNLOAD()
Unload a program from memory.
process_event_t ctk_signal_hyperlink_activate
Emitted when a hyperlink is activated.
#define PROCESS_WAIT_EVENT()
Wait for an event to be posted to the process.
#define PROCESS(name, strname)
Declare a process.
#define CTK_BUTTON(x, y, w, text)
Instantiating macro for the ctk_button widget.
#define CTK_HYPERLINK(x, y, w, text, url)
Instantiating macro for the ctk_hyperlink widget.
Representation of a CTK window.
The generic CTK widget structure that contains all other widget structures.
void process_exit(struct process *p)
Cause a process to exit.