mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-31 07:30:47 +00:00
Added MacOS 10.4 methods for NSDocument, NSDocumentController,
NSPrintOperation, NSResponder and NSCell. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@24378 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
bc34ad5f62
commit
34b0abf4d0
25 changed files with 1902 additions and 521 deletions
|
@ -32,27 +32,33 @@
|
|||
|
||||
#if OS_API_VERSION(GS_API_MACOSX, GS_API_LATEST)
|
||||
|
||||
#include <Foundation/Foundation.h>
|
||||
#include <Foundation/NSObject.h>
|
||||
#include <AppKit/NSNibDeclarations.h>
|
||||
#include <AppKit/NSUserInterfaceValidation.h>
|
||||
|
||||
@class NSArray, NSMutableArray;
|
||||
@class NSArray;
|
||||
@class NSError;
|
||||
@class NSMutableArray;
|
||||
@class NSURL;
|
||||
@class NSMenuItem, NSOpenPanel, NSWindow;
|
||||
@class NSString;
|
||||
|
||||
@class NSDocument;
|
||||
@class NSMenuItem;
|
||||
@class NSOpenPanel;
|
||||
@class NSWindow;
|
||||
|
||||
@interface NSDocumentController : NSObject
|
||||
{
|
||||
@private
|
||||
NSMutableArray *_documents;
|
||||
NSMutableArray *_recentDocuments;
|
||||
struct __controllerFlags {
|
||||
unsigned int shouldCreateUI:1;
|
||||
unsigned int RESERVED:31;
|
||||
} _controllerFlags;
|
||||
NSMutableArray *_recent_documents;
|
||||
NSArray *_types; // from info.plist with key NSTypes
|
||||
NSTimeInterval _autosavingDelay;
|
||||
struct __controller_flags {
|
||||
unsigned int should_create_ui:1;
|
||||
unsigned int RESERVED:31;
|
||||
} _controller_flags;
|
||||
void *_reserved1;
|
||||
void *_reserved2;
|
||||
}
|
||||
|
||||
+ (id)sharedDocumentController;
|
||||
|
@ -67,6 +73,32 @@
|
|||
|
||||
- (id)makeDocumentWithContentsOfURL:(NSURL *)url ofType:(NSString *)type;
|
||||
- (id)openDocumentWithContentsOfURL:(NSURL *)url display:(BOOL)display;
|
||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_4, GS_API_LATEST)
|
||||
- (id)makeDocumentForURL:(NSURL *)url
|
||||
withContentsOfURL:(NSURL *)contents
|
||||
ofType:(NSString *)type
|
||||
error:(NSError **)err;
|
||||
- (id)makeDocumentWithContentsOfURL:(NSURL *)url
|
||||
ofType:(NSString *)type
|
||||
error:(NSError **)err;
|
||||
- (id)makeUntitledDocumentOfType:(NSString *)type
|
||||
error:(NSError **)err;
|
||||
- (id)openDocumentWithContentsOfURL:(NSURL *) url
|
||||
display:(BOOL) flag
|
||||
error:(NSError **) err;
|
||||
- (id)openUntitledDocumentAndDisplay:(BOOL)flag
|
||||
error:(NSError **)err;
|
||||
- (BOOL)reopenDocumentForURL:(NSURL *)url
|
||||
withContentsOfURL:(NSURL *)contents
|
||||
error:(NSError **)err;
|
||||
- (BOOL)presentError:(NSError *)err;
|
||||
- (void)presentError:(NSError *)err
|
||||
modalForWindow:(NSWindow *)win
|
||||
delegate:(id)delegate
|
||||
didPresentSelector:(SEL)sel
|
||||
contextInfo:(void *)context;
|
||||
- (NSError *)willPresentError:(NSError *)err;
|
||||
#endif
|
||||
|
||||
/*" With or without UI "*/
|
||||
- (BOOL)shouldCreateUI;
|
||||
|
@ -107,6 +139,9 @@
|
|||
- (NSString *)currentDirectory;
|
||||
- (id)documentForWindow:(NSWindow *)window;
|
||||
- (id)documentForFileName:(NSString *)fileName;
|
||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_4, GS_API_LATEST)
|
||||
- (id)documentForURL:(NSURL *)url;
|
||||
#endif
|
||||
|
||||
|
||||
/*" Menu validation "*/
|
||||
|
@ -118,10 +153,20 @@
|
|||
- (NSString *)typeFromFileExtension:(NSString *)fileExtension;
|
||||
- (NSArray *)fileExtensionsFromType:(NSString *)type;
|
||||
- (Class)documentClassForType:(NSString *)type;
|
||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_4, GS_API_LATEST)
|
||||
- (NSString *)defaultType;
|
||||
- (NSArray *)documentClassNames;
|
||||
- (NSString *)typeForContentsOfURL:(NSURL *)url error:(NSError **)err;
|
||||
#endif
|
||||
|
||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_4, GS_API_LATEST)
|
||||
/* Autosaving */
|
||||
- (NSTimeInterval)autosavingDelay;
|
||||
- (void)setAutosavingDelay:(NSTimeInterval)autosavingDelay;
|
||||
#endif
|
||||
|
||||
@end
|
||||
|
||||
#endif // GS_API_MACOSX
|
||||
|
||||
#endif // _GNUstep_H_NSDocumentController
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue