![]() |
![]() |
![]() |
IBus Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy |
#define IBUS_TYPE_PROP_LIST #define IBUS_PROP_LIST (obj) #define IBUS_PROP_LIST_CLASS (klass) #define IBUS_IS_PROP_LIST (obj) #define IBUS_IS_PROP_LIST_CLASS (klass) #define IBUS_PROP_LIST_GET_CLASS (obj) enum IBusPropType; enum IBusPropState; IBusProperty; IBusPropertyClass; IBusPropList; IBusPropListClass; IBusProperty * ibus_property_new (const gchar *key
,IBusPropType type
,IBusText *label
,const gchar *icon
,IBusText *tooltip
,gboolean sensitive
,gboolean visible
,IBusPropState state
,IBusPropList *prop_list
); void ibus_property_set_label (IBusProperty *prop
,IBusText *label
); void ibus_property_set_icon (IBusProperty *prop
,const gchar *icon
); void ibus_property_set_tooltip (IBusProperty *prop
,IBusText *tooltip
); void ibus_property_set_sensitive (IBusProperty *prop
,gboolean sensitive
); void ibus_property_set_visible (IBusProperty *prop
,gboolean visible
); void ibus_property_set_state (IBusProperty *prop
,IBusPropState state
); void ibus_property_set_sub_props (IBusProperty *prop
,IBusPropList *prop_list
); gboolean ibus_property_update (IBusProperty *prop
,IBusProperty *prop_update
); GType ibus_prop_list_get_type (); IBusPropList * ibus_prop_list_new (); void ibus_prop_list_append (IBusPropList *prop_list
,IBusProperty *prop
); IBusProperty * ibus_prop_list_get (IBusPropList *prop_list
,guint index
); gboolean ibus_prop_list_update_property (IBusPropList *prop_list
,IBusProperty *prop
);
GObject +----GInitiallyUnowned +----IBusObject +----IBusSerializable +----IBusProperty
GObject +----GInitiallyUnowned +----IBusObject +----IBusSerializable +----IBusPropList
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 components. 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.
#define IBUS_TYPE_PROP_LIST
Returns GType of IBus property list.
|
IBusPropList GType. |
#define IBUS_PROP_LIST(obj)
Casts an IBUS_PROP_LIST or derived pointer into a (IBusPropList*) pointer. Depending on the current debugging level, this function may invoke certain runtime checks to identify invalid casts.
|
An object which is subject to casting. |
#define IBUS_PROP_LIST_CLASS(klass)
Casts a derived IBusPropListClass structure into a IBusPropListClass structure.
|
A class to be casted. |
#define IBUS_IS_PROP_LIST(obj)
Checks whether a valid GTypeInstance pointer is of type IBUS_PROP_LIST.
|
Instance to check for being a IBUS_PROP_LIST. |
#define IBUS_IS_PROP_LIST_CLASS(klass)
Checks whether class "is a" valid IBusPropListClass structure of type IBUS_PROP_LIST or derived.
|
A class to be checked. |
#define IBUS_PROP_LIST_GET_CLASS(obj)
Get the class of a given object and cast the class to IBusPropListClass.
|
An object. |
typedef enum { PROP_TYPE_NORMAL = 0, PROP_TYPE_TOGGLE = 1, PROP_TYPE_RADIO = 2, PROP_TYPE_MENU = 3, PROP_TYPE_SEPARATOR = 4, } IBusPropType;
Type enumeration of IBusProperty.
typedef enum { PROP_STATE_UNCHECKED = 0, PROP_STATE_CHECKED = 1, PROP_STATE_INCONSISTENT = 2, } IBusPropState;
State of IBusProperty. The actual effect depends on IBusPropType of the IBusProperty.
PROP_TYPE_TOGGLE |
Emphasized if PROP_STATE_CHECKED, normal otherwise. |
PROP_TYPE_RADIO |
Option checked if PROP_STATE_CHECKED, unchecked otherwise. |
No effect on other types.
typedef struct { gchar *key; gchar *icon; IBusText *label; IBusText *tooltip; gboolean sensitive; gboolean visible; guint type; guint state; IBusPropList *sub_props; } IBusProperty;
UI component for input method engine property.
gchar * |
Unique Identity for the IBusProperty. |
gchar * |
Icon file for the IBusProperty. |
IBusText * |
Text shown in UI. |
IBusText * |
Message shown if mouse hovered the IBusProperty. |
gboolean |
Whether the IBusProperty is sensitive to keyboard and mouse event. |
gboolean |
Whether the IBusProperty is visible. |
guint |
IBusPropType of IBusProperty. |
guint |
IBusPropState of IBusProperty. |
IBusPropList * |
IBusPropList that contains sub IBusProperties. These IBusProperties are usually shown as sub menu item. |
typedef struct { GArray *properties; } IBusPropList;
An array of IBusProperties.
GArray * |
GArray that holds IBusProperties. |
IBusProperty * ibus_property_new (const gchar *key
,IBusPropType type
,IBusText *label
,const gchar *icon
,IBusText *tooltip
,gboolean sensitive
,gboolean visible
,IBusPropState state
,IBusPropList *prop_list
);
New a IBusProperty.
|
Unique Identity for the IBusProperty. |
|
IBusPropType of IBusProperty. |
|
Text shown in UI. |
|
Icon file for the IBusProperty. |
|
Message shown if mouse hovered the IBusProperty. |
|
Whether the IBusProperty is sensitive to keyboard and mouse event. |
|
Whether the IBusProperty is visible. |
|
IBusPropState of IBusProperty. |
|
IBusPropList that contains sub IBusProperties. |
Returns : |
A newly allocated IBusProperty. |
void ibus_property_set_label (IBusProperty *prop
,IBusText *label
);
Set the label of IBusProperty.
|
An IBusProperty. |
|
Text shown in UI. |
void ibus_property_set_icon (IBusProperty *prop
,const gchar *icon
);
Set the icon of IBusProperty.
|
An IBusProperty. |
|
Icon shown in UI. It could be a full path of an icon file or an icon name. |
void ibus_property_set_tooltip (IBusProperty *prop
,IBusText *tooltip
);
Set the tooltip of IBusProperty.
|
An IBusProperty. |
|
Text of the tooltip. |
void ibus_property_set_sensitive (IBusProperty *prop
,gboolean sensitive
);
Set whether the IBusProperty is sensitive.
|
An IBusProperty. |
|
Whether the IBusProperty is sensitive. |
void ibus_property_set_visible (IBusProperty *prop
,gboolean visible
);
Set whether the IBusProperty is visible.
|
An IBusProperty. |
|
Whether the IBusProperty is visible. |
void ibus_property_set_state (IBusProperty *prop
,IBusPropState state
);
Set the state of the IBusProperty.
|
An IBusProperty. |
|
The state of the IBusProperty. |
void ibus_property_set_sub_props (IBusProperty *prop
,IBusPropList *prop_list
);
Set the sub IBusProperties.
|
An IBusProperty. |
|
IBusPropList that contains sub IBusProperties. |
gboolean ibus_property_update (IBusProperty *prop
,IBusProperty *prop_update
);
Update the content of an IBusProperty.
IBusProperty prop_update
can either be sub-property of prop
,
or holds new values for prop
.
|
An IBusProperty. |
|
IBusPropList that contains sub IBusProperties. |
Returns : |
TRUE for update suceeded; FALSE otherwise. |
IBusPropList * ibus_prop_list_new ();
New a IBusPropList.
Returns : |
A newly allocated IBusPropList. |
void ibus_prop_list_append (IBusPropList *prop_list
,IBusProperty *prop
);
Append an IBusProperty to an IBusPropList, and increase reference.
|
An IBusPropList. |
|
IBusProperty to be append to prop_list .
|
IBusProperty * ibus_prop_list_get (IBusPropList *prop_list
,guint index
);
Returns IBusProperty at given index. Borrowed reference.
|
An IBusPropList. |
|
Index of an IBusPropList. |
Returns : |
IBusProperty at given index, NULL if no such IBusProperty. |
gboolean ibus_prop_list_update_property (IBusPropList *prop_list
,IBusProperty *prop
);
Update an IBusProperty in IBusPropList.
|
An IBusPropList. |
|
IBusProperty to be update. |
Returns : |
TRUE if succeeded, FALSE otherwise. |