void WindowBaseAndroid::OnDeleteRequest()
{
- mDeleteRequestSignal.Emit();
+ if(Dali::Adaptor::IsAvailable())
+ {
+ mDeleteRequestSignal.Emit();
+ }
}
void WindowBaseAndroid::OnFocusIn(void* data, int type, void* event)
void OnFocus(bool focus)
{
- mThis->mFocusChangedSignal.Emit(focus);
+ if(Dali::Adaptor::IsAvailable())
+ {
+ mThis->mFocusChangedSignal.Emit(focus);
+ }
}
// Handle mouse events
void OnRedraw(void)
{
- mThis->mWindowRedrawRequestSignal.Emit();
+ if(Dali::Adaptor::IsAvailable())
+ {
+ mThis->mWindowRedrawRequestSignal.Emit();
+ }
}
private:
void WindowBaseCocoa::Impl::OnMouse(NSEvent *event, PointState::Type state)
{
- Integration::Point point;
- point.SetDeviceId(event.deviceID);
- point.SetState(state);
- auto p = [event locationInWindow];
- auto [x, y] = [mWindow.contentView convertPoint:p fromView:nil];
- point.SetScreenPosition(Vector2(x, y));
- point.SetRadius(std::sqrt(x*x + y*y));
- point.SetPressure(event.pressure);
-
- if (x == 0.0)
+ if(Dali::Adaptor::IsAvailable())
{
- point.SetAngle(Degree(0.0));
- }
- else
- {
- point.SetAngle(Radian(std::atan(y/x)));
- }
-
- DALI_LOG_INFO(
- gWindowBaseLogFilter,
- Debug::Verbose,
- "WindowBaseCocoa::Impl::OnMouse(%.1f, %.1f)\n",
- x,
- y
- );
+ Integration::Point point;
+ point.SetDeviceId(event.deviceID);
+ point.SetState(state);
+ auto p = [event locationInWindow];
+ auto [x, y] = [mWindow.contentView convertPoint:p fromView:nil];
+ point.SetScreenPosition(Vector2(x, y));
+ point.SetRadius(std::sqrt(x*x + y*y));
+ point.SetPressure(event.pressure);
+
+ if (x == 0.0)
+ {
+ point.SetAngle(Degree(0.0));
+ }
+ else
+ {
+ point.SetAngle(Radian(std::atan(y/x)));
+ }
+
+ DALI_LOG_INFO(
+ gWindowBaseLogFilter,
+ Debug::Verbose,
+ "WindowBaseCocoa::Impl::OnMouse(%.1f, %.1f)\n",
+ x,
+ y
+ );
- // timestamp is given in seconds, the signal expects it in milliseconds
- mThis->mTouchEventSignal.Emit(point, event.timestamp * 1000);
+ // timestamp is given in seconds, the signal expects it in milliseconds
+ mThis->mTouchEventSignal.Emit(point, event.timestamp * 1000);
+ }
}
void WindowBaseCocoa::Impl::OnMouseWheel(NSEvent *event)
{
- auto p = [event locationInWindow];
- auto [x, y] = [mWindow.contentView convertPoint:p fromView:nil];
-
- const auto modifiers = GetKeyModifiers(event);
- const Vector2 vec(x, y);
- const auto timestamp = event.timestamp * 1000;
-
- if (event.scrollingDeltaY)
+ if(Dali::Adaptor::IsAvailable())
{
- Integration::WheelEvent wheelEvent(
- Integration::WheelEvent::MOUSE_WHEEL,
- 0,
- modifiers,
- vec,
- event.scrollingDeltaY < 0 ? -1 : 1,
- timestamp
- );
+ auto p = [event locationInWindow];
+ auto [x, y] = [mWindow.contentView convertPoint:p fromView:nil];
- mThis->mWheelEventSignal.Emit(wheelEvent);
- }
+ const auto modifiers = GetKeyModifiers(event);
+ const Vector2 vec(x, y);
+ const auto timestamp = event.timestamp * 1000;
- if (event.scrollingDeltaX)
- {
- Integration::WheelEvent wheelEvent(
- Integration::WheelEvent::MOUSE_WHEEL,
- 0,
- modifiers,
- vec,
- event.scrollingDeltaX < 0 ? -1 : 1,
- timestamp
- );
-
- mThis->mWheelEventSignal.Emit(wheelEvent);
+ if (event.scrollingDeltaY)
+ {
+ Integration::WheelEvent wheelEvent(
+ Integration::WheelEvent::MOUSE_WHEEL,
+ 0,
+ modifiers,
+ vec,
+ event.scrollingDeltaY < 0 ? -1 : 1,
+ timestamp
+ );
+
+ mThis->mWheelEventSignal.Emit(wheelEvent);
+ }
+
+ if (event.scrollingDeltaX)
+ {
+ Integration::WheelEvent wheelEvent(
+ Integration::WheelEvent::MOUSE_WHEEL,
+ 0,
+ modifiers,
+ vec,
+ event.scrollingDeltaX < 0 ? -1 : 1,
+ timestamp
+ );
+
+ mThis->mWheelEventSignal.Emit(wheelEvent);
+ }
}
}
void WindowBaseCocoa::Impl::OnKey(NSEvent *event, Integration::KeyEvent::State keyState)
{
- const std::string empty;
-
- Integration::KeyEvent keyEvent(
- GetKeyName(event),
- empty,
- [event.characters UTF8String],
- event.keyCode,
- GetKeyModifiers(event),
- event.timestamp * 1000,
- keyState,
- empty,
- empty,
- Device::Class::NONE,
- Device::Subclass::NONE
- );
+ if(Dali::Adaptor::IsAvailable())
+ {
+ const std::string empty;
+
+ Integration::KeyEvent keyEvent(
+ GetKeyName(event),
+ empty,
+ [event.characters UTF8String],
+ event.keyCode,
+ GetKeyModifiers(event),
+ event.timestamp * 1000,
+ keyState,
+ empty,
+ empty,
+ Device::Class::NONE,
+ Device::Subclass::NONE
+ );
- DALI_LOG_INFO(
- gWindowBaseLogFilter,
- Debug::Verbose,
- "WindowBaseCocoa::Impl::OnKey(%s)\n",
- [event.characters UTF8String]
- );
- keyEvent.windowId = mThis->GetNativeWindowId();
+ DALI_LOG_INFO(
+ gWindowBaseLogFilter,
+ Debug::Verbose,
+ "WindowBaseCocoa::Impl::OnKey(%s)\n",
+ [event.characters UTF8String]
+ );
+ keyEvent.windowId = mThis->GetNativeWindowId();
- mThis->mKeyEventSignal.Emit(keyEvent);
+ mThis->mKeyEventSignal.Emit(keyEvent);
+ }
}
void WindowBaseCocoa::Impl::OnWindowDamaged(const NSRect &rect)
{
- const DamageArea area(
- rect.origin.x,
- rect.origin.y,
- rect.size.width,
- rect.size.height
- );
+ if(Dali::Adaptor::IsAvailable())
+ {
+ const DamageArea area(
+ rect.origin.x,
+ rect.origin.y,
+ rect.size.width,
+ rect.size.height
+ );
- mThis->mWindowDamagedSignal.Emit(area);
+ mThis->mWindowDamagedSignal.Emit(area);
+ }
}
uint32_t WindowBaseCocoa::Impl::GetKeyModifiers(NSEvent *event) const noexcept
Ecore_Wl_Event_Window_Iconify_State_Change* iconifyChangedEvent(static_cast<Ecore_Wl_Event_Window_Iconify_State_Change*>(event));
Eina_Bool handled(ECORE_CALLBACK_PASS_ON);
- if(iconifyChangedEvent->win == static_cast<unsigned int>(ecore_wl_window_id_get(mEcoreWindow)))
+ if(iconifyChangedEvent->win == static_cast<unsigned int>(ecore_wl_window_id_get(mEcoreWindow)) && Dali::Adaptor::IsAvailable())
{
if(iconifyChangedEvent->iconified == EINA_TRUE)
{
{
Ecore_Wl_Event_Focus_In* focusInEvent(static_cast<Ecore_Wl_Event_Focus_In*>(event));
- if(focusInEvent->win == static_cast<unsigned int>(ecore_wl_window_id_get(mEcoreWindow)))
+ if(focusInEvent->win == static_cast<unsigned int>(ecore_wl_window_id_get(mEcoreWindow)) && Dali::Adaptor::IsAvailable())
{
DALI_LOG_INFO(gWindowBaseLogFilter, Debug::General, "Window EcoreEventWindowFocusIn\n");
{
Ecore_Wl_Event_Focus_Out* focusOutEvent(static_cast<Ecore_Wl_Event_Focus_Out*>(event));
- if(focusOutEvent->win == static_cast<unsigned int>(ecore_wl_window_id_get(mEcoreWindow)))
+ if(focusOutEvent->win == static_cast<unsigned int>(ecore_wl_window_id_get(mEcoreWindow)) && Dali::Adaptor::IsAvailable())
{
DALI_LOG_INFO(gWindowBaseLogFilter, Debug::General, "Window EcoreEventWindowFocusOut\n");
{
Ecore_Wl_Event_Output_Transform* transformEvent(static_cast<Ecore_Wl_Event_Output_Transform*>(event));
- if(transformEvent->output == ecore_wl_window_output_find(mEcoreWindow))
+ if(transformEvent->output == ecore_wl_window_output_find(mEcoreWindow) && Dali::Adaptor::IsAvailable())
{
DALI_LOG_INFO(gWindowBaseLogFilter, Debug::General, "Window (%p) EcoreEventOutputTransform\n", mEcoreWindow);
{
Ecore_Wl_Event_Ignore_Output_Transform* ignoreTransformEvent(static_cast<Ecore_Wl_Event_Ignore_Output_Transform*>(event));
- if(ignoreTransformEvent->win == mEcoreWindow)
+ if(ignoreTransformEvent->win == mEcoreWindow && Dali::Adaptor::IsAvailable())
{
DALI_LOG_INFO(gWindowBaseLogFilter, Debug::General, "Window (%p) EcoreEventIgnoreOutputTransform\n", mEcoreWindow);
{
Ecore_Wl_Event_Window_Rotate* ev(static_cast<Ecore_Wl_Event_Window_Rotate*>(event));
- if(ev->win == static_cast<unsigned int>(ecore_wl_window_id_get(mEcoreWindow)))
+ if(ev->win == static_cast<unsigned int>(ecore_wl_window_id_get(mEcoreWindow)) && Dali::Adaptor::IsAvailable())
{
DALI_LOG_RELEASE_INFO("WindowBaseEcoreWl::OnRotation, angle: %d, width: %d, height: %d\n", ev->angle, ev->w, ev->h);
{
Ecore_Event_Mouse_Button* touchEvent = static_cast<Ecore_Event_Mouse_Button*>(event);
- if(touchEvent->window == static_cast<unsigned int>(ecore_wl_window_id_get(mEcoreWindow)))
+ if(touchEvent->window == static_cast<unsigned int>(ecore_wl_window_id_get(mEcoreWindow)) && Dali::Adaptor::IsAvailable())
{
PointState::Type state(PointState::DOWN);
{
Ecore_Event_Mouse_Button* touchEvent = static_cast<Ecore_Event_Mouse_Button*>(event);
- if(touchEvent->window == static_cast<unsigned int>(ecore_wl_window_id_get(mEcoreWindow)))
+ if(touchEvent->window == static_cast<unsigned int>(ecore_wl_window_id_get(mEcoreWindow)) && Dali::Adaptor::IsAvailable())
{
Device::Class::Type deviceClass;
Device::Subclass::Type deviceSubclass;
{
Ecore_Event_Mouse_Move* touchEvent = static_cast<Ecore_Event_Mouse_Move*>(event);
- if(touchEvent->window == static_cast<unsigned int>(ecore_wl_window_id_get(mEcoreWindow)))
+ if(touchEvent->window == static_cast<unsigned int>(ecore_wl_window_id_get(mEcoreWindow)) && Dali::Adaptor::IsAvailable())
{
Device::Class::Type deviceClass;
Device::Subclass::Type deviceSubclass;
{
Ecore_Event_Mouse_Button* touchEvent = static_cast<Ecore_Event_Mouse_Button*>(event);
- if(touchEvent->window == static_cast<unsigned int>(ecore_wl_window_id_get(mEcoreWindow)))
+ if(touchEvent->window == static_cast<unsigned int>(ecore_wl_window_id_get(mEcoreWindow)) && Dali::Adaptor::IsAvailable())
{
Device::Class::Type deviceClass;
Device::Subclass::Type deviceSubclass;
{
Ecore_Event_Mouse_Wheel* mouseWheelEvent = static_cast<Ecore_Event_Mouse_Wheel*>(event);
- if(mouseWheelEvent->window == static_cast<unsigned int>(ecore_wl_window_id_get(mEcoreWindow)))
+ if(mouseWheelEvent->window == static_cast<unsigned int>(ecore_wl_window_id_get(mEcoreWindow)) && Dali::Adaptor::IsAvailable())
{
DALI_LOG_INFO(gWindowBaseLogFilter, Debug::General, "WindowBaseEcoreWl::OnMouseWheel: direction: %d, modifiers: %d, x: %d, y: %d, z: %d\n", mouseWheelEvent->direction, mouseWheelEvent->modifiers, mouseWheelEvent->x, mouseWheelEvent->y, mouseWheelEvent->z);
void WindowBaseEcoreWl::OnDetentRotation(void* data, int type, void* event)
{
- Ecore_Event_Detent_Rotate* detentEvent = static_cast<Ecore_Event_Detent_Rotate*>(event);
+ if(Dali::Adaptor::IsAvailable())
+ {
+ Ecore_Event_Detent_Rotate* detentEvent = static_cast<Ecore_Event_Detent_Rotate*>(event);
- DALI_LOG_INFO(gWindowBaseLogFilter, Debug::Concise, "WindowBaseEcoreWl::OnDetentRotation\n");
+ DALI_LOG_INFO(gWindowBaseLogFilter, Debug::Concise, "WindowBaseEcoreWl::OnDetentRotation\n");
- int direction = (detentEvent->direction == ECORE_DETENT_DIRECTION_CLOCKWISE) ? 1 : -1;
- int timeStamp = detentEvent->timestamp;
+ int direction = (detentEvent->direction == ECORE_DETENT_DIRECTION_CLOCKWISE) ? 1 : -1;
+ int timeStamp = detentEvent->timestamp;
- Integration::WheelEvent wheelEvent(Integration::WheelEvent::CUSTOM_WHEEL, 0, 0, Vector2(0.0f, 0.0f), direction, timeStamp);
+ Integration::WheelEvent wheelEvent(Integration::WheelEvent::CUSTOM_WHEEL, 0, 0, Vector2(0.0f, 0.0f), direction, timeStamp);
- mWheelEventSignal.Emit(wheelEvent);
+ mWheelEventSignal.Emit(wheelEvent);
+ }
}
void WindowBaseEcoreWl::OnKeyDown(void* data, int type, void* event)
{
Ecore_Event_Key* keyEvent = static_cast<Ecore_Event_Key*>(event);
- if(keyEvent->window == static_cast<unsigned int>(ecore_wl_window_id_get(mEcoreWindow)))
+ if(keyEvent->window == static_cast<unsigned int>(ecore_wl_window_id_get(mEcoreWindow)) && Dali::Adaptor::IsAvailable())
{
DALI_LOG_INFO(gWindowBaseLogFilter, Debug::General, "WindowBaseEcoreWl::OnKeyDown\n");
{
Ecore_Event_Key* keyEvent = static_cast<Ecore_Event_Key*>(event);
- if(keyEvent->window == static_cast<unsigned int>(ecore_wl_window_id_get(mEcoreWindow)))
+ if(keyEvent->window == static_cast<unsigned int>(ecore_wl_window_id_get(mEcoreWindow)) && Dali::Adaptor::IsAvailable())
{
DALI_LOG_INFO(gWindowBaseLogFilter, Debug::General, "WindowBaseEcoreWl::OnKeyUp\n");
void WindowBaseEcoreWl::OnDataSend(void* data, int type, void* event)
{
- mSelectionDataSendSignal.Emit(event);
+ if(Dali::Adaptor::IsAvailable())
+ {
+ mSelectionDataSendSignal.Emit(event);
+ }
}
void WindowBaseEcoreWl::OnDataReceive(void* data, int type, void* event)
{
- mSelectionDataReceivedSignal.Emit(event);
+ if(Dali::Adaptor::IsAvailable())
+ {
+ mSelectionDataReceivedSignal.Emit(event);
+ }
}
void WindowBaseEcoreWl::OnFontNameChanged()
{
- mStyleChangedSignal.Emit(StyleChange::DEFAULT_FONT_CHANGE);
+ if(Dali::Adaptor::IsAvailable())
+ {
+ mStyleChangedSignal.Emit(StyleChange::DEFAULT_FONT_CHANGE);
+ }
}
void WindowBaseEcoreWl::OnFontSizeChanged()
{
- mStyleChangedSignal.Emit(StyleChange::DEFAULT_FONT_SIZE_CHANGE);
+ if(Dali::Adaptor::IsAvailable())
+ {
+ mStyleChangedSignal.Emit(StyleChange::DEFAULT_FONT_SIZE_CHANGE);
+ }
}
void WindowBaseEcoreWl::RegistryGlobalCallback(void* data, struct wl_registry* registry, uint32_t name, const char* interface, uint32_t version)
Ecore_Wl2_Event_Window_Iconify_State_Change* iconifyChangedEvent(static_cast<Ecore_Wl2_Event_Window_Iconify_State_Change*>(event));
Eina_Bool handled(ECORE_CALLBACK_PASS_ON);
- if(iconifyChangedEvent->win == static_cast<unsigned int>(ecore_wl2_window_id_get(mEcoreWindow)))
+ if(iconifyChangedEvent->win == static_cast<unsigned int>(ecore_wl2_window_id_get(mEcoreWindow)) && Dali::Adaptor::IsAvailable())
{
if(iconifyChangedEvent->iconified == EINA_TRUE)
{
{
Ecore_Wl2_Event_Focus_In* focusInEvent(static_cast<Ecore_Wl2_Event_Focus_In*>(event));
- if(focusInEvent->window == static_cast<unsigned int>(ecore_wl2_window_id_get(mEcoreWindow)))
+ if(focusInEvent->window == static_cast<unsigned int>(ecore_wl2_window_id_get(mEcoreWindow)) && Dali::Adaptor::IsAvailable())
{
DALI_LOG_RELEASE_INFO("WindowBaseEcoreWl2::OnFocusIn, Window (%p) EcoreEventWindowFocusIn\n", mEcoreWindow);
{
Ecore_Wl2_Event_Focus_Out* focusOutEvent(static_cast<Ecore_Wl2_Event_Focus_Out*>(event));
- if(focusOutEvent->window == static_cast<unsigned int>(ecore_wl2_window_id_get(mEcoreWindow)))
+ if(focusOutEvent->window == static_cast<unsigned int>(ecore_wl2_window_id_get(mEcoreWindow)) && Dali::Adaptor::IsAvailable())
{
DALI_LOG_RELEASE_INFO("WindowBaseEcoreWl2::OnFocusOut, Window (%p) EcoreEventWindowFocusOut\n", mEcoreWindow);
{
Ecore_Wl2_Event_Output_Transform* transformEvent(static_cast<Ecore_Wl2_Event_Output_Transform*>(event));
- if(transformEvent->output == ecore_wl2_window_output_find(mEcoreWindow))
+ if(transformEvent->output == ecore_wl2_window_output_find(mEcoreWindow) && Dali::Adaptor::IsAvailable())
{
DALI_LOG_RELEASE_INFO("WindowBaseEcoreWl2::OnOutputTransform, Window (%p) EcoreEventOutputTransform\n", mEcoreWindow);
{
Ecore_Wl2_Event_Ignore_Output_Transform* ignoreTransformEvent(static_cast<Ecore_Wl2_Event_Ignore_Output_Transform*>(event));
- if(ignoreTransformEvent->win == mEcoreWindow)
+ if(ignoreTransformEvent->win == mEcoreWindow && Dali::Adaptor::IsAvailable())
{
DALI_LOG_RELEASE_INFO("WindowBaseEcoreWl2::OnIgnoreOutputTransform, Window (%p) EcoreEventIgnoreOutputTransform\n", mEcoreWindow);
{
Ecore_Wl2_Event_Window_Rotation* ev(static_cast<Ecore_Wl2_Event_Window_Rotation*>(event));
- if(ev->win == static_cast<unsigned int>(ecore_wl2_window_id_get(mEcoreWindow)))
+ if(ev->win == static_cast<unsigned int>(ecore_wl2_window_id_get(mEcoreWindow)) && Dali::Adaptor::IsAvailable())
{
DALI_LOG_RELEASE_INFO("WindowBaseEcoreWl2::OnRotation, Window (%p), angle: %d, width: %d, height: %d\n", mEcoreWindow, ev->angle, ev->w, ev->h);
{
Ecore_Wl2_Event_Window_Configure* ev(static_cast<Ecore_Wl2_Event_Window_Configure*>(event));
- if(ev && ev->win == static_cast<unsigned int>(ecore_wl2_window_id_get(mEcoreWindow)))
+ if(ev && ev->win == static_cast<unsigned int>(ecore_wl2_window_id_get(mEcoreWindow)) && Dali::Adaptor::IsAvailable())
{
// Note: To comply with the wayland protocol, Dali should make an ack_configure
// by calling ecore_wl2_window_commit
{
Ecore_Event_Mouse_Button* touchEvent = static_cast<Ecore_Event_Mouse_Button*>(event);
- if(touchEvent->window == static_cast<unsigned int>(ecore_wl2_window_id_get(mEcoreWindow)))
+ if(touchEvent->window == static_cast<unsigned int>(ecore_wl2_window_id_get(mEcoreWindow)) && Dali::Adaptor::IsAvailable())
{
DALI_TRACE_SCOPE(gTraceFilter, "DALI_ON_MOUSE_DOWN");
{
Ecore_Event_Mouse_Button* touchEvent = static_cast<Ecore_Event_Mouse_Button*>(event);
- if(touchEvent->window == static_cast<unsigned int>(ecore_wl2_window_id_get(mEcoreWindow)))
+ if(touchEvent->window == static_cast<unsigned int>(ecore_wl2_window_id_get(mEcoreWindow)) && Dali::Adaptor::IsAvailable())
{
DALI_TRACE_SCOPE(gTraceFilter, "DALI_ON_MOUSE_UP");
{
Ecore_Event_Mouse_Move* touchEvent = static_cast<Ecore_Event_Mouse_Move*>(event);
- if(touchEvent->window == static_cast<unsigned int>(ecore_wl2_window_id_get(mEcoreWindow)))
+ if(touchEvent->window == static_cast<unsigned int>(ecore_wl2_window_id_get(mEcoreWindow)) && Dali::Adaptor::IsAvailable())
{
DALI_TRACE_SCOPE(gTraceFilter, "DALI_ON_MOUSE_MOVE");
{
Ecore_Event_Mouse_Relative_Move* relativeMoveEvent = static_cast<Ecore_Event_Mouse_Relative_Move*>(event);
- if(relativeMoveEvent->window == static_cast<unsigned int>(ecore_wl2_window_id_get(mEcoreWindow)))
+ if(relativeMoveEvent->window == static_cast<unsigned int>(ecore_wl2_window_id_get(mEcoreWindow)) && Dali::Adaptor::IsAvailable())
{
DALI_TRACE_SCOPE(gTraceFilter, "DALI_ON_MOUSE_RELATIVE_MOVE");
{
Ecore_Event_Mouse_Button* touchEvent = static_cast<Ecore_Event_Mouse_Button*>(event);
- if(touchEvent->window == static_cast<unsigned int>(ecore_wl2_window_id_get(mEcoreWindow)))
+ if(touchEvent->window == static_cast<unsigned int>(ecore_wl2_window_id_get(mEcoreWindow)) && Dali::Adaptor::IsAvailable())
{
DALI_TRACE_SCOPE(gTraceFilter, "DALI_ON_MOUSE_CANCEL");
{
Ecore_Wl2_Event_Pointer_Constraints* constraintsEvent = static_cast<Ecore_Wl2_Event_Pointer_Constraints*>(event);
- if(constraintsEvent && constraintsEvent->win == static_cast<uint32_t>(ecore_wl2_window_id_get(mEcoreWindow)))
+ if(constraintsEvent && constraintsEvent->win == static_cast<uint32_t>(ecore_wl2_window_id_get(mEcoreWindow)) && Dali::Adaptor::IsAvailable())
{
DALI_TRACE_SCOPE(gTraceFilter, "DALI_ON_POINTER_CONSTRAINTS");
Dali::Int32Pair position(constraintsEvent->x, constraintsEvent->y);
{
Ecore_Event_Mouse_Wheel* mouseWheelEvent = static_cast<Ecore_Event_Mouse_Wheel*>(event);
- if(mouseWheelEvent->window == static_cast<unsigned int>(ecore_wl2_window_id_get(mEcoreWindow)))
+ if(mouseWheelEvent->window == static_cast<unsigned int>(ecore_wl2_window_id_get(mEcoreWindow)) && Dali::Adaptor::IsAvailable())
{
DALI_TRACE_SCOPE(gTraceFilter, "DALI_ON_MOUSE_WHEEL");
{
Ecore_Event_Mouse_IO* mouseInOutEvent = static_cast<Ecore_Event_Mouse_IO*>(event);
- if(mouseInOutEvent->window == static_cast<unsigned int>(ecore_wl2_window_id_get(mEcoreWindow)))
+ if(mouseInOutEvent->window == static_cast<unsigned int>(ecore_wl2_window_id_get(mEcoreWindow)) && Dali::Adaptor::IsAvailable())
{
DALI_TRACE_SCOPE(gTraceFilter, "DALI_ON_MOUSE_IN_OUT");
Ecore_Event_Detent_Rotate* detentEvent = static_cast<Ecore_Event_Detent_Rotate*>(event);
DALI_LOG_RELEASE_INFO("WindowBaseEcoreWl2::OnDetentRotation, Window (%p)\n", mEcoreWindow);
+ if(Dali::Adaptor::IsAvailable())
+ {
+ int32_t clockwise = (detentEvent->direction == ECORE_DETENT_DIRECTION_CLOCKWISE) ? 1 : -1;
- int32_t clockwise = (detentEvent->direction == ECORE_DETENT_DIRECTION_CLOCKWISE) ? 1 : -1;
-
- Integration::WheelEvent wheelEvent(Integration::WheelEvent::CUSTOM_WHEEL, detentEvent->direction, 0, Vector2(0.0f, 0.0f), clockwise, detentEvent->timestamp);
+ Integration::WheelEvent wheelEvent(Integration::WheelEvent::CUSTOM_WHEEL, detentEvent->direction, 0, Vector2(0.0f, 0.0f), clockwise, detentEvent->timestamp);
- mWheelEventSignal.Emit(wheelEvent);
+ mWheelEventSignal.Emit(wheelEvent);
+ }
}
void WindowBaseEcoreWl2::OnKeyDown(void* data, int type, void* event)
{
Ecore_Event_Key* keyEvent = static_cast<Ecore_Event_Key*>(event);
- if(keyEvent->window == static_cast<unsigned int>(ecore_wl2_window_id_get(mEcoreWindow)))
+ if(keyEvent->window == static_cast<unsigned int>(ecore_wl2_window_id_get(mEcoreWindow)) && Dali::Adaptor::IsAvailable())
{
std::string keyName(keyEvent->keyname);
std::string logicalKey("");
{
Ecore_Event_Key* keyEvent = static_cast<Ecore_Event_Key*>(event);
- if(keyEvent->window == static_cast<unsigned int>(ecore_wl2_window_id_get(mEcoreWindow)))
+ if(keyEvent->window == static_cast<unsigned int>(ecore_wl2_window_id_get(mEcoreWindow)) && Dali::Adaptor::IsAvailable())
{
#if defined(ECORE_VERSION_MAJOR) && (ECORE_VERSION_MAJOR >= 1) && defined(ECORE_VERSION_MINOR) && (ECORE_VERSION_MINOR >= 23)
// Cancel processing flag is sent because this key event will combine with the previous key. So, the event should not actually perform anything.
void WindowBaseEcoreWl2::OnDataSend(void* data, int type, void* event)
{
- mSelectionDataSendSignal.Emit(event);
+ if(Dali::Adaptor::IsAvailable())
+ {
+ mSelectionDataSendSignal.Emit(event);
+ }
}
void WindowBaseEcoreWl2::OnDataReceive(void* data, int type, void* event)
{
- mSelectionDataReceivedSignal.Emit(event);
+ if(Dali::Adaptor::IsAvailable())
+ {
+ mSelectionDataReceivedSignal.Emit(event);
+ }
}
void WindowBaseEcoreWl2::OnFontNameChanged()
{
- mStyleChangedSignal.Emit(StyleChange::DEFAULT_FONT_CHANGE);
+ if(Dali::Adaptor::IsAvailable())
+ {
+ mStyleChangedSignal.Emit(StyleChange::DEFAULT_FONT_CHANGE);
+ }
}
void WindowBaseEcoreWl2::OnFontSizeChanged()
{
- mStyleChangedSignal.Emit(StyleChange::DEFAULT_FONT_SIZE_CHANGE);
+ if(Dali::Adaptor::IsAvailable())
+ {
+ mStyleChangedSignal.Emit(StyleChange::DEFAULT_FONT_SIZE_CHANGE);
+ }
}
void WindowBaseEcoreWl2::OnTransitionEffectEvent(WindowEffectState state, WindowEffectType type)
{
DALI_LOG_RELEASE_INFO("WindowBaseEcoreWl2::OnTransitionEffectEvent, Window (%p)\n", mEcoreWindow);
- mTransitionEffectEventSignal.Emit(state, type);
+
+ if(Dali::Adaptor::IsAvailable())
+ {
+ mTransitionEffectEventSignal.Emit(state, type);
+ }
}
void WindowBaseEcoreWl2::OnKeyboardRepeatSettingsChanged()
{
- mKeyboardRepeatSettingsChangedSignal.Emit();
+ if(Dali::Adaptor::IsAvailable())
+ {
+ mKeyboardRepeatSettingsChangedSignal.Emit();
+ }
}
void WindowBaseEcoreWl2::OnEcoreEventWindowRedrawRequest()
{
- mWindowRedrawRequestSignal.Emit();
+ if(Dali::Adaptor::IsAvailable())
+ {
+ mWindowRedrawRequestSignal.Emit();
+ }
}
void WindowBaseEcoreWl2::OnEcoreEventWindowAuxiliaryMessage(void* event)
{
- Ecore_Wl2_Event_Aux_Message* message = static_cast<Ecore_Wl2_Event_Aux_Message*>(event);
- if(message)
+ if(Dali::Adaptor::IsAvailable())
{
- DALI_LOG_RELEASE_INFO("WindowBaseEcoreWl2::OnEcoreEventWindowAuxiliaryMessage, Window (%p), key:%s, value:%s \n", mEcoreWindow, message->key, message->val);
- std::string key(message->key);
- std::string value(message->val);
- Dali::Property::Array options;
-
- if(message->options)
+ Ecore_Wl2_Event_Aux_Message* message = static_cast<Ecore_Wl2_Event_Aux_Message*>(event);
+ if(message)
{
- Eina_List* l;
- void* data;
- EINA_LIST_FOREACH(message->options, l, data)
+ DALI_LOG_RELEASE_INFO("WindowBaseEcoreWl2::OnEcoreEventWindowAuxiliaryMessage, Window (%p), key:%s, value:%s \n", mEcoreWindow, message->key, message->val);
+ std::string key(message->key);
+ std::string value(message->val);
+ Dali::Property::Array options;
+
+ if(message->options)
{
- DALI_LOG_RELEASE_INFO("WindowBaseEcoreWl2::OnEcoreEventWindowAuxiliaryMessage, Window (%p), option: %s\n", mEcoreWindow, (char*)data);
- std::string option(static_cast<char*>(data));
- options.Add(option);
+ Eina_List* l;
+ void* data;
+ EINA_LIST_FOREACH(message->options, l, data)
+ {
+ DALI_LOG_RELEASE_INFO("WindowBaseEcoreWl2::OnEcoreEventWindowAuxiliaryMessage, Window (%p), option: %s\n", mEcoreWindow, (char*)data);
+ std::string option(static_cast<char*>(data));
+ options.Add(option);
+ }
}
- }
- mAuxiliaryMessageSignal.Emit(key, value, options);
+ mAuxiliaryMessageSignal.Emit(key, value, options);
+ }
}
}
void WindowBaseEcoreWl2::OnEcoreEventConformantChange(void* event)
{
- Ecore_Wl2_Event_Conformant_Change* ev = static_cast<Ecore_Wl2_Event_Conformant_Change*>(event);
- if(ev && ev->win == static_cast<unsigned int>(ecore_wl2_window_id_get(mEcoreWindow)))
+ if(Dali::Adaptor::IsAvailable())
{
- WindowInsetsPartType partType = WindowInsetsPartType::STATUS_BAR;
+ Ecore_Wl2_Event_Conformant_Change* ev = static_cast<Ecore_Wl2_Event_Conformant_Change*>(event);
+ if(ev && ev->win == static_cast<unsigned int>(ecore_wl2_window_id_get(mEcoreWindow)))
+ {
+ WindowInsetsPartType partType = WindowInsetsPartType::STATUS_BAR;
- int x = 0;
- int y = 0;
- int w = 0;
- int h = 0;
+ int x = 0;
+ int y = 0;
+ int w = 0;
+ int h = 0;
- switch(ev->part_type)
- {
- case ECORE_WL2_INDICATOR_PART:
- {
- partType = WindowInsetsPartType::STATUS_BAR;
- ecore_wl2_window_indicator_geometry_get(mEcoreWindow, &x, &y, &w, &h);
- break;
- }
- case ECORE_WL2_KEYBOARD_PART:
+ switch(ev->part_type)
{
- partType = WindowInsetsPartType::KEYBOARD;
- ecore_wl2_window_keyboard_geometry_get(mEcoreWindow, &x, &y, &w, &h);
- break;
- }
- case ECORE_WL2_CLIPBOARD_PART:
- {
- partType = WindowInsetsPartType::CLIPBOARD;
- ecore_wl2_window_clipboard_geometry_get(mEcoreWindow, &x, &y, &w, &h);
- break;
- }
- default:
- {
- break;
+ case ECORE_WL2_INDICATOR_PART:
+ {
+ partType = WindowInsetsPartType::STATUS_BAR;
+ ecore_wl2_window_indicator_geometry_get(mEcoreWindow, &x, &y, &w, &h);
+ break;
+ }
+ case ECORE_WL2_KEYBOARD_PART:
+ {
+ partType = WindowInsetsPartType::KEYBOARD;
+ ecore_wl2_window_keyboard_geometry_get(mEcoreWindow, &x, &y, &w, &h);
+ break;
+ }
+ case ECORE_WL2_CLIPBOARD_PART:
+ {
+ partType = WindowInsetsPartType::CLIPBOARD;
+ ecore_wl2_window_clipboard_geometry_get(mEcoreWindow, &x, &y, &w, &h);
+ break;
+ }
+ default:
+ {
+ break;
+ }
}
- }
- WindowInsetsPartState partState = WindowInsetsPartState::INVISIBLE;
+ WindowInsetsPartState partState = WindowInsetsPartState::INVISIBLE;
- int left = 0;
- int right = 0;
- int top = 0;
- int bottom = 0;
+ int left = 0;
+ int right = 0;
+ int top = 0;
+ int bottom = 0;
- // Insets are applied only if system UI(e.g. virtual keyboard) satisfies the following 2 conditions.
- // 1. System UI fits to the window width or height.
- // 2. System UI begins or ends from the edge of window.
- // Otherwise, we should not resize window content because there would be empty space around system UI.
- bool applyInsets = false;
+ // Insets are applied only if system UI(e.g. virtual keyboard) satisfies the following 2 conditions.
+ // 1. System UI fits to the window width or height.
+ // 2. System UI begins or ends from the edge of window.
+ // Otherwise, we should not resize window content because there would be empty space around system UI.
+ bool applyInsets = false;
- // Zero insets are applied if state is invisible
- if(!ev->state)
- {
- applyInsets = true;
- }
- else
- {
- partState = WindowInsetsPartState::VISIBLE;
-
- int winX = mWindowPositionSize.x;
- int winY = mWindowPositionSize.y;
- int winW = mWindowPositionSize.width;
- int winH = mWindowPositionSize.height;
-
- if((x <= winX) && (x + w >= winX + winW))
+ // Zero insets are applied if state is invisible
+ if(!ev->state)
{
- if((y <= winY) && (y + h >= winY) && (y + h <= winY + winH))
- {
- top = y + h - winY;
- applyInsets = true;
- }
- else if((y + h >= winY + winH) && (y >= winY) && (y <= winY + winH))
- {
- bottom = winY + winH - y;
- applyInsets = true;
- }
+ applyInsets = true;
}
- else if((y <= winY) && (y + h >= winY + winH))
+ else
{
- if((x <= winX) && (x + w >= winX) && (x + w <= winX + winW))
+ partState = WindowInsetsPartState::VISIBLE;
+
+ int winX = mWindowPositionSize.x;
+ int winY = mWindowPositionSize.y;
+ int winW = mWindowPositionSize.width;
+ int winH = mWindowPositionSize.height;
+
+ if((x <= winX) && (x + w >= winX + winW))
{
- left = x + w - winX;
- applyInsets = true;
+ if((y <= winY) && (y + h >= winY) && (y + h <= winY + winH))
+ {
+ top = y + h - winY;
+ applyInsets = true;
+ }
+ else if((y + h >= winY + winH) && (y >= winY) && (y <= winY + winH))
+ {
+ bottom = winY + winH - y;
+ applyInsets = true;
+ }
}
- else if((x + w >= winX + winW) && (x >= winX) && (x <= winX + winW))
+ else if((y <= winY) && (y + h >= winY + winH))
{
- right = winX + winW - x;
- applyInsets = true;
+ if((x <= winX) && (x + w >= winX) && (x + w <= winX + winW))
+ {
+ left = x + w - winX;
+ applyInsets = true;
+ }
+ else if((x + w >= winX + winW) && (x >= winX) && (x <= winX + winW))
+ {
+ right = winX + winW - x;
+ applyInsets = true;
+ }
}
}
- }
- if(applyInsets)
- {
- mInsetsChangedSignal.Emit(partType, partState, Extents(left, right, top, bottom));
+ if(applyInsets)
+ {
+ mInsetsChangedSignal.Emit(partType, partState, Extents(left, right, top, bottom));
+ }
}
}
}
void WindowBaseEcoreWl2::OnMoveCompleted(void* event)
{
Ecore_Wl2_Event_Window_Interactive_Move_Done* movedDoneEvent = static_cast<Ecore_Wl2_Event_Window_Interactive_Move_Done*>(event);
- if(movedDoneEvent && movedDoneEvent->win == static_cast<uint32_t>(ecore_wl2_window_id_get(mEcoreWindow)))
+ if(movedDoneEvent && movedDoneEvent->win == static_cast<uint32_t>(ecore_wl2_window_id_get(mEcoreWindow)) && Dali::Adaptor::IsAvailable())
{
Dali::PositionSize orgPositionSize(movedDoneEvent->x, movedDoneEvent->y, movedDoneEvent->w, movedDoneEvent->h);
Dali::PositionSize newPositionSize = RecalculatePositionSizeToCurrentOrientation(orgPositionSize);
void WindowBaseEcoreWl2::OnResizeCompleted(void* event)
{
Ecore_Wl2_Event_Window_Interactive_Resize_Done* resizedDoneEvent = static_cast<Ecore_Wl2_Event_Window_Interactive_Resize_Done*>(event);
- if(resizedDoneEvent && resizedDoneEvent->win == static_cast<uint32_t>(ecore_wl2_window_id_get(mEcoreWindow)))
+ if(resizedDoneEvent && resizedDoneEvent->win == static_cast<uint32_t>(ecore_wl2_window_id_get(mEcoreWindow)) && Dali::Adaptor::IsAvailable())
{
Dali::PositionSize orgPositionSize(resizedDoneEvent->x, resizedDoneEvent->y, resizedDoneEvent->w, resizedDoneEvent->h);
Dali::PositionSize newPositionSize = RecalculatePositionSizeToCurrentOrientation(orgPositionSize);
void WindowBaseEcoreX::OnWindowConfigure(void* event)
{
auto configure = static_cast<Ecore_X_Event_Window_Configure*>(event);
- if(configure->win == mEcoreWindow)
+ if(configure->win == mEcoreWindow && Dali::Adaptor::IsAvailable())
{
Dali::PositionSize positionSize;
positionSize.x = configure->x;
Ecore_X_Event_Window_Property* propertyChangedEvent = static_cast<Ecore_X_Event_Window_Property*>(event);
Eina_Bool handled(ECORE_CALLBACK_PASS_ON);
- if(propertyChangedEvent->win == mEcoreWindow)
+ if(propertyChangedEvent->win == mEcoreWindow && Dali::Adaptor::IsAvailable())
{
Ecore_X_Window_State_Hint state(ecore_x_icccm_state_get(propertyChangedEvent->win));
void WindowBaseEcoreX::OnDeleteRequest()
{
- mDeleteRequestSignal.Emit();
+ if(Dali::Adaptor::IsAvailable())
+ {
+ mDeleteRequestSignal.Emit();
+ }
}
void WindowBaseEcoreX::OnFocusIn(void* data, int type, void* event)
{
Ecore_X_Event_Window_Focus_In* focusInEvent = static_cast<Ecore_X_Event_Window_Focus_In*>(event);
- if(focusInEvent->win == mEcoreWindow)
+ if(focusInEvent->win == mEcoreWindow && Dali::Adaptor::IsAvailable())
{
DALI_LOG_INFO(gWindowBaseLogFilter, Debug::General, "Window EcoreEventWindowFocusIn\n");
Ecore_X_Event_Window_Focus_Out* focusOutEvent = static_cast<Ecore_X_Event_Window_Focus_Out*>(event);
// If the window loses focus then hide the keyboard.
- if(focusOutEvent->win == mEcoreWindow)
+ if(focusOutEvent->win == mEcoreWindow && Dali::Adaptor::IsAvailable())
{
DALI_LOG_INFO(gWindowBaseLogFilter, Debug::General, "Window EcoreEventWindowFocusOut\n");
{
Ecore_X_Event_Window_Damage* windowDamagedEvent = static_cast<Ecore_X_Event_Window_Damage*>(event);
- if(windowDamagedEvent->win == mEcoreWindow)
+ if(windowDamagedEvent->win == mEcoreWindow && Dali::Adaptor::IsAvailable())
{
DamageArea area;
area.x = windowDamagedEvent->x;
{
Ecore_Event_Mouse_Button* touchEvent = static_cast<Ecore_Event_Mouse_Button*>(event);
- if(touchEvent->window == mEcoreWindow)
+ if(touchEvent->window == mEcoreWindow && Dali::Adaptor::IsAvailable())
{
PointState::Type state(PointState::DOWN);
{
Ecore_Event_Mouse_Button* touchEvent = static_cast<Ecore_Event_Mouse_Button*>(event);
- if(touchEvent->window == mEcoreWindow)
+ if(touchEvent->window == mEcoreWindow && Dali::Adaptor::IsAvailable())
{
Integration::Point point;
point.SetDeviceId(touchEvent->multi.device);
{
Ecore_Event_Mouse_Move* touchEvent = static_cast<Ecore_Event_Mouse_Move*>(event);
- if(touchEvent->window == mEcoreWindow)
+ if(touchEvent->window == mEcoreWindow && Dali::Adaptor::IsAvailable())
{
Integration::Point point;
point.SetDeviceId(touchEvent->multi.device);
{
Ecore_Event_Mouse_Wheel* mouseWheelEvent = static_cast<Ecore_Event_Mouse_Wheel*>(event);
- if(mouseWheelEvent->window == mEcoreWindow)
+ if(mouseWheelEvent->window == mEcoreWindow && Dali::Adaptor::IsAvailable())
{
DALI_LOG_INFO(gWindowBaseLogFilter, Debug::General, "WindowBaseEcoreX::OnMouseWheel: direction: %d, modifiers: %d, x: %d, y: %d, z: %d\n", mouseWheelEvent->direction, mouseWheelEvent->modifiers, mouseWheelEvent->x, mouseWheelEvent->y, mouseWheelEvent->z);
{
Ecore_Event_Key* keyEvent = static_cast<Ecore_Event_Key*>(event);
- if(keyEvent->window == mEcoreWindow)
+ if(keyEvent->window == mEcoreWindow && Dali::Adaptor::IsAvailable())
{
DALI_LOG_INFO(gWindowBaseLogFilter, Debug::General, "WindowBaseEcoreX::OnKeyDown\n");
{
Ecore_Event_Key* keyEvent = static_cast<Ecore_Event_Key*>(event);
- if(keyEvent->window == mEcoreWindow)
+ if(keyEvent->window == mEcoreWindow && Dali::Adaptor::IsAvailable())
{
DALI_LOG_INFO(gWindowBaseLogFilter, Debug::General, " WindowBaseEcoreX::OnKeyUp\n");
{
Ecore_X_Event_Selection_Notify* selectionNotifyEvent = static_cast<Ecore_X_Event_Selection_Notify*>(event);
- if(selectionNotifyEvent->win == mEcoreWindow)
+ if(selectionNotifyEvent->win == mEcoreWindow && Dali::Adaptor::IsAvailable())
{
DALI_LOG_INFO(gWindowBaseLogFilter, Debug::Concise, " WindowBaseEcoreX::OnSelectionNotify\n");
void WindowBaseWin::OnDeleteRequest()
{
- mDeleteRequestSignal.Emit();
+ if(Dali::Adaptor::IsAvailable())
+ {
+ mDeleteRequestSignal.Emit();
+ }
}
void WindowBaseWin::OnFocusIn(int type, TWinEventInfo* event)
{
Event_Mouse_Button* windowDamagedEvent((Event_Mouse_Button*)event);
- if(windowDamagedEvent->window == mWin32Window)
+ if(windowDamagedEvent->window == mWin32Window && Dali::Adaptor::IsAvailable())
{
DamageArea area;
area.x = 0;
touchEvent.y = HIWORD(event->lParam);
touchEvent.multi.device = DEVICE_MOUSE;
- if(touchEvent.window == mWin32Window)
+ if(touchEvent.window == mWin32Window && Dali::Adaptor::IsAvailable())
{
PointState::Type state(PointState::DOWN);
touchEvent.y = HIWORD(event->lParam);
touchEvent.multi.device = DEVICE_MOUSE;
- if(touchEvent.window == mWin32Window)
+ if(touchEvent.window == mWin32Window && Dali::Adaptor::IsAvailable())
{
PointState::Type state(PointState::UP);
touchEvent.y = HIWORD(event->lParam);
touchEvent.multi.device = DEVICE_MOUSE;
- if(touchEvent.window == mWin32Window)
+ if(touchEvent.window == mWin32Window && Dali::Adaptor::IsAvailable())
{
PointState::Type state(PointState::MOTION);
{
Event_Mouse_Wheel mouseWheelEvent = *((Event_Mouse_Wheel*)(event));
- if(mouseWheelEvent.window == mWin32Window)
+ if(mouseWheelEvent.window == mWin32Window && Dali::Adaptor::IsAvailable())
{
DALI_LOG_INFO(gWindowBaseLogFilter, Debug::General, "WindowBaseWin::OnMouseWheel: direction: %d, modifiers: %d, x: %d, y: %d, z: %d\n", mouseWheelEvent.direction, mouseWheelEvent.modifiers, mouseWheelEvent.x, mouseWheelEvent.y, mouseWheelEvent.z);
void WindowBaseWin::OnKeyDown(int type, TWinEventInfo* event)
{
- if(event->mWindow == mWin32Window)
+ if(event->mWindow == mWin32Window && Dali::Adaptor::IsAvailable())
{
DALI_LOG_INFO(gWindowBaseLogFilter, Debug::General, "WindowBaseWin::OnKeyDown\n");
void WindowBaseWin::OnKeyUp(int type, TWinEventInfo* event)
{
- if(event->mWindow == mWin32Window)
+ if(event->mWindow == mWin32Window && Dali::Adaptor::IsAvailable())
{
DALI_LOG_INFO(gWindowBaseLogFilter, Debug::General, "WindowBaseWin::OnKeyDown\n");
bool handled(false);
auto propertyNotifyEvent = static_cast<WindowSystem::WindowSystemX::X11PropertyNotifyEvent*>(event);
- if(propertyNotifyEvent->window == mWindow)
+ if(propertyNotifyEvent->window == mWindow && Dali::Adaptor::IsAvailable())
{
WindowSystemX::WindowState state = WindowSystem::GetImplementation().GetWindowState(mWindow);
void WindowBaseX::OnConfigure(WindowSystemBase::EventBase* event)
{
auto configureEvent = static_cast<WindowSystemX::X11ConfigureNotifyEvent*>(event);
- if(configureEvent->window == mWindow)
+ if(configureEvent->window == mWindow && Dali::Adaptor::IsAvailable())
{
DALI_LOG_INFO(gWindowBaseLogFilter, Debug::General, "Window::OnConfigureNotify\n");
Dali::PositionSize positionSize;
void WindowBaseX::OnDeleteRequest()
{
- mDeleteRequestSignal.Emit();
+ if(Dali::Adaptor::IsAvailable())
+ {
+ mDeleteRequestSignal.Emit();
+ }
}
void WindowBaseX::OnFocusIn(void* data, WindowSystemBase::Event, WindowSystemBase::EventBase* event)
{
auto x11Event = static_cast<WindowSystemX::X11Event*>(event);
- if(x11Event->window == mWindow)
+ if(x11Event->window == mWindow && Dali::Adaptor::IsAvailable())
{
DALI_LOG_INFO(gWindowBaseLogFilter, Debug::General, "Window::OnFocusIn\n");
{
auto x11Event = static_cast<WindowSystemX::X11Event*>(event);
// If the window loses focus then hide the keyboard.
- if(x11Event->window == mWindow)
+ if(x11Event->window == mWindow && Dali::Adaptor::IsAvailable())
{
DALI_LOG_INFO(gWindowBaseLogFilter, Debug::General, "Window::FocusOut\n");
void WindowBaseX::OnWindowDamaged(void* data, WindowSystemBase::Event, WindowSystemBase::EventBase* event)
{
auto windowExposeEvent = static_cast<WindowSystemX::X11ExposeEvent*>(event);
- if(windowExposeEvent->window == mWindow)
+ if(windowExposeEvent->window == mWindow && Dali::Adaptor::IsAvailable())
{
DamageArea area;
area.x = windowExposeEvent->x;
{
auto touchEvent = static_cast<WindowSystemX::X11MouseEvent*>(event);
- if(touchEvent->window == mWindow)
+ if(touchEvent->window == mWindow && Dali::Adaptor::IsAvailable())
{
DALI_LOG_INFO(gWindowBaseLogFilter, Debug::General, "Window::ButtonDown\n");
PointState::Type state(PointState::DOWN);
{
auto touchEvent = static_cast<WindowSystemX::X11MouseEvent*>(event);
- if(touchEvent->window == mWindow)
+ if(touchEvent->window == mWindow && Dali::Adaptor::IsAvailable())
{
DALI_LOG_INFO(gWindowBaseLogFilter, Debug::General, "Window::ButtonUp\n");
Integration::Point point;
{
auto touchEvent = static_cast<WindowSystemX::X11MouseEvent*>(event);
- if(touchEvent->window == mWindow)
+ if(touchEvent->window == mWindow && Dali::Adaptor::IsAvailable())
{
Integration::Point point;
point.SetDeviceId(touchEvent->device);
{
auto mouseWheelEvent = static_cast<WindowSystemX::X11MouseWheelEvent*>(event);
- if(mouseWheelEvent->window == mWindow)
+ if(mouseWheelEvent->window == mWindow && Dali::Adaptor::IsAvailable())
{
DALI_LOG_INFO(gWindowBaseLogFilter, Debug::General, "WindowBaseX::OnMouseWheel: direction: %d, modifiers: %d, x: %d, y: %d, z: %d\n", mouseWheelEvent->direction, mouseWheelEvent->modifiers, mouseWheelEvent->x, mouseWheelEvent->y, mouseWheelEvent->z);
{
auto keyEvent = static_cast<WindowSystemX::X11KeyEvent*>(event);
- if(keyEvent->window == mWindow)
+ if(keyEvent->window == mWindow && Dali::Adaptor::IsAvailable())
{
DALI_LOG_INFO(gWindowBaseLogFilter, Debug::General, "WindowBaseX::OnKeyDown\n");
{
auto keyEvent = static_cast<WindowSystemX::X11KeyEvent*>(event);
- if(keyEvent->window == mWindow)
+ if(keyEvent->window == mWindow && Dali::Adaptor::IsAvailable())
{
DALI_LOG_INFO(gWindowBaseLogFilter, Debug::General, " WindowBaseX::OnKeyUp\n");