GUI Function Summary
The GUI Function Glossary provides detailed descriptions of all of the library routines that comprise the QVGA Controller's GUI Toolkit. These GUI library routines are defined and declared in a kernel extension you can download from the Mosaic kernel extension manager and install on your QVGA Controller.
This document presents a subject ordered list of the GUI Toolkit's functions. In most browsers, if you click on the name of the function, a popup box containing its glossary definition will appear. You can of course find the complete definitions for all the functions listed in alphabetic order in the GUI Function Glossary.
Interpreting glossary definitions
Each entry in the GUI Function Glossary includes the following elements:
A declaration of the routine. If it is a constant or a macro that does not require any arguments, then the name of the routine is simply presented. If it is a function, or a macro that behaves like a function, then the declaration looks like an ANSI-C function prototype, such as:
void Emit(uchar c)''
where
void
tells us that there is no return value, anduchar c
tells us that there is a single input parameter that is an unsigned character.Declarations are provided for both the C (denoted
C:
) and Forth (denoted4th:
) languages.- A detailed definition of what the routine does.
- Examples of usage in the C and Forth languages.
Type abbreviations used in function declarations
Standard type specifiers such as char, int, long, and float are used in the glossary declarations. In addition, we use six convenient typedefs that are defined in the TYPES.h
header file:
typedef unsigned char | uchar; |
typedef unsigned int | uint; |
typedef unsigned long | ulong; |
typedef unsigned long | xaddr; |
typedef int | wchar; |
typedef unsigned int | uwchar; |
The meanings of the first three typedefs are obvious; they are abbreviations for unsigned types. The xaddr typedef means extended address, and is used when a 32-bit address parameter is passed. The wchar and uwchar stand for wide-char and unsigned wide-char. These types must be used when passing char types to any libraries or kernel functions.
Categorized list of QVGA GUI Toolkit functions
The GUI Function Glossary presents definitions of all of the functions, constants and macros that are defined and declared in the GUI Toolkit kernel extension. For convenience in finding useful functions, they are organized into the following subject sorted tables:
Object types
These constants representing object types are passed to New_Object() to create new objects:
BUTTON | FONT | GRAPHIC |
PLOT | TEXTBOX |
Pre-instantiated objects
The GUI Toolkit contains the following pre-instantiated objects for your use:
GUI_BUZZER | GUI_DISPLAY | GUI_FONT |
GUI_PEN | GUI_SCREEN0 | GUI_SCREEN1 |
GUI_SCREEN2 | GUI_SCREEN3 | GUI_SCREEN4 |
GUI_SCREEN5 | GUI_TOOLKIT | GUI_TOUCHSCREEN |
GUI methods
Add_Data() | Buzz() | Calibrate() |
Clear() | Clear_Error() | Draw() |
Get_Property() | Initialize_GUI() | Load() |
New_Object() | Read_Error() | Redraw() |
Refresh() | Service_GUI_Events() | Set_Property() |
STRING_TO_TEXTBOX() | Textbox_To_String() | Un_Load() |
Errors
The following constants represent errors that may be returned by GUI methods. They are returned by the method Read_Error().
BUFFER_SIZE_OUT_OF_RANGE | COLUMN_OUT_OF_RANGE | DATA_OUT_OF_RANGE |
DISPLAY_INITIALIZATION_FAILURE | FLASH_NOT_PROGRAMMABLE | GUI_EXISTS |
HEAP_FULL | HEIGHT_OUT_OF_RANGE | INVALID_FONT |
INVALID_GRAPHIC | INVALID_IMAGE | INVALID_OBJECT |
INVALID_PLOT | INVALID_PROPERTY | INVALID_SCREEN |
INVALID_TEXTBOX | NO_ERROR | ROW_OUT_OF_RANGE |
STRING_LENGTH_OUT_OF_RANGE | WIDTH_OUT_OF_RANGE | X_OUT_OF_RANGE |
Y_OUT_OF_RANGE |
Properties
GUI objects are modified by setting their properties. The following tables show the properties of each of the GUI objects as named constants. You can send a property to an object using the method Set_Property(), and read it using Get_Property().
GUI_TOOLKIT properties
ABORT_ON_ERROR | AVAILABLE_HEAP_SPACE | HORIZONTAL_SNAP_TO_GRID |
SERVICE_EVENTS | STANDARD_FONT | VERTICAL_SNAP_TO_GRID |
GUI_DISPLAY properties
GUI Screens properties
GUI_TOUCHSCREEN properties
CAL_COORDS | LAST_EVENT | RAW_COORDS |
The following touchscreen event constants may be read from the LAST_EVENT property:
HELD_EVENT | NO_EVENT | PRESS_EVENT |
RELEASE_EVENT |
GUI_PEN properties
GUI_BUZZER properties
Graphic properties
Font properties
Textbox properties
Button properties
BEEP_ON_PRESS | BEEP_ON_RELEASE | BEEP_ON_HOLD |
BLOCK_ON_HOLD | BUTTON_TEXTBOX | DRAW_GRAPHIC |
HEIGHT_IN_PIXELS | HELD_EVENT_PROCEDURE | PRESS_EVENT_PROCEDURE |
PRESS_GRAPHIC | RELEASE_EVENT_PROCEDURE | RELEASE_GRAPHIC |
WIDTH_IN_PIXELS |