aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/libraries/ecore/src/lib/ecore_wince
diff options
context:
space:
mode:
Diffstat (limited to 'libraries/ecore/src/lib/ecore_wince')
-rw-r--r--libraries/ecore/src/lib/ecore_wince/Ecore_WinCE.h310
-rw-r--r--libraries/ecore/src/lib/ecore_wince/Makefile.am35
-rw-r--r--libraries/ecore/src/lib/ecore_wince/Makefile.in829
-rw-r--r--libraries/ecore/src/lib/ecore_wince/ecore_wince.c400
-rw-r--r--libraries/ecore/src/lib/ecore_wince/ecore_wince_event.c1074
-rw-r--r--libraries/ecore/src/lib/ecore_wince/ecore_wince_private.h85
-rw-r--r--libraries/ecore/src/lib/ecore_wince/ecore_wince_window.c775
7 files changed, 3508 insertions, 0 deletions
diff --git a/libraries/ecore/src/lib/ecore_wince/Ecore_WinCE.h b/libraries/ecore/src/lib/ecore_wince/Ecore_WinCE.h
new file mode 100644
index 0000000..681b334
--- /dev/null
+++ b/libraries/ecore/src/lib/ecore_wince/Ecore_WinCE.h
@@ -0,0 +1,310 @@
1#ifndef __ECORE_WINCE_H__
2#define __ECORE_WINCE_H__
3
4/*
5 * DO NOT USE THIS HEADER. IT IS WORK IN PROGRESS. IT IS NOT FINAL AND
6 * THE API MAY CHANGE.
7 */
8
9#ifndef ECORE_WINCE_WIP_OSXCKQSD
10# warning "You are using a work in progress API. This API is not stable"
11# warning "and is subject to change. You use this at your own risk."
12#endif
13
14#include <Eina.h>
15
16#ifdef EAPI
17# undef EAPI
18#endif
19
20#ifdef _WIN32
21# ifdef EFL_ECORE_WINCE_BUILD
22# ifdef DLL_EXPORT
23# define EAPI __declspec(dllexport)
24# else
25# define EAPI
26# endif /* ! DLL_EXPORT */
27# else
28# define EAPI __declspec(dllimport)
29# endif /* ! EFL_ECORE_WINCE_BUILD */
30#else
31# ifdef __GNUC__
32# if __GNUC__ >= 4
33# define EAPI __attribute__ ((visibility("default")))
34# else
35# define EAPI
36# endif
37# else
38# define EAPI
39# endif
40#endif /* ! _WINCE */
41
42#ifdef __cplusplus
43extern "C" {
44#endif
45
46/**
47 * @defgroup Ecore_WinCE_Group Ecore_WinCE library
48 *
49 * @{
50 */
51
52
53/**
54 * @typedef Ecore_WinCE_Window
55 * Abstract type for a window.
56 */
57typedef struct _Ecore_WinCE_Window Ecore_WinCE_Window;
58
59
60/**
61 * @typedef Ecore_WinCE_Event_Mouse_In
62 * Event sent when the mouse enters the window.
63 */
64typedef struct _Ecore_WinCE_Event_Mouse_In Ecore_WinCE_Event_Mouse_In;
65
66/**
67 * @typedef Ecore_WinCE_Event_Mouse_Out
68 * Event sent when the mouse leaves the window.
69 */
70typedef struct _Ecore_WinCE_Event_Mouse_Out Ecore_WinCE_Event_Mouse_Out;
71
72/**
73 * @typedef Ecore_WinCE_Event_Window_Focus_In
74 * Event sent when the window gets the focus.
75 */
76typedef struct _Ecore_WinCE_Event_Window_Focus_In Ecore_WinCE_Event_Window_Focus_In;
77
78/**
79 * @typedef Ecore_WinCE_Event_Window_Focus_Out
80 * Event sent when the window looses the focus.
81 */
82typedef struct _Ecore_WinCE_Event_Window_Focus_Out Ecore_WinCE_Event_Window_Focus_Out;
83
84/**
85 * @typedef Ecore_WinCE_Event_Window_Damage
86 * Event sent when the window is damaged.
87 */
88typedef struct _Ecore_WinCE_Event_Window_Damage Ecore_WinCE_Event_Window_Damage;
89
90/**
91 * @typedef Ecore_WinCE_Event_Window_Create
92 * Event sent when the window is created.
93 */
94typedef struct _Ecore_WinCE_Event_Window_Create Ecore_WinCE_Event_Window_Create;
95
96/**
97 * @typedef Ecore_WinCE_Event_Window_Destroy
98 * Event sent when the window is destroyed.
99 */
100typedef struct _Ecore_WinCE_Event_Window_Destroy Ecore_WinCE_Event_Window_Destroy;
101
102/**
103 * @typedef Ecore_WinCE_Event_Window_Hide
104 * Event sent when the window is hidden.
105 */
106typedef struct _Ecore_WinCE_Event_Window_Hide Ecore_WinCE_Event_Window_Hide;
107
108/**
109 * @typedef Ecore_WinCE_Event_Window_Show
110 * Event sent when the window is shown.
111 */
112typedef struct _Ecore_WinCE_Event_Window_Show Ecore_WinCE_Event_Window_Show;
113
114/**
115 * @typedef Ecore_WinCE_Event_Window_Delete_Request
116 * Event sent when the window is deleted.
117 */
118typedef struct _Ecore_WinCE_Event_Window_Delete_Request Ecore_WinCE_Event_Window_Delete_Request;
119
120
121/**
122 * @struct _Ecore_WinCE_Event_Mouse_In
123 * Event sent when the mouse enters the window.
124 */
125struct _Ecore_WinCE_Event_Mouse_In
126{
127 Ecore_WinCE_Window *window; /**< The window that received the event */
128 int x; /**< The x coordinate where the mouse entered */
129 int y; /**< The y coordinate where the mouse entered */
130 long time; /**< The time the event occurred */
131};
132
133/**
134 * @struct _Ecore_WinCE_Event_Mouse_Out
135 * Event sent when the mouse leaves the window.
136 */
137struct _Ecore_WinCE_Event_Mouse_Out
138{
139 Ecore_WinCE_Window *window; /**< The window that received the event */
140 int x; /**< The x coordinate where the mouse leaved */
141 int y; /**< The y coordinate where the mouse leaved */
142 long time; /**< The time the event occurred */
143};
144
145/**
146 * @struct _Ecore_WinCE_Event_Window_Focus_In
147 * Event sent when the window gets the focus.
148 */
149struct _Ecore_WinCE_Event_Window_Focus_In
150{
151 Ecore_WinCE_Window *window; /**< The window that received the event */
152 long time; /**< The time the event occurred */
153};
154
155/**
156 * @struct _Ecore_WinCE_Event_Window_Focus_Out
157 * Event sent when the window looses the focus.
158 */
159struct _Ecore_WinCE_Event_Window_Focus_Out
160{
161 Ecore_WinCE_Window *window; /**< The window that received the event */
162 long time; /**< The time the event occurred */
163};
164
165/**
166 * @struct _Ecore_WinCE_Event_Window_Damage
167 * Event sent when the window is damaged.
168 */
169struct _Ecore_WinCE_Event_Window_Damage
170{
171 Ecore_WinCE_Window *window; /**< The window that received the event */
172 int x; /**< The x coordinate of the top left corner of the damaged region */
173 int y; /**< The y coordinate of the top left corner of the damaged region */
174 int width; /**< The width of the damaged region */
175 int height; /**< The height of the damaged region */
176 long time; /**< The time the event occurred */
177};
178
179/**
180 * @struct _Ecore_WinCE_Event_Window_Create
181 * Event sent when the window is created.
182 */
183struct _Ecore_WinCE_Event_Window_Create
184{
185 Ecore_WinCE_Window *window; /**< The window that received the event */
186 long time; /**< The time the event occurred */
187};
188
189/**
190 * @struct _Ecore_WinCE_Event_Window_Destroy
191 * Event sent when the window is destroyed.
192 */
193struct _Ecore_WinCE_Event_Window_Destroy
194{
195 Ecore_WinCE_Window *window; /**< The window that received the event */
196 long time; /**< The time the event occurred */
197};
198
199/**
200 * @struct _Ecore_WinCE_Event_Window_Hide
201 * Event sent when the window is hidden.
202 */
203struct _Ecore_WinCE_Event_Window_Hide
204{
205 Ecore_WinCE_Window *window; /**< The window that received the event */
206 long time; /**< The time the event occurred */
207};
208
209/**
210 * @struct _Ecore_WinCE_Event_Window_Show
211 * Event sent when the window is shown.
212 */
213struct _Ecore_WinCE_Event_Window_Show
214{
215 Ecore_WinCE_Window *window; /**< The window that received the event */
216 long time; /**< The time the event occurred */
217};
218
219/**
220 * @struct _Ecore_WinCE_Event_Window_Delete_Request
221 * Event sent when the window is deleted.
222 */
223struct _Ecore_WinCE_Event_Window_Delete_Request
224{
225 Ecore_WinCE_Window *window; /**< The window that received the event */
226 long time; /**< The time the event occurred */
227};
228
229
230EAPI extern int ECORE_WINCE_EVENT_MOUSE_IN; /**< Ecore_Event for the #Ecore_WinCE_Event_Mouse_In event */
231EAPI extern int ECORE_WINCE_EVENT_MOUSE_OUT; /**< Ecore_Event for the #Ecore_WinCE_Event_Mouse_Out event */
232EAPI extern int ECORE_WINCE_EVENT_WINDOW_FOCUS_IN; /**< Ecore_Event for the #Ecore_WinCE_Event_Window_Focus_In event */
233EAPI extern int ECORE_WINCE_EVENT_WINDOW_FOCUS_OUT; /**< Ecore_Event for the #Ecore_WinCE_Event_Window_Focus_Out event */
234EAPI extern int ECORE_WINCE_EVENT_WINDOW_DAMAGE; /**< Ecore_Event for the #Ecore_WinCE_Event_Damage event */
235EAPI extern int ECORE_WINCE_EVENT_WINDOW_CREATE; /**< Ecore_Event for the #Ecore_WinCE_Event_Create event */
236EAPI extern int ECORE_WINCE_EVENT_WINDOW_DESTROY; /**< Ecore_Event for the #Ecore_WinCE_Event_Destroy event */
237EAPI extern int ECORE_WINCE_EVENT_WINDOW_HIDE; /**< Ecore_Event for the #Ecore_WinCE_Event_Hide event */
238EAPI extern int ECORE_WINCE_EVENT_WINDOW_SHOW; /**< Ecore_Event for the #Ecore_WinCE_Event_Show event */
239EAPI extern int ECORE_WINCE_EVENT_WINDOW_DELETE_REQUEST; /**< Ecore_Event for the #Ecore_WinCE_Event_Window_Delete_Request event */
240
241
242/* Core */
243
244EAPI int ecore_wince_init();
245EAPI int ecore_wince_shutdown();
246EAPI void ecore_wince_double_click_time_set(double t);
247EAPI double ecore_wince_double_click_time_get(void);
248EAPI long ecore_wince_current_time_get(void);
249
250/* Window */
251
252EAPI Ecore_WinCE_Window *ecore_wince_window_new(Ecore_WinCE_Window *parent,
253 int x,
254 int y,
255 int width,
256 int height);
257
258EAPI void ecore_wince_window_free(Ecore_WinCE_Window *window);
259
260EAPI void *ecore_wince_window_hwnd_get(Ecore_WinCE_Window *window);
261
262EAPI void ecore_wince_window_move(Ecore_WinCE_Window *window,
263 int x,
264 int y);
265
266EAPI void ecore_wince_window_resize(Ecore_WinCE_Window *window,
267 int width,
268 int height);
269
270EAPI void ecore_wince_window_move_resize(Ecore_WinCE_Window *window,
271 int x,
272 int y,
273 int width,
274 int height);
275
276EAPI void ecore_wince_window_show(Ecore_WinCE_Window *window);
277
278EAPI void ecore_wince_window_hide(Ecore_WinCE_Window *window);
279
280EAPI void ecore_wince_window_title_set(Ecore_WinCE_Window *window,
281 const char *title);
282
283EAPI void ecore_wince_window_backend_set(Ecore_WinCE_Window *window, int backend);
284
285EAPI void ecore_wince_window_suspend_cb_set(Ecore_WinCE_Window *window, int (*suspend_cb)(int));
286
287EAPI void ecore_wince_window_resume_cb_set(Ecore_WinCE_Window *window, int (*resume_cb)(int));
288
289EAPI void ecore_wince_window_geometry_get(Ecore_WinCE_Window *window,
290 int *x,
291 int *y,
292 int *width,
293 int *height);
294
295EAPI void ecore_wince_window_size_get(Ecore_WinCE_Window *window,
296 int *width,
297 int *height);
298
299EAPI void ecore_wince_window_fullscreen_set(Ecore_WinCE_Window *window,
300 Eina_Bool on);
301
302/**
303 * @}
304 */
305
306#ifdef __cplusplus
307}
308#endif
309
310#endif /* __ECORE_WINCE_H__ */
diff --git a/libraries/ecore/src/lib/ecore_wince/Makefile.am b/libraries/ecore/src/lib/ecore_wince/Makefile.am
new file mode 100644
index 0000000..a264ffb
--- /dev/null
+++ b/libraries/ecore/src/lib/ecore_wince/Makefile.am
@@ -0,0 +1,35 @@
1MAINTAINERCLEANFILES = Makefile.in
2
3AM_CPPFLAGS = \
4-I$(top_srcdir)/src/lib/ecore \
5-I$(top_srcdir)/src/lib/ecore_input \
6-I$(top_builddir)/src/lib/ecore \
7-I$(top_builddir)/src/lib/ecore_input \
8@EFL_ECORE_WINCE_BUILD@ \
9@EVAS_CFLAGS@ \
10@EINA_CFLAGS@ \
11@WIN32_CPPFLAGS@
12
13AM_CFLAGS = @WIN32_CFLAGS@
14
15lib_LTLIBRARIES = libecore_wince.la
16
17includes_HEADERS = Ecore_WinCE.h
18includesdir = $(includedir)/ecore-@VMAJ@
19
20libecore_wince_la_SOURCES = \
21ecore_wince.c \
22ecore_wince_event.c \
23ecore_wince_window.c
24
25libecore_wince_la_LIBADD = \
26@WIN32_LIBS@ \
27$(top_builddir)/src/lib/ecore_input/libecore_input.la \
28$(top_builddir)/src/lib/ecore/libecore.la \
29@EVAS_LIBS@ \
30@EINA_LIBS@ \
31@EVIL_LIBS@
32
33libecore_wince_la_LDFLAGS = -no-undefined @lt_enable_auto_import@ -version-info @version_info@ @release_info@
34
35EXTRA_DIST = ecore_wince_private.h
diff --git a/libraries/ecore/src/lib/ecore_wince/Makefile.in b/libraries/ecore/src/lib/ecore_wince/Makefile.in
new file mode 100644
index 0000000..0610122
--- /dev/null
+++ b/libraries/ecore/src/lib/ecore_wince/Makefile.in
@@ -0,0 +1,829 @@
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_wince
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_wince_la_DEPENDENCIES = \
90 $(top_builddir)/src/lib/ecore_input/libecore_input.la \
91 $(top_builddir)/src/lib/ecore/libecore.la
92am_libecore_wince_la_OBJECTS = ecore_wince.lo ecore_wince_event.lo \
93 ecore_wince_window.lo
94libecore_wince_la_OBJECTS = $(am_libecore_wince_la_OBJECTS)
95AM_V_lt = $(am__v_lt_$(V))
96am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
97am__v_lt_0 = --silent
98libecore_wince_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
99 $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
100 $(AM_CFLAGS) $(CFLAGS) $(libecore_wince_la_LDFLAGS) $(LDFLAGS) \
101 -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_wince_la_SOURCES)
129DIST_SOURCES = $(libecore_wince_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_input \
469-I$(top_builddir)/src/lib/ecore \
470-I$(top_builddir)/src/lib/ecore_input \
471@EFL_ECORE_WINCE_BUILD@ \
472@EVAS_CFLAGS@ \
473@EINA_CFLAGS@ \
474@WIN32_CPPFLAGS@
475
476AM_CFLAGS = @WIN32_CFLAGS@
477lib_LTLIBRARIES = libecore_wince.la
478includes_HEADERS = Ecore_WinCE.h
479includesdir = $(includedir)/ecore-@VMAJ@
480libecore_wince_la_SOURCES = \
481ecore_wince.c \
482ecore_wince_event.c \
483ecore_wince_window.c
484
485libecore_wince_la_LIBADD = \
486@WIN32_LIBS@ \
487$(top_builddir)/src/lib/ecore_input/libecore_input.la \
488$(top_builddir)/src/lib/ecore/libecore.la \
489@EVAS_LIBS@ \
490@EINA_LIBS@ \
491@EVIL_LIBS@
492
493libecore_wince_la_LDFLAGS = -no-undefined @lt_enable_auto_import@ -version-info @version_info@ @release_info@
494EXTRA_DIST = ecore_wince_private.h
495all: all-am
496
497.SUFFIXES:
498.SUFFIXES: .c .lo .o .obj
499$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
500 @for dep in $?; do \
501 case '$(am__configure_deps)' in \
502 *$$dep*) \
503 ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
504 && { if test -f $@; then exit 0; else break; fi; }; \
505 exit 1;; \
506 esac; \
507 done; \
508 echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/lib/ecore_wince/Makefile'; \
509 $(am__cd) $(top_srcdir) && \
510 $(AUTOMAKE) --gnu src/lib/ecore_wince/Makefile
511.PRECIOUS: Makefile
512Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
513 @case '$?' in \
514 *config.status*) \
515 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
516 *) \
517 echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
518 cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
519 esac;
520
521$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
522 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
523
524$(top_srcdir)/configure: $(am__configure_deps)
525 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
526$(ACLOCAL_M4): $(am__aclocal_m4_deps)
527 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
528$(am__aclocal_m4_deps):
529install-libLTLIBRARIES: $(lib_LTLIBRARIES)
530 @$(NORMAL_INSTALL)
531 test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)"
532 @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
533 list2=; for p in $$list; do \
534 if test -f $$p; then \
535 list2="$$list2 $$p"; \
536 else :; fi; \
537 done; \
538 test -z "$$list2" || { \
539 echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \
540 $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \
541 }
542
543uninstall-libLTLIBRARIES:
544 @$(NORMAL_UNINSTALL)
545 @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
546 for p in $$list; do \
547 $(am__strip_dir) \
548 echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \
549 $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \
550 done
551
552clean-libLTLIBRARIES:
553 -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
554 @list='$(lib_LTLIBRARIES)'; for p in $$list; do \
555 dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
556 test "$$dir" != "$$p" || dir=.; \
557 echo "rm -f \"$${dir}/so_locations\""; \
558 rm -f "$${dir}/so_locations"; \
559 done
560libecore_wince.la: $(libecore_wince_la_OBJECTS) $(libecore_wince_la_DEPENDENCIES)
561 $(AM_V_CCLD)$(libecore_wince_la_LINK) -rpath $(libdir) $(libecore_wince_la_OBJECTS) $(libecore_wince_la_LIBADD) $(LIBS)
562
563mostlyclean-compile:
564 -rm -f *.$(OBJEXT)
565
566distclean-compile:
567 -rm -f *.tab.c
568
569@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ecore_wince.Plo@am__quote@
570@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ecore_wince_event.Plo@am__quote@
571@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ecore_wince_window.Plo@am__quote@
572
573.c.o:
574@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
575@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
576@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
577@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
578@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
579@am__fastdepCC_FALSE@ $(COMPILE) -c $<
580
581.c.obj:
582@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
583@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
584@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
585@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
586@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
587@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
588
589.c.lo:
590@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
591@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
592@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
593@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
594@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
595@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
596
597mostlyclean-libtool:
598 -rm -f *.lo
599
600clean-libtool:
601 -rm -rf .libs _libs
602install-includesHEADERS: $(includes_HEADERS)
603 @$(NORMAL_INSTALL)
604 test -z "$(includesdir)" || $(MKDIR_P) "$(DESTDIR)$(includesdir)"
605 @list='$(includes_HEADERS)'; test -n "$(includesdir)" || list=; \
606 for p in $$list; do \
607 if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
608 echo "$$d$$p"; \
609 done | $(am__base_list) | \
610 while read files; do \
611 echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(includesdir)'"; \
612 $(INSTALL_HEADER) $$files "$(DESTDIR)$(includesdir)" || exit $$?; \
613 done
614
615uninstall-includesHEADERS:
616 @$(NORMAL_UNINSTALL)
617 @list='$(includes_HEADERS)'; test -n "$(includesdir)" || list=; \
618 files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
619 test -n "$$files" || exit 0; \
620 echo " ( cd '$(DESTDIR)$(includesdir)' && rm -f" $$files ")"; \
621 cd "$(DESTDIR)$(includesdir)" && rm -f $$files
622
623ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
624 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
625 unique=`for i in $$list; do \
626 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
627 done | \
628 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
629 END { if (nonempty) { for (i in files) print i; }; }'`; \
630 mkid -fID $$unique
631tags: TAGS
632
633TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
634 $(TAGS_FILES) $(LISP)
635 set x; \
636 here=`pwd`; \
637 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
638 unique=`for i in $$list; do \
639 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
640 done | \
641 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
642 END { if (nonempty) { for (i in files) print i; }; }'`; \
643 shift; \
644 if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
645 test -n "$$unique" || unique=$$empty_fix; \
646 if test $$# -gt 0; then \
647 $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
648 "$$@" $$unique; \
649 else \
650 $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
651 $$unique; \
652 fi; \
653 fi
654ctags: CTAGS
655CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
656 $(TAGS_FILES) $(LISP)
657 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
658 unique=`for i in $$list; do \
659 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
660 done | \
661 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
662 END { if (nonempty) { for (i in files) print i; }; }'`; \
663 test -z "$(CTAGS_ARGS)$$unique" \
664 || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
665 $$unique
666
667GTAGS:
668 here=`$(am__cd) $(top_builddir) && pwd` \
669 && $(am__cd) $(top_srcdir) \
670 && gtags -i $(GTAGS_ARGS) "$$here"
671
672distclean-tags:
673 -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
674
675distdir: $(DISTFILES)
676 @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
677 topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
678 list='$(DISTFILES)'; \
679 dist_files=`for file in $$list; do echo $$file; done | \
680 sed -e "s|^$$srcdirstrip/||;t" \
681 -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
682 case $$dist_files in \
683 */*) $(MKDIR_P) `echo "$$dist_files" | \
684 sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
685 sort -u` ;; \
686 esac; \
687 for file in $$dist_files; do \
688 if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
689 if test -d $$d/$$file; then \
690 dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
691 if test -d "$(distdir)/$$file"; then \
692 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
693 fi; \
694 if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
695 cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
696 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
697 fi; \
698 cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
699 else \
700 test -f "$(distdir)/$$file" \
701 || cp -p $$d/$$file "$(distdir)/$$file" \
702 || exit 1; \
703 fi; \
704 done
705check-am: all-am
706check: check-am
707all-am: Makefile $(LTLIBRARIES) $(HEADERS)
708installdirs:
709 for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(includesdir)"; do \
710 test -z "$$dir" || $(MKDIR_P) "$$dir"; \
711 done
712install: install-am
713install-exec: install-exec-am
714install-data: install-data-am
715uninstall: uninstall-am
716
717install-am: all-am
718 @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
719
720installcheck: installcheck-am
721install-strip:
722 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
723 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
724 `test -z '$(STRIP)' || \
725 echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
726mostlyclean-generic:
727
728clean-generic:
729
730distclean-generic:
731 -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
732 -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
733
734maintainer-clean-generic:
735 @echo "This command is intended for maintainers to use"
736 @echo "it deletes files that may require special tools to rebuild."
737 -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
738clean: clean-am
739
740clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \
741 mostlyclean-am
742
743distclean: distclean-am
744 -rm -rf ./$(DEPDIR)
745 -rm -f Makefile
746distclean-am: clean-am distclean-compile distclean-generic \
747 distclean-tags
748
749dvi: dvi-am
750
751dvi-am:
752
753html: html-am
754
755html-am:
756
757info: info-am
758
759info-am:
760
761install-data-am: install-includesHEADERS
762
763install-dvi: install-dvi-am
764
765install-dvi-am:
766
767install-exec-am: install-libLTLIBRARIES
768
769install-html: install-html-am
770
771install-html-am:
772
773install-info: install-info-am
774
775install-info-am:
776
777install-man:
778
779install-pdf: install-pdf-am
780
781install-pdf-am:
782
783install-ps: install-ps-am
784
785install-ps-am:
786
787installcheck-am:
788
789maintainer-clean: maintainer-clean-am
790 -rm -rf ./$(DEPDIR)
791 -rm -f Makefile
792maintainer-clean-am: distclean-am maintainer-clean-generic
793
794mostlyclean: mostlyclean-am
795
796mostlyclean-am: mostlyclean-compile mostlyclean-generic \
797 mostlyclean-libtool
798
799pdf: pdf-am
800
801pdf-am:
802
803ps: ps-am
804
805ps-am:
806
807uninstall-am: uninstall-includesHEADERS uninstall-libLTLIBRARIES
808
809.MAKE: install-am install-strip
810
811.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
812 clean-libLTLIBRARIES clean-libtool ctags distclean \
813 distclean-compile distclean-generic distclean-libtool \
814 distclean-tags distdir dvi dvi-am html html-am info info-am \
815 install install-am install-data install-data-am install-dvi \
816 install-dvi-am install-exec install-exec-am install-html \
817 install-html-am install-includesHEADERS install-info \
818 install-info-am install-libLTLIBRARIES install-man install-pdf \
819 install-pdf-am install-ps install-ps-am install-strip \
820 installcheck installcheck-am installdirs maintainer-clean \
821 maintainer-clean-generic mostlyclean mostlyclean-compile \
822 mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
823 tags uninstall uninstall-am uninstall-includesHEADERS \
824 uninstall-libLTLIBRARIES
825
826
827# Tell versions [3.59,3.63) of GNU make to not export all variables.
828# Otherwise a system limit (for SysV at least) may be exceeded.
829.NOEXPORT:
diff --git a/libraries/ecore/src/lib/ecore_wince/ecore_wince.c b/libraries/ecore/src/lib/ecore_wince/ecore_wince.c
new file mode 100644
index 0000000..5638ad3
--- /dev/null
+++ b/libraries/ecore/src/lib/ecore_wince/ecore_wince.c
@@ -0,0 +1,400 @@
1#ifdef HAVE_CONFIG_H
2# include <config.h>
3#endif
4
5#include <stdlib.h>
6#include <stdio.h> /* for printf */
7
8#define WIN32_LEAN_AND_MEAN
9#include <windows.h>
10#undef WIN32_LEAN_AND_MEAN
11
12#include <Eina.h>
13#include <Ecore.h>
14#include <Ecore_Input.h>
15
16#include "Ecore_WinCE.h"
17#include "ecore_wince_private.h"
18
19/*============================================================================*
20 * Local *
21 *============================================================================*/
22
23/**
24 * @cond LOCAL
25 */
26
27static int _ecore_wince_init_count = 0;
28
29LRESULT CALLBACK
30_ecore_wince_window_procedure(HWND window,
31 UINT message,
32 WPARAM window_param,
33 LPARAM data_param)
34{
35 Ecore_WinCE_Callback_Data *data;
36 POINTS pt;
37 DWORD coord;
38
39 data = (Ecore_WinCE_Callback_Data *)malloc(sizeof(Ecore_WinCE_Callback_Data));
40 if (!data) return DefWindowProc(window, message, window_param, data_param);
41
42 data->window = window;
43 data->message = message;
44 data->window_param = window_param;
45 data->data_param = data_param;
46 data->time = GetTickCount();
47 coord = GetMessagePos();
48 pt = MAKEPOINTS(coord);
49 data->x = pt.x;
50 data->y = pt.y;
51
52 switch (data->message)
53 {
54 /* Keyboard input notifications */
55 case WM_CHAR:
56 _ecore_wince_event_handle_key_press(data, 0);
57 break;
58 case WM_HOTKEY:
59 _ecore_wince_event_handle_key_press(data, 1);
60 break;
61 case WM_KEYDOWN:
62 case WM_SYSKEYDOWN:
63 _ecore_wince_event_handle_key_press(data, 1);
64 break;
65 case WM_KEYUP:
66 case WM_SYSKEYUP:
67 _ecore_wince_event_handle_key_release(data, 1);
68 break;
69 case WM_SETFOCUS:
70 _ecore_wince_event_handle_focus_in(data);
71 break;
72 case WM_KILLFOCUS:
73 _ecore_wince_event_handle_focus_out(data);
74 break;
75 /* Mouse input notifications */
76 case WM_LBUTTONDOWN:
77 _ecore_wince_event_handle_button_press(data, 1);
78 break;
79 case WM_LBUTTONUP:
80 _ecore_wince_event_handle_button_release(data, 1);
81 break;
82 case WM_MOUSEMOVE:
83 {
84 RECT rect;
85 Ecore_WinCE_Window *w = NULL;
86
87 w = (Ecore_WinCE_Window *)GetWindowLong(window, GWL_USERDATA);
88
89 if (GetClientRect(window, &rect))
90 {
91 POINT pt;
92
93 INF("mouse in window");
94
95 pt.x = LOWORD(data_param);
96 pt.y = HIWORD(data_param);
97 if (!PtInRect(&rect, pt))
98 {
99 if (w->pointer_is_in)
100 {
101 w->pointer_is_in = 0;
102 _ecore_wince_event_handle_leave_notify(data);
103 }
104 }
105 else
106 {
107 if (!w->pointer_is_in)
108 {
109 w->pointer_is_in = 1;
110 _ecore_wince_event_handle_enter_notify(data);
111 }
112 }
113 }
114 else
115 {
116 ERR("GetClientRect() failed");
117 }
118 _ecore_wince_event_handle_motion_notify(data);
119
120 break;
121 }
122 /* Window notifications */
123 case WM_CREATE:
124 _ecore_wince_event_handle_create_notify(data);
125 break;
126 case WM_DESTROY:
127 _ecore_wince_event_handle_destroy_notify(data);
128 break;
129 case WM_SHOWWINDOW:
130 if ((data->data_param == SW_OTHERUNZOOM) ||
131 (data->data_param == SW_OTHERZOOM))
132 break;
133
134 if (data->window_param)
135 _ecore_wince_event_handle_map_notify(data);
136 else
137 _ecore_wince_event_handle_unmap_notify(data);
138
139 break;
140 case WM_CLOSE:
141 _ecore_wince_event_handle_delete_request(data);
142 break;
143 /* GDI notifications */
144 case WM_ERASEBKGND:
145 return 1;
146 case WM_PAINT:
147 {
148 PAINTSTRUCT paint;
149
150 if (BeginPaint(window, &paint))
151 {
152 data->update = paint.rcPaint;
153 _ecore_wince_event_handle_expose(data);
154 EndPaint(window, &paint);
155 }
156 break;
157 }
158 default:
159 return DefWindowProc(window, message, window_param, data_param);
160 }
161
162 return 0;
163}
164
165static void
166_ecore_wince_error_print_cb(const Eina_Log_Domain *d __UNUSED__,
167 Eina_Log_Level level __UNUSED__,
168 const char *file __UNUSED__,
169 const char *fnc,
170 int line,
171 const char *fmt,
172 void *data __UNUSED__,
173 va_list args)
174{
175 fprintf(stderr, "[%s:%d] ", fnc, line);
176 vfprintf(stderr, fmt, args);
177}
178
179/**
180 * @endcond
181 */
182
183
184/*============================================================================*
185 * Global *
186 *============================================================================*/
187
188
189double _ecore_wince_double_click_time = 0.25;
190long _ecore_wince_event_last_time = 0;
191Ecore_WinCE_Window *_ecore_wince_event_last_window = NULL;
192HINSTANCE _ecore_wince_instance = NULL;
193int _ecore_wince_log_dom_global = -1;
194
195int ECORE_WINCE_EVENT_MOUSE_IN = 0;
196int ECORE_WINCE_EVENT_MOUSE_OUT = 0;
197int ECORE_WINCE_EVENT_WINDOW_FOCUS_IN = 0;
198int ECORE_WINCE_EVENT_WINDOW_FOCUS_OUT = 0;
199int ECORE_WINCE_EVENT_WINDOW_DAMAGE = 0;
200int ECORE_WINCE_EVENT_WINDOW_CREATE = 0;
201int ECORE_WINCE_EVENT_WINDOW_DESTROY = 0;
202int ECORE_WINCE_EVENT_WINDOW_SHOW = 0;
203int ECORE_WINCE_EVENT_WINDOW_HIDE = 0;
204int ECORE_WINCE_EVENT_WINDOW_DELETE_REQUEST = 0;
205
206/*============================================================================*
207 * API *
208 *============================================================================*/
209
210/**
211 * @addtogroup Ecore_WinCE_Group Ecore_WinCE library
212 *
213 * Ecore_WinCE is a library that wraps Windows CE graphic functions
214 * and integrate them nicely into the Ecore main loop.
215 *
216 * @{
217 */
218
219/**
220 * @brief Initialize the Ecore_WinCE library.
221 *
222 * @return 1 or greater on success, 0 on error.
223 *
224 * This function sets up the Windows CE graphic system. It returns 0 on
225 * failure, otherwise it returns the number of times it has already been
226 * called.
227 *
228 * When Ecore_WinCE is not used anymore, call ecore_wince_shutdown()
229 * to shut down the Ecore_WinCE library.
230 */
231EAPI int
232ecore_wince_init()
233{
234 WNDCLASS wc;
235
236 if (++_ecore_wince_init_count != 1)
237 return _ecore_wince_init_count;
238
239 if (!eina_init())
240 return --_ecore_wince_init_count;
241
242 eina_log_print_cb_set(_ecore_wince_error_print_cb, NULL);
243 _ecore_wince_log_dom_global = eina_log_domain_register
244 ("ecore_wince", ECORE_WINCE_DEFAULT_LOG_COLOR);
245 if (_ecore_wince_log_dom_global < 0)
246 {
247 EINA_LOG_ERR("Ecore_WinCE: Could not register log domain");
248 goto shutdown_eina;
249 }
250
251 if (!ecore_event_init())
252 {
253 ERR("Ecore_WinCE: Could not init ecore_event");
254 goto unregister_log_domain;
255 }
256
257 _ecore_wince_instance = GetModuleHandle(NULL);
258 if (!_ecore_wince_instance)
259 {
260 ERR("GetModuleHandle() failed");
261 goto shutdown_ecore_event;
262 }
263
264 memset (&wc, 0, sizeof (wc));
265 wc.style = CS_HREDRAW | CS_VREDRAW;
266 wc.lpfnWndProc = _ecore_wince_window_procedure;
267 wc.cbClsExtra = 0;
268 wc.cbWndExtra = 0;
269 wc.hInstance = _ecore_wince_instance;
270 wc.hIcon = NULL;
271 wc.hCursor = LoadCursor (NULL, IDC_ARROW);
272 wc.hbrBackground = GetSysColorBrush(COLOR_BTNFACE);
273 wc.lpszMenuName = NULL;
274 wc.lpszClassName = ECORE_WINCE_WINDOW_CLASS;
275
276 if(!RegisterClass(&wc))
277 {
278 ERR("RegisterClass() failed");
279 goto free_library;
280 }
281
282 if (!ECORE_WINCE_EVENT_MOUSE_IN)
283 {
284 ECORE_WINCE_EVENT_MOUSE_IN = ecore_event_type_new();
285 ECORE_WINCE_EVENT_MOUSE_OUT = ecore_event_type_new();
286 ECORE_WINCE_EVENT_WINDOW_FOCUS_IN = ecore_event_type_new();
287 ECORE_WINCE_EVENT_WINDOW_FOCUS_OUT = ecore_event_type_new();
288 ECORE_WINCE_EVENT_WINDOW_DAMAGE = ecore_event_type_new();
289 ECORE_WINCE_EVENT_WINDOW_CREATE = ecore_event_type_new();
290 ECORE_WINCE_EVENT_WINDOW_DESTROY = ecore_event_type_new();
291 ECORE_WINCE_EVENT_WINDOW_SHOW = ecore_event_type_new();
292 ECORE_WINCE_EVENT_WINDOW_HIDE = ecore_event_type_new();
293 ECORE_WINCE_EVENT_WINDOW_DELETE_REQUEST = ecore_event_type_new();
294 }
295
296 return _ecore_wince_init_count;
297
298 free_library:
299 FreeLibrary(_ecore_wince_instance);
300 shutdown_ecore_event:
301 ecore_event_shutdown();
302 unregister_log_domain:
303 eina_log_domain_unregister(_ecore_wince_log_dom_global);
304 shutdown_eina:
305 eina_shutdown();
306
307 return --_ecore_wince_init_count;
308}
309
310/**
311 * @brief Shut down the Ecore_WinCE library.
312 *
313 * @return 0 when the library is completely shut down, 1 or
314 * greater otherwise.
315 *
316 * This function shuts down the Ecore_WinCE library. It returns 0 when it has
317 * been called the same number of times than ecore_wince_init(). In that case
318 * it shuts down all the Windows CE graphic system.
319 */
320EAPI int
321ecore_wince_shutdown()
322{
323 HWND task_bar;
324
325 if (--_ecore_wince_init_count != 0)
326 return _ecore_wince_init_count;
327
328 /* force task bar to be shown (in case the application exits */
329 /* while being fullscreen) */
330 task_bar = FindWindow(L"HHTaskBar", NULL);
331 if (task_bar)
332 {
333 ShowWindow(task_bar, SW_SHOW);
334 EnableWindow(task_bar, TRUE);
335 }
336
337 if (!UnregisterClass(ECORE_WINCE_WINDOW_CLASS, _ecore_wince_instance))
338 ERR("UnregisterClass() failed");
339
340 if (!FreeLibrary(_ecore_wince_instance))
341 ERR("FreeLibrary() failed");
342
343 _ecore_wince_instance = NULL;
344
345 ecore_event_shutdown();
346 eina_log_domain_unregister(_ecore_wince_log_dom_global);
347 _ecore_wince_log_dom_global = -1;
348 eina_shutdown();
349
350 return _ecore_wince_init_count;
351}
352
353/**
354 * @brief Set the timeout for a double and triple clicks to be flagged.
355 *
356 * @param t The time in seconds.
357 *
358 * This function sets the time @p t between clicks before the
359 * double_click flag is set in a button down event. If 3 clicks occur
360 * within double this time, the triple_click flag is also set.
361 */
362EAPI void
363ecore_wince_double_click_time_set(double t)
364{
365 if (t < 0.0) t = 0.0;
366 _ecore_wince_double_click_time = t;
367}
368
369/**
370 * @brief Retrieve the double and triple click flag timeout.
371 *
372 * @return The timeout for double clicks in seconds.
373 *
374 * This function returns the double clicks in seconds. If
375 * ecore_wince_double_click_time_set() has not been called, the
376 * default value is returned. See ecore_wince_double_click_time_set()
377 * for more informations.
378 */
379EAPI double
380ecore_wince_double_click_time_get(void)
381{
382 return _ecore_wince_double_click_time;
383}
384
385/**
386 * @brief Return the last event time.
387 *
388 * @return The last envent time.
389 *
390 * This function returns the last event time.
391 */
392EAPI long
393ecore_wince_current_time_get(void)
394{
395 return _ecore_wince_event_last_time;
396}
397
398/**
399 * @}
400 */
diff --git a/libraries/ecore/src/lib/ecore_wince/ecore_wince_event.c b/libraries/ecore/src/lib/ecore_wince/ecore_wince_event.c
new file mode 100644
index 0000000..41c355b
--- /dev/null
+++ b/libraries/ecore/src/lib/ecore_wince/ecore_wince_event.c
@@ -0,0 +1,1074 @@
1#ifdef HAVE_CONFIG_H
2# include <config.h>
3#endif
4
5#include <stdlib.h>
6
7#define WIN32_LEAN_AND_MEAN
8#include <windows.h>
9#undef WIN32_LEAN_AND_MEAN
10
11#include <Eina.h>
12#include <Ecore.h>
13#include <Ecore_Input.h>
14
15#include "Ecore_WinCE.h"
16#include "ecore_wince_private.h"
17
18/*============================================================================*
19 * Local *
20 *============================================================================*/
21
22/**
23 * @cond LOCAL
24 */
25
26typedef enum
27{
28 ECORE_WINCE_KEY_MASK_LSHIFT = 1 << 0,
29 ECORE_WINCE_KEY_MASK_RSHIFT = 1 << 1,
30 ECORE_WINCE_KEY_MASK_LCONTROL = 1 << 2,
31 ECORE_WINCE_KEY_MASK_RCONTROL = 1 << 3,
32 ECORE_WINCE_KEY_MASK_LMENU = 1 << 4,
33 ECORE_WINCE_KEY_MASK_RMENU = 1 << 5
34} Ecore_Wince_Key_Mask;
35
36static Ecore_WinCE_Window *_ecore_wince_mouse_down_last_window = NULL;
37static Ecore_WinCE_Window *_ecore_wince_mouse_down_last_last_window = NULL;
38static long _ecore_wince_mouse_down_last_time = 0;
39static long _ecore_wince_mouse_down_last_last_time = 0;
40static int _ecore_wince_mouse_down_did_triple = 0;
41static int _ecore_wince_mouse_up_count = 0;
42static Ecore_Wince_Key_Mask _ecore_wince_key_mask = 0;
43
44static void
45_ecore_wince_event_free_key_down(void *data __UNUSED__,
46 void *ev)
47{
48 Ecore_Event_Key *e;
49
50 e = ev;
51 if (e->keyname) free((char *)e->keyname);
52 if (e->key) free((char *)e->key);
53 if (e->string) free((char *)e->string);
54 free(e);
55}
56
57static void
58_ecore_wince_event_free_key_up(void *data __UNUSED__,
59 void *ev)
60{
61 Ecore_Event_Key *e;
62
63 e = ev;
64 if (e->keyname) free((char *)e->keyname);
65 if (e->key) free((char *)e->key);
66 if (e->string) free((char *)e->string);
67 free(e);
68}
69
70static int
71_ecore_wince_event_keystroke_get(int key,
72 Eina_Bool is_down,
73 char **keyname,
74 char **keysymbol,
75 char **keycompose)
76{
77 char *kn;
78 char *ks;
79 char *kc;
80
81 *keyname = NULL;
82 *keysymbol = NULL;
83 *keycompose = NULL;
84
85 switch (key)
86 {
87 /* Keystroke */
88 case VK_PRIOR:
89 kn = "Prior";
90 ks = "Prior";
91 kc = "Prior";
92 break;
93 case VK_NEXT:
94 kn = "Next";
95 ks = "Next";
96 kc = "Next";
97 break;
98 case VK_END:
99 kn = "End";
100 ks = "End";
101 kc = "End";
102 break;
103 case VK_HOME:
104 kn = "Home";
105 ks = "Home";
106 kc = "Home";
107 break;
108 case VK_LEFT:
109 kn = "Left";
110 ks = "Left";
111 kc = "Left";
112 break;
113 case VK_UP:
114 kn = "Up";
115 ks = "Up";
116 kc = "Up";
117 break;
118 case VK_RIGHT:
119 kn = "Right";
120 ks = "Right";
121 kc = "Right";
122 break;
123 case VK_DOWN:
124 kn = "Down";
125 ks = "Down";
126 kc = "Down";
127 break;
128 case VK_INSERT:
129 kn = "Insert";
130 ks = "Insert";
131 kc = "Insert";
132 break;
133 case VK_DELETE:
134 kn = "Delete";
135 ks = "Delete";
136 kc = "Delete";
137 break;
138 case VK_F1:
139 kn = "F1";
140 ks = "F1";
141 kc = "";
142 break;
143 case VK_F2:
144 kn = "F2";
145 ks = "F2";
146 kc = "";
147 break;
148 case VK_F3:
149 kn = "F3";
150 ks = "F3";
151 kc = "";
152 break;
153 case VK_F4:
154 kn = "F4";
155 ks = "F4";
156 kc = "";
157 break;
158 case VK_F5:
159 kn = "F5";
160 ks = "F5";
161 kc = "";
162 break;
163 case VK_F6:
164 kn = "F6";
165 ks = "F6";
166 kc = "";
167 break;
168 case VK_F7:
169 kn = "F7";
170 ks = "F7";
171 kc = "";
172 break;
173 case VK_F8:
174 kn = "F8";
175 ks = "F8";
176 kc = "";
177 break;
178 case VK_F9:
179 kn = "F9";
180 ks = "F9";
181 kc = "";
182 break;
183 case VK_F10:
184 kn = "F10";
185 ks = "F10";
186 kc = "";
187 break;
188 case VK_F11:
189 kn = "F11";
190 ks = "F11";
191 kc = "";
192 break;
193 case VK_F12:
194 kn = "F12";
195 ks = "F12";
196 kc = "";
197 break;
198 case VK_F13:
199 kn = "F13";
200 ks = "F13";
201 kc = "";
202 break;
203 case VK_F14:
204 kn = "F14";
205 ks = "F14";
206 kc = "";
207 break;
208 case VK_F15:
209 kn = "F15";
210 ks = "F15";
211 kc = "";
212 break;
213 case VK_F16:
214 kn = "F16";
215 ks = "F16";
216 kc = "";
217 break;
218 case VK_F17:
219 kn = "F17";
220 ks = "F17";
221 kc = "";
222 break;
223 case VK_F18:
224 kn = "F18";
225 ks = "F18";
226 kc = "";
227 break;
228 case VK_F19:
229 kn = "F19";
230 ks = "F19";
231 kc = "";
232 break;
233 case VK_F20:
234 /*
235 * VK_F20 indicates that an arrow key came from a rocker.
236 * This can safely be ignored.
237 */
238 return 0;
239 case VK_F21:
240 /*
241 * VK_F21 indicates that an arrow key came from a directional
242 * pad. This can safely be ignored.
243 */
244 return 0;
245 case VK_F22:
246 kn = "F22";
247 ks = "F22";
248 kc = "";
249 break;
250 case VK_F23:
251 /*
252 * Sent with VK_RETURN when doing an action (usually the middle
253 * button on a directional pad. This can safely be ignored.
254 */
255 return 0;
256 case VK_F24:
257 kn = "F24";
258 ks = "F24";
259 kc = "";
260 break;
261 case VK_APPS:
262 kn = "Application";
263 ks = "Application";
264 kc = "";
265 break;
266 case VK_SHIFT:
267 {
268 SHORT res;
269
270 if (is_down)
271 {
272 res = GetKeyState(VK_LSHIFT);
273 if (res & 0x8000)
274 {
275 _ecore_wince_key_mask |= ECORE_WINCE_KEY_MASK_LSHIFT;
276 kn = "Shift_L";
277 ks = "Shift_L";
278 kc = "";
279 }
280 res = GetKeyState(VK_RSHIFT);
281 if (res & 0x8000)
282 {
283 _ecore_wince_key_mask |= ECORE_WINCE_KEY_MASK_RSHIFT;
284 kn = "Shift_R";
285 ks = "Shift_R";
286 kc = "";
287 }
288 }
289 else /* is_up */
290 {
291 res = GetKeyState(VK_LSHIFT);
292 if (!(res & 0x8000) &&
293 (_ecore_wince_key_mask & ECORE_WINCE_KEY_MASK_LSHIFT))
294 {
295 kn = "Shift_L";
296 ks = "Shift_L";
297 kc = "";
298 _ecore_wince_key_mask &= ~ECORE_WINCE_KEY_MASK_LSHIFT;
299 }
300 res = GetKeyState(VK_RSHIFT);
301 if (!(res & 0x8000) &&
302 (_ecore_wince_key_mask & ECORE_WINCE_KEY_MASK_RSHIFT))
303 {
304 kn = "Shift_R";
305 ks = "Shift_R";
306 kc = "";
307 _ecore_wince_key_mask &= ~ECORE_WINCE_KEY_MASK_RSHIFT;
308 }
309 }
310 break;
311 }
312 case VK_CONTROL:
313 {
314 SHORT res;
315
316 if (is_down)
317 {
318 res = GetKeyState(VK_LCONTROL);
319 if (res & 0x8000)
320 {
321 _ecore_wince_key_mask |= ECORE_WINCE_KEY_MASK_LCONTROL;
322 kn = "Control_L";
323 ks = "Control_L";
324 kc = "";
325 break;
326 }
327 res = GetKeyState(VK_RCONTROL);
328 if (res & 0x8000)
329 {
330 _ecore_wince_key_mask |= ECORE_WINCE_KEY_MASK_RCONTROL;
331 kn = "Control_R";
332 ks = "Control_R";
333 kc = "";
334 break;
335 }
336 }
337 else /* is_up */
338 {
339 res = GetKeyState(VK_LCONTROL);
340 if (!(res & 0x8000) &&
341 (_ecore_wince_key_mask & ECORE_WINCE_KEY_MASK_LCONTROL))
342 {
343 kn = "Control_L";
344 ks = "Control_L";
345 kc = "";
346 _ecore_wince_key_mask &= ~ECORE_WINCE_KEY_MASK_LCONTROL;
347 break;
348 }
349 res = GetKeyState(VK_RCONTROL);
350 if (!(res & 0x8000) &&
351 (_ecore_wince_key_mask & ECORE_WINCE_KEY_MASK_RCONTROL))
352 {
353 kn = "Control_R";
354 ks = "Control_R";
355 kc = "";
356 _ecore_wince_key_mask &= ~ECORE_WINCE_KEY_MASK_RCONTROL;
357 break;
358 }
359 }
360 break;
361 }
362 case VK_MENU:
363 {
364 SHORT res;
365
366 if (is_down)
367 {
368 res = GetKeyState(VK_LMENU);
369 if (res & 0x8000)
370 {
371 _ecore_wince_key_mask |= ECORE_WINCE_KEY_MASK_LMENU;
372 kn = "Alt_L";
373 ks = "Alt_L";
374 kc = "";
375 }
376 res = GetKeyState(VK_RMENU);
377 if (res & 0x8000)
378 {
379 _ecore_wince_key_mask |= ECORE_WINCE_KEY_MASK_RMENU;
380 kn = "Alt_R";
381 ks = "Alt_R";
382 kc = "";
383 }
384 }
385 else /* is_up */
386 {
387 res = GetKeyState(VK_LMENU);
388 if (!(res & 0x8000) &&
389 (_ecore_wince_key_mask & ECORE_WINCE_KEY_MASK_LMENU))
390 {
391 kn = "Alt_L";
392 ks = "Alt_L";
393 kc = "";
394 _ecore_wince_key_mask &= ~ECORE_WINCE_KEY_MASK_LMENU;
395 }
396 res = GetKeyState(VK_RMENU);
397 if (!(res & 0x8000) &&
398 (_ecore_wince_key_mask & ECORE_WINCE_KEY_MASK_RMENU))
399 {
400 kn = "Alt_R";
401 ks = "Alt_R";
402 kc = "";
403 _ecore_wince_key_mask &= ~ECORE_WINCE_KEY_MASK_RMENU;
404 }
405 }
406 break;
407 }
408 default:
409 /* other non keystroke characters */
410 return 0;
411 }
412 *keyname = strdup(kn);
413 if (!*keyname) return 0;
414 *keysymbol = strdup(ks);
415 if (!*keysymbol)
416 {
417 free(*keyname);
418 *keyname = NULL;
419 return 0;
420 }
421 *keycompose = strdup(kc);
422 if (!*keycompose)
423 {
424 free(*keyname);
425 free(*keysymbol);
426 *keyname = NULL;
427 *keysymbol = NULL;
428 return 0;
429 }
430
431 return 1;
432}
433
434static int
435_ecore_wince_event_char_get(int key,
436 char **keyname,
437 char **keysymbol,
438 char **keycompose)
439{
440 char kn[32];
441 char ks[32];
442 char kc[32];
443
444 *keyname = NULL;
445 *keysymbol = NULL;
446 *keycompose = NULL;
447
448 switch (key)
449 {
450 case VK_APP3:
451 case VK_BACK:
452 strncpy(kn, "BackSpace", 32);
453 strncpy(ks, "BackSpace", 32);
454 strncpy(kc, "BackSpace", 32);
455 break;
456 case VK_APP4:
457 case VK_TAB:
458 strncpy(kn, "Tab", 32);
459 strncpy(ks, "Tab", 32);
460 strncpy(kc, "Tab", 32);
461 break;
462 case VK_APP5:
463 case 0x0a:
464 /* Line feed (Shift + Enter) */
465 strncpy(kn, "LineFeed", 32);
466 strncpy(ks, "LineFeed", 32);
467 strncpy(kc, "LineFeed", 32);
468 break;
469 case VK_APP2:
470 case VK_RETURN:
471 strncpy(kn, "Return", 32);
472 strncpy(ks, "Return", 32);
473 strncpy(kc, "Return", 32);
474 break;
475 case VK_APP1:
476 case VK_ESCAPE:
477 strncpy(kn, "Escape", 32);
478 strncpy(ks, "Escape", 32);
479 strncpy(kc, "Escape", 32);
480 break;
481 case VK_SPACE:
482 strncpy(kn, "space", 32);
483 strncpy(ks, "space", 32);
484 strncpy(kc, " ", 32);
485 break;
486 default:
487 /* displayable characters */
488 printf (" * key : %d\n", key);
489 kn[0] = (TCHAR)key;
490 kn[1] = '\0';
491 ks[0] = (TCHAR)key;
492 ks[1] = '\0';
493 kc[0] = (TCHAR)key;
494 kc[1] = '\0';
495 break;
496 }
497 *keyname = strdup(kn);
498 if (!*keyname) return 0;
499 *keysymbol = strdup(ks);
500 if (!*keysymbol)
501 {
502 free(*keyname);
503 *keyname = NULL;
504 return 0;
505 }
506 *keycompose = strdup(kc);
507 if (!*keycompose)
508 {
509 free(*keyname);
510 free(*keysymbol);
511 *keyname = NULL;
512 *keysymbol = NULL;
513 return 0;
514 }
515
516 return 1;
517}
518
519/**
520 * @endcond
521 */
522
523
524/*============================================================================*
525 * Global *
526 *============================================================================*/
527
528void
529_ecore_wince_event_handle_key_press(Ecore_WinCE_Callback_Data *msg,
530 int is_keystroke)
531{
532 Ecore_Event_Key *e;
533
534 INF("key pressed");
535
536 e = (Ecore_Event_Key *)malloc(sizeof(Ecore_Event_Key));
537 if (!e) return;
538
539 if (is_keystroke)
540 {
541 if (!_ecore_wince_event_keystroke_get(LOWORD(msg->window_param),
542 EINA_TRUE,
543 (char **)&e->keyname,
544 (char **)&e->key,
545 (char **)&e->string))
546 {
547 free(e);
548 return;
549 }
550 }
551 else
552 {
553 if (!_ecore_wince_event_char_get(LOWORD(msg->window_param),
554 (char **)&e->keyname,
555 (char **)&e->key,
556 (char **)&e->string))
557 {
558 free(e);
559 return;
560 }
561 }
562
563 e->window = (Ecore_Window)GetWindowLong(msg->window, GWL_USERDATA);
564 e->event_window = e->window;
565 if (!e->window)
566 {
567 free(e);
568 return;
569 }
570 e->timestamp = msg->time;
571
572 _ecore_wince_event_last_time = e->timestamp;
573
574 ecore_event_add(ECORE_EVENT_KEY_DOWN, e, _ecore_wince_event_free_key_down, NULL);
575}
576
577void
578_ecore_wince_event_handle_key_release(Ecore_WinCE_Callback_Data *msg,
579 int is_keystroke)
580{
581 Ecore_Event_Key *e;
582
583 INF("key released");
584
585 e = (Ecore_Event_Key *)calloc(1, sizeof(Ecore_Event_Key));
586 if (!e) return;
587
588 if (is_keystroke)
589 {
590 if (!_ecore_wince_event_keystroke_get(LOWORD(msg->window_param),
591 EINA_FALSE,
592 (char **)&e->keyname,
593 (char **)&e->key,
594 (char **)&e->string))
595 {
596 free(e);
597 return;
598 }
599 }
600 else
601 {
602 if (!_ecore_wince_event_char_get(LOWORD(msg->window_param),
603 (char **)&e->keyname,
604 (char **)&e->key,
605 (char **)&e->string))
606 {
607 free(e);
608 return;
609 }
610 }
611
612 e->window = (Ecore_Window)GetWindowLong(msg->window, GWL_USERDATA);
613 e->event_window = e->window;
614 if (!e->window)
615 {
616 free(e);
617 return;
618 }
619 e->timestamp = msg->time;
620
621 _ecore_wince_event_last_time = e->timestamp;
622
623 ecore_event_add(ECORE_EVENT_KEY_UP, e, _ecore_wince_event_free_key_up, NULL);
624}
625
626void
627_ecore_wince_event_handle_button_press(Ecore_WinCE_Callback_Data *msg,
628 int button)
629{
630 Ecore_WinCE_Window *window;
631
632 INF("mouse button pressed");
633
634 window = (Ecore_WinCE_Window *)GetWindowLong(msg->window, GWL_USERDATA);
635
636 {
637 Ecore_Event_Mouse_Move *e;
638
639 e = (Ecore_Event_Mouse_Move *)calloc(1, sizeof(Ecore_Event_Mouse_Move));
640 if (!e) return;
641
642 e->window = (Ecore_Window)window;
643 e->event_window = e->window;
644 e->x = LOWORD(msg->data_param);
645 e->y = HIWORD(msg->data_param);
646 e->timestamp = msg->time;
647
648 _ecore_wince_event_last_time = e->timestamp;
649 _ecore_wince_event_last_window = (Ecore_WinCE_Window *)e->window;
650
651 ecore_event_add(ECORE_EVENT_MOUSE_MOVE, e, NULL, NULL);
652 }
653
654 {
655 Ecore_Event_Mouse_Button *e;
656
657 if (_ecore_wince_mouse_down_did_triple)
658 {
659 _ecore_wince_mouse_down_last_window = NULL;
660 _ecore_wince_mouse_down_last_last_window = NULL;
661 _ecore_wince_mouse_down_last_time = 0;
662 _ecore_wince_mouse_down_last_last_time = 0;
663 }
664
665 e = (Ecore_Event_Mouse_Button *)calloc(1, sizeof(Ecore_Event_Mouse_Button));
666 if (!e) return;
667
668 e->window = (Ecore_Window)window;
669 e->event_window = e->window;
670 e->buttons = button;
671 e->x = LOWORD(msg->data_param);
672 e->y = HIWORD(msg->data_param);
673 e->timestamp = msg->time;
674
675 if (((e->timestamp - _ecore_wince_mouse_down_last_time) <= (long)(1000 * _ecore_wince_double_click_time)) &&
676 (e->window == (Ecore_Window)_ecore_wince_mouse_down_last_window))
677 e->double_click = 1;
678
679 if (((e->timestamp - _ecore_wince_mouse_down_last_last_time) <= (long)(2 * 1000 * _ecore_wince_double_click_time)) &&
680 (e->window == (Ecore_Window)_ecore_wince_mouse_down_last_window) &&
681 (e->window == (Ecore_Window)_ecore_wince_mouse_down_last_last_window))
682 {
683 e->triple_click = 1;
684 _ecore_wince_mouse_down_did_triple = 1;
685 }
686 else
687 _ecore_wince_mouse_down_did_triple = 0;
688
689 if (!e->double_click && !e->triple_click)
690 _ecore_wince_mouse_up_count = 0;
691
692 _ecore_wince_event_last_time = e->timestamp;
693 _ecore_wince_event_last_window = (Ecore_WinCE_Window *)e->window;
694
695 if (!_ecore_wince_mouse_down_did_triple)
696 {
697 _ecore_wince_mouse_down_last_last_window = _ecore_wince_mouse_down_last_window;
698 _ecore_wince_mouse_down_last_window = (Ecore_WinCE_Window *)e->window;
699 _ecore_wince_mouse_down_last_last_time = _ecore_wince_mouse_down_last_time;
700 _ecore_wince_mouse_down_last_time = e->timestamp;
701 }
702
703 ecore_event_add(ECORE_EVENT_MOUSE_BUTTON_DOWN, e, NULL, NULL);
704 }
705}
706
707void
708_ecore_wince_event_handle_button_release(Ecore_WinCE_Callback_Data *msg,
709 int button)
710{
711 Ecore_WinCE_Window *window;
712
713 INF("mouse button released");
714
715 window = (void *)GetWindowLong(msg->window, GWL_USERDATA);
716
717 {
718 Ecore_Event_Mouse_Move *e;
719
720 e = (Ecore_Event_Mouse_Move *)calloc(1, sizeof(Ecore_Event_Mouse_Move));
721 if (!e) return;
722
723 e->window = (Ecore_Window)window;
724 e->event_window = e->window;
725 e->x = LOWORD(msg->data_param);
726 e->y = HIWORD(msg->data_param);
727 e->timestamp = msg->time;
728
729 _ecore_wince_event_last_time = e->timestamp;
730 _ecore_wince_event_last_window = (Ecore_WinCE_Window *)e->window;
731
732 ecore_event_add(ECORE_EVENT_MOUSE_MOVE, e, NULL, NULL);
733 }
734
735 {
736 Ecore_Event_Mouse_Button *e;
737
738 e = (Ecore_Event_Mouse_Button *)calloc(1, sizeof(Ecore_Event_Mouse_Button));
739 if (!e) return;
740
741 e->window = (Ecore_Window)window;
742 e->event_window = e->window;
743 e->buttons = button;
744 e->x = LOWORD(msg->data_param);
745 e->y = HIWORD(msg->data_param);
746 e->timestamp = msg->time;
747
748 _ecore_wince_mouse_up_count++;
749
750 if ((_ecore_wince_mouse_up_count >= 2) &&
751 ((e->timestamp - _ecore_wince_mouse_down_last_time) <= (long)(1000 * _ecore_wince_double_click_time)) &&
752 (e->window == (Ecore_Window)_ecore_wince_mouse_down_last_window))
753 e->double_click = 1;
754
755 if ((_ecore_wince_mouse_up_count >= 3) &&
756 ((e->timestamp - _ecore_wince_mouse_down_last_last_time) <= (long)(2 * 1000 * _ecore_wince_double_click_time)) &&
757 (e->window == (Ecore_Window)_ecore_wince_mouse_down_last_window) &&
758 (e->window == (Ecore_Window)_ecore_wince_mouse_down_last_last_window))
759 e->triple_click = 1;
760
761 _ecore_wince_event_last_time = e->timestamp;
762 _ecore_wince_event_last_window = (Ecore_WinCE_Window *)e->window;
763
764 ecore_event_add(ECORE_EVENT_MOUSE_BUTTON_UP, e, NULL, NULL);
765 }
766}
767
768void
769_ecore_wince_event_handle_motion_notify(Ecore_WinCE_Callback_Data *msg)
770{
771 Ecore_Event_Mouse_Move *e;
772
773 INF("mouse moved");
774
775 e = (Ecore_Event_Mouse_Move *)calloc(1, sizeof(Ecore_Event_Mouse_Move));
776 if (!e) return;
777
778 e->window = (Ecore_Window)GetWindowLong(msg->window, GWL_USERDATA);
779 e->event_window = e->window;
780 e->x = LOWORD(msg->data_param);
781 e->y = HIWORD(msg->data_param);
782 e->timestamp = msg->time;
783
784 ecore_event_add(ECORE_EVENT_MOUSE_MOVE, e, NULL, NULL);
785}
786
787void
788_ecore_wince_event_handle_enter_notify(Ecore_WinCE_Callback_Data *msg)
789{
790 Ecore_WinCE_Window *window;
791
792 INF("mouse in");
793
794 window = (void *)GetWindowLong(msg->window, GWL_USERDATA);
795
796 {
797 Ecore_Event_Mouse_Move *e;
798
799 e = (Ecore_Event_Mouse_Move *)calloc(1, sizeof(Ecore_Event_Mouse_Move));
800 if (!e) return;
801
802 e->window = (Ecore_Window)window;
803 e->event_window = e->window;
804 e->x = msg->x;
805 e->y = msg->y;
806 e->timestamp = msg->time;
807
808 _ecore_wince_event_last_time = e->timestamp;
809 _ecore_wince_event_last_window = (Ecore_WinCE_Window *)e->window;
810
811 ecore_event_add(ECORE_EVENT_MOUSE_MOVE, e, NULL, NULL);
812 }
813
814 {
815 Ecore_WinCE_Event_Mouse_In *e;
816
817 e = (Ecore_WinCE_Event_Mouse_In *)calloc(1, sizeof(Ecore_WinCE_Event_Mouse_In));
818 if (!e) return;
819
820 e->window = window;
821 e->x = msg->x;
822 e->y = msg->y;
823 e->time = msg->time;
824
825 _ecore_wince_event_last_time = e->time;
826
827 ecore_event_add(ECORE_WINCE_EVENT_MOUSE_IN, e, NULL, NULL);
828 }
829}
830
831void
832_ecore_wince_event_handle_leave_notify(Ecore_WinCE_Callback_Data *msg)
833{
834 Ecore_WinCE_Window *window;
835
836 INF("mouse out");
837
838 window = (void *)GetWindowLong(msg->window, GWL_USERDATA);
839
840 {
841 Ecore_Event_Mouse_Move *e;
842
843 e = (Ecore_Event_Mouse_Move *)calloc(1, sizeof(Ecore_Event_Mouse_Move));
844 if (!e) return;
845
846 e->window = (Ecore_Window)window;
847 e->event_window = e->window;
848 e->x = msg->x;
849 e->y = msg->y;
850 e->timestamp = msg->time;
851
852 _ecore_wince_event_last_time = e->timestamp;
853 _ecore_wince_event_last_window = (Ecore_WinCE_Window *)e->window;
854
855 ecore_event_add(ECORE_EVENT_MOUSE_MOVE, e, NULL, NULL);
856 }
857
858 {
859 Ecore_WinCE_Event_Mouse_Out *e;
860
861 e = (Ecore_WinCE_Event_Mouse_Out *)calloc(1, sizeof(Ecore_WinCE_Event_Mouse_Out));
862 if (!e) return;
863
864 e->window = window;
865 e->x = msg->x;
866 e->y = msg->y;
867 e->time = msg->time;
868
869 _ecore_wince_event_last_time = e->time;
870
871 ecore_event_add(ECORE_WINCE_EVENT_MOUSE_OUT, e, NULL, NULL);
872 }
873}
874
875void
876_ecore_wince_event_handle_focus_in(Ecore_WinCE_Callback_Data *msg)
877{
878 Ecore_WinCE_Event_Window_Focus_In *e;
879 Ecore_WinCE_Window *window;
880
881 INF("focus in");
882
883 e = (Ecore_WinCE_Event_Window_Focus_In *)calloc(1, sizeof(Ecore_WinCE_Event_Window_Focus_In));
884 if (!e) return;
885
886 window = (void *)GetWindowLong(msg->window, GWL_USERDATA);
887 if (!e->window)
888 {
889 free(e);
890 return;
891 }
892
893 if (window->resume_cb)
894 window->resume_cb(window->backend);
895
896 e->window = window;
897
898 e->time = _ecore_wince_event_last_time;
899 _ecore_wince_event_last_time = e->time;
900
901 ecore_event_add(ECORE_WINCE_EVENT_WINDOW_FOCUS_IN, e, NULL, NULL);
902}
903
904void
905_ecore_wince_event_handle_focus_out(Ecore_WinCE_Callback_Data *msg)
906{
907 Ecore_WinCE_Event_Window_Focus_Out *e;
908 Ecore_WinCE_Window *window;
909
910 INF("focus out");
911
912 e = (Ecore_WinCE_Event_Window_Focus_Out *)calloc(1, sizeof(Ecore_WinCE_Event_Window_Focus_Out));
913 if (!e) return;
914
915 window = (void *)GetWindowLong(msg->window, GWL_USERDATA);
916 if (!e->window)
917 {
918 free(e);
919 return;
920 }
921 if (window->suspend_cb)
922 window->suspend_cb(window->backend);
923
924 e->window = window;
925
926 e->time = _ecore_wince_event_last_time;
927 _ecore_wince_event_last_time = e->time;
928
929 ecore_event_add(ECORE_WINCE_EVENT_WINDOW_FOCUS_OUT, e, NULL, NULL);
930}
931
932void
933_ecore_wince_event_handle_expose(Ecore_WinCE_Callback_Data *msg)
934{
935 Ecore_WinCE_Event_Window_Damage *e;
936
937 INF("window expose");
938
939 e = (Ecore_WinCE_Event_Window_Damage *)calloc(1, sizeof(Ecore_WinCE_Event_Window_Damage));
940 if (!e) return;
941
942 e->window = (void *)GetWindowLong(msg->window, GWL_USERDATA);
943 if (!e->window)
944 {
945 free(e);
946 return;
947 }
948
949 e->x = msg->update.left;
950 e->y = msg->update.top;
951 e->width = msg->update.right - msg->update.left;
952 e->height = msg->update.bottom - msg->update.top;
953 INF("window expose size: %dx%d", e->width, e->height);
954
955 e->time = _ecore_wince_event_last_time;
956
957 ecore_event_add(ECORE_WINCE_EVENT_WINDOW_DAMAGE, e, NULL, NULL);
958}
959
960void
961_ecore_wince_event_handle_create_notify(Ecore_WinCE_Callback_Data *msg)
962{
963 Ecore_WinCE_Event_Window_Create *e;
964
965 INF("window create notify");
966
967 e = calloc(1, sizeof(Ecore_WinCE_Event_Window_Create));
968 if (!e) return;
969
970 e->window = (void *)GetWindowLong(msg->window, GWL_USERDATA);
971 if (!e->window)
972 {
973 free(e);
974 return;
975 }
976
977 e->time = _ecore_wince_event_last_time;
978
979 ecore_event_add(ECORE_WINCE_EVENT_WINDOW_CREATE, e, NULL, NULL);
980}
981
982void
983_ecore_wince_event_handle_destroy_notify(Ecore_WinCE_Callback_Data *msg)
984{
985 Ecore_WinCE_Event_Window_Destroy *e;
986
987 INF("window destroy notify");
988
989 e = calloc(1, sizeof(Ecore_WinCE_Event_Window_Destroy));
990 if (!e) return;
991
992 e->window = (void *)GetWindowLong(msg->window, GWL_USERDATA);
993 if (!e->window)
994 {
995 free(e);
996 return;
997 }
998
999 e->time = _ecore_wince_event_last_time;
1000/* if (e->window == _ecore_wince_event_last_window) _ecore_wince_event_last_window = NULL; */
1001
1002 ecore_event_add(ECORE_WINCE_EVENT_WINDOW_DESTROY, e, NULL, NULL);
1003}
1004
1005void
1006_ecore_wince_event_handle_map_notify(Ecore_WinCE_Callback_Data *msg)
1007{
1008 Ecore_WinCE_Event_Window_Show *e;
1009
1010 INF("window map notify");
1011
1012 e = calloc(1, sizeof(Ecore_WinCE_Event_Window_Show));
1013 if (!e) return;
1014
1015 e->window = (void *)GetWindowLong(msg->window, GWL_USERDATA);
1016 if (!e->window)
1017 {
1018 free(e);
1019 return;
1020 }
1021
1022 e->time = _ecore_wince_event_last_time;
1023
1024 ecore_event_add(ECORE_WINCE_EVENT_WINDOW_SHOW, e, NULL, NULL);
1025}
1026
1027void
1028_ecore_wince_event_handle_unmap_notify(Ecore_WinCE_Callback_Data *msg)
1029{
1030 Ecore_WinCE_Event_Window_Hide *e;
1031
1032 INF("window unmap notify");
1033
1034 e = calloc(1, sizeof(Ecore_WinCE_Event_Window_Hide));
1035 if (!e) return;
1036
1037 e->window = (void *)GetWindowLong(msg->window, GWL_USERDATA);
1038 if (!e->window)
1039 {
1040 free(e);
1041 return;
1042 }
1043
1044 e->time = _ecore_wince_event_last_time;
1045
1046 ecore_event_add(ECORE_WINCE_EVENT_WINDOW_HIDE, e, NULL, NULL);
1047}
1048
1049void
1050_ecore_wince_event_handle_delete_request(Ecore_WinCE_Callback_Data *msg)
1051{
1052 Ecore_WinCE_Event_Window_Delete_Request *e;
1053
1054 INF("window delete request");
1055
1056 e = calloc(1, sizeof(Ecore_WinCE_Event_Window_Delete_Request));
1057 if (!e) return;
1058
1059 e->window = (void *)GetWindowLong(msg->window, GWL_USERDATA);
1060 if (!e->window)
1061 {
1062 free(e);
1063 return;
1064 }
1065
1066 e->time = _ecore_wince_event_last_time;
1067
1068 ecore_event_add(ECORE_WINCE_EVENT_WINDOW_DELETE_REQUEST, e, NULL, NULL);
1069}
1070
1071/*============================================================================*
1072 * API *
1073 *============================================================================*/
1074
diff --git a/libraries/ecore/src/lib/ecore_wince/ecore_wince_private.h b/libraries/ecore/src/lib/ecore_wince/ecore_wince_private.h
new file mode 100644
index 0000000..b506312
--- /dev/null
+++ b/libraries/ecore/src/lib/ecore_wince/ecore_wince_private.h
@@ -0,0 +1,85 @@
1#ifndef __ECORE_WINCE_PRIVATE_H__
2#define __ECORE_WINCE_PRIVATE_H__
3
4
5/* logging messages macros */
6extern int _ecore_wince_log_dom_global;
7
8#ifdef ECORE_WINCE_DEFAULT_LOG_COLOR
9#undef ECORE_WINCE_DEFAULT_LOG_COLOR
10#endif
11#define ECORE_WINCE_DEFAULT_LOG_COLOR EINA_COLOR_LIGHTBLUE
12
13#ifdef ERR
14# undef ERR
15#endif
16#define ERR(...) EINA_LOG_DOM_ERR(_ecore_wince_log_dom_global , __VA_ARGS__)
17#ifdef DBG
18# undef DBG
19#endif
20#define DBG(...) EINA_LOG_DOM_DBG(_ecore_wince_log_dom_global , __VA_ARGS__)
21#ifdef INF
22# undef INF
23#endif
24#define INF(...) EINA_LOG_DOM_INFO(_ecore_wince_log_dom_global , __VA_ARGS__)
25
26#define ECORE_WINCE_WINDOW_CLASS L"Ecore_WinCE_Window_Class"
27
28
29typedef struct _Ecore_WinCE_Callback_Data Ecore_WinCE_Callback_Data;
30
31struct _Ecore_WinCE_Callback_Data
32{
33 RECT update;
34 HWND window;
35 unsigned int message;
36 WPARAM window_param;
37 LPARAM data_param;
38 long time;
39 int x;
40 int y;
41};
42
43
44typedef int (*ecore_wince_suspend_cb) (int);
45typedef int (*ecore_wince_resume_cb) (int);
46
47
48struct _Ecore_WinCE_Window
49{
50 HWND window;
51
52 int backend;
53 ecore_wince_suspend_cb suspend_cb;
54 ecore_wince_resume_cb resume_cb;
55
56 RECT rect; /* used to go fullscreen to normal */
57
58 unsigned int pointer_is_in : 1;
59 unsigned int fullscreen : 1;
60};
61
62extern HINSTANCE _ecore_wince_instance;
63extern double _ecore_wince_double_click_time;
64extern long _ecore_wince_event_last_time;
65extern Ecore_WinCE_Window *_ecore_wince_event_last_window;
66
67
68void _ecore_wince_event_handle_key_press(Ecore_WinCE_Callback_Data *msg, int is_keystroke);
69void _ecore_wince_event_handle_key_release(Ecore_WinCE_Callback_Data *msg, int is_keystroke);
70void _ecore_wince_event_handle_button_press(Ecore_WinCE_Callback_Data *msg, int button);
71void _ecore_wince_event_handle_button_release(Ecore_WinCE_Callback_Data *msg, int button);
72void _ecore_wince_event_handle_motion_notify(Ecore_WinCE_Callback_Data *msg);
73void _ecore_wince_event_handle_enter_notify(Ecore_WinCE_Callback_Data *msg);
74void _ecore_wince_event_handle_leave_notify(Ecore_WinCE_Callback_Data *msg);
75void _ecore_wince_event_handle_focus_in(Ecore_WinCE_Callback_Data *msg);
76void _ecore_wince_event_handle_focus_out(Ecore_WinCE_Callback_Data *msg);
77void _ecore_wince_event_handle_expose(Ecore_WinCE_Callback_Data *msg);
78void _ecore_wince_event_handle_create_notify(Ecore_WinCE_Callback_Data *msg);
79void _ecore_wince_event_handle_destroy_notify(Ecore_WinCE_Callback_Data *msg);
80void _ecore_wince_event_handle_map_notify(Ecore_WinCE_Callback_Data *msg);
81void _ecore_wince_event_handle_unmap_notify(Ecore_WinCE_Callback_Data *msg);
82void _ecore_wince_event_handle_delete_request(Ecore_WinCE_Callback_Data *msg);
83
84
85#endif /* __ECORE_WINCE_PRIVATE_H__ */
diff --git a/libraries/ecore/src/lib/ecore_wince/ecore_wince_window.c b/libraries/ecore/src/lib/ecore_wince/ecore_wince_window.c
new file mode 100644
index 0000000..4e8b7b1
--- /dev/null
+++ b/libraries/ecore/src/lib/ecore_wince/ecore_wince_window.c
@@ -0,0 +1,775 @@
1#ifdef HAVE_CONFIG_H
2# include <config.h>
3#endif
4
5#define WIN32_LEAN_AND_MEAN
6#include <windows.h>
7#undef WIN32_LEAN_AND_MEAN
8
9#include <Evil.h>
10#include <Eina.h>
11
12#include "Ecore_WinCE.h"
13#include "ecore_wince_private.h"
14
15/*============================================================================*
16 * Local *
17 *============================================================================*/
18
19/**
20 * @cond LOCAL
21 */
22
23
24typedef BOOL (__stdcall *UnregisterFunc1Proc)(UINT, UINT);
25
26static int
27_ecore_wince_hardware_keys_register(HWND window)
28{
29 HINSTANCE core_dll;
30 UnregisterFunc1Proc unregister_fct;
31 int i;
32
33 core_dll = LoadLibrary(L"coredll.dll");
34 if (!core_dll)
35 {
36 ERR("LoadLibrary() failed");
37 return 0;
38 }
39
40 unregister_fct = (UnregisterFunc1Proc)GetProcAddress(core_dll, L"UnregisterFunc1");
41 if (!unregister_fct)
42 {
43 ERR("GetProcAddress() failed");
44 FreeLibrary(core_dll);
45 return 0;
46 }
47
48 for (i = 0xc1; i <= 0xcf; i++)
49 {
50 unregister_fct(MOD_WIN, i);
51 RegisterHotKey(window, i, MOD_WIN, i);
52 }
53
54 FreeLibrary(core_dll);
55
56 return 1;
57}
58
59/**
60 * @endcond
61 */
62
63
64/*============================================================================*
65 * Global *
66 *============================================================================*/
67
68/*============================================================================*
69 * API *
70 *============================================================================*/
71
72/**
73 * @addtogroup Ecore_WinCE_Group Ecore_WinCE library
74 *
75 * @{
76 */
77
78/**
79 * @brief Creates a new window.
80 *
81 * @param parent The parent window.
82 * @param x The x coordinate of the top-left corner of the window.
83 * @param y The y coordinate of the top-left corner of the window.
84 * @param width The width of the window.
85 * @param height The height of hte window.
86 * @return A newly allocated window.
87 *
88 * This function creates a new window which parent is @p parent. @p width and
89 * @p height are the size of the window content (the client part),
90 * without the border and title bar. @p x and @p y are the system
91 * coordinates of the top left cerner of the window (that is, of the
92 * title bar). This function returns a newly created window on
93 * success, and @c NULL on failure.
94 */
95EAPI Ecore_WinCE_Window *
96ecore_wince_window_new(Ecore_WinCE_Window *parent,
97 int x,
98 int y,
99 int width,
100 int height)
101{
102 Ecore_WinCE_Window *w;
103 HWND window;
104 RECT rect;
105
106 INF("creating window");
107
108 w = (Ecore_WinCE_Window *)calloc(1, sizeof(Ecore_WinCE_Window));
109 if (!w)
110 {
111 ERR("malloc() failed");
112 return NULL;
113 }
114
115 rect.left = 0;
116 rect.top = 0;
117 rect.right = width;
118 rect.bottom = height;
119 if (!AdjustWindowRectEx(&rect, WS_CAPTION | WS_SYSMENU | WS_VISIBLE, FALSE, WS_EX_TOPMOST))
120 {
121 ERR("AdjustWindowRectEx() failed");
122 free(w);
123 return NULL;
124 }
125
126 window = CreateWindowEx(WS_EX_TOPMOST,
127 ECORE_WINCE_WINDOW_CLASS,
128 L"",
129 WS_CAPTION | WS_SYSMENU | WS_VISIBLE,
130 x, y,
131 rect.right - rect.left, rect.bottom - rect.top,
132 parent ? ((Ecore_WinCE_Window *)parent)->window : NULL,
133 NULL, _ecore_wince_instance, NULL);
134 if (!window)
135 {
136 ERR("CreateWindowEx() failed");
137 free(w);
138 return NULL;
139 }
140
141 if (!_ecore_wince_hardware_keys_register(window))
142 {
143 ERR("_ecore_wince_hardware_keys_register() failed");
144 DestroyWindow(window);
145 free(w);
146 return NULL;
147 }
148
149 w->window = window;
150
151 SetLastError(0);
152 if (!SetWindowLong(window, GWL_USERDATA, (LONG)w) && (GetLastError() != 0))
153 {
154 ERR("SetWindowLong() failed");
155 DestroyWindow(window);
156 free(w);
157 return NULL;
158 }
159
160 w->pointer_is_in = 0;
161
162 return w;
163}
164
165/**
166 * @brief Free the given window.
167 *
168 * @param window The window to free.
169 *
170 * This function frees @p window. If @p window is @c NULL, this
171 * function does nothing.
172 */
173EAPI void
174ecore_wince_window_free(Ecore_WinCE_Window *window)
175{
176 if (!window) return;
177
178 INF("destroying window");
179
180 DestroyWindow(window->window);
181 free(window);
182}
183
184/**
185 * @brief Return the window HANDLE associated to the given window.
186 *
187 * @param window The window to retrieve the HANDLE from.
188 *
189 * This function returns the window HANDLE associated to @p window. If
190 * @p window is @c NULL, this function returns @c NULL.
191 */
192EAPI void *
193ecore_wince_window_hwnd_get(Ecore_WinCE_Window *window)
194{
195 if (!window)
196 return NULL;
197
198 return window->window;
199}
200
201/**
202 * @brief Move the given window to a given position.
203 *
204 * @param window The window to move.
205 * @param x The x coordinate of the destination position.
206 * @param y The y coordinate of the destination position.
207 *
208 * This function move @p window to the new position of coordinates @p x
209 * and @p y. If @p window is @c NULL, or if it is fullscreen, or on
210 * error, this function does nothing.
211 */
212EAPI void
213ecore_wince_window_move(Ecore_WinCE_Window *window,
214 int x,
215 int y)
216{
217 RECT rect;
218
219 if (!window || window->fullscreen)
220 return;
221
222 INF("moving window (%dx%d)", x, y);
223
224 if (!GetWindowRect(window->window, &rect))
225 {
226 ERR("GetWindowRect() failed");
227 return;
228 }
229
230 if (!MoveWindow(window->window, x, y,
231 rect.right - rect.left,
232 rect.bottom - rect.top,
233 TRUE))
234 {
235 ERR("MoveWindow() failed");
236 }
237}
238
239/**
240 * @brief Resize the given window to a given size.
241 *
242 * @param window The window to resize.
243 * @param width The new width.
244 * @param height The new height.
245 *
246 * This function resize @p window to the new @p width and @p height.
247 * If @p window is @c NULL, or if it is fullscreen, or on error, this
248 * function does nothing.
249 */
250EAPI void
251ecore_wince_window_resize(Ecore_WinCE_Window *window,
252 int width,
253 int height)
254{
255 RECT rect;
256 DWORD style;
257 DWORD exstyle;
258 int x;
259 int y;
260
261 if (!window || window->fullscreen)
262 return;
263
264 INF("resizing window (%dx%d)", width, height);
265
266 if (!GetWindowRect(window->window, &rect))
267 {
268 ERR("GetWindowRect() failed");
269 return;
270 }
271
272 x = rect.left;
273 y = rect.top;
274 rect.left = 0;
275 rect.top = 0;
276 rect.right = width;
277 rect.bottom = height;
278 if (!(style = GetWindowLong(window->window, GWL_STYLE)))
279 {
280 ERR("GetWindowLong() failed");
281 return;
282 }
283 if (!(exstyle = GetWindowLong(window->window, GWL_EXSTYLE)))
284 {
285 ERR("GetWindowLong() failed");
286 return;
287 }
288 if (!AdjustWindowRectEx(&rect, style, FALSE, exstyle))
289 {
290 ERR("AdjustWindowRectEx() failed");
291 return;
292 }
293
294 if (!MoveWindow(window->window, x, y,
295 rect.right - rect.left,
296 rect.bottom - rect.top,
297 FALSE))
298 {
299 ERR("MoveWindow() failed");
300 }
301}
302
303/**
304 * @brief Move and resize the given window to a given position and size.
305 *
306 * @param window The window to move and resize.
307 * @param x The x coordinate of the destination position.
308 * @param y The x coordinate of the destination position.
309 * @param width The new width.
310 * @param height The new height.
311 *
312 * This function resize @p window to the new position of coordinates @p x
313 * and @p y and the new @p width and @p height. If @p window is @c NULL,
314 * or if it is fullscreen, or on error, this function does nothing.
315 */
316EAPI void
317ecore_wince_window_move_resize(Ecore_WinCE_Window *window,
318 int x,
319 int y,
320 int width,
321 int height)
322{
323 RECT rect;
324 DWORD style;
325 DWORD exstyle;
326
327 if (!window || window->fullscreen)
328 return;
329
330 INF("moving and resizing window (%dx%d %dx%d)", x, y, width, height);
331
332 rect.left = 0;
333 rect.top = 0;
334 rect.right = width;
335 rect.bottom = height;
336 if (!(style = GetWindowLong(window->window, GWL_STYLE)))
337 {
338 ERR("GetWindowLong() failed");
339 return;
340 }
341 if (!(exstyle = GetWindowLong(window->window, GWL_EXSTYLE)))
342 {
343 ERR("GetWindowLong() failed");
344 return;
345 }
346 if (!AdjustWindowRectEx(&rect, style, FALSE, exstyle))
347 {
348 ERR("AdjustWindowRectEx() failed");
349 return;
350 }
351
352 if (!MoveWindow(window->window, x, y,
353 rect.right - rect.left,
354 rect.bottom - rect.top,
355 TRUE))
356 {
357 ERR("MoveWindow() failed");
358 }
359}
360
361/**
362 * @brief Show the given window.
363 *
364 * @param window The window to show.
365 *
366 * This function shows @p window. If @p window is @c NULL, or on
367 * error, this function does nothing.
368 */
369EAPI void
370ecore_wince_window_show(Ecore_WinCE_Window *window)
371{
372 if (!window) return;
373
374 INF("showing window");
375
376 if (!ShowWindow(window->window, SW_SHOWNORMAL))
377 {
378 ERR("ShowWindow() failed");
379 return;
380 }
381 if (!UpdateWindow(window->window))
382 {
383 ERR("UpdateWindow() failed");
384 }
385 if (!SendMessage(window->window, WM_SHOWWINDOW, 1, 0))
386 {
387 ERR("SendMessage() failed");
388 }
389}
390
391/**
392 * @brief Hide the given window.
393 *
394 * @param window The window to show.
395 *
396 * This function hides @p window. If @p window is @c NULL, or on
397 * error, this function does nothing.
398 */
399EAPI void
400ecore_wince_window_hide(Ecore_WinCE_Window *window)
401{
402 if (!window) return;
403
404 INF("hiding window");
405
406 if (!ShowWindow(window->window, SW_HIDE))
407 {
408 ERR("ShowWindow() failed");
409 return;
410 }
411 if (!SendMessage(window->window, WM_SHOWWINDOW, 0, 0))
412 {
413 ERR("SendMessage() failed");
414 }
415}
416
417/**
418 * @brief Set the title of the given window.
419 *
420 * @param window The window to set the title.
421 * @param title The new title.
422 *
423 * This function sets the title of @p window to @p title. If @p window
424 * is @c NULL, or if @p title is @c NULL or empty, or on error, this
425 * function does nothing.
426 */
427EAPI void
428ecore_wince_window_title_set(Ecore_WinCE_Window *window,
429 const char *title)
430{
431 wchar_t *wtitle;
432
433 if (!window) return;
434
435 if (!title || !title[0]) return;
436
437 INF("setting window title");
438
439 wtitle = evil_char_to_wchar(title);
440 if (!wtitle) return;
441
442 if (!SetWindowText(window->window, wtitle))
443 {
444 ERR("SetWindowText() failed");
445 }
446 free(wtitle);
447}
448
449/**
450 * @brief Set the graphic backend used for the given window.
451 *
452 * @param window The window.
453 * @param backend The backend.
454 *
455 * This function sets the graphic backend to use with @p window to
456 * @p backend. If @p window if @c NULL, this function does nothing.
457 *
458 * The valid values for @p backend are
459 *
460 * @li 0: automatic choice of the backend.
461 * @li 1: the framebuffer (fast but could be not well suported).
462 * @li 2: GAPI (less fast but almost always supported).
463 * @li 3: DirectDraw (less fast than GAPI but almost always
464 * supported).
465 * @li 4: GDI (the slowest but always supported).
466 *
467 * The @p backend is used only in Evas and Ecore_Evas. So this
468 * function should not be called if Ecore_Evas is used.
469 */
470EAPI void
471ecore_wince_window_backend_set(Ecore_WinCE_Window *window,
472 int backend)
473{
474 if (!window)
475 return;
476
477 INF("setting backend");
478
479 window->backend = backend;
480}
481
482/**
483 * @brief Set the suspend callback used for the given window.
484 *
485 * @param window The window.
486 * @param suspend_cb The suspend callback.
487 *
488 * This function sets the suspend callback to use with @p window to
489 * @p suspend_cb. If @p window if @c NULL, this function does nothing.
490 *
491 * The @p suspend_cb is used only in Evas and Ecore_Evas. So this
492 * function should not be called if Ecore_Evas is used.
493 */
494EAPI void
495ecore_wince_window_suspend_cb_set(Ecore_WinCE_Window *window, int (*suspend_cb)(int))
496{
497 if (!window)
498 return;
499
500 INF("setting suspend callback");
501
502 window->suspend_cb = suspend_cb;
503}
504
505/**
506 * @brief Set the resume callback used for the given window.
507 *
508 * @param window The window.
509 * @param resume_cb The resume callback.
510 *
511 * This function sets the resume callback to use with @p window to
512 * @p resume_cb. If @p window if @c NULL, this function does nothing.
513 *
514 * The @p resume_cb is used only in Evas and Ecore_Evas. So this
515 * function should not be called if Ecore_Evas is used.
516 */
517EAPI void
518ecore_wince_window_resume_cb_set(Ecore_WinCE_Window *window, int (*resume_cb)(int))
519{
520 if (!window)
521 return;
522
523 INF("setting resume callback");
524
525 window->resume_cb = resume_cb;
526}
527
528/**
529 * @brief Get the geometry of the given window.
530 *
531 * @param window The window to retrieve the geometry from.
532 * @param x The x coordinate of the position.
533 * @param y The x coordinate of the position.
534 * @param width The width.
535 * @param height The height.
536 *
537 * This function retrieves the position and size of @p window. @p x,
538 * @p y, @p width and @p height can be buffers that will be filled with
539 * the corresponding values. If one of them is @c NULL, nothing will
540 * be done for that parameter. If @p window is @c NULL, and if the
541 * buffers are not @c NULL, they will be filled with respectively 0,
542 * 0, the size of the screen and the height of the screen.
543 */
544EAPI void
545ecore_wince_window_geometry_get(Ecore_WinCE_Window *window,
546 int *x,
547 int *y,
548 int *width,
549 int *height)
550{
551 RECT rect;
552 int w;
553 int h;
554
555 INF("getting window geometry");
556
557 if (!window)
558 {
559 if (x) *x = 0;
560 if (y) *y = 0;
561 if (width) *width = GetSystemMetrics(SM_CXSCREEN);
562 if (height) *height = GetSystemMetrics(SM_CYSCREEN);
563
564 return;
565 }
566
567 if (!GetClientRect(window->window, &rect))
568 {
569 ERR("GetClientRect() failed");
570
571 if (x) *x = 0;
572 if (y) *y = 0;
573 if (width) *width = 0;
574 if (height) *height = 0;
575
576 return;
577 }
578
579 w = rect.right - rect.left;
580 h = rect.bottom - rect.top;
581
582 if (!GetWindowRect(window->window, &rect))
583 {
584 ERR("GetWindowRect() failed");
585
586 if (x) *x = 0;
587 if (y) *y = 0;
588 if (width) *width = 0;
589 if (height) *height = 0;
590
591 return;
592 }
593
594 if (x) *x = rect.left;
595 if (y) *y = rect.top;
596 if (width) *width = w;
597 if (height) *height = h;
598}
599
600/**
601 * @brief Get the size of the given window.
602 *
603 * @param window The window to retrieve the size from.
604 * @param width The width.
605 * @param height The height.
606 *
607 * This function retrieves the size of @p window. @p width and
608 * @p height can be buffers that will be filled with the corresponding
609 * values. If one of them is @c NULL, nothing will be done for that
610 * parameter. If @p window is @c NULL, and if the buffers are not
611 * @c NULL, they will be filled with respectively the size of the screen
612 * and the height of the screen.
613 */
614EAPI void
615ecore_wince_window_size_get(Ecore_WinCE_Window *window,
616 int *width,
617 int *height)
618{
619 RECT rect;
620
621 INF("getting window size");
622
623 if (!window)
624 {
625 if (width) *width = GetSystemMetrics(SM_CXSCREEN);
626 if (height) *height = GetSystemMetrics(SM_CYSCREEN);
627
628 return;
629 }
630
631 if (!GetClientRect(window->window, &rect))
632 {
633 ERR("GetClientRect() failed");
634
635 if (width) *width = 0;
636 if (height) *height = 0;
637 }
638
639 if (width) *width = rect.right - rect.left;
640 if (height) *height = rect.bottom - rect.top;
641}
642
643/**
644 * @brief Set the given window to fullscreen.
645 *
646 * @param window The window.
647 * @param on EINA_TRUE for fullscreen mode, EINA_FALSE for windowed mode.
648 *
649 * This function set @p window to fullscreen or windowed mode. If @p on
650 * is set to EINA_TRUE, the window will be fullscreen, if it is set to
651 * EINA_FALSE, it will be windowed. If @p window is @c NULL or if the
652 * state does not change (like setting to fullscreen while the window
653 * is already fullscreen), this function does nothing.
654 */
655EAPI void
656ecore_wince_window_fullscreen_set(Ecore_WinCE_Window *window,
657 Eina_Bool on)
658{
659 HWND task_bar;
660
661 if (!window) return;
662
663 if (((window->fullscreen) && (on)) ||
664 ((!window->fullscreen) && (!on)))
665 return;
666
667 INF("setting fullscreen: %s", on ? "yes" : "no");
668
669 window->fullscreen = !!on;
670
671 if (on)
672 {
673 /* save the position and size of the window */
674 if (!GetWindowRect(window->window, &window->rect))
675 {
676 ERR("GetWindowRect() failed");
677 return;
678 }
679
680 /* hide task bar */
681 task_bar = FindWindow(L"HHTaskBar", NULL);
682 if (!task_bar)
683 {
684 INF("FindWindow(): can not find task bar");
685 }
686 if (!ShowWindow(task_bar, SW_HIDE))
687 {
688 INF("ShowWindow(): task bar already hidden");
689 }
690 if (!EnableWindow(task_bar, FALSE))
691 {
692 INF("EnableWindow(): input already disabled");
693 }
694
695 /* style: visible + popup */
696 if (!SetWindowLong(window->window, GWL_STYLE, WS_POPUP | WS_VISIBLE))
697 {
698 INF("SetWindowLong() failed");
699 }
700
701 /* resize window to fit the entire screen */
702 if (!SetWindowPos(window->window, HWND_TOPMOST,
703 0, 0,
704 GetSystemMetrics(SM_CXSCREEN),
705 GetSystemMetrics(SM_CYSCREEN),
706 SWP_NOMOVE | SWP_NOSIZE | SWP_NOZORDER | SWP_FRAMECHANGED))
707 {
708 INF("SetWindowPos() failed");
709 }
710 /*
711 * It seems that SetWindowPos is not sufficient.
712 * Call MoveWindow with the correct size and force painting.
713 * Note that UpdateWindow (forcing repainting) is not sufficient
714 */
715 if (!MoveWindow(window->window,
716 0, 0,
717 GetSystemMetrics(SM_CXSCREEN),
718 GetSystemMetrics(SM_CYSCREEN),
719 TRUE))
720 {
721 INF("MoveWindow() failed");
722 }
723 }
724 else
725 {
726 /* show task bar */
727 task_bar = FindWindow(L"HHTaskBar", NULL);
728 if (!task_bar)
729 {
730 INF("FindWindow(): can not find task bar");
731 }
732 if (!ShowWindow(task_bar, SW_SHOW))
733 {
734 INF("ShowWindow(): task bar already visible");
735 }
736 if (!EnableWindow(task_bar, TRUE))
737 {
738 INF("EnableWindow(): input already enabled");
739 }
740
741 /* style: visible + caption + sysmenu */
742 if (!SetWindowLong(window->window, GWL_STYLE, WS_CAPTION | WS_SYSMENU | WS_VISIBLE))
743 {
744 INF("SetWindowLong() failed");
745 }
746 /* restaure the position and size of the window */
747 if (!SetWindowPos(window->window, HWND_TOPMOST,
748 window->rect.left,
749 window->rect.top,
750 window->rect.right - window->rect.left,
751 window->rect.bottom - window->rect.top,
752 SWP_NOMOVE | SWP_NOSIZE | SWP_NOZORDER | SWP_FRAMECHANGED))
753 {
754 INF("SetWindowLong() failed");
755 }
756 /*
757 * It seems that SetWindowPos is not sufficient.
758 * Call MoveWindow with the correct size and force painting.
759 * Note that UpdateWindow (forcing repainting) is not sufficient
760 */
761 if (!MoveWindow(window->window,
762 window->rect.left,
763 window->rect.top,
764 window->rect.right - window->rect.left,
765 window->rect.bottom - window->rect.top,
766 TRUE))
767 {
768 INF("MoveWindow() failed");
769 }
770 }
771}
772
773/**
774 * @}
775 */