aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/libraries/ecore/src/lib/ecore_fb
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/lib/ecore_fb
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/lib/ecore_fb')
-rw-r--r--libraries/ecore/src/lib/ecore_fb/Ecore_Fb.h100
-rw-r--r--libraries/ecore/src/lib/ecore_fb/Makefile.am34
-rw-r--r--libraries/ecore/src/lib/ecore_fb/Makefile.in831
-rw-r--r--libraries/ecore/src/lib/ecore_fb/ecore_fb.c114
-rw-r--r--libraries/ecore/src/lib/ecore_fb/ecore_fb_keytable.h129
-rw-r--r--libraries/ecore/src/lib/ecore_fb/ecore_fb_li.c706
-rw-r--r--libraries/ecore/src/lib/ecore_fb/ecore_fb_private.h91
-rw-r--r--libraries/ecore/src/lib/ecore_fb/ecore_fb_ts.c355
-rw-r--r--libraries/ecore/src/lib/ecore_fb/ecore_fb_vt.c322
9 files changed, 2682 insertions, 0 deletions
diff --git a/libraries/ecore/src/lib/ecore_fb/Ecore_Fb.h b/libraries/ecore/src/lib/ecore_fb/Ecore_Fb.h
new file mode 100644
index 0000000..069cccd
--- /dev/null
+++ b/libraries/ecore/src/lib/ecore_fb/Ecore_Fb.h
@@ -0,0 +1,100 @@
1#ifndef _ECORE_FB_H
2#define _ECORE_FB_H
3
4#include <Eina.h>
5
6#ifdef EAPI
7# undef EAPI
8#endif
9
10#ifdef __GNUC__
11# if __GNUC__ >= 4
12# define EAPI __attribute__ ((visibility("default")))
13# else
14# define EAPI
15# endif
16#else
17# define EAPI
18#endif
19
20/* FIXME:
21 * maybe a new module?
22 * - code to get battery info
23 * - code to get thermal info
24 * ecore evas fb isn't good enough for weird things, like multiple fb's, same happens here.
25 * backlight support using new kernel interface
26 * absolute axis
27 * joystick
28 * ecore_fb_li_device_close_all ? or a shutdown of the subsystem?
29 *
30 */
31
32#ifdef __cplusplus
33extern "C" {
34#endif
35
36/**
37 * @defgroup Ecore_FB_Group Ecore_FB - Frame buffer convenience functions.
38 *
39 * Functions used to set up and shut down the Ecore_Framebuffer functions.
40 *
41 * @{
42 */
43
44/**
45 * @typedef Ecore_Fb_Input_Device
46 * Input device handler.
47 */
48typedef struct _Ecore_Fb_Input_Device Ecore_Fb_Input_Device;
49
50/**
51 * @enum _Ecore_Fb_Input_Device_Cap
52 * Device capabilities.
53 */
54enum _Ecore_Fb_Input_Device_Cap
55{
56 ECORE_FB_INPUT_DEVICE_CAP_NONE = 0x00000000,
57 ECORE_FB_INPUT_DEVICE_CAP_RELATIVE = 0x00000001,
58 ECORE_FB_INPUT_DEVICE_CAP_ABSOLUTE = 0x00000002,
59 ECORE_FB_INPUT_DEVICE_CAP_KEYS_OR_BUTTONS = 0x00000004
60};
61
62/**
63 * @typedef Ecore_Fb_Input_Device_Cap
64 * Device capabilities.
65 */
66typedef enum _Ecore_Fb_Input_Device_Cap Ecore_Fb_Input_Device_Cap;
67
68/* ecore_fb_vt.c */
69EAPI void ecore_fb_callback_gain_set(void (*func) (void *data), void *data);
70EAPI void ecore_fb_callback_lose_set(void (*func) (void *data), void *data);
71
72/* ecore_fb_li.c */
73EAPI Ecore_Fb_Input_Device *ecore_fb_input_device_open(const char *dev);
74EAPI void ecore_fb_input_device_close(Ecore_Fb_Input_Device *dev);
75EAPI void ecore_fb_input_device_listen(Ecore_Fb_Input_Device *dev, Eina_Bool listen);
76EAPI const char *ecore_fb_input_device_name_get(Ecore_Fb_Input_Device *dev);
77EAPI Ecore_Fb_Input_Device_Cap ecore_fb_input_device_cap_get(Ecore_Fb_Input_Device *dev);
78EAPI void ecore_fb_input_device_axis_size_set(Ecore_Fb_Input_Device *dev, int w, int h);
79EAPI void ecore_fb_input_threshold_click_set(Ecore_Fb_Input_Device *dev, double threshold);
80EAPI double ecore_fb_input_threshold_click_get(Ecore_Fb_Input_Device *dev);
81EAPI void ecore_fb_input_device_window_set(Ecore_Fb_Input_Device *dev, void *window);
82
83/* ecore_fb.c */
84
85EAPI int ecore_fb_init(const char *name);
86EAPI int ecore_fb_shutdown(void);
87EAPI void ecore_fb_size_get(int *w, int *h);
88
89EAPI void ecore_fb_touch_screen_calibrate_set(int xscale, int xtrans, int yscale, int ytrans, int xyswap);
90EAPI void ecore_fb_touch_screen_calibrate_get(int *xscale, int *xtrans, int *yscale, int *ytrans, int *xyswap);
91
92/**
93 * @}
94 */
95
96#ifdef __cplusplus
97}
98#endif
99
100#endif
diff --git a/libraries/ecore/src/lib/ecore_fb/Makefile.am b/libraries/ecore/src/lib/ecore_fb/Makefile.am
new file mode 100644
index 0000000..9129fec
--- /dev/null
+++ b/libraries/ecore/src/lib/ecore_fb/Makefile.am
@@ -0,0 +1,34 @@
1MAINTAINERCLEANFILES = Makefile.in
2
3AM_CPPFLAGS = \
4-I$(top_srcdir)/src/lib/ecore \
5-I$(top_builddir)/src/lib/ecore \
6-I$(top_srcdir)/src/lib/ecore_input \
7@TSLIB_CFLAGS@ \
8@EINA_CFLAGS@
9
10
11lib_LTLIBRARIES = libecore_fb.la
12includes_HEADERS = Ecore_Fb.h
13includesdir = $(includedir)/ecore-@VMAJ@
14
15libecore_fb_la_SOURCES = \
16ecore_fb.c \
17ecore_fb_vt.c \
18ecore_fb_li.c \
19ecore_fb_ts.c
20# deprecated sources (might not compile):
21# ecore_fb_kbd.c
22# ecore_fb_ps2.c
23
24libecore_fb_la_LIBADD = \
25@TSLIB_LIBS@ \
26$(top_builddir)/src/lib/ecore/libecore.la \
27$(top_builddir)/src/lib/ecore_input/libecore_input.la \
28@EINA_LIBS@
29
30libecore_fb_la_LDFLAGS = -version-info @version_info@ @release_info@
31
32EXTRA_DIST = \
33ecore_fb_private.h \
34ecore_fb_keytable.h
diff --git a/libraries/ecore/src/lib/ecore_fb/Makefile.in b/libraries/ecore/src/lib/ecore_fb/Makefile.in
new file mode 100644
index 0000000..b37120f
--- /dev/null
+++ b/libraries/ecore/src/lib/ecore_fb/Makefile.in
@@ -0,0 +1,831 @@
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
18
19VPATH = @srcdir@
20pkgdatadir = $(datadir)/@PACKAGE@
21pkgincludedir = $(includedir)/@PACKAGE@
22pkglibdir = $(libdir)/@PACKAGE@
23pkglibexecdir = $(libexecdir)/@PACKAGE@
24am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
25install_sh_DATA = $(install_sh) -c -m 644
26install_sh_PROGRAM = $(install_sh) -c
27install_sh_SCRIPT = $(install_sh) -c
28INSTALL_HEADER = $(INSTALL_DATA)
29transform = $(program_transform_name)
30NORMAL_INSTALL = :
31PRE_INSTALL = :
32POST_INSTALL = :
33NORMAL_UNINSTALL = :
34PRE_UNINSTALL = :
35POST_UNINSTALL = :
36build_triplet = @build@
37host_triplet = @host@
38subdir = src/lib/ecore_fb
39DIST_COMMON = $(includes_HEADERS) $(srcdir)/Makefile.am \
40 $(srcdir)/Makefile.in
41ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
42am__aclocal_m4_deps = $(top_srcdir)/m4/ac_attribute.m4 \
43 $(top_srcdir)/m4/ac_path_generic.m4 \
44 $(top_srcdir)/m4/check_x_extension.m4 \
45 $(top_srcdir)/m4/ecore_check_module.m4 \
46 $(top_srcdir)/m4/ecore_check_options.m4 \
47 $(top_srcdir)/m4/efl_compiler_flag.m4 \
48 $(top_srcdir)/m4/efl_doxygen.m4 \
49 $(top_srcdir)/m4/efl_examples.m4 \
50 $(top_srcdir)/m4/efl_path_max.m4 $(top_srcdir)/m4/efl_tests.m4 \
51 $(top_srcdir)/m4/efl_threads.m4 $(top_srcdir)/m4/gettext.m4 \
52 $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.m4 \
53 $(top_srcdir)/m4/isc-posix.m4 $(top_srcdir)/m4/lib-ld.m4 \
54 $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \
55 $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
56 $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
57 $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \
58 $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \
59 $(top_srcdir)/configure.ac
60am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
61 $(ACLOCAL_M4)
62mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
63CONFIG_HEADER = $(top_builddir)/config.h
64CONFIG_CLEAN_FILES =
65CONFIG_CLEAN_VPATH_FILES =
66am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
67am__vpath_adj = case $$p in \
68 $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
69 *) f=$$p;; \
70 esac;
71am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
72am__install_max = 40
73am__nobase_strip_setup = \
74 srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
75am__nobase_strip = \
76 for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
77am__nobase_list = $(am__nobase_strip_setup); \
78 for p in $$list; do echo "$$p $$p"; done | \
79 sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
80 $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
81 if (++n[$$2] == $(am__install_max)) \
82 { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
83 END { for (dir in files) print dir, files[dir] }'
84am__base_list = \
85 sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
86 sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
87am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(includesdir)"
88LTLIBRARIES = $(lib_LTLIBRARIES)
89libecore_fb_la_DEPENDENCIES = \
90 $(top_builddir)/src/lib/ecore/libecore.la \
91 $(top_builddir)/src/lib/ecore_input/libecore_input.la
92am_libecore_fb_la_OBJECTS = ecore_fb.lo ecore_fb_vt.lo ecore_fb_li.lo \
93 ecore_fb_ts.lo
94libecore_fb_la_OBJECTS = $(am_libecore_fb_la_OBJECTS)
95AM_V_lt = $(am__v_lt_$(V))
96am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
97am__v_lt_0 = --silent
98libecore_fb_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
99 $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
100 $(AM_CFLAGS) $(CFLAGS) $(libecore_fb_la_LDFLAGS) $(LDFLAGS) -o \
101 $@
102DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
103depcomp = $(SHELL) $(top_srcdir)/depcomp
104am__depfiles_maybe = depfiles
105am__mv = mv -f
106COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
107 $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
108LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
109 $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
110 $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
111 $(AM_CFLAGS) $(CFLAGS)
112AM_V_CC = $(am__v_CC_$(V))
113am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY))
114am__v_CC_0 = @echo " CC " $@;
115AM_V_at = $(am__v_at_$(V))
116am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
117am__v_at_0 = @
118CCLD = $(CC)
119LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
120 $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
121 $(AM_LDFLAGS) $(LDFLAGS) -o $@
122AM_V_CCLD = $(am__v_CCLD_$(V))
123am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY))
124am__v_CCLD_0 = @echo " CCLD " $@;
125AM_V_GEN = $(am__v_GEN_$(V))
126am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
127am__v_GEN_0 = @echo " GEN " $@;
128SOURCES = $(libecore_fb_la_SOURCES)
129DIST_SOURCES = $(libecore_fb_la_SOURCES)
130HEADERS = $(includes_HEADERS)
131ETAGS = etags
132CTAGS = ctags
133DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
134ACLOCAL = @ACLOCAL@
135ALLOCA = @ALLOCA@
136AMTAR = @AMTAR@
137AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
138AR = @AR@
139AS = @AS@
140AUTOCONF = @AUTOCONF@
141AUTOHEADER = @AUTOHEADER@
142AUTOMAKE = @AUTOMAKE@
143AWK = @AWK@
144CARES_CFLAGS = @CARES_CFLAGS@
145CARES_LIBS = @CARES_LIBS@
146CC = @CC@
147CCDEPMODE = @CCDEPMODE@
148CFLAGS = @CFLAGS@
149CHECK_CFLAGS = @CHECK_CFLAGS@
150CHECK_LIBS = @CHECK_LIBS@
151CPP = @CPP@
152CPPFLAGS = @CPPFLAGS@
153CURL_CFLAGS = @CURL_CFLAGS@
154CURL_LIBS = @CURL_LIBS@
155CXX = @CXX@
156CXXCPP = @CXXCPP@
157CXXDEPMODE = @CXXDEPMODE@
158CXXFLAGS = @CXXFLAGS@
159CYGPATH_W = @CYGPATH_W@
160DEFS = @DEFS@
161DEPDIR = @DEPDIR@
162DIRECTFB_CFLAGS = @DIRECTFB_CFLAGS@
163DIRECTFB_LIBS = @DIRECTFB_LIBS@
164DLLTOOL = @DLLTOOL@
165DSYMUTIL = @DSYMUTIL@
166DUMPBIN = @DUMPBIN@
167ECHO_C = @ECHO_C@
168ECHO_N = @ECHO_N@
169ECHO_T = @ECHO_T@
170ECORE_XCB_CFLAGS = @ECORE_XCB_CFLAGS@
171ECORE_XCB_LIBS = @ECORE_XCB_LIBS@
172EFL_ECORE_BUILD = @EFL_ECORE_BUILD@
173EFL_ECORE_CON_BUILD = @EFL_ECORE_CON_BUILD@
174EFL_ECORE_EVAS_BUILD = @EFL_ECORE_EVAS_BUILD@
175EFL_ECORE_FILE_BUILD = @EFL_ECORE_FILE_BUILD@
176EFL_ECORE_IMF_BUILD = @EFL_ECORE_IMF_BUILD@
177EFL_ECORE_IMF_EVAS_BUILD = @EFL_ECORE_IMF_EVAS_BUILD@
178EFL_ECORE_INPUT_BUILD = @EFL_ECORE_INPUT_BUILD@
179EFL_ECORE_INPUT_EVAS_BUILD = @EFL_ECORE_INPUT_EVAS_BUILD@
180EFL_ECORE_IPC_BUILD = @EFL_ECORE_IPC_BUILD@
181EFL_ECORE_PSL1GHT_BUILD = @EFL_ECORE_PSL1GHT_BUILD@
182EFL_ECORE_SDL_BUILD = @EFL_ECORE_SDL_BUILD@
183EFL_ECORE_WIN32_BUILD = @EFL_ECORE_WIN32_BUILD@
184EFL_ECORE_WINCE_BUILD = @EFL_ECORE_WINCE_BUILD@
185EFL_PTHREAD_CFLAGS = @EFL_PTHREAD_CFLAGS@
186EFL_PTHREAD_LIBS = @EFL_PTHREAD_LIBS@
187EGREP = @EGREP@
188EINA_CFLAGS = @EINA_CFLAGS@
189EINA_LIBS = @EINA_LIBS@
190ESCAPE_CFLAGS = @ESCAPE_CFLAGS@
191ESCAPE_LIBS = @ESCAPE_LIBS@
192EVAS_CFLAGS = @EVAS_CFLAGS@
193EVAS_LIBS = @EVAS_LIBS@
194EVIL_CFLAGS = @EVIL_CFLAGS@
195EVIL_LIBS = @EVIL_LIBS@
196EXEEXT = @EXEEXT@
197FGREP = @FGREP@
198GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
199GLIB_CFLAGS = @GLIB_CFLAGS@
200GLIB_LIBS = @GLIB_LIBS@
201GMSGFMT = @GMSGFMT@
202GMSGFMT_015 = @GMSGFMT_015@
203GREP = @GREP@
204INSTALL = @INSTALL@
205INSTALL_DATA = @INSTALL_DATA@
206INSTALL_PROGRAM = @INSTALL_PROGRAM@
207INSTALL_SCRIPT = @INSTALL_SCRIPT@
208INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
209INTLLIBS = @INTLLIBS@
210INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
211KEYSYMDEFS = @KEYSYMDEFS@
212LD = @LD@
213LDFLAGS = @LDFLAGS@
214LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@
215LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
216LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@
217LIBICONV = @LIBICONV@
218LIBINTL = @LIBINTL@
219LIBOBJS = @LIBOBJS@
220LIBS = @LIBS@
221LIBTOOL = @LIBTOOL@
222LIPO = @LIPO@
223LN_S = @LN_S@
224LTLIBICONV = @LTLIBICONV@
225LTLIBINTL = @LTLIBINTL@
226LTLIBOBJS = @LTLIBOBJS@
227MAKEINFO = @MAKEINFO@
228MKDIR_P = @MKDIR_P@
229MSGFMT = @MSGFMT@
230MSGFMT_015 = @MSGFMT_015@
231MSGMERGE = @MSGMERGE@
232NM = @NM@
233NMEDIT = @NMEDIT@
234OBJC = @OBJC@
235OBJCDEPMODE = @OBJCDEPMODE@
236OBJCFLAGS = @OBJCFLAGS@
237OBJDUMP = @OBJDUMP@
238OBJEXT = @OBJEXT@
239OTOOL = @OTOOL@
240OTOOL64 = @OTOOL64@
241PACKAGE = @PACKAGE@
242PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
243PACKAGE_NAME = @PACKAGE_NAME@
244PACKAGE_STRING = @PACKAGE_STRING@
245PACKAGE_TARNAME = @PACKAGE_TARNAME@
246PACKAGE_URL = @PACKAGE_URL@
247PACKAGE_VERSION = @PACKAGE_VERSION@
248PATH_SEPARATOR = @PATH_SEPARATOR@
249PIXMAN_CFLAGS = @PIXMAN_CFLAGS@
250PIXMAN_LIBS = @PIXMAN_LIBS@
251PKG_CONFIG = @PKG_CONFIG@
252PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
253PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
254POSUB = @POSUB@
255RANLIB = @RANLIB@
256SDL_CFLAGS = @SDL_CFLAGS@
257SDL_CONFIG = @SDL_CONFIG@
258SDL_LIBS = @SDL_LIBS@
259SED = @SED@
260SET_MAKE = @SET_MAKE@
261SHELL = @SHELL@
262SSL_CFLAGS = @SSL_CFLAGS@
263SSL_LIBS = @SSL_LIBS@
264STRIP = @STRIP@
265TLS2_CFLAGS = @TLS2_CFLAGS@
266TLS2_LIBS = @TLS2_LIBS@
267TLS_CFLAGS = @TLS_CFLAGS@
268TLS_LIBS = @TLS_LIBS@
269TSLIB_CFLAGS = @TSLIB_CFLAGS@
270TSLIB_LIBS = @TSLIB_LIBS@
271USE_NLS = @USE_NLS@
272VERSION = @VERSION@
273VMAJ = @VMAJ@
274WIN32_CFLAGS = @WIN32_CFLAGS@
275WIN32_CPPFLAGS = @WIN32_CPPFLAGS@
276WIN32_LIBS = @WIN32_LIBS@
277XCB_COMPOSITE_CFLAGS = @XCB_COMPOSITE_CFLAGS@
278XCB_COMPOSITE_LIBS = @XCB_COMPOSITE_LIBS@
279XCB_CURSOR_CFLAGS = @XCB_CURSOR_CFLAGS@
280XCB_CURSOR_LIBS = @XCB_CURSOR_LIBS@
281XCB_DAMAGE_CFLAGS = @XCB_DAMAGE_CFLAGS@
282XCB_DAMAGE_LIBS = @XCB_DAMAGE_LIBS@
283XCB_DPMS_CFLAGS = @XCB_DPMS_CFLAGS@
284XCB_DPMS_LIBS = @XCB_DPMS_LIBS@
285XCB_RANDR_CFLAGS = @XCB_RANDR_CFLAGS@
286XCB_RANDR_LIBS = @XCB_RANDR_LIBS@
287XCB_RENDER_CFLAGS = @XCB_RENDER_CFLAGS@
288XCB_RENDER_LIBS = @XCB_RENDER_LIBS@
289XCB_SCREENSAVER_CFLAGS = @XCB_SCREENSAVER_CFLAGS@
290XCB_SCREENSAVER_LIBS = @XCB_SCREENSAVER_LIBS@
291XCB_SHAPE_CFLAGS = @XCB_SHAPE_CFLAGS@
292XCB_SHAPE_LIBS = @XCB_SHAPE_LIBS@
293XCB_SYNC_CFLAGS = @XCB_SYNC_CFLAGS@
294XCB_SYNC_LIBS = @XCB_SYNC_LIBS@
295XCB_X11_CFLAGS = @XCB_X11_CFLAGS@
296XCB_X11_LIBS = @XCB_X11_LIBS@
297XCB_XFIXES_CFLAGS = @XCB_XFIXES_CFLAGS@
298XCB_XFIXES_LIBS = @XCB_XFIXES_LIBS@
299XCB_XGESTURE_CFLAGS = @XCB_XGESTURE_CFLAGS@
300XCB_XGESTURE_LIBS = @XCB_XGESTURE_LIBS@
301XCB_XINERAMA_CFLAGS = @XCB_XINERAMA_CFLAGS@
302XCB_XINERAMA_LIBS = @XCB_XINERAMA_LIBS@
303XCB_XINPUT_CFLAGS = @XCB_XINPUT_CFLAGS@
304XCB_XINPUT_LIBS = @XCB_XINPUT_LIBS@
305XCB_XPRINT_CFLAGS = @XCB_XPRINT_CFLAGS@
306XCB_XPRINT_LIBS = @XCB_XPRINT_LIBS@
307XCB_XTEST_CFLAGS = @XCB_XTEST_CFLAGS@
308XCB_XTEST_LIBS = @XCB_XTEST_LIBS@
309XCOMPOSITE_CFLAGS = @XCOMPOSITE_CFLAGS@
310XCOMPOSITE_LIBS = @XCOMPOSITE_LIBS@
311XDAMAGE_CFLAGS = @XDAMAGE_CFLAGS@
312XDAMAGE_LIBS = @XDAMAGE_LIBS@
313XDPMS_CFLAGS = @XDPMS_CFLAGS@
314XDPMS_LIBS = @XDPMS_LIBS@
315XFIXES_CFLAGS = @XFIXES_CFLAGS@
316XFIXES_LIBS = @XFIXES_LIBS@
317XGESTURE_CFLAGS = @XGESTURE_CFLAGS@
318XGESTURE_LIBS = @XGESTURE_LIBS@
319XGETTEXT = @XGETTEXT@
320XGETTEXT_015 = @XGETTEXT_015@
321XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
322XI2_CFLAGS = @XI2_CFLAGS@
323XI2_LIBS = @XI2_LIBS@
324XINERAMA_CFLAGS = @XINERAMA_CFLAGS@
325XINERAMA_LIBS = @XINERAMA_LIBS@
326XKB_CFLAGS = @XKB_CFLAGS@
327XKB_LIBS = @XKB_LIBS@
328XMKMF = @XMKMF@
329XPRINT_CFLAGS = @XPRINT_CFLAGS@
330XPRINT_LIBS = @XPRINT_LIBS@
331XRANDR_CFLAGS = @XRANDR_CFLAGS@
332XRANDR_LIBS = @XRANDR_LIBS@
333XRENDER_CFLAGS = @XRENDER_CFLAGS@
334XRENDER_LIBS = @XRENDER_LIBS@
335XSS_CFLAGS = @XSS_CFLAGS@
336XSS_LIBS = @XSS_LIBS@
337XTEST_CFLAGS = @XTEST_CFLAGS@
338XTEST_LIBS = @XTEST_LIBS@
339X_CFLAGS = @X_CFLAGS@
340X_EXTRA_LIBS = @X_EXTRA_LIBS@
341X_LIBS = @X_LIBS@
342X_PRE_LIBS = @X_PRE_LIBS@
343Xcursor_cflags = @Xcursor_cflags@
344Xcursor_libs = @Xcursor_libs@
345abs_builddir = @abs_builddir@
346abs_srcdir = @abs_srcdir@
347abs_top_builddir = @abs_top_builddir@
348abs_top_srcdir = @abs_top_srcdir@
349ac_ct_CC = @ac_ct_CC@
350ac_ct_CXX = @ac_ct_CXX@
351ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
352ac_ct_OBJC = @ac_ct_OBJC@
353am__include = @am__include@
354am__leading_dot = @am__leading_dot@
355am__quote = @am__quote@
356am__tar = @am__tar@
357am__untar = @am__untar@
358bindir = @bindir@
359build = @build@
360build_alias = @build_alias@
361build_cpu = @build_cpu@
362build_os = @build_os@
363build_vendor = @build_vendor@
364builddir = @builddir@
365cocoa_ldflags = @cocoa_ldflags@
366datadir = @datadir@
367datarootdir = @datarootdir@
368dlopen_libs = @dlopen_libs@
369docdir = @docdir@
370dvidir = @dvidir@
371ecore_cocoa_cflags = @ecore_cocoa_cflags@
372ecore_cocoa_libs = @ecore_cocoa_libs@
373ecore_con_cflags = @ecore_con_cflags@
374ecore_con_libs = @ecore_con_libs@
375ecore_directfb_cflags = @ecore_directfb_cflags@
376ecore_directfb_libs = @ecore_directfb_libs@
377ecore_evas_cflags = @ecore_evas_cflags@
378ecore_evas_libs = @ecore_evas_libs@
379ecore_fb_cflags = @ecore_fb_cflags@
380ecore_fb_libs = @ecore_fb_libs@
381ecore_file_cflags = @ecore_file_cflags@
382ecore_file_libs = @ecore_file_libs@
383ecore_imf_cflags = @ecore_imf_cflags@
384ecore_imf_evas_cflags = @ecore_imf_evas_cflags@
385ecore_imf_evas_libs = @ecore_imf_evas_libs@
386ecore_imf_libs = @ecore_imf_libs@
387ecore_imf_xim_cflags = @ecore_imf_xim_cflags@
388ecore_imf_xim_libs = @ecore_imf_xim_libs@
389ecore_input_cflags = @ecore_input_cflags@
390ecore_input_evas_cflags = @ecore_input_evas_cflags@
391ecore_input_evas_libs = @ecore_input_evas_libs@
392ecore_input_libs = @ecore_input_libs@
393ecore_ipc_cflags = @ecore_ipc_cflags@
394ecore_ipc_libs = @ecore_ipc_libs@
395ecore_psl1ght_cflags = @ecore_psl1ght_cflags@
396ecore_psl1ght_libs = @ecore_psl1ght_libs@
397ecore_sdl_cflags = @ecore_sdl_cflags@
398ecore_sdl_libs = @ecore_sdl_libs@
399ecore_win32_cflags = @ecore_win32_cflags@
400ecore_win32_libs = @ecore_win32_libs@
401ecore_wince_cflags = @ecore_wince_cflags@
402ecore_wince_libs = @ecore_wince_libs@
403ecore_x_cflags = @ecore_x_cflags@
404ecore_x_libs = @ecore_x_libs@
405ecore_x_libs_private = @ecore_x_libs_private@
406efl_doxygen = @efl_doxygen@
407efl_have_doxygen = @efl_have_doxygen@
408exec_prefix = @exec_prefix@
409have_ecore_x_xcb_define = @have_ecore_x_xcb_define@
410host = @host@
411host_alias = @host_alias@
412host_cpu = @host_cpu@
413host_os = @host_os@
414host_vendor = @host_vendor@
415htmldir = @htmldir@
416includedir = @includedir@
417infodir = @infodir@
418install_sh = @install_sh@
419libdir = @libdir@
420libexecdir = @libexecdir@
421localedir = @localedir@
422localstatedir = @localstatedir@
423lt_ECHO = @lt_ECHO@
424lt_enable_auto_import = @lt_enable_auto_import@
425mandir = @mandir@
426mkdir_p = @mkdir_p@
427oldincludedir = @oldincludedir@
428pdfdir = @pdfdir@
429pkgconfig_requires_private = @pkgconfig_requires_private@
430prefix = @prefix@
431program_transform_name = @program_transform_name@
432psdir = @psdir@
433release_info = @release_info@
434requirements_ecore = @requirements_ecore@
435requirements_ecore_cocoa = @requirements_ecore_cocoa@
436requirements_ecore_con = @requirements_ecore_con@
437requirements_ecore_directfb = @requirements_ecore_directfb@
438requirements_ecore_evas = @requirements_ecore_evas@
439requirements_ecore_fb = @requirements_ecore_fb@
440requirements_ecore_file = @requirements_ecore_file@
441requirements_ecore_imf = @requirements_ecore_imf@
442requirements_ecore_imf_evas = @requirements_ecore_imf_evas@
443requirements_ecore_imf_xim = @requirements_ecore_imf_xim@
444requirements_ecore_input = @requirements_ecore_input@
445requirements_ecore_input_evas = @requirements_ecore_input_evas@
446requirements_ecore_ipc = @requirements_ecore_ipc@
447requirements_ecore_psl1ght = @requirements_ecore_psl1ght@
448requirements_ecore_sdl = @requirements_ecore_sdl@
449requirements_ecore_win32 = @requirements_ecore_win32@
450requirements_ecore_wince = @requirements_ecore_wince@
451requirements_ecore_x = @requirements_ecore_x@
452rt_libs = @rt_libs@
453sbindir = @sbindir@
454sharedstatedir = @sharedstatedir@
455srcdir = @srcdir@
456sysconfdir = @sysconfdir@
457target_alias = @target_alias@
458top_build_prefix = @top_build_prefix@
459top_builddir = @top_builddir@
460top_srcdir = @top_srcdir@
461version_info = @version_info@
462x_cflags = @x_cflags@
463x_includes = @x_includes@
464x_libs = @x_libs@
465MAINTAINERCLEANFILES = Makefile.in
466AM_CPPFLAGS = \
467-I$(top_srcdir)/src/lib/ecore \
468-I$(top_builddir)/src/lib/ecore \
469-I$(top_srcdir)/src/lib/ecore_input \
470@TSLIB_CFLAGS@ \
471@EINA_CFLAGS@
472
473lib_LTLIBRARIES = libecore_fb.la
474includes_HEADERS = Ecore_Fb.h
475includesdir = $(includedir)/ecore-@VMAJ@
476libecore_fb_la_SOURCES = \
477ecore_fb.c \
478ecore_fb_vt.c \
479ecore_fb_li.c \
480ecore_fb_ts.c
481
482# deprecated sources (might not compile):
483# ecore_fb_kbd.c
484# ecore_fb_ps2.c
485libecore_fb_la_LIBADD = \
486@TSLIB_LIBS@ \
487$(top_builddir)/src/lib/ecore/libecore.la \
488$(top_builddir)/src/lib/ecore_input/libecore_input.la \
489@EINA_LIBS@
490
491libecore_fb_la_LDFLAGS = -version-info @version_info@ @release_info@
492EXTRA_DIST = \
493ecore_fb_private.h \
494ecore_fb_keytable.h
495
496all: all-am
497
498.SUFFIXES:
499.SUFFIXES: .c .lo .o .obj
500$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
501 @for dep in $?; do \
502 case '$(am__configure_deps)' in \
503 *$$dep*) \
504 ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
505 && { if test -f $@; then exit 0; else break; fi; }; \
506 exit 1;; \
507 esac; \
508 done; \
509 echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/lib/ecore_fb/Makefile'; \
510 $(am__cd) $(top_srcdir) && \
511 $(AUTOMAKE) --gnu src/lib/ecore_fb/Makefile
512.PRECIOUS: Makefile
513Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
514 @case '$?' in \
515 *config.status*) \
516 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
517 *) \
518 echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
519 cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
520 esac;
521
522$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
523 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
524
525$(top_srcdir)/configure: $(am__configure_deps)
526 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
527$(ACLOCAL_M4): $(am__aclocal_m4_deps)
528 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
529$(am__aclocal_m4_deps):
530install-libLTLIBRARIES: $(lib_LTLIBRARIES)
531 @$(NORMAL_INSTALL)
532 test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)"
533 @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
534 list2=; for p in $$list; do \
535 if test -f $$p; then \
536 list2="$$list2 $$p"; \
537 else :; fi; \
538 done; \
539 test -z "$$list2" || { \
540 echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \
541 $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \
542 }
543
544uninstall-libLTLIBRARIES:
545 @$(NORMAL_UNINSTALL)
546 @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
547 for p in $$list; do \
548 $(am__strip_dir) \
549 echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \
550 $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \
551 done
552
553clean-libLTLIBRARIES:
554 -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
555 @list='$(lib_LTLIBRARIES)'; for p in $$list; do \
556 dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
557 test "$$dir" != "$$p" || dir=.; \
558 echo "rm -f \"$${dir}/so_locations\""; \
559 rm -f "$${dir}/so_locations"; \
560 done
561libecore_fb.la: $(libecore_fb_la_OBJECTS) $(libecore_fb_la_DEPENDENCIES)
562 $(AM_V_CCLD)$(libecore_fb_la_LINK) -rpath $(libdir) $(libecore_fb_la_OBJECTS) $(libecore_fb_la_LIBADD) $(LIBS)
563
564mostlyclean-compile:
565 -rm -f *.$(OBJEXT)
566
567distclean-compile:
568 -rm -f *.tab.c
569
570@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ecore_fb.Plo@am__quote@
571@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ecore_fb_li.Plo@am__quote@
572@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ecore_fb_ts.Plo@am__quote@
573@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ecore_fb_vt.Plo@am__quote@
574
575.c.o:
576@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
577@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
578@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
579@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
580@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
581@am__fastdepCC_FALSE@ $(COMPILE) -c $<
582
583.c.obj:
584@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
585@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
586@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
587@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
588@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
589@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
590
591.c.lo:
592@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
593@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
594@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
595@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
596@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
597@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
598
599mostlyclean-libtool:
600 -rm -f *.lo
601
602clean-libtool:
603 -rm -rf .libs _libs
604install-includesHEADERS: $(includes_HEADERS)
605 @$(NORMAL_INSTALL)
606 test -z "$(includesdir)" || $(MKDIR_P) "$(DESTDIR)$(includesdir)"
607 @list='$(includes_HEADERS)'; test -n "$(includesdir)" || list=; \
608 for p in $$list; do \
609 if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
610 echo "$$d$$p"; \
611 done | $(am__base_list) | \
612 while read files; do \
613 echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(includesdir)'"; \
614 $(INSTALL_HEADER) $$files "$(DESTDIR)$(includesdir)" || exit $$?; \
615 done
616
617uninstall-includesHEADERS:
618 @$(NORMAL_UNINSTALL)
619 @list='$(includes_HEADERS)'; test -n "$(includesdir)" || list=; \
620 files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
621 test -n "$$files" || exit 0; \
622 echo " ( cd '$(DESTDIR)$(includesdir)' && rm -f" $$files ")"; \
623 cd "$(DESTDIR)$(includesdir)" && rm -f $$files
624
625ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
626 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
627 unique=`for i in $$list; do \
628 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
629 done | \
630 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
631 END { if (nonempty) { for (i in files) print i; }; }'`; \
632 mkid -fID $$unique
633tags: TAGS
634
635TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
636 $(TAGS_FILES) $(LISP)
637 set x; \
638 here=`pwd`; \
639 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
640 unique=`for i in $$list; do \
641 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
642 done | \
643 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
644 END { if (nonempty) { for (i in files) print i; }; }'`; \
645 shift; \
646 if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
647 test -n "$$unique" || unique=$$empty_fix; \
648 if test $$# -gt 0; then \
649 $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
650 "$$@" $$unique; \
651 else \
652 $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
653 $$unique; \
654 fi; \
655 fi
656ctags: CTAGS
657CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
658 $(TAGS_FILES) $(LISP)
659 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
660 unique=`for i in $$list; do \
661 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
662 done | \
663 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
664 END { if (nonempty) { for (i in files) print i; }; }'`; \
665 test -z "$(CTAGS_ARGS)$$unique" \
666 || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
667 $$unique
668
669GTAGS:
670 here=`$(am__cd) $(top_builddir) && pwd` \
671 && $(am__cd) $(top_srcdir) \
672 && gtags -i $(GTAGS_ARGS) "$$here"
673
674distclean-tags:
675 -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
676
677distdir: $(DISTFILES)
678 @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
679 topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
680 list='$(DISTFILES)'; \
681 dist_files=`for file in $$list; do echo $$file; done | \
682 sed -e "s|^$$srcdirstrip/||;t" \
683 -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
684 case $$dist_files in \
685 */*) $(MKDIR_P) `echo "$$dist_files" | \
686 sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
687 sort -u` ;; \
688 esac; \
689 for file in $$dist_files; do \
690 if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
691 if test -d $$d/$$file; then \
692 dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
693 if test -d "$(distdir)/$$file"; then \
694 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
695 fi; \
696 if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
697 cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
698 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
699 fi; \
700 cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
701 else \
702 test -f "$(distdir)/$$file" \
703 || cp -p $$d/$$file "$(distdir)/$$file" \
704 || exit 1; \
705 fi; \
706 done
707check-am: all-am
708check: check-am
709all-am: Makefile $(LTLIBRARIES) $(HEADERS)
710installdirs:
711 for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(includesdir)"; do \
712 test -z "$$dir" || $(MKDIR_P) "$$dir"; \
713 done
714install: install-am
715install-exec: install-exec-am
716install-data: install-data-am
717uninstall: uninstall-am
718
719install-am: all-am
720 @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
721
722installcheck: installcheck-am
723install-strip:
724 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
725 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
726 `test -z '$(STRIP)' || \
727 echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
728mostlyclean-generic:
729
730clean-generic:
731
732distclean-generic:
733 -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
734 -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
735
736maintainer-clean-generic:
737 @echo "This command is intended for maintainers to use"
738 @echo "it deletes files that may require special tools to rebuild."
739 -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
740clean: clean-am
741
742clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \
743 mostlyclean-am
744
745distclean: distclean-am
746 -rm -rf ./$(DEPDIR)
747 -rm -f Makefile
748distclean-am: clean-am distclean-compile distclean-generic \
749 distclean-tags
750
751dvi: dvi-am
752
753dvi-am:
754
755html: html-am
756
757html-am:
758
759info: info-am
760
761info-am:
762
763install-data-am: install-includesHEADERS
764
765install-dvi: install-dvi-am
766
767install-dvi-am:
768
769install-exec-am: install-libLTLIBRARIES
770
771install-html: install-html-am
772
773install-html-am:
774
775install-info: install-info-am
776
777install-info-am:
778
779install-man:
780
781install-pdf: install-pdf-am
782
783install-pdf-am:
784
785install-ps: install-ps-am
786
787install-ps-am:
788
789installcheck-am:
790
791maintainer-clean: maintainer-clean-am
792 -rm -rf ./$(DEPDIR)
793 -rm -f Makefile
794maintainer-clean-am: distclean-am maintainer-clean-generic
795
796mostlyclean: mostlyclean-am
797
798mostlyclean-am: mostlyclean-compile mostlyclean-generic \
799 mostlyclean-libtool
800
801pdf: pdf-am
802
803pdf-am:
804
805ps: ps-am
806
807ps-am:
808
809uninstall-am: uninstall-includesHEADERS uninstall-libLTLIBRARIES
810
811.MAKE: install-am install-strip
812
813.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
814 clean-libLTLIBRARIES clean-libtool ctags distclean \
815 distclean-compile distclean-generic distclean-libtool \
816 distclean-tags distdir dvi dvi-am html html-am info info-am \
817 install install-am install-data install-data-am install-dvi \
818 install-dvi-am install-exec install-exec-am install-html \
819 install-html-am install-includesHEADERS install-info \
820 install-info-am install-libLTLIBRARIES install-man install-pdf \
821 install-pdf-am install-ps install-ps-am install-strip \
822 installcheck installcheck-am installdirs maintainer-clean \
823 maintainer-clean-generic mostlyclean mostlyclean-compile \
824 mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
825 tags uninstall uninstall-am uninstall-includesHEADERS \
826 uninstall-libLTLIBRARIES
827
828
829# Tell versions [3.59,3.63) of GNU make to not export all variables.
830# Otherwise a system limit (for SysV at least) may be exceeded.
831.NOEXPORT:
diff --git a/libraries/ecore/src/lib/ecore_fb/ecore_fb.c b/libraries/ecore/src/lib/ecore_fb/ecore_fb.c
new file mode 100644
index 0000000..ca7d73d
--- /dev/null
+++ b/libraries/ecore/src/lib/ecore_fb/ecore_fb.c
@@ -0,0 +1,114 @@
1#ifdef HAVE_CONFIG_H
2# include <config.h>
3#endif
4
5#include "Ecore_Fb.h"
6#include "ecore_fb_private.h"
7
8static void _ecore_fb_size_get(int *w, int *h);
9
10static int _ecore_fb_init_count = 0;
11static int _ecore_fb_console_w = 0;
12static int _ecore_fb_console_h = 0;
13
14/**
15 * @addtogroup Ecore_FB_Group Ecore_FB - Frame buffer convenience functions.
16 *
17 * @{
18 */
19
20/**
21 * @brief Initialize the Ecore_Fb library.
22 *
23 * @param name Device target name.
24 * @return 1 or greater on success, 0 on error.
25 *
26 * This function sets up all the Ecore_Fb library. It returns 0 on
27 * failure, otherwise it returns the number of times it has already
28 * been called.
29 *
30 * When Ecore_Fb is not used anymore, call ecore_fb_shutdown() to shut down
31 * the Ecore_Fb library.
32 */
33EAPI int
34ecore_fb_init(const char *name __UNUSED__)
35{
36 if (++_ecore_fb_init_count != 1)
37 return _ecore_fb_init_count;
38
39 if (!ecore_fb_vt_init())
40 return --_ecore_fb_init_count;
41
42 _ecore_fb_size_get(&_ecore_fb_console_w, &_ecore_fb_console_h);
43
44 return _ecore_fb_init_count;
45}
46
47/**
48 * @brief Shut down the Ecore_Fb library.
49 *
50 * @return 0 when the library is completely shut down, 1 or
51 * greater otherwise.
52 *
53 * This function shuts down the Ecore_Fb library. It returns 0 when it has
54 * been called the same number of times than ecore_fb_init().
55 */
56EAPI int
57ecore_fb_shutdown(void)
58{
59 if (--_ecore_fb_init_count != 0)
60 return _ecore_fb_init_count;
61
62 ecore_fb_vt_shutdown();
63
64 return _ecore_fb_init_count;
65}
66
67
68/**
69 * @brief Retrieve the width and height of the current frame buffer in
70 * pixels.
71 *
72 * @param w Pointer to an integer in which to store the width.
73 * @param h Pointer to an interge in which to store the height.
74 *
75 * This function retrieves the size of the current frame buffer in
76 * pixels. @p w and @p h can be buffers that will be filled with the
77 * corresponding values. If one of them is @c NULL, nothing will be
78 * done for that parameter.
79 */
80EAPI void
81ecore_fb_size_get(int *w, int *h)
82{
83 if (w) *w = _ecore_fb_console_w;
84 if (h) *h = _ecore_fb_console_h;
85}
86
87static void
88_ecore_fb_size_get(int *w, int *h)
89{
90 struct fb_var_screeninfo fb_var;
91 int fb;
92
93 fb = open("/dev/fb0", O_RDWR);
94 if (fb < 0)
95 {
96 if (w) *w = 0;
97 if (h) *h = 0;
98 return;
99 }
100 if (ioctl(fb, FBIOGET_VSCREENINFO, &fb_var) == -1)
101 {
102 if (w) *w = 0;
103 if (h) *h = 0;
104 close(fb);
105 return;
106 }
107 close(fb);
108 if (w) *w = fb_var.xres;
109 if (h) *h = fb_var.yres;
110}
111
112/**
113 * @}
114 */
diff --git a/libraries/ecore/src/lib/ecore_fb/ecore_fb_keytable.h b/libraries/ecore/src/lib/ecore_fb/ecore_fb_keytable.h
new file mode 100644
index 0000000..38de7bf
--- /dev/null
+++ b/libraries/ecore/src/lib/ecore_fb/ecore_fb_keytable.h
@@ -0,0 +1,129 @@
1/* this table was taken from ecore_fb, is the default en layout */
2 "0x00", "0x00", "0x00", /**/"", "", "",/***/
3 "Escape", "Escape", "Escape", /**/"", "", "",/***/
4 "1", "exclam", "1", /**/"1", "!", "1",/***/
5 "2", "at", "2", /**/"2", "@", "2",/***/
6 "3", "numbersign", "3", /**/"3", "#", "3",/***/
7 "4", "dollar", "4", /**/"4", "$", "4",/***/
8 "5", "percent", "5", /**/"5", "%", "5",/***/
9 "6", "asciicircumm", "6", /**/"6", "^", "6",/***/
10 "7", "ampersand", "7", /**/"7", "&", "7",/***/
11 "8", "asterisk", "8", /**/"8", "*", "8",/***/
12 "9", "parenleft", "9", /**/"9", "(", "9",/***/
13 "0", "parenright", "0", /**/"0", ")", "0",/***/
14 "minus", "underscore", "minus", /**/"-", "_", "-",/***/
15 "equal", "plus", "equal", /**/"=", "+", "=",/***/
16 "BackSpace", "BackSpace", "BackSpace", /**/"\010","\010","\010",/***/
17 "Tab", "ISO_Left_Tab", "Tab", /**/"\011","", "\011",/***/
18 "q", "Q", "Q", /**/"q", "Q", "Q",/***/
19 "w", "W", "W", /**/"w", "W", "W",/***/
20 "e", "E", "E", /**/"e", "E", "E",/***/
21 "r", "R", "R", /**/"r", "R", "R",/***/
22 "t", "T", "T", /**/"t", "T", "T",/***/
23 "y", "Y", "Y", /**/"y", "Y", "Y",/***/
24 "u", "U", "U", /**/"u", "U", "U",/***/
25 "i", "I", "I", /**/"i", "I", "I",/***/
26 "o", "O", "O", /**/"o", "O", "O",/***/
27 "p", "P", "P", /**/"p", "P", "P",/***/
28 "bracketleft", "braceleft", "bracketleft", /**/"[", "{", "[",/***/
29 "bracketright", "braceright", "bracketright", /**/"]", "}", "]",/***/
30 "Return", "Return", "Return", /**/"\015","\015","\015",/***/
31 "Control_L", "Control_L", "Control_L", /**/"", "", "",/***/
32 "a", "A", "A", /**/"a", "A", "A",/***/
33 "s", "S", "S", /**/"s", "S", "S",/***/
34 "d", "D", "D", /**/"d", "D", "D",/***/
35 "f", "F", "F", /**/"f", "F", "F",/***/
36 "g", "G", "G", /**/"g", "G", "G",/***/
37 "h", "h", "H", /**/"h", "H", "H",/***/
38 "j", "J", "J", /**/"j", "J", "J",/***/
39 "k", "K", "K", /**/"k", "K", "K",/***/
40 "l", "L", "L", /**/"l", "L", "L",/***/
41 "semicolon", "colon", "semicolon", /**/";", ":", ";",/***/
42 "apostrophe", "quotedbl", "apostrophe", /**/"'", "\"", "'",/***/
43 "grave", "asciitilde", "grave", /**/"`", "~", "`",/***/
44 "Shift_L", "Shift_L", "Shift_L", /**/"", "", "",/***/
45 "backslash", "bar", "backslash", /**/"\\", "|", "\\",/***/
46 "z", "Z", "Z", /**/"z", "Z", "Z",/***/
47 "x", "X", "X", /**/"x", "X", "X",/***/
48 "c", "C", "C", /**/"c", "C", "C",/***/
49 "v", "V", "V", /**/"v", "V", "V",/***/
50 "b", "B", "B", /**/"b", "B", "B",/***/
51 "n", "N", "N", /**/"n", "N", "N",/***/
52 "m", "M", "M", /**/"m", "M", "M",/***/
53 "comma", "less", "comma", /**/",", "<", ",",/***/
54 "period", "greater", "period", /**/".", ">", ".",/***/
55 "slash", "question", "slash", /**/"/", "?", "/",/***/
56 "Shift_R", "Shift_R", "Shift_R", /**/"", "", "",/***/
57 "KP_Multiply", "KP_Multiply", "KP_Multiply", /**/"", "*", "",/***/
58 "Alt_L", "Alt_L", "Alt_L", /**/"", "", "",/***/
59 "space", "space", "space", /**/" ", " ", " ",/***/
60 "Caps_Lock", "Caps_Lock", "Caps_Lock", /**/"", "", "",/***/
61 "F1", "F1", "F1", /**/"", "", "",/***/
62 "F2", "F2", "F2", /**/"", "", "",/***/
63 "F3", "F3", "F3", /**/"", "", "",/***/
64 "F4", "F4", "F4", /**/"", "", "",/***/
65 "F5", "F5", "F5", /**/"", "", "",/***/
66 "F6", "F6", "F6", /**/"", "", "",/***/
67 "F7", "F7", "F7", /**/"", "", "",/***/
68 "F8", "F8", "F8", /**/"", "", "",/***/
69 "F9", "F9", "F9", /**/"", "", "",/***/
70 "F10", "F10", "F10", /**/"", "", "",/***/
71 "Num_Lock", "Num_Lock", "Num_Lock", /**/"", "", "",/***/
72 "Scroll_Lock", "Scroll_Lock", "Scroll_Lock", /**/"", "", "",/***/
73 "KP_Home", "KP_7", "KP_Home", /**/"", "7", "",/***/
74 "KP_Up", "KP_8", "KP_Up", /**/"", "8", "",/***/
75 "KP_Prior", "KP_9", "KP_Prior", /**/"", "9", "",/***/
76 "KP_Subtract", "KP_Subtract", "KP_Subtract", /**/"", "", "",/***/
77 "KP_Left", "KP_4", "KP_Left", /**/"", "4", "",/***/
78 "KP_Begin", "KP_5", "KP_Begin", /**/"", "5", "",/***/
79 "KP_Right", "KP_6", "KP_Right", /**/"", "6", "",/***/
80 "KP_Add", "KP_Add", "KP_Add", /**/"", "", "",/***/
81 "KP_End", "KP_1", "KP_End", /**/"", "1", "",/***/
82 "KP_Down", "KP_2", "KP_Down", /**/"", "2", "",/***/
83 "KP_Next", "KP_3", "KP_Next", /**/"", "3", "",/***/
84 "KP_Insert", "KP_0", "KP_Insert", /**/"", "0", "",/***/
85 "KP_Delete", "KP_Decimal", "KP_Delete", /**/"", ".", "",/***/
86 "0x54", "0x54", "0x54", /**/"", "", "",/***/
87 "0x55", "0x55", "0x55", /**/"", "", "",/***/
88 "0x56", "0x56", "0x56", /**/"", "", "",/***/
89 "F11", "F11", "F11", /**/"", "", "",/***/
90 "F12", "F12", "F12", /**/"", "", "",/***/
91 "0x59", "0x59", "0x59", /**/"", "", "",/***/
92 "0x5a", "0x5a", "0x5a", /**/"", "", "",/***/
93 "0x5b", "0x5b", "0x5b", /**/"", "", "",/***/
94 "0x5c", "0x5c", "0x5c", /**/"", "", "",/***/
95 "0x5d", "0x5d", "0x5d", /**/"", "", "",/***/
96 "0x5e", "0x5e", "0x5e", /**/"", "", "",/***/
97 "0x5f", "0x5f", "0x5f", /**/"", "", "",/***/
98 "KP_Enter", "KP_Enter", "KP_Enter", /**/"", "", "",/***/
99 "Control_R", "Control_R", "Control_R", /**/"", "", "",/***/
100 "KP_Divide", "KP_Divide", "KP_Divide", /**/"", "", "",/***/
101 "Print", "Print", "Print", /**/"", "", "",/***/
102 "Alt_R", "Alt_R", "Alt_R", /**/"", "", "",/***/
103 "0x65", "0x65", "0x65", /**/"", "", "",/***/
104 "Home", "Home", "Home", /**/"", "", "",/***/
105 "Up", "Up", "Up", /**/"", "", "",/***/
106 "Prior", "Prior", "Prior", /**/"", "", "",/***/
107 "Left", "Left", "Left", /**/"", "", "",/***/
108 "Right", "Right", "Right", /**/"", "", "",/***/
109 "End", "End", "End", /**/"", "", "",/***/
110 "Down", "Down", "Down", /**/"", "", "",/***/
111 "Next", "Next", "Next", /**/"", "", "",/***/
112 "Insert", "Insert", "Insert", /**/"", "", "",/***/
113 "Delete", "Delete", "Delete", /**/"\177","\177","\177",/***/
114 "0x70", "0x70", "0x70", /**/"", "", "",/***/
115 "0x71", "0x71", "0x71", /**/"", "", "",/***/
116 "0x72", "0x72", "0x72", /**/"", "", "",/***/
117 "0x73", "0x73", "0x73", /**/"", "", "",/***/
118 "0x74", "0x74", "0x74", /**/"", "", "",/***/
119 "0x75", "0x75", "0x75", /**/"", "", "",/***/
120 "0x76", "0x76", "0x76", /**/"", "", "",/***/
121 "Pause", "Pause", "Pause", /**/"", "", "",/***/
122 "0x78", "0x78", "0x78", /**/"", "", "",/***/
123 "0x79", "0x79", "0x79", /**/"", "", "",/***/
124 "0x7a", "0x7a", "0x7a", /**/"", "", "",/***/
125 "0x7b", "0x7b", "0x7b", /**/"", "", "",/***/
126 "0x7c", "0x7c", "0x7c", /**/"", "", "",/***/
127 "Super_L", "Super_L", "Super_L", /**/"", "", "",/***/
128 "Super_R", "Super_R", "Super_R", /**/"", "", "",/***/
129 "0x7f", "0x7f", "0x7f", /**/"", "", "" /***/
diff --git a/libraries/ecore/src/lib/ecore_fb/ecore_fb_li.c b/libraries/ecore/src/lib/ecore_fb/ecore_fb_li.c
new file mode 100644
index 0000000..4a196dd
--- /dev/null
+++ b/libraries/ecore/src/lib/ecore_fb/ecore_fb_li.c
@@ -0,0 +1,706 @@
1#ifdef HAVE_CONFIG_H
2# include <config.h>
3#endif
4
5#include "Ecore_Fb.h"
6#include "ecore_fb_private.h"
7
8#define CLICK_THRESHOLD_DEFAULT 0.25
9
10static Eina_List *_ecore_fb_li_devices = NULL;
11
12static const char *_ecore_fb_li_kbd_syms[128 * 6] =
13{
14#include "ecore_fb_keytable.h"
15};
16
17/* Initial Copyright (C) Brad Hards (1999-2002),
18 * this function is used to tell if "bit" is set in "array"
19 * it selects a byte from the array, and does a boolean AND
20 * operation with a byte that only has the relevant bit set.
21 * eg. to check for the 12th bit, we do (array[1] & 1<<4).
22 * Moved to static inline in order to force compiler to otimized
23 * the unsued part away or force a link error if long has an unexpected
24 * size.
25 * - bigeasy
26 */
27extern int long_has_neither_32_nor_64_bits(void);
28static inline int
29test_bit(int bit, unsigned long *array)
30{
31 if (sizeof(long) == 4)
32 return array[bit / 32] & (1 << (bit % 32));
33 else if (sizeof(long) == 8)
34 return array[bit / 64] & (1 << (bit % 64));
35 else long_has_neither_32_nor_64_bits();
36}
37
38static void
39_ecore_fb_li_device_event_key(Ecore_Fb_Input_Device *dev, struct input_event *iev)
40{
41 if (!dev->listen) return;
42
43 /* check for basic keyboard keys */
44 if ((iev->code >= KEY_ESC) && (iev->code <= KEY_COMPOSE))
45 {
46 int offset = 0;
47 const char *keyname = _ecore_fb_li_kbd_syms[iev->code * 6];
48 /* check the key table */
49 if (iev->value)
50 {
51 /* its a repeated key, dont increment */
52 if (iev->value == 2)
53 return;
54 if (!strcmp(keyname, "Control_L"))
55 dev->keyboard.ctrl++;
56 else if (!strcmp(keyname, "Control_R"))
57 dev->keyboard.ctrl++;
58 else if (!strcmp(keyname, "Alt_L"))
59 dev->keyboard.alt++;
60 else if (!strcmp(keyname, "Alt_R"))
61 dev->keyboard.alt++;
62 else if (!strcmp(keyname, "Shift_L"))
63 dev->keyboard.shift++;
64 else if (!strcmp(keyname, "Shift_R"))
65 dev->keyboard.shift++;
66 else if (!strcmp(keyname, "Caps_Lock"))
67 dev->keyboard.lock = !dev->keyboard.lock;
68 if (dev->keyboard.ctrl > 2) dev->keyboard.ctrl = 2;
69 if (dev->keyboard.alt > 2) dev->keyboard.alt = 2;
70 if (dev->keyboard.shift > 2) dev->keyboard.shift = 2;
71 if (dev->keyboard.lock > 1) dev->keyboard.lock = 1;
72 }
73 else
74 {
75 if (!strcmp(keyname, "Control_L"))
76 dev->keyboard.ctrl--;
77 else if (!strcmp(keyname, "Control_R"))
78 dev->keyboard.ctrl--;
79 else if (!strcmp(keyname, "Alt_L"))
80 dev->keyboard.alt--;
81 else if (!strcmp(keyname, "Alt_R"))
82 dev->keyboard.alt--;
83 else if (!strcmp(keyname, "Shift_L"))
84 dev->keyboard.shift--;
85 else if (!strcmp(keyname, "Shift_R"))
86 dev->keyboard.shift--;
87 if (dev->keyboard.ctrl < 0) dev->keyboard.ctrl = 0;
88 if (dev->keyboard.alt < 0) dev->keyboard.alt = 0;
89 if (dev->keyboard.shift < 0) dev->keyboard.shift = 0;
90 if (dev->keyboard.lock < 0) dev->keyboard.lock = 0;
91 }
92
93 /* sending ecore_input_evas events */
94 Ecore_Event_Key *e;
95
96 if (dev->keyboard.shift) offset = 1;
97 else if (dev->keyboard.lock) offset = 2;
98
99 const char *key = _ecore_fb_li_kbd_syms[(iev->code * 6) + offset];
100 const char *compose = _ecore_fb_li_kbd_syms[(iev->code * 6) + 3 + offset];
101
102 e = calloc(1, sizeof(Ecore_Event_Key) + strlen(key) +
103 strlen(keyname) + (compose ? strlen(compose) : 0) + 3);
104 e->keyname = (char *)(e + 1);
105 e->key = e->keyname + strlen(keyname) + 1;
106 e->compose = (compose) ? e->key + strlen(key) + 1 : NULL;
107 e->string = e->compose;
108
109 strcpy((char *)e->keyname, keyname);
110 strcpy((char *)e->key, key);
111 if (compose)
112 strcpy((char *)e->compose, compose);
113
114 e->modifiers = 0;
115 if (dev->keyboard.shift)
116 e->modifiers |= ECORE_EVENT_MODIFIER_SHIFT;
117 if (dev->keyboard.ctrl) e->modifiers |= ECORE_EVENT_MODIFIER_CTRL;
118 if (dev->keyboard.alt) e->modifiers |= ECORE_EVENT_MODIFIER_SHIFT;
119 if (dev->keyboard.lock) e->modifiers |= ECORE_EVENT_LOCK_CAPS;
120
121 e->timestamp = ecore_time_get();
122 e->window = (Ecore_Window)dev->window;
123 e->event_window = (Ecore_Window)dev->window;
124 e->root_window = (Ecore_Window)dev->window;
125 e->same_screen = 1;
126
127 if (iev->value)
128 ecore_event_add(ECORE_EVENT_KEY_DOWN, e, NULL, NULL);
129 else
130 ecore_event_add(ECORE_EVENT_KEY_UP, e, NULL, NULL);
131 }
132 /* check for mouse button events */
133 else if ((iev->code >= BTN_MOUSE) && (iev->code < BTN_JOYSTICK))
134 {
135 int button;
136 Ecore_Event_Mouse_Button *e;
137 double current = ecore_time_get();
138
139 button = ((iev->code & 0x00F) + 1);
140 if (iev->value)
141 {
142 dev->mouse.did_double = EINA_FALSE;
143 dev->mouse.did_triple = EINA_FALSE;
144
145 if (((current - dev->mouse.prev) <= dev->mouse.threshold) &&
146 (button == dev->mouse.prev_button))
147 {
148 dev->mouse.did_double = EINA_TRUE;
149 if (((current - dev->mouse.last) <= (2 * dev->mouse.threshold)) &&
150 (button == dev->mouse.last_button))
151 {
152 dev->mouse.did_triple = EINA_TRUE;
153 /* reset */
154 dev->mouse.prev = 0;
155 dev->mouse.last = 0;
156 current = 0;
157 }
158 }
159 dev->mouse.last = dev->mouse.prev;
160 dev->mouse.prev = current;
161 dev->mouse.last_button = dev->mouse.prev_button;
162 dev->mouse.prev_button = button;
163 }
164
165 e = calloc(1, sizeof(Ecore_Event_Mouse_Button));
166 if (!e)
167 return;
168
169 e->timestamp = current;
170 e->window = (Ecore_Window)dev->window;
171 e->event_window = (Ecore_Window)dev->window;
172 e->root_window = (Ecore_Window)dev->window;
173 e->same_screen = 1;
174
175 e->modifiers = 0;
176 if (dev->keyboard.shift)
177 e->modifiers |= ECORE_EVENT_MODIFIER_SHIFT;
178 if (dev->keyboard.ctrl) e->modifiers |= ECORE_EVENT_MODIFIER_CTRL;
179 if (dev->keyboard.alt) e->modifiers |= ECORE_EVENT_MODIFIER_SHIFT;
180 if (dev->keyboard.lock) e->modifiers |= ECORE_EVENT_LOCK_CAPS;
181
182 e->x = dev->mouse.x;
183 e->y = dev->mouse.y;
184 e->root.x = e->x;
185 e->root.y = e->y;
186 e->buttons = button;
187
188 if (dev->mouse.did_double)
189 e->double_click = 1;
190 if (dev->mouse.did_triple)
191 e->triple_click = 1;
192
193 if (iev->value)
194 ecore_event_add(ECORE_EVENT_MOUSE_BUTTON_DOWN, e, NULL, NULL);
195 else
196 ecore_event_add(ECORE_EVENT_MOUSE_BUTTON_UP, e, NULL, NULL);
197 }
198}
199
200static void
201_ecore_fb_li_device_event_rel(Ecore_Fb_Input_Device *dev, struct input_event *iev)
202{
203 if (!dev->listen) return;
204 /* dispatch the button events if they are queued */
205 switch (iev->code)
206 {
207 case REL_X:
208 case REL_Y:
209 {
210 Ecore_Event_Mouse_Move *e;
211 if(iev->code == REL_X)
212 {
213 dev->mouse.x += iev->value;
214 if(dev->mouse.x > dev->mouse.w - 1)
215 dev->mouse.x = dev->mouse.w;
216 else if(dev->mouse.x < 0)
217 dev->mouse.x = 0;
218 }
219 else
220 {
221 dev->mouse.y += iev->value;
222 if(dev->mouse.y > dev->mouse.h - 1)
223 dev->mouse.y = dev->mouse.h;
224 else if(dev->mouse.y < 0)
225 dev->mouse.y = 0;
226 }
227
228 e = calloc(1, sizeof(Ecore_Event_Mouse_Move));
229 if (!e)
230 return;
231
232 e->window = (Ecore_Window)dev->window;
233 e->event_window = (Ecore_Window)dev->window;
234 e->root_window = (Ecore_Window)dev->window;
235 e->same_screen = 1;
236
237 e->modifiers = 0;
238 if (dev->keyboard.shift) e->modifiers |= ECORE_EVENT_MODIFIER_SHIFT;
239 if (dev->keyboard.ctrl) e->modifiers |= ECORE_EVENT_MODIFIER_CTRL;
240 if (dev->keyboard.alt) e->modifiers |= ECORE_EVENT_MODIFIER_SHIFT;
241 if (dev->keyboard.lock) e->modifiers |= ECORE_EVENT_LOCK_CAPS;
242
243 e->x = dev->mouse.x;
244 e->y = dev->mouse.y;
245 e->root.x = e->x;
246 e->root.y = e->y;
247
248 e->timestamp = ecore_time_get();
249
250 ecore_event_add(ECORE_EVENT_MOUSE_MOVE, e, NULL, NULL);
251
252 break;
253 }
254 case REL_WHEEL:
255 case REL_HWHEEL:
256 {
257 Ecore_Event_Mouse_Wheel *e;
258
259 e = calloc(1, sizeof(Ecore_Event_Mouse_Wheel));
260 if (!e)
261 return;
262
263 e->x = dev->mouse.x;
264 e->y = dev->mouse.y;
265 if (iev->code == REL_HWHEEL) e->direction = 1;
266 e->z = iev->value;
267 e->root.x = dev->mouse.x;
268 e->root.y = dev->mouse.y;
269
270 e->window = (Ecore_Window)dev->window;
271 e->event_window = (Ecore_Window)dev->window;
272 e->root_window = (Ecore_Window)dev->window;
273 e->same_screen = 1;
274
275 e->modifiers = 0;
276 if (dev->keyboard.shift) e->modifiers |= ECORE_EVENT_MODIFIER_SHIFT;
277 if (dev->keyboard.ctrl) e->modifiers |= ECORE_EVENT_MODIFIER_CTRL;
278 if (dev->keyboard.alt) e->modifiers |= ECORE_EVENT_MODIFIER_SHIFT;
279 if (dev->keyboard.lock) e->modifiers |= ECORE_EVENT_LOCK_CAPS;
280
281 e->timestamp = ecore_time_get();
282
283 ecore_event_add(ECORE_EVENT_MOUSE_WHEEL, e, NULL, NULL);
284
285 break;
286 }
287 default:
288 break;
289 }
290}
291
292static void
293_ecore_fb_li_device_event_abs(Ecore_Fb_Input_Device *dev, struct input_event *iev)
294{
295 static int prev_pressure = 0;
296 int pressure;
297
298 if (!dev->listen) return;
299 switch (iev->code)
300 {
301 case ABS_X:
302 if (dev->mouse.w != 0)
303 {
304 int tmp;
305
306 tmp = (int)((double)(iev->value - dev->mouse.min_w) / dev->mouse.rel_w);
307 if (tmp < 0) dev->mouse.x = 0;
308 else if (tmp > dev->mouse.w) dev->mouse.x = dev->mouse.w;
309 else dev->mouse.x = tmp;
310 dev->mouse.event = ECORE_EVENT_MOUSE_MOVE;
311 }
312 break;
313
314 case ABS_Y:
315 if(dev->mouse.h != 0)
316 {
317 int tmp;
318
319 tmp = (int)((double)(iev->value - dev->mouse.min_h) / dev->mouse.rel_h);
320 if (tmp < 0) dev->mouse.y = 0;
321 else if (tmp > dev->mouse.h) dev->mouse.y = dev->mouse.h;
322 else dev->mouse.y = tmp;
323 dev->mouse.event = ECORE_EVENT_MOUSE_MOVE;
324 }
325 break;
326
327 case ABS_PRESSURE:
328 pressure = iev->value;
329 if ((pressure) && (!prev_pressure))
330 {
331 /* DOWN: mouse is down, but was not before */
332 dev->mouse.event = ECORE_EVENT_MOUSE_BUTTON_DOWN;
333 }
334 else if ((!pressure) && (prev_pressure))
335 {
336 /* UP: mouse was down, but is not now */
337 dev->mouse.event = ECORE_EVENT_MOUSE_BUTTON_UP;
338 }
339 prev_pressure = pressure;
340 break;
341 }
342}
343
344static void
345_ecore_fb_li_device_event_syn(Ecore_Fb_Input_Device *dev, struct input_event *iev __UNUSED__)
346{
347 if (!dev->listen) return;
348
349 if (dev->mouse.event == ECORE_EVENT_MOUSE_MOVE)
350 {
351 Ecore_Event_Mouse_Move *ev;
352 ev = calloc(1,sizeof(Ecore_Event_Mouse_Move));
353 ev->x = dev->mouse.x;
354 ev->y = dev->mouse.y;
355 ev->root.x = ev->x;
356 ev->root.y = ev->y;
357 ev->timestamp = ecore_time_get();
358 }
359 else if (dev->mouse.event == ECORE_EVENT_MOUSE_BUTTON_DOWN)
360 {
361 Ecore_Event_Mouse_Button *ev;
362 ev = calloc(1, sizeof(Ecore_Event_Mouse_Button));
363 ev->x = dev->mouse.x;
364 ev->y = dev->mouse.y;
365 ev->root.x = ev->x;
366 ev->root.y = ev->y;
367 ev->buttons = 1;
368 ev->timestamp = ecore_time_get();
369 ecore_event_add(ECORE_EVENT_MOUSE_BUTTON_DOWN, ev, NULL, NULL);
370 }
371 else if (dev->mouse.event == ECORE_EVENT_MOUSE_BUTTON_UP)
372 {
373 Ecore_Event_Mouse_Button *ev;
374 ev = calloc(1, sizeof(Ecore_Event_Mouse_Button));
375 ev->x = dev->mouse.x;
376 ev->y = dev->mouse.y;
377 ev->root.x = ev->x;
378 ev->root.y = ev->y;
379 ev->buttons = 1;
380 ev->timestamp = ecore_time_get();
381 ecore_event_add(ECORE_EVENT_MOUSE_BUTTON_UP, ev, NULL, NULL);
382 }
383}
384
385static Eina_Bool
386_ecore_fb_li_device_fd_callback(void *data, Ecore_Fd_Handler *fdh __UNUSED__)
387{
388 Ecore_Fb_Input_Device *dev;
389 struct input_event ev[64];
390 int len;
391 int i;
392
393 dev = (Ecore_Fb_Input_Device*)data;
394 /* read up to 64 events at once */
395 len = read(dev->fd, &ev, sizeof(ev));
396 for(i = 0; i < (int)(len / sizeof(ev[0])); i++)
397 {
398 switch(ev[i].type)
399 {
400 case EV_SYN:
401 _ecore_fb_li_device_event_syn(dev, &ev[i]);
402 break;
403 case EV_ABS:
404 _ecore_fb_li_device_event_abs(dev, &ev[i]);
405 break;
406 case EV_REL:
407 _ecore_fb_li_device_event_rel(dev, &ev[i]);
408 break;
409 case EV_KEY:
410 _ecore_fb_li_device_event_key(dev, &ev[i]);
411 break;
412 default:
413 break;
414 }
415 }
416 return EINA_TRUE;
417}
418
419/**
420 * @addtogroup Ecore_FB_Group Ecore_FB - Frame buffer convenience functions.
421 *
422 * @{
423 */
424
425/**
426 * @brief Set the listen mode for an input device .
427 *
428 * @param dev The device to set the mode of.
429 * @param listen EINA_FALSE to disable listening mode, EINA_TRUE to enable it.
430 *
431 * This function enables or disables listening on the input device @p
432 * dev. If @p listen is #EINA_FALSE, listening mode is disabled, if it
433 * is #EINA_TRUE, it is enabled.
434 */
435EAPI void
436ecore_fb_input_device_listen(Ecore_Fb_Input_Device *dev, Eina_Bool listen)
437{
438 if (!dev) return;
439 if ((listen && dev->listen) || (!listen && !dev->listen)) return;
440 if (listen)
441 {
442 /* if the device already had a handler */
443 if (!dev->handler)
444 dev->handler = ecore_main_fd_handler_add(dev->fd, ECORE_FD_READ, _ecore_fb_li_device_fd_callback, dev, NULL, NULL);
445
446 }
447 dev->listen = listen;
448}
449
450#ifndef EV_CNT
451# define EV_CNT (EV_MAX+1)
452#endif
453
454/**
455 * @brief Associates an input device with the given @ref Ecore_Evas.
456 *
457 * @param dev The input being associated with an @ref Ecore_Evas (not @c NULL).
458 * @param window The window which this input is being associated to.
459 * @c NULL will remove any previous association.
460 *
461 * Events generated by this device will have a pointer to @p window. If this @p
462 * window is registered with ecore_event_window_register() or
463 * ecore_evas_input_event_register(), respective evas events will be delivered
464 * by the ecore_input_evas system. An example can be seen in the following code:
465 *
466 * @code
467 * Ecore_Evas *ee = ecore_evas_new(NULL, 0, 0, 800, 600, NULL);
468 *
469 * ecore_evas_input_event_register(ee);
470 *
471 * device = ecore_fb_input_device_open(device_path);
472 * if (device)
473 * ecore_fb_input_device_window_set(device, ee);
474 *
475 * @endcode
476 *
477 * On the previous code, all input captured on the mentioned device will be
478 * delivered to the @Ecore_Evas @c ee.
479 *
480 * @since 1.1
481 */
482EAPI void
483ecore_fb_input_device_window_set(Ecore_Fb_Input_Device *dev, void *window)
484{
485 if (!dev) return;
486
487 dev->window = window;
488}
489
490/**
491 * @brief Open an input device.
492 *
493 * @param dev The device to open.
494 * @return The @ref Ecore_Fb_Input_Device object that has been opened.
495 *
496 * This function opens the input device named @p dev and returns the
497 * object for it, or returns @c NULL on failure.
498 */
499EAPI Ecore_Fb_Input_Device *
500ecore_fb_input_device_open(const char *dev)
501{
502 Ecore_Fb_Input_Device *device;
503 unsigned long event_type_bitmask[EV_CNT / 32 + 1];
504 int event_type;
505 int fd;
506
507 if (!dev) return NULL;
508 device = calloc(1, sizeof(Ecore_Fb_Input_Device));
509 if (!device) return NULL;
510
511 if ((fd = open(dev, O_RDONLY, O_NONBLOCK)) < 0)
512 {
513 fprintf(stderr, "[ecore_fb_li:device_open] %s %s", dev, strerror(errno));
514 goto error_open;
515 }
516 /* query capabilities */
517 if (ioctl(fd, EVIOCGBIT(0, EV_MAX), event_type_bitmask) < 0)
518 {
519 fprintf(stderr,"[ecore_fb_li:device_open] query capabilities %s %s", dev, strerror(errno));
520 goto error_caps;
521 }
522 /* query name */
523 device->info.name = calloc(256, sizeof(char));
524 if (ioctl(fd, EVIOCGNAME(sizeof(char) * 256), device->info.name) < 0)
525 {
526 fprintf(stderr, "[ecore_fb_li:device_open] get name %s %s", dev, strerror(errno));
527 strcpy(device->info.name, "Unknown");
528 }
529 device->fd = fd;
530 device->info.dev = strdup(dev);
531 /* common */
532 device->mouse.threshold = CLICK_THRESHOLD_DEFAULT;
533
534 /* set info */
535 for (event_type = 0; event_type < EV_MAX; event_type++)
536 {
537 if(!test_bit(event_type, event_type_bitmask))
538 continue;
539 switch (event_type)
540 {
541 case EV_SYN:
542 break;
543 case EV_KEY:
544 device->info.cap |= ECORE_FB_INPUT_DEVICE_CAP_KEYS_OR_BUTTONS;
545 break;
546 case EV_REL:
547 device->info.cap |= ECORE_FB_INPUT_DEVICE_CAP_RELATIVE;
548 break;
549 case EV_ABS:
550 device->info.cap |= ECORE_FB_INPUT_DEVICE_CAP_ABSOLUTE;
551 break;
552 case EV_MSC:
553 case EV_LED:
554 case EV_SND:
555 case EV_REP:
556 case EV_FF :
557 case EV_FF_STATUS:
558 case EV_PWR:
559 default:
560 break;
561 }
562 }
563
564 _ecore_fb_li_devices = eina_list_append(_ecore_fb_li_devices, device);
565 return device;
566
567error_caps:
568 close(fd);
569error_open:
570 free(device);
571 return NULL;
572}
573
574/**
575 * @brief Close the given device.
576 *
577 * @param dev The device to close
578 *
579 * This function closes the device @p dev. If @p dev is @c NULL, this
580 * function does nothing.
581 */
582EAPI void
583ecore_fb_input_device_close(Ecore_Fb_Input_Device *dev)
584{
585 if (!dev || dev->fd < 0) return;
586 /* close the fd */
587 close(dev->fd);
588 /* remove the element from the list */
589 _ecore_fb_li_devices = eina_list_remove(_ecore_fb_li_devices, dev);
590 free(dev);
591}
592
593
594/**
595 * @brief Set the axis size of the given device.
596 *
597 * @param dev The device to set the axis size to.
598 * @param w The width of the axis.
599 * @param h The height of the axis.
600 *
601 * This function sets set the width @p w and height @p h of the axis
602 * of device @p dev. If @p dev is a relative input device, a width and
603 * height must set for it. If its absolute set the ioctl correctly, if
604 * not, unsupported device.
605 */
606EAPI void
607ecore_fb_input_device_axis_size_set(Ecore_Fb_Input_Device *dev, int w, int h)
608{
609 if (!dev) return;
610 if ((w < 0) || (h < 0)) return;
611 /* FIXME
612 * this code is for a touchscreen device,
613 * make it configurable (ABSOLUTE | RELATIVE)
614 */
615 if (dev->info.cap & ECORE_FB_INPUT_DEVICE_CAP_ABSOLUTE)
616 {
617 /* FIXME looks like some kernels dont include this struct */
618 struct input_absinfo abs_features;
619
620 ioctl(dev->fd, EVIOCGABS(ABS_X), &abs_features);
621 dev->mouse.min_w = abs_features.minimum;
622 dev->mouse.rel_w = (double)(abs_features.maximum - abs_features.minimum)/(double)(w);
623
624 ioctl(dev->fd, EVIOCGABS(ABS_Y), &abs_features);
625 dev->mouse.min_h = abs_features.minimum;
626 dev->mouse.rel_h = (double)(abs_features.maximum - abs_features.minimum)/(double)(h);
627 }
628 else if (!(dev->info.cap & ECORE_FB_INPUT_DEVICE_CAP_RELATIVE))
629 return;
630
631 /* update the local values */
632 if (dev->mouse.x > w - 1) dev->mouse.x = w -1;
633 if (dev->mouse.y > h - 1) dev->mouse.y = h -1;
634 dev->mouse.w = w;
635 dev->mouse.h = h;
636}
637
638/**
639 * @brief Retrieve the name of the given device.
640 *
641 * @param dev The device to get the name from.
642 * @return The name of the device.
643 *
644 * This function returns the name of the device @p dev. If @p dev is
645 * @c NULL, this function returns @c NULL.
646 */
647EAPI const char *
648ecore_fb_input_device_name_get(Ecore_Fb_Input_Device *dev)
649{
650 if (!dev) return NULL;
651 return dev->info.name;
652}
653
654/**
655 * @brief Retrieve the capability of the given device.
656 *
657 * @param dev The device to get the name from.
658 * @return The capability of the device.
659 *
660 * This function returns the capability of the device @p dev. If @p dev is
661 * @c NULL, this function returns #ECORE_FB_INPUT_DEVICE_CAP_NONE.
662 */
663EAPI Ecore_Fb_Input_Device_Cap
664ecore_fb_input_device_cap_get(Ecore_Fb_Input_Device *dev)
665{
666 if (!dev) return ECORE_FB_INPUT_DEVICE_CAP_NONE;
667 return dev->info.cap;
668}
669
670/**
671 * @brief Set the threshold of mouse clicks of the given device.
672 *
673 * @param dev The device to set the threshodl mouse click to.
674 * @param threshold The threshold value.
675 *
676 * This function sets the threshold of mouse clicks of the device
677 * @p dev to @p threshold. If @p dev is @c NULL, this function does
678 * nothing.
679 */
680EAPI void
681ecore_fb_input_device_threshold_click_set(Ecore_Fb_Input_Device *dev, double threshold)
682{
683 if (!dev) return;
684 if ((threshold == dev->mouse.threshold) || (threshold == 0)) return;
685 dev->mouse.threshold = threshold;
686}
687
688/**
689 * @brief Get the threshold of mouse clicks of the given device.
690 *
691 * @param dev The device to set the threshodl mouse click from.
692 * @return The threshold value.
693 *
694 * This function returns the threshold of mouse clicks of the device
695 * @p dev. If @p dev is @c NULL, this function returns 0.0.
696 */
697EAPI double
698ecore_fb_input_device_threshold_click_get(Ecore_Fb_Input_Device *dev)
699{
700 if (!dev) return 0;
701 return dev->mouse.threshold;
702}
703
704/**
705 * @}
706 */
diff --git a/libraries/ecore/src/lib/ecore_fb/ecore_fb_private.h b/libraries/ecore/src/lib/ecore_fb/ecore_fb_private.h
new file mode 100644
index 0000000..3e908a0
--- /dev/null
+++ b/libraries/ecore/src/lib/ecore_fb/ecore_fb_private.h
@@ -0,0 +1,91 @@
1#ifndef _ECORE_FB_PRIVATE_H
2#define _ECORE_FB_PRIVATE_H
3
4#include "Ecore.h"
5#include "ecore_private.h"
6#include "Ecore_Input.h"
7
8#include <stdio.h>
9#include <string.h>
10#include <unistd.h>
11#include <termios.h>
12#include <sys/types.h>
13#include <sys/stat.h>
14#include <sys/ioctl.h>
15#include <linux/version.h>
16#include <linux/kd.h>
17#include <linux/vt.h>
18#include <linux/fb.h>
19#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,15)) && (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,18))
20 #define kernel_ulong_t unsigned long
21 #define BITS_PER_LONG 32
22 #include <linux/input.h>
23 #undef kernel_ulong_t
24 #undef BITS_PER_LONG
25#else
26 #include <linux/input.h>
27#endif
28
29#include <signal.h>
30#include <fcntl.h>
31#include <errno.h>
32
33/* ecore_fb_li.c */
34struct _Ecore_Fb_Input_Device
35{
36 int fd;
37 Ecore_Fd_Handler *handler;
38 int listen;
39 struct {
40 Ecore_Fb_Input_Device_Cap cap;
41 char *name;
42 char *dev;
43 } info;
44 struct
45 {
46 /* common mouse */
47 int x,y;
48 int w,h;
49
50 double last;
51 double prev;
52 double threshold;
53 Eina_Bool did_double;
54 Eina_Bool did_triple;
55 /* absolute axis */
56 int min_w, min_h;
57 double rel_w, rel_h;
58 int event;
59 int prev_button;
60 int last_button;
61 } mouse;
62 struct
63 {
64 int shift;
65 int ctrl;
66 int alt;
67 int lock;
68 } keyboard;
69 void *window;
70};
71
72/* ecore_fb_ts.c */
73EAPI int ecore_fb_ts_init(void);
74EAPI void ecore_fb_ts_shutdown(void);
75EAPI void ecore_fb_ts_events_window_set(void *window);
76EAPI void *ecore_fb_ts_events_window_get(void);
77EAPI void ecore_fb_ts_event_window_set(void *window);
78
79/* ecore_fb_vt.c */
80int ecore_fb_vt_init(void);
81void ecore_fb_vt_shutdown(void);
82
83/* hacks to stop people NEEDING #include <linux/h3600_ts.h> */
84#ifndef TS_SET_CAL
85#define TS_SET_CAL 0x4014660b
86#endif
87#ifndef TS_GET_CAL
88#define TS_GET_CAL 0x8014660a
89#endif
90
91#endif
diff --git a/libraries/ecore/src/lib/ecore_fb/ecore_fb_ts.c b/libraries/ecore/src/lib/ecore_fb/ecore_fb_ts.c
new file mode 100644
index 0000000..395e768
--- /dev/null
+++ b/libraries/ecore/src/lib/ecore_fb/ecore_fb_ts.c
@@ -0,0 +1,355 @@
1#ifdef HAVE_CONFIG_H
2# include <config.h>
3#endif
4
5#ifdef HAVE_TSLIB
6# include <tslib.h>
7# include <errno.h>
8#endif
9
10#include "Ecore_Fb.h"
11#include "ecore_fb_private.h"
12
13typedef struct _Ecore_Fb_Ts_Event Ecore_Fb_Ts_Event;
14typedef struct _Ecore_Fb_Ts_Calibrate Ecore_Fb_Ts_Calibrate;
15typedef struct _Ecore_Fb_Ts_Backlight Ecore_Fb_Ts_Backlight;
16typedef struct _Ecore_Fb_Ts_Contrast Ecore_Fb_Ts_Contrast;
17typedef struct _Ecore_Fb_Ts_Led Ecore_Fb_Ts_Led;
18typedef struct _Ecore_Fb_Ts_Flite Ecore_Fb_Ts_Flite;
19
20struct _Ecore_Fb_Ts_Event
21{
22 unsigned short pressure;
23 unsigned short x;
24 unsigned short y;
25 unsigned short _unused;
26};
27
28struct _Ecore_Fb_Ts_Calibrate
29{
30 int xscale;
31 int xtrans;
32 int yscale;
33 int ytrans;
34 int xyswap;
35};
36
37struct _Ecore_Fb_Ts_Backlight
38{
39 int on;
40 unsigned char brightness;
41};
42
43struct _Ecore_Fb_Ts_Contrast
44{
45 unsigned char contrast;
46};
47
48struct _Ecore_Fb_Ts_Led
49{
50 unsigned char on;
51 unsigned char blink_time;
52 unsigned char on_time;
53 unsigned char off_time;
54};
55
56struct _Ecore_Fb_Ts_Flite
57{
58 unsigned char mode;
59 unsigned char pwr;
60 unsigned char brightness;
61};
62
63static Eina_Bool _ecore_fb_ts_fd_handler(void *data, Ecore_Fd_Handler *fd_handler);
64static int _ecore_fb_ts_fd = -1;
65static int _ecore_fb_ts_event_byte_count = 0;
66static int _ecore_fb_ts_apply_cal = 0;
67static Ecore_Fb_Ts_Event _ecore_fb_ts_event;
68static Ecore_Fb_Ts_Calibrate _ecore_fb_ts_cal = {1,1,0,0,0};
69static Ecore_Fd_Handler *_ecore_fb_ts_fd_handler_handle = NULL;
70
71#ifdef HAVE_TSLIB
72struct tsdev *_ecore_fb_tslib_tsdev = NULL;
73struct ts_sample _ecore_fb_tslib_event;
74#endif
75
76static double _ecore_fb_double_click_time = 0.25;
77static void *_ecore_fb_ts_event_window = NULL;
78
79EAPI int
80ecore_fb_ts_init(void)
81{
82#ifdef HAVE_TSLIB
83 char *tslib_tsdevice = NULL;
84 if ( (tslib_tsdevice = getenv("TSLIB_TSDEVICE")) )
85 {
86 printf( "ECORE_FB: TSLIB_TSDEVICE = '%s'\n", tslib_tsdevice );
87 _ecore_fb_tslib_tsdev = ts_open( tslib_tsdevice, 1 ); /* 1 = nonblocking, 0 = blocking */
88
89 if ( !_ecore_fb_tslib_tsdev )
90 {
91 printf( "ECORE_FB: Can't ts_open (%s)\n", strerror( errno ) );
92 return 0;
93 }
94
95 if ( ts_config( _ecore_fb_tslib_tsdev ) )
96 {
97 printf( "ECORE_FB: Can't ts_config (%s)\n", strerror( errno ) );
98 return 0;
99 }
100 _ecore_fb_ts_fd = ts_fd( _ecore_fb_tslib_tsdev );
101 if ( _ecore_fb_ts_fd < 0 )
102 {
103 printf( "ECORE_FB: Can't open touchscreen (%s)\n", strerror( errno ) );
104 return 0;
105 }
106 }
107#else
108 _ecore_fb_ts_fd = open("/dev/touchscreen/0", O_RDONLY);
109#endif
110 if (_ecore_fb_ts_fd >= 0)
111 {
112 _ecore_fb_ts_fd_handler_handle = ecore_main_fd_handler_add(_ecore_fb_ts_fd,
113 ECORE_FD_READ,
114 _ecore_fb_ts_fd_handler, NULL,
115 NULL, NULL);
116 if (!_ecore_fb_ts_fd_handler_handle)
117 {
118 close(_ecore_fb_ts_fd);
119 return 0;
120 }
121 // FIXME _ecore_fb_kbd_fd = open("/dev/touchscreen/key", O_RDONLY);
122 return 1;
123 }
124 return 0;
125}
126
127EAPI void
128ecore_fb_ts_shutdown(void)
129{
130 if (_ecore_fb_ts_fd_handler_handle)
131 ecore_main_fd_handler_del(_ecore_fb_ts_fd_handler_handle);
132 if (_ecore_fb_ts_fd >= 0) close(_ecore_fb_ts_fd);
133 _ecore_fb_ts_fd = -1;
134 _ecore_fb_ts_fd_handler_handle = NULL;
135 _ecore_fb_ts_event_window = NULL;
136}
137
138EAPI void
139ecore_fb_ts_event_window_set(void *window)
140{
141 _ecore_fb_ts_event_window = window;
142}
143
144EAPI void *
145ecore_fb_ts_event_window_get(void)
146{
147 return _ecore_fb_ts_event_window;
148}
149
150/**
151 * @defgroup Ecore_FB_Calibrate_Group Framebuffer Calibration Functions
152 *
153 * Functions that calibrate the screen.
154 */
155
156
157/**
158 * Calibrates the touschreen using the given parameters.
159 * @param xscale X scaling, where 256 = 1.0
160 * @param xtrans X translation.
161 * @param yscale Y scaling.
162 * @param ytrans Y translation.
163 * @param xyswap Swap X & Y flag.
164 * @ingroup Ecore_FB_Calibrate_Group
165 */
166EAPI void
167ecore_fb_touch_screen_calibrate_set(int xscale, int xtrans, int yscale, int ytrans, int xyswap)
168{
169 Ecore_Fb_Ts_Calibrate cal;
170
171 if (_ecore_fb_ts_fd < 0) return;
172 cal.xscale = xscale;
173 cal.xtrans = xtrans;
174 cal.yscale = yscale;
175 cal.ytrans = ytrans;
176 cal.xyswap = xyswap;
177 if (ioctl(_ecore_fb_ts_fd, TS_SET_CAL, (void *)&cal))
178 {
179 _ecore_fb_ts_cal = cal;
180 _ecore_fb_ts_apply_cal = 1;
181 }
182}
183
184/**
185 * Retrieves the calibration parameters of the touchscreen.
186 * @param xscale Pointer to an integer in which to store the X scaling.
187 * Note that 256 = 1.0.
188 * @param xtrans Pointer to an integer in which to store the X translation.
189 * @param yscale Pointer to an integer in which to store the Y scaling.
190 * @param ytrans Pointer to an integer in which to store the Y translation.
191 * @param xyswap Pointer to an integer in which to store the Swap X & Y flag.
192 * @ingroup Ecore_FB_Calibrate_Group
193 */
194EAPI void
195ecore_fb_touch_screen_calibrate_get(int *xscale, int *xtrans, int *yscale, int *ytrans, int *xyswap)
196{
197 Ecore_Fb_Ts_Calibrate cal;
198
199 if (_ecore_fb_ts_fd < 0) return;
200 if (!_ecore_fb_ts_apply_cal)
201 {
202 if (ioctl(_ecore_fb_ts_fd, TS_GET_CAL, (void *)&cal))
203 _ecore_fb_ts_cal = cal;
204 }
205 else
206 cal = _ecore_fb_ts_cal;
207 if (xscale) *xscale = cal.xscale;
208 if (xtrans) *xtrans = cal.xtrans;
209 if (yscale) *yscale = cal.yscale;
210 if (ytrans) *ytrans = cal.ytrans;
211 if (xyswap) *xyswap = cal.xyswap;
212}
213
214static Eina_Bool
215_ecore_fb_ts_fd_handler(void *data __UNUSED__, Ecore_Fd_Handler *fd_handler __UNUSED__)
216{
217 static int prev_x = 0, prev_y = 0, prev_pressure = 0;
218 static double last_time = 0;
219 static double last_last_time = 0;
220 int v = 0;
221
222 do
223 {
224 int x, y, pressure;
225 int num;
226 char *ptr;
227 double t = 0.0;
228 static int did_double = 0;
229 static int did_triple = 0;
230
231#ifdef HAVE_TSLIB
232 if (_ecore_fb_ts_apply_cal)
233 num = ts_read_raw(_ecore_fb_tslib_tsdev, &_ecore_fb_tslib_event, 1);
234 else
235 num = ts_read(_ecore_fb_tslib_tsdev, &_ecore_fb_tslib_event, 1);
236 if (num != 1) return 1; /* no more samples at this time */
237 x = _ecore_fb_tslib_event.x;
238 y = _ecore_fb_tslib_event.y;
239 pressure = _ecore_fb_tslib_event.pressure;
240 v = 1; /* loop, there might be more samples */
241 t = ecore_time_get();
242#else
243 ptr = (char *)&(_ecore_fb_ts_event);
244 ptr += _ecore_fb_ts_event_byte_count;
245 num = sizeof(Ecore_Fb_Ts_Event) - _ecore_fb_ts_event_byte_count;
246 v = read(_ecore_fb_ts_fd, ptr, num);
247 if (v < 0) return 1;
248 _ecore_fb_ts_event_byte_count += v;
249 if (v < num) return 1;
250 _ecore_fb_ts_event_byte_count = 0;
251 if (_ecore_fb_ts_apply_cal)
252 {
253 x = ((_ecore_fb_ts_cal.xscale * _ecore_fb_ts_event.x) >> 8) + _ecore_fb_ts_cal.xtrans;
254 y = ((_ecore_fb_ts_cal.yscale * _ecore_fb_ts_event.y) >> 8) + _ecore_fb_ts_cal.ytrans;
255 }
256 else
257 {
258 x = _ecore_fb_ts_event.x;
259 y = _ecore_fb_ts_event.y;
260 }
261 pressure = _ecore_fb_ts_event.pressure;
262#endif
263 /* add event to queue */
264 /* always add a move event */
265 if ((pressure) || (prev_pressure))
266 {
267 /* MOVE: mouse is down and was */
268 Ecore_Event_Mouse_Move *e;
269
270 e = calloc(1, sizeof(Ecore_Event_Mouse_Move));
271 if (!e) goto retry;
272 e->x = x;
273 e->y = y;
274 e->root.x = x;
275 e->root.y = y;
276 e->window = (Ecore_Window)_ecore_fb_ts_event_window;
277 e->event_window = e->window;
278 e->root_window = e->window;
279 e->same_screen = 1;
280 ecore_event_add(ECORE_EVENT_MOUSE_MOVE, e, NULL, NULL);
281 }
282 if ((pressure) && (!prev_pressure))
283 {
284 /* DOWN: mouse is down, but was not now */
285 Ecore_Event_Mouse_Button *e;
286
287 e = calloc(1, sizeof(Ecore_Event_Mouse_Button));
288 if (!e) goto retry;
289 e->x = x;
290 e->y = y;
291 e->buttons = 1;
292 if ((t - last_time) <= _ecore_fb_double_click_time)
293 {
294 e->double_click = 1;
295 did_double = 1;
296 }
297 else
298 {
299 did_double = 0;
300 did_triple = 0;
301 }
302 if ((t - last_last_time) <= (2 * _ecore_fb_double_click_time))
303 {
304 did_triple = 1;
305 e->triple_click = 1;
306 }
307 else
308 {
309 did_triple = 0;
310 }
311 e->window = (Ecore_Window)_ecore_fb_ts_event_window;
312 e->event_window = e->window;
313 e->root_window = e->window;
314 e->same_screen = 1;
315 ecore_event_add(ECORE_EVENT_MOUSE_BUTTON_DOWN, e, NULL, NULL);
316 }
317 else if ((!pressure) && (prev_pressure))
318 {
319 /* UP: mouse was down, but is not now */
320 Ecore_Event_Mouse_Button *e;
321
322 e = calloc(1, sizeof(Ecore_Event_Mouse_Button));
323 if (!e) goto retry;
324 e->x = prev_x;
325 e->y = prev_y;
326 e->buttons = 1;
327 if (did_double)
328 e->double_click = 1;
329 if (did_triple)
330 e->triple_click = 1;
331 e->window = (Ecore_Window)_ecore_fb_ts_event_window;
332 e->event_window = e->window;
333 e->root_window = e->window;
334 e->same_screen = 1;
335 ecore_event_add(ECORE_EVENT_MOUSE_BUTTON_UP, e, NULL, NULL);
336 }
337 if (did_triple)
338 {
339 last_time = 0;
340 last_last_time = 0;
341 }
342 else
343 {
344 last_last_time = last_time;
345 last_time = t;
346 }
347retry:
348 prev_x = x;
349 prev_y = y;
350 prev_pressure = pressure;
351 }
352 while (v > 0);
353 return 1;
354}
355
diff --git a/libraries/ecore/src/lib/ecore_fb/ecore_fb_vt.c b/libraries/ecore/src/lib/ecore_fb/ecore_fb_vt.c
new file mode 100644
index 0000000..09e3f37
--- /dev/null
+++ b/libraries/ecore/src/lib/ecore_fb/ecore_fb_vt.c
@@ -0,0 +1,322 @@
1#ifdef HAVE_CONFIG_H
2# include <config.h>
3#endif
4
5#include "Ecore_Fb.h"
6#include "ecore_fb_private.h"
7
8static int _ecore_fb_vt_do_switch = 0;
9
10static int _ecore_fb_vt_tty0_fd = -1;
11static int _ecore_fb_vt_tty_fd = -1;
12static int _ecore_fb_vt_current_vt = 0;
13static int _ecore_fb_vt_prev_vt = 0;
14
15static struct termios _ecore_fb_tty_prev_tio_mode;
16static struct vt_mode _ecore_fb_vt_prev_mode;
17
18static Eina_Bool _ecore_fb_signal_usr_handler(void *data, int type, void *ev);
19static Ecore_Event_Handler *_ecore_fb_user_handler = NULL;
20static int _ecore_fb_tty_prev_mode = 0;
21static int _ecore_fb_tty_prev_kd_mode = 0;
22
23/* callbacks for an attach/release of a vt */
24static void (*_ecore_fb_func_fb_lost) (void *data) = NULL;
25static void *_ecore_fb_func_fb_lost_data = NULL;
26static void (*_ecore_fb_func_fb_gain) (void *data) = NULL;
27static void *_ecore_fb_func_fb_gain_data = NULL;
28
29/* FIXME what is the filter for? */
30static Ecore_Event_Filter *_ecore_fb_filter_handler = NULL;
31
32/* prototypes */
33/* XXX: unused
34static void _ecore_fb_vt_switch(int vt);
35static void *_ecore_fb_event_filter_start(void *data);
36static Eina_Bool _ecore_fb_event_filter_filter(void *data, void *loop_data, int type, void *event);
37static void _ecore_fb_event_filter_end(void *data, void *loop_data);
38*/
39
40static Eina_Bool
41_ecore_fb_signal_usr_handler(void *data __UNUSED__, int type __UNUSED__, void *ev)
42{
43 Ecore_Event_Signal_User *e;
44
45 e = (Ecore_Event_Signal_User *)ev;
46 if (e->number == 1)
47 {
48 /* release vt */
49 if (_ecore_fb_func_fb_lost) _ecore_fb_func_fb_lost(_ecore_fb_func_fb_lost_data);
50 /* TODO stop listening from the devices? let the callback do it? */
51 ioctl(_ecore_fb_vt_tty_fd, VT_RELDISP, 1);
52 }
53 else if (e->number == 2)
54 {
55 /* attach vt */
56 if (_ecore_fb_func_fb_gain) _ecore_fb_func_fb_gain(_ecore_fb_func_fb_gain_data);
57 /* TODO reattach all devices */
58 }
59 return 1;
60}
61
62/* XXX: unused
63static void
64_ecore_fb_vt_switch(int vt)
65{
66 vt++;
67 if (_ecore_fb_vt_tty_fd != 0)
68 {
69 if (vt != _ecore_fb_vt_current_vt)
70 {
71 tcsetattr(_ecore_fb_vt_tty_fd, TCSAFLUSH, &_ecore_fb_tty_prev_tio_mode);
72 ioctl(_ecore_fb_vt_tty_fd, KDSETMODE, _ecore_fb_tty_prev_kd_mode);
73 ioctl(_ecore_fb_vt_tty_fd, KDSKBMODE, _ecore_fb_tty_prev_mode);
74 }
75 }
76 ioctl(_ecore_fb_vt_tty_fd, VT_ACTIVATE, vt);
77}
78*/
79
80static int
81_ecore_fb_vt_setup(void)
82{
83 char buf[64];
84// XXX: unused
85// struct termios tio;
86 struct vt_mode new_vtmode;
87
88 if (_ecore_fb_vt_current_vt != _ecore_fb_vt_prev_vt)
89 {
90 snprintf(buf, sizeof(buf), "/dev/tty%i", _ecore_fb_vt_current_vt);
91 if ((_ecore_fb_vt_tty_fd = open(buf, O_RDWR)) < 0)
92 {
93 printf("[ecore_fb:vt_setup] can't open tty %d\n", _ecore_fb_vt_current_vt);
94 return 0;
95 }
96 close(_ecore_fb_vt_tty0_fd);
97 _ecore_fb_vt_tty0_fd = -1;
98 /* FIXME detach the process from current tty ? */
99 }
100 else
101 _ecore_fb_vt_tty_fd = _ecore_fb_vt_tty0_fd;
102 /* for backup */
103 tcgetattr(_ecore_fb_vt_tty_fd, &_ecore_fb_tty_prev_tio_mode);
104 ioctl(_ecore_fb_vt_tty_fd, KDGETMODE, &_ecore_fb_tty_prev_kd_mode);
105 ioctl(_ecore_fb_vt_tty_fd, VT_GETMODE, &_ecore_fb_vt_prev_mode);
106
107 if (ioctl(_ecore_fb_vt_tty_fd, KDSETMODE, KD_GRAPHICS) < 0)
108 {
109 perror("[ecore_fb:vt_setup] can't set the mode to KD_GRAPHICS");
110 close(_ecore_fb_vt_tty_fd);
111 _ecore_fb_vt_tty_fd = -1;
112 return 0;
113 }
114 ioctl(_ecore_fb_vt_tty_fd, KDGKBMODE, &_ecore_fb_tty_prev_mode);
115
116 /* support of switching */
117 new_vtmode.mode = VT_PROCESS;
118 new_vtmode.waitv = 0;
119 new_vtmode.relsig = SIGUSR1;
120 new_vtmode.acqsig = SIGUSR2;
121 if (ioctl(_ecore_fb_vt_tty_fd, VT_SETMODE, &new_vtmode) < 0)
122 {
123 perror("[ecore_fb:vt_setup] can't set the tty mode");
124 close(_ecore_fb_vt_tty_fd);
125 _ecore_fb_vt_tty_fd = -1;
126 return 0;
127 }
128 /* register signal handlers when alloc/detach of vt */
129 _ecore_fb_user_handler = ecore_event_handler_add(ECORE_EVENT_SIGNAL_USER,
130 _ecore_fb_signal_usr_handler,
131 NULL);
132 /* What does this do? */
133 /*
134 _ecore_fb_filter_handler = ecore_event_filter_add(_ecore_fb_event_filter_start, _ecore_fb_event_filter_filter, _ecore_fb_event_filter_end, NULL);
135 */
136
137 usleep(40000);
138 if (ioctl(_ecore_fb_vt_tty_fd, VT_ACTIVATE, _ecore_fb_vt_current_vt) < 0)
139 {
140 perror("[ecore_fb:vt_setup] error on VT_ACTIVATE");
141 close(_ecore_fb_vt_tty_fd);
142 _ecore_fb_vt_tty_fd = -1;
143 return 0;
144 }
145 if(ioctl(_ecore_fb_vt_tty_fd, VT_WAITACTIVE, _ecore_fb_vt_current_vt) < 0)
146 {
147 perror("[ecore_fb:vt_setup] error on VT_WAITACTIVE");
148 close(_ecore_fb_vt_tty_fd);
149 _ecore_fb_vt_tty_fd = -1;
150 return 0;
151 }
152 /* FIXME assign the fb to the tty in case isn't setup */
153 return 1;
154}
155
156int
157ecore_fb_vt_init(void)
158{
159 struct vt_stat vtstat;
160
161 /* as root you can allocate another tty */
162 if (!geteuid())
163 _ecore_fb_vt_do_switch = 1;
164 if ((_ecore_fb_vt_tty0_fd = open("/dev/tty0", O_RDONLY)) < 0)
165 {
166 printf("[ecore_fb:init] can't open /dev/tty0\n");
167 return 0;
168 }
169 /* query current vt state */
170 if ((ioctl(_ecore_fb_vt_tty0_fd, VT_GETSTATE, &vtstat)) < 0)
171 {
172 printf("[ecore_fb:init] can't get current tty state\n");
173 return 0;
174 }
175 _ecore_fb_vt_prev_vt = vtstat.v_active;
176 /* switch to another tty */
177 if (_ecore_fb_vt_do_switch)
178 {
179 int vtno;
180
181 if ((ioctl(_ecore_fb_vt_tty0_fd, VT_OPENQRY, &vtno) < 0))
182 {
183 printf("[ecore_fb:init] can't query for a vt\n");
184 return 0;
185 }
186 _ecore_fb_vt_current_vt = vtno;
187 }
188 /* use current tty */
189 else
190 _ecore_fb_vt_current_vt = _ecore_fb_vt_prev_vt;
191 if (!_ecore_fb_vt_setup())
192 {
193 printf("[ecore_fb:init] can't setup the vt, restoring previous mode...\n");
194 /* TODO finish this */
195 if (_ecore_fb_vt_do_switch)
196 {
197 printf("[ecore_fb:init] switching back to vt %d\n", _ecore_fb_vt_prev_vt);
198 }
199 return 0;
200 }
201 return 1;
202}
203
204void
205ecore_fb_vt_shutdown(void)
206{
207 /* restore the previous mode */
208 if (_ecore_fb_vt_tty_fd != -1)
209 {
210 tcsetattr(_ecore_fb_vt_tty_fd, TCSAFLUSH, &_ecore_fb_tty_prev_tio_mode);
211 ioctl(_ecore_fb_vt_tty_fd, KDSETMODE, _ecore_fb_tty_prev_kd_mode);
212 ioctl(_ecore_fb_vt_tty_fd, KDSKBMODE, _ecore_fb_tty_prev_mode);
213 ioctl(_ecore_fb_vt_tty_fd, VT_SETMODE, &_ecore_fb_vt_prev_mode);
214 /* go back to previous vt */
215 close(_ecore_fb_vt_tty_fd);
216 _ecore_fb_vt_tty_fd = -1;
217 }
218
219 if (_ecore_fb_user_handler) ecore_event_handler_del(_ecore_fb_user_handler);
220 _ecore_fb_user_handler = NULL;
221
222 if (_ecore_fb_filter_handler) ecore_event_filter_del(_ecore_fb_filter_handler);
223 _ecore_fb_filter_handler = NULL;
224}
225
226/**
227 * @addtogroup Ecore_FB_Group Ecore_FB - Frame buffer convenience functions.
228 *
229 * @{
230 */
231
232/**
233 * @brief Set a callback called when a virtual terminal is gained.
234 *
235 * @param func The callback called when vt is gained.
236 * @param data The data to pass to the callback.
237 *
238 * This function sets the callback @p func which will be called when a
239 * virtual terminal is gained (for example you press Ctrl-Alt-F1 to go
240 * to vt1 and your app was using vt1). @p data will be pass to @p func if
241 * the callback is called.
242 */
243EAPI void
244ecore_fb_callback_gain_set(void (*func) (void *data), void *data)
245{
246 _ecore_fb_func_fb_gain = func;
247 _ecore_fb_func_fb_gain_data = data;
248}
249
250/**
251 * @brief Set a callback called when a virtual terminal is lost.
252 *
253 * @param func The callback called when vt is lost.
254 * @param data The data to pass to the callback.
255 *
256 * This function sets the callback @p func which will be called when a
257 * virtual terminal is lost (someone wants the tv from you and you
258 * want to give up that vt). @p data will be pass to @p func if the
259 * callback is called.
260 */
261EAPI void
262ecore_fb_callback_lose_set(void (*func) (void *data), void *data)
263{
264 _ecore_fb_func_fb_lost = func;
265 _ecore_fb_func_fb_lost_data = data;
266
267}
268
269/**
270 * @}
271 */
272
273/*
274 * This filter should take into account that the MOUSE_MOVE event can be
275 * triggered by a mouse, not just a touchscreen device, so you can't discard
276 * them (only those generated by a device that sends events with absolute
277 * coordinates).
278
279typedef struct _Ecore_Fb_Filter_Data Ecore_Fb_Filter_Data;
280
281struct _Ecore_Fb_Filter_Data
282{
283 int last_event_type;
284};
285
286static void *
287_ecore_fb_event_filter_start(void *data __UNUSED__)
288{
289 Ecore_Fb_Filter_Data *filter_data;
290
291 filter_data = calloc(1, sizeof(Ecore_Fb_Filter_Data));
292 return filter_data;
293}
294
295static Eina_Bool
296_ecore_fb_event_filter_filter(void *data __UNUSED__, void *loop_data,int type, void *event __UNUSED__)
297{
298 Ecore_Fb_Filter_Data *filter_data;
299
300 filter_data = loop_data;
301 if (!filter_data) return EINA_TRUE;
302 if (type == ECORE_EVENT_MOUSE_MOVE)
303 {
304 if ((filter_data->last_event_type) == ECORE_EVENT_MOUSE_MOVE)
305 {
306 filter_data->last_event_type = type;
307 return EINA_FALSE;
308 }
309 }
310 filter_data->last_event_type = type;
311 return EINA_TRUE;
312}
313
314static void
315_ecore_fb_event_filter_end(void *data __UNUSED__, void *loop_data)
316{
317 Ecore_Fb_Filter_Data *filter_data;
318
319 filter_data = loop_data;
320 if (filter_data) free(filter_data);
321}
322*/