82 #define APP(NAME, ENV_PREFIX) appId##NAME,
83 #include "apps_config.H"
89 #define APP_INIT_OK ((void *) 1)
90 #define APP_INIT_FAIL NULL
131 static inline int Apps () {
return (
int) appIdEND; }
137 void *AppCall (EAppId appId,
int appOp,
void *data = NULL);
138 static inline void AppActivate (EAppId appId) { AppCall (appId,
appOpActivate); }
139 static inline void AppEscape () { AppActivate (appIdHome); }
140 bool AppEnabled (EAppId appId);
146 #define COL_APP_LABEL ToColor (0x60, 0x60, 0x60)
147 #define COL_APP_LABEL_LIVE WHITE
148 #define COL_APP_LABEL_BUSY LIGHT_RED
149 #define COL_APP_LABEL_ALARM ToColor (0xff, 0x40, 0x40)
153 #define APP_SET_LAUNCHER(BTN, ICON_NAME, TEXT, HOTKEY) \
154 ((CButton *) (BTN))->SetLabel (COL_APP_LABEL, ICON_NAME "-48", TEXT, fntAppLabel); \
155 ((CButton *) (BTN))->SetHotkey (HOTKEY);
162 #define APP_SET_LABEL(BTN, ICON_NAME, TEXT, COLOR) \
163 ((CButton *) (BTN))->SetLabel ((COLOR), ICON_NAME "-48", TEXT, fntAppLabel)
170 #define APP_SET_HOTKEY(BTN, HOTKEY) \
171 ((CButton *) (BTN))->SetHotkey (HOTKEY);
178 void CbAppActivate (
class CButton *,
bool,
void *appId);
179 void CbAppEscape (
class CButton *,
bool,
void *);
EAppOperation
Applet operations.
TTF_Font * fntAppLabel
Default font for launch buttons (read-only!).
void * FAppFunc(int appOp, void *data)
Prototype for applet entry functions. Example: void *AppPhoneFunc (int appOp, void *data)
@ appOpActivate
Activate the main screen (no arguments, return value ignored).
@ appOpUser
First user-defined operation.
@ appOpDone
Shutdown applet; Called on shutdown (not for disabled apps).