From 20143b9042dd8d5e9089667d0ec50a2dfea26a38 Mon Sep 17 00:00:00 2001 From: richard Date: Mon, 1 Sep 1997 20:13:10 +0000 Subject: [PATCH] This is a private header file intended for use by the NSPasteboard class to specify how it communicates with the pasteboard server program. The protocol for talking to the pasteboard server (gpbs) is given as is the name of the pasteboard server (for lookup by the Distributed Objects system). git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@2400 72102866-910b-0410-8b05-ffd578937521 --- Headers/gnustep/gui/PasteboardServer.h | 89 ++++++++++++++++++++++++++ 1 file changed, 89 insertions(+) create mode 100644 Headers/gnustep/gui/PasteboardServer.h diff --git a/Headers/gnustep/gui/PasteboardServer.h b/Headers/gnustep/gui/PasteboardServer.h new file mode 100644 index 000000000..63a90a53a --- /dev/null +++ b/Headers/gnustep/gui/PasteboardServer.h @@ -0,0 +1,89 @@ +/* + PasteboardServer.h + + Copyright (C) 1997 Free Software Foundation, Inc. + + Author: Richard Frith-Macdonald + Date: August 1997 + + This file is part of the GNUstep GUI Library. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with this library; see the file COPYING.LIB. + If not, write to the Free Software Foundation, + 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +*/ + +#ifndef _GNUstep_H_PasteboardServer +#define _GNUstep_H_PasteboardServer + +#include +#include +#include +#include + +@class NSString; +@class NSArray; +@class NSData; + +/* + * The name of the pasteboard server. + */ +#define PBSNAME @"GNUstepPasteboardServer" + +/* + * This protocol for use in asking PasteboardObjects on the server to + * perform tasks for the local NSPasteboard objects. + */ +@protocol PasteboardObject +- (int) addTypes: (bycopy NSArray*)types + owner: (id)owner + pasteboard: (NSPasteboard*)pb + oldCount: (int)count; +- (NSString*) availableTypeFromArray: (bycopy NSArray*)types + changeCount: (int*)count; +- (int) changeCount; +- (NSData*) dataForType: (NSString*)type + oldCount: (int)count + mustBeCurrent: (BOOL)flag; +- (int) declareTypes: (bycopy NSArray*)types + owner: (id)owner + pasteboard: (NSPasteboard*)pb; +- (NSString*) name; +- (void) releaseGlobally; +- (BOOL) setData: (NSData*)data + forType: (NSString*)type + isFile: (BOOL)flag + oldCount: (int)count; +- (void) setHistory: (unsigned)length; +- (bycopy NSArray*) typesAndChangeCount: (int*)count; +@end + +/* + * This protocol for use in obtaining PasteboardObjects from the server + * and controlling general server behaviour. + */ +@protocol PasteboardServer +// Use this next to implement [+pasteboardByFilteringData:ofType:] and +// [+pasteboardByFilteringFile:] methods. +- (id) pasteboardByFilteringData: (NSData*)data + ofType: (NSString*)type + isFile: (BOOL)flag; +- (id) pasteboardByFilteringTypesInPasteboard: pb; +- (id) pasteboardWithName: (NSString*)name; +- (id) pasteboardWithUniqueName; +- (bycopy NSArray*) typesFilterableTo: (NSString*)type; +@end + + +#endif // _GNUstep_H_PasteboardServer