GUIslice  0.16.0
Embedded GUI in C
GUIslice_drv_adagfx.h
Go to the documentation of this file.
1 #ifndef _GUISLICE_DRV_ADAGFX_H_
2 #define _GUISLICE_DRV_ADAGFX_H_
3 
4 // =======================================================================
5 // GUIslice library (driver layer for Adafruit-GFX)
6 // - Calvin Hass
7 // - https://www.impulseadventure.com/elec/guislice-gui.html
8 // - https://github.com/ImpulseAdventure/GUIslice
9 // =======================================================================
10 //
11 // The MIT License
12 //
13 // Copyright 2016-2020 Calvin Hass
14 //
15 // Permission is hereby granted, free of charge, to any person obtaining a copy
16 // of this software and associated documentation files (the "Software"), to deal
17 // in the Software without restriction, including without limitation the rights
18 // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
19 // copies of the Software, and to permit persons to whom the Software is
20 // furnished to do so, subject to the following conditions:
21 //
22 // The above copyright notice and this permission notice shall be included in
23 // all copies or substantial portions of the Software.
24 //
25 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
26 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
27 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
28 // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
29 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
30 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
31 // THE SOFTWARE.
32 //
33 // =======================================================================
36 
37 
38 // =======================================================================
39 // Driver Layer for Adafruit-GFX
40 // =======================================================================
41 
42 #ifdef __cplusplus
43 extern "C" {
44 #endif // __cplusplus
45 
46 #include "GUIslice.h"
47 
48 #include <stdio.h>
49 
50 
51 // Determine characteristics for configured touch driver
52 // - DRV_TOUCH_TYPE_EXTERNAL: TDrv* external touch APIs are enabled
53 // - DRV_TOUCH_TYPE_RES: Resistive overlay
54 // - DRV_TOUCH_TYPE_CAP: Capacitive overlay
55 // - DRV_TOUCH_TYPE_ANALOG: Analog input
56 #if defined(DRV_TOUCH_ADA_STMPE610)
57  #define DRV_TOUCH_TYPE_EXTERNAL
58  #define DRV_TOUCH_TYPE_RES // Resistive
59 #elif defined(DRV_TOUCH_ADA_FT6206)
60  #define DRV_TOUCH_TYPE_EXTERNAL
61  #define DRV_TOUCH_TYPE_CAP // Capacitive
62 #elif defined(DRV_TOUCH_ADA_FT5206)
63  #define DRV_TOUCH_TYPE_EXTERNAL
64  #define DRV_TOUCH_TYPE_CAP // Capacitive
65 #elif defined(DRV_TOUCH_ADA_SIMPLE)
66  #define DRV_TOUCH_TYPE_EXTERNAL
67  #define DRV_TOUCH_TYPE_RES // Resistive
68  #define DRV_TOUCH_TYPE_ANALOG // Analog
69 #elif defined(DRV_TOUCH_ADA_RA8875)
70  #define DRV_TOUCH_TYPE_EXTERNAL
71  #define DRV_TOUCH_TYPE_RES // Resistive
72 #elif defined(DRV_TOUCH_ADA_RA8875_SUMO)
73  #define DRV_TOUCH_TYPE_EXTERNAL
74  #define DRV_TOUCH_TYPE_RES // Resistive
75 #elif defined(DRV_TOUCH_XPT2046_STM)
76  #define DRV_TOUCH_TYPE_EXTERNAL
77  #define DRV_TOUCH_TYPE_RES // Resistive
78 #elif defined(DRV_TOUCH_XPT2046_PS)
79  #define DRV_TOUCH_TYPE_EXTERNAL
80  #define DRV_TOUCH_TYPE_RES // Resistive
81 #elif defined(DRV_TOUCH_URTOUCH)
82  #define DRV_TOUCH_TYPE_EXTERNAL
83  // Don't set DRV_TOUCH_TYPE_RES since URTouch provides its own calibration
84  //#define DRV_TOUCH_TYPE_RES // Resistive
85 #elif defined(DRV_TOUCH_INPUT)
86  #define DRV_TOUCH_TYPE_EXTERNAL
87 #elif defined(DRV_TOUCH_HANDLER)
88  #define DRV_TOUCH_TYPE_EXTERNAL
89 #elif defined(DRV_TOUCH_NONE)
90 #endif // DRV_TOUCH_*
91 
92 // Determine if calibration required
93 // - Enable for resistive displays
94 // - User config can also enable for capacitive displays by adding:
95 // #define DRV_TOUCH_CALIB
96 #if defined(DRV_TOUCH_TYPE_RES)
97  #define DRV_TOUCH_CALIB
98 #endif
99 
100 #if defined(DRV_TOUCH_CALIB)
101  // Ensure calibration settings are present in the config file
102  #if !defined(ADATOUCH_X_MIN)
103  // We didn't locate the calibration settings, so provide some
104  // temporary defaults. This typically only occurs if user has
105  // decided to force calibration on a capacitive display by
106  // adding DRV_TOUCH_CALIB, but hasn't yet added the calibration
107  // settings (ADATOUCH_X/Y_MIN/MAX) from the calibration sketch yet.
108  #warning Calibration settings (ADATOUCH_X/Y_MIN/MAX) need to be added to config. Using defaults.
109  #define ADATOUCH_X_MIN 0
110  #define ADATOUCH_X_MAX 4000
111  #define ADATOUCH_Y_MIN 0
112  #define ADATOUCH_Y_MAX 4000
113  #define ADATOUCH_REMAP_YX 0
114  #endif // ADATOUCH_X_MIN
115 #endif // DRV_TOUCH_CALIB
116 
117 // =======================================================================
118 // API support definitions
119 // - These defines indicate whether the driver includes optimized
120 // support for various APIs. If a define is set to 0, then the
121 // GUIslice core emulation will be used instead.
122 // - At the very minimum, the point draw routine must be available:
123 // gslc_DrvDrawPoint()
124 // =======================================================================
125 
126 #define DRV_HAS_DRAW_POINT 1
127 
128 #define DRV_HAS_DRAW_POINTS 0
129 #define DRV_HAS_DRAW_LINE 1
130 #define DRV_HAS_DRAW_RECT_FRAME 1
131 #define DRV_HAS_DRAW_RECT_FILL 1
132 #define DRV_HAS_DRAW_RECT_ROUND_FRAME 1
133 #define DRV_HAS_DRAW_RECT_ROUND_FILL 1
134 #define DRV_HAS_DRAW_CIRCLE_FRAME 1
135 #define DRV_HAS_DRAW_CIRCLE_FILL 1
136 #define DRV_HAS_DRAW_TRI_FRAME 1
137 #define DRV_HAS_DRAW_TRI_FILL 1
138 #define DRV_HAS_DRAW_TEXT 1
139 #define DRV_HAS_DRAW_BMP_MEM 0
140 
141 #define DRV_OVERRIDE_TXT_ALIGN 0
142 
143 
144 // -----------------------------------------------------------------------
145 // Driver-specific overrides
146 // - Some drivers have exceptions to the above support configuration
147 // -----------------------------------------------------------------------
148 #if defined(DRV_DISP_WAVESHARE_ILI9486)
149  #undef DRV_HAS_DRAW_RECT_ROUND_FRAME
150  #undef DRV_HAS_DRAW_RECT_ROUND_FILL
151  #undef DRV_HAS_DRAW_TRI_FRAME
152  #undef DRV_HAS_DRAW_TRI_FILL
153 
154  #define DRV_HAS_DRAW_RECT_ROUND_FRAME 0
155  #define DRV_HAS_DRAW_RECT_ROUND_FILL 0
156  #define DRV_HAS_DRAW_TRI_FRAME 0
157  #define DRV_HAS_DRAW_TRI_FILL 0
158 
159 #elif defined(DRV_DISP_LCDGFX)
160  #undef DRV_HAS_DRAW_RECT_ROUND_FRAME
161  #undef DRV_HAS_DRAW_RECT_ROUND_FILL
162  #undef DRV_HAS_DRAW_CIRCLE_FRAME
163  #undef DRV_HAS_DRAW_CIRCLE_FILL
164  #undef DRV_HAS_DRAW_TRI_FRAME
165  #undef DRV_HAS_DRAW_TRI_FILL
166 
167  #define DRV_HAS_DRAW_RECT_ROUND_FRAME 0
168  #define DRV_HAS_DRAW_RECT_ROUND_FILL 0
169  #define DRV_HAS_DRAW_CIRCLE_FRAME 0
170  #define DRV_HAS_DRAW_CIRCLE_FILL 0
171  #define DRV_HAS_DRAW_TRI_FRAME 0
172  #define DRV_HAS_DRAW_TRI_FILL 0
173 
174 #elif defined(DRV_DISP_ADAGFX_RA8876)
175  #undef DRV_HAS_DRAW_RECT_ROUND_FRAME
176  #undef DRV_HAS_DRAW_RECT_ROUND_FILL
177 
178  #define DRV_HAS_DRAW_RECT_ROUND_FRAME 0
179  #define DRV_HAS_DRAW_RECT_ROUND_FILL 0
180 
181 #elif defined(DRV_DISP_ADAGFX_RA8876_GV)
182  #undef DRV_HAS_DRAW_RECT_ROUND_FRAME
183  #undef DRV_HAS_DRAW_RECT_ROUND_FILL
184 
185  #define DRV_HAS_DRAW_RECT_ROUND_FRAME 0
186  #define DRV_HAS_DRAW_RECT_ROUND_FILL 0
187 
188 
189 #elif defined(DRV_DISP_ADAGFX_ILI9341)
190  // BLIT support in library
191  #undef DRV_HAS_DRAW_BMP_MEM
192  #define DRV_HAS_DRAW_BMP_MEM 1
193 #endif
194 
195 
196 // =======================================================================
197 // Driver-specific members
198 // =======================================================================
199 typedef struct {
201 
203 
204 } gslc_tsDriver;
205 
206 
207 
208 // =======================================================================
209 // Public APIs to GUIslice core library
210 // - These functions define the renderer / driver-dependent
211 // implementations for the core drawing operations within
212 // GUIslice.
213 // =======================================================================
214 
215 
216 // -----------------------------------------------------------------------
217 // Configuration Functions
218 // -----------------------------------------------------------------------
219 
236 bool gslc_DrvInit(gslc_tsGui* pGui);
237 
238 
248 bool gslc_DrvInitTs(gslc_tsGui* pGui,const char* acDev);
249 
250 
259 void gslc_DrvDestruct(gslc_tsGui* pGui);
260 
261 
269 const char* gslc_DrvGetNameDisp(gslc_tsGui* pGui);
270 
271 
279 const char* gslc_DrvGetNameTouch(gslc_tsGui* pGui);
280 
293 void* gslc_DrvGetDriverDisp(gslc_tsGui* pGui);
294 
308 
309 // -----------------------------------------------------------------------
310 // Image/surface handling Functions
311 // -----------------------------------------------------------------------
312 
313 
324 void* gslc_DrvLoadImage(gslc_tsGui* pGui,gslc_tsImgRef sImgRef);
325 
326 
337 
348 
359 
370 
371 
379 void gslc_DrvImageDestruct(void* pvImg);
380 
381 
390 bool gslc_DrvSetClipRect(gslc_tsGui* pGui,gslc_tsRect* pRect);
391 
392 
393 // -----------------------------------------------------------------------
394 // Font handling Functions
395 // -----------------------------------------------------------------------
396 
406 const void* gslc_DrvFontAdd(gslc_teFontRefType eFontRefType,const void* pvFontRef,uint16_t nFontSz);
407 
416 
417 
432 bool gslc_DrvGetTxtSize(gslc_tsGui* pGui,gslc_tsFont* pFont,const char* pStr,gslc_teTxtFlags eTxtFlags,
433  int16_t* pnTxtX,int16_t* pnTxtY,uint16_t* pnTxtSzW,uint16_t* pnTxtSzH);
434 
435 
450 bool gslc_DrvDrawTxt(gslc_tsGui* pGui,int16_t nTxtX,int16_t nTxtY,gslc_tsFont* pFont,const char* pStr,gslc_teTxtFlags eTxtFlags,gslc_tsColor colTxt,gslc_tsColor colBg);
451 
452 
453 // -----------------------------------------------------------------------
454 // Screen Management Functions
455 // -----------------------------------------------------------------------
456 
465 void gslc_DrvPageFlipNow(gslc_tsGui* pGui);
466 
467 
468 // -----------------------------------------------------------------------
469 // Graphics Primitives Functions
470 // -----------------------------------------------------------------------
471 
482 bool gslc_DrvDrawPoint(gslc_tsGui* pGui,int16_t nX,int16_t nY,gslc_tsColor nCol);
483 
494 bool gslc_DrvDrawPoints(gslc_tsGui* pGui,gslc_tsPt* asPt,uint16_t nNumPt,gslc_tsColor nCol);
495 
506 
507 
518 
519 
530 bool gslc_DrvDrawFrameRoundRect(gslc_tsGui* pGui,gslc_tsRect rRect,int16_t nRadius,gslc_tsColor nCol);
531 
532 
543 bool gslc_DrvDrawFillRoundRect(gslc_tsGui* pGui,gslc_tsRect rRect,int16_t nRadius,gslc_tsColor nCol);
544 
545 
546 
559 bool gslc_DrvDrawLine(gslc_tsGui* pGui,int16_t nX0,int16_t nY0,int16_t nX1,int16_t nY1,gslc_tsColor nCol);
560 
561 
573 bool gslc_DrvDrawFrameCircle(gslc_tsGui* pGui,int16_t nMidX,int16_t nMidY,uint16_t nRadius,gslc_tsColor nCol);
574 
575 
587 bool gslc_DrvDrawFillCircle(gslc_tsGui* pGui,int16_t nMidX,int16_t nMidY,uint16_t nRadius,gslc_tsColor nCol);
588 
589 
604 bool gslc_DrvDrawFrameTriangle(gslc_tsGui* pGui,int16_t nX0,int16_t nY0,
605  int16_t nX1,int16_t nY1,int16_t nX2,int16_t nY2,gslc_tsColor nCol);
606 
607 
622 bool gslc_DrvDrawFillTriangle(gslc_tsGui* pGui,int16_t nX0,int16_t nY0,
623  int16_t nX1,int16_t nY1,int16_t nX2,int16_t nY2,gslc_tsColor nCol);
624 
625 
636 bool gslc_DrvDrawImage(gslc_tsGui* pGui,int16_t nDstX,int16_t nDstY,gslc_tsImgRef sImgRef);
637 
638 
652 void gslc_DrvDrawMonoFromMem(gslc_tsGui* pGui,int16_t nDstX, int16_t nDstY, const unsigned char *pBitmap,bool bProgMem);
653 
654 
671 void gslc_DrvDrawBmp24FromMem(gslc_tsGui* pGui,int16_t nDstX, int16_t nDstY,const unsigned char* pBitmap,bool bProgMem);
672 
683 void gslc_DrvDrawBmp24FromSD(gslc_tsGui* pGui,const char *filename, uint16_t x, uint16_t y);
684 
692 void gslc_DrvDrawBkgnd(gslc_tsGui* pGui);
693 
694 
695 // -----------------------------------------------------------------------
696 // Touch Functions (if using display driver library)
697 // -----------------------------------------------------------------------
698 
708 bool gslc_DrvInitTouch(gslc_tsGui* pGui,const char* acDev);
709 
710 
723 bool gslc_DrvGetTouch(gslc_tsGui* pGui,int16_t* pnX,int16_t* pnY,uint16_t* pnPress,gslc_teInputRawEvent* peInputEvent,int16_t* pnInputVal);
724 
725 
726 // -----------------------------------------------------------------------
727 // Touch Functions (if using external touch driver library)
728 // -----------------------------------------------------------------------
729 
730 // Check for deprecated config option
731 // - This check will be removed in future releases
732 #if defined(DRV_TOUCH_XPT2046)
733  #error "NOTE: DRV_TOUCH_XPT2046 has been renamed to DRV_TOUCH_XPT2046_STM. Please update your config."
734 #endif
735 
736 #if defined(DRV_TOUCH_TYPE_EXTERNAL)
737 bool gslc_TDrvInitTouch(gslc_tsGui* pGui,const char* acDev);
747 
748 
761 bool gslc_TDrvGetTouch(gslc_tsGui* pGui, int16_t* pnX, int16_t* pnY, uint16_t* pnPress, gslc_teInputRawEvent* peInputEvent, int16_t* pnInputVal);
762 
763 #endif // DRV_TOUCH_*
764 
765 
766 // -----------------------------------------------------------------------
767 // Dynamic Screen rotation and Touch axes swap/flip functions
768 // -----------------------------------------------------------------------
769 
778 bool gslc_DrvRotate(gslc_tsGui* pGui, uint8_t nRotation);
779 
780 
781 // =======================================================================
782 // Private Functions
783 // - These functions are not included in the scope of APIs used by
784 // the core GUIslice library. Instead, these functions are used
785 // to support the operations within this driver layer.
786 // =======================================================================
787 
789 
790 #ifdef __cplusplus
791 }
792 #endif // __cplusplus
793 #endif // _GUISLICE_DRV_ADAGFX_H_
bool gslc_DrvSetElemImageGlow(gslc_tsGui *pGui, gslc_tsElem *pElem, gslc_tsImgRef sImgRef)
Set an element&#39;s glow-state image.
Definition: GUIslice_drv_adagfx.cpp:872
void gslc_DrvDrawBmp24FromMem(gslc_tsGui *pGui, int16_t nDstX, int16_t nDstY, const unsigned char *pBitmap, bool bProgMem)
Draw a color 24-bit depth bitmap from a memory array.
Definition: GUIslice_drv_adagfx.cpp:1817
bool gslc_DrvDrawTxt(gslc_tsGui *pGui, int16_t nTxtX, int16_t nTxtY, gslc_tsFont *pFont, const char *pStr, gslc_teTxtFlags eTxtFlags, gslc_tsColor colTxt, gslc_tsColor colBg)
Draw a text string at the given coordinate.
Definition: GUIslice_drv_adagfx.cpp:1198
bool gslc_DrvRotate(gslc_tsGui *pGui, uint8_t nRotation)
Change rotation, automatically adapt touchscreen axes swap/flip.
Definition: GUIslice_drv_adagfx.cpp:3059
gslc_teFontRefType
Font Reference types.
Definition: GUIslice.h:383
void gslc_DrvDestruct(gslc_tsGui *pGui)
Free up any members associated with the driver.
Definition: GUIslice_drv_adagfx.cpp:787
void * gslc_DrvGetDriverTouch(gslc_tsGui *pGui)
Get the native touch driver instance.
Definition: GUIslice_drv_adagfx.cpp:2146
bool gslc_DrvSetClipRect(gslc_tsGui *pGui, gslc_tsRect *pRect)
Set the clipping rectangle for future drawing updates.
Definition: GUIslice_drv_adagfx.cpp:887
bool gslc_DrvDrawFillRoundRect(gslc_tsGui *pGui, gslc_tsRect rRect, int16_t nRadius, gslc_tsColor nCol)
Draw a filled rounded rectangle.
Definition: GUIslice_drv_adagfx.cpp:1574
void gslc_DrvFontsDestruct(gslc_tsGui *pGui)
Release all fonts defined in the GUI.
Definition: GUIslice_drv_adagfx.cpp:922
const char * gslc_DrvGetNameTouch(gslc_tsGui *pGui)
Get the touch driver name.
Definition: GUIslice_drv_adagfx.cpp:798
bool gslc_DrvDrawPoint(gslc_tsGui *pGui, int16_t nX, int16_t nY, gslc_tsColor nCol)
Draw a point.
Definition: GUIslice_drv_adagfx.cpp:1527
bool gslc_DrvDrawImage(gslc_tsGui *pGui, int16_t nDstX, int16_t nDstY, gslc_tsImgRef sImgRef)
Copy all of source image to destination screen at specified coordinate.
Definition: GUIslice_drv_adagfx.cpp:2026
Image reference structure.
Definition: GUIslice.h:569
gslc_tsColor nColBkgnd
Background color (if not image-based)
Definition: GUIslice_drv_adagfx.h:200
gslc_teTxtFlags
Text reference flags: Describes the characteristics of a text string (ie.
Definition: GUIslice.h:463
void gslc_DrvDrawBkgnd(gslc_tsGui *pGui)
Copy the background image to destination screen.
Definition: GUIslice_drv_adagfx.cpp:2099
bool gslc_DrvSetElemImageNorm(gslc_tsGui *pGui, gslc_tsElem *pElem, gslc_tsImgRef sImgRef)
Set an element&#39;s normal-state image.
Definition: GUIslice_drv_adagfx.cpp:862
bool gslc_DrvInit(gslc_tsGui *pGui)
Initialize the SDL library.
Definition: GUIslice_drv_adagfx.cpp:571
bool gslc_DrvSetBkgndColor(gslc_tsGui *pGui, gslc_tsColor nCol)
Configure the background to use a solid color.
Definition: GUIslice_drv_adagfx.cpp:852
bool gslc_DrvDrawFrameTriangle(gslc_tsGui *pGui, int16_t nX0, int16_t nY0, int16_t nX1, int16_t nY1, int16_t nX2, int16_t nY2, gslc_tsColor nCol)
Draw a framed triangle.
Definition: GUIslice_drv_adagfx.cpp:1711
void gslc_DrvDrawBmp24FromSD(gslc_tsGui *pGui, const char *filename, uint16_t x, uint16_t y)
Draw a color 24-bit depth bitmap from SD card.
Definition: GUIslice_drv_adagfx.cpp:1897
bool gslc_DrvGetTouch(gslc_tsGui *pGui, int16_t *pnX, int16_t *pnY, uint16_t *pnPress, gslc_teInputRawEvent *peInputEvent, int16_t *pnInputVal)
Get the last touch event from the internal touch handler.
Definition: GUIslice_drv_adagfx.cpp:2159
Rectangular region. Defines X,Y corner coordinates plus dimensions.
Definition: GUIslice.h:519
Definition: GUIslice_drv_adagfx.h:199
gslc_teInputRawEvent
Raw input event types: touch, key, GPIOs.
Definition: GUIslice.h:260
bool gslc_DrvDrawFrameRoundRect(gslc_tsGui *pGui, gslc_tsRect rRect, int16_t nRadius, gslc_tsColor nCol)
Draw a framed rounded rectangle.
Definition: GUIslice_drv_adagfx.cpp:1639
void gslc_DrvDrawMonoFromMem(gslc_tsGui *pGui, int16_t nDstX, int16_t nDstY, const unsigned char *pBitmap, bool bProgMem)
Draw a monochrome bitmap from a memory array.
Definition: GUIslice_drv_adagfx.cpp:1779
bool gslc_DrvDrawFillCircle(gslc_tsGui *pGui, int16_t nMidX, int16_t nMidY, uint16_t nRadius, gslc_tsColor nCol)
Draw a filled circle.
Definition: GUIslice_drv_adagfx.cpp:1691
bool gslc_DrvDrawFrameRect(gslc_tsGui *pGui, gslc_tsRect rRect, gslc_tsColor nCol)
Draw a framed rectangle.
Definition: GUIslice_drv_adagfx.cpp:1591
uint16_t gslc_DrvAdaptColorToRaw(gslc_tsColor nCol)
Definition: GUIslice_drv_adagfx.cpp:3314
bool gslc_TDrvGetTouch(gslc_tsGui *pGui, int16_t *pnX, int16_t *pnY, uint16_t *pnPress, gslc_teInputRawEvent *peInputEvent, int16_t *pnInputVal)
Get the last touch event from the SDL_Event handler.
Definition: GUIslice_drv_adagfx.cpp:2399
gslc_tsRect rClipRect
Clipping rectangle.
Definition: GUIslice_drv_adagfx.h:202
void * gslc_DrvGetDriverDisp(gslc_tsGui *pGui)
Get the native display driver instance.
Definition: GUIslice_drv_adagfx.cpp:781
bool gslc_DrvDrawFrameCircle(gslc_tsGui *pGui, int16_t nMidX, int16_t nMidY, uint16_t nRadius, gslc_tsColor nCol)
Draw a framed circle.
Definition: GUIslice_drv_adagfx.cpp:1672
bool gslc_DrvGetTxtSize(gslc_tsGui *pGui, gslc_tsFont *pFont, const char *pStr, gslc_teTxtFlags eTxtFlags, int16_t *pnTxtX, int16_t *pnTxtY, uint16_t *pnTxtSzW, uint16_t *pnTxtSzH)
Get the extent (width and height) of a text string.
Definition: GUIslice_drv_adagfx.cpp:982
bool gslc_DrvInitTs(gslc_tsGui *pGui, const char *acDev)
Perform any touchscreen-specific initialization.
bool gslc_DrvDrawFillRect(gslc_tsGui *pGui, gslc_tsRect rRect, gslc_tsColor nCol)
Draw a filled rectangle.
Definition: GUIslice_drv_adagfx.cpp:1550
bool gslc_TDrvInitTouch(gslc_tsGui *pGui, const char *acDev)
Perform any touchscreen-specific initialization.
Definition: GUIslice_drv_adagfx.cpp:2295
void * gslc_DrvLoadImage(gslc_tsGui *pGui, gslc_tsImgRef sImgRef)
Load a bitmap (*.bmp) and create a new image resource.
Definition: GUIslice_drv_adagfx.cpp:809
bool gslc_DrvSetBkgndImage(gslc_tsGui *pGui, gslc_tsImgRef sImgRef)
Configure the background to use a bitmap image.
Definition: GUIslice_drv_adagfx.cpp:833
const void * gslc_DrvFontAdd(gslc_teFontRefType eFontRefType, const void *pvFontRef, uint16_t nFontSz)
Load a font from a resource and return pointer to it.
Definition: GUIslice_drv_adagfx.cpp:910
Define point coordinates.
Definition: GUIslice.h:528
bool gslc_DrvDrawLine(gslc_tsGui *pGui, int16_t nX0, int16_t nY0, int16_t nX1, int16_t nY1, gslc_tsColor nCol)
Draw a line.
Definition: GUIslice_drv_adagfx.cpp:1658
bool gslc_DrvDrawFillTriangle(gslc_tsGui *pGui, int16_t nX0, int16_t nY0, int16_t nX1, int16_t nY1, int16_t nX2, int16_t nY2, gslc_tsColor nCol)
Draw a filled triangle.
Definition: GUIslice_drv_adagfx.cpp:1733
GUI structure.
Definition: GUIslice.h:716
Element Struct.
Definition: GUIslice.h:593
Color structure. Defines RGB triplet.
Definition: GUIslice.h:534
Font reference structure.
Definition: GUIslice.h:559
const char * gslc_DrvGetNameDisp(gslc_tsGui *pGui)
Get the display driver name.
Definition: GUIslice_drv_adagfx.cpp:792
bool gslc_DrvInitTouch(gslc_tsGui *pGui, const char *acDev)
Perform any touchscreen-specific initialization.
Definition: GUIslice_drv_adagfx.cpp:2135
void gslc_DrvImageDestruct(void *pvImg)
Release an image surface.
Definition: GUIslice_drv_adagfx.cpp:882
bool gslc_DrvDrawPoints(gslc_tsGui *pGui, gslc_tsPt *asPt, uint16_t nNumPt, gslc_tsColor nCol)
Draw a point.
Definition: GUIslice_drv_adagfx.cpp:1541
void gslc_DrvPageFlipNow(gslc_tsGui *pGui)
Force a page flip to occur.
Definition: GUIslice_drv_adagfx.cpp:1483