• Main Page
  • Related Pages
  • Namespaces
  • Classes
  • Files
  • File List
  • File Members

xap_CocoaClipboard.h

Go to the documentation of this file.
00001 /* AbiSource Application Framework
00002  * Copyright (C) 1998 AbiSource, Inc.
00003  * Copyright (C) 2005 Net Integration Technologies Inc. (written by Hubert Figuiere)
00004  * Copyright (C) 2001, 2003, 2009 Hubert Figuiere
00005  *
00006  * This program is free software; you can redistribute it and/or
00007  * modify it under the terms of the GNU General Public License
00008  * as published by the Free Software Foundation; either version 2
00009  * of the License, or (at your option) any later version.
00010  *
00011  * This program is distributed in the hope that it will be useful,
00012  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014  * GNU General Public License for more details.
00015  *
00016  * You should have received a copy of the GNU General Public License
00017  * along with this program; if not, write to the Free Software
00018  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
00019  * 02110-1301 USA.
00020  */
00021 
00022 #ifndef XAP_COCOACLIPBOARD_H
00023 #define XAP_COCOACLIPBOARD_H
00024 
00025 #import <AppKit/AppKit.h>
00026 
00027 #include "ut_types.h"
00028 #include "xap_CocoaApp.h"
00029 #include "xap_FakeClipboard.h"
00030 
00032 
00033 class XAP_CocoaClipboard
00034     : public XAP_FakeClipboard
00035 {
00036 public:
00037 
00038     XAP_CocoaClipboard();
00039     virtual ~XAP_CocoaClipboard();
00040 
00041     virtual bool            clearClipboard(void);
00042 
00043     virtual bool            addData(const char* format, void* pData, UT_sint32 iNumBytes);
00044     virtual bool            getClipboardData(const char** formatAccepted, void ** ppData, UT_uint32 * pLen, const char ** szFormatFound);
00045     virtual bool            hasFormat(const char* format);
00048     bool                    hasFormats(const char** format);
00049     void                    prepareForText();
00050     NSPasteboard        *_getPasteboard () { return [NSPasteboard generalPasteboard]; };
00051 static const char * XAP_CLIPBOARD_TEXTPLAIN_8BIT;
00052 static const char * XAP_CLIPBOARD_STRING;
00053 static const char * XAP_CLIPBOARD_COMPOUND_TEXT;
00054 static const char * XAP_CLIPBOARD_RTF;
00055 static const char * XAP_CLIPBOARD_IMAGE;
00056 
00057 private:
00058     static NSString *_abi2ns_cbType(const char *);
00059 };
00060 
00061 #endif /* XAP_COCOACLIPBOARD_H */

Generated on Sun Feb 14 2021 for AbiWord by  doxygen 1.7.1