50 #ifndef DFBDEVICESCREEN_H_
51 #define DFBDEVICESCREEN_H_
56 #include "cm/IComponentManager.h"
57 using namespace ::br::pucrio::telemidia::ginga::core::cm;
60 #include "mb/interface/IDeviceScreen.h"
72 #define DFBCHECK(x...) \
75 if (err != DFB_OK) { \
76 fprintf( stderr, "%s <%d>:%d\n\t", __FILE__, __LINE__, err ); \
96 static const unsigned int DSA_UNKNOWN;
97 static const unsigned int DSA_4x3;
98 static const unsigned int DSA_16x9;
109 static IComponentManager* cm;
111 set<IWindow*> windowPool;
112 vector<IWindow*> windowRenderList;
113 set<ISurface*> surfacePool;
114 set<IContinuousMediaProvider*> cmpPool;
119 pthread_mutex_t winMutex;
120 pthread_mutex_t surMutex;
121 pthread_mutex_t cmpMutex;
123 static unsigned int numOfDFBScreens;
124 static IDirectFB* dfb;
125 static IDirectFBDisplayLayer* gfxLayer;
127 static pthread_mutex_t ieMutex;
128 static map<int, int> gingaToDFBCodeMap;
129 static map<int, int> dfbToGingaCodeMap;
133 int numArgs,
char** args,
134 GingaScreenID myId, GingaWindowID embedId,
135 bool externalRenderer);
139 void releaseScreen();
142 void clearWidgetPools();
145 void setUnderlyingRootWindow(GingaWindowID embedId);
148 string getScreenName();
149 GingaWindowID getScreenUnderlyingWindow(){
return NULL;};
151 void setBackgroundImage(
string uri);
153 unsigned int getWidthResolution();
154 void setWidthResolution(
unsigned int wRes);
155 unsigned int getHeightResolution();
156 void setHeightResolution(
unsigned int hRes);
158 void setColorKey(
int r,
int g,
int b);
160 IWindow* getIWindowFromId(GingaWindowID winId) {
return NULL;};
161 bool mergeIds(GingaWindowID destId, vector<GingaWindowID>* srcIds);
162 void blitScreen(
ISurface* destination);
163 void blitScreen(
string fileUri);
164 void refreshScreen(){};
169 IWindow* createWindow(
int x,
int y,
int w,
int h,
float z);
171 GingaWindowID createUnderlyingSubWindow(
172 int x,
int y,
int w,
int h,
float z) {
return NULL;};
174 IWindow* createWindowFrom(GingaWindowID underlyingWindow);
176 void releaseWindow(
IWindow* win);
179 ISurface* createSurface(
int w,
int h);
180 ISurface* createSurfaceFrom(
void* underlyingSurface);
188 const char* mrl,
bool* hasVisual,
bool isRemote);
190 void releaseContinuousMediaProvider(
194 const char* mrl,
int fontSize);
201 ISurface* createRenderedSurfaceFromImageFile(
const char* mrl);
209 IInputEvent* createInputEvent(
void* event,
const int symbol);
210 IInputEvent* createApplicationEvent(
int type,
void* data);
211 int fromMBToGinga(
int keyCode);
212 int fromGingaToMB(
int keyCode);
222 static void initCodeMaps();
225 static IDirectFBWindow* getUnderlyingWindow(GingaWindowID winId);
227 static IDirectFBWindow* createUnderlyingWindow(
228 DFBWindowDescription* desc);
230 static void releaseUnderlyingWindow(IDirectFBWindow* uWin);
232 static IDirectFBSurface* createUnderlyingSurface(
233 DFBSurfaceDescription* desc);
235 static void releaseUnderlyingSurface(IDirectFBSurface* uSur);
238 void insertWindowFromRenderList(
239 IWindow* win, vector<IWindow*>* windows);
241 void removeWindowFromRenderList(
242 IWindow* win, vector<IWindow*>* windows);
Definition: IContinuousMediaProvider.h:71
Definition: IDeviceScreen.h:73
Definition: IEventBuffer.h:63
Definition: IInputEvent.h:61
Definition: IInputManager.h:67
Definition: IImageProvider.h:64
Definition: DFBDeviceScreen.h:94
Definition: ISurface.h:64
Definition: IFontProvider.h:62