aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/libraries/ecore/src/lib/ecore_psl1ght
diff options
context:
space:
mode:
Diffstat (limited to 'libraries/ecore/src/lib/ecore_psl1ght')
-rw-r--r--libraries/ecore/src/lib/ecore_psl1ght/Ecore_Psl1ght.h124
-rw-r--r--libraries/ecore/src/lib/ecore_psl1ght/Ecore_Psl1ght_Keys.h78
-rw-r--r--libraries/ecore/src/lib/ecore_psl1ght/Makefile.am30
-rw-r--r--libraries/ecore/src/lib/ecore_psl1ght/Makefile.in826
-rw-r--r--libraries/ecore/src/lib/ecore_psl1ght/ecore_psl1ght.c804
-rw-r--r--libraries/ecore/src/lib/ecore_psl1ght/ecore_psl1ght_private.h36
-rw-r--r--libraries/ecore/src/lib/ecore_psl1ght/moveutil.c245
-rw-r--r--libraries/ecore/src/lib/ecore_psl1ght/spursutil.c62
8 files changed, 2205 insertions, 0 deletions
diff --git a/libraries/ecore/src/lib/ecore_psl1ght/Ecore_Psl1ght.h b/libraries/ecore/src/lib/ecore_psl1ght/Ecore_Psl1ght.h
new file mode 100644
index 0000000..39331f7
--- /dev/null
+++ b/libraries/ecore/src/lib/ecore_psl1ght/Ecore_Psl1ght.h
@@ -0,0 +1,124 @@
1#ifndef _ECORE_PSL1GHT_H
2#define _ECORE_PSL1GHT_H
3
4#ifdef EAPI
5# undef EAPI
6#endif
7
8#ifdef __GNUC__
9# if __GNUC__ >= 4
10# define EAPI __attribute__ ((visibility("default")))
11# else
12# define EAPI
13# endif
14#else
15# define EAPI
16#endif
17
18/**
19 * @file
20 * @brief Ecore PSL1GHT system functions.
21 */
22
23#ifdef __cplusplus
24extern "C" {
25#endif
26
27EAPI extern int ECORE_PSL1GHT_EVENT_KEY_MODIFIERS;
28EAPI extern int ECORE_PSL1GHT_EVENT_GOT_FOCUS;
29EAPI extern int ECORE_PSL1GHT_EVENT_LOST_FOCUS;
30EAPI extern int ECORE_PSL1GHT_EVENT_EXPOSE;
31
32typedef struct _Ecore_Psl1ght_Event_Key_Modifiers Ecore_Psl1ght_Event_Key_Modifiers;
33struct _Ecore_Psl1ght_Event_Key_Modifiers /** PSL1GHT Key Modifier event */
34{
35 unsigned int timestamp;
36 unsigned int modifiers;
37 int shift_changed : 1;
38 int shift : 1;
39 int alt_changed : 1;
40 int alt : 1;
41 int ctrl_changed : 1;
42 int ctrl : 1;
43 int win_changed : 1;
44 int win : 1;
45 int num_lock_changed : 1;
46 int num_lock : 1;
47 int caps_lock_changed : 1;
48 int caps_lock : 1;
49 int scroll_lock_changed : 1;
50 int scroll_lock : 1;
51};
52
53typedef struct _Ecore_Psl1ght_Event_Key_Down Ecore_Psl1ght_Event_Key_Down;
54struct _Ecore_Psl1ght_Event_Key_Down /** PSL1GHT Key Down event */
55{
56 const char *keyname; /**< The name of the key that was pressed */
57 const char *keycompose; /**< The UTF-8 string conversion if any */
58 unsigned int time;
59};
60
61typedef struct _Ecore_Psl1ght_Event_Key_Up Ecore_Psl1ght_Event_Key_Up;
62struct _Ecore_Psl1ght_Event_Key_Up /** PSL1GHT Key Up event */
63{
64 const char *keyname; /**< The name of the key that was released */
65 const char *keycompose; /**< The UTF-8 string conversion if any */
66 unsigned int time;
67};
68
69typedef struct _Ecore_Psl1ght_Event_Mouse_Button_Down Ecore_Psl1ght_Event_Mouse_Button_Down;
70struct _Ecore_Psl1ght_Event_Mouse_Button_Down /** PSL1GHT Mouse Down event */
71{
72 int button; /**< Mouse button that was pressed (1 - 32) */
73 int x; /**< Mouse co-ordinates when mouse button was pressed */
74 int y; /**< Mouse co-ordinates when mouse button was pressed */
75 int double_click : 1; /**< Set if click was a double click */
76 int triple_click : 1; /**< Set if click was a triple click */
77 unsigned int time;
78};
79
80typedef struct _Ecore_Psl1ght_Event_Mouse_Button_Up Ecore_Psl1ght_Event_Mouse_Button_Up;
81struct _Ecore_Psl1ght_Event_Mouse_Button_Up /** PSL1GHT Mouse Up event */
82{
83 int button; /**< Mouse button that was released (1 - 32) */
84 int x; /**< Mouse co-ordinates when mouse button was raised */
85 int y; /**< Mouse co-ordinates when mouse button was raised */
86 int double_click : 1; /**< Set if click was a double click */
87 int triple_click : 1; /**< Set if click was a triple click */
88 unsigned int time;
89};
90
91typedef struct _Ecore_Psl1ght_Event_Mouse_Move Ecore_Psl1ght_Event_Mouse_Move;
92struct _Ecore_Psl1ght_Event_Mouse_Move /** PSL1GHT Mouse Move event */
93{
94 int x; /**< Mouse co-ordinates where the mouse cursor moved to */
95 int y; /**< Mouse co-ordinates where the mouse cursor moved to */
96 unsigned int time;
97};
98
99typedef struct _Ecore_Psl1ght_Event_Mouse_Wheel Ecore_Psl1ght_Event_Mouse_Wheel;
100struct _Ecore_Psl1ght_Event_Mouse_Wheel /** PSL1GHT Mouse Wheel event */
101{
102 int x, y;
103 int direction; /* 0 = vertical, 1 = horizontal */
104 int wheel; /* value 1 (left/up), -1 (right/down) */
105 unsigned int time;
106};
107
108EAPI int
109 ecore_psl1ght_init(const char *name);
110EAPI int
111 ecore_psl1ght_shutdown(void);
112EAPI void
113 ecore_psl1ght_resolution_set(int width, int height);
114EAPI void
115 ecore_psl1ght_poll_events(void);
116
117EAPI void ecore_psl1ght_screen_resolution_get(int *w, int *h);
118EAPI void ecore_psl1ght_optimal_screen_resolution_get(int *w, int *h);
119
120#ifdef __cplusplus
121}
122#endif
123
124#endif
diff --git a/libraries/ecore/src/lib/ecore_psl1ght/Ecore_Psl1ght_Keys.h b/libraries/ecore/src/lib/ecore_psl1ght/Ecore_Psl1ght_Keys.h
new file mode 100644
index 0000000..e385af8
--- /dev/null
+++ b/libraries/ecore/src/lib/ecore_psl1ght/Ecore_Psl1ght_Keys.h
@@ -0,0 +1,78 @@
1#ifndef ECORE_PSL1GHT_KEYS_H__
2# define ECORE_PSL1GHT_KEYS_H__
3
4struct _ecore_psl1ght_keys_s
5{
6 int code;
7 const char *name;
8 const char *compose;
9};
10
11static const struct _ecore_psl1ght_keys_s keystable[] =
12{
13 { KB_RAWKEY_NO_EVENT, "0x00", "" },
14 { KB_RAWKEY_BS, "BackSpace", "\010" },
15 { KB_RAWKEY_TAB, "Tab", "\011" },
16 { KB_RAWKEY_ENTER, "Return", "\015" },
17 { KB_RAWKEY_PAUSE, "Pause", "Pause" },
18 { KB_RAWKEY_ESCAPE, "Escape", "\033" },
19 { KB_RAWKEY_SPACE, "space", " " },
20
21 /* Skip uppercase letters */
22 { KB_RAWKEY_LEFT_BRACKET_101, "bracketleft", "[" },
23 { KB_RAWKEY_BACKSLASH_101, "backslash", "\\" },
24 { KB_RAWKEY_RIGHT_BRACKET_101, "bracketright", "]" },
25 { KB_RAWKEY_ACCENT_CIRCONFLEX_106, "asciicircumm", "^" },
26 { KB_RAWKEY_DELETE, "Delete", "\177" },
27 /* End of ASCII mapped keysyms */
28
29 /* Numeric keypad */
30 { KB_RAWKEY_KPAD_0, "KP0", "0" },
31 { KB_RAWKEY_KPAD_1, "KP1", "1" },
32 { KB_RAWKEY_KPAD_2, "KP2", "2" },
33 { KB_RAWKEY_KPAD_3, "KP3", "3" },
34 { KB_RAWKEY_KPAD_4, "KP4", "4" },
35 { KB_RAWKEY_KPAD_5, "KP5", "5" },
36 { KB_RAWKEY_KPAD_6, "KP6", "6" },
37 { KB_RAWKEY_KPAD_7, "KP7", "7" },
38 { KB_RAWKEY_KPAD_8, "KP8", "8" },
39 { KB_RAWKEY_KPAD_9, "KP9", "9" },
40 { KB_RAWKEY_KPAD_PERIOD, "period", "." },
41 { KB_RAWKEY_KPAD_SLASH, "KP_Divide", "/" },
42 { KB_RAWKEY_KPAD_ASTERISK, "KP_Multiply", "*" },
43 { KB_RAWKEY_KPAD_MINUS, "KP_Minus", "-" },
44 { KB_RAWKEY_KPAD_PLUS, "KP_Plus", "+" },
45 { KB_RAWKEY_KPAD_ENTER, "KP_Enter", "\015" },
46
47 /* Arrows + Home/End pad */
48 { KB_RAWKEY_UP_ARROW, "Up", "Up" },
49 { KB_RAWKEY_DOWN_ARROW, "Down", "Down" },
50 { KB_RAWKEY_RIGHT_ARROW, "Right", "Right" },
51 { KB_RAWKEY_LEFT_ARROW, "Left", "Left" },
52 { KB_RAWKEY_INSERT, "Insert", "Insert" },
53 { KB_RAWKEY_HOME, "Home", "Home" },
54 { KB_RAWKEY_END, "End", "End" },
55 { KB_RAWKEY_PAGE_UP, "Page_Up", "Page_Up" },
56 { KB_RAWKEY_PAGE_DOWN, "Page_Down", "Page_Down" },
57
58 /* Function keys */
59 { KB_RAWKEY_F1, "F1", "F1" },
60 { KB_RAWKEY_F2, "F2", "F2" },
61 { KB_RAWKEY_F3, "F3", "F3" },
62 { KB_RAWKEY_F4, "F4", "F4" },
63 { KB_RAWKEY_F5, "F5", "F5" },
64 { KB_RAWKEY_F6, "F6", "F6" },
65 { KB_RAWKEY_F7, "F7", "F7" },
66 { KB_RAWKEY_F8, "F8", "F8" },
67 { KB_RAWKEY_F9, "F9", "F9" },
68 { KB_RAWKEY_F10, "F10", "F10" },
69 { KB_RAWKEY_F11, "F11", "F11" },
70 { KB_RAWKEY_F12, "F12", "F12" },
71
72 /* Key state modifier keys */
73 { KB_RAWKEY_KPAD_NUMLOCK, "Num_Lock", "Num_Lock" },
74 { KB_RAWKEY_CAPS_LOCK, "Caps_Lock", "Caps_Lock" },
75 { KB_RAWKEY_SCROLL_LOCK, "Scroll_Lock", "Scroll_Lock" },
76};
77
78#endif /* ECORE_PSL1GHT_KEYS_H__ */
diff --git a/libraries/ecore/src/lib/ecore_psl1ght/Makefile.am b/libraries/ecore/src/lib/ecore_psl1ght/Makefile.am
new file mode 100644
index 0000000..8e7328a
--- /dev/null
+++ b/libraries/ecore/src/lib/ecore_psl1ght/Makefile.am
@@ -0,0 +1,30 @@
1MAINTAINERCLEANFILES = Makefile.in
2
3AM_CPPFLAGS = \
4-I$(top_srcdir)/src/lib/ecore \
5-I$(top_srcdir)/src/lib/ecore_evas \
6-I$(top_srcdir)/src/lib/ecore_input \
7-I$(top_builddir)/src/lib/ecore \
8-I$(top_builddir)/src/lib/ecore_evas \
9-I$(top_builddir)/src/lib/ecore_input \
10@EFL_ECORE_PSL1GHT_BUILD@ \
11@EVAS_CFLAGS@ \
12@EINA_CFLAGS@
13
14lib_LTLIBRARIES = libecore_psl1ght.la
15includes_HEADERS = Ecore_Psl1ght.h
16includesdir = $(includedir)/ecore-@VMAJ@
17
18libecore_psl1ght_la_SOURCES = \
19ecore_psl1ght.c \
20moveutil.c \
21spursutil.c
22
23libecore_psl1ght_la_LIBADD = \
24$(top_builddir)/src/lib/ecore/libecore.la \
25$(top_builddir)/src/lib/ecore_input/libecore_input.la \
26@EINA_LIBS@
27
28libecore_psl1ght_la_LDFLAGS = -no-undefined @lt_enable_auto_import@ -version-info @version_info@ @release_info@
29
30EXTRA_DIST = Ecore_Psl1ght_Keys.h ecore_psl1ght_private.h
diff --git a/libraries/ecore/src/lib/ecore_psl1ght/Makefile.in b/libraries/ecore/src/lib/ecore_psl1ght/Makefile.in
new file mode 100644
index 0000000..9b75b74
--- /dev/null
+++ b/libraries/ecore/src/lib/ecore_psl1ght/Makefile.in
@@ -0,0 +1,826 @@
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_psl1ght
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_psl1ght_la_DEPENDENCIES = \
90 $(top_builddir)/src/lib/ecore/libecore.la \
91 $(top_builddir)/src/lib/ecore_input/libecore_input.la
92am_libecore_psl1ght_la_OBJECTS = ecore_psl1ght.lo moveutil.lo \
93 spursutil.lo
94libecore_psl1ght_la_OBJECTS = $(am_libecore_psl1ght_la_OBJECTS)
95AM_V_lt = $(am__v_lt_$(V))
96am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
97am__v_lt_0 = --silent
98libecore_psl1ght_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
99 $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
100 $(AM_CFLAGS) $(CFLAGS) $(libecore_psl1ght_la_LDFLAGS) \
101 $(LDFLAGS) -o $@
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_psl1ght_la_SOURCES)
129DIST_SOURCES = $(libecore_psl1ght_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_srcdir)/src/lib/ecore_evas \
469-I$(top_srcdir)/src/lib/ecore_input \
470-I$(top_builddir)/src/lib/ecore \
471-I$(top_builddir)/src/lib/ecore_evas \
472-I$(top_builddir)/src/lib/ecore_input \
473@EFL_ECORE_PSL1GHT_BUILD@ \
474@EVAS_CFLAGS@ \
475@EINA_CFLAGS@
476
477lib_LTLIBRARIES = libecore_psl1ght.la
478includes_HEADERS = Ecore_Psl1ght.h
479includesdir = $(includedir)/ecore-@VMAJ@
480libecore_psl1ght_la_SOURCES = \
481ecore_psl1ght.c \
482moveutil.c \
483spursutil.c
484
485libecore_psl1ght_la_LIBADD = \
486$(top_builddir)/src/lib/ecore/libecore.la \
487$(top_builddir)/src/lib/ecore_input/libecore_input.la \
488@EINA_LIBS@
489
490libecore_psl1ght_la_LDFLAGS = -no-undefined @lt_enable_auto_import@ -version-info @version_info@ @release_info@
491EXTRA_DIST = Ecore_Psl1ght_Keys.h ecore_psl1ght_private.h
492all: all-am
493
494.SUFFIXES:
495.SUFFIXES: .c .lo .o .obj
496$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
497 @for dep in $?; do \
498 case '$(am__configure_deps)' in \
499 *$$dep*) \
500 ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
501 && { if test -f $@; then exit 0; else break; fi; }; \
502 exit 1;; \
503 esac; \
504 done; \
505 echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/lib/ecore_psl1ght/Makefile'; \
506 $(am__cd) $(top_srcdir) && \
507 $(AUTOMAKE) --gnu src/lib/ecore_psl1ght/Makefile
508.PRECIOUS: Makefile
509Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
510 @case '$?' in \
511 *config.status*) \
512 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
513 *) \
514 echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
515 cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
516 esac;
517
518$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
519 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
520
521$(top_srcdir)/configure: $(am__configure_deps)
522 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
523$(ACLOCAL_M4): $(am__aclocal_m4_deps)
524 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
525$(am__aclocal_m4_deps):
526install-libLTLIBRARIES: $(lib_LTLIBRARIES)
527 @$(NORMAL_INSTALL)
528 test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)"
529 @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
530 list2=; for p in $$list; do \
531 if test -f $$p; then \
532 list2="$$list2 $$p"; \
533 else :; fi; \
534 done; \
535 test -z "$$list2" || { \
536 echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \
537 $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \
538 }
539
540uninstall-libLTLIBRARIES:
541 @$(NORMAL_UNINSTALL)
542 @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
543 for p in $$list; do \
544 $(am__strip_dir) \
545 echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \
546 $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \
547 done
548
549clean-libLTLIBRARIES:
550 -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
551 @list='$(lib_LTLIBRARIES)'; for p in $$list; do \
552 dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
553 test "$$dir" != "$$p" || dir=.; \
554 echo "rm -f \"$${dir}/so_locations\""; \
555 rm -f "$${dir}/so_locations"; \
556 done
557libecore_psl1ght.la: $(libecore_psl1ght_la_OBJECTS) $(libecore_psl1ght_la_DEPENDENCIES)
558 $(AM_V_CCLD)$(libecore_psl1ght_la_LINK) -rpath $(libdir) $(libecore_psl1ght_la_OBJECTS) $(libecore_psl1ght_la_LIBADD) $(LIBS)
559
560mostlyclean-compile:
561 -rm -f *.$(OBJEXT)
562
563distclean-compile:
564 -rm -f *.tab.c
565
566@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ecore_psl1ght.Plo@am__quote@
567@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/moveutil.Plo@am__quote@
568@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/spursutil.Plo@am__quote@
569
570.c.o:
571@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
572@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
573@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
574@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
575@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
576@am__fastdepCC_FALSE@ $(COMPILE) -c $<
577
578.c.obj:
579@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
580@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
581@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
582@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
583@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
584@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
585
586.c.lo:
587@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
588@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
589@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
590@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
591@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
592@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
593
594mostlyclean-libtool:
595 -rm -f *.lo
596
597clean-libtool:
598 -rm -rf .libs _libs
599install-includesHEADERS: $(includes_HEADERS)
600 @$(NORMAL_INSTALL)
601 test -z "$(includesdir)" || $(MKDIR_P) "$(DESTDIR)$(includesdir)"
602 @list='$(includes_HEADERS)'; test -n "$(includesdir)" || list=; \
603 for p in $$list; do \
604 if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
605 echo "$$d$$p"; \
606 done | $(am__base_list) | \
607 while read files; do \
608 echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(includesdir)'"; \
609 $(INSTALL_HEADER) $$files "$(DESTDIR)$(includesdir)" || exit $$?; \
610 done
611
612uninstall-includesHEADERS:
613 @$(NORMAL_UNINSTALL)
614 @list='$(includes_HEADERS)'; test -n "$(includesdir)" || list=; \
615 files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
616 test -n "$$files" || exit 0; \
617 echo " ( cd '$(DESTDIR)$(includesdir)' && rm -f" $$files ")"; \
618 cd "$(DESTDIR)$(includesdir)" && rm -f $$files
619
620ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
621 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
622 unique=`for i in $$list; do \
623 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
624 done | \
625 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
626 END { if (nonempty) { for (i in files) print i; }; }'`; \
627 mkid -fID $$unique
628tags: TAGS
629
630TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
631 $(TAGS_FILES) $(LISP)
632 set x; \
633 here=`pwd`; \
634 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
635 unique=`for i in $$list; do \
636 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
637 done | \
638 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
639 END { if (nonempty) { for (i in files) print i; }; }'`; \
640 shift; \
641 if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
642 test -n "$$unique" || unique=$$empty_fix; \
643 if test $$# -gt 0; then \
644 $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
645 "$$@" $$unique; \
646 else \
647 $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
648 $$unique; \
649 fi; \
650 fi
651ctags: CTAGS
652CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
653 $(TAGS_FILES) $(LISP)
654 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
655 unique=`for i in $$list; do \
656 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
657 done | \
658 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
659 END { if (nonempty) { for (i in files) print i; }; }'`; \
660 test -z "$(CTAGS_ARGS)$$unique" \
661 || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
662 $$unique
663
664GTAGS:
665 here=`$(am__cd) $(top_builddir) && pwd` \
666 && $(am__cd) $(top_srcdir) \
667 && gtags -i $(GTAGS_ARGS) "$$here"
668
669distclean-tags:
670 -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
671
672distdir: $(DISTFILES)
673 @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
674 topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
675 list='$(DISTFILES)'; \
676 dist_files=`for file in $$list; do echo $$file; done | \
677 sed -e "s|^$$srcdirstrip/||;t" \
678 -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
679 case $$dist_files in \
680 */*) $(MKDIR_P) `echo "$$dist_files" | \
681 sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
682 sort -u` ;; \
683 esac; \
684 for file in $$dist_files; do \
685 if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
686 if test -d $$d/$$file; then \
687 dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
688 if test -d "$(distdir)/$$file"; then \
689 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
690 fi; \
691 if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
692 cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
693 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
694 fi; \
695 cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
696 else \
697 test -f "$(distdir)/$$file" \
698 || cp -p $$d/$$file "$(distdir)/$$file" \
699 || exit 1; \
700 fi; \
701 done
702check-am: all-am
703check: check-am
704all-am: Makefile $(LTLIBRARIES) $(HEADERS)
705installdirs:
706 for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(includesdir)"; do \
707 test -z "$$dir" || $(MKDIR_P) "$$dir"; \
708 done
709install: install-am
710install-exec: install-exec-am
711install-data: install-data-am
712uninstall: uninstall-am
713
714install-am: all-am
715 @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
716
717installcheck: installcheck-am
718install-strip:
719 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
720 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
721 `test -z '$(STRIP)' || \
722 echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
723mostlyclean-generic:
724
725clean-generic:
726
727distclean-generic:
728 -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
729 -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
730
731maintainer-clean-generic:
732 @echo "This command is intended for maintainers to use"
733 @echo "it deletes files that may require special tools to rebuild."
734 -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
735clean: clean-am
736
737clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \
738 mostlyclean-am
739
740distclean: distclean-am
741 -rm -rf ./$(DEPDIR)
742 -rm -f Makefile
743distclean-am: clean-am distclean-compile distclean-generic \
744 distclean-tags
745
746dvi: dvi-am
747
748dvi-am:
749
750html: html-am
751
752html-am:
753
754info: info-am
755
756info-am:
757
758install-data-am: install-includesHEADERS
759
760install-dvi: install-dvi-am
761
762install-dvi-am:
763
764install-exec-am: install-libLTLIBRARIES
765
766install-html: install-html-am
767
768install-html-am:
769
770install-info: install-info-am
771
772install-info-am:
773
774install-man:
775
776install-pdf: install-pdf-am
777
778install-pdf-am:
779
780install-ps: install-ps-am
781
782install-ps-am:
783
784installcheck-am:
785
786maintainer-clean: maintainer-clean-am
787 -rm -rf ./$(DEPDIR)
788 -rm -f Makefile
789maintainer-clean-am: distclean-am maintainer-clean-generic
790
791mostlyclean: mostlyclean-am
792
793mostlyclean-am: mostlyclean-compile mostlyclean-generic \
794 mostlyclean-libtool
795
796pdf: pdf-am
797
798pdf-am:
799
800ps: ps-am
801
802ps-am:
803
804uninstall-am: uninstall-includesHEADERS uninstall-libLTLIBRARIES
805
806.MAKE: install-am install-strip
807
808.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
809 clean-libLTLIBRARIES clean-libtool ctags distclean \
810 distclean-compile distclean-generic distclean-libtool \
811 distclean-tags distdir dvi dvi-am html html-am info info-am \
812 install install-am install-data install-data-am install-dvi \
813 install-dvi-am install-exec install-exec-am install-html \
814 install-html-am install-includesHEADERS install-info \
815 install-info-am install-libLTLIBRARIES install-man install-pdf \
816 install-pdf-am install-ps install-ps-am install-strip \
817 installcheck installcheck-am installdirs maintainer-clean \
818 maintainer-clean-generic mostlyclean mostlyclean-compile \
819 mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
820 tags uninstall uninstall-am uninstall-includesHEADERS \
821 uninstall-libLTLIBRARIES
822
823
824# Tell versions [3.59,3.63) of GNU make to not export all variables.
825# Otherwise a system limit (for SysV at least) may be exceeded.
826.NOEXPORT:
diff --git a/libraries/ecore/src/lib/ecore_psl1ght/ecore_psl1ght.c b/libraries/ecore/src/lib/ecore_psl1ght/ecore_psl1ght.c
new file mode 100644
index 0000000..64cef9f
--- /dev/null
+++ b/libraries/ecore/src/lib/ecore_psl1ght/ecore_psl1ght.c
@@ -0,0 +1,804 @@
1#ifdef HAVE_CONFIG_H
2# include <config.h>
3#endif
4
5#include <sysutil/video.h>
6#include <sysutil/sysutil.h>
7#include <sysmodule/sysmodule.h>
8#include <io/pad.h>
9#include <io/mouse.h>
10#include <io/kb.h>
11#include <io/camera.h>
12#include <io/move.h>
13#include <sys/process.h>
14
15#include "moveutil.h"
16
17#include "Eina.h"
18#include "Ecore_Psl1ght.h"
19#include "Ecore_Input.h"
20#include "Ecore.h"
21#include "ecore_psl1ght_private.h"
22#include "ecore_private.h"
23#include "Ecore_Psl1ght_Keys.h"
24
25/* Allocate 1MB stack to avoid overflows */
26SYS_PROCESS_PARAM(1001, 0x100000);
27
28int _ecore_psl1ght_log_dom = -1;
29
30EAPI int ECORE_PSL1GHT_EVENT_KEY_MODIFIERS = 0;
31EAPI int ECORE_PSL1GHT_EVENT_GOT_FOCUS = 0;
32EAPI int ECORE_PSL1GHT_EVENT_LOST_FOCUS = 0;
33EAPI int ECORE_PSL1GHT_EVENT_EXPOSE = 0;
34
35static int _ecore_psl1ght_init_count = 0;
36static int window_width = 0;
37static int window_height = 0;
38/* Mouse support */
39static int mouse_connected = FALSE;
40static u8 mouse_buttons = 0;
41static int mouse_x = 0;
42static int mouse_y = 0;
43/* Keyboard support */
44static int keyboard_connected = FALSE;
45static KbLed keyboard_leds = {{0}};
46static KbMkey keyboard_mods = {{0}};
47static u16 keyboard_old_key = 0;
48/* Pad support */
49static padData pad_data;
50static int pad_old_x = 0;
51static int pad_old_o = 0;
52/* Move support */
53static int move_connected = FALSE;
54static moveContext *move_context = NULL;
55u16 move_buttons = 0;
56
57static void xmb_event_handler(u64 status, u64 param, void *user_data);
58
59/**
60 * @defgroup Ecore_Psl1ght_Library_Group PSL1GHT Library Functions
61 *
62 * Functions used to set up and shut down the Ecore_Psl1ght functions.
63 */
64
65/**
66 * Sets up the Ecore_Psl1ght library.
67 * @param name device target name
68 * @return @c 0 on failure. Otherwise, the number of times the library has
69 * been initialised without being shut down.
70 * @ingroup Ecore_PSL1GHT_Library_Group
71 */
72EAPI int
73ecore_psl1ght_init(const char *name __UNUSED__)
74{
75 videoState state;
76 videoResolution resolution;
77 int ret, camera_loaded, gem_loaded;
78
79 if (++_ecore_psl1ght_init_count != 1)
80 return _ecore_psl1ght_init_count;
81 _ecore_psl1ght_log_dom = eina_log_domain_register
82 ("ecore_psl1ght", ECORE_PSL1GHT_DEFAULT_LOG_COLOR);
83 if (_ecore_psl1ght_log_dom < 0)
84 {
85 EINA_LOG_ERR("Impossible to create a log domain for the Ecore PSL1GHT module.");
86 return --_ecore_psl1ght_init_count;
87 }
88 if (!ecore_event_init())
89 {
90 eina_log_domain_unregister(_ecore_psl1ght_log_dom);
91 _ecore_psl1ght_log_dom = -1;
92 return --_ecore_psl1ght_init_count;
93 }
94
95 if (videoGetState (0, 0, &state) == 0 &&
96 videoGetResolution (state.displayMode.resolution, &resolution) == 0)
97 {
98 ecore_psl1ght_resolution_set (resolution.width, resolution.height);
99 }
100 else
101 {
102 ecore_event_shutdown();
103 eina_log_domain_unregister(_ecore_psl1ght_log_dom);
104 _ecore_psl1ght_log_dom = -1;
105 return --_ecore_psl1ght_init_count;
106 }
107
108 /* Pad support */
109 ioPadInit (7);
110 /* Mouse support */
111 ioMouseInit(2);
112 mouse_buttons = 0;
113 mouse_x = 0;
114 mouse_y = 0;
115
116 /* Keyboard support */
117 ioKbInit(2);
118 keyboard_leds._KbLedU.leds = 0;
119 keyboard_mods._KbMkeyU.mkeys = 0;
120
121 /* Initialize Move */
122 move_context = NULL;
123 move_buttons = 0;
124
125 camera_loaded = !sysModuleIsLoaded (SYSMODULE_CAMERA);
126 if (!camera_loaded)
127 ret = sysModuleLoad (SYSMODULE_CAMERA);
128 else
129 ret = 0;
130 if (ret == 0)
131 {
132 gem_loaded = !sysModuleIsLoaded (SYSMODULE_GEM);
133 if (!gem_loaded)
134 ret = sysModuleLoad (SYSMODULE_GEM);
135 if (ret == 0)
136 {
137 move_context = initMove ();
138 }
139 else {
140 if (gem_loaded)
141 sysModuleUnload (SYSMODULE_CAMERA);
142 }
143 }
144
145 sysUtilRegisterCallback (SYSUTIL_EVENT_SLOT0, xmb_event_handler, NULL);
146
147 ECORE_PSL1GHT_EVENT_GOT_FOCUS = ecore_event_type_new();
148 ECORE_PSL1GHT_EVENT_LOST_FOCUS = ecore_event_type_new();
149 ECORE_PSL1GHT_EVENT_EXPOSE = ecore_event_type_new();
150 ECORE_PSL1GHT_EVENT_KEY_MODIFIERS = ecore_event_type_new();
151
152 mouse_x = 0;
153 mouse_y = 0;
154
155 return _ecore_psl1ght_init_count;
156}
157
158/**
159 * Shuts down the Ecore_Psl1ght library.
160 * @return @c The number of times the system has been initialised without
161 * being shut down.
162 * @ingroup Ecore_PSL1GHT_Library_Group
163 */
164EAPI int
165ecore_psl1ght_shutdown(void)
166{
167 if (--_ecore_psl1ght_init_count != 0)
168 return _ecore_psl1ght_init_count;
169
170 ecore_event_shutdown();
171 eina_log_domain_unregister(_ecore_psl1ght_log_dom);
172 _ecore_psl1ght_log_dom = -1;
173
174 ECORE_PSL1GHT_EVENT_GOT_FOCUS = 0;
175 ECORE_PSL1GHT_EVENT_LOST_FOCUS = 0;
176 ECORE_PSL1GHT_EVENT_EXPOSE = 0;
177 ECORE_PSL1GHT_EVENT_KEY_MODIFIERS = 0;
178
179 ioPadEnd();
180 ioMouseEnd();
181 ioKbEnd();
182
183 if (move_context)
184 {
185 endMove (move_context);
186 move_context = NULL;
187 sysModuleUnload (SYSMODULE_CAMERA);
188 sysModuleUnload (SYSMODULE_GEM);
189 }
190
191 sysUtilUnregisterCallback(SYSUTIL_EVENT_SLOT0);
192
193 return _ecore_psl1ght_init_count;
194}
195
196static unsigned int
197_ecore_psl1ght_get_time(void)
198{
199 return (unsigned int)((unsigned long long)
200 (ecore_time_get() * 1000.0) & 0xffffffff);
201}
202
203static unsigned int
204_ecore_psl1ght_get_modifiers(void)
205{
206 unsigned int modifiers = 0;
207
208 if (keyboard_mods._KbMkeyU._KbMkeyS.r_shift ||
209 keyboard_mods._KbMkeyU._KbMkeyS.l_shift)
210 modifiers |= ECORE_EVENT_MODIFIER_SHIFT;
211 if (keyboard_mods._KbMkeyU._KbMkeyS.r_ctrl ||
212 keyboard_mods._KbMkeyU._KbMkeyS.l_ctrl)
213 modifiers |= ECORE_EVENT_MODIFIER_CTRL;
214 if (keyboard_mods._KbMkeyU._KbMkeyS.r_alt ||
215 keyboard_mods._KbMkeyU._KbMkeyS.l_alt)
216 modifiers |= ECORE_EVENT_MODIFIER_ALT;
217 if (keyboard_mods._KbMkeyU._KbMkeyS.r_win ||
218 keyboard_mods._KbMkeyU._KbMkeyS.l_win)
219 modifiers |= ECORE_EVENT_MODIFIER_WIN;
220
221 if (keyboard_leds._KbLedU._KbLedS.num_lock)
222 modifiers |= ECORE_EVENT_LOCK_NUM;
223 if (keyboard_leds._KbLedU._KbLedS.caps_lock)
224 modifiers |= ECORE_EVENT_LOCK_CAPS;
225 if (keyboard_leds._KbLedU._KbLedS.scroll_lock)
226 modifiers |= ECORE_EVENT_LOCK_SCROLL;
227
228 return modifiers;
229}
230
231static void
232_ecore_psl1ght_key_modifiers(KbMkey *mods, KbLed *leds)
233{
234 Ecore_Psl1ght_Event_Key_Modifiers *ev;
235 Eina_Bool emit = EINA_FALSE;
236
237 ev = malloc(sizeof(Ecore_Psl1ght_Event_Key_Modifiers));
238 if (!ev) return;
239
240 if (mods->_KbMkeyU._KbMkeyS.l_shift !=
241 keyboard_mods._KbMkeyU._KbMkeyS.l_shift ||
242 mods->_KbMkeyU._KbMkeyS.r_shift !=
243 keyboard_mods._KbMkeyU._KbMkeyS.r_shift)
244 {
245 emit = EINA_TRUE;
246 ev->shift_changed = EINA_TRUE;
247 ev->shift = mods->_KbMkeyU._KbMkeyS.r_shift |
248 mods->_KbMkeyU._KbMkeyS.l_shift;
249 }
250 if (mods->_KbMkeyU._KbMkeyS.l_ctrl !=
251 keyboard_mods._KbMkeyU._KbMkeyS.l_ctrl ||
252 mods->_KbMkeyU._KbMkeyS.r_ctrl !=
253 keyboard_mods._KbMkeyU._KbMkeyS.r_ctrl)
254 {
255 emit = EINA_TRUE;
256 ev->ctrl_changed = EINA_TRUE;
257 ev->ctrl = mods->_KbMkeyU._KbMkeyS.r_ctrl |
258 mods->_KbMkeyU._KbMkeyS.l_ctrl;
259 }
260 if (mods->_KbMkeyU._KbMkeyS.l_alt !=
261 keyboard_mods._KbMkeyU._KbMkeyS.l_alt ||
262 mods->_KbMkeyU._KbMkeyS.r_alt !=
263 keyboard_mods._KbMkeyU._KbMkeyS.r_alt)
264 {
265 emit = EINA_TRUE;
266 ev->alt_changed = EINA_TRUE;
267 ev->alt = mods->_KbMkeyU._KbMkeyS.r_alt |
268 mods->_KbMkeyU._KbMkeyS.l_alt;
269 }
270 if (mods->_KbMkeyU._KbMkeyS.l_win !=
271 keyboard_mods._KbMkeyU._KbMkeyS.l_win ||
272 mods->_KbMkeyU._KbMkeyS.r_win !=
273 keyboard_mods._KbMkeyU._KbMkeyS.r_win)
274 {
275 emit = EINA_TRUE;
276 ev->win_changed = EINA_TRUE;
277 ev->win = mods->_KbMkeyU._KbMkeyS.r_win |
278 mods->_KbMkeyU._KbMkeyS.l_win;
279 }
280 keyboard_mods = *mods;
281
282 if (leds->_KbLedU._KbLedS.num_lock !=
283 keyboard_leds._KbLedU._KbLedS.num_lock)
284 {
285 emit = EINA_TRUE;
286 ev->num_lock_changed = EINA_TRUE;
287 ev->num_lock = leds->_KbLedU._KbLedS.num_lock;
288 }
289 if (leds->_KbLedU._KbLedS.caps_lock !=
290 keyboard_leds._KbLedU._KbLedS.caps_lock)
291 {
292 emit = EINA_TRUE;
293 ev->caps_lock_changed = EINA_TRUE;
294 ev->caps_lock = leds->_KbLedU._KbLedS.caps_lock;
295 }
296 if (leds->_KbLedU._KbLedS.scroll_lock !=
297 keyboard_leds._KbLedU._KbLedS.scroll_lock)
298 {
299 emit = EINA_TRUE;
300 ev->scroll_lock_changed = EINA_TRUE;
301 ev->scroll_lock = leds->_KbLedU._KbLedS.scroll_lock;
302 }
303 keyboard_leds = *leds;
304
305 if (emit)
306 {
307 ev->timestamp = _ecore_psl1ght_get_time ();
308 ev->modifiers = _ecore_psl1ght_get_modifiers();
309 ecore_event_add(ECORE_PSL1GHT_EVENT_KEY_MODIFIERS, ev, NULL, NULL);
310 }
311 else
312 {
313 free(ev);
314 }
315}
316
317static void
318unicodeToUtf8(u16 w, char *utf8buf)
319{
320 unsigned char *utf8s = (unsigned char *)utf8buf;
321
322 if ( w < 0x0080 )
323 {
324 utf8s[0] = ( unsigned char )w;
325 utf8s[1] = 0;
326 }
327 else if ( w < 0x0800 )
328 {
329 utf8s[0] = 0xc0 | ((w) >> 6);
330 utf8s[1] = 0x80 | ((w) & 0x3f);
331 utf8s[2] = 0;
332 }
333 else {
334 utf8s[0] = 0xe0 | ((w) >> 12);
335 utf8s[1] = 0x80 | (((w) >> 6) & 0x3f);
336 utf8s[2] = 0x80 | ((w) & 0x3f);
337 utf8s[3] = 0;
338 }
339}
340
341static Ecore_Event_Key *
342_ecore_psl1ght_event_key(u16 key)
343{
344 Ecore_Event_Key *ev;
345 char utf8[4];
346 u16 utf16;
347 unsigned int i;
348
349 ev = malloc(sizeof(Ecore_Event_Key));
350 if (!ev) return NULL;
351
352 ev->timestamp = _ecore_psl1ght_get_time ();
353 ev->window = 0;
354 ev->event_window = 0;
355 ev->modifiers = _ecore_psl1ght_get_modifiers();
356
357 printf ("Key is %X\n", key);
358 key &= ~KB_KEYPAD;
359 for (i = 0; i < sizeof(keystable) / sizeof(struct _ecore_psl1ght_keys_s); ++i)
360 if (keystable[i].code == key)
361 {
362 ev->keyname = keystable[i].name;
363 ev->key = keystable[i].name;
364 ev->string = keystable[i].compose;
365 ev->compose = keystable[i].compose;
366
367 printf ("Found key '%s' in the table\n", ev->keyname);
368 return ev;
369 }
370
371 utf16 = ioKbCnvRawCode (KB_MAPPING_101, keyboard_mods, keyboard_leds, key);
372 unicodeToUtf8(utf16, utf8);
373 printf ("Converting to utf16 : %X - utf8 : %s\n", utf16, utf8);
374 ev->keyname = ev->key = ev->string = ev->compose = strdup (utf8);
375
376 return ev;
377}
378
379static void
380_ecore_psl1ght_mouse_move(s32 x_axis, s32 y_axis)
381{
382 Ecore_Event_Mouse_Move *ev;
383
384 ev = malloc(sizeof(Ecore_Event_Mouse_Move));
385 if (!ev) return;
386
387 mouse_x += x_axis;
388 mouse_y += y_axis;
389 if (mouse_x < 0) mouse_x = 0;
390 if (mouse_y < 0) mouse_y = 0;
391 if (mouse_x > window_width) mouse_x = window_width;
392 if (mouse_y > window_height) mouse_y = window_height;
393
394 ev->window = 0;
395 ev->root_window = 0;
396 ev->event_window = 0;
397 ev->same_screen = 0;
398 ev->timestamp = _ecore_psl1ght_get_time ();
399 ev->modifiers = _ecore_psl1ght_get_modifiers ();
400 ev->x = ev->root.x = mouse_x;
401 ev->y = ev->root.x = mouse_y;
402
403 ev->multi.device = 0;
404 ev->multi.radius = ev->multi.radius_x = ev->multi.radius_y = 0;
405 ev->multi.pressure = ev->multi.angle = 0;
406 ev->multi.x = ev->multi.y = ev->multi.root.x = ev->multi.root.y = 0;
407
408 ecore_event_add(ECORE_EVENT_MOUSE_MOVE, ev, NULL, NULL);
409}
410
411static void
412_ecore_psl1ght_mouse_button(int button, int pressed)
413{
414 Ecore_Event_Mouse_Button *ev;
415 static unsigned int previous_timestamp = 0;
416
417 ev = malloc(sizeof(Ecore_Event_Mouse_Button));
418 if (!ev) return;
419
420 ev->window = 0;
421 ev->root_window = 0;
422 ev->event_window = 0;
423 ev->same_screen = 0;
424 ev->timestamp = _ecore_psl1ght_get_time ();
425 ev->modifiers = _ecore_psl1ght_get_modifiers ();
426 ev->buttons = button;
427 if (ev->timestamp - previous_timestamp <= 500)
428 ev->double_click = 1;
429 ev->triple_click = 0;
430 previous_timestamp = ev->timestamp;
431
432 ev->x = ev->root.x = mouse_x;
433 ev->y = ev->root.y = mouse_y;
434 ev->multi.device = 0;
435 ev->multi.radius = ev->multi.radius_x = ev->multi.radius_y = 0;
436 ev->multi.pressure = ev->multi.angle = 0;
437 ev->multi.x = ev->multi.y = ev->multi.root.x = ev->multi.root.y = 0;
438
439 if (pressed)
440 ecore_event_add(ECORE_EVENT_MOUSE_BUTTON_DOWN, ev, NULL, NULL);
441 else
442 ecore_event_add(ECORE_EVENT_MOUSE_BUTTON_UP, ev, NULL, NULL);
443}
444
445static void
446_ecore_psl1ght_mouse_wheel(s8 wheel, s8 tilt)
447{
448 Ecore_Event_Mouse_Wheel *ev;
449
450 ev = malloc(sizeof(Ecore_Event_Mouse_Wheel));
451 if (!ev) return;
452
453 ev->timestamp = _ecore_psl1ght_get_time ();
454 ev->window = 0;
455 ev->event_window = 0;
456 ev->modifiers = _ecore_psl1ght_get_modifiers ();
457 ev->direction = 0;
458 ev->z = wheel;
459
460 ecore_event_add(ECORE_EVENT_MOUSE_WHEEL, ev, NULL, NULL);
461}
462
463#define PAD_STICK_DEADZONE 0x20
464
465static void
466_ecore_psl1ght_poll_joypad(void)
467{
468 padInfo padinfo;
469 int i;
470
471 /**/
472 /* Check mouse events */
473 ioPadGetInfo (&padinfo);
474
475 for (i = 0; i < 4; i++) /* Ignore the move */
476 {
477 if (padinfo.status[i])
478 {
479 int analog_h, analog_v;
480
481 if (ioPadGetData (i, &pad_data) != 0)
482 continue;
483 analog_h = pad_data.ANA_L_H - 0x80;
484 analog_v = pad_data.ANA_L_V - 0x80;
485
486 if (analog_h > PAD_STICK_DEADZONE)
487 analog_h -= PAD_STICK_DEADZONE;
488 else if (analog_h < -PAD_STICK_DEADZONE)
489 analog_h += PAD_STICK_DEADZONE;
490 else
491 analog_h = 0;
492 analog_h /= 10;
493
494 if (analog_v > PAD_STICK_DEADZONE)
495 analog_v -= PAD_STICK_DEADZONE;
496 else if (analog_v < -PAD_STICK_DEADZONE)
497 analog_v += PAD_STICK_DEADZONE;
498 else
499 analog_v = 0;
500 analog_v /= 10;
501
502 if (analog_h != 0 || analog_v != 0)
503 _ecore_psl1ght_mouse_move (analog_h, analog_v);
504
505 if (pad_old_x != pad_data.BTN_CROSS)
506 _ecore_psl1ght_mouse_button (1, pad_data.BTN_CROSS);
507 if (pad_old_o != pad_data.BTN_CIRCLE)
508 _ecore_psl1ght_mouse_button (3, pad_data.BTN_CIRCLE);
509
510 pad_old_x = pad_data.BTN_CROSS;
511 pad_old_o = pad_data.BTN_CIRCLE;
512
513 //pad_buttons = paddata.buttons;
514 }
515 }
516}
517
518static void
519_ecore_psl1ght_poll_mouse(void)
520{
521 mouseInfo mouseinfo;
522 u32 i;
523
524 /**/
525 /* Check mouse events */
526 ioMouseGetInfo(&mouseinfo);
527
528 if (mouseinfo.status[0] == 1 && !mouse_connected) // Connected
529 {
530 mouse_connected = TRUE;
531 mouse_buttons = 0;
532
533 // Old events in the queue are discarded
534 ioMouseClearBuf(0);
535 }
536 else if (mouseinfo.status[0] != 1 && mouse_connected) // Disconnected
537 {
538 mouse_connected = FALSE;
539 mouse_buttons = 0;
540 }
541
542 if (mouse_connected)
543 {
544 mouseDataList datalist;
545
546 ioMouseGetDataList(0, &datalist);
547
548 for (i = 0; i < datalist.count; i++)
549 {
550 u8 old_left = mouse_buttons & 1;
551 u8 new_left = datalist.list[i].buttons & 1;
552 u8 old_right = mouse_buttons & 2;
553 u8 new_right = datalist.list[i].buttons & 2;
554 u8 old_middle = mouse_buttons & 4;
555 u8 new_middle = datalist.list[i].buttons & 4;
556
557 if (datalist.list[i].x_axis != 0 ||
558 datalist.list[i].y_axis != 0)
559 _ecore_psl1ght_mouse_move (datalist.list[i].x_axis,
560 datalist.list[i].y_axis);
561
562 if (old_left != new_left)
563 _ecore_psl1ght_mouse_button (1, new_left);
564 if (old_middle != new_middle)
565 _ecore_psl1ght_mouse_button (2, new_middle);
566 if (old_right != new_right)
567 _ecore_psl1ght_mouse_button (3, new_right);
568
569 if (datalist.list[i].wheel != 0)
570 _ecore_psl1ght_mouse_wheel (datalist.list[i].wheel,
571 datalist.list[i].tilt);
572
573 mouse_buttons = datalist.list[i].buttons;
574 }
575 }
576}
577
578static void
579_ecore_psl1ght_poll_move(void)
580{
581 int i;
582 u16 new_buttons;
583 static int t_pressed = 0;
584 static int calibrated = 0;
585 static float prev_x = 0;
586 static float prev_y = 0;
587 static int gyro = 0;
588 float x, y, z;
589
590 /* Check move events */
591 processMove (move_context);
592 new_buttons = move_context->state.paddata.buttons & (~move_buttons);
593 move_buttons = move_context->state.paddata.buttons;
594
595 moveGet3DPosition (move_context, &x, &y, &z);
596 //printf ("Move 3D position is : %f, %f, %f\n", x,y,z);
597
598 switch (new_buttons) {
599 case 1:
600 gyro = !gyro;
601 break;
602
603 case 4:
604 // Move button
605 printf ("Calibrating\n");
606 gemCalibrate (0);
607 calibrated = 1;
608 break;
609
610 case 8:
611 // start button
612 _ecore_psl1ght_mouse_move ((window_width / 2) - mouse_x, (window_height / 2) - mouse_y);
613 break;
614 }
615
616 if (calibrated)
617 {
618 float x_axis, y_axis;
619
620 if (gyro)
621 {
622 gemInertialState gem_inert;
623
624 gemGetInertialState (0, 0, 0, &gem_inert);
625 x_axis = -vec_array (gem_inert.gyro, 1) * 25;
626 y_axis = -vec_array (gem_inert.gyro, 0) * 25;
627 if (abs (x_axis) > 2 || abs (y_axis) > 2)
628 _ecore_psl1ght_mouse_move (x_axis, y_axis);
629 }
630 else {
631 x_axis = (x - prev_x) * 2.5;
632 y_axis = -(y - prev_y) * 2.5;
633 prev_x = x;
634 prev_y = y;
635 _ecore_psl1ght_mouse_move (x_axis, y_axis);
636 }
637
638 if (!t_pressed && (move_buttons & 0x2))
639 _ecore_psl1ght_mouse_button (1, 1);
640 else if (t_pressed && (move_buttons & 0x2) == 0)
641 _ecore_psl1ght_mouse_button (1, 0);
642 t_pressed = move_buttons & 0x2;
643 }
644}
645
646static void
647_ecore_psl1ght_poll_keyboard(void)
648{
649 KbInfo kbInfo;
650 int i;
651
652 /* Check keyboard events */
653 ioKbGetInfo(&kbInfo);
654
655 if (kbInfo.status[0] == 1 && !keyboard_connected)
656 {
657 /* Connected */
658 keyboard_connected = true;
659
660 // Old events in the queue are discarded
661 ioKbClearBuf(0);
662 keyboard_leds._KbLedU.leds = 0;
663 keyboard_mods._KbMkeyU.mkeys = 0;
664 keyboard_old_key = 0;
665
666 // Set raw keyboard code types to get scan codes
667 ioKbSetCodeType(0, KB_CODETYPE_RAW);
668 ioKbSetReadMode(0, KB_RMODE_INPUTCHAR);
669 }
670 else if (kbInfo.status[0] != 1 && keyboard_connected)
671 {
672 /* Disconnected keyboard */
673 keyboard_connected = FALSE;
674 }
675
676 if (keyboard_connected)
677 {
678 KbData Keys;
679
680 // Read data from the keyboard buffer
681 if (ioKbRead(0, &Keys) == 0 && Keys.nb_keycode > 0)
682 {
683 Ecore_Event_Key *ev = NULL;
684
685 _ecore_psl1ght_key_modifiers (&Keys.mkey, &Keys.led);
686
687 if (Keys.nb_keycode == 0 && keyboard_old_key != 0)
688 {
689 ev = _ecore_psl1ght_event_key (keyboard_old_key);
690 if (ev) ecore_event_add(ECORE_EVENT_KEY_UP, ev, NULL, NULL);
691 }
692 for (i = 0; i < Keys.nb_keycode; i++)
693 {
694 if (Keys.keycode[i] != keyboard_old_key)
695 {
696 if (Keys.keycode[i] != 0)
697 {
698 ev = _ecore_psl1ght_event_key (Keys.keycode[i]);
699 if (ev)
700 ecore_event_add(ECORE_EVENT_KEY_DOWN, ev,
701 NULL, NULL);
702 }
703 else
704 {
705 ev = _ecore_psl1ght_event_key (keyboard_old_key);
706 if (ev)
707 ecore_event_add(ECORE_EVENT_KEY_UP, ev,
708 NULL, NULL);
709 }
710 keyboard_old_key = Keys.keycode[0];
711 }
712 }
713 }
714 }
715}
716
717static void
718xmb_event_handler(u64 status, u64 param, void *user_data)
719{
720 printf ("Received event %lX\n", status);
721 if (status == SYSUTIL_EXIT_GAME)
722 {
723 ecore_main_loop_quit();
724 }
725 else if (status == SYSUTIL_MENU_OPEN)
726 {
727 }
728 else if (status == SYSUTIL_MENU_CLOSE)
729 {
730 }
731 else if (status == SYSUTIL_DRAW_BEGIN)
732 {
733 }
734 else if (status == SYSUTIL_DRAW_END)
735 {
736 }
737}
738
739EAPI void
740ecore_psl1ght_poll_events(void)
741{
742 _ecore_psl1ght_poll_joypad ();
743 _ecore_psl1ght_poll_mouse ();
744 if (move_context)
745 _ecore_psl1ght_poll_move ();
746 _ecore_psl1ght_poll_keyboard ();
747
748 sysUtilCheckCallback ();
749}
750
751EAPI void
752ecore_psl1ght_resolution_set(int width, int height)
753{
754 window_width = width;
755 window_height = height;
756 if (mouse_x > window_width) mouse_x = window_width;
757 if (mouse_y > window_height) mouse_y = window_height;
758}
759
760EAPI void
761ecore_psl1ght_screen_resolution_get(int *w, int *h)
762{
763 videoState state;
764 videoResolution resolution;
765
766 /* Get the state of the display */
767 if (videoGetState (0, 0, &state) == 0 &&
768 videoGetResolution (state.displayMode.resolution, &resolution) == 0)
769 {
770 if (w) *w = resolution.width;
771 if (h) *h = resolution.height;
772 }
773 else {
774 if (w) *w = 0;
775 if (h) *h = 0;
776 }
777}
778
779EAPI void
780ecore_psl1ght_optimal_screen_resolution_get(int *w, int *h)
781{
782 videoDeviceInfo info;
783 videoResolution res;
784 int area = 720 * 480;
785 int mode_area;
786 int i;
787
788 if (w) *w = 720;
789 if (h) *h = 480;
790
791 videoGetDeviceInfo(0, 0, &info);
792
793 for (i = 0; i < info.availableModeCount; i++) {
794 videoGetResolution (info.availableModes[i].resolution, &res);
795 mode_area = res.width * res.height;
796 if (mode_area > area)
797 {
798 area = mode_area;
799 if (w) *w = res.width;
800 if (h) *h = res.height;
801 }
802 }
803}
804
diff --git a/libraries/ecore/src/lib/ecore_psl1ght/ecore_psl1ght_private.h b/libraries/ecore/src/lib/ecore_psl1ght/ecore_psl1ght_private.h
new file mode 100644
index 0000000..bd5a86e
--- /dev/null
+++ b/libraries/ecore/src/lib/ecore_psl1ght/ecore_psl1ght_private.h
@@ -0,0 +1,36 @@
1#ifndef _ECORE_PSL1GHT_PRIVATE_H
2# define _ECORE_PSL1GHT_PRIVATE_H
3
4extern int _ecore_psl1ght_log_dom;
5
6# ifdef ECORE_PSL1GHT_DEFAULT_LOG_COLOR
7# undef ECORE_PSL1GHT_DEFAULT_LOG_COLOR
8# endif
9# define ECORE_PSL1GHT_DEFAULT_LOG_COLOR EINA_COLOR_BLUE
10
11# ifdef ERR
12# undef ERR
13# endif
14# define ERR(...) EINA_LOG_DOM_ERR(_ecore_psl1ght_log_dom, __VA_ARGS__)
15
16# ifdef DBG
17# undef DBG
18# endif
19# define DBG(...) EINA_LOG_DOM_DBG(_ecore_psl1ght_log_dom, __VA_ARGS__)
20
21# ifdef INF
22# undef INF
23# endif
24# define INF(...) EINA_LOG_DOM_INFO(_ecore_psl1ght_log_dom, __VA_ARGS__)
25
26# ifdef WRN
27# undef WRN
28# endif
29# define WRN(...) EINA_LOG_DOM_WARN(_ecore_psl1ght_log_dom, __VA_ARGS__)
30
31# ifdef CRIT
32# undef CRIT
33# endif
34# define CRIT(...) EINA_LOG_DOM_CRIT(_ecore_psl1ght_log_dom, __VA_ARGS__)
35
36#endif
diff --git a/libraries/ecore/src/lib/ecore_psl1ght/moveutil.c b/libraries/ecore/src/lib/ecore_psl1ght/moveutil.c
new file mode 100644
index 0000000..1dadfbc
--- /dev/null
+++ b/libraries/ecore/src/lib/ecore_psl1ght/moveutil.c
@@ -0,0 +1,245 @@
1#include <stdio.h>
2#include <io/move.h>
3#include <sys/memory.h>
4#include <ppu-types.h>
5#include <io/camera.h>
6#include <ppu-types.h>
7#include <spurs/spurs.h>
8#include <sys/thread.h>
9#include <sys/systime.h>
10
11#include "spursutil.h"
12#include "moveutil.h"
13
14u16 oldGemPad = 0;
15u16 newGemPad = 0;
16u16 newGemAnalogT = 0;
17
18static void
19endCamera(moveContext *context)
20{
21 cameraStop (0);
22
23 cameraClose (0);
24 cameraEnd ();
25
26 sysMemContainerDestroy (context->camInfo.container);
27}
28
29static int
30initCamera(moveContext *context)
31{
32 int ret;
33
34 context->camInfo.container = NULL;
35
36 ret = cameraInit ();
37 printf ("cameraInit() returned %d\n", ret);
38 if (ret == 0)
39 {
40 cameraType type = CAM_TYPE_UNKNOWN;
41
42 ret = cameraGetType (0, &type);
43 if (ret == 0 && type == CAM_TYPE_PLAYSTATION_EYE)
44 {
45 context->camInfo.format = CAM_FORM_RAW8;
46 context->camInfo.framerate = 60;
47 context->camInfo.resolution = CAM_RESO_VGA;
48 context->camInfo.info_ver = 0x0101;
49 ret = sysMemContainerCreate (&context->camInfo.container, 0x200000);
50 printf ("sysMemContainerCreate() for camera container returned %d\n", ret);
51
52 ret = cameraOpenEx (0, &context->camInfo);
53 switch (ret) {
54 case 0:
55 printf ("Found me an eye, arrr!\n");
56 printf ("cameraOpenEx returned %08X\n", ret);
57 printf ("Video dimensions: %dx%d\n", context->camInfo.width, context->camInfo.height);
58 printf ("Buffer at %08X\n", context->camInfo.buffer);
59 printf ("pbuf0 Buffer at %08X\n", context->camInfo.pbuf[0]);
60 printf ("pbuf0 Buffer at %08X\n", context->camInfo.pbuf[1]);
61 printf ("context->camInfo.info_ver %X\n", context->camInfo.info_ver);
62
63 context->camRead.buffer = context->camInfo.buffer;
64 context->camRead.version = 0x0100;
65 printf ("Setting CameraReadEx %08X buffer to cameraInfoex buffer \n",
66 context->camRead.buffer);
67 break;
68
69 default:
70 printf ("Error %X detected opening PlayStation Eye\n", ret);
71 goto error;
72 }
73 }
74 else {
75 printf ("Device detected is not a PlayStation Eye and this sample need it\n");
76 goto error;
77 }
78 }
79 else {
80 goto error;
81 }
82 return ret;
83
84error:
85 if (context->camInfo.container)
86 sysMemContainerDestroy (context->camInfo.container);
87 return ret;
88}
89
90static int
91readCamera(moveContext *context)
92{
93 int ret;
94
95 ret = cameraReadEx (0, &context->camRead);
96 switch (ret) {
97 case CAMERA_ERRO_NEED_START:
98 cameraReset (0);
99 ret = gemPrepareCamera (128, 0.5);
100 printf ("GemPrepareCamera return %d exposure set to 128 and quality to 0.5 before cameraStart\n",
101 ret);
102 printf ("lets go!! It's time to look your face in Sony Bravia :P\n");
103 ret = cameraStart (0);
104 printf ("cameraStart return %d \n", ret);
105 printf ("*******************************************\n");
106 printf ("* Now make sure you have a Move connected\n");
107 printf ("* and point it towards the camera and press\n");
108 printf ("* the action button to calibrate\n");
109 printf ("*******************************************\n");
110 break;
111
112 case 0:
113 break;
114
115 default:
116 printf ("error %08X ", ret);
117 ret = 1;
118 break;
119 }
120 // printf("despues de start return %d \n",ret);
121 if (ret == 0 && context->camRead.readcount != 0)
122 {
123 return context->camRead.readcount;
124 }
125 else {
126 return 0;
127 }
128}
129
130moveContext *
131initMove()
132{
133 moveContext *context = NULL;
134 Spurs *spurs;
135 gemAttribute gem_attr;
136 int ret;
137 int i;
138
139 spurs = initSpurs ("gem_spurs");
140
141 if (spurs == NULL)
142 goto error;
143
144 printf ("preparing GemAttribute structure with spurs\n");
145
146 gem_attr.version = 2;
147 gem_attr.max = 1;
148 gem_attr.spurs = spurs;
149 gem_attr.memory = NULL;
150 gem_attr.spu_priorities[0] = 1;
151 for (i = 1; i < 8; ++i)
152 gem_attr.spu_priorities[i] = 0;
153
154 printf ("calling GemInit with GemAttribute structure version=%d max_connect=%d spurs=%X\n",
155 gem_attr.version, gem_attr.max, gem_attr.spurs);
156 ret = gemInit (&gem_attr);
157 printf ("return from GemInit %X \n", ret);
158 if (ret)
159 goto error;
160
161 ret = gemPrepareCamera (128, 0.5);
162 printf ("GemPrepareCamera return %d exposure set to 128 and quality to 0.5\n",
163 ret);
164 if (ret)
165 goto error;
166 ret = gemReset (0);
167 printf ("GemReset return %X \n", ret);
168 if (ret)
169 goto error;
170
171 context = (moveContext *)malloc (sizeof (moveContext));
172 context->spurs = spurs;
173 ret = initCamera (context);
174
175 if (ret == 0)
176 return context;
177
178error:
179 if (spurs)
180 endSpurs (spurs);
181 if (context)
182 free (context);
183 return NULL;
184}
185
186void
187endMove(moveContext *context)
188{
189 /* Stop Move */
190 gemEnd ();
191 /* Stop Camera */
192 endCamera (context);
193 /* Stop Spurs */
194 endSpurs (context->spurs);
195
196 free (context);
197}
198
199int
200processMove(moveContext *context)
201{
202 const unsigned int hues[] = { 4 << 24, 4 << 24, 4 << 24, 4 << 24 };
203 int ret = -1;
204
205 if (readCamera (context) > 0)
206 {
207 ret = gemUpdateStart (context->camRead.buffer, context->camRead.timestamp);
208 //printf ("Return from gemUpdateStart %X\n", ret);
209 if (ret == 0)
210 {
211 ret = gemUpdateFinish ();
212 //printf ("Return from gemUpdateFinish %X\n", ret);
213 if (ret == 0)
214 {
215 ret = gemGetState (0, STATE_LATEST_IMAGE_TIME, 0, &context->state);
216 switch (ret) {
217 case 2:
218 gemForceRGB (0, 0.5, 0.5, 0.5);
219 break;
220
221 case 5:
222 gemTrackHues (hues, NULL);
223 break;
224
225 default:
226 break;
227 }
228 }
229 }
230 }
231
232 return ret;
233}
234
235void
236moveGet3DPosition(moveContext *context, float *x, float *y, float *z)
237{
238 if (x)
239 *x = vec_array (context->state.pos, 0);
240 if (y)
241 *y = vec_array (context->state.pos, 1);
242 if (z)
243 *z = vec_array (context->state.pos, 2);
244}
245
diff --git a/libraries/ecore/src/lib/ecore_psl1ght/spursutil.c b/libraries/ecore/src/lib/ecore_psl1ght/spursutil.c
new file mode 100644
index 0000000..27b5c1d
--- /dev/null
+++ b/libraries/ecore/src/lib/ecore_psl1ght/spursutil.c
@@ -0,0 +1,62 @@
1#include "spursutil.h"
2#include <sys/spu.h>
3
4#define SPURS_DEFAULT_PREFIX_NAME "spursutil"
5
6Spurs *
7initSpurs(const char *prefix_name)
8{
9 Spurs *spurs = NULL;
10 SpursAttribute attributeSpurs;
11 int ret;
12 int i;
13
14 ret = sysSpuInitialize (6, 0);
15 printf ("sysSpuInitialize return %d\n", ret);
16
17 /* initialize spurs */
18 printf ("Initializing spurs\n");
19 spurs = (void *)memalign (SPURS_ALIGN, sizeof (Spurs));
20 printf ("Initializing spurs attribute\n");
21
22 ret = spursAttributeInitialize (&attributeSpurs, 5, 250, 1000, true);
23 if (ret)
24 {
25 printf ("error : spursAttributeInitialize failed %x\n", ret);
26 goto error;
27 }
28
29 printf ("Setting name prefix\n");
30 if (!prefix_name)
31 prefix_name = SPURS_DEFAULT_PREFIX_NAME;
32 ret = spursAttributeSetNamePrefix (&attributeSpurs,
33 prefix_name, strlen (prefix_name));
34 if (ret)
35 {
36 printf ("error : spursAttributeInitialize failed %x\n", ret);
37 goto error;
38 }
39
40 printf ("Initializing with attribute\n");
41 ret = spursInitializeWithAttribute (spurs, &attributeSpurs);
42 if (ret)
43 {
44 printf ("error: spursInitializeWithAttribute failed %x\n", ret);
45 goto error;
46 }
47
48 return spurs;
49
50error:
51 if (spurs)
52 free (spurs);
53 return NULL;
54}
55
56void
57endSpurs(Spurs *spurs)
58{
59 spursFinalize (spurs);
60 free (spurs);
61}
62