50 #ifndef FORMATTERFOCUSMANAGER_H_
51 #define FORMATTERFOCUSMANAGER_H_
53 #include "util/functions.h"
54 #include "util/Color.h"
56 #include "mb/IMBDefs.h"
57 #include "mb/IInputManager.h"
58 #include "mb/interface/IInputEventListener.h"
59 #include "mb/interface/CodeMap.h"
60 using namespace ::br::pucrio::telemidia::ginga::core::mb;
62 #include "../model/CascadingDescriptor.h"
63 #include "../model/ExecutionObject.h"
64 using namespace ::br::pucrio::telemidia::ginga::ncl::model::components;
66 #include "../model/SelectionEvent.h"
67 using namespace ::br::pucrio::telemidia::ginga::ncl::model::event;
69 #include "../model/ILinkActionListener.h"
70 #include "../model/LinkSimpleAction.h"
71 using namespace ::br::pucrio::telemidia::ginga::ncl::model::link;
73 #include "../model/FormatterRegion.h"
74 using namespace ::br::pucrio::telemidia::ginga::ncl::model::presentation;
76 #include "../adaptation/context/IPresentationContext.h"
77 using namespace ::br::pucrio::telemidia::ginga::ncl::adaptation::context;
79 #include "../adapters/FormatterPlayerAdapter.h"
80 #include "../adapters/PlayerAdapterManager.h"
81 using namespace ::br::pucrio::telemidia::ginga::ncl::adapters;
83 #include "../multidevice/IFormatterMultiDevice.h"
84 using namespace ::br::pucrio::telemidia::ginga::ncl::multidevice;
86 #include "IFormatterFocusManager.h"
102 public IInputEventListener {
107 GingaScreenID myScreen;
108 IPresentationContext* presContext;
109 map<string, set<ExecutionObject*>*>* focusTable;
112 string objectToSelect;
113 ExecutionObject* selectedObject;
115 Color* defaultFocusBorderColor;
116 int defaultFocusBorderWidth;
117 Color* defaultSelBorderColor;
118 PlayerAdapterManager* playerManager;
120 IFormatterMultiDevice* multiDevice;
121 ILinkActionListener* settingActions;
128 double focusHandlerTS;
131 pthread_mutex_t mutexFocus;
132 pthread_mutex_t mutexTable;
135 static set<FormatterFocusManager*> instances;
136 static pthread_mutex_t iMutex;
140 PlayerAdapterManager* playerManager,
141 IPresentationContext* presContext,
142 IFormatterMultiDevice* multiDevice,
143 ILinkActionListener* settingActions,
149 static void checkInit();
150 static bool hasInstance(
156 bool setKeyHandler(
bool isHandler);
159 void setHandlingObjects(
bool isHandling);
160 void resetKeyMaster();
163 void tapObject(
void* executionObject);
164 void setKeyMaster(
string mediaId);
166 void setFocus(
string focusIndex);
169 void setFocus(CascadingDescriptor* descriptor);
170 void recoveryDefaultState(ExecutionObject*
object);
173 void showObject(ExecutionObject*
object);
174 void hideObject(ExecutionObject*
object);
177 ExecutionObject* getObjectFromFocusIndex(
string focusIndex);
178 void insertObject(ExecutionObject*
object,
string focusIndex);
179 void removeObject(ExecutionObject*
object,
string focusIndex);
181 bool keyCodeOk(ExecutionObject* currentObject);
183 bool enterSelection(FormatterPlayerAdapter* player);
184 void exitSelection(FormatterPlayerAdapter* player);
185 void registerNavigationKeys();
186 void registerBackKeys();
190 void setDefaultFocusBorderColor(
Color* color);
191 void setDefaultFocusBorderWidth(
int width);
192 void setDefaultSelBorderColor(
Color* color);
194 void setMotionBoundaries(
int x,
int y,
int w,
int h);
197 void changeSettingState(
string name,
string act);
200 bool userEventReceived(IInputEvent* ev);
201 bool motionEventReceived(
int x,
int y,
int z);
Definition: IFormatterFocusManager.h:65
Definition: FormatterFocusManager.h:100