mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-23 06:51:44 +00:00
Add NSStoryboard
This commit is contained in:
parent
e06173171d
commit
cb312ad77f
2 changed files with 57 additions and 0 deletions
|
@ -26,6 +26,7 @@
|
|||
#define _NSStoryboard_h_GNUSTEP_GUI_INCLUDE
|
||||
|
||||
#import <Foundation/NSObject.h>
|
||||
#import <Foundation/NSBundle.h>
|
||||
|
||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_10, GS_API_LATEST)
|
||||
|
||||
|
@ -33,8 +34,30 @@
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef NSString* NSStoryboardName;
|
||||
typedef NSString* NSStoryboardSceneIdentifier;
|
||||
|
||||
DEFINE_BLOCK_TYPE(NSStoryboardControllerCreator, id, NSCoder*);
|
||||
|
||||
@interface NSStoryboard : NSObject
|
||||
|
||||
// Creating a storyboard object from a storyboard file...
|
||||
+ (instancetype) storyboardWithName: (NSStoryboardName)name
|
||||
bundle: (NSBundle *)storyboard;
|
||||
|
||||
+ (NSStoryboard *) mainStoryboard;
|
||||
|
||||
// Instantiating a controller from a storyboard
|
||||
- (id) instantiateInitialController;
|
||||
|
||||
- (id) instantiateControllerWithIdentifier: (NSStoryboardSceneIdentifier)identifier;
|
||||
|
||||
// Instance methods
|
||||
- (id) instantiateControllerWithIdentifier:(NSStoryboardSceneIdentifier)identifier
|
||||
creator:(NSStoryboardControllerCreator)block;
|
||||
|
||||
- (id) instantiateInitialControllerWithCreator:(NSStoryboardControllerCreator)block;
|
||||
|
||||
@end
|
||||
|
||||
#if defined(__cplusplus)
|
||||
|
|
|
@ -25,6 +25,40 @@
|
|||
#import <AppKit/NSStoryboard.h>
|
||||
|
||||
@implementation NSStoryboard
|
||||
// Creating a storyboard object from a storyboard file...
|
||||
+ (instancetype) storyboardWithName: (NSStoryboardName)name
|
||||
bundle: (NSBundle *)storyboard
|
||||
{
|
||||
return nil;
|
||||
}
|
||||
|
||||
+ (NSStoryboard *) mainStoryboard
|
||||
{
|
||||
return nil;
|
||||
}
|
||||
|
||||
// Instantiating a controller from a storyboard
|
||||
- (id) instantiateInitialController
|
||||
{
|
||||
return nil;
|
||||
}
|
||||
|
||||
- (id) instantiateControllerWithIdentifier: (NSStoryboardSceneIdentifier)identifier
|
||||
{
|
||||
return nil;
|
||||
}
|
||||
|
||||
// Instance methods
|
||||
- (id) instantiateControllerWithIdentifier:(NSStoryboardSceneIdentifier)identifier
|
||||
creator:(NSStoryboardControllerCreator)block
|
||||
{
|
||||
return nil;
|
||||
}
|
||||
|
||||
- (id) instantiateInitialControllerWithCreator:(NSStoryboardControllerCreator)block
|
||||
{
|
||||
return nil;
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
|
|
Loading…
Reference in a new issue