Skip to main content
Version: 9.0.3

gr_application_send_event

#include <gre/gre.h>

int gr_application_send_event(
gr_application_t *app,
const char *event_target,
const char *event_name,
const char *event_format,
const void *event_data,
int event_nbytes
);

The gr_application_send_event function provides an interface to inject an event into the application event queue.

gr_application_send_event is used to inject an event into the application event queue. The event will be be processed after all events previously in the queue have been processed.

Parameters​

ParameterTypeDescription
appgr_application_t*A pointer to an application handle created using gr_application_create_args.
event_targetconst char*The name of the event target model element (screen, layer, control, render extension), or NULL to send to the default target (application level).
event_nameconst char*The name of the event to send, must not be NULL.
event_formatconst char*The format of the data, or NULL if no data is transmitted.
event_dataconst void*A pointer to the data to transmit, or NULL if no data is transmitted.
event_nbytesintThe number of data bytes to transmit, or NULL if no data is transmitted.

Returns​

TypeDescription
intZero on success, -1 on failure.