Merge "Set proper locale to harfbuzz" into devel/master
[platform/core/uifw/dali-adaptor.git] / dali / devel-api / adaptor-framework / clipboard.h
1 #ifndef  __DALI_CLIPBOARD_H__
2 #define  __DALI_CLIPBOARD_H__
3
4 /*
5  * Copyright (c) 2016 Samsung Electronics Co., Ltd.
6  *
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
10  *
11  * http://www.apache.org/licenses/LICENSE-2.0
12  *
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.
18  *
19  */
20
21
22 // EXTERNAL INCLUDES
23 #include <dali/public-api/math/rect.h>
24 #include <dali/public-api/object/base-handle.h>
25
26
27 namespace Dali
28 {
29
30 namespace Internal DALI_INTERNAL
31 {
32
33 namespace Adaptor
34 {
35 class Clipboard;
36 }
37 }
38
39 /**
40  * @brief Interface to the device's clipboard.
41  *
42  * Clipboard can manage it's item and set show / hide status.
43  */
44
45 class DALI_IMPORT_API Clipboard : public BaseHandle
46 {
47 public:
48   /**
49    * @brief Create an uninitialized Clipboard.
50    *
51    * this can be initialized with one of the derived Clipboard' New() methods
52    */
53   Clipboard();
54
55   /**
56    * @brief Destructor
57    *
58    * This is non-virtual since derived Handle types must not contain data or virtual methods.
59    */
60   ~Clipboard();
61
62   /**
63    * @brief This constructor is used by Adaptor::GetClipboard().
64    *
65    * @param[in] clipboard A pointer to the clipboard.
66    */
67   explicit DALI_INTERNAL Clipboard( Internal::Adaptor::Clipboard* clipboard );
68
69   /**
70    * @brief Retrieve a handle to the ClipboardEventNotifier instance.
71    *
72    * @return A handle to the Clipboard
73    */
74   static Clipboard Get();
75
76   /**
77    * @brief Send the given string to the clipboard.
78    *
79    * @param[in] itemData string to send to clip board
80    * @return bool true if the internal clip board sending was successful.
81    */
82   bool SetItem( const std::string& itemData );
83
84   /**
85    * @brief Request clipboard service to retrieve an item
86    *
87    * Calling this method will trigger a signal from the clipboard event notifier.
88    * @see Dali::ClipboardEventNotifier::ContentSelectedSignal()
89    */
90   void RequestItem();
91
92   /**
93    * @brief Returns the number of item currently in the clipboard.
94    *
95    * @return unsigned int number of clipboard items
96    */
97   unsigned int NumberOfItems();
98
99   /**
100    * @brief Show the clipboard window.
101    */
102   void ShowClipboard();
103
104   /**
105    * @brief Hide the clipboard window.
106    */
107   void HideClipboard();
108
109   /**
110   * @brief Retrieves the clipboard's visibility
111   * @return bool true if the clipboard is visible.
112   */
113   bool IsVisible() const;
114
115 };
116 } // namespace Dali
117
118 #endif // __DALI_CLIPBOARD_H__