Hi,
This patch includes the code to add ecore_imf_context_canvas_get and
ecore_imf_context_window_get.
These APIs are coupled with the ecore_imf_context_canvas_set and
ecore_imf_context_window_set.
Would you please review it?
Index: src/lib/ecore_imf/ecore_imf_private.h
===================================================================
--- src/lib/ecore_imf/ecore_imf_private.h (revision 57152)
+++ src/lib/ecore_imf/ecore_imf_private.h (working copy)
@@ -43,6 +43,8 @@ struct _Ecore_IMF_Context
const Ecore_IMF_Context_Class *klass;
void *data;
int input_mode;
+ void *window;
+ void *client_canvas;
Eina_Bool (*retrieve_surrounding_func)(void *data,
Ecore_IMF_Context *ctx, char **text, int *cursor_pos);
void *retrieve_surrounding_data;
};
Index: src/lib/ecore_imf/ecore_imf_context.c
===================================================================
--- src/lib/ecore_imf/ecore_imf_context.c (revision 57152)
+++ src/lib/ecore_imf/ecore_imf_context.c (working copy)
@@ -242,9 +242,31 @@ ecore_imf_context_client_window_set(Ecore_IMF_Cont
return;
}
if (ctx->klass->client_window_set) ctx->klass->client_window_set(ctx,
window);
+ ctx->window = window;
}
/**
+ * Get the client window of the Input Method Context
+ *
+ * See @ref ecore_imf_context_client_window_set for more details.
+ *
+ * @param ctx An #Ecore_IMF_Context.
+ * @return Return the client window.
+ * @ingroup Ecore_IMF_Context_Group
+ */
+EAPI void*
+ecore_imf_context_client_window_get(Ecore_IMF_Context *ctx)
+{
+ if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT))
+ {
+ ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,
+ "ecore_imf_context_client_window_get");
+ return NULL;
+ }
+ return ctx->window;
+}
+
+/**
* Set the client canvas for the Input Method Context; this is the
* canvas in which the input appears.
* The canvas type can be determined by using the context canvas type.
@@ -267,9 +289,31 @@ ecore_imf_context_client_canvas_set(Ecore_IMF_Cont
return;
}
if (ctx->klass->client_canvas_set) ctx->klass->client_canvas_set(ctx,
canvas);
+ ctx->client_canvas = canvas;
}
/**
+ * Get the client canvas of the Input Method Context.
+ *
+ * See @ref ecore_imf_context_client_canvas_set for more details.
+ *
+ * @param ctx An #Ecore_IMF_Context.
+ * @return Return the client canvas.
+ * @ingroup Ecore_IMF_Context_Group
+ */
+EAPI void*
+ecore_imf_context_client_canvas_get(Ecore_IMF_Context *ctx)
+{
+ if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT))
+ {
+ ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,
+ "ecore_imf_context_client_canvas_get");
+ return NULL;
+ }
+ return ctx->client_canvas;
+}
+
+/**
* Ask the Input Method Context to show itself.
*
* @param ctx An #Ecore_IMF_Context.
Index: src/lib/ecore_imf/Ecore_IMF.h
===================================================================
--- src/lib/ecore_imf/Ecore_IMF.h (revision 57152)
+++ src/lib/ecore_imf/Ecore_IMF.h (working copy)
@@ -302,7 +302,9 @@ EAPI Ecore_IMF_Context *ecore_imf_conte
EAPI const Ecore_IMF_Context_Info
*ecore_imf_context_info_get(Ecore_IMF_Context *ctx);
EAPI void ecore_imf_context_del(Ecore_IMF_Context
*ctx);
EAPI void
ecore_imf_context_client_window_set(Ecore_IMF_Context *ctx, void *window);
+EAPI void*
ecore_imf_context_client_window_get(Ecore_IMF_Context *ctx);
EAPI void
ecore_imf_context_client_canvas_set(Ecore_IMF_Context *ctx, void *canvas);
+EAPI void*
ecore_imf_context_client_canvas_get(Ecore_IMF_Context *ctx);
EAPI void ecore_imf_context_show(Ecore_IMF_Context
*ctx);
EAPI void ecore_imf_context_hide(Ecore_IMF_Context
*ctx);
EAPI void
ecore_imf_context_preedit_string_get(Ecore_IMF_Context *ctx, char **str, int
*cursor_pos);
------------------------------------------------------------------------------
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel