Add window focus API and signals 06/117206/6
authorHeeyong Song <heeyong.song@samsung.com>
Fri, 3 Mar 2017 07:46:53 +0000 (16:46 +0900)
committerHeeyong Song <heeyong.song@samsung.com>
Thu, 9 Mar 2017 02:23:48 +0000 (11:23 +0900)
Change-Id: I87520279bcb5600d0e09b230b21b0d61a31a2a1f

adaptors/common/window-impl.h
adaptors/devel-api/adaptor-framework/window-devel.cpp [new file with mode: 0644]
adaptors/devel-api/adaptor-framework/window-devel.h [new file with mode: 0644]
adaptors/devel-api/file.list
adaptors/ecore/wayland/window-impl-ecore-wl.cpp
adaptors/public-api/adaptor-framework/window.cpp
adaptors/public-api/adaptor-framework/window.h
adaptors/wayland/window-impl-wl.cpp
adaptors/x11/window-impl-x.cpp
automated-tests/src/dali-adaptor/utc-Dali-Window.cpp

index 767cd98..8b4bc28 100644 (file)
@@ -2,7 +2,7 @@
 #define __DALI_INTERNAL_WINDOW_H__
 
 /*
- * 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.
@@ -30,6 +30,7 @@
 #include <orientation.h>
 #include <render-surface.h>
 #include <drag-and-drop-detector.h>
+#include <window-devel.h>
 
 namespace Dali
 {
@@ -58,6 +59,7 @@ class Window : public Dali::BaseObject, public IndicatorInterface::Observer, pub
 {
 public:
   typedef Dali::Window::IndicatorSignalType IndicatorSignalType;
+  typedef Dali::DevelWindow::FocusSignalType FocusSignalType;
   typedef Signal< void () > SignalType;
 
   /**
@@ -158,6 +160,21 @@ public:
   Dali::Any GetNativeHandle() const;
 
   /**
+   * @brief Sets whether window accepts focus or not.
+   *
+   * @param[in] accept If focus is accepted or not. Default is true.
+   */
+  void SetAcceptFocus( 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();
+
+  /**
    * Called from Orientation after the Change signal has been sent
    */
   void RotationDone( int orientation, int width, int height );
@@ -253,6 +270,11 @@ public: // Signals
   IndicatorSignalType& IndicatorVisibilityChangedSignal() { return mIndicatorVisibilityChangedSignal; }
 
   /**
+   * The user should connect to this signal to get a timing when window gains focus or loses focus.
+   */
+  FocusSignalType& FocusChangedSignal() { return mFocusChangedSignal; }
+
+  /**
    * This signal is emitted when the window is requesting to be deleted
    */
   SignalType& DeleteRequestSignal() { return mDeleteRequestSignal; }
@@ -269,6 +291,7 @@ private:
   bool                             mIsTransparent:1;
   bool                             mWMRotationAppSet:1;
   bool                             mEcoreEventHander:1;
+  bool                             mIsFocusAcceptable:1;
   IndicatorInterface*              mIndicator;
   Dali::Window::WindowOrientation  mIndicatorOrientation;
   Dali::Window::WindowOrientation  mNextIndicatorOrientation;
@@ -286,6 +309,7 @@ private:
 
   // Signals
   IndicatorSignalType mIndicatorVisibilityChangedSignal;
+  FocusSignalType     mFocusChangedSignal;
   SignalType          mDeleteRequestSignal;
 };
 
diff --git a/adaptors/devel-api/adaptor-framework/window-devel.cpp b/adaptors/devel-api/adaptor-framework/window-devel.cpp
new file mode 100644 (file)
index 0000000..48898e5
--- /dev/null
@@ -0,0 +1,45 @@
+/*
+ * 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.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+// INTERNAL INCLUDES
+#include <adaptors/devel-api/adaptor-framework/window-devel.h>
+#include <adaptors/common/window-impl.h>
+
+namespace Dali
+{
+
+namespace DevelWindow
+{
+
+FocusSignalType& FocusChangedSignal( Window window )
+{
+  return GetImplementation( window ).FocusChangedSignal();
+}
+
+void SetAcceptFocus( Window window, bool accept )
+{
+  GetImplementation( window ).SetAcceptFocus( accept );
+}
+
+bool IsFocusAcceptable( Window window )
+{
+  return GetImplementation( window ).IsFocusAcceptable();
+}
+
+} // namespace DevelWindow
+
+} // namespace Dali
diff --git a/adaptors/devel-api/adaptor-framework/window-devel.h b/adaptors/devel-api/adaptor-framework/window-devel.h
new file mode 100644 (file)
index 0000000..1321d0b
--- /dev/null
@@ -0,0 +1,70 @@
+#ifndef DALI_WINDOW_DEVEL_H
+#define DALI_WINDOW_DEVEL_H
+
+/*
+ * 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.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+// INTERNAL INCLUDES
+#ifdef DALI_ADAPTOR_COMPILATION  // full path doesn't exist until adaptor is installed so we have to use relative
+#include <window.h>
+#else
+#include <dali/public-api/adaptor-framework/window.h>
+#endif
+
+namespace Dali
+{
+
+namespace DevelWindow
+{
+
+typedef Signal< void (bool) > FocusSignalType;      ///< Window focus signal type
+
+/**
+ * @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( bool focusIn );
+ * @endcode
+ * The parameter is true if window gains focus, otherwise false.
+ *
+ * @param[in] window The window to get a signal
+ * @return The signal to connect to
+ */
+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 );
+
+/**
+ * @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 );
+
+} // namespace DevelWindow
+
+} // namespace Dali
+
+#endif // DALI_WINDOW_DEVEL_H
index d86aca8..17bc1bd 100644 (file)
@@ -25,7 +25,8 @@ devel_api_src_files = \
   $(adaptor_devel_api_dir)/adaptor-framework/tilt-sensor.cpp \
   $(adaptor_devel_api_dir)/adaptor-framework/lifecycle-controller.cpp \
   $(adaptor_devel_api_dir)/adaptor-framework/video-player.cpp \
-  $(adaptor_devel_api_dir)/adaptor-framework/virtual-keyboard.cpp
+  $(adaptor_devel_api_dir)/adaptor-framework/virtual-keyboard.cpp \
+  $(adaptor_devel_api_dir)/adaptor-framework/window-devel.cpp
 
 
 devel_api_adaptor_framework_header_files = \
@@ -61,4 +62,6 @@ devel_api_adaptor_framework_header_files = \
   $(adaptor_devel_api_dir)/adaptor-framework/video-player.h \
   $(adaptor_devel_api_dir)/adaptor-framework/video-player-plugin.h \
   $(adaptor_devel_api_dir)/adaptor-framework/virtual-keyboard.h \
-  $(adaptor_devel_api_dir)/adaptor-framework/physical-keyboard.h
+  $(adaptor_devel_api_dir)/adaptor-framework/physical-keyboard.h \
+  $(adaptor_devel_api_dir)/adaptor-framework/window-devel.h
+
index a9ff72f..24c6cca 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * 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.
@@ -16,7 +16,7 @@
  */
 
 // CLASS HEADER
-#include "window-impl.h"
+#include <window-impl.h>
 
 // EXTERNAL HEADERS
 #include <Ecore.h>
@@ -34,6 +34,7 @@
 #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
@@ -64,6 +65,8 @@ struct Window::EventHandler
   : mWindow( window ),
     mWindowPropertyHandler( NULL ),
     mWindowIconifyStateHandler( NULL ),
+    mWindowFocusInHandler( NULL ),
+    mWindowFocusOutHandler( NULL ),
     mEcoreWindow( 0 )
   {
     // store ecore window handle
@@ -77,8 +80,9 @@ struct Window::EventHandler
     if( mWindow->mEcoreEventHander )
     {
       mWindowIconifyStateHandler = ecore_event_handler_add( ECORE_WL_EVENT_WINDOW_ICONIFY_STATE_CHANGE, EcoreEventWindowIconifyStateChanged, this );
+      mWindowFocusInHandler = ecore_event_handler_add( ECORE_WL_EVENT_FOCUS_IN, EcoreEventWindowFocusIn, this );
+      mWindowFocusOutHandler = ecore_event_handler_add( ECORE_WL_EVENT_FOCUS_OUT, EcoreEventWindowFocusOut, this );
     }
-
   }
 
   /**
@@ -94,6 +98,14 @@ struct Window::EventHandler
     {
       ecore_event_handler_del( mWindowIconifyStateHandler );
     }
+    if( mWindowFocusInHandler )
+    {
+      ecore_event_handler_del( mWindowFocusInHandler );
+    }
+    if( mWindowFocusOutHandler )
+    {
+      ecore_event_handler_del( mWindowFocusOutHandler );
+    }
   }
 
   // Static methods
@@ -107,14 +119,14 @@ struct Window::EventHandler
   /// Called when the window iconify state is changed.
   static Eina_Bool EcoreEventWindowIconifyStateChanged( void* data, int type, void* event )
   {
-    Ecore_Wl_Event_Window_Iconify_State_Change* iconifyChangedEvent( (Ecore_Wl_Event_Window_Iconify_State_Change*)event );
-    EventHandler* handler( (EventHandler*)data );
+    Ecore_Wl_Event_Window_Iconify_State_Change* iconifyChangedEvent( static_cast< Ecore_Wl_Event_Window_Iconify_State_Change* >( event ) );
+    EventHandler* handler( static_cast< EventHandler* >( data ) );
     Eina_Bool handled( ECORE_CALLBACK_PASS_ON );
 
     if ( handler && handler->mWindow )
     {
       WindowVisibilityObserver* observer( handler->mWindow->mAdaptor );
-      if ( observer && ( iconifyChangedEvent->win == (unsigned int) ecore_wl_window_id_get( handler->mEcoreWindow ) ) )
+      if ( observer && ( iconifyChangedEvent->win == static_cast< unsigned int> ( ecore_wl_window_id_get( handler->mEcoreWindow ) ) ) )
       {
         if( iconifyChangedEvent->iconified == EINA_TRUE )
         {
@@ -133,14 +145,47 @@ struct Window::EventHandler
     return handled;
   }
 
+  /// Called when the window gains focus
+  static Eina_Bool EcoreEventWindowFocusIn( void* data, int type, void* event )
+  {
+    Ecore_Wl_Event_Focus_In* focusInEvent( static_cast< Ecore_Wl_Event_Focus_In* >( event ) );
+    EventHandler* handler( static_cast< EventHandler* >( data ) );
+
+    if ( handler && handler->mWindow && focusInEvent->win == static_cast< unsigned int >( ecore_wl_window_id_get( handler->mEcoreWindow ) ) )
+    {
+      DALI_LOG_INFO( gWindowLogFilter, Debug::General, "Window EcoreEventWindowFocusIn\n" );
+
+      handler->mWindow->mFocusChangedSignal.Emit( true );
+    }
+
+    return ECORE_CALLBACK_PASS_ON;
+  }
+
+  /// Called when the window loses focus
+  static Eina_Bool EcoreEventWindowFocusOut( void* data, int type, void* event )
+  {
+    Ecore_Wl_Event_Focus_Out* focusOutEvent( static_cast< Ecore_Wl_Event_Focus_Out* >( event ) );
+    EventHandler* handler( static_cast< EventHandler* >( data ) );
+
+    if ( handler && handler->mWindow && focusOutEvent->win == static_cast< unsigned int >(ecore_wl_window_id_get( handler->mEcoreWindow ) ) )
+    {
+      DALI_LOG_INFO( gWindowLogFilter, Debug::General, "Window EcoreEventWindowFocusOut\n" );
+
+      handler->mWindow->mFocusChangedSignal.Emit( false );
+    }
+
+    return ECORE_CALLBACK_PASS_ON;
+  }
+
   // Data
   Window* mWindow;
   Ecore_Event_Handler* mWindowPropertyHandler;
   Ecore_Event_Handler* mWindowIconifyStateHandler;
+  Ecore_Event_Handler* mWindowFocusInHandler;
+  Ecore_Event_Handler* mWindowFocusOutHandler;
   Ecore_Wl_Window* mEcoreWindow;
 };
 
-
 Window* Window::New(const PositionSize& posSize, const std::string& name, const std::string& className, bool isTransparent)
 {
   Window* window = new Window();
@@ -221,7 +266,7 @@ void Window::ShowIndicator( Dali::Window::IndicatorVisibleMode visibleMode )
   DoShowIndicator( mIndicatorOrientation );
 }
 
-void Window::RotateIndicator(Dali::Window::WindowOrientation orientation)
+void Window::RotateIndicator( Dali::Window::WindowOrientation orientation )
 {
   DALI_LOG_TRACE_METHOD_FMT( gWindowLogFilter, "Orientation: %d\n", orientation );
 
@@ -255,22 +300,23 @@ void Window::SetClass(std::string name, std::string klass)
 }
 
 Window::Window()
-: mSurface(NULL),
-  mIndicatorVisible(Dali::Window::VISIBLE),
-  mIndicatorIsShown(false),
-  mShowRotatedIndicatorOnClose(false),
-  mStarted(false),
-  mIsTransparent(false),
-  mWMRotationAppSet(false),
-  mEcoreEventHander(true),
-  mIndicator(NULL),
-  mIndicatorOrientation(Dali::Window::PORTRAIT),
-  mNextIndicatorOrientation(Dali::Window::PORTRAIT),
-  mIndicatorOpacityMode(Dali::Window::OPAQUE),
-  mOverlay(NULL),
-  mAdaptor(NULL),
-  mEventHandler(NULL),
-  mPreferredOrientation(Dali::Window::PORTRAIT)
+: mSurface( NULL ),
+  mIndicatorVisible( Dali::Window::VISIBLE ),
+  mIndicatorIsShown( false ),
+  mShowRotatedIndicatorOnClose( false ),
+  mStarted( false ),
+  mIsTransparent( false ),
+  mWMRotationAppSet( false ),
+  mEcoreEventHander( true ),
+  mIsFocusAcceptable( true ),
+  mIndicator( NULL ),
+  mIndicatorOrientation( Dali::Window::PORTRAIT ),
+  mNextIndicatorOrientation( Dali::Window::PORTRAIT ),
+  mIndicatorOpacityMode( Dali::Window::OPAQUE ),
+  mOverlay( NULL ),
+  mAdaptor( NULL ),
+  mEventHandler( NULL ),
+  mPreferredOrientation( Dali::Window::PORTRAIT )
 {
 }
 
@@ -589,12 +635,23 @@ Dali::Window::WindowOrientation Window::GetPreferredOrientation()
   return mPreferredOrientation;
 }
 
+void Window::SetAcceptFocus( bool accept )
+{
+  mIsFocusAcceptable = accept;
+
+  ecore_wl_window_focus_skip_set( mEventHandler->mEcoreWindow, !accept );
+}
+
+bool Window::IsFocusAcceptable()
+{
+  return mIsFocusAcceptable;
+}
+
 void Window::RotationDone( int orientation, int width, int height )
 {
   ecore_wl_window_rotation_change_done_send( mEventHandler->mEcoreWindow );
 }
 
-
 } // Adaptor
 } // Internal
 } // Dali
index bb1b4cc..85c78ec 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * 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.
index 54cc2bd..da70b63 100644 (file)
@@ -2,7 +2,7 @@
 #define __DALI_WINDOW_H__
 
 /*
- * 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.
@@ -56,7 +56,7 @@ class Orientation;
 class DALI_IMPORT_API Window : public BaseHandle
 {
 public:
-  typedef Signal< void (bool) > IndicatorSignalType;
+  typedef Signal< void (bool) > IndicatorSignalType;  ///< Indicator state signal type @SINCE_1_0.0
 
 public:
 
index f0be235..9110aa7 100644 (file)
@@ -102,20 +102,21 @@ void Window::SetClass(std::string name, std::string klass)
 }
 
 Window::Window()
-: mSurface(NULL),
-  mIndicatorVisible(Dali::Window::VISIBLE),
-  mIndicatorIsShown(false),
-  mShowRotatedIndicatorOnClose(false),
-  mStarted(false),
-  mIsTransparent(false),
-  mWMRotationAppSet(false),
-  mIndicator(NULL),
-  mIndicatorOrientation(Dali::Window::PORTRAIT),
-  mNextIndicatorOrientation(Dali::Window::PORTRAIT),
-  mIndicatorOpacityMode(Dali::Window::OPAQUE),
-  mOverlay(NULL),
-  mAdaptor(NULL),
-  mPreferredOrientation(Dali::Window::PORTRAIT)
+: mSurface( NULL ),
+  mIndicatorVisible( Dali::Window::VISIBLE ),
+  mIndicatorIsShown( false ),
+  mShowRotatedIndicatorOnClose( false ),
+  mStarted( false ),
+  mIsTransparent( false ),
+  mWMRotationAppSet( false ),
+  mIsFocusAcceptable( true ),
+  mIndicator( NULL ),
+  mIndicatorOrientation( Dali::Window::PORTRAIT ),
+  mNextIndicatorOrientation( Dali::Window::PORTRAIT ),
+  mIndicatorOpacityMode( Dali::Window::OPAQUE ),
+  mOverlay( NULL ),
+  mAdaptor( NULL ),
+  mPreferredOrientation( Dali::Window::PORTRAIT )
 {
   mEventHandler = NULL;
 }
@@ -278,10 +279,19 @@ Dali::Window::WindowOrientation Window::GetPreferredOrientation()
   return mPreferredOrientation;
 }
 
-void Window::RotationDone( int orientation, int width, int height )
+void Window::SetAcceptFocus( bool accept )
+{
+  mIsFocusAcceptable = accept;
+}
+
+bool Window::IsFocusAcceptable()
 {
+  return mIsFocusAcceptable;
 }
 
+void Window::RotationDone( int orientation, int width, int height )
+{
+}
 
 } // Adaptor
 } // Internal
index c15f51b..7f9e909 100644 (file)
@@ -335,22 +335,23 @@ void Window::SetClass(std::string name, std::string klass)
 }
 
 Window::Window()
-: mSurface(NULL),
-  mIndicatorVisible(Dali::Window::INVISIBLE),
-  mIndicatorIsShown(false),
-  mShowRotatedIndicatorOnClose(false),
-  mStarted(false),
-  mIsTransparent(false),
-  mWMRotationAppSet(false),
-  mEcoreEventHander(true),
-  mIndicator(NULL),
-  mIndicatorOrientation(Dali::Window::PORTRAIT),
-  mNextIndicatorOrientation(Dali::Window::PORTRAIT),
-  mIndicatorOpacityMode(Dali::Window::OPAQUE),
-  mOverlay(NULL),
-  mAdaptor(NULL),
-  mEventHandler(NULL),
-  mPreferredOrientation(Dali::Window::PORTRAIT)
+: mSurface( NULL ),
+  mIndicatorVisible( Dali::Window::INVISIBLE ),
+  mIndicatorIsShown( false ),
+  mShowRotatedIndicatorOnClose( false ),
+  mStarted( false ),
+  mIsTransparent( false ),
+  mWMRotationAppSet( false ),
+  mEcoreEventHander( true ),
+  mIsFocusAcceptable( true ),
+  mIndicator( NULL ),
+  mIndicatorOrientation( Dali::Window::PORTRAIT ),
+  mNextIndicatorOrientation( Dali::Window::PORTRAIT ),
+  mIndicatorOpacityMode( Dali::Window::OPAQUE ),
+  mOverlay( NULL ),
+  mAdaptor( NULL ),
+  mEventHandler( NULL ),
+  mPreferredOrientation( Dali::Window::PORTRAIT )
 {
 
   // Detect if we're not running in a ecore main loop (e.g. libuv).
@@ -732,6 +733,16 @@ Dali::Window::WindowOrientation Window::GetPreferredOrientation()
   return mPreferredOrientation;
 }
 
+void Window::SetAcceptFocus( bool accept )
+{
+  mIsFocusAcceptable = accept;
+}
+
+bool Window::IsFocusAcceptable()
+{
+  return mIsFocusAcceptable;
+}
+
 void Window::RotationDone( int orientation, int width, int height )
 {
   // Tell window manager we're done
index c917d7b..4a3639c 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * 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.
@@ -18,6 +18,7 @@
 #include <dali/dali.h>
 #include <Ecore_X.h>
 #include <devel-api/adaptor-framework/drag-and-drop-detector.h>
+#include <devel-api/adaptor-framework/window-devel.h>
 #include <dali-test-suite-utils.h>
 
 using namespace Dali;
@@ -345,12 +346,12 @@ int UtcDaliWindowGetNativeHandleN(void)
   END_TEST;
 }
 
-int UtcDaliWindowIndicatorVisibilityChangedSignalN(void)
+int UtcDaliWindowSetAcceptFocusN(void)
 {
   Dali::Window window;
   try
   {
-    window.IndicatorVisibilityChangedSignal();
+    DevelWindow::SetAcceptFocus( window, true );
     DALI_TEST_CHECK( false ); // Should not reach here!
   }
   catch( ... )
@@ -361,6 +362,50 @@ int UtcDaliWindowIndicatorVisibilityChangedSignalN(void)
   END_TEST;
 }
 
+int UtcDaliWindowIsFocusAcceptableN(void)
+{
+  Dali::Window window;
+  try
+  {
+    DevelWindow::IsFocusAcceptable( window );
+    DALI_TEST_CHECK( false ); // Should not reach here!
+  }
+  catch( ... )
+  {
+    DALI_TEST_CHECK( true );
+  }
+
+  END_TEST;
+}
+
+int UtcDaliWindowIndicatorVisibilityChangedSignalN(void)
+{
+  Dali::Window window;
+  try
+  {
+    window.IndicatorVisibilityChangedSignal();
+    DALI_TEST_CHECK( false ); // Should not reach here!
+  }
+  catch( ... )
+  {
+    DALI_TEST_CHECK( true );
+  }
 
+  END_TEST;
+}
 
+int UtcDaliWindowFocusChangedSignalN(void)
+{
+  Dali::Window window;
+  try
+  {
+    DevelWindow::FocusChangedSignal( window );
+    DALI_TEST_CHECK( false ); // Should not reach here!
+  }
+  catch( ... )
+  {
+    DALI_TEST_CHECK( true );
+  }
 
+  END_TEST;
+}