gclass_add_event_type()

gclass_add_event_type()#

Adds a new event type to the specified gclass. The event type is appended to the list of events associated with the gclass.

Prototype

int gclass_add_event_type(
    hgclass gclass, 
    event_type_t *event_type
);

Parameters

Key

Type

Description

gclass

hgclass

The gclass to which the event type will be added.

event_type

event_type_t *

Pointer to the event_type_t structure defining the event to be added.


Return Value

Returns 0 on success, or -1 if an error occurs.

Notes

Ensure that the event_type does not already exist in the gclass before calling gclass_add_event_type().

Prototype

// Not applicable in JS

Prototype

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