Add support for new accessibility actions
[platform/core/uifw/dali-adaptor.git] / adaptors / x11 / clipboard-impl.h
1 #ifndef __DALI_INTERNAL_CLIPBOARD_H__
2 #define __DALI_INTERNAL_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 // EXTERNAL INCLUDES
22 #include <dali/public-api/object/base-object.h>
23 #include <Ecore_X.h>
24
25 // INTERNAL INCLUDES
26 #include <clipboard.h>
27
28 namespace Dali
29 {
30
31 namespace Internal
32 {
33
34 namespace Adaptor
35 {
36
37 /**
38  * Implementation of the Clip Board
39  */
40
41 class Clipboard :  public Dali::BaseObject
42 {
43 public:
44
45   /**
46    * @copydoc Dali::ClipboardEventNotifier::Get()
47    */
48   static Dali::Clipboard Get();
49
50   /**
51    * Constructor
52    * @param[in] ecoreXwin, The window is created by application.
53    */
54   Clipboard(Ecore_X_Window ecoreXwin);
55
56   virtual ~Clipboard();
57
58   /**
59    * @copydoc Dali::Clipboard::SetItem()
60    */
61   bool SetItem(const std::string &itemData);
62
63   /**
64    * @copydoc Dali::Clipboard::GetItem()
65    */
66   std::string GetItem( unsigned int index );
67
68   /**
69    * @copydoc Dali::Clipboard::NumberOfClipboardItems()
70    */
71   unsigned int NumberOfItems();
72
73   /**
74    * @copydoc Dali::Clipboard::ShowClipboard()
75    */
76   void ShowClipboard();
77
78   /**
79    * @copydoc Dali::Clipboard::HideClipboard()
80    */
81   void HideClipboard();
82
83   
84 private:
85   Ecore_X_Window mApplicationWindow;
86   Clipboard( const Clipboard& );
87   Clipboard& operator=( Clipboard& );
88
89 }; // class clipboard
90
91
92 } // namespace Adaptor
93
94 } // namespace Internal
95
96   inline static Internal::Adaptor::Clipboard& GetImplementation(Dali::Clipboard& clipboard)
97   {
98     DALI_ASSERT_ALWAYS( clipboard && "Clipboard handle is empty" );
99     BaseObject& handle = clipboard.GetBaseObject();
100     return static_cast<Internal::Adaptor::Clipboard&>(handle);
101   }
102
103   inline static const  Internal::Adaptor::Clipboard& GetImplementation(const Dali::Clipboard& clipboard)
104   {
105     DALI_ASSERT_ALWAYS( clipboard && "Clipboard handle is empty" );
106     const BaseObject& handle = clipboard.GetBaseObject();
107     return static_cast<const Internal::Adaptor::Clipboard&>(handle);
108   }
109
110 } // namespace Dali
111
112 #endif // __DALI_INTERNAL_CLIPBOARD_H__