summaryrefslogtreecommitdiff
path: root/legacy/ecore/src/lib/ecore_imf/ecore_imf_context.c
diff options
context:
space:
mode:
authorJihoon Kim <imfine98@gmail.com>2012-02-15 01:22:28 +0000
committerJihoon Kim <imfine98@gmail.com>2012-02-15 01:22:28 +0000
commit567b6ac0e8c638e08246fd5f80e135fb368f17f6 (patch)
tree704ce7361b1965d492a7b005c34aefd7d10b1483 /legacy/ecore/src/lib/ecore_imf/ecore_imf_context.c
parent13ae7e3ea4a467e2b925d0d38e731d319190dece (diff)
ecore_imf: Add ecore_imf APIs to set return key type, disable return key.
SVN revision: 67946
Diffstat (limited to '')
-rw-r--r--legacy/ecore/src/lib/ecore_imf/ecore_imf_context.c90
1 files changed, 90 insertions, 0 deletions
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 c6e03a5cff..087f5ce979 100644
--- a/legacy/ecore/src/lib/ecore_imf/ecore_imf_context.c
+++ b/legacy/ecore/src/lib/ecore_imf/ecore_imf_context.c
@@ -1428,3 +1428,93 @@ ecore_imf_context_input_panel_imdata_get(Ecore_IMF_Context *ctx, void *data, int
1428 if (ctx->klass->input_panel_imdata_get) 1428 if (ctx->klass->input_panel_imdata_get)
1429 ctx->klass->input_panel_imdata_get(ctx, data, len); 1429 ctx->klass->input_panel_imdata_get(ctx, data, len);
1430} 1430}
1431
1432/**
1433 * Set the "return" key type. This type is used to set string or icon on the "return" key of the input panel.
1434 *
1435 * An input panel displays the string or icon associated with this type
1436 *
1437 * @param ctx An #Ecore_IMF_Context.
1438 * @param return_key_type The type of "return" key on the input panel
1439 * @ingroup Ecore_IMF_Context_Group
1440 * @since 1.2.0
1441 */
1442EAPI void
1443ecore_imf_context_input_panel_return_key_type_set(Ecore_IMF_Context *ctx, Ecore_IMF_Input_Panel_Return_Key_Type return_key_type)
1444{
1445 if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT))
1446 {
1447 ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,
1448 "ecore_imf_context_input_panel_return_key_type_set");
1449 return;
1450 }
1451
1452 ctx->input_panel_return_key_type = return_key_type;
1453 if (ctx->klass->input_panel_return_key_type_set) ctx->klass->input_panel_return_key_type_set(ctx, return_key_type);
1454}
1455
1456/**
1457 * Get the "return" key type.
1458 *
1459 * @see ecore_imf_context_input_panel_return_key_type_set() for more details
1460 *
1461 * @param ctx An #Ecore_IMF_Context.
1462 * @return The type of "return" key on the input panel
1463 * @ingroup Ecore_IMF_Context_Group
1464 * @since 1.2.0
1465 */
1466EAPI Ecore_IMF_Input_Panel_Return_Key_Type
1467ecore_imf_context_input_panel_return_key_type_get(Ecore_IMF_Context *ctx)
1468{
1469 if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT))
1470 {
1471 ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,
1472 "ecore_imf_context_input_panel_return_key_type_get");
1473 return EINA_FALSE;
1474 }
1475
1476 return ctx->input_panel_return_key_type;
1477}
1478
1479/**
1480 * Set the return key on the input panel to be disabled.
1481 *
1482 * @param ctx An #Ecore_IMF_Context.
1483 * @param disabled The state
1484 * @ingroup Ecore_IMF_Context_Group
1485 * @since 1.2.0
1486 */
1487EAPI void
1488ecore_imf_context_input_panel_return_key_disabled_set(Ecore_IMF_Context *ctx, Eina_Bool disabled)
1489{
1490 if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT))
1491 {
1492 ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,
1493 "ecore_imf_context_input_panel_return_key_disabled_set");
1494 return;
1495 }
1496
1497 ctx->input_panel_return_key_disabled = disabled;
1498 if (ctx->klass->input_panel_return_key_disabled_set) ctx->klass->input_panel_return_key_disabled_set(ctx, disabled);
1499}
1500
1501/**
1502 * Get whether the return key on the input panel should be disabled or not.
1503 *
1504 * @param ctx An #Ecore_IMF_Context.
1505 * @return EINA_TRUE if it should be disabled
1506 * @ingroup Ecore_IMF_Context_Group
1507 * @since 1.2.0
1508 */
1509EAPI Eina_Bool
1510ecore_imf_context_input_panel_return_key_disabled_get(Ecore_IMF_Context *ctx)
1511{
1512 if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT))
1513 {
1514 ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,
1515 "ecore_imf_context_input_panel_return_key_disabled_get");
1516 return EINA_FALSE;
1517 }
1518
1519 return ctx->input_panel_return_key_disabled;
1520}