Cleanup white space

This commit is contained in:
Gregory John Casamento 2024-05-06 09:47:27 -04:00
parent 1828f5374c
commit 63f4a4547a
3 changed files with 110 additions and 25 deletions

View file

@ -1,21 +1,21 @@
/* Interface of class NSFilePromiseProvider
Copyright (C) 2024 Free Software Foundation, Inc.
By: Gregory John Casamento
Date: 05-05-2024
This file is part of the GNUstep Library.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 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
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
@ -35,7 +35,7 @@ extern "C" {
#endif
@class NSError;
@class NSFilePromiseProvider;
@class NSFilePromiseProvider;
@class NSOperationQueue;
@class NSString;
@class NSURL;
@ -45,13 +45,13 @@ DEFINE_BLOCK_TYPE_NO_ARGS(GSFilePromiseProviderCompletionHandler, NSError*);
@protocol NSFilePromiseProviderDelegate
- (NSString *) filePromiseProvider: (NSFilePromiseProvider *)filePromiseProvider filenameForType: (NSString *)fileType;
- (void)filePromiseProvider: (NSFilePromiseProvider *)filePromiseProvider
writePromiseToURL: (NSURL *)url
completionHandler: (GSFilePromiseProviderCompletionHandler)completionHandler;
- (void)filePromiseProvider: (NSFilePromiseProvider *)filePromiseProvider
writePromiseToURL: (NSURL *)url
completionHandler: (GSFilePromiseProviderCompletionHandler)completionHandler;
- (NSOperationQueue *)operationQueueForFilePromiseProvider: (NSFilePromiseProvider *)filePromiseProvider;
@end
APPKIT_EXPORT_CLASS
@interface NSFilePromiseProvider : NSObject
{
@ -70,7 +70,7 @@ APPKIT_EXPORT_CLASS
- (id) userInfo;
- (void) setUserInfo: (id)userInfo;
@end
#if defined(__cplusplus)
@ -80,4 +80,3 @@ APPKIT_EXPORT_CLASS
#endif /* GS_API_MACOSX */
#endif /* _NSFilePromiseProvider_h_GNUSTEP_GUI_INCLUDE */

View file

@ -1,21 +1,21 @@
/* Interface of class NSFilePromiseReceiver
Copyright (C) 2024 Free Software Foundation, Inc.
By: Gregory John Casamento
Date: 05-05-2024
This file is part of the GNUstep Library.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 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
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
@ -26,16 +26,43 @@
#define _NSFilePromiseReceiver_h_GNUSTEP_GUI_INCLUDE
#import <Foundation/NSObject.h>
#import <AppKit/AppKitDefines.h>
#if OS_API_VERSION(MAC_OS_X_VERSION_10_0, GS_API_LATEST)
#import "AppKit/AppKitDefines.h"
#import "AppKit/NSPasteboard.h"
#if OS_API_VERSION(MAC_OS_X_VERSION_10_12, GS_API_LATEST)
#if defined(__cplusplus)
extern "C" {
#endif
APPKIT_EXPORT_CLASS
@interface NSFilePromiseReceiver : NSObject
@class NSArray;
@class NSError;
@class NSOperationQueue;
@class NSURL;
DEFINE_BLOCK_TYPE(GSFilePromiseReceiverReaderHandler, void, NSURL*, NSError*);
APPKIT_EXPORT_CLASS
@interface NSFilePromiseReceiver <NSPasteboardReading> : NSObject
{
NSArray *_fileNames;
NSArray *_fileTypes;
NSArray *_readableDraggedTypes;
}
- (NSArray *) fileNames;
- (void) setFileNames: (NSArray *)fileNames;
- (NSArray *) fileTypes;
- (void) setFileTypes: (NSArray *)fileTypes;
- (NSArray *) readableDraggedTypes;
- (void) receivePromisedFilesAtDestination: (NSURL *)destinationDir
options: (NSDictionary *)options
operationQueue: (NSOperationQueue *)operationQueue
reader: (GSFilePromiseReceiverReaderHandler)reader;
@end
@ -46,4 +73,3 @@ APPKIT_EXPORT_CLASS
#endif /* GS_API_MACOSX */
#endif /* _NSFilePromiseReceiver_h_GNUSTEP_GUI_INCLUDE */

View file

@ -1,21 +1,21 @@
/* Implementation of class NSFilePromiseReceiver
Copyright (C) 2024 Free Software Foundation, Inc.
By: Gregory John Casamento
Date: 05-05-2024
This file is part of the GNUstep Library.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 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
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
@ -24,7 +24,67 @@
#import "AppKit/NSFilePromiseReceiver.h"
#import <Foundation/NSString.h>
#import <Foundation/NSArray.h>
#import <Foundation/NSOperation.h>
#import "GSFastEnumeration.h"
@implementation NSFilePromiseReceiver
@end
// NSPasteboardReading protocol -- start
- (id)initWithPasteboardPropertyList: (id)propertyList ofType: (NSString *)type
{
self = [super init];
if (self != nil)
{
}
return self;
}
// NSPasteboardReading protocol -- end
- (void) dealloc
{
RELEASE(_fileNames);
RELEASE(_fileTypes);
RELEASE(_readableDraggedTypes);
[super dealloc];
}
- (NSArray *) fileNames
{
return _fileNames;
}
- (void) setFileNames: (NSArray *)fileNames
{
ASSIGN(_fileNames, fileNames);
}
- (NSArray *) fileTypes
{
return _fileTypes;
}
- (void) setFileTypes: (NSArray *)fileTypes
{
ASSIGN(_fileTypes, fileTypes);
}
- (NSArray *) readableDraggedTypes
{
return _readableDraggedTypes;
}
- (void) receivePromisedFilesAtDestination: (NSURL *)destinationDir
options: (NSDictionary *)options
operationQueue: (NSOperationQueue *)operationQueue
reader: (GSFilePromiseReceiverReaderHandler)reader
{
}
@end