Python API 2.0 Reference
|
Static Public Member Functions | |
def | addUserEventCallback () |
def | deregisterUserEvent () |
def | isUserEvent () |
def | postUserEvent () |
def | registerUserEvent () |
Additional Inherited Members |
Class used to register callbacks for user event messages. Method resolution order: - MUserEventMessage - MMessage - builtins.object
|
static |
addUserEventCallback(eventName, function, clientData=None) -> id This method registers a callback for user-defined messages. The parameter clientData will be passed to callbacks registered for this event whenever the event is triggered. To override the data that is passed to the callback whenever the event is posted, you can supply a clientData pointer to postUserEvent().. * eventName (string) - the event name to register the callback for * function - callable which will be passed the clientData object * clientData - User defined data passed to the callback function * return: Identifier used for removing the callback.
|
static |
deregisterUserEvent(eventName) Removes the event type with the given event name. If callbacks have been registered with this event type, they will become invalid after a successful call to this method. * eventName (string) - the name of the new event to deregister.
|
static |
isUserEvent(eventName) -> bool Checks if an event type exists with the given event name. * eventName (string) - the name of the new event to check.
|
static |
postUserEvent(eventName, clientData=None) Notifies all callbacks attached to the given event type of the occurence of the event. If clientData is specified, this data will be passed to all callbacks that receive the event. If clientData is None (the default), the clientData registered with addUserEventCallback will be passed to the callbacks. * eventName (string) - the name of the new event. * clientData - User defined data.
|
static |
registerUserEvent(eventName) Adds a new event type with the given string identifier. The string identifier can then be used in all other MUserEventMessage methods to operate on the new event type. * eventName (string) - the name of the new event to register. Any non-empty string may be used as an event name.