Function cmb_event_pattern_find
Defined in File cmb_event.h
Function Documentation
-
uint64_t cmb_event_pattern_find(cmb_event_func *action, const void *subject, const void *object)
Search in the event list for an event matching the given pattern and return its handle if one exists in the queue. Return zero if no match.
CMB_ANY_*are wildcards, matching any value in its position.Will start the search from the beginning of the event queue each time, since the queue may have changed in the meantime. There is no guarantee for it returning the event that will execute first, only that it will find some event that matches the search pattern if one exists in the queue. The sequence in which events are found is unspecified.
- Parameters:
action – Pointer to the event function to find, or
CMB_ANY_ACTIONsubject – Pointer to the subject to find, or
CMB_ANY_SUBJECTobject – Pointer to the object to find, or
CMB_ANY_OBJECT
- Returns:
The handle of an event matching the search pattern, zero if none.