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 : CHECKBOX.h
redbird 0:1bf8f02b0770 29 Purpose : CHECKBOX include
redbird 0:1bf8f02b0770 30 --------------------END-OF-HEADER-------------------------------------
redbird 0:1bf8f02b0770 31 */
redbird 0:1bf8f02b0770 32
redbird 0:1bf8f02b0770 33 #ifndef CHECKBOX_H
redbird 0:1bf8f02b0770 34 #define CHECKBOX_H
redbird 0:1bf8f02b0770 35
redbird 0:1bf8f02b0770 36 #include "WM.h"
redbird 0:1bf8f02b0770 37 #include "DIALOG_Intern.h" /* Req. for Create indirect data structure */
redbird 0:1bf8f02b0770 38 #include "WIDGET.h"
redbird 0:1bf8f02b0770 39
redbird 0:1bf8f02b0770 40 #if GUI_WINSUPPORT
redbird 0:1bf8f02b0770 41
redbird 0:1bf8f02b0770 42 #if defined(__cplusplus)
redbird 0:1bf8f02b0770 43 extern "C" { /* Make sure we have C-declarations in C++ programs */
redbird 0:1bf8f02b0770 44 #endif
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
redbird 0:1bf8f02b0770 53 /*********************************************************************
redbird 0:1bf8f02b0770 54 *
redbird 0:1bf8f02b0770 55 * Color indices
redbird 0:1bf8f02b0770 56 */
redbird 0:1bf8f02b0770 57 #define CHECKBOX_CI_DISABLED 0
redbird 0:1bf8f02b0770 58 #define CHECKBOX_CI_ENABLED 1
redbird 0:1bf8f02b0770 59
redbird 0:1bf8f02b0770 60 /*********************************************************************
redbird 0:1bf8f02b0770 61 *
redbird 0:1bf8f02b0770 62 * Bitmap indices
redbird 0:1bf8f02b0770 63 */
redbird 0:1bf8f02b0770 64 #define CHECKBOX_BI_INACTIV_UNCHECKED 0
redbird 0:1bf8f02b0770 65 #define CHECKBOX_BI_ACTIV_UNCHECKED 1
redbird 0:1bf8f02b0770 66 #define CHECKBOX_BI_INACTIV_CHECKED 2
redbird 0:1bf8f02b0770 67 #define CHECKBOX_BI_ACTIV_CHECKED 3
redbird 0:1bf8f02b0770 68 #define CHECKBOX_BI_INACTIV_3STATE 4
redbird 0:1bf8f02b0770 69 #define CHECKBOX_BI_ACTIV_3STATE 5
redbird 0:1bf8f02b0770 70
redbird 0:1bf8f02b0770 71 /*********************************************************************
redbird 0:1bf8f02b0770 72 *
redbird 0:1bf8f02b0770 73 * Skinning property indices
redbird 0:1bf8f02b0770 74 */
redbird 0:1bf8f02b0770 75 #define CHECKBOX_SKINFLEX_PI_ENABLED 0
redbird 0:1bf8f02b0770 76 #define CHECKBOX_SKINFLEX_PI_DISABLED 1
redbird 0:1bf8f02b0770 77
redbird 0:1bf8f02b0770 78 /*********************************************************************
redbird 0:1bf8f02b0770 79 *
redbird 0:1bf8f02b0770 80 * Public Types
redbird 0:1bf8f02b0770 81 *
redbird 0:1bf8f02b0770 82 **********************************************************************
redbird 0:1bf8f02b0770 83 */
redbird 0:1bf8f02b0770 84 typedef WM_HMEM CHECKBOX_Handle;
redbird 0:1bf8f02b0770 85
redbird 0:1bf8f02b0770 86 typedef struct {
redbird 0:1bf8f02b0770 87 GUI_COLOR aColorFrame[3];
redbird 0:1bf8f02b0770 88 GUI_COLOR aColorInner[2];
redbird 0:1bf8f02b0770 89 GUI_COLOR ColorCheck;
redbird 0:1bf8f02b0770 90 int ButtonSize;
redbird 0:1bf8f02b0770 91 } CHECKBOX_SKINFLEX_PROPS;
redbird 0:1bf8f02b0770 92
redbird 0:1bf8f02b0770 93 /*********************************************************************
redbird 0:1bf8f02b0770 94 *
redbird 0:1bf8f02b0770 95 * Create functions
redbird 0:1bf8f02b0770 96 *
redbird 0:1bf8f02b0770 97 **********************************************************************
redbird 0:1bf8f02b0770 98 */
redbird 0:1bf8f02b0770 99 CHECKBOX_Handle CHECKBOX_Create (int x0, int y0, int xSize, int ySize, WM_HWIN hParent, int Id, int Flags);
redbird 0:1bf8f02b0770 100 CHECKBOX_Handle CHECKBOX_CreateEx (int x0, int y0, int xSize, int ySize, WM_HWIN hParent, int WinFlags, int ExFlags, int Id);
redbird 0:1bf8f02b0770 101 CHECKBOX_Handle CHECKBOX_CreateUser (int x0, int y0, int xSize, int ySize, WM_HWIN hParent, int WinFlags, int ExFlags, int Id, int NumExtraBytes);
redbird 0:1bf8f02b0770 102 CHECKBOX_Handle CHECKBOX_CreateIndirect(const GUI_WIDGET_CREATE_INFO * pCreateInfo, WM_HWIN hWinParent, int x0, int y0, WM_CALLBACK * cb);
redbird 0:1bf8f02b0770 103
redbird 0:1bf8f02b0770 104 /*********************************************************************
redbird 0:1bf8f02b0770 105 *
redbird 0:1bf8f02b0770 106 * The callback ...
redbird 0:1bf8f02b0770 107 *
redbird 0:1bf8f02b0770 108 * Do not call it directly ! It is only to be used from within an
redbird 0:1bf8f02b0770 109 * overwritten callback.
redbird 0:1bf8f02b0770 110 */
redbird 0:1bf8f02b0770 111 void CHECKBOX_Callback(WM_MESSAGE * pMsg);
redbird 0:1bf8f02b0770 112
redbird 0:1bf8f02b0770 113 /*********************************************************************
redbird 0:1bf8f02b0770 114 *
redbird 0:1bf8f02b0770 115 * Standard member functions
redbird 0:1bf8f02b0770 116 *
redbird 0:1bf8f02b0770 117 **********************************************************************
redbird 0:1bf8f02b0770 118 */
redbird 0:1bf8f02b0770 119
redbird 0:1bf8f02b0770 120 int CHECKBOX_GetDefaultAlign (void);
redbird 0:1bf8f02b0770 121 GUI_COLOR CHECKBOX_GetDefaultBkColor (void);
redbird 0:1bf8f02b0770 122 const GUI_FONT * CHECKBOX_GetDefaultFont (void);
redbird 0:1bf8f02b0770 123 int CHECKBOX_GetDefaultSpacing (void);
redbird 0:1bf8f02b0770 124 int CHECKBOX_GetDefaultTextAlign (void);
redbird 0:1bf8f02b0770 125 GUI_COLOR CHECKBOX_GetDefaultTextColor (void);
redbird 0:1bf8f02b0770 126 int CHECKBOX_GetUserData (CHECKBOX_Handle hObj, void * pDest, int NumBytes);
redbird 0:1bf8f02b0770 127 void CHECKBOX_SetDefaultAlign (int Align);
redbird 0:1bf8f02b0770 128 void CHECKBOX_SetDefaultBkColor (GUI_COLOR Color);
redbird 0:1bf8f02b0770 129 GUI_COLOR CHECKBOX_SetDefaultFocusColor(GUI_COLOR Color);
redbird 0:1bf8f02b0770 130 void CHECKBOX_SetDefaultFont (const GUI_FONT * pFont);
redbird 0:1bf8f02b0770 131 void CHECKBOX_SetDefaultImage (const GUI_BITMAP * pBitmap, unsigned int Index);
redbird 0:1bf8f02b0770 132 void CHECKBOX_SetDefaultSpacing (int Spacing);
redbird 0:1bf8f02b0770 133 void CHECKBOX_SetDefaultTextAlign (int Align);
redbird 0:1bf8f02b0770 134 void CHECKBOX_SetDefaultTextColor (GUI_COLOR Color);
redbird 0:1bf8f02b0770 135 int CHECKBOX_SetUserData (CHECKBOX_Handle hObj, const void * pSrc, int NumBytes);
redbird 0:1bf8f02b0770 136
redbird 0:1bf8f02b0770 137 /*********************************************************************
redbird 0:1bf8f02b0770 138 *
redbird 0:1bf8f02b0770 139 * Member functions
redbird 0:1bf8f02b0770 140 *
redbird 0:1bf8f02b0770 141 **********************************************************************
redbird 0:1bf8f02b0770 142 */
redbird 0:1bf8f02b0770 143
redbird 0:1bf8f02b0770 144 int CHECKBOX_GetState (CHECKBOX_Handle hObj);
redbird 0:1bf8f02b0770 145 int CHECKBOX_GetText (CHECKBOX_Handle hObj, char * pBuffer, int MaxLen);
redbird 0:1bf8f02b0770 146 int CHECKBOX_IsChecked (CHECKBOX_Handle hObj);
redbird 0:1bf8f02b0770 147 void CHECKBOX_SetBkColor (CHECKBOX_Handle hObj, GUI_COLOR Color);
redbird 0:1bf8f02b0770 148 GUI_COLOR CHECKBOX_SetBoxBkColor(CHECKBOX_Handle hObj, GUI_COLOR Color, int Index);
redbird 0:1bf8f02b0770 149 GUI_COLOR CHECKBOX_SetFocusColor(CHECKBOX_Handle hObj, GUI_COLOR Color);
redbird 0:1bf8f02b0770 150 void CHECKBOX_SetFont (CHECKBOX_Handle hObj, const GUI_FONT * pFont);
redbird 0:1bf8f02b0770 151 void CHECKBOX_SetImage (CHECKBOX_Handle hObj, const GUI_BITMAP * pBitmap, unsigned int Index);
redbird 0:1bf8f02b0770 152 void CHECKBOX_SetNumStates (CHECKBOX_Handle hObj, unsigned NumStates);
redbird 0:1bf8f02b0770 153 void CHECKBOX_SetSpacing (CHECKBOX_Handle hObj, unsigned Spacing);
redbird 0:1bf8f02b0770 154 void CHECKBOX_SetState (CHECKBOX_Handle hObj, unsigned State);
redbird 0:1bf8f02b0770 155 void CHECKBOX_SetText (CHECKBOX_Handle hObj, const char * pText);
redbird 0:1bf8f02b0770 156 void CHECKBOX_SetTextAlign (CHECKBOX_Handle hObj, int Align);
redbird 0:1bf8f02b0770 157 void CHECKBOX_SetTextColor (CHECKBOX_Handle hObj, GUI_COLOR Color);
redbird 0:1bf8f02b0770 158
redbird 0:1bf8f02b0770 159 /*********************************************************************
redbird 0:1bf8f02b0770 160 *
redbird 0:1bf8f02b0770 161 * Member functions: Skinning
redbird 0:1bf8f02b0770 162 *
redbird 0:1bf8f02b0770 163 **********************************************************************
redbird 0:1bf8f02b0770 164 */
redbird 0:1bf8f02b0770 165 void CHECKBOX_GetSkinFlexProps (CHECKBOX_SKINFLEX_PROPS * pProps, int Index);
redbird 0:1bf8f02b0770 166 void CHECKBOX_SetSkinClassic (CHECKBOX_Handle hObj);
redbird 0:1bf8f02b0770 167 void CHECKBOX_SetSkin (CHECKBOX_Handle hObj, WIDGET_DRAW_ITEM_FUNC * pfDrawSkin);
redbird 0:1bf8f02b0770 168 int CHECKBOX_DrawSkinFlex (const WIDGET_ITEM_DRAW_INFO * pDrawItemInfo);
redbird 0:1bf8f02b0770 169 void CHECKBOX_SetSkinFlexProps (const CHECKBOX_SKINFLEX_PROPS * pProps, int Index);
redbird 0:1bf8f02b0770 170 void CHECKBOX_SetDefaultSkinClassic (void);
redbird 0:1bf8f02b0770 171 int CHECKBOX_GetSkinFlexButtonSize (CHECKBOX_Handle hObj);
redbird 0:1bf8f02b0770 172 void CHECKBOX_SetSkinFlexButtonSize (CHECKBOX_Handle hObj, int ButtonSize);
redbird 0:1bf8f02b0770 173 WIDGET_DRAW_ITEM_FUNC * CHECKBOX_SetDefaultSkin(WIDGET_DRAW_ITEM_FUNC * pfDrawSkin);
redbird 0:1bf8f02b0770 174
redbird 0:1bf8f02b0770 175 #define CHECKBOX_SKIN_FLEX CHECKBOX_DrawSkinFlex
redbird 0:1bf8f02b0770 176
redbird 0:1bf8f02b0770 177 /*********************************************************************
redbird 0:1bf8f02b0770 178 *
redbird 0:1bf8f02b0770 179 * Macros for compatibility
redbird 0:1bf8f02b0770 180 *
redbird 0:1bf8f02b0770 181 **********************************************************************
redbird 0:1bf8f02b0770 182 */
redbird 0:1bf8f02b0770 183
redbird 0:1bf8f02b0770 184 #define CHECKBOX_Check(hObj) CHECKBOX_SetState(hObj, 1)
redbird 0:1bf8f02b0770 185 #define CHECKBOX_Uncheck(hObj) CHECKBOX_SetState(hObj, 0)
redbird 0:1bf8f02b0770 186
redbird 0:1bf8f02b0770 187 #define CHECKBOX_BI_INACTIV CHECKBOX_BI_INACTIV_CHECKED
redbird 0:1bf8f02b0770 188 #define CHECKBOX_BI_ACTIV CHECKBOX_BI_ACTIV_CHECKED
redbird 0:1bf8f02b0770 189
redbird 0:1bf8f02b0770 190 #if defined(__cplusplus)
redbird 0:1bf8f02b0770 191 }
redbird 0:1bf8f02b0770 192 #endif
redbird 0:1bf8f02b0770 193
redbird 0:1bf8f02b0770 194 #endif // GUI_WINSUPPORT
redbird 0:1bf8f02b0770 195 #endif // CHECKBOX_H
redbird 0:1bf8f02b0770 196
redbird 0:1bf8f02b0770 197 /*************************** End of file ****************************/