Refactored image loaders, added public API
[platform/core/uifw/dali-adaptor.git] / adaptors / public-api / 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 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 /**
23  * @addtogroup CAPI_DALI_ADAPTOR_MODULE
24  * @{
25  */
26
27 // EXTERNAL INCLUDES
28 #include <dali/public-api/math/rect.h>
29 #include <dali/public-api/object/base-handle.h>
30
31
32 namespace Dali DALI_IMPORT_API
33 {
34
35 namespace Internal DALI_INTERNAL
36 {
37
38 namespace Adaptor
39 {
40 class Clipboard;
41 }
42 }
43
44 /**
45  * @brief Interface to the device's clipboard.
46  *
47  * Clipboard can manage it's item and set show / hide status.
48  */
49
50 class Clipboard : public BaseHandle
51 {
52 public:
53   /**
54    * @brief Create an uninitialized Clipboard.
55    *
56    * this can be initialized with one of the derived Clipboard' New() methods
57    */
58   Clipboard();
59
60   /**
61    * @brief Destructor
62    *
63    * This is non-virtual since derived Handle types must not contain data or virtual methods.
64    */
65   ~Clipboard();
66
67   /**
68    * @brief This constructor is used by Adaptor::GetClipboard().
69    *
70    * @param[in] clipboard A pointer to the clipboard.
71    */
72   Clipboard( Internal::Adaptor::Clipboard* clipboard );
73
74   /**
75    * @brief Retrieve a handle to the ClipboardEventNotifier instance.
76    *
77    * @return A handle to the Clipboard
78    */
79   static Clipboard Get();
80
81   /**
82    * @brief Send the given string to the clipboard.
83    *
84    * @param[in] itemData string to send to clip board
85    * @return bool true if the internal clip board sending was successful.
86    */
87   bool SetItem( const std::string& itemData );
88
89   /**
90    * @brief Retreive the string at the given index in the clipboard.
91    *
92    * @param[in] index item in clipboard list to retrieve
93    * @return string the text item at the current index.
94    */
95   std::string GetItem( unsigned int index );
96
97   /**
98    * @brief Returns the number of item currently in the clipboard.
99    *
100    * @return unsigned int number of clipboard items
101    */
102   unsigned int NumberOfItems();
103
104   /**
105    * @brief Show the clipboard window.
106    */
107   void ShowClipboard();
108
109   /**
110    * @brief Hide the clipboard window.
111    */
112   void HideClipboard();
113
114 };
115 } // namespace Dali
116
117 /**
118  * @}
119  */
120 #endif // __DALI_CLIPBOARD_H__