mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-23 06:51:44 +00:00
NS{Application,Window}: define modal constants
Define constants and stubs related to modal sheets in GUI for increased compatibility.
This commit is contained in:
parent
5e8b278e93
commit
07d0f2002f
3 changed files with 30 additions and 0 deletions
|
@ -750,6 +750,16 @@ 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
|
||||
|
|
|
@ -87,6 +87,13 @@ enum {
|
|||
NSScreenSaverWindowLevel = 1000 // 12
|
||||
};
|
||||
|
||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_9, GS_API_LATEST)
|
||||
enum {
|
||||
NSModalResponseOK = 1,
|
||||
NSModalResponseCancel = 0
|
||||
};
|
||||
#endif
|
||||
|
||||
enum {
|
||||
NSBorderlessWindowMask = 0,
|
||||
NSTitledWindowMask = 1,
|
||||
|
@ -810,6 +817,14 @@ PACKAGE_SCOPE
|
|||
- (void) setDisplaysWhenScreenProfileChanges: (BOOL)flag;
|
||||
#endif
|
||||
|
||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_9, GS_API_LATEST)
|
||||
#if GS_HAS_DECLARED_PROPERTIES
|
||||
@property (readonly) NSWindow *sheetParent;
|
||||
#else
|
||||
- (NSWindow *) sheetParent;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@end
|
||||
|
||||
@class NSToolbar;
|
||||
|
|
|
@ -5653,6 +5653,11 @@ current key view.<br />
|
|||
return _attachedSheet;
|
||||
}
|
||||
|
||||
- (NSWindow *) sheetParent
|
||||
{
|
||||
return nil;
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
@implementation NSWindow (Toolbar)
|
||||
|
|
Loading…
Reference in a new issue