2 * Copyright (c) 2017 Samsung Electronics Co., Ltd.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
19 #include <window-impl.h>
22 // Ecore is littered with C style cast
23 #pragma GCC diagnostic push
24 #pragma GCC diagnostic ignored "-Wold-style-cast"
26 #include <Ecore_Wayland.h>
27 #include <tizen-extension-client-protocol.h>
29 #include <dali/integration-api/core.h>
30 #include <dali/integration-api/system-overlay.h>
31 #include <dali/public-api/render-tasks/render-task.h>
32 #include <dali/public-api/render-tasks/render-task-list.h>
33 #include <orientation.h>
36 #include <window-render-surface.h>
37 #include <drag-and-drop-detector-impl.h>
38 #include <ecore-indicator-impl.h>
39 #include <window-visibility-observer.h>
40 #include <orientation-impl.h>
44 const float INDICATOR_ANIMATION_DURATION( 0.18f ); // 180 milli seconds
45 const float INDICATOR_SHOW_Y_POSITION( 0.0f );
46 const float INDICATOR_HIDE_Y_POSITION( -52.0f );
56 #if defined(DEBUG_ENABLED)
57 Debug::Filter* gWindowLogFilter = Debug::Filter::New(Debug::NoLogging, false, "LOG_WINDOW");
61 * TODO: Abstract Window class out and move this into a window implementation for Ecore
63 struct Window::EventHandler
67 * @param[in] window A pointer to the window class.
69 EventHandler( Window* window )
76 mTizenDisplayPolicy( NULL ),
77 mNotificationLevel( -1 ),
78 mNotificationChangeState( 0 ),
79 mNotificationLevelChangeDone( true ),
81 mScreenModeChangeState( 0 ),
82 mScreenModeChangeDone( true ),
84 mBrightnessChangeState( 0 ),
85 mBrightnessChangeDone( true )
87 // store ecore window handle
88 ECore::WindowRenderSurface* wlWindow( dynamic_cast< ECore::WindowRenderSurface * >( mWindow->mSurface ) );
91 mEcoreWindow = wlWindow->GetWlWindow();
93 DALI_ASSERT_ALWAYS( mEcoreWindow != 0 && "There is no ecore Wl window");
95 if( mWindow->mEcoreEventHander )
97 mEcoreEventHandler.PushBack( ecore_event_handler_add( ECORE_WL_EVENT_WINDOW_ICONIFY_STATE_CHANGE, EcoreEventWindowIconifyStateChanged, this ) );
98 mEcoreEventHandler.PushBack( ecore_event_handler_add( ECORE_WL_EVENT_WINDOW_VISIBILITY_CHANGE, EcoreEventWindowVisibilityChanged, this ) );
99 mEcoreEventHandler.PushBack( ecore_event_handler_add( ECORE_WL_EVENT_FOCUS_IN, EcoreEventWindowFocusIn, this ) );
100 mEcoreEventHandler.PushBack( ecore_event_handler_add( ECORE_WL_EVENT_FOCUS_OUT, EcoreEventWindowFocusOut, this ) );
101 mEcoreEventHandler.PushBack( ecore_event_handler_add( ECORE_WL_EVENT_OUTPUT_TRANSFORM, EcoreEventOutputTransform, this) );
102 mEcoreEventHandler.PushBack( ecore_event_handler_add( ECORE_WL_EVENT_IGNORE_OUTPUT_TRANSFORM, EcoreEventIgnoreOutputTransform, this) );
105 mDisplay = ecore_wl_display_get();
109 wl_display* displayWrapper = static_cast< wl_display* >( wl_proxy_create_wrapper( mDisplay ) );
112 mEventQueue = wl_display_create_queue( mDisplay );
115 wl_proxy_set_queue( reinterpret_cast< wl_proxy* >( displayWrapper ), mEventQueue );
117 wl_registry* registry = wl_display_get_registry( displayWrapper );
118 wl_registry_add_listener( registry, &mRegistryListener, this );
121 wl_proxy_wrapper_destroy( displayWrapper );
131 for( Dali::Vector< Ecore_Event_Handler* >::Iterator iter = mEcoreEventHandler.Begin(), endIter = mEcoreEventHandler.End(); iter != endIter; ++iter )
133 ecore_event_handler_del( *iter );
135 mEcoreEventHandler.Clear();
139 wl_event_queue_destroy( mEventQueue );
145 /// Called when the window iconify state is changed.
146 static Eina_Bool EcoreEventWindowIconifyStateChanged( void* data, int type, void* event )
148 Ecore_Wl_Event_Window_Iconify_State_Change* iconifyChangedEvent( static_cast< Ecore_Wl_Event_Window_Iconify_State_Change* >( event ) );
149 EventHandler* handler( static_cast< EventHandler* >( data ) );
150 Eina_Bool handled( ECORE_CALLBACK_PASS_ON );
152 if ( handler && handler->mWindow )
154 WindowVisibilityObserver* observer( handler->mWindow->mAdaptor );
155 if ( observer && ( iconifyChangedEvent->win == static_cast< unsigned int> ( ecore_wl_window_id_get( handler->mEcoreWindow ) ) ) )
157 if( iconifyChangedEvent->iconified == EINA_TRUE )
159 observer->OnWindowHidden();
160 DALI_LOG_INFO( gWindowLogFilter, Debug::General, "Window (%d) Iconfied\n", handler->mEcoreWindow );
164 observer->OnWindowShown();
165 DALI_LOG_INFO( gWindowLogFilter, Debug::General, "Window (%d) Shown\n", handler->mEcoreWindow );
167 handled = ECORE_CALLBACK_DONE;
174 /// Called when the window visibility is changed.
175 static Eina_Bool EcoreEventWindowVisibilityChanged( void* data, int type, void* event )
177 Ecore_Wl_Event_Window_Visibility_Change* visibilityChangedEvent( static_cast< Ecore_Wl_Event_Window_Visibility_Change* >( event ) );
178 EventHandler* handler( static_cast< EventHandler* >( data ) );
179 Eina_Bool handled( ECORE_CALLBACK_PASS_ON );
181 if ( handler && handler->mWindow )
183 WindowVisibilityObserver* observer( handler->mWindow->mAdaptor );
184 if ( observer && ( visibilityChangedEvent->win == static_cast< unsigned int >( ecore_wl_window_id_get( handler->mEcoreWindow ) ) ) )
186 if( visibilityChangedEvent->fully_obscured == 1 )
188 observer->OnWindowHidden();
189 DALI_LOG_INFO( gWindowLogFilter, Debug::General, "Window (%d) full obscured\n", handler->mEcoreWindow );
193 observer->OnWindowShown();
194 DALI_LOG_INFO( gWindowLogFilter, Debug::General, "Window (%d) Shown\n", handler->mEcoreWindow );
196 handled = ECORE_CALLBACK_DONE;
203 /// Called when the window gains focus
204 static Eina_Bool EcoreEventWindowFocusIn( void* data, int type, void* event )
206 Ecore_Wl_Event_Focus_In* focusInEvent( static_cast< Ecore_Wl_Event_Focus_In* >( event ) );
207 EventHandler* handler( static_cast< EventHandler* >( data ) );
209 if ( handler && handler->mWindow && focusInEvent->win == static_cast< unsigned int >( ecore_wl_window_id_get( handler->mEcoreWindow ) ) )
211 DALI_LOG_INFO( gWindowLogFilter, Debug::General, "Window EcoreEventWindowFocusIn\n" );
213 handler->mWindow->mFocusChangedSignal.Emit( true );
216 return ECORE_CALLBACK_PASS_ON;
219 /// Called when the window loses focus
220 static Eina_Bool EcoreEventWindowFocusOut( void* data, int type, void* event )
222 Ecore_Wl_Event_Focus_Out* focusOutEvent( static_cast< Ecore_Wl_Event_Focus_Out* >( event ) );
223 EventHandler* handler( static_cast< EventHandler* >( data ) );
225 if ( handler && handler->mWindow && focusOutEvent->win == static_cast< unsigned int >(ecore_wl_window_id_get( handler->mEcoreWindow ) ) )
227 DALI_LOG_INFO( gWindowLogFilter, Debug::General, "Window EcoreEventWindowFocusOut\n" );
229 handler->mWindow->mFocusChangedSignal.Emit( false );
232 return ECORE_CALLBACK_PASS_ON;
235 /// Called when the output is transformed
236 static Eina_Bool EcoreEventOutputTransform( void* data, int type, void* event )
238 Ecore_Wl_Event_Output_Transform* transformEvent( static_cast< Ecore_Wl_Event_Output_Transform* >( event ) );
239 EventHandler* handler( static_cast< EventHandler* >( data ) );
241 if ( handler && handler->mWindow && transformEvent->output == ecore_wl_window_output_find( handler->mEcoreWindow ) )
243 ECore::WindowRenderSurface* wlSurface( dynamic_cast< ECore::WindowRenderSurface * >( handler->mWindow->mSurface ) );
244 wlSurface->OutputTransformed();
247 return ECORE_CALLBACK_PASS_ON;
250 /// Called when the output transform should be ignored
251 static Eina_Bool EcoreEventIgnoreOutputTransform( void* data, int type, void* event )
253 Ecore_Wl_Event_Ignore_Output_Transform* ignoreTransformEvent( static_cast< Ecore_Wl_Event_Ignore_Output_Transform* >( event ) );
254 EventHandler* handler( static_cast< EventHandler* >( data ) );
256 if ( handler && handler->mWindow && ignoreTransformEvent->win == handler->mEcoreWindow )
258 ECore::WindowRenderSurface* wlSurface( dynamic_cast< ECore::WindowRenderSurface * >( handler->mWindow->mSurface ) );
259 wlSurface->OutputTransformed();
262 return ECORE_CALLBACK_PASS_ON;
265 static void RegistryGlobalCallback( void* data, struct wl_registry *registry, uint32_t name, const char* interface, uint32_t version )
267 Window::EventHandler* eventHandler = static_cast< Window::EventHandler* >( data );
269 if( strcmp( interface, tizen_policy_interface.name ) == 0 )
271 eventHandler->mTizenPolicy = static_cast< tizen_policy* >( wl_registry_bind( registry, name, &tizen_policy_interface, version ) );
272 if( !eventHandler->mTizenPolicy )
274 DALI_LOG_INFO( gWindowLogFilter, Debug::General, "Window::EventHandler::RegistryGlobalCallback: wl_registry_bind(tizen_policy_interface) is failed.\n" );
278 tizen_policy_add_listener( eventHandler->mTizenPolicy, &eventHandler->mTizenPolicyListener, data );
280 DALI_LOG_INFO( gWindowLogFilter, Debug::General, "Window::EventHandler::RegistryGlobalCallback: tizen_policy_add_listener is called.\n" );
282 else if( strcmp( interface, tizen_display_policy_interface.name ) == 0 )
284 eventHandler->mTizenDisplayPolicy = static_cast< tizen_display_policy* >( wl_registry_bind( registry, name, &tizen_display_policy_interface, version ) );
285 if( !eventHandler->mTizenDisplayPolicy )
287 DALI_LOG_INFO( gWindowLogFilter, Debug::General, "Window::EventHandler::RegistryGlobalCallback: wl_registry_bind(tizen_display_policy_interface) is failed.\n" );
291 tizen_display_policy_add_listener( eventHandler->mTizenDisplayPolicy, &eventHandler->mTizenDisplayPolicyListener, data );
293 DALI_LOG_INFO( gWindowLogFilter, Debug::General, "Window::EventHandler::RegistryGlobalCallback: tizen_display_policy_add_listener is called.\n" );
297 static void RegistryGlobalCallbackRemove( void* data, struct wl_registry* registry, uint32_t id )
299 Window::EventHandler* eventHandler = static_cast< Window::EventHandler* >( data );
300 eventHandler->mTizenPolicy = NULL;
301 eventHandler->mTizenDisplayPolicy = NULL;
304 static void TizenPolicyNotificationChangeDone(void* data, struct tizen_policy* tizenPolicy, struct wl_surface* surface, int32_t level, uint32_t state )
306 Window::EventHandler* eventHandler = static_cast< Window::EventHandler* >( data );
308 eventHandler->mNotificationLevel = level;
309 eventHandler->mNotificationChangeState = state;
310 eventHandler->mNotificationLevelChangeDone = true;
312 DALI_LOG_INFO( gWindowLogFilter, Debug::General, "Window::EventHandler::TizenPolicyNotificationChangeDone: level = %d, state = %d\n", level, state );
315 static void TizenPolicyScreenModeChangeDone(void* data, struct tizen_policy* tizenPolicy, struct wl_surface* surface, uint32_t mode, uint32_t state )
317 Window::EventHandler* eventHandler = static_cast< Window::EventHandler* >( data );
319 eventHandler->mScreenMode = mode;
320 eventHandler->mScreenModeChangeState = state;
321 eventHandler->mScreenModeChangeDone = true;
323 DALI_LOG_INFO( gWindowLogFilter, Debug::General, "Window::EventHandler::TizenPolicyScreenModeChangeDone: mode = %d, state = %d\n", mode, state );
326 static void DisplayPolicyBrightnessChangeDone(void* data, struct tizen_display_policy *displayPolicy, struct wl_surface* surface, int32_t brightness, uint32_t state )
328 Window::EventHandler* eventHandler = static_cast< Window::EventHandler* >( data );
330 eventHandler->mBrightness = brightness;
331 eventHandler->mBrightnessChangeState = state;
332 eventHandler->mBrightnessChangeDone = true;
334 DALI_LOG_INFO( gWindowLogFilter, Debug::General, "Window::EventHandler::DisplayPolicyBrightnessChangeDone: brightness = %d, state = %d\n", brightness, state );
337 const struct wl_registry_listener mRegistryListener =
339 RegistryGlobalCallback,
340 RegistryGlobalCallbackRemove
343 const struct tizen_policy_listener mTizenPolicyListener =
347 TizenPolicyNotificationChangeDone,
349 TizenPolicyScreenModeChangeDone,
356 const struct tizen_display_policy_listener mTizenDisplayPolicyListener =
358 DisplayPolicyBrightnessChangeDone
363 Dali::Vector< Ecore_Event_Handler* > mEcoreEventHandler;
364 Ecore_Wl_Window* mEcoreWindow;
366 wl_display* mDisplay;
367 wl_event_queue* mEventQueue;
368 tizen_policy* mTizenPolicy;
369 tizen_display_policy* mTizenDisplayPolicy;
371 int mNotificationLevel;
372 uint32_t mNotificationChangeState;
373 bool mNotificationLevelChangeDone;
376 uint32_t mScreenModeChangeState;
377 bool mScreenModeChangeDone;
380 uint32_t mBrightnessChangeState;
381 bool mBrightnessChangeDone;
384 Window* Window::New( const PositionSize& positionSize, const std::string& name, const std::string& className, bool isTransparent )
386 Window* window = new Window();
387 window->mIsTransparent = isTransparent;
388 window->Initialize( positionSize, name, className );
392 void Window::SetAdaptor(Dali::Adaptor& adaptor)
394 DALI_ASSERT_ALWAYS( !mStarted && "Adaptor already started" );
397 // Only create one overlay per window
398 Internal::Adaptor::Adaptor& adaptorImpl = Internal::Adaptor::Adaptor::GetImplementation(adaptor);
399 Integration::Core& core = adaptorImpl.GetCore();
400 mOverlay = &core.GetSystemOverlay();
402 Dali::RenderTaskList taskList = mOverlay->GetOverlayRenderTasks();
403 taskList.CreateTask();
405 mAdaptor = &adaptorImpl;
406 mAdaptor->AddObserver( *this );
408 // Can only create the detector when we know the Core has been instantiated.
409 mDragAndDropDetector = DragAndDropDetector::New();
410 mAdaptor->SetDragAndDropDetector( &GetImplementation( mDragAndDropDetector ) );
414 mOrientation->SetAdaptor(adaptor);
417 if( mIndicator != NULL )
419 mIndicator->SetAdaptor(mAdaptor);
423 RenderSurface* Window::GetSurface()
428 void Window::ShowIndicator( Dali::Window::IndicatorVisibleMode visibleMode )
430 DALI_LOG_TRACE_METHOD_FMT( gWindowLogFilter, "visible : %d\n", visibleMode );
431 DALI_ASSERT_DEBUG(mOverlay);
433 ECore::WindowRenderSurface* wlSurface( dynamic_cast< ECore::WindowRenderSurface * >( mSurface ) );
434 DALI_ASSERT_DEBUG(wlSurface);
438 Ecore_Wl_Window* wlWindow = wlSurface->GetWlWindow();
440 mIndicatorVisible = visibleMode;
442 if ( mIndicatorVisible == Dali::Window::VISIBLE )
444 // when the indicator is visible, set proper mode for indicator server according to bg mode
445 if ( mIndicatorOpacityMode == Dali::Window::OPAQUE )
447 ecore_wl_window_indicator_opacity_set(wlWindow, ECORE_WL_INDICATOR_OPAQUE);
449 else if ( mIndicatorOpacityMode == Dali::Window::TRANSLUCENT )
451 ecore_wl_window_indicator_opacity_set(wlWindow, ECORE_WL_INDICATOR_TRANSLUCENT);
453 else if ( mIndicatorOpacityMode == Dali::Window::TRANSPARENT )
455 ecore_wl_window_indicator_opacity_set(wlWindow, ECORE_WL_INDICATOR_OPAQUE);
460 // when the indicator is not visible, set TRANSPARENT mode for indicator server
461 ecore_wl_window_indicator_opacity_set(wlWindow, ECORE_WL_INDICATOR_TRANSPARENT); // it means hidden indicator
465 DoShowIndicator( mIndicatorOrientation );
468 void Window::RotateIndicator( Dali::Window::WindowOrientation orientation )
470 DALI_LOG_TRACE_METHOD_FMT( gWindowLogFilter, "Orientation: %d\n", orientation );
472 DoRotateIndicator( orientation );
475 void Window::SetIndicatorBgOpacity( Dali::Window::IndicatorBgOpacity opacityMode )
477 mIndicatorOpacityMode = opacityMode;
479 if( mIndicator != NULL )
481 mIndicator->SetOpacityMode( opacityMode );
485 void Window::SetClass(std::string name, std::string klass)
487 ECore::WindowRenderSurface* wlSurface( dynamic_cast< ECore::WindowRenderSurface * >( mSurface ) );
491 Ecore_Wl_Window* wlWindow = wlSurface->GetWlWindow();
492 ecore_wl_window_title_set( wlWindow, name.c_str() );
493 ecore_wl_window_class_name_set( wlWindow, klass.c_str() );
497 DALI_LOG_INFO( gWindowLogFilter, Debug::General, "Window has no surface\n" );
503 mIndicatorVisible( Dali::Window::VISIBLE ),
504 mIndicatorIsShown( false ),
505 mShowRotatedIndicatorOnClose( false ),
507 mIsTransparent( false ),
508 mWMRotationAppSet( false ),
509 mEcoreEventHander( true ),
510 mIsFocusAcceptable( true ),
512 mOpaqueState( false ),
513 mResizeEnabled( false ),
515 mIndicatorOrientation( Dali::Window::PORTRAIT ),
516 mNextIndicatorOrientation( Dali::Window::PORTRAIT ),
517 mIndicatorOpacityMode( Dali::Window::OPAQUE ),
520 mType( Dali::DevelWindow::NORMAL ),
521 mEventHandler( NULL ),
522 mPreferredOrientation( Dali::Window::PORTRAIT ),
523 mSupportedAuxiliaryHints(),
525 mIndicatorVisibilityChangedSignal(),
526 mFocusChangedSignal(),
528 mDeleteRequestSignal()
534 delete mEventHandler;
544 mAdaptor->RemoveObserver( *this );
545 mAdaptor->SetDragAndDropDetector( NULL );
551 mSupportedAuxiliaryHints.clear();
552 mAuxiliaryHints.clear();
555 void Window::Initialize(const PositionSize& positionSize, const std::string& name, const std::string& className)
557 // create an Wayland window by default
559 ECore::WindowRenderSurface* windowSurface = new ECore::WindowRenderSurface( positionSize, surface, name, mIsTransparent );
561 mSurface = windowSurface;
563 // create event handler for Wayland window
564 mEventHandler = new EventHandler( this );
566 // get auxiliary hint
567 Eina_List* hints = ecore_wl_window_aux_hints_supported_get( mEventHandler->mEcoreWindow );
573 for( l = hints, ( hint = static_cast< char* >( eina_list_data_get(l) ) ); l; l = eina_list_next(l), ( hint = static_cast< char* >( eina_list_data_get(l) ) ) )
575 mSupportedAuxiliaryHints.push_back( hint );
577 DALI_LOG_INFO( gWindowLogFilter, Debug::Verbose, "Window::Initialize: %s\n", hint );
581 if( !positionSize.IsEmpty() )
583 AddAuxiliaryHint( "wm.policy.win.user.geometry", "1" );
584 mResizeEnabled = true;
587 SetClass( name, className );
588 windowSurface->Map();
590 mOrientation = Orientation::New(this);
593 void Window::DoShowIndicator( Dali::Window::WindowOrientation lastOrientation )
595 if( mIndicator == NULL )
597 if( mIndicatorVisible != Dali::Window::INVISIBLE )
599 mIndicator = new Indicator( mAdaptor, mIndicatorOrientation, this );
600 mIndicator->SetOpacityMode( mIndicatorOpacityMode );
601 Dali::Actor actor = mIndicator->GetActor();
602 SetIndicatorActorRotation();
603 mOverlay->Add(actor);
605 // else don't create a hidden indicator
607 else // Already have indicator
609 if( mIndicatorVisible == Dali::Window::VISIBLE )
611 // If we are resuming, and rotation has changed,
612 if( mIndicatorIsShown == false && mIndicatorOrientation != mNextIndicatorOrientation )
614 // then close current indicator and open new one
615 mShowRotatedIndicatorOnClose = true;
616 mIndicator->Close(); // May synchronously call IndicatorClosed() callback & 1 level of recursion
617 // Don't show actor - will contain indicator for old orientation.
622 // set indicator visible mode
623 if( mIndicator != NULL )
625 mIndicator->SetVisible( mIndicatorVisible );
628 bool show = (mIndicatorVisible != Dali::Window::INVISIBLE );
629 SetIndicatorProperties( show, lastOrientation );
630 mIndicatorIsShown = show;
633 void Window::DoRotateIndicator( Dali::Window::WindowOrientation orientation )
635 if( mIndicatorIsShown )
637 mShowRotatedIndicatorOnClose = true;
638 mNextIndicatorOrientation = orientation;
639 mIndicator->Close(); // May synchronously call IndicatorClosed() callback
643 // Save orientation for when the indicator is next shown
644 mShowRotatedIndicatorOnClose = false;
645 mNextIndicatorOrientation = orientation;
649 void Window::SetIndicatorProperties( bool isShow, Dali::Window::WindowOrientation lastOrientation )
651 ECore::WindowRenderSurface* wlSurface( dynamic_cast< ECore::WindowRenderSurface * >( mSurface ) );
655 Ecore_Wl_Window* wlWindow = wlSurface->GetWlWindow();
658 ecore_wl_window_indicator_state_set(wlWindow, ECORE_WL_INDICATOR_STATE_ON);
662 ecore_wl_window_indicator_state_set(wlWindow, ECORE_WL_INDICATOR_STATE_OFF);
667 void Window::IndicatorTypeChanged(Indicator::Type type)
669 #if defined(DALI_PROFILE_MOBILE)
670 ECore::WindowRenderSurface* wlSurface( dynamic_cast< ECore::WindowRenderSurface * >( mSurface ) );
674 Ecore_Wl_Window* wlWindow = wlSurface->GetWlWindow();
677 case Indicator::INDICATOR_TYPE_1:
678 ecore_wl_indicator_visible_type_set(wlWindow, ECORE_WL_INDICATOR_VISIBLE_TYPE_SHOWN);
681 case Indicator::INDICATOR_TYPE_2:
682 ecore_wl_indicator_visible_type_set(wlWindow, ECORE_WL_INDICATOR_VISIBLE_TYPE_HIDDEN);
685 case Indicator::INDICATOR_TYPE_UNKNOWN:
693 void Window::IndicatorClosed( IndicatorInterface* indicator )
695 DALI_LOG_TRACE_METHOD( gWindowLogFilter );
697 if( mShowRotatedIndicatorOnClose )
699 Dali::Window::WindowOrientation currentOrientation = mIndicatorOrientation;
700 mIndicator->Open(mNextIndicatorOrientation);
701 mIndicatorOrientation = mNextIndicatorOrientation;
702 SetIndicatorActorRotation();
703 DoShowIndicator(currentOrientation);
707 void Window::IndicatorVisibilityChanged(bool isVisible)
709 mIndicatorVisibilityChangedSignal.Emit(isVisible);
712 void Window::SetIndicatorActorRotation()
714 DALI_LOG_TRACE_METHOD( gWindowLogFilter );
715 DALI_ASSERT_DEBUG( mIndicator != NULL );
717 Dali::Actor actor = mIndicator->GetActor();
718 switch( mIndicatorOrientation )
720 case Dali::Window::PORTRAIT:
721 actor.SetParentOrigin( ParentOrigin::TOP_CENTER );
722 actor.SetAnchorPoint( AnchorPoint::TOP_CENTER );
723 actor.SetOrientation( Degree(0), Vector3::ZAXIS );
725 case Dali::Window::PORTRAIT_INVERSE:
726 actor.SetParentOrigin( ParentOrigin::BOTTOM_CENTER );
727 actor.SetAnchorPoint( AnchorPoint::TOP_CENTER );
728 actor.SetOrientation( Degree(180), Vector3::ZAXIS );
730 case Dali::Window::LANDSCAPE:
731 actor.SetParentOrigin( ParentOrigin::CENTER_LEFT );
732 actor.SetAnchorPoint( AnchorPoint::TOP_CENTER );
733 actor.SetOrientation( Degree(270), Vector3::ZAXIS );
735 case Dali::Window::LANDSCAPE_INVERSE:
736 actor.SetParentOrigin( ParentOrigin::CENTER_RIGHT );
737 actor.SetAnchorPoint( AnchorPoint::TOP_CENTER );
738 actor.SetOrientation( Degree(90), Vector3::ZAXIS );
745 ecore_wl_window_raise( mEventHandler->mEcoreWindow );
750 ecore_wl_window_lower( mEventHandler->mEcoreWindow );
753 void Window::Activate()
755 ecore_wl_window_activate( mEventHandler->mEcoreWindow );
758 Dali::DragAndDropDetector Window::GetDragAndDropDetector() const
760 return mDragAndDropDetector;
763 Dali::Any Window::GetNativeHandle() const
767 return mEventHandler->mEcoreWindow;
775 void Window::OnStart()
777 DoShowIndicator( mIndicatorOrientation );
780 void Window::OnPause()
784 void Window::OnResume()
786 // resume indicator status
787 if( mIndicator != NULL )
789 // Restore own indicator opacity
790 // Send opacity mode to indicator service when app resumed
791 mIndicator->SetOpacityMode( mIndicatorOpacityMode );
795 void Window::OnStop()
806 void Window::OnDestroy()
811 void Window::AddAvailableOrientation(Dali::Window::WindowOrientation orientation)
815 for( std::size_t i=0; i<mAvailableOrientations.size(); i++ )
817 if(mAvailableOrientations[i] == orientation)
826 mAvailableOrientations.push_back(orientation);
827 SetAvailableOrientations( mAvailableOrientations );
831 void Window::RemoveAvailableOrientation(Dali::Window::WindowOrientation orientation)
833 for( std::vector<Dali::Window::WindowOrientation>::iterator iter = mAvailableOrientations.begin();
834 iter != mAvailableOrientations.end(); ++iter )
836 if( *iter == orientation )
838 mAvailableOrientations.erase( iter );
842 SetAvailableOrientations( mAvailableOrientations );
845 void Window::SetAvailableOrientations(const std::vector<Dali::Window::WindowOrientation>& orientations)
848 for( std::size_t i = 0; i < mAvailableOrientations.size(); ++i )
850 rotations[i] = static_cast< int >( mAvailableOrientations[i] );
852 ecore_wl_window_rotation_available_rotations_set( mEventHandler->mEcoreWindow, rotations, mAvailableOrientations.size() );
855 const std::vector<Dali::Window::WindowOrientation>& Window::GetAvailableOrientations()
857 return mAvailableOrientations;
860 void Window::SetPreferredOrientation(Dali::Window::WindowOrientation orientation)
862 mPreferredOrientation = orientation;
864 ecore_wl_window_rotation_preferred_rotation_set( mEventHandler->mEcoreWindow, orientation );
867 Dali::Window::WindowOrientation Window::GetPreferredOrientation()
869 return mPreferredOrientation;
872 void Window::SetAcceptFocus( bool accept )
874 mIsFocusAcceptable = accept;
876 ecore_wl_window_focus_skip_set( mEventHandler->mEcoreWindow, !accept );
879 bool Window::IsFocusAcceptable()
881 return mIsFocusAcceptable;
887 ecore_wl_window_show( mEventHandler->mEcoreWindow );
889 // Need an update request
892 mAdaptor->RequestUpdateOnce();
899 ecore_wl_window_hide( mEventHandler->mEcoreWindow );
902 bool Window::IsVisible() const
907 void Window::RotationDone( int orientation, int width, int height )
909 ECore::WindowRenderSurface* wlSurface( dynamic_cast< ECore::WindowRenderSurface * >( mSurface ) );
910 wlSurface->RequestRotation( orientation, width, height );
912 mAdaptor->SurfaceResizePrepare( Dali::Adaptor::SurfaceSize( width, height ) );
915 mResizedSignal.Emit( Dali::DevelWindow::WindowSize( width, height ) );
917 mAdaptor->SurfaceResizeComplete( Dali::Adaptor::SurfaceSize( width, height ) );
920 unsigned int Window::GetSupportedAuxiliaryHintCount()
922 return mSupportedAuxiliaryHints.size();
925 std::string Window::GetSupportedAuxiliaryHint( unsigned int index )
927 if( index >= GetSupportedAuxiliaryHintCount() )
929 DALI_LOG_INFO( gWindowLogFilter, Debug::Verbose, "Window::GetSupportedAuxiliaryHint: Invalid index! [%d]\n", index );
932 return mSupportedAuxiliaryHints[index];
935 unsigned int Window::AddAuxiliaryHint( const std::string& hint, const std::string& value )
937 bool supported = false;
939 // Check if the hint is suppported
940 for( std::vector< std::string >::iterator iter = mSupportedAuxiliaryHints.begin(); iter != mSupportedAuxiliaryHints.end(); ++iter )
951 DALI_LOG_INFO( gWindowLogFilter, Debug::Concise, "Window::AddAuxiliaryHint: Not supported auxiliary hint [%s]\n", hint.c_str() );
955 // Check if the hint is already added
956 for( unsigned int i = 0; i < mAuxiliaryHints.size(); i++ )
958 if( mAuxiliaryHints[i].first == hint )
960 // Just change the value
961 mAuxiliaryHints[i].second = value;
963 DALI_LOG_INFO( gWindowLogFilter, Debug::Verbose, "Window::AddAuxiliaryHint: Change! hint = %s, value = %s, id = %d\n", hint.c_str(), value.c_str(), i + 1 );
965 return i + 1; // id is index + 1
970 mAuxiliaryHints.push_back( std::pair< std::string, std::string >( hint, value ) );
972 unsigned int id = mAuxiliaryHints.size();
974 ecore_wl_window_aux_hint_add( mEventHandler->mEcoreWindow, static_cast< int >( id ), hint.c_str(), value.c_str() );
976 DALI_LOG_INFO( gWindowLogFilter, Debug::Verbose, "Window::AddAuxiliaryHint: hint = %s, value = %s, id = %d\n", hint.c_str(), value.c_str(), id );
981 bool Window::RemoveAuxiliaryHint( unsigned int id )
983 if( id == 0 || id > mAuxiliaryHints.size() )
985 DALI_LOG_INFO( gWindowLogFilter, Debug::Concise, "Window::RemoveAuxiliaryHint: Invalid id [%d]\n", id );
989 mAuxiliaryHints[id - 1].second = std::string();
991 ecore_wl_window_aux_hint_del( mEventHandler->mEcoreWindow, static_cast< int >( id ) );
993 DALI_LOG_INFO( gWindowLogFilter, Debug::Verbose, "Window::RemoveAuxiliaryHint: id = %d, hint = %s\n", id, mAuxiliaryHints[id - 1].first.c_str() );
998 bool Window::SetAuxiliaryHintValue( unsigned int id, const std::string& value )
1000 if( id == 0 || id > mAuxiliaryHints.size() )
1002 DALI_LOG_INFO( gWindowLogFilter, Debug::Concise, "Window::SetAuxiliaryHintValue: Invalid id [%d]\n", id );
1006 mAuxiliaryHints[id - 1].second = value;
1008 ecore_wl_window_aux_hint_change( mEventHandler->mEcoreWindow, static_cast< int >( id ), value.c_str() );
1010 DALI_LOG_INFO( gWindowLogFilter, Debug::Verbose, "Window::SetAuxiliaryHintValue: id = %d, hint = %s, value = %s\n", id, mAuxiliaryHints[id - 1].first.c_str(), mAuxiliaryHints[id - 1].second.c_str() );
1015 std::string Window::GetAuxiliaryHintValue( unsigned int id ) const
1017 if( id == 0 || id > mAuxiliaryHints.size() )
1019 DALI_LOG_INFO( gWindowLogFilter, Debug::Concise, "Window::GetAuxiliaryHintValue: Invalid id [%d]\n", id );
1020 return std::string();
1023 DALI_LOG_INFO( gWindowLogFilter, Debug::Verbose, "Window::GetAuxiliaryHintValue: id = %d, hint = %s, value = %s\n", id, mAuxiliaryHints[id - 1].first.c_str(), mAuxiliaryHints[id - 1].second.c_str() );
1025 return mAuxiliaryHints[id - 1].second;
1028 unsigned int Window::GetAuxiliaryHintId( const std::string& hint ) const
1030 for( unsigned int i = 0; i < mAuxiliaryHints.size(); i++ )
1032 if( mAuxiliaryHints[i].first == hint )
1034 DALI_LOG_INFO( gWindowLogFilter, Debug::Verbose, "Window::GetAuxiliaryHintId: hint = %s, id = %d\n", hint.c_str(), i + 1 );
1039 DALI_LOG_INFO( gWindowLogFilter, Debug::Verbose, "Window::GetAuxiliaryHintId: Invalid hint! [%s]\n", hint.c_str() );
1044 void Window::SetInputRegion( const Rect< int >& inputRegion )
1046 ecore_wl_window_input_region_set( mEventHandler->mEcoreWindow, inputRegion.x, inputRegion.y, inputRegion.width, inputRegion.height );
1048 DALI_LOG_INFO( gWindowLogFilter, Debug::Verbose, "Window::SetInputRegion: x = %d, y = %d, w = %d, h = %d\n", inputRegion.x, inputRegion.y, inputRegion.width, inputRegion.height );
1051 void Window::SetType( Dali::DevelWindow::Type type )
1053 Ecore_Wl_Window_Type windowType;
1059 case Dali::DevelWindow::NORMAL:
1061 windowType = ECORE_WL_WINDOW_TYPE_TOPLEVEL;
1064 case Dali::DevelWindow::NOTIFICATION:
1066 windowType = ECORE_WL_WINDOW_TYPE_NOTIFICATION;
1069 case Dali::DevelWindow::UTILITY:
1071 windowType = ECORE_WL_WINDOW_TYPE_UTILITY;
1074 case Dali::DevelWindow::DIALOG:
1076 windowType = ECORE_WL_WINDOW_TYPE_DIALOG;
1081 windowType = ECORE_WL_WINDOW_TYPE_TOPLEVEL;
1086 ecore_wl_window_type_set( mEventHandler->mEcoreWindow, windowType );
1092 Dali::DevelWindow::Type Window::GetType() const
1097 bool Window::SetNotificationLevel( Dali::DevelWindow::NotificationLevel::Type level )
1099 if( mType != Dali::DevelWindow::NOTIFICATION )
1101 DALI_LOG_INFO( gWindowLogFilter, Debug::Verbose, "Window::SetNotificationLevel: Not supported window type [%d]\n", mType );
1105 while( !mEventHandler->mTizenPolicy )
1107 wl_display_dispatch_queue( mEventHandler->mDisplay, mEventHandler->mEventQueue );
1110 int notificationLevel;
1114 case Dali::DevelWindow::NotificationLevel::NONE:
1116 notificationLevel = TIZEN_POLICY_LEVEL_NONE;
1119 case Dali::DevelWindow::NotificationLevel::BASE:
1121 notificationLevel = TIZEN_POLICY_LEVEL_DEFAULT;
1124 case Dali::DevelWindow::NotificationLevel::MEDIUM:
1126 notificationLevel = TIZEN_POLICY_LEVEL_MEDIUM;
1129 case Dali::DevelWindow::NotificationLevel::HIGH:
1131 notificationLevel = TIZEN_POLICY_LEVEL_HIGH;
1134 case Dali::DevelWindow::NotificationLevel::TOP:
1136 notificationLevel = TIZEN_POLICY_LEVEL_TOP;
1141 DALI_LOG_INFO( gWindowLogFilter, Debug::Verbose, "Window::SetNotificationLevel: invalid level [%d]\n", level );
1142 notificationLevel = TIZEN_POLICY_LEVEL_DEFAULT;
1147 mEventHandler->mNotificationLevelChangeDone = false;
1148 mEventHandler->mNotificationChangeState = TIZEN_POLICY_ERROR_STATE_NONE;
1150 tizen_policy_set_notification_level( mEventHandler->mTizenPolicy, ecore_wl_window_surface_get( mEventHandler->mEcoreWindow ), notificationLevel );
1154 while( !mEventHandler->mNotificationLevelChangeDone && count < 3 )
1157 wl_display_dispatch_queue( mEventHandler->mDisplay, mEventHandler->mEventQueue );
1161 if( !mEventHandler->mNotificationLevelChangeDone )
1163 DALI_LOG_INFO( gWindowLogFilter, Debug::Verbose, "Window::SetNotificationLevel: Level change is failed [%d, %d]\n", level, mEventHandler->mNotificationChangeState );
1166 else if( mEventHandler->mNotificationChangeState == TIZEN_POLICY_ERROR_STATE_PERMISSION_DENIED )
1168 DALI_LOG_INFO( gWindowLogFilter, Debug::Verbose, "Window::SetNotificationLevel: Permission denied! [%d]\n", level );
1172 DALI_LOG_INFO( gWindowLogFilter, Debug::Verbose, "Window::SetNotificationLevel: Level is changed [%d]\n", mEventHandler->mNotificationLevel );
1177 Dali::DevelWindow::NotificationLevel::Type Window::GetNotificationLevel()
1179 if( mType != Dali::DevelWindow::NOTIFICATION )
1181 DALI_LOG_INFO( gWindowLogFilter, Debug::Verbose, "Window::GetNotificationLevel: Not supported window type [%d]\n", mType );
1182 return Dali::DevelWindow::NotificationLevel::NONE;
1185 while( !mEventHandler->mTizenPolicy )
1187 wl_display_dispatch_queue( mEventHandler->mDisplay, mEventHandler->mEventQueue );
1192 while( !mEventHandler->mNotificationLevelChangeDone && count < 3 )
1195 wl_display_dispatch_queue( mEventHandler->mDisplay, mEventHandler->mEventQueue );
1199 if( !mEventHandler->mNotificationLevelChangeDone )
1201 DALI_LOG_INFO( gWindowLogFilter, Debug::Verbose, "Window::GetNotificationLevel: Error! [%d]\n", mEventHandler->mNotificationChangeState );
1202 return Dali::DevelWindow::NotificationLevel::NONE;
1205 Dali::DevelWindow::NotificationLevel::Type level;
1207 switch( mEventHandler->mNotificationLevel )
1209 case TIZEN_POLICY_LEVEL_NONE:
1211 level = Dali::DevelWindow::NotificationLevel::NONE;
1214 case TIZEN_POLICY_LEVEL_DEFAULT:
1216 level = Dali::DevelWindow::NotificationLevel::BASE;
1219 case TIZEN_POLICY_LEVEL_MEDIUM:
1221 level = Dali::DevelWindow::NotificationLevel::MEDIUM;
1224 case TIZEN_POLICY_LEVEL_HIGH:
1226 level = Dali::DevelWindow::NotificationLevel::HIGH;
1229 case TIZEN_POLICY_LEVEL_TOP:
1231 level = Dali::DevelWindow::NotificationLevel::TOP;
1236 DALI_LOG_INFO( gWindowLogFilter, Debug::Verbose, "Window::GetNotificationLevel: invalid level [%d]\n", mEventHandler->mNotificationLevel );
1237 level = Dali::DevelWindow::NotificationLevel::NONE;
1242 DALI_LOG_INFO( gWindowLogFilter, Debug::Verbose, "Window::GetNotificationLevel: level [%d]\n", mEventHandler->mNotificationLevel );
1247 void Window::SetOpaqueState( bool opaque )
1249 while( !mEventHandler->mTizenPolicy )
1251 wl_display_dispatch_queue( mEventHandler->mDisplay, mEventHandler->mEventQueue );
1254 tizen_policy_set_opaque_state( mEventHandler->mTizenPolicy, ecore_wl_window_surface_get( mEventHandler->mEcoreWindow ), ( opaque ? 1 : 0 ) );
1256 mOpaqueState = opaque;
1258 DALI_LOG_INFO( gWindowLogFilter, Debug::Verbose, "Window::SetOpaqueState: opaque = %d\n", opaque );
1261 bool Window::IsOpaqueState()
1263 return mOpaqueState;
1266 bool Window::SetScreenMode( Dali::DevelWindow::ScreenMode::Type screenMode )
1268 while( !mEventHandler->mTizenPolicy )
1270 wl_display_dispatch_queue( mEventHandler->mDisplay, mEventHandler->mEventQueue );
1273 mEventHandler->mScreenModeChangeDone = false;
1274 mEventHandler->mScreenModeChangeState = TIZEN_POLICY_ERROR_STATE_NONE;
1276 unsigned int mode = 0;
1278 switch( screenMode )
1280 case Dali::DevelWindow::ScreenMode::DEFAULT:
1285 case Dali::DevelWindow::ScreenMode::ALWAYS_ON:
1292 tizen_policy_set_window_screen_mode( mEventHandler->mTizenPolicy, ecore_wl_window_surface_get( mEventHandler->mEcoreWindow ), mode );
1296 while( !mEventHandler->mScreenModeChangeDone && count < 3 )
1299 wl_display_dispatch_queue( mEventHandler->mDisplay, mEventHandler->mEventQueue );
1303 if( !mEventHandler->mScreenModeChangeDone )
1305 DALI_LOG_INFO( gWindowLogFilter, Debug::Verbose, "Window::SetScreenMode: Screen mode change is failed [%d, %d]\n", screenMode, mEventHandler->mScreenModeChangeState );
1308 else if( mEventHandler->mScreenModeChangeState == TIZEN_POLICY_ERROR_STATE_PERMISSION_DENIED )
1310 DALI_LOG_INFO( gWindowLogFilter, Debug::Verbose, "Window::SetScreenMode: Permission denied! [%d]\n", screenMode );
1314 DALI_LOG_INFO( gWindowLogFilter, Debug::Verbose, "Window::SetScreenMode: Screen mode is changed [%d]\n", mEventHandler->mScreenMode );
1319 Dali::DevelWindow::ScreenMode::Type Window::GetScreenMode()
1321 while( !mEventHandler->mTizenPolicy )
1323 wl_display_dispatch_queue( mEventHandler->mDisplay, mEventHandler->mEventQueue );
1328 while( !mEventHandler->mScreenModeChangeDone && count < 3 )
1331 wl_display_dispatch_queue( mEventHandler->mDisplay, mEventHandler->mEventQueue );
1335 if( !mEventHandler->mScreenModeChangeDone )
1337 DALI_LOG_INFO( gWindowLogFilter, Debug::Verbose, "Window::GetScreenMode: Error! [%d]\n", mEventHandler->mScreenModeChangeState );
1338 return Dali::DevelWindow::ScreenMode::DEFAULT;
1341 Dali::DevelWindow::ScreenMode::Type screenMode = Dali::DevelWindow::ScreenMode::DEFAULT;
1343 switch( mEventHandler->mScreenMode )
1347 screenMode = Dali::DevelWindow::ScreenMode::DEFAULT;
1352 screenMode = Dali::DevelWindow::ScreenMode::ALWAYS_ON;
1357 DALI_LOG_INFO( gWindowLogFilter, Debug::Verbose, "Window::GetScreenMode: screen mode [%d]\n", mEventHandler->mScreenMode );
1362 bool Window::SetBrightness( int brightness )
1364 if( brightness < 0 || brightness > 100 )
1366 DALI_LOG_INFO( gWindowLogFilter, Debug::Verbose, "Window::SetBrightness: Invalid brightness value [%d]\n", brightness );
1370 while( !mEventHandler->mTizenDisplayPolicy )
1372 wl_display_dispatch_queue( mEventHandler->mDisplay, mEventHandler->mEventQueue );
1375 mEventHandler->mBrightnessChangeDone = false;
1376 mEventHandler->mBrightnessChangeState = TIZEN_POLICY_ERROR_STATE_NONE;
1378 tizen_display_policy_set_window_brightness( mEventHandler->mTizenDisplayPolicy, ecore_wl_window_surface_get( mEventHandler->mEcoreWindow ), brightness );
1382 while( !mEventHandler->mBrightnessChangeDone && count < 3 )
1385 wl_display_dispatch_queue( mEventHandler->mDisplay, mEventHandler->mEventQueue );
1389 if( !mEventHandler->mBrightnessChangeDone )
1391 DALI_LOG_INFO( gWindowLogFilter, Debug::Verbose, "Window::SetBrightness: Brightness change is failed [%d, %d]\n", brightness, mEventHandler->mBrightnessChangeState );
1394 else if( mEventHandler->mBrightnessChangeState == TIZEN_POLICY_ERROR_STATE_PERMISSION_DENIED )
1396 DALI_LOG_INFO( gWindowLogFilter, Debug::Verbose, "Window::SetBrightness: Permission denied! [%d]\n", brightness );
1400 DALI_LOG_INFO( gWindowLogFilter, Debug::Verbose, "Window::SetBrightness: Brightness is changed [%d]\n", mEventHandler->mBrightness );
1405 int Window::GetBrightness()
1407 while( !mEventHandler->mTizenDisplayPolicy )
1409 wl_display_dispatch_queue( mEventHandler->mDisplay, mEventHandler->mEventQueue );
1414 while( !mEventHandler->mBrightnessChangeDone && count < 3 )
1417 wl_display_dispatch_queue( mEventHandler->mDisplay, mEventHandler->mEventQueue );
1421 if( !mEventHandler->mBrightnessChangeDone )
1423 DALI_LOG_INFO( gWindowLogFilter, Debug::Verbose, "Window::GetBrightness: Error! [%d]\n", mEventHandler->mBrightnessChangeState );
1427 DALI_LOG_INFO( gWindowLogFilter, Debug::Verbose, "Window::GetBrightness: Brightness [%d]\n", mEventHandler->mBrightness );
1429 return mEventHandler->mBrightness;
1432 void Window::SetSize( Dali::DevelWindow::WindowSize size )
1434 if( !mResizeEnabled )
1436 AddAuxiliaryHint( "wm.policy.win.user.geometry", "1" );
1437 mResizeEnabled = true;
1440 PositionSize positionSize = mSurface->GetPositionSize();
1442 if( positionSize.width != size.GetWidth() || positionSize.height != size.GetHeight() )
1444 positionSize.width = size.GetWidth();
1445 positionSize.height = size.GetHeight();
1447 mSurface->MoveResize( positionSize );
1449 mAdaptor->SurfaceResizePrepare( Dali::Adaptor::SurfaceSize( positionSize.width, positionSize.height ) );
1452 mResizedSignal.Emit( Dali::DevelWindow::WindowSize( positionSize.width, positionSize.height ) );
1454 mAdaptor->SurfaceResizeComplete( Dali::Adaptor::SurfaceSize( positionSize.width, positionSize.height ) );
1458 Dali::DevelWindow::WindowSize Window::GetSize()
1460 PositionSize positionSize = mSurface->GetPositionSize();
1462 return Dali::DevelWindow::WindowSize( positionSize.width, positionSize.height );
1465 void Window::SetPosition( Dali::DevelWindow::WindowPosition position )
1467 if( !mResizeEnabled )
1469 AddAuxiliaryHint( "wm.policy.win.user.geometry", "1" );
1470 mResizeEnabled = true;
1473 PositionSize positionSize = mSurface->GetPositionSize();
1475 if( positionSize.x != position.GetX() || positionSize.y != position.GetY() )
1477 positionSize.x = position.GetX();
1478 positionSize.y = position.GetY();
1480 mSurface->MoveResize( positionSize );
1484 Dali::DevelWindow::WindowPosition Window::GetPosition()
1486 PositionSize positionSize = mSurface->GetPositionSize();
1488 return Dali::DevelWindow::WindowPosition( positionSize.x, positionSize.y );
1491 void Window::SetTransparency( bool transparent )
1493 ECore::WindowRenderSurface* wlSurface( dynamic_cast< ECore::WindowRenderSurface * >( mSurface ) );
1494 wlSurface->SetTransparency( transparent );
1503 #pragma GCC diagnostic pop