GetImplementation(window).CursorVisibleSet(visible);
}
+bool KeyboardGrab(Window window, Device::Subclass::Type deviceSubclass)
+{
+ return GetImplementation(window).KeyboardGrab(deviceSubclass);
+}
+
+bool KeyboardUnGrab(Window window)
+{
+ return GetImplementation(window).KeyboardUnGrab();
+}
+
InterceptKeyEventSignalType& InterceptKeyEventSignal(Window window)
{
return GetImplementation(window).InterceptKeyEventSignal();
DALI_ADAPTOR_API void CursorVisibleSet(Window window, bool visible);
/**
+ * @brief Requests grab key events according to the requested device subtype
+ *
+ * @param[in] window The window instance.
+ * @param[in] deviceSubclass The deviceSubclass type.
+ * @return Returns true if KeyboardGrab succeeds.
+ */
+DALI_ADAPTOR_API bool KeyboardGrab(Window window, Device::Subclass::Type deviceSubclass);
+
+/**
+ * @brief Requests ungrab key events
+ *
+ * @param[in] window The window instance.
+ * @return Returns true if KeyboardUnGrab succeeds.
+ */
+DALI_ADAPTOR_API bool KeyboardUnGrab(Window window);
+
+/**
* @brief The user would connect to this signal to intercept a KeyEvent at window.
*
* Intercepts KeyEvents in the window before dispatching KeyEvents to the control.
{
}
+bool WindowBaseAndroid::KeyboardGrab(Device::Subclass::Type deviceSubclass)
+{
+ return false;
+}
+
+bool WindowBaseAndroid::KeyboardUnGrab()
+{
+ return false;
+}
+
} // namespace Adaptor
} // namespace Internal
*/
void CursorVisibleSet(bool visible) override;
+ /**
+ * @copydoc Dali::Internal::Adaptor::WindowBase::KeyboardGrab()
+ */
+ bool KeyboardGrab(Device::Subclass::Type deviceSubclass) override;
+
+ /**
+ * @copydoc Dali::Internal::Adaptor::WindowBase::KeyboardUnGrab()
+ */
+ bool KeyboardUnGrab() override;
+
private:
/**
* Second stage initialization
*/
virtual void CursorVisibleSet(bool visible) = 0;
+ /**
+ * @brief Requests grab key events according to the requested device subtype
+ *
+ * @param[in] deviceSubclass The deviceSubclass type.
+ * @return Returns true if KeyboardGrab succeeds.
+ */
+ virtual bool KeyboardGrab(Device::Subclass::Type deviceSubclass) = 0;
+
+ /**
+ * @brief Requests ungrab key events
+ *
+ * @param[in] window The window instance.
+ * @return Returns true if KeyboardUnGrab succeeds.
+ */
+ virtual bool KeyboardUnGrab() = 0;
+
// Signals
/**
mWindowBase->CursorVisibleSet(visible);
}
+bool Window::KeyboardGrab(Device::Subclass::Type deviceSubclass)
+{
+ return mWindowBase->KeyboardGrab(deviceSubclass);
+}
+
+bool Window::KeyboardUnGrab()
+{
+ return mWindowBase->KeyboardUnGrab();
+}
+
} // namespace Adaptor
} // namespace Internal
*/
void CursorVisibleSet(bool visible);
+ /**
+ * @copydoc Dali::DevelWindow::KeyboardGrab()
+ */
+ bool KeyboardGrab(Device::Subclass::Type deviceSubclass);
+
+ /**
+ * @copydoc Dali::DevelWindow::KeyboardUnGrab()
+ */
+ bool KeyboardUnGrab();
+
private:
/**
* @brief Enumeration for orietation mode.
*/
void CursorVisibleSet(bool visible) override;
+ /**
+ * @copydoc Dali::Internal::Adaptor::WindowBase::KeyboardGrab()
+ */
+ bool KeyboardGrab(Device::Subclass::Type deviceSubclass) override;
+
+ /**
+ * @copydoc Dali::Internal::Adaptor::WindowBase::KeyboardUnGrab()
+ */
+ bool KeyboardUnGrab() override;
+
private:
// Undefined
WindowBaseCocoa(const WindowBaseCocoa&) = delete;
{
}
+bool WindowBaseCocoa::KeyboardGrab(Device::Subclass::Type deviceSubclass)
+{
+ return false;
+}
+
+bool WindowBaseCocoa::KeyboardUnGrab()
+{
+ return false;
+}
+
} // namespace Dali::Internal::Adaptor
@implementation CocoaView
*/
void CursorVisibleSet(bool visible) override;
+ /**
+ * @copydoc Dali::Internal::Adaptor::WindowBase::KeyboardGrab()
+ */
+ bool KeyboardGrab(Device::Subclass::Type deviceSubclass) override;
+
+ /**
+ * @copydoc Dali::Internal::Adaptor::WindowBase::KeyboardUnGrab()
+ */
+ bool KeyboardUnGrab() override;
+
private:
/**
* Second stage initialization
ecore_wl2_window_cursor_visible_set(mEcoreWindow, visible);
}
+// Request grab key events according to the requested device subtype
+//(For now, subtype could be '0'/'11'/'12' which equals to ECORE_DEVICE_SUBCLASS_NONE/REMOCON/VIRTUAL_KEYBOARD)
+bool WindowBaseEcoreWl2::KeyboardGrab(Device::Subclass::Type deviceSubclass)
+{
+ Ecore_Device_Subclass ecoreDeviceSubclass;
+ switch(deviceSubclass)
+ {
+ case Device::Subclass::NONE:
+ {
+ ecoreDeviceSubclass = ECORE_DEVICE_SUBCLASS_NONE;
+ break;
+ }
+ case Device::Subclass::REMOCON:
+ {
+ ecoreDeviceSubclass = ECORE_DEVICE_SUBCLASS_REMOCON;
+ break;
+ }
+ case Device::Subclass::VIRTUAL_KEYBOARD:
+ {
+ ecoreDeviceSubclass = ECORE_DEVICE_SUBCLASS_VIRTUAL_KEYBOARD;
+ break;
+ }
+ default:
+ {
+ DALI_LOG_ERROR("deviceSubclass : %d type is not support, subtype could be 'NONE', 'REMOCON', 'VIRTUAL_KEYBOARD'\n");
+ return false;
+ }
+ }
+ return ecore_wl2_window_keyboard_grab(mEcoreWindow, ecoreDeviceSubclass);
+}
+
+// Request ungrab key events
+bool WindowBaseEcoreWl2::KeyboardUnGrab()
+{
+ return ecore_wl2_window_keyboard_ungrab(mEcoreWindow);
+}
+
} // namespace Adaptor
} // namespace Internal
*/
void CursorVisibleSet(bool visible) override;
+ /**
+ * @copydoc Dali::Internal::Adaptor::WindowBase::KeyboardGrab()
+ */
+ bool KeyboardGrab(Device::Subclass::Type deviceSubclass) override;
+
+ /**
+ * @copydoc Dali::Internal::Adaptor::WindowBase::KeyboardUnGrab()
+ */
+ bool KeyboardUnGrab() override;
+
private:
/**
* Second stage initialization
{
}
+bool WindowBaseEcoreX::KeyboardGrab(Device::Subclass::Type deviceSubclass)
+{
+ return false;
+}
+
+bool WindowBaseEcoreX::KeyboardUnGrab()
+{
+ return false;
+}
+
} // namespace Adaptor
} // namespace Internal
*/
void CursorVisibleSet(bool visible) override;
+ /**
+ * @copydoc Dali::Internal::Adaptor::WindowBase::KeyboardGrab()
+ */
+ bool KeyboardGrab(Device::Subclass::Type deviceSubclass) override;
+
+ /**
+ * @copydoc Dali::Internal::Adaptor::WindowBase::KeyboardUnGrab()
+ */
+ bool KeyboardUnGrab() override;
+
private:
/**
* Second stage initialization
{
}
+bool WindowBaseWin::KeyboardGrab(Device::Subclass::Type deviceSubclass)
+{
+ return false;
+}
+
+bool WindowBaseWin::KeyboardUnGrab()
+{
+ return false;
+}
+
} // namespace Adaptor
} // namespace Internal
*/
void CursorVisibleSet(bool visible) override;
+ /**
+ * @copydoc Dali::Internal::Adaptor::WindowBase::KeyboardGrab()
+ */
+ bool KeyboardGrab(Device::Subclass::Type deviceSubclass) override;
+
+ /**
+ * @copydoc Dali::Internal::Adaptor::WindowBase::KeyboardUnGrab()
+ */
+ bool KeyboardUnGrab() override;
+
private:
/**
* Second stage initialization
{
}
+bool WindowBaseX::KeyboardGrab(Device::Subclass::Type deviceSubclass)
+{
+ return false;
+}
+
+bool WindowBaseX::KeyboardUnGrab()
+{
+ return false;
+}
+
} // namespace Adaptor
} // namespace Internal
*/
void CursorVisibleSet(bool visible) override;
+ /**
+ * @copydoc Dali::Internal::Adaptor::WindowBase::KeyboardGrab()
+ */
+ bool KeyboardGrab(Device::Subclass::Type deviceSubclass) override;
+
+ /**
+ * @copydoc Dali::Internal::Adaptor::WindowBase::KeyboardUnGrab()
+ */
+ bool KeyboardUnGrab() override;
+
private:
/**
* Second stage initialization