1 // Copyright 2014 PDFium Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com 6 7 #ifndef _FWL_ADAPTER_CLIPBOARDMGR_H 8 #define _FWL_ADAPTER_CLIPBOARDMGR_H 9 10 enum FWL_CLIPBOARDFORMAT { 11 FWL_CLIPBOARDFORMAT_Dib, 12 FWL_CLIPBOARDFORMAT_Text, 13 FWL_CLIPBOARDFORMAT_UncodeText, 14 }; 15 typedef struct _FWL_HCLIPBOARDDATA { void* pData; } * FWL_HCLIPBOARDDATA; 16 17 class IFWL_AdapterClipboardMgr { 18 public: 19 virtual ~IFWL_AdapterClipboardMgr() {} 20 virtual FWL_ERR Empty() = 0; 21 virtual FX_BOOL IsDataAvailable(FX_DWORD dwFormat) = 0; 22 virtual FWL_HCLIPBOARDDATA GetData(FX_DWORD dwFormat) = 0; 23 virtual FWL_ERR SetData(FX_DWORD dwFormat, uint8_t* pBuf, int32_t iSize) = 0; 24 virtual int32_t GetDataSize(FWL_HCLIPBOARDDATA hData) = 0; 25 virtual void* LockDataBuffer(FWL_HCLIPBOARDDATA hData) = 0; 26 virtual FX_BOOL UnLockDataBuffer(FWL_HCLIPBOARDDATA hData) = 0; 27 virtual FWL_ERR SetStringData(const CFX_WideStringC& ws) = 0; 28 virtual FWL_ERR SetStringData(const CFX_ByteStringC& bs) = 0; 29 virtual FWL_ERR GetStringData(CFX_WideString& ws) = 0; 30 virtual FWL_ERR GetStringData(CFX_ByteString& bs) = 0; 31 virtual FWL_ERR EnumFormats(CFX_DWordArray& formats) = 0; 32 virtual FX_DWORD RegisterFormat(const CFX_WideStringC& wsFormat) = 0; 33 }; 34 #endif 35