| ibusbus.h | | ibusbus.h | |
| | | | |
| skipping to change at line 22 | | skipping to change at line 22 | |
| * This library is distributed in the hope that it will be useful, | | * This library is distributed in the hope that it will be useful, | |
| * but WITHOUT ANY WARRANTY; without even the implied warranty of | | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
| * Lesser General Public License for more details. | | * Lesser General Public License for more details. | |
| * | | * | |
| * You should have received a copy of the GNU Lesser General Public | | * You should have received a copy of the GNU Lesser General Public | |
| * License along with this library; if not, write to the | | * License along with this library; if not, write to the | |
| * Free Software Foundation, Inc., 59 Temple Place - Suite 330, | | * Free Software Foundation, Inc., 59 Temple Place - Suite 330, | |
| * Boston, MA 02111-1307, USA. | | * Boston, MA 02111-1307, USA. | |
| */ | | */ | |
|
| | | | |
| | | #if !defined (__IBUS_H_INSIDE__) && !defined (IBUS_COMPILATION) | |
| | | #error "Only <ibus.h> can be included directly" | |
| | | #endif | |
| | | | |
| /** | | /** | |
| * SECTION: ibusbus | | * SECTION: ibusbus | |
| * @short_description: Connect with IBus daemon. | | * @short_description: Connect with IBus daemon. | |
| * @stability: Stable | | * @stability: Stable | |
| * | | * | |
| * An IBusBus connects with IBus daemon. | | * An IBusBus connects with IBus daemon. | |
| */ | | */ | |
| #ifndef __IBUS_BUS_H_ | | #ifndef __IBUS_BUS_H_ | |
| #define __IBUS_BUS_H_ | | #define __IBUS_BUS_H_ | |
| | | | |
|
| | | #include <gio/gio.h> | |
| #include "ibusinputcontext.h" | | #include "ibusinputcontext.h" | |
| #include "ibusconfig.h" | | #include "ibusconfig.h" | |
| #include "ibuscomponent.h" | | #include "ibuscomponent.h" | |
| | | | |
| /* | | /* | |
| * Type macros. | | * Type macros. | |
| */ | | */ | |
| | | | |
| /* define GOBJECT macros */ | | /* define GOBJECT macros */ | |
| #define IBUS_TYPE_BUS \ | | #define IBUS_TYPE_BUS \ | |
| | | | |
| skipping to change at line 58 | | skipping to change at line 64 | |
| (G_TYPE_CHECK_INSTANCE_TYPE ((obj), IBUS_TYPE_BUS)) | | (G_TYPE_CHECK_INSTANCE_TYPE ((obj), IBUS_TYPE_BUS)) | |
| #define IBUS_IS_BUS_CLASS(klass) \ | | #define IBUS_IS_BUS_CLASS(klass) \ | |
| (G_TYPE_CHECK_CLASS_TYPE ((klass), IBUS_TYPE_BUS)) | | (G_TYPE_CHECK_CLASS_TYPE ((klass), IBUS_TYPE_BUS)) | |
| #define IBUS_BUS_GET_CLASS(obj) \ | | #define IBUS_BUS_GET_CLASS(obj) \ | |
| (G_TYPE_INSTANCE_GET_CLASS ((obj), IBUS_TYPE_BUS, IBusBusClass)) | | (G_TYPE_INSTANCE_GET_CLASS ((obj), IBUS_TYPE_BUS, IBusBusClass)) | |
| | | | |
| G_BEGIN_DECLS | | G_BEGIN_DECLS | |
| | | | |
| typedef struct _IBusBus IBusBus; | | typedef struct _IBusBus IBusBus; | |
| typedef struct _IBusBusClass IBusBusClass; | | typedef struct _IBusBusClass IBusBusClass; | |
|
| | | typedef struct _IBusBusPrivate IBusBusPrivate; | |
| | | | |
| /** | | /** | |
| * IBusBus: | | * IBusBus: | |
| * | | * | |
| * An opaque data type representing IBus bus (daemon communication) status. | | * An opaque data type representing IBus bus (daemon communication) status. | |
| */ | | */ | |
| struct _IBusBus { | | struct _IBusBus { | |
| IBusObject parent; | | IBusObject parent; | |
| /* instance members */ | | /* instance members */ | |
|
| | | | |
| | | IBusBusPrivate *priv; | |
| }; | | }; | |
| | | | |
| struct _IBusBusClass { | | struct _IBusBusClass { | |
| IBusObjectClass parent; | | IBusObjectClass parent; | |
| /* class members */ | | /* class members */ | |
| }; | | }; | |
| | | | |
| GType ibus_bus_get_type (void); | | GType ibus_bus_get_type (void); | |
| /** | | /** | |
| * ibus_bus_new: | | * ibus_bus_new: | |
| | | | |
| skipping to change at line 97 | | skipping to change at line 106 | |
| * | | * | |
| * Return TRUE if @bus is connected to IBus daemon. | | * Return TRUE if @bus is connected to IBus daemon. | |
| */ | | */ | |
| gboolean ibus_bus_is_connected (IBusBus *bus); | | gboolean ibus_bus_is_connected (IBusBus *bus); | |
| | | | |
| /** | | /** | |
| * ibus_bus_get_connection: | | * ibus_bus_get_connection: | |
| * @bus: An IBusBus. | | * @bus: An IBusBus. | |
| * @returns: TRUE if @bus is connected, FALSE otherwise. | | * @returns: TRUE if @bus is connected, FALSE otherwise. | |
| * | | * | |
|
| * Return IBusConnection of an IBusIBus instance. | | * Return GDBusConnection of an IBusIBus instance. | |
| */ | | */ | |
|
| IBusConnection | | GDBusConnection | |
| *ibus_bus_get_connection (IBusBus *bus); | | *ibus_bus_get_connection (IBusBus *bus); | |
| | | | |
| /** | | /** | |
| * ibus_bus_hello: | | * ibus_bus_hello: | |
| * @bus: An IBusBus. | | * @bus: An IBusBus. | |
| * @returns: The unique name of IBus process in DBus. | | * @returns: The unique name of IBus process in DBus. | |
| * | | * | |
| * This function sends a "HELLO" message to DBus daemon, | | * This function sends a "HELLO" message to DBus daemon, | |
| * which replies the unique name of current IBus process. | | * which replies the unique name of current IBus process. | |
| */ | | */ | |
| | | | |
| skipping to change at line 193 | | skipping to change at line 202 | |
| * Return the name owner. | | * Return the name owner. | |
| */ | | */ | |
| gchar *ibus_bus_get_name_owner (IBusBus *bus, | | gchar *ibus_bus_get_name_owner (IBusBus *bus, | |
| const gchar *name); | | const gchar *name); | |
| /* declare ibus methods */ | | /* declare ibus methods */ | |
| | | | |
| /** | | /** | |
| * ibus_bus_exit: | | * ibus_bus_exit: | |
| * @bus: An IBusBus. | | * @bus: An IBusBus. | |
| * @restart: Whether restarting the ibus. | | * @restart: Whether restarting the ibus. | |
|
| * @returns: TRUE if the "Exit" call is suceeded, FALSE otherwise. | | | |
| * | | * | |
| * Exit or restart an IBusBus. | | * Exit or restart an IBusBus. | |
| */ | | */ | |
|
| gboolean ibus_bus_exit (IBusBus *bus, | | void ibus_bus_exit (IBusBus *bus, | |
| gboolean restart); | | gboolean restart); | |
| | | | |
| /** | | /** | |
| * ibus_bus_create_input_context: | | * ibus_bus_create_input_context: | |
| * @bus: An IBusBus. | | * @bus: An IBusBus. | |
| * @client_name: Name of client. | | * @client_name: Name of client. | |
| * @returns: An newly allocated IBusInputContext if the "CreateInputContext
" call | | * @returns: An newly allocated IBusInputContext if the "CreateInputContext
" call | |
| * is suceeded, NULL otherwise. | | * is suceeded, NULL otherwise. | |
| * | | * | |
| * Create an input context for client. | | * Create an input context for client. | |
| | | | |
End of changes. 8 change blocks. |
| 4 lines changed or deleted | | 12 lines changed or added | |
|
| ibuscomponent.h | | ibuscomponent.h | |
| | | | |
| skipping to change at line 22 | | skipping to change at line 22 | |
| * This library is distributed in the hope that it will be useful, | | * This library is distributed in the hope that it will be useful, | |
| * but WITHOUT ANY WARRANTY; without even the implied warranty of | | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
| * Lesser General Public License for more details. | | * Lesser General Public License for more details. | |
| * | | * | |
| * You should have received a copy of the GNU Lesser General Public | | * You should have received a copy of the GNU Lesser General Public | |
| * License along with this library; if not, write to the | | * License along with this library; if not, write to the | |
| * Free Software Foundation, Inc., 59 Temple Place - Suite 330, | | * Free Software Foundation, Inc., 59 Temple Place - Suite 330, | |
| * Boston, MA 02111-1307, USA. | | * Boston, MA 02111-1307, USA. | |
| */ | | */ | |
|
| | | | |
| | | #if !defined (__IBUS_H_INSIDE__) && !defined (IBUS_COMPILATION) | |
| | | #error "Only <ibus.h> can be included directly" | |
| | | #endif | |
| | | | |
| /** | | /** | |
| * SECTION: ibuscomponent | | * SECTION: ibuscomponent | |
| * @short_description: Component (executable) specification. | | * @short_description: Component (executable) specification. | |
| * @title: IBusComponent | | * @title: IBusComponent | |
| * @stability: Stable | | * @stability: Stable | |
| * | | * | |
| * An IBusComponent is an executable program. | | * An IBusComponent is an executable program. | |
| * It provides services such as user interface, configuration, | | * It provides services such as user interface, configuration, | |
| * and input method engine (IME). | | * and input method engine (IME). | |
| * | | * | |
| | | | |
| skipping to change at line 69 | | skipping to change at line 74 | |
| (G_TYPE_CHECK_INSTANCE_TYPE ((obj), IBUS_TYPE_COMPONENT)) | | (G_TYPE_CHECK_INSTANCE_TYPE ((obj), IBUS_TYPE_COMPONENT)) | |
| #define IBUS_IS_COMPONENT_CLASS(klass) \ | | #define IBUS_IS_COMPONENT_CLASS(klass) \ | |
| (G_TYPE_CHECK_CLASS_TYPE ((klass), IBUS_TYPE_COMPONENT)) | | (G_TYPE_CHECK_CLASS_TYPE ((klass), IBUS_TYPE_COMPONENT)) | |
| #define IBUS_COMPONENT_GET_CLASS(obj) \ | | #define IBUS_COMPONENT_GET_CLASS(obj) \ | |
| (G_TYPE_INSTANCE_GET_CLASS ((obj), IBUS_TYPE_COMPONENT, IBusComponentCl
ass)) | | (G_TYPE_INSTANCE_GET_CLASS ((obj), IBUS_TYPE_COMPONENT, IBusComponentCl
ass)) | |
| | | | |
| G_BEGIN_DECLS | | G_BEGIN_DECLS | |
| | | | |
| typedef struct _IBusComponent IBusComponent; | | typedef struct _IBusComponent IBusComponent; | |
| typedef struct _IBusComponentClass IBusComponentClass; | | typedef struct _IBusComponentClass IBusComponentClass; | |
|
| | | typedef struct _IBusComponentPrivate IBusComponentPrivate; | |
| | | | |
| /** | | /** | |
| * IBusComponent: | | * IBusComponent: | |
|
| * @name: Name of the component. | | | |
| * @description: Detailed description of component. | | | |
| * @version: Component version. | | | |
| * @license: Distribution license of this component. | | | |
| * @author: Author(s) of the component. | | | |
| * @homepage: Homepage of the component. | | | |
| * @exec: path to component executable. | | | |
| * @textdomain: Domain name for dgettext() | | | |
| * | | * | |
| * An IBusComponent stores component information. | | * An IBusComponent stores component information. | |
|
| | | * You can get extended values with g_object_get_properties. | |
| | | * name: Name of the component. | |
| | | * description: Detailed description of component. | |
| | | * version: Component version. | |
| | | * license: Distribution license of this component. | |
| | | * author: Author(s) of the component. | |
| | | * homepage: Homepage of the component. | |
| | | * exec: path to component executable. | |
| | | * textdomain: Domain name for dgettext() | |
| */ | | */ | |
| struct _IBusComponent { | | struct _IBusComponent { | |
|
| | | /*< private >*/ | |
| IBusSerializable parent; | | IBusSerializable parent; | |
|
| | | IBusComponentPrivate *priv; | |
| /* instance members */ | | /* instance members */ | |
| | | | |
| /*< public >*/ | | /*< public >*/ | |
|
| gchar *name; | | | |
| gchar *description; | | | |
| gchar *version; | | | |
| gchar *license; | | | |
| gchar *author; | | | |
| gchar *homepage; | | | |
| gchar *exec; | | | |
| | | | |
| /* text domain for dgettext */ | | | |
| gchar *textdomain; | | | |
| | | | |
| /*< private >*/ | | /*< private >*/ | |
| /* engines */ | | /* engines */ | |
| GList *engines; | | GList *engines; | |
| | | | |
| /* observed paths */ | | /* observed paths */ | |
| GList *observed_paths; | | GList *observed_paths; | |
| | | | |
| GPid pid; | | GPid pid; | |
| guint child_source_id; | | guint child_source_id; | |
| | | | |
| skipping to change at line 145 | | skipping to change at line 144 | |
| IBusComponent *ibus_component_new (const gchar *name, | | IBusComponent *ibus_component_new (const gchar *name, | |
| const gchar *descriptio
n, | | const gchar *descriptio
n, | |
| const gchar *version, | | const gchar *version, | |
| const gchar *license, | | const gchar *license, | |
| const gchar *author, | | const gchar *author, | |
| const gchar *homepage, | | const gchar *homepage, | |
| const gchar *exec, | | const gchar *exec, | |
| const gchar *textdomain
); | | const gchar *textdomain
); | |
| | | | |
| /** | | /** | |
|
| | | * ibus_component_new2: | |
| | | * @first_property_name: Name of the first property. | |
| | | * @Varargs: the NULL-terminated arguments of the properties and values. | |
| | | * | |
| | | * New an IBusComponent. | |
| | | * ibus_component_new2() supports the va_list format. | |
| | | * name property is required. e.g. | |
| | | * IBusComponent *component = ibus_component_new2 ("name", "ibus-foo", | |
| | | * "exec", "/usr/libexec/ib | |
| | | us-engine-foo --ibus", | |
| | | * NULL) | |
| | | */ | |
| | | IBusComponent *ibus_component_new2 (const gchar *first_prop | |
| | | erty_name, | |
| | | ...); | |
| | | | |
| | | /** | |
| * ibus_component_new_from_xml_node: | | * ibus_component_new_from_xml_node: | |
| * @node: Root node of component XML tree. | | * @node: Root node of component XML tree. | |
| * @returns: A newly allocated IBusComponent. | | * @returns: A newly allocated IBusComponent. | |
| * | | * | |
| * New an IBusComponent from an XML tree. | | * New an IBusComponent from an XML tree. | |
| */ | | */ | |
| IBusComponent *ibus_component_new_from_xml_node | | IBusComponent *ibus_component_new_from_xml_node | |
| (XMLNode *node); | | (XMLNode *node); | |
| | | | |
| /** | | /** | |
| | | | |
| skipping to change at line 167 | | skipping to change at line 181 | |
| * @returns: A newly allocated IBusComponent. | | * @returns: A newly allocated IBusComponent. | |
| * | | * | |
| * New an IBusComponent from an XML file. | | * New an IBusComponent from an XML file. | |
| * Note that a component file usually contains engine descriptions, | | * Note that a component file usually contains engine descriptions, | |
| * if it does, ibus_engine_desc_new_from_xml_node() will be called | | * if it does, ibus_engine_desc_new_from_xml_node() will be called | |
| * to load the engine descriptions. | | * to load the engine descriptions. | |
| */ | | */ | |
| IBusComponent *ibus_component_new_from_file (const gchar *filename); | | IBusComponent *ibus_component_new_from_file (const gchar *filename); | |
| | | | |
| /** | | /** | |
|
| | | * ibus_component_get_name: | |
| | | * @component: An IBusComponent | |
| | | * @returns: name property in IBusComponent | |
| | | * | |
| | | * Return the name property in IBusComponent. It should not be freed. | |
| | | */ | |
| | | const gchar *ibus_component_get_name (IBusComponent *component) | |
| | | ; | |
| | | | |
| | | /** | |
| | | * ibus_component_get_description: | |
| | | * @component: An IBusComponent | |
| | | * @returns: description property in IBusComponent | |
| | | * | |
| | | * Return the description property in IBusComponent. It should not be freed | |
| | | . | |
| | | */ | |
| | | const gchar *ibus_component_get_description (IBusComponent *component) | |
| | | ; | |
| | | | |
| | | /** | |
| | | * ibus_component_get_version: | |
| | | * @component: An IBusComponent | |
| | | * @returns: version property in IBusComponent | |
| | | * | |
| | | * Return the version property in IBusComponent. It should not be freed. | |
| | | */ | |
| | | const gchar *ibus_component_get_version (IBusComponent *component) | |
| | | ; | |
| | | | |
| | | /** | |
| | | * ibus_component_get_license: | |
| | | * @component: An IBusComponent | |
| | | * @returns: license property in IBusComponent | |
| | | * | |
| | | * Return the license property in IBusComponent. It should not be freed. | |
| | | */ | |
| | | const gchar *ibus_component_get_license (IBusComponent *component) | |
| | | ; | |
| | | | |
| | | /** | |
| | | * ibus_component_get_author: | |
| | | * @component: An IBusComponent | |
| | | * @returns: author property in IBusComponent | |
| | | * | |
| | | * Return the author property in IBusComponent. It should not be freed. | |
| | | */ | |
| | | const gchar *ibus_component_get_author (IBusComponent *component) | |
| | | ; | |
| | | | |
| | | /** | |
| | | * ibus_component_get_homepage: | |
| | | * @component: An IBusComponent | |
| | | * @returns: homepage property in IBusComponent | |
| | | * | |
| | | * Return the homepage property in IBusComponent. It should not be freed. | |
| | | */ | |
| | | const gchar *ibus_component_get_homepage (IBusComponent *component) | |
| | | ; | |
| | | | |
| | | /** | |
| | | * ibus_component_get_exec: | |
| | | * @component: An IBusComponent | |
| | | * @returns: exec property in IBusComponent | |
| | | * | |
| | | * Return the exec property in IBusComponent. It should not be freed. | |
| | | */ | |
| | | const gchar *ibus_component_get_exec (IBusComponent *component) | |
| | | ; | |
| | | | |
| | | /** | |
| | | * ibus_component_get_textdomain: | |
| | | * @component: An IBusComponent | |
| | | * @returns: textdomain property in IBusComponent | |
| | | * | |
| | | * Return the textdomain property in IBusComponent. It should not be freed. | |
| | | */ | |
| | | const gchar *ibus_component_get_textdomain (IBusComponent *component) | |
| | | ; | |
| | | | |
| | | /** | |
| * ibus_component_add_observed_path: | | * ibus_component_add_observed_path: | |
| * @component: An IBusComponent | | * @component: An IBusComponent | |
| * @path: Observed path to be added. | | * @path: Observed path to be added. | |
| * @access_fs: TRUE for filling the file status; FALSE otherwise. | | * @access_fs: TRUE for filling the file status; FALSE otherwise. | |
| * | | * | |
| * Add an observed path to IBusComponent. | | * Add an observed path to IBusComponent. | |
| */ | | */ | |
| void ibus_component_add_observed_path | | void ibus_component_add_observed_path | |
| (IBusComponent *component, | | (IBusComponent *component, | |
| const gchar *path, | | const gchar *path, | |
| | | | |
End of changes. 9 change blocks. |
| 18 lines changed or deleted | | 115 lines changed or added | |
|
| ibusconfig.h | | ibusconfig.h | |
| | | | |
| skipping to change at line 22 | | skipping to change at line 22 | |
| * This library is distributed in the hope that it will be useful, | | * This library is distributed in the hope that it will be useful, | |
| * but WITHOUT ANY WARRANTY; without even the implied warranty of | | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
| * Lesser General Public License for more details. | | * Lesser General Public License for more details. | |
| * | | * | |
| * You should have received a copy of the GNU Lesser General Public | | * You should have received a copy of the GNU Lesser General Public | |
| * License along with this library; if not, write to the | | * License along with this library; if not, write to the | |
| * Free Software Foundation, Inc., 59 Temple Place - Suite 330, | | * Free Software Foundation, Inc., 59 Temple Place - Suite 330, | |
| * Boston, MA 02111-1307, USA. | | * Boston, MA 02111-1307, USA. | |
| */ | | */ | |
|
| | | | |
| | | #if !defined (__IBUS_H_INSIDE__) && !defined (IBUS_COMPILATION) | |
| | | #error "Only <ibus.h> can be included directly" | |
| | | #endif | |
| | | | |
| /** | | /** | |
| * SECTION: ibusconfig | | * SECTION: ibusconfig | |
| * @title: IBusConfig | | * @title: IBusConfig | |
| * @short_description: IBus engine configuration module. | | * @short_description: IBus engine configuration module. | |
| * | | * | |
| * An IBusConfig provides engine configuration methods | | * An IBusConfig provides engine configuration methods | |
| * such as get and set the configure settings to configuration file. | | * such as get and set the configure settings to configuration file. | |
| * | | * | |
| * Currently, IBusConfig supports gconf. | | * Currently, IBusConfig supports gconf. | |
| */ | | */ | |
| | | | |
| skipping to change at line 79 | | skipping to change at line 84 | |
| | | | |
| struct _IBusConfigClass { | | struct _IBusConfigClass { | |
| IBusProxyClass parent; | | IBusProxyClass parent; | |
| /* class members */ | | /* class members */ | |
| }; | | }; | |
| | | | |
| GType ibus_config_get_type (void); | | GType ibus_config_get_type (void); | |
| | | | |
| /** | | /** | |
| * ibus_config_new: | | * ibus_config_new: | |
|
| * @connection: An IBusConnection. | | * @connection: An GDBusConnection. | |
| * @returns: An newly allocated IBusConfig corresponding to @connection. | | * @returns: An newly allocated IBusConfig corresponding to @connection. | |
| * | | * | |
|
| * New a IBusConfig from existing IBusConnection. | | * New a IBusConfig from existing GDBusConnection. | |
| */ | | */ | |
|
| IBusConfig *ibus_config_new (IBusConnection *connection | | IBusConfig *ibus_config_new (GDBusConnection *connection | |
| ); | | , | |
| | | GCancellable *cancellabl | |
| | | e, | |
| | | GError **error); | |
| | | | |
| /** | | /** | |
| * ibus_config_get_value: | | * ibus_config_get_value: | |
| * @config: An IBusConfig | | * @config: An IBusConfig | |
| * @section: Section name of the configuration option. | | * @section: Section name of the configuration option. | |
| * @name: Name of the configure option. | | * @name: Name of the configure option. | |
|
| * @value: GValue that holds the value. | | * @returns: a GVariant. | |
| * @returns: TRUE if succeed; FALSE otherwise. | | | |
| * | | * | |
| * Get the value of a configuration option. | | * Get the value of a configuration option. | |
| * | | * | |
| * GConf stores configure options in a tree-like structure, | | * GConf stores configure options in a tree-like structure, | |
| * and the IBus related setting is at /desktop/ibus, | | * and the IBus related setting is at /desktop/ibus, | |
| * thus, @section here is a path from there, | | * thus, @section here is a path from there, | |
| * while @name is the key of that configuration option. | | * while @name is the key of that configuration option. | |
| * | | * | |
| * ibus-chewing, for example, stores its setting in /desktop/ibus/engine/Ch
ewing, | | * ibus-chewing, for example, stores its setting in /desktop/ibus/engine/Ch
ewing, | |
| * so the section name for it is "engine/Chewing". | | * so the section name for it is "engine/Chewing". | |
| * @see_also: ibus_config_set_value. | | * @see_also: ibus_config_set_value. | |
| */ | | */ | |
|
| gboolean ibus_config_get_value (IBusConfig *config, | | GVariant *ibus_config_get_value (IBusConfig *config, | |
| const gchar *section, | | const gchar *section, | |
|
| const gchar *name, | | const gchar *name); | |
| GValue *value); | | | |
| | | | |
| /** | | /** | |
| * ibus_config_set_value: | | * ibus_config_set_value: | |
| * @config: An IBusConfig | | * @config: An IBusConfig | |
| * @section: Section name of the configuration option. | | * @section: Section name of the configuration option. | |
| * @name: Name of the configure option its self. | | * @name: Name of the configure option its self. | |
| * @value: GValue that holds the value. | | * @value: GValue that holds the value. | |
| * @returns: TRUE if succeed; FALSE otherwise. | | * @returns: TRUE if succeed; FALSE otherwise. | |
| * | | * | |
| * Set the value of a configuration option. | | * Set the value of a configuration option. | |
| * @see_also: ibus_config_get_value. | | * @see_also: ibus_config_get_value. | |
| */ | | */ | |
| gboolean ibus_config_set_value (IBusConfig *config, | | gboolean ibus_config_set_value (IBusConfig *config, | |
| const gchar *section, | | const gchar *section, | |
| const gchar *name, | | const gchar *name, | |
|
| const GValue *value); | | GVariant *value); | |
| | | | |
| /** | | /** | |
| * ibus_config_unset: | | * ibus_config_unset: | |
| * @config: An IBusConfig | | * @config: An IBusConfig | |
| * @section: Section name of the configuration option. | | * @section: Section name of the configuration option. | |
| * @name: Name of the configure option its self. | | * @name: Name of the configure option its self. | |
| * @returns: TRUE if succeed; FALSE otherwise. | | * @returns: TRUE if succeed; FALSE otherwise. | |
| * | | * | |
| * Remove an entry of a configuration option. | | * Remove an entry of a configuration option. | |
| * @see_also: ibus_config_get_value. | | * @see_also: ibus_config_get_value. | |
| | | | |
End of changes. 8 change blocks. |
| 10 lines changed or deleted | | 16 lines changed or added | |
|
| ibusconfigservice.h | | ibusconfigservice.h | |
| | | | |
| skipping to change at line 22 | | skipping to change at line 22 | |
| * This library is distributed in the hope that it will be useful, | | * This library is distributed in the hope that it will be useful, | |
| * but WITHOUT ANY WARRANTY; without even the implied warranty of | | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
| * Lesser General Public License for more details. | | * Lesser General Public License for more details. | |
| * | | * | |
| * You should have received a copy of the GNU Lesser General Public | | * You should have received a copy of the GNU Lesser General Public | |
| * License along with this library; if not, write to the | | * License along with this library; if not, write to the | |
| * Free Software Foundation, Inc., 59 Temple Place - Suite 330, | | * Free Software Foundation, Inc., 59 Temple Place - Suite 330, | |
| * Boston, MA 02111-1307, USA. | | * Boston, MA 02111-1307, USA. | |
| */ | | */ | |
|
| | | | |
| | | #if !defined (__IBUS_H_INSIDE__) && !defined (IBUS_COMPILATION) | |
| | | #error "Only <ibus.h> can be included directly" | |
| | | #endif | |
| | | | |
| /** | | /** | |
| * SECTION: ibusconfigservice | | * SECTION: ibusconfigservice | |
| * @short_description: Configuration service back-end. | | * @short_description: Configuration service back-end. | |
| * @stability: Stable | | * @stability: Stable | |
| * | | * | |
| * An IBusConfigService is a base class for other configuration services su
ch as GConf. | | * An IBusConfigService is a base class for other configuration services su
ch as GConf. | |
| * Currently, directly known sub class is IBusConfigGConf. | | * Currently, directly known sub class is IBusConfigGConf. | |
| * | | * | |
| * IBusConfigServiceClass has following member functions: | | * IBusConfigServiceClass has following member functions: | |
| * <itemizedlist> | | * <itemizedlist> | |
| | | | |
| skipping to change at line 132 | | skipping to change at line 137 | |
| * </varlistentry> | | * </varlistentry> | |
| * </variablelist> | | * </variablelist> | |
| * <para>Remove an entry to a configuration option. | | * <para>Remove an entry to a configuration option. | |
| * </para> | | * </para> | |
| * </listitem> | | * </listitem> | |
| * </itemizedlist> | | * </itemizedlist> | |
| */ | | */ | |
| #ifndef __IBUS_CONFIG_SERVICE_H_ | | #ifndef __IBUS_CONFIG_SERVICE_H_ | |
| #define __IBUS_CONFIG_SERVICE_H_ | | #define __IBUS_CONFIG_SERVICE_H_ | |
| | | | |
|
| #include "ibuserror.h" | | | |
| #include "ibusservice.h" | | #include "ibusservice.h" | |
| | | | |
| /* | | /* | |
| * Type macros. | | * Type macros. | |
| */ | | */ | |
| | | | |
| /* define GOBJECT macros */ | | /* define GOBJECT macros */ | |
| #define IBUS_TYPE_CONFIG_SERVICE \ | | #define IBUS_TYPE_CONFIG_SERVICE \ | |
| (ibus_config_service_get_type ()) | | (ibus_config_service_get_type ()) | |
| #define IBUS_CONFIG_SERVICE(obj) \ | | #define IBUS_CONFIG_SERVICE(obj) \ | |
| | | | |
| skipping to change at line 164 | | skipping to change at line 168 | |
| | | | |
| typedef struct _IBusConfigService IBusConfigService; | | typedef struct _IBusConfigService IBusConfigService; | |
| typedef struct _IBusConfigServiceClass IBusConfigServiceClass; | | typedef struct _IBusConfigServiceClass IBusConfigServiceClass; | |
| | | | |
| /** | | /** | |
| * IBusConfigService: | | * IBusConfigService: | |
| * | | * | |
| * An opaque data type representing a configure service. | | * An opaque data type representing a configure service. | |
| */ | | */ | |
| struct _IBusConfigService { | | struct _IBusConfigService { | |
|
| | | /*< private >*/ | |
| IBusService parent; | | IBusService parent; | |
|
| | | /* IBusConfigServicePriv *priv */ | |
| | | | |
| /* instance members */ | | /* instance members */ | |
| }; | | }; | |
| | | | |
| struct _IBusConfigServiceClass { | | struct _IBusConfigServiceClass { | |
|
| | | /*< private >*/ | |
| IBusServiceClass parent; | | IBusServiceClass parent; | |
| | | | |
|
| | | /*< public >*/ | |
| /* class members */ | | /* class members */ | |
|
| gboolean (* set_value) (IBusConfigService *config, | | gboolean (* set_value) (IBusConfigService *config, | |
| const gchar *section, | | const gchar *section, | |
| const gchar *name, | | const gchar *name, | |
| const GValue *value, | | GVariant *value, | |
| IBusError **error); | | GError **error); | |
| gboolean (* get_value) (IBusConfigService *config, | | /** | |
| const gchar *section, | | * get_value: | |
| const gchar *name, | | * @config: An IBusConfig. | |
| GValue *value, | | * @section: section name | |
| IBusError **error); | | * @name: value name | |
| gboolean (* unset) (IBusConfigService *config, | | * | |
| const gchar *section, | | * @returns: (transfer full): The value in config associated with secti | |
| const gchar *name, | | on and name. | |
| IBusError **error); | | * | |
| | | */ | |
| | | GVariant * (* get_value) (IBusConfigService *config, | |
| | | const gchar *section, | |
| | | const gchar *name, | |
| | | GError **error); | |
| | | gboolean (* unset_value) (IBusConfigService *config, | |
| | | const gchar *section, | |
| | | const gchar *name, | |
| | | GError **error); | |
| | | | |
| /*< private >*/ | | /*< private >*/ | |
| /* padding */ | | /* padding */ | |
| gpointer pdummy[13]; | | gpointer pdummy[13]; | |
| }; | | }; | |
| | | | |
| GType ibus_config_service_get_type (void); | | GType ibus_config_service_get_type (void); | |
| | | | |
| /** | | /** | |
| * ibus_config_service_new: | | * ibus_config_service_new: | |
|
| * @connection: An IBusConnection. | | * @connection: An GDBusConnection. | |
| * @returns: A newly allocated IBusConfigServices. | | * @returns: A newly allocated IBusConfigServices. | |
| * | | * | |
|
| * New an IBusConfigService from an IBusConnection. | | * New an IBusConfigService from an GDBusConnection. | |
| */ | | */ | |
|
| IBusConfigService *ibus_config_service_new (IBusConnection *co
nnection); | | IBusConfigService *ibus_config_service_new (GDBusConnection *c
onnection); | |
| | | | |
| /** | | /** | |
| * ibus_config_service_value_changed: | | * ibus_config_service_value_changed: | |
| * @config: An IBusConfigService. | | * @config: An IBusConfigService. | |
| * @section: Section name of the configuration option. | | * @section: Section name of the configuration option. | |
| * @name: Name of the configure option. | | * @name: Name of the configure option. | |
|
| * @value: GValue that holds the value. | | * @value: GVariant that holds the value. | |
| * | | * | |
| * Change a value of a configuration option | | * Change a value of a configuration option | |
| * by sending a "ValueChanged" message to IBus service. | | * by sending a "ValueChanged" message to IBus service. | |
| */ | | */ | |
| void ibus_config_service_value_changed | | void ibus_config_service_value_changed | |
| (IBusConfigService *co
nfig, | | (IBusConfigService *co
nfig, | |
| const gchar *se
ction, | | const gchar *se
ction, | |
| const gchar *na
me, | | const gchar *na
me, | |
|
| const GValue *va
lue); | | GVariant *va
lue); | |
| | | | |
| G_END_DECLS | | G_END_DECLS | |
| #endif | | #endif | |
| | | | |
End of changes. 12 change blocks. |
| 20 lines changed or deleted | | 38 lines changed or added | |
|
| ibusengine.h | | ibusengine.h | |
| | | | |
| skipping to change at line 22 | | skipping to change at line 22 | |
| * This library is distributed in the hope that it will be useful, | | * This library is distributed in the hope that it will be useful, | |
| * but WITHOUT ANY WARRANTY; without even the implied warranty of | | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
| * Lesser General Public License for more details. | | * Lesser General Public License for more details. | |
| * | | * | |
| * You should have received a copy of the GNU Lesser General Public | | * You should have received a copy of the GNU Lesser General Public | |
| * License along with this library; if not, write to the | | * License along with this library; if not, write to the | |
| * Free Software Foundation, Inc., 59 Temple Place - Suite 330, | | * Free Software Foundation, Inc., 59 Temple Place - Suite 330, | |
| * Boston, MA 02111-1307, USA. | | * Boston, MA 02111-1307, USA. | |
| */ | | */ | |
|
| | | | |
| | | #if !defined (__IBUS_H_INSIDE__) && !defined (IBUS_COMPILATION) | |
| | | #error "Only <ibus.h> can be included directly" | |
| | | #endif | |
| | | | |
| /** | | /** | |
| * SECTION: ibusengine | | * SECTION: ibusengine | |
| * @short_description: Input method engine abstract. | | * @short_description: Input method engine abstract. | |
| * @title: IBusEngine | | * @title: IBusEngine | |
| * @stability: Stable | | * @stability: Stable | |
| * | | * | |
| * An IBusEngine provides infrastructure for input method engine. | | * An IBusEngine provides infrastructure for input method engine. | |
| * Developers can "extend" this class for input method engine development. | | * Developers can "extend" this class for input method engine development. | |
| * | | * | |
| * @see_also: #IBusComponent, #IBusEngineDesc | | * @see_also: #IBusComponent, #IBusEngineDesc | |
| | | | |
| skipping to change at line 63 | | skipping to change at line 68 | |
| (G_TYPE_CHECK_INSTANCE_TYPE ((obj), IBUS_TYPE_ENGINE)) | | (G_TYPE_CHECK_INSTANCE_TYPE ((obj), IBUS_TYPE_ENGINE)) | |
| #define IBUS_IS_ENGINE_CLASS(klass) \ | | #define IBUS_IS_ENGINE_CLASS(klass) \ | |
| (G_TYPE_CHECK_CLASS_TYPE ((klass), IBUS_TYPE_ENGINE)) | | (G_TYPE_CHECK_CLASS_TYPE ((klass), IBUS_TYPE_ENGINE)) | |
| #define IBUS_ENGINE_GET_CLASS(obj) \ | | #define IBUS_ENGINE_GET_CLASS(obj) \ | |
| (G_TYPE_INSTANCE_GET_CLASS ((obj), IBUS_TYPE_ENGINE, IBusEngineClass)) | | (G_TYPE_INSTANCE_GET_CLASS ((obj), IBUS_TYPE_ENGINE, IBusEngineClass)) | |
| | | | |
| G_BEGIN_DECLS | | G_BEGIN_DECLS | |
| | | | |
| typedef struct _IBusEngine IBusEngine; | | typedef struct _IBusEngine IBusEngine; | |
| typedef struct _IBusEngineClass IBusEngineClass; | | typedef struct _IBusEngineClass IBusEngineClass; | |
|
| | | typedef struct _IBusEnginePrivate IBusEnginePrivate; | |
| | | | |
| /** | | /** | |
| * IBusEngine: | | * IBusEngine: | |
| * @enabled: Whether the engine is enabled. | | * @enabled: Whether the engine is enabled. | |
| * @has_focus: Whether the engine has focus. | | * @has_focus: Whether the engine has focus. | |
| * @cursor_area: Area of cursor. | | * @cursor_area: Area of cursor. | |
| * @client_capabilities: IBusCapabilite (client capabilities) flags. | | * @client_capabilities: IBusCapabilite (client capabilities) flags. | |
| * | | * | |
| * IBusEngine properties. | | * IBusEngine properties. | |
| */ | | */ | |
| struct _IBusEngine { | | struct _IBusEngine { | |
|
| | | /*< private >*/ | |
| IBusService parent; | | IBusService parent; | |
|
| | | IBusEnginePrivate *priv; | |
| | | | |
| /* instance members */ | | /* instance members */ | |
| /*< public >*/ | | /*< public >*/ | |
| gboolean enabled; | | gboolean enabled; | |
| gboolean has_focus; | | gboolean has_focus; | |
| | | | |
| /* cursor location */ | | /* cursor location */ | |
| IBusRectangle cursor_area; | | IBusRectangle cursor_area; | |
| guint client_capabilities; | | guint client_capabilities; | |
| }; | | }; | |
| | | | |
| struct _IBusEngineClass { | | struct _IBusEngineClass { | |
|
| | | /*< private >*/ | |
| IBusServiceClass parent; | | IBusServiceClass parent; | |
| | | | |
| /* class members */ | | /* class members */ | |
|
| | | /*< public >*/ | |
| | | /* signals */ | |
| gboolean (* process_key_event) | | gboolean (* process_key_event) | |
| (IBusEngine *engine, | | (IBusEngine *engine, | |
| guint keyval, | | guint keyval, | |
| guint keycode, | | guint keycode, | |
| guint state); | | guint state); | |
| void (* focus_in) (IBusEngine *engine); | | void (* focus_in) (IBusEngine *engine); | |
| void (* focus_out) (IBusEngine *engine); | | void (* focus_out) (IBusEngine *engine); | |
| void (* reset) (IBusEngine *engine); | | void (* reset) (IBusEngine *engine); | |
| void (* enable) (IBusEngine *engine); | | void (* enable) (IBusEngine *engine); | |
| void (* disable) (IBusEngine *engine); | | void (* disable) (IBusEngine *engine); | |
| | | | |
| skipping to change at line 139 | | skipping to change at line 151 | |
| /* padding */ | | /* padding */ | |
| gpointer pdummy[8]; | | gpointer pdummy[8]; | |
| }; | | }; | |
| | | | |
| GType ibus_engine_get_type (void); | | GType ibus_engine_get_type (void); | |
| | | | |
| /** | | /** | |
| * ibus_engine_new: | | * ibus_engine_new: | |
| * @name: Name of the IBusObject. | | * @name: Name of the IBusObject. | |
| * @path: Path for IBusService. | | * @path: Path for IBusService. | |
|
| * @connection: An opened IBusConnection. | | * @connection: An opened GDBusConnection. | |
| | | * @returns: A newly allocated IBusEngine. | |
| | | * | |
| | | * New an IBusEngine. | |
| | | */ | |
| | | IBusEngine *ibus_engine_new (const gchar *engine_name, | |
| | | const gchar *object_path, | |
| | | GDBusConnection *connection); | |
| | | /** | |
| | | * ibus_engine_new_type: | |
| | | * @engine_type: GType of subclass of IBUS_TYPE_ENGINE | |
| | | * @engine_name: Name of the IBusObject. | |
| | | * @object_path: Path for IBusService. | |
| | | * @connection: An opened GDBusConnection. | |
| * @returns: A newly allocated IBusEngine. | | * @returns: A newly allocated IBusEngine. | |
| * | | * | |
| * New an IBusEngine. | | * New an IBusEngine. | |
| */ | | */ | |
|
| IBusEngine *ibus_engine_new (const gchar *name, | | IBusEngine *ibus_engine_new_type (GType engine_type, | |
| const gchar *path, | | const gchar *engine_name, | |
| IBusConnection *connection); | | const gchar *object_path, | |
| | | GDBusConnection *connection); | |
| | | | |
| /** | | /** | |
| * ibus_engine_commit_text: | | * ibus_engine_commit_text: | |
| * @engine: An IBusEngine. | | * @engine: An IBusEngine. | |
| * @text: String commit to IBusEngine. | | * @text: String commit to IBusEngine. | |
| * | | * | |
| * Commit output of input method to IBus client. | | * Commit output of input method to IBus client. | |
| * | | * | |
| * (Note: The text object will be released, if it is floating. | | * (Note: The text object will be released, if it is floating. | |
| * If caller want to keep the object, caller should make the object | | * If caller want to keep the object, caller should make the object | |
| | | | |
End of changes. 8 change blocks. |
| 4 lines changed or deleted | | 30 lines changed or added | |
|
| ibusenginedesc.h | | ibusenginedesc.h | |
| | | | |
| skipping to change at line 22 | | skipping to change at line 22 | |
| * This library is distributed in the hope that it will be useful, | | * This library is distributed in the hope that it will be useful, | |
| * but WITHOUT ANY WARRANTY; without even the implied warranty of | | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
| * Lesser General Public License for more details. | | * Lesser General Public License for more details. | |
| * | | * | |
| * You should have received a copy of the GNU Lesser General Public | | * You should have received a copy of the GNU Lesser General Public | |
| * License along with this library; if not, write to the | | * License along with this library; if not, write to the | |
| * Free Software Foundation, Inc., 59 Temple Place - Suite 330, | | * Free Software Foundation, Inc., 59 Temple Place - Suite 330, | |
| * Boston, MA 02111-1307, USA. | | * Boston, MA 02111-1307, USA. | |
| */ | | */ | |
|
| | | | |
| | | #if !defined (__IBUS_H_INSIDE__) && !defined (IBUS_COMPILATION) | |
| | | #error "Only <ibus.h> can be included directly" | |
| | | #endif | |
| | | | |
| /** | | /** | |
| * SECTION: ibusenginedesc | | * SECTION: ibusenginedesc | |
| * @short_description: Input method engine description data. | | * @short_description: Input method engine description data. | |
| * @title: IBusEngineDesc | | * @title: IBusEngineDesc | |
| * @stability: Stable | | * @stability: Stable | |
| * | | * | |
| * An IBusEngineDesc stores description data of IBusEngine. | | * An IBusEngineDesc stores description data of IBusEngine. | |
| * The description data can either be passed to ibus_engine_desc_new(), | | * The description data can either be passed to ibus_engine_desc_new(), | |
| * or loaded from an XML node through ibus_engine_desc_new_from_xml_node() | | * or loaded from an XML node through ibus_engine_desc_new_from_xml_node() | |
| * to construct IBusEngineDesc. | | * to construct IBusEngineDesc. | |
| | | | |
| skipping to change at line 68 | | skipping to change at line 73 | |
| #define IBUS_IS_ENGINE_DESC(obj) \ | | #define IBUS_IS_ENGINE_DESC(obj) \ | |
| (G_TYPE_CHECK_INSTANCE_TYPE ((obj), IBUS_TYPE_ENGINE_DESC)) | | (G_TYPE_CHECK_INSTANCE_TYPE ((obj), IBUS_TYPE_ENGINE_DESC)) | |
| #define IBUS_IS_ENGINE_DESC_CLASS(klass) \ | | #define IBUS_IS_ENGINE_DESC_CLASS(klass) \ | |
| (G_TYPE_CHECK_CLASS_TYPE ((klass), IBUS_TYPE_ENGINE_DESC)) | | (G_TYPE_CHECK_CLASS_TYPE ((klass), IBUS_TYPE_ENGINE_DESC)) | |
| #define IBUS_ENGINE_DESC_GET_CLASS(obj) \ | | #define IBUS_ENGINE_DESC_GET_CLASS(obj) \ | |
| (G_TYPE_INSTANCE_GET_CLASS ((obj), IBUS_TYPE_ENGINE_DESC, IBusEngineDes
cClass)) | | (G_TYPE_INSTANCE_GET_CLASS ((obj), IBUS_TYPE_ENGINE_DESC, IBusEngineDes
cClass)) | |
| | | | |
| G_BEGIN_DECLS | | G_BEGIN_DECLS | |
| | | | |
| typedef struct _IBusEngineDesc IBusEngineDesc; | | typedef struct _IBusEngineDesc IBusEngineDesc; | |
|
| | | typedef struct _IBusEngineDescPrivate IBusEngineDescPrivate; | |
| typedef struct _IBusEngineDescClass IBusEngineDescClass; | | typedef struct _IBusEngineDescClass IBusEngineDescClass; | |
| typedef struct _BusComponent BusComponent; | | typedef struct _BusComponent BusComponent; | |
| | | | |
| /** | | /** | |
| * IBusEngineDesc: | | * IBusEngineDesc: | |
|
| * @name: Name of the engine. | | | |
| * @longname: Long name of the input method engine. | | | |
| * @description: Input method engine description. | | | |
| * @language: Language (e.g. zh, jp) supported by this input method engine. | | | |
| * @license: License of the input method engine. | | | |
| * @author: Author of the input method engine. | | | |
| * @icon: Icon file of this engine. | | | |
| * @layout: Keyboard layout | | | |
| * @hotkeys: One or more hotkeys for switching to this engine, separated by | | | |
| * semi-colon. | | | |
| * @rank: Preference rank among engines, the highest ranked IME will put in | | | |
| * the front. | | | |
| * | | * | |
| * Input method engine description data. | | * Input method engine description data. | |
|
| | | * You can get extended values with g_object_get_properties. | |
| | | * name: Name of the engine. | |
| | | * longname: Long name of the input method engine. | |
| | | * description: Input method engine description. | |
| | | * language: Language (e.g. zh, jp) supported by this input method engine. | |
| | | * license: License of the input method engine. | |
| | | * author: Author of the input method engine. | |
| | | * icon: Icon file of this engine. | |
| | | * layout: Keyboard layout | |
| | | * rank: Preference rank among engines, the highest ranked IME will put in | |
| | | * the front. | |
| | | * hotkeys: One or more hotkeys for switching to this engine, separated by | |
| | | * semi-colon. | |
| */ | | */ | |
| struct _IBusEngineDesc { | | struct _IBusEngineDesc { | |
| IBusSerializable parent; | | IBusSerializable parent; | |
| /* instance members */ | | /* instance members */ | |
| | | | |
| /*< public >*/ | | /*< public >*/ | |
|
| gchar *name; | | /*< private >*/ | |
| gchar *longname; | | IBusEngineDescPrivate *priv; | |
| gchar *description; | | | |
| gchar *language; | | | |
| gchar *license; | | | |
| gchar *author; | | | |
| gchar *icon; | | | |
| gchar *layout; | | | |
| gchar *hotkeys; | | | |
| guint rank; | | | |
| }; | | }; | |
| | | | |
| struct _IBusEngineDescClass { | | struct _IBusEngineDescClass { | |
| IBusSerializableClass parent; | | IBusSerializableClass parent; | |
| /* class members */ | | /* class members */ | |
| }; | | }; | |
| | | | |
| GType ibus_engine_desc_get_type (void); | | GType ibus_engine_desc_get_type (void); | |
| | | | |
| /** | | /** | |
| | | | |
| skipping to change at line 137 | | skipping to change at line 136 | |
| const gchar *longname, | | const gchar *longname, | |
| const gchar *descriptio
n, | | const gchar *descriptio
n, | |
| const gchar *language, | | const gchar *language, | |
| const gchar *license, | | const gchar *license, | |
| const gchar *author, | | const gchar *author, | |
| const gchar *icon, | | const gchar *icon, | |
| const gchar *layout); | | const gchar *layout); | |
| | | | |
| /** | | /** | |
| * ibus_engine_desc_new2: | | * ibus_engine_desc_new2: | |
|
| * @name: Name of the engine. | | * @first_property_name: Name of the first property. | |
| * @longname: Long name of the input method engine. | | * @Varargs: the NULL-terminated arguments of the properties and values. | |
| * @description: Input method engine description. | | | |
| * @language: Language (e.g. zh, jp) supported by this input method engine. | | | |
| * @license: License of the input method engine. | | | |
| * @author: Author of the input method engine. | | | |
| * @icon: Icon file of this engine. | | | |
| * @layout: Keyboard layout | | | |
| * @hotkeys: Hotkeys for switching to this engine. | | | |
| * @returns: A newly allocated IBusEngineDesc. | | | |
| * | | * | |
| * New a IBusEngineDesc. | | * New a IBusEngineDesc. | |
|
| | | * ibus_engine_desc_new2() supports the va_list format. | |
| | | * name property is required. e.g. | |
| | | * ibus_engine_desc_new2("name", "ibus-foo", "language", "us", NULL) | |
| */ | | */ | |
|
| IBusEngineDesc *ibus_engine_desc_new2 (const gchar *name, | | IBusEngineDesc *ibus_engine_desc_new2 (const gchar *first_propert | |
| const gchar *longname, | | y_name, | |
| const gchar *descriptio | | ...); | |
| n, | | | |
| const gchar *language, | | | |
| const gchar *license, | | | |
| const gchar *author, | | | |
| const gchar *icon, | | | |
| const gchar *layout, | | | |
| const gchar *hotkeys); | | | |
| | | | |
| /** | | /** | |
| * ibus_engine_desc_new_from_xml_node: | | * ibus_engine_desc_new_from_xml_node: | |
| * @node: An XML node | | * @node: An XML node | |
| * @returns: A newly allocated IBusEngineDesc that contains description fro
m | | * @returns: A newly allocated IBusEngineDesc that contains description fro
m | |
| * @node. | | * @node. | |
| * | | * | |
| * New a IBusEngineDesc from an XML node. | | * New a IBusEngineDesc from an XML node. | |
| * <note><para>This function is called by ibus_component_new_from_file(), | | * <note><para>This function is called by ibus_component_new_from_file(), | |
| * so developers normally do not need to call it directly. | | * so developers normally do not need to call it directly. | |
| * </para></note> | | * </para></note> | |
| */ | | */ | |
| IBusEngineDesc *ibus_engine_desc_new_from_xml_node | | IBusEngineDesc *ibus_engine_desc_new_from_xml_node | |
| (XMLNode *node); | | (XMLNode *node); | |
| /** | | /** | |
|
| | | * ibus_engine_desc_get_name: | |
| | | * @info: An IBusEngineDesc | |
| | | * @returns: name property in IBusEngineDesc | |
| | | * | |
| | | * Return the name property in IBusEngineDesc. It should not be freed. | |
| | | */ | |
| | | const gchar *ibus_engine_desc_get_name (IBusEngineDesc *info); | |
| | | | |
| | | /** | |
| | | * ibus_engine_desc_get_longname: | |
| | | * @info: An IBusEngineDesc | |
| | | * @returns: longname property in IBusEngineDesc | |
| | | * | |
| | | * Return the longname property in IBusEngineDesc. It should not be freed. | |
| | | */ | |
| | | const gchar *ibus_engine_desc_get_longname (IBusEngineDesc *info); | |
| | | | |
| | | /** | |
| | | * ibus_engine_desc_get_description: | |
| | | * @info: An IBusEngineDesc | |
| | | * @returns: description property in IBusEngineDesc | |
| | | * | |
| | | * Return the description property in IBusEngineDesc. It should not be free | |
| | | d. | |
| | | */ | |
| | | const gchar *ibus_engine_desc_get_description | |
| | | (IBusEngineDesc *info); | |
| | | | |
| | | /** | |
| | | * ibus_engine_desc_get_language: | |
| | | * @info: An IBusEngineDesc | |
| | | * @returns: language property in IBusEngineDesc | |
| | | * | |
| | | * Return the language property in IBusEngineDesc. It should not be freed. | |
| | | */ | |
| | | const gchar *ibus_engine_desc_get_language (IBusEngineDesc *info); | |
| | | | |
| | | /** | |
| | | * ibus_engine_desc_get_license: | |
| | | * @info: An IBusEngineDesc | |
| | | * @returns: license property in IBusEngineDesc | |
| | | * | |
| | | * Return the license property in IBusEngineDesc. It should not be freed. | |
| | | */ | |
| | | const gchar *ibus_engine_desc_get_license (IBusEngineDesc *info); | |
| | | | |
| | | /** | |
| | | * ibus_engine_desc_get_author: | |
| | | * @info: An IBusEngineDesc | |
| | | * @returns: author property in IBusEngineDesc | |
| | | * | |
| | | * Return the author property in IBusEngineDesc. It should not be freed. | |
| | | */ | |
| | | const gchar *ibus_engine_desc_get_author (IBusEngineDesc *info); | |
| | | | |
| | | /** | |
| | | * ibus_engine_desc_get_icon: | |
| | | * @info: An IBusEngineDesc | |
| | | * @returns: icon property in IBusEngineDesc | |
| | | * | |
| | | * Return the icon property in IBusEngineDesc. It should not be freed. | |
| | | */ | |
| | | const gchar *ibus_engine_desc_get_icon (IBusEngineDesc *info); | |
| | | | |
| | | /** | |
| | | * ibus_engine_desc_get_layout: | |
| | | * @info: An IBusEngineDesc | |
| | | * @returns: layout property in IBusEngineDesc | |
| | | * | |
| | | * Return the layout property in IBusEngineDesc. It should not be freed. | |
| | | */ | |
| | | const gchar *ibus_engine_desc_get_layout (IBusEngineDesc *info); | |
| | | | |
| | | /** | |
| | | * ibus_engine_desc_get_rank: | |
| | | * @info: An IBusEngineDesc | |
| | | * @returns: rank property in IBusEngineDesc | |
| | | * | |
| | | * Return the rank property in IBusEngineDesc. | |
| | | */ | |
| | | guint ibus_engine_desc_get_rank (IBusEngineDesc *info); | |
| | | | |
| | | /** | |
| | | * ibus_engine_desc_get_hotkeys: | |
| | | * @info: An IBusEngineDesc | |
| | | * @returns: hotkeys property in IBusEngineDesc | |
| | | * | |
| | | * Return the hotkeys property in IBusEngineDesc. It should not be freed. | |
| | | */ | |
| | | const gchar *ibus_engine_desc_get_hotkeys (IBusEngineDesc *info); | |
| | | | |
| | | /** | |
| * ibus_engine_desc_output: | | * ibus_engine_desc_output: | |
| * @info: An IBusEngineDesc | | * @info: An IBusEngineDesc | |
| * @output: XML-formatted Input method engine description. | | * @output: XML-formatted Input method engine description. | |
| * @indent: Number of indent (showed as 4 spaces). | | * @indent: Number of indent (showed as 4 spaces). | |
| * | | * | |
| * Output XML-formatted input method engine description. | | * Output XML-formatted input method engine description. | |
| * The result will be append to GString specified in @output. | | * The result will be append to GString specified in @output. | |
| */ | | */ | |
| void ibus_engine_desc_output (IBusEngineDesc *info, | | void ibus_engine_desc_output (IBusEngineDesc *info, | |
| GString *output, | | GString *output, | |
| | | | |
End of changes. 9 change blocks. |
| 42 lines changed or deleted | | 121 lines changed or added | |
|
| ibusfactory.h | | ibusfactory.h | |
| | | | |
| skipping to change at line 22 | | skipping to change at line 22 | |
| * This library is distributed in the hope that it will be useful, | | * This library is distributed in the hope that it will be useful, | |
| * but WITHOUT ANY WARRANTY; without even the implied warranty of | | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
| * Lesser General Public License for more details. | | * Lesser General Public License for more details. | |
| * | | * | |
| * You should have received a copy of the GNU Lesser General Public | | * You should have received a copy of the GNU Lesser General Public | |
| * License along with this library; if not, write to the | | * License along with this library; if not, write to the | |
| * Free Software Foundation, Inc., 59 Temple Place - Suite 330, | | * Free Software Foundation, Inc., 59 Temple Place - Suite 330, | |
| * Boston, MA 02111-1307, USA. | | * Boston, MA 02111-1307, USA. | |
| */ | | */ | |
|
| | | | |
| | | #if !defined (__IBUS_H_INSIDE__) && !defined (IBUS_COMPILATION) | |
| | | #error "Only <ibus.h> can be included directly" | |
| | | #endif | |
| | | | |
| /** | | /** | |
| * SECTION: ibusfactory | | * SECTION: ibusfactory | |
| * @short_description: Factory for creating engine instances. | | * @short_description: Factory for creating engine instances. | |
| * @title: IBusFactory | | * @title: IBusFactory | |
| * @stability: Stable | | * @stability: Stable | |
| * | | * | |
| * An IBusFactory is an #IBusService that creates input method engine (IME)
instance. | | * An IBusFactory is an #IBusService that creates input method engine (IME)
instance. | |
| * It provides CreateEngine remote method, which creates an IME instance by
name, | | * It provides CreateEngine remote method, which creates an IME instance by
name, | |
| * and returns the D-Bus object path to IBus daemon. | | * and returns the D-Bus object path to IBus daemon. | |
| * | | * | |
| | | | |
| skipping to change at line 105 | | skipping to change at line 110 | |
| * IBUS_FACTORY_GET_CLASS: | | * IBUS_FACTORY_GET_CLASS: | |
| * @obj: An object. | | * @obj: An object. | |
| * | | * | |
| * Get the class of a given object and cast the class to IBusFactoryClass. | | * Get the class of a given object and cast the class to IBusFactoryClass. | |
| */ | | */ | |
| #define IBUS_FACTORY_GET_CLASS(obj) \ | | #define IBUS_FACTORY_GET_CLASS(obj) \ | |
| (G_TYPE_INSTANCE_GET_CLASS ((obj), IBUS_TYPE_FACTORY, IBusFactoryClass)
) | | (G_TYPE_INSTANCE_GET_CLASS ((obj), IBUS_TYPE_FACTORY, IBusFactoryClass)
) | |
| | | | |
| typedef struct _IBusFactory IBusFactory; | | typedef struct _IBusFactory IBusFactory; | |
| typedef struct _IBusFactoryClass IBusFactoryClass; | | typedef struct _IBusFactoryClass IBusFactoryClass; | |
|
| | | typedef struct _IBusFactoryPrivate IBusFactoryPrivate; | |
| | | | |
| /** | | /** | |
| * IBusFactory: | | * IBusFactory: | |
| * | | * | |
| * An opaque data type representing an IBusFactory. | | * An opaque data type representing an IBusFactory. | |
| */ | | */ | |
| struct _IBusFactory { | | struct _IBusFactory { | |
|
| | | /*< private >*/ | |
| IBusService parent; | | IBusService parent; | |
|
| | | IBusFactoryPrivate *priv; | |
| | | | |
| /* instance members */ | | /* instance members */ | |
| }; | | }; | |
| | | | |
| struct _IBusFactoryClass { | | struct _IBusFactoryClass { | |
|
| | | /*< private >*/ | |
| IBusServiceClass parent; | | IBusServiceClass parent; | |
| | | | |
| /* signals */ | | /* signals */ | |
| | | | |
| /*< private >*/ | | /*< private >*/ | |
| /* padding */ | | /* padding */ | |
| gpointer pdummy[8]; | | gpointer pdummy[8]; | |
| }; | | }; | |
| | | | |
| /** | | /** | |
| * ibus_factory_info_get_type: | | * ibus_factory_info_get_type: | |
| * @returns: GType of IBus factory information. | | * @returns: GType of IBus factory information. | |
| * | | * | |
| * Return GType of IBus factory information. | | * Return GType of IBus factory information. | |
| */ | | */ | |
| GType ibus_factory_get_type (void); | | GType ibus_factory_get_type (void); | |
| | | | |
| /** | | /** | |
| * ibus_factory_new: | | * ibus_factory_new: | |
|
| * @connection: An IBusConnection. | | * @connection: An GDBusConnection. | |
| * @returns: A newly allocated IBusFactory. | | * @returns: A newly allocated IBusFactory. | |
| * | | * | |
| * New an IBusFactory. | | * New an IBusFactory. | |
| */ | | */ | |
|
| IBusFactory *ibus_factory_new (IBusConnection *connection
); | | IBusFactory *ibus_factory_new (GDBusConnection *connectio
n); | |
| | | | |
| /** | | /** | |
| * ibus_factory_add_engine: | | * ibus_factory_add_engine: | |
| * @factory: An IBusFactory. | | * @factory: An IBusFactory. | |
| * @engine_name: Name of an engine. | | * @engine_name: Name of an engine. | |
| * @engine_type: GType of an engine. | | * @engine_type: GType of an engine. | |
| * | | * | |
| * Add an engine to the factory. | | * Add an engine to the factory. | |
| */ | | */ | |
| void ibus_factory_add_engine (IBusFactory *factory, | | void ibus_factory_add_engine (IBusFactory *factory, | |
| | | | |
End of changes. 7 change blocks. |
| 2 lines changed or deleted | | 11 lines changed or added | |
|
| ibusinputcontext.h | | ibusinputcontext.h | |
| | | | |
| skipping to change at line 22 | | skipping to change at line 22 | |
| * This library is distributed in the hope that it will be useful, | | * This library is distributed in the hope that it will be useful, | |
| * but WITHOUT ANY WARRANTY; without even the implied warranty of | | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
| * Lesser General Public License for more details. | | * Lesser General Public License for more details. | |
| * | | * | |
| * You should have received a copy of the GNU Lesser General Public | | * You should have received a copy of the GNU Lesser General Public | |
| * License along with this library; if not, write to the | | * License along with this library; if not, write to the | |
| * Free Software Foundation, Inc., 59 Temple Place - Suite 330, | | * Free Software Foundation, Inc., 59 Temple Place - Suite 330, | |
| * Boston, MA 02111-1307, USA. | | * Boston, MA 02111-1307, USA. | |
| */ | | */ | |
|
| | | | |
| | | #if !defined (__IBUS_H_INSIDE__) && !defined (IBUS_COMPILATION) | |
| | | #error "Only <ibus.h> can be included directly" | |
| | | #endif | |
| | | | |
| /** | | /** | |
| * SECTION: ibusinputcontext | | * SECTION: ibusinputcontext | |
| * @short_description: IBus input context proxy object. | | * @short_description: IBus input context proxy object. | |
| * @stability: Stable | | * @stability: Stable | |
| * | | * | |
| * An IBusInputContext is a proxy object of BusInputContext, | | * An IBusInputContext is a proxy object of BusInputContext, | |
| * which manages the context for input methods that supports | | * which manages the context for input methods that supports | |
| * text input in various natural languages. | | * text input in various natural languages. | |
| * | | * | |
| * Clients call the IBusInputContext to invoke BusInputContext, | | * Clients call the IBusInputContext to invoke BusInputContext, | |
| | | | |
| skipping to change at line 69 | | skipping to change at line 74 | |
| | | | |
| typedef struct _IBusInputContext IBusInputContext; | | typedef struct _IBusInputContext IBusInputContext; | |
| typedef struct _IBusInputContextClass IBusInputContextClass; | | typedef struct _IBusInputContextClass IBusInputContextClass; | |
| | | | |
| /** | | /** | |
| * IBusInputContext: | | * IBusInputContext: | |
| * | | * | |
| * An opaque data type representing an IBusInputContext. | | * An opaque data type representing an IBusInputContext. | |
| */ | | */ | |
| struct _IBusInputContext { | | struct _IBusInputContext { | |
|
| IBusProxy parent; | | IBusProxy parent; | |
| /* instance members */ | | /* instance members */ | |
| }; | | }; | |
| | | | |
| struct _IBusInputContextClass { | | struct _IBusInputContextClass { | |
| IBusProxyClass parent; | | IBusProxyClass parent; | |
| /* signals */ | | /* signals */ | |
| | | | |
| /*< private >*/ | | /*< private >*/ | |
| /* padding */ | | /* padding */ | |
| gpointer pdummy[24]; | | gpointer pdummy[24]; | |
| }; | | }; | |
| | | | |
| GType ibus_input_context_get_type (void); | | GType ibus_input_context_get_type (void); | |
| | | | |
| /** | | /** | |
| * ibus_input_context_new: | | * ibus_input_context_new: | |
| * @path: The path to the object that emitting the signal. | | * @path: The path to the object that emitting the signal. | |
|
| * @connection: An IBusConnection. | | * @connection: An GDBusConnection. | |
| | | * @cancellable: A #GCancellable or %NULL. | |
| | | * @error: Return location for error or %NULL. | |
| | | * | |
| * @returns: A newly allocated IBusInputContext. | | * @returns: A newly allocated IBusInputContext. | |
| * | | * | |
| * New an IBusInputContext. | | * New an IBusInputContext. | |
| */ | | */ | |
| IBusInputContext | | IBusInputContext | |
| *ibus_input_context_new (const gchar *path, | | *ibus_input_context_new (const gchar *path, | |
|
| IBusConnection *connection | | GDBusConnection *connection | |
| ); | | , | |
| | | GCancellable *cancellabl | |
| | | e, | |
| | | GError **error); | |
| | | | |
| /** | | /** | |
| * ibus_input_context_get_input_context: | | * ibus_input_context_get_input_context: | |
| * @path: The path to the object that emitting the signal. | | * @path: The path to the object that emitting the signal. | |
|
| * @connection: An IBusConnection. | | * @connection: An GDBusConnection. | |
| * @returns: An existing IBusInputContext. | | * @returns: An existing IBusInputContext. | |
| * | | * | |
| * Gets an existing IBusInputContext. | | * Gets an existing IBusInputContext. | |
| */ | | */ | |
| IBusInputContext | | IBusInputContext | |
| *ibus_input_context_get_input_context | | *ibus_input_context_get_input_context | |
| (const gchar *path, | | (const gchar *path, | |
|
| IBusConnection *connection
); | | GDBusConnection *connection
); | |
| | | | |
| /** | | /** | |
| * ibus_input_context_process_key_event: | | * ibus_input_context_process_key_event: | |
| * @context: An IBusInputContext. | | * @context: An IBusInputContext. | |
| * @keyval: Key symbol of a key event. | | * @keyval: Key symbol of a key event. | |
| * @keycode: Keycode of a key event. | | * @keycode: Keycode of a key event. | |
| * @state: Key modifier flags. | | * @state: Key modifier flags. | |
| * @returns: TRUE for successfully process the key; FALSE otherwise. | | * @returns: TRUE for successfully process the key; FALSE otherwise. | |
| * | | * | |
| * Pass the key event to input method engine. | | * Pass the key event to input method engine. | |
| | | | |
End of changes. 6 change blocks. |
| 7 lines changed or deleted | | 18 lines changed or added | |
|
| ibusobject.h | | ibusobject.h | |
| | | | |
| skipping to change at line 22 | | skipping to change at line 22 | |
| * This library is distributed in the hope that it will be useful, | | * This library is distributed in the hope that it will be useful, | |
| * but WITHOUT ANY WARRANTY; without even the implied warranty of | | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
| * Lesser General Public License for more details. | | * Lesser General Public License for more details. | |
| * | | * | |
| * You should have received a copy of the GNU Lesser General Public | | * You should have received a copy of the GNU Lesser General Public | |
| * License along with this library; if not, write to the | | * License along with this library; if not, write to the | |
| * Free Software Foundation, Inc., 59 Temple Place - Suite 330, | | * Free Software Foundation, Inc., 59 Temple Place - Suite 330, | |
| * Boston, MA 02111-1307, USA. | | * Boston, MA 02111-1307, USA. | |
| */ | | */ | |
|
| | | | |
| | | #if !defined (__IBUS_H_INSIDE__) && !defined (IBUS_COMPILATION) | |
| | | #error "Only <ibus.h> can be included directly" | |
| | | #endif | |
| | | | |
| /** | | /** | |
| * SECTION: ibusobject | | * SECTION: ibusobject | |
| * @short_description: Base object of IBus. | | * @short_description: Base object of IBus. | |
| * @title: IBusObject | | * @title: IBusObject | |
| * @stability: Stable | | * @stability: Stable | |
| * | | * | |
| * IBusObject is the base object for all objects in IBus. | | * IBusObject is the base object for all objects in IBus. | |
| */ | | */ | |
| #ifndef __IBUS_OBJECT_H_ | | #ifndef __IBUS_OBJECT_H_ | |
| #define __IBUS_OBJECT_H_ | | #define __IBUS_OBJECT_H_ | |
| | | | |
| #include <glib-object.h> | | #include <glib-object.h> | |
|
| #include "ibusmarshalers.h" | | | |
| #include "ibustypes.h" | | #include "ibustypes.h" | |
| #include "ibusdebug.h" | | #include "ibusdebug.h" | |
| | | | |
| /* | | /* | |
| * Type macros. | | * Type macros. | |
| */ | | */ | |
| | | | |
| /* define GOBJECT macros */ | | /* define GOBJECT macros */ | |
| #define IBUS_TYPE_OBJECT \ | | #define IBUS_TYPE_OBJECT \ | |
| (ibus_object_get_type ()) | | (ibus_object_get_type ()) | |
| | | | |
| skipping to change at line 72 | | skipping to change at line 76 | |
| | | | |
| #define IBUS_OBJECT_FLAGS(obj) (IBUS_OBJECT (obj)->flags) | | #define IBUS_OBJECT_FLAGS(obj) (IBUS_OBJECT (obj)->flags) | |
| #define IBUS_OBJECT_SET_FLAGS(obj,flag) G_STMT_START{ (IBUS_OBJECT_FLAGS
(obj) |= (flag)); }G_STMT_END | | #define IBUS_OBJECT_SET_FLAGS(obj,flag) G_STMT_START{ (IBUS_OBJECT_FLAGS
(obj) |= (flag)); }G_STMT_END | |
| #define IBUS_OBJECT_UNSET_FLAGS(obj,flag) G_STMT_START{ (IBUS_OBJECT_FLAGS
(obj) &= ~(flag)); }G_STMT_END | | #define IBUS_OBJECT_UNSET_FLAGS(obj,flag) G_STMT_START{ (IBUS_OBJECT_FLAGS
(obj) &= ~(flag)); }G_STMT_END | |
| #define IBUS_OBJECT_DESTROYED(obj) (IBUS_OBJECT_FLAGS (obj) & IBUS_
DESTROYED) | | #define IBUS_OBJECT_DESTROYED(obj) (IBUS_OBJECT_FLAGS (obj) & IBUS_
DESTROYED) | |
| | | | |
| G_BEGIN_DECLS | | G_BEGIN_DECLS | |
| | | | |
| typedef struct _IBusObject IBusObject; | | typedef struct _IBusObject IBusObject; | |
| typedef struct _IBusObjectClass IBusObjectClass; | | typedef struct _IBusObjectClass IBusObjectClass; | |
|
| | | typedef struct _IBusObjectPrivate IBusObjectPrivate; | |
| | | | |
| /** | | /** | |
| * IBusObject: | | * IBusObject: | |
| * | | * | |
| * All the fields in the <structname>IBusObject</structname> structure are | | * All the fields in the <structname>IBusObject</structname> structure are | |
| * private to the #IBusObject and should never be accessed directly. | | * private to the #IBusObject and should never be accessed directly. | |
| */ | | */ | |
| struct _IBusObject { | | struct _IBusObject { | |
|
| GInitiallyUnowned parent; | | GInitiallyUnowned parent; | |
| /* instance members */ | | /* instance members */ | |
| guint32 flags; | | guint32 flags; | |
| | | | |
| | | IBusObjectPrivate *priv; | |
| }; | | }; | |
| | | | |
| typedef void ( *IBusObjectDestroyFunc) (IBusObject *); | | typedef void ( *IBusObjectDestroyFunc) (IBusObject *); | |
| | | | |
| struct _IBusObjectClass { | | struct _IBusObjectClass { | |
| GInitiallyUnownedClass parent; | | GInitiallyUnownedClass parent; | |
| | | | |
| /* signals */ | | /* signals */ | |
| void (* destroy) (IBusObject *object); | | void (* destroy) (IBusObject *object); | |
| | | | |
| | | | |
End of changes. 4 change blocks. |
| 4 lines changed or deleted | | 12 lines changed or added | |
|
| ibuspanelservice.h | | ibuspanelservice.h | |
| | | | |
| skipping to change at line 21 | | skipping to change at line 21 | |
| * This library is distributed in the hope that it will be useful, | | * This library is distributed in the hope that it will be useful, | |
| * but WITHOUT ANY WARRANTY; without even the implied warranty of | | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
| * Lesser General Public License for more details. | | * Lesser General Public License for more details. | |
| * | | * | |
| * You should have received a copy of the GNU Lesser General Public | | * You should have received a copy of the GNU Lesser General Public | |
| * License along with this library; if not, write to the | | * License along with this library; if not, write to the | |
| * Free Software Foundation, Inc., 59 Temple Place - Suite 330, | | * Free Software Foundation, Inc., 59 Temple Place - Suite 330, | |
| * Boston, MA 02111-1307, USA. | | * Boston, MA 02111-1307, USA. | |
| */ | | */ | |
|
| | | | |
| | | #if !defined (__IBUS_H_INSIDE__) && !defined (IBUS_COMPILATION) | |
| | | #error "Only <ibus.h> can be included directly" | |
| | | #endif | |
| | | | |
| /** | | /** | |
| * SECTION: ibuspanelservice | | * SECTION: ibuspanelservice | |
| * @short_description: Panel service back-end. | | * @short_description: Panel service back-end. | |
| * @stability: Stable | | * @stability: Stable | |
| * | | * | |
| * An IBusPanelService is a base class for UI services. | | * An IBusPanelService is a base class for UI services. | |
| * Developers can "extend" this class for panel UI development. | | * Developers can "extend" this class for panel UI development. | |
| */ | | */ | |
| #ifndef __IBUS_PANEL_SERVICE_H_ | | #ifndef __IBUS_PANEL_SERVICE_H_ | |
| #define __IBUS_PANEL_SERVICE_H_ | | #define __IBUS_PANEL_SERVICE_H_ | |
| | | | |
|
| #include "ibusconnection.h" | | | |
| #include "ibuslookuptable.h" | | #include "ibuslookuptable.h" | |
| #include "ibusservice.h" | | #include "ibusservice.h" | |
| #include "ibusproplist.h" | | #include "ibusproplist.h" | |
| | | | |
| /* | | /* | |
| * Type macros. | | * Type macros. | |
| */ | | */ | |
| | | | |
| /* define GOBJECT macros */ | | /* define GOBJECT macros */ | |
| #define IBUS_TYPE_PANEL_SERVICE \ | | #define IBUS_TYPE_PANEL_SERVICE \ | |
| | | | |
| skipping to change at line 74 | | skipping to change at line 78 | |
| */ | | */ | |
| struct _IBusPanelService { | | struct _IBusPanelService { | |
| IBusService parent; | | IBusService parent; | |
| /* instance members */ | | /* instance members */ | |
| }; | | }; | |
| | | | |
| struct _IBusPanelServiceClass { | | struct _IBusPanelServiceClass { | |
| IBusServiceClass parent; | | IBusServiceClass parent; | |
| | | | |
| /* class members */ | | /* class members */ | |
|
| gboolean (* focus_in) (IBusPanelService *panel, | | void (* focus_in) (IBusPanelService *panel, | |
| const gchar *input_c | | const gchar *input_c | |
| ontext_path, | | ontext_path); | |
| IBusError **error); | | void (* focus_out) (IBusPanelService *panel, | |
| gboolean (* focus_out) (IBusPanelService *panel, | | const gchar *input_c | |
| const gchar *input_c | | ontext_path); | |
| ontext_path, | | void (* register_properties) (IBusPanelService *panel, | |
| IBusError **error); | | IBusPropList *prop_li | |
| gboolean (* register_properties) (IBusPanelService *panel, | | st); | |
| IBusPropList *prop_li | | void (* set_cursor_location) (IBusPanelService *panel, | |
| st, | | | |
| IBusError **error); | | | |
| gboolean (* set_cursor_location) (IBusPanelService *panel, | | | |
| gint x, | | gint x, | |
| gint y, | | gint y, | |
| gint w, | | gint w, | |
|
| gint h, | | gint h); | |
| IBusError **error); | | void (* update_auxiliary_text) (IBusPanelService *panel, | |
| gboolean (* update_auxiliary_text) (IBusPanelService *panel, | | | |
| IBusText *text, | | IBusText *text, | |
|
| gboolean visible | | gboolean visible | |
| , | | ); | |
| IBusError **error); | | void (* update_lookup_table) (IBusPanelService *panel, | |
| gboolean (* update_lookup_table) (IBusPanelService *panel, | | | |
| IBusLookupTable *lookup_
table, | | IBusLookupTable *lookup_
table, | |
|
| gboolean visible | | gboolean visible | |
| , | | ); | |
| IBusError **error); | | void (* update_preedit_text) (IBusPanelService *panel, | |
| gboolean (* update_preedit_text) (IBusPanelService *panel, | | | |
| IBusText *text, | | IBusText *text, | |
| guint cursor_p
os, | | guint cursor_p
os, | |
|
| gboolean visible, | | gboolean visible) | |
| IBusError **error); | | ; | |
| gboolean (* update_property) (IBusPanelService *panel, | | void (* update_property) (IBusPanelService *panel, | |
| IBusProperty *prop, | | IBusProperty *prop); | |
| IBusError **error); | | void (* cursor_down_lookup_table) (IBusPanelService *panel); | |
| gboolean (* cursor_down_lookup_table) (IBusPanelService *panel, | | void (* cursor_up_lookup_table) (IBusPanelService *panel); | |
| IBusError **error); | | void (* destroy) (IBusPanelService *panel); | |
| gboolean (* cursor_up_lookup_table) (IBusPanelService *panel, | | void (* hide_auxiliary_text) (IBusPanelService *panel); | |
| IBusError **error); | | void (* hide_language_bar) (IBusPanelService *panel); | |
| gboolean (* destroy) (IBusPanelService *panel, | | void (* hide_lookup_table) (IBusPanelService *panel); | |
| IBusError **error); | | void (* hide_preedit_text) (IBusPanelService *panel); | |
| gboolean (* hide_auxiliary_text) (IBusPanelService *panel, | | void (* page_down_lookup_table) (IBusPanelService *panel); | |
| IBusError **error); | | void (* page_up_lookup_table) (IBusPanelService *panel); | |
| gboolean (* hide_language_bar) (IBusPanelService *panel, | | void (* reset) (IBusPanelService *panel); | |
| IBusError **error); | | void (* show_auxiliary_text) (IBusPanelService *panel); | |
| gboolean (* hide_lookup_table) (IBusPanelService *panel, | | void (* show_language_bar) (IBusPanelService *panel); | |
| IBusError **error); | | void (* show_lookup_table) (IBusPanelService *panel); | |
| gboolean (* hide_preedit_text) (IBusPanelService *panel, | | void (* show_preedit_text) (IBusPanelService *panel); | |
| IBusError **error); | | void (* start_setup) (IBusPanelService *panel); | |
| gboolean (* page_down_lookup_table) (IBusPanelService *panel, | | void (* state_changed) (IBusPanelService *panel); | |
| IBusError **error); | | | |
| gboolean (* page_up_lookup_table) (IBusPanelService *panel, | | | |
| IBusError **error); | | | |
| gboolean (* reset) (IBusPanelService *panel, | | | |
| IBusError **error); | | | |
| gboolean (* show_auxiliary_text) (IBusPanelService *panel, | | | |
| IBusError **error); | | | |
| gboolean (* show_language_bar) (IBusPanelService *panel, | | | |
| IBusError **error); | | | |
| gboolean (* show_lookup_table) (IBusPanelService *panel, | | | |
| IBusError **error); | | | |
| gboolean (* show_preedit_text) (IBusPanelService *panel, | | | |
| IBusError **error); | | | |
| gboolean (* start_setup) (IBusPanelService *panel, | | | |
| IBusError **error); | | | |
| gboolean (* state_changed) (IBusPanelService *panel, | | | |
| IBusError **error); | | | |
| | | | |
| /*< private >*/ | | /*< private >*/ | |
| /* padding */ | | /* padding */ | |
| gpointer pdummy[8]; // We can add 8 pointers without breaking the ABI. | | gpointer pdummy[8]; // We can add 8 pointers without breaking the ABI. | |
| }; | | }; | |
| | | | |
| GType ibus_panel_service_get_type (void); | | GType ibus_panel_service_get_type (void); | |
| | | | |
| /** | | /** | |
| * ibus_panel_service_new: | | * ibus_panel_service_new: | |
|
| * @connection: An IBusConnection. | | * @connection: An GDBusConnection. | |
| * @returns: A newly allocated IBusPanelService. | | * @returns: A newly allocated IBusPanelService. | |
| * | | * | |
|
| * New an IBusPanelService from an IBusConnection. | | * New an IBusPanelService from an GDBusConnection. | |
| */ | | */ | |
|
| IBusPanelService *ibus_panel_service_new (IBusConnection *connection); | | IBusPanelService *ibus_panel_service_new (GDBusConnection *connection); | |
| | | | |
| /** | | /** | |
| * ibus_panel_service_candidate_clicked | | * ibus_panel_service_candidate_clicked | |
| * @panel: An IBusPanelService | | * @panel: An IBusPanelService | |
| * @index: Index in the Lookup table | | * @index: Index in the Lookup table | |
| * @button: GdkEventButton::button (1: left button, etc.) | | * @button: GdkEventButton::button (1: left button, etc.) | |
| * @state: GdkEventButton::state (key modifier flags) | | * @state: GdkEventButton::state (key modifier flags) | |
| * | | * | |
| * Notify that a candidate is clicked | | * Notify that a candidate is clicked | |
| * by sending a "CandidateClicked" to IBus service. | | * by sending a "CandidateClicked" to IBus service. | |
| | | | |
| skipping to change at line 216 | | skipping to change at line 196 | |
| * ibus_panel_service_property_active | | * ibus_panel_service_property_active | |
| * @panel: An IBusPanelService | | * @panel: An IBusPanelService | |
| * @prop_name: A property name | | * @prop_name: A property name | |
| * @prop_state: State of the property | | * @prop_state: State of the property | |
| * | | * | |
| * Notify that a property is active | | * Notify that a property is active | |
| * by sending a "PropertyActivate" message to IBus service. | | * by sending a "PropertyActivate" message to IBus service. | |
| */ | | */ | |
| void ibus_panel_service_property_active (IBusPanelService *panel, | | void ibus_panel_service_property_active (IBusPanelService *panel, | |
| const gchar *prop_name, | | const gchar *prop_name, | |
|
| int prop_state); | | guint prop_state); | |
| /** | | /** | |
| * ibus_panel_service_property_show | | * ibus_panel_service_property_show | |
| * @panel: An IBusPanelService | | * @panel: An IBusPanelService | |
| * @prop_name: A property name | | * @prop_name: A property name | |
| * | | * | |
| * Notify that a property is shown | | * Notify that a property is shown | |
| * by sending a "ValueChanged" message to IBus service. | | * by sending a "ValueChanged" message to IBus service. | |
| */ | | */ | |
| void ibus_panel_service_property_show (IBusPanelService *panel, | | void ibus_panel_service_property_show (IBusPanelService *panel, | |
| const gchar *prop_name); | | const gchar *prop_name); | |
| | | | |
End of changes. 11 change blocks. |
| 66 lines changed or deleted | | 47 lines changed or added | |
|
| ibusproxy.h | | ibusproxy.h | |
| | | | |
| skipping to change at line 22 | | skipping to change at line 22 | |
| * This library is distributed in the hope that it will be useful, | | * This library is distributed in the hope that it will be useful, | |
| * but WITHOUT ANY WARRANTY; without even the implied warranty of | | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
| * Lesser General Public License for more details. | | * Lesser General Public License for more details. | |
| * | | * | |
| * You should have received a copy of the GNU Lesser General Public | | * You should have received a copy of the GNU Lesser General Public | |
| * License along with this library; if not, write to the | | * License along with this library; if not, write to the | |
| * Free Software Foundation, Inc., 59 Temple Place - Suite 330, | | * Free Software Foundation, Inc., 59 Temple Place - Suite 330, | |
| * Boston, MA 02111-1307, USA. | | * Boston, MA 02111-1307, USA. | |
| */ | | */ | |
|
| | | | |
| | | #if !defined (__IBUS_H_INSIDE__) && !defined (IBUS_COMPILATION) | |
| | | #error "Only <ibus.h> can be included directly" | |
| | | #endif | |
| | | | |
| /** | | /** | |
| * SECTION: ibusproxy | | * SECTION: ibusproxy | |
| * @short_description: Base proxy object. | | * @short_description: Base proxy object. | |
| * @stability: Stable | | * @stability: Stable | |
| * | | * | |
| * An IBusProxy is the base of all proxy objects, | | * An IBusProxy is the base of all proxy objects, | |
| * which communicate the corresponding #IBusServices on the other end of IB
usConnection. | | * which communicate the corresponding #IBusServices on the other end of IB
usConnection. | |
| * For example, IBus clients (such as editors, web browsers) invoke the pro
xy object, | | * For example, IBus clients (such as editors, web browsers) invoke the pro
xy object, | |
| * IBusInputContext to communicate with the InputContext service of the ibu
s-daemon. | | * IBusInputContext to communicate with the InputContext service of the ibu
s-daemon. | |
| * | | * | |
| * Almost all services have corresponding proxies, except very simple servi
ces. | | * Almost all services have corresponding proxies, except very simple servi
ces. | |
| */ | | */ | |
| #ifndef __IBUS_PROXY_H_ | | #ifndef __IBUS_PROXY_H_ | |
| #define __IBUS_PROXY_H_ | | #define __IBUS_PROXY_H_ | |
| | | | |
|
| #include "ibusobject.h" | | #include <gio/gio.h> | |
| #include "ibusconnection.h" | | | |
| #include "ibusmessage.h" | | | |
| | | | |
| /* | | /* | |
| * Type macros. | | * Type macros. | |
| */ | | */ | |
| | | | |
| /* define GOBJECT macros */ | | /* define GOBJECT macros */ | |
| #define IBUS_TYPE_PROXY \ | | #define IBUS_TYPE_PROXY \ | |
| (ibus_proxy_get_type ()) | | (ibus_proxy_get_type ()) | |
| #define IBUS_PROXY(obj) \ | | #define IBUS_PROXY(obj) \ | |
| (G_TYPE_CHECK_INSTANCE_CAST ((obj), IBUS_TYPE_PROXY, IBusProxy)) | | (G_TYPE_CHECK_INSTANCE_CAST ((obj), IBUS_TYPE_PROXY, IBusProxy)) | |
| | | | |
| skipping to change at line 64 | | skipping to change at line 67 | |
| #define IBUS_IS_PROXY_CLASS(klass) \ | | #define IBUS_IS_PROXY_CLASS(klass) \ | |
| (G_TYPE_CHECK_CLASS_TYPE ((klass), IBUS_TYPE_PROXY)) | | (G_TYPE_CHECK_CLASS_TYPE ((klass), IBUS_TYPE_PROXY)) | |
| #define IBUS_PROXY_GET_CLASS(obj) \ | | #define IBUS_PROXY_GET_CLASS(obj) \ | |
| (G_TYPE_INSTANCE_GET_CLASS ((obj), IBUS_TYPE_PROXY, IBusProxyClass)) | | (G_TYPE_INSTANCE_GET_CLASS ((obj), IBUS_TYPE_PROXY, IBusProxyClass)) | |
| | | | |
| G_BEGIN_DECLS | | G_BEGIN_DECLS | |
| | | | |
| typedef struct _IBusProxy IBusProxy; | | typedef struct _IBusProxy IBusProxy; | |
| typedef struct _IBusProxyClass IBusProxyClass; | | typedef struct _IBusProxyClass IBusProxyClass; | |
| | | | |
|
| | | #define IBUS_PROXY_FLAGS(obj) (IBUS_PROXY (obj)->flags) | |
| | | #define IBUS_PROXY_SET_FLAGS(obj,flag) G_STMT_START{ (IBUS_PROXY_FLAGS ( | |
| | | obj) |= (flag)); }G_STMT_END | |
| | | #define IBUS_PROXY_UNSET_FLAGS(obj,flag) G_STMT_START{ (IBUS_PROXY_FLAGS ( | |
| | | obj) &= ~(flag)); }G_STMT_END | |
| | | #define IBUS_PROXY_DESTROYED(obj) (IBUS_PROXY_FLAGS (obj) & IBUS_DE | |
| | | STROYED) | |
| | | | |
| /** | | /** | |
| * IBusProxy: | | * IBusProxy: | |
| * | | * | |
| * An opaque data type representing an IBusProxy. | | * An opaque data type representing an IBusProxy. | |
| */ | | */ | |
| struct _IBusProxy { | | struct _IBusProxy { | |
|
| IBusObject parent; | | GDBusProxy parent; | |
| /* instance members */ | | /* instance members */ | |
|
| | | guint32 flags; | |
| }; | | }; | |
| | | | |
| struct _IBusProxyClass { | | struct _IBusProxyClass { | |
|
| IBusObjectClass parent; | | GDBusProxyClass parent; | |
| | | | |
| /* class members */ | | /* class members */ | |
|
| gboolean (* ibus_signal) (IBusProxy *proxy, | | void (* destroy) (IBusProxy *proxy); | |
| IBusMessage *message); | | | |
| /*< private >*/ | | /*< private >*/ | |
| /* padding */ | | /* padding */ | |
| gpointer pdummy[7]; | | gpointer pdummy[7]; | |
| }; | | }; | |
| | | | |
| GType ibus_proxy_get_type (void); | | GType ibus_proxy_get_type (void); | |
| | | | |
|
| /** | | void ibus_proxy_destroy (IBusProxy *proxy); | |
| * ibus_proxy_new: | | | |
| * @name: The service name of proxy object. | | | |
| * @path: The path of proxy object. | | | |
| * @connection: An IBusConnection. | | | |
| * @returns: A newly allocated IBusProxy instance. | | | |
| * | | | |
| * New an IBusProxy instance. | | | |
| * Property IBusProxy:name is set as @name, and | | | |
| * IBusProxy:path is set as @path. | | | |
| */ | | | |
| IBusProxy *ibus_proxy_new (const gchar *name, | | | |
| const gchar *path, | | | |
| IBusConnection *connection | | | |
| ); | | | |
| | | | |
| /** | | | |
| * ibus_proxy_send: | | | |
| * @proxy: An IBusProxy. | | | |
| * @message: The IBusMessage to be sent. | | | |
| * @returns: TRUE if succeed; FALSE otherwise. | | | |
| * | | | |
| * Send an #IBusMessage to the corresponding service. | | | |
| * | | | |
| * @see_also ibus_proxy_call(), ibus_proxy_send_with_reply(), ibus_proxy_se | | | |
| nd_with_reply_and_block(). | | | |
| */ | | | |
| gboolean ibus_proxy_send (IBusProxy *proxy, | | | |
| IBusMessage *message); | | | |
| | | | |
| /** | | | |
| * ibus_proxy_call: | | | |
| * @proxy: An IBusProxy. | | | |
| * @method: The method to be called. | | | |
| * @first_arg_type: Type of first argument. | | | |
| * @...: Rest of arguments, NULL to mark the end. | | | |
| * @returns: TRUE if succeed; FALSE otherwise. | | | |
| * | | | |
| * Call a method of the corresponding service. | | | |
| * | | | |
| * @see_also ibus_proxy_send(), ibus_proxy_call_with_reply(), ibus_proxy_ca | | | |
| ll_with_reply_and_block(). | | | |
| */ | | | |
| gboolean ibus_proxy_call (IBusProxy *proxy, | | | |
| const gchar *method, | | | |
| GType first_arg_ | | | |
| type, | | | |
| ...); | | | |
| | | | |
| /** | | | |
| * ibus_proxy_call_with_reply: | | | |
| * @proxy: An IBusProxy. | | | |
| * @method: The method to be called. | | | |
| * @pending: Return location of a IBusPendingCall object, or NULL if connec | | | |
| tion is disconnected. | | | |
| * @timeout_milliseconds: Time out in milliseconds. | | | |
| * @error: Returned error is stored here; NULL to ignore error. | | | |
| * @first_arg_type: Type of first argument. | | | |
| * @...: Rest of arguments, NULL to mark the end. | | | |
| * @returns: TRUE if succeed; FALSE otherwise. | | | |
| * | | | |
| * Call a method of the corresponding service, and returns an IBusPendingCa | | | |
| ll used to receive a reply to the message. | | | |
| * This function calls ibus_connection_send_with_reply() to do the actual s | | | |
| ending. | | | |
| * | | | |
| * @see_also: ibus_connection_send_with_reply(), ibus_proxy_call(), | | | |
| * ibus_proxy_send_with_reply(), ibus_proxy_call_with_reply_and_block(). | | | |
| */ | | | |
| gboolean ibus_proxy_call_with_reply (IBusProxy *proxy, | | | |
| const gchar *method, | | | |
| IBusPendingCall **pending, | | | |
| gint timeout_mi | | | |
| lliseconds, | | | |
| IBusError **error, | | | |
| GType first_arg_t | | | |
| ype, | | | |
| ...); | | | |
| | | | |
| /** | | | |
| * ibus_proxy_call_with_reply_and_block: | | | |
| * @proxy: An IBusProxy. | | | |
| * @method: The method to be called. | | | |
| * @timeout_milliseconds: Time out in milliseconds. | | | |
| * @error: Returned error is stored here; NULL to ignore error. | | | |
| * @first_arg_type: Type of first argument. | | | |
| * @...: Rest of arguments, NULL to mark the end. | | | |
| * @returns: An IBusMessage that is the reply or NULL with an error code if | | | |
| the function fails. | | | |
| * | | | |
| * Call a method of the corresponding service and blocks a certain time per | | | |
| iod while waiting for | | | |
| * an IBusMessage as reply. | | | |
| * If the IBusMessage is not NULL, it calls ibus_connection_send_with_reply | | | |
| _and_block() to do the | | | |
| * actual sending. | | | |
| * | | | |
| * @see_also: ibus_connection_send_with_reply_and_block(), ibus_proxy_call( | | | |
| ), | | | |
| * ibus_proxy_send_with_reply(), ibus_proxy_call_with_reply_and_block(). | | | |
| */ | | | |
| IBusMessage *ibus_proxy_call_with_reply_and_block | | | |
| (IBusProxy *proxy, | | | |
| const gchar *method, | | | |
| gint timeout_mi | | | |
| lliseconds, | | | |
| IBusError **error, | | | |
| GType first_arg_ | | | |
| type, | | | |
| ...); | | | |
| | | | |
| /** | | | |
| * ibus_proxy_send_with_reply: | | | |
| * @proxy: An IBusProxy. | | | |
| * @message: The IBusMessage to be sent. | | | |
| * @pending: Return location of a IBusPendingCall object, or NULL if connec | | | |
| tion is disconnected. | | | |
| * @timeout_milliseconds: Time out in milliseconds. | | | |
| * @returns: TRUE if succeed; FALSE otherwise. | | | |
| * | | | |
| * Send an IBusMessage to the corresponding service and returns | | | |
| * an IBusPendingCall used to receive a reply to the message. | | | |
| * This function calls ibus_connection_send_with_reply() to do the actual s | | | |
| ending. | | | |
| * | | | |
| * @see_also: ibus_connection_send_with_reply(), ibus_proxy_send(), | | | |
| * ibus_proxy_call_with_reply(), ibus_proxy_send_with_reply_and_block(). | | | |
| */ | | | |
| gboolean ibus_proxy_send_with_reply (IBusProxy *proxy, | | | |
| IBusMessage *message, | | | |
| IBusPendingCall **pending, | | | |
| gint timeout_mi | | | |
| lliseconds); | | | |
| | | | |
| /** | | | |
| * ibus_proxy_send_with_reply_and_block: | | | |
| * @proxy: An IBusProxy. | | | |
| * @message: The IBusMessage to be sent. | | | |
| * @returns: An IBusMessage that is the reply or NULL with an error code if | | | |
| the function fails. | | | |
| * | | | |
| * Send an IBusMessage to the corresponding service and blocks a certain ti | | | |
| me period while waiting for | | | |
| * an IBusMessage as reply. | | | |
| * If the IBusMessage is not NULL, it calls ibus_connection_send_with_reply | | | |
| _and_block() to do the | | | |
| * actual sending. | | | |
| * | | | |
| * @see_also: ibus_connection_send_with_reply_and_block(), ibus_proxy_send( | | | |
| ), ibus_proxy_send_with_reply(), | | | |
| * ibus_proxy_call_with_reply_and_block(). | | | |
| */ | | | |
| IBusMessage *ibus_proxy_send_with_reply_and_block | | | |
| (IBusProxy *proxy, | | | |
| IBusMessage *message); | | | |
| | | | |
| /** | | | |
| * ibus_proxy_handle_signal: | | | |
| * @proxy: An IBusProxy. | | | |
| * @message: The IBusMessage to be sent. | | | |
| * @returns: TRUE if succeed; FALSE otherwise. | | | |
| * | | | |
| * Handle a signal by emitting IBusProxy::ibus-signal. | | | |
| * | | | |
| * If signal name is <constant>NameOwnerChanged</constant> | | | |
| * and the service name is identical to the old name, then | | | |
| * @proxy will be destroyed by ibus_object_destroy () and FALSE is returned | | | |
| . | | | |
| * Otherwise TRUE is returned. | | | |
| * | | | |
| * Note that if the path of of message is not identical to the IBusProxy:pa | | | |
| th | | | |
| * this function will not emit IBusProxy::ibus-signal. | | | |
| * | | | |
| */ | | | |
| gboolean ibus_proxy_handle_signal (IBusProxy *proxy, | | | |
| IBusMessage *message); | | | |
| | | | |
| /** | | | |
| * ibus_proxy_get_name: | | | |
| * @proxy: An IBusProxy. | | | |
| * @returns: The service name of the proxy object. | | | |
| * | | | |
| * Get the service name of a proxy object. | | | |
| */ | | | |
| const gchar *ibus_proxy_get_name (IBusProxy *proxy); | | | |
| | | | |
| /** | | | |
| * ibus_proxy_get_unique_name: | | | |
| * @proxy: An IBusProxy. | | | |
| * @returns: The service name of the proxy object. | | | |
| * | | | |
| * Get the unique name of the proxy object. | | | |
| */ | | | |
| const gchar *ibus_proxy_get_unique_name (IBusProxy *proxy); | | | |
| | | | |
| /** | | | |
| * ibus_proxy_get_path: | | | |
| * @proxy: An IBusProxy. | | | |
| * @returns: The path of proxy object. | | | |
| * | | | |
| * Get the path of a proxy object. | | | |
| */ | | | |
| const gchar *ibus_proxy_get_path (IBusProxy *proxy); | | | |
| | | | |
| /** | | | |
| * ibus_proxy_get_interface: | | | |
| * @proxy: An IBusProxy. | | | |
| * @returns: The service name of the proxy object. | | | |
| * | | | |
| * Get interface of a proxy object. | | | |
| */ | | | |
| const gchar *ibus_proxy_get_interface (IBusProxy *proxy); | | | |
| | | | |
| /** | | | |
| * ibus_proxy_get_connection: | | | |
| * @proxy: An IBusProxy. | | | |
| * @returns: (transfer none): The connection of the proxy object. | | | |
| * | | | |
| * Get the connection of a proxy object. | | | |
| */ | | | |
| IBusConnection *ibus_proxy_get_connection (IBusProxy *proxy); | | | |
| | | | |
| G_END_DECLS | | G_END_DECLS | |
| #endif | | #endif | |
| | | | |
End of changes. 8 change blocks. |
| 229 lines changed or deleted | | 19 lines changed or added | |
|
| ibusserializable.h | | ibusserializable.h | |
| | | | |
| skipping to change at line 22 | | skipping to change at line 22 | |
| * This library is distributed in the hope that it will be useful, | | * This library is distributed in the hope that it will be useful, | |
| * but WITHOUT ANY WARRANTY; without even the implied warranty of | | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
| * Lesser General Public License for more details. | | * Lesser General Public License for more details. | |
| * | | * | |
| * You should have received a copy of the GNU Lesser General Public | | * You should have received a copy of the GNU Lesser General Public | |
| * License along with this library; if not, write to the | | * License along with this library; if not, write to the | |
| * Free Software Foundation, Inc., 59 Temple Place - Suite 330, | | * Free Software Foundation, Inc., 59 Temple Place - Suite 330, | |
| * Boston, MA 02111-1307, USA. | | * Boston, MA 02111-1307, USA. | |
| */ | | */ | |
|
| | | | |
| | | #if !defined (__IBUS_H_INSIDE__) && !defined (IBUS_COMPILATION) | |
| | | #error "Only <ibus.h> can be included directly" | |
| | | #endif | |
| | | | |
| /** | | /** | |
| * SECTION: ibusserializable | | * SECTION: ibusserializable | |
| * @short_description: A serializable object. | | * @short_description: A serializable object. | |
| * @stability: Stable | | * @stability: Stable | |
| * | | * | |
| * An IBusSerializable is an IBus object which can be serialized, that is, | | * An IBusSerializable is an IBus object which can be serialized, that is, | |
| * to be to and from an IBusMessage. | | * to be to and from an IBusMessage. | |
| * | | * | |
| * This class is to be extended by other class that requires serialization. | | * This class is to be extended by other class that requires serialization. | |
| * An extended class should overrides following methods: | | * An extended class should overrides following methods: | |
| | | | |
| skipping to change at line 50 | | skipping to change at line 55 | |
| * <para><function>copy(desc,src)</function>: for copy between IBusSe
rializable.</para> | | * <para><function>copy(desc,src)</function>: for copy between IBusSe
rializable.</para> | |
| * </listitem> | | * </listitem> | |
| * </itemizedlist> | | * </itemizedlist> | |
| * See IBusSerializableSerializeFunc(), IBusSerializableDeserializeFunc(),
IBusSerializableCopyFunc() | | * See IBusSerializableSerializeFunc(), IBusSerializableDeserializeFunc(),
IBusSerializableCopyFunc() | |
| * for function prototype. | | * for function prototype. | |
| */ | | */ | |
| #ifndef __IBUS_SERIALIZABLE_H_ | | #ifndef __IBUS_SERIALIZABLE_H_ | |
| #define __IBUS_SERIALIZABLE_H_ | | #define __IBUS_SERIALIZABLE_H_ | |
| | | | |
| #include "ibusobject.h" | | #include "ibusobject.h" | |
|
| #include "ibusmessage.h" | | | |
| | | | |
| /* | | /* | |
| * Type macros. | | * Type macros. | |
| */ | | */ | |
| | | | |
| /* define IBusSerializable macros */ | | /* define IBusSerializable macros */ | |
| #define IBUS_TYPE_SERIALIZABLE \ | | #define IBUS_TYPE_SERIALIZABLE \ | |
| (ibus_serializable_get_type ()) | | (ibus_serializable_get_type ()) | |
| #define IBUS_SERIALIZABLE(obj) \ | | #define IBUS_SERIALIZABLE(obj) \ | |
| (G_TYPE_CHECK_INSTANCE_CAST ((obj), IBUS_TYPE_SERIALIZABLE, IBusSeriali
zable)) | | (G_TYPE_CHECK_INSTANCE_CAST ((obj), IBUS_TYPE_SERIALIZABLE, IBusSeriali
zable)) | |
| | | | |
| skipping to change at line 109 | | skipping to change at line 113 | |
| * Remove a value from attachment of an IBusSerializable. | | * Remove a value from attachment of an IBusSerializable. | |
| * This macro is an convenient wrapper of ibus_serializable_remove_qattachm
ent(). | | * This macro is an convenient wrapper of ibus_serializable_remove_qattachm
ent(). | |
| */ | | */ | |
| #define ibus_serializable_remove_attachment(o, k) \ | | #define ibus_serializable_remove_attachment(o, k) \ | |
| ibus_serializable_remove_qattachment (o, g_quark_from_string (k)) | | ibus_serializable_remove_qattachment (o, g_quark_from_string (k)) | |
| | | | |
| G_BEGIN_DECLS | | G_BEGIN_DECLS | |
| | | | |
| typedef struct _IBusSerializable IBusSerializable; | | typedef struct _IBusSerializable IBusSerializable; | |
| typedef struct _IBusSerializableClass IBusSerializableClass; | | typedef struct _IBusSerializableClass IBusSerializableClass; | |
|
| | | typedef struct _IBusSerializablePrivate IBusSerializablePrivate; | |
| | | | |
| /** | | /** | |
| * IBusSerializable: | | * IBusSerializable: | |
| * | | * | |
| * All the fields in the <structname>IBusSerializable</structname> structur
e are | | * All the fields in the <structname>IBusSerializable</structname> structur
e are | |
| * private to the #IBusSerializable and should never be accessed directly. | | * private to the #IBusSerializable and should never be accessed directly. | |
| */ | | */ | |
| struct _IBusSerializable { | | struct _IBusSerializable { | |
|
| GObject parent; | | /*< private >*/ | |
| /* instance members */ | | IBusObject parent; | |
| guint32 flags; | | IBusSerializablePrivate *priv; | |
| | | /* instance members */ | |
| }; | | }; | |
| | | | |
| /** | | /** | |
| * IBusSerializableSerializeFunc: | | * IBusSerializableSerializeFunc: | |
| * @object: An IBusSerializable. | | * @object: An IBusSerializable. | |
| * @iter: An IBusMessageIter. | | * @iter: An IBusMessageIter. | |
| * @returns: TRUE if succeed; FALSE otherwise. | | * @returns: TRUE if succeed; FALSE otherwise. | |
| * | | * | |
| * Prototype of serialize function. | | * Prototype of serialize function. | |
| * Serialize function convert an IBusSerializable to IBusMessageIter. | | * Serialize function convert an IBusSerializable to IBusMessageIter. | |
| * Returns a gboolean value which indicates whether the conversion is succe
ss. | | * Returns a gboolean value which indicates whether the conversion is succe
ss. | |
| * Return TRUE if succeed. | | * Return TRUE if succeed. | |
| */ | | */ | |
| typedef gboolean (* IBusSerializableSerializeFunc) (IBusSerializable
*object, | | typedef gboolean (* IBusSerializableSerializeFunc) (IBusSerializable
*object, | |
|
| IBusMessageIter
*iter); | | GVariantBuilder
*builder); | |
| | | | |
| /** | | /** | |
| * IBusSerializableDeserializeFunc: | | * IBusSerializableDeserializeFunc: | |
| * @object: An IBusSerializable. | | * @object: An IBusSerializable. | |
| * @iter: An IBusMessageIter. | | * @iter: An IBusMessageIter. | |
| * @returns: TRUE if succeed; FALSE otherwise. | | * @returns: TRUE if succeed; FALSE otherwise. | |
| * | | * | |
| * Prototype of deserialize function. | | * Prototype of deserialize function. | |
| * Deserialize function convert an IBusMessageIter to IBusSerializable. | | * Deserialize function convert an IBusMessageIter to IBusSerializable. | |
| * Returns a gboolean value which indicates whether the conversion is succe
ss. | | * Returns a gboolean value which indicates whether the conversion is succe
ss. | |
| */ | | */ | |
|
| typedef gboolean (* IBusSerializableDeserializeFunc) (IBusSerializable | | typedef gint (* IBusSerializableDeserializeFunc) (IBusSerializable | |
| *object, | | *object, | |
| IBusMessageIter | | GVariant | |
| *iter); | | *variant); | |
| | | | |
| /** | | /** | |
| * IBusSerializableCopyFunc: | | * IBusSerializableCopyFunc: | |
| * @dest: The destination IBusSerializable. | | * @dest: The destination IBusSerializable. | |
| * @src: A source IBusMessageIter. | | * @src: A source IBusMessageIter. | |
| * @returns: TRUE if succeed; FALSE otherwise. | | * @returns: TRUE if succeed; FALSE otherwise. | |
| * | | * | |
| * Prototype of copy function. | | * Prototype of copy function. | |
| * Copy function copy from source IBusSerializable to the destination one. | | * Copy function copy from source IBusSerializable to the destination one. | |
| * Returns a gboolean value which indicates whether the copying is success. | | * Returns a gboolean value which indicates whether the copying is success. | |
| */ | | */ | |
| typedef gboolean (* IBusSerializableCopyFunc) (IBusSerializable
*dest, | | typedef gboolean (* IBusSerializableCopyFunc) (IBusSerializable
*dest, | |
| const IBusSerializ
able *src); | | const IBusSerializ
able *src); | |
| struct _IBusSerializableClass { | | struct _IBusSerializableClass { | |
|
| | | /*< private >*/ | |
| IBusObjectClass parent; | | IBusObjectClass parent; | |
| | | | |
|
| /* signature */ | | | |
| GString *signature; | | | |
| | | | |
| /* virtual table */ | | /* virtual table */ | |
| gboolean (* serialize) (IBusSerializable *object, | | gboolean (* serialize) (IBusSerializable *object, | |
|
| IBusMessageIter *iter); | | GVariantBuilder *builder); | |
| gboolean (* deserialize) (IBusSerializable *object, | | gint (* deserialize) (IBusSerializable *object, | |
| IBusMessageIter *iter); | | GVariant *variant); | |
| gboolean (* copy) (IBusSerializable *dest, | | gboolean (* copy) (IBusSerializable *dest, | |
| const IBusSerializable *src); | | const IBusSerializable *src); | |
| /*< private >*/ | | /*< private >*/ | |
| /* padding */ | | /* padding */ | |
| gpointer pdummy[5]; | | gpointer pdummy[5]; | |
| }; | | }; | |
| | | | |
| GType ibus_serializable_get_type (void); | | GType ibus_serializable_get_type (void); | |
| | | | |
| /** | | /** | |
| | | | |
| skipping to change at line 253 | | skipping to change at line 257 | |
| * ibus_serializable_serialize: | | * ibus_serializable_serialize: | |
| * @object: An IBusSerializable. | | * @object: An IBusSerializable. | |
| * @iter: An IBusMessageIter. | | * @iter: An IBusMessageIter. | |
| * @returns: TRUE if succeed; FALSE otherwise. | | * @returns: TRUE if succeed; FALSE otherwise. | |
| * | | * | |
| * Serialize an IBusSerializable to an IBusMessageIter. | | * Serialize an IBusSerializable to an IBusMessageIter. | |
| * The serialize method should be implemented in extended class. | | * The serialize method should be implemented in extended class. | |
| * | | * | |
| * @see_also: IBusSerializableCopyFunc(). | | * @see_also: IBusSerializableCopyFunc(). | |
| */ | | */ | |
|
| gboolean ibus_serializable_serialize (IBusSerializable | | GVariant *ibus_serializable_serialize (IBusSerializable | |
| *object, | | *object); | |
| IBusMessageIter | | | |
| *iter); | | | |
| | | | |
| /** | | /** | |
| * ibus_serializable_deserialize: | | * ibus_serializable_deserialize: | |
| * @iter: An IBusMessageIter. | | * @iter: An IBusMessageIter. | |
| * @returns: The deserialized IBusSerializable. | | * @returns: The deserialized IBusSerializable. | |
| * | | * | |
| * Deserialize an IBusMessageIter to an IBusSerializable/ | | * Deserialize an IBusMessageIter to an IBusSerializable/ | |
| * The deserialize method should be implemented in extended class. | | * The deserialize method should be implemented in extended class. | |
| * | | * | |
| * @see_also: IBusSerializableCopyFunc(). | | * @see_also: IBusSerializableCopyFunc(). | |
| */ | | */ | |
|
| IBusSerializable *ibus_serializable_deserialize (IBusMessageIter
*iter); | | IBusSerializable *ibus_serializable_deserialize (GVariant
*variant); | |
| | | | |
| G_END_DECLS | | G_END_DECLS | |
| #endif | | #endif | |
| | | | |
End of changes. 11 change blocks. |
| 20 lines changed or deleted | | 22 lines changed or added | |
|
| ibusservice.h | | ibusservice.h | |
| | | | |
| skipping to change at line 22 | | skipping to change at line 22 | |
| * This library is distributed in the hope that it will be useful, | | * This library is distributed in the hope that it will be useful, | |
| * but WITHOUT ANY WARRANTY; without even the implied warranty of | | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
| * Lesser General Public License for more details. | | * Lesser General Public License for more details. | |
| * | | * | |
| * You should have received a copy of the GNU Lesser General Public | | * You should have received a copy of the GNU Lesser General Public | |
| * License along with this library; if not, write to the | | * License along with this library; if not, write to the | |
| * Free Software Foundation, Inc., 59 Temple Place - Suite 330, | | * Free Software Foundation, Inc., 59 Temple Place - Suite 330, | |
| * Boston, MA 02111-1307, USA. | | * Boston, MA 02111-1307, USA. | |
| */ | | */ | |
|
| | | | |
| | | #if !defined (__IBUS_H_INSIDE__) && !defined (IBUS_COMPILATION) | |
| | | #error "Only <ibus.h> can be included directly" | |
| | | #endif | |
| | | | |
| /** | | /** | |
| * SECTION: ibusservice | | * SECTION: ibusservice | |
| * @short_description: IBus service back-end. | | * @short_description: IBus service back-end. | |
| * @stability: Stable | | * @stability: Stable | |
| * | | * | |
| * An IBusService is a base class for services. | | * An IBusService is a base class for services. | |
| */ | | */ | |
| | | | |
| #ifndef __IBUS_SERVICE_H_ | | #ifndef __IBUS_SERVICE_H_ | |
| #define __IBUS_SERVICE_H_ | | #define __IBUS_SERVICE_H_ | |
| | | | |
|
| | | #include <gio/gio.h> | |
| #include "ibusobject.h" | | #include "ibusobject.h" | |
|
| #include "ibusconnection.h" | | | |
| | | | |
| /* | | /* | |
| * Type macros. | | * Type macros. | |
| */ | | */ | |
| | | | |
| /* define GOBJECT macros */ | | /* define GOBJECT macros */ | |
| #define IBUS_TYPE_SERVICE \ | | #define IBUS_TYPE_SERVICE \ | |
| (ibus_service_get_type ()) | | (ibus_service_get_type ()) | |
| #define IBUS_SERVICE(obj) \ | | #define IBUS_SERVICE(obj) \ | |
| (G_TYPE_CHECK_INSTANCE_CAST ((obj), IBUS_TYPE_SERVICE, IBusService)) | | (G_TYPE_CHECK_INSTANCE_CAST ((obj), IBUS_TYPE_SERVICE, IBusService)) | |
| | | | |
| skipping to change at line 58 | | skipping to change at line 63 | |
| (G_TYPE_CHECK_INSTANCE_TYPE ((obj), IBUS_TYPE_SERVICE)) | | (G_TYPE_CHECK_INSTANCE_TYPE ((obj), IBUS_TYPE_SERVICE)) | |
| #define IBUS_IS_SERVICE_CLASS(klass) \ | | #define IBUS_IS_SERVICE_CLASS(klass) \ | |
| (G_TYPE_CHECK_CLASS_TYPE ((klass), IBUS_TYPE_SERVICE)) | | (G_TYPE_CHECK_CLASS_TYPE ((klass), IBUS_TYPE_SERVICE)) | |
| #define IBUS_SERVICE_GET_CLASS(obj) \ | | #define IBUS_SERVICE_GET_CLASS(obj) \ | |
| (G_TYPE_INSTANCE_GET_CLASS ((obj), IBUS_TYPE_SERVICE, IBusServiceClass)
) | | (G_TYPE_INSTANCE_GET_CLASS ((obj), IBUS_TYPE_SERVICE, IBusServiceClass)
) | |
| | | | |
| G_BEGIN_DECLS | | G_BEGIN_DECLS | |
| | | | |
| typedef struct _IBusService IBusService; | | typedef struct _IBusService IBusService; | |
| typedef struct _IBusServiceClass IBusServiceClass; | | typedef struct _IBusServiceClass IBusServiceClass; | |
|
| | | typedef struct _IBusServicePrivate IBusServicePrivate; | |
| | | | |
| /** | | /** | |
| * IBusService: | | * IBusService: | |
| * | | * | |
| * An opaque data type representing an IBusService. | | * An opaque data type representing an IBusService. | |
| */ | | */ | |
| struct _IBusService { | | struct _IBusService { | |
|
| | | /*< private >*/ | |
| IBusObject parent; | | IBusObject parent; | |
|
| /* instance members */ | | IBusServicePrivate *priv; | |
| }; | | }; | |
| | | | |
|
| /** | | | |
| * ServiceIBusMessageFunc: | | | |
| * @service: An IBsService. | | | |
| * @connection: Connection to IBus daemon. | | | |
| * @message: IBusMessage to be sent. | | | |
| * @returns: %TRUE if succeed; %FALSE if failed. | | | |
| * | | | |
| * Prototype of IBus service message sending callback function. | | | |
| */ | | | |
| typedef gboolean (* ServiceIBusMessageFunc) (IBusService *service, | | | |
| IBusConnection *connection | | | |
| , | | | |
| IBusMessage *message); | | | |
| | | | |
| /** | | | |
| * ServiceIBusSignalFunc: | | | |
| * @service: An IBsService. | | | |
| * @connection: Connection to IBus daemon. | | | |
| * @message: IBusMessage to be sent. | | | |
| * @returns: %TRUE if succeed; %FALSE if failed. | | | |
| * | | | |
| * Prototype of IBus service signal sending callback function. | | | |
| */ | | | |
| typedef gboolean (* ServiceIBusSignalFunc) (IBusService *service, | | | |
| IBusConnection *connection | | | |
| , | | | |
| IBusMessage *message); | | | |
| | | | |
| struct _IBusServiceClass { | | struct _IBusServiceClass { | |
|
| | | /*< private >*/ | |
| IBusObjectClass parent; | | IBusObjectClass parent; | |
| | | | |
|
| /* signals */ | | /*< public >*/ | |
| gboolean (* ibus_message) (IBusService *service, | | /* virtual functions */ | |
| IBusConnection *connection, | | void (* service_method_call) | |
| IBusMessage *message); | | (IBusService *service, | |
| gboolean (* ibus_signal) (IBusService *service, | | GDBusConnection *connection, | |
| IBusConnection *connection, | | const gchar *sender, | |
| IBusMessage *message); | | const gchar *object_path, | |
| | | const gchar *interface_name, | |
| | | const gchar *method_name, | |
| | | GVariant *parameters, | |
| | | GDBusMethodInvocation | |
| | | *invocation); | |
| | | GVariant * (* service_get_property) | |
| | | (IBusService *service, | |
| | | GDBusConnection *connection, | |
| | | const gchar *sender, | |
| | | const gchar *object_path, | |
| | | const gchar *interface_name, | |
| | | const gchar *property_name, | |
| | | GError **error); | |
| | | gboolean (* service_set_property) | |
| | | (IBusService *service, | |
| | | GDBusConnection *connection, | |
| | | const gchar *sender, | |
| | | const gchar *object_path, | |
| | | const gchar *interface_name, | |
| | | const gchar *property_name, | |
| | | GVariant *value, | |
| | | GError **error); | |
| /*< private >*/ | | /*< private >*/ | |
|
| | | GArray *interfaces; | |
| | | | |
| /* padding */ | | /* padding */ | |
|
| gpointer pdummy[6]; | | gpointer pdummy[4]; | |
| }; | | }; | |
| | | | |
| GType ibus_service_get_type (void); | | GType ibus_service_get_type (void); | |
| | | | |
| /** | | /** | |
| * ibus_service_new: | | * ibus_service_new: | |
| * @path: Object path. | | * @path: Object path. | |
| * @returns: A newly allocated IBusService | | * @returns: A newly allocated IBusService | |
| * | | * | |
| * New an IBusService. | | * New an IBusService. | |
| */ | | */ | |
|
| IBusService *ibus_service_new (const gchar *path); | | IBusService *ibus_service_new (GDBusConnection *connec | |
| | | tion, | |
| | | const gchar *path); | |
| /** | | /** | |
|
| * ibus_service_get_path: | | * ibus_service_get_object_path: | |
| * @service: An IBusService. | | * @service: An IBusService. | |
| * @returns: The object path of @service | | * @returns: The object path of @service | |
| * | | * | |
| * Returns the object path of an IBusService. | | * Returns the object path of an IBusService. | |
| */ | | */ | |
|
| const gchar *ibus_service_get_path (IBusService *service); | | const gchar *ibus_service_get_object_path (IBusService *servic | |
| | | e); | |
| /** | | | |
| * ibus_service_handle_message: | | | |
| * @service: An IBusService. | | | |
| * @connection: Corresponding IBusCOnnection | | | |
| * @message: IBusMessage to be handled. | | | |
| * @returns: TRUE if succeed; FALSE otherwise. | | | |
| * | | | |
| * Emit an IBusMessage on an IBusConnection. | | | |
| */ | | | |
| gboolean ibus_service_handle_message (IBusService *service, | | | |
| IBusConnection *connection | | | |
| , | | | |
| IBusMessage *message); | | | |
| | | | |
| /** | | | |
| * ibus_service_add_to_connection: | | | |
| * @service: An IBusService. | | | |
| * @connection: Corresponding IBusCOnnection | | | |
| * @returns: TRUE if succeed; FALSE otherwise. | | | |
| * | | | |
| * Add an IBus Service to an IBusConnection. | | | |
| * This function also connects the service to the signal IBusConnection::de | | | |
| stroy of the connection. | | | |
| */ | | | |
| gboolean ibus_service_add_to_connection (IBusService *service, | | | |
| IBusConnection *connection | | | |
| ); | | | |
| | | | |
| /** | | /** | |
| * ibus_service_get_connections: | | * ibus_service_get_connections: | |
| * @service: An IBusService. | | * @service: An IBusService. | |
|
| * @returns: (transfer container) (element-type IBusConnection): A newly al
located list of connections. | | * @returns: (transfer all) (element-type GDBusConnection): A newly allocat
ed list of connections. | |
| * | | * | |
|
| * Returns a copy of list of connections, but the caller does not own the e
lement. | | * Returns a connections. | |
| */ | | */ | |
|
| GList *ibus_service_get_connections (IBusService *service); | | GDBusConnection *ibus_service_get_connection (IBusService *servic
e); | |
| | | | |
| /** | | /** | |
|
| * ibus_service_remove_from_connection: | | * ibus_service_register: | |
| * @service: An IBusService. | | * @service: An IBusService. | |
|
| * @connection: Corresponding IBusCOnnection | | * @connection: A GDBusConnection the service will be registered to. | |
| * @returns: TRUE if succeed; FALSE otherwise. | | * @error: Return location for error or NULL. | |
| | | * @returns: TRUE if the service was registered, FALSE otherwise. | |
| * | | * | |
|
| * Remove an IBusService from an IBusConnection. | | * Registers service to a connection. | |
| * This function also disconnects the signal IBusConnection::destroy. | | | |
| */ | | */ | |
|
| gboolean ibus_service_remove_from_connection | | gboolean ibus_service_register (IBusService *servic | |
| (IBusService *service, | | e, | |
| IBusConnection *connection | | GDBusConnection *connec | |
| ); | | tion, | |
| | | GError **error) | |
| | | ; | |
| /** | | /** | |
|
| * ibus_service_remove_from_all_connections: | | * ibus_service_unregister: | |
| * @service: An IBusService. | | * @service: An IBusService. | |
|
| * @returns: TRUE if succeed; FALSE otherwise. | | * @connection: A GDBusConnection the service was registered with. | |
| * | | * | |
|
| * Remove an IBusService from all connections. | | * Unregisters service from a connection. | |
| * This function also disconnects the signal IBusConnection::destroy. | | | |
| */ | | */ | |
|
| gboolean ibus_service_remove_from_all_connections | | void ibus_service_unregister (IBusService *servic | |
| (IBusService *service); | | e, | |
| | | GDBusConnection *connec | |
| | | tion); | |
| | | | |
| /** | | /** | |
| * ibus_service_send_signal: | | * ibus_service_send_signal: | |
| * @service: An IBusService. | | * @service: An IBusService. | |
| * @interface: The interface the signal is emitted from. | | * @interface: The interface the signal is emitted from. | |
| * @name: Name of the signal. | | * @name: Name of the signal. | |
| * @first_arg_type: Type of first argument. | | * @first_arg_type: Type of first argument. | |
| * @...: Rest of arguments, NULL to mark the end. | | * @...: Rest of arguments, NULL to mark the end. | |
| * @returns: TRUE if succeed; FALSE otherwise. | | * @returns: TRUE if succeed; FALSE otherwise. | |
| * | | * | |
| * Send signal to all the IBusConnections of an IBusService. | | * Send signal to all the IBusConnections of an IBusService. | |
| * | | * | |
|
| * @see_also: ibus_connection_send_signal() | | * @see_also: g_dbus_connection_emit_signal() | |
| */ | | */ | |
|
| gboolean ibus_service_send_signal (IBusService *service, | | gboolean ibus_service_emit_signal (IBusService *servic | |
| const gchar *interface, | | e, | |
| const gchar *name, | | const gchar *dest_b | |
| GType first_arg_ | | us_name, | |
| type, | | const gchar *interf | |
| ...); | | ace_name, | |
| | | const gchar *signal | |
| | | _name, | |
| | | GVariant *parame | |
| | | ters, | |
| | | GError **error) | |
| | | ; | |
| | | /** | |
| | | * ibus_service_class_add_interfaces: | |
| | | * @klass: An IBusServiceClass. | |
| | | * @xml_data: The introspection xml data. | |
| | | * @error: Error. | |
| | | * | |
| | | * Set the interface introspection information with the service class. | |
| | | */ | |
| | | gboolean ibus_service_class_add_interfaces | |
| | | (IBusServiceClass *klass, | |
| | | const gchar *xml_da | |
| | | ta); | |
| | | | |
| G_END_DECLS | | G_END_DECLS | |
| #endif | | #endif | |
| | | | |
End of changes. 27 change blocks. |
| 96 lines changed or deleted | | 95 lines changed or added | |
|