Grx.Event.handler_add

function handler_add(callback: Grx.EventHandlerFunc): Number(guint) {
    // Gjs wrapper for grx_event_handler_add()
}
  

Creates a new event source and adds it to the default main context.

callback

the function to be called when an event occurs

Returns

the source id