forked from enlightenment/efl
From: Jihoon Kim <imfine98@gmail.com>
Subject: Re: [E-devel] [PATCH] scim-EFL immodule I'd like to contribute EFL-scim immodule. It will be useful to users who wants to input Chinese, Japanese, Korean, and a variety of languages that SCIM provides. When you run, you should set environment variable 'ECORE_IMF_MODULE' # export ECORE_IMF_MODULE=scim SVN revision: 66507
This commit is contained in:
parent
e13221170d
commit
64a4a33614
|
@ -48,3 +48,4 @@ Kim Yunhan <spbear@gmail.com>
|
||||||
Youness Alaoui <kakaroto@kakaroto.homelinux.net>
|
Youness Alaoui <kakaroto@kakaroto.homelinux.net>
|
||||||
Bluezery <ohpowel@gmail.com>
|
Bluezery <ohpowel@gmail.com>
|
||||||
Doyoun Kang <wayofmine@gmail.com> <doyoun.kang@samsung.com>
|
Doyoun Kang <wayofmine@gmail.com> <doyoun.kang@samsung.com>
|
||||||
|
Haifeng Deng <haifeng.deng@samsung.com>
|
||||||
|
|
|
@ -176,6 +176,7 @@ want_ecore_evas_ews="yes"
|
||||||
|
|
||||||
# ecore_imf modules
|
# ecore_imf modules
|
||||||
want_ecore_imf_xim="no"
|
want_ecore_imf_xim="no"
|
||||||
|
want_ecore_imf_scim="no"
|
||||||
|
|
||||||
case "$host_os" in
|
case "$host_os" in
|
||||||
mingw32ce* | cegcc*)
|
mingw32ce* | cegcc*)
|
||||||
|
@ -235,6 +236,7 @@ case "$host_os" in
|
||||||
want_ecore_evas_directfb="yes"
|
want_ecore_evas_directfb="yes"
|
||||||
want_ecore_evas_fb="yes"
|
want_ecore_evas_fb="yes"
|
||||||
want_ecore_imf_xim="yes"
|
want_ecore_imf_xim="yes"
|
||||||
|
want_ecore_imf_scim="yes"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
@ -262,6 +264,7 @@ requirements_ecore_x=""
|
||||||
requirements_ecore_win32=""
|
requirements_ecore_win32=""
|
||||||
requirements_ecore_wince=""
|
requirements_ecore_wince=""
|
||||||
requirements_ecore_imf_xim=""
|
requirements_ecore_imf_xim=""
|
||||||
|
requirements_ecore_imf_scim=""
|
||||||
|
|
||||||
AC_CHECK_DECL([MAXHOSTNAMELEN],[FOUND_MAXHOSTNAMELEN=yes])
|
AC_CHECK_DECL([MAXHOSTNAMELEN],[FOUND_MAXHOSTNAMELEN=yes])
|
||||||
|
|
||||||
|
@ -1547,6 +1550,22 @@ fi
|
||||||
ECORE_CHECK_MODULE([imf-xim], [${want_ecore_imf}], [Imf_XIM], [${ecore_imf_xim_deps}],
|
ECORE_CHECK_MODULE([imf-xim], [${want_ecore_imf}], [Imf_XIM], [${ecore_imf_xim_deps}],
|
||||||
[requirements_ecore_imf_xim="ecore-imf >= 1.1.99 ecore-x >= 1.1.99 ecore-input >= 1.1.99 ${requirements_ecore_imf_xim}"])
|
[requirements_ecore_imf_xim="ecore-imf >= 1.1.99 ecore-x >= 1.1.99 ecore-input >= 1.1.99 ${requirements_ecore_imf_xim}"])
|
||||||
|
|
||||||
|
# ecore_imf_scim
|
||||||
|
PKG_CHECK_MODULES([SCIM], [scim], [have_scim="yes"], [have_scim="no"])
|
||||||
|
|
||||||
|
AM_CONDITIONAL(BUILD_ECORE_IMF_SCIM, false)
|
||||||
|
ecore_imf_scim_deps="no"
|
||||||
|
echo "have_ecore_x_xlib: ${have_ecore_x_xlib}"
|
||||||
|
if test "x${have_ecore_imf}" = "xyes" \
|
||||||
|
-a "x${have_scim}" = "xyes" \
|
||||||
|
-a "x${have_ecore_input}" = "xyes" ; then
|
||||||
|
ecore_imf_scim_deps="yes"
|
||||||
|
AC_DEFINE(BUILD_ECORE_IMF_SCIM, 1, [Ecore Imf SCIM Support])
|
||||||
|
fi
|
||||||
|
|
||||||
|
ECORE_CHECK_MODULE([imf-scim], [${want_ecore_imf}], [Imf_SCIM], [${ecore_imf_scim_deps}],
|
||||||
|
[requirements_ecore_imf_scim="ecore-imf >= 1.1.0 ecore-x >= 1.1.0 ecore-input >= 1.1.0 ${requirements_ecore_imf_scim}"])
|
||||||
|
|
||||||
## Graphic systems
|
## Graphic systems
|
||||||
|
|
||||||
# ecore_x{cb}
|
# ecore_x{cb}
|
||||||
|
@ -1845,6 +1864,7 @@ AC_SUBST(requirements_ecore_x)
|
||||||
AC_SUBST(requirements_ecore_win32)
|
AC_SUBST(requirements_ecore_win32)
|
||||||
AC_SUBST(requirements_ecore_wince)
|
AC_SUBST(requirements_ecore_wince)
|
||||||
AC_SUBST(requirements_ecore_imf_xim)
|
AC_SUBST(requirements_ecore_imf_xim)
|
||||||
|
AC_SUBST(requirements_ecore_imf_scim)
|
||||||
|
|
||||||
AC_CONFIG_FILES([
|
AC_CONFIG_FILES([
|
||||||
Makefile
|
Makefile
|
||||||
|
@ -1898,6 +1918,7 @@ src/tests/Makefile
|
||||||
src/modules/Makefile
|
src/modules/Makefile
|
||||||
src/modules/immodules/Makefile
|
src/modules/immodules/Makefile
|
||||||
src/modules/immodules/xim/Makefile
|
src/modules/immodules/xim/Makefile
|
||||||
|
src/modules/immodules/scim/Makefile
|
||||||
ecore.spec
|
ecore.spec
|
||||||
$po_makefile_in
|
$po_makefile_in
|
||||||
])
|
])
|
||||||
|
@ -1956,6 +1977,7 @@ fi
|
||||||
#echo " Ecore_Config.................: $have_ecore_config (deprecated)"
|
#echo " Ecore_Config.................: $have_ecore_config (deprecated)"
|
||||||
echo " Ecore_IMF....................: $have_ecore_imf"
|
echo " Ecore_IMF....................: $have_ecore_imf"
|
||||||
echo " XIM........................: $have_ecore_imf_xim"
|
echo " XIM........................: $have_ecore_imf_xim"
|
||||||
|
echo " SCIM.......................: $have_ecore_imf_scim"
|
||||||
echo " Ecore_IMF_Evas...............: $have_ecore_imf_evas"
|
echo " Ecore_IMF_Evas...............: $have_ecore_imf_evas"
|
||||||
echo " Ecore_Input..................: $have_ecore_input"
|
echo " Ecore_Input..................: $have_ecore_input"
|
||||||
echo " Ecore_Input_Evas.............: $have_ecore_input_evas"
|
echo " Ecore_Input_Evas.............: $have_ecore_input_evas"
|
||||||
|
|
|
@ -5,3 +5,7 @@ SUBDIRS =
|
||||||
if BUILD_ECORE_IMF_XIM
|
if BUILD_ECORE_IMF_XIM
|
||||||
SUBDIRS += xim
|
SUBDIRS += xim
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
if BUILD_ECORE_IMF_SCIM
|
||||||
|
SUBDIRS += scim
|
||||||
|
endif
|
||||||
|
|
|
@ -0,0 +1,35 @@
|
||||||
|
MAINTAINERCLEANFILES = Makefile.in
|
||||||
|
|
||||||
|
AM_CPPFLAGS = \
|
||||||
|
-I$(top_srcdir) \
|
||||||
|
-I$(top_srcdir)/src/lib/ecore \
|
||||||
|
-I$(top_srcdir)/src/lib/ecore_input \
|
||||||
|
-I$(top_srcdir)/src/lib/ecore_x \
|
||||||
|
-I$(top_srcdir)/src/lib/ecore_imf \
|
||||||
|
-I$(top_srcdir)/src/lib/ecore_evas \
|
||||||
|
-I$(top_builddir)/src/lib/ecore \
|
||||||
|
-I$(top_builddir)/src/lib/ecore_input \
|
||||||
|
-I$(top_builddir)/src/lib/ecore_x \
|
||||||
|
-I$(top_builddir)/src/lib/ecore_imf \
|
||||||
|
-I$(top_builddir)/src/lib/ecore_evas \
|
||||||
|
-DPACKAGE_LIB_DIR=\"$(libdir)\" \
|
||||||
|
-DPACKAGE_DATA_DIR=\"$(datadir)/$(PACKAGE)\" \
|
||||||
|
@SCIM_CFLAGS@ \
|
||||||
|
@EVAS_CFLAGS@ \
|
||||||
|
@EINA_CFLAGS@
|
||||||
|
|
||||||
|
pkgdir = $(libdir)/ecore/immodules
|
||||||
|
|
||||||
|
pkg_LTLIBRARIES = scim.la
|
||||||
|
scim_la_SOURCES = \
|
||||||
|
scim_imcontext.cpp \
|
||||||
|
scim_module.cpp
|
||||||
|
|
||||||
|
scim_la_LIBADD = \
|
||||||
|
$(top_builddir)/src/lib/ecore_imf/libecore_imf.la \
|
||||||
|
$(top_builddir)/src/lib/ecore_x/libecore_x.la \
|
||||||
|
@SCIM_LIBS@ \
|
||||||
|
@EVAS_LIBS@ \
|
||||||
|
@EINA_LIBS@
|
||||||
|
scim_la_LDFLAGS = -no-undefined @lt_enable_auto_import@ -module -avoid-version
|
||||||
|
scim_la_LIBTOOLFLAGS = --tag=disable-static
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,93 @@
|
||||||
|
#include <stdio.h>
|
||||||
|
#include "scim_imcontext.h"
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C"
|
||||||
|
{
|
||||||
|
#endif /* __cplusplus */
|
||||||
|
|
||||||
|
static const Ecore_IMF_Context_Info isf_imf_info = {
|
||||||
|
"scim", /* ID */
|
||||||
|
"SCIM immodule for Ecore", /* Description */
|
||||||
|
"*", /* Default locales */
|
||||||
|
NULL, /* Canvas type */
|
||||||
|
0 /* Canvas required */
|
||||||
|
};
|
||||||
|
|
||||||
|
static Ecore_IMF_Context_Class isf_imf_class = {
|
||||||
|
isf_imf_context_add, /* add */
|
||||||
|
isf_imf_context_del, /* del */
|
||||||
|
isf_imf_context_client_window_set, /* client_window_set */
|
||||||
|
isf_imf_context_client_canvas_set, /* client_canvas_set */
|
||||||
|
NULL, /* isf_imf_context_input_panel_show, - show */
|
||||||
|
NULL, /* isf_imf_context_input_panel_hide, - hide */
|
||||||
|
isf_imf_context_preedit_string_get, /* get_preedit_string */
|
||||||
|
isf_imf_context_focus_in, /* focus_in */
|
||||||
|
isf_imf_context_focus_out, /* focus_out */
|
||||||
|
isf_imf_context_reset, /* reset */
|
||||||
|
isf_imf_context_cursor_position_set, /* cursor_position_set */
|
||||||
|
isf_imf_context_use_preedit_set, /* use_preedit_set */
|
||||||
|
isf_imf_context_input_mode_set, /* input_mode_set */
|
||||||
|
isf_imf_context_filter_event, /* filter_event */
|
||||||
|
isf_imf_context_preedit_string_with_attributes_get, /* preedit_string_with_attribute_get */
|
||||||
|
isf_imf_context_prediction_allow_set, /* prediction_allow_set */
|
||||||
|
isf_imf_context_autocapital_type_set, /* autocapital_type_set */
|
||||||
|
NULL, /* control panel show */
|
||||||
|
NULL, /* control panel hide */
|
||||||
|
NULL, /* input_panel_layout_set */
|
||||||
|
NULL, /* isf_imf_context_input_panel_layout_get, */
|
||||||
|
NULL, /* isf_imf_context_input_panel_language_set, */
|
||||||
|
NULL, /* isf_imf_context_input_panel_language_get, */
|
||||||
|
isf_imf_context_cursor_location_set /* cursor_location_set */
|
||||||
|
};
|
||||||
|
|
||||||
|
static Ecore_IMF_Context *imf_module_create (void);
|
||||||
|
static Ecore_IMF_Context *imf_module_exit (void);
|
||||||
|
|
||||||
|
static Eina_Bool imf_module_init (void)
|
||||||
|
{
|
||||||
|
ecore_imf_module_register (&isf_imf_info, imf_module_create, imf_module_exit);
|
||||||
|
return EINA_TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void imf_module_shutdown (void)
|
||||||
|
{
|
||||||
|
isf_imf_context_shutdown ();
|
||||||
|
}
|
||||||
|
|
||||||
|
static Ecore_IMF_Context *imf_module_create (void)
|
||||||
|
{
|
||||||
|
Ecore_IMF_Context *ctx = NULL;
|
||||||
|
EcoreIMFContextISF *ctxd = NULL;
|
||||||
|
|
||||||
|
ctxd = isf_imf_context_new ();
|
||||||
|
if (!ctxd)
|
||||||
|
{
|
||||||
|
printf ("isf_imf_context_new () failed!!!\n");
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
ctx = ecore_imf_context_new (&isf_imf_class);
|
||||||
|
if (!ctx)
|
||||||
|
{
|
||||||
|
delete ctxd;
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
ecore_imf_context_data_set (ctx, ctxd);
|
||||||
|
|
||||||
|
return ctx;
|
||||||
|
}
|
||||||
|
|
||||||
|
static Ecore_IMF_Context *imf_module_exit (void)
|
||||||
|
{
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
EINA_MODULE_INIT(imf_module_init);
|
||||||
|
EINA_MODULE_SHUTDOWN(imf_module_shutdown);
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif /* __cplusplus */
|
||||||
|
|
Loading…
Reference in New Issue