General functions for configuring the GUI.
More...
|
char * | gslc_GetVer (gslc_tsGui *pGui) |
| Get the GUIslice version number. More...
|
|
const char * | gslc_GetNameDisp (gslc_tsGui *pGui) |
| Get the GUIslice display driver name. More...
|
|
const char * | gslc_GetNameTouch (gslc_tsGui *pGui) |
| Get the GUIslice touch driver name. More...
|
|
void * | gslc_GetDriverDisp (gslc_tsGui *pGui) |
| Get the native display driver instance. More...
|
|
void * | gslc_GetDriverTouch (gslc_tsGui *pGui) |
| Get the native touch driver instance. More...
|
|
bool | gslc_Init (gslc_tsGui *pGui, void *pvDriver, gslc_tsPage *asPage, uint8_t nMaxPage, gslc_tsFont *asFont, uint8_t nMaxFont) |
| Initialize the GUIslice library. More...
|
|
void | gslc_InitDebug (GSLC_CB_DEBUG_OUT pfunc) |
| Initialize debug output. More...
|
|
void | gslc_DebugPrintf (const char *pFmt,...) |
| Optimized printf routine for GUIslice debug/error output. More...
|
|
bool | gslc_GuiRotate (gslc_tsGui *pGui, uint8_t nRotation) |
| Dynamically change rotation, automatically adapt touchscreen axes swap/flip. More...
|
|
void | gslc_Quit (gslc_tsGui *pGui) |
| Exit the GUIslice environment. More...
|
|
void | gslc_Update (gslc_tsGui *pGui) |
| Perform main GUIslice handling functions. More...
|
|
bool | gslc_SetBkgndImage (gslc_tsGui *pGui, gslc_tsImgRef sImgRef) |
| Configure the background to use a bitmap image. More...
|
|
bool | gslc_SetBkgndColor (gslc_tsGui *pGui, gslc_tsColor nCol) |
| Configure the background to use a solid color. More...
|
|
bool | gslc_SetTransparentColor (gslc_tsGui *pGui, gslc_tsColor nCol) |
| Configure the color to use for image transparency. More...
|
|
gslc_tsRect | gslc_GetClipRect (gslc_tsGui *pGui) |
| Get the current the clipping rectangle. More...
|
|
bool | gslc_SetClipRect (gslc_tsGui *pGui, gslc_tsRect *pRect) |
| Set the clipping rectangle for further drawing. More...
|
|
General functions for configuring the GUI.
void gslc_DebugPrintf |
( |
const char * |
pFmt, |
|
|
|
... |
|
) |
| |
Optimized printf routine for GUIslice debug/error output.
- Only supports 's','d','u' tokens
- Calls on the output function configured in gslc_InitDebug()
- Parameters
-
[in] | pFmt | Format string to use for printing |
[in] | ... | Variable parameter list |
- Returns
- none
Get the current the clipping rectangle.
- Parameters
-
- Returns
- rect for active clipping region
Get the native display driver instance.
- This can be useful to access special commands available in the selected driver.
- Parameters
-
- Returns
- Void pointer to the display driver instance. This pointer should be typecast to the particular driver being used. If no driver was created then this function will return NULL.
Get the native touch driver instance.
- This can be useful to access special commands available in the selected driver.
- Parameters
-
- Returns
- Void pointer to the touch driver instance. This pointer should be typecast to the particular driver being used. If no driver was created then this function will return NULL.
Get the GUIslice display driver name.
- Parameters
-
- Returns
- String containing driver name
const char* gslc_GetNameTouch |
( |
gslc_tsGui * |
pGui | ) |
|
Get the GUIslice touch driver name.
- Parameters
-
- Returns
- String containing driver name
Get the GUIslice version number.
- Parameters
-
- Returns
- String containing version number
bool gslc_GuiRotate |
( |
gslc_tsGui * |
pGui, |
|
|
uint8_t |
nRotation |
|
) |
| |
Dynamically change rotation, automatically adapt touchscreen axes swap/flip.
The function assumes that the touchscreen settings for swap and flip in the GUIslice config are valid for the configured GSLC_ROTATE.
- Parameters
-
[in] | pGui | Pointer to GUI |
[in] | nRotation | Screen Rotation value (0, 1, 2 or 3) |
- Returns
- true if success, false otherwise
Initialize the GUIslice library.
- Configures the primary screen surface(s)
- Initializes font support
PRE:
- The environment variables should be configured before calling gslc_Init().
- Parameters
-
[in] | pGui | Pointer to GUI |
[in] | pvDriver | Void pointer to Driver struct (gslc_tsDriver*) |
[in] | asPage | Pointer to Page array |
[in] | nMaxPage | Size of Page array |
[in] | asFont | Pointer to Font array |
[in] | nMaxFont | Size of Font array |
- Returns
- true if success, false if fail
Initialize debug output.
- Defines the user function used for debug/error output
- pfunc is responsible for outputing a single character
- For Arduino, this user function would typically call Serial.print()
- Parameters
-
[in] | pfunc | Pointer to user character-out function |
- Returns
- none
Exit the GUIslice environment.
- Calls lower-level destructors to clean up any initialized subsystems and deletes any created elements or fonts
- Parameters
-
- Returns
- None
Configure the background to use a solid color.
- The background is used when redrawing the entire page
- Parameters
-
[in] | pGui | Pointer to GUI |
[in] | nCol | RGB Color to use |
- Returns
- true if success, false if fail
Configure the background to use a bitmap image.
- The background is used when redrawing the entire page
- Parameters
-
[in] | pGui | Pointer to GUI |
[in] | sImgRef | Image reference |
- Returns
- true if success, false if fail
Set the clipping rectangle for further drawing.
- Parameters
-
[in] | pGui | Pointer to GUI |
[in] | pRect | Pointer to Rect for clipping (or NULL for entire screen) |
- Returns
- true if success, false if error
Configure the color to use for image transparency.
- Drawing a BMP with transparency enabled will cause regions in this specific color to appear transparent
- This API overrides the config option GSLC_BMP_TRANS_RGB
- Parameters
-
[in] | pGui | Pointer to GUI |
[in] | nCol | RGB Color to use |
- Returns
- true if success, false if fail
Perform main GUIslice handling functions.
- Handles any touch events
- Performs any necessary screen redraw
- Parameters
-
- Returns
- None