STM32F769IDiscovery  1.00
uDANTE Audio Networking with STM32F7 DISCO board
GUI_GIF_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 : GUI_GIF_Private.h
30 Purpose : Private header file for GUI_GIF... functions
31 ---------------------------END-OF-HEADER------------------------------
32 */
33 
34 #ifndef GUI_GIF_PRIVATE_H
35 #define GUI_GIF_PRIVATE_H
36 
37 #include "GUI_Private.h"
38 
39 /*********************************************************************
40 *
41 * Defines
42 *
43 **********************************************************************
44 */
45 #define MAX_NUM_LWZ_BITS 12
46 
47 /*********************************************************************
48 *
49 * Types
50 *
51 **********************************************************************
52 */
53 /* Context structure */
54 typedef struct {
55  /* Required for getting input */
56  unsigned NumBytesInBuffer; /* Remaining bytes in buffer */
57  const U8 * pBuffer; /* Pointer into buffer for reading data */
58  GUI_GET_DATA_FUNC * pfGetData; /* Function pointer */
59  void * pParam; /* Parameter pointer passed to function */
60  U32 Off; /* Data pointer */
61  /* Decompression data */
62  U8 aBuffer[258]; /* Input buffer for data block */
63  short aCode [(1 << MAX_NUM_LWZ_BITS)]; /* This array stores the LZW codes for the compressed strings */
64  U8 aPrefix[(1 << MAX_NUM_LWZ_BITS)]; /* Prefix character of the LZW code. */
65  U8 aDecompBuffer[3000]; /* Decompression buffer. The higher the compression, the more bytes are needed in the buffer. */
66  U8 * sp; /* Pointer into the decompression buffer */
67  int CurBit;
68  int LastBit;
69  int GetDone;
70  int LastByte;
72  int CodeSize;
74  int MaxCode;
76  int ClearCode;
77  int EndCode;
78  int FirstCode;
79  int OldCode;
80  /* Palette buffer */
81  GUI_COLOR aColorTable[256];
83 
84 typedef struct {
85  int XPos;
86  int YPos;
87  int XSize;
88  int YSize;
89  int Flags;
90  int NumColors;
92 
93 /* Default parameter structure for reading data from memory */
94 typedef struct {
95  const U8 * pFileData;
98 
99 typedef int DRAW_FROM_DATABLOCK(GUI_GIF_CONTEXT * pContext, IMAGE_DESCRIPTOR * pDescriptor, int x0, int y0, int Transparency, int Disposal, int Num, int Denom);
100 typedef void CLEAR_UNUSED_PIXELS(int x0, int y0, IMAGE_DESCRIPTOR * pDescriptor, GUI_GIF_IMAGE_INFO * pInfo, int Num, int Denom);
101 
102 /*********************************************************************
103 *
104 * Private data
105 *
106 **********************************************************************
107 */
108 extern const int GUI_GIF__aInterlaceOffset[4];
109 extern const int GUI_GIF__aInterlaceYPos[4];
110 
111 /*********************************************************************
112 *
113 * Interface
114 *
115 **********************************************************************
116 */
117 int GUI_GIF__ReadData(GUI_GIF_CONTEXT * pContext, unsigned NumBytes, const U8 ** ppData, unsigned StartOfFile);
118 int GUI_GIF__GetData(void * p, const U8 ** ppData, unsigned NumBytesReq, U32 Off);
119 int GUI_GIF__DrawFromFilePointer(GUI_GIF_CONTEXT * pContext, int x0, int y0, int Index, int Num, int Denom, DRAW_FROM_DATABLOCK pfDrawFromDataBlock, CLEAR_UNUSED_PIXELS pfClearUnusedPixels);
120 void GUI_GIF__InitLZW(GUI_GIF_CONTEXT * pContext, int InputCodeSize);
121 int GUI_GIF__GetNextByte(GUI_GIF_CONTEXT * pContext);
122 
123 #endif /* GUI_GIF_PRIVATE_H */
const int GUI_GIF__aInterlaceYPos[4]
void GUI_GIF__InitLZW(GUI_GIF_CONTEXT *pContext, int InputCodeSize)
int GUI_GIF__DrawFromFilePointer(GUI_GIF_CONTEXT *pContext, int x0, int y0, int Index, int Num, int Denom, DRAW_FROM_DATABLOCK pfDrawFromDataBlock, CLEAR_UNUSED_PIXELS pfClearUnusedPixels)
#define U32
Definition: Global.h:50
int DRAW_FROM_DATABLOCK(GUI_GIF_CONTEXT *pContext, IMAGE_DESCRIPTOR *pDescriptor, int x0, int y0, int Transparency, int Disposal, int Num, int Denom)
int GUI_GIF__GetData(void *p, const U8 **ppData, unsigned NumBytesReq, U32 Off)
const U8 * pFileData
LCD_COLOR GUI_COLOR
Definition: GUI_Type.h:50
int GUI_GET_DATA_FUNC(void *p, const U8 **ppData, unsigned NumBytes, U32 Off)
Definition: GUI.h:497
#define MAX_NUM_LWZ_BITS
const U8 * pBuffer
unsigned NumBytesInBuffer
int GUI_GIF__ReadData(GUI_GIF_CONTEXT *pContext, unsigned NumBytes, const U8 **ppData, unsigned StartOfFile)
const int GUI_GIF__aInterlaceOffset[4]
int GUI_GIF__GetNextByte(GUI_GIF_CONTEXT *pContext)
void CLEAR_UNUSED_PIXELS(int x0, int y0, IMAGE_DESCRIPTOR *pDescriptor, GUI_GIF_IMAGE_INFO *pInfo, int Num, int Denom)
GUI_GET_DATA_FUNC * pfGetData
#define U8
Definition: Global.h:44