mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-30 15:00:38 +00:00
Update for GSPasteboardServer.h
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@4162 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
a4371c1338
commit
542c487ccd
2 changed files with 15 additions and 13 deletions
|
@ -209,6 +209,7 @@ AppKit/nsimage-tiff.h \
|
||||||
AppKit/GSMethodTable.h \
|
AppKit/GSMethodTable.h \
|
||||||
AppKit/DPSOperators.h \
|
AppKit/DPSOperators.h \
|
||||||
AppKit/PSOperators.h \
|
AppKit/PSOperators.h \
|
||||||
|
AppKit/GSPasteboardServer.h \
|
||||||
AppKit/GSServicesManager.h
|
AppKit/GSServicesManager.h
|
||||||
|
|
||||||
-include GNUmakefile.preamble
|
-include GNUmakefile.preamble
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
Description... Implementation of class for communicating with the
|
Description... Implementation of class for communicating with the
|
||||||
pasteboard server.
|
pasteboard server.
|
||||||
|
|
||||||
Copyright (C) 1997 Free Software Foundation, Inc.
|
Copyright (C) 1997,1999 Free Software Foundation, Inc.
|
||||||
|
|
||||||
Author: Richard Frith-Macdonald <richard@brainstorm.co.uk>
|
Author: Richard Frith-Macdonald <richard@brainstorm.co.uk>
|
||||||
Date: 1997
|
Date: 1997
|
||||||
|
@ -31,7 +31,6 @@
|
||||||
#include <AppKit/NSPasteboard.h>
|
#include <AppKit/NSPasteboard.h>
|
||||||
#include <AppKit/NSApplication.h>
|
#include <AppKit/NSApplication.h>
|
||||||
#include <AppKit/NSWorkspace.h>
|
#include <AppKit/NSWorkspace.h>
|
||||||
#include "../Tools/PasteboardServer.h"
|
|
||||||
#include <Foundation/NSArray.h>
|
#include <Foundation/NSArray.h>
|
||||||
#include <Foundation/NSData.h>
|
#include <Foundation/NSData.h>
|
||||||
#include <Foundation/NSDictionary.h>
|
#include <Foundation/NSDictionary.h>
|
||||||
|
@ -49,12 +48,14 @@
|
||||||
#include <Foundation/NSTask.h>
|
#include <Foundation/NSTask.h>
|
||||||
#include <Foundation/NSTimer.h>
|
#include <Foundation/NSTimer.h>
|
||||||
|
|
||||||
|
#include <gnustep/gui/GSPasteboardServer.h>
|
||||||
|
|
||||||
#define stringify_it(X) #X
|
#define stringify_it(X) #X
|
||||||
#define prog_path(X) stringify_it(X) "/Tools/gpbs"
|
#define prog_path(X) stringify_it(X) "/Tools/gpbs"
|
||||||
|
|
||||||
@interface NSPasteboard (Private)
|
@interface NSPasteboard (Private)
|
||||||
+ (id<PasteboardServer>) _pbs;
|
+ (id<GSPasteboardSvr>) _pbs;
|
||||||
+ (NSPasteboard*) _pasteboardWithTarget: (id<PasteboardObject>)aTarget
|
+ (NSPasteboard*) _pasteboardWithTarget: (id<GSPasteboardObj>)aTarget
|
||||||
name: (NSString*)aName;
|
name: (NSString*)aName;
|
||||||
- (id) _target;
|
- (id) _target;
|
||||||
@end
|
@end
|
||||||
|
@ -63,7 +64,7 @@
|
||||||
|
|
||||||
static NSLock *dictionary_lock = nil;
|
static NSLock *dictionary_lock = nil;
|
||||||
static NSMutableDictionary *pasteboards = nil;
|
static NSMutableDictionary *pasteboards = nil;
|
||||||
static id<PasteboardServer> the_server = nil;
|
static id<GSPasteboardSvr> the_server = nil;
|
||||||
|
|
||||||
|
|
||||||
//
|
//
|
||||||
|
@ -92,7 +93,7 @@ static id<PasteboardServer> the_server = nil;
|
||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
|
|
||||||
+ (id<PasteboardServer>) _pbs
|
+ (id<GSPasteboardSvr>) _pbs
|
||||||
{
|
{
|
||||||
if (the_server == nil)
|
if (the_server == nil)
|
||||||
{
|
{
|
||||||
|
@ -103,7 +104,7 @@ static id<PasteboardServer> the_server = nil;
|
||||||
{
|
{
|
||||||
host = [[NSProcessInfo processInfo] hostName];
|
host = [[NSProcessInfo processInfo] hostName];
|
||||||
}
|
}
|
||||||
the_server = (id<PasteboardServer>)[NSConnection
|
the_server = (id<GSPasteboardSvr>)[NSConnection
|
||||||
rootProxyForConnectionWithRegisteredName: PBSNAME
|
rootProxyForConnectionWithRegisteredName: PBSNAME
|
||||||
host: host];
|
host: host];
|
||||||
if ([(id)the_server retain])
|
if ([(id)the_server retain])
|
||||||
|
@ -150,7 +151,7 @@ static id<PasteboardServer> the_server = nil;
|
||||||
//
|
//
|
||||||
// Creating and Releasing an NSPasteboard Object
|
// Creating and Releasing an NSPasteboard Object
|
||||||
//
|
//
|
||||||
+ (NSPasteboard*) _pasteboardWithTarget: (id<PasteboardObject>)aTarget
|
+ (NSPasteboard*) _pasteboardWithTarget: (id<GSPasteboardObj>)aTarget
|
||||||
name: (NSString*)aName
|
name: (NSString*)aName
|
||||||
{
|
{
|
||||||
NSPasteboard* p = nil;
|
NSPasteboard* p = nil;
|
||||||
|
@ -206,7 +207,7 @@ static id<PasteboardServer> the_server = nil;
|
||||||
{
|
{
|
||||||
NS_DURING
|
NS_DURING
|
||||||
{
|
{
|
||||||
id<PasteboardObject> anObj;
|
id<GSPasteboardObj> anObj;
|
||||||
|
|
||||||
anObj = [[self _pbs] pasteboardWithName: aName];
|
anObj = [[self _pbs] pasteboardWithName: aName];
|
||||||
if (anObj) {
|
if (anObj) {
|
||||||
|
@ -230,7 +231,7 @@ static id<PasteboardServer> the_server = nil;
|
||||||
{
|
{
|
||||||
NS_DURING
|
NS_DURING
|
||||||
{
|
{
|
||||||
id<PasteboardObject> anObj;
|
id<GSPasteboardObj> anObj;
|
||||||
|
|
||||||
anObj = [[self _pbs] pasteboardWithUniqueName];
|
anObj = [[self _pbs] pasteboardWithUniqueName];
|
||||||
if (anObj) {
|
if (anObj) {
|
||||||
|
@ -263,7 +264,7 @@ static id<PasteboardServer> the_server = nil;
|
||||||
{
|
{
|
||||||
NS_DURING
|
NS_DURING
|
||||||
{
|
{
|
||||||
id<PasteboardObject> anObj;
|
id<GSPasteboardObj> anObj;
|
||||||
|
|
||||||
anObj = [[self _pbs] pasteboardByFilteringData: data
|
anObj = [[self _pbs] pasteboardByFilteringData: data
|
||||||
ofType: type
|
ofType: type
|
||||||
|
@ -297,7 +298,7 @@ static id<PasteboardServer> the_server = nil;
|
||||||
|
|
||||||
NS_DURING
|
NS_DURING
|
||||||
{
|
{
|
||||||
id<PasteboardObject> anObj;
|
id<GSPasteboardObj> anObj;
|
||||||
|
|
||||||
anObj = [[self _pbs] pasteboardByFilteringData: data
|
anObj = [[self _pbs] pasteboardByFilteringData: data
|
||||||
ofType: type
|
ofType: type
|
||||||
|
@ -328,7 +329,7 @@ static id<PasteboardServer> the_server = nil;
|
||||||
{
|
{
|
||||||
NS_DURING
|
NS_DURING
|
||||||
{
|
{
|
||||||
id<PasteboardObject> anObj;
|
id<GSPasteboardObj> anObj;
|
||||||
|
|
||||||
anObj = [pboard _target];
|
anObj = [pboard _target];
|
||||||
if (anObj) {
|
if (anObj) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue