OLD | NEW |
1 /* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ | 1 /* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */ |
2 /* vim:set et sts=4: */ | 2 /* vim:set et sts=4: */ |
3 /* ibus - The Input Bus | 3 /* ibus - The Input Bus |
4 * Copyright (C) 2008-2010 Peng Huang <shawn.p.huang@gmail.com> | 4 * Copyright (C) 2008-2010 Peng Huang <shawn.p.huang@gmail.com> |
5 * Copyright (C) 2008-2010 Red Hat, Inc. | 5 * Copyright (C) 2008-2010 Red Hat, Inc. |
6 * | 6 * |
7 * This library is free software; you can redistribute it and/or | 7 * This library is free software; you can redistribute it and/or |
8 * modify it under the terms of the GNU Lesser General Public | 8 * modify it under the terms of the GNU Lesser General Public |
9 * License as published by the Free Software Foundation; either | 9 * License as published by the Free Software Foundation; either |
10 * version 2 of the License, or (at your option) any later version. | 10 * version 2 of the License, or (at your option) any later version. |
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
178 | 178 |
179 /** | 179 /** |
180 * ibus_input_context_process_key_event: | 180 * ibus_input_context_process_key_event: |
181 * @context: An IBusInputContext. | 181 * @context: An IBusInputContext. |
182 * @keyval: Key symbol of a key event. | 182 * @keyval: Key symbol of a key event. |
183 * @keycode: Keycode of a key event. | 183 * @keycode: Keycode of a key event. |
184 * @state: Key modifier flags. | 184 * @state: Key modifier flags. |
185 * @returns: TRUE for successfully process the key; FALSE otherwise. | 185 * @returns: TRUE for successfully process the key; FALSE otherwise. |
186 * | 186 * |
187 * Pass the key event to input method engine and wait for the reply from ibus. | 187 * Pass the key event to input method engine and wait for the reply from ibus. |
| 188 * (synchronous IPC - may block the thread for a few seconds.) |
188 * | 189 * |
189 * @see_also: ibus_input_context_process_key_event_async() | 190 * @see_also: ibus_input_context_process_key_event_async() |
190 */ | 191 */ |
191 gboolean ibus_input_context_process_key_event | 192 gboolean ibus_input_context_process_key_event |
192 (IBusInputContext *context, | 193 (IBusInputContext *context, |
193 guint32 keyval, | 194 guint32 keyval, |
194 guint32 keycode, | 195 guint32 keycode, |
195 guint32 state); | 196 guint32 state); |
196 | 197 |
197 | 198 |
198 /** | 199 /** |
199 * ibus_input_context_set_cursor_location: | 200 * ibus_input_context_set_cursor_location: |
200 * @context: An IBusInputContext. | 201 * @context: An IBusInputContext. |
201 * @x: X coordinate of the cursor. | 202 * @x: X coordinate of the cursor. |
202 * @y: Y coordinate of the cursor. | 203 * @y: Y coordinate of the cursor. |
203 * @w: Width of the cursor. | 204 * @w: Width of the cursor. |
204 * @h: Height of the cursor. | 205 * @h: Height of the cursor. |
205 * | 206 * |
206 * Set the cursor location of IBus input context. | 207 * Set the cursor location of IBus input context asynchronously. |
207 * | 208 * |
208 * see_also: #IBusEngine::set-cursor-location | 209 * see_also: #IBusEngine::set-cursor-location |
209 */ | 210 */ |
210 void ibus_input_context_set_cursor_location | 211 void ibus_input_context_set_cursor_location |
211 (IBusInputContext *context, | 212 (IBusInputContext *context, |
212 gint32 x, | 213 gint32 x, |
213 gint32 y, | 214 gint32 y, |
214 gint32 w, | 215 gint32 w, |
215 gint32 h); | 216 gint32 h); |
216 /** | 217 /** |
217 * ibus_input_context_set_capabilities: | 218 * ibus_input_context_set_capabilities: |
218 * @context: An IBusInputContext. | 219 * @context: An IBusInputContext. |
219 * @capabilities: Capabilities flags of IBusEngine, see #IBusCapabilite | 220 * @capabilities: Capabilities flags of IBusEngine, see #IBusCapabilite |
220 * | 221 * |
221 * Set the capabilities flags of client application. | 222 * Set the capabilities flags of client application asynchronously. |
222 * When IBUS_CAP_FOCUS is not set, IBUS_CAP_PREEDIT_TEXT, IBUS_CAP_AUXILIARY_TEX
T, IBUS_CAP_LOOKUP_TABLE, and IBUS_CAP_PROPERTY have to be all set. | 223 * When IBUS_CAP_FOCUS is not set, IBUS_CAP_PREEDIT_TEXT, IBUS_CAP_AUXILIARY_TEX
T, IBUS_CAP_LOOKUP_TABLE, and IBUS_CAP_PROPERTY have to be all set. |
223 * The panel component does nothing for an application that doesn't support focu
s. | 224 * The panel component does nothing for an application that doesn't support focu
s. |
224 * | 225 * |
225 * see_also: #IBusEngine::set-capabilities | 226 * see_also: #IBusEngine::set-capabilities |
226 */ | 227 */ |
227 void ibus_input_context_set_capabilities | 228 void ibus_input_context_set_capabilities |
228 (IBusInputContext *context, | 229 (IBusInputContext *context, |
229 guint32 capabilities); | 230 guint32 capabilities); |
230 | 231 |
231 /** | 232 /** |
232 * ibus_input_context_property_activate | 233 * ibus_input_context_property_activate |
233 * @context: An IBusInputContext. | 234 * @context: An IBusInputContext. |
234 * @prop_name: A property name (e.g. "InputMode.WideLatin") | 235 * @prop_name: A property name (e.g. "InputMode.WideLatin") |
235 * @state: A status of the property (e.g. PROP_STATE_CHECKED) | 236 * @state: A status of the property (e.g. PROP_STATE_CHECKED) |
236 * | 237 * |
237 * Activate the property. | 238 * Activate the property asynchronously. |
238 * | 239 * |
239 * @see_also: #IBusEngine::property_activate | 240 * @see_also: #IBusEngine::property_activate |
240 */ | 241 */ |
241 void ibus_input_context_property_activate | 242 void ibus_input_context_property_activate |
242 (IBusInputContext *context, | 243 (IBusInputContext *context, |
243 const gchar *prop_name, | 244 const gchar *prop_name, |
244 guint32 state); | 245 guint32 state); |
245 | 246 |
246 /** | 247 /** |
247 * ibus_input_context_focus_in: | 248 * ibus_input_context_focus_in: |
248 * @context: An IBusInputContext. | 249 * @context: An IBusInputContext. |
249 * | 250 * |
250 * Invoked when the client application get focus. | 251 * Invoked when the client application get focus. (asynchronous IPC) |
251 * | 252 * |
252 * see_also: #IBusEngine::focus_in. | 253 * see_also: #IBusEngine::focus_in. |
253 */ | 254 */ |
254 void ibus_input_context_focus_in (IBusInputContext *context); | 255 void ibus_input_context_focus_in (IBusInputContext *context); |
255 | 256 |
256 /** | 257 /** |
257 * ibus_input_context_focus_out: | 258 * ibus_input_context_focus_out: |
258 * @context: An IBusInputContext. | 259 * @context: An IBusInputContext. |
259 * | 260 * |
260 * Invoked when the client application get focus. | 261 * Invoked when the client application get focus. (asynchronous IPC) |
261 * | 262 * |
262 * see_also: #IBusEngine::focus_out. | 263 * see_also: #IBusEngine::focus_out. |
263 */ | 264 */ |
264 void ibus_input_context_focus_out (IBusInputContext *context); | 265 void ibus_input_context_focus_out (IBusInputContext *context); |
265 | 266 |
266 | 267 |
267 /** | 268 /** |
268 * ibus_input_context_reset: | 269 * ibus_input_context_reset: |
269 * @context: An IBusInputContext. | 270 * @context: An IBusInputContext. |
270 * | 271 * |
271 * Invoked when the IME is reset. | 272 * Invoked when the IME is reset. (asynchronous IPC) |
272 * | 273 * |
273 * see_also: #IBusEngine::reset | 274 * see_also: #IBusEngine::reset |
274 */ | 275 */ |
275 void ibus_input_context_reset (IBusInputContext *context); | 276 void ibus_input_context_reset (IBusInputContext *context); |
276 | 277 |
277 /** | 278 /** |
278 * ibus_input_context_enable: | 279 * ibus_input_context_enable: |
279 * @context: An IBusInputContext. | 280 * @context: An IBusInputContext. |
280 * | 281 * |
281 * Invoked when the IME is enabled, either by IME switch hotkey or select from t
he menu. | 282 * Invoked when the IME is enabled, either by IME switch hotkey or select from t
he menu. |
| 283 * (asynchronous IPC) |
282 * | 284 * |
283 * see_also: #IBusEngine::enable | 285 * see_also: #IBusEngine::enable |
284 */ | 286 */ |
285 void ibus_input_context_enable (IBusInputContext *context); | 287 void ibus_input_context_enable (IBusInputContext *context); |
286 | 288 |
287 /** | 289 /** |
288 * ibus_input_context_disable: | 290 * ibus_input_context_disable: |
289 * @context: An IBusInputContext. | 291 * @context: An IBusInputContext. |
290 * | 292 * |
291 * Invoked when the IME is disabled, either by IME switch hotkey or select from
the menu. | 293 * Invoked when the IME is disabled, either by IME switch hotkey or select from
the menu. |
| 294 * (asynchronous IPC) |
292 * | 295 * |
293 * see_also: #IBusEngine::disable | 296 * see_also: #IBusEngine::disable |
294 */ | 297 */ |
295 void ibus_input_context_disable (IBusInputContext *context); | 298 void ibus_input_context_disable (IBusInputContext *context); |
296 | 299 |
297 | 300 |
298 /** | 301 /** |
| 302 * ibus_input_context_is_enabled_async: |
| 303 * @context: An IBusInputContext. |
| 304 * @timeout_msec: The timeout in milliseconds or -1 to use the default timeout. |
| 305 * @cancellable: A GCancellable or NULL. |
| 306 * @callback: A GAsyncReadyCallback to call when the request is satisfied or NUL
L |
| 307 * if you don't care about the result of the method invocation. |
| 308 * @user_data: The data to pass to callback. |
| 309 * |
| 310 * (asynchronous IPC) |
| 311 */ |
| 312 void ibus_input_context_is_enabled_async |
| 313 (IBusInputContext *context, |
| 314 gint timeout_msec, |
| 315 GCancellable *cancellable, |
| 316 GAsyncReadyCallback callback, |
| 317 gpointer user_data); |
| 318 |
| 319 /** |
| 320 * ibus_input_context_process_key_event_async_finish: |
| 321 * @context: An IBusInputContext. |
| 322 * @res: A GAsyncResult obtained from the GAsyncReadyCallback passed to |
| 323 * ibus_input_context_is_enabled_async(). |
| 324 * @error: Return location for error or NULL. |
| 325 * @returns: TRUE if the context is enabled; FALSE otherwise. |
| 326 * |
| 327 * Finishes an operation started with ibus_input_context_process_key_event_async
(). |
| 328 */ |
| 329 gboolean ibus_input_context_is_enabled_async_finish |
| 330 (IBusInputContext *context, |
| 331 GAsyncResult *res, |
| 332 GError **error); |
| 333 |
| 334 /** |
299 * ibus_input_context_is_enabled: | 335 * ibus_input_context_is_enabled: |
300 * @context: An IBusInputContext. | 336 * @context: An IBusInputContext. |
301 * @returns: TRUE if the IME is enabled on the context. | 337 * @returns: TRUE if the IME is enabled on the context. |
302 * | 338 * |
303 * Returns TRUE if the IME is enabled on the context. | 339 * Returns TRUE if the IME is enabled on the context. |
| 340 * (synchronous IPC - may block the thread for a few seconds.) |
304 */ | 341 */ |
305 gboolean ibus_input_context_is_enabled (IBusInputContext *context); | 342 gboolean ibus_input_context_is_enabled (IBusInputContext *context); |
306 | 343 |
307 /** | 344 /** |
| 345 * ibus_input_context_get_engine_async: |
| 346 * @context: An IBusInputContext. |
| 347 * @timeout_msec: The timeout in milliseconds or -1 to use the default timeout. |
| 348 * @cancellable: A GCancellable or NULL. |
| 349 * @callback: A GAsyncReadyCallback to call when the request is satisfied or NUL
L |
| 350 * if you don't care about the result of the method invocation. |
| 351 * @user_data: The data to pass to callback. |
| 352 * |
| 353 * (asynchronous IPC) |
| 354 */ |
| 355 void ibus_input_context_get_engine_async |
| 356 (IBusInputContext *context, |
| 357 gint timeout_msec, |
| 358 GCancellable *cancellable, |
| 359 GAsyncReadyCallback callback, |
| 360 gpointer user_data); |
| 361 |
| 362 /** |
| 363 * ibus_input_context_process_key_event_async_finish: |
| 364 * @context: An IBusInputContext. |
| 365 * @res: A GAsyncResult obtained from the GAsyncReadyCallback passed to |
| 366 * ibus_input_context_get_engine_async(). |
| 367 * @error: Return location for error or NULL. |
| 368 * @returns: (transfer none): An IME engine description for the context, or NULL
. |
| 369 * |
| 370 * Finishes an operation started with ibus_input_context_process_key_event_async
(). |
| 371 */ |
| 372 IBusEngineDesc |
| 373 *ibus_input_context_get_engine_async_finish |
| 374 (IBusInputContext *context, |
| 375 GAsyncResult *res, |
| 376 GError **error); |
| 377 |
| 378 /** |
308 * ibus_input_context_get_engine: | 379 * ibus_input_context_get_engine: |
309 * @context: An IBusInputContext. | 380 * @context: An IBusInputContext. |
310 * @returns: (transfer none): An IME engine description for the context | 381 * @returns: (transfer none): An IME engine description for the context, or NULL
. |
311 * | 382 * |
312 * Returns an IME engine description for the context. | 383 * Returns an IME engine description for the context. |
| 384 * (synchronous IPC - may block the thread for a few seconds.) |
313 */ | 385 */ |
314 IBusEngineDesc | 386 IBusEngineDesc |
315 *ibus_input_context_get_engine (IBusInputContext *context); | 387 *ibus_input_context_get_engine (IBusInputContext *context); |
316 | 388 |
317 /** | 389 /** |
318 * ibus_input_context_set_engine: | 390 * ibus_input_context_set_engine: |
319 * @context: An IBusInputContext. | 391 * @context: An IBusInputContext. |
320 * @name: A name of the engine. | 392 * @name: A name of the engine. |
321 * | 393 * |
322 * Invoked when the IME engine is changed. | 394 * Invoked when the IME engine is changed. |
| 395 * (asynchronous IPC) |
323 */ | 396 */ |
324 void ibus_input_context_set_engine (IBusInputContext *context, | 397 void ibus_input_context_set_engine (IBusInputContext *context, |
325 const gchar *name); | 398 const gchar *name); |
326 | 399 |
327 | 400 |
328 G_END_DECLS | 401 G_END_DECLS |
329 #endif | 402 #endif |
330 | 403 |
OLD | NEW |