MiniGUI API Reference (MiniGUI-Standalone)  v4.0.0
A mature and proven cross-platform GUI system for embedded and smart IoT devices
xvfb.h
Go to the documentation of this file.
1 //
3 // IMPORTANT NOTICE
4 //
5 // The following open source license statement does not apply to any
6 // entity in the Exception List published by FMSoft.
7 //
8 // For more information, please visit:
9 //
10 // https://www.fmsoft.cn/exception-list
11 //
13 
57 /*
58  * $Id: xvfb.h 7682 2007-09-26 03:27:02Z wangxuguang $
59  *
60  * MiniGUI for Linux/uClinux, eCos, uC/OS-II, VxWorks,
61  * pSOS, ThreadX, NuCleus, OSE, and Win32.
62  */
63 
64 #ifndef _MGUI_XVFB_H
65  #define _MGUI_XVFB_H
66 
67 #ifdef __cplusplus
68 extern "C" {
69 #endif /*__cplusplus*/
70 
82 typedef struct _XVFBHeader {
83 
85  unsigned int info_size;
86 
88  int width;
89 
91  int height;
92 
94  int depth;
95 
101 
104 
107 
110 
113 
115  int pitch;
116 
121  int dirty;
122 
131 
137 
140 
143 } XVFBHeader;
144 
145 
147 typedef struct _XVFBKEYDATA
148 {
150  unsigned short key_code;
151 
157  unsigned short key_state;
158 } XVFBKEYDATA;
159 
161 typedef struct _XVFBMOUSEDATA
162 {
164  unsigned short x;
165 
167  unsigned short y;
168 
174  unsigned short btn;
175 } XVFBMOUSEDATA;
176 
177 
179 typedef struct _XVFBEVENT
180 {
186 
187  union {
192  };
193 } XVFBEVENT;
194 
195 
197 typedef struct _XVFBPalEntry {
199  unsigned char r;
201  unsigned char g;
203  unsigned char b;
205  unsigned char a;
206 } XVFBPalEntry;
207 
208 
213 extern MG_EXPORT XVFBHeader* __mg_rtos_xvfb_header;
214 
222 extern MG_EXPORT void* __mg_rtos_xvfb_event_buffer;
245 MG_EXPORT XVFBHeader* GUIAPI xVFBAllocVirtualFrameBuffer (int width, int height, int depth,
247 
254 MG_EXPORT void GUIAPI xVFBFreeVirtualFrameBuffer (XVFBHeader* buf);
255 
262 MG_EXPORT void* GUIAPI xVFBCreateEventBuffer (int nr_events);
263 
264 
270 MG_EXPORT void GUIAPI xVFBDestroyEventBuffer (void* event_buf);
271 
282 MG_EXPORT int GUIAPI xVFBNotifyNewEvent (const void* xvfb_event_buffer, XVFBEVENT* event);
283 
284 
285 #ifdef __cplusplus
286 }
287 #endif
288 
289 #endif
int BOOL
A type definition for boolean value.
Definition: common.h:338
unsigned short x
Definition: xvfb.h:164
int pitch
Definition: xvfb.h:115
int dirty_rc_b
Definition: xvfb.h:130
int dirty
Definition: xvfb.h:121
struct _XVFBEVENT XVFBEVENT
MG_EXPORT void GUIAPI xVFBDestroyEventBuffer(void *event_buf)
destroy event circular buffer.
XVFBKEYDATA kb_data
Definition: xvfb.h:189
int height
Definition: xvfb.h:91
int dirty_rc_r
Definition: xvfb.h:128
unsigned char b
Definition: xvfb.h:203
unsigned short key_code
Definition: xvfb.h:150
MG_EXPORT XVFBHeader *GUIAPI xVFBAllocVirtualFrameBuffer(int width, int height, int depth, Uint32 Rmask, Uint32 Gmask, Uint32 Bmask, Uint32 Amask, BOOL MSBLeft)
create virtual framebuffer
int event_type
Definition: xvfb.h:185
struct _XVFBMOUSEDATA XVFBMOUSEDATA
unsigned char r
Definition: xvfb.h:199
int width
Definition: xvfb.h:88
unsigned int info_size
Definition: xvfb.h:85
unsigned short btn
Definition: xvfb.h:174
Uint32 Amask
Definition: xvfb.h:112
int palette_changed
Definition: xvfb.h:136
unsigned char Uint8
A type definition for an 8-bit unsigned character.
Definition: common.h:154
struct _XVFBKEYDATA XVFBKEYDATA
unsigned short key_state
Definition: xvfb.h:157
struct _XVFBPalEntry XVFBPalEntry
MG_EXPORT void * __mg_rtos_xvfb_event_buffer
shared memory header of x virtual framebuffer.
XVFBMOUSEDATA mouse_data
Definition: xvfb.h:191
unsigned int Uint32
A type definition for a 32-bit unsigned integer.
Definition: common.h:174
unsigned char g
Definition: xvfb.h:201
int palette_offset
Definition: xvfb.h:139
int depth
Definition: xvfb.h:94
int fb_offset
Definition: xvfb.h:142
Uint8 MSBLeft
Definition: xvfb.h:100
MG_EXPORT int GUIAPI xVFBNotifyNewEvent(const void *xvfb_event_buffer, XVFBEVENT *event)
put a event to event circular buffer
int dirty_rc_t
Definition: xvfb.h:126
MG_EXPORT void GUIAPI xVFBFreeVirtualFrameBuffer(XVFBHeader *buf)
free virtual framebuffer.
Uint32 Gmask
Definition: xvfb.h:106
int dirty_rc_l
Definition: xvfb.h:124
unsigned short y
Definition: xvfb.h:167
Uint32 Rmask
Definition: xvfb.h:103
Uint32 Bmask
Definition: xvfb.h:109
MG_EXPORT void *GUIAPI xVFBCreateEventBuffer(int nr_events)
create event circular buffer.
struct _XVFBHeader XVFBHeader
unsigned char a
Definition: xvfb.h:205