rect.width = pPopupData->labelDim.width;
idList.Add(*(new Integer(ID_BUTTON_CERTIFICATE_CLOSE)));
- titleList.Add(*(new String(pSysResource->GetString("sys_string", "IDS_TPLATFORM_BUTTON_OK"))));
+ titleList.Add(*(new String(pSysResource->GetString(_RESOURCE_DOMAIN_ID_OSP, "IDS_TPLATFORM_BUTTON_OK"))));
}
else // CERTIFICATE_POPUP_MODE_CONFIRM
{
_SystemResource* pSysResource = _SystemResource::GetInstance();
SysAssertf(pSysResource != null, "Failed to get _SystemResource instance");
- buttonStr = pSysResource->GetString("sys_string", "IDS_TPLATFORM_BUTTON_OK");
+ buttonStr = pSysResource->GetString(_RESOURCE_DOMAIN_ID_OSP, "IDS_TPLATFORM_BUTTON_OK");
std::unique_ptr<Button> pSelectionBtn(new (std::nothrow) Button());
SysTryReturnResult(NID_WEB_CTRL, pSelectionBtn.get(), E_OUT_OF_MEMORY, "Memory Allocation Failed.");
ArrayList titleList;
r = titleList.Construct();
SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
- titleList.Add(*(new String(pSysResource->GetString("sys_string", "IDS_TPLATFORM_BUTTON_CANCEL_ABB"))));
- titleList.Add(*(new String(pSysResource->GetString("sys_string", "IDS_TPLATFORM_BUTTON_OK"))));
+ titleList.Add(*(new String(pSysResource->GetString(_RESOURCE_DOMAIN_ID_OSP, "IDS_TPLATFORM_BUTTON_CANCEL_ABB"))));
+ titleList.Add(*(new String(pSysResource->GetString(_RESOURCE_DOMAIN_ID_OSP, "IDS_TPLATFORM_BUTTON_OK"))));
r = CreateAndAddButtons(idList, titleList, pButtonPanel);
SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
r = titleList.Construct();
SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
- titleList.Add(*(new String(pSysResource->GetString("sys_string", "IDS_TPLATFORM_BUTTON_CANCEL_ABB"))));
+ titleList.Add(*(new String(pSysResource->GetString(_RESOURCE_DOMAIN_ID_OSP, "IDS_TPLATFORM_BUTTON_CANCEL_ABB"))));
if (__multiSelection)
{
- titleList.Add(*(new String(pSysResource->GetString("sys_string", "IDS_TPLATFORM_BUTTON_OK"))));
+ titleList.Add(*(new String(pSysResource->GetString(_RESOURCE_DOMAIN_ID_OSP, "IDS_TPLATFORM_BUTTON_OK"))));
__pToggledArray = eina_inarray_new(sizeof(int), 0);
SysTryReturnResult(NID_WEB_CTRL, __pToggledArray, E_OUT_OF_MEMORY, "Memory Allocation failed.");
: __pUserPolicyData(null)
, __userConfirmMode(USER_CONFIRM_USERMEDIA)
, __pCheckButton(null)
+ , __isUserActionNeeded(false)
, __sync(false)
, __pImpl(null)
{
_UserConfirmPopup::~_UserConfirmPopup(void)
{
- HandleUserAction(EINA_FALSE);
+ if (__isUserActionNeeded == true)
+ {
+ HandleUserAction(EINA_FALSE);
+ __isUserActionNeeded = false;
+ }
}
__userConfirmMode = userConfirmMode;
__sync = sync;
+ __isUserActionNeeded = true;
+
bool hasTitle = true;
int popupMaxHeight = 2*pPopupData->labelDim.height + pPopupData->btnDim.height + 2*pPopupData->sideMargin;
default:
SysAssert(false);
}
+ __isUserActionNeeded = false;
}
, __pPinchGestureHandler(null)
, __gestureType(WEB_GESTURE_TYPE_TAP)
, __edgeType(WEB_EDGE_NONE)
+ , __focus(false)
, __pTextElement(null)
, __previousTouchedPosition(0.0f, 0.0f)
, __isFullScreenEntered(false)
}
+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();
+
+ 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)
{
}
+void
+_Web::OnDrawFocus(void)
+{
+}
+
+
}}} // Tizen::Web::Controls
void SetFullScreenEntered(bool isFullScreenEntered);
+ void SetFocusEnd(bool focus);
+ bool IsFocusEnd(void);
+
virtual result OnAttaching(const _Control* pParent);
virtual result OnBoundsChanging(const Tizen::Graphics::Rectangle& bounds);
virtual bool OnCaptureAcquire(Tizen::Graphics::BufferInfo& output);
virtual void OnCaptureReleased(void) {};
+ 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);
private:
_Web(const _Web& value);
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_Context* pContext = ewk_view_context_get(pWebNativeNode);
SysAssertf(pContext, "Failed to get webkit instance.");
ewk_context_did_start_download_callback_set(pContext, OnDidStartDownloadCallback, const_cast< _WebImpl* >(this));
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_Context* pContext = ewk_view_context_get(pWebNativeNode);
SysAssertf(pContext, "Failed to get webkit instance.");
ewk_context_vibration_client_callbacks_set(pContext, null, null, null);
void* __pUserPolicyData;
_UserConfirmMode __userConfirmMode;
Tizen::Ui::Controls::CheckButton* __pCheckButton;
+ bool __isUserActionNeeded;
bool __sync;
Tizen::Web::Controls::_WebImpl* __pImpl;