Harlequin RIP SDK
sw_event_handler Struct Reference

Event Handler structure. More...

#include "eventapi.h"

Data Fields

event_handler handler
 
void * context
 
HqnIdent reserved
 

Detailed Description

Event Handler structure.

This small structure is used to register a Handler. The structure MUST persist for the lifetime of the Handler's registration. A local structure must NOT be used!

The same sw_event_handler can be registered for multiple Events at the same time, but only once per Event - reregistration for the same Event will be treated as a reprioritisation of the previous registration. Note however that multiple sw_event_handler structures containing the same Handler and context pointers CAN be registered on the same Event.

In the current implementation, this is registered with the RDR system with a Class of RDR_CLASS_EVENT, Type of the Event Type and appropriate ID, but this must not be relied upon.

It is possible to change the contents of this structure while the Handler is still registered. Note that extreme care must be taken when doing so.

Field Documentation

◆ context

void* sw_event_handler::context

Handler's context - can be anything.

◆ handler

event_handler sw_event_handler::handler

Address of callback function.

◆ reserved

HqnIdent sw_event_handler::reserved

Reserved for future use - must be set to 0 by auto/static initialisers, must not be read or used by clients. Do not even use the name of this field, it may change in future.


The documentation for this struct was generated from the following file: