#include <ecore-indicator-impl.h>
#include <window-visibility-observer.h>
#include <orientation-impl.h>
-
namespace
{
const float INDICATOR_ANIMATION_DURATION( 0.18f ); // 180 milli seconds
*/
EventHandler( Window* window )
: mWindow( window ),
+ mWindowPropertyHandler( NULL ),
+ mClientMessageHandler( NULL ),
mEcoreWindow( 0 )
{
+ // store ecore window handle
+ ECore::WindowRenderSurface* wlWindow( dynamic_cast< ECore::WindowRenderSurface * >( mWindow->mSurface ) );
+ if( wlWindow )
+ {
+ mEcoreWindow = wlWindow->GetWlWindow();
+ }
+ DALI_ASSERT_ALWAYS( mEcoreWindow != 0 && "There is no ecore Wl window");
}
/**
{
ecore_event_handler_del( mWindowPropertyHandler );
}
- if ( mClientMessagehandler )
+ if ( mClientMessageHandler )
{
- ecore_event_handler_del( mClientMessagehandler );
+ ecore_event_handler_del( mClientMessageHandler );
}
}
// Data
Window* mWindow;
Ecore_Event_Handler* mWindowPropertyHandler;
- Ecore_Event_Handler* mClientMessagehandler;
+ Ecore_Event_Handler* mClientMessageHandler;
Ecore_Wl_Window* mEcoreWindow;
};
DALI_LOG_TRACE_METHOD_FMT( gWindowLogFilter, "visible : %d\n", visibleMode );
DALI_ASSERT_DEBUG(mOverlay);
+ ECore::WindowRenderSurface* wlSurface( dynamic_cast< ECore::WindowRenderSurface * >( mSurface ) );
+ DALI_ASSERT_DEBUG(wlSurface);
+ Ecore_Wl_Window* wlWindow = wlSurface->GetWlWindow();
+
+ mIndicatorVisible = visibleMode;
+
+ if ( mIndicatorVisible == Dali::Window::VISIBLE )
+ {
+ // when the indicator is visible, set proper mode for indicator server according to bg mode
+ if ( mIndicatorOpacityMode == Dali::Window::OPAQUE )
+ {
+ ecore_wl_window_indicator_opacity_set(wlWindow, ECORE_WL_INDICATOR_OPAQUE);
+ }
+ else if ( mIndicatorOpacityMode == Dali::Window::TRANSLUCENT )
+ {
+ ecore_wl_window_indicator_opacity_set(wlWindow, ECORE_WL_INDICATOR_TRANSLUCENT);
+ }
+ else if ( mIndicatorOpacityMode == Dali::Window::TRANSPARENT )
+ {
+ ecore_wl_window_indicator_opacity_set(wlWindow, ECORE_WL_INDICATOR_OPAQUE);
+ }
+ }
+ else
+ {
+ // when the indicator is not visible, set TRANSPARENT mode for indicator server
+ ecore_wl_window_indicator_opacity_set(wlWindow, ECORE_WL_INDICATOR_TRANSPARENT); // it means hidden indicator
+ }
+
DoShowIndicator( mIndicatorOrientation );
}
mSurface = windowSurface;
+ std::string appId;
+ mAdaptor->GetAppId( appId );
+ Ecore_Wl_Window* wlWindow = windowSurface ->GetWlWindow();
+ ecore_wl_window_class_name_set(wlWindow, appId.c_str());
+
mOrientation = Orientation::New(this);
// create event handler for Wayland window
void Window::SetIndicatorProperties( bool isShow, Dali::Window::WindowOrientation lastOrientation )
{
+ ECore::WindowRenderSurface* wlSurface( dynamic_cast< ECore::WindowRenderSurface * >( mSurface ) );
+
+ if( wlSurface )
+ {
+ Ecore_Wl_Window* wlWindow = wlSurface->GetWlWindow();
+ if ( isShow )
+ {
+ ecore_wl_window_indicator_state_set(wlWindow, ECORE_WL_INDICATOR_STATE_ON);
+ }
+ else
+ {
+ ecore_wl_window_indicator_state_set(wlWindow, ECORE_WL_INDICATOR_STATE_OFF);
+ }
+ }
}
void Window::IndicatorTypeChanged(Indicator::Type type)
{
+#if defined(DALI_PROFILE_MOBILE)
+ ECore::WindowRenderSurface* wlSurface( dynamic_cast< ECore::WindowRenderSurface * >( mSurface ) );
+
+ if( wlSurface )
+ {
+ Ecore_Wl_Window* wlWindow = wlSurface->GetWlWindow();
+ switch(type)
+ {
+ case Indicator::INDICATOR_TYPE_1:
+ ecore_wl_indicator_visible_type_set(wlWindow, ECORE_WL_INDICATOR_VISIBLE_TYPE_SHOWN);
+ break;
+
+ case Indicator::INDICATOR_TYPE_2:
+ ecore_wl_indicator_visible_type_set(wlWindow, ECORE_WL_INDICATOR_VISIBLE_TYPE_HIDDEN);
+ break;
+
+ case Indicator::INDICATOR_TYPE_UNKNOWN:
+ default:
+ break;
+ }
+ }
+#endif //MOBILE
}
void Window::IndicatorClosed( IndicatorInterface* indicator )