Function Macro

GObjectDEFINE_INTERFACE

since: 2.24

Declaration [src]

#define G_DEFINE_INTERFACE (
  TN,
  t_n,
  T_P
)

Description [src]

A convenience macro for GTypeInterface definitions, which declares a default vtable initialization function and defines a *_get_type() function.

The macro expects the interface initialization function to have the name t_n ## _default_init, and the interface structure to have the name TN ## Interface.

The initialization function has signature static void t_n ## _default_init (TypeName#Interface*klass);, rather than the full GInterfaceInitFunc signature, for brevity and convenience. If you need to use an initialization function with an iface_data argument, you must write the GTypeInterface definitions manually.

Available since: 2.24

This function is not directly available to language bindings.

Parameters

TN

Type: -

The name of the new type, in Camel case.

t_n

Type: -

The name of the new type, in lowercase, with words separated by _.

T_P

Type: -

The GType of the prerequisite type for the interface, or G_TYPE_INVALID for no prerequisite type.