Hi, EFL developers.
For supporting virtual keyboard, I'd like to add some APIs.
The detail description of each API is written in the patch file as doxygen
format.
Would you please review this patch?
Index: ChangeLog
===================================================================
--- ChangeLog (revision 61142)
+++ ChangeLog (working copy)
@@ -260,3 +260,9 @@
* Ecore_IMF: Added ecore_imf_context_cursor_location_set API
+2011-07-08 Jihoon Kim
+
+ * Ecore_IMF: Added ecore_imf_context_input_panel_imdata_set/get,
+ ecore_imf_context_input_panel_use_effect_set/get,
+ ecore_imf_context_input_panel_geometry_get API
+
Index: src/lib/ecore_imf/ecore_imf_private.h
===================================================================
--- src/lib/ecore_imf/ecore_imf_private.h (revision 61142)
+++ src/lib/ecore_imf/ecore_imf_private.h (working copy)
@@ -52,6 +52,7 @@
Ecore_IMF_Input_Panel_Lang input_panel_lang;
Eina_Bool allow_prediction : 1;
Eina_Bool input_panel_enabled : 1;
+ Eina_Bool use_effect : 1;
};
struct _Ecore_IMF_Module
Index: src/lib/ecore_imf/ecore_imf_context.c
===================================================================
--- src/lib/ecore_imf/ecore_imf_context.c (revision 61142)
+++ src/lib/ecore_imf/ecore_imf_context.c (working copy)
@@ -1234,3 +1234,124 @@
return ctx->input_panel_enabled;
}
+/**
+ * Set the specific data to pass to the input panel.
+ * this API is used by applications to deliver specific data to the input
panel.
+ * the data format MUST be negotiated by both application and the input panel.
+ *
+ * @param ctx An #Ecore_IMF_Context.
+ * @param data The specific data to be set to the input panel.
+ * @param len the length of data
+ * @ingroup Ecore_IMF_Context_IMControl_Group
+ * @since 1.1.0
+ */
+EAPI void
+ecore_imf_context_input_panel_imdata_set (Ecore_IMF_Context *ctx, const char
*data, int len)
+{
+ if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT))
+ {
+ ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,
+ "ecore_imf_context_input_panel_imdata_set");
+ return;
+ }
+
+ if ((!data) || (len <=0)) return;
+
+ if (ctx->klass->input_panel_imdata_set)
+ ctx->klass->input_panel_imdata_set(ctx, data, len);
+}
+
+/**
+ * Get the specific data of the current active input panel.
+ *
+ * @param ctx An #Ecore_IMF_Context.
+ * @param data The specific data to be got from the input panel
+ * @param len The length of data
+ * @ingroup Ecore_IMF_Context_IMControl_Group
+ * @since 1.1.0
+ */
+EAPI void
+ecore_imf_context_input_panel_imdata_get (Ecore_IMF_Context *ctx, char *data,
int *len)
+{
+ if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT))
+ {
+ ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,
+ "ecore_imf_context_input_panel_imdata_get");
+ return;
+ }
+
+ if (!data) return;
+
+ if (ctx->klass->input_panel_imdata_get)
+ ctx->klass->input_panel_imdata_get(ctx, data, len);
+}
+
+/**
+ * Set whether animation effect of the input panel is shown or not.
+ *
+ * @param ctx An #Ecore_IMF_Context.
+ * @param use_effect whether animation effect is shown or not
+ * @ingroup Ecore_IMF_Context_IMControl_Group
+ * @since 1.1.0
+ */
+EAPI void
+ecore_imf_context_input_panel_use_effect_set (Ecore_IMF_Context *ctx,
Eina_Bool use_effect)
+{
+ if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT))
+ {
+ ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,
+ "ecore_imf_context_input_panel_use_effect_set");
+ return;
+ }
+
+ if (ctx->klass->input_panel_use_effect_set)
+ ctx->klass->input_panel_use_effect_set(ctx, use_effect);
+
+ ctx->use_effect = use_effect;
+}
+
+/**
+ * Get whether the input panel supports animation effect or not when it is
shown or hidden.
+ *
+ * @param ctx An #Ecore_IMF_Context.
+ * @param use_effect whether animation effect is shown or not
+ * @ingroup Ecore_IMF_Context_IMControl_Group
+ * @since 1.1.0
+ */
+EAPI Eina_Bool
+ecore_imf_context_input_panel_use_effect_get (Ecore_IMF_Context *ctx)
+{
+ if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT))
+ {
+ ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,
+ "ecore_imf_context_input_panel_use_effect_get");
+ return EINA_TRUE;
+ }
+
+ return ctx->use_effect;
+}
+
+/**
+ * Get the position of the current active input panel.
+ *
+ * @param ctx An #Ecore_IMF_Context.
+ * @param x top-left x co-ordinate of the input panel
+ * @param y top-left y co-ordinate of the input panel
+ * @param w width of the input panel
+ * @param h height of the input panel
+ * @ingroup Ecore_IMF_Context_IMControl_Group
+ * @since 1.1.0
+ */
+EAPI void
+ecore_imf_context_input_panel_geometry_get (Ecore_IMF_Context *ctx, int *x,
int *y, int *w, int *h)
+{
+ if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT))
+ {
+ ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,
+ "ecore_imf_context_input_panel_geometry_get");
+ return;
+ }
+
+ if (ctx->klass->input_panel_geometry_get)
+ ctx->klass->input_panel_geometry_get(ctx, x, y, w, h);
+}
Index: src/lib/ecore_imf/Ecore_IMF.h
===================================================================
--- src/lib/ecore_imf/Ecore_IMF.h (revision 61142)
+++ src/lib/ecore_imf/Ecore_IMF.h (working copy)
@@ -331,6 +331,10 @@
void (*input_panel_language_set) (Ecore_IMF_Context *ctx,
Ecore_IMF_Input_Panel_Lang lang);
Ecore_IMF_Input_Panel_Lang (*input_panel_language_get) (Ecore_IMF_Context
*ctx);
void (*cursor_location_set) (Ecore_IMF_Context *ctx, int x, int y, int w,
int h);
+ void (*input_panel_imdata_set) (Ecore_IMF_Context *ctx, const char* data,
int len);
+ void (*input_panel_imdata_get) (Ecore_IMF_Context *ctx, char* data, int
*len);
+ void (*input_panel_use_effect_set) (Ecore_IMF_Context *ctx, Eina_Bool
use_effect);
+ void (*input_panel_geometry_get) (Ecore_IMF_Context *ctx, int *x, int *y,
int *w, int *h);
};
struct _Ecore_IMF_Context_Info
@@ -401,6 +405,11 @@
EAPI Ecore_IMF_Input_Panel_Lang
ecore_imf_context_input_panel_language_get(Ecore_IMF_Context *ctx);
EAPI void
ecore_imf_context_input_panel_enabled_set(Ecore_IMF_Context *ctx, Eina_Bool
enable);
EAPI Eina_Bool
ecore_imf_context_input_panel_enabled_get(Ecore_IMF_Context *ctx);
+EAPI void
ecore_imf_context_input_panel_imdata_set(Ecore_IMF_Context *ctx, const char
*data, int len);
+EAPI void
ecore_imf_context_input_panel_imdata_get(Ecore_IMF_Context *ctx, char *data,
int *len);
+EAPI void
ecore_imf_context_input_panel_use_effect_set(Ecore_IMF_Context *ctx, Eina_Bool
use_effect);
+EAPI Eina_Bool
ecore_imf_context_input_panel_use_effect_get(Ecore_IMF_Context *ctx);
+EAPI void
ecore_imf_context_input_panel_geometry_get(Ecore_IMF_Context *ctx, int *x, int
*y, int *w, int *h);
/* The following entry points must be exported by each input method module
*/
------------------------------------------------------------------------------
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security
threats, fraudulent activity, and more. Splunk takes this data and makes
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2d-c2
_______________________________________________
enlightenment-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel