~joel-auterson/ubuntu/maverick/ibus/newmenuname

« back to all changes in this revision

Viewing changes to src/ibusproperty.h

  • Committer: Bazaar Package Importer
  • Author(s): LI Daobing
  • Date: 2009-10-05 20:45:18 UTC
  • mfrom: (1.1.5 upstream) (6.1.15 sid)
  • Revision ID: james.westby@ubuntu.com-20091005204518-069vlwrl3r8v7bbr
Tags: 1.2.0.20090927-2
* create po template when build (LP: #188690)
  - debian/rules: updated.
  - debian/clean: remove pot file when clean.
* debian/control: build depends on python-rsvg (LP: #432375)

Show diffs side-by-side

added added

removed removed

Lines of Context:
41
41
/*
42
42
 * Type macros.
43
43
 */
44
 
#define IBUS_TYPE_PROPERTY          (ibus_property_get_type ())
45
 
#define IBUS_TYPE_PROP_LIST         (ibus_prop_list_get_type ())
46
 
 
47
44
/* define IBusProperty macros */
48
45
#define IBUS_TYPE_PROPERTY             \
49
46
    (ibus_property_get_type ())
59
56
    (G_TYPE_INSTANCE_GET_CLASS ((obj), IBUS_TYPE_PROPERTY, IBusPropertyClass))
60
57
 
61
58
/* define IBusPropList macros */
 
59
/**
 
60
 * IBUS_TYPE_PROP_LIST:
 
61
 * @returns: IBusPropList GType.
 
62
 *
 
63
 * Returns GType of IBus property list.
 
64
 */
62
65
#define IBUS_TYPE_PROP_LIST             \
63
66
    (ibus_prop_list_get_type ())
 
67
 
 
68
/**
 
69
 * IBUS_PROP_LIST:
 
70
 * @obj: An object which is subject to casting.
 
71
 *
 
72
 * Casts an IBUS_PROP_LIST or derived pointer into a (IBusPropList*) pointer.
 
73
 * Depending on the current debugging level, this function may invoke
 
74
 * certain runtime checks to identify invalid casts.
 
75
 */
64
76
#define IBUS_PROP_LIST(obj)             \
65
77
    (G_TYPE_CHECK_INSTANCE_CAST ((obj), IBUS_TYPE_PROP_LIST, IBusPropList))
 
78
 
 
79
/**
 
80
 * IBUS_PROP_LIST_CLASS:
 
81
 * @klass: A class to be casted.
 
82
 *
 
83
 * Casts a derived IBusPropListClass structure into a IBusPropListClass structure.
 
84
 */
66
85
#define IBUS_PROP_LIST_CLASS(klass)     \
67
86
    (G_TYPE_CHECK_CLASS_CAST ((klass), IBUS_TYPE_PROP_LIST, IBusPropListClass))
 
87
 
 
88
/**
 
89
 * IBUS_IS_PROP_LIST:
 
90
 * @obj: Instance to check for being a IBUS_PROP_LIST.
 
91
 *
 
92
 * Checks whether a valid GTypeInstance pointer is of type IBUS_PROP_LIST.
 
93
 */
68
94
#define IBUS_IS_PROP_LIST(obj)          \
69
95
    (G_TYPE_CHECK_INSTANCE_TYPE ((obj), IBUS_TYPE_PROP_LIST))
 
96
 
 
97
/**
 
98
 * IBUS_IS_PROP_LIST_CLASS:
 
99
 * @klass: A class to be checked.
 
100
 *
 
101
 * Checks whether class "is a" valid IBusPropListClass structure of type IBUS_PROP_LIST or derived.
 
102
 */
70
103
#define IBUS_IS_PROP_LIST_CLASS(klass)  \
71
104
    (G_TYPE_CHECK_CLASS_TYPE ((klass), IBUS_TYPE_PROP_LIST))
 
105
 
 
106
/**
 
107
 * IBUS_PROP_LIST_GET_CLASS:
 
108
 * @obj: An object.
 
109
 *
 
110
 * Get the class of a given object and cast the class to IBusPropListClass.
 
111
 */
72
112
#define IBUS_PROP_LIST_GET_CLASS(obj)   \
73
113
    (G_TYPE_INSTANCE_GET_CLASS ((obj), IBUS_TYPE_PROP_LIST, IBusPropListClass))
74
114
 
81
121
 * items.
82
122
 * @PROP_TYPE_SEPARATOR: A separator for menu.
83
123
 *
84
 
 * Type of IBusProperty.
 
124
 * Type enumeration of IBusProperty.
85
125
 */
86
126
typedef enum {
87
127
    PROP_TYPE_NORMAL = 0,
165
205
 * IBusPropList:
166
206
 * @properties: GArray that holds IBusProperties.
167
207
 *
168
 
 * A GArray of IBusProperties.
 
208
 * An array of IBusProperties.
169
209
 */
170
210
struct _IBusPropList {
171
211
    IBusSerializable parent;
183
223
/**
184
224
 * ibus_property_new:
185
225
 * @key: Unique Identity for the IBusProperty.
 
226
 * @type: IBusPropType of IBusProperty.
 
227
 * @label: Text shown in UI.
186
228
 * @icon: Icon file for the IBusProperty.
187
 
 * @label: Text shown in UI.
188
229
 * @tooltip: Message shown if mouse hovered the  IBusProperty.
189
230
 * @sensitive: Whether the IBusProperty is sensitive to keyboard and mouse event.
190
231
 * @visible: Whether the IBusProperty is visible.
191
 
 * @type: IBusPropType of IBusProperty.
192
232
 * @state: IBusPropState of IBusProperty.
193
233
 * @prop_list: IBusPropList that contains sub IBusProperties.
194
234
 * @returns: A newly allocated IBusProperty.
216
256
                                             IBusText       *label);
217
257
 
218
258
/**
 
259
 * ibus_property_set_icon:
 
260
 * @prop: An IBusProperty.
 
261
 * @icon: Icon shown in UI. It could be a full path of an icon file or an icon name.
 
262
 *
 
263
 * Set the icon of IBusProperty.
 
264
 */
 
265
void             ibus_property_set_icon     (IBusProperty   *prop,
 
266
                                             const gchar    *icon);
 
267
 
 
268
/**
 
269
 * ibus_property_set_tooltip:
 
270
 * @prop: An IBusProperty.
 
271
 * @tooltip: Text of the tooltip.
 
272
 *
 
273
 * Set the tooltip of IBusProperty.
 
274
 */
 
275
void             ibus_property_set_tooltip  (IBusProperty   *prop,
 
276
                                             IBusText       *tooltip);
 
277
 
 
278
/**
 
279
 * ibus_property_set_sensitive:
 
280
 * @prop: An IBusProperty.
 
281
 * @sensitive: Whether the IBusProperty is sensitive.
 
282
 *
 
283
 * Set whether the IBusProperty is sensitive.
 
284
 */
 
285
void             ibus_property_set_sensitive(IBusProperty   *prop,
 
286
                                             gboolean        sensitive);
 
287
 
 
288
/**
219
289
 * ibus_property_set_visible:
220
290
 * @prop: An IBusProperty.
221
291
 * @visible: Whether the IBusProperty is visible.
226
296
                                             gboolean        visible);
227
297
 
228
298
/**
 
299
 * ibus_property_set_state:
 
300
 * @prop: An IBusProperty.
 
301
 * @state: The state of the IBusProperty.
 
302
 *
 
303
 * Set the state of the IBusProperty.
 
304
 */
 
305
void             ibus_property_set_state    (IBusProperty   *prop,
 
306
                                             IBusPropState   state);
 
307
 
 
308
 
 
309
/**
229
310
 * ibus_property_set_sub_props:
230
311
 * @prop: An IBusProperty.
231
312
 * @prop_list: IBusPropList that contains sub IBusProperties.
264
345
 * @prop_list: An IBusPropList.
265
346
 * @prop: IBusProperty to be append to @prop_list.
266
347
 *
267
 
 * Append an IBusProperty to an IBusPropList.
 
348
 * Append an IBusProperty to an IBusPropList, and increase reference.
268
349
 */
269
350
void             ibus_prop_list_append      (IBusPropList   *prop_list,
270
351
                                             IBusProperty   *prop);
275
356
 * @index: Index of an IBusPropList.
276
357
 * @returns: IBusProperty at given index, NULL if no such IBusProperty.
277
358
 *
278
 
 * Returns IBusProperty at given index.
 
359
 * Returns IBusProperty at given index. Borrowed reference.
279
360
 */
280
361
IBusProperty    *ibus_prop_list_get         (IBusPropList   *prop_list,
281
362
                                             guint           index);