Headers for emWin lib

Dependents:   DISCO-F746NG_rtos_test

Committer:
redbird
Date:
Sat Mar 26 22:49:50 2016 +0000
Revision:
0:1bf8f02b0770
new code integration

Who changed what in which revision?

UserRevisionLine numberNew contents of line
redbird 0:1bf8f02b0770 1 /*********************************************************************
redbird 0:1bf8f02b0770 2 * SEGGER Microcontroller GmbH & Co. KG *
redbird 0:1bf8f02b0770 3 * Solutions for real time microcontroller applications *
redbird 0:1bf8f02b0770 4 **********************************************************************
redbird 0:1bf8f02b0770 5 * *
redbird 0:1bf8f02b0770 6 * (c) 1996 - 2014 SEGGER Microcontroller GmbH & Co. KG *
redbird 0:1bf8f02b0770 7 * *
redbird 0:1bf8f02b0770 8 * Internet: www.segger.com Support: support@segger.com *
redbird 0:1bf8f02b0770 9 * *
redbird 0:1bf8f02b0770 10 **********************************************************************
redbird 0:1bf8f02b0770 11
redbird 0:1bf8f02b0770 12 ** emWin V5.24 - Graphical user interface for embedded applications **
redbird 0:1bf8f02b0770 13 All Intellectual Property rights in the Software belongs to SEGGER.
redbird 0:1bf8f02b0770 14 emWin is protected by international copyright laws. Knowledge of the
redbird 0:1bf8f02b0770 15 source code may not be used to write a similar product. This file may
redbird 0:1bf8f02b0770 16 only be used in accordance with the following terms:
redbird 0:1bf8f02b0770 17
redbird 0:1bf8f02b0770 18 The software has been licensed to NXP Semiconductors USA, Inc. whose
redbird 0:1bf8f02b0770 19 registered office is situated at 411 E. Plumeria Drive, San Jose,
redbird 0:1bf8f02b0770 20 CA 95134, USA solely for the purposes of creating libraries for
redbird 0:1bf8f02b0770 21 NXPs M0, M3/M4 and ARM7/9 processor-based devices, sublicensed and
redbird 0:1bf8f02b0770 22 distributed under the terms and conditions of the NXP End User License
redbird 0:1bf8f02b0770 23 Agreement.
redbird 0:1bf8f02b0770 24 Full source code is available at: www.segger.com
redbird 0:1bf8f02b0770 25
redbird 0:1bf8f02b0770 26 We appreciate your understanding and fairness.
redbird 0:1bf8f02b0770 27 ----------------------------------------------------------------------
redbird 0:1bf8f02b0770 28 File : GUI_Private.h
redbird 0:1bf8f02b0770 29 Purpose : GUI internal declarations
redbird 0:1bf8f02b0770 30 ---------------------------END-OF-HEADER------------------------------
redbird 0:1bf8f02b0770 31 */
redbird 0:1bf8f02b0770 32
redbird 0:1bf8f02b0770 33 #ifndef GUI_PRIVATE_H
redbird 0:1bf8f02b0770 34 #define GUI_PRIVATE_H
redbird 0:1bf8f02b0770 35
redbird 0:1bf8f02b0770 36 #include "GUI.h"
redbird 0:1bf8f02b0770 37 #include "LCD_Protected.h"
redbird 0:1bf8f02b0770 38 #include "GUI_Debug.h"
redbird 0:1bf8f02b0770 39 #if GUI_WINSUPPORT
redbird 0:1bf8f02b0770 40 #include "WM_GUI.h"
redbird 0:1bf8f02b0770 41 #endif
redbird 0:1bf8f02b0770 42
redbird 0:1bf8f02b0770 43 #if defined(__cplusplus)
redbird 0:1bf8f02b0770 44 extern "C" { /* Make sure we have C-declarations in C++ programs */
redbird 0:1bf8f02b0770 45 #endif
redbird 0:1bf8f02b0770 46
redbird 0:1bf8f02b0770 47 /*********************************************************************
redbird 0:1bf8f02b0770 48 *
redbird 0:1bf8f02b0770 49 * Defaults for config switches
redbird 0:1bf8f02b0770 50 *
redbird 0:1bf8f02b0770 51 **********************************************************************
redbird 0:1bf8f02b0770 52
redbird 0:1bf8f02b0770 53 The config switches below do not affect the interface in GUI.h and
redbird 0:1bf8f02b0770 54 are therefor not required to be in GUI.h.
redbird 0:1bf8f02b0770 55 */
redbird 0:1bf8f02b0770 56
redbird 0:1bf8f02b0770 57 /* Short address area.
redbird 0:1bf8f02b0770 58 For most compilers, this is "near" or "__near"
redbird 0:1bf8f02b0770 59 We do not use this except for some CPUs which we know to always have some
redbird 0:1bf8f02b0770 60 near memory, because the GUI_Context and some other data will be declared
redbird 0:1bf8f02b0770 61 to be in this short address (near) memory area as it has a major effect
redbird 0:1bf8f02b0770 62 on performance.
redbird 0:1bf8f02b0770 63 Please define in GUIConf.h (if you want to use it)
redbird 0:1bf8f02b0770 64 */
redbird 0:1bf8f02b0770 65 #ifndef GUI_SADDR
redbird 0:1bf8f02b0770 66 #define GUI_SADDR
redbird 0:1bf8f02b0770 67 #endif
redbird 0:1bf8f02b0770 68
redbird 0:1bf8f02b0770 69 #ifndef GUI_DEFAULT_FONT
redbird 0:1bf8f02b0770 70 #define GUI_DEFAULT_FONT &GUI_Font6x8
redbird 0:1bf8f02b0770 71 #endif
redbird 0:1bf8f02b0770 72
redbird 0:1bf8f02b0770 73 #ifndef GUI_DEFAULT_CURSOR
redbird 0:1bf8f02b0770 74 #define GUI_DEFAULT_CURSOR &GUI_CursorArrowM
redbird 0:1bf8f02b0770 75 #endif
redbird 0:1bf8f02b0770 76
redbird 0:1bf8f02b0770 77 #ifndef GUI_DEFAULT_BKCOLOR
redbird 0:1bf8f02b0770 78 #define GUI_DEFAULT_BKCOLOR GUI_BLACK
redbird 0:1bf8f02b0770 79 #endif
redbird 0:1bf8f02b0770 80
redbird 0:1bf8f02b0770 81 #ifndef GUI_DEFAULT_COLOR
redbird 0:1bf8f02b0770 82 #define GUI_DEFAULT_COLOR GUI_WHITE
redbird 0:1bf8f02b0770 83 #endif
redbird 0:1bf8f02b0770 84
redbird 0:1bf8f02b0770 85 /*********************************************************************
redbird 0:1bf8f02b0770 86 *
redbird 0:1bf8f02b0770 87 * Angles
redbird 0:1bf8f02b0770 88 *
redbird 0:1bf8f02b0770 89 **********************************************************************
redbird 0:1bf8f02b0770 90 */
redbird 0:1bf8f02b0770 91 #define GUI_45DEG 512
redbird 0:1bf8f02b0770 92 #define GUI_90DEG (2 * GUI_45DEG)
redbird 0:1bf8f02b0770 93 #define GUI_180DEG (4 * GUI_45DEG)
redbird 0:1bf8f02b0770 94 #define GUI_360DEG (8 * GUI_45DEG)
redbird 0:1bf8f02b0770 95
redbird 0:1bf8f02b0770 96
redbird 0:1bf8f02b0770 97 /*********************************************************************
redbird 0:1bf8f02b0770 98 *
redbird 0:1bf8f02b0770 99 * Locking checks
redbird 0:1bf8f02b0770 100 *
redbird 0:1bf8f02b0770 101 **********************************************************************
redbird 0:1bf8f02b0770 102 */
redbird 0:1bf8f02b0770 103 #if defined (WIN32) && defined (_DEBUG) && GUI_OS
redbird 0:1bf8f02b0770 104 #define GUI_ASSERT_LOCK() GUITASK_AssertLock()
redbird 0:1bf8f02b0770 105 #define GUI_ASSERT_NO_LOCK() GUITASK_AssertNoLock()
redbird 0:1bf8f02b0770 106 void GUITASK_AssertLock(void);
redbird 0:1bf8f02b0770 107 void GUITASK_AssertNoLock(void);
redbird 0:1bf8f02b0770 108 #else
redbird 0:1bf8f02b0770 109 #define GUI_ASSERT_LOCK()
redbird 0:1bf8f02b0770 110 #define GUI_ASSERT_NO_LOCK()
redbird 0:1bf8f02b0770 111 #endif
redbird 0:1bf8f02b0770 112
redbird 0:1bf8f02b0770 113 /*********************************************************************
redbird 0:1bf8f02b0770 114 *
redbird 0:1bf8f02b0770 115 * Division tables
redbird 0:1bf8f02b0770 116 *
redbird 0:1bf8f02b0770 117 **********************************************************************
redbird 0:1bf8f02b0770 118 */
redbird 0:1bf8f02b0770 119 extern const U8 GUI__aConvert_15_255[(1 << 4)];
redbird 0:1bf8f02b0770 120 extern const U8 GUI__aConvert_31_255[(1 << 5)];
redbird 0:1bf8f02b0770 121 extern const U8 GUI__aConvert_63_255[(1 << 6)];
redbird 0:1bf8f02b0770 122 extern const U8 GUI__aConvert_255_15[(1 << 8)];
redbird 0:1bf8f02b0770 123 extern const U8 GUI__aConvert_255_31[(1 << 8)];
redbird 0:1bf8f02b0770 124 extern const U8 GUI__aConvert_255_63[(1 << 8)];
redbird 0:1bf8f02b0770 125
redbird 0:1bf8f02b0770 126 /*********************************************************************
redbird 0:1bf8f02b0770 127 *
redbird 0:1bf8f02b0770 128 * Usage internals
redbird 0:1bf8f02b0770 129 *
redbird 0:1bf8f02b0770 130 **********************************************************************
redbird 0:1bf8f02b0770 131 */
redbird 0:1bf8f02b0770 132 typedef GUI_HMEM GUI_USAGE_Handle;
redbird 0:1bf8f02b0770 133 typedef struct tsUSAGE_APIList tUSAGE_APIList;
redbird 0:1bf8f02b0770 134 typedef struct GUI_Usage GUI_USAGE;
redbird 0:1bf8f02b0770 135 #define GUI_USAGE_h GUI_USAGE_Handle
redbird 0:1bf8f02b0770 136
redbird 0:1bf8f02b0770 137
redbird 0:1bf8f02b0770 138
redbird 0:1bf8f02b0770 139 typedef GUI_USAGE_h tUSAGE_CreateCompatible(GUI_USAGE * p);
redbird 0:1bf8f02b0770 140 typedef void tUSAGE_AddPixel (GUI_USAGE * p, int x, int y);
redbird 0:1bf8f02b0770 141 typedef void tUSAGE_AddHLine (GUI_USAGE * p, int x0, int y0, int len);
redbird 0:1bf8f02b0770 142 typedef void tUSAGE_Clear (GUI_USAGE * p);
redbird 0:1bf8f02b0770 143 typedef void tUSAGE_Delete (GUI_USAGE_h h);
redbird 0:1bf8f02b0770 144 typedef int tUSAGE_GetNextDirty (GUI_USAGE * p, int * pxOff, int yOff);
redbird 0:1bf8f02b0770 145 #define GUI_USAGE_LOCK_H(h) ((GUI_USAGE *)GUI_LOCK_H(h))
redbird 0:1bf8f02b0770 146
redbird 0:1bf8f02b0770 147
redbird 0:1bf8f02b0770 148 void GUI_USAGE_DecUseCnt(GUI_USAGE_Handle hUsage);
redbird 0:1bf8f02b0770 149
redbird 0:1bf8f02b0770 150 GUI_USAGE_Handle GUI_USAGE_BM_Create(int x0, int y0, int xsize, int ysize, int Flags);
redbird 0:1bf8f02b0770 151 void GUI_USAGE_Select(GUI_USAGE_Handle hUsage);
redbird 0:1bf8f02b0770 152 void GUI_USAGE_AddRect(GUI_USAGE * pUsage, int x0, int y0, int xSize, int ySize);
redbird 0:1bf8f02b0770 153 #define GUI_USAGE_AddPixel(p, x,y) p->pAPI->pfAddPixel(p,x,y)
redbird 0:1bf8f02b0770 154 #define GUI_USAGE_AddHLine(p,x,y,len) p->pAPI->pfAddHLine(p,x,y,len)
redbird 0:1bf8f02b0770 155 #define GUI_USAGE_Clear(p) p->pAPI->pfClear(p)
redbird 0:1bf8f02b0770 156 #define GUI_USAGE_Delete(p) p->pAPI->pfDelete(p)
redbird 0:1bf8f02b0770 157 #define GUI_USAGE_GetNextDirty(p,pxOff, yOff) p->pAPI->pfGetNextDirty(p,pxOff, yOff)
redbird 0:1bf8f02b0770 158
redbird 0:1bf8f02b0770 159 struct tsUSAGE_APIList {
redbird 0:1bf8f02b0770 160 tUSAGE_AddPixel * pfAddPixel;
redbird 0:1bf8f02b0770 161 tUSAGE_AddHLine * pfAddHLine;
redbird 0:1bf8f02b0770 162 tUSAGE_Clear * pfClear;
redbird 0:1bf8f02b0770 163 tUSAGE_CreateCompatible * pfCreateCompatible;
redbird 0:1bf8f02b0770 164 tUSAGE_Delete * pfDelete;
redbird 0:1bf8f02b0770 165 tUSAGE_GetNextDirty * pfGetNextDirty;
redbird 0:1bf8f02b0770 166 } ;
redbird 0:1bf8f02b0770 167
redbird 0:1bf8f02b0770 168 struct GUI_Usage {
redbird 0:1bf8f02b0770 169 I16P x0, y0, XSize, YSize;
redbird 0:1bf8f02b0770 170 const tUSAGE_APIList * pAPI;
redbird 0:1bf8f02b0770 171 I16 UseCnt;
redbird 0:1bf8f02b0770 172 };
redbird 0:1bf8f02b0770 173
redbird 0:1bf8f02b0770 174
redbird 0:1bf8f02b0770 175 /*********************************************************************
redbird 0:1bf8f02b0770 176 *
redbird 0:1bf8f02b0770 177 * GUI_MEMDEV
redbird 0:1bf8f02b0770 178 *
redbird 0:1bf8f02b0770 179 **********************************************************************
redbird 0:1bf8f02b0770 180 */
redbird 0:1bf8f02b0770 181 #if GUI_SUPPORT_MEMDEV
redbird 0:1bf8f02b0770 182
redbird 0:1bf8f02b0770 183 typedef struct {
redbird 0:1bf8f02b0770 184 GUI_DEVICE * pDevice;
redbird 0:1bf8f02b0770 185 I16P x0, y0, XSize, YSize;
redbird 0:1bf8f02b0770 186 unsigned BytesPerLine;
redbird 0:1bf8f02b0770 187 unsigned BitsPerPixel;
redbird 0:1bf8f02b0770 188 GUI_HMEM hUsage;
redbird 0:1bf8f02b0770 189 } GUI_MEMDEV;
redbird 0:1bf8f02b0770 190
redbird 0:1bf8f02b0770 191 #define GUI_MEMDEV_LOCK_H(h) ((GUI_MEMDEV *)GUI_LOCK_H(h))
redbird 0:1bf8f02b0770 192
redbird 0:1bf8f02b0770 193 void GUI_MEMDEV__CopyFromLCD (GUI_MEMDEV_Handle hMem);
redbird 0:1bf8f02b0770 194 void GUI_MEMDEV__GetRect (GUI_RECT * pRect);
redbird 0:1bf8f02b0770 195 unsigned GUI_MEMDEV__Color2Index (LCD_COLOR Color);
redbird 0:1bf8f02b0770 196 LCD_COLOR GUI_MEMDEV__Index2Color (int Index);
redbird 0:1bf8f02b0770 197 unsigned int GUI_MEMDEV__GetIndexMask(void);
redbird 0:1bf8f02b0770 198 void GUI_MEMDEV__SetAlphaCallback(unsigned(* pcbSetAlpha)(U8));
redbird 0:1bf8f02b0770 199
redbird 0:1bf8f02b0770 200 GUI_MEMDEV_Handle GUI_MEMDEV__CreateFixed(int x0, int y0, int xSize, int ySize, int Flags,
redbird 0:1bf8f02b0770 201 const GUI_DEVICE_API * pDeviceAPI,
redbird 0:1bf8f02b0770 202 const LCD_API_COLOR_CONV * pColorConvAPI);
redbird 0:1bf8f02b0770 203
redbird 0:1bf8f02b0770 204 void GUI_MEMDEV__DrawSizedAt (GUI_MEMDEV_Handle hMem, int xPos, int yPos, int xSize, int ySize);
redbird 0:1bf8f02b0770 205 GUI_MEMDEV_Handle GUI_MEMDEV__GetEmptyCopy32 (GUI_MEMDEV_Handle hMem, int * pxSize, int * pySize, int * pxPos, int * pyPos);
redbird 0:1bf8f02b0770 206 void GUI_MEMDEV__ReadLine (int x0, int y, int x1, LCD_PIXELINDEX * pBuffer);
redbird 0:1bf8f02b0770 207 void GUI_MEMDEV__WriteToActiveAlpha (GUI_MEMDEV_Handle hMem,int x, int y);
redbird 0:1bf8f02b0770 208 void GUI_MEMDEV__WriteToActiveAt (GUI_MEMDEV_Handle hMem,int x, int y);
redbird 0:1bf8f02b0770 209 void GUI_MEMDEV__WriteToActiveOpaque(GUI_MEMDEV_Handle hMem,int x, int y);
redbird 0:1bf8f02b0770 210 void * GUI_MEMDEV__XY2PTR (int x,int y);
redbird 0:1bf8f02b0770 211 void * GUI_MEMDEV__XY2PTREx (GUI_MEMDEV * pDev, int x,int y);
redbird 0:1bf8f02b0770 212 void GUI_MEMDEV__BlendColor32 (GUI_MEMDEV_Handle hMem, U32 BlendColor, U8 BlendIntens);
redbird 0:1bf8f02b0770 213
redbird 0:1bf8f02b0770 214 unsigned GUI__AlphaSuppressMixing(int OnOff);
redbird 0:1bf8f02b0770 215
redbird 0:1bf8f02b0770 216 #define GUI_POS_AUTO -4095 /* Position value for auto-pos */
redbird 0:1bf8f02b0770 217
redbird 0:1bf8f02b0770 218 #endif
redbird 0:1bf8f02b0770 219
redbird 0:1bf8f02b0770 220
redbird 0:1bf8f02b0770 221 /*********************************************************************
redbird 0:1bf8f02b0770 222 *
redbird 0:1bf8f02b0770 223 * LCD_HL_ level defines
redbird 0:1bf8f02b0770 224 *
redbird 0:1bf8f02b0770 225 **********************************************************************
redbird 0:1bf8f02b0770 226 */
redbird 0:1bf8f02b0770 227 #define LCD_HL_DrawHLine GUI_pContext->pLCD_HL->pfDrawHLine
redbird 0:1bf8f02b0770 228 #define LCD_HL_DrawPixel GUI_pContext->pLCD_HL->pfDrawPixel
redbird 0:1bf8f02b0770 229
redbird 0:1bf8f02b0770 230
redbird 0:1bf8f02b0770 231 /*********************************************************************
redbird 0:1bf8f02b0770 232 *
redbird 0:1bf8f02b0770 233 * Helper functions
redbird 0:1bf8f02b0770 234 *
redbird 0:1bf8f02b0770 235 **********************************************************************
redbird 0:1bf8f02b0770 236 */
redbird 0:1bf8f02b0770 237 #define GUI_ZEROINIT(Obj) GUI_MEMSET(Obj, 0, sizeof(Obj))
redbird 0:1bf8f02b0770 238 int GUI_cos(int angle);
redbird 0:1bf8f02b0770 239 int GUI_sin(int angle);
redbird 0:1bf8f02b0770 240 extern const U32 GUI_Pow10[10];
redbird 0:1bf8f02b0770 241
redbird 0:1bf8f02b0770 242 /* Multi-touch */
redbird 0:1bf8f02b0770 243 void GUI_MTOUCH__ManagePID(int OnOff);
redbird 0:1bf8f02b0770 244
redbird 0:1bf8f02b0770 245 /* Anti-aliased drawing */
redbird 0:1bf8f02b0770 246 int GUI_AA_Init (int x0, int x1);
redbird 0:1bf8f02b0770 247 int GUI_AA_Init_HiRes (int x0, int x1);
redbird 0:1bf8f02b0770 248 void GUI_AA_Exit (void);
redbird 0:1bf8f02b0770 249 I16 GUI_AA_HiRes2Pixel(int HiRes);
redbird 0:1bf8f02b0770 250
redbird 0:1bf8f02b0770 251 void GL_FillCircleAA_HiRes(int x0, int y0, int r);
redbird 0:1bf8f02b0770 252
redbird 0:1bf8f02b0770 253 void GUI_AA__DrawCharAA2(int x0, int y0, int XSize, int YSize, int BytesPerLine, const U8 * pData);
redbird 0:1bf8f02b0770 254 void GUI_AA__DrawCharAA4(int x0, int y0, int XSize, int YSize, int BytesPerLine, const U8 * pData);
redbird 0:1bf8f02b0770 255 void GUI_AA__DrawCharAA8(int x0, int y0, int XSize, int YSize, int BytesPerLine, const U8 * pData);
redbird 0:1bf8f02b0770 256
redbird 0:1bf8f02b0770 257 /* Alpha blending helper functions */
redbird 0:1bf8f02b0770 258 int GUI__GetAlphaBuffer (U32 ** ppCurrent, U32 ** ppConvert, U32 ** ppData, int * pVXSizeMax);
redbird 0:1bf8f02b0770 259 int GUI__AllocAlphaBuffer(int AllocDataBuffer);
redbird 0:1bf8f02b0770 260 U32 * GUI__DoAlphaBlending (int x, int y, U32 * pData, int xSize, tLCDDEV_Index2Color * pfIndex2Color_DEV, int * pDone);
redbird 0:1bf8f02b0770 261 unsigned GUI__SetAlphaBufferSize(int xSize);
redbird 0:1bf8f02b0770 262
redbird 0:1bf8f02b0770 263 /* System independent font routines */
redbird 0:1bf8f02b0770 264 int GUI_SIF__GetCharDistX (U16P c, int * pSizeX);
redbird 0:1bf8f02b0770 265 void GUI_SIF__GetFontInfo (const GUI_FONT * pFont, GUI_FONTINFO * pfi);
redbird 0:1bf8f02b0770 266 char GUI_SIF__IsInFont (const GUI_FONT * pFont, U16 c);
redbird 0:1bf8f02b0770 267 const U8 * GUI_SIF__GetpCharInfo (const GUI_FONT * pFont, U16P c, unsigned SizeOfCharInfo);
redbird 0:1bf8f02b0770 268 int GUI_SIF__GetNumCharAreas (const GUI_FONT * pFont);
redbird 0:1bf8f02b0770 269 int GUI_SIF__GetCharDistX_ExtFrm(U16P c, int * pSizeX);
redbird 0:1bf8f02b0770 270 void GUI_SIF__GetFontInfo_ExtFrm (const GUI_FONT * pFont, GUI_FONTINFO * pfi);
redbird 0:1bf8f02b0770 271 char GUI_SIF__IsInFont_ExtFrm (const GUI_FONT * pFont, U16 c);
redbird 0:1bf8f02b0770 272 int GUI_SIF__GetCharInfo_ExtFrm (U16P c, GUI_CHARINFO_EXT * pInfo);
redbird 0:1bf8f02b0770 273 void GUI_SIF__ClearLine_ExtFrm (const char * s, int Len);
redbird 0:1bf8f02b0770 274
redbird 0:1bf8f02b0770 275 /* External binary font routines */
redbird 0:1bf8f02b0770 276 int GUI_XBF__GetOff (const GUI_XBF_DATA * pXBF_Data, unsigned c, U32 * pOff);
redbird 0:1bf8f02b0770 277 int GUI_XBF__GetOffAndSize(const GUI_XBF_DATA * pXBF_Data, unsigned c, U32 * pOff, U16 * pSize);
redbird 0:1bf8f02b0770 278 int GUI_XBF__GetCharDistX (U16P c, int * pSizeX);
redbird 0:1bf8f02b0770 279 void GUI_XBF__GetFontInfo (const GUI_FONT * pFont, GUI_FONTINFO * pInfo);
redbird 0:1bf8f02b0770 280 char GUI_XBF__IsInFont (const GUI_FONT * pFont, U16 c);
redbird 0:1bf8f02b0770 281 int GUI_XBF__GetCharInfo (U16P c, GUI_CHARINFO_EXT * pInfo);
redbird 0:1bf8f02b0770 282 void GUI_XBF__ClearLine (const char * s, int Len);
redbird 0:1bf8f02b0770 283
redbird 0:1bf8f02b0770 284 /* Conversion routines */
redbird 0:1bf8f02b0770 285 void GUI_AddHex (U32 v, U8 Len, char ** ps);
redbird 0:1bf8f02b0770 286 void GUI_AddBin (U32 v, U8 Len, char ** ps);
redbird 0:1bf8f02b0770 287 void GUI_AddDecMin (I32 v, char ** ps);
redbird 0:1bf8f02b0770 288 void GUI_AddDec (I32 v, U8 Len, char ** ps);
redbird 0:1bf8f02b0770 289 void GUI_AddDecShift(I32 v, U8 Len, U8 Shift, char ** ps);
redbird 0:1bf8f02b0770 290 long GUI_AddSign (long v, char ** ps);
redbird 0:1bf8f02b0770 291 int GUI_Long2Len (I32 v);
redbird 0:1bf8f02b0770 292
redbird 0:1bf8f02b0770 293 #define GUI_UC__GetCharSize(sText) GUI_pUC_API->pfGetCharSize(sText)
redbird 0:1bf8f02b0770 294 #define GUI_UC__GetCharCode(sText) GUI_pUC_API->pfGetCharCode(sText)
redbird 0:1bf8f02b0770 295
redbird 0:1bf8f02b0770 296 int GUI_UC__CalcSizeOfChar (U16 Char);
redbird 0:1bf8f02b0770 297 U16 GUI_UC__GetCharCodeInc (const char ** ps);
redbird 0:1bf8f02b0770 298 int GUI_UC__NumChars2NumBytes(const char * s, int NumChars);
redbird 0:1bf8f02b0770 299 int GUI_UC__NumBytes2NumChars(const char * s, int NumBytes);
redbird 0:1bf8f02b0770 300
redbird 0:1bf8f02b0770 301 int GUI__GetLineNumChars (const char * s, int MaxNumChars);
redbird 0:1bf8f02b0770 302 int GUI__GetNumChars (const char * s);
redbird 0:1bf8f02b0770 303 int GUI__GetOverlap (U16 Char);
redbird 0:1bf8f02b0770 304 int GUI__GetLineDistX (const char * s, int Len);
redbird 0:1bf8f02b0770 305 int GUI__GetFontSizeY (void);
redbird 0:1bf8f02b0770 306 int GUI__HandleEOLine (const char ** ps);
redbird 0:1bf8f02b0770 307 void GUI__DispLine (const char * s, int Len, const GUI_RECT * pr);
redbird 0:1bf8f02b0770 308 void GUI__AddSpaceHex (U32 v, U8 Len, char ** ps);
redbird 0:1bf8f02b0770 309 void GUI__CalcTextRect (const char * pText, const GUI_RECT * pTextRectIn, GUI_RECT * pTextRectOut, int TextAlign);
redbird 0:1bf8f02b0770 310
redbird 0:1bf8f02b0770 311 void GUI__ClearTextBackground(int xDist, int yDist);
redbird 0:1bf8f02b0770 312
redbird 0:1bf8f02b0770 313 int GUI__WrapGetNumCharsDisp (const char * pText, int xSize, GUI_WRAPMODE WrapMode);
redbird 0:1bf8f02b0770 314 int GUI__WrapGetNumCharsToNextLine (const char * pText, int xSize, GUI_WRAPMODE WrapMode);
redbird 0:1bf8f02b0770 315 int GUI__WrapGetNumBytesToNextLine (const char * pText, int xSize, GUI_WRAPMODE WrapMode);
redbird 0:1bf8f02b0770 316 void GUI__memset (U8 * p, U8 Fill, int NumBytes);
redbird 0:1bf8f02b0770 317 void GUI__memset16 (U16 * p, U16 Fill, int NumWords);
redbird 0:1bf8f02b0770 318 int GUI__strlen (const char * s);
redbird 0:1bf8f02b0770 319 int GUI__strcmp (const char * s0, const char * s1);
redbird 0:1bf8f02b0770 320 int GUI__strcmp_hp (GUI_HMEM hs0, const char * s1);
redbird 0:1bf8f02b0770 321
redbird 0:1bf8f02b0770 322 /* Get cursor position */
redbird 0:1bf8f02b0770 323 int GUI__GetCursorPosX (const char * s, int Index, int MaxNumChars);
redbird 0:1bf8f02b0770 324 int GUI__GetCursorPosChar (const char * s, int x, int NumCharsToNextLine);
redbird 0:1bf8f02b0770 325 U16 GUI__GetCursorCharacter(const char * s, int Index, int MaxNumChars, int * pIsRTL);
redbird 0:1bf8f02b0770 326
redbird 0:1bf8f02b0770 327 /* Arabic support (tbd) */
redbird 0:1bf8f02b0770 328 U16 GUI__GetPresentationForm (U16 Char, U16 Next, U16 Prev, int * pIgnoreNext, const char * s);
redbird 0:1bf8f02b0770 329 int GUI__IsArabicCharacter (U16 c);
redbird 0:1bf8f02b0770 330
redbird 0:1bf8f02b0770 331 /* BiDi support */
redbird 0:1bf8f02b0770 332 int GUI__BIDI_Log2Vis (const char * s, int NumChars, char * pBuffer, int BufferSize);
redbird 0:1bf8f02b0770 333 int GUI__BIDI_GetCursorPosX (const char * s, int NumChars, int Index);
redbird 0:1bf8f02b0770 334 int GUI__BIDI_GetCursorPosChar (const char * s, int NumChars, int x);
redbird 0:1bf8f02b0770 335 U16 GUI__BIDI_GetLogChar (const char * s, int NumChars, int Index);
redbird 0:1bf8f02b0770 336 int GUI__BIDI_GetCharDir (const char * s, int NumChars, int Index);
redbird 0:1bf8f02b0770 337 int GUI__BIDI_IsNSM (U16 Char);
redbird 0:1bf8f02b0770 338 U16 GUI__BIDI_GetCursorCharacter(const char * s, int Index, int MaxNumChars, int * pIsRTL);
redbird 0:1bf8f02b0770 339 int GUI__BIDI_GetWordWrap (const char * s, int xSize, int * pxDist);
redbird 0:1bf8f02b0770 340 int GUI__BIDI_GetCharWrap (const char * s, int xSize);
redbird 0:1bf8f02b0770 341
redbird 0:1bf8f02b0770 342 const char * GUI__BIDI_Log2VisBuffered(const char * s, int * pMaxNumChars);
redbird 0:1bf8f02b0770 343
redbird 0:1bf8f02b0770 344 extern int GUI__BIDI_Enabled;
redbird 0:1bf8f02b0770 345
redbird 0:1bf8f02b0770 346 extern int (* _pfGUI__BIDI_Log2Vis )(const char * s, int NumChars, char * pBuffer, int BufferSize);
redbird 0:1bf8f02b0770 347 extern int (* _pfGUI__BIDI_GetCursorPosX )(const char * s, int NumChars, int Index);
redbird 0:1bf8f02b0770 348 extern int (* _pfGUI__BIDI_GetCursorPosChar)(const char * s, int NumChars, int x);
redbird 0:1bf8f02b0770 349 extern U16 (* _pfGUI__BIDI_GetLogChar )(const char * s, int NumChars, int Index);
redbird 0:1bf8f02b0770 350 extern int (* _pfGUI__BIDI_GetCharDir )(const char * s, int NumChars, int Index);
redbird 0:1bf8f02b0770 351 extern int (* _pfGUI__BIDI_IsNSM )(U16 Char);
redbird 0:1bf8f02b0770 352
redbird 0:1bf8f02b0770 353 /* BiDi-related function pointers */
redbird 0:1bf8f02b0770 354 extern const char * (* GUI_CharLine_pfLog2Vis)(const char * s, int * pMaxNumChars);
redbird 0:1bf8f02b0770 355
redbird 0:1bf8f02b0770 356 extern int (* GUI__GetCursorPos_pfGetPosX) (const char * s, int MaxNumChars, int Index);
redbird 0:1bf8f02b0770 357 extern int (* GUI__GetCursorPos_pfGetPosChar) (const char * s, int MaxNumChars, int x);
redbird 0:1bf8f02b0770 358 extern U16 (* GUI__GetCursorPos_pfGetCharacter)(const char * s, int MaxNumChars, int Index, int * pIsRTL);
redbird 0:1bf8f02b0770 359
redbird 0:1bf8f02b0770 360 extern int (* GUI__Wrap_pfGetWordWrap)(const char * s, int xSize, int * pxDist);
redbird 0:1bf8f02b0770 361 extern int (* GUI__Wrap_pfGetCharWrap)(const char * s, int xSize);
redbird 0:1bf8f02b0770 362
redbird 0:1bf8f02b0770 363 /* Proportional font support */
redbird 0:1bf8f02b0770 364 const GUI_FONT_PROP * GUIPROP__FindChar(const GUI_FONT_PROP * pProp, U16P c);
redbird 0:1bf8f02b0770 365
redbird 0:1bf8f02b0770 366 /* Extended proportional font support */
redbird 0:1bf8f02b0770 367 const GUI_FONT_PROP_EXT * GUIPROP_EXT__FindChar(const GUI_FONT_PROP_EXT * pPropExt, U16P c);
redbird 0:1bf8f02b0770 368 void GUIPROP_EXT__DispLine (const char * s, int Len);
redbird 0:1bf8f02b0770 369 void GUIPROP_EXT__ClearLine (const char * s, int Len);
redbird 0:1bf8f02b0770 370 void GUIPROP_EXT__SetfpClearLine(void (* fpClearLine)(const char * s, int Len));
redbird 0:1bf8f02b0770 371
redbird 0:1bf8f02b0770 372 /* Reading data routines */
redbird 0:1bf8f02b0770 373 U16 GUI__Read16(const U8 ** ppData);
redbird 0:1bf8f02b0770 374 U32 GUI__Read32(const U8 ** ppData);
redbird 0:1bf8f02b0770 375
redbird 0:1bf8f02b0770 376 /* Virtual screen support */
redbird 0:1bf8f02b0770 377 void GUI__GetOrg(int * px, int * py);
redbird 0:1bf8f02b0770 378 void GUI__SetOrgHook(void(* pfHook)(int x, int y));
redbird 0:1bf8f02b0770 379
redbird 0:1bf8f02b0770 380 /* Timer support */
redbird 0:1bf8f02b0770 381 int GUI_TIMER__IsActive (void);
redbird 0:1bf8f02b0770 382 GUI_TIMER_TIME GUI_TIMER__GetPeriod (void);
redbird 0:1bf8f02b0770 383 GUI_TIMER_HANDLE GUI_TIMER__GetNextTimer (GUI_TIMER_HANDLE hTimer, U32 * pContext);
redbird 0:1bf8f02b0770 384 GUI_TIMER_HANDLE GUI_TIMER__GetFirstTimer (U32 * pContext);
redbird 0:1bf8f02b0770 385 GUI_TIMER_HANDLE GUI_TIMER__GetNextTimerLin(GUI_TIMER_HANDLE hTimer, U32 * pContext);
redbird 0:1bf8f02b0770 386
redbird 0:1bf8f02b0770 387 /* Get function pointers for color conversion */
redbird 0:1bf8f02b0770 388 tLCDDEV_Index2Color * GUI_GetpfIndex2ColorEx(int LayerIndex);
redbird 0:1bf8f02b0770 389 tLCDDEV_Color2Index * GUI_GetpfColor2IndexEx(int LayerIndex);
redbird 0:1bf8f02b0770 390
redbird 0:1bf8f02b0770 391 int GUI_GetBitsPerPixelEx(int LayerIndex);
redbird 0:1bf8f02b0770 392
redbird 0:1bf8f02b0770 393 LCD_PIXELINDEX * LCD_GetpPalConvTable (const LCD_LOGPALETTE * pLogPal);
redbird 0:1bf8f02b0770 394 LCD_PIXELINDEX * LCD_GetpPalConvTableUncached(const LCD_LOGPALETTE * pLogPal);
redbird 0:1bf8f02b0770 395 LCD_PIXELINDEX * LCD_GetpPalConvTableBM (const LCD_LOGPALETTE * pLogPal, const GUI_BITMAP * pBitmap, int LayerIndex);
redbird 0:1bf8f02b0770 396
redbird 0:1bf8f02b0770 397 /* Setting a function for converting a color palette to an array of index values */
redbird 0:1bf8f02b0770 398 void GUI_SetFuncGetpPalConvTable(LCD_PIXELINDEX * (* pFunc)(const LCD_LOGPALETTE * pLogPal, const GUI_BITMAP * pBitmap, int LayerIndex));
redbird 0:1bf8f02b0770 399
redbird 0:1bf8f02b0770 400 /*********************************************************************
redbird 0:1bf8f02b0770 401 *
redbird 0:1bf8f02b0770 402 * Format definitions used by streamed bitmaps
redbird 0:1bf8f02b0770 403 *
redbird 0:1bf8f02b0770 404 * IMPORTANT: DO NOT CHANGE THESE VALUES!
redbird 0:1bf8f02b0770 405 * THEY HAVE TO CORRESPOND TO THE DEFINITIONS WITHIN THE CODE OF THE BITMAPCONVERTER!
redbird 0:1bf8f02b0770 406 */
redbird 0:1bf8f02b0770 407 #define GUI_STREAM_FORMAT_INDEXED 100 /* DO NOT CHANGE */
redbird 0:1bf8f02b0770 408 #define GUI_STREAM_FORMAT_RLE4 6 /* DO NOT CHANGE */
redbird 0:1bf8f02b0770 409 #define GUI_STREAM_FORMAT_RLE8 7 /* DO NOT CHANGE */
redbird 0:1bf8f02b0770 410 #define GUI_STREAM_FORMAT_565 8 /* DO NOT CHANGE */
redbird 0:1bf8f02b0770 411 #define GUI_STREAM_FORMAT_M565 9 /* DO NOT CHANGE */
redbird 0:1bf8f02b0770 412 #define GUI_STREAM_FORMAT_555 10 /* DO NOT CHANGE */
redbird 0:1bf8f02b0770 413 #define GUI_STREAM_FORMAT_M555 11 /* DO NOT CHANGE */
redbird 0:1bf8f02b0770 414 #define GUI_STREAM_FORMAT_RLE16 12 /* DO NOT CHANGE */
redbird 0:1bf8f02b0770 415 #define GUI_STREAM_FORMAT_RLEM16 13 /* DO NOT CHANGE */
redbird 0:1bf8f02b0770 416 #define GUI_STREAM_FORMAT_8888 16 /* DO NOT CHANGE */
redbird 0:1bf8f02b0770 417 #define GUI_STREAM_FORMAT_RLE32 15 /* DO NOT CHANGE */
redbird 0:1bf8f02b0770 418 #define GUI_STREAM_FORMAT_24 17 /* DO NOT CHANGE */
redbird 0:1bf8f02b0770 419 #define GUI_STREAM_FORMAT_RLEALPHA 18 /* DO NOT CHANGE */
redbird 0:1bf8f02b0770 420 #define GUI_STREAM_FORMAT_444_12 19 /* DO NOT CHANGE */
redbird 0:1bf8f02b0770 421 #define GUI_STREAM_FORMAT_M444_12 20 /* DO NOT CHANGE */
redbird 0:1bf8f02b0770 422 #define GUI_STREAM_FORMAT_444_12_1 21 /* DO NOT CHANGE */
redbird 0:1bf8f02b0770 423 #define GUI_STREAM_FORMAT_M444_12_1 22 /* DO NOT CHANGE */
redbird 0:1bf8f02b0770 424 #define GUI_STREAM_FORMAT_444_16 23 /* DO NOT CHANGE */
redbird 0:1bf8f02b0770 425 #define GUI_STREAM_FORMAT_M444_16 24 /* DO NOT CHANGE */
redbird 0:1bf8f02b0770 426
redbird 0:1bf8f02b0770 427 void GUI__ReadHeaderFromStream (GUI_BITMAP_STREAM * pBitmapHeader, const U8 * pData);
redbird 0:1bf8f02b0770 428 void GUI__CreateBitmapFromStream(const GUI_BITMAP_STREAM * pBitmapHeader, const void * pData, GUI_BITMAP * pBMP, GUI_LOGPALETTE * pPAL, const GUI_BITMAP_METHODS * pMethods);
redbird 0:1bf8f02b0770 429
redbird 0:1bf8f02b0770 430 /* Cache management */
redbird 0:1bf8f02b0770 431 int GUI__ManageCache (int Cmd);
redbird 0:1bf8f02b0770 432 int GUI__ManageCacheEx(int LayerIndex, int Cmd);
redbird 0:1bf8f02b0770 433
redbird 0:1bf8f02b0770 434 /*********************************************************************
redbird 0:1bf8f02b0770 435 *
redbird 0:1bf8f02b0770 436 * 2d - GL
redbird 0:1bf8f02b0770 437 *
redbird 0:1bf8f02b0770 438 **********************************************************************
redbird 0:1bf8f02b0770 439 */
redbird 0:1bf8f02b0770 440 void GL_DispChar (U16 c);
redbird 0:1bf8f02b0770 441 void GL_DrawArc (int x0, int y0, int rx, int ry, int a0, int a1);
redbird 0:1bf8f02b0770 442 void GL_DrawBitmap (const GUI_BITMAP * pBM, int x0, int y0);
redbird 0:1bf8f02b0770 443 void GL_DrawCircle (int x0, int y0, int r);
redbird 0:1bf8f02b0770 444 void GL_DrawEllipse (int x0, int y0, int rx, int ry, int w);
redbird 0:1bf8f02b0770 445 void GL_DrawHLine (int y0, int x0, int x1);
redbird 0:1bf8f02b0770 446 void GL_DrawPolygon (const GUI_POINT * pPoints, int NumPoints, int x0, int y0);
redbird 0:1bf8f02b0770 447 void GL_DrawPoint (int x, int y);
redbird 0:1bf8f02b0770 448 void GL_DrawLine1 (int x0, int y0, int x1, int y1);
redbird 0:1bf8f02b0770 449 void GL_DrawLine1Ex (int x0, int y0, int x1, int y1, unsigned * pPixelCnt);
redbird 0:1bf8f02b0770 450 void GL_DrawLineRel (int dx, int dy);
redbird 0:1bf8f02b0770 451 void GL_DrawLineTo (int x, int y);
redbird 0:1bf8f02b0770 452 void GL_DrawLineToEx (int x, int y, unsigned * pPixelCnt);
redbird 0:1bf8f02b0770 453 void GL_DrawLine (int x0, int y0, int x1, int y1);
redbird 0:1bf8f02b0770 454 void GL_DrawLineEx (int x0, int y0, int x1, int y1, unsigned * pPixelCnt);
redbird 0:1bf8f02b0770 455 void GL_MoveTo (int x, int y);
redbird 0:1bf8f02b0770 456 void GL_FillCircle (int x0, int y0, int r);
redbird 0:1bf8f02b0770 457 void GL_FillCircleAA (int x0, int y0, int r);
redbird 0:1bf8f02b0770 458 void GL_FillEllipse (int x0, int y0, int rx, int ry);
redbird 0:1bf8f02b0770 459 void GL_FillPolygon (const GUI_POINT * pPoints, int NumPoints, int x0, int y0);
redbird 0:1bf8f02b0770 460 void GL_SetDefault (void);
redbird 0:1bf8f02b0770 461
redbird 0:1bf8f02b0770 462
redbird 0:1bf8f02b0770 463 /*********************************************************************
redbird 0:1bf8f02b0770 464 *
redbird 0:1bf8f02b0770 465 * Callback pointers for dynamic linkage
redbird 0:1bf8f02b0770 466 *
redbird 0:1bf8f02b0770 467 **********************************************************************
redbird 0:1bf8f02b0770 468 Dynamic linkage pointers reduces configuration hassles.
redbird 0:1bf8f02b0770 469 */
redbird 0:1bf8f02b0770 470 typedef int GUI_tfTimer(void);
redbird 0:1bf8f02b0770 471 typedef int WM_tfHandlePID(void);
redbird 0:1bf8f02b0770 472
redbird 0:1bf8f02b0770 473
redbird 0:1bf8f02b0770 474 /*********************************************************************
redbird 0:1bf8f02b0770 475 *
redbird 0:1bf8f02b0770 476 * Cursors
redbird 0:1bf8f02b0770 477 *
redbird 0:1bf8f02b0770 478 **********************************************************************
redbird 0:1bf8f02b0770 479 */
redbird 0:1bf8f02b0770 480 extern GUI_CONST_STORAGE unsigned char GUI_Pixels_ArrowS[45];
redbird 0:1bf8f02b0770 481 extern GUI_CONST_STORAGE unsigned char GUI_Pixels_ArrowM[60];
redbird 0:1bf8f02b0770 482 extern GUI_CONST_STORAGE unsigned char GUI_Pixels_ArrowL[150];
redbird 0:1bf8f02b0770 483 extern GUI_CONST_STORAGE unsigned char GUI_Pixels_CrossS[33];
redbird 0:1bf8f02b0770 484 extern GUI_CONST_STORAGE unsigned char GUI_Pixels_CrossM[126];
redbird 0:1bf8f02b0770 485 extern GUI_CONST_STORAGE unsigned char GUI_Pixels_CrossL[248];
redbird 0:1bf8f02b0770 486 extern GUI_CONST_STORAGE unsigned char GUI_PixelsHeaderM[5 * 17];
redbird 0:1bf8f02b0770 487
redbird 0:1bf8f02b0770 488 extern GUI_CONST_STORAGE GUI_LOGPALETTE GUI_CursorPal;
redbird 0:1bf8f02b0770 489 extern GUI_CONST_STORAGE GUI_LOGPALETTE GUI_CursorPalI;
redbird 0:1bf8f02b0770 490
redbird 0:1bf8f02b0770 491
redbird 0:1bf8f02b0770 492 /*********************************************************************
redbird 0:1bf8f02b0770 493 *
redbird 0:1bf8f02b0770 494 * Text rotation
redbird 0:1bf8f02b0770 495 *
redbird 0:1bf8f02b0770 496 **********************************************************************
redbird 0:1bf8f02b0770 497 */
redbird 0:1bf8f02b0770 498 extern GUI_RECT GUI_RectDispString; /* Used by LCD_Rotate...() and GUI_DispStringInRect() */
redbird 0:1bf8f02b0770 499
redbird 0:1bf8f02b0770 500 /*********************************************************************
redbird 0:1bf8f02b0770 501 *
redbird 0:1bf8f02b0770 502 * Flag for setting transparency for 'EXT' fonts
redbird 0:1bf8f02b0770 503 *
redbird 0:1bf8f02b0770 504 **********************************************************************
redbird 0:1bf8f02b0770 505 */
redbird 0:1bf8f02b0770 506 extern U8 GUI__CharHasTrans;
redbird 0:1bf8f02b0770 507
redbird 0:1bf8f02b0770 508 /*********************************************************************
redbird 0:1bf8f02b0770 509 *
redbird 0:1bf8f02b0770 510 * Multitasking support
redbird 0:1bf8f02b0770 511 *
redbird 0:1bf8f02b0770 512 **********************************************************************
redbird 0:1bf8f02b0770 513 */
redbird 0:1bf8f02b0770 514 extern int GUITASK__EntranceCnt;
redbird 0:1bf8f02b0770 515
redbird 0:1bf8f02b0770 516 /*********************************************************************
redbird 0:1bf8f02b0770 517 *
redbird 0:1bf8f02b0770 518 * Bitmap related functions
redbird 0:1bf8f02b0770 519 *
redbird 0:1bf8f02b0770 520 **********************************************************************
redbird 0:1bf8f02b0770 521 */
redbird 0:1bf8f02b0770 522
redbird 0:1bf8f02b0770 523 int GUI_GetBitmapPixelIndex(const GUI_BITMAP * pBMP, unsigned x, unsigned y);
redbird 0:1bf8f02b0770 524 GUI_COLOR GUI_GetBitmapPixelColor(const GUI_BITMAP * pBMP, unsigned x, unsigned y);
redbird 0:1bf8f02b0770 525 int GUI_GetBitmapPixelIndexEx(int BitsPerPixel, int BytesPerLine, const U8 * pData, unsigned x, unsigned y);
redbird 0:1bf8f02b0770 526
redbird 0:1bf8f02b0770 527 void GUI__DrawBitmap16bpp (int x0, int y0, int xsize, int ysize, const U8 * pPixel, const LCD_LOGPALETTE * pLogPal, int xMag, int yMag, tLCDDEV_Index2Color * pfIndex2Color, const LCD_API_COLOR_CONV * pColorConvAPI);
redbird 0:1bf8f02b0770 528 void GUI__DrawBitmapA16bpp(int x0, int y0, int xSize, int ySize, const U8 * pPixel, const LCD_LOGPALETTE * pLogPal, int xMag, int yMag, tLCDDEV_Index2Color * pfIndex2Color);
redbird 0:1bf8f02b0770 529 void GUI__SetPixelAlpha (int x, int y, U8 Alpha, LCD_COLOR Color);
redbird 0:1bf8f02b0770 530 LCD_COLOR GUI__MixColors (LCD_COLOR Color, LCD_COLOR BkColor, U8 Intens);
redbird 0:1bf8f02b0770 531 void GUI__MixColorsBulk (U32 * pFG, U32 * pBG, U32 * pDst, unsigned OffFG, unsigned OffBG, unsigned OffDest, unsigned xSize, unsigned ySize, U8 Intens);
redbird 0:1bf8f02b0770 532
redbird 0:1bf8f02b0770 533 extern const GUI_UC_ENC_APILIST GUI_UC_None;
redbird 0:1bf8f02b0770 534
redbird 0:1bf8f02b0770 535 /*********************************************************************
redbird 0:1bf8f02b0770 536 *
redbird 0:1bf8f02b0770 537 * LCDDEV_L0_xxx
redbird 0:1bf8f02b0770 538 *
redbird 0:1bf8f02b0770 539 **********************************************************************
redbird 0:1bf8f02b0770 540 */
redbird 0:1bf8f02b0770 541 #define LCDDEV_L0_Color2Index GUI__apDevice[GUI_pContext->SelLayer]->pColorConvAPI->pfColor2Index
redbird 0:1bf8f02b0770 542 #define LCDDEV_L0_Index2Color GUI__apDevice[GUI_pContext->SelLayer]->pColorConvAPI->pfIndex2Color
redbird 0:1bf8f02b0770 543
redbird 0:1bf8f02b0770 544 #define LCDDEV_L0_DrawBitmap GUI__apDevice[GUI_pContext->SelLayer]->pDeviceAPI->pfDrawBitmap
redbird 0:1bf8f02b0770 545 #define LCDDEV_L0_DrawHLine GUI__apDevice[GUI_pContext->SelLayer]->pDeviceAPI->pfDrawHLine
redbird 0:1bf8f02b0770 546 #define LCDDEV_L0_DrawVLine GUI__apDevice[GUI_pContext->SelLayer]->pDeviceAPI->pfDrawVLine
redbird 0:1bf8f02b0770 547 #define LCDDEV_L0_DrawPixel GUI__apDevice[GUI_pContext->SelLayer]->pDeviceAPI->pfDrawPixel
redbird 0:1bf8f02b0770 548 #define LCDDEV_L0_FillRect GUI__apDevice[GUI_pContext->SelLayer]->pDeviceAPI->pfFillRect
redbird 0:1bf8f02b0770 549 #define LCDDEV_L0_GetPixel GUI__apDevice[GUI_pContext->SelLayer]->pDeviceAPI->pfGetPixel
redbird 0:1bf8f02b0770 550 #define LCDDEV_L0_GetRect GUI__apDevice[GUI_pContext->SelLayer]->pDeviceAPI->pfGetRect
redbird 0:1bf8f02b0770 551 #define LCDDEV_L0_GetPixelIndex GUI__apDevice[GUI_pContext->SelLayer]->pDeviceAPI->pfGetPixelIndex
redbird 0:1bf8f02b0770 552 #define LCDDEV_L0_SetPixelIndex GUI__apDevice[GUI_pContext->SelLayer]->pDeviceAPI->pfSetPixelIndex
redbird 0:1bf8f02b0770 553 #define LCDDEV_L0_XorPixel GUI__apDevice[GUI_pContext->SelLayer]->pDeviceAPI->pfXorPixel
redbird 0:1bf8f02b0770 554 #define LCDDEV_L0_GetDevFunc GUI__apDevice[GUI_pContext->SelLayer]->pDeviceAPI->pfGetDevFunc
redbird 0:1bf8f02b0770 555
redbird 0:1bf8f02b0770 556 void LCD_ReadRect (int x0, int y0, int x1, int y1, LCD_PIXELINDEX * pBuffer, GUI_DEVICE * pDevice);
redbird 0:1bf8f02b0770 557 void GUI_ReadRect (int x0, int y0, int x1, int y1, LCD_PIXELINDEX * pBuffer, GUI_DEVICE * pDevice);
redbird 0:1bf8f02b0770 558 void GUI_ReadRectEx(int x0, int y0, int x1, int y1, LCD_PIXELINDEX * pBuffer, GUI_DEVICE * pDevice);
redbird 0:1bf8f02b0770 559
redbird 0:1bf8f02b0770 560 void LCD_ReadRectNoClip(int x0, int y0, int x1, int y1, LCD_PIXELINDEX * pBuffer, GUI_DEVICE * pDevice);
redbird 0:1bf8f02b0770 561
redbird 0:1bf8f02b0770 562 /*********************************************************************
redbird 0:1bf8f02b0770 563 *
redbird 0:1bf8f02b0770 564 * Internal color management
redbird 0:1bf8f02b0770 565 *
redbird 0:1bf8f02b0770 566 **********************************************************************
redbird 0:1bf8f02b0770 567 */
redbird 0:1bf8f02b0770 568 typedef struct {
redbird 0:1bf8f02b0770 569 void (* pfSetColor) (LCD_COLOR Index);
redbird 0:1bf8f02b0770 570 void (* pfSetBkColor) (LCD_COLOR Index);
redbird 0:1bf8f02b0770 571 LCD_DRAWMODE (* pfSetDrawMode)(LCD_DRAWMODE dm);
redbird 0:1bf8f02b0770 572 } LCD_SET_COLOR_API;
redbird 0:1bf8f02b0770 573
redbird 0:1bf8f02b0770 574 extern const LCD_SET_COLOR_API * LCD__pSetColorAPI;
redbird 0:1bf8f02b0770 575
redbird 0:1bf8f02b0770 576 #define LCD__SetBkColorIndex(Index) (*GUI_pContext->LCD_pBkColorIndex = Index)
redbird 0:1bf8f02b0770 577 #define LCD__SetColorIndex(Index) (*GUI_pContext->LCD_pColorIndex = Index)
redbird 0:1bf8f02b0770 578 #define LCD__GetBkColorIndex() (*GUI_pContext->LCD_pBkColorIndex)
redbird 0:1bf8f02b0770 579 #define LCD__GetColorIndex() (*GUI_pContext->LCD_pColorIndex)
redbird 0:1bf8f02b0770 580
redbird 0:1bf8f02b0770 581 /* The following 2 defines are only required for compatibility to older versions of the TTF library */
redbird 0:1bf8f02b0770 582 #define LCD_BKCOLORINDEX (*GUI_pContext->LCD_pBkColorIndex)
redbird 0:1bf8f02b0770 583 #define LCD_COLORINDEX (*GUI_pContext->LCD_pColorIndex)
redbird 0:1bf8f02b0770 584
redbird 0:1bf8f02b0770 585 /*********************************************************************
redbird 0:1bf8f02b0770 586 *
redbird 0:1bf8f02b0770 587 * EXTERNs for GL_CORE
redbird 0:1bf8f02b0770 588 *
redbird 0:1bf8f02b0770 589 **********************************************************************
redbird 0:1bf8f02b0770 590 */
redbird 0:1bf8f02b0770 591 extern const GUI_FONT * GUI__pFontDefault;
redbird 0:1bf8f02b0770 592
redbird 0:1bf8f02b0770 593 extern GUI_SADDR GUI_CONTEXT * GUI_pContext;
redbird 0:1bf8f02b0770 594
redbird 0:1bf8f02b0770 595 extern GUI_DEVICE * GUI__apDevice[GUI_NUM_LAYERS];
redbird 0:1bf8f02b0770 596
redbird 0:1bf8f02b0770 597 //
redbird 0:1bf8f02b0770 598 // Function pointer for converting a palette containing a color array into an index array
redbird 0:1bf8f02b0770 599 //
redbird 0:1bf8f02b0770 600 extern LCD_PIXELINDEX * (* GUI_pfGetpPalConvTable)(const LCD_LOGPALETTE * pLogPal, const GUI_BITMAP * pBitmap, int LayerIndex);
redbird 0:1bf8f02b0770 601
redbird 0:1bf8f02b0770 602 //
redbird 0:1bf8f02b0770 603 // Function pointer for mixing up 2 colors
redbird 0:1bf8f02b0770 604 //
redbird 0:1bf8f02b0770 605 extern LCD_COLOR (* GUI__pfMixColors)(LCD_COLOR Color, LCD_COLOR BkColor, U8 Intens);
redbird 0:1bf8f02b0770 606
redbird 0:1bf8f02b0770 607 //
redbird 0:1bf8f02b0770 608 // Function pointer for mixing up arrays of colors
redbird 0:1bf8f02b0770 609 //
redbird 0:1bf8f02b0770 610 extern void (* GUI__pfMixColorsBulk)(U32 * pFG, U32 * pBG, U32 * pDst, unsigned OffFG, unsigned OffBG, unsigned OffDest, unsigned xSize, unsigned ySize, U8 Intens);
redbird 0:1bf8f02b0770 611
redbird 0:1bf8f02b0770 612 #ifdef GL_CORE_C
redbird 0:1bf8f02b0770 613 #define GUI_EXTERN
redbird 0:1bf8f02b0770 614 #else
redbird 0:1bf8f02b0770 615 #define GUI_EXTERN extern
redbird 0:1bf8f02b0770 616 #endif
redbird 0:1bf8f02b0770 617
redbird 0:1bf8f02b0770 618 GUI_EXTERN const GUI_UC_ENC_APILIST * GUI_pUC_API; /* Unicode encoding API */
redbird 0:1bf8f02b0770 619
redbird 0:1bf8f02b0770 620 GUI_EXTERN GUI_SADDR char GUI_DecChar;
redbird 0:1bf8f02b0770 621 GUI_EXTERN GUI_tfTimer * GUI_pfTimerExec;
redbird 0:1bf8f02b0770 622 GUI_EXTERN WM_tfHandlePID * WM_pfHandlePID;
redbird 0:1bf8f02b0770 623 GUI_EXTERN void (* GUI_pfDispCharStyle)(U16 Char);
redbird 0:1bf8f02b0770 624
redbird 0:1bf8f02b0770 625 GUI_EXTERN int GUI__BufferSize; // Required buffer size in pixels for alpha blending and/or antialiasing
redbird 0:1bf8f02b0770 626 GUI_EXTERN int GUI_AA__ClipX0; // x0-clipping value for AA module
redbird 0:1bf8f02b0770 627
redbird 0:1bf8f02b0770 628 GUI_EXTERN I8 GUI__aNumBuffers[GUI_NUM_LAYERS]; // Number of buffers used per layer
redbird 0:1bf8f02b0770 629
redbird 0:1bf8f02b0770 630 #if GUI_SUPPORT_ROTATION
redbird 0:1bf8f02b0770 631 GUI_EXTERN const tLCD_APIList * GUI_pLCD_APIList; /* Used for rotating text */
redbird 0:1bf8f02b0770 632 #endif
redbird 0:1bf8f02b0770 633
redbird 0:1bf8f02b0770 634 GUI_EXTERN I16 GUI_OrgX, GUI_OrgY;
redbird 0:1bf8f02b0770 635
redbird 0:1bf8f02b0770 636 #undef GUI_EXTERN
redbird 0:1bf8f02b0770 637
redbird 0:1bf8f02b0770 638
redbird 0:1bf8f02b0770 639 #if defined(__cplusplus)
redbird 0:1bf8f02b0770 640 }
redbird 0:1bf8f02b0770 641 #endif
redbird 0:1bf8f02b0770 642
redbird 0:1bf8f02b0770 643 #endif /* GUI_PRIVATE_H */
redbird 0:1bf8f02b0770 644
redbird 0:1bf8f02b0770 645 /*************************** End of file ****************************/