2 // Open Service Platform
3 // Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
5 // Licensed under the Flora License, Version 1.0 (the License);
6 // you may not use this file except in compliance with the License.
7 // You may obtain a copy of the License at
9 // http://floralicense.org/license/
11 // Unless required by applicable law or agreed to in writing, software
12 // distributed under the License is distributed on an AS IS BASIS,
13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 // See the License for the specific language governing permissions and
15 // limitations under the License.
19 * @file FUi_Clipboard.h
20 * @brief This is the header file for the _Clipboard class.
22 * This header file contains the declarations of the %_Clipboard class.
25 #ifndef _FUI_INTERNAL_CLIPBOARD_H_
26 #define _FUI_INTERNAL_CLIPBOARD_H_
28 #include <unique_ptr.h>
29 #include <FBaseObject.h>
30 #include <FUiClipboardTypes.h>
31 #include "FUi_Types.h"
32 #include "FUi_EcoreEvas.h"
33 #include "FUi_ClipboardPopupEvent.h"
35 namespace Tizen { namespace Base { namespace Collection {
37 }}} // Tizen::Base::Collection
39 namespace Tizen { namespace Ui { namespace Controls {
40 class _PublicClipboardPopupEvent;
41 }}} // Tizen::Ui::Controls
43 namespace Tizen { namespace Graphics {
47 namespace Tizen { namespace Ui
50 class IClipboardPopupEventListener;
51 class _IClipboardPopupEventListener;
54 : public Tizen::Base::Object
57 static _Clipboard* GetInstance(void);
58 static void ReleaseInstance(void);
60 result CopyItem(const _ClipboardItem& item);
62 Tizen::Base::Collection::IList* RetrieveItemsN(unsigned long dataTypes);
63 const _ClipboardItem* RetrieveLatestItemN(unsigned long dataTypes);
65 result ShowPopup(unsigned long dataTypes, const IClipboardPopupEventListener &listener);
66 result HidePopup(void);
67 bool IsPopupVisible(void);
69 void FireEvent(int format, char* pData);
71 result AddClipboardPopupEventListener(_IClipboardPopupEventListener& listener);
72 result RemoveClipboardPopupEventListener(_IClipboardPopupEventListener& listener);
74 void FirePopupEvent(_ClipboardPopupState state, int width, int height);
77 _ClipFormat ConvertToClipFormat(ClipboardDataType type);
78 ClipboardDataType ConvertToDataType(int format, const char* pData);
80 char* EncodeToCharN(const Tizen::Base::String& string);
82 char* CreateImageFileN(const Tizen::Graphics::Bitmap& bitmap);
83 Tizen::Graphics::Bitmap* LoadBitmapN(const Tizen::Base::String& path);
85 Tizen::Base::String CreateImageFilePath(void);
86 result RemoveUnnecessaryImageFiles(void);
87 result RemoveAllImageFiles(void);
89 bool IsValidDataType(unsigned long dataTypes);
90 bool IsVideoDataType(const char* pChar);
91 bool IsAudioDataType(const char* pChar);
94 virtual ~_Clipboard(void);
96 _Clipboard(const _Clipboard& rhs);
97 _Clipboard& operator =(const _Clipboard& rhs);
100 Tizen::Ui::Controls::_PublicClipboardPopupEvent* __pPublicEvent;
101 std::unique_ptr<_ClipboardPopupEvent> __pEvent;
103 static _Clipboard* __pInstance;
108 #endif // _FUI_INTERNAL_CLIPBOARD_H_