bool IsFocusAcceptable();
/**
+ * @brief Shows the window if it is hidden.
+ */
+ void Show();
+
+ /**
+ * @brief Hides the window if it is showing.
+ */
+ void Hide();
+
+ /**
+ * @brief Returns whether the window is showing or not.
+ * @return True if the window is showing, false otherwise.
+ */
+ bool IsVisible() const;
+
+ /**
* Called from Orientation after the Change signal has been sent
*/
void RotationDone( int orientation, int width, int height );
bool mWMRotationAppSet:1;
bool mEcoreEventHander:1;
bool mIsFocusAcceptable:1;
+ bool mVisible:1;
IndicatorInterface* mIndicator;
Dali::Window::WindowOrientation mIndicatorOrientation;
Dali::Window::WindowOrientation mNextIndicatorOrientation;
return GetImplementation( window ).IsFocusAcceptable();
}
+void Show( Window window )
+{
+ GetImplementation( window ).Show();
+}
+
+void Hide( Window window )
+{
+ GetImplementation( window ).Hide();
+}
+
+bool IsVisible( Window window )
+{
+ return GetImplementation( window ).IsVisible();
+}
+
} // namespace DevelWindow
} // namespace Dali
* @param[in] window The window to get a signal
* @return The signal to connect to
*/
-FocusSignalType& FocusChangedSignal( Window window );
+DALI_IMPORT_API FocusSignalType& FocusChangedSignal( Window window );
/**
* @brief Sets whether window accepts focus or not.
* @param[in] window The window to accept focus
* @param[in] accept If focus is accepted or not. Default is true.
*/
-void SetAcceptFocus( Window window, bool accept );
+DALI_IMPORT_API void SetAcceptFocus( Window window, bool accept );
/**
* @brief Returns whether window accepts focus or not.
* @param[in] window The window to accept focus
* @return True if the window accept focus, false otherwise
*/
-bool IsFocusAcceptable( Window window );
+DALI_IMPORT_API bool IsFocusAcceptable( Window window );
+
+/**
+ * @brief Shows the window if it is hidden.
+ * @param[in] window The window to show
+ */
+DALI_IMPORT_API void Show( Window window );
+
+/**
+ * @brief Hides the window if it is showing.
+ * @param[in] window The window to hide
+ */
+DALI_IMPORT_API void Hide( Window window );
+
+/**
+ * @brief Returns whether the window is visible or not.
+ * @param[in] window The window to query
+ * @return True if the window is visible, false otherwise.
+ */
+DALI_IMPORT_API bool IsVisible( Window window );
} // namespace DevelWindow
mWMRotationAppSet( false ),
mEcoreEventHander( true ),
mIsFocusAcceptable( true ),
+ mVisible( true ),
mIndicator( NULL ),
mIndicatorOrientation( Dali::Window::PORTRAIT ),
mNextIndicatorOrientation( Dali::Window::PORTRAIT ),
return mIsFocusAcceptable;
}
+void Window::Show()
+{
+ mVisible = true;
+ ecore_wl_window_show( mEventHandler->mEcoreWindow );
+
+ // Need an update request
+ if( mAdaptor )
+ {
+ mAdaptor->RequestUpdateOnce();
+ }
+}
+
+void Window::Hide()
+{
+ mVisible = false;
+ ecore_wl_window_hide( mEventHandler->mEcoreWindow );
+}
+
+bool Window::IsVisible() const
+{
+ return mVisible;
+}
+
void Window::RotationDone( int orientation, int width, int height )
{
ecore_wl_window_rotation_change_done_send( mEventHandler->mEcoreWindow );
/*
- * Copyright (c) 2015 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
mIsTransparent( false ),
mWMRotationAppSet( false ),
mIsFocusAcceptable( true ),
+ mVisible( true ),
mIndicator( NULL ),
mIndicatorOrientation( Dali::Window::PORTRAIT ),
mNextIndicatorOrientation( Dali::Window::PORTRAIT ),
return mIsFocusAcceptable;
}
+void Window::Show()
+{
+ mVisible = true;
+}
+
+void Window::Hide()
+{
+ mVisible = false;
+}
+
+bool Window::IsVisible() const
+{
+ return mVisible;
+}
+
+
void Window::RotationDone( int orientation, int width, int height )
{
}
/*
- * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
mWMRotationAppSet( false ),
mEcoreEventHander( true ),
mIsFocusAcceptable( true ),
+ mVisible( true ),
mIndicator( NULL ),
mIndicatorOrientation( Dali::Window::PORTRAIT ),
mNextIndicatorOrientation( Dali::Window::PORTRAIT ),
return mIsFocusAcceptable;
}
+void Window::Show()
+{
+ ECore::WindowRenderSurface* x11Window = dynamic_cast< ECore::WindowRenderSurface * >( mSurface );
+ if( x11Window )
+ {
+ Ecore_X_Window win = x11Window->GetXWindow();
+ ecore_x_window_show( win );
+
+ // Need an update request
+ if( mAdaptor )
+ {
+ mAdaptor->RequestUpdateOnce();
+ }
+ }
+}
+
+void Window::Hide()
+{
+ ECore::WindowRenderSurface* x11Window = dynamic_cast< ECore::WindowRenderSurface * >( mSurface );
+ if( x11Window )
+ {
+ Ecore_X_Window win = x11Window->GetXWindow();
+ ecore_x_window_hide( win );
+ }
+}
+
+bool Window::IsVisible() const
+{
+ bool visible = false;
+
+ ECore::WindowRenderSurface* x11Window = dynamic_cast< ECore::WindowRenderSurface * >( mSurface );
+ if( x11Window )
+ {
+ Ecore_X_Window win = x11Window->GetXWindow();
+ visible = static_cast< bool >( ecore_x_window_visible_get( win ) );
+ }
+ return visible;
+}
+
void Window::RotationDone( int orientation, int width, int height )
{
// Tell window manager we're done