Functions | |
| void | pgDelete (pghandle object) |
| Delete any object that has a handle. | |
| pghandle | pgDup (pghandle object) |
| Duplicate an object that has a handle. | |
| void | pgChangeContext (pghandle object, s16 delta) |
| Change the handle context of an object. | |
| void | pgFocus (pghandle widget) |
| Give a widget the keyboard focus. | |
| pghandle | pgRegisterApp (s16 type, const char *name,...) |
| Register a new application. | |
| pghandle | pgNewWidget (s16 type, s16 rship, pghandle parent) |
| Create a new widget, derived from a parent widget. | |
| pghandle | pgCreateWidget (s16 type) |
| Create a new widget without a parent. | |
| void | pgAttachWidget (pghandle parent, s16 rship, pghandle widget) |
| Attach a widget to a new parent. | |
| pghandle | pgTraverseWidget (pghandle widget, int direction, int count) |
| Finds a widget in relation to another widget. | |
| pghandle | pgNewPopup (int width, int height) |
| Create a popup box, centered on the screen. | |
| pghandle | pgNewCursor (void) |
| Create a cursor that can be used for input filters. | |
| pghandle | pgNewInFilter (pghandle insert_after, u32 accept_trigs, u32 absorb_trigs) |
| Create a new client-side input filter. | |
| void | pgInFilterSend (union pg_client_trigger *trig) |
| Send an event back from a client-side input filter. | |
| pghandle | pgNewPopupAt (int x, int y, int width, int height) |
| Create a popup box at the specified position. | |
| void | pgSetWidget (pghandle widget,...) |
| Set widget properties. | |
| s32 | pgGetWidget (pghandle widget, s16 property) |
| Get a widget property. | |
| pghandle | pgNewBitmap (struct pgmemdata obj) |
| Create a new bitmap object from existing data. | |
| pghandle | pgCreateBitmap (s16 width, s16 height) |
| Create a new bitmap object. | |
| pgshmbitmap * | pgMakeSHMBitmap (pghandle bitmap) |
| Map a bitmap into a shared memory segment. | |
| pghandle | pgNewString (const char *str) |
| Create a new string object. | |
| pghandle | pgNewArray (const s32 *dat, u16 size) |
| Create a new array object. | |
| char * | pgGetString (pghandle string) |
| Get the contents of a string handle. | |
| void | pgReplaceText (pghandle widget, const char *str) |
| Change a widget's text. | |
| void | pgReplaceTextFmt (pghandle widget, const char *fmt,...) |
| Change a widget's text, with formatting. | |
| pghandle | pgNewFont (const char *name, s16 size, u32 style) |
| Create a new font object. | |
| int | pgGetFontStyle (s16 index, char *name, u16 *size, u16 *fontrep, u32 *flags) |
| Get information about a font style. | |
| void | pgSizeText (int *w, int *h, pghandle font, pghandle text) |
| Measure a string of text. | |
| void | pgSizeBitmap (int *w, int *h, pghandle bitmap) |
| Return the size of a bitmap object. | |
| pghandle | pgLoadTheme (struct pgmemdata obj) |
| Load a compiled theme. | |
| pghandle | pgLoadWidgetTemplate (struct pgmemdata obj) |
| Load a compiled Widget Template. | |
| int | pgFindThemeObject (const char *key) |
| Find a theme object's ID given its name. | |
| pghandle | pgDataString (struct pgmemdata obj) |
| Load memory into a string handle. | |
| u32 | pgThemeLookup (s16 object, s16 property) |
| Retrieve a theme property. | |
| void | pgSetPayload (pghandle object, u32 payload) |
| Set an object's payload. | |
| u32 | pgGetPayload (pghandle object) |
| Get an object's payload. | |
| void | pgWriteData (pghandle widget, struct pgmemdata data) |
| Write data to a widget. | |
| void | pgWriteCmd (pghandle widget, s32 command, s16 numparams,...) |
| Write a command to a widget. | |
| void | pgRender (pghandle bitmap, s16 groptype,...) |
| Render a gropnode to a bitmap. | |
| pghandle | pgFindWidget (const char *key) |
| Search for a widget by its PG_WP_NAME property. | |
|
||||||||||||||||
|
Attach a widget to a new parent.
|
|
||||||||||||
|
Change the handle context of an object.
pgEnterContext(); pgDialogBox("My Dialog"); ... Allocate lots of memory ... pgChangeContext(important_data,-1); pgLeaveContext(); return important_data;
|
|
||||||||||||
|
Create a new bitmap object.
|
|
|
Create a new widget without a parent.
|
|
|
Load memory into a string handle.
|
|
|
Delete any object that has a handle.
object. |
|
|
Duplicate an object that has a handle.
|
|
|
Find a theme object's ID given its name.
custom are assigned an ID automatically at load time. These objects can be found with this function as long as each is assigned a unique name property.
|
|
|
Search for a widget by its PG_WP_NAME property.
|
|
|
Give a widget the keyboard focus.
|
|
||||||||||||||||||||||||
|
Get information about a font style.
char name[40]; u16 size; u16 fontrep; u32 flags; s16 i; i = 0; while (pgGetFontStyle(i++, name, &size, &fontrep, &flags)) { printf("Font #%d: %s\n" " size: %d\n" " fontrep: 0x%04X\n" " flags: 0x%08X\n\n", i,name,size,fontrep,flags); }
|
|
|
Get an object's payload.
|
|
|
Get the contents of a string handle.
|
|
||||||||||||
|
Get a widget property.
|
|
|
Send an event back from a client-side input filter.
|
|
|
Load a compiled theme.
themec utility. The theme can be unloaded by calling pgDelete with the returned theme handle.
|
|
|
Load a compiled Widget Template.
|
|
|
Map a bitmap into a shared memory segment.
|
|
||||||||||||
|
Create a new array object.
|
|
|
Create a new bitmap object from existing data.
|
|
|
Create a cursor that can be used for input filters.
|
|
||||||||||||||||
|
Create a new font object.
fDefault = pgNewFont(NULL,0,PG_FSTYLE_DEFAULT); // Find the font marked as default fBold = pgNewFont(NULL,0,PG_FSTYLE_DEFAULT | PG_FSTYLE_BOLD); // Bold version of the default font fBig = pgNewFont(NULL,40,PG_FSTYLE_ITALIC); // A large italic font fFlush = pgNewFont("Helvetica",0,PG_FSTYLE_FLUSH); // Helvetica at the default size, with no space at the edges
|
|
||||||||||||||||
|
Create a new client-side input filter.
|
|
||||||||||||
|
Create a popup box, centered on the screen.
width and/or height can be PGDEFAULT (zero) to determine the size automatically. This is preferred because the app should assume as little as possible about physical screen coordinates.NOTE: This function is now just a shortcut for creating a popup widget and setting its PG_WP_ABSOLUTEX, PG_WP_ABSOLUTEY, PG_WP_WIDTH, and PG_WP_HEIGHT properties
|
|
||||||||||||||||||||
|
Create a popup box at the specified position.
width and/or height can be PGDEFAULT (zero) to determine the size automatically. This is preferred because the app should assume as little as possible about physical screen coordinates.
NOTE: This function is now just a shortcut for creating a popup widget and setting its PG_WP_ABSOLUTEX, PG_WP_ABSOLUTEY, PG_WP_WIDTH, and PG_WP_HEIGHT properties
|
|
|
Create a new string object.
|
|
||||||||||||||||
|
Create a new widget, derived from a parent widget.
rship indicates where in the widget stacking order, relative to the parent, the new widget will be:
|
|
||||||||||||||||
|
Register a new application. < Send PG_NWE_PNTR_RAW from the specified widget |
|
||||||||||||||||
|
Render a gropnode to a bitmap.
|
|
||||||||||||
|
Change a widget's text.
It is the preferred way of setting or changing the text of a button, label, or other widget that takes a PG_WP_TEXT property.
|
|
||||||||||||||||
|
Change a widget's text, with formatting. This function is equivalent to pgReplaceText, with support for printf-style formatting
|
|
||||||||||||
|
Set an object's payload.
|
|
||||||||||||
|
Set widget properties.
widget, pgSetWidget accepts a list of property-value pairs terminated by a zero. For example:
pgSetWidget(wLabel, PG_WP_TEXT,pgNewString("Hello"), PG_WP_FONT,pgNewFont("Helvetica",12,0), 0);
|
|
||||||||||||||||
|
Return the size of a bitmap object.
|
|
||||||||||||||||||||
|
Measure a string of text.
*w and *h, returns the size in pixels of the given text in the given font. Font may be PGDEFAULT to use the default font.Note that if you use pgNewText to create a string object just for this function call, you should delete it afterwards to prevent a memory leak: pghandle sText; int w,h; sText = pgNewString("Hello, World!"); pgSizeText(&w,&h,PGDEFAULT,sText); pgDelete(sText); Alternatively, defining a context with pgEnterContext and pgLeaveContext will clean up the string object automatically: pgEnterContext(); pgSizeText(&w,&h,PGDEFAULT,pgNewString("Hello, World!"); pgLeaveContext();
|
|
||||||||||||
|
Retrieve a theme property.
|
|
||||||||||||||||
|
Finds a widget in relation to another widget.
direction at this time:
|
|
||||||||||||||||||||
|
Write a command to a widget.
|
|
||||||||||||
|
Write data to a widget.
|
1.3-rc3