NuMaker emWin HMI

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers IMAGE.h Source File

IMAGE.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.h
00040 Purpose     : Image include
00041 --------------------END-OF-HEADER-------------------------------------
00042 */
00043 
00044 #ifndef IMAGE_H
00045 #define IMAGE_H
00046 
00047 #include "WM.h"
00048 #include "DIALOG_Intern.h"
00049 #include "WIDGET.h"
00050 
00051 #if GUI_WINSUPPORT
00052 
00053 #if defined(__cplusplus)
00054   extern "C" { // Make sure we have C-declarations in C++ programs
00055 #endif
00056 
00057 /*********************************************************************
00058 *
00059 *       Defines
00060 *
00061 **********************************************************************
00062 */
00063 #define IMAGE_CF_MEMDEV   (1 << 0) // Widget uses an internal memory device which speeds up use of compressed images (GIF, JPEG, PNG)
00064 #define IMAGE_CF_TILE     (1 << 1) // Uses tiling to fill up the whole area of the widget
00065 #define IMAGE_CF_ALPHA    (1 << 2) // Needs to be set if alpha blending is required (PNG)
00066 #define IMAGE_CF_ATTACHED (1 << 3) // Widget size is fixed to the parent border
00067 #define IMAGE_CF_AUTOSIZE (1 << 4) // Widget size is taken from the attached image
00068 
00069 /*********************************************************************
00070 *
00071 *       Types
00072 *
00073 **********************************************************************
00074 */
00075 typedef WM_HMEM IMAGE_Handle;
00076 
00077 /*********************************************************************
00078 *
00079 *       Public functions
00080 *
00081 **********************************************************************
00082 */
00083 IMAGE_Handle IMAGE_CreateEx      (int x0, int y0, int xSize, int ySize, WM_HWIN hParent, int WinFlags, int ExFlags, int Id);
00084 IMAGE_Handle IMAGE_CreateUser    (int x0, int y0, int xSize, int ySize, WM_HWIN hParent, int WinFlags, int ExFlags, int Id, int NumExtraBytes);
00085 IMAGE_Handle IMAGE_CreateIndirect(const GUI_WIDGET_CREATE_INFO * pCreateInfo, WM_HWIN hWinParent, int x0, int y0, WM_CALLBACK * cb);
00086 
00087 void IMAGE_Callback(WM_MESSAGE * pMsg);
00088 
00089 /*********************************************************************
00090 *
00091 *       Member functions
00092 *
00093 **********************************************************************
00094 */
00095 int  IMAGE_GetUserData(IMAGE_Handle hObj, void * pDest, int NumBytes);
00096 void IMAGE_SetBitmap  (IMAGE_Handle hWin, const GUI_BITMAP * pBitmap);
00097 void IMAGE_SetBMP     (IMAGE_Handle hObj, const void * pData, U32 FileSize);
00098 void IMAGE_SetBMPEx   (IMAGE_Handle hObj, GUI_GET_DATA_FUNC * pfGetData, void * pVoid);
00099 void IMAGE_SetDTA     (IMAGE_Handle hObj, const void * pData, U32 FileSize);
00100 void IMAGE_SetDTAEx   (IMAGE_Handle hObj, GUI_GET_DATA_FUNC * pfGetData, void * pVoid);
00101 void IMAGE_SetGIF     (IMAGE_Handle hObj, const void * pData, U32 FileSize);
00102 void IMAGE_SetGIFEx   (IMAGE_Handle hObj, GUI_GET_DATA_FUNC * pfGetData, void * pVoid);
00103 void IMAGE_SetJPEG    (IMAGE_Handle hObj, const void * pData, U32 FileSize);
00104 void IMAGE_SetJPEGEx  (IMAGE_Handle hObj, GUI_GET_DATA_FUNC * pfGetData, void * pVoid);
00105 void IMAGE_SetPNG     (IMAGE_Handle hObj, const void * pData, U32 FileSize);
00106 void IMAGE_SetPNGEx   (IMAGE_Handle hObj, GUI_GET_DATA_FUNC * pfGetData, void * pVoid);
00107 int  IMAGE_SetUserData(IMAGE_Handle hObj, const void * pSrc, int NumBytes);
00108 
00109 
00110 #if defined(__cplusplus)
00111   }
00112 #endif
00113 
00114 #endif // GUI_WINSUPPORT
00115 #endif // IMAGE_H
00116 
00117 /*************************** End of file ****************************/