Functions | |
| void | pgInit (int argc, char **argv) |
| Initialize PicoGUI. | |
| void | pgSetErrorHandler (void(*handler)(u16 errortype, const char *msg)) |
| Replace the default error handler. | |
| pghandle | pgLoadDriver (const char *name) |
| Load an input driver by name and return a handle. | |
| const char * | pgErrortypeString (u16 errortype) |
| Convert a numerical errortype to a string. | |
| pgidlehandler | pgSetIdle (s32 t, pgidlehandler handler) |
| Set a handler to be called periodically. | |
| void | pgFlushRequests (void) |
| Flush all unsent request packets to the server. | |
| void | pgUpdate (void) |
| Update the screen. | |
| void | pgSubUpdate (pghandle widget) |
| Update a subsection of the screen. | |
| void | pgBind (pghandle widgetkey, s16 eventkey, pgevthandler handler, void *extra) |
| Attatch an event handler to a widget and/or event. | |
| void | pgRegisterOwner (int resource) |
| Register exclusive access to a resouce. | |
| void | pgUnregisterOwner (int resource) |
| Unregister exclusive access to a resouce. | |
| void | pgSetVideoMode (u16 xres, u16 yres, u16 bpp, u16 flagmode, u32 flags) |
| Change video mode at runtime. | |
| pgmodeinfo * | pgGetVideoMode (void) |
| Get information about the current video mode. | |
| void | pgDriverMessage (u32 message, u32 param) |
| Send a message to the drivers. | |
| void | pgAppMessage (pghandle dest, struct pgmemdata data) |
| Send a message to a widget owned by any application. | |
| void * | pgSyncAppMessage (pghandle dest, struct pgmemdata data) |
| Send a message to a widget owned by any application, and wait for an answer. | |
| pghandle | pgEvalRequest (s16 reqtype, void *data, u32 datasize) |
| Evaluate a PicoGUI request packet. | |
| void | pgSetInactivity (u32 time) |
| Set the inactivity timer. | |
| u32 | pgGetInactivity (void) |
| Get the inactivity timer. | |
| pghandle | pgGetServerRes (u32 id) |
| Get a server resource. | |
|
||||||||||||
|
Send a message to a widget owned by any application.
data parameter is sent as the data in a PG_WE_APPMSG event on behalf of the dest widget. |
|
||||||||||||||||||||
|
Attatch an event handler to a widget and/or event.
|
|
||||||||||||
|
Send a message to the drivers.
|
|
|
Convert a numerical errortype to a string.
|
|
||||||||||||||||
|
Evaluate a PicoGUI request packet.
The format of the data accepted by the request packet depends on the type of packet. |
|
|
Flush all unsent request packets to the server. Usually this is handled automatically, but it is needed in some situations. For example, a remote input driver that has no real event loop, but needs to send keyboard or mouse events. The events would not actually be sent to the server until pgFlushRequests is called.
|
|
|
Get the inactivity timer.
|
|
|
Get a server resource.
|
|
|
Get information about the current video mode.
struct pgmodeinfo mi; mi = *pgGetVideoMode();
|
|
||||||||||||
|
Initialize PicoGUI. See if there are any command line args relevant to PicoGUI (such as for setting the PicoGUI server) and establish a connection to the server. This must be the first PicoGUI call in the client, and it should almost certainly be called before and command line processing. pgInit processes command line arguments beginning with "--pg" and removes them from the argument list and terminates argv[] with a NULL. This is compatible with optarg and probably other argument-processing systems. Currently the following arguments are handled:
Unrecognized commands beginning with "--pg" display a list of available commands. If it is unable to contact the server, a client error is triggered. The client does not need to explicitly disconnect from the PicoGUI server
|
|
|
Load an input driver by name and return a handle.
|
|
|
Register exclusive access to a resouce.
|
|
|
Replace the default error handler.
The default error handler displays a message dialog allowing the user to optionally terminate the program. If it is unable to display the message dialog, the error is printed to stderr and the program is terminated.
|
|
||||||||||||
|
Set a handler to be called periodically.
|
|
|
Set the inactivity timer.
|
|
||||||||||||||||||||||||
|
Change video mode at runtime.
xres, yres, and bpp can be zero to keep the current values.
|
|
|
Update a subsection of the screen. The given widget and all other widgets contained within it are redrawn if necessary. The request buffer is flushed and the section is redrawn independantly and immediately. This function is recommended for animation. Areas of the screen other than the specified widget and its children are never updated, and SubUpdates can occur in toolbars even while a popup dialog is onscreen.
|
|
||||||||||||
|
Send a message to a widget owned by any application, and wait for an answer.
data parameter is sent as the data in a PG_WE_APPMSG event on behalf of the dest widget.
This call acts very similarly to
NOTE: The data is assumed to be a structure whose very first field is of type |
|
|
Unregister exclusive access to a resouce.
|
|
|
Update the screen. Redraw portions of the screen if necessary. This forces all unsent packets to be flushed to the server, and instructs the server to draw changed areas of the screen. If your application is pgEventLoop (or pgGetEvent) based, this is handled automatically. The server always updates the screen before waiting for user interaction. For doing animation, consider using pgSubUpdate instead.
|
1.3-rc3