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 : WM_Intern.h
redbird 0:1bf8f02b0770 29 Purpose : Windows manager internal include
redbird 0:1bf8f02b0770 30 ----------------------------------------------------------------------
redbird 0:1bf8f02b0770 31 */
redbird 0:1bf8f02b0770 32
redbird 0:1bf8f02b0770 33 #ifndef WM_INTERN_H /* Make sure we only include it once */
redbird 0:1bf8f02b0770 34 #define WM_INTERN_H /* Make sure we only include it once */
redbird 0:1bf8f02b0770 35
redbird 0:1bf8f02b0770 36 #include "WM.h"
redbird 0:1bf8f02b0770 37 #include "GUI_Private.h"
redbird 0:1bf8f02b0770 38
redbird 0:1bf8f02b0770 39
redbird 0:1bf8f02b0770 40 #if defined(__cplusplus)
redbird 0:1bf8f02b0770 41 extern "C" { /* Make sure we have C-declarations in C++ programs */
redbird 0:1bf8f02b0770 42 #endif
redbird 0:1bf8f02b0770 43
redbird 0:1bf8f02b0770 44 #if GUI_WINSUPPORT
redbird 0:1bf8f02b0770 45
redbird 0:1bf8f02b0770 46 /*********************************************************************
redbird 0:1bf8f02b0770 47 *
redbird 0:1bf8f02b0770 48 * defines
redbird 0:1bf8f02b0770 49 *
redbird 0:1bf8f02b0770 50 **********************************************************************
redbird 0:1bf8f02b0770 51
redbird 0:1bf8f02b0770 52 The following could be placed in a file of its own as it is not
redbird 0:1bf8f02b0770 53 used outside of the window manager
redbird 0:1bf8f02b0770 54
redbird 0:1bf8f02b0770 55 */
redbird 0:1bf8f02b0770 56 /* Basic Windows status flags.
redbird 0:1bf8f02b0770 57 For module-internally use only !
redbird 0:1bf8f02b0770 58 */
redbird 0:1bf8f02b0770 59 #define WM_SF_HASTRANS WM_CF_HASTRANS
redbird 0:1bf8f02b0770 60 #define WM_SF_MEMDEV WM_CF_MEMDEV
redbird 0:1bf8f02b0770 61 #define WM_SF_MEMDEV_ON_REDRAW WM_CF_MEMDEV_ON_REDRAW
redbird 0:1bf8f02b0770 62 #define WM_SF_DISABLED WM_CF_DISABLED /* Disabled: Does not receive PID (mouse & touch) input */
redbird 0:1bf8f02b0770 63 #define WM_SF_ISVIS WM_CF_SHOW /* Is visible flag */
redbird 0:1bf8f02b0770 64
redbird 0:1bf8f02b0770 65 #define WM_SF_STAYONTOP WM_CF_STAYONTOP
redbird 0:1bf8f02b0770 66 #define WM_SF_LATE_CLIP WM_CF_LATE_CLIP
redbird 0:1bf8f02b0770 67 #define WM_SF_ANCHOR_RIGHT WM_CF_ANCHOR_RIGHT
redbird 0:1bf8f02b0770 68 #define WM_SF_ANCHOR_BOTTOM WM_CF_ANCHOR_BOTTOM
redbird 0:1bf8f02b0770 69 #define WM_SF_ANCHOR_LEFT WM_CF_ANCHOR_LEFT
redbird 0:1bf8f02b0770 70 #define WM_SF_ANCHOR_TOP WM_CF_ANCHOR_TOP
redbird 0:1bf8f02b0770 71
redbird 0:1bf8f02b0770 72 #define WM_SF_INVALID WM_CF_ACTIVATE /* We reuse this flag, as it is create only and Invalid is status only */
redbird 0:1bf8f02b0770 73
redbird 0:1bf8f02b0770 74 #define WM_SF_CONST_OUTLINE WM_CF_CONST_OUTLINE /* Constant outline.*/
redbird 0:1bf8f02b0770 75
redbird 0:1bf8f02b0770 76 #define WM_H2P(hWin) ((WM_Obj*)GUI_ALLOC_h2p(hWin))
redbird 0:1bf8f02b0770 77
redbird 0:1bf8f02b0770 78
redbird 0:1bf8f02b0770 79 #if GUI_DEBUG_LEVEL >= GUI_DEBUG_LEVEL_LOG_WARNINGS
redbird 0:1bf8f02b0770 80 #define WM_ASSERT_NOT_IN_PAINT() { if (WM__PaintCallbackCnt) \
redbird 0:1bf8f02b0770 81 GUI_DEBUG_ERROROUT("Function may not be called from within a paint event"); \
redbird 0:1bf8f02b0770 82 }
redbird 0:1bf8f02b0770 83 #else
redbird 0:1bf8f02b0770 84 #define WM_ASSERT_NOT_IN_PAINT()
redbird 0:1bf8f02b0770 85 #endif
redbird 0:1bf8f02b0770 86
redbird 0:1bf8f02b0770 87 /*********************************************************************
redbird 0:1bf8f02b0770 88 *
redbird 0:1bf8f02b0770 89 * Data types & structures
redbird 0:1bf8f02b0770 90 *
redbird 0:1bf8f02b0770 91 **********************************************************************
redbird 0:1bf8f02b0770 92 */
redbird 0:1bf8f02b0770 93 typedef struct {
redbird 0:1bf8f02b0770 94 WM_HWIN hOld;
redbird 0:1bf8f02b0770 95 WM_HWIN hNew;
redbird 0:1bf8f02b0770 96 } WM_NOTIFY_CHILD_HAS_FOCUS_INFO;
redbird 0:1bf8f02b0770 97
redbird 0:1bf8f02b0770 98 typedef struct WM_CRITICAL_HANDLE {
redbird 0:1bf8f02b0770 99 struct WM_CRITICAL_HANDLE * pNext;
redbird 0:1bf8f02b0770 100 volatile WM_HWIN hWin;
redbird 0:1bf8f02b0770 101 } WM_CRITICAL_HANDLE;
redbird 0:1bf8f02b0770 102
redbird 0:1bf8f02b0770 103 /*********************************************************************
redbird 0:1bf8f02b0770 104 *
redbird 0:1bf8f02b0770 105 * Data (extern)
redbird 0:1bf8f02b0770 106 *
redbird 0:1bf8f02b0770 107 **********************************************************************
redbird 0:1bf8f02b0770 108 */
redbird 0:1bf8f02b0770 109 extern U32 WM__CreateFlags;
redbird 0:1bf8f02b0770 110 extern WM_HWIN WM__ahCapture[GUI_NUM_LAYERS];
redbird 0:1bf8f02b0770 111 extern WM_HWIN WM__ahWinFocus[GUI_NUM_LAYERS];
redbird 0:1bf8f02b0770 112 extern char WM__CaptureReleaseAuto;
redbird 0:1bf8f02b0770 113 extern WM_tfPollPID * WM_pfPollPID;
redbird 0:1bf8f02b0770 114 extern U8 WM__PaintCallbackCnt; /* Public for assertions only */
redbird 0:1bf8f02b0770 115 extern WM_HWIN WM__hCreateStatic;
redbird 0:1bf8f02b0770 116
redbird 0:1bf8f02b0770 117 #if WM_SUPPORT_TRANSPARENCY
redbird 0:1bf8f02b0770 118 extern int WM__TransWindowCnt;
redbird 0:1bf8f02b0770 119 extern WM_HWIN WM__hATransWindow;
redbird 0:1bf8f02b0770 120 #endif
redbird 0:1bf8f02b0770 121
redbird 0:1bf8f02b0770 122 #if WM_SUPPORT_DIAG
redbird 0:1bf8f02b0770 123 extern void (*WM__pfShowInvalid)(WM_HWIN hWin);
redbird 0:1bf8f02b0770 124 #endif
redbird 0:1bf8f02b0770 125
redbird 0:1bf8f02b0770 126 extern WM_CRITICAL_HANDLE WM__aCHWinModal[GUI_NUM_LAYERS];
redbird 0:1bf8f02b0770 127 extern WM_CRITICAL_HANDLE WM__aCHWinLast[GUI_NUM_LAYERS];
redbird 0:1bf8f02b0770 128
redbird 0:1bf8f02b0770 129 #if GUI_SUPPORT_MOUSE
redbird 0:1bf8f02b0770 130 extern WM_CRITICAL_HANDLE WM__aCHWinMouseOver[GUI_NUM_LAYERS];
redbird 0:1bf8f02b0770 131 #endif
redbird 0:1bf8f02b0770 132
redbird 0:1bf8f02b0770 133 #ifdef WM_C
redbird 0:1bf8f02b0770 134 #define GUI_EXTERN
redbird 0:1bf8f02b0770 135 #else
redbird 0:1bf8f02b0770 136 #define GUI_EXTERN extern
redbird 0:1bf8f02b0770 137 #endif
redbird 0:1bf8f02b0770 138
redbird 0:1bf8f02b0770 139 #if (GUI_NUM_LAYERS > 1)
redbird 0:1bf8f02b0770 140 GUI_EXTERN unsigned WM__TouchedLayer;
redbird 0:1bf8f02b0770 141 #define WM__TOUCHED_LAYER WM__TouchedLayer
redbird 0:1bf8f02b0770 142 #else
redbird 0:1bf8f02b0770 143 #define WM__TOUCHED_LAYER GUI_CURSOR_LAYER
redbird 0:1bf8f02b0770 144 #endif
redbird 0:1bf8f02b0770 145
redbird 0:1bf8f02b0770 146 GUI_EXTERN U16 WM__NumWindows;
redbird 0:1bf8f02b0770 147 GUI_EXTERN U16 WM__NumInvalidWindows;
redbird 0:1bf8f02b0770 148 GUI_EXTERN WM_HWIN WM__FirstWin;
redbird 0:1bf8f02b0770 149 GUI_EXTERN WM_CRITICAL_HANDLE * WM__pFirstCriticalHandle;
redbird 0:1bf8f02b0770 150
redbird 0:1bf8f02b0770 151 GUI_EXTERN WM_HWIN WM__ahDesktopWin[GUI_NUM_LAYERS];
redbird 0:1bf8f02b0770 152 GUI_EXTERN GUI_COLOR WM__aBkColor[GUI_NUM_LAYERS];
redbird 0:1bf8f02b0770 153
redbird 0:1bf8f02b0770 154 #undef GUI_EXTERN
redbird 0:1bf8f02b0770 155
redbird 0:1bf8f02b0770 156 /*********************************************************************
redbird 0:1bf8f02b0770 157 *
redbird 0:1bf8f02b0770 158 * Prototypes
redbird 0:1bf8f02b0770 159 *
redbird 0:1bf8f02b0770 160 **********************************************************************
redbird 0:1bf8f02b0770 161 */
redbird 0:1bf8f02b0770 162 void WM__ActivateClipRect (void);
redbird 0:1bf8f02b0770 163 int WM__ClipAtParentBorders (GUI_RECT * pRect, WM_HWIN hWin);
redbird 0:1bf8f02b0770 164 void WM__Client2Screen (const WM_Obj * pWin, GUI_RECT * pRect);
redbird 0:1bf8f02b0770 165 void WM__DeleteAssocTimer (WM_HWIN hWin);
redbird 0:1bf8f02b0770 166 void WM__DeleteSecure (WM_HWIN hWin);
redbird 0:1bf8f02b0770 167 void WM__DetachWindow (WM_HWIN hChild);
redbird 0:1bf8f02b0770 168 void WM__ForEachDesc (WM_HWIN hWin, WM_tfForEach * pcb, void * pData);
redbird 0:1bf8f02b0770 169 void WM__GetClientRectWin (const WM_Obj * pWin, GUI_RECT * pRect);
redbird 0:1bf8f02b0770 170 void WM__GetClientRectEx (WM_HWIN hWin, GUI_RECT * pRect);
redbird 0:1bf8f02b0770 171 WM_HWIN WM__GetFirstSibling (WM_HWIN hWin);
redbird 0:1bf8f02b0770 172 WM_HWIN WM__GetFocussedChild (WM_HWIN hWin);
redbird 0:1bf8f02b0770 173 int WM__GetHasFocus (WM_HWIN hWin);
redbird 0:1bf8f02b0770 174 WM_HWIN WM__GetLastSibling (WM_HWIN hWin);
redbird 0:1bf8f02b0770 175 WM_HWIN WM__GetPrevSibling (WM_HWIN hWin);
redbird 0:1bf8f02b0770 176 int WM__GetTopLevelLayer (WM_HWIN hWin);
redbird 0:1bf8f02b0770 177 int WM__GetWindowSizeX (const WM_Obj * pWin);
redbird 0:1bf8f02b0770 178 int WM__GetWindowSizeY (const WM_Obj * pWin);
redbird 0:1bf8f02b0770 179 void WM__InsertWindowIntoList (WM_HWIN hWin, WM_HWIN hParent);
redbird 0:1bf8f02b0770 180 void WM__Invalidate1Abs (WM_HWIN hWin, const GUI_RECT * pRect);
redbird 0:1bf8f02b0770 181 void WM__InvalidateAreaBelow (const GUI_RECT * pRect, WM_HWIN StopWin);
redbird 0:1bf8f02b0770 182 void WM__InvalidateRectEx (const GUI_RECT * pInvalidRect, WM_HWIN hParent, WM_HWIN hStop);
redbird 0:1bf8f02b0770 183 void WM__InvalidateTransAreaAbove(const GUI_RECT * pRect, WM_HWIN StopWin);
redbird 0:1bf8f02b0770 184 int WM__IntersectRect (GUI_RECT * pDest, const GUI_RECT * pr0, const GUI_RECT * pr1);
redbird 0:1bf8f02b0770 185 int WM__IsAncestor (WM_HWIN hChild, WM_HWIN hParent);
redbird 0:1bf8f02b0770 186 int WM__IsAncestorOrSelf (WM_HWIN hChild, WM_HWIN hParent);
redbird 0:1bf8f02b0770 187 int WM__IsChild (WM_HWIN hWin, WM_HWIN hParent);
redbird 0:1bf8f02b0770 188 int WM__IsEnabled (WM_HWIN hWin);
redbird 0:1bf8f02b0770 189 int WM__IsInModalArea (WM_HWIN hWin);
redbird 0:1bf8f02b0770 190 int WM__IsInWindow (WM_Obj * pWin, int x, int y);
redbird 0:1bf8f02b0770 191 int WM__IsWindow (WM_HWIN hWin);
redbird 0:1bf8f02b0770 192 void WM__LeaveIVRSearch (void);
redbird 0:1bf8f02b0770 193 void WM__MoveTo (WM_HWIN hWin, int x, int y);
redbird 0:1bf8f02b0770 194 void WM__MoveWindow (WM_HWIN hWin, int dx, int dy);
redbird 0:1bf8f02b0770 195 void WM__NotifyVisChanged (WM_HWIN hWin, GUI_RECT * pRect);
redbird 0:1bf8f02b0770 196 int WM__RectIsNZ (const GUI_RECT * pr);
redbird 0:1bf8f02b0770 197 void WM__RemoveWindowFromList (WM_HWIN hWin);
redbird 0:1bf8f02b0770 198 void WM__RemoveFromLinList (WM_HWIN hWin);
redbird 0:1bf8f02b0770 199 void WM__Screen2Client (const WM_Obj * pWin, GUI_RECT * pRect);
redbird 0:1bf8f02b0770 200 void WM__SelectTopLevelLayer (WM_HWIN hWin);
redbird 0:1bf8f02b0770 201 void WM__SendMsgNoData (WM_HWIN hWin, U8 MsgId);
redbird 0:1bf8f02b0770 202 void WM__SendMessage (WM_HWIN hWin, WM_MESSAGE * pm);
redbird 0:1bf8f02b0770 203 void WM__SendMessageIfEnabled (WM_HWIN hWin, WM_MESSAGE * pm);
redbird 0:1bf8f02b0770 204 void WM__SendMessageNoPara (WM_HWIN hWin, int MsgId);
redbird 0:1bf8f02b0770 205 void WM__SendPIDMessage (WM_HWIN hWin, WM_MESSAGE * pMsg);
redbird 0:1bf8f02b0770 206 int WM__SetScrollbarH (WM_HWIN hWin, int OnOff);
redbird 0:1bf8f02b0770 207 int WM__SetScrollbarV (WM_HWIN hWin, int OnOff);
redbird 0:1bf8f02b0770 208 void WM__UpdateChildPositions (WM_Obj * pObj, int dx0, int dy0, int dx1, int dy1);
redbird 0:1bf8f02b0770 209 void WM_PID__GetPrevState (GUI_PID_STATE * pPrevState, int Layer);
redbird 0:1bf8f02b0770 210 void WM_PID__SetPrevState (GUI_PID_STATE * pPrevState, int Layer);
redbird 0:1bf8f02b0770 211 void WM__SendTouchMessage (WM_HWIN hWin, WM_MESSAGE * pMsg);
redbird 0:1bf8f02b0770 212
redbird 0:1bf8f02b0770 213 U16 WM_GetFlags (WM_HWIN hWin);
redbird 0:1bf8f02b0770 214 int WM__Paint (WM_HWIN hWin);
redbird 0:1bf8f02b0770 215 void WM__Paint1 (WM_HWIN hWin);
redbird 0:1bf8f02b0770 216 void WM__AddCriticalHandle (WM_CRITICAL_HANDLE * pCH);
redbird 0:1bf8f02b0770 217 void WM__RemoveCriticalHandle (WM_CRITICAL_HANDLE * pCH);
redbird 0:1bf8f02b0770 218 void WM__SetLastTouched (WM_HWIN hWin);
redbird 0:1bf8f02b0770 219
redbird 0:1bf8f02b0770 220 #if WM_SUPPORT_STATIC_MEMDEV
redbird 0:1bf8f02b0770 221 void WM__InvalidateDrawAndDescs(WM_HWIN hWin);
redbird 0:1bf8f02b0770 222 #else
redbird 0:1bf8f02b0770 223 #define WM__InvalidateDrawAndDescs(hWin)
redbird 0:1bf8f02b0770 224 #endif
redbird 0:1bf8f02b0770 225
redbird 0:1bf8f02b0770 226 /* Static memory devices */
redbird 0:1bf8f02b0770 227 #if (GUI_SUPPORT_MEMDEV)
redbird 0:1bf8f02b0770 228 typedef struct {
redbird 0:1bf8f02b0770 229 int xSize, ySize; // Size of bk window
redbird 0:1bf8f02b0770 230 } EFFECT_CONTEXT;
redbird 0:1bf8f02b0770 231
redbird 0:1bf8f02b0770 232 int GUI_MEMDEV__CalcParaFadeIn (int Period, int TimeUsed);
redbird 0:1bf8f02b0770 233 void GUI_MEMDEV__ChangeBK (EFFECT_CONTEXT * pContext);
redbird 0:1bf8f02b0770 234 void GUI_MEMDEV__RemoveStaticDevice(WM_HWIN hWin);
redbird 0:1bf8f02b0770 235 void GUI_MEMDEV__UndoBK (EFFECT_CONTEXT * pContext);
redbird 0:1bf8f02b0770 236 #endif
redbird 0:1bf8f02b0770 237
redbird 0:1bf8f02b0770 238 void WM__InvalidateParent(const GUI_RECT * pInvalidRect, WM_HWIN hParent, WM_HWIN hStop);
redbird 0:1bf8f02b0770 239 void WM__InvalidateRect (const GUI_RECT * pInvalidRect, WM_HWIN hParent, WM_HWIN hStop, U16 Flags);
redbird 0:1bf8f02b0770 240
redbird 0:1bf8f02b0770 241 WM_tfInvalidateParent WM__SetInvalidateParentFunc(WM_tfInvalidateParent pfInvalidateParentFunc);
redbird 0:1bf8f02b0770 242 WM_tfInvalidateDrawFunc WM__SetInvalidateDrawFunc (WM_tfInvalidateDrawFunc pfInvalidateDrawFunc);
redbird 0:1bf8f02b0770 243 WM_tfPaint1Func WM__SetPaint1Func (WM_tfPaint1Func pfPaint1Func);
redbird 0:1bf8f02b0770 244
redbird 0:1bf8f02b0770 245 #endif /* GUI_WINSUPPORT */
redbird 0:1bf8f02b0770 246
redbird 0:1bf8f02b0770 247 #if defined(__cplusplus)
redbird 0:1bf8f02b0770 248 }
redbird 0:1bf8f02b0770 249 #endif
redbird 0:1bf8f02b0770 250
redbird 0:1bf8f02b0770 251 #endif /* WM_INTERN_H */
redbird 0:1bf8f02b0770 252
redbird 0:1bf8f02b0770 253 /*************************** End of file ****************************/