50 #ifndef AwesomiumHandler_h_
51 #define AwesomiumHandler_h_
53 #include "system/compat/SystemCompat.h"
54 using namespace ::br::pucrio::telemidia::ginga::core::system::compat;
56 #include "util/functions.h"
57 using namespace ::br::pucrio::telemidia::util;
59 #include "mb/ILocalScreenManager.h"
60 #include "mb/IInputManager.h"
61 #include "mb/interface/IWindow.h"
62 #include "mb/interface/IInputEventListener.h"
63 #include "mb/interface/IMotionEventListener.h"
64 using namespace ::br::pucrio::telemidia::ginga::core::mb;
74 #include <Awesomium/awesomium_capi.h>
77 #include <Awesomium/KeyboardCodes.h>
78 using namespace Awesomium;
86 typedef int AwesomiumHDR;
89 public IInputEventListener,
90 public IMotionEventListener {
93 static const short ET_NONE = 0;
94 static const short ET_KEY = 1;
95 static const short ET_BUTTON = 2;
96 static const short ET_MOTION = 3;
98 GingaScreenID myScreen;
113 pthread_cond_t _eMVar;
122 bool userEventReceived(IInputEvent* ev);
123 bool motionEventReceived(
int x,
int y,
int z);
128 static map<int, int> fromGingaToAwesomium;
129 static pthread_mutex_t s_lMutex;
130 static map<AwesomiumHDR, AwesomiumInfo*> s_infos;
131 static AwesomiumHDR s_id;
132 static map<AwesomiumHDR, IInputManager*> s_ims;
135 static bool initialized;
136 static awe_webview* webView;
138 static ILocalScreenManager* dm;
140 static void initCodeMap();
142 static bool getAwesomeInfo(
145 bool removeInfo=
false);
147 static bool getAwesomeIM(
150 bool removeInfo=
false);
152 static void onDOMReady(awe_webview* caller);
155 static AwesomiumHDR createAwesomium(GingaScreenID screenId);
156 static void destroyAwesomium(AwesomiumHDR
id);
157 static void getSize(AwesomiumHDR
id,
int* w,
int* h);
159 static void setAwesomiumBounds(
160 AwesomiumHDR
id,
int x,
int y,
int w,
int h);
162 static void loadUrl(AwesomiumHDR
id,
string url);
163 static string getUrl(AwesomiumHDR
id);
164 static ISurface* getSurface(AwesomiumHDR
id);
165 static void setFocus(AwesomiumHDR
id,
bool focus);
177 static void refresh(AwesomiumHDR
id);
181 static bool stopUpdate(AwesomiumHDR
id);
Definition: AwesomiumHandler.h:126
Definition: AwesomiumHandler.h:88