X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali%2Finternal%2Fwindow-system%2Fcommon%2Fevent-handler.cpp;h=66ee64abaa4a9eddce9729b3710b169d0a71baf8;hb=b9d16a0727133e5019ddc515fce789e7466f19a2;hp=06fd15fda9283a462fe094388ae9548d2eefefe7;hpb=1b4c87bf792e3c66aa57310d9b6f9ec57be723c4;p=platform%2Fcore%2Fuifw%2Fdali-adaptor.git diff --git a/dali/internal/window-system/common/event-handler.cpp b/dali/internal/window-system/common/event-handler.cpp index 06fd15f..66ee64a 100644 --- a/dali/internal/window-system/common/event-handler.cpp +++ b/dali/internal/window-system/common/event-handler.cpp @@ -32,7 +32,7 @@ #include // INTERNAL INCLUDES -#include +#include #include #include @@ -52,7 +52,6 @@ Integration::Log::Filter* gSelectionEventLogFilter = Integration::Log::Filter::N EventHandler::EventHandler(WindowBase* windowBase, DamageObserver& damageObserver) : mStyleMonitor(StyleMonitor::Get()), mDamageObserver(damageObserver), - mClipboardEventNotifier(), mPaused(false) { // Connect signals @@ -126,11 +125,11 @@ void EventHandler::OnKeyEvent(Integration::KeyEvent& keyEvent) void EventHandler::OnFocusChanged(bool focusIn) { // If the window gains focus and we hid the keyboard then show it again. - if(TextClipboard::IsAvailable()) + if(Clipboard::IsAvailable()) { if(focusIn) { - Dali::TextClipboard clipboard = TextClipboard::Get(); + Dali::Clipboard clipboard = Clipboard::Get(); if(clipboard) { clipboard.HideClipboard(); @@ -139,10 +138,10 @@ void EventHandler::OnFocusChanged(bool focusIn) else { // Hiding clipboard event will be ignored once because window focus out event is always received on showing clipboard - Dali::TextClipboard clipboard = TextClipboard::Get(); + Dali::Clipboard clipboard = Clipboard::Get(); if(clipboard) { - TextClipboard& clipBoardImpl(GetImplementation(clipboard)); + Clipboard& clipBoardImpl(GetImplementation(clipboard)); clipBoardImpl.HideClipboard(true); } } @@ -164,54 +163,18 @@ void EventHandler::OnWindowDamaged(const DamageArea& area) void EventHandler::OnSelectionDataSend(void* event) { - Dali::TextClipboard clipboard = TextClipboard::Get(); - if(clipboard) - { - TextClipboard& clipBoardImpl(GetImplementation(clipboard)); - clipBoardImpl.ExcuteSend(event); - } + // Note that the clipboard-related operstions previously available have been moved to Clipboard class. + // It is advised not to handle any clipboard-specific works within this context. + // There are currently no immediate works required in this callback. + // But this function is retained for the purpose of handling the event at the window level, if needed. } void EventHandler::OnSelectionDataReceived(void* event) { - // We have got the selected content, inform the clipboard event listener (if we have one). - Dali::TextClipboard clipboard = TextClipboard::Get(); - char* selectionData = NULL; - size_t dataLength = 0u; - - if(clipboard) - { - int len = 0; - TextClipboard& clipBoardImpl(GetImplementation(clipboard)); - clipBoardImpl.ExcuteReceive(event, selectionData, len); - dataLength = static_cast(len); - } - - if(!mClipboardEventNotifier) - { - mClipboardEventNotifier = TextClipboardEventNotifier::Get(); - } - - if(selectionData && mClipboardEventNotifier && dataLength > 0) - { - TextClipboardEventNotifier& clipboardEventNotifier(TextClipboardEventNotifier::GetImplementation(mClipboardEventNotifier)); - std::string content; - size_t stringLength = strlen(selectionData); - - if(stringLength < dataLength) - { - content.append(selectionData, stringLength); - } - else - { - content.append(selectionData, dataLength); - } - - clipboardEventNotifier.SetContent(content); - clipboardEventNotifier.EmitContentSelectedSignal(); - - DALI_LOG_INFO(gSelectionEventLogFilter, Debug::General, "EcoreEventSelectionNotify: Content(%s) strlen(%d) dataLength(%d)\n", selectionData, strlen(selectionData), dataLength); - } + // Note that the clipboard-related operstions previously available have been moved to Clipboard class. + // It is advised not to handle any clipboard-specific works within this context. + // There are currently no immediate works required in this callback. + // But this function is retained for the purpose of handling the event at the window level, if needed. } void EventHandler::OnStyleChanged(StyleChange::Type styleChange)