1 #ifndef _GUISLICE_DRV_TFT_ESPI_H_ 2 #define _GUISLICE_DRV_TFT_ESPI_H_ 57 #if defined(DRV_TOUCH_ADA_STMPE610) 58 #define DRV_TOUCH_TYPE_EXTERNAL 59 #define DRV_TOUCH_TYPE_RES // Resistive 60 #elif defined(DRV_TOUCH_ADA_FT6206) 61 #define DRV_TOUCH_TYPE_EXTERNAL 62 #define DRV_TOUCH_TYPE_CAP // Capacitive 63 #elif defined(DRV_TOUCH_ADA_SIMPLE) 64 #define DRV_TOUCH_TYPE_EXTERNAL 65 #define DRV_TOUCH_TYPE_RES // Resistive 66 #define DRV_TOUCH_TYPE_ANALOG // Analog 67 #elif defined(DRV_TOUCH_XPT2046_STM) 68 #define DRV_TOUCH_TYPE_EXTERNAL 69 #define DRV_TOUCH_TYPE_RES // Resistive 70 #elif defined(DRV_TOUCH_XPT2046_PS) 71 #define DRV_TOUCH_TYPE_EXTERNAL 72 #define DRV_TOUCH_TYPE_RES // Resistive 73 #elif defined(DRV_TOUCH_TFT_ESPI) 74 #define DRV_TOUCH_TYPE_RES // Resistive 75 #elif defined(DRV_TOUCH_INPUT) 76 #define DRV_TOUCH_TYPE_EXTERNAL 77 #elif defined(DRV_TOUCH_HANDLER) 78 #define DRV_TOUCH_TYPE_EXTERNAL 79 #elif defined(DRV_TOUCH_NONE) 86 #if defined(DRV_TOUCH_TYPE_RES) 87 #define DRV_TOUCH_CALIB 90 #if defined(DRV_TOUCH_CALIB) 92 #if !defined(ADATOUCH_X_MIN) 98 #warning Calibration settings (ADATOUCH_X/Y_MIN/MAX) need to be added to config. Using defaults. 99 #define ADATOUCH_X_MIN 0 100 #define ADATOUCH_X_MAX 4000 101 #define ADATOUCH_Y_MIN 0 102 #define ADATOUCH_Y_MAX 4000 103 #define ADATOUCH_REMAP_YX 0 104 #endif // ADATOUCH_X_MIN 105 #endif // DRV_TOUCH_CALIB 109 #if !defined(GSLC_SPIFFS_EN) 110 #define GSLC_SPIFFS_EN 0 111 #endif // GSLC_SPIFFS_EN 123 #define DRV_HAS_DRAW_POINT 1 125 #define DRV_HAS_DRAW_POINTS 0 126 #define DRV_HAS_DRAW_LINE 1 127 #define DRV_HAS_DRAW_RECT_FRAME 1 128 #define DRV_HAS_DRAW_RECT_FILL 1 129 #define DRV_HAS_DRAW_RECT_ROUND_FRAME 1 130 #define DRV_HAS_DRAW_RECT_ROUND_FILL 1 131 #define DRV_HAS_DRAW_CIRCLE_FRAME 1 132 #define DRV_HAS_DRAW_CIRCLE_FILL 1 133 #define DRV_HAS_DRAW_TRI_FRAME 1 134 #define DRV_HAS_DRAW_TRI_FILL 1 135 #define DRV_HAS_DRAW_TEXT 1 136 #define DRV_HAS_DRAW_BMP_MEM 0 138 #define DRV_OVERRIDE_TXT_ALIGN 1 379 int16_t* pnTxtX,int16_t* pnTxtY,uint16_t* pnTxtSzW,uint16_t* pnTxtSzH);
570 int16_t nX1,int16_t nY1,int16_t nX2,int16_t nY2,
gslc_tsColor nCol);
588 int16_t nX1,int16_t nY1,int16_t nX2,int16_t nY2,
gslc_tsColor nCol);
664 #endif // end GSLC_SPIFFS_EN 680 #if defined(DRV_TOUCH_IN_DISP) 709 #endif // DRV_TOUCH_IN_DISP 718 #if defined(DRV_TOUCH_XPT2046) 719 #error "NOTE: DRV_TOUCH_XPT2046 has been renamed to DRV_TOUCH_XPT2046_STM. Please update your config." 722 #if defined(DRV_TOUCH_TYPE_EXTERNAL) 750 #endif // DRV_TOUCH_* 779 #endif // __cplusplus 780 #endif // _GUISLICE_DRV_TFT_ESPI_H_ 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_DrvDestruct(gslc_tsGui *pGui)
Free up any members associated with the driver.
Definition: GUIslice_drv_adagfx.cpp:787
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
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_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
gslc_teFontRefType
Font Reference types.
Definition: GUIslice.h:383
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
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_DrvDrawPoint(gslc_tsGui *pGui, int16_t nX, int16_t nY, gslc_tsColor nCol)
Draw a point.
Definition: GUIslice_drv_adagfx.cpp:1527
void gslc_DrvDrawBkgnd(gslc_tsGui *pGui)
Copy the background image to destination screen.
Definition: GUIslice_drv_adagfx.cpp:2099
bool gslc_DrvDrawFrameRect(gslc_tsGui *pGui, gslc_tsRect rRect, gslc_tsColor nCol)
Draw a framed rectangle.
Definition: GUIslice_drv_adagfx.cpp:1591
bool gslc_DrvSetClipRect(gslc_tsGui *pGui, gslc_tsRect *pRect)
Set the clipping rectangle for future drawing updates.
Definition: GUIslice_drv_adagfx.cpp:887
uint16_t gslc_DrvAdaptColorToRaw(gslc_tsColor nCol)
Definition: GUIslice_drv_adagfx.cpp:3314
Image reference structure.
Definition: GUIslice.h:569
bool gslc_DrvInit(gslc_tsGui *pGui)
Initialize the SDL library.
Definition: GUIslice_drv_adagfx.cpp:571
gslc_teTxtFlags
Text reference flags: Describes the characteristics of a text string (ie.
Definition: GUIslice.h:463
void gslc_DrvPageFlipNow(gslc_tsGui *pGui)
Force a page flip to occur.
Definition: GUIslice_drv_adagfx.cpp:1483
bool gslc_DrvDrawPoints(gslc_tsGui *pGui, gslc_tsPt *asPt, uint16_t nNumPt, gslc_tsColor nCol)
Draw a point.
Definition: GUIslice_drv_adagfx.cpp:1541
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_DrvSetBkgndColor(gslc_tsGui *pGui, gslc_tsColor nCol)
Configure the background to use a solid color.
Definition: GUIslice_drv_adagfx.cpp:852
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
bool gslc_DrvDrawTxtAlign(gslc_tsGui *pGui, int16_t nX0, int16_t nY0, int16_t nX1, int16_t nY1, int8_t eTxtAlign, gslc_tsFont *pFont, const char *pStr, gslc_teTxtFlags eTxtFlags, gslc_tsColor colTxt, gslc_tsColor colBg)
Draw a text string in a bounding box using the specified alignment.
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_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
bool gslc_DrvInitTouch(gslc_tsGui *pGui, const char *acDev)
Perform any touchscreen-specific initialization.
Definition: GUIslice_drv_adagfx.cpp:2135
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
bool gslc_DrvSetElemImageNorm(gslc_tsGui *pGui, gslc_tsElem *pElem, gslc_tsImgRef sImgRef)
Set an element's normal-state image.
Definition: GUIslice_drv_adagfx.cpp:862
bool gslc_DrvInitTs(gslc_tsGui *pGui, const char *acDev)
Perform any touchscreen-specific initialization.
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
bool gslc_TDrvInitTouch(gslc_tsGui *pGui, const char *acDev)
Perform any touchscreen-specific initialization.
Definition: GUIslice_drv_adagfx.cpp:2295
bool gslc_DrvDrawFillRect(gslc_tsGui *pGui, gslc_tsRect rRect, gslc_tsColor nCol)
Draw a filled rectangle.
Definition: GUIslice_drv_adagfx.cpp:1550
bool gslc_DrvSetElemImageGlow(gslc_tsGui *pGui, gslc_tsElem *pElem, gslc_tsImgRef sImgRef)
Set an element's glow-state image.
Definition: GUIslice_drv_adagfx.cpp:872
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
void * gslc_DrvGetDriverTouch(gslc_tsGui *pGui)
Get the native touch driver instance.
Definition: GUIslice_drv_adagfx.cpp:2146
bool gslc_DrvSetBkgndImage(gslc_tsGui *pGui, gslc_tsImgRef sImgRef)
Configure the background to use a bitmap image.
Definition: GUIslice_drv_adagfx.cpp:833
void * gslc_DrvGetDriverDisp(gslc_tsGui *pGui)
Get the native display driver instance.
Definition: GUIslice_drv_adagfx.cpp:781
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
const char * gslc_DrvGetNameTouch(gslc_tsGui *pGui)
Get the touch driver name.
Definition: GUIslice_drv_adagfx.cpp:798
Define point coordinates.
Definition: GUIslice.h:528
GUI structure.
Definition: GUIslice.h:716
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
Element Struct.
Definition: GUIslice.h:593
Color structure. Defines RGB triplet.
Definition: GUIslice.h:534
void gslc_DrvImageDestruct(void *pvImg)
Release an image surface.
Definition: GUIslice_drv_adagfx.cpp:882
Font reference structure.
Definition: GUIslice.h:559
void gslc_DrvFontsDestruct(gslc_tsGui *pGui)
Release all fonts defined in the GUI.
Definition: GUIslice_drv_adagfx.cpp:922
const char * gslc_DrvGetNameDisp(gslc_tsGui *pGui)
Get the display driver name.
Definition: GUIslice_drv_adagfx.cpp:792
bool gslc_DrvRotate(gslc_tsGui *pGui, uint8_t nRotation)
Change rotation, automatically adapt touchscreen axes swap/flip.
Definition: GUIslice_drv_adagfx.cpp:3059
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