MSFEventListener

Objective-C


@interface MSFEventListener : NSObject {
  void *swigCPtr;
  BOOL swigCMemOwn;
}

Swift

class MSFEventListener : NSObject

What an app implements to receive facade events.

A director, so a Java or Objective-C subclass works. The C ABI uses a function pointer for the same job.

  • Called when a subscribed event fires.

    Declaration

    Objective-C

    - (BOOL)onEvent:(int)target event:(NSString *)event payload:(int)payload;

    Swift

    func onEvent(_ target: Int32, event: String!, payload: Int32) -> Bool

    Parameters

    target

    The object the event belongs to.

    event

    The event name, e.g. “map.clicked”.

    payload

    The event’s data, or 0 when it carries none. Read it with the property verbs; it is valid until this call returns.

    Return Value

    True to consume the event, when the subscription asked to consume.

  • Called when a subscribed event fires.

    Declaration

    Objective-C

    - (BOOL)onEventSwigExplicitMSFEventListener:(int)target
                                          event:(NSString *)event
                                        payload:(int)payload;

    Swift

    func onEventSwigExplicitMSFEventListener(_ target: Int32, event: String!, payload: Int32) -> Bool

    Parameters

    target

    The object the event belongs to.

    event

    The event name, e.g. “map.clicked”.

    payload

    The event’s data, or 0 when it carries none. Read it with the property verbs; it is valid until this call returns.

    Return Value

    True to consume the event, when the subscription asked to consume.

  • Undocumented

    Declaration

    Objective-C

    -(id)init;

    Swift

    init!()
  • Undocumented

    Declaration

    Objective-C

    -(void)dealloc;

    Swift

    func dealloc()