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.


Parameters:
        app A pointer to an application handle created using gr_application_create_args.
        event_target 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 The name of the event to send, must not be NULL
        event_format The format of the data, or NULL if no data is transmitted
        event_data A pointer do the data to transmit, or NULL if no data is transmitted
        event_bytes The number of data bytes to transmit, or NULL if no data is transmitted
        
Returns:

        Zero on success, -1 on failure.
        

The gr_application_send_event is the method 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.