[SRUK] Initial copy from Tizen 2.2 version
[platform/core/uifw/dali-adaptor.git] / capi / dali / public-api / adaptor-framework / common / clipboard.h
1 #ifndef  __DALI_CLIPBOARD_H__
2 #define  __DALI_CLIPBOARD_H__
3
4 //
5 // Copyright (c) 2014 Samsung Electronics Co., Ltd.
6 //
7 // Licensed under the Flora License, Version 1.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://floralicense.org/license/
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  * @addtogroup CAPI_DALI_FRAMEWORK
23  * @{
24  */
25
26 // EXTERNAL INCLUDES
27 #include <dali/public-api/math/rect.h>
28 #include <dali/public-api/object/base-handle.h>
29
30
31 namespace Dali DALI_IMPORT_API
32 {
33
34 namespace Internal DALI_INTERNAL
35 {
36
37 namespace Adaptor
38 {
39 class Clipboard;
40 }
41 }
42
43 /**
44  * The Clipboard can operate using various funtion.
45  * Clipboard can manage it's item and set show / hide status.
46  */
47
48 class Clipboard : public BaseHandle
49 {
50 public:
51   /**
52    * Create an uninitialized Clipboard;
53    *  this can be initialized with one of the derived Clipboard' New() methods
54    */
55   Clipboard();
56
57   /**
58    * Virtual destructor.
59    */
60   virtual ~Clipboard();
61
62   /**
63    * This constructor is used by Adaptor::GetClipboard().
64    * @param[in] clipboard A pointer to the clipboard.
65    */
66   Clipboard( Internal::Adaptor::Clipboard* clipboard );
67
68   /**
69    * Retrieve a handle to the ClipboardEventNotifier instance
70    * @return A handle to the Clipboard
71    */
72   static Clipboard Get();
73
74   /**
75    * Send the given string to the clipboard
76    * @param[in] itemData string to send to clip board
77    * @return bool true if the internal clip board sending was successful.
78    */
79   bool SetItem( const std::string& itemData );
80
81   /**
82    * Retreive the string at the given index in the clip board.
83    * @param[in] index item in clipboard list to retrieve
84    * @return string the text item at the current index.
85    */
86   std::string GetItem( unsigned int index );
87
88   /**
89    * Returns the number of item currently in the clipboard
90    * @return unsigned int number of clipboard items
91    */
92   unsigned int NumberOfItems();
93
94   /**
95    * Show the clipboard window
96    */
97   void ShowClipboard();
98
99   /**
100    * Hide the clipboard window
101    */
102   void HideClipboard();
103
104 };
105 } // namespace Dali
106
107 /**
108  * @}
109  */
110 #endif // __DALI_CLIPBOARD_H__