xvfb.h

Go to the documentation of this file.
00001 
00021 /*
00022  * $Id: xvfb.h 7682 2007-09-26 03:27:02Z wangxuguang $
00023  * 
00024  *             MiniGUI for Linux/uClinux, eCos, uC/OS-II, VxWorks, 
00025  *                     pSOS, ThreadX, NuCleus, OSE, and Win32.
00026  *
00027  *             Copyright (C) 2002-2009 Feynman Software.
00028  *             Copyright (C) 1998-2002 Wei Yongming.
00029  */
00030 
00031 #ifndef _MGUI_XVFB_H
00032   #define _MGUI_XVFB_H
00033 
00034 
00035 #ifdef __cplusplus
00036 extern "C" {
00037 #endif  /*__cplusplus*/
00038 
00050 typedef struct _XVFBHeader {
00051 
00053     unsigned int info_size;
00054 
00056     int width;
00057 
00059     int height;
00060 
00062     int depth;
00063 
00068     Uint8  MSBLeft;
00069 
00071     Uint32 Rmask;
00072  
00074     Uint32 Gmask;
00075 
00077     Uint32 Bmask;
00078 
00080     Uint32 Amask;
00081 
00083     int pitch;
00084 
00089     int dirty;   
00090 
00092     int dirty_rc_l;
00094     int dirty_rc_t;
00096     int dirty_rc_r;
00098     int dirty_rc_b;
00099 
00104     int palette_changed;  
00105 
00107     int palette_offset;
00108 
00110     int fb_offset;
00111 } XVFBHeader;
00112 
00113 
00115 typedef struct _XVFBKEYDATA
00116 {
00118     unsigned short key_code;
00119 
00125     unsigned short key_state;
00126 } XVFBKEYDATA;
00127 
00129 typedef struct _XVFBMOUSEDATA
00130 {
00132     unsigned short x;
00133     
00135     unsigned short y;
00136 
00142     unsigned short btn;
00143 } XVFBMOUSEDATA;
00144 
00145 
00147 typedef struct _XVFBEVENT
00148 {
00153     int event_type;
00154 
00155     union {
00157         XVFBKEYDATA kb_data;
00159         XVFBMOUSEDATA mouse_data;
00160     };
00161 } XVFBEVENT;
00162 
00163 
00165 typedef struct _XVFBPalEntry {
00167     unsigned char r;
00169     unsigned char g;
00171     unsigned char b;
00173     unsigned char a;
00174 } XVFBPalEntry;
00175 
00176 
00181 extern MG_EXPORT XVFBHeader* __mg_rtos_xvfb_header;
00182 
00190 extern MG_EXPORT void* __mg_rtos_xvfb_event_buffer;
00213 MG_EXPORT XVFBHeader* GUIAPI xVFBAllocVirtualFrameBuffer (int width, int height, int depth,
00214         Uint32 Rmask, Uint32 Gmask, Uint32 Bmask, Uint32 Amask, BOOL MSBLeft);
00215 
00222 MG_EXPORT void GUIAPI xVFBFreeVirtualFrameBuffer (XVFBHeader* buf);
00223 
00230 MG_EXPORT void* GUIAPI xVFBCreateEventBuffer (int nr_events);
00231 
00232 
00238 MG_EXPORT void GUIAPI xVFBDestroyEventBuffer (void* event_buf);
00239 
00250 MG_EXPORT int GUIAPI xVFBNotifyNewEvent (const void* xvfb_event_buffer, XVFBEVENT* event);
00251 
00252 
00253 #ifdef __cplusplus
00254 }
00255 #endif
00256 
00257 #endif
Generated on Thu Apr 7 15:58:31 2011 for MiniGUI V3.0.12 API Reference by  doxygen 1.6.3