, __pPinchGestureHandler(null)
, __gestureType(WEB_GESTURE_TYPE_TAP)
, __edgeType(WEB_EDGE_NONE)
+ , __focus(false)
, __pTextElement(null)
, __previousTouchedPosition(0.0f, 0.0f)
{
}
+void
+_Web::SetFocusEnd(bool focus)
+{
+ __focus = focus;
+}
+
+
+bool
+_Web::IsFocusEnd(void)
+{
+ return __focus;
+}
+
+
+bool
+_Web::OnKeyPressed(const _Control& source, const _KeyInfo& keyInfo)
+{
+ _KeyCode keyCode = keyInfo.GetKeyCode();
+ Evas* pEvas = evas_object_evas_get(GetWebNativeNode());
+
+ if (IsFocusEnd() == true)
+ {
+ SetFocusEnd(false);
+ evas_object_focus_set(GetWebNativeNode(), EINA_FALSE);
+ return false;
+ }
+
+ switch(keyCode)
+ {
+ case _KEY_UP:
+ case _KEY_DOWN:
+ evas_object_focus_set(GetWebNativeNode(), EINA_FALSE);
+ return false;
+ break;
+ default:
+ break;
+ }
+
+ evas_object_focus_set(GetWebNativeNode(), EINA_TRUE);
+
+ return true;
+}
+
+
+bool
+_Web::OnKeyReleased(const _Control& source, const _KeyInfo& keyInfo)
+{
+ return false;
+}
+
+
+void
+_Web::OnDrawFocus(void)
+{
+}
+
+
bool
_Web::OnTouchPressed(const _Control& source, const _TouchInfo& touchInfo)
{
void SetEdgeReachedEvent(_WebEdgeType type);
+ void SetFocusEnd(bool focus);
+ bool IsFocusEnd(void);
+
virtual result OnAttaching(const _Control* pParent);
virtual result OnBoundsChanging(const Tizen::Graphics::Rectangle& bounds);
+ virtual bool OnKeyPressed(const Tizen::Ui::_Control& source, const Tizen::Ui::_KeyInfo& keyInfo);
+ virtual bool OnKeyReleased(const Tizen::Ui::_Control& source, const Tizen::Ui::_KeyInfo& keyInfo);
+ virtual void OnDrawFocus(void);
+
virtual bool OnTouchPressed(const Tizen::Ui::_Control& source, const Tizen::Ui::_TouchInfo& touchInfo);
virtual bool OnTouchReleased(const Tizen::Ui::_Control& source, const Tizen::Ui::_TouchInfo& touchInfo);
virtual bool OnTouchMoved(const Tizen::Ui::_Control& source, const Tizen::Ui::_TouchInfo& touchInfo);
int __edgeType;
+ bool __focus;
+
Tizen::Ui::_AccessibilityElement* __pTextElement;
Tizen::Graphics::FloatPoint __previousTouchedPosition;
void
+OnFocusDownRequested(void* pUserData, Evas_Object* pView, void* pEventInfo)
+{
+ _WebImpl* pImpl = reinterpret_cast<_WebImpl*>(pUserData);
+ SysAssertf(pImpl, "Failed to request");
+
+ _Web* pWebCore = dynamic_cast< _Web* >(&(pImpl->GetCore()));
+ //pWebCore->SetFocusEnd(true);
+}
+
+
+void
+OnFocusUpRequested(void* pUserData, Evas_Object* pView, void* pEventInfo)
+{
+ _WebImpl* pImpl = reinterpret_cast<_WebImpl*>(pUserData);
+ SysAssertf(pImpl, "Failed to request");
+
+ _Web* pWebCore = dynamic_cast< _Web* >(&(pImpl->GetCore()));
+ //pWebCore->SetFocusEnd(true);
+}
+
+
+void
OnVibrationRequested(uint64_t duration, void* pUserData)
{
result r = E_SUCCESS;
evas_object_smart_callback_add(pWebNativeNode, "fullscreen,enterfullscreen", OnFullScreenEntered, this);
evas_object_smart_callback_add(pWebNativeNode, "fullscreen,exitfullscreen", OnFullScreenExited, this);
+ evas_object_smart_callback_add(pWebNativeNode, "keyevent,down,not,handled", OnFocusDownRequested, this);
+ evas_object_smart_callback_add(pWebNativeNode, "keyevent,up,not,handled", OnFocusUpRequested, this);
+
ewk_view_open_panel_callback_set(pWebNativeNode, OnSelectUploadFile, const_cast< _WebImpl* >(this));
Ewk_Context* pContext = ewk_view_context_get(pWebNativeNode);
SysAssertf(pContext, "Failed to get webkit instance.");
evas_object_smart_callback_del(pWebNativeNode, "fullscreen,enterfullscreen", OnFullScreenEntered);
evas_object_smart_callback_del(pWebNativeNode, "fullscreen,exitfullscreen", OnFullScreenExited);
+ evas_object_smart_callback_del(pWebNativeNode, "keyevent,down,not,handled", OnFocusDownRequested);
+ evas_object_smart_callback_del(pWebNativeNode, "keyevent,up,not,handled", OnFocusUpRequested);
+
ewk_view_open_panel_callback_set(null, null, null);
Ewk_Context* pContext = ewk_view_context_get(pWebNativeNode);
SysAssertf(pContext, "Failed to get webkit instance.");