eGUI alias D4D  Release 3.0
Reference Manual
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
d4d_imgdec_d4d.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_IMGDEC_D4D_H
47 #define __D4D_IMGDEC_D4D_H
48 
49 /******************************************************************************
50 * Types
51 ******************************************************************************/
52 
53 #pragma pack (push)
54 #pragma pack (1)
55 
57 {
58  char ident[7]; // identification string of file "D4DBMP" include termination char
59  unsigned char version; // version of d4d bitmap header version (at the moment 0)
60  unsigned short width; // width of bitmap
61  unsigned short height; // height of bitmap
62  unsigned short colorMode; // color mode of stored bitmap
63  unsigned short reserved; // allign 2 bytes to 32 bit shape
64  unsigned long dataOffset; // offset of first byte of bitmap data
65  unsigned long dataSize; // size of bitmap data
66  unsigned long palleteOffset;// offset of first byte of pallete data. If 0 there is no pallete
67  unsigned long palleteSize; // size of pallete data
69 
71 {
72  char ident[7]; // identification string of file "D4DBMP" include termination char
73  unsigned char version; // version of d4d bitmap header version (at the moment 0)
74  unsigned short width; // width of bitmap
75  unsigned short height; // height of bitmap
76  unsigned long colorMode; // color mode of stored bitmap
77  unsigned long dataOffset; // offset of first byte of bitmap data
78  unsigned long dataSize; // size of bitmap data
79  unsigned long palleteOffset;// offset of first byte of pallete data. If 0 there is no pallete
80  unsigned long palleteSize; // size of pallete data
82 
83 
84 #pragma pack (pop)
85 
86 /******************************************************************************
87 * Constants
88 ******************************************************************************/
89 
90 
91 
92 /******************************************************************************
93 * External source constants
94 ******************************************************************************/
95 
96 
97 #define D4D_EXTSRC_HEADER_D4D_SIZE sizeof(D4D_EXTSRC_HEADER_D4D)
98 
99 
100 
101 /******************************************************************************
102 * Global D4D bitmap drawing level functions
103 ******************************************************************************/
104 
105 #if (D4D_BMP_EXTSRC_SUPPORT_D4D == D4D_TRUE) && (D4D_EXTSRC_FILE_ENABLE == D4D_TRUE)
106  void D4D_ImgDecExtD4DDraw(D4D_COOR x, D4D_COOR y, D4D_CHAR* pFileName, D4D_BOOL greyScale, D4D_COOR radius);
110  int D4D_ImgDecExtD4DGetHeader(D4D_CHAR* pFileName, void* pBuff, int max_size);
111 
113  D4D_FILEPTR pFile, LWord dataOffset,
114  D4D_BOOL Compressed, D4D_BOOL GreyScale);
115 #else
116 
117  #define D4D_ImgDecExtD4DDraw NULL
118  #define D4D_ImgDecExtD4DGetWidth NULL
119  #define D4D_ImgDecExtD4DGetHeight NULL
120  #define D4D_ImgDecExtD4DGetSize NULL
121  #define D4D_ImgDecExtD4DGetHeader NULL
122 
123 #endif
124 
125 #endif /* __D4D_IMGDEC_D4D_H */
struct D4D_EXTSRC_HEADER_D4D_S D4D_EXTSRC_HEADER_D4D
struct D4D_EXTSRC_HEADER_D4D_1_S D4D_EXTSRC_HEADER_D4D_1
unsigned long palleteSize
D4D_COOR D4D_ImgDecExtD4DGetHeight(D4D_CHAR *pFileName)
int D4D_ImgDecExtD4DGetHeader(D4D_CHAR *pFileName, void *pBuff, int max_size)
Byte D4D_COOR
Type definition of eGUI coordination variables.
Definition: d4d_types.h:219
unsigned long dataOffset
D4D_COOR D4D_ImgDecExtD4DGetWidth(D4D_CHAR *pFileName)
unsigned long LWord
Type definition of LWord (unsigned 32-bit).
Definition: d4d_types.h:167
unsigned short reserved
void D4D_ImgDecExtD4DDraw(D4D_COOR x, D4D_COOR y, D4D_CHAR *pFileName, D4D_BOOL greyScale, D4D_COOR radius)
D4D_SIZE D4D_ImgDecExtD4DGetSize(D4D_CHAR *pFileName)
void D4D_LCD_Bmp65kNoPalExt(D4D_COOR x1, D4D_COOR y1, D4D_COOR x2, D4D_COOR y2, D4D_FILEPTR pFile, LWord dataOffset, D4D_BOOL Compressed, D4D_BOOL GreyScale)
unsigned short colorMode
LWord D4D_BOOL
Type definition of eGUI boolean.
Definition: d4d_types.h:204
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
unsigned long palleteOffset
void * D4D_FILEPTR
Type definition of eGUI file pointer.
Definition: d4d_types.h:298