### Function Macro

# GObject DEFINE_INTERFACE_WITH_CODE

since: 2.24

#### Declaration

    #define G_DEFINE_INTERFACE_WITH_CODE (
      TN,
      t_n,
      T_P,
      _C_
    )

#### Description

A convenience macro for `GTypeInterface` definitions.

Similar to G_DEFINE_INTERFACE(), but allows you to insert custom code into the `*_get_type()` function, e.g. additional interface implementations via G_IMPLEMENT_INTERFACE(), or additional prerequisite types.

See G_DEFINE_TYPE_EXTENDED() for a similar example using G_DEFINE_TYPE_WITH_CODE().

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.

`_C_`

  Type: `-`

  Custom code that gets inserted in the `*_get_type()` function.