EventMsg is an add-on for the Event system, which provides a layer of handlers to handle user messages (reason codes 17-19).
Much like Event_Claim, but for messages.
Pass this the type of message (message action) you want to register a handler for, the window for which this applies (where appropriate) and the handler function to attach. 'messagetype' or 'window' can by event_ANY to be called for any message or any window. 'reference' will be passed to your handler - it can be anything you want.
Priorities work like Event_Claim - specific window handlers have priority over all-window ones.
This will call Wimp_AddMessages for any message codes you claim, so that your task does not need to pass a list of messages to listen for when the Wimp_Initialise SWI is called by the Event library.
This releases all instances of 'handler' attached to the given message and window.
It returns the number of handlers released.
This releases the message handler which was attached with the given type, window, etc. This should be called with same parameters as were passed to EventMsg_Claim to claim it.
Finds and removes all message handlers that relate to the given window. If you pass in event_ANY as the window handle, all non-window-specific handlers will be released.
It returns the number of handlers released.
Finds and removes all message handlers that relate to the specified message type. If you pass in event_ANY as the type, all handlers that were registered as event_ANY will be released.
This is the function-type of the EventMsg_Claim and EventMsg_ReleaseSpecific functions. It is useful for writing functions which accept a pointer to either of these functions, in order to claim or release a set of message events consistently.