| ibusattribute.h | | ibusattribute.h | |
| | | | |
| skipping to change at line 20 | | skipping to change at line 20 | |
| * 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. | |
| */ | | */ | |
|
| | | /** | |
| | | * SECTION: ibusattribute | |
| | | * @short_description: Attributes of IBusText. | |
| | | * @stability: Stable | |
| | | * @see_also: #IBusText | |
| | | * | |
| | | * An IBusAttribute represents an attribute that associate to IBusText. | |
| | | * It decorates preedit buffer and auxiliary text with underline, foregroun | |
| | | d and background colors. | |
| | | */ | |
| #ifndef __IBUS_ATTRIBUTE_H_ | | #ifndef __IBUS_ATTRIBUTE_H_ | |
| #define __IBUS_ATTRIBUTE_H_ | | #define __IBUS_ATTRIBUTE_H_ | |
| | | | |
| #include "ibusserializable.h" | | #include "ibusserializable.h" | |
|
| | | | |
| /* | | /* | |
| * Type macros. | | * Type macros. | |
| */ | | */ | |
| /* define IBusAttribute macros */ | | /* define IBusAttribute macros */ | |
| #define IBUS_TYPE_ATTRIBUTE \ | | #define IBUS_TYPE_ATTRIBUTE \ | |
| (ibus_attribute_get_type ()) | | (ibus_attribute_get_type ()) | |
| #define IBUS_ATTRIBUTE(obj) \ | | #define IBUS_ATTRIBUTE(obj) \ | |
| (G_TYPE_CHECK_INSTANCE_CAST ((obj), IBUS_TYPE_ATTRIBUTE, IBusAttribute)
) | | (G_TYPE_CHECK_INSTANCE_CAST ((obj), IBUS_TYPE_ATTRIBUTE, IBusAttribute)
) | |
| #define IBUS_ATTRIBUTE_CLASS(klass) \ | | #define IBUS_ATTRIBUTE_CLASS(klass) \ | |
| (G_TYPE_CHECK_CLASS_CAST ((klass), IBUS_TYPE_ATTRIBUTE, IBusAttributeCl
ass)) | | (G_TYPE_CHECK_CLASS_CAST ((klass), IBUS_TYPE_ATTRIBUTE, IBusAttributeCl
ass)) | |
| | | | |
| skipping to change at line 56 | | skipping to change at line 64 | |
| (G_TYPE_CHECK_INSTANCE_CAST ((obj), IBUS_TYPE_ATTR_LIST, IBusAttrList)) | | (G_TYPE_CHECK_INSTANCE_CAST ((obj), IBUS_TYPE_ATTR_LIST, IBusAttrList)) | |
| #define IBUS_ATTR_LIST_CLASS(klass) \ | | #define IBUS_ATTR_LIST_CLASS(klass) \ | |
| (G_TYPE_CHECK_CLASS_CAST ((klass), IBUS_TYPE_ATTR_LIST, IBusAttrListCla
ss)) | | (G_TYPE_CHECK_CLASS_CAST ((klass), IBUS_TYPE_ATTR_LIST, IBusAttrListCla
ss)) | |
| #define IBUS_IS_ATTR_LIST(obj) \ | | #define IBUS_IS_ATTR_LIST(obj) \ | |
| (G_TYPE_CHECK_INSTANCE_TYPE ((obj), IBUS_TYPE_ATTR_LIST)) | | (G_TYPE_CHECK_INSTANCE_TYPE ((obj), IBUS_TYPE_ATTR_LIST)) | |
| #define IBUS_IS_ATTR_LIST_CLASS(klass) \ | | #define IBUS_IS_ATTR_LIST_CLASS(klass) \ | |
| (G_TYPE_CHECK_CLASS_TYPE ((klass), IBUS_TYPE_ATTR_LIST)) | | (G_TYPE_CHECK_CLASS_TYPE ((klass), IBUS_TYPE_ATTR_LIST)) | |
| #define IBUS_ATTR_LIST_GET_CLASS(obj) \ | | #define IBUS_ATTR_LIST_GET_CLASS(obj) \ | |
| (G_TYPE_INSTANCE_GET_CLASS ((obj), IBUS_TYPE_ATTR_LIST, IBusAttrListCla
ss)) | | (G_TYPE_INSTANCE_GET_CLASS ((obj), IBUS_TYPE_ATTR_LIST, IBusAttrListCla
ss)) | |
| | | | |
|
| | | /** | |
| | | * IBusAttrType: | |
| | | * @IBUS_ATTR_TYPE_UNDERLINE: Decorate with underline. | |
| | | * @IBUS_ATTR_TYPE_FOREGROUND: Foreground color. | |
| | | * @IBUS_ATTR_TYPE_BACKGROUND: Background color. | |
| | | * | |
| | | * Type of IBusText attribute. | |
| | | */ | |
| typedef enum { | | typedef enum { | |
| IBUS_ATTR_TYPE_UNDERLINE = 1, | | IBUS_ATTR_TYPE_UNDERLINE = 1, | |
| IBUS_ATTR_TYPE_FOREGROUND = 2, | | IBUS_ATTR_TYPE_FOREGROUND = 2, | |
| IBUS_ATTR_TYPE_BACKGROUND = 3, | | IBUS_ATTR_TYPE_BACKGROUND = 3, | |
| } IBusAttrType; | | } IBusAttrType; | |
| | | | |
|
| | | /** | |
| | | * IBusAttrUnderline: | |
| | | * @IBUS_ATTR_UNDERLINE_NONE: No underline. | |
| | | * @IBUS_ATTR_UNDERLINE_SINGLE: Single underline. | |
| | | * @IBUS_ATTR_UNDERLINE_DOUBLE: Double underline. | |
| | | * @IBUS_ATTR_UNDERLINE_LOW: Low underline ? %FIXME | |
| | | * | |
| | | * Type of IBusText attribute. | |
| | | */ | |
| typedef enum { | | typedef enum { | |
| IBUS_ATTR_UNDERLINE_NONE = 0, | | IBUS_ATTR_UNDERLINE_NONE = 0, | |
| IBUS_ATTR_UNDERLINE_SINGLE = 1, | | IBUS_ATTR_UNDERLINE_SINGLE = 1, | |
| IBUS_ATTR_UNDERLINE_DOUBLE = 2, | | IBUS_ATTR_UNDERLINE_DOUBLE = 2, | |
| IBUS_ATTR_UNDERLINE_LOW = 3, | | IBUS_ATTR_UNDERLINE_LOW = 3, | |
| } IBusAttrUnderline; | | } IBusAttrUnderline; | |
| | | | |
| G_BEGIN_DECLS | | G_BEGIN_DECLS | |
| | | | |
| typedef struct _IBusAttribute IBusAttribute; | | typedef struct _IBusAttribute IBusAttribute; | |
| typedef struct _IBusAttributeClass IBusAttributeClass; | | typedef struct _IBusAttributeClass IBusAttributeClass; | |
| typedef struct _IBusAttrList IBusAttrList; | | typedef struct _IBusAttrList IBusAttrList; | |
| typedef struct _IBusAttrListClass IBusAttrListClass; | | typedef struct _IBusAttrListClass IBusAttrListClass; | |
| | | | |
|
| | | /** | |
| | | * IBusAttribute: | |
| | | * @type: IBusAttributeType | |
| | | * @value: Value for the type. | |
| | | * @start_index: The starting index, inclusive. | |
| | | * @end_index: The ending index, exclusive. | |
| | | * | |
| | | * Signify the type, value and scope of the attribute. | |
| | | * The scope starts from @start_index till the @end_index-1. | |
| | | */ | |
| struct _IBusAttribute { | | struct _IBusAttribute { | |
| IBusSerializable parent; | | IBusSerializable parent; | |
| | | | |
|
| /* members */ | | /*< public >*/ | |
| guint type; | | guint type; | |
| guint value; | | guint value; | |
| guint start_index; | | guint start_index; | |
| guint end_index; | | guint end_index; | |
| }; | | }; | |
| | | | |
| struct _IBusAttributeClass { | | struct _IBusAttributeClass { | |
| IBusSerializableClass parent; | | IBusSerializableClass parent; | |
| }; | | }; | |
| | | | |
|
| | | /** | |
| | | * IBusAttrList: | |
| | | * @attributes: GArray that holds #IBusAttribute. | |
| | | * | |
| | | * Array of IBusAttribute. | |
| | | */ | |
| struct _IBusAttrList { | | struct _IBusAttrList { | |
| IBusSerializable parent; | | IBusSerializable parent; | |
| | | | |
|
| /* members */ | | /*< public >*/ | |
| GArray *attributes; | | GArray *attributes; | |
| }; | | }; | |
| | | | |
| struct _IBusAttrListClass { | | struct _IBusAttrListClass { | |
| IBusSerializableClass parent; | | IBusSerializableClass parent; | |
| }; | | }; | |
| | | | |
|
| | | /** | |
| | | * ibus_attribute_get_type: | |
| | | * @returns: GType of IBusAttribute. | |
| | | * | |
| | | * Returns GType of IBusAttribute. | |
| | | */ | |
| GType ibus_attribute_get_type (); | | GType ibus_attribute_get_type (); | |
|
| | | | |
| | | /** | |
| | | * ibus_attribute_new: | |
| | | * @type: Type of the attribute. | |
| | | * @value: Value of the attribute. | |
| | | * @start_index: Where attribute starts. | |
| | | * @end_index: Where attribute ends. | |
| | | * @returns: A newly allocated IBusAttribute. | |
| | | * | |
| | | * New an IBusAttribute. | |
| | | */ | |
| IBusAttribute *ibus_attribute_new (guint type, | | IBusAttribute *ibus_attribute_new (guint type, | |
| guint value, | | guint value, | |
| guint start_inde
x, | | guint start_inde
x, | |
| guint end_index)
; | | guint end_index)
; | |
|
| | | /** | |
| | | * ibus_attr_underline_new: | |
| | | * @underline_type: Type of underline. | |
| | | * @start_index: Where attribute starts. | |
| | | * @end_index: Where attribute ends. | |
| | | * @returns: A newly allocated IBusAttribute. | |
| | | * | |
| | | * New an underline IBusAttribute. | |
| | | */ | |
| IBusAttribute *ibus_attr_underline_new (guint underline_
type, | | IBusAttribute *ibus_attr_underline_new (guint underline_
type, | |
| guint start_inde
x, | | guint start_inde
x, | |
| guint end_index)
; | | guint end_index)
; | |
|
| | | /** | |
| | | * ibus_attr_foreground_new: | |
| | | * @color: Color in RGB. | |
| | | * @start_index: Where attribute starts. | |
| | | * @end_index: Where attribute ends. | |
| | | * @returns: A newly allocated IBusAttribute. | |
| | | * | |
| | | * New an foreground IBusAttribute. | |
| | | */ | |
| IBusAttribute *ibus_attr_foreground_new (guint color, | | IBusAttribute *ibus_attr_foreground_new (guint color, | |
| guint start_inde
x, | | guint start_inde
x, | |
| guint end_index)
; | | guint end_index)
; | |
|
| | | /** | |
| | | * ibus_attr_background_new: | |
| | | * @color: Color in RGB. | |
| | | * @start_index: Where attribute starts. | |
| | | * @end_index: Where attribute ends. | |
| | | * @returns: A newly allocated IBusAttribute. | |
| | | * | |
| | | * New an background IBusAttribute. | |
| | | */ | |
| IBusAttribute *ibus_attr_background_new (guint color, | | IBusAttribute *ibus_attr_background_new (guint color, | |
| guint start_inde
x, | | guint start_inde
x, | |
| guint end_index)
; | | guint end_index)
; | |
| | | | |
|
| | | /** | |
| | | * ibus_attr_list_get_type: | |
| | | * @returns: GType of IBusAttrList. | |
| | | * | |
| | | * Returns GType of IBusAttrList. | |
| | | */ | |
| GType ibus_attr_list_get_type (); | | GType ibus_attr_list_get_type (); | |
|
| | | | |
| | | /** | |
| | | * ibus_attr_list_new: | |
| | | * @returns: A newly allocated IBusAttrList. | |
| | | * | |
| | | * New an IBusAttrList. | |
| | | */ | |
| IBusAttrList *ibus_attr_list_new (); | | IBusAttrList *ibus_attr_list_new (); | |
|
| | | | |
| | | /** | |
| | | * ibus_attr_list_append: | |
| | | * @attr_list: An IBusAttrList instance. | |
| | | * @attr: The IBusAttribute instance to be appended. | |
| | | * | |
| | | * Append an IBusAttribute to IBusAttrList. | |
| | | */ | |
| void ibus_attr_list_append (IBusAttrList *attr_list, | | void ibus_attr_list_append (IBusAttrList *attr_list, | |
| IBusAttribute *attr); | | IBusAttribute *attr); | |
|
| | | /** | |
| | | * ibus_attr_list_get: | |
| | | * @attr_list: An IBusAttrList instance. | |
| | | * @index: Index of the @attr_list. | |
| | | * @returns: IBusAttribute at given index, NULL if no such IBusAttribute. | |
| | | * | |
| | | * Returns IBusAttribute at given index. | |
| | | */ | |
| IBusAttribute *ibus_attr_list_get (IBusAttrList *attr_list, | | IBusAttribute *ibus_attr_list_get (IBusAttrList *attr_list, | |
| guint index); | | guint index); | |
| | | | |
| G_END_DECLS | | G_END_DECLS | |
| #endif | | #endif | |
| | | | |
End of changes. 17 change blocks. |
| 3 lines changed or deleted | | 118 lines changed or added | |
|
| ibusenginedesc.h | | ibusenginedesc.h | |
| | | | |
| skipping to change at line 20 | | skipping to change at line 20 | |
| * 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. | |
| */ | | */ | |
|
| | | /** | |
| | | * SECTION: ibusenginedesc | |
| | | * @short_description: Input method engine description data. | |
| | | * @stability: Stable | |
| | | * @see_also: #IBusComponent, #IBusEngine | |
| | | * | |
| | | * An IBusEngineDesc stores description data of IBusEngine. | |
| | | * 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() | |
| | | * to construct IBusEngineDesc. | |
| | | * | |
| | | * However, the recommended way to load engine description data is | |
| | | * using ibus_component_new_from_file() to load a component file, | |
| | | * which also includes engine description data. | |
| | | */ | |
| | | | |
| #ifndef __ENGINE_DESC_H_ | | #ifndef __ENGINE_DESC_H_ | |
| #define __ENGINE_DESC_H_ | | #define __ENGINE_DESC_H_ | |
| | | | |
| #include "ibusserializable.h" | | #include "ibusserializable.h" | |
| #include "ibusxml.h" | | #include "ibusxml.h" | |
| | | | |
| /* | | /* | |
| * Type macros. | | * Type macros. | |
| */ | | */ | |
| | | | |
| | | | |
| skipping to change at line 50 | | skipping to change at line 66 | |
| (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 _IBusEngineDescClass IBusEngineDescClass; | | typedef struct _IBusEngineDescClass IBusEngineDescClass; | |
| typedef struct _BusComponent BusComponent; | | typedef struct _BusComponent BusComponent; | |
| | | | |
|
| | | /** | |
| | | * 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 | |
| | | * @rank: Preference rank among engines, the highest ranked IME will put in | |
| | | * the front. | |
| | | * | |
| | | * Input method engine description data. | |
| | | */ | |
| struct _IBusEngineDesc { | | struct _IBusEngineDesc { | |
| IBusSerializable parent; | | IBusSerializable parent; | |
| /* instance members */ | | /* instance members */ | |
| | | | |
|
| | | /*< public >*/ | |
| gchar *name; | | gchar *name; | |
| gchar *longname; | | gchar *longname; | |
| gchar *description; | | gchar *description; | |
| gchar *language; | | gchar *language; | |
| gchar *license; | | gchar *license; | |
| gchar *author; | | gchar *author; | |
| gchar *icon; | | gchar *icon; | |
| gchar *layout; | | gchar *layout; | |
| guint rank; | | 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); | |
|
| | | | |
| | | /** | |
| | | * ibus_engine_desc_new: | |
| | | * @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 | |
| | | * @returns: A newly allocated IBusEngineDesc. | |
| | | * | |
| | | * New a IBusEngineDesc. | |
| | | */ | |
| IBusEngineDesc *ibus_engine_desc_new (const gchar *name, | | IBusEngineDesc *ibus_engine_desc_new (const gchar *name, | |
| 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_new_from_xml_node: | |
| | | * @node: An XML node | |
| | | * @returns: A newly allocated IBusEngineDesc that contains description fro | |
| | | m | |
| | | * @node. | |
| | | * | |
| | | * New a IBusEngineDesc from an XML node. | |
| | | * <note><para>This function is called by ibus_component_new_from_file(), | |
| | | * so developers normally do not need to call it directly. | |
| | | * </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_output: | |
| | | * @info: An IBusEngineDesc | |
| | | * @output: XML-formatted Input method engine description. | |
| | | * @indent: Number of indent (showed as 4 spaces). | |
| | | * | |
| | | * Output XML-formatted input method engine description. | |
| | | * 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, | |
| gint indent); | | gint indent); | |
| G_END_DECLS | | G_END_DECLS | |
| #endif | | #endif | |
| | | | |
End of changes. 7 change blocks. |
| 1 lines changed or deleted | | 68 lines changed or added | |
|
| ibusproperty.h | | ibusproperty.h | |
| | | | |
| skipping to change at line 20 | | skipping to change at line 20 | |
| * 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. | |
| */ | | */ | |
|
| | | /** | |
| | | * SECTION: ibusproperty | |
| | | * @short_description: UI component for input method engine property. | |
| | | * @stability: Stable | |
| | | * @see_also: #IBusEngine | |
| | | * | |
| | | * An IBusProperty is an UI component like a button or a menu item | |
| | | * which shows the status of corresponding input method engine property. | |
| | | * End user can operate and see the current status of IME through these com | |
| | | ponents. | |
| | | * For example, ibus-chewing users change the English/Chinese input mode by | |
| | | * pressing ctrl-space or click on the Eng/Chi switch button. | |
| | | * And the IBusProperty shows the change correspondingly. | |
| | | */ | |
| #ifndef __IBUS_PROPERTY_H_ | | #ifndef __IBUS_PROPERTY_H_ | |
| #define __IBUS_PROPERTY_H_ | | #define __IBUS_PROPERTY_H_ | |
| | | | |
| #include "ibusserializable.h" | | #include "ibusserializable.h" | |
| #include "ibustext.h" | | #include "ibustext.h" | |
| | | | |
| G_BEGIN_DECLS | | G_BEGIN_DECLS | |
| | | | |
| /* | | /* | |
| * Type macros. | | * Type macros. | |
| | | | |
| skipping to change at line 62 | | skipping to change at line 75 | |
| (G_TYPE_CHECK_INSTANCE_CAST ((obj), IBUS_TYPE_PROP_LIST, IBusPropList)) | | (G_TYPE_CHECK_INSTANCE_CAST ((obj), IBUS_TYPE_PROP_LIST, IBusPropList)) | |
| #define IBUS_PROP_LIST_CLASS(klass) \ | | #define IBUS_PROP_LIST_CLASS(klass) \ | |
| (G_TYPE_CHECK_CLASS_CAST ((klass), IBUS_TYPE_PROP_LIST, IBusPropListCla
ss)) | | (G_TYPE_CHECK_CLASS_CAST ((klass), IBUS_TYPE_PROP_LIST, IBusPropListCla
ss)) | |
| #define IBUS_IS_PROP_LIST(obj) \ | | #define IBUS_IS_PROP_LIST(obj) \ | |
| (G_TYPE_CHECK_INSTANCE_TYPE ((obj), IBUS_TYPE_PROP_LIST)) | | (G_TYPE_CHECK_INSTANCE_TYPE ((obj), IBUS_TYPE_PROP_LIST)) | |
| #define IBUS_IS_PROP_LIST_CLASS(klass) \ | | #define IBUS_IS_PROP_LIST_CLASS(klass) \ | |
| (G_TYPE_CHECK_CLASS_TYPE ((klass), IBUS_TYPE_PROP_LIST)) | | (G_TYPE_CHECK_CLASS_TYPE ((klass), IBUS_TYPE_PROP_LIST)) | |
| #define IBUS_PROP_LIST_GET_CLASS(obj) \ | | #define IBUS_PROP_LIST_GET_CLASS(obj) \ | |
| (G_TYPE_INSTANCE_GET_CLASS ((obj), IBUS_TYPE_PROP_LIST, IBusPropListCla
ss)) | | (G_TYPE_INSTANCE_GET_CLASS ((obj), IBUS_TYPE_PROP_LIST, IBusPropListCla
ss)) | |
| | | | |
|
| | | /** | |
| | | * IBusPropType: | |
| | | * @PROP_TYPE_NORMAL: Property is shown as normal text. | |
| | | * @PROP_TYPE_TOGGLE: Property is shown as a toggle button. | |
| | | * @PROP_TYPE_RADIO: Property is shown as a radio selection option. | |
| | | * @PROP_TYPE_MENU: Property is shown as a menu, usually imply it has sub m | |
| | | enu | |
| | | * items. | |
| | | * @PROP_TYPE_SEPARATOR: A separator for menu. | |
| | | * | |
| | | * Type of IBusProperty. | |
| | | */ | |
| typedef enum { | | typedef enum { | |
| PROP_TYPE_NORMAL = 0, | | PROP_TYPE_NORMAL = 0, | |
| PROP_TYPE_TOGGLE = 1, | | PROP_TYPE_TOGGLE = 1, | |
| PROP_TYPE_RADIO = 2, | | PROP_TYPE_RADIO = 2, | |
| PROP_TYPE_MENU = 3, | | PROP_TYPE_MENU = 3, | |
| PROP_TYPE_SEPARATOR = 4, | | PROP_TYPE_SEPARATOR = 4, | |
| } IBusPropType; | | } IBusPropType; | |
| | | | |
|
| | | /** | |
| | | * IBusPropState: | |
| | | * @PROP_STATE_UNCHECKED: Property option is unchecked. | |
| | | * @PROP_STATE_CHECKED: Property option is checked. | |
| | | * @PROP_STATE_INCONSISTENT: The state is inconsistent with the associated | |
| | | IME | |
| | | * property. | |
| | | * | |
| | | * State of IBusProperty. The actual effect depends on #IBusPropType of the | |
| | | * IBusProperty. | |
| | | * | |
| | | * <variablelist> | |
| | | * <varlistentry> | |
| | | * <term>PROP_TYPE_TOGGLE</term> | |
| | | * <listitem><para>Emphasized if PROP_STATE_CHECKED, normal otherwi | |
| | | se.</para></listitem> | |
| | | * </varlistentry> | |
| | | * <varlistentry> | |
| | | * <term>PROP_TYPE_RADIO</term> | |
| | | * <listitem><para>Option checked if PROP_STATE_CHECKED, unchecked | |
| | | otherwise.</para></listitem> | |
| | | * </varlistentry> | |
| | | * </variablelist> | |
| | | * No effect on other types. | |
| | | */ | |
| typedef enum { | | typedef enum { | |
| PROP_STATE_UNCHECKED = 0, | | PROP_STATE_UNCHECKED = 0, | |
| PROP_STATE_CHECKED = 1, | | PROP_STATE_CHECKED = 1, | |
| PROP_STATE_INCONSISTENT = 2, | | PROP_STATE_INCONSISTENT = 2, | |
| } IBusPropState; | | } IBusPropState; | |
| | | | |
| typedef struct _IBusProperty IBusProperty; | | typedef struct _IBusProperty IBusProperty; | |
| typedef struct _IBusPropertyClass IBusPropertyClass; | | typedef struct _IBusPropertyClass IBusPropertyClass; | |
| typedef struct _IBusPropList IBusPropList; | | typedef struct _IBusPropList IBusPropList; | |
| typedef struct _IBusPropListClass IBusPropListClass; | | typedef struct _IBusPropListClass IBusPropListClass; | |
| | | | |
|
| | | /** | |
| | | * IBusProperty: | |
| | | * @key: Unique Identity for the IBusProperty. | |
| | | * @icon: Icon file for the IBusProperty. | |
| | | * @label: Text shown in UI. | |
| | | * @tooltip: Message shown if mouse hovered the IBusProperty. | |
| | | * @sensitive: Whether the IBusProperty is sensitive to keyboard and mouse | |
| | | event. | |
| | | * @visible: Whether the IBusProperty is visible. | |
| | | * @type: IBusPropType of IBusProperty. | |
| | | * @state: IBusPropState of IBusProperty. | |
| | | * @sub_props: IBusPropList that contains sub IBusProperties. These IBusPro | |
| | | perties are usually | |
| | | * shown as sub menu item. | |
| | | * | |
| | | * UI component for input method engine property. | |
| | | */ | |
| struct _IBusProperty { | | struct _IBusProperty { | |
| IBusSerializable parent; | | IBusSerializable parent; | |
| | | | |
|
| | | /*< public >*/ | |
| gchar *key; | | gchar *key; | |
| gchar *icon; | | gchar *icon; | |
| IBusText *label; | | IBusText *label; | |
| IBusText *tooltip; | | IBusText *tooltip; | |
| | | | |
| gboolean sensitive; | | gboolean sensitive; | |
| gboolean visible; | | gboolean visible; | |
| guint type; | | guint type; | |
| guint state; | | guint state; | |
| | | | |
| IBusPropList *sub_props; | | IBusPropList *sub_props; | |
| }; | | }; | |
| | | | |
| struct _IBusPropertyClass { | | struct _IBusPropertyClass { | |
| IBusSerializableClass parent; | | IBusSerializableClass parent; | |
| }; | | }; | |
| | | | |
|
| | | /** | |
| | | * IBusPropList: | |
| | | * @properties: GArray that holds IBusProperties. | |
| | | * | |
| | | * A GArray of IBusProperties. | |
| | | */ | |
| struct _IBusPropList { | | struct _IBusPropList { | |
| IBusSerializable parent; | | IBusSerializable parent; | |
| | | | |
|
| | | /*< public >*/ | |
| GArray *properties; | | GArray *properties; | |
| }; | | }; | |
| | | | |
| struct _IBusPropListClass { | | struct _IBusPropListClass { | |
| IBusSerializableClass parent; | | IBusSerializableClass parent; | |
| }; | | }; | |
| | | | |
| GType ibus_property_get_type (); | | GType ibus_property_get_type (); | |
|
| | | | |
| | | /** | |
| | | * ibus_property_new: | |
| | | * @key: Unique Identity for the IBusProperty. | |
| | | * @icon: Icon file for the IBusProperty. | |
| | | * @label: Text shown in UI. | |
| | | * @tooltip: Message shown if mouse hovered the IBusProperty. | |
| | | * @sensitive: Whether the IBusProperty is sensitive to keyboard and mouse | |
| | | event. | |
| | | * @visible: Whether the IBusProperty is visible. | |
| | | * @type: IBusPropType of IBusProperty. | |
| | | * @state: IBusPropState of IBusProperty. | |
| | | * @prop_list: IBusPropList that contains sub IBusProperties. | |
| | | * @returns: A newly allocated IBusProperty. | |
| | | * | |
| | | * New a IBusProperty. | |
| | | */ | |
| IBusProperty *ibus_property_new (const gchar *key, | | IBusProperty *ibus_property_new (const gchar *key, | |
| IBusPropType type, | | IBusPropType type, | |
| IBusText *label, | | IBusText *label, | |
| const gchar *icon, | | const gchar *icon, | |
| IBusText *tooltip, | | IBusText *tooltip, | |
| gboolean sensitive, | | gboolean sensitive, | |
| gboolean visible, | | gboolean visible, | |
| IBusPropState state, | | IBusPropState state, | |
| IBusPropList *prop_list); | | IBusPropList *prop_list); | |
|
| | | | |
| | | /** | |
| | | * ibus_property_set_label: | |
| | | * @prop: An IBusProperty. | |
| | | * @label: Text shown in UI. | |
| | | * | |
| | | * Set the label of IBusProperty. | |
| | | */ | |
| void ibus_property_set_label (IBusProperty *prop, | | void ibus_property_set_label (IBusProperty *prop, | |
| IBusText *label); | | IBusText *label); | |
|
| | | | |
| | | /** | |
| | | * ibus_property_set_visible: | |
| | | * @prop: An IBusProperty. | |
| | | * @visible: Whether the IBusProperty is visible. | |
| | | * | |
| | | * Set whether the IBusProperty is visible. | |
| | | */ | |
| void ibus_property_set_visible (IBusProperty *prop, | | void ibus_property_set_visible (IBusProperty *prop, | |
| gboolean visible); | | gboolean visible); | |
|
| | | | |
| | | /** | |
| | | * ibus_property_set_sub_props: | |
| | | * @prop: An IBusProperty. | |
| | | * @prop_list: IBusPropList that contains sub IBusProperties. | |
| | | * | |
| | | * Set the sub IBusProperties. | |
| | | */ | |
| void ibus_property_set_sub_props(IBusProperty *prop, | | void ibus_property_set_sub_props(IBusProperty *prop, | |
| IBusPropList *prop_list); | | IBusPropList *prop_list); | |
|
| | | | |
| | | /** | |
| | | * ibus_property_update: | |
| | | * @prop: An IBusProperty. | |
| | | * @prop_update: IBusPropList that contains sub IBusProperties. | |
| | | * @returns: TRUE for update suceeded; FALSE otherwise. | |
| | | * | |
| | | * Update the content of an IBusProperty. | |
| | | * IBusProperty @prop_update can either be sub-property of @prop, | |
| | | * or holds new values for @prop. | |
| | | */ | |
| | | | |
| gboolean ibus_property_update (IBusProperty *prop, | | gboolean ibus_property_update (IBusProperty *prop, | |
| IBusProperty *prop_update); | | IBusProperty *prop_update); | |
| | | | |
| GType ibus_prop_list_get_type (); | | GType ibus_prop_list_get_type (); | |
|
| | | | |
| | | /** | |
| | | * ibus_prop_list_new: | |
| | | * @returns: A newly allocated IBusPropList. | |
| | | * | |
| | | * New a IBusPropList. | |
| | | */ | |
| IBusPropList *ibus_prop_list_new (); | | IBusPropList *ibus_prop_list_new (); | |
|
| | | | |
| | | /** | |
| | | * ibus_prop_list_append: | |
| | | * @prop_list: An IBusPropList. | |
| | | * @prop: IBusProperty to be append to @prop_list. | |
| | | * | |
| | | * Append an IBusProperty to an IBusPropList. | |
| | | */ | |
| void ibus_prop_list_append (IBusPropList *prop_list, | | void ibus_prop_list_append (IBusPropList *prop_list, | |
| IBusProperty *prop); | | IBusProperty *prop); | |
|
| | | | |
| | | /** | |
| | | * ibus_prop_list_get: | |
| | | * @prop_list: An IBusPropList. | |
| | | * @index: Index of an IBusPropList. | |
| | | * @returns: IBusProperty at given index, NULL if no such IBusProperty. | |
| | | * | |
| | | * Returns IBusProperty at given index. | |
| | | */ | |
| IBusProperty *ibus_prop_list_get (IBusPropList *prop_list, | | IBusProperty *ibus_prop_list_get (IBusPropList *prop_list, | |
| guint index); | | guint index); | |
|
| | | | |
| | | /** | |
| | | * ibus_prop_list_update_property: | |
| | | * @prop_list: An IBusPropList. | |
| | | * @prop: IBusProperty to be update. | |
| | | * @returns: TRUE if succeeded, FALSE otherwise. | |
| | | * | |
| | | * Update an IBusProperty in IBusPropList. | |
| | | */ | |
| gboolean ibus_prop_list_update_property | | gboolean ibus_prop_list_update_property | |
| (IBusPropList *prop_list, | | (IBusPropList *prop_list, | |
| IBusProperty *prop); | | IBusProperty *prop); | |
| G_END_DECLS | | G_END_DECLS | |
| #endif | | #endif | |
| | | | |
End of changes. 16 change blocks. |
| 0 lines changed or deleted | | 162 lines changed or added | |
|
| ibustext.h | | ibustext.h | |
| | | | |
| skipping to change at line 20 | | skipping to change at line 20 | |
| * 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. | |
| */ | | */ | |
|
| | | /** | |
| | | * SECTION: ibustext | |
| | | * @short_description: Text with decorating information. | |
| | | * @see_also: #IBusAttribute | |
| | | * | |
| | | * An IBusText is the main text object in IBus. | |
| | | * The text is decorated according to associated IBusAttribute, | |
| | | * e.g. the foreground/background color, underline, and | |
| | | * applied scope. | |
| | | */ | |
| | | | |
| #ifndef __IBUS_TEXT_H_ | | #ifndef __IBUS_TEXT_H_ | |
| #define __IBUS_TEXT_H_ | | #define __IBUS_TEXT_H_ | |
| | | | |
| #include "ibusserializable.h" | | #include "ibusserializable.h" | |
| #include "ibusattribute.h" | | #include "ibusattribute.h" | |
| | | | |
| /* | | /* | |
| * Type macros. | | * Type macros. | |
| */ | | */ | |
| /* define IBusText macros */ | | /* define IBusText macros */ | |
| | | | |
| skipping to change at line 48 | | skipping to change at line 59 | |
| #define IBUS_IS_TEXT_CLASS(klass) \ | | #define IBUS_IS_TEXT_CLASS(klass) \ | |
| (G_TYPE_CHECK_CLASS_TYPE ((klass), IBUS_TYPE_TEXT)) | | (G_TYPE_CHECK_CLASS_TYPE ((klass), IBUS_TYPE_TEXT)) | |
| #define IBUS_TEXT_GET_CLASS(obj) \ | | #define IBUS_TEXT_GET_CLASS(obj) \ | |
| (G_TYPE_INSTANCE_GET_CLASS ((obj), IBUS_TYPE_TEXT, IBusTextClass)) | | (G_TYPE_INSTANCE_GET_CLASS ((obj), IBUS_TYPE_TEXT, IBusTextClass)) | |
| | | | |
| G_BEGIN_DECLS | | G_BEGIN_DECLS | |
| | | | |
| typedef struct _IBusText IBusText; | | typedef struct _IBusText IBusText; | |
| typedef struct _IBusTextClass IBusTextClass; | | typedef struct _IBusTextClass IBusTextClass; | |
| | | | |
|
| | | /** | |
| | | * IBusText: | |
| | | * @is_static: Whether @text is static, i.e., no need and will not be freed | |
| | | . Only TRUE if IBusText is newed from ibus_text_new_from_static_string(). | |
| | | * @text: The string content of IBusText in UTF-8. | |
| | | * @attrs: Associated IBusAttributes. | |
| | | * | |
| | | * A text object in IBus. | |
| | | */ | |
| struct _IBusText { | | struct _IBusText { | |
| IBusSerializable parent; | | IBusSerializable parent; | |
| | | | |
| /* members */ | | /* members */ | |
|
| | | /*< public >*/ | |
| gboolean is_static; | | gboolean is_static; | |
| gchar *text; | | gchar *text; | |
| IBusAttrList *attrs; | | IBusAttrList *attrs; | |
| }; | | }; | |
| | | | |
| struct _IBusTextClass { | | struct _IBusTextClass { | |
| IBusSerializableClass parent; | | IBusSerializableClass parent; | |
| }; | | }; | |
| | | | |
| GType ibus_text_get_type (void); | | GType ibus_text_get_type (void); | |
|
| | | | |
| | | /** | |
| | | * ibus_text_new_from_string: | |
| | | * @str: An text string to be set. | |
| | | * @returns: A newly allocated IBusText. | |
| | | * | |
| | | * New an IBusText whose content is copied from a text string. | |
| | | */ | |
| IBusText *ibus_text_new_from_string (const gchar *str); | | IBusText *ibus_text_new_from_string (const gchar *str); | |
|
| | | | |
| | | /** | |
| | | * ibus_text_new_from_ucs4: | |
| | | * @str: An text string to be set. | |
| | | * @returns: A newly allocated IBusText. | |
| | | * | |
| | | * New an IBusText whose content is copied from a UCS4 encoded text string. | |
| | | */ | |
| IBusText *ibus_text_new_from_ucs4 (const gunichar *str); | | IBusText *ibus_text_new_from_ucs4 (const gunichar *str); | |
|
| | | | |
| | | /** | |
| | | * ibus_text_new_from_static_string: | |
| | | * @str: An text string to be set. | |
| | | * @returns: A newly allocated IBusText. | |
| | | * | |
| | | * New an IBusText whose content is from a static string. | |
| | | * Note that it is the developer's duty to ensure @str is static. | |
| | | */ | |
| IBusText *ibus_text_new_from_static_string (const gchar *str); | | IBusText *ibus_text_new_from_static_string (const gchar *str); | |
|
| | | | |
| | | /** | |
| | | * ibus_text_new_from_printf: | |
| | | * @fmt: printf format string. | |
| | | * @...: arguments for @fmt. | |
| | | * @returns: A newly allocated IBusText. | |
| | | * | |
| | | * New an IBusText from a printf expression. | |
| | | */ | |
| IBusText *ibus_text_new_from_printf (const gchar *fmt, | | IBusText *ibus_text_new_from_printf (const gchar *fmt, | |
| ...); | | ...); | |
|
| | | | |
| | | /** | |
| | | * ibus_text_new_from_unichar: | |
| | | * @c: A single UCS4-encoded character. | |
| | | * @returns: A newly allocated IBusText. | |
| | | * | |
| | | * New an IBusText from a single UCS4-encoded character. | |
| | | */ | |
| IBusText *ibus_text_new_from_unichar (gunichar c); | | IBusText *ibus_text_new_from_unichar (gunichar c); | |
|
| | | | |
| | | /** | |
| | | * ibus_text_append_attribute: | |
| | | * @text: an IBusText | |
| | | * @type: IBusAttributeType for @text. | |
| | | * @value: Value for the type. | |
| | | * @start_index: The starting index, inclusive. | |
| | | * @end_index: The ending index, exclusive. | |
| | | * | |
| | | * Append an IBusAttribute for IBusText. | |
| | | */ | |
| void ibus_text_append_attribute (IBusText *text, | | void ibus_text_append_attribute (IBusText *text, | |
| guint type, | | guint type, | |
| guint value, | | guint value, | |
| guint start_
index, | | guint start_
index, | |
| gint end_in
dex); | | gint end_in
dex); | |
|
| | | /** | |
| | | * ibus_text_get_length: | |
| | | * @text: An IBusText. | |
| | | * @returns: Number of character in @text, not counted by bytes. | |
| | | * | |
| | | * Return number of characters in an IBusText. | |
| | | * This function is based on g_utf8_strlen(), so unlike strlen(), | |
| | | * it does not count by bytes but characters instead. | |
| | | */ | |
| guint ibus_text_get_length (IBusText *text); | | guint ibus_text_get_length (IBusText *text); | |
| | | | |
| G_END_DECLS | | G_END_DECLS | |
| #endif | | #endif | |
| | | | |
End of changes. 10 change blocks. |
| 0 lines changed or deleted | | 83 lines changed or added | |
|
| ibustypes.h | | ibustypes.h | |
| | | | |
| skipping to change at line 20 | | skipping to change at line 20 | |
| * 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. | |
| */ | | */ | |
|
| | | /** | |
| | | * SECTION: ibustypes | |
| | | * @short_description: Generic types for iBus. | |
| | | * @stability: Stable | |
| | | * | |
| | | * This session consists generic types for iBus, including shift/control ke | |
| | | y modifiers, | |
| | | * and a rectangle structure. | |
| | | */ | |
| #ifndef __IBUS_TYPES_H_ | | #ifndef __IBUS_TYPES_H_ | |
| #define __IBUS_TYPES_H_ | | #define __IBUS_TYPES_H_ | |
| | | | |
|
| | | /** | |
| | | * IBusModifierType: | |
| | | * @IBUS_SHIFT_MASK: Shift is activated. | |
| | | * @IBUS_LOCK_MASK: Cap Lock is locked. | |
| | | * @IBUS_CONTROL_MASK: Control key is activated. | |
| | | * @IBUS_MOD1_MASK: Modifier 1 (Usually Alt_L (0x40), Alt_R (0x6c), Meta_ | |
| | | L (0xcd)) activated. | |
| | | * @IBUS_MOD2_MASK: Modifier 2 (Usually Num_Lock (0x4d)) activated. | |
| | | * @IBUS_MOD3_MASK: Modifier 3 activated. | |
| | | * @IBUS_MOD4_MASK: Modifier 4 (Usually Super_L (0xce), Hyper_L (0xcf)) ac | |
| | | tivated. | |
| | | * @IBUS_MOD5_MASK: Modifier 5 (ISO_Level3_Shift (0x5c), Mode_switch (0xcb | |
| | | )) activated. | |
| | | * @IBUS_BUTTON1_MASK: Mouse button 1 (left) is activated. | |
| | | * @IBUS_BUTTON2_MASK: Mouse button 2 (middle) is activated. | |
| | | * @IBUS_BUTTON3_MASK: Mouse button 3 (right) is activated. | |
| | | * @IBUS_BUTTON4_MASK: Mouse button 4 (scroll up) is activated. | |
| | | * @IBUS_BUTTON5_MASK: Mouse button 5 (scroll down) is activated. | |
| | | * @IBUS_FORWARD_MASK: Forward mask. | |
| | | * @IBUS_SUPER_MASK: Super (Usually Win) key is activated. | |
| | | * @IBUS_HYPER_MASK: Hyper key is activated. | |
| | | * @IBUS_RELEASE_MASK: Key is released. | |
| | | * @IBUS_MODIFIER_MASK: Modifier mask for the all the masks above. | |
| | | * | |
| | | * Handles key modifier such as control, shift and alt and release event. | |
| | | * Note that nits 15 - 25 are currently unused, while bit 29 is used intern | |
| | | ally. | |
| | | */ | |
| typedef enum | | typedef enum | |
| { | | { | |
| IBUS_SHIFT_MASK = 1 << 0, | | IBUS_SHIFT_MASK = 1 << 0, | |
| IBUS_LOCK_MASK = 1 << 1, | | IBUS_LOCK_MASK = 1 << 1, | |
| IBUS_CONTROL_MASK = 1 << 2, | | IBUS_CONTROL_MASK = 1 << 2, | |
| IBUS_MOD1_MASK = 1 << 3, | | IBUS_MOD1_MASK = 1 << 3, | |
| IBUS_MOD2_MASK = 1 << 4, | | IBUS_MOD2_MASK = 1 << 4, | |
| IBUS_MOD3_MASK = 1 << 5, | | IBUS_MOD3_MASK = 1 << 5, | |
| IBUS_MOD4_MASK = 1 << 6, | | IBUS_MOD4_MASK = 1 << 6, | |
| IBUS_MOD5_MASK = 1 << 7, | | IBUS_MOD5_MASK = 1 << 7, | |
| IBUS_BUTTON1_MASK = 1 << 8, | | IBUS_BUTTON1_MASK = 1 << 8, | |
| IBUS_BUTTON2_MASK = 1 << 9, | | IBUS_BUTTON2_MASK = 1 << 9, | |
| IBUS_BUTTON3_MASK = 1 << 10, | | IBUS_BUTTON3_MASK = 1 << 10, | |
| IBUS_BUTTON4_MASK = 1 << 11, | | IBUS_BUTTON4_MASK = 1 << 11, | |
| IBUS_BUTTON5_MASK = 1 << 12, | | IBUS_BUTTON5_MASK = 1 << 12, | |
| | | | |
| /* The next few modifiers are used by XKB, so we skip to the end. | | /* The next few modifiers are used by XKB, so we skip to the end. | |
| * Bits 15 - 25 are currently unused. Bit 29 is used internally. | | * Bits 15 - 25 are currently unused. Bit 29 is used internally. | |
| */ | | */ | |
| | | | |
|
| /* forard mask */ | | /* forward mask */ | |
| IBUS_FORWARD_MASK = 1 << 25, | | IBUS_FORWARD_MASK = 1 << 25, | |
| | | | |
| IBUS_SUPER_MASK = 1 << 26, | | IBUS_SUPER_MASK = 1 << 26, | |
| IBUS_HYPER_MASK = 1 << 27, | | IBUS_HYPER_MASK = 1 << 27, | |
| IBUS_META_MASK = 1 << 28, | | IBUS_META_MASK = 1 << 28, | |
| | | | |
| IBUS_RELEASE_MASK = 1 << 30, | | IBUS_RELEASE_MASK = 1 << 30, | |
| | | | |
| IBUS_MODIFIER_MASK = 0x5c001fff | | IBUS_MODIFIER_MASK = 0x5c001fff | |
| } IBusModifierType; | | } IBusModifierType; | |
| | | | |
|
| | | /** | |
| | | * IBusCapabilite: | |
| | | * @IBUS_CAP_PREEDIT_TEXT: UI is capable to show pre-edit text. | |
| | | * @IBUS_CAP_AUXILIARY_TEXT: UI is capable to show auxiliary text. | |
| | | * @IBUS_CAP_LOOKUP_TABLE: UI is capable to show the lookup table. | |
| | | * @IBUS_CAP_FOCUS: UI is capable to get focus. | |
| | | * @IBUS_CAP_PROPERTY: UI is capable to have property. | |
| | | * | |
| | | * Capability flags of UI. | |
| | | */ | |
| typedef enum { | | typedef enum { | |
| IBUS_CAP_PREEDIT_TEXT = 1 << 0, | | IBUS_CAP_PREEDIT_TEXT = 1 << 0, | |
| IBUS_CAP_AUXILIARY_TEXT = 1 << 1, | | IBUS_CAP_AUXILIARY_TEXT = 1 << 1, | |
| IBUS_CAP_LOOKUP_TABLE = 1 << 2, | | IBUS_CAP_LOOKUP_TABLE = 1 << 2, | |
| IBUS_CAP_FOCUS = 1 << 3, | | IBUS_CAP_FOCUS = 1 << 3, | |
| IBUS_CAP_PROPERTY = 1 << 4, | | IBUS_CAP_PROPERTY = 1 << 4, | |
| } IBusCapabilite; | | } IBusCapabilite; | |
| | | | |
|
| | | /** | |
| | | * IBusRectangle: | |
| | | * @x: x coordinate. | |
| | | * @y: y coordinate. | |
| | | * @width: width of the rectangle. | |
| | | * @height: height of the renctangl. | |
| | | * | |
| | | * Rectangle definition. | |
| | | */ | |
| typedef struct _IBusRectangle IBusRectangle; | | typedef struct _IBusRectangle IBusRectangle; | |
| struct _IBusRectangle { | | struct _IBusRectangle { | |
| gint x; | | gint x; | |
| gint y; | | gint y; | |
| gint width; | | gint width; | |
| gint height; | | gint height; | |
| }; | | }; | |
| | | | |
|
| typedef void (* IBusFreeFunc) (gpointer ); | | /** | |
| | | * IBusFreeFunc: | |
| | | * @object: object to be freed. | |
| | | * | |
| | | * Free function prototype. | |
| | | */ | |
| | | typedef void (* IBusFreeFunc) (gpointer object); | |
| | | | |
| #endif | | #endif | |
| | | | |
End of changes. 6 change blocks. |
| 2 lines changed or deleted | | 64 lines changed or added | |
|