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-29 04:37:33 +0000
committerJihoon Kim <imfine98@gmail.com>2012-02-29 04:37:33 +0000
commit05131e23483ef1409a4b6ac0a143571b3030ff21 (patch)
tree42c41151c6e4164e9b76b2fbe0e250a890d4c0ee /legacy/ecore/src/lib/ecore_imf/ecore_imf_context.c
parent890d1a247aa1d381739856d9282e135211af5d3b (diff)
ecore_imf: Add ecore_imf_context_input_panel_caps_lock_mode_set/get to set/get the caps lock mode on the input panel
SVN revision: 68529
Diffstat (limited to '')
-rw-r--r--legacy/ecore/src/lib/ecore_imf/ecore_imf_context.c46
1 files changed, 46 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 5321f4ec11..7fcc2a4cc1 100644
--- a/legacy/ecore/src/lib/ecore_imf/ecore_imf_context.c
+++ b/legacy/ecore/src/lib/ecore_imf/ecore_imf_context.c
@@ -1518,3 +1518,49 @@ ecore_imf_context_input_panel_return_key_disabled_get(Ecore_IMF_Context *ctx)
1518 1518
1519 return ctx->input_panel_return_key_disabled; 1519 return ctx->input_panel_return_key_disabled;
1520} 1520}
1521
1522/**
1523 * Set the caps lock mode on the input panel.
1524 *
1525 * @param ctx An #Ecore_IMF_Context.
1526 * @param mode Turn on caps lock on the input panel if EINA_TRUE
1527 * @ingroup Ecore_IMF_Context_Group
1528 * @since 1.2.0
1529 */
1530EAPI void
1531ecore_imf_context_input_panel_caps_lock_mode_set(Ecore_IMF_Context *ctx, Eina_Bool mode)
1532{
1533 if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT))
1534 {
1535 ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,
1536 "ecore_imf_context_input_panel_caps_lock_mode_set");
1537 return;
1538 }
1539
1540 if (ctx->klass->input_panel_caps_lock_mode_set)
1541 ctx->klass->input_panel_caps_lock_mode_set(ctx, mode);
1542
1543 ctx->input_panel_caps_lock_mode = mode;
1544}
1545
1546/**
1547 * Get the caps lock mode on the input panel.
1548 *
1549 * @param ctx An #Ecore_IMF_Context.
1550 * @return EINA_TRUE if the caps lock is turned on.
1551 * @ingroup Ecore_IMF_Context_Group
1552 * @since 1.2.0
1553 */
1554EAPI Eina_Bool
1555ecore_imf_context_input_panel_caps_lock_mode_get(Ecore_IMF_Context *ctx)
1556{
1557 if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT))
1558 {
1559 ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,
1560 "ecore_imf_context_input_panel_caps_lock_mode_get");
1561 return EINA_FALSE;
1562 }
1563
1564 return ctx->input_panel_caps_lock_mode;
1565}
1566