IBus Reference Manual | ||||
---|---|---|---|---|
Top | Description | Object Hierarchy | Properties |
enum IBusPropType; enum IBusPropState; struct IBusProperty; struct IBusPropertyClass; 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
); IBusProperty * ibus_property_new_varargs (const gchar *first_property_name
,...
); const gchar * ibus_property_get_key (IBusProperty *prop
); IBusText * ibus_property_get_label (IBusProperty *prop
); void ibus_property_set_label (IBusProperty *prop
,IBusText *label
); IBusText * ibus_property_get_symbol (IBusProperty *prop
); void ibus_property_set_symbol (IBusProperty *prop
,IBusText *symbol
); const gchar * ibus_property_get_icon (IBusProperty *prop
); void ibus_property_set_icon (IBusProperty *prop
,const gchar *icon
); IBusText * ibus_property_get_tooltip (IBusProperty *prop
); void ibus_property_set_tooltip (IBusProperty *prop
,IBusText *tooltip
); gboolean ibus_property_get_sensitive (IBusProperty *prop
); void ibus_property_set_sensitive (IBusProperty *prop
,gboolean sensitive
); gboolean ibus_property_get_visible (IBusProperty *prop
); void ibus_property_set_visible (IBusProperty *prop
,gboolean visible
); IBusPropType ibus_property_get_prop_type (IBusProperty *prop
); IBusPropState ibus_property_get_state (IBusProperty *prop
); void ibus_property_set_state (IBusProperty *prop
,IBusPropState state
); IBusPropList * ibus_property_get_sub_props (IBusProperty *prop
); void ibus_property_set_sub_props (IBusProperty *prop
,IBusPropList *prop_list
); gboolean ibus_property_update (IBusProperty *prop
,IBusProperty *prop_update
); IBusPropListClass; IBusPropList;
GEnum +----IBusPropType
GEnum +----IBusPropState
GObject +----GInitiallyUnowned +----IBusObject +----IBusSerializable +----IBusProperty
GObject +----GInitiallyUnowned +----IBusObject +----IBusSerializable +----IBusPropList
"icon" gchar* : Read / Write "key" gchar* : Read / Write / Construct Only "label" IBusText* : Read / Write / Construct "prop-type" IBusPropType : Read / Write / Construct Only "sensitive" gboolean : Read / Write "state" IBusPropState : Read / Write "sub-props" IBusPropList* : Read / Write "symbol" IBusText* : Read / Write / Construct "tooltip" IBusText* : Read / Write "visible" gboolean : Read / Write
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.
see_also: IBusPropList, IBusEngine
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.
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. [allow-none] |
|
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. [allow-none] |
Returns : |
A newly allocated IBusProperty. |
IBusProperty * ibus_property_new_varargs (const gchar *first_property_name
,...
);
New a IBusProperty.
ibus_property_new_varargs()
supports the va_list format.
name property is required. e.g.
ibus_property_new_varargs("key", "TypingMode", "type", PROP_TYPE_MENU, NULL)
|
Name of the first property. |
const gchar * ibus_property_get_key (IBusProperty *prop
);
Get the key of IBusProperty.
|
An IBusProperty. |
Returns : |
the key of IBusProperty. Should not be freed. |
IBusText * ibus_property_get_label (IBusProperty *prop
);
Get the label of IBusProperty.
|
An IBusProperty. |
Returns : |
the label of IBusProperty. Should not be freed. [transfer none] |
void ibus_property_set_label (IBusProperty *prop
,IBusText *label
);
Set the label of IBusProperty.
|
An IBusProperty. |
|
Text shown in UI. |
IBusText * ibus_property_get_symbol (IBusProperty *prop
);
Get the symbol of IBusProperty.
|
An IBusProperty. |
Returns : |
the symbol of IBusProperty. Should not be freed. [transfer none] |
void ibus_property_set_symbol (IBusProperty *prop
,IBusText *symbol
);
Set the symbol of IBusProperty.
|
An IBusProperty. |
|
Text shown in UI. |
const gchar * ibus_property_get_icon (IBusProperty *prop
);
Get the icon of IBusProperty.
|
An IBusProperty. |
Returns : |
the icon of IBusProperty. Should not be freed. |
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. |
IBusText * ibus_property_get_tooltip (IBusProperty *prop
);
Get the tooltip of IBusProperty.
|
An IBusProperty. |
Returns : |
the tooltip of IBusProperty. Should not be freed. [transfer none] |
void ibus_property_set_tooltip (IBusProperty *prop
,IBusText *tooltip
);
Set the tooltip of IBusProperty.
|
An IBusProperty. |
|
Text of the tooltip. |
gboolean ibus_property_get_sensitive (IBusProperty *prop
);
Get the sensitive of IBusProperty.
|
An IBusProperty. |
Returns : |
the sensitive of IBusProperty. |
void ibus_property_set_sensitive (IBusProperty *prop
,gboolean sensitive
);
Set whether the IBusProperty is sensitive.
|
An IBusProperty. |
|
Whether the IBusProperty is sensitive. |
gboolean ibus_property_get_visible (IBusProperty *prop
);
Get the visible of IBusProperty.
|
An IBusProperty. |
Returns : |
the visible of IBusProperty. |
void ibus_property_set_visible (IBusProperty *prop
,gboolean visible
);
Set whether the IBusProperty is visible.
|
An IBusProperty. |
|
Whether the IBusProperty is visible. |
IBusPropState ibus_property_get_state (IBusProperty *prop
);
Get the state of IBusProperty.
|
An IBusProperty. |
Returns : |
the state of IBusProperty. |
void ibus_property_set_state (IBusProperty *prop
,IBusPropState state
);
Set the state of the IBusProperty.
|
An IBusProperty. |
|
The state of the IBusProperty. |
IBusPropList * ibus_property_get_sub_props (IBusProperty *prop
);
Get the IBusPropList of IBusProperty.
|
An IBusProperty. |
Returns : |
the IBusPropList of IBusProperty. Should not be freed. [transfer none] |
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. |
"key"
property "key" gchar* : Read / Write / Construct Only
The key of property.
Default value: ""
"prop-type"
property"prop-type" IBusPropType : Read / Write / Construct Only
The type of property.
Default value: PROP_TYPE_NORMAL
"sensitive"
property "sensitive" gboolean : Read / Write
The sensitive of property.
Default value: TRUE
"state"
property"state" IBusPropState : Read / Write
The state of property.
Default value: PROP_STATE_UNCHECKED