[dali_1.0.1] Merge branch 'tizen'
[platform/core/uifw/dali-adaptor.git] / adaptors / wayland / 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 <clipboard.h>
23 #include <dali/public-api/object/base-object.h>
24 #include <Ecore.h>
25 #include <Ecore_Wayland.h>
26
27
28
29 namespace Dali
30 {
31
32 namespace Internal
33 {
34
35 namespace Adaptor
36 {
37
38 /**
39  * Implementation of the Clip Board
40  */
41
42 class Clipboard :  public Dali::BaseObject
43 {
44 public:
45
46   /**
47    * @copydoc Dali::ClipboardEventNotifier::Get()
48    */
49   static Dali::Clipboard Get();
50
51   virtual ~Clipboard();
52
53   /**
54    * @copydoc Dali::Clipboard::SetItem()
55    */
56   bool SetItem(const std::string &itemData);
57
58   /**
59    * @copydoc Dali::Clipboard::GetItem()
60    */
61   std::string GetItem( unsigned int index );
62
63   /**
64    * @copydoc Dali::Clipboard::NumberOfClipboardItems()
65    */
66   unsigned int NumberOfItems();
67
68   /**
69    * @copydoc Dali::Clipboard::ShowClipboard()
70    */
71   void ShowClipboard();
72
73   /**
74    * @copydoc Dali::Clipboard::HideClipboard()
75    */
76   void HideClipboard();
77
78   
79 private:
80   Clipboard( const Clipboard& );
81   Clipboard& operator=( Clipboard& );
82
83 }; // class clipboard
84
85
86 } // namespace Adaptor
87
88 } // namespace Internal
89
90   inline static Internal::Adaptor::Clipboard& GetImplementation(Dali::Clipboard& clipboard)
91   {
92     DALI_ASSERT_ALWAYS( clipboard && "Clipboard handle is empty" );
93     BaseObject& handle = clipboard.GetBaseObject();
94     return static_cast<Internal::Adaptor::Clipboard&>(handle);
95   }
96
97   inline static const  Internal::Adaptor::Clipboard& GetImplementation(const Dali::Clipboard& clipboard)
98   {
99     DALI_ASSERT_ALWAYS( clipboard && "Clipboard handle is empty" );
100     const BaseObject& handle = clipboard.GetBaseObject();
101     return static_cast<const Internal::Adaptor::Clipboard&>(handle);
102   }
103
104 } // namespace Dali
105
106 #endif // __DALI_INTERNAL_CLIPBOARD_H__