1 #ifndef DALI_INTERNAL_CLIPBOARD_H
2 #define DALI_INTERNAL_CLIPBOARD_H
5 * Copyright (c) 2023 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/public-api/object/base-object.h>
25 #include <dali/devel-api/adaptor-framework/clipboard.h>
34 * Implementation of the Clip Board
37 class Clipboard : public Dali::BaseObject
40 // Hide the specific windowing system
44 * @copydoc Dali::Clipboard::Get()
46 static Dali::Clipboard Get();
49 * @copydoc Dali::Clipboard::IsAvailable()
51 static bool IsAvailable();
55 * @param[in] impl Some data from a specific windowing system.
57 Clipboard(Impl* impl);
62 ~Clipboard() override;
65 * @copydoc Dali::Clipboard::SetItem()
67 bool SetItem(const std::string& itemData);
70 * @copydoc Dali::Clipboard::RequestItem()
75 * @copydoc Dali::Clipboard::NumberOfClipboardItems()
77 unsigned int NumberOfItems();
80 * @copydoc Dali::Clipboard::ShowClipboard()
85 * @copydoc Dali::Clipboard::HideClipboard()
87 void HideClipboard(bool skipFirstHide);
90 * @copydoc Dali::Clipboard::IsVisible()
92 bool IsVisible() const;
95 * @brief exchange either sending or receiving buffered data
97 * @param[in] type true for send buffered data, false for receive data to buffer
98 * @param[in] event information pointer
99 * @return The buffer pointer for send or receive data
101 char* ExcuteBuffered(bool type, void* event);
105 Clipboard(const Clipboard&);
106 Clipboard& operator=(Clipboard&);
112 }; // class clipboard
114 } // namespace Adaptor
116 } // namespace Internal
118 inline static Internal::Adaptor::Clipboard& GetImplementation(Dali::Clipboard& clipboard)
120 DALI_ASSERT_ALWAYS(clipboard && "Clipboard handle is empty");
121 BaseObject& handle = clipboard.GetBaseObject();
122 return static_cast<Internal::Adaptor::Clipboard&>(handle);
125 inline static const Internal::Adaptor::Clipboard& GetImplementation(const Dali::Clipboard& clipboard)
127 DALI_ASSERT_ALWAYS(clipboard && "Clipboard handle is empty");
128 const BaseObject& handle = clipboard.GetBaseObject();
129 return static_cast<const Internal::Adaptor::Clipboard&>(handle);
134 #endif // DALI_INTERNAL_CLIPBOARD_H