mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-31 22:50:48 +00:00
Added methods to ask the pasteboard owner to provide data.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@2413 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
a92177e9f8
commit
5526ad8daf
1 changed files with 18 additions and 1 deletions
|
@ -551,7 +551,7 @@ static id<PasteboardServer> the_server = nil;
|
||||||
{
|
{
|
||||||
d = [target dataForType: dataType
|
d = [target dataForType: dataType
|
||||||
oldCount: changeCount
|
oldCount: changeCount
|
||||||
mustBeCurrent: useHistory];
|
mustBeCurrent: (useHistory == NO) ? YES : NO];
|
||||||
}
|
}
|
||||||
NS_HANDLER
|
NS_HANDLER
|
||||||
{
|
{
|
||||||
|
@ -597,6 +597,11 @@ static id<PasteboardServer> the_server = nil;
|
||||||
provideDataForType:(NSString *)type
|
provideDataForType:(NSString *)type
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
- (void)pasteboard:(NSPasteboard *)sender
|
||||||
|
provideDataForType:(NSString *)type
|
||||||
|
andVersion:(int)version
|
||||||
|
{}
|
||||||
|
|
||||||
- (void)pasteboardChangedOwner:(NSPasteboard *)sender
|
- (void)pasteboardChangedOwner:(NSPasteboard *)sender
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
@ -604,6 +609,18 @@ provideDataForType:(NSString *)type
|
||||||
|
|
||||||
@implementation NSPasteboard (GNUstepExtensions)
|
@implementation NSPasteboard (GNUstepExtensions)
|
||||||
|
|
||||||
|
- (id)askOwner:(id)anObject toProvideDataForType:(NSString*)type
|
||||||
|
{
|
||||||
|
[anObject pasteboard:self provideDataForType:type];
|
||||||
|
return self;
|
||||||
|
}
|
||||||
|
|
||||||
|
- (id)askOwner:(id)obj toProvideDataForType:(NSString*)type andVersion:(int)v
|
||||||
|
{
|
||||||
|
[obj pasteboard:self provideDataForType:type andVersion:v];
|
||||||
|
return self;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Once the '[-setChangeCount:]' message has been sent to an NSPasteboard
|
* Once the '[-setChangeCount:]' message has been sent to an NSPasteboard
|
||||||
* the object will gain an extra GNUstep behaviour - when geting data
|
* the object will gain an extra GNUstep behaviour - when geting data
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue