-
- /////////////////////////////////////////////////////////////////////////////////////////////////
- // Window Callbacks
- /////////////////////////////////////////////////////////////////////////////////////////////////
-
- /**
- * Called when the window gains focus.
- */
- static Eina_Bool EcoreEventWindowFocusIn( void* data, int type, void* event )
- {
- Ecore_Wl_Event_Focus_In* focusInEvent( (Ecore_Wl_Event_Focus_In*)event );
- EventHandler* handler( (EventHandler*)data );
-
- DALI_LOG_INFO( gImfLogging, Debug::General, "EVENT >>EcoreEventWindowFocusIn \n" );
-
- // If the window gains focus and we hid the keyboard then show it again.
- if ( focusInEvent->win == (unsigned int)ecore_wl_window_id_get(handler->mImpl->mWindow) )
- {
- DALI_LOG_INFO( gImfLogging, Debug::General, "EVENT EcoreEventWindowFocusIn - >>WindowFocusGained \n" );
-
- if ( handler->mImfManager )
- {
- ImfManager& imfManager( ImfManager::GetImplementation( handler->mImfManager ) );
- if( imfManager.RestoreAfterFocusLost() )
- {
- imfManager.Activate();
- }
- }
- // No need to connect callbacks as KeyboardStatusChanged will be called.
- }
-
- 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( (Ecore_Wl_Event_Focus_Out*)event );
- EventHandler* handler( (EventHandler*)data );
-
- DALI_LOG_INFO( gImfLogging, Debug::General, "EVENT >>EcoreEventWindowFocusOut \n" );
-
- // If the window loses focus then hide the keyboard.
- if ( focusOutEvent->win == (unsigned int)ecore_wl_window_id_get(handler->mImpl->mWindow) )
- {
- if ( handler->mImfManager )
- {
- ImfManager& imfManager( ImfManager::GetImplementation( handler->mImfManager ) );
- if( imfManager.RestoreAfterFocusLost() )
- {
- imfManager.Deactivate();
- }
- }
-
- // Clipboard don't support that whether clipboard is shown or not. Hide clipboard.
- Dali::Clipboard clipboard = Clipboard::Get();
- clipboard.HideClipboard();
- }
-
- return ECORE_CALLBACK_PASS_ON;
- }
-
- /**
- * Called when the window is damaged.
- */
- static Eina_Bool EcoreEventWindowDamaged(void *data, int type, void *event)
- {
- return ECORE_CALLBACK_PASS_ON;
- }
-
- /**
- * Called when the window properties are changed.
- * We are only interested in the font change.
- */
-
-
- /////////////////////////////////////////////////////////////////////////////////////////////////
- // Drag & Drop Callbacks
- /////////////////////////////////////////////////////////////////////////////////////////////////
-
- /**
- * Called when a dragged item enters our window's bounds.
- * This is when items are dragged INTO our window.
- */
- static Eina_Bool EcoreEventDndEnter( void* data, int type, void* event )
- {
- DALI_LOG_INFO( gDragAndDropLogFilter, Debug::Concise, "EcoreEventDndEnter\n" );
-
- return ECORE_CALLBACK_PASS_ON;
- }
-
- /**
- * Called when a dragged item is moved within our window.
- * This is when items are dragged INTO our window.
- */
- static Eina_Bool EcoreEventDndPosition( void* data, int type, void* event )
- {
- DALI_LOG_INFO(gDragAndDropLogFilter, Debug::Concise, "EcoreEventDndPosition\n" );
-
- return ECORE_CALLBACK_PASS_ON;
- }
-
- /**
- * Called when a dragged item leaves our window's bounds.
- * This is when items are dragged INTO our window.
- */
- static Eina_Bool EcoreEventDndLeave( void* data, int type, void* event )
- {
- DALI_LOG_INFO(gDragAndDropLogFilter, Debug::Concise, "EcoreEventDndLeave\n" );
-
- return ECORE_CALLBACK_PASS_ON;
- }
-
- /**
- * Called when the dragged item is dropped within our window's bounds.
- * This is when items are dragged INTO our window.
- */
- static Eina_Bool EcoreEventDndDrop( void* data, int type, void* event )
- {
- DALI_LOG_INFO(gDragAndDropLogFilter, Debug::Concise, "EcoreEventDndDrop\n" );
-
- return ECORE_CALLBACK_PASS_ON;
- }
-
- /**
- * Called when a dragged item is moved from our window and the target window has done processing it.
- * This is when items are dragged FROM our window.
- */
- static Eina_Bool EcoreEventDndFinished( void* data, int type, void* event )
- {
- DALI_LOG_INFO(gDragAndDropLogFilter, Debug::Concise, "EcoreEventDndFinished\n" );
- return ECORE_CALLBACK_PASS_ON;
- }
-
- /**
- * Called when a dragged item is moved from our window and the target window has sent us a status.
- * This is when items are dragged FROM our window.
- */
- static Eina_Bool EcoreEventDndStatus( void* data, int type, void* event )
- {
- DALI_LOG_INFO(gDragAndDropLogFilter, Debug::Concise, "EcoreEventDndStatus\n" );
- return ECORE_CALLBACK_PASS_ON;
- }
-
- /**
- * Called when the client messages (i.e. the accessibility events) are received.
- */
- static Eina_Bool EcoreEventClientMessage( void* data, int type, void* event )
- {
- return ECORE_CALLBACK_PASS_ON;
- }
-
- /**
- * Called when the source window notifies us the content in clipboard is selected.
- */
- static Eina_Bool EcoreEventSelectionClear( void* data, int type, void* event )
- {
- DALI_LOG_INFO(gSelectionEventLogFilter, Debug::Concise, "EcoreEventSelectionClear\n" );
- return ECORE_CALLBACK_PASS_ON;
- }
-
- /**
- * Called when the source window sends us about the selected content.
- * For example, when dragged items are dragged INTO our window or when items are selected in the clipboard.
- */
- static Eina_Bool EcoreEventSelectionNotify( void* data, int type, void* event )
- {
- DALI_LOG_INFO(gSelectionEventLogFilter, Debug::Concise, "EcoreEventSelectionNotify\n" );
- return ECORE_CALLBACK_PASS_ON;
- }
-
- /////////////////////////////////////////////////////////////////////////////////////////////////
- // Font Callbacks
- /////////////////////////////////////////////////////////////////////////////////////////////////
- /**
- * Called when a font name is changed.
- */
- static void VconfNotifyFontNameChanged( keynode_t* node, void* data )
- {
- EventHandler* handler = static_cast<EventHandler*>( data );
-
- StyleChange fontChange;
- fontChange.defaultFontChange = true;
-
- handler->SendEvent( fontChange );
- }
-
- /**
- * Called when a font size is changed.
- */
- static void VconfNotifyFontSizeChanged( keynode_t* node, void* data )
- {
- EventHandler* handler = static_cast<EventHandler*>( data );
-
- StyleChange fontChange;
- fontChange.defaultFontSizeChange = true;
-
- handler->SendEvent( fontChange );
- }
-