mmr_event_data_set()

Set user data for the dictionary returned with the last event

Synopsis:

#include <mm/renderer/events.h>
int mmr_event_data_set( mmr_context_t *ctxt, void *usrdata )

Arguments:

ctxt

A context handle.

usrdata

A pointer to the user data to associate with the dictionary.

Library:

mmrndclient

Description:

Set a pointer to the user data to associate with the dictionary returned with the last event. The dictionary is stored in the mmr_event_t structure's data field and contains all the mm-renderer properties reported by the event.

Some event types, including STATE, ERROR, and WARNING, share a single dictionary and therefore have a common user data pointer. So, if you set the user data after receiving, say, a STATE event, the same user data pointer is returned with any subsequent STATE, ERROR, or WARNING event. Other event types, including METADATA, OUTPUT, and TRKPAR, each have multiple dictionaries, distinguished by an index stored in the mmr_event_t details field. So, if you set the user data after receiving say, a METADATA event with an index of 2, the same user data is returned only for other METADATA events whose index is also 2.

Returns:

Zero on success, or -1 if the event was MMR_EVENT_NONE or a deletion.

Classification:

QNX Neutrino

Safety:  
Interrupt handler No
Signal handler No
Thread No, except when using different context handles