Request Screen to send asynchronous notifications
#include <screen/screen.h>
int screen_notify(screen_context_t ctx, int flags, const void *obj, const struct sigevent *event)
Function Type: Immediate Execution
This function causes Screen to send an asynchronous notification to your application; it behaves similarly to ionotify(). You specify which type of notification your application wants to receive using the flags argument. Valid notification types are of type Screen notification types.
Calling this function disables any previous calls to screen_notify() that were called with the same combination of arguments: ctx, flags, and obj.
If necessary, notifications can be filtered by your application. For example, events specific to a keyboard, can be detected by passing the appropriate screen_device_t handle in the obj argument. Refer to the Screen Developer's Guide for more information.
0 if successful, or -1 if an error occurred (errno is set; refer to errno.h for more details).