aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/libraries/ecore/src/modules/immodules/xim
diff options
context:
space:
mode:
authorDavid Walter Seikel2012-01-04 18:41:13 +1000
committerDavid Walter Seikel2012-01-04 18:41:13 +1000
commitdd7595a3475407a7fa96a97393bae8c5220e8762 (patch)
treee341e911d7eb911a51684a7412ef7f7c7605d28e /libraries/ecore/src/modules/immodules/xim
parentAdd the skeleton. (diff)
downloadSledjHamr-dd7595a3475407a7fa96a97393bae8c5220e8762.zip
SledjHamr-dd7595a3475407a7fa96a97393bae8c5220e8762.tar.gz
SledjHamr-dd7595a3475407a7fa96a97393bae8c5220e8762.tar.bz2
SledjHamr-dd7595a3475407a7fa96a97393bae8c5220e8762.tar.xz
Add the base Enlightenment Foundation Libraries - eina, eet, evas, ecore, embryo, and edje.
Note that embryo wont be used, but I'm not sure yet if you can build edje without it.
Diffstat (limited to 'libraries/ecore/src/modules/immodules/xim')
-rw-r--r--libraries/ecore/src/modules/immodules/xim/Makefile.am29
-rw-r--r--libraries/ecore/src/modules/immodules/xim/Makefile.in808
-rw-r--r--libraries/ecore/src/modules/immodules/xim/ecore_imf_xim.c1273
3 files changed, 2110 insertions, 0 deletions
diff --git a/libraries/ecore/src/modules/immodules/xim/Makefile.am b/libraries/ecore/src/modules/immodules/xim/Makefile.am
new file mode 100644
index 0000000..57a9068
--- /dev/null
+++ b/libraries/ecore/src/modules/immodules/xim/Makefile.am
@@ -0,0 +1,29 @@
1MAINTAINERCLEANFILES = Makefile.in
2
3AM_CPPFLAGS = \
4-I$(top_srcdir) \
5-I$(top_srcdir)/src/lib/ecore \
6-I$(top_srcdir)/src/lib/ecore_input \
7-I$(top_srcdir)/src/lib/ecore_x \
8-I$(top_srcdir)/src/lib/ecore_imf \
9-I$(top_builddir)/src/lib/ecore \
10-I$(top_builddir)/src/lib/ecore_input \
11-I$(top_builddir)/src/lib/ecore_x \
12-I$(top_builddir)/src/lib/ecore_imf \
13-DPACKAGE_LIB_DIR=\"$(libdir)\" \
14-DPACKAGE_DATA_DIR=\"$(datadir)/$(PACKAGE)\" \
15@x_cflags@ \
16@EINA_CFLAGS@
17
18pkgdir = $(libdir)/ecore/immodules
19
20pkg_LTLIBRARIES = xim.la
21xim_la_SOURCES = \
22ecore_imf_xim.c
23xim_la_LIBADD = \
24 $(top_builddir)/src/lib/ecore_imf/libecore_imf.la \
25 $(top_builddir)/src/lib/ecore_x/libecore_x.la \
26 @x_libs@ \
27 @EINA_LIBS@
28xim_la_LDFLAGS = -no-undefined @lt_enable_auto_import@ -module -avoid-version
29xim_la_LIBTOOLFLAGS = --tag=disable-static
diff --git a/libraries/ecore/src/modules/immodules/xim/Makefile.in b/libraries/ecore/src/modules/immodules/xim/Makefile.in
new file mode 100644
index 0000000..ec58d4b
--- /dev/null
+++ b/libraries/ecore/src/modules/immodules/xim/Makefile.in
@@ -0,0 +1,808 @@
1# Makefile.in generated by automake 1.11.1 from Makefile.am.
2# @configure_input@
3
4# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
5# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
6# Inc.
7# This Makefile.in is free software; the Free Software Foundation
8# gives unlimited permission to copy and/or distribute it,
9# with or without modifications, as long as this notice is preserved.
10
11# This program is distributed in the hope that it will be useful,
12# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
13# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
14# PARTICULAR PURPOSE.
15
16@SET_MAKE@
17
18VPATH = @srcdir@
19pkgdatadir = $(datadir)/@PACKAGE@
20pkgincludedir = $(includedir)/@PACKAGE@
21pkglibdir = $(libdir)/@PACKAGE@
22pkglibexecdir = $(libexecdir)/@PACKAGE@
23am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
24install_sh_DATA = $(install_sh) -c -m 644
25install_sh_PROGRAM = $(install_sh) -c
26install_sh_SCRIPT = $(install_sh) -c
27INSTALL_HEADER = $(INSTALL_DATA)
28transform = $(program_transform_name)
29NORMAL_INSTALL = :
30PRE_INSTALL = :
31POST_INSTALL = :
32NORMAL_UNINSTALL = :
33PRE_UNINSTALL = :
34POST_UNINSTALL = :
35build_triplet = @build@
36host_triplet = @host@
37subdir = src/modules/immodules/xim
38DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
39ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
40am__aclocal_m4_deps = $(top_srcdir)/m4/ac_attribute.m4 \
41 $(top_srcdir)/m4/ac_path_generic.m4 \
42 $(top_srcdir)/m4/check_x_extension.m4 \
43 $(top_srcdir)/m4/ecore_check_module.m4 \
44 $(top_srcdir)/m4/ecore_check_options.m4 \
45 $(top_srcdir)/m4/efl_compiler_flag.m4 \
46 $(top_srcdir)/m4/efl_doxygen.m4 \
47 $(top_srcdir)/m4/efl_examples.m4 \
48 $(top_srcdir)/m4/efl_path_max.m4 $(top_srcdir)/m4/efl_tests.m4 \
49 $(top_srcdir)/m4/efl_threads.m4 $(top_srcdir)/m4/gettext.m4 \
50 $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.m4 \
51 $(top_srcdir)/m4/isc-posix.m4 $(top_srcdir)/m4/lib-ld.m4 \
52 $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \
53 $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
54 $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
55 $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \
56 $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \
57 $(top_srcdir)/configure.ac
58am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
59 $(ACLOCAL_M4)
60mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
61CONFIG_HEADER = $(top_builddir)/config.h
62CONFIG_CLEAN_FILES =
63CONFIG_CLEAN_VPATH_FILES =
64am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
65am__vpath_adj = case $$p in \
66 $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
67 *) f=$$p;; \
68 esac;
69am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
70am__install_max = 40
71am__nobase_strip_setup = \
72 srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
73am__nobase_strip = \
74 for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
75am__nobase_list = $(am__nobase_strip_setup); \
76 for p in $$list; do echo "$$p $$p"; done | \
77 sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
78 $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
79 if (++n[$$2] == $(am__install_max)) \
80 { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
81 END { for (dir in files) print dir, files[dir] }'
82am__base_list = \
83 sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
84 sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
85am__installdirs = "$(DESTDIR)$(pkgdir)"
86LTLIBRARIES = $(pkg_LTLIBRARIES)
87xim_la_DEPENDENCIES = \
88 $(top_builddir)/src/lib/ecore_imf/libecore_imf.la \
89 $(top_builddir)/src/lib/ecore_x/libecore_x.la
90am_xim_la_OBJECTS = xim_la-ecore_imf_xim.lo
91xim_la_OBJECTS = $(am_xim_la_OBJECTS)
92AM_V_lt = $(am__v_lt_$(V))
93am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
94am__v_lt_0 = --silent
95xim_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(xim_la_LIBTOOLFLAGS) \
96 $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
97 $(xim_la_LDFLAGS) $(LDFLAGS) -o $@
98DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
99depcomp = $(SHELL) $(top_srcdir)/depcomp
100am__depfiles_maybe = depfiles
101am__mv = mv -f
102COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
103 $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
104LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
105 $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
106 $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
107 $(AM_CFLAGS) $(CFLAGS)
108AM_V_CC = $(am__v_CC_$(V))
109am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY))
110am__v_CC_0 = @echo " CC " $@;
111AM_V_at = $(am__v_at_$(V))
112am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
113am__v_at_0 = @
114CCLD = $(CC)
115LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
116 $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
117 $(AM_LDFLAGS) $(LDFLAGS) -o $@
118AM_V_CCLD = $(am__v_CCLD_$(V))
119am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY))
120am__v_CCLD_0 = @echo " CCLD " $@;
121AM_V_GEN = $(am__v_GEN_$(V))
122am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
123am__v_GEN_0 = @echo " GEN " $@;
124SOURCES = $(xim_la_SOURCES)
125DIST_SOURCES = $(xim_la_SOURCES)
126ETAGS = etags
127CTAGS = ctags
128DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
129ACLOCAL = @ACLOCAL@
130ALLOCA = @ALLOCA@
131AMTAR = @AMTAR@
132AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
133AR = @AR@
134AS = @AS@
135AUTOCONF = @AUTOCONF@
136AUTOHEADER = @AUTOHEADER@
137AUTOMAKE = @AUTOMAKE@
138AWK = @AWK@
139CARES_CFLAGS = @CARES_CFLAGS@
140CARES_LIBS = @CARES_LIBS@
141CC = @CC@
142CCDEPMODE = @CCDEPMODE@
143CFLAGS = @CFLAGS@
144CHECK_CFLAGS = @CHECK_CFLAGS@
145CHECK_LIBS = @CHECK_LIBS@
146CPP = @CPP@
147CPPFLAGS = @CPPFLAGS@
148CURL_CFLAGS = @CURL_CFLAGS@
149CURL_LIBS = @CURL_LIBS@
150CXX = @CXX@
151CXXCPP = @CXXCPP@
152CXXDEPMODE = @CXXDEPMODE@
153CXXFLAGS = @CXXFLAGS@
154CYGPATH_W = @CYGPATH_W@
155DEFS = @DEFS@
156DEPDIR = @DEPDIR@
157DIRECTFB_CFLAGS = @DIRECTFB_CFLAGS@
158DIRECTFB_LIBS = @DIRECTFB_LIBS@
159DLLTOOL = @DLLTOOL@
160DSYMUTIL = @DSYMUTIL@
161DUMPBIN = @DUMPBIN@
162ECHO_C = @ECHO_C@
163ECHO_N = @ECHO_N@
164ECHO_T = @ECHO_T@
165ECORE_XCB_CFLAGS = @ECORE_XCB_CFLAGS@
166ECORE_XCB_LIBS = @ECORE_XCB_LIBS@
167EFL_ECORE_BUILD = @EFL_ECORE_BUILD@
168EFL_ECORE_CON_BUILD = @EFL_ECORE_CON_BUILD@
169EFL_ECORE_EVAS_BUILD = @EFL_ECORE_EVAS_BUILD@
170EFL_ECORE_FILE_BUILD = @EFL_ECORE_FILE_BUILD@
171EFL_ECORE_IMF_BUILD = @EFL_ECORE_IMF_BUILD@
172EFL_ECORE_IMF_EVAS_BUILD = @EFL_ECORE_IMF_EVAS_BUILD@
173EFL_ECORE_INPUT_BUILD = @EFL_ECORE_INPUT_BUILD@
174EFL_ECORE_INPUT_EVAS_BUILD = @EFL_ECORE_INPUT_EVAS_BUILD@
175EFL_ECORE_IPC_BUILD = @EFL_ECORE_IPC_BUILD@
176EFL_ECORE_PSL1GHT_BUILD = @EFL_ECORE_PSL1GHT_BUILD@
177EFL_ECORE_SDL_BUILD = @EFL_ECORE_SDL_BUILD@
178EFL_ECORE_WIN32_BUILD = @EFL_ECORE_WIN32_BUILD@
179EFL_ECORE_WINCE_BUILD = @EFL_ECORE_WINCE_BUILD@
180EFL_PTHREAD_CFLAGS = @EFL_PTHREAD_CFLAGS@
181EFL_PTHREAD_LIBS = @EFL_PTHREAD_LIBS@
182EGREP = @EGREP@
183EINA_CFLAGS = @EINA_CFLAGS@
184EINA_LIBS = @EINA_LIBS@
185ESCAPE_CFLAGS = @ESCAPE_CFLAGS@
186ESCAPE_LIBS = @ESCAPE_LIBS@
187EVAS_CFLAGS = @EVAS_CFLAGS@
188EVAS_LIBS = @EVAS_LIBS@
189EVIL_CFLAGS = @EVIL_CFLAGS@
190EVIL_LIBS = @EVIL_LIBS@
191EXEEXT = @EXEEXT@
192FGREP = @FGREP@
193GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
194GLIB_CFLAGS = @GLIB_CFLAGS@
195GLIB_LIBS = @GLIB_LIBS@
196GMSGFMT = @GMSGFMT@
197GMSGFMT_015 = @GMSGFMT_015@
198GREP = @GREP@
199INSTALL = @INSTALL@
200INSTALL_DATA = @INSTALL_DATA@
201INSTALL_PROGRAM = @INSTALL_PROGRAM@
202INSTALL_SCRIPT = @INSTALL_SCRIPT@
203INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
204INTLLIBS = @INTLLIBS@
205INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
206KEYSYMDEFS = @KEYSYMDEFS@
207LD = @LD@
208LDFLAGS = @LDFLAGS@
209LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
210LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
211LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@
212LIBICONV = @LIBICONV@
213LIBINTL = @LIBINTL@
214LIBOBJS = @LIBOBJS@
215LIBS = @LIBS@
216LIBTOOL = @LIBTOOL@
217LIPO = @LIPO@
218LN_S = @LN_S@
219LTLIBICONV = @LTLIBICONV@
220LTLIBINTL = @LTLIBINTL@
221LTLIBOBJS = @LTLIBOBJS@
222MAKEINFO = @MAKEINFO@
223MKDIR_P = @MKDIR_P@
224MSGFMT = @MSGFMT@
225MSGFMT_015 = @MSGFMT_015@
226MSGMERGE = @MSGMERGE@
227NM = @NM@
228NMEDIT = @NMEDIT@
229OBJC = @OBJC@
230OBJCDEPMODE = @OBJCDEPMODE@
231OBJCFLAGS = @OBJCFLAGS@
232OBJDUMP = @OBJDUMP@
233OBJEXT = @OBJEXT@
234OTOOL = @OTOOL@
235OTOOL64 = @OTOOL64@
236PACKAGE = @PACKAGE@
237PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
238PACKAGE_NAME = @PACKAGE_NAME@
239PACKAGE_STRING = @PACKAGE_STRING@
240PACKAGE_TARNAME = @PACKAGE_TARNAME@
241PACKAGE_URL = @PACKAGE_URL@
242PACKAGE_VERSION = @PACKAGE_VERSION@
243PATH_SEPARATOR = @PATH_SEPARATOR@
244PIXMAN_CFLAGS = @PIXMAN_CFLAGS@
245PIXMAN_LIBS = @PIXMAN_LIBS@
246PKG_CONFIG = @PKG_CONFIG@
247PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
248PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
249POSUB = @POSUB@
250RANLIB = @RANLIB@
251SDL_CFLAGS = @SDL_CFLAGS@
252SDL_CONFIG = @SDL_CONFIG@
253SDL_LIBS = @SDL_LIBS@
254SED = @SED@
255SET_MAKE = @SET_MAKE@
256SHELL = @SHELL@
257SSL_CFLAGS = @SSL_CFLAGS@
258SSL_LIBS = @SSL_LIBS@
259STRIP = @STRIP@
260TLS2_CFLAGS = @TLS2_CFLAGS@
261TLS2_LIBS = @TLS2_LIBS@
262TLS_CFLAGS = @TLS_CFLAGS@
263TLS_LIBS = @TLS_LIBS@
264TSLIB_CFLAGS = @TSLIB_CFLAGS@
265TSLIB_LIBS = @TSLIB_LIBS@
266USE_NLS = @USE_NLS@
267VERSION = @VERSION@
268VMAJ = @VMAJ@
269WIN32_CFLAGS = @WIN32_CFLAGS@
270WIN32_CPPFLAGS = @WIN32_CPPFLAGS@
271WIN32_LIBS = @WIN32_LIBS@
272XCB_COMPOSITE_CFLAGS = @XCB_COMPOSITE_CFLAGS@
273XCB_COMPOSITE_LIBS = @XCB_COMPOSITE_LIBS@
274XCB_CURSOR_CFLAGS = @XCB_CURSOR_CFLAGS@
275XCB_CURSOR_LIBS = @XCB_CURSOR_LIBS@
276XCB_DAMAGE_CFLAGS = @XCB_DAMAGE_CFLAGS@
277XCB_DAMAGE_LIBS = @XCB_DAMAGE_LIBS@
278XCB_DPMS_CFLAGS = @XCB_DPMS_CFLAGS@
279XCB_DPMS_LIBS = @XCB_DPMS_LIBS@
280XCB_RANDR_CFLAGS = @XCB_RANDR_CFLAGS@
281XCB_RANDR_LIBS = @XCB_RANDR_LIBS@
282XCB_RENDER_CFLAGS = @XCB_RENDER_CFLAGS@
283XCB_RENDER_LIBS = @XCB_RENDER_LIBS@
284XCB_SCREENSAVER_CFLAGS = @XCB_SCREENSAVER_CFLAGS@
285XCB_SCREENSAVER_LIBS = @XCB_SCREENSAVER_LIBS@
286XCB_SHAPE_CFLAGS = @XCB_SHAPE_CFLAGS@
287XCB_SHAPE_LIBS = @XCB_SHAPE_LIBS@
288XCB_SYNC_CFLAGS = @XCB_SYNC_CFLAGS@
289XCB_SYNC_LIBS = @XCB_SYNC_LIBS@
290XCB_X11_CFLAGS = @XCB_X11_CFLAGS@
291XCB_X11_LIBS = @XCB_X11_LIBS@
292XCB_XFIXES_CFLAGS = @XCB_XFIXES_CFLAGS@
293XCB_XFIXES_LIBS = @XCB_XFIXES_LIBS@
294XCB_XGESTURE_CFLAGS = @XCB_XGESTURE_CFLAGS@
295XCB_XGESTURE_LIBS = @XCB_XGESTURE_LIBS@
296XCB_XINERAMA_CFLAGS = @XCB_XINERAMA_CFLAGS@
297XCB_XINERAMA_LIBS = @XCB_XINERAMA_LIBS@
298XCB_XINPUT_CFLAGS = @XCB_XINPUT_CFLAGS@
299XCB_XINPUT_LIBS = @XCB_XINPUT_LIBS@
300XCB_XPRINT_CFLAGS = @XCB_XPRINT_CFLAGS@
301XCB_XPRINT_LIBS = @XCB_XPRINT_LIBS@
302XCB_XTEST_CFLAGS = @XCB_XTEST_CFLAGS@
303XCB_XTEST_LIBS = @XCB_XTEST_LIBS@
304XCOMPOSITE_CFLAGS = @XCOMPOSITE_CFLAGS@
305XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@
306XDAMAGE_CFLAGS = @XDAMAGE_CFLAGS@
307XDAMAGE_LIBS = @XDAMAGE_LIBS@
308XDPMS_CFLAGS = @XDPMS_CFLAGS@
309XDPMS_LIBS = @XDPMS_LIBS@
310XFIXES_CFLAGS = @XFIXES_CFLAGS@
311XFIXES_LIBS = @XFIXES_LIBS@
312XGESTURE_CFLAGS = @XGESTURE_CFLAGS@
313XGESTURE_LIBS = @XGESTURE_LIBS@
314XGETTEXT = @XGETTEXT@
315XGETTEXT_015 = @XGETTEXT_015@
316XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
317XI2_CFLAGS = @XI2_CFLAGS@
318XI2_LIBS = @XI2_LIBS@
319XINERAMA_CFLAGS = @XINERAMA_CFLAGS@
320XINERAMA_LIBS = @XINERAMA_LIBS@
321XKB_CFLAGS = @XKB_CFLAGS@
322XKB_LIBS = @XKB_LIBS@
323XMKMF = @XMKMF@
324XPRINT_CFLAGS = @XPRINT_CFLAGS@
325XPRINT_LIBS = @XPRINT_LIBS@
326XRANDR_CFLAGS = @XRANDR_CFLAGS@
327XRANDR_LIBS = @XRANDR_LIBS@
328XRENDER_CFLAGS = @XRENDER_CFLAGS@
329XRENDER_LIBS = @XRENDER_LIBS@
330XSS_CFLAGS = @XSS_CFLAGS@
331XSS_LIBS = @XSS_LIBS@
332XTEST_CFLAGS = @XTEST_CFLAGS@
333XTEST_LIBS = @XTEST_LIBS@
334X_CFLAGS = @X_CFLAGS@
335X_EXTRA_LIBS = @X_EXTRA_LIBS@
336X_LIBS = @X_LIBS@
337X_PRE_LIBS = @X_PRE_LIBS@
338Xcursor_cflags = @Xcursor_cflags@
339Xcursor_libs = @Xcursor_libs@
340abs_builddir = @abs_builddir@
341abs_srcdir = @abs_srcdir@
342abs_top_builddir = @abs_top_builddir@
343abs_top_srcdir = @abs_top_srcdir@
344ac_ct_CC = @ac_ct_CC@
345ac_ct_CXX = @ac_ct_CXX@
346ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
347ac_ct_OBJC = @ac_ct_OBJC@
348am__include = @am__include@
349am__leading_dot = @am__leading_dot@
350am__quote = @am__quote@
351am__tar = @am__tar@
352am__untar = @am__untar@
353bindir = @bindir@
354build = @build@
355build_alias = @build_alias@
356build_cpu = @build_cpu@
357build_os = @build_os@
358build_vendor = @build_vendor@
359builddir = @builddir@
360cocoa_ldflags = @cocoa_ldflags@
361datadir = @datadir@
362datarootdir = @datarootdir@
363dlopen_libs = @dlopen_libs@
364docdir = @docdir@
365dvidir = @dvidir@
366ecore_cocoa_cflags = @ecore_cocoa_cflags@
367ecore_cocoa_libs = @ecore_cocoa_libs@
368ecore_con_cflags = @ecore_con_cflags@
369ecore_con_libs = @ecore_con_libs@
370ecore_directfb_cflags = @ecore_directfb_cflags@
371ecore_directfb_libs = @ecore_directfb_libs@
372ecore_evas_cflags = @ecore_evas_cflags@
373ecore_evas_libs = @ecore_evas_libs@
374ecore_fb_cflags = @ecore_fb_cflags@
375ecore_fb_libs = @ecore_fb_libs@
376ecore_file_cflags = @ecore_file_cflags@
377ecore_file_libs = @ecore_file_libs@
378ecore_imf_cflags = @ecore_imf_cflags@
379ecore_imf_evas_cflags = @ecore_imf_evas_cflags@
380ecore_imf_evas_libs = @ecore_imf_evas_libs@
381ecore_imf_libs = @ecore_imf_libs@
382ecore_imf_xim_cflags = @ecore_imf_xim_cflags@
383ecore_imf_xim_libs = @ecore_imf_xim_libs@
384ecore_input_cflags = @ecore_input_cflags@
385ecore_input_evas_cflags = @ecore_input_evas_cflags@
386ecore_input_evas_libs = @ecore_input_evas_libs@
387ecore_input_libs = @ecore_input_libs@
388ecore_ipc_cflags = @ecore_ipc_cflags@
389ecore_ipc_libs = @ecore_ipc_libs@
390ecore_psl1ght_cflags = @ecore_psl1ght_cflags@
391ecore_psl1ght_libs = @ecore_psl1ght_libs@
392ecore_sdl_cflags = @ecore_sdl_cflags@
393ecore_sdl_libs = @ecore_sdl_libs@
394ecore_win32_cflags = @ecore_win32_cflags@
395ecore_win32_libs = @ecore_win32_libs@
396ecore_wince_cflags = @ecore_wince_cflags@
397ecore_wince_libs = @ecore_wince_libs@
398ecore_x_cflags = @ecore_x_cflags@
399ecore_x_libs = @ecore_x_libs@
400ecore_x_libs_private = @ecore_x_libs_private@
401efl_doxygen = @efl_doxygen@
402efl_have_doxygen = @efl_have_doxygen@
403exec_prefix = @exec_prefix@
404have_ecore_x_xcb_define = @have_ecore_x_xcb_define@
405host = @host@
406host_alias = @host_alias@
407host_cpu = @host_cpu@
408host_os = @host_os@
409host_vendor = @host_vendor@
410htmldir = @htmldir@
411includedir = @includedir@
412infodir = @infodir@
413install_sh = @install_sh@
414libdir = @libdir@
415libexecdir = @libexecdir@
416localedir = @localedir@
417localstatedir = @localstatedir@
418lt_ECHO = @lt_ECHO@
419lt_enable_auto_import = @lt_enable_auto_import@
420mandir = @mandir@
421mkdir_p = @mkdir_p@
422oldincludedir = @oldincludedir@
423pdfdir = @pdfdir@
424pkgconfig_requires_private = @pkgconfig_requires_private@
425prefix = @prefix@
426program_transform_name = @program_transform_name@
427psdir = @psdir@
428release_info = @release_info@
429requirements_ecore = @requirements_ecore@
430requirements_ecore_cocoa = @requirements_ecore_cocoa@
431requirements_ecore_con = @requirements_ecore_con@
432requirements_ecore_directfb = @requirements_ecore_directfb@
433requirements_ecore_evas = @requirements_ecore_evas@
434requirements_ecore_fb = @requirements_ecore_fb@
435requirements_ecore_file = @requirements_ecore_file@
436requirements_ecore_imf = @requirements_ecore_imf@
437requirements_ecore_imf_evas = @requirements_ecore_imf_evas@
438requirements_ecore_imf_xim = @requirements_ecore_imf_xim@
439requirements_ecore_input = @requirements_ecore_input@
440requirements_ecore_input_evas = @requirements_ecore_input_evas@
441requirements_ecore_ipc = @requirements_ecore_ipc@
442requirements_ecore_psl1ght = @requirements_ecore_psl1ght@
443requirements_ecore_sdl = @requirements_ecore_sdl@
444requirements_ecore_win32 = @requirements_ecore_win32@
445requirements_ecore_wince = @requirements_ecore_wince@
446requirements_ecore_x = @requirements_ecore_x@
447rt_libs = @rt_libs@
448sbindir = @sbindir@
449sharedstatedir = @sharedstatedir@
450srcdir = @srcdir@
451sysconfdir = @sysconfdir@
452target_alias = @target_alias@
453top_build_prefix = @top_build_prefix@
454top_builddir = @top_builddir@
455top_srcdir = @top_srcdir@
456version_info = @version_info@
457x_cflags = @x_cflags@
458x_includes = @x_includes@
459x_libs = @x_libs@
460MAINTAINERCLEANFILES = Makefile.in
461AM_CPPFLAGS = \
462-I$(top_srcdir) \
463-I$(top_srcdir)/src/lib/ecore \
464-I$(top_srcdir)/src/lib/ecore_input \
465-I$(top_srcdir)/src/lib/ecore_x \
466-I$(top_srcdir)/src/lib/ecore_imf \
467-I$(top_builddir)/src/lib/ecore \
468-I$(top_builddir)/src/lib/ecore_input \
469-I$(top_builddir)/src/lib/ecore_x \
470-I$(top_builddir)/src/lib/ecore_imf \
471-DPACKAGE_LIB_DIR=\"$(libdir)\" \
472-DPACKAGE_DATA_DIR=\"$(datadir)/$(PACKAGE)\" \
473@x_cflags@ \
474@EINA_CFLAGS@
475
476pkgdir = $(libdir)/ecore/immodules
477pkg_LTLIBRARIES = xim.la
478xim_la_SOURCES = \
479ecore_imf_xim.c
480
481xim_la_LIBADD = \
482 $(top_builddir)/src/lib/ecore_imf/libecore_imf.la \
483 $(top_builddir)/src/lib/ecore_x/libecore_x.la \
484 @x_libs@ \
485 @EINA_LIBS@
486
487xim_la_LDFLAGS = -no-undefined @lt_enable_auto_import@ -module -avoid-version
488xim_la_LIBTOOLFLAGS = --tag=disable-static
489all: all-am
490
491.SUFFIXES:
492.SUFFIXES: .c .lo .o .obj
493$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
494 @for dep in $?; do \
495 case '$(am__configure_deps)' in \
496 *$$dep*) \
497 ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
498 && { if test -f $@; then exit 0; else break; fi; }; \
499 exit 1;; \
500 esac; \
501 done; \
502 echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/modules/immodules/xim/Makefile'; \
503 $(am__cd) $(top_srcdir) && \
504 $(AUTOMAKE) --gnu src/modules/immodules/xim/Makefile
505.PRECIOUS: Makefile
506Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
507 @case '$?' in \
508 *config.status*) \
509 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
510 *) \
511 echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
512 cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
513 esac;
514
515$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
516 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
517
518$(top_srcdir)/configure: $(am__configure_deps)
519 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
520$(ACLOCAL_M4): $(am__aclocal_m4_deps)
521 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
522$(am__aclocal_m4_deps):
523install-pkgLTLIBRARIES: $(pkg_LTLIBRARIES)
524 @$(NORMAL_INSTALL)
525 test -z "$(pkgdir)" || $(MKDIR_P) "$(DESTDIR)$(pkgdir)"
526 @list='$(pkg_LTLIBRARIES)'; test -n "$(pkgdir)" || list=; \
527 list2=; for p in $$list; do \
528 if test -f $$p; then \
529 list2="$$list2 $$p"; \
530 else :; fi; \
531 done; \
532 test -z "$$list2" || { \
533 echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pkgdir)'"; \
534 $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pkgdir)"; \
535 }
536
537uninstall-pkgLTLIBRARIES:
538 @$(NORMAL_UNINSTALL)
539 @list='$(pkg_LTLIBRARIES)'; test -n "$(pkgdir)" || list=; \
540 for p in $$list; do \
541 $(am__strip_dir) \
542 echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pkgdir)/$$f'"; \
543 $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pkgdir)/$$f"; \
544 done
545
546clean-pkgLTLIBRARIES:
547 -test -z "$(pkg_LTLIBRARIES)" || rm -f $(pkg_LTLIBRARIES)
548 @list='$(pkg_LTLIBRARIES)'; for p in $$list; do \
549 dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
550 test "$$dir" != "$$p" || dir=.; \
551 echo "rm -f \"$${dir}/so_locations\""; \
552 rm -f "$${dir}/so_locations"; \
553 done
554xim.la: $(xim_la_OBJECTS) $(xim_la_DEPENDENCIES)
555 $(AM_V_CCLD)$(xim_la_LINK) -rpath $(pkgdir) $(xim_la_OBJECTS) $(xim_la_LIBADD) $(LIBS)
556
557mostlyclean-compile:
558 -rm -f *.$(OBJEXT)
559
560distclean-compile:
561 -rm -f *.tab.c
562
563@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xim_la-ecore_imf_xim.Plo@am__quote@
564
565.c.o:
566@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
567@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
568@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
569@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
570@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
571@am__fastdepCC_FALSE@ $(COMPILE) -c $<
572
573.c.obj:
574@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
575@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
576@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
577@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
578@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
579@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
580
581.c.lo:
582@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
583@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
584@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
585@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
586@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
587@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
588
589xim_la-ecore_imf_xim.lo: ecore_imf_xim.c
590@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(xim_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT xim_la-ecore_imf_xim.lo -MD -MP -MF $(DEPDIR)/xim_la-ecore_imf_xim.Tpo -c -o xim_la-ecore_imf_xim.lo `test -f 'ecore_imf_xim.c' || echo '$(srcdir)/'`ecore_imf_xim.c
591@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/xim_la-ecore_imf_xim.Tpo $(DEPDIR)/xim_la-ecore_imf_xim.Plo
592@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
593@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ecore_imf_xim.c' object='xim_la-ecore_imf_xim.lo' libtool=yes @AMDEPBACKSLASH@
594@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
595@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(xim_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o xim_la-ecore_imf_xim.lo `test -f 'ecore_imf_xim.c' || echo '$(srcdir)/'`ecore_imf_xim.c
596
597mostlyclean-libtool:
598 -rm -f *.lo
599
600clean-libtool:
601 -rm -rf .libs _libs
602
603ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
604 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
605 unique=`for i in $$list; do \
606 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
607 done | \
608 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
609 END { if (nonempty) { for (i in files) print i; }; }'`; \
610 mkid -fID $$unique
611tags: TAGS
612
613TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
614 $(TAGS_FILES) $(LISP)
615 set x; \
616 here=`pwd`; \
617 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
618 unique=`for i in $$list; do \
619 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
620 done | \
621 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
622 END { if (nonempty) { for (i in files) print i; }; }'`; \
623 shift; \
624 if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
625 test -n "$$unique" || unique=$$empty_fix; \
626 if test $$# -gt 0; then \
627 $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
628 "$$@" $$unique; \
629 else \
630 $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
631 $$unique; \
632 fi; \
633 fi
634ctags: CTAGS
635CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
636 $(TAGS_FILES) $(LISP)
637 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
638 unique=`for i in $$list; do \
639 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
640 done | \
641 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
642 END { if (nonempty) { for (i in files) print i; }; }'`; \
643 test -z "$(CTAGS_ARGS)$$unique" \
644 || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
645 $$unique
646
647GTAGS:
648 here=`$(am__cd) $(top_builddir) && pwd` \
649 && $(am__cd) $(top_srcdir) \
650 && gtags -i $(GTAGS_ARGS) "$$here"
651
652distclean-tags:
653 -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
654
655distdir: $(DISTFILES)
656 @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
657 topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
658 list='$(DISTFILES)'; \
659 dist_files=`for file in $$list; do echo $$file; done | \
660 sed -e "s|^$$srcdirstrip/||;t" \
661 -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
662 case $$dist_files in \
663 */*) $(MKDIR_P) `echo "$$dist_files" | \
664 sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
665 sort -u` ;; \
666 esac; \
667 for file in $$dist_files; do \
668 if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
669 if test -d $$d/$$file; then \
670 dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
671 if test -d "$(distdir)/$$file"; then \
672 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
673 fi; \
674 if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
675 cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
676 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
677 fi; \
678 cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
679 else \
680 test -f "$(distdir)/$$file" \
681 || cp -p $$d/$$file "$(distdir)/$$file" \
682 || exit 1; \
683 fi; \
684 done
685check-am: all-am
686check: check-am
687all-am: Makefile $(LTLIBRARIES)
688installdirs:
689 for dir in "$(DESTDIR)$(pkgdir)"; do \
690 test -z "$$dir" || $(MKDIR_P) "$$dir"; \
691 done
692install: install-am
693install-exec: install-exec-am
694install-data: install-data-am
695uninstall: uninstall-am
696
697install-am: all-am
698 @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
699
700installcheck: installcheck-am
701install-strip:
702 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
703 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
704 `test -z '$(STRIP)' || \
705 echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
706mostlyclean-generic:
707
708clean-generic:
709
710distclean-generic:
711 -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
712 -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
713
714maintainer-clean-generic:
715 @echo "This command is intended for maintainers to use"
716 @echo "it deletes files that may require special tools to rebuild."
717 -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
718clean: clean-am
719
720clean-am: clean-generic clean-libtool clean-pkgLTLIBRARIES \
721 mostlyclean-am
722
723distclean: distclean-am
724 -rm -rf ./$(DEPDIR)
725 -rm -f Makefile
726distclean-am: clean-am distclean-compile distclean-generic \
727 distclean-tags
728
729dvi: dvi-am
730
731dvi-am:
732
733html: html-am
734
735html-am:
736
737info: info-am
738
739info-am:
740
741install-data-am: install-pkgLTLIBRARIES
742
743install-dvi: install-dvi-am
744
745install-dvi-am:
746
747install-exec-am:
748
749install-html: install-html-am
750
751install-html-am:
752
753install-info: install-info-am
754
755install-info-am:
756
757install-man:
758
759install-pdf: install-pdf-am
760
761install-pdf-am:
762
763install-ps: install-ps-am
764
765install-ps-am:
766
767installcheck-am:
768
769maintainer-clean: maintainer-clean-am
770 -rm -rf ./$(DEPDIR)
771 -rm -f Makefile
772maintainer-clean-am: distclean-am maintainer-clean-generic
773
774mostlyclean: mostlyclean-am
775
776mostlyclean-am: mostlyclean-compile mostlyclean-generic \
777 mostlyclean-libtool
778
779pdf: pdf-am
780
781pdf-am:
782
783ps: ps-am
784
785ps-am:
786
787uninstall-am: uninstall-pkgLTLIBRARIES
788
789.MAKE: install-am install-strip
790
791.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
792 clean-libtool clean-pkgLTLIBRARIES ctags distclean \
793 distclean-compile distclean-generic distclean-libtool \
794 distclean-tags distdir dvi dvi-am html html-am info info-am \
795 install install-am install-data install-data-am install-dvi \
796 install-dvi-am install-exec install-exec-am install-html \
797 install-html-am install-info install-info-am install-man \
798 install-pdf install-pdf-am install-pkgLTLIBRARIES install-ps \
799 install-ps-am install-strip installcheck installcheck-am \
800 installdirs maintainer-clean maintainer-clean-generic \
801 mostlyclean mostlyclean-compile mostlyclean-generic \
802 mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \
803 uninstall-am uninstall-pkgLTLIBRARIES
804
805
806# Tell versions [3.59,3.63) of GNU make to not export all variables.
807# Otherwise a system limit (for SysV at least) may be exceeded.
808.NOEXPORT:
diff --git a/libraries/ecore/src/modules/immodules/xim/ecore_imf_xim.c b/libraries/ecore/src/modules/immodules/xim/ecore_imf_xim.c
new file mode 100644
index 0000000..7c40606
--- /dev/null
+++ b/libraries/ecore/src/modules/immodules/xim/ecore_imf_xim.c
@@ -0,0 +1,1273 @@
1#include <Eina.h>
2#include <Ecore.h>
3#include <Ecore_Input.h>
4#include <Ecore_IMF.h>
5#include <Ecore_X.h>
6#include <X11/Xlib.h>
7#include <X11/Xlocale.h>
8#include <X11/Xutil.h>
9#include <X11/keysym.h>
10#include <stdio.h>
11#include <stdlib.h>
12#include <string.h>
13#include <langinfo.h>
14#include <assert.h>
15#ifdef HAVE_CONFIG_H
16# include <config.h>
17#endif
18
19#define CLAMP(x, low, high) (x > high) ? high : (x < low) ? low : x
20#define _(x) x
21
22#ifdef ENABLE_XIM
23static Eina_List *open_ims = NULL;
24#endif
25
26typedef struct _XIM_Im_Info XIM_Im_Info;
27struct _XIM_Im_Info
28{
29 Ecore_X_Window win;
30 char *locale;
31 XIM im;
32 Eina_List *ics;
33 Eina_Bool reconnecting;
34 XIMStyles *xim_styles;
35 Eina_Bool supports_string_conversion : 1;
36 Eina_Bool supports_cursor : 1;
37};
38
39typedef struct _Ecore_IMF_Context_Data Ecore_IMF_Context_Data;
40struct _Ecore_IMF_Context_Data
41{
42 Ecore_X_Window win;
43 long mask;
44 XIC ic; /* Input context for composed characters */
45 char *locale;
46 XIM_Im_Info *im_info;
47 int preedit_length;
48 int preedit_cursor;
49 Eina_Unicode *preedit_chars;
50 Eina_Bool use_preedit;
51 Eina_Bool finalizing;
52 Eina_Bool has_focus;
53 Eina_Bool in_toplevel;
54
55 XIMCallback preedit_start_cb;
56 XIMCallback preedit_done_cb;
57 XIMCallback preedit_draw_cb;
58 XIMCallback preedit_caret_cb;
59};
60
61/* prototype */
62Ecore_IMF_Context_Data *imf_context_data_new();
63void imf_context_data_destroy(Ecore_IMF_Context_Data *imf_context_data);
64
65#ifdef ENABLE_XIM
66static void reinitialize_ic(Ecore_IMF_Context *ctx);
67static void reinitialize_all_ics(XIM_Im_Info *info);
68static void set_ic_client_window(Ecore_IMF_Context *ctx,
69 Ecore_X_Window window);
70static int preedit_start_callback(XIC xic,
71 XPointer client_data,
72 XPointer call_data);
73static void preedit_done_callback(XIC xic,
74 XPointer client_data,
75 XPointer call_data);
76static int xim_text_to_utf8(Ecore_IMF_Context *ctx,
77 XIMText *xim_text,
78 char **text);
79static void preedit_draw_callback(XIC xic,
80 XPointer client_data,
81 XIMPreeditDrawCallbackStruct *call_data);
82static void preedit_caret_callback(XIC xic,
83 XPointer client_data,
84 XIMPreeditCaretCallbackStruct *call_data);
85static XVaNestedList preedit_callback_set(Ecore_IMF_Context *ctx);
86static XIC get_ic(Ecore_IMF_Context *ctx);
87static XIM_Im_Info *get_im(Ecore_X_Window window,
88 char *locale);
89static void xim_info_try_im(XIM_Im_Info *info);
90static void xim_info_display_closed(Ecore_X_Display *display,
91 int is_error,
92 XIM_Im_Info *info);
93static void xim_instantiate_callback(Display *display,
94 XPointer client_data,
95 XPointer call_data);
96static void setup_im(XIM_Im_Info *info);
97static void xim_destroy_callback(XIM xim,
98 XPointer client_data,
99 XPointer call_data);
100#endif
101
102static void
103_ecore_imf_context_xim_add(Ecore_IMF_Context *ctx)
104{
105 EINA_LOG_DBG("in");
106#ifdef ENABLE_XIM
107 Ecore_IMF_Context_Data *imf_context_data = NULL;
108
109 imf_context_data = imf_context_data_new();
110 if(!imf_context_data) return;
111
112 imf_context_data->use_preedit = EINA_TRUE;
113 imf_context_data->finalizing = EINA_FALSE;
114 imf_context_data->has_focus = EINA_FALSE;
115 imf_context_data->in_toplevel = EINA_FALSE;
116
117 ecore_imf_context_data_set(ctx, imf_context_data);
118#endif
119}
120
121static void
122_ecore_imf_context_xim_del(Ecore_IMF_Context *ctx)
123{
124 EINA_LOG_DBG("in");
125#ifdef ENABLE_XIM
126 Ecore_IMF_Context_Data *imf_context_data;
127 imf_context_data = ecore_imf_context_data_get(ctx);
128
129 imf_context_data->finalizing = EINA_TRUE;
130 if(imf_context_data->im_info && !imf_context_data->im_info->ics->next)
131 {
132 if(imf_context_data->im_info->reconnecting == EINA_TRUE)
133 {
134 Ecore_X_Display *dsp;
135 dsp = ecore_x_display_get();
136 XUnregisterIMInstantiateCallback (dsp,
137 NULL, NULL, NULL,
138 xim_instantiate_callback,
139 (XPointer)imf_context_data->im_info);
140 }
141 else if(imf_context_data->im_info->im)
142 {
143 XIMCallback im_destroy_callback;
144 im_destroy_callback.client_data = NULL;
145 im_destroy_callback.callback = NULL;
146 XSetIMValues (imf_context_data->im_info->im,
147 XNDestroyCallback, &im_destroy_callback,
148 NULL);
149 }
150 }
151
152 set_ic_client_window(ctx, 0);
153
154 imf_context_data_destroy(imf_context_data);
155#endif
156}
157
158static void
159_ecore_imf_context_xim_client_window_set(Ecore_IMF_Context *ctx,
160 void *window)
161{
162 EINA_LOG_DBG("in");
163#ifdef ENABLE_XIM
164 set_ic_client_window(ctx, (Ecore_X_Window)((Ecore_Window)window));
165#endif
166}
167
168static void
169_ecore_imf_context_xim_preedit_string_get(Ecore_IMF_Context *ctx,
170 char **str,
171 int *cursor_pos)
172{
173 EINA_LOG_DBG("in");
174#ifdef ENABLE_XIM
175 Ecore_IMF_Context_Data *imf_context_data;
176 char *utf8;
177 int len;
178 imf_context_data = ecore_imf_context_data_get(ctx);
179 if (imf_context_data->preedit_chars)
180 {
181 utf8 = eina_unicode_unicode_to_utf8(imf_context_data->preedit_chars,
182 &len);
183 if(str)
184 *str = utf8;
185 else
186 free(utf8);
187 }
188 else
189 {
190 if(str)
191 *str = NULL;
192 if(cursor_pos)
193 *cursor_pos = 0;
194 }
195
196 if(cursor_pos)
197 *cursor_pos = imf_context_data->preedit_cursor;
198#else
199 if(str)
200 *str = NULL;
201 if(cursor_pos)
202 *cursor_pos = 0;
203#endif
204}
205
206static void
207_ecore_imf_context_xim_focus_in(Ecore_IMF_Context *ctx)
208{
209 EINA_LOG_DBG("in");
210#ifdef ENABLE_XIM
211 XIC ic;
212 Ecore_IMF_Context_Data *imf_context_data;
213 imf_context_data = ecore_imf_context_data_get(ctx);
214 ic = imf_context_data->ic;
215 imf_context_data->has_focus = EINA_TRUE;
216 if(ic)
217 {
218 char *str;
219
220#ifdef X_HAVE_UTF8_STRING
221 if ((str = Xutf8ResetIC(ic)))
222#else
223 if ((str = XmbResetIC(ic)))
224#endif
225 XFree(str);
226
227 XSetICFocus(ic);
228 }
229#endif
230}
231
232static void
233_ecore_imf_context_xim_focus_out(Ecore_IMF_Context *ctx)
234{
235 EINA_LOG_DBG("%s in", __FUNCTION__);
236#ifdef ENABLE_XIM
237 XIC ic;
238 Ecore_IMF_Context_Data *imf_context_data;
239 imf_context_data = ecore_imf_context_data_get(ctx);
240 if(imf_context_data->has_focus == EINA_TRUE)
241 {
242 imf_context_data->has_focus = EINA_FALSE;
243 ic = imf_context_data->ic;
244 if(ic)
245 XUnsetICFocus(ic);
246 }
247#endif
248}
249
250static void
251_ecore_imf_context_xim_reset(Ecore_IMF_Context *ctx)
252{
253 EINA_LOG_DBG("%s in", __FUNCTION__);
254#ifdef ENABLE_XIM
255 XIC ic;
256 Ecore_IMF_Context_Data *imf_context_data;
257 char *result;
258
259 /* restore conversion state after resetting ic later */
260 XIMPreeditState preedit_state = XIMPreeditUnKnown;
261 XVaNestedList preedit_attr;
262 Eina_Bool have_preedit_state = EINA_FALSE;
263
264 imf_context_data = ecore_imf_context_data_get(ctx);
265 ic = imf_context_data->ic;
266 if(!ic)
267 return;
268
269 if(imf_context_data->preedit_length == 0)
270 return;
271
272 preedit_attr = XVaCreateNestedList(0,
273 XNPreeditState, &preedit_state,
274 NULL);
275 if(!XGetICValues(ic,
276 XNPreeditAttributes, preedit_attr,
277 NULL))
278 have_preedit_state = EINA_TRUE;
279
280 XFree(preedit_attr);
281
282 result = XmbResetIC(ic);
283
284 preedit_attr = XVaCreateNestedList(0,
285 XNPreeditState, preedit_state,
286 NULL);
287 if(have_preedit_state)
288 XSetICValues(ic,
289 XNPreeditAttributes, preedit_attr,
290 NULL);
291
292 XFree(preedit_attr);
293
294 if(imf_context_data->preedit_length)
295 {
296 imf_context_data->preedit_length = 0;
297 free(imf_context_data->preedit_chars);
298 imf_context_data->preedit_chars = NULL;
299 ecore_imf_context_preedit_changed_event_add(ctx);
300 }
301
302 if(result)
303 {
304 char *result_utf8 = strdup(result);
305 if(result_utf8)
306 {
307 ecore_imf_context_commit_event_add(ctx, result_utf8);
308 free(result_utf8);
309 }
310 }
311
312 XFree (result);
313#endif
314}
315
316static void
317_ecore_imf_context_xim_use_preedit_set(Ecore_IMF_Context *ctx,
318 Eina_Bool use_preedit)
319{
320 EINA_LOG_DBG("in");
321#ifdef ENABLE_XIM
322 Ecore_IMF_Context_Data *imf_context_data;
323 imf_context_data = ecore_imf_context_data_get(ctx);
324
325 use_preedit = use_preedit != EINA_FALSE;
326
327 if(imf_context_data->use_preedit != use_preedit)
328 {
329 imf_context_data->use_preedit = use_preedit;
330 reinitialize_ic(ctx);
331 }
332#endif
333}
334
335static void
336_ecore_imf_context_xim_cursor_location_set (Ecore_IMF_Context *ctx,
337 int x, int y, int w, int h)
338{
339 EINA_LOG_DBG("%s in", __FUNCTION__);
340
341#ifdef ENABLE_XIM
342 Ecore_IMF_Context_Data *imf_context_data;
343 XIC ic;
344 XVaNestedList preedit_attr;
345 XPoint spot;
346
347 imf_context_data = ecore_imf_context_data_get(ctx);
348 ic = imf_context_data->ic;
349 if (!ic)
350 return;
351
352 spot.x = x;
353 spot.y = y + h;
354
355 preedit_attr = XVaCreateNestedList (0,
356 XNSpotLocation, &spot,
357 NULL);
358 XSetICValues (ic,
359 XNPreeditAttributes, preedit_attr,
360 NULL);
361
362 XFree(preedit_attr);
363#endif
364 (void)(w); // yes w is unused, but only a bi-product of the algorithm
365}
366
367#ifdef ENABLE_XIM
368static unsigned int
369_ecore_x_event_reverse_modifiers(unsigned int state)
370{
371 unsigned int modifiers = 0;
372
373 /**< "Control" is pressed */
374 if(state & ECORE_IMF_KEYBOARD_MODIFIER_CTRL)
375 modifiers |= ControlMask;
376
377 /**< "Alt" is pressed */
378 if(state & ECORE_IMF_KEYBOARD_MODIFIER_ALT)
379 modifiers |= Mod1Mask;
380
381 /**< "Shift" is pressed */
382 if(state & ECORE_IMF_KEYBOARD_MODIFIER_SHIFT)
383 modifiers |= ShiftMask;
384
385 /**< "Win" (between "Ctrl" and "A */
386 if(state & ECORE_IMF_KEYBOARD_MODIFIER_WIN)
387 modifiers |= Mod5Mask;
388
389 return modifiers;
390}
391
392static unsigned int
393_ecore_x_event_reverse_locks(unsigned int state)
394{
395 unsigned int locks = 0;
396
397 /**< "Num" lock is active */
398 if(state & ECORE_IMF_KEYBOARD_LOCK_NUM)
399 locks |= Mod3Mask;
400
401 if(state & ECORE_IMF_KEYBOARD_LOCK_CAPS)
402 locks |= LockMask;
403
404#if 0 /* FIXME: add mask. */
405 if(state & ECORE_IMF_KEYBOARD_LOCK_SCROLL)
406 ;
407#endif
408
409 return locks;
410}
411
412static KeyCode
413_keycode_get(Ecore_X_Display *dsp,
414 const char *keyname)
415{
416 KeyCode keycode;
417
418 // EINA_LOG_DBG("keyname:%s keysym:%lu", keyname, XStringToKeysym(keyname));
419 if(strcmp(keyname, "Keycode-0") == 0)
420 {
421 keycode = 0;
422 }
423 else {
424 keycode = XKeysymToKeycode(dsp, XStringToKeysym(keyname));
425 }
426
427 return keycode;
428}
429
430#endif
431
432static Eina_Bool
433_ecore_imf_context_xim_filter_event(Ecore_IMF_Context *ctx,
434 Ecore_IMF_Event_Type type,
435 Ecore_IMF_Event *event)
436{
437 EINA_LOG_DBG("%s in", __FUNCTION__);
438#ifdef ENABLE_XIM
439 Ecore_IMF_Context_Data *imf_context_data;
440 XIC ic;
441
442 Ecore_X_Display *dsp;
443 Ecore_X_Window win;
444
445 int val;
446 char compose_buffer[256];
447 KeySym sym;
448 char *compose = NULL;
449 char *tmp = NULL;
450 Eina_Bool result = EINA_FALSE;
451
452 imf_context_data = ecore_imf_context_data_get(ctx);
453 ic = imf_context_data->ic;
454 if(!ic)
455 {
456 ic = get_ic(ctx);
457 }
458
459 if(type == ECORE_IMF_EVENT_KEY_DOWN)
460 {
461 XKeyPressedEvent xev;
462 Ecore_IMF_Event_Key_Down *ev = (Ecore_IMF_Event_Key_Down *)event;
463 EINA_LOG_DBG("ECORE_IMF_EVENT_KEY_DOWN");
464
465 dsp = ecore_x_display_get();
466 win = imf_context_data->win;
467
468 xev.type = KeyPress;
469 xev.serial = 0; /* hope it doesn't matter */
470 xev.send_event = 0;
471 xev.display = dsp;
472 xev.window = win;
473 xev.root = ecore_x_window_root_get(win);
474 xev.subwindow = win;
475 xev.time = ev->timestamp;
476 xev.x = xev.x_root = 0;
477 xev.y = xev.y_root = 0;
478 xev.state = 0;
479 xev.state |= _ecore_x_event_reverse_modifiers(ev->modifiers);
480 xev.state |= _ecore_x_event_reverse_locks(ev->locks);
481 xev.keycode = _keycode_get(dsp, ev->keyname);
482 xev.same_screen = True;
483
484 if(ic)
485 {
486 Status mbstatus;
487#ifdef X_HAVE_UTF8_STRING
488 val = Xutf8LookupString(ic,
489 &xev,
490 compose_buffer,
491 sizeof(compose_buffer) - 1,
492 &sym,
493 &mbstatus);
494#else /* ifdef X_HAVE_UTF8_STRING */
495 val = XmbLookupString(ic,
496 &xev,
497 compose_buffer,
498 sizeof(compose_buffer) - 1,
499 &sym,
500 &mbstatus);
501#endif /* ifdef X_HAVE_UTF8_STRING */
502 if (mbstatus == XBufferOverflow)
503 {
504 tmp = malloc(sizeof (char) * (val + 1));
505 if (!tmp)
506 {
507 return EINA_FALSE;
508 }
509
510 compose = tmp;
511
512#ifdef X_HAVE_UTF8_STRING
513 val = Xutf8LookupString(ic,
514 (XKeyEvent *)&xev,
515 tmp,
516 val,
517 &sym,
518 &mbstatus);
519#else /* ifdef X_HAVE_UTF8_STRING */
520 val = XmbLookupString(ic,
521 (XKeyEvent *)&xev,
522 tmp,
523 val,
524 &sym,
525 &mbstatus);
526#endif /* ifdef X_HAVE_UTF8_STRING */
527 if (val > 0)
528 {
529 tmp[val] = '\0';
530#ifndef X_HAVE_UTF8_STRING
531 compose = eina_str_convert(nl_langinfo(CODESET),
532 "UTF-8", tmp);
533 free(tmp);
534 tmp = compose;
535#endif /* ifndef X_HAVE_UTF8_STRING */
536 }
537 else
538 compose = NULL;
539 }
540 else if (val > 0)
541 {
542 compose_buffer[val] = '\0';
543#ifdef X_HAVE_UTF8_STRING
544 compose = strdup(compose_buffer);
545#else /* ifdef X_HAVE_UTF8_STRING */
546 compose = eina_str_convert(nl_langinfo(CODESET), "UTF-8",
547 compose_buffer);
548#endif /* ifdef X_HAVE_UTF8_STRING */
549 }
550 }
551 else {
552 XComposeStatus status;
553 val = XLookupString(&xev,
554 compose_buffer,
555 sizeof(compose_buffer),
556 &sym,
557 &status);
558 if (val > 0)
559 {
560 compose_buffer[val] = '\0';
561 compose = eina_str_convert(nl_langinfo(CODESET),
562 "UTF-8", compose_buffer);
563 }
564 }
565
566 if(compose)
567 {
568 Eina_Unicode *unicode;
569 int len;
570 unicode = eina_unicode_utf8_to_unicode(compose, &len);
571 if(!unicode) abort();
572 if(unicode[0] >= 0x20 && unicode[0] != 0x7f)
573 {
574 ecore_imf_context_commit_event_add(ctx, compose);
575 result = EINA_TRUE;
576 }
577 free(compose);
578 free(unicode);
579 }
580 }
581
582 return result;
583#else
584 return EINA_FALSE;
585#endif
586}
587
588static const Ecore_IMF_Context_Info xim_info = {
589 .id = "xim",
590 .description = _("X input method"),
591 .default_locales = "ko:ja:th:zh",
592 .canvas_type = "evas",
593 .canvas_required = 1,
594};
595
596static Ecore_IMF_Context_Class xim_class = {
597 .add = _ecore_imf_context_xim_add,
598 .del = _ecore_imf_context_xim_del,
599 .client_window_set = _ecore_imf_context_xim_client_window_set,
600 .client_canvas_set = NULL,
601 .show = NULL,
602 .hide = NULL,
603 .preedit_string_get = _ecore_imf_context_xim_preedit_string_get,
604 .focus_in = _ecore_imf_context_xim_focus_in,
605 .focus_out = _ecore_imf_context_xim_focus_out,
606 .reset = _ecore_imf_context_xim_reset,
607 .cursor_position_set = NULL,
608 .use_preedit_set = _ecore_imf_context_xim_use_preedit_set,
609 .input_mode_set = NULL,
610 .filter_event = _ecore_imf_context_xim_filter_event,
611 .preedit_string_with_attributes_get = NULL,
612 .prediction_allow_set = NULL,
613 .autocapital_type_set = NULL,
614 .control_panel_show = NULL,
615 .control_panel_hide = NULL,
616 .input_panel_layout_set = NULL,
617 .input_panel_layout_get = NULL,
618 .input_panel_language_set = NULL,
619 .input_panel_language_get = NULL,
620 .cursor_location_set = _ecore_imf_context_xim_cursor_location_set,
621};
622
623static Ecore_IMF_Context *
624xim_imf_module_create(void)
625{
626 EINA_LOG_DBG("%s in", __FUNCTION__);
627 Ecore_IMF_Context *ctx = NULL;
628
629 ctx = ecore_imf_context_new(&xim_class);
630 if(!ctx)
631 goto error;
632
633 return ctx;
634
635error:
636 free(ctx);
637 return NULL;
638}
639
640static Ecore_IMF_Context *
641xim_imf_module_exit(void)
642{
643 return NULL;
644}
645
646Eina_Bool
647ecore_imf_xim_init(void)
648{
649 EINA_LOG_DBG("%s in", __FUNCTION__);
650 eina_init();
651 ecore_x_init(NULL);
652 ecore_imf_module_register(&xim_info,
653 xim_imf_module_create,
654 xim_imf_module_exit);
655
656 return EINA_TRUE;
657}
658
659void
660ecore_imf_xim_shutdown(void)
661{
662#ifdef ENABLE_XIM
663 while (open_ims) {
664 XIM_Im_Info *info = open_ims->data;
665 Ecore_X_Display *display = ecore_x_display_get();
666
667 xim_info_display_closed(display, EINA_FALSE, info);
668 }
669#endif
670
671 ecore_x_shutdown();
672 eina_shutdown();
673}
674
675EINA_MODULE_INIT(ecore_imf_xim_init);
676EINA_MODULE_SHUTDOWN(ecore_imf_xim_shutdown);
677
678#ifdef ENABLE_XIM
679/*
680 * internal functions
681 */
682Ecore_IMF_Context_Data *
683imf_context_data_new()
684{
685 Ecore_IMF_Context_Data *imf_context_data = NULL;
686 char *locale;
687
688 locale = setlocale(LC_CTYPE, "");
689 if(!locale) return NULL;
690
691 if(!XSupportsLocale()) return NULL;
692
693 imf_context_data = calloc(1, sizeof(Ecore_IMF_Context_Data));
694 if(!imf_context_data) return NULL;
695
696 imf_context_data->locale = strdup(locale);
697 if(!imf_context_data->locale) goto error;
698
699 return imf_context_data;
700error:
701 imf_context_data_destroy(imf_context_data);
702 return NULL;
703}
704
705void
706imf_context_data_destroy(Ecore_IMF_Context_Data *imf_context_data)
707{
708 if(!imf_context_data)
709 return;
710
711 if(imf_context_data->ic)
712 XDestroyIC(imf_context_data->ic);
713
714 free(imf_context_data->preedit_chars);
715 free(imf_context_data->locale);
716 free(imf_context_data);
717}
718
719static int
720preedit_start_callback(XIC xic __UNUSED__,
721 XPointer client_data,
722 XPointer call_data __UNUSED__)
723{
724 EINA_LOG_DBG("in");
725 Ecore_IMF_Context *ctx = (Ecore_IMF_Context *)client_data;
726 Ecore_IMF_Context_Data *imf_context_data;
727 imf_context_data = ecore_imf_context_data_get(ctx);
728
729 if(imf_context_data->finalizing == EINA_FALSE)
730 ecore_imf_context_preedit_start_event_add(ctx);
731
732 return -1;
733}
734
735static void
736preedit_done_callback(XIC xic __UNUSED__,
737 XPointer client_data,
738 XPointer call_data __UNUSED__)
739{
740 EINA_LOG_DBG("in");
741 Ecore_IMF_Context *ctx = (Ecore_IMF_Context *)client_data;
742 Ecore_IMF_Context_Data *imf_context_data;
743 imf_context_data = ecore_imf_context_data_get(ctx);
744
745 if(imf_context_data->preedit_length)
746 {
747 imf_context_data->preedit_length = 0;
748 free(imf_context_data->preedit_chars);
749 imf_context_data->preedit_chars = NULL;
750 ecore_imf_context_preedit_changed_event_add(ctx);
751 }
752
753 if(imf_context_data->finalizing == EINA_FALSE)
754 ecore_imf_context_preedit_end_event_add(ctx);
755}
756
757/* FIXME */
758static int
759xim_text_to_utf8(Ecore_IMF_Context *ctx __UNUSED__,
760 XIMText *xim_text,
761 char **text)
762{
763 int text_length = 0;
764 char *result = NULL;
765
766 if(xim_text && xim_text->string.multi_byte)
767 {
768 if(xim_text->encoding_is_wchar)
769 {
770 EINA_LOG_WARN("Wide character return from Xlib not currently supported");
771 *text = NULL;
772 return 0;
773 }
774
775 /* XXX Convert to UTF-8 */
776 result = strdup(xim_text->string.multi_byte);
777 if(result)
778 {
779 text_length = eina_unicode_utf8_get_len(result);
780 if (text_length != xim_text->length)
781 {
782 EINA_LOG_WARN("Size mismatch when converting text from input method: supplied length = %d\n, result length = %d", xim_text->length, text_length);
783 }
784 }
785 else {
786 EINA_LOG_WARN("Error converting text from IM to UCS-4");
787 *text = NULL;
788 return 0;
789 }
790
791 *text = result;
792 return text_length;
793 }
794 else {
795 *text = NULL;
796 return 0;
797 }
798}
799
800static void
801preedit_draw_callback(XIC xic __UNUSED__,
802 XPointer client_data,
803 XIMPreeditDrawCallbackStruct *call_data)
804{
805 EINA_LOG_DBG("in");
806 Eina_Bool ret = EINA_FALSE;
807 Ecore_IMF_Context *ctx = (Ecore_IMF_Context *)client_data;
808 Ecore_IMF_Context_Data *imf_context_data = ecore_imf_context_data_get(ctx);
809 XIMText *t = call_data->text;
810 char *tmp;
811 Eina_Unicode *new_text = NULL;
812 Eina_UStrbuf *preedit_bufs = NULL;
813 int new_text_length;
814
815 preedit_bufs = eina_ustrbuf_new();
816 if(imf_context_data->preedit_chars) {
817 ret = eina_ustrbuf_append(preedit_bufs, imf_context_data->preedit_chars);
818 if(ret == EINA_FALSE) goto done;
819 }
820
821 new_text_length = xim_text_to_utf8(ctx, t, &tmp);
822 if(tmp)
823 {
824 int tmp_len;
825 new_text = eina_unicode_utf8_to_unicode((const char *)tmp, &tmp_len);
826 free(tmp);
827 }
828
829 if(t == NULL) {
830 /* delete string */
831 ret = eina_ustrbuf_remove(preedit_bufs,
832 call_data->chg_first, call_data->chg_length);
833 } else if(call_data->chg_length == 0) {
834 /* insert string */
835 ret = eina_ustrbuf_insert(preedit_bufs, new_text, call_data->chg_first);
836 } else if(call_data->chg_length > 0) {
837 /* replace string */
838 ret = eina_ustrbuf_remove(preedit_bufs,
839 call_data->chg_first, call_data->chg_length);
840 if(ret == EINA_FALSE) goto done;
841
842 ret = eina_ustrbuf_insert_n(preedit_bufs, new_text,
843 new_text_length, call_data->chg_first);
844 if(ret == EINA_FALSE) goto done;
845 } else {
846 ret = EINA_FALSE;
847 }
848
849 done:
850 if(ret == EINA_TRUE) {
851 free(imf_context_data->preedit_chars);
852 imf_context_data->preedit_chars =
853 eina_ustrbuf_string_steal(preedit_bufs);
854 imf_context_data->preedit_length =
855 eina_unicode_strlen(imf_context_data->preedit_chars);
856
857 ecore_imf_context_preedit_changed_event_add(ctx);
858 }
859
860 free(new_text);
861 eina_ustrbuf_free(preedit_bufs);
862}
863
864static void
865preedit_caret_callback(XIC xic __UNUSED__,
866 XPointer client_data,
867 XIMPreeditCaretCallbackStruct *call_data)
868{
869 EINA_LOG_DBG("in");
870 Ecore_IMF_Context *ctx = (Ecore_IMF_Context *)client_data;
871 Ecore_IMF_Context_Data *imf_context_data;
872 imf_context_data = ecore_imf_context_data_get(ctx);
873
874 if(call_data->direction == XIMAbsolutePosition)
875 {
876 // printf("call_data->position:%d\n", call_data->position);
877 imf_context_data->preedit_cursor = call_data->position;
878 if(imf_context_data->finalizing == EINA_FALSE)
879 ecore_imf_context_preedit_changed_event_add(ctx);
880 }
881}
882
883static XVaNestedList
884preedit_callback_set(Ecore_IMF_Context *ctx)
885{
886 Ecore_IMF_Context_Data *imf_context_data;
887 imf_context_data = ecore_imf_context_data_get(ctx);
888
889 imf_context_data->preedit_start_cb.client_data = (XPointer)ctx;
890 imf_context_data->preedit_start_cb.callback = (XIMProc)preedit_start_callback;
891
892 imf_context_data->preedit_done_cb.client_data = (XPointer)ctx;
893 imf_context_data->preedit_done_cb.callback = (XIMProc)preedit_done_callback;
894
895 imf_context_data->preedit_draw_cb.client_data = (XPointer)ctx;
896 imf_context_data->preedit_draw_cb.callback = (XIMProc)preedit_draw_callback;
897
898 imf_context_data->preedit_caret_cb.client_data = (XPointer)ctx;
899 imf_context_data->preedit_caret_cb.callback = (XIMProc)preedit_caret_callback;
900
901 return XVaCreateNestedList(0,
902 XNPreeditStartCallback,
903 &imf_context_data->preedit_start_cb,
904 XNPreeditDoneCallback,
905 &imf_context_data->preedit_done_cb,
906 XNPreeditDrawCallback,
907 &imf_context_data->preedit_draw_cb,
908 XNPreeditCaretCallback,
909 &imf_context_data->preedit_caret_cb,
910 NULL);
911}
912
913static XIC
914get_ic(Ecore_IMF_Context *ctx)
915{
916 Ecore_IMF_Context_Data *imf_context_data;
917 XIC ic;
918 imf_context_data = ecore_imf_context_data_get(ctx);
919 ic = imf_context_data->ic;
920 if(!ic)
921 {
922 XIM_Im_Info *im_info = imf_context_data->im_info;
923 XVaNestedList preedit_attr = NULL;
924 XIMStyle im_style = 0;
925 XPoint spot = { 0, 0 };
926 char *name = NULL;
927
928 if (!im_info)
929 {
930 EINA_LOG_WARN("Doesn't open XIM.");
931 return NULL;
932 }
933
934 // supported styles
935#if 0
936 int i;
937 if (im_info->xim_styles)
938 {
939 for (i = 0; i < im_info->xim_styles->count_styles; i++)
940 {
941 printf("%i: ", i);
942 if (im_info->xim_styles->supported_styles[i] & XIMPreeditCallbacks)
943 printf("XIMPreeditCallbacks | ");
944 if (im_info->xim_styles->supported_styles[i] & XIMPreeditPosition)
945 printf("XIMPreeditPosition | ");
946 if (im_info->xim_styles->supported_styles[i] & XIMPreeditArea)
947 printf("XIMPreeditArea | ");
948 if (im_info->xim_styles->supported_styles[i] & XIMPreeditNothing)
949 printf("XIMPreeditNothing | ");
950 if (im_info->xim_styles->supported_styles[i] & XIMPreeditNone)
951 printf("XIMPreeditNone | ");
952 if (im_info->xim_styles->supported_styles[i] & XIMStatusArea)
953 printf("XIMStatusArea | ");
954 if (im_info->xim_styles->supported_styles[i] & XIMStatusCallbacks)
955 printf("XIMStatusCallbacks | ");
956 if (im_info->xim_styles->supported_styles[i] & XIMStatusNothing)
957 printf("XIMStatusNothing | ");
958 if (im_info->xim_styles->supported_styles[i] & XIMStatusNone)
959 printf("XIMStatusNone | ");
960 printf("\n");
961 }
962 }
963#endif
964 // "OverTheSpot" = XIMPreeditPosition | XIMStatusNothing
965 // "OffTheSpot" = XIMPreeditArea | XIMStatusArea
966 // "Root" = XIMPreeditNothing | XIMStatusNothing
967
968 if (imf_context_data->use_preedit == EINA_TRUE)
969 {
970 if (im_info->supports_cursor)
971 {
972 // kinput2 DOES do this...
973 XFontSet fs;
974 char **missing_charset_list;
975 int missing_charset_count;
976 char *def_string;
977
978 im_style |= XIMPreeditPosition;
979 im_style |= XIMStatusNothing;
980 fs = XCreateFontSet(ecore_x_display_get(),
981 "fixed",
982 &missing_charset_list,
983 &missing_charset_count,
984 &def_string);
985 preedit_attr = XVaCreateNestedList(0,
986 XNSpotLocation, &spot,
987 XNFontSet, fs,
988 NULL);
989 }
990 else
991 {
992 im_style |= XIMPreeditCallbacks;
993 im_style |= XIMStatusNothing;
994 preedit_attr = preedit_callback_set(ctx);
995 }
996 name = XNPreeditAttributes;
997 }
998 else
999 {
1000 im_style |= XIMPreeditNothing;
1001 im_style |= XIMStatusNothing;
1002 }
1003
1004 if (im_info->im)
1005 {
1006 ic = XCreateIC(im_info->im,
1007 XNInputStyle, im_style,
1008 XNClientWindow, imf_context_data->win,
1009 name, preedit_attr, NULL);
1010 }
1011 XFree(preedit_attr);
1012 if(ic)
1013 {
1014 unsigned long mask = 0xaaaaaaaa;
1015 XGetICValues (ic,
1016 XNFilterEvents, &mask,
1017 NULL);
1018 imf_context_data->mask = mask;
1019 ecore_x_event_mask_set(imf_context_data->win, mask);
1020 }
1021
1022 imf_context_data->ic = ic;
1023 if(ic && imf_context_data->has_focus == EINA_TRUE)
1024 XSetICFocus(ic);
1025 }
1026
1027 return ic;
1028}
1029
1030static void
1031reinitialize_ic(Ecore_IMF_Context *ctx)
1032{
1033 Ecore_IMF_Context_Data *imf_context_data = ecore_imf_context_data_get(ctx);
1034 XIC ic = imf_context_data->ic;
1035 if(ic)
1036 {
1037 XDestroyIC(ic);
1038 imf_context_data->ic = NULL;
1039 if(imf_context_data->preedit_length)
1040 {
1041 imf_context_data->preedit_length = 0;
1042 free(imf_context_data->preedit_chars);
1043 imf_context_data->preedit_chars = NULL;
1044 ecore_imf_context_preedit_changed_event_add(ctx);
1045 }
1046 }
1047}
1048
1049static void
1050reinitialize_all_ics(XIM_Im_Info *info)
1051{
1052 Eina_List *tmp_list;
1053 Ecore_IMF_Context *ctx;
1054
1055 EINA_LIST_FOREACH(info->ics, tmp_list, ctx)
1056 reinitialize_ic(ctx);
1057}
1058
1059static void
1060set_ic_client_window(Ecore_IMF_Context *ctx,
1061 Ecore_X_Window window)
1062{
1063 EINA_LOG_DBG("in");
1064 Ecore_IMF_Context_Data *imf_context_data = ecore_imf_context_data_get(ctx);
1065 Ecore_X_Window old_win;
1066
1067 /* reinitialize IC */
1068 reinitialize_ic(ctx);
1069
1070 old_win = imf_context_data->win;
1071 EINA_LOG_DBG("old_win:%d window:%d ", old_win, window);
1072 if(old_win != 0 && old_win != window) /* XXX how do check window... */
1073 {
1074 XIM_Im_Info *info;
1075 info = imf_context_data->im_info;
1076 info->ics = eina_list_remove(info->ics, imf_context_data);
1077 imf_context_data->im_info = NULL;
1078 }
1079
1080 imf_context_data->win = window;
1081
1082 if(window) /* XXX */
1083 {
1084 XIM_Im_Info *info = NULL;
1085 info = get_im(window, imf_context_data->locale);
1086 imf_context_data->im_info = info;
1087 imf_context_data->im_info->ics =
1088 eina_list_prepend(imf_context_data->im_info->ics,
1089 imf_context_data);
1090 }
1091}
1092
1093static XIM_Im_Info *
1094get_im(Ecore_X_Window window,
1095 char *locale)
1096{
1097 EINA_LOG_DBG("in");
1098
1099 Eina_List *l;
1100 XIM_Im_Info *im_info = NULL;
1101 XIM_Im_Info *info = NULL;
1102 EINA_LIST_FOREACH(open_ims, l, im_info) {
1103 if(strcmp(im_info->locale, locale) == 0)
1104 {
1105 if(im_info->im)
1106 {
1107 return im_info;
1108 }
1109 else {
1110 info = im_info;
1111 break;
1112 }
1113 }
1114 }
1115
1116 if(!info)
1117 {
1118 info = calloc(1, sizeof(XIM_Im_Info));
1119 if(!info) return NULL;
1120 open_ims = eina_list_prepend(open_ims, info);
1121 info->win = window;
1122 info->locale = strdup(locale);
1123 info->reconnecting = EINA_FALSE;
1124 }
1125
1126 xim_info_try_im(info);
1127 return info;
1128}
1129
1130/* initialize info->im */
1131static void
1132xim_info_try_im(XIM_Im_Info *info)
1133{
1134 Ecore_X_Display *dsp;
1135
1136 assert(info->im == NULL);
1137 if (info->reconnecting == EINA_TRUE)
1138 return;
1139
1140 if(XSupportsLocale())
1141 {
1142 if (!XSetLocaleModifiers (""))
1143 EINA_LOG_WARN("Unable to set locale modifiers with XSetLocaleModifiers()");
1144 dsp = ecore_x_display_get();
1145 info->im = XOpenIM(dsp, NULL, NULL, NULL);
1146 if(!info->im)
1147 {
1148 XRegisterIMInstantiateCallback(dsp,
1149 NULL, NULL, NULL,
1150 xim_instantiate_callback,
1151 (XPointer)info);
1152 info->reconnecting = EINA_TRUE;
1153 return;
1154 }
1155 setup_im(info);
1156 }
1157}
1158
1159static void
1160xim_info_display_closed(Ecore_X_Display *display __UNUSED__,
1161 int is_error __UNUSED__,
1162 XIM_Im_Info *info)
1163{
1164 Eina_List *ics, *tmp_list;
1165 Ecore_IMF_Context *ctx;
1166
1167 open_ims = eina_list_remove(open_ims, info);
1168
1169 ics = info->ics;
1170 info->ics = NULL;
1171
1172 EINA_LIST_FOREACH(ics, tmp_list, ctx)
1173 set_ic_client_window(ctx, 0);
1174
1175 EINA_LIST_FREE(ics, ctx) {
1176 Ecore_IMF_Context_Data *imf_context_data;
1177 imf_context_data = ecore_imf_context_data_get(ctx);
1178 imf_context_data_destroy(imf_context_data);
1179 }
1180
1181 free (info->locale);
1182
1183 if (info->im)
1184 XCloseIM (info->im);
1185
1186 free (info);
1187}
1188
1189static void
1190xim_instantiate_callback(Display *display,
1191 XPointer client_data,
1192 XPointer call_data __UNUSED__)
1193{
1194 XIM_Im_Info *info = (XIM_Im_Info *)client_data;
1195 XIM im = NULL;
1196
1197 im = XOpenIM(display, NULL, NULL, NULL);
1198
1199 if (!im)
1200 {
1201 fprintf(stderr, "Failed to connect to IM\n");
1202 return;
1203 }
1204
1205 info->im = im;
1206 setup_im (info);
1207
1208 XUnregisterIMInstantiateCallback (display, NULL, NULL, NULL,
1209 xim_instantiate_callback,
1210 (XPointer)info);
1211 info->reconnecting = EINA_FALSE;
1212}
1213
1214static void
1215setup_im(XIM_Im_Info *info)
1216{
1217 XIMValuesList *ic_values = NULL;
1218 XIMCallback im_destroy_callback;
1219
1220 if(!info->im)
1221 return;
1222
1223 im_destroy_callback.client_data = (XPointer)info;
1224 im_destroy_callback.callback = (XIMProc)xim_destroy_callback;
1225 XSetIMValues(info->im,
1226 XNDestroyCallback, &im_destroy_callback,
1227 NULL);
1228
1229 XGetIMValues(info->im,
1230 XNQueryInputStyle, &info->xim_styles,
1231 XNQueryICValuesList, &ic_values,
1232 NULL);
1233
1234 if (ic_values)
1235 {
1236 int i;
1237
1238 for (i = 0; i < ic_values->count_values; i++)
1239 {
1240 if (!strcmp(ic_values->supported_values[i],
1241 XNStringConversionCallback))
1242 info->supports_string_conversion = EINA_TRUE;
1243 if (!strcmp(ic_values->supported_values[i],
1244 XNCursor))
1245 info->supports_cursor = EINA_TRUE;
1246 }
1247#if 0
1248 printf("values........\n");
1249 for (i = 0; i < ic_values->count_values; i++)
1250 printf("%s\n", ic_values->supported_values[i]);
1251 printf("styles........\n");
1252 for (i = 0; i < info->xim_styles->count_styles; i++)
1253 printf("%lx\n", info->xim_styles->supported_styles[i]);
1254#endif
1255 XFree(ic_values);
1256 }
1257}
1258
1259static void
1260xim_destroy_callback(XIM xim __UNUSED__,
1261 XPointer client_data,
1262 XPointer call_data __UNUSED__)
1263{
1264 XIM_Im_Info *info = (XIM_Im_Info *)client_data;
1265 info->im = NULL;
1266
1267 reinitialize_all_ics(info);
1268 xim_info_try_im(info);
1269
1270 return;
1271}
1272
1273#endif /* ENABLE_XIM */