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.
18 * @file FUi_Clipboard.h
19 * @brief This is the header file for the _Clipboard class.
21 * This header file contains the declarations of the %_Clipboard class.
23 #ifndef _FUI_INTERNAL_CLIPBOARD_H_
24 #define _FUI_INTERNAL_CLIPBOARD_H_
26 #include <FBaseObject.h>
27 #include <FUiClipboardTypes.h>
28 #include "FUi_Types.h"
29 #include "FUi_EcoreEvas.h"
31 namespace Tizen { namespace Base { namespace Collection {
33 }}} // Tizen::Base::Collection
35 namespace Tizen { namespace Ui { namespace Controls {
36 class _PublicClipboardPopupEvent;
37 }}} // Tizen::Ui::Controls
39 namespace Tizen { namespace Graphics {
43 namespace Tizen { namespace Ui
46 class IClipboardPopupEventListener;
49 : public Tizen::Base::Object
52 static _Clipboard* GetInstance(void);
53 static void ReleaseInstance(void);
55 result CopyItem(const _ClipboardItem& item);
57 Tizen::Base::Collection::IList* RetrieveItemsN(unsigned long dataTypes);
58 const _ClipboardItem* RetrieveLatestItemN(unsigned long dataTypes);
60 result ShowPopup(unsigned long dataTypes, const IClipboardPopupEventListener &listener);
61 result HidePopup(void);
62 bool IsPopupVisible(void);
64 void FireEvent(int format, char* pData);
67 _ClipFormat ConvertToClipFormat(ClipboardDataType type);
68 ClipboardDataType ConvertToDataType(int format, const char* pData);
70 char* EncodeToCharN(const Tizen::Base::String& string);
72 char* CreateImageFileN(const Tizen::Graphics::Bitmap& bitmap);
73 Tizen::Graphics::Bitmap* LoadBitmapN(const Tizen::Base::String& path);
75 Tizen::Base::String CreateImageFilePath(void);
76 result RemoveUnnecessaryImageFiles(void);
77 result RemoveAllImageFiles(void);
79 bool IsValidDataType(unsigned long dataTypes);
80 bool IsVideoDataType(const char* pChar);
81 bool IsAudioDataType(const char* pChar);
84 virtual ~_Clipboard(void);
86 _Clipboard(const _Clipboard& rhs);
87 _Clipboard& operator =(const _Clipboard& rhs);
90 Tizen::Ui::Controls::_PublicClipboardPopupEvent* __pPublicEvent;
92 static _Clipboard* __pInstance;
97 #endif // _FUI_INTERNAL_CLIPBOARD_H_