STM32F769IDiscovery  1.00
uDANTE Audio Networking with STM32F7 DISCO board
IMAGE_Private.h
Go to the documentation of this file.
1 /*********************************************************************
2 * SEGGER Microcontroller GmbH & Co. KG *
3 * Solutions for real time microcontroller applications *
4 **********************************************************************
5 * *
6 * (c) 1996 - 2015 SEGGER Microcontroller GmbH & Co. KG *
7 * *
8 * Internet: www.segger.com Support: support@segger.com *
9 * *
10 **********************************************************************
11 
12 ** emWin V5.28 - Graphical user interface for embedded applications **
13 All Intellectual Property rights in the Software belongs to SEGGER.
14 emWin is protected by international copyright laws. Knowledge of the
15 source code may not be used to write a similar product. This file may
16 only be used in accordance with the following terms:
17 
18 The software has been licensed to STMicroelectronics International
19 N.V. a Dutch company with a Swiss branch and its headquarters in Plan-
20 les-Ouates, Geneva, 39 Chemin du Champ des Filles, Switzerland for the
21 purposes of creating libraries for ARM Cortex-M-based 32-bit microcon_
22 troller products commercialized by Licensee only, sublicensed and dis_
23 tributed under the terms and conditions of the End User License Agree_
24 ment supplied by STMicroelectronics International N.V.
25 Full source code is available at: www.segger.com
26 
27 We appreciate your understanding and fairness.
28 ----------------------------------------------------------------------
29 File : IMAGE_Private.h
30 Purpose : Private IMAGE include
31 --------------------END-OF-HEADER-------------------------------------
32 */
33 
34 #ifndef IMAGE_PRIVATE_H
35 #define IMAGE_PRIVATE_H
36 
37 #include "IMAGE.h"
38 #include "GUI_Private.h"
39 
40 #if GUI_WINSUPPORT
41 
42 /*********************************************************************
43 *
44 * Private config defaults
45 *
46 **********************************************************************
47 */
48 #ifndef IMAGE_SUPPORT_TRANSPARENCY
49  #define IMAGE_SUPPORT_TRANSPARENCY WM_SUPPORT_TRANSPARENCY
50 #endif
51 
52 /*********************************************************************
53 *
54 * Object definition
55 *
56 **********************************************************************
57 */
58 typedef struct {
59  U32 Flags;
60 } IMAGE_PROPS;
61 
62 typedef struct {
63  WIDGET Widget;
64  IMAGE_PROPS Props;
65  const void * pData; // Data pointer of the object to be drawn (Bitmap, BMP, GIF, JPEG, PNG)
66  void (* pfDrawImageAt) (IMAGE_Handle hObj, int xPos, int yPos); // Object specific (Bitmap, BMP, GIF, JPEG, PNG) code
67  void (* pfPaint) (IMAGE_Handle hObj); // Drawing method specific (Default, Tiled, Magnified) code
68  void (* pfGetImageSize)(IMAGE_Handle hObj, int * pxSize, int * pySize); // Returns the image size of the attached item
69  void (* pfOnTimer) (IMAGE_Handle hObj); // Timer function for animated images (currently only animated GIFs are supported)
70  U32 FileSize;
71  //
72  // Data items used by IAMGE_GIF.c
73  //
74  int NumImages; // Number of (sub)images
75  int CurrentImage; // Image index used for animated images
76  GUI_TIMER_HANDLE hTimer; // Timer used for animated images
77  //
78  // Data items used by IAMGE_DTA.c
79  //
80  GUI_BITMAP Bitmap; // Bitmap structure
81  GUI_LOGPALETTE Palette; // Palette structure
82  //
83  // Data items used by Image_...Ex() - functions
84  //
85  void * pVoid; // Void pointer passed to GetData() function
86  GUI_GET_DATA_FUNC * pfGetData; // Pointer to GetData() function
87  //
88  // Data items used if memory devices are available and IMAGE_CF_MEMDEV has been set
89  //
90  #if GUI_SUPPORT_MEMDEV
91  GUI_MEMDEV_Handle hMem;
92  #endif
93 } IMAGE_OBJ;
94 
95 /*********************************************************************
96 *
97 * Macros for internal use
98 *
99 **********************************************************************
100 */
101 #if GUI_DEBUG_LEVEL >= GUI_DEBUG_LEVEL_CHECK_ALL
102  #define IMAGE_INIT_ID(p) (p->Widget.DebugId = IMAGE_ID)
103 #else
104  #define IMAGE_INIT_ID(p)
105 #endif
106 
107 #if GUI_DEBUG_LEVEL >= GUI_DEBUG_LEVEL_CHECK_ALL
108  IMAGE_OBJ * IMAGE__LockH(IMAGE_Handle h);
109  #define IMAGE_LOCK_H(h) IMAGE__LockH(h)
110 #else
111  #define IMAGE_LOCK_H(h) (IMAGE_OBJ *)GUI_LOCK_H(h)
112 #endif
113 
114 /*********************************************************************
115 *
116 * Module internal data
117 *
118 **********************************************************************
119 */
120 extern IMAGE_PROPS IMAGE__DefaultProps;
121 
122 /*********************************************************************
123 *
124 * Private functions
125 *
126 **********************************************************************
127 */
128 void IMAGE__SetWindowSize(IMAGE_Handle hObj);
129 void IMAGE__FreeAttached (IMAGE_Handle hObj, int LeaveTimer);
130 
131 #endif // GUI_WINSUPPORT
132 #endif // IMAGE_PRIVATE_H
133 
134 /*************************** End of file ****************************/
GUI_HMEM GUI_TIMER_HANDLE
Definition: GUI.h:1184
#define U32
Definition: Global.h:50
GUI_HMEM GUI_MEMDEV_Handle
Definition: GUI.h:889
int GUI_GET_DATA_FUNC(void *p, const U8 **ppData, unsigned NumBytes, U32 Off)
Definition: GUI.h:497