Main Page Modules Alphabetical List Compound List File List Compound Members File Members

# Constants and Data Types
[Core PicoGUI API]

## Compounds
struct | pgEvent
| Generic PicoGUI event structure. More...
struct | pgmemdata
| A structure representing data, loaded or mapped into memory. More...
## Defines
#define | PGBIND_ANY -1
| A wildcard value for pgBind().
#define | PGFONT_ANY 0
| A wildcard value for pgNewFont.
#define | PGDEFAULT 0
| Refer to the default widget handle.
#define | pgFraction(n, d) (((n)<<8)|(d))
| For forming fractions, such as the size when PG_SZMODE_CNTFRACT is used.
#define | PG_FILE_SAVEBTN (1<<0)
| Use a 'save' button instead of 'open'.
#define | PG_FILE_MUSTEXIST (1<<1)
| The chosen file must already exist.
#define | PG_FILE_MUSTWRITE (1<<2)
| The file must be writeable.
#define | PG_FILE_MUSTREAD (1<<3)
| The file must be readable.
#define | PG_FILE_SHOWDOT (1<<4)
| Show . and .. directories.
#define | PG_FILE_SHOWHIDDEN (1<<5)
| Show hidden files.
#define | PG_FILE_SHOWBAK (1<<6)
| Show editor backups.
#define | PG_FILE_SHOWDEV (1<<7)
| Show device nodes (dangerous).
#define | PG_FILE_FIELD (1<<8)
| The user can enter filenames in a field.
#define | PG_FILEOPEN PG_FILE_MUSTREAD
| Default flags for a file open dialog box.
#define | PG_FILESAVE (PG_FILE_SAVEBTN | PG_FILE_FIELD)
| Default flags for a file save dialog box.
#define | PG_MSGBTN_OK 0x0001
#define | PG_MSGBTN_CANCEL 0x0002
#define | PG_MSGBTN_YES 0x0004
#define | PG_MSGBTN_NO 0x0008
#define | PG_MSGICON_ERROR 0x0010
#define | PG_MSGICON_MESSAGE 0x0020
#define | PG_MSGICON_QUESTION 0x0040
#define | PG_MSGICON_WARNING 0x0080
#define | PG_MSGBTNMASK
#define | PG_MSGICONMASK
#define | PGMEMDAT_NEED_FREE 0x0001
| pgmemdata should be free()'d when done
#define | PGMEMDAT_NEED_UNMAP 0x0002
| pgmemdata should be munmap()'d when done
## Typedefs
typedef u32 | pgcolor
| RGB hardware-independant color.
typedef int(* | pgevthandler )(struct pgEvent *evt)
| The event handler used in pgBind.
typedef void(* | pgidlehandler )(void)
| The event handler for pgSetIdle.
typedef int(* | pgfilter )(const char *string, const char *pattern)
| Filter function for pgFilePicker().

## Detailed Description

pgEvent and other data structures and constants specific to the client. These values are interpreted in the client library, not the server.

## Define Documentation

#define PG_FILE_FIELD (1<<8)

| The user can enter filenames in a field.

#define PG_FILE_MUSTEXIST (1<<1)

| The chosen file must already exist.

#define PG_FILE_MUSTREAD (1<<3)

| The file must be readable.

#define PG_FILE_MUSTWRITE (1<<2)

| The file must be writeable.

#define PG_FILE_SAVEBTN (1<<0)

| Use a 'save' button instead of 'open'.

#define PG_FILE_SHOWBAK (1<<6)

| Show editor backups.

#define PG_FILE_SHOWDEV (1<<7)

| Show device nodes (dangerous).

#define PG_FILE_SHOWDOT (1<<4)

| Show . and .. directories.

#define PG_FILE_SHOWHIDDEN (1<<5)

| Show hidden files.

#define PG_FILEOPEN PG_FILE_MUSTREAD

| Default flags for a file open dialog box.

#define PG_FILESAVE (PG_FILE_SAVEBTN | PG_FILE_FIELD)

| Default flags for a file save dialog box.

#define PG_MSGBTN_CANCEL 0x0002

#define PG_MSGBTN_NO 0x0008

#define PG_MSGBTN_OK 0x0001

#define PG_MSGBTN_YES 0x0004

#define PG_MSGBTNMASK

| Value:
    (PG_MSGBTN_OK|PG_MSGBTN_CANCEL|\
                                 PG_MSGBTN_YES|PG_MSGBTN_NO)

#define PG_MSGICON_ERROR 0x0010

#define PG_MSGICON_MESSAGE 0x0020

#define PG_MSGICON_QUESTION 0x0040

#define PG_MSGICON_WARNING 0x0080

#define PG_MSGICONMASK

| Value:
    (PG_MSGICON_ERROR|PG_MSGICON_MESSAGE|\
                                 PG_MSGICON_QUESTION|PG_MSGICON_WARNING)

#define PGBIND_ANY -1

| A wildcard value for pgBind().

#define PGDEFAULT 0

| Refer to the default widget handle. A more verbose way of using the default widget or rship (widget relationship) in PicoGUI function calls. Just using 0 is perfectly acceptable, but this can make your code easier to read. PGDEFAULT can be used any time PicoGUI expects a widget handle, as sort of a pronoun referring to most recently created widget. (the "default widget") This includes the result of pgNewWidget calls, pgRegisterApp, and pgNewPopup. When PGDEFAULT (or zero) is used in place of the parent and widget relationship in pgNewWidget the new widget is placed after the default widget. The only exception to this is when the default widget is a root widget (created with pgRegisterApp or pgNewPopup) in which case the new widget is placed inside the default widget. See also: pgNewWidget, pgRegisterApp, pgNewPopup, pgSetWidget

#define PGFONT_ANY 0

| A wildcard value for pgNewFont.

#define pgFraction | ( | n,
|  | d |  | ) | (((n)<<8)|(d))

| For forming fractions, such as the size when PG_SZMODE_CNTFRACT is used.

#define PGMEMDAT_NEED_FREE 0x0001

| pgmemdata should be free()'d when done

#define PGMEMDAT_NEED_UNMAP 0x0002

| pgmemdata should be munmap()'d when done

## Typedef Documentation

typedef u32 pgcolor

| RGB hardware-independant color. The format is 24-bit RGB, similar to that used by HTML. The following are some example colors:
    #define BLACK   0x000000
    #define WHITE   0xFFFFFF
    #define GREY    0x808080
    #define RED     0xFF0000
    #define GREEN   0x00FF00
    #define BLUE    0x0000FF
    #define YELLOW  0xFFFF00
Video drivers may define other formats that are selected by setting a bit in the color's high byte. For example, in text-mode drivers, a high byte set to 0x20 would indicate a raw character code. Using the driver, the expression (0x20000F00 | 'A') would be a capital "A" with a white foreground and black background. These formats are video-driver dependant, and under normal circumstances the high byte should always be zero.

typedef int(* pgevthandler)(struct pgEvent *evt)

  | The event handler used in pgBind. Parameters:
  evt | The event that triggered this handler
Returns: Zero to continue on with other handlers, nonzero to abort further event processing

typedef int(* pgfilter)(const char *string,const char *pattern)

| Filter function for pgFilePicker().

typedef void(* pgidlehandler)(void)

| The event handler for pgSetIdle.