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
| Parameter | Type | Description |
|---|---|---|
app | gr_application_t* | A pointer to an application handle created using gr_application_create_args. |
event_target | const 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_name | const char* | The name of the event to send, must not be NULL. |
event_format | const char* | The format of the data, or NULL if no data is transmitted. |
event_data | const void* | A pointer to the data to transmit, or NULL if no data is transmitted. |
event_nbytes | int | The number of data bytes to transmit, or NULL if no data is transmitted. |
Returns
| Type | Description |
|---|---|
int | Zero on success, -1 on failure. |