mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-23 10:01:14 +00:00
Add simple implementation to NSAccessibilityCustomAction.m
This commit is contained in:
parent
b99d38f884
commit
c6fc8e0984
2 changed files with 33 additions and 11 deletions
|
@ -36,13 +36,19 @@ extern "C" {
|
|||
DEFINE_BLOCK_TYPE(GSAccessibilityCustomActionHandler, void, BOOL);
|
||||
|
||||
@interface NSAccessibilityCustomAction : NSObject
|
||||
{
|
||||
NSString *_name;
|
||||
GSAccessibilityCustomActionHandler _handler;
|
||||
id _target;
|
||||
SEL _selector;
|
||||
}
|
||||
|
||||
- (instancetype)initWithName: (NSString *)name
|
||||
handler: (GSAccessibilityCustomActionHandler)handler;
|
||||
- (instancetype) initWithName: (NSString *)name
|
||||
handler: (GSAccessibilityCustomActionHandler)handler;
|
||||
|
||||
- (instancetype)initWithName: (NSString *)name
|
||||
target: (id)target
|
||||
selector: (SEL)selector;
|
||||
- (instancetype) initWithName: (NSString *)name
|
||||
target: (id)target
|
||||
selector: (SEL)selector;
|
||||
|
||||
- (NSString *) name;
|
||||
- (void) setName: (NSString *)name;
|
||||
|
|
|
@ -29,50 +29,66 @@
|
|||
- (instancetype)initWithName: (NSString *)name
|
||||
handler: (GSAccessibilityCustomActionHandler)handler
|
||||
{
|
||||
return nil;
|
||||
self = [super init];
|
||||
if (self != nil)
|
||||
{
|
||||
ASSIGN(_name, name);
|
||||
ASSIGN(_handler, handler);
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (instancetype)initWithName: (NSString *)name
|
||||
target: (id)target
|
||||
selector: (SEL)selector
|
||||
{
|
||||
return nil;
|
||||
self = [super init];
|
||||
if (self != nil)
|
||||
{
|
||||
_target = target;
|
||||
_selector = selector;
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (NSString *) name
|
||||
{
|
||||
return nil;
|
||||
return _name;
|
||||
}
|
||||
|
||||
- (void) setName: (NSString *)name
|
||||
{
|
||||
ASSIGN(_name, name);
|
||||
}
|
||||
|
||||
- (GSAccessibilityCustomActionHandler) handler
|
||||
{
|
||||
return nil;
|
||||
return _handler;
|
||||
}
|
||||
|
||||
- (void) setHandler: (GSAccessibilityCustomActionHandler)handler
|
||||
{
|
||||
ASSIGN(_handler, handler);
|
||||
}
|
||||
|
||||
- (id) target
|
||||
{
|
||||
return nil;
|
||||
return _target;
|
||||
}
|
||||
|
||||
- (void) setTarget: (id)target
|
||||
{
|
||||
_target = target;
|
||||
}
|
||||
|
||||
- (SEL) selector
|
||||
{
|
||||
return NULL;
|
||||
return _selector;
|
||||
}
|
||||
|
||||
- (void) setSelector: (SEL)selector
|
||||
{
|
||||
_selector = selector;
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
Loading…
Reference in a new issue