806af79c3fac51f03fe7a13f24b736792747bd5f
[platform/core/uifw/dali-adaptor.git] / dali / internal / clipboard / windows / clipboard-impl-win.cpp
1 /*
2  * Copyright (c) 2018 Samsung Electronics Co., Ltd.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  *
16  */
17
18 // CLASS HEADER
19 #include <dali/internal/clipboard/common/clipboard-impl.h>
20
21 // EXTERNAL INCLUDES
22 #include <dali/public-api/object/type-registry.h>
23 #include <dali/integration-api/debug.h>
24
25 // INTERNAL INCLUDES
26 #include <dali/internal/system/common/singleton-service-impl.h>
27
28
29 ///////////////////////////////////////////////////////////////////////////////////////////////////
30 // Clipboard
31 ///////////////////////////////////////////////////////////////////////////////////////////////////
32
33 namespace Dali
34 {
35
36 namespace Internal
37 {
38
39 namespace Adaptor
40 {
41
42 struct Clipboard::Impl
43 {
44   Impl()
45   {
46   }
47
48   // Put implementation here.
49 };
50
51 Clipboard::Clipboard(Impl* impl)
52 : mImpl(impl)
53 {
54 }
55
56 Clipboard::~Clipboard()
57 {
58 }
59
60 Dali::Clipboard Clipboard::Get()
61 {
62   Dali::Clipboard clipboard;
63
64   Dali::SingletonService service( SingletonService::Get() );
65   if ( service )
66   {
67     // Check whether the singleton is already created
68     Dali::BaseHandle handle = service.GetSingleton( typeid( Dali::Clipboard ) );
69     if(handle)
70     {
71       // If so, downcast the handle
72       clipboard = Dali::Clipboard( dynamic_cast< Clipboard* >( handle.GetObjectPtr() ) );
73     }
74     else
75     {
76       Clipboard::Impl* impl( new Clipboard::Impl() );
77       clipboard = Dali::Clipboard( new Clipboard(impl) );
78       service.Register( typeid(Dali::Clipboard), clipboard );
79     }
80   }
81
82   return clipboard;
83 }
84 bool Clipboard::SetItem(const std::string &itemData )
85 {
86   return true;
87 }
88
89 /*
90  * Request clipboard service to retrieve an item
91  */
92 void Clipboard::RequestItem()
93 {
94 }
95
96 /*
97  * Get number of items in clipboard
98  */
99 unsigned int Clipboard::NumberOfItems()
100 {
101   return -1;
102 }
103
104 /**
105  * Show clipboard window
106  * Function to send message to show the Clipboard (cbhm) as no direct API available
107  * Reference elementary/src/modules/ctxpopup_copypasteUI/cbhm_helper.c
108  */
109 void Clipboard::ShowClipboard()
110 {
111 }
112
113 void Clipboard::HideClipboard(bool skipFirstHide)
114 {
115 }
116
117 bool Clipboard::IsVisible() const
118 {
119   return false;
120 }
121
122 char* Clipboard::ExcuteBuffered( bool type, void *event )
123 {
124   return NULL;
125 }
126
127 } // namespace Adaptor
128
129 } // namespace Internal
130
131 } // namespace Dali