screen_send_event()
Graphics and Screen4.0 (8.x)Screen Graphics Subsystem Developer's GuideAPIProgrammingUtilities
Send an input event to a process
Synopsis:
#include <screen/screen.h>
int screen_send_event(screen_context_t ctx,
screen_event_t ev,
pid_t pid)
Arguments:
- ctx
- A context within Screen that was created with screen_create_context().
- ev
- An event handle that was created with screen_create_event(). This event must contain all the relevant event data pertaining to its type when injected into the system.
- pid
- The process the event is to be sent to.
Library:
libscreenDescription:
Function Type: Immediate Execution
A window manager and an input provider can use this function when they need to inject an event in the system. Prior to calling screen_send_event(), you must have set all relevant event properties to valid values, especially the event type property. To send input events, you must be
- within the process identified by pid or
- using a context with the SCREEN_WINDOW_MANAGER_CONTEXT or SCREEN_INPUT_PROVIDER_CONTEXT flag.
Returns:
0
if successful, or -1
if an error occurred (errno
is set; refer to errno.h
for more details).
Page updated: