http://www.w3.org/TR/html4/loose.dtd">
|
StdGUI Startup Function |
|
void *start_gui(char *p_appname, int p_args, char *p_arg[], int p_flags, int p_mode, ...); |
|
The start_gui() function initializes the GUI system, doing any setup tasks that are necessary for the host platform. The parameters to start_gui() are the application name in p_appname, the program command line parameters in p_args (more commonly called argc in C parlance) and p_arg (called argv in C parlance), application flags in p_flags (the only current flag is CTX_THREADED which causes each event to be handled in a seprate thread) and a series of callback definitions (where p_mode = DEF_CB, a name for the callback and the callback function) property settings (p_mode = SET_PROP, the property name, value count and property values) and user data definitions (p_mode = SET_USER_DATA, the data item name and a pointer to the data item) terminated by a p_mode value of DONE. |
|
The start_gui() function examines the command line paraters passed in via p_arg and p_args and parses specific parameters if it finds them: The −−guilogevents parameter allows the caller to specify which event callback routines should be allowed to generate log messages. The argument to −−guilogevents is a comma or plus separated list of event specifiers from the following list: all, none, redraw, resize, close, mousedown, mouseup, mousemove, keydown, keyup, keyrepeat, focus, blur, timer, user, system, input, synthetic( or synth), mouse, keys or window. The −−guilog parameter allows different levels of logging, from only error messages (the default) to all variable value changes. The −−guilog parameter takes a single value which indicates which log level to use, the possible values are: errors, control, values, all or none. On the X11 targeted version of StdGUI the −d parameter can be used to specify the X11 display name. |
|
All three routines return zero (0) on success, non-zero on failure. |
|
The start_gui() function consults the following environment variables: |
|
DISPLAY |
|
The name of the X11 display (only on X11 targeted versions of StdGUI) |
|
GUI_SYS_FONT |
|
The name of the system font (used for menus, buttons, labels, etc.), the font is specified in the format: size:style:family |
|
GUI_APP_FONT |
|
The name of the application font, the font is specified with the same format used for the GUI_APP_FONT variable. |
|
GUI_SYS_WIDGETS |
|
The directory that contains the base widget set for this installation of the StdGUI library. The files in this directory should be loadable widget class modules compiled specifically for use with StdGUI. |
|
GUI_USR_WIDGETS |
|
The directory that contains auxiliary widgets defined by the current user. Again, the files in this directory should be loadable widget class modules compiled specifically for use with StdGUI. |
|
Jeffrey Dutky |