EventHandler::EventHandler(WindowBase* windowBase, DamageObserver& damageObserver)
: mStyleMonitor(StyleMonitor::Get()),
mDamageObserver(damageObserver),
- mClipboardEventNotifier(),
mPaused(false)
{
// Connect signals
void EventHandler::OnSelectionDataSend(void* event)
{
- Dali::Clipboard clipboard = Clipboard::Get();
- if(clipboard)
- {
- Clipboard& 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::Clipboard clipboard = Clipboard::Get();
- char* selectionData = NULL;
- int bufferLength = 0;
- if(clipboard)
- {
- Clipboard& clipBoardImpl(GetImplementation(clipboard));
- clipBoardImpl.ExcuteReceive(event, selectionData, bufferLength);
- }
-
- if(!mClipboardEventNotifier)
- {
- mClipboardEventNotifier = ClipboardEventNotifier::Get();
- }
-
- if(selectionData && mClipboardEventNotifier && bufferLength > 0)
- {
- ClipboardEventNotifier& clipboardEventNotifier(ClipboardEventNotifier::GetImplementation(mClipboardEventNotifier));
- std::string content(selectionData, bufferLength - 1);
-
- clipboardEventNotifier.SetContent(content);
- clipboardEventNotifier.EmitContentSelectedSignal();
-
- DALI_LOG_INFO(gSelectionEventLogFilter, Debug::General, "EcoreEventSelectionNotify: Content(%s) strlen(%d) buffer(%d)\n", selectionData, strlen(selectionData), bufferLength);
- }
+ // 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)