Dali need to check which window is focused.
So deprecate FocusChangedSignal and add new Signal for focus.
and ResizeSignal is also changed for the same reason
Change-Id: I463150de7889dbac87926c972a5991d37f79925c
return GetImplementation( window ).GetParent();
}
+Window DownCast( BaseHandle handle )
+{
+ return Window( dynamic_cast<Dali::Internal::Adaptor::Window*>( handle.GetObjectPtr()) );
+}
} // namespace DevelWindow
} // namespace Dali
*/
DALI_ADAPTOR_API Window GetParent( Window window );
+/**
+ * @brief Downcast sceneHolder to window
+ *
+ * @param[in] handle The handle need to downcast
+ * @return The window cast from SceneHolder
+ */
+DALI_ADAPTOR_API Window DownCast( BaseHandle handle );
+
} // namespace DevelWindow
} // namespace Dali
mWindowHeight( 0 ),
mFocusChangedSignal(),
mResizedSignal(),
- mDeleteRequestSignal()
+ mDeleteRequestSignal(),
+ mFocusChangeSignal(),
+ mResizeSignal()
{
}
mAdaptor->SurfaceResizePrepare( mSurface.get(), newSize );
+ Dali::Window handle( this );
mResizedSignal.Emit( newSize );
+ mResizeSignal.Emit( handle, newSize );
mAdaptor->SurfaceResizeComplete( mSurface.get(), newSize );
}
mAdaptor->SurfaceResizePrepare( mSurface.get(), newSize );
+ Dali::Window handle( this );
mResizedSignal.Emit( newSize );
-
+ mResizeSignal.Emit( handle, newSize );
mAdaptor->SurfaceResizeComplete( mSurface.get(), newSize );
}
}
void Window::OnFocusChanged( bool focusIn )
{
+ Dali::Window handle( this );
mFocusChangedSignal.Emit( focusIn );
+ mFocusChangeSignal.Emit( handle, focusIn );
}
void Window::OnOutputTransformed()
mAdaptor->SurfaceResizePrepare( mSurface.get(), Adaptor::SurfaceSize( mRotationAngle, mWindowHeight ) );
// Emit signal
+ Dali::Window handle( this );
mResizedSignal.Emit( Dali::Window::WindowSize( mRotationAngle, mWindowHeight ) );
+ mResizeSignal.Emit( handle, Dali::Window::WindowSize( mRotationAngle, mWindowHeight ) );
mAdaptor->SurfaceResizeComplete( mSurface.get(), Adaptor::SurfaceSize( mRotationAngle, mWindowHeight ) );
}
typedef Dali::Window::IndicatorSignalType IndicatorSignalType;
typedef Dali::Window::FocusSignalType FocusSignalType;
typedef Dali::Window::ResizedSignalType ResizedSignalType;
+ typedef Dali::Window::FocusChangeSignalType FocusChangeSignalType;
+ typedef Dali::Window::ResizeSignalType ResizeSignalType;
typedef Signal< void () > SignalType;
/**
FocusSignalType& FocusChangedSignal() { return mFocusChangedSignal; }
/**
+ * @copydoc Dali::Window::WindowFocusChangedSignal()
+ */
+ FocusChangeSignalType& FocusChangeSignal() { return mFocusChangeSignal; }
+ /**
* @copydoc Dali::Window::ResizedSignal()
*/
ResizedSignalType& ResizedSignal() { return mResizedSignal; }
+ /**
+ * @copydoc Dali::Window::ResizedSignal()
+ */
+ ResizeSignalType& ResizeSignal() { return mResizeSignal; }
/**
* This signal is emitted when the window is requesting to be deleted
FocusSignalType mFocusChangedSignal;
ResizedSignalType mResizedSignal;
SignalType mDeleteRequestSignal;
-
-
+ FocusChangeSignalType mFocusChangeSignal;
+ ResizeSignalType mResizeSignal;
};
} // namespace Adaptor
Window::FocusSignalType& Window::FocusChangedSignal()
{
+ DALI_LOG_WARNING_NOFN("DEPRECATION WARNING: FocusChangedSignal is deprecated and will be removed from next release.\n" );
return GetImplementation(*this).FocusChangedSignal();
}
+Window::FocusChangeSignalType& Window::FocusChangeSignal()
+{
+ return GetImplementation(*this).FocusChangeSignal();
+}
+
void Window::SetAcceptFocus( bool accept )
{
GetImplementation(*this).SetAcceptFocus( accept );
Window::ResizedSignalType& Window::ResizedSignal()
{
+ DALI_LOG_WARNING_NOFN("DEPRECATION WARNING: ResizedSignal is deprecated and will be removed from next release.\n" );
return GetImplementation(*this).ResizedSignal();
}
+Window::ResizeSignalType& Window::ResizeSignal()
+{
+ return GetImplementation(*this).ResizeSignal();
+}
+
void Window::SetSize( Window::WindowSize size )
{
GetImplementation(*this).SetSize( size );
typedef Uint16Pair WindowPosition; ///< Window position type @SINCE_1_2.60
typedef Signal< void (bool) > IndicatorSignalType; ///< @DEPRECATED_1_4.9 @brief Indicator state signal type @SINCE_1_0.0
- typedef Signal< void (bool) > FocusSignalType; ///< Window focus signal type @SINCE_1_2.60
- typedef Signal< void (WindowSize) > ResizedSignalType; ///< Window resized signal type @SINCE_1_2.60
-
+ typedef Signal< void (bool) > FocusSignalType; ///< @DEPRECATED_1_4.35 @brief Window focus signal type @SINCE_1_2.60
+ typedef Signal< void (WindowSize) > ResizedSignalType; ///< @DEPRECATED_1_4.35 @brief Window resized signal type @SINCE_1_2.60
+ typedef Signal< void (Window,bool) > FocusChangeSignalType; ///< Window focus signal type @SINCE_1_4.35
+ typedef Signal< void (Window,WindowSize) > ResizeSignalType; ///< Window resized signal type @SINCE_1_4.35
public:
// Enumerations
IndicatorSignalType& IndicatorVisibilityChangedSignal() DALI_DEPRECATED_API;
/**
+ * @DEPRECATED_1_4.35
* @brief The user should connect to this signal to get a timing when window gains focus or loses focus.
*
* A callback of the following type may be connected:
* @SINCE_1_2.60
* @return The signal to connect to
*/
- FocusSignalType& FocusChangedSignal();
+ FocusSignalType& FocusChangedSignal() DALI_DEPRECATED_API;
/**
* @brief This signal is emitted when the window is resized.
* @SINCE_1_2.60
* @return The signal to connect to
*/
- ResizedSignalType& ResizedSignal();
+ ResizedSignalType& ResizedSignal() DALI_DEPRECATED_API;
+
+ /**
+ * @brief The user should connect to this signal to get a timing when window gains focus or loses focus.
+ *
+ * A callback of the following type may be connected:
+ * @code
+ * void YourCallbackName( Window window, bool focusIn );
+ * @endcode
+ * The parameter is true if window gains focus, otherwise false.
+ * and window means this signal was called from what window
+ *
+ * @SINCE_1_4.35
+ * @return The signal to connect to
+ */
+ FocusChangeSignalType& FocusChangeSignal();
+
+ /**
+ * @brief This signal is emitted when the window is resized.
+ *
+ * A callback of the following type may be connected:
+ * @code
+ * void YourCallbackName( Window window, int width, int height );
+ * @endcode
+ * The parameters are the resized width and height.
+ * and window means this signal was called from what window
+ *
+ * @SINCE_1_4.35
+ * @return The signal to connect to
+ */
+ ResizeSignalType& ResizeSignal();
public: // Not intended for application developers
/// @cond internal