eGUI alias D4D  Release 3.0
Reference Manual
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
d4d_bmp.h
Go to the documentation of this file.
1 /**************************************************************************
2 *
3 * Copyright 2014 by Petr Gargulak. eGUI Community.
4 * Copyright 2009-2013 by Petr Gargulak. Freescale Semiconductor, Inc.
5 *
6 ***************************************************************************
7 * This program is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU Lesser General Public License Version 3
9 * or later (the "LGPL").
10 *
11 * As a special exception, the copyright holders of the eGUI project give you
12 * permission to link the eGUI sources with independent modules to produce an
13 * executable, regardless of the license terms of these independent modules,
14 * and to copy and distribute the resulting executable under terms of your
15 * choice, provided that you also meet, for each linked independent module,
16 * the terms and conditions of the license of that module.
17 * An independent module is a module which is not derived from or based
18 * on this library.
19 * If you modify the eGUI sources, you may extend this exception
20 * to your version of the eGUI sources, but you are not obligated
21 * to do so. If you do not wish to do so, delete this
22 * exception statement from your version.
23 *
24 * This program is distributed in the hope that it will be useful,
25 * but WITHOUT ANY WARRANTY; without even the implied warranty of
26 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
27 *
28 * You should have received a copy of the GNU General Public License
29 * and the GNU Lesser General Public License along with this program.
30 * If not, see <http://www.gnu.org/licenses/>.
31 *
32 ***************************************************************************/
46 #ifndef __D4D_BMP_H
47 #define __D4D_BMP_H
48 
49 /******************************************************************************
50 * Include
51 ******************************************************************************/
52 
56 
57 
58 /******************************************************************************
59 * D4D Bitmaps setting constants
60 *
61 */
67 #if D4D_ENDIAN == D4D_ENDIAN_LITTLE
68  #define D4D_BMP_EXTSRC_SUPPORT_D4D_EXT "D4L"
69 #else
70  #define D4D_BMP_EXTSRC_SUPPORT_D4D_EXT "D4B"
71 #endif
72 
73 /**************************************************************************/
78 #define D4D_BMP_CLEAR d4d_mouseNoCursor
79 
83 /******************************************************************************
84 * D4D Bmp types
85 *
86 */
90 typedef enum
91 {
98 
100 typedef struct
101 {
102  const void *pData;
103  const void *pParam;
104 } D4D_BMP;
105 
107 typedef struct
108 {
109  void (*D4D_ImgDecDraw)(D4D_COOR x, D4D_COOR y, D4D_CHAR* pFileName, D4D_BOOL greyScale, D4D_COOR radius);
110  D4D_COOR (*D4D_ImgDecGetWidth)(D4D_CHAR* pFileName);
111  D4D_COOR (*D4D_ImgDecGetHeight)(D4D_CHAR* pFileName);
112  D4D_SIZE (*D4D_ImgDecGetSize)(D4D_CHAR* pFileName);
113  int (*D4D_ImgDecGetHeader)(D4D_CHAR* pFileName, void* pBuff, int max_size);
115 
118 
121 /******************************************************************************
122 * D4D Bitmaps macros
123 *
124 */
128 /**************************************************************************/
135 #define D4D_DECLARE_BMP(name, pbmp, ppal) \
136  const D4D_BMP name = \
137  { \
138  (const void*)pbmp, (const void*)ppal \
139  };
140 
141 /**************************************************************************/
147 #define D4D_DECLARE_BMPFILE(name, filename) \
148  const D4D_BMP name = \
149  { \
150  NULL, filename \
151  };
152 
153 /**************************************************************************/
158 #define D4D_EXTERN_BMP(name) \
159  extern const D4D_BMP name
160 
164 /******************************************************************************
165 * Global D4D bitmap drawing level functions
166 ******************************************************************************/
167 
168 
169 #if D4D_EXTSRC_FILE_ENABLE != D4D_FALSE
170  void D4D_ExtImgSetWorkPath(D4D_CHAR* pPath);
171  D4D_CHAR* D4D_ExtImgGetWorkPath(void);
172  D4D_FILEPTR D4D_OpenImgFile(D4D_CHAR* pFileName, D4D_CHAR* mode);
173 #endif
174 
176 
177 
178 
179 #endif /* __D4D_BMP_H */
D4D driver external pictures d4d decoder functions header file.
Byte D4D_BMP_PROPERTIES
D4D_BMP_PROPERTIES type of image properties.
Definition: d4d_bmp.h:117
External memory eGUI format of image.
Definition: d4d_bmp.h:94
D4D_EXTIMG_FUNC API structure for eGUI image decoders.
Definition: d4d_bmp.h:107
D4D_EXTIMG_TYPE D4D_GetImgSrcType(D4D_BMP *pBmp)
Function returns the type of image source.
Definition: d4d_bmp.c:143
Byte D4D_COOR
Type definition of eGUI coordination variables.
Definition: d4d_types.h:219
D4D_COOR radius
Screen corner radius.
Definition: d4d_screen.h:177
Just last item where is stored the count of the image decoder. Keep it on last position.
Definition: d4d_bmp.h:96
unsigned char Byte
Type definition of Byte (unsigned 8-bit).
Definition: d4d_types.h:151
const void * pParam
Pointer to pallete to internal memory. In case of external source of image is used as a pointer to fi...
Definition: d4d_bmp.h:103
D4D_EXTIMG_TYPE
D4D_EXTIMG_TYPE eGUI supported image type enumeration.
Definition: d4d_bmp.h:90
D4D_BMP eGUI main image structure.
Definition: d4d_bmp.h:100
Uknown image format - do nothing.
Definition: d4d_bmp.h:92
D4D driver external bmp files decoder header file.
D4D driver external pictures d4d decoder functions header file.
const void * pData
Pointer to data to internal memory. In case of external source of image this must be NULL...
Definition: d4d_bmp.h:102
LWord D4D_BOOL
Type definition of eGUI boolean.
Definition: d4d_types.h:204
Internal memory eGUI format of image.
Definition: d4d_bmp.h:93
char D4D_CHAR
Type definition of eGUI ASCII character.
Definition: d4d_types.h:280
Type definition of eGUI size structure.
Definition: d4d_types.h:230
External memory MicroSoft BMP format of image.
Definition: d4d_bmp.h:95
void * D4D_FILEPTR
Type definition of eGUI file pointer.
Definition: d4d_types.h:298