yev_create_connect_event()

yev_create_connect_event()#

yev_create_connect_event() creates a new connect event associated with the specified event loop and callback function.

Prototype

yev_event_h yev_create_connect_event(
    yev_loop_h      yev_loop,
    yev_callback_t  callback,
    hgobj           gobj
);

Parameters

Key

Type

Description

yev_loop

yev_loop_h

The event loop handle in which the connect event will be created.

callback

yev_callback_t

The callback function to be invoked when the event is triggered. If it returns -1, the loop in yev_loop_run() will break.

gobj

hgobj

The associated GObj instance for event handling.


Return Value

Returns a yev_event_h handle to the newly created connect event, or NULL on failure.

Notes

Before starting the connect event, it must be configured using yev_setup_connect_event().

Prototype

// Not applicable in JS

Prototype

# Not applicable in Python
Examples
// TODO C examples
// TODO JS examples
# TODO Python examples