## IBusObject

IBusObject — Base object of IBus.

## Stability Level

Stable, unless otherwise indicated

## Functions

#define | IBUS_OBJECT_FLAGS()
#define | IBUS_OBJECT_SET_FLAGS()
#define | IBUS_OBJECT_UNSET_FLAGS()
#define | IBUS_OBJECT_IN_DESTRUCTION()
#define | IBUS_OBJECT_DESTROYED()
IBusObject * | ibus_object_new ()
void | ibus_object_destroy ()

## Signals

void | destroy | Run Last

## Types and Values

enum | IBusObjectFlags
struct | IBusObject

## Object Hierarchy

        GFlags
        ╰── IBusObjectFlags
        GObject
        ╰── GInitiallyUnowned
            ╰── IBusObject
                ├── IBusSerializable
                ├── IBusBus
                ├── IBusService
                ╰── IBusKeymap

## Description

IBusObject is the base object for all objects in IBus.

## Functions

### IBUS_OBJECT_FLAGS()

    #define IBUS_OBJECT_FLAGS(obj)             (IBUS_OBJECT (obj)->flags)

### IBUS_OBJECT_SET_FLAGS()

    #define IBUS_OBJECT_SET_FLAGS(obj,flag)    G_STMT_START{ (IBUS_OBJECT_FLAGS (obj) |= (flag)); }G_STMT_END

### IBUS_OBJECT_UNSET_FLAGS()

    #define IBUS_OBJECT_UNSET_FLAGS(obj,flag)  G_STMT_START{ (IBUS_OBJECT_FLAGS (obj) &= ~(flag)); }G_STMT_END

### IBUS_OBJECT_IN_DESTRUCTION()

    #define IBUS_OBJECT_IN_DESTRUCTION(obj)    (IBUS_OBJECT_FLAGS (obj) & IBUS_IN_DESTRUCTION)

### IBUS_OBJECT_DESTROYED()

    #define IBUS_OBJECT_DESTROYED(obj)         (IBUS_OBJECT_FLAGS (obj) & IBUS_DESTROYED)

### ibus_object_new ()

    IBusObject *
    ibus_object_new (void);

Creates a new IBusObject.

#### Returns

A newly allocated IBusObject

### ibus_object_destroy ()

    void
    ibus_object_destroy (IBusObject *object);

Emit the "destory" signal notifying all reference holders that they should release the IBusObject.

The memory for the object itself won't be deleted until its reference count actually drops to 0; ibus_object_destroy merely asks reference holders to release their references. It does not free the object.

#### Parameters

object | an IBusObject to destroy. |

## Types and Values

### enum IBusObjectFlags

The flags are used internally.

#### Members

IBUS_IN_DESTRUCTION | Used in GObjectClass::dispose |
IBUS_DESTROYED | Used during emitting IBusObject::destroy signal. |
IBUS_RESERVED_1 | Reserved. |
IBUS_RESERVED_2 | Reserved. |

### struct IBusObject

    struct IBusObject;

All the fields in the IBusObject structure are private to the IBusObject and should never be accessed directly.

## Signal Details

### The `“destroy”` signal

    void
    user_function (IBusObject *object,
                   gpointer    user_data)

Destroy and free an IBusObject

See also: `ibus_object_destroy()`.

Argument `user_data` is ignored in this function.

#### Parameters

object | An IBusObject. |
user_data | user data set when the signal handler was connected. |

Flags: Run Last