MiniGUI API Reference (MiniGUI-Processes)  v5.0.6
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,
246  Uint32 Rmask, Uint32 Gmask, Uint32 Bmask, Uint32 Amask, BOOL MSBLeft);
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
_XVFBHeader::height
int height
Definition: xvfb.h:91
_XVFBKEYDATA::key_state
unsigned short key_state
Definition: xvfb.h:157
_XVFBPalEntry::b
unsigned char b
Definition: xvfb.h:203
_XVFBMOUSEDATA::btn
unsigned short btn
Definition: xvfb.h:174
_XVFBHeader::width
int width
Definition: xvfb.h:88
XVFBHeader
struct _XVFBHeader XVFBHeader
_XVFBHeader::palette_offset
int palette_offset
Definition: xvfb.h:139
_XVFBEVENT::kb_data
XVFBKEYDATA kb_data
Definition: xvfb.h:189
xVFBAllocVirtualFrameBuffer
MG_EXPORT XVFBHeader *GUIAPI xVFBAllocVirtualFrameBuffer(int width, int height, int depth, Uint32 Rmask, Uint32 Gmask, Uint32 Bmask, Uint32 Amask, BOOL MSBLeft)
create virtual framebuffer
xVFBDestroyEventBuffer
MG_EXPORT void GUIAPI xVFBDestroyEventBuffer(void *event_buf)
destroy event circular buffer.
_XVFBHeader::MSBLeft
Uint8 MSBLeft
Definition: xvfb.h:100
XVFBKEYDATA
struct _XVFBKEYDATA XVFBKEYDATA
xVFBCreateEventBuffer
MG_EXPORT void *GUIAPI xVFBCreateEventBuffer(int nr_events)
create event circular buffer.
_XVFBKEYDATA::key_code
unsigned short key_code
Definition: xvfb.h:150
XVFBMOUSEDATA
struct _XVFBMOUSEDATA XVFBMOUSEDATA
xVFBFreeVirtualFrameBuffer
MG_EXPORT void GUIAPI xVFBFreeVirtualFrameBuffer(XVFBHeader *buf)
free virtual framebuffer.
Uint8
unsigned char Uint8
A type definition for an 8-bit unsigned character.
Definition: common.h:157
_XVFBHeader::pitch
int pitch
Definition: xvfb.h:115
_XVFBHeader::dirty_rc_r
int dirty_rc_r
Definition: xvfb.h:128
BOOL
int BOOL
A type definition for boolean value.
Definition: common.h:343
_XVFBHeader::dirty
int dirty
Definition: xvfb.h:121
_XVFBMOUSEDATA::y
unsigned short y
Definition: xvfb.h:167
_XVFBHeader::palette_changed
int palette_changed
Definition: xvfb.h:136
__mg_rtos_xvfb_event_buffer
MG_EXPORT void * __mg_rtos_xvfb_event_buffer
shared memory header of x virtual framebuffer.
_XVFBPalEntry::a
unsigned char a
Definition: xvfb.h:205
_XVFBEVENT::mouse_data
XVFBMOUSEDATA mouse_data
Definition: xvfb.h:191
_XVFBPalEntry::g
unsigned char g
Definition: xvfb.h:201
_XVFBMOUSEDATA::x
unsigned short x
Definition: xvfb.h:164
_XVFBHeader::Rmask
Uint32 Rmask
Definition: xvfb.h:103
_XVFBEVENT::event_type
int event_type
Definition: xvfb.h:185
_XVFBHeader::Bmask
Uint32 Bmask
Definition: xvfb.h:109
_XVFBMOUSEDATA
Definition: xvfb.h:161
_XVFBHeader
Definition: xvfb.h:82
_XVFBKEYDATA
Definition: xvfb.h:147
xVFBNotifyNewEvent
MG_EXPORT int GUIAPI xVFBNotifyNewEvent(const void *xvfb_event_buffer, XVFBEVENT *event)
put a event to event circular buffer
_XVFBHeader::dirty_rc_b
int dirty_rc_b
Definition: xvfb.h:130
_XVFBEVENT
Definition: xvfb.h:179
_XVFBPalEntry
Definition: xvfb.h:197
Uint32
unsigned int Uint32
A type definition for a 32-bit unsigned integer.
Definition: common.h:177
_XVFBHeader::depth
int depth
Definition: xvfb.h:94
_XVFBHeader::Amask
Uint32 Amask
Definition: xvfb.h:112
_XVFBHeader::dirty_rc_l
int dirty_rc_l
Definition: xvfb.h:124
XVFBPalEntry
struct _XVFBPalEntry XVFBPalEntry
_XVFBHeader::fb_offset
int fb_offset
Definition: xvfb.h:142
XVFBEVENT
struct _XVFBEVENT XVFBEVENT
_XVFBHeader::info_size
unsigned int info_size
Definition: xvfb.h:85
_XVFBHeader::Gmask
Uint32 Gmask
Definition: xvfb.h:106
_XVFBHeader::dirty_rc_t
int dirty_rc_t
Definition: xvfb.h:126
_XVFBPalEntry::r
unsigned char r
Definition: xvfb.h:199