NuMaker emWin HMI

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers IMAGE_Private.h Source File

IMAGE_Private.h

00001 /*********************************************************************
00002 *                 SEGGER Software GmbH                               *
00003 *        Solutions for real time microcontroller applications        *
00004 **********************************************************************
00005 *                                                                    *
00006 *        (c) 1996 - 2018  SEGGER Microcontroller GmbH                *
00007 *                                                                    *
00008 *        Internet: www.segger.com    Support:  support@segger.com    *
00009 *                                                                    *
00010 **********************************************************************
00011 
00012 ** emWin V5.48 - Graphical user interface for embedded applications **
00013 All  Intellectual Property rights in the Software belongs to  SEGGER.
00014 emWin is protected by  international copyright laws.  Knowledge of the
00015 source code may not be used to write a similar product. This file may
00016 only be used in accordance with the following terms:
00017 
00018 The  software has  been licensed by SEGGER Software GmbH to Nuvoton Technology Corporationat the address: No. 4, Creation Rd. III, Hsinchu Science Park, Taiwan
00019 for the purposes  of  creating  libraries  for its 
00020 Arm Cortex-M and  Arm9 32-bit microcontrollers, commercialized and distributed by Nuvoton Technology Corporation
00021 under  the terms and conditions  of  an  End  User  
00022 License  Agreement  supplied  with  the libraries.
00023 Full source code is available at: www.segger.com
00024 
00025 We appreciate your understanding and fairness.
00026 ----------------------------------------------------------------------
00027 Licensing information
00028 Licensor:                 SEGGER Software GmbH
00029 Licensed to:              Nuvoton Technology Corporation, No. 4, Creation Rd. III, Hsinchu Science Park, 30077 Hsinchu City, Taiwan
00030 Licensed SEGGER software: emWin
00031 License number:           GUI-00735
00032 License model:            emWin License Agreement, signed February 27, 2018
00033 Licensed platform:        Cortex-M and ARM9 32-bit series microcontroller designed and manufactured by or for Nuvoton Technology Corporation
00034 ----------------------------------------------------------------------
00035 Support and Update Agreement (SUA)
00036 SUA period:               2018-03-26 - 2019-03-27
00037 Contact to extend SUA:    sales@segger.com
00038 ----------------------------------------------------------------------
00039 File        : IMAGE_Private.h
00040 Purpose     : Private IMAGE include
00041 --------------------END-OF-HEADER-------------------------------------
00042 */
00043 
00044 #ifndef IMAGE_PRIVATE_H
00045 #define IMAGE_PRIVATE_H
00046 
00047 #include "IMAGE.h"
00048 #include "GUI_Private.h"
00049 
00050 #if GUI_WINSUPPORT
00051 
00052 /*********************************************************************
00053 *
00054 *       Private config defaults
00055 *
00056 **********************************************************************
00057 */
00058 #ifndef IMAGE_SUPPORT_TRANSPARENCY
00059   #define IMAGE_SUPPORT_TRANSPARENCY WM_SUPPORT_TRANSPARENCY
00060 #endif
00061 
00062 /*********************************************************************
00063 *
00064 *       Object definition
00065 *
00066 **********************************************************************
00067 */
00068 typedef struct {
00069   U32 Flags;
00070 } IMAGE_PROPS;
00071 
00072 typedef struct {
00073   WIDGET              Widget;
00074   IMAGE_PROPS         Props;
00075   const void        * pData;                                                          // Data pointer of the object to be drawn (Bitmap, BMP, GIF, JPEG, PNG)
00076   void             (* pfDrawImageAt) (IMAGE_Handle hObj, int xPos, int yPos);         // Object specific (Bitmap, BMP, GIF, JPEG, PNG) code
00077   void             (* pfPaint)       (IMAGE_Handle hObj);                             // Drawing method specific (Default, Tiled, Magnified) code
00078   void             (* pfGetImageSize)(IMAGE_Handle hObj, int * pxSize, int * pySize); // Returns the image size of the attached item
00079   void             (* pfOnTimer)     (IMAGE_Handle hObj);                             // Timer function for animated images (currently only animated GIFs are supported)
00080   U32                 FileSize;
00081   //
00082   // Data items used by IAMGE_GIF.c
00083   //
00084   int                 NumImages;    // Number of (sub)images
00085   int                 CurrentImage; // Image index used for animated images
00086   GUI_TIMER_HANDLE    hTimer;       // Timer used for animated images
00087   //
00088   // Data items used by IAMGE_DTA.c
00089   //
00090   GUI_BITMAP          Bitmap;       // Bitmap structure
00091   GUI_LOGPALETTE      Palette;      // Palette structure
00092   //
00093   // Data items used by Image_...Ex() - functions
00094   //
00095   void              * pVoid;        // Void pointer passed to GetData() function
00096   GUI_GET_DATA_FUNC * pfGetData;    // Pointer to GetData() function
00097   //
00098   // Data items used if memory devices are available and IMAGE_CF_MEMDEV has been set
00099   //
00100   #if GUI_SUPPORT_MEMDEV
00101     GUI_MEMDEV_Handle hMem;
00102   #endif
00103 } IMAGE_OBJ;
00104 
00105 /*********************************************************************
00106 *
00107 *       Macros for internal use
00108 *
00109 **********************************************************************
00110 */
00111 #if GUI_DEBUG_LEVEL >= GUI_DEBUG_LEVEL_CHECK_ALL
00112   #define IMAGE_INIT_ID(p) (p->Widget.DebugId = IMAGE_ID)
00113 #else
00114   #define IMAGE_INIT_ID(p)
00115 #endif
00116 
00117 #if GUI_DEBUG_LEVEL >= GUI_DEBUG_LEVEL_CHECK_ALL
00118   IMAGE_OBJ * IMAGE__LockH(IMAGE_Handle h);
00119   #define IMAGE_LOCK_H(h)   IMAGE__LockH(h)
00120 #else
00121   #define IMAGE_LOCK_H(h)   (IMAGE_OBJ *)GUI_LOCK_H(h)
00122 #endif
00123 
00124 /*********************************************************************
00125 *
00126 *       Module internal data
00127 *
00128 **********************************************************************
00129 */
00130 extern IMAGE_PROPS IMAGE__DefaultProps;
00131 
00132 /*********************************************************************
00133 *
00134 *       Private functions
00135 *
00136 **********************************************************************
00137 */
00138 void IMAGE__SetWindowSize(IMAGE_Handle hObj);
00139 void IMAGE__FreeAttached (IMAGE_Handle hObj, int LeaveTimer);
00140 
00141 #endif // GUI_WINSUPPORT
00142 #endif // IMAGE_PRIVATE_H
00143 
00144 /*************************** End of file ****************************/