Add MacOSX 10.4 method declarations.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@25351 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Fred Kiefer 2007-07-24 08:40:58 +00:00
parent 4c78b5378d
commit 5a752a1db1
4 changed files with 91 additions and 19 deletions

View file

@ -1,3 +1,9 @@
2007-07-24 Fred Kiefer <FredKiefer@gmx.de>
* Headers/AppKit/NSApplication.h:
* Source/NSApplication.m: Add MacOSX 10.4 method declarations.
* Source/externs.m: Define new string constant.
2007-07-23 Fred Kiefer <FredKiefer@gmx.de>
* Headers/AppKit/NSAnimation.h: Remove unneeded includes.

View file

@ -44,20 +44,21 @@
@class NSArray;
@class NSAutoreleasePool;
@class NSMutableArray;
@class NSString;
@class NSException;
@class NSNotification;
@class NSDate;
@class NSError;
@class NSException;
@class NSMutableArray;
@class NSNotification;
@class NSString;
@class NSTimer;
@class NSEvent;
@class NSPasteboard;
@class NSGraphicsContext;
@class NSImage;
@class NSMenu;
@class NSMenuItem;
@class NSImage;
@class NSPasteboard;
@class NSWindow;
@class NSGraphicsContext;
@class GSInfoPanel;
@ -102,6 +103,23 @@ typedef enum {
#define NSAppKitVersionNumber10_0 0
#endif
#if OS_API_VERSION(MAC_OS_X_VERSION_10_3, GS_API_LATEST)
typedef enum _NSApplicationDelegateReply
{
NSApplicationDelegateReplySuccess =0,
NSApplicationDelegateReplyCancel =1,
NSApplicationDelegateReplyFailure =2
} NSApplicationDelegateReply;
typedef enum _NSApplicationPrintReply
{
NSPrintingCancelled = NO,
NSPrintingSuccess = YES,
NSPrintingFailure,
NSPrintingReplyLater
} NSApplicationPrintReply;
#endif
APPKIT_EXPORT NSString *NSModalPanelRunLoopMode;
APPKIT_EXPORT NSString *NSEventTrackingRunLoopMode;
@ -326,6 +344,9 @@ APPKIT_EXPORT NSString *NSEventTrackingRunLoopMode;
#if OS_API_VERSION(GS_API_MACOSX, GS_API_LATEST)
- (void) replyToApplicationShouldTerminate: (BOOL)shouldTerminate;
#endif
#if OS_API_VERSION(MAC_OS_X_VERSION_10_3, GS_API_LATEST)
- (void) replyToOpenOrPrint: (NSApplicationDelegateReply)reply;
#endif
- (void) terminate: (id)sender;
/*
@ -376,6 +397,12 @@ APPKIT_EXPORT NSString *NSEventTrackingRunLoopMode;
#endif
@end
#if OS_API_VERSION(MAC_OS_X_VERSION_10_3, GS_API_LATEST)
@interface NSApplication (CharacterPanel)
- (void) orderFrontCharacterPalette: (id)sender;
@end
#endif
#if OS_API_VERSION(GS_API_NONE, GS_API_NONE)
@interface NSApplication (GSGUIInternal)
@ -405,6 +432,14 @@ APPKIT_EXPORT NSString *NSEventTrackingRunLoopMode;
- (BOOL) application: (NSApplication*)app
openFile: (NSString*)filename;
#if OS_API_VERSION(MAC_OS_X_VERSION_10_3, GS_API_LATEST)
/**
* Sender requests application to open filenames.
* <em>Not sent yet under GNUstep.</em>
*/
- (void) application: (NSApplication*)app openFiles: (NSArray*)filenames;
#endif
/**
* Sender requests application to open a temporary file. Responsibility
* for eventual deletion lies with this application.
@ -422,6 +457,29 @@ APPKIT_EXPORT NSString *NSEventTrackingRunLoopMode;
- (BOOL) application: (NSApplication *)theApplication
printFile:(NSString *)filename;
#if OS_API_VERSION(MAC_OS_X_VERSION_10_3, GS_API_LATEST)
/**
* <em>Not sent yet on GNUstep.</em>
*/
#if OS_API_VERSION(MAC_OS_X_VERSION_10_4, GS_API_LATEST)
- (NSApplicationPrintReply) application: (NSApplication*)app
printFiles: (NSArray*)files
withSettings: (NSDictionary*)settings
showPrintPanels: (BOOL)flag;
#else
// Deprecated in 10.4
- (void) application: (NSApplication*)app printFiles: (NSArray*)filenames;
#endif
#endif
#if OS_API_VERSION(MAC_OS_X_VERSION_10_4, GS_API_LATEST)
/**
* <em>Not sent yet on GNUstep.</em>
*/
- (NSError*) application: (NSApplication*)app willPresentError: (NSError*)error;
#endif
/**
* Sender requests application to open a fresh document.
* YES should be returned on success, NO on failure.
@ -435,12 +493,6 @@ APPKIT_EXPORT NSString *NSEventTrackingRunLoopMode;
- (BOOL) applicationShouldOpenUntitledFile:(NSApplication *)sender;
#if OS_API_VERSION(GS_API_MACOSX, GS_API_LATEST)
/**
* Sent from within the [NSApplication-terminate:]. If NO is returned
* termination will not proceed.
*/
- (BOOL) applicationShouldTerminate: (id)sender;
#else
/**
* Sent from within the [NSApplication-terminate:]. If
* <code>NSTerminateNow</code> is returned, termination will proceed. If
@ -451,6 +503,12 @@ APPKIT_EXPORT NSString *NSEventTrackingRunLoopMode;
* if confirmation windows, etc. need to be put up.)
*/
- (NSApplicationTerminateReply) applicationShouldTerminate: (NSApplication *)sender;
#else
/**
* Sent from within the [NSApplication-terminate:]. If NO is returned
* termination will not proceed.
*/
- (BOOL) applicationShouldTerminate: (id)sender;
#endif
/**
@ -515,7 +573,7 @@ APPKIT_EXPORT NSString *NSEventTrackingRunLoopMode;
* Invoked on notification just before application terminates. (There is
* no opportunity to avert it now.)
*/
- (void) applicationWillTerminate:(NSNotification *)aNotification;
- (void) applicationWillTerminate:(NSNotification*)aNotification;
/**
* Invoked on notification that application will be unhidden.
@ -533,15 +591,15 @@ APPKIT_EXPORT NSString *NSEventTrackingRunLoopMode;
* Method called by scripting framework on OS X. <em>Not implemented (sent)
* yet on GNUstep.</em>
*/
- (BOOL) application: (NSApplication *)sender
delegateHandlesKey: (NSString *)key;
- (BOOL) application: (NSApplication*)sender
delegateHandlesKey: (NSString*)key;
/**
* Method used on OS X to allow an application to override the standard menu
* obtained by right-clicking on the application's dock icon. <em>Not sent
* yet in GNUstep.</em>
*/
- (NSMenu *) applicationDockMenu: (NSApplication *)sender;
- (NSMenu *) applicationDockMenu: (NSApplication*)sender;
/**
* Method used on OS X to allow delegate to handle event when user clicks on
@ -550,7 +608,7 @@ APPKIT_EXPORT NSString *NSEventTrackingRunLoopMode;
* if NO is returned nothing is done (and you can handle it here in this
* method). <em>Not sent yet under GNUstep.</em>
*/
- (BOOL) applicationShouldHandleReopen: (NSApplication *)theApplication
- (BOOL) applicationShouldHandleReopen: (NSApplication*)theApplication
hasVisibleWindows: (BOOL)flag;
/**
@ -558,7 +616,7 @@ APPKIT_EXPORT NSString *NSEventTrackingRunLoopMode;
* have changed (through control panel operation, connecting a new monitor,
* etc.). <em>Not implemented/sent yet under GNUstep.</em>
*/
- (void) applicationDidChangeScreenParameters: (NSNotification *)aNotification;
- (void) applicationDidChangeScreenParameters: (NSNotification*)aNotification;
#endif
@end
#endif
@ -567,6 +625,7 @@ APPKIT_EXPORT NSString *NSEventTrackingRunLoopMode;
* Notifications
*/
APPKIT_EXPORT NSString *NSApplicationDidBecomeActiveNotification;
APPKIT_EXPORT NSString *NSApplicationDidChangeScreenParametersNotification;
APPKIT_EXPORT NSString *NSApplicationDidFinishLaunchingNotification;
APPKIT_EXPORT NSString *NSApplicationDidHideNotification;
APPKIT_EXPORT NSString *NSApplicationDidResignActiveNotification;

View file

@ -3155,6 +3155,11 @@ image.</p><p>See Also: -applicationIconImage</p>
}
}
- (void) replyToOpenOrPrint: (NSApplicationDelegateReply)reply
{
// FIXME
}
/**
* Returns the application's delegate, as set by the -setDelegate: method.<br/>
* <p>The application delegate will automatically be sent various

View file

@ -78,6 +78,8 @@ NSString *GSWindowServerInternalException = @"WindowServerInternal";
// Application notifications
NSString *NSApplicationDidBecomeActiveNotification
= @"ApplicationDidBecomeActive";
NSString *NSApplicationDidChangeScreenParametersNotification
= @"NSApplicationDidChangeScreenParameters";
NSString *NSApplicationDidFinishLaunchingNotification
= @"ApplicationDidFinishLaunching";
NSString *NSApplicationDidHideNotification = @"ApplicationDidHide";