summaryrefslogtreecommitdiff
path: root/legacy/ecore/src/lib/ecore_imf
diff options
context:
space:
mode:
authorJihoon Kim <imfine98@gmail.com>2012-02-06 09:46:38 +0000
committerJihoon Kim <imfine98@gmail.com>2012-02-06 09:46:38 +0000
commit20646f9fa137e610f734c5dcaf20f491f6563bb5 (patch)
tree1a3cbd8e6008863d92d528ec43ec1cecac368413 /legacy/ecore/src/lib/ecore_imf
parent1d92d7dbe6c0bf504fd5e5d69d154dee117f0024 (diff)
ecore_imf: Add Ecore_IMF function to set or get the input panel-specific data
SVN revision: 67711
Diffstat (limited to '')
-rw-r--r--legacy/ecore/src/lib/ecore_imf/Ecore_IMF.h4
-rw-r--r--legacy/ecore/src/lib/ecore_imf/ecore_imf_context.c52
2 files changed, 56 insertions, 0 deletions
diff --git a/legacy/ecore/src/lib/ecore_imf/Ecore_IMF.h b/legacy/ecore/src/lib/ecore_imf/Ecore_IMF.h
index 866c6d235b..2c589edeea 100644
--- a/legacy/ecore/src/lib/ecore_imf/Ecore_IMF.h
+++ b/legacy/ecore/src/lib/ecore_imf/Ecore_IMF.h
@@ -345,6 +345,8 @@ struct _Ecore_IMF_Context_Class
345 void (*input_panel_language_set) (Ecore_IMF_Context *ctx, Ecore_IMF_Input_Panel_Lang lang); 345 void (*input_panel_language_set) (Ecore_IMF_Context *ctx, Ecore_IMF_Input_Panel_Lang lang);
346 Ecore_IMF_Input_Panel_Lang (*input_panel_language_get) (Ecore_IMF_Context *ctx); 346 Ecore_IMF_Input_Panel_Lang (*input_panel_language_get) (Ecore_IMF_Context *ctx);
347 void (*cursor_location_set) (Ecore_IMF_Context *ctx, int x, int y, int w, int h); 347 void (*cursor_location_set) (Ecore_IMF_Context *ctx, int x, int y, int w, int h);
348 void (*input_panel_imdata_set)(Ecore_IMF_Context *ctx, const void* data, int len);
349 void (*input_panel_imdata_get)(Ecore_IMF_Context *ctx, void* data, int *len);
348}; 350};
349 351
350struct _Ecore_IMF_Context_Info 352struct _Ecore_IMF_Context_Info
@@ -418,6 +420,8 @@ EAPI void ecore_imf_context_input_panel_language_set(Ec
418EAPI Ecore_IMF_Input_Panel_Lang ecore_imf_context_input_panel_language_get(Ecore_IMF_Context *ctx); 420EAPI Ecore_IMF_Input_Panel_Lang ecore_imf_context_input_panel_language_get(Ecore_IMF_Context *ctx);
419EAPI void ecore_imf_context_input_panel_enabled_set(Ecore_IMF_Context *ctx, Eina_Bool enable); 421EAPI void ecore_imf_context_input_panel_enabled_set(Ecore_IMF_Context *ctx, Eina_Bool enable);
420EAPI Eina_Bool ecore_imf_context_input_panel_enabled_get(Ecore_IMF_Context *ctx); 422EAPI Eina_Bool ecore_imf_context_input_panel_enabled_get(Ecore_IMF_Context *ctx);
423EAPI void ecore_imf_context_input_panel_imdata_set(Ecore_IMF_Context *ctx, const void *data, int len);
424EAPI void ecore_imf_context_input_panel_imdata_get(Ecore_IMF_Context *ctx, void *data, int *len);
421 425
422/* The following entry points must be exported by each input method module 426/* The following entry points must be exported by each input method module
423 */ 427 */
diff --git a/legacy/ecore/src/lib/ecore_imf/ecore_imf_context.c b/legacy/ecore/src/lib/ecore_imf/ecore_imf_context.c
index 49d6ea3354..2dddc421c7 100644
--- a/legacy/ecore/src/lib/ecore_imf/ecore_imf_context.c
+++ b/legacy/ecore/src/lib/ecore_imf/ecore_imf_context.c
@@ -1378,3 +1378,55 @@ ecore_imf_context_input_panel_enabled_get (Ecore_IMF_Context *ctx)
1378 return ctx->input_panel_enabled; 1378 return ctx->input_panel_enabled;
1379} 1379}
1380 1380
1381/**
1382 * Set the input panel-specific data to deliver to the input panel.
1383 * this API is used by applications to deliver specific data to the input panel.
1384 * the data format MUST be negotiated by both application and the input panel.
1385 * The size and format of data are defined by the input panel.
1386 *
1387 * @param ctx An #Ecore_IMF_Context.
1388 * @param data The specific data to be set to the input panel.
1389 * @param len the length of data, in bytes, to send to the input panel
1390 * @ingroup Ecore_IMF_Context_Group
1391 * @since 1.2.0
1392 */
1393EAPI void
1394ecore_imf_context_input_panel_imdata_set(Ecore_IMF_Context *ctx, const void *data, int len)
1395{
1396 if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT))
1397 {
1398 ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,
1399 "ecore_imf_context_input_panel_imdata_set");
1400 return;
1401 }
1402
1403 if (!data) return;
1404
1405 if (ctx->klass->input_panel_imdata_set)
1406 ctx->klass->input_panel_imdata_set(ctx, data, len);
1407}
1408
1409/**
1410 * Get the specific data of the current active input panel.
1411 *
1412 * @param ctx An #Ecore_IMF_Context.
1413 * @param data The specific data to be got from the input panel
1414 * @param len The length of data
1415 * @ingroup Ecore_IMF_Context_Group
1416 * @since 1.2.0
1417 */
1418EAPI void
1419ecore_imf_context_input_panel_imdata_get(Ecore_IMF_Context *ctx, void *data, int *len)
1420{
1421 if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT))
1422 {
1423 ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,
1424 "ecore_imf_context_input_panel_imdata_get");
1425 return;
1426 }
1427
1428 if (!data) return;
1429
1430 if (ctx->klass->input_panel_imdata_get)
1431 ctx->klass->input_panel_imdata_get(ctx, data, len);
1432}