Nuvoton
/
NuMaker-mbed-emWin-example
NuMaker emWin HMI
emWin/Include/ICONVIEW_Private.h@10:c8165817d92a, 6 months ago (annotated)
- Committer:
- csyang2
- Date:
- Mon Mar 04 15:47:41 2024 +0800
- Revision:
- 10:c8165817d92a
- Parent:
- 1:c0f972361605
Support NuMaker-IoT-M467
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
csyang2 |
1:c0f972361605 | 1 | /********************************************************************* |
csyang2 |
1:c0f972361605 | 2 | * SEGGER Software GmbH * |
csyang2 |
1:c0f972361605 | 3 | * Solutions for real time microcontroller applications * |
csyang2 |
1:c0f972361605 | 4 | ********************************************************************** |
csyang2 |
1:c0f972361605 | 5 | * * |
csyang2 |
1:c0f972361605 | 6 | * (c) 1996 - 2018 SEGGER Microcontroller GmbH * |
csyang2 |
1:c0f972361605 | 7 | * * |
csyang2 |
1:c0f972361605 | 8 | * Internet: www.segger.com Support: support@segger.com * |
csyang2 |
1:c0f972361605 | 9 | * * |
csyang2 |
1:c0f972361605 | 10 | ********************************************************************** |
csyang2 |
1:c0f972361605 | 11 | |
csyang2 |
1:c0f972361605 | 12 | ** emWin V5.48 - Graphical user interface for embedded applications ** |
csyang2 |
1:c0f972361605 | 13 | All Intellectual Property rights in the Software belongs to SEGGER. |
csyang2 |
1:c0f972361605 | 14 | emWin is protected by international copyright laws. Knowledge of the |
csyang2 |
1:c0f972361605 | 15 | source code may not be used to write a similar product. This file may |
csyang2 |
1:c0f972361605 | 16 | only be used in accordance with the following terms: |
csyang2 |
1:c0f972361605 | 17 | |
csyang2 |
1:c0f972361605 | 18 | The software has been licensed by SEGGER Software GmbH to Nuvoton Technology Corporationat the address: No. 4, Creation Rd. III, Hsinchu Science Park, Taiwan |
csyang2 |
1:c0f972361605 | 19 | for the purposes of creating libraries for its |
csyang2 |
1:c0f972361605 | 20 | Arm Cortex-M and Arm9 32-bit microcontrollers, commercialized and distributed by Nuvoton Technology Corporation |
csyang2 |
1:c0f972361605 | 21 | under the terms and conditions of an End User |
csyang2 |
1:c0f972361605 | 22 | License Agreement supplied with the libraries. |
csyang2 |
1:c0f972361605 | 23 | Full source code is available at: www.segger.com |
csyang2 |
1:c0f972361605 | 24 | |
csyang2 |
1:c0f972361605 | 25 | We appreciate your understanding and fairness. |
csyang2 |
1:c0f972361605 | 26 | ---------------------------------------------------------------------- |
csyang2 |
1:c0f972361605 | 27 | Licensing information |
csyang2 |
1:c0f972361605 | 28 | Licensor: SEGGER Software GmbH |
csyang2 |
1:c0f972361605 | 29 | Licensed to: Nuvoton Technology Corporation, No. 4, Creation Rd. III, Hsinchu Science Park, 30077 Hsinchu City, Taiwan |
csyang2 |
1:c0f972361605 | 30 | Licensed SEGGER software: emWin |
csyang2 |
1:c0f972361605 | 31 | License number: GUI-00735 |
csyang2 |
1:c0f972361605 | 32 | License model: emWin License Agreement, signed February 27, 2018 |
csyang2 |
1:c0f972361605 | 33 | Licensed platform: Cortex-M and ARM9 32-bit series microcontroller designed and manufactured by or for Nuvoton Technology Corporation |
csyang2 |
1:c0f972361605 | 34 | ---------------------------------------------------------------------- |
csyang2 |
1:c0f972361605 | 35 | Support and Update Agreement (SUA) |
csyang2 |
1:c0f972361605 | 36 | SUA period: 2018-03-26 - 2019-03-27 |
csyang2 |
1:c0f972361605 | 37 | Contact to extend SUA: sales@segger.com |
csyang2 |
1:c0f972361605 | 38 | ---------------------------------------------------------------------- |
csyang2 |
1:c0f972361605 | 39 | File : ICONVIEW_Private.h |
csyang2 |
1:c0f972361605 | 40 | Purpose : ICONVIEW private header file |
csyang2 |
1:c0f972361605 | 41 | --------------------END-OF-HEADER------------------------------------- |
csyang2 |
1:c0f972361605 | 42 | */ |
csyang2 |
1:c0f972361605 | 43 | |
csyang2 |
1:c0f972361605 | 44 | #ifndef ICONVIEW_PRIVATE_H |
csyang2 |
1:c0f972361605 | 45 | #define ICONVIEW_PRIVATE_H |
csyang2 |
1:c0f972361605 | 46 | |
csyang2 |
1:c0f972361605 | 47 | #include "WM.h" |
csyang2 |
1:c0f972361605 | 48 | #include "GUI_ARRAY.h" |
csyang2 |
1:c0f972361605 | 49 | #include "ICONVIEW.h" |
csyang2 |
1:c0f972361605 | 50 | |
csyang2 |
1:c0f972361605 | 51 | #if GUI_WINSUPPORT |
csyang2 |
1:c0f972361605 | 52 | |
csyang2 |
1:c0f972361605 | 53 | #if defined(__cplusplus) |
csyang2 |
1:c0f972361605 | 54 | extern "C" { // Make sure we have C-declarations in C++ programs |
csyang2 |
1:c0f972361605 | 55 | #endif |
csyang2 |
1:c0f972361605 | 56 | |
csyang2 |
1:c0f972361605 | 57 | /********************************************************************* |
csyang2 |
1:c0f972361605 | 58 | * |
csyang2 |
1:c0f972361605 | 59 | * Types |
csyang2 |
1:c0f972361605 | 60 | * |
csyang2 |
1:c0f972361605 | 61 | ********************************************************************** |
csyang2 |
1:c0f972361605 | 62 | */ |
csyang2 |
1:c0f972361605 | 63 | typedef struct { |
csyang2 |
1:c0f972361605 | 64 | const GUI_FONT * pFont; |
csyang2 |
1:c0f972361605 | 65 | GUI_COLOR aBkColor[3]; |
csyang2 |
1:c0f972361605 | 66 | GUI_COLOR aTextColor[3]; |
csyang2 |
1:c0f972361605 | 67 | int FrameX, FrameY; |
csyang2 |
1:c0f972361605 | 68 | int SpaceX, SpaceY; |
csyang2 |
1:c0f972361605 | 69 | int TextAlign; |
csyang2 |
1:c0f972361605 | 70 | int IconAlign; |
csyang2 |
1:c0f972361605 | 71 | GUI_WRAPMODE WrapMode; |
csyang2 |
1:c0f972361605 | 72 | } ICONVIEW_PROPS; |
csyang2 |
1:c0f972361605 | 73 | |
csyang2 |
1:c0f972361605 | 74 | typedef struct { |
csyang2 |
1:c0f972361605 | 75 | WIDGET Widget; |
csyang2 |
1:c0f972361605 | 76 | WM_SCROLL_STATE ScrollStateV; |
csyang2 |
1:c0f972361605 | 77 | WM_SCROLL_STATE ScrollStateH; |
csyang2 |
1:c0f972361605 | 78 | ICONVIEW_PROPS Props; |
csyang2 |
1:c0f972361605 | 79 | GUI_ARRAY ItemArray; |
csyang2 |
1:c0f972361605 | 80 | int xSizeItems; |
csyang2 |
1:c0f972361605 | 81 | int ySizeItems; |
csyang2 |
1:c0f972361605 | 82 | int Sel; |
csyang2 |
1:c0f972361605 | 83 | U16 Flags; |
csyang2 |
1:c0f972361605 | 84 | WIDGET_DRAW_ITEM_FUNC * pfDrawItem; |
csyang2 |
1:c0f972361605 | 85 | int ReleasedItem; |
csyang2 |
1:c0f972361605 | 86 | } ICONVIEW_OBJ; |
csyang2 |
1:c0f972361605 | 87 | |
csyang2 |
1:c0f972361605 | 88 | typedef void tDrawImage (const void * pData, GUI_GET_DATA_FUNC * pfGetData, int xPos, int yPos); |
csyang2 |
1:c0f972361605 | 89 | typedef void tDrawText (ICONVIEW_OBJ * pObj, GUI_RECT * pRect, const char * s); |
csyang2 |
1:c0f972361605 | 90 | typedef void tGetImageSizes(const void * pData, GUI_GET_DATA_FUNC * pfGetData, int * xSize, int * ySize); |
csyang2 |
1:c0f972361605 | 91 | |
csyang2 |
1:c0f972361605 | 92 | typedef struct { |
csyang2 |
1:c0f972361605 | 93 | tDrawImage * pfDrawImage; |
csyang2 |
1:c0f972361605 | 94 | tDrawText * pfDrawText; |
csyang2 |
1:c0f972361605 | 95 | tGetImageSizes * pfGetImageSizes; |
csyang2 |
1:c0f972361605 | 96 | GUI_GET_DATA_FUNC * pfGetData; |
csyang2 |
1:c0f972361605 | 97 | const void * pData; |
csyang2 |
1:c0f972361605 | 98 | U32 UserData; |
csyang2 |
1:c0f972361605 | 99 | int SizeOfData; |
csyang2 |
1:c0f972361605 | 100 | char acText[1]; |
csyang2 |
1:c0f972361605 | 101 | } ICONVIEW_ITEM; |
csyang2 |
1:c0f972361605 | 102 | |
csyang2 |
1:c0f972361605 | 103 | /********************************************************************* |
csyang2 |
1:c0f972361605 | 104 | * |
csyang2 |
1:c0f972361605 | 105 | * Macros for internal use |
csyang2 |
1:c0f972361605 | 106 | * |
csyang2 |
1:c0f972361605 | 107 | ********************************************************************** |
csyang2 |
1:c0f972361605 | 108 | */ |
csyang2 |
1:c0f972361605 | 109 | #if GUI_DEBUG_LEVEL >= GUI_DEBUG_LEVEL_CHECK_ALL |
csyang2 |
1:c0f972361605 | 110 | #define ICONVIEW_INIT_ID(p) (p->Widget.DebugId = ICONVIEW_ID) |
csyang2 |
1:c0f972361605 | 111 | #else |
csyang2 |
1:c0f972361605 | 112 | #define ICONVIEW_INIT_ID(p) |
csyang2 |
1:c0f972361605 | 113 | #endif |
csyang2 |
1:c0f972361605 | 114 | |
csyang2 |
1:c0f972361605 | 115 | #if GUI_DEBUG_LEVEL >= GUI_DEBUG_LEVEL_CHECK_ALL |
csyang2 |
1:c0f972361605 | 116 | ICONVIEW_OBJ * ICONVIEW_LockH(ICONVIEW_Handle h); |
csyang2 |
1:c0f972361605 | 117 | #define ICONVIEW_LOCK_H(h) ICONVIEW_LockH(h) |
csyang2 |
1:c0f972361605 | 118 | #else |
csyang2 |
1:c0f972361605 | 119 | #define ICONVIEW_LOCK_H(h) (ICONVIEW_OBJ *)GUI_LOCK_H(h) |
csyang2 |
1:c0f972361605 | 120 | #endif |
csyang2 |
1:c0f972361605 | 121 | |
csyang2 |
1:c0f972361605 | 122 | /********************************************************************* |
csyang2 |
1:c0f972361605 | 123 | * |
csyang2 |
1:c0f972361605 | 124 | * Private functions |
csyang2 |
1:c0f972361605 | 125 | * |
csyang2 |
1:c0f972361605 | 126 | ********************************************************************** |
csyang2 |
1:c0f972361605 | 127 | */ |
csyang2 |
1:c0f972361605 | 128 | void ICONVIEW__DrawText (ICONVIEW_OBJ * pObj, GUI_RECT * pRect, const char * pText); |
csyang2 |
1:c0f972361605 | 129 | void ICONVIEW__ManageAutoScroll(ICONVIEW_Handle hObj); |
csyang2 |
1:c0f972361605 | 130 | |
csyang2 |
1:c0f972361605 | 131 | #if defined(__cplusplus) |
csyang2 |
1:c0f972361605 | 132 | } |
csyang2 |
1:c0f972361605 | 133 | #endif |
csyang2 |
1:c0f972361605 | 134 | |
csyang2 |
1:c0f972361605 | 135 | #endif // GUI_WINSUPPORT |
csyang2 |
1:c0f972361605 | 136 | #endif // ICONVIEW_H |
csyang2 |
1:c0f972361605 | 137 | |
csyang2 |
1:c0f972361605 | 138 | /*************************** End of file ****************************/ |