Changed 'virtual' function override declarations to 'override' in automated-tests.
[platform/core/uifw/dali-adaptor.git] / dali / internal / clipboard / common / clipboard-impl.h
1 #ifndef DALI_INTERNAL_CLIPBOARD_H
2 #define DALI_INTERNAL_CLIPBOARD_H
3
4 /*
5  * Copyright (c) 2019 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 // EXTERNAL INCLUDES
22 #include <dali/public-api/object/base-object.h>
23
24 // INTERNAL INCLUDES
25 #include <dali/devel-api/adaptor-framework/clipboard.h>
26
27 namespace Dali
28 {
29
30 namespace Internal
31 {
32
33 namespace Adaptor
34 {
35
36 /**
37  * Implementation of the Clip Board
38  */
39
40 class Clipboard :  public Dali::BaseObject
41 {
42 public:
43
44   // Hide the specific windowing system
45   struct Impl;
46
47   /**
48    * @copydoc Dali::ClipboardEventNotifier::Get()
49    */
50   static Dali::Clipboard Get();
51
52   /**
53    * Constructor
54    * @param[in] impl Some data from a specific windowing system.
55    */
56   Clipboard(Impl* impl);
57
58   /**
59    * Destructor
60    */
61   virtual ~Clipboard();
62
63   /**
64    * @copydoc Dali::Clipboard::SetItem()
65    */
66   bool SetItem(const std::string &itemData);
67
68   /**
69    * @copydoc Dali::Clipboard::RequestItem()
70    */
71   void RequestItem();
72
73   /**
74    * @copydoc Dali::Clipboard::NumberOfClipboardItems()
75    */
76   unsigned int NumberOfItems();
77
78   /**
79    * @copydoc Dali::Clipboard::ShowClipboard()
80    */
81   void ShowClipboard();
82
83   /**
84    * @copydoc Dali::Clipboard::HideClipboard()
85    */
86   void HideClipboard(bool skipFirstHide);
87
88   /**
89   * @copydoc Dali::Clipboard::IsVisible()
90   */
91   bool IsVisible() const;
92
93   /**
94   * @brief exchange either sending or receiving buffered data
95   *
96   * @param[in] type true for send buffered data, false for receive data to buffer
97   * @param[in] event information pointer
98   * @return The buffer pointer for send or receive data
99   */
100   char* ExcuteBuffered( bool type, void *event );
101
102 private:
103
104   // Undefined
105   Clipboard( const Clipboard& );
106   Clipboard& operator=( Clipboard& );
107
108 private:
109
110   Impl* mImpl;
111
112 public:
113
114 }; // class clipboard
115
116 } // namespace Adaptor
117
118 } // namespace Internal
119
120 inline static Internal::Adaptor::Clipboard& GetImplementation(Dali::Clipboard& clipboard)
121 {
122   DALI_ASSERT_ALWAYS( clipboard && "Clipboard handle is empty" );
123   BaseObject& handle = clipboard.GetBaseObject();
124   return static_cast<Internal::Adaptor::Clipboard&>(handle);
125 }
126
127 inline static const  Internal::Adaptor::Clipboard& GetImplementation(const Dali::Clipboard& clipboard)
128 {
129   DALI_ASSERT_ALWAYS( clipboard && "Clipboard handle is empty" );
130   const BaseObject& handle = clipboard.GetBaseObject();
131   return static_cast<const Internal::Adaptor::Clipboard&>(handle);
132 }
133
134 } // namespace Dali
135
136 #endif // DALI_INTERNAL_CLIPBOARD_H