gobj_create()

gobj_create()#

Creates a new GObj instance with the default settings.

Prototype

#define gobj_create(name, gclass, kw, parent) \
    gobj_create_gobj(name, gclass, kw, parent, 0)

Parameters

Key

Type

Description

name

const char *

The name of the GObj to be created.

gclass

gclass_name_t

The name of the GClass from which the GObj will be instantiated.

kw

json_t *

JSON object containing the attributes for initializing the GObj. This parameter is owned by the function.

parent

hgobj

Handle to the parent GObj. If NULL, the GObj is created without a parent.

Return Value

  • Returns the handle (hgobj) to the created GObj.

  • Returns NULL if the creation fails.

Prototype

// Not applicable in JS

Prototype

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