Contiki 3.x
|
The program handler, used for loading programs and starting the screensaver. More...
#include <string.h>
#include <stdlib.h>
#include "contiki.h"
#include "ctk/ctk.h"
#include "ctk/ctk-draw.h"
#include "sys/log.h"
#include "program-handler.h"
Go to the source code of this file.
Macros | |
#define | NUM_PNARGS 6 |
Initializes the program handler. More... | |
Functions | |
void | program_handler_add (struct dsc *dsc, char *menuname, unsigned char desktop) |
Add a program to the program handler. More... | |
void | program_handler_load (char *name, char *arg) |
Loads a program and displays a dialog telling the user about it. More... | |
The program handler, used for loading programs and starting the screensaver.
The Contiki program handler is responsible for the Contiki menu and the desktop icons, as well as for loading programs and displaying a dialog with a message telling which program that is loading.
The program handler also is responsible for starting the screensaver when the CTK detects that it should be started.
Definition in file program-handler.c.
#define NUM_PNARGS 6 |
Initializes the program handler.
Is called by the initialization before any programs have been added with program_handler_add().
Definition at line 184 of file program-handler.c.
void program_handler_add | ( | struct dsc * | dsc, |
char * | menuname, | ||
unsigned char | desktop | ||
) |
Add a program to the program handler.
dsc | The DSC description structure for the program to be added. |
menuname | The name that the program should have in the Contiki menu. |
desktop | Flag which specifies if the program should show up as an icon on the desktop or not. |
Definition at line 163 of file program-handler.c.
References CTK_ICON_ADD, and ctk_menuitem_add().
void program_handler_load | ( | char * | name, |
char * | arg | ||
) |
Loads a program and displays a dialog telling the user about it.
name | The name of the program to be loaded. |
arg | An argument which is passed to the new process when it is loaded. |
Definition at line 227 of file program-handler.c.
References ctk_label_set_text, NULL, and process_post().