Grx.Event.handler_add

@accepts(Grx.EventHandlerFunc, gpointer, GLib.DestroyNotify)
@returns(int)
def handler_add(callback, user_data, notify):
    # Python 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

user_data

user data passed to callback

notify

callback to destroy user_data when source is removed

Returns