1 #ifndef DALI_CLIPBOARD_H
2 #define DALI_CLIPBOARD_H
5 * Copyright (c) 2020 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/math/rect.h>
23 #include <dali/public-api/object/base-handle.h>
26 #include <dali/public-api/dali-adaptor-common.h>
30 namespace Internal DALI_INTERNAL
36 } // namespace DALI_INTERNAL
39 * @brief Interface to the device's clipboard.
41 * Clipboard can manage it's item and set show / hide status.
44 class DALI_ADAPTOR_API Clipboard : public BaseHandle
48 * @brief Create an uninitialized Clipboard.
50 * this can be initialized with one of the derived Clipboard' New() methods
57 * This is non-virtual since derived Handle types must not contain data or virtual methods.
62 * @brief This constructor is used by Adaptor::GetClipboard().
64 * @param[in] clipboard A pointer to the clipboard.
66 explicit DALI_INTERNAL Clipboard(Internal::Adaptor::Clipboard* clipboard);
69 * @brief Retrieve a handle to the ClipboardEventNotifier instance.
71 * @return A handle to the Clipboard
73 static Clipboard Get();
76 * @brief Send the given string to the clipboard.
78 * @param[in] itemData string to send to clip board
79 * @return bool true if the internal clip board sending was successful.
81 bool SetItem(const std::string& itemData);
84 * @brief Request clipboard service to retrieve an item
86 * Calling this method will trigger a signal from the clipboard event notifier.
87 * @see Dali::ClipboardEventNotifier::ContentSelectedSignal()
92 * @brief Returns the number of item currently in the clipboard.
94 * @return unsigned int number of clipboard items
96 unsigned int NumberOfItems();
99 * @brief Show the clipboard window.
101 void ShowClipboard();
104 * @brief Hide the clipboard window.
106 void HideClipboard();
109 * @brief Retrieves the clipboard's visibility
110 * @return bool true if the clipboard is visible.
112 bool IsVisible() const;
116 #endif // DALI_CLIPBOARD_H