Move NSModalResponse and GSNSWindowDidEndSheetCallbackBlock to NSWindow.h

This commit is contained in:
ethanc8 2024-02-05 16:04:05 -06:00
parent b1a476801a
commit adba87cb51
3 changed files with 9 additions and 26 deletions

View file

@ -28,6 +28,7 @@
#ifndef _GNUstep_H_NSAlert
#define _GNUstep_H_NSAlert
#import <AppKit/NSWindow.h>
#import <AppKit/AppKitDefines.h>
#import <Foundation/NSObject.h>
@ -49,17 +50,6 @@ enum _NSAlertStyle {
};
typedef NSUInteger NSAlertStyle;
enum {
NSAlertFirstButtonReturn = 1000,
NSAlertSecondButtonReturn = 1001,
NSAlertThirdButtonReturn = 1002
};
#if OS_API_VERSION(MAC_OS_X_VERSION_10_9, GS_API_LATEST)
typedef NSInteger NSModalResponse;
DEFINE_BLOCK_TYPE(GSNSWindowDidEndSheetCallbackBlock, void, NSModalResponse returnCode);
#endif
APPKIT_EXPORT_CLASS
@interface NSAlert : NSObject
{

View file

@ -41,6 +41,7 @@
#import <AppKit/NSResponder.h>
#import <AppKit/NSUserInterfaceValidation.h>
#import <AppKit/NSWindow.h>
#if defined(__cplusplus)
extern "C" {
@ -75,10 +76,6 @@ enum {
NSRunContinuesResponse = (-1002)
};
#if OS_API_VERSION(MAC_OS_X_VERSION_10_9, GS_API_LATEST)
typedef NSInteger NSModalResponse;
#endif
#if OS_API_VERSION(GS_API_MACOSX, GS_API_LATEST)
#define NSUpdateWindowsRunLoopOrdering 600000
@ -786,16 +783,6 @@ NSShowSystemInfoPanel(NSDictionary *options);
*/
APPKIT_EXPORT NSApplication *NSApp;
#if OS_API_VERSION(MAC_OS_X_VERSION_10_3, GS_API_LATEST)
enum
{
NSModalResponseStop = -1000,
NSModalResponseAbort = -1001,
NSModalResponseContinue = -1002
};
typedef NSInteger NSModalResponse;
#endif
#if defined(__cplusplus)
}
#endif

View file

@ -93,7 +93,13 @@ enum {
typedef NSInteger NSModalResponse;
enum {
NSModalResponseOK = 1,
NSModalResponseCancel = 0
NSModalResponseCancel = 0,
NSModalResponseStop = -1000,
NSModalResponseAbort = -1001,
NSModalResponseContinue = -1002,
NSAlertFirstButtonReturn = 1000,
NSAlertSecondButtonReturn = 1001,
NSAlertThirdButtonReturn = 1002,
};
DEFINE_BLOCK_TYPE(GSNSWindowDidEndSheetCallbackBlock, void, NSModalResponse returnCode);
#endif