## IBusFactory

IBusFactory — Factory for creating engine instances.

## Stability Level

Stable, unless otherwise indicated

## Functions

IBusFactory * | ibus_factory_new ()
void | ibus_factory_add_engine ()
IBusEngine * | ibus_factory_create_engine ()

## Signals

IBusEngine* | create-engine | Run Last

## Types and Values

struct | IBusFactory

## Object Hierarchy

        GObject
        ╰── GInitiallyUnowned
            ╰── IBusObject
                ╰── IBusService
                    ╰── IBusFactory

## Description

An IBusFactory is an IBusService that creates input method engine (IME) instance. It provides CreateEngine remote method, which creates an IME instance by name, and returns the D-Bus object path to IBus daemon.

see_also: IBusEngine

## Functions

### ibus_factory_new ()

    IBusFactory *
    ibus_factory_new (GDBusConnection *connection);

Creates a new IBusFactory.

#### Parameters

connection | An GDBusConnection. |

#### Returns

A newly allocated IBusFactory.

### ibus_factory_add_engine ()

    void
    ibus_factory_add_engine (IBusFactory *factory,
                             const gchar *engine_name,
                             GType engine_type);

Add an engine to the factory.

#### Parameters

factory | An IBusFactory. |
engine_name | Name of an engine. |
engine_type | GType of an engine. |

### ibus_factory_create_engine ()

    IBusEngine *
    ibus_factory_create_engine (IBusFactory *factory,
                                const gchar *engine_name);

Creates an IBusEngine with `engine_name` .

#### Parameters

factory | An IBusFactory. |
engine_name | Name of an engine. |

#### Returns

IBusEngine with `engine_name` .

[transfer full]

## Types and Values

### struct IBusFactory

    struct IBusFactory;

An opaque data type representing an IBusFactory.

## Signal Details

### The `“create-engine”` signal

    IBusEngine*
    user_function (IBusFactory *factory,
                   char        *engine_name,
                   gpointer     user_data)

The ::create-engine signal is a signal to create IBusEngine with `engine_name` , which gets emitted when IBusFactory received CreateEngine dbus method. The callback functions will be called until a callback returns a non-null object of IBusEngine.

#### Parameters

factory | the factory which received the signal |
engine_name | the engine_name which received the signal |
returns | An IBusEngine. | [nullable][transfer full]
user_data | user data set when the signal handler was connected. |

Flags: Run Last