diff --git a/ChangeLog b/ChangeLog
index b49ff4281..d2638e50a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2007-07-24 Fred Kiefer
+
+ * 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
* Headers/AppKit/NSAnimation.h: Remove unneeded includes.
diff --git a/Headers/AppKit/NSApplication.h b/Headers/AppKit/NSApplication.h
index 389c3c8a6..ee561d0d1 100644
--- a/Headers/AppKit/NSApplication.h
+++ b/Headers/AppKit/NSApplication.h
@@ -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.
+ * Not sent yet under GNUstep.
+ */
+- (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)
+/**
+ * Not sent yet on GNUstep.
+ */
+#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)
+/**
+ * Not sent yet on GNUstep.
+ */
+- (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
* NSTerminateNow
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. Not implemented (sent)
* yet on GNUstep.
*/
-- (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. Not sent
* yet in GNUstep.
*/
-- (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). Not sent yet under GNUstep.
*/
-- (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.). Not implemented/sent yet under GNUstep.
*/
-- (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;
diff --git a/Source/NSApplication.m b/Source/NSApplication.m
index af71112a1..b3d88b1d2 100644
--- a/Source/NSApplication.m
+++ b/Source/NSApplication.m
@@ -3155,6 +3155,11 @@ image.
See Also: -applicationIconImage
}
}
+- (void) replyToOpenOrPrint: (NSApplicationDelegateReply)reply
+{
+ // FIXME
+}
+
/**
* Returns the application's delegate, as set by the -setDelegate: method.
* The application delegate will automatically be sent various
diff --git a/Source/externs.m b/Source/externs.m
index 6cd3f1599..6003ce3dd 100644
--- a/Source/externs.m
+++ b/Source/externs.m
@@ -78,6 +78,8 @@ NSString *GSWindowServerInternalException = @"WindowServerInternal";
// Application notifications
NSString *NSApplicationDidBecomeActiveNotification
= @"ApplicationDidBecomeActive";
+NSString *NSApplicationDidChangeScreenParametersNotification
+ = @"NSApplicationDidChangeScreenParameters";
NSString *NSApplicationDidFinishLaunchingNotification
= @"ApplicationDidFinishLaunching";
NSString *NSApplicationDidHideNotification = @"ApplicationDidHide";