mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-26 22:31:05 +00:00
[qwaq] Support an actual parameter for listeners
This commit is contained in:
parent
983a7422db
commit
aac732fc63
2 changed files with 14 additions and 0 deletions
|
@ -13,6 +13,7 @@
|
|||
}
|
||||
-initWithResponder: (id) responder :(SEL)message;
|
||||
-(void) respond: (void *) caller_data;
|
||||
-(void) respond: (void *) caller_data withObject:(void *)anObject;
|
||||
-(BOOL) matchResponder: (id) responder :(SEL)message;
|
||||
@end
|
||||
|
||||
|
@ -24,6 +25,7 @@
|
|||
-addListener: (id) responder :(SEL)message;
|
||||
-removeListener: (id) responder :(SEL)message;
|
||||
-(void) respond: (void *) caller_data;
|
||||
-(void) respond: (void *) caller_data withObject:(void *)anObject;
|
||||
@end
|
||||
|
||||
#endif//__qwaq_listener_h
|
||||
|
|
|
@ -21,6 +21,11 @@
|
|||
imp (responder, message, caller_data);
|
||||
}
|
||||
|
||||
-(void)respond: (void *) caller_data withObject:(void *)anObject
|
||||
{
|
||||
imp (responder, message, caller_data, anObject);
|
||||
}
|
||||
|
||||
-(BOOL) matchResponder: (id) responder :(SEL)message
|
||||
{
|
||||
return self.responder == responder && self.message == message;
|
||||
|
@ -63,4 +68,11 @@
|
|||
[listeners makeObjectsPerformSelector: @selector (respond:)
|
||||
withObject: caller_data];
|
||||
}
|
||||
|
||||
-(void)respond: (void *) caller_data withObject:(void *)anObject
|
||||
{
|
||||
[listeners makeObjectsPerformSelector: @selector (respond:)
|
||||
withObject: caller_data
|
||||
withObject: anObject];
|
||||
}
|
||||
@end
|
||||
|
|
Loading…
Reference in a new issue