50 #ifndef LocalScreenManager_H_
51 #define LocalScreenManager_H_
53 #include "interface/IDeviceScreen.h"
54 #include "ILocalScreenManager.h"
55 #include "IInputManager.h"
59 #include "system/thread/Thread.h"
60 using namespace br::pucrio::telemidia::ginga::core::system::thread;
77 static const short GMBST_DFLT;
78 static const short GMBST_DFB;
79 static const short GMBST_DX;
80 static const short GMBST_SDL;
81 static const short GMBST_TERM;
85 static const short GMBSST_DFLT;
86 static const short GMBSST_FBDEV;
87 static const short GMBSST_X11;
88 static const short GMBSST_HWND;
89 static const short GMBSST_SDL;
90 static const short GMBSST_COCOA;
93 map<GingaScreenID, IDeviceScreen*> screens;
94 pthread_mutex_t mapMutex;
95 pthread_mutex_t genMutex;
97 static set<IInputEventListener*> iListeners;
98 static pthread_mutex_t ilMutex;
100 static set<IMotionEventListener*> mListeners;
101 static pthread_mutex_t mlMutex;
103 static bool initMutex;
105 vector<short> sortSys;
106 map<string, short> sysNames;
107 pthread_mutex_t sysMutex;
112 pthread_cond_t wsSignal;
113 pthread_mutex_t wsMutex;
114 GingaScreenID waitingRefreshScreen;
121 static void checkInitMutex();
124 void releaseHandler();
126 static void addIEListenerInstance(
129 static void removeIEListenerInstance(
132 static bool hasIEListenerInstance(
135 static void addMEListenerInstance(
138 static void removeMEListenerInstance(
141 static bool hasMEListenerInstance(
144 void setBackgroundImage(GingaScreenID screenId,
string uri);
148 int getDeviceWidth(GingaScreenID screenId);
150 int getDeviceHeight(GingaScreenID screenId);
152 void* getGfxRoot(GingaScreenID screenId);
154 void releaseScreen(GingaScreenID screenId);
155 void releaseMB(GingaScreenID screenId);
156 void clearWidgetPools(GingaScreenID screenId);
158 GingaScreenID createScreen(
int argc,
char** args);
161 GingaScreenID createScreen(
168 bool externalRenderer,
172 string getScreenName(GingaScreenID screenId);
173 GingaWindowID getScreenUnderlyingWindow(GingaScreenID screenId);
176 void getMBSystemType(
string mbSystemName,
short* mbSystemType);
178 bool isAvailable(
short mbSysType);
180 void unlockSysNames();
184 GingaScreenID screenId, GingaWindowID winId);
187 GingaScreenID screenId,
188 GingaWindowID destId,
189 vector<GingaWindowID>* srcIds);
191 void blitScreen(GingaScreenID screenId,
ISurface* destination);
192 void blitScreen(GingaScreenID screenId,
string fileUri);
193 void refreshScreen(GingaScreenID screenId);
198 GingaScreenID screenId,
203 GingaWindowID createUnderlyingSubWindow(
204 GingaScreenID screenId,
210 GingaScreenID screenId, GingaWindowID underlyingWindow);
212 bool hasWindow(GingaScreenID screenId,
IWindow* window);
213 void releaseWindow(GingaScreenID screenId,
IWindow* window);
215 ISurface* createSurface(GingaScreenID screenId);
217 ISurface* createSurface(GingaScreenID screenId,
int w,
int h);
220 GingaScreenID screenId,
void* underlyingSurface);
222 bool hasSurface(GingaScreenID screenId,
ISurface* surface);
223 bool releaseSurface(GingaScreenID screenId,
ISurface* surface);
228 GingaScreenID screenId,
233 void releaseContinuousMediaProvider(
234 GingaScreenID screenId,
238 GingaScreenID screenId,
242 void releaseFontProvider(
246 GingaScreenID screenId,
const char* mrl);
248 void releaseImageProvider(
251 ISurface* createRenderedSurfaceFromImageFile(
252 GingaScreenID screenId,
const char* mrl);
257 IEventBuffer* createEventBuffer(GingaScreenID screenId);
259 GingaScreenID screenId,
void* event,
const int symbol);
262 GingaScreenID screenId,
int type,
void* data);
264 int fromMBToGinga(GingaScreenID screenId,
int keyCode);
265 int fromGingaToMB(GingaScreenID screenId,
int keyCode);
272 short getNumOfScreens();
277 bool removeScreen(GingaScreenID screenId);
279 void lockScreenMap();
280 void unlockScreenMap();
Definition: IMotionEventListener.h:59
Definition: LocalScreenManager.h:73
Definition: IInputEventListener.h:61
Definition: IContinuousMediaProvider.h:71
Definition: IDeviceScreen.h:73
Definition: ILocalScreenManager.h:76
Definition: IEventBuffer.h:63
Definition: IInputEvent.h:61
Definition: IInputManager.h:67
Definition: IImageProvider.h:64
Definition: ISurface.h:64
Definition: IFontProvider.h:62