1 #ifndef DALI_INTERNAL_DRAG_AND_DROP_ECORE_WL2_H
2 #define DALI_INTERNAL_DRAG_AND_DROP_ECORE_WL2_H
5 * Copyright (c) 2022 Samsung Electronics Co., Ltd.
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
22 #include <dali/internal/drag-and-drop/common/drag-and-drop-impl.h>
23 #include <dali/internal/system/linux/dali-ecore.h>
36 Dali::DragAndDrop::DragAndDropFunction callback;
41 * DragAndDrop Implementation
43 class DragAndDropEcoreWl : public Dali::Internal::Adaptor::DragAndDrop
54 ~DragAndDropEcoreWl() override;
57 * @copydoc Dali::DragAndDrop::StartDragAndDrop()
59 bool StartDragAndDrop(Dali::Actor source, Dali::Window shadowWindow, const Dali::DragAndDrop::DragData& data, Dali::DragAndDrop::SourceFunction callback) override;
62 * @copydoc Dali::DragAndDrop::AddListener()
64 bool AddListener(Dali::Actor target, Dali::DragAndDrop::DragAndDropFunction callback) override;
67 * @copydoc Dali::DragAndDrop::RemoveListener()
69 bool RemoveListener(Dali::Actor target) override;
72 * @copydoc Dali::DragAndDrop::SendData()
74 void SendData(void* event) override;
77 * @copydoc Dali::DragAndDrop::ReceiveData()
79 void ReceiveData(void* event) override;
82 * @copydoc Dali::DragAndDrop::CalculateDragEvent()
84 bool CalculateDragEvent(void* event) override;
87 * @copydoc Dali::DragAndDrop::CalculateViewRegion()
89 bool CalculateViewRegion(void* event) override;
92 * @brief Call drag source events.
94 void CallSourceEvent(Dali::DragAndDrop::SourceEventType type);
97 DragAndDropEcoreWl(const DragAndDropEcoreWl&) = delete;
98 DragAndDropEcoreWl& operator=(DragAndDropEcoreWl&) = delete;
99 DragAndDropEcoreWl(DragAndDropEcoreWl&&) = delete;
100 DragAndDropEcoreWl& operator=(DragAndDropEcoreWl&&) = delete;
103 Dali::Window mDragWindow;
104 uint32_t mSerial{0u};
105 Ecore_Event_Handler* mSendHandler{nullptr};
106 Ecore_Event_Handler* mSourceEndHandler{nullptr};
107 Ecore_Event_Handler* mSourceDropHandler{nullptr};
108 Ecore_Event_Handler* mReceiveHandler{nullptr};
109 Ecore_Event_Handler* mMotionHandler{nullptr};
110 Ecore_Event_Handler* mDropHandler{nullptr};
111 Ecore_Event_Handler* mEnterHandler{nullptr};
113 std::string mMimeType;
116 Dali::Vector2 mPosition;
117 Dali::DragAndDrop::SourceFunction mSourceCallback{nullptr};
118 std::vector<DropTarget> mDropTargets;
119 }; // class DragAndDropEcoreWl
121 } // namespace Adaptor
123 } // namespace Internal
127 #endif // DALI_INTERNAL_DRAG_AND_DROP_ECORE_WL2_H