[Pkg-e-commits] [SCM] Core abstraction layer for enlightenment DR 0.17 branch, new-svn-snapshot, updated. 0.9.9.050+svn20081201-1-2511-g71cdcb4
Albin Tonnerre
albin.tonnerre at gmail.com
Fri Jun 19 12:37:06 UTC 2009
The following commit has been merged in the new-svn-snapshot branch:
commit f724c90f6d05cc969d705f5a69f4bc19ca89077c
Author: Albin Tonnerre <albin.tonnerre at gmail.com>
Date: Wed Jun 17 22:41:14 2009 +0200
Import upstream release 0.9.9.061
diff --git a/README b/README
index 23527dd..75e659f 100644
--- a/README
+++ b/README
@@ -1,4 +1,4 @@
-Ecore 0.9.9.060
+Ecore 0.9.9.061
Requirements:
-------------
@@ -31,7 +31,7 @@ BUILDING PACKAGES:
RPM: To build rpm packages:
- sudo rpm -ta ecore-0.9.9.060.tar.gz
+ sudo rpm -ta ecore-0.9.9.061.tar.gz
You will find rpm packages in your system /usr/src/redhat/* dirs (note you may
not need to use sudo or root if you have your own ~/.rpmrc. see rpm documents
@@ -39,11 +39,11 @@ for more details)
DEB: To build deb packages:
- tar zvf ecore-0.9.9.060.tar.gz
- cd ecore-0.9.9.060
+ tar zvf ecore-0.9.9.061.tar.gz
+ cd ecore-0.9.9.061
dpkg-buildpackage -us -uc -rfakeroot
cd ..
- rm -rf ecore-0.9.9.060
+ rm -rf ecore-0.9.9.061
You will find all the debian source, binary etc. packages put in the directory
where you first untarred the source tarball.
diff --git a/config.h.in b/config.h.in
index 3216b84..0e38850 100644
--- a/config.h.in
+++ b/config.h.in
@@ -48,6 +48,9 @@
/* Support for Software DirectDraw Engine in Ecore_Evas */
#undef BUILD_ECORE_EVAS_SOFTWARE_DDRAW
+/* Support for Software GDI Engine in Ecore_Evas */
+#undef BUILD_ECORE_EVAS_SOFTWARE_GDI
+
/* Support for Software SDL Engine in Ecore_Evas */
#undef BUILD_ECORE_EVAS_SOFTWARE_SDL
diff --git a/configure b/configure
index bbe374c..3e63bb9 100755
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.61 for ecore 0.9.9.060.
+# Generated by GNU Autoconf 2.61 for ecore 0.9.9.061.
#
# Report bugs to <enlightenment-devel at lists.sourceforge.net>.
#
@@ -723,8 +723,8 @@ SHELL=${CONFIG_SHELL-/bin/sh}
# Identity of this package.
PACKAGE_NAME='ecore'
PACKAGE_TARNAME='ecore'
-PACKAGE_VERSION='0.9.9.060'
-PACKAGE_STRING='ecore 0.9.9.060'
+PACKAGE_VERSION='0.9.9.061'
+PACKAGE_STRING='ecore 0.9.9.061'
PACKAGE_BUGREPORT='enlightenment-devel at lists.sourceforge.net'
ac_unique_file="configure.ac"
@@ -1673,7 +1673,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures ecore 0.9.9.060 to adapt to many kinds of systems.
+\`configure' configures ecore 0.9.9.061 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1747,7 +1747,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of ecore 0.9.9.060:";;
+ short | recursive ) echo "Configuration of ecore 0.9.9.061:";;
esac
cat <<\_ACEOF
@@ -1816,6 +1816,12 @@ Optional Features:
--disable-ecore-evas-xrender-xcb
disable XRender XCB support in the ecore_evas
module.
+ --enable-ecore-evas-software-gdi
+ enable Software GDI support in the ecore_evas
+ module.
+ --disable-ecore-evas-software-gdi
+ disable Software GDI support in the ecore_evas
+ module.
--enable-ecore-evas-software-ddraw
enable Software DirectDraw support in the ecore_evas
module.
@@ -2031,7 +2037,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-ecore configure 0.9.9.060
+ecore configure 0.9.9.061
generated by GNU Autoconf 2.61
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -2045,7 +2051,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by ecore $as_me 0.9.9.060, which was
+It was created by ecore $as_me 0.9.9.061, which was
generated by GNU Autoconf 2.61. Invocation command line was
$ $0 $@
@@ -3887,7 +3893,7 @@ fi
# Define the identity of the package.
PACKAGE='ecore'
- VERSION='0.9.9.060'
+ VERSION='0.9.9.061'
cat >>confdefs.h <<_ACEOF
@@ -5143,13 +5149,13 @@ if test "${lt_cv_nm_interface+set}" = set; then
else
lt_cv_nm_interface="BSD nm"
echo "int some_variable = 0;" > conftest.$ac_ext
- (eval echo "\"\$as_me:5146: $ac_compile\"" >&5)
+ (eval echo "\"\$as_me:5152: $ac_compile\"" >&5)
(eval "$ac_compile" 2>conftest.err)
cat conftest.err >&5
- (eval echo "\"\$as_me:5149: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
+ (eval echo "\"\$as_me:5155: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
(eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
cat conftest.err >&5
- (eval echo "\"\$as_me:5152: output\"" >&5)
+ (eval echo "\"\$as_me:5158: output\"" >&5)
cat conftest.out >&5
if $GREP 'External.*some_variable' conftest.out > /dev/null; then
lt_cv_nm_interface="MS dumpbin"
@@ -6259,7 +6265,7 @@ ia64-*-hpux*)
;;
*-*-irix6*)
# Find out which ABI we are using.
- echo '#line 6262 "configure"' > conftest.$ac_ext
+ echo '#line 6268 "configure"' > conftest.$ac_ext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
@@ -8108,11 +8114,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:8111: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:8117: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:8115: \$? = $ac_status" >&5
+ echo "$as_me:8121: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -8432,11 +8438,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:8435: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:8441: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:8439: \$? = $ac_status" >&5
+ echo "$as_me:8445: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -8537,11 +8543,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:8540: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:8546: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:8544: \$? = $ac_status" >&5
+ echo "$as_me:8550: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -8592,11 +8598,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:8595: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:8601: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:8599: \$? = $ac_status" >&5
+ echo "$as_me:8605: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -11353,7 +11359,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11356 "configure"
+#line 11362 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -11453,7 +11459,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11456 "configure"
+#line 11462 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -11690,27 +11696,33 @@ VMIN=`echo $PACKAGE_VERSION | awk -F. '{printf("%s", $2);}'`
VMIC=`echo $PACKAGE_VERSION | awk -F. '{printf("%s", $3);}'`
SNAP=`echo $PACKAGE_VERSION | awk -F. '{printf("%s", $4);}'`
version_info=`expr $VMAJ + $VMIN`":$VMIC:$VMIN"
-release="ver-pre-01"
-ecore_config_release_info="-release $release"
-ecore_con_release_info="-release $release"
-ecore_directfb_release_info="-release $release"
-ecore_evas_release_info="-release $release"
-ecore_fb_release_info="-release $release"
-ecore_file_release_info="-release $release"
-ecore_imf_evas_release_info="-release $release"
-ecore_imf_release_info="-release $release"
-ecore_input_release_info="-release $release"
-ecore_ipc_release_info="-release $release"
-ecore_job_release_info="-release $release"
-ecore_quartz_release_info="-release $release"
-ecore_release_info="-release $release"
-ecore_sdl_release_info="-release $release"
-ecore_txt_release_info="-release $release"
-ecore_win32_release_info="-release $release"
-ecore_wince_release_info="-release $release"
-ecore_x_release_info="-release $release"
+release="ver-svn-02"
+case "$host_os" in
+ mingw32ce* | cegcc*)
+ ;;
+ *)
+ ecore_config_release_info="-release $release"
+ ecore_con_release_info="-release $release"
+ ecore_directfb_release_info="-release $release"
+ ecore_evas_release_info="-release $release"
+ ecore_fb_release_info="-release $release"
+ ecore_file_release_info="-release $release"
+ ecore_imf_evas_release_info="-release $release"
+ ecore_imf_release_info="-release $release"
+ ecore_input_release_info="-release $release"
+ ecore_ipc_release_info="-release $release"
+ ecore_job_release_info="-release $release"
+ ecore_quartz_release_info="-release $release"
+ ecore_release_info="-release $release"
+ ecore_sdl_release_info="-release $release"
+ ecore_txt_release_info="-release $release"
+ ecore_win32_release_info="-release $release"
+ ecore_x_release_info="-release $release"
+ ;;
+esac
+
@@ -11779,6 +11791,7 @@ want_ecore_evas_opengl_x11="no"
want_ecore_evas_software_16_x11="no"
want_ecore_evas_software_xcb="no"
want_ecore_evas_xrender_xcb="no"
+want_ecore_evas_software_gdi="no"
want_ecore_evas_software_ddraw="no"
want_ecore_evas_direct3d="no"
want_ecore_evas_opengl_glew="no"
@@ -11798,6 +11811,7 @@ case "$host_os" in
want_curl="yes"
want_ecore_imf="yes"
want_ecore_win32="yes"
+ want_ecore_evas_software_gdi="yes"
want_ecore_evas_software_ddraw="yes"
want_ecore_evas_direct3d="yes"
want_ecore_evas_opengl_glew="yes"
@@ -15443,11 +15457,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:15446: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:15460: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:15450: \$? = $ac_status" >&5
+ echo "$as_me:15464: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -15542,11 +15556,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:15545: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:15559: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:15549: \$? = $ac_status" >&5
+ echo "$as_me:15563: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -15594,11 +15608,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:15597: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:15611: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:15601: \$? = $ac_status" >&5
+ echo "$as_me:15615: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -17264,10 +17278,14 @@ if test "${enable_doc+set}" = set; then
else
efl_enable_doc="yes"
-
fi
+{ echo "$as_me:$LINENO: checking whether to build documentation" >&5
+echo $ECHO_N "checking whether to build documentation... $ECHO_C" >&6; }
+{ echo "$as_me:$LINENO: result: ${efl_enable_doc}" >&5
+echo "${ECHO_T}${efl_enable_doc}" >&6; }
+
if test "x${efl_enable_doc}" = "xyes" ; then
@@ -17318,11 +17336,11 @@ fi
if test "x${efl_have_doxygen}" = "xno" ; then
echo "WARNING:"
echo "The doxygen program you specified:"
- echo "$efl_doxygen"
+ echo "${efl_doxygen}"
echo "was not found. Please check the path and make sure "
echo "the program exists and is executable."
- { echo "$as_me:$LINENO: WARNING: Warning: no doxygen detected. Documentation will not be built" >&5
-echo "$as_me: WARNING: Warning: no doxygen detected. Documentation will not be built" >&2;}
+ { echo "$as_me:$LINENO: WARNING: no doxygen detected. Documentation will not be built" >&5
+echo "$as_me: WARNING: no doxygen detected. Documentation will not be built" >&2;}
fi
else
@@ -17366,18 +17384,17 @@ fi
if test "x${efl_have_doxygen}" = "xno" ; then
echo "WARNING:"
- echo "The doxygen program was not found in your execute"
+ echo "The doxygen program was not found in your execute path."
echo "You may have doxygen installed somewhere not covered by your path."
echo ""
echo "If this is the case make sure you have the packages installed, AND"
echo "that the doxygen program is in your execute path (see your"
echo "shell manual page on setting the \$PATH environment variable), OR"
echo "alternatively, specify the program to use with --with-doxygen."
- { echo "$as_me:$LINENO: WARNING: Warning: no doxygen detected. Documentation will not be built" >&5
-echo "$as_me: WARNING: Warning: no doxygen detected. Documentation will not be built" >&2;}
+ { echo "$as_me:$LINENO: WARNING: no doxygen detected. Documentation will not be built" >&5
+echo "$as_me: WARNING: no doxygen detected. Documentation will not be built" >&2;}
fi
-
fi
fi
@@ -18511,12 +18528,12 @@ if test -n "$PKG_CONFIG"; then
pkg_cv_XCB_CFLAGS="$XCB_CFLAGS"
else
if test -n "$PKG_CONFIG" && \
- { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xcb xcb-icccm xcb-image xcb-keysyms\"") >&5
- ($PKG_CONFIG --exists --print-errors "xcb xcb-icccm xcb-image xcb-keysyms") 2>&5
+ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xcb xcb-icccm xcb-image xcb-keysyms pixman-1\"") >&5
+ ($PKG_CONFIG --exists --print-errors "xcb xcb-icccm xcb-image xcb-keysyms pixman-1") 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; then
- pkg_cv_XCB_CFLAGS=`$PKG_CONFIG --cflags "xcb xcb-icccm xcb-image xcb-keysyms" 2>/dev/null`
+ pkg_cv_XCB_CFLAGS=`$PKG_CONFIG --cflags "xcb xcb-icccm xcb-image xcb-keysyms pixman-1" 2>/dev/null`
else
pkg_failed=yes
fi
@@ -18529,12 +18546,12 @@ if test -n "$PKG_CONFIG"; then
pkg_cv_XCB_LIBS="$XCB_LIBS"
else
if test -n "$PKG_CONFIG" && \
- { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xcb xcb-icccm xcb-image xcb-keysyms\"") >&5
- ($PKG_CONFIG --exists --print-errors "xcb xcb-icccm xcb-image xcb-keysyms") 2>&5
+ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xcb xcb-icccm xcb-image xcb-keysyms pixman-1\"") >&5
+ ($PKG_CONFIG --exists --print-errors "xcb xcb-icccm xcb-image xcb-keysyms pixman-1") 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; then
- pkg_cv_XCB_LIBS=`$PKG_CONFIG --libs "xcb xcb-icccm xcb-image xcb-keysyms" 2>/dev/null`
+ pkg_cv_XCB_LIBS=`$PKG_CONFIG --libs "xcb xcb-icccm xcb-image xcb-keysyms pixman-1" 2>/dev/null`
else
pkg_failed=yes
fi
@@ -18553,9 +18570,9 @@ else
_pkg_short_errors_supported=no
fi
if test $_pkg_short_errors_supported = yes; then
- XCB_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "xcb xcb-icccm xcb-image xcb-keysyms"`
+ XCB_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "xcb xcb-icccm xcb-image xcb-keysyms pixman-1"`
else
- XCB_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xcb xcb-icccm xcb-image xcb-keysyms"`
+ XCB_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xcb xcb-icccm xcb-image xcb-keysyms pixman-1"`
fi
# Put the nasty error message in config.log where it belongs
echo "$XCB_PKG_ERRORS" >&5
@@ -26017,7 +26034,6 @@ case "$host_os" in
esac
-
### Checks for library functions
# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
# for constant arguments. Useless!
@@ -30346,6 +30362,65 @@ fi
+have_ecore_evas_software_gdi="no"
+want_module="${want_ecore_evas_software_gdi}"
+
+if test "x${want_module}" = "xno" ; then
+ # Check whether --enable-ecore-evas-software-gdi was given.
+if test "${enable_ecore_evas_software_gdi+set}" = set; then
+ enableval=$enable_ecore_evas_software_gdi; want_module=$enableval
+fi
+
+else
+ # Check whether --enable-ecore-evas-software-gdi was given.
+if test "${enable_ecore_evas_software_gdi+set}" = set; then
+ enableval=$enable_ecore_evas_software_gdi; want_module=$enableval
+fi
+
+fi
+
+{ echo "$as_me:$LINENO: checking whether ecore_evas Software GDI support is to be built" >&5
+echo $ECHO_N "checking whether ecore_evas Software GDI support is to be built... $ECHO_C" >&6; }
+{ echo "$as_me:$LINENO: result: ${want_module}" >&5
+echo "${ECHO_T}${want_module}" >&6; }
+
+if test "x${have_ecore_win32}" = "xyes" -a \
+ "x$have_ecore_evas" = "xyes" -a \
+ "x$want_module" = "xyes" ; then
+ if test -n "$PKG_CONFIG" && \
+ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"evas-software-gdi\"") >&5
+ ($PKG_CONFIG --exists --print-errors "evas-software-gdi") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+
+
+cat >>confdefs.h <<\_ACEOF
+#define BUILD_ECORE_EVAS_SOFTWARE_GDI 1
+_ACEOF
+
+ have_ecore_evas_software_gdi="yes"
+
+fi
+fi
+
+{ echo "$as_me:$LINENO: checking whether ecore_evas Software GDI support is built" >&5
+echo $ECHO_N "checking whether ecore_evas Software GDI support is built... $ECHO_C" >&6; }
+{ echo "$as_me:$LINENO: result: $have_ecore_evas_software_gdi" >&5
+echo "${ECHO_T}$have_ecore_evas_software_gdi" >&6; }
+
+if test "x$have_ecore_evas_software_gdi" = "xyes" ; then
+ :
+else
+ :
+fi
+
+
+
+
+
+
+
have_ecore_evas_software_ddraw="no"
want_module="${want_ecore_evas_software_ddraw}"
@@ -30580,7 +30655,8 @@ fi
-if test "x${have_ecore_evas_software_ddraw}" = "xyes" -o \
+if test "x${have_ecore_evas_software_gdi}" = "xyes" -o \
+ "x${have_ecore_evas_software_ddraw}" = "xyes" -o \
"x${have_ecore_evas_direct3d}" = "xyes" -o \
"x${have_ecore_evas_opengl_glew}" = "xyes" -o \
"x${have_ecore_evas_software_16_ddraw}" = "xyes" ; then
@@ -31514,7 +31590,7 @@ exec 6>&1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by ecore $as_me 0.9.9.060, which was
+This file was extended by ecore $as_me 0.9.9.061, which was
generated by GNU Autoconf 2.61. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -31567,7 +31643,7 @@ Report bugs to <bug-autoconf at gnu.org>."
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF
ac_cs_version="\\
-ecore config.status 0.9.9.060
+ecore config.status 0.9.9.061
configured by $0, generated by GNU Autoconf 2.61,
with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
@@ -34119,6 +34195,7 @@ if test "x${have_ecore_evas}" = "xyes" ; then
echo " OpenGL X11.................: $have_ecore_evas_opengl_x11"
echo " Software XCB...............: $have_ecore_evas_software_xcb"
echo " XRender XCB................: $have_ecore_evas_xrender_xcb"
+ echo " Software GDI...............: $have_ecore_evas_software_gdi"
echo " Software DirectDraw........: $have_ecore_evas_software_ddraw"
echo " Direct3D...................: $have_ecore_evas_direct3d"
echo " OpenGL Glew................: $have_ecore_evas_opengl_glew"
diff --git a/configure.ac b/configure.ac
index ed27758..8dee24d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,7 +1,7 @@
# get rid of that stupid cache mechanism
rm -f config.cache
-AC_INIT([ecore], 0.9.9.060, [enlightenment-devel at lists.sourceforge.net])
+AC_INIT([ecore], [0.9.9.061], [enlightenment-devel at lists.sourceforge.net])
AC_PREREQ([2.52])
AC_CONFIG_SRCDIR([configure.ac])
AC_CONFIG_MACRO_DIR([m4])
@@ -22,26 +22,32 @@ VMIN=`echo $PACKAGE_VERSION | awk -F. '{printf("%s", $2);}'`
VMIC=`echo $PACKAGE_VERSION | awk -F. '{printf("%s", $3);}'`
SNAP=`echo $PACKAGE_VERSION | awk -F. '{printf("%s", $4);}'`
version_info=`expr $VMAJ + $VMIN`":$VMIC:$VMIN"
-release="ver-pre-01"
-ecore_config_release_info="-release $release"
-ecore_con_release_info="-release $release"
-ecore_directfb_release_info="-release $release"
-ecore_evas_release_info="-release $release"
-ecore_fb_release_info="-release $release"
-ecore_file_release_info="-release $release"
-ecore_imf_evas_release_info="-release $release"
-ecore_imf_release_info="-release $release"
-ecore_input_release_info="-release $release"
-ecore_ipc_release_info="-release $release"
-ecore_job_release_info="-release $release"
-ecore_quartz_release_info="-release $release"
-ecore_release_info="-release $release"
-ecore_sdl_release_info="-release $release"
-ecore_txt_release_info="-release $release"
-ecore_win32_release_info="-release $release"
-ecore_wince_release_info="-release $release"
-ecore_x_release_info="-release $release"
AC_SUBST(version_info)
+
+release="ver-svn-02"
+case "$host_os" in
+ mingw32ce* | cegcc*)
+ ;;
+ *)
+ ecore_config_release_info="-release $release"
+ ecore_con_release_info="-release $release"
+ ecore_directfb_release_info="-release $release"
+ ecore_evas_release_info="-release $release"
+ ecore_fb_release_info="-release $release"
+ ecore_file_release_info="-release $release"
+ ecore_imf_evas_release_info="-release $release"
+ ecore_imf_release_info="-release $release"
+ ecore_input_release_info="-release $release"
+ ecore_ipc_release_info="-release $release"
+ ecore_job_release_info="-release $release"
+ ecore_quartz_release_info="-release $release"
+ ecore_release_info="-release $release"
+ ecore_sdl_release_info="-release $release"
+ ecore_txt_release_info="-release $release"
+ ecore_win32_release_info="-release $release"
+ ecore_x_release_info="-release $release"
+ ;;
+esac
AC_SUBST(ecore_config_release_info)
AC_SUBST(ecore_con_release_info)
AC_SUBST(ecore_directfb_release_info)
@@ -107,6 +113,7 @@ want_ecore_evas_opengl_x11="no"
want_ecore_evas_software_16_x11="no"
want_ecore_evas_software_xcb="no"
want_ecore_evas_xrender_xcb="no"
+want_ecore_evas_software_gdi="no"
want_ecore_evas_software_ddraw="no"
want_ecore_evas_direct3d="no"
want_ecore_evas_opengl_glew="no"
@@ -126,6 +133,7 @@ case "$host_os" in
want_curl="yes"
want_ecore_imf="yes"
want_ecore_win32="yes"
+ want_ecore_evas_software_gdi="yes"
want_ecore_evas_software_ddraw="yes"
want_ecore_evas_direct3d="yes"
want_ecore_evas_opengl_glew="yes"
@@ -453,7 +461,7 @@ AC_MSG_CHECKING(whether ecore_x with XCB backend is to be built)
AC_MSG_RESULT($want_ecore_x_xcb)
if test "x$want_ecore_x_xcb" = "xyes" ; then
- PKG_CHECK_MODULES(XCB, xcb xcb-icccm xcb-image xcb-keysyms,
+ PKG_CHECK_MODULES(XCB, xcb xcb-icccm xcb-image xcb-keysyms pixman-1,
[ have_ecore_x_xcb="yes" ],
[ have_ecore_x_xcb="no" ])
@@ -702,7 +710,6 @@ case "$host_os" in
esac
AC_SUBST(lt_enable_auto_import)
-
### Checks for library functions
AC_FUNC_ALLOCA
AC_CHECK_FUNCS(gettimeofday strlcpy)
@@ -953,6 +960,11 @@ fi
# ecore_evas_win32
+ECORE_EVAS_CHECK_MODULE([software-gdi],
+ [${want_ecore_evas_software_gdi}],
+ [Software GDI],
+ [${have_ecore_win32}])
+
ECORE_EVAS_CHECK_MODULE([software-ddraw],
[${want_ecore_evas_software_ddraw}],
[Software DirectDraw],
@@ -973,7 +985,8 @@ ECORE_EVAS_CHECK_MODULE([software-16-ddraw],
[16 bpp Software DirectDraw],
[${have_ecore_win32}])
-if test "x${have_ecore_evas_software_ddraw}" = "xyes" -o \
+if test "x${have_ecore_evas_software_gdi}" = "xyes" -o \
+ "x${have_ecore_evas_software_ddraw}" = "xyes" -o \
"x${have_ecore_evas_direct3d}" = "xyes" -o \
"x${have_ecore_evas_opengl_glew}" = "xyes" -o \
"x${have_ecore_evas_software_16_ddraw}" = "xyes" ; then
@@ -1195,6 +1208,7 @@ if test "x${have_ecore_evas}" = "xyes" ; then
echo " OpenGL X11.................: $have_ecore_evas_opengl_x11"
echo " Software XCB...............: $have_ecore_evas_software_xcb"
echo " XRender XCB................: $have_ecore_evas_xrender_xcb"
+ echo " Software GDI...............: $have_ecore_evas_software_gdi"
echo " Software DirectDraw........: $have_ecore_evas_software_ddraw"
echo " Direct3D...................: $have_ecore_evas_direct3d"
echo " OpenGL Glew................: $have_ecore_evas_opengl_glew"
diff --git a/ecore.spec b/ecore.spec
index 30ed18e..8b2df00 100644
--- a/ecore.spec
+++ b/ecore.spec
@@ -37,7 +37,7 @@
Summary: Enlightened Core X interface library
Name: ecore
-Version: 0.9.9.060
+Version: 0.9.9.061
Release: 0.%(date '+%Y%m%d')
License: BSD
Group: User Interface/X
diff --git a/m4/efl_doxygen.m4 b/m4/efl_doxygen.m4
index 0c1452f..dd6bc3e 100644
--- a/m4/efl_doxygen.m4
+++ b/m4/efl_doxygen.m4
@@ -25,13 +25,15 @@ AC_ARG_ENABLE([doc],
efl_enable_doc="no"
fi
],
- [efl_enable_doc="yes"]
-)
+ [efl_enable_doc="yes"])
+
+AC_MSG_CHECKING([whether to build documentation])
+AC_MSG_RESULT([${efl_enable_doc}])
if test "x${efl_enable_doc}" = "xyes" ; then
dnl
-dnl Specify the full file name, with path
+dnl Specify the file name, without path
dnl
efl_doxygen="doxygen"
@@ -51,10 +53,10 @@ dnl
if test "x${efl_have_doxygen}" = "xno" ; then
echo "WARNING:"
echo "The doxygen program you specified:"
- echo "$efl_doxygen"
+ echo "${efl_doxygen}"
echo "was not found. Please check the path and make sure "
echo "the program exists and is executable."
- AC_MSG_WARN([Warning: no doxygen detected. Documentation will not be built])
+ AC_MSG_WARN([no doxygen detected. Documentation will not be built])
fi
],
[AC_CHECK_PROG([efl_have_doxygen],
@@ -63,17 +65,16 @@ dnl
[no])
if test "x${efl_have_doxygen}" = "xno" ; then
echo "WARNING:"
- echo "The doxygen program was not found in your execute"
+ echo "The doxygen program was not found in your execute path."
echo "You may have doxygen installed somewhere not covered by your path."
echo ""
echo "If this is the case make sure you have the packages installed, AND"
echo "that the doxygen program is in your execute path (see your"
echo "shell manual page on setting the \$PATH environment variable), OR"
echo "alternatively, specify the program to use with --with-doxygen."
- AC_MSG_WARN([Warning: no doxygen detected. Documentation will not be built])
+ AC_MSG_WARN([no doxygen detected. Documentation will not be built])
fi
- ]
- )
+ ])
fi
dnl
@@ -88,9 +89,9 @@ fi
AM_CONDITIONAL(EFL_BUILD_DOC, test "x${efl_enable_doc}" = "xyes")
if test "x${efl_enable_doc}" = "xyes" ; then
- ifelse([$1], , :, [$1])
+ m4_default([$1], [:])
else
- ifelse([$2], , :, [$2])
+ m4_default([$2], [:])
fi
])
diff --git a/src/lib/ecore/Ecore.h b/src/lib/ecore/Ecore.h
index b75178d..06f5cee 100644
--- a/src/lib/ecore/Ecore.h
+++ b/src/lib/ecore/Ecore.h
@@ -53,6 +53,7 @@
# include <winsock2.h>
#else
# include <sys/types.h>
+# include <sys/time.h>
# include <signal.h>
#endif
@@ -294,14 +295,17 @@ extern "C" {
EAPI Ecore_Pipe *ecore_pipe_add(void (*handler) (void *data, void *buffer, unsigned int nbyte), const void *data);
EAPI void *ecore_pipe_del(Ecore_Pipe *p);
EAPI int ecore_pipe_write(Ecore_Pipe *p, const void *buffer, unsigned int nbytes);
+ EAPI void ecore_pipe_write_close(Ecore_Pipe *p);
+ EAPI void ecore_pipe_read_close(Ecore_Pipe *p);
EAPI double ecore_time_get(void);
EAPI double ecore_loop_time_get(void);
-
+
EAPI Ecore_Timer *ecore_timer_add(double in, int (*func) (void *data), const void *data);
EAPI Ecore_Timer *ecore_timer_loop_add(double in, int (*func) (void *data), const void *data);
EAPI void *ecore_timer_del(Ecore_Timer *timer);
EAPI void ecore_timer_interval_set(Ecore_Timer *timer, double in);
+ EAPI double ecore_timer_interval_get(Ecore_Timer *timer);
EAPI void ecore_timer_freeze(Ecore_Timer *timer);
EAPI void ecore_timer_thaw(Ecore_Timer *timer);
EAPI void ecore_timer_delay(Ecore_Timer *timer, double add);
diff --git a/src/lib/ecore/ecore_exe.c b/src/lib/ecore/ecore_exe.c
index 9d476c6..8bb4c61 100644
--- a/src/lib/ecore/ecore_exe.c
+++ b/src/lib/ecore/ecore_exe.c
@@ -6,7 +6,7 @@
# include <config.h>
#endif
-#if defined (__FreeBSD__) || defined (__OpenBSD__)
+#if defined (__FreeBSD__) || defined (__OpenBSD__) || defined (__NetBSD__)
#include <sys/time.h>
#include <sys/resource.h>
#endif
diff --git a/src/lib/ecore/ecore_idle_enterer.c b/src/lib/ecore/ecore_idle_enterer.c
index bdbb371..066aaa3 100644
--- a/src/lib/ecore/ecore_idle_enterer.c
+++ b/src/lib/ecore/ecore_idle_enterer.c
@@ -99,7 +99,9 @@ _ecore_idle_enterer_shutdown(void)
void
_ecore_idle_enterer_call(void)
{
- Ecore_List2 *l;
+ Ecore_List2 *l, *last;
+
+ last = idle_enterers ? ((Ecore_List2 *)idle_enterers)->last : NULL;
for (l = (Ecore_List2 *)idle_enterers; l; l = l->next)
{
@@ -110,6 +112,8 @@ _ecore_idle_enterer_call(void)
{
if (!ie->func(ie->data)) ecore_idle_enterer_del(ie);
}
+
+ if (l == last) break;
}
if (idle_enterers_delete_me)
{
diff --git a/src/lib/ecore/ecore_idle_exiter.c b/src/lib/ecore/ecore_idle_exiter.c
index c9ff572..bdf1322 100644
--- a/src/lib/ecore/ecore_idle_exiter.c
+++ b/src/lib/ecore/ecore_idle_exiter.c
@@ -75,7 +75,9 @@ _ecore_idle_exiter_shutdown(void)
void
_ecore_idle_exiter_call(void)
{
- Ecore_List2 *l;
+ Ecore_List2 *l, *last;
+
+ last = idle_exiters ? ((Ecore_List2 *)idle_exiters)->last : NULL;
for (l = (Ecore_List2 *)idle_exiters; l; l = l->next)
{
@@ -86,6 +88,8 @@ _ecore_idle_exiter_call(void)
{
if (!ie->func(ie->data)) ecore_idle_exiter_del(ie);
}
+
+ if (l == last) break;
}
if (idle_exiters_delete_me)
{
diff --git a/src/lib/ecore/ecore_idler.c b/src/lib/ecore/ecore_idler.c
index 48fc941..52bcb8e 100644
--- a/src/lib/ecore/ecore_idler.c
+++ b/src/lib/ecore/ecore_idler.c
@@ -83,7 +83,9 @@ _ecore_idler_shutdown(void)
int
_ecore_idler_call(void)
{
- Ecore_List2 *l;
+ Ecore_List2 *l, *last;
+
+ last = idlers ? ((Ecore_List2 *)idlers)->last : NULL;
for (l = (Ecore_List2 *)idlers; l; l = l->next)
{
@@ -94,6 +96,8 @@ _ecore_idler_call(void)
{
if (!ie->func(ie->data)) ecore_idler_del(ie);
}
+
+ if (l == last) break;
}
if (idlers_delete_me)
{
diff --git a/src/lib/ecore/ecore_main.c b/src/lib/ecore/ecore_main.c
index 1427bfc..07e1b12 100644
--- a/src/lib/ecore/ecore_main.c
+++ b/src/lib/ecore/ecore_main.c
@@ -545,8 +545,6 @@ _ecore_main_loop_iterate_internal(int once_only)
while (_ecore_timer_call(now));
_ecore_timer_cleanup();
}
- /* any timers re-added as a result of these are allowed to go */
- _ecore_timer_enable_new();
/* process signals into events .... */
while (_ecore_signal_count_get()) _ecore_signal_call();
if (_ecore_event_exist())
@@ -596,6 +594,8 @@ _ecore_main_loop_iterate_internal(int once_only)
_ecore_fps_debug_runtime_add(t2 - t1);
}
start_loop:
+ /* any timers re-added as a result of these are allowed to go */
+ _ecore_timer_enable_new();
if (do_quit)
{
in_main_loop--;
diff --git a/src/lib/ecore/ecore_pipe.c b/src/lib/ecore/ecore_pipe.c
index f6e4778..7975d6a 100644
--- a/src/lib/ecore/ecore_pipe.c
+++ b/src/lib/ecore/ecore_pipe.c
@@ -35,6 +35,9 @@
# define pipe_write(fd, buffer, size) send((fd), (char *)(buffer), size, 0)
# define pipe_read(fd, buffer, size) recv((fd), (char *)(buffer), size, 0)
+# define pipe_close(fd) closesocket(fd)
+# define PIPE_FD_INVALID INVALID_SOCKET
+# define PIPE_FD_ERROR SOCKET_ERROR
#else
@@ -43,6 +46,9 @@
# define pipe_write(fd, buffer, size) write((fd), buffer, size)
# define pipe_read(fd, buffer, size) read((fd), buffer, size)
+# define pipe_close(fd) close(fd)
+# define PIPE_FD_INVALID -1
+# define PIPE_FD_ERROR -1
#endif /* ! _WIN32 */
@@ -332,20 +338,64 @@ ecore_pipe_del(Ecore_Pipe *p)
"ecore_pipe_del");
return NULL;
}
- ecore_main_fd_handler_del(p->fd_handler);
- close(p->fd_read);
- close(p->fd_write);
+ if(p->fd_handler != NULL)
+ ecore_main_fd_handler_del(p->fd_handler);
+ if(p->fd_read != PIPE_FD_INVALID)
+ pipe_close(p->fd_read);
+ if(p->fd_write != PIPE_FD_INVALID)
+ pipe_close(p->fd_write);
data = (void *)p->data;
free (p);
return data;
}
/**
+ * Close the read end of an Ecore_Pipe object created with ecore_pipe_add().
+ *
+ * @param p The Ecore_Pipe object.
+ * @ingroup Ecore_Pipe_Group
+ */
+EAPI void
+ecore_pipe_read_close(Ecore_Pipe *p)
+{
+ if (!ECORE_MAGIC_CHECK(p, ECORE_MAGIC_PIPE))
+ {
+ ECORE_MAGIC_FAIL(p, ECORE_MAGIC_PIPE,
+ "ecore_pipe_read_close");
+ return;
+ }
+ ecore_main_fd_handler_del(p->fd_handler);
+ p->fd_handler = NULL;
+ pipe_close(p->fd_read);
+ p->fd_read = PIPE_FD_INVALID;
+}
+
+/**
+ * Close the write end of an Ecore_Pipe object created with ecore_pipe_add().
+ *
+ * @param p The Ecore_Pipe object.
+ * @ingroup Ecore_Pipe_Group
+ */
+EAPI void
+ecore_pipe_write_close(Ecore_Pipe *p)
+{
+ if (!ECORE_MAGIC_CHECK(p, ECORE_MAGIC_PIPE))
+ {
+ ECORE_MAGIC_FAIL(p, ECORE_MAGIC_PIPE,
+ "ecore_pipe_write_close");
+ return;
+ }
+ pipe_close(p->fd_write);
+ p->fd_write = PIPE_FD_INVALID;
+}
+
+/**
* Write on the file descriptor the data passed as parameter.
*
* @param p The Ecore_Pipe object.
* @param buffer The data to write into the pipe.
* @param nbytes The size of the @p buffer in bytes
+ * @return Returns TRUE on a successful write, FALSE on an error
* @ingroup Ecore_Pipe_Group
*/
EAPI int
@@ -359,9 +409,13 @@ ecore_pipe_write(Ecore_Pipe *p, const void *buffer, unsigned int nbytes)
{
ECORE_MAGIC_FAIL(p, ECORE_MAGIC_PIPE,
"ecore_pipe_write");
- return 0;
+ return FALSE;
}
- /* first write the len into the pipe */
+
+ if(p->fd_write == PIPE_FD_INVALID)
+ return FALSE;
+
+ /* First write the len into the pipe */
do
{
ret = pipe_write(p->fd_write, &nbytes, sizeof(nbytes));
@@ -375,9 +429,15 @@ ecore_pipe_write(Ecore_Pipe *p, const void *buffer, unsigned int nbytes)
/* XXX What should we do here? */
fprintf(stderr, "The length of the data was not written complete"
" to the pipe\n");
- return 0;
+ return FALSE;
}
- else if (ret == -1 && errno == EINTR)
+ else if (ret == PIPE_FD_ERROR && errno == EPIPE)
+ {
+ pipe_close(p->fd_write);
+ p->fd_write = PIPE_FD_INVALID;
+ return FALSE;
+ }
+ else if (ret == PIPE_FD_ERROR && errno == EINTR)
/* try it again */
;
else
@@ -390,7 +450,7 @@ ecore_pipe_write(Ecore_Pipe *p, const void *buffer, unsigned int nbytes)
while (retry--);
if (retry != ECORE_PIPE_WRITE_RETRY)
- return 0;
+ return FALSE;
/* and now pass the data to the pipe */
do
@@ -400,13 +460,19 @@ ecore_pipe_write(Ecore_Pipe *p, const void *buffer, unsigned int nbytes)
nbytes - already_written);
if (ret == (ssize_t)(nbytes - already_written))
- return 1;
+ return TRUE;
else if (ret >= 0)
{
already_written -= ret;
continue;
}
- else if (ret == -1 && errno == EINTR)
+ else if (ret == PIPE_FD_ERROR && errno == EPIPE)
+ {
+ pipe_close(p->fd_write);
+ p->fd_write = PIPE_FD_INVALID;
+ return FALSE;
+ }
+ else if (ret == PIPE_FD_ERROR && errno == EINTR)
/* try it again */
;
else
@@ -418,7 +484,7 @@ ecore_pipe_write(Ecore_Pipe *p, const void *buffer, unsigned int nbytes)
}
while (retry--);
- return 0;
+ return FALSE;
}
/* Private function */
@@ -453,8 +519,15 @@ _ecore_pipe_read(void *data, Ecore_Fd_Handler *fd_handler __UNUSED__)
fprintf(stderr, "Only read %d bytes from the pipe, although"
" we need to read %d bytes.\n", ret, sizeof(p->len));
}
- else if ((ret == 0) ||
- ((ret == -1) && ((errno == EINTR) || (errno == EAGAIN))))
+ else if (ret == 0)
+ {
+ p->handler((void *)p->data, NULL, 0);
+ pipe_close(p->fd_read);
+ p->fd_read = PIPE_FD_INVALID;
+ p->fd_handler = NULL;
+ return ECORE_CALLBACK_CANCEL;
+ }
+ else if ((ret == PIPE_FD_ERROR) && ((errno == EINTR) || (errno == EAGAIN)))
return ECORE_CALLBACK_RENEW;
else
{
@@ -488,7 +561,15 @@ _ecore_pipe_read(void *data, Ecore_Fd_Handler *fd_handler __UNUSED__)
p->already_read += ret;
return ECORE_CALLBACK_RENEW;
}
- else if (ret == -1 && (errno == EINTR || errno == EAGAIN))
+ else if (ret == 0)
+ {
+ p->handler((void *)p->data, NULL, 0);
+ pipe_close(p->fd_read);
+ p->fd_read = PIPE_FD_INVALID;
+ p->fd_handler = NULL;
+ return ECORE_CALLBACK_CANCEL;
+ }
+ else if (ret == PIPE_FD_ERROR && (errno == EINTR || errno == EAGAIN))
return ECORE_CALLBACK_RENEW;
else
{
diff --git a/src/lib/ecore/ecore_poll.c b/src/lib/ecore/ecore_poll.c
index 3143a90..20630d0 100644
--- a/src/lib/ecore/ecore_poll.c
+++ b/src/lib/ecore/ecore_poll.c
@@ -211,7 +211,7 @@ ecore_poller_poll_interval_set(Ecore_Poller_Type type __UNUSED__, double poll_ti
}
/**
- * Gets the time between ticks (in seconds) for the fiven ticker clock.
+ * Gets the time between ticks (in seconds) for the given ticker clock.
* @param type The ticker type to query
* @return The time in seconds between ticks of the ticker clock
* @ingroup Ecore_Poller_Group
diff --git a/src/lib/ecore/ecore_private.h b/src/lib/ecore/ecore_private.h
index 02b4e45..2b09627 100644
--- a/src/lib/ecore/ecore_private.h
+++ b/src/lib/ecore/ecore_private.h
@@ -3,6 +3,9 @@
#include <sys/types.h>
#include <unistd.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
#ifdef HAVE_SIGNAL_H
# include <signal.h>
diff --git a/src/lib/ecore/ecore_timer.c b/src/lib/ecore/ecore_timer.c
index 701bcdb..2ececa4 100644
--- a/src/lib/ecore/ecore_timer.c
+++ b/src/lib/ecore/ecore_timer.c
@@ -184,6 +184,26 @@ ecore_timer_interval_set(Ecore_Timer *timer, double in)
}
/**
+ * Get the interval the timer ticks on.
+ *
+ * @param timer The timer to retrieve the interval from
+ * @return The interval on success. -1 on failure.
+ * @ingroup Ecore_Time_Group
+ */
+EAPI double
+ecore_timer_interval_get(Ecore_Timer *timer)
+{
+ if (!ECORE_MAGIC_CHECK(timer, ECORE_MAGIC_TIMER))
+ {
+ ECORE_MAGIC_FAIL(timer, ECORE_MAGIC_TIMER,
+ "ecore_timer_interval_get");
+ return -1.0;
+ }
+
+ return timer->in;
+}
+
+/**
* Add some delay for the next occurence of a timer.
* This doesn't affect the interval of a timer.
*
diff --git a/src/lib/ecore_con/Makefile.am b/src/lib/ecore_con/Makefile.am
index 6a862ff..3477ac6 100644
--- a/src/lib/ecore_con/Makefile.am
+++ b/src/lib/ecore_con/Makefile.am
@@ -24,7 +24,7 @@ libecore_con_la_LIBADD = \
$(top_builddir)/src/lib/ecore/libecore.la \
@SSL_LIBS@ @CURL_LIBS@ @EINA_LIBS@ @TLS_LIBS@
-libecore_con_la_LDFLAGS = -version-info @version_info@ @ecore_con_release_info@
+libecore_con_la_LDFLAGS = -no-undefined -version-info @version_info@ @ecore_con_release_info@
endif
diff --git a/src/lib/ecore_con/Makefile.in b/src/lib/ecore_con/Makefile.in
index 107195d..9ae1542 100644
--- a/src/lib/ecore_con/Makefile.in
+++ b/src/lib/ecore_con/Makefile.in
@@ -409,7 +409,7 @@ AM_CPPFLAGS = \
@BUILD_ECORE_CON_TRUE@$(top_builddir)/src/lib/ecore/libecore.la \
@BUILD_ECORE_CON_TRUE@@SSL_LIBS@ @CURL_LIBS@ @EINA_LIBS@ @TLS_LIBS@
- at BUILD_ECORE_CON_TRUE@libecore_con_la_LDFLAGS = -version-info @version_info@ @ecore_con_release_info@
+ at BUILD_ECORE_CON_TRUE@libecore_con_la_LDFLAGS = -no-undefined -version-info @version_info@ @ecore_con_release_info@
EXTRA_DIST = ecore_con_private.h
all: all-am
diff --git a/src/lib/ecore_con/ecore_con.c b/src/lib/ecore_con/ecore_con.c
index 1be24d0..04a41df 100644
--- a/src/lib/ecore_con/ecore_con.c
+++ b/src/lib/ecore_con/ecore_con.c
@@ -1728,7 +1728,7 @@ _ecore_con_event_server_add_free(void *data __UNUSED__, void *ev)
e = ev;
e->server->event_count--;
if ((e->server->event_count == 0) && (e->server->delete_me))
- ecore_con_server_del(e->server);
+ _ecore_con_server_free(e->server);
free(e);
}
@@ -1740,7 +1740,7 @@ _ecore_con_event_server_del_free(void *data __UNUSED__, void *ev)
e = ev;
e->server->event_count--;
if ((e->server->event_count == 0) && (e->server->delete_me))
- ecore_con_server_del(e->server);
+ _ecore_con_server_free(e->server);
free(e);
}
@@ -1753,6 +1753,6 @@ _ecore_con_event_server_data_free(void *data __UNUSED__, void *ev)
e->server->event_count--;
if (e->data) free(e->data);
if ((e->server->event_count == 0) && (e->server->delete_me))
- ecore_con_server_del(e->server);
+ _ecore_con_server_free(e->server);
free(e);
}
diff --git a/src/lib/ecore_con/ecore_con_info.c b/src/lib/ecore_con/ecore_con_info.c
index 45ed162..0c33d74 100644
--- a/src/lib/ecore_con/ecore_con_info.c
+++ b/src/lib/ecore_con/ecore_con_info.c
@@ -197,7 +197,7 @@ ecore_con_info_get(Ecore_Con_Server *svr,
if ((cbdata->pid = fork()) == 0)
{
Ecore_Con_Info *container;
- struct addrinfo *result;
+ struct addrinfo *result = NULL;
char service[NI_MAXSERV];
char hbuf[NI_MAXHOST];
char sbuf[NI_MAXSERV];
@@ -239,6 +239,8 @@ ecore_con_info_get(Ecore_Con_Server *svr,
}
on_error:
+ if (result)
+ freeaddrinfo(result);
err = write(fd[1], "", 1);
close(fd[1]);
# ifdef __USE_ISOC99
diff --git a/src/lib/ecore_con/ecore_con_url.c b/src/lib/ecore_con/ecore_con_url.c
index 1c2b77b..4f03a6a 100644
--- a/src/lib/ecore_con/ecore_con_url.c
+++ b/src/lib/ecore_con/ecore_con_url.c
@@ -455,7 +455,7 @@ ecore_con_url_send(Ecore_Con_Url *url_con, const void *data, size_t length, cons
sprintf(tmp, "Content-type: %s", content_type);
url_con->headers = curl_slist_append(url_con->headers, tmp);
}
- sprintf(tmp, "Content-length: %d", length);
+ sprintf(tmp, "Content-length: %zu", length);
url_con->headers = curl_slist_append(url_con->headers, tmp);
}
@@ -745,7 +745,7 @@ _ecore_con_url_read_cb(void *ptr, size_t size, size_t nitems, void *stream)
fclose((FILE*)stream);
return 0;
}
- fprintf(stderr, "*** We read %d bytes from file\n", retcode);
+ fprintf(stderr, "*** We read %zu bytes from file\n", retcode);
return retcode;
}
@@ -884,9 +884,11 @@ _ecore_con_url_process_completed_jobs(Ecore_Con_Url *url_con_to_match)
e = calloc(1, sizeof(Ecore_Con_Event_Url_Complete));
if (e)
{
+ long status; /* curl API uses long, not int */
e->url_con = url_con;
e->status = 0;
- curl_easy_getinfo(curlmsg->easy_handle, CURLINFO_RESPONSE_CODE, &e->status);
+ curl_easy_getinfo(curlmsg->easy_handle, CURLINFO_RESPONSE_CODE, &status);
+ e->status = status;
_url_complete_push_event(ECORE_CON_EVENT_URL_COMPLETE, e);
}
curl_multi_remove_handle(curlm, url_con->curl_easy);
diff --git a/src/lib/ecore_config/Makefile.am b/src/lib/ecore_config/Makefile.am
index 8257d81..79ff4c4 100644
--- a/src/lib/ecore_config/Makefile.am
+++ b/src/lib/ecore_config/Makefile.am
@@ -27,7 +27,7 @@ lib_LTLIBRARIES = libecore_config.la
include_HEADERS = \
Ecore_Config.h
-libecore_config_la_LDFLAGS = -version-info @version_info@ @ecore_config_release_info@
+libecore_config_la_LDFLAGS = -no-undefined -version-info @version_info@ @ecore_config_release_info@
#config_DATA = $(DB)
#configdir = $(pkgdatadir)
diff --git a/src/lib/ecore_config/Makefile.in b/src/lib/ecore_config/Makefile.in
index 41be8ef..f3a5589 100644
--- a/src/lib/ecore_config/Makefile.in
+++ b/src/lib/ecore_config/Makefile.in
@@ -425,7 +425,7 @@ CLEANFILES = $(DB)
@BUILD_ECORE_CONFIG_TRUE at include_HEADERS = \
@BUILD_ECORE_CONFIG_TRUE at Ecore_Config.h
- at BUILD_ECORE_CONFIG_TRUE@libecore_config_la_LDFLAGS = -version-info @version_info@ @ecore_config_release_info@
+ at BUILD_ECORE_CONFIG_TRUE@libecore_config_la_LDFLAGS = -no-undefined -version-info @version_info@ @ecore_config_release_info@
@BUILD_ECORE_CONFIG_TRUE@@BUILD_ECORE_IPC_FALSE at libecore_config_la_SOURCES = \
@BUILD_ECORE_CONFIG_TRUE@@BUILD_ECORE_IPC_FALSE at ecore_config.c \
@BUILD_ECORE_CONFIG_TRUE@@BUILD_ECORE_IPC_FALSE at ecore_config_util.c \
diff --git a/src/lib/ecore_evas/Ecore_Evas.h b/src/lib/ecore_evas/Ecore_Evas.h
index eec905b..ccff83c 100644
--- a/src/lib/ecore_evas/Ecore_Evas.h
+++ b/src/lib/ecore_evas/Ecore_Evas.h
@@ -76,6 +76,7 @@ typedef enum _Ecore_Evas_Engine_Type
ECORE_EVAS_ENGINE_OPENGL_X11,
ECORE_EVAS_ENGINE_SOFTWARE_XCB,
ECORE_EVAS_ENGINE_XRENDER_XCB,
+ ECORE_EVAS_ENGINE_SOFTWARE_GDI,
ECORE_EVAS_ENGINE_SOFTWARE_DDRAW,
ECORE_EVAS_ENGINE_DIRECT3D,
ECORE_EVAS_ENGINE_OPENGL_GLEW,
@@ -114,7 +115,7 @@ typedef struct _Ecore_DirectFB_Window Ecore_DirectFB_Window;
#endif
#ifndef __ECORE_WIN32_H__
-typedef void Ecore_Win32_Window;
+typedef struct _Ecore_Win32_Window Ecore_Win32_Window;
#endif
#ifndef __ECORE_WINCE_H__
@@ -175,6 +176,12 @@ EAPI const void *ecore_evas_buffer_pixels_get(Ecore_Evas *ee);
EAPI Evas_Object *ecore_evas_object_image_new(Ecore_Evas *ee_target);
+EAPI Ecore_Evas *ecore_evas_software_gdi_new(Ecore_Win32_Window *parent,
+ int x,
+ int y,
+ int width,
+ int height);
+
EAPI Ecore_Evas *ecore_evas_software_ddraw_new(Ecore_Win32_Window *parent,
int x,
int y,
diff --git a/src/lib/ecore_evas/Makefile.am b/src/lib/ecore_evas/Makefile.am
index 708c407..a187d51 100644
--- a/src/lib/ecore_evas/Makefile.am
+++ b/src/lib/ecore_evas/Makefile.am
@@ -75,7 +75,8 @@ $(ECORE_QUARTZ_INC) \
$(ECORE_WINCE_INC) \
@EVAS_CFLAGS@ \
@XCB_CFLAGS@ \
- at EINA_CFLAGS@
+ at EINA_CFLAGS@ \
+ at EVIL_CFLAGS@
AM_CFLAGS = @WIN32_CFLAGS@
@@ -106,9 +107,10 @@ $(ECORE_SDL_LIB) \
$(ECORE_SDL_LIBADD) \
$(ECORE_QUARTZ_LIB) \
$(ECORE_WINCE_LIB) \
-$(top_builddir)/src/lib/ecore/libecore.la \
$(top_builddir)/src/lib/ecore_input/libecore_input.la \
- at EVAS_LIBS@
+$(top_builddir)/src/lib/ecore/libecore.la \
+ at EVAS_LIBS@ \
+ at EVIL_LIBS@
libecore_evas_la_LDFLAGS = @quartz_ldflags@ -no-undefined @lt_enable_auto_import@ -version-info @version_info@ @ecore_evas_release_info@
diff --git a/src/lib/ecore_evas/Makefile.in b/src/lib/ecore_evas/Makefile.in
index 0ec53c4..0830d4b 100644
--- a/src/lib/ecore_evas/Makefile.in
+++ b/src/lib/ecore_evas/Makefile.in
@@ -76,8 +76,8 @@ LTLIBRARIES = $(lib_LTLIBRARIES)
@BUILD_ECORE_EVAS_TRUE@ $(am__DEPENDENCIES_6) \
@BUILD_ECORE_EVAS_TRUE@ $(am__DEPENDENCIES_7) \
@BUILD_ECORE_EVAS_TRUE@ $(am__DEPENDENCIES_8) \
- at BUILD_ECORE_EVAS_TRUE@ $(top_builddir)/src/lib/ecore/libecore.la \
- at BUILD_ECORE_EVAS_TRUE@ $(top_builddir)/src/lib/ecore_input/libecore_input.la
+ at BUILD_ECORE_EVAS_TRUE@ $(top_builddir)/src/lib/ecore_input/libecore_input.la \
+ at BUILD_ECORE_EVAS_TRUE@ $(top_builddir)/src/lib/ecore/libecore.la
am__libecore_evas_la_SOURCES_DIST = ecore_evas.c ecore_evas_util.c \
ecore_evas_x.c ecore_evas_fb.c ecore_evas_buffer.c \
ecore_evas_directfb.c ecore_evas_win32.c ecore_evas_sdl.c \
@@ -458,7 +458,8 @@ $(ECORE_QUARTZ_INC) \
$(ECORE_WINCE_INC) \
@EVAS_CFLAGS@ \
@XCB_CFLAGS@ \
- at EINA_CFLAGS@
+ at EINA_CFLAGS@ \
+ at EVIL_CFLAGS@
AM_CFLAGS = @WIN32_CFLAGS@
@BUILD_ECORE_EVAS_TRUE at lib_LTLIBRARIES = libecore_evas.la
@@ -486,9 +487,10 @@ AM_CFLAGS = @WIN32_CFLAGS@
@BUILD_ECORE_EVAS_TRUE@$(ECORE_SDL_LIBADD) \
@BUILD_ECORE_EVAS_TRUE@$(ECORE_QUARTZ_LIB) \
@BUILD_ECORE_EVAS_TRUE@$(ECORE_WINCE_LIB) \
- at BUILD_ECORE_EVAS_TRUE@$(top_builddir)/src/lib/ecore/libecore.la \
@BUILD_ECORE_EVAS_TRUE@$(top_builddir)/src/lib/ecore_input/libecore_input.la \
- at BUILD_ECORE_EVAS_TRUE@@EVAS_LIBS@
+ at BUILD_ECORE_EVAS_TRUE@$(top_builddir)/src/lib/ecore/libecore.la \
+ at BUILD_ECORE_EVAS_TRUE@@EVAS_LIBS@ \
+ at BUILD_ECORE_EVAS_TRUE@@EVIL_LIBS@
@BUILD_ECORE_EVAS_TRUE at libecore_evas_la_LDFLAGS = @quartz_ldflags@ -no-undefined @lt_enable_auto_import@ -version-info @version_info@ @ecore_evas_release_info@
EXTRA_DIST = \
diff --git a/src/lib/ecore_evas/ecore_evas.c b/src/lib/ecore_evas/ecore_evas.c
index f9c894a..8acdef3 100644
--- a/src/lib/ecore_evas/ecore_evas.c
+++ b/src/lib/ecore_evas/ecore_evas.c
@@ -68,6 +68,12 @@ ecore_evas_engine_type_supported_get(Ecore_Evas_Engine_Type engine)
#else
return 0;
#endif
+ case ECORE_EVAS_ENGINE_SOFTWARE_GDI:
+#ifdef BUILD_ECORE_EVAS_SOFTWARE_GDI
+ return 1;
+#else
+ return 0;
+#endif
case ECORE_EVAS_ENGINE_SOFTWARE_DDRAW:
#ifdef BUILD_ECORE_EVAS_SOFTWARE_DDRAW
return 1;
@@ -415,6 +421,14 @@ _ecore_evas_constructor_fb(int x __UNUSED__, int y __UNUSED__, int w, int h, con
}
#endif
+#ifdef BUILD_ECORE_EVAS_SOFTWARE_GDI
+static Ecore_Evas *
+_ecore_evas_constructor_software_gdi(int x, int y, int w, int h, const char *extra_options)
+{
+ return ecore_evas_software_gdi_new(NULL, x, y, w, h);
+}
+#endif
+
#ifdef BUILD_ECORE_EVAS_SOFTWARE_DDRAW
static Ecore_Evas *
_ecore_evas_constructor_software_ddraw(int x, int y, int w, int h, const char *extra_options)
@@ -510,6 +524,9 @@ static const struct ecore_evas_engine _engines[] = {
#endif
/* windows */
+#ifdef BUILD_ECORE_EVAS_SOFTWARE_GDI
+ {"software_gdi", _ecore_evas_constructor_software_gdi},
+#endif
#ifdef BUILD_ECORE_EVAS_SOFTWARE_DDRAW
{"software_ddraw", _ecore_evas_constructor_software_ddraw},
#endif
@@ -1259,6 +1276,9 @@ ecore_evas_rotation_set(Ecore_Evas *ee, int rot)
while (rot < 0) rot += 360;
while (rot >= 360) rot -= 360;
IFC(ee, fn_rotation_set) (ee, rot);
+ /* make sure everything gets redrawn */
+ evas_damage_rectangle_add(ee->evas, 0, 0, ee->w, ee->h);
+ evas_damage_rectangle_add(ee->evas, 0, 0, ee->h, ee->w);
IFE;
}
diff --git a/src/lib/ecore_evas/ecore_evas_directfb.c b/src/lib/ecore_evas/ecore_evas_directfb.c
index f92d646..82d0ee4 100644
--- a/src/lib/ecore_evas/ecore_evas_directfb.c
+++ b/src/lib/ecore_evas/ecore_evas_directfb.c
@@ -78,6 +78,34 @@ _ecore_evas_directfb_idle_enter(void *data __UNUSED__)
return 1;
}
+static char *
+_ecore_evas_directfb_winid_str_get(Ecore_X_Window win)
+{
+ const char *vals = "qWeRtYuIoP5$&<~";
+ static char id[9];
+ unsigned int val;
+ val = (unsigned int)win;
+ id[0] = vals[(val >> 28) & 0xf];
+ id[1] = vals[(val >> 24) & 0xf];
+ id[2] = vals[(val >> 20) & 0xf];
+ id[3] = vals[(val >> 16) & 0xf];
+ id[4] = vals[(val >> 12) & 0xf];
+ id[5] = vals[(val >> 8) & 0xf];
+ id[6] = vals[(val >> 4) & 0xf];
+ id[7] = vals[(val ) & 0xf];
+ id[8] = 0;
+ return id;
+}
+
+static Ecore_Evas *
+_ecore_evas_directfb_match(DFBWindowID win)
+{
+ Ecore_Evas *ee;
+
+ ee = eina_hash_find(ecore_evases_hash, _ecore_evas_directfb_winid_str_get(win));
+ return ee;
+}
+
static int
_ecore_evas_directfb_event_key_down(void *data __UNUSED__, int type __UNUSED__, void *event)
{
diff --git a/src/lib/ecore_evas/ecore_evas_private.h b/src/lib/ecore_evas/ecore_evas_private.h
index 2070877..f2c9e6f 100644
--- a/src/lib/ecore_evas/ecore_evas_private.h
+++ b/src/lib/ecore_evas/ecore_evas_private.h
@@ -73,6 +73,9 @@
#ifdef BUILD_ECORE_EVAS_WIN32
# include "Ecore_Win32.h"
+# ifdef BUILD_ECORE_EVAS_SOFTWARE_GDI
+# include <Evas_Engine_Software_Gdi.h>
+# endif
# ifdef BUILD_ECORE_EVAS_SOFTWARE_DDRAW
# include <Evas_Engine_Software_DDraw.h>
# endif
@@ -161,11 +164,7 @@ struct _Ecore_Evas_Engine
Ecore_X_Pixmap pmap;
Ecore_X_Pixmap mask;
Ecore_X_GC gc;
-#ifdef BUILD_ECORE_EVAS_SOFTWARE_XCB
-# warning [XCB] No Region code
-#else
- Region damages;
-#endif /* ! BUILD_ECORE_EVAS_SOFTWARE_XCB */
+ Ecore_X_XRegion *damages;
int px, py, pw, ph;
unsigned char direct_resize : 1;
unsigned char using_bg_pixmap : 1;
diff --git a/src/lib/ecore_evas/ecore_evas_win32.c b/src/lib/ecore_evas/ecore_evas_win32.c
index 82e1153..3497948 100644
--- a/src/lib/ecore_evas/ecore_evas_win32.c
+++ b/src/lib/ecore_evas/ecore_evas_win32.c
@@ -61,9 +61,9 @@ _ecore_evas_win32_render(Ecore_Evas *ee)
EINA_LIST_FOREACH(ee->sub_ecore_evas, ll, ee2)
{
- if (ee2->func.fn_pre_render) ee2->func.fn_pre_render(ee2);
- _ecore_evas_buffer_render(ee2);
- if (ee2->func.fn_post_render) ee2->func.fn_post_render(ee2);
+ if (ee2->func.fn_pre_render) ee2->func.fn_pre_render(ee2);
+ _ecore_evas_buffer_render(ee2);
+ if (ee2->func.fn_post_render) ee2->func.fn_post_render(ee2);
}
#endif
if (ee->func.fn_pre_render) ee->func.fn_pre_render(ee);
@@ -102,20 +102,20 @@ _ecore_evas_win32_idle_enter(void *data __UNUSED__)
if (!ecore_evases) return 1;
if (_ecore_evas_fps_debug)
{
- t1 = ecore_time_get();
+ t1 = ecore_time_get();
}
for (l = (Ecore_List2 *)ecore_evases; l; l = l->next)
{
- Ecore_Evas *ee;
+ Ecore_Evas *ee;
- ee = (Ecore_Evas *)l;
- _ecore_evas_win32_render(ee);
+ ee = (Ecore_Evas *)l;
+ _ecore_evas_win32_render(ee);
}
/* ecore_x_flush(); */
if (_ecore_evas_fps_debug)
{
- t2 = ecore_time_get();
-/* _ecore_evas_fps_debug_rendertime_add(t2 - t1); */
+ t2 = ecore_time_get();
+/* _ecore_evas_fps_debug_rendertime_add(t2 - t1); */
}
return 1;
}
@@ -151,14 +151,14 @@ _ecore_evas_win32_shutdown(void)
_ecore_evas_init_count--;
if (_ecore_evas_init_count == 0)
{
- int i;
-
- while (ecore_evases) _ecore_evas_free(ecore_evases);
- for (i = 0; i < ECORE_EVAS_EVENT_COUNT; i++)
- ecore_event_handler_del(ecore_evas_event_handlers[i]);
- ecore_idle_enterer_del(ecore_evas_idle_enterer);
- ecore_evas_idle_enterer = NULL;
- ecore_event_evas_shutdown();
+ int i;
+
+ while (ecore_evases) _ecore_evas_free(ecore_evases);
+ for (i = 0; i < ECORE_EVAS_EVENT_COUNT; i++)
+ ecore_event_handler_del(ecore_evas_event_handlers[i]);
+ ecore_idle_enterer_del(ecore_evas_idle_enterer);
+ ecore_evas_idle_enterer = NULL;
+ ecore_event_evas_shutdown();
}
if (_ecore_evas_init_count < 0) _ecore_evas_init_count = 0;
@@ -360,15 +360,15 @@ _ecore_evas_win32_event_window_configure(void *data __UNUSED__, int type __UNUSE
ecore_evas_avoid_damage_set(ee, 1);
}
/* FIXME: to do... */
-/* if (ee->shaped) */
-/* _ecore_evas_x_resize_shape(ee); */
+/* if (ee->shaped) */
+/* _ecore_evas_x_resize_shape(ee); */
if ((ee->expecting_resize.w > 0) &&
(ee->expecting_resize.h > 0))
{
if ((ee->expecting_resize.w == ee->w) &&
(ee->expecting_resize.h == ee->h))
_ecore_evas_mouse_move_process(ee, ee->mouse.x, ee->mouse.y,
- ecore_win32_current_time_get());
+ ecore_win32_current_time_get());
ee->expecting_resize.w = 0;
ee->expecting_resize.h = 0;
}
@@ -499,80 +499,99 @@ _ecore_evas_win32_move_resize(Ecore_Evas *ee, int x, int y, int width, int heigh
}
static void
-_ecore_evas_win32_rotation_set(Ecore_Evas *ee, int rotation)
+_ecore_evas_win32_rotation_set_internal(Ecore_Evas *ee, int rotation)
{
int rot_dif;
+ rot_dif = ee->rotation - rotation;
+ if (rot_dif < 0) rot_dif = -rot_dif;
+
+ if (rot_dif != 180)
+ {
+ int minw, minh, maxw, maxh, basew, baseh, stepw, steph;
+
+ if (!ee->prop.fullscreen)
+ {
+ ecore_win32_window_resize(ee->prop.window, ee->h, ee->w);
+ ee->expecting_resize.w = ee->h;
+ ee->expecting_resize.h = ee->w;
+ }
+ else
+ {
+ int w, h;
+
+ ecore_win32_window_size_get(ee->prop.window, &w, &h);
+ ecore_win32_window_resize(ee->prop.window, h, w);
+ if ((rotation == 0) || (rotation == 180))
+ {
+ evas_output_size_set(ee->evas, ee->w, ee->h);
+ evas_output_viewport_set(ee->evas, 0, 0, ee->w, ee->h);
+ }
+ else
+ {
+ evas_output_size_set(ee->evas, ee->h, ee->w);
+ evas_output_viewport_set(ee->evas, 0, 0, ee->h, ee->w);
+ }
+ if (ee->func.fn_resize) ee->func.fn_resize(ee);
+ }
+ ecore_evas_size_min_get(ee, &minw, &minh);
+ ecore_evas_size_max_get(ee, &maxw, &maxh);
+ ecore_evas_size_base_get(ee, &basew, &baseh);
+ ecore_evas_size_step_get(ee, &stepw, &steph);
+ ee->rotation = rotation;
+ ecore_evas_size_min_set(ee, minh, minw);
+ ecore_evas_size_max_set(ee, maxh, maxw);
+ ecore_evas_size_base_set(ee, baseh, basew);
+ ecore_evas_size_step_set(ee, steph, stepw);
+ _ecore_evas_mouse_move_process(ee, ee->mouse.x, ee->mouse.y,
+ ecore_win32_current_time_get());
+ }
+ else
+ {
+ ee->rotation = rotation;
+ _ecore_evas_mouse_move_process(ee, ee->mouse.x, ee->mouse.y,
+ ecore_win32_current_time_get());
+ if (ee->func.fn_resize) ee->func.fn_resize(ee);
+ }
+
+ if ((ee->rotation == 90) || (ee->rotation == 270))
+ evas_damage_rectangle_add(ee->evas, 0, 0, ee->h, ee->w);
+ else
+ evas_damage_rectangle_add(ee->evas, 0, 0, ee->w, ee->h);
+}
+
+static void
+_ecore_evas_win32_rotation_set(Ecore_Evas *ee, int rotation)
+{
EINA_ERROR_PINFO("ecore evas rotation: %s\n", rotation ? "yes" : "no");
if (ee->rotation == rotation) return;
- rot_dif = ee->rotation - rotation;
- if (rot_dif < 0) rot_dif = -rot_dif;
- if (!strcmp(ee->driver, "software_ddraw"))
+#ifdef BUILD_ECORE_EVAS_SOFTWARE_GDI
+ if (!strcmp(ee->driver, "software_gdi"))
{
+ Evas_Engine_Info_Software_Gdi *einfo;
+
+ einfo = (Evas_Engine_Info_Software_Gdi *)evas_engine_info_get(ee->evas);
+ if (!einfo) return;
+ einfo->info.rotation = rotation;
+ evas_engine_info_set(ee->evas, (Evas_Engine_Info *)einfo);
+ _ecore_evas_win32_rotation_set_internal(ee, rotation);
+ }
+#endif /* BUILD_ECORE_EVAS_SOFTWARE_GDI */
+
#ifdef BUILD_ECORE_EVAS_SOFTWARE_DDRAW
- Evas_Engine_Info_Software_DDraw *einfo;
-
- einfo = (Evas_Engine_Info_Software_DDraw *)evas_engine_info_get(ee->evas);
- if (!einfo) return;
- if (rot_dif != 180)
- {
- int minw, minh, maxw, maxh, basew, baseh, stepw, steph;
-
- einfo->info.rotation = rotation;
- evas_engine_info_set(ee->evas, (Evas_Engine_Info *)einfo);
- if (!ee->prop.fullscreen)
- {
- ecore_win32_window_resize(ee->prop.window, ee->h, ee->w);
- ee->expecting_resize.w = ee->h;
- ee->expecting_resize.h = ee->w;
- }
- else
- {
- int w, h;
-
- ecore_win32_window_size_get(ee->prop.window, &w, &h);
- ecore_win32_window_resize(ee->prop.window, h, w);
- if ((rotation == 0) || (rotation == 180))
- {
- evas_output_size_set(ee->evas, ee->w, ee->h);
- evas_output_viewport_set(ee->evas, 0, 0, ee->w, ee->h);
- }
- else
- {
- evas_output_size_set(ee->evas, ee->h, ee->w);
- evas_output_viewport_set(ee->evas, 0, 0, ee->h, ee->w);
- }
- if (ee->func.fn_resize) ee->func.fn_resize(ee);
- }
- ecore_evas_size_min_get(ee, &minw, &minh);
- ecore_evas_size_max_get(ee, &maxw, &maxh);
- ecore_evas_size_base_get(ee, &basew, &baseh);
- ecore_evas_size_step_get(ee, &stepw, &steph);
- ee->rotation = rotation;
- ecore_evas_size_min_set(ee, minh, minw);
- ecore_evas_size_max_set(ee, maxh, maxw);
- ecore_evas_size_base_set(ee, baseh, basew);
- ecore_evas_size_step_set(ee, steph, stepw);
- _ecore_evas_mouse_move_process(ee, ee->mouse.x, ee->mouse.y,
- ecore_win32_current_time_get());
- }
- else
- {
- einfo->info.rotation = rotation;
- evas_engine_info_set(ee->evas, (Evas_Engine_Info *)einfo);
- ee->rotation = rotation;
- _ecore_evas_mouse_move_process(ee, ee->mouse.x, ee->mouse.y,
- ecore_win32_current_time_get());
- if (ee->func.fn_resize) ee->func.fn_resize(ee);
- }
- if ((ee->rotation == 90) || (ee->rotation == 270))
- evas_damage_rectangle_add(ee->evas, 0, 0, ee->h, ee->w);
- else
- evas_damage_rectangle_add(ee->evas, 0, 0, ee->w, ee->h);
-#endif /* BUILD_ECORE_EVAS_SOFTWARE_DDRAW */
+ if (!strcmp(ee->driver, "software_ddraw"))
+ {
+ Evas_Engine_Info_Software_DDraw *einfo;
+
+ einfo = (Evas_Engine_Info_Software_DDraw *)evas_engine_info_get(ee->evas);
+ if (!einfo) return;
+ einfo->info.rotation = rotation;
+ evas_engine_info_set(ee->evas, (Evas_Engine_Info *)einfo);
+ _ecore_evas_win32_rotation_set_internal(ee, rotation);
}
+#endif /* BUILD_ECORE_EVAS_SOFTWARE_DDRAW */
}
static void
@@ -692,12 +711,12 @@ _ecore_evas_win32_cursor_set(Ecore_Evas *ee, Evas_Object *obj, int layer, int ho
if (obj == NULL)
{
- ee->prop.cursor.object = NULL;
- ee->prop.cursor.layer = 0;
- ee->prop.cursor.hot.x = 0;
- ee->prop.cursor.hot.y = 0;
- ecore_win32_window_cursor_show(ee->prop.window, 1);
- return;
+ ee->prop.cursor.object = NULL;
+ ee->prop.cursor.layer = 0;
+ ee->prop.cursor.hot.x = 0;
+ ee->prop.cursor.hot.y = 0;
+ ecore_win32_window_cursor_show(ee->prop.window, 1);
+ return;
}
ee->prop.cursor.object = obj;
@@ -710,8 +729,8 @@ _ecore_evas_win32_cursor_set(Ecore_Evas *ee, Evas_Object *obj, int layer, int ho
evas_pointer_output_xy_get(ee->evas, &x, &y);
evas_object_layer_set(ee->prop.cursor.object, ee->prop.cursor.layer);
evas_object_move(ee->prop.cursor.object,
- x - ee->prop.cursor.hot.x,
- y - ee->prop.cursor.hot.y);
+ x - ee->prop.cursor.hot.x,
+ y - ee->prop.cursor.hot.y);
evas_object_pass_events_set(ee->prop.cursor.object, 1);
if (evas_pointer_inside_get(ee->evas))
evas_object_show(ee->prop.cursor.object);
@@ -772,35 +791,37 @@ _ecore_evas_win32_fullscreen_set(Ecore_Evas *ee, int on)
window->shape.mask);
}
- if (strcmp(ee->driver, "direct3d") == 0)
+ /* Nothing to be done for the GDI backend at the evas level */
+
+#ifdef BUILD_ECORE_EVAS_SOFTWRE_DDRAW
+ if (strcmp(ee->driver, "software_ddraw") == 0)
{
-#ifdef BUILD_ECORE_EVAS_DIRECT3D
- Evas_Engine_Info_Direct3D *einfo;
+ Evas_Engine_Info_Software_DDraw *einfo;
- einfo = (Evas_Engine_Info_Direct3D *)evas_engine_info_get(ecore_evas_get(ee));
+ einfo = (Evas_Engine_Info_Software_DDraw *)evas_engine_info_get(ecore_evas_get(ee));
if (einfo != NULL)
{
einfo->info.fullscreen = !!on;
- einfo->info.layered = window->shape.layered;
+/* einfo->info.layered = window->shape.layered; */
evas_engine_info_set(ecore_evas_get(ee), (Evas_Engine_Info *)einfo);
}
-#endif /* BUILD_ECORE_EVAS_DIRECT3D */
}
+#endif /* BUILD_ECORE_EVAS_SOFTWARE_DDRAW */
- if (strcmp(ee->driver, "software_ddraw") == 0)
+#ifdef BUILD_ECORE_EVAS_DIRECT3D
+ if (strcmp(ee->driver, "direct3d") == 0)
{
-#ifdef BUILD_ECORE_EVAS_SOFTWRE_DDRAW
- Evas_Engine_Info_Software_DDraw *einfo;
+ Evas_Engine_Info_Direct3D *einfo;
einfo = (Evas_Engine_Info_Direct3D *)evas_engine_info_get(ecore_evas_get(ee));
if (einfo != NULL)
{
einfo->info.fullscreen = !!on;
-/* einfo->info.layered = window->shape.layered; */
+ einfo->info.layered = window->shape.layered;
evas_engine_info_set(ecore_evas_get(ee), (Evas_Engine_Info *)einfo);
}
-#endif /* BUILD_ECORE_EVAS_SOFTWARE_DDRAW */
}
+#endif /* BUILD_ECORE_EVAS_DIRECT3D */
}
@@ -857,6 +878,39 @@ static const Ecore_Evas_Engine_Func _ecore_win32_engine_func =
/* API */
+#ifdef BUILD_ECORE_EVAS_SOFTWARE_GDI
+static int
+_ecore_evas_engine_software_gdi_init(Ecore_Evas *ee)
+{
+ Evas_Engine_Info_Software_Gdi *einfo;
+ const char *driver;
+ int rmethod;
+
+ driver = "software_gdi";
+
+ rmethod = evas_render_method_lookup(driver);
+ if (!rmethod)
+ return 0;
+
+ ee->driver = driver;
+ evas_output_method_set(ee->evas, rmethod);
+
+ einfo = (Evas_Engine_Info_Software_Gdi *)evas_engine_info_get(ee->evas);
+ if (einfo)
+ {
+ /* FIXME: REDRAW_DEBUG missing for now */
+ einfo->info.window = ((struct _Ecore_Win32_Window *)ee->prop.window)->window;
+ einfo->info.mask = NULL;
+ einfo->info.depth = ecore_win32_screen_depth_get();
+ einfo->info.rotation = 0;
+ einfo->info.fullscreen = 0;
+ evas_engine_info_set(ee->evas, (Evas_Engine_Info *)einfo);
+ }
+
+ return 1;
+}
+#endif /* BUILD_ECORE_EVAS_SOFTWARE_GDI */
+
#ifdef BUILD_ECORE_EVAS_SOFTWARE_DDRAW
static int
_ecore_evas_engine_software_ddraw_init(Ecore_Evas *ee)
@@ -881,7 +935,7 @@ _ecore_evas_engine_software_ddraw_init(Ecore_Evas *ee)
einfo->info.window = ((struct _Ecore_Win32_Window *)ee->prop.window)->window;
einfo->info.depth = ecore_win32_screen_depth_get();
einfo->info.rotation = 0;
- evas_engine_info_set(ee->evas, (Evas_Engine_Info *)einfo);
+ evas_engine_info_set(ee->evas, (Evas_Engine_Info *)einfo);
}
return 1;
@@ -912,7 +966,7 @@ _ecore_evas_engine_direct3d_init(Ecore_Evas *ee)
einfo->info.window = ((struct _Ecore_Win32_Window *)ee->prop.window)->window;
einfo->info.depth = ecore_win32_screen_depth_get();
einfo->info.rotation = 0;
- evas_engine_info_set(ee->evas, (Evas_Engine_Info *)einfo);
+ evas_engine_info_set(ee->evas, (Evas_Engine_Info *)einfo);
}
return 1;
@@ -942,7 +996,7 @@ _ecore_evas_engine_opengl_glew_init(Ecore_Evas *ee)
/* FIXME: REDRAW_DEBUG missing for now */
einfo->info.window = ((struct _Ecore_Win32_Window *)ee->prop.window)->window;
einfo->info.depth = ecore_win32_screen_depth_get();
- evas_engine_info_set(ee->evas, (Evas_Engine_Info *)einfo);
+ evas_engine_info_set(ee->evas, (Evas_Engine_Info *)einfo);
}
return 1;
@@ -976,7 +1030,7 @@ _ecore_evas_engine_software_16_ddraw_init(Ecore_Evas *ee)
einfo->info.window = ((struct _Ecore_Win32_Window *)ee->prop.window)->window;
einfo->info.depth = ecore_win32_screen_depth_get();
einfo->info.rotation = 0;
- evas_engine_info_set(ee->evas, (Evas_Engine_Info *)einfo);
+ evas_engine_info_set(ee->evas, (Evas_Engine_Info *)einfo);
}
return 1;
@@ -1052,6 +1106,37 @@ _ecore_evas_win32_new_internal(int (*_ecore_evas_engine_init)(Ecore_Evas *ee),
#endif /* BUILD_ECORE_EVAS_WIN32 */
+#ifdef BUILD_ECORE_EVAS_SOFTWARE_GDI
+
+EAPI Ecore_Evas *
+ecore_evas_software_gdi_new(Ecore_Win32_Window *parent,
+ int x,
+ int y,
+ int width,
+ int height)
+{
+ return _ecore_evas_win32_new_internal(_ecore_evas_engine_software_gdi_init,
+ parent,
+ x,
+ y,
+ width,
+ height);
+}
+
+#else
+
+EAPI Ecore_Evas *
+ecore_evas_software_gdi_new(Ecore_Win32_Window *parent __UNUSED__,
+ int x __UNUSED__,
+ int y __UNUSED__,
+ int width __UNUSED__,
+ int height __UNUSED__)
+{
+ return NULL;
+}
+
+#endif /* ! BUILD_ECORE_EVAS_SOFTWARE_GDI */
+
#ifdef BUILD_ECORE_EVAS_SOFTWARE_DDRAW
EAPI Ecore_Evas *
diff --git a/src/lib/ecore_evas/ecore_evas_wince.c b/src/lib/ecore_evas/ecore_evas_wince.c
index eb217c7..66d6a60 100644
--- a/src/lib/ecore_evas/ecore_evas_wince.c
+++ b/src/lib/ecore_evas/ecore_evas_wince.c
@@ -23,7 +23,7 @@
#ifdef BUILD_ECORE_EVAS_SOFTWARE_16_WINCE
-#define ECORE_EVAS_EVENT_COUNT 12
+#define ECORE_EVAS_EVENT_COUNT 7
static int _ecore_evas_init_count = 0;
static int _ecore_evas_fps_debug = 0;
@@ -33,16 +33,6 @@ static Ecore_Idle_Enterer *ecore_evas_idle_enterer = NULL;
static Ecore_Evas *ecore_evases = NULL;
static Eina_Hash *ecore_evases_hash = NULL;
-static int _ecore_evas_wince_event_key_down(void *data __UNUSED__, int type __UNUSED__, void *event);
-
-static int _ecore_evas_wince_event_key_up(void *data __UNUSED__, int type __UNUSED__, void *event);
-
-static int _ecore_evas_wince_event_mouse_button_down(void *data __UNUSED__, int type __UNUSED__, void *event);
-
-static int _ecore_evas_wince_event_mouse_button_up(void *data __UNUSED__, int type __UNUSED__, void *event);
-
-static int _ecore_evas_wince_event_mouse_move(void *data __UNUSED__, int type __UNUSED__, void *event);
-
static int _ecore_evas_wince_event_mouse_in(void *data __UNUSED__, int type __UNUSED__, void *event);
static int _ecore_evas_wince_event_mouse_out(void *data __UNUSED__, int type __UNUSED__, void *event);
@@ -139,21 +129,17 @@ _ecore_evas_wince_init(void)
ecore_evas_idle_enterer = ecore_idle_enterer_add(_ecore_evas_wince_idle_enter, NULL);
- ecore_evas_event_handlers[0] = ecore_event_handler_add(ECORE_WINCE_EVENT_KEY_DOWN, _ecore_evas_wince_event_key_down, NULL);
- ecore_evas_event_handlers[1] = ecore_event_handler_add(ECORE_WINCE_EVENT_KEY_UP, _ecore_evas_wince_event_key_up, NULL);
- ecore_evas_event_handlers[2] = ecore_event_handler_add(ECORE_WINCE_EVENT_MOUSE_BUTTON_DOWN, _ecore_evas_wince_event_mouse_button_down, NULL);
- ecore_evas_event_handlers[3] = ecore_event_handler_add(ECORE_WINCE_EVENT_MOUSE_BUTTON_UP, _ecore_evas_wince_event_mouse_button_up, NULL);
- ecore_evas_event_handlers[4] = ecore_event_handler_add(ECORE_WINCE_EVENT_MOUSE_MOVE, _ecore_evas_wince_event_mouse_move, NULL);
- ecore_evas_event_handlers[5] = ecore_event_handler_add(ECORE_WINCE_EVENT_MOUSE_IN, _ecore_evas_wince_event_mouse_in, NULL);
- ecore_evas_event_handlers[6] = ecore_event_handler_add(ECORE_WINCE_EVENT_MOUSE_OUT, _ecore_evas_wince_event_mouse_out, NULL);
- ecore_evas_event_handlers[7] = ecore_event_handler_add(ECORE_WINCE_EVENT_WINDOW_DAMAGE, _ecore_evas_wince_event_window_damage, NULL);
- ecore_evas_event_handlers[8] = ecore_event_handler_add(ECORE_WINCE_EVENT_WINDOW_DESTROY, _ecore_evas_wince_event_window_destroy, NULL);
- ecore_evas_event_handlers[9] = ecore_event_handler_add(ECORE_WINCE_EVENT_WINDOW_SHOW, _ecore_evas_wince_event_window_show, NULL);
- ecore_evas_event_handlers[10] = ecore_event_handler_add(ECORE_WINCE_EVENT_WINDOW_HIDE, _ecore_evas_wince_event_window_hide, NULL);
- ecore_evas_event_handlers[11] = ecore_event_handler_add(ECORE_WINCE_EVENT_WINDOW_DELETE_REQUEST, _ecore_evas_wince_event_window_delete_request, NULL);
+ ecore_evas_event_handlers[0] = ecore_event_handler_add(ECORE_WINCE_EVENT_MOUSE_IN, _ecore_evas_wince_event_mouse_in, NULL);
+ ecore_evas_event_handlers[1] = ecore_event_handler_add(ECORE_WINCE_EVENT_MOUSE_OUT, _ecore_evas_wince_event_mouse_out, NULL);
+ ecore_evas_event_handlers[2] = ecore_event_handler_add(ECORE_WINCE_EVENT_WINDOW_DAMAGE, _ecore_evas_wince_event_window_damage, NULL);
+ ecore_evas_event_handlers[3] = ecore_event_handler_add(ECORE_WINCE_EVENT_WINDOW_DESTROY, _ecore_evas_wince_event_window_destroy, NULL);
+ ecore_evas_event_handlers[4] = ecore_event_handler_add(ECORE_WINCE_EVENT_WINDOW_SHOW, _ecore_evas_wince_event_window_show, NULL);
+ ecore_evas_event_handlers[5] = ecore_event_handler_add(ECORE_WINCE_EVENT_WINDOW_HIDE, _ecore_evas_wince_event_window_hide, NULL);
+ ecore_evas_event_handlers[6] = ecore_event_handler_add(ECORE_WINCE_EVENT_WINDOW_DELETE_REQUEST, _ecore_evas_wince_event_window_delete_request, NULL);
if (_ecore_evas_fps_debug) _ecore_evas_fps_debug_init();
+ ecore_event_evas_init();
return _ecore_evas_init_count;
}
@@ -171,6 +157,7 @@ _ecore_evas_wince_shutdown(void)
ecore_idle_enterer_del(ecore_evas_idle_enterer);
ecore_evas_idle_enterer = NULL;
if (_ecore_evas_fps_debug) _ecore_evas_fps_debug_shutdown();
+ ecore_event_evas_shutdown();
}
if (_ecore_evas_init_count < 0) _ecore_evas_init_count = 0;
@@ -178,140 +165,6 @@ _ecore_evas_wince_shutdown(void)
return _ecore_evas_init_count;
}
-static char *
-_ecore_evas_wince_winid_str_get(Ecore_WinCE_Window *window)
-{
- static char id[9];
- const char *vals = "qWeRtYuIoP5-$&<~";
- unsigned int val;
-
- val = (unsigned int)window;
- id[0] = vals[(val >> 28) & 0xf];
- id[1] = vals[(val >> 24) & 0xf];
- id[2] = vals[(val >> 20) & 0xf];
- id[3] = vals[(val >> 16) & 0xf];
- id[4] = vals[(val >> 12) & 0xf];
- id[5] = vals[(val >> 8) & 0xf];
- id[6] = vals[(val >> 4) & 0xf];
- id[7] = vals[(val ) & 0xf];
- id[8] = 0;
-
- return id;
-}
-
-static Ecore_Evas *
-_ecore_evas_wince_match(Ecore_WinCE_Window *window)
-{
- Ecore_Evas *ee;
-
- ee = eina_hash_find(ecore_evases_hash, _ecore_evas_wince_winid_str_get(window));
-
- return ee;
-}
-
-static int
-_ecore_evas_wince_event_key_down(void *data __UNUSED__, int type __UNUSED__, void *event)
-{
- Ecore_Evas *ee;
- Ecore_WinCE_Event_Key_Down *e;
-
- e = event;
-
- EINA_ERROR_PINFO("key down (%f %s %s %s)\n", e->time, e->keyname, e->keysymbol, e->keycompose);
-
- ee = _ecore_evas_wince_match(e->window);
- if ((!ee) || (ee->ignore_events)) return 1; /* pass on event */
- /* FIXME to do */
-/* _ecore_evas_x_modifier_locks_update(ee, e->modifiers); */
- evas_event_feed_key_down(ee->evas, e->keyname, e->keysymbol, e->keycompose, NULL, e->time, NULL);
-
- return 1;
-}
-
-static int
-_ecore_evas_wince_event_key_up(void *data __UNUSED__, int type __UNUSED__, void *event)
-{
- Ecore_Evas *ee;
- Ecore_WinCE_Event_Key_Up *e;
-
- e = event;
-
- EINA_ERROR_PINFO("key up (%f %s %s %s)\n", e->time, e->keyname, e->keysymbol, e->keycompose);
-
- ee = _ecore_evas_wince_match(e->window);
- if ((!ee) || (ee->ignore_events)) return 1; /* pass on event */
- /* FIXME to do */
-/* _ecore_evas_x_modifier_locks_update(ee, e->modifiers); */
- evas_event_feed_key_up(ee->evas, e->keyname, e->keysymbol, e->keycompose, NULL, e->time, NULL);
-
- return 1;
-}
-
-static int
-_ecore_evas_wince_event_mouse_button_down(void *data __UNUSED__, int type __UNUSED__, void *event)
-{
- Ecore_Evas *ee;
- Ecore_WinCE_Event_Mouse_Button_Down *e;
- Evas_Button_Flags flags = EVAS_BUTTON_NONE;
-
- e = event;
-
- EINA_ERROR_PINFO("mouse button down (%f %dx%d)\n", e->time, e->x, e->y);
-
- ee = _ecore_evas_wince_match(e->window);
- if ((!ee) || (ee->ignore_events)) return 1; /* pass on event */
- if (e->window != ee->engine.wince.window) return 1;
- /* FIXME to do */
-/* _ecore_evas_x_modifier_locks_update(ee, e->modifiers); */
- if (e->double_click) flags |= EVAS_BUTTON_DOUBLE_CLICK;
- if (e->triple_click) flags |= EVAS_BUTTON_TRIPLE_CLICK;
- evas_event_feed_mouse_down(ee->evas, e->button, flags, e->time, NULL);
-
- return 1;
-}
-
-static int
-_ecore_evas_wince_event_mouse_button_up(void *data __UNUSED__, int type __UNUSED__, void *event)
-{
- Ecore_Evas *ee;
- Ecore_WinCE_Event_Mouse_Button_Up *e;
- Evas_Button_Flags flags = EVAS_BUTTON_NONE;
-
- e = event;
-
- EINA_ERROR_PINFO("mouse button up (%f %dx%d)\n", e->time, e->x, e->y);
-
- ee = _ecore_evas_wince_match(e->window);
- if ((!ee) || (ee->ignore_events)) return 1; /* pass on event */
- if (e->window != ee->engine.wince.window) return 1;
- /* FIXME to do */
-/* _ecore_evas_x_modifier_locks_update(ee, e->modifiers); */
- if (e->double_click) flags |= EVAS_BUTTON_DOUBLE_CLICK;
- if (e->triple_click) flags |= EVAS_BUTTON_TRIPLE_CLICK;
- evas_event_feed_mouse_up(ee->evas, e->button, flags, e->time, NULL);
-
- return 1;
-}
-
-static int
-_ecore_evas_wince_event_mouse_move(void *data __UNUSED__, int type __UNUSED__, void *event)
-{
- Ecore_Evas *ee;
- Ecore_WinCE_Event_Mouse_Move *e;
-
- EINA_ERROR_PINFO("mouse move\n");
-
- e = event;
- ee = _ecore_evas_wince_match(e->window);
- if ((!ee) || (ee->ignore_events)) return 1; /* pass on event */
- if (e->window != ee->engine.wince.window) return 1;
- /* FIXME to do */
-/* _ecore_evas_x_modifier_locks_update(ee, e->modifiers); */
- _ecore_evas_mouse_move_process(ee, e->x, e->y, e->time);
-
- return 1;
-}
-
static int
_ecore_evas_wince_event_mouse_in(void *data __UNUSED__, int type __UNUSED__, void *event)
{
@@ -321,9 +174,9 @@ _ecore_evas_wince_event_mouse_in(void *data __UNUSED__, int type __UNUSED__, voi
EINA_ERROR_PINFO("mouse in\n");
e = event;
- ee = _ecore_evas_wince_match(e->window);
+ ee = ecore_event_window_match((Ecore_Window)e->window);
if ((!ee) || (ee->ignore_events)) return 1; /* pass on event */
- if (e->window != ee->engine.wince.window) return 1;
+ if (e->window != (Ecore_WinCE_Window *)ee->prop.window) return 1;
if (ee->func.fn_mouse_in) ee->func.fn_mouse_in(ee);
/* FIXME to do */
@@ -343,9 +196,9 @@ _ecore_evas_wince_event_mouse_out(void *data __UNUSED__, int type __UNUSED__, vo
EINA_ERROR_PINFO("mouse out\n");
e = event;
- ee = _ecore_evas_wince_match(e->window);
+ ee = ecore_event_window_match((Ecore_Window)e->window);
if ((!ee) || (ee->ignore_events)) return 1; /* pass on event */
- if (e->window != ee->engine.wince.window) return 1;
+ if (e->window != (Ecore_WinCE_Window *)ee->prop.window) return 1;
/* FIXME to do */
/* _ecore_evas_x_modifier_locks_update(ee, e->modifiers); */
@@ -367,9 +220,9 @@ _ecore_evas_wince_event_window_damage(void *data __UNUSED__, int type __UNUSED__
EINA_ERROR_PINFO("window damage\n");
e = event;
- ee = _ecore_evas_wince_match(e->window);
+ ee = ecore_event_window_match((Ecore_Window)e->window);
if (!ee) return 1; /* pass on event */
- if (e->window != ee->engine.wince.window) return 1;
+ if (e->window != (Ecore_WinCE_Window *)ee->prop.window) return 1;
if (ee->prop.avoid_damage)
{
@@ -415,9 +268,9 @@ _ecore_evas_wince_event_window_destroy(void *data __UNUSED__, int type __UNUSED_
EINA_ERROR_PINFO("window destroy\n");
e = event;
- ee = _ecore_evas_wince_match(e->window);
+ ee = ecore_event_window_match((Ecore_Window)e->window);
if (!ee) return 1; /* pass on event */
- if (e->window != ee->engine.wince.window) return 1;
+ if (e->window != (Ecore_WinCE_Window *)ee->prop.window) return 1;
if (ee->func.fn_destroy) ee->func.fn_destroy(ee);
ecore_evas_free(ee);
@@ -433,9 +286,9 @@ _ecore_evas_wince_event_window_show(void *data __UNUSED__, int type __UNUSED__,
EINA_ERROR_PINFO("window show\n");
e = event;
- ee = _ecore_evas_wince_match(e->window);
+ ee = ecore_event_window_match((Ecore_Window)e->window);
if (!ee) return 1; /* pass on event */
- if (e->window != ee->engine.wince.window) return 1;
+ if (e->window != (Ecore_WinCE_Window *)ee->prop.window) return 1;
if (ee->visible) return 0; /* dont pass it on */
ee->visible = 1;
if (ee->func.fn_show) ee->func.fn_show(ee);
@@ -452,9 +305,9 @@ _ecore_evas_wince_event_window_hide(void *data __UNUSED__, int type __UNUSED__,
EINA_ERROR_PINFO("window hide\n");
e = event;
- ee = _ecore_evas_wince_match(e->window);
+ ee = ecore_event_window_match((Ecore_Window)e->window);
if (!ee) return 1; /* pass on event */
- if (e->window != ee->engine.wince.window) return 1;
+ if (e->window != (Ecore_WinCE_Window *)ee->prop.window) return 1;
if (!ee->visible) return 0; /* dont pass it on */
ee->visible = 0;
if (ee->func.fn_hide) ee->func.fn_hide(ee);
@@ -471,9 +324,9 @@ _ecore_evas_wince_event_window_delete_request(void *data __UNUSED__, int type __
EINA_ERROR_PINFO("window delete request\n");
e = event;
- ee = _ecore_evas_wince_match(e->window);
+ ee = ecore_event_window_match((Ecore_Window)e->window);
if (!ee) return 1; /* pass on event */
- if (e->window != ee->engine.wince.window) return 1;
+ if (e->window != (Ecore_WinCE_Window *)ee->prop.window) return 1;
if (ee->func.fn_delete_request) ee->func.fn_delete_request(ee);
return 1;
@@ -487,8 +340,8 @@ _ecore_evas_wince_free(Ecore_Evas *ee)
{
EINA_ERROR_PINFO("ecore evas free\n");
- ecore_wince_window_free(ee->engine.wince.window);
- eina_hash_del(ecore_evases_hash, _ecore_evas_wince_winid_str_get(ee->engine.wince.window), ee);
+ ecore_wince_window_free((Ecore_WinCE_Window *)ee->prop.window);
+ ecore_event_window_unregister(ee->prop.window);
ecore_evases = _ecore_list2_remove(ecore_evases, ee);
_ecore_evas_wince_shutdown();
ecore_wince_shutdown();
@@ -510,7 +363,7 @@ _ecore_evas_wince_move(Ecore_Evas *ee, int x, int y)
{
ee->x = x;
ee->y = y;
- ecore_wince_window_move(ee->engine.wince.window, x, y);
+ ecore_wince_window_move((Ecore_WinCE_Window *)ee->prop.window, x, y);
if (ee->func.fn_move) ee->func.fn_move(ee);
}
}
@@ -524,7 +377,7 @@ _ecore_evas_wince_resize(Ecore_Evas *ee, int width, int height)
{
ee->w = width;
ee->h = height;
- ecore_wince_window_resize(ee->engine.wince.window, width, height);
+ ecore_wince_window_resize((Ecore_WinCE_Window *)ee->prop.window, width, height);
if ((ee->rotation == 90) || (ee->rotation == 270))
{
evas_output_size_set(ee->evas, ee->h, ee->w);
@@ -558,7 +411,7 @@ _ecore_evas_wince_move_resize(Ecore_Evas *ee, int x, int y, int width, int heigh
ee->y = y;
ee->w = width;
ee->h = height;
- ecore_wince_window_move_resize(ee->engine.wince.window, x, y, width, height);
+ ecore_wince_window_move_resize((Ecore_WinCE_Window *)ee->prop.window, x, y, width, height);
if ((ee->rotation == 90) || (ee->rotation == 270))
{
evas_output_size_set(ee->evas, ee->h, ee->w);
@@ -603,7 +456,7 @@ _ecore_evas_wince_move_resize(Ecore_Evas *ee, int x, int y, int width, int heigh
/* evas_engine_info_set(ee->evas, (Evas_Engine_Info *)einfo); */
/* if (!ee->prop.fullscreen) */
/* { */
-/* ecore_wince_window_resize(ee->engine.wince.window, ee->h, ee->w); */
+/* ecore_wince_window_resize(ee->prop.window, ee->h, ee->w); */
/* ee->expecting_resize.w = ee->h; */
/* ee->expecting_resize.h = ee->w; */
/* } */
@@ -611,8 +464,8 @@ _ecore_evas_wince_move_resize(Ecore_Evas *ee, int x, int y, int width, int heigh
/* { */
/* int w, h; */
-/* ecore_wince_window_size_get(ee->engine.wince.window, &w, &h); */
-/* ecore_wince_window_resize(ee->engine.wince.window, h, w); */
+/* ecore_wince_window_size_get(ee->prop.window, &w, &h); */
+/* ecore_wince_window_resize(ee->prop.window, h, w); */
/* if ((rotation == 0) || (rotation == 180)) */
/* { */
/* evas_output_size_set(ee->evas, ee->w, ee->h); */
@@ -661,9 +514,9 @@ _ecore_evas_wince_show(Ecore_Evas *ee)
ee->should_be_visible = 1;
if (ee->prop.avoid_damage)
_ecore_evas_wince_render(ee);
- ecore_wince_window_show(ee->engine.wince.window);
+ ecore_wince_window_show((Ecore_WinCE_Window *)ee->prop.window);
/* if (ee->prop.fullscreen) */
-/* ecore_wince_window_focus(ee->engine.wince.window); */
+/* ecore_wince_window_focus(ee->prop.window); */
}
static void
@@ -671,7 +524,7 @@ _ecore_evas_wince_hide(Ecore_Evas *ee)
{
EINA_ERROR_PINFO("ecore evas hide\n");
- ecore_wince_window_hide(ee->engine.wince.window);
+ ecore_wince_window_hide((Ecore_WinCE_Window *)ee->prop.window);
ee->should_be_visible = 0;
}
@@ -679,18 +532,18 @@ _ecore_evas_wince_hide(Ecore_Evas *ee)
/* _ecore_evas_wince_raise(Ecore_Evas *ee) */
/* { */
/* if (!ee->prop.fullscreen) */
-/* ecore_wince_window_raise(ee->engine.wince.window); */
+/* ecore_wince_window_raise(ee->prop.window); */
/* else */
-/* ecore_wince_window_raise(ee->engine.wince.window); */
+/* ecore_wince_window_raise(ee->prop.window); */
/* } */
/* static void */
/* _ecore_evas_wince_lower(Ecore_Evas *ee) */
/* { */
/* if (!ee->prop.fullscreen) */
-/* ecore_wince_window_lower(ee->engine.wince.window); */
+/* ecore_wince_window_lower(ee->prop.window); */
/* else */
-/* ecore_wince_window_lower(ee->engine.wince.window); */
+/* ecore_wince_window_lower(ee->prop.window); */
/* } */
static void
@@ -701,7 +554,7 @@ _ecore_evas_wince_title_set(Ecore_Evas *ee, const char *title)
if (ee->prop.title) free(ee->prop.title);
ee->prop.title = NULL;
if (title) ee->prop.title = strdup(title);
- ecore_wince_window_title_set(ee->engine.wince.window, ee->prop.title);
+ ecore_wince_window_title_set((Ecore_WinCE_Window *)ee->prop.window, ee->prop.title);
}
/* static void */
@@ -712,7 +565,7 @@ _ecore_evas_wince_title_set(Ecore_Evas *ee, const char *title)
/* if ((ee->prop.min.w == width) && (ee->prop.min.h == height)) return; */
/* ee->prop.min.w = width; */
/* ee->prop.min.h = height; */
-/* ecore_wince_window_size_min_set(ee->engine.wince.window, width, height); */
+/* ecore_wince_window_size_min_set(ee->prop.window, width, height); */
/* } */
/* static void */
@@ -723,7 +576,7 @@ _ecore_evas_wince_title_set(Ecore_Evas *ee, const char *title)
/* if ((ee->prop.max.w == width) && (ee->prop.max.h == height)) return; */
/* ee->prop.max.w = width; */
/* ee->prop.max.h = height; */
-/* ecore_wince_window_size_max_set(ee->engine.wince.window, width, height); */
+/* ecore_wince_window_size_max_set(ee->prop.window, width, height); */
/* } */
/* static void */
@@ -734,7 +587,7 @@ _ecore_evas_wince_title_set(Ecore_Evas *ee, const char *title)
/* if ((ee->prop.base.w == width) && (ee->prop.base.h == height)) return; */
/* ee->prop.base.w = width; */
/* ee->prop.base.h = height; */
-/* ecore_wince_window_size_base_set(ee->engine.wince.window, width, height); */
+/* ecore_wince_window_size_base_set(ee->prop.window, width, height); */
/* } */
/* static void */
@@ -745,7 +598,7 @@ _ecore_evas_wince_title_set(Ecore_Evas *ee, const char *title)
/* if ((ee->prop.step.w == width) && (ee->prop.step.h == height)) return; */
/* ee->prop.step.w = width; */
/* ee->prop.step.h = height; */
-/* ecore_wince_window_size_step_set(ee->engine.wince.window, width, height); */
+/* ecore_wince_window_size_step_set(ee->prop.window, width, height); */
/* } */
static void
@@ -762,7 +615,7 @@ _ecore_evas_wince_cursor_set(Ecore_Evas *ee, Evas_Object *obj, int layer, int ho
ee->prop.cursor.layer = 0;
ee->prop.cursor.hot.x = 0;
ee->prop.cursor.hot.y = 0;
- ecore_wince_window_cursor_show(ee->engine.wince.window, 1);
+ ecore_wince_window_cursor_show(ee->prop.window, 1);
return;
}
@@ -771,7 +624,7 @@ _ecore_evas_wince_cursor_set(Ecore_Evas *ee, Evas_Object *obj, int layer, int ho
ee->prop.cursor.hot.x = hot_x;
ee->prop.cursor.hot.y = hot_y;
- ecore_wince_window_cursor_show(ee->engine.wince.window, 0);
+ ecore_wince_window_cursor_show(ee->prop.window, 0);
evas_pointer_output_xy_get(ee->evas, &x, &y);
evas_object_layer_set(ee->prop.cursor.object, ee->prop.cursor.layer);
@@ -787,7 +640,7 @@ _ecore_evas_wince_cursor_set(Ecore_Evas *ee, Evas_Object *obj, int layer, int ho
/* static void */
/* _ecore_evas_wince_focus_set(Ecore_Evas *ee, int on __UNUSED__) */
/* { */
-/* ecore_wince_window_focus_set(ee->engine.wince.window); */
+/* ecore_wince_window_focus_set(ee->prop.window); */
/* } */
/* static void */
@@ -796,7 +649,7 @@ _ecore_evas_wince_cursor_set(Ecore_Evas *ee, Evas_Object *obj, int layer, int ho
/* /\* if (((ee->prop.borderless) && (on)) || *\/ */
/* /\* ((!ee->prop.borderless) && (!on))) return; *\/ */
/* ee->prop.iconified = on; */
-/* ecore_wince_window_iconified_set(ee->engine.wince.window, ee->prop.iconified); */
+/* ecore_wince_window_iconified_set(ee->prop.window, ee->prop.iconified); */
/* } */
/* static void */
@@ -805,7 +658,7 @@ _ecore_evas_wince_cursor_set(Ecore_Evas *ee, Evas_Object *obj, int layer, int ho
/* if (((ee->prop.borderless) && (on)) || */
/* ((!ee->prop.borderless) && (!on))) return; */
/* ee->prop.borderless = on; */
-/* ecore_wince_window_borderless_set(ee->engine.wince.window, ee->prop.borderless); */
+/* ecore_wince_window_borderless_set(ee->prop.window, ee->prop.borderless); */
/* } */
static void
@@ -823,12 +676,12 @@ _ecore_evas_wince_fullscreen_set(Ecore_Evas *ee, int on)
ee->engine.wince.state.fullscreen = on;
ee->prop.fullscreen = on;
- window = (struct _Ecore_WinCE_Window *)ee->engine.wince.window;
+ window = (struct _Ecore_WinCE_Window *)ee->prop.window;
if (on != 0)
{
/* ecore_win32_window_shape_set(ee->engine.win32.window, 0, 0, NULL); */
- ecore_wince_window_fullscreen_set(ee->engine.wince.window, on);
+ ecore_wince_window_fullscreen_set((Ecore_WinCE_Window *)ee->prop.window, on);
ee->w = GetSystemMetrics(SM_CXSCREEN);
ee->h = GetSystemMetrics(SM_CYSCREEN);
evas_output_size_set(ee->evas, ee->w, ee->h);
@@ -839,8 +692,8 @@ _ecore_evas_wince_fullscreen_set(Ecore_Evas *ee, int on)
int w;
int h;
- ecore_wince_window_fullscreen_set(ee->engine.wince.window, on);
- ecore_wince_window_size_get(ee->engine.wince.window, &w, &h);
+ ecore_wince_window_fullscreen_set((Ecore_WinCE_Window *)ee->prop.window, on);
+ ecore_wince_window_size_get((Ecore_WinCE_Window *)ee->prop.window, &w, &h);
ee->w = w;
ee->h = h;
evas_output_size_set(ee->evas, ee->w, ee->h);
@@ -860,14 +713,6 @@ _ecore_evas_wince_fullscreen_set(Ecore_Evas *ee, int on)
}
}
-static void *
-_ecore_evas_wince_window_get(const Ecore_Evas *ee)
-{
- EINA_ERROR_PINFO("ecore evas window get\n");
-
- return ee->engine.wince.window;
-}
-
static const Ecore_Evas_Engine_Func _ecore_wince_engine_func =
{
_ecore_evas_wince_free,
@@ -914,8 +759,7 @@ static const Ecore_Evas_Engine_Func _ecore_wince_engine_func =
NULL, /* _ecore_evas_x_withdrawn_set */
NULL, /* _ecore_evas_x_sticky_set */
NULL, /* _ecore_evas_x_ignore_events_set */
- NULL, /* _ecore_evas_x_alpha_set */
- _ecore_evas_wince_window_get
+ NULL /* _ecore_evas_x_alpha_set */
};
/* API */
@@ -974,8 +818,8 @@ ecore_evas_software_wince_new_internal(int backend,
ee->prop.sticky = 0;
/* FIXME: sticky to add */
- ee->engine.wince.window = ecore_wince_window_new(parent, x, y, width, height);
- if (!ee->engine.wince.window)
+ ee->prop.window = (Ecore_Window)ecore_wince_window_new((Ecore_WinCE_Window *)parent, x, y, width, height);
+ if (!ee->prop.window)
{
_ecore_evas_wince_shutdown();
free(ee);
@@ -983,7 +827,7 @@ ecore_evas_software_wince_new_internal(int backend,
return NULL;
}
- ecore_wince_window_fullscreen_set(ee->engine.wince.window, fullscreen);
+ ecore_wince_window_fullscreen_set((Ecore_WinCE_Window *)ee->prop.window, fullscreen);
/* init evas here */
ee->evas = evas_new();
@@ -996,7 +840,7 @@ ecore_evas_software_wince_new_internal(int backend,
if (einfo)
{
/* FIXME: REDRAW_DEBUG missing for now */
- einfo->info.window = ((struct _Ecore_WinCE_Window *)ee->engine.wince.window)->window;
+ einfo->info.window = ((struct _Ecore_WinCE_Window *)ee->prop.window)->window;
einfo->info.width = width;
einfo->info.height = height;
einfo->info.backend = backend;
@@ -1004,25 +848,13 @@ ecore_evas_software_wince_new_internal(int backend,
einfo->info.fullscreen = fullscreen;
evas_engine_info_set(ee->evas, (Evas_Engine_Info *)einfo);
- ecore_wince_window_backend_set(ee->engine.wince.window, backend);
- ecore_wince_window_suspend_set(ee->engine.wince.window, einfo->func.suspend);
- ecore_wince_window_resume_set(ee->engine.wince.window, einfo->func.resume);
+ ecore_wince_window_backend_set((Ecore_WinCE_Window *)ee->prop.window, backend);
+ ecore_wince_window_suspend_set((Ecore_WinCE_Window *)ee->prop.window, einfo->func.suspend);
+ ecore_wince_window_resume_set((Ecore_WinCE_Window *)ee->prop.window, einfo->func.resume);
}
- evas_key_modifier_add(ee->evas, "Shift");
- evas_key_modifier_add(ee->evas, "Control");
- evas_key_modifier_add(ee->evas, "Alt");
- evas_key_modifier_add(ee->evas, "Meta");
- evas_key_modifier_add(ee->evas, "Hyper");
- evas_key_modifier_add(ee->evas, "Super");
- evas_key_lock_add(ee->evas, "Caps_Lock");
- evas_key_lock_add(ee->evas, "Num_Lock");
- evas_key_lock_add(ee->evas, "Scroll_Lock");
-
ecore_evases = _ecore_list2_prepend(ecore_evases, ee);
- if (!ecore_evases_hash)
- ecore_evases_hash = eina_hash_string_superfast_new(NULL);
- eina_hash_add(ecore_evases_hash, _ecore_evas_wince_winid_str_get(ee->engine.wince.window), ee);
+ ecore_event_window_register(ee->prop.window, ee, ee->evas, (Ecore_Event_Mouse_Move_Cb)_ecore_evas_mouse_move_process);
return ee;
}
@@ -1099,7 +931,7 @@ ecore_evas_software_wince_gdi_new(Ecore_WinCE_Window *parent,
EAPI Ecore_WinCE_Window *
ecore_evas_software_wince_window_get(const Ecore_Evas *ee)
{
- return (Ecore_WinCE_Window *) _ecore_evas_wince_window_get(ee);
+ return (Ecore_WinCE_Window *) ecore_evas_window_get(ee);
}
#else
diff --git a/src/lib/ecore_evas/ecore_evas_x.c b/src/lib/ecore_evas/ecore_evas_x.c
index 0462e4c..7fe922c 100644
--- a/src/lib/ecore_evas/ecore_evas_x.c
+++ b/src/lib/ecore_evas/ecore_evas_x.c
@@ -176,47 +176,44 @@ _ecore_evas_x_render(Ecore_Evas *ee)
}
else
{
-#ifdef HAVE_ECORE_X_XCB
-#warning [XCB] No Region code
-#else
EINA_LIST_FOREACH(updates, l, r)
{
- XRectangle xr;
- Region tmpr;
+ Ecore_X_Rectangle rect;
+ Ecore_X_XRegion *tmpr;
if (!ee->engine.x.damages)
- ee->engine.x.damages = XCreateRegion();
- tmpr = XCreateRegion();
+ ee->engine.x.damages = ecore_x_xregion_new();
+ tmpr = ecore_x_xregion_new();
if (ee->rotation == 0)
{
- xr.x = r->x;
- xr.y = r->y;
- xr.width = r->w;
- xr.height = r->h;
+ rect.x = r->x;
+ rect.y = r->y;
+ rect.width = r->w;
+ rect.height = r->h;
}
else if (ee->rotation == 90)
{
- xr.x = r->y;
- xr.y = ee->h - r->x - r->w;
- xr.width = r->h;
- xr.height = r->w;
+ rect.x = r->y;
+ rect.y = ee->h - r->x - r->w;
+ rect.width = r->h;
+ rect.height = r->w;
}
else if (ee->rotation == 180)
{
- xr.x = ee->w - r->x - r->w;
- xr.y = ee->h - r->y - r->h;
- xr.width = r->w;
- xr.height = r->h;
+ rect.x = ee->w - r->x - r->w;
+ rect.y = ee->h - r->y - r->h;
+ rect.width = r->w;
+ rect.height = r->h;
}
else if (ee->rotation == 270)
{
- xr.x = ee->w - r->y - r->h;
- xr.y = r->x;
- xr.width = r->h;
- xr.height = r->w;
+ rect.x = ee->w - r->y - r->h;
+ rect.y = r->x;
+ rect.width = r->h;
+ rect.height = r->w;
}
- XUnionRectWithRegion(&xr, ee->engine.x.damages, tmpr);
- XDestroyRegion(ee->engine.x.damages);
+ ecore_x_xregion_union_rect(tmpr, ee->engine.x.damages, &rect);
+ ecore_x_xregion_free(ee->engine.x.damages);
ee->engine.x.damages = tmpr;
}
if (ee->engine.x.damages)
@@ -256,7 +253,7 @@ _ecore_evas_x_render(Ecore_Evas *ee)
ECORE_X_EVENT_MASK_WINDOW_PROPERTY |
ECORE_X_EVENT_MASK_WINDOW_COLORMAP
);
- XSetRegion(ecore_x_display_get(), ee->engine.x.gc, ee->engine.x.damages);
+ ecore_x_xregion_set(ee->engine.x.damages, ee->engine.x.gc);
/* debug rendering */
/*
XSetForeground(ecore_x_display_get(), ee->engine.x.gc, rand());
@@ -268,10 +265,9 @@ _ecore_evas_x_render(Ecore_Evas *ee)
*/
ecore_x_pixmap_paste(ee->engine.x.pmap, ee->prop.window, ee->engine.x.gc,
0, 0, ee->w, ee->h, 0, 0);
- XDestroyRegion(ee->engine.x.damages);
- ee->engine.x.damages = 0;
+ ecore_x_xregion_free(ee->engine.x.damages);
+ ee->engine.x.damages = NULL;
}
-#endif /* HAVE_ECORE_X_XCB */
if (updates)
{
evas_render_updates_free(updates);
@@ -327,28 +323,16 @@ _ecore_evas_x_resize_shape(Ecore_Evas *ee)
{
unsigned int foreground;
Ecore_X_GC gc;
-# ifdef BUILD_ECORE_EVAS_SOFTWARE_XCB
- xcb_rectangle_t rectangle;
-# endif /* BUILD_ECORE_EVAS_SOFTWARE_XCB */
- if (ee->engine.x.mask) ecore_x_pixmap_del(ee->engine.x.mask);
+ if (ee->engine.x.mask) ecore_x_pixmap_free(ee->engine.x.mask);
ee->engine.x.mask = ecore_x_pixmap_new(ee->prop.window, ee->w, ee->h, 1);
foreground = 0;
gc = ecore_x_gc_new(ee->engine.x.mask,
ECORE_X_GC_VALUE_MASK_FOREGROUND,
&foreground);
-# ifdef BUILD_ECORE_EVAS_SOFTWARE_XCB
- rectangle.x = 0;
- rectangle.y = 0;
- rectangle.width = ee->w;
- rectangle.height = ee->h;
- xcb_poly_fill_rectangle(ecore_x_connection_get(), ee->engine.x.mask, gc,
- 1, &rectangle);
-# else
- XFillRectangle(ecore_x_display_get(), ee->engine.x.mask, gc,
- 0, 0, ee->w, ee->h);
-# endif /* ! BUILD_ECORE_EVAS_SOFTWARE_XCB */
- ecore_x_gc_del(gc);
+ ecore_x_drawable_rectangle_fill(ee->engine.x.mask, gc,
+ 0, 0, ee->w, ee->h);
+ ecore_x_gc_free(gc);
einfo->info.mask = ee->engine.x.mask;
evas_engine_info_set(ee->evas, (Evas_Engine_Info *)einfo);
evas_damage_rectangle_add(ee->evas, 0, 0, ee->w, ee->h);
@@ -365,28 +349,16 @@ _ecore_evas_x_resize_shape(Ecore_Evas *ee)
{
unsigned int foreground;
Ecore_X_GC gc;
-# ifdef BUILD_ECORE_EVAS_XRENDER_XCB
- xcb_rectangle_t rectangle;
-# endif /* BUILD_ECORE_EVAS_XRENDER_XCB */
- if (ee->engine.x.mask) ecore_x_pixmap_del(ee->engine.x.mask);
+ if (ee->engine.x.mask) ecore_x_pixmap_free(ee->engine.x.mask);
ee->engine.x.mask = ecore_x_pixmap_new(ee->prop.window, ee->w, ee->h, 1);
foreground = 0;
ecore_x_gc_new(ee->engine.x.mask,
ECORE_X_GC_VALUE_MASK_FOREGROUND,
&foreground);
-# ifdef BUILD_ECORE_EVAS_XRENDER_XCB
- rectangle.x = 0;
- rectangle.y = 0;
- rectangle.width = ee->w;
- rectangle.height = ee->h;
- xcb_poly_fill_rectangle(ecore_x_connection_get(), ee->engine.x.mask, gc,
- 1, &rectangle);
-# else
- XFillRectangle(ecore_x_display_get(), ee->engine.x.mask, gc,
- 0, 0, ee->w, ee->h);
-# endif /* ! BUILD_ECORE_EVAS_XRENDER_XCB */
- ecore_x_gc_del(gc);
+ ecore_x_drawable_rectangle_fill(ee->engine.x.mask, gc,
+ 0, 0, ee->w, ee->h);
+ ecore_x_gc_free(gc);
einfo->info.mask = ee->engine.x.mask;
evas_engine_info_set(ee->evas, (Evas_Engine_Info *)einfo);
evas_damage_rectangle_add(ee->evas, 0, 0, ee->w, ee->h);
@@ -406,7 +378,7 @@ _ecore_evas_x_resize_shape(Ecore_Evas *ee)
GC gc;
XGCValues gcv;
- if (ee->engine.x.mask) ecore_x_pixmap_del(ee->engine.x.mask);
+ if (ee->engine.x.mask) ecore_x_pixmap_free(ee->engine.x.mask);
ee->engine.x.mask = ecore_x_pixmap_new(ee->prop.window, ee->w, ee->h, 1);
einfo->info.mask = ee->engine.x.mask;
evas_engine_info_set(ee->evas, (Evas_Engine_Info *)einfo);
@@ -687,37 +659,33 @@ _ecore_evas_x_event_window_damage(void *data __UNUSED__, int type __UNUSED__, vo
// printf("EXPOSE %p [%i] %i %i %ix%i\n", ee, ee->prop.avoid_damage, e->x, e->y, e->w, e->h);
if (ee->prop.avoid_damage)
{
-#ifdef HAVE_ECORE_X_XCB
-# warning [XCB] No Region code
-#else
- XRectangle xr;
- Region tmpr;
-
- if (!ee->engine.x.damages) ee->engine.x.damages = XCreateRegion();
- tmpr = XCreateRegion();
- xr.x = e->x;
- xr.y = e->y;
- xr.width = e->w;
- xr.height = e->h;
- XUnionRectWithRegion(&xr, ee->engine.x.damages, tmpr);
- XDestroyRegion(ee->engine.x.damages);
+ Ecore_X_Rectangle rect;
+ Ecore_X_XRegion *tmpr;
+
+ if (!ee->engine.x.damages) ee->engine.x.damages = ecore_x_xregion_new();
+ tmpr = ecore_x_xregion_new();
+ rect.x = e->x;
+ rect.y = e->y;
+ rect.width = e->w;
+ rect.height = e->h;
+ ecore_x_xregion_union_rect(tmpr, ee->engine.x.damages, &rect);
+ ecore_x_xregion_free(ee->engine.x.damages);
ee->engine.x.damages = tmpr;
/* no - this breaks things badly. disable. Ecore_X_Rectangle != XRectangle - see
* the typedefs in x's headers and ecore_x's. also same with Region - it's a pointer in x - not an X ID
Ecore_X_Rectangle rect;
- Ecore_X_Region tmpr;
+ Ecore_X_XRegion *tmpr;
- if (!ee->engine.x.damages) ee->engine.x.damages = XCreateRegion();
- tmpr = XCreateRegion();
+ if (!ee->engine.x.damages) ee->engine.x.damages = ecore_x_xregion_new();
+ tmpr = ecore_x_xregion_new();
rect.x = e->x;
rect.y = e->y;
rect.width = e->w;
rect.height = e->h;
- XUnionRectWithRegion(&rect, ee->engine.x.damages, tmpr);
- XDestroyRegion(ee->engine.x.damages);
+ ecore_x_xregion_union_rect(tmpr, ee->engine.x.damages, &rect);
+ ecore_x_xregion_free(ee->engine.x.damages);
ee->engine.x.damages = tmpr;
*/
-#endif /* ! HAVE_ECORE_X_XCB */
}
else
{
@@ -1085,22 +1053,14 @@ static void
_ecore_evas_x_free(Ecore_Evas *ee)
{
ecore_x_window_free(ee->prop.window);
- if (ee->engine.x.pmap) ecore_x_pixmap_del(ee->engine.x.pmap);
- if (ee->engine.x.mask) ecore_x_pixmap_del(ee->engine.x.mask);
- if (ee->engine.x.gc) ecore_x_gc_del(ee->engine.x.gc);
-#ifdef HAVE_ECORE_X_XCB
-# warning [XCB] No Region code
-#else
- if (ee->engine.x.damages) XDestroyRegion(ee->engine.x.damages);
-#endif /* ! HAVE_ECORE_X_XCB */
+ if (ee->engine.x.pmap) ecore_x_pixmap_free(ee->engine.x.pmap);
+ if (ee->engine.x.mask) ecore_x_pixmap_free(ee->engine.x.mask);
+ if (ee->engine.x.gc) ecore_x_gc_free(ee->engine.x.gc);
+ if (ee->engine.x.damages) ecore_x_xregion_free(ee->engine.x.damages);
ee->engine.x.pmap = 0;
ee->engine.x.mask = 0;
ee->engine.x.gc = 0;
-#ifdef HAVE_ECORE_X_XCB
-#warning [XCB] No Region code
-#else
- ee->engine.x.damages = 0;
-#endif /* ! HAVE_ECORE_X_XCB */
+ ee->engine.x.damages = NULL;
ecore_event_window_unregister(ee->prop.window);
while (ee->engine.x.win_extra)
{
@@ -1404,9 +1364,6 @@ _ecore_evas_x_shaped_set(Ecore_Evas *ee, int shaped)
{
unsigned int foreground;
Ecore_X_GC gc;
-# ifdef BUILD_ECORE_EVAS_SOFTWARE_XCB
- xcb_rectangle_t rectangle;
-# endif /* ! BUILD_ECORE_EVAS_SOFTWARE_XCB */
if (!ee->engine.x.mask)
ee->engine.x.mask = ecore_x_pixmap_new(ee->prop.window, ee->w, ee->h, 1);
@@ -1414,19 +1371,9 @@ _ecore_evas_x_shaped_set(Ecore_Evas *ee, int shaped)
gc = ecore_x_gc_new(ee->engine.x.mask,
ECORE_X_GC_VALUE_MASK_FOREGROUND,
&foreground);
-# ifdef BUILD_ECORE_EVAS_SOFTWARE_XCB
- rectangle.x = 0;
- rectangle.y = 0;
- rectangle.width = ee->w;
- rectangle.height = ee->h;
- xcb_poly_fill_rectangle(ecore_x_connection_get(),
- ee->engine.x.mask, gc,
- 1, &rectangle);
-# else
- XFillRectangle(ecore_x_display_get(), ee->engine.x.mask, gc,
- 0, 0, ee->w, ee->h);
-# endif /* ! BUILD_ECORE_EVAS_SOFTWARE_XCB */
- ecore_x_gc_del(gc);
+ ecore_x_drawable_rectangle_fill(ee->engine.x.mask, gc,
+ 0, 0, ee->w, ee->h);
+ ecore_x_gc_free(gc);
einfo->info.mask = ee->engine.x.mask;
evas_engine_info_set(ee->evas, (Evas_Engine_Info *)einfo);
evas_damage_rectangle_add(ee->evas, 0, 0, ee->w, ee->h);
@@ -1434,7 +1381,7 @@ _ecore_evas_x_shaped_set(Ecore_Evas *ee, int shaped)
}
else
{
- if (ee->engine.x.mask) ecore_x_pixmap_del(ee->engine.x.mask);
+ if (ee->engine.x.mask) ecore_x_pixmap_free(ee->engine.x.mask);
ee->engine.x.mask = 0;
einfo->info.mask = 0;
evas_engine_info_set(ee->evas, (Evas_Engine_Info *)einfo);
@@ -1457,9 +1404,6 @@ _ecore_evas_x_shaped_set(Ecore_Evas *ee, int shaped)
{
unsigned int foreground;
Ecore_X_GC gc;
-# ifdef BUILD_ECORE_EVAS_XRENDER_XCB
- xcb_rectangle_t rectangle;
-# endif /* ! BUILD_ECORE_EVAS_XRENDER_XCB */
if (!ee->engine.x.mask)
ee->engine.x.mask = ecore_x_pixmap_new(ee->prop.window, ee->w, ee->h, 1);
@@ -1467,19 +1411,9 @@ _ecore_evas_x_shaped_set(Ecore_Evas *ee, int shaped)
gc = ecore_x_gc_new(ee->engine.x.mask,
ECORE_X_GC_VALUE_MASK_FOREGROUND,
&foreground);
-# ifdef BUILD_ECORE_EVAS_XRENDER_XCB
- rectangle.x = 0;
- rectangle.y = 0;
- rectangle.width = ee->w;
- rectangle.height = ee->h;
- xcb_poly_fill_rectangle(ecore_x_connection_get(),
- ee->engine.x.mask, gc,
- 1, &rectangle);
-# else
- XFillRectangle(ecore_x_display_get(), ee->engine.x.mask, gc,
- 0, 0, ee->w, ee->h);
-# endif /* ! BUILD_ECORE_EVAS_XRENDER_XCB */
- ecore_x_gc_del(gc);
+ ecore_x_drawable_rectangle_fill(ee->engine.x.mask, gc,
+ 0, 0, ee->w, ee->h);
+ ecore_x_gc_free(gc);
einfo->info.mask = ee->engine.x.mask;
evas_engine_info_set(ee->evas, (Evas_Engine_Info *)einfo);
evas_damage_rectangle_add(ee->evas, 0, 0, ee->w, ee->h);
@@ -1487,7 +1421,7 @@ _ecore_evas_x_shaped_set(Ecore_Evas *ee, int shaped)
}
else
{
- if (ee->engine.x.mask) ecore_x_pixmap_del(ee->engine.x.mask);
+ if (ee->engine.x.mask) ecore_x_pixmap_free(ee->engine.x.mask);
ee->engine.x.mask = 0;
einfo->info.mask = 0;
evas_engine_info_set(ee->evas, (Evas_Engine_Info *)einfo);
@@ -1519,7 +1453,7 @@ _ecore_evas_x_shaped_set(Ecore_Evas *ee, int shaped)
}
else
{
- if (ee->engine.x.mask) ecore_x_pixmap_del(ee->engine.x.mask);
+ if (ee->engine.x.mask) ecore_x_pixmap_free(ee->engine.x.mask);
ee->engine.x.mask = 0;
einfo->info.mask = 0;
evas_engine_info_set(ee->evas, (Evas_Engine_Info *)einfo);
@@ -1577,7 +1511,7 @@ _ecore_evas_x_alpha_set(Ecore_Evas *ee, int alpha)
ee->prop.window = ecore_x_window_override_new(ee->engine.x.win_root, ee->x, ee->y, ee->w, ee->h);
else
ee->prop.window = ecore_x_window_new(ee->engine.x.win_root, ee->x, ee->y, ee->w, ee->h);
- if (ee->engine.x.mask) ecore_x_pixmap_del(ee->engine.x.mask);
+ if (ee->engine.x.mask) ecore_x_pixmap_free(ee->engine.x.mask);
ee->engine.x.mask = 0;
ecore_x_window_shape_input_mask_set(ee->prop.window, 0);
}
@@ -1602,7 +1536,7 @@ _ecore_evas_x_alpha_set(Ecore_Evas *ee, int alpha)
einfo->info.depth = att.depth;
# endif /* ! BUILD_ECORE_EVAS_SOFTWARE_XCB */
-// if (ee->engine.x.mask) ecore_x_pixmap_del(ee->engine.x.mask);
+// if (ee->engine.x.mask) ecore_x_pixmap_free(ee->engine.x.mask);
// ee->engine.x.mask = 0;
einfo->info.mask = ee->engine.x.mask;
einfo->info.drawable = ee->prop.window;
@@ -1649,7 +1583,7 @@ _ecore_evas_x_alpha_set(Ecore_Evas *ee, int alpha)
ee->prop.window = ecore_x_window_override_new(ee->engine.x.win_root, ee->x, ee->y, ee->w, ee->h);
else
ee->prop.window = ecore_x_window_new(ee->engine.x.win_root, ee->x, ee->y, ee->w, ee->h);
- if (ee->engine.x.mask) ecore_x_pixmap_del(ee->engine.x.mask);
+ if (ee->engine.x.mask) ecore_x_pixmap_free(ee->engine.x.mask);
ee->engine.x.mask = 0;
ecore_x_window_shape_input_mask_set(ee->prop.window, 0);
}
@@ -1667,7 +1601,7 @@ _ecore_evas_x_alpha_set(Ecore_Evas *ee, int alpha)
einfo->info.visual = att.visual;
# endif /* ! BUILD_ECORE_EVAS_XRENDER_XCB */
-// if (ee->engine.x.mask) ecore_x_pixmap_del(ee->engine.x.mask);
+// if (ee->engine.x.mask) ecore_x_pixmap_free(ee->engine.x.mask);
// ee->engine.x.mask = 0;
einfo->info.mask = ee->engine.x.mask;
einfo->info.drawable = ee->prop.window;
@@ -1713,7 +1647,7 @@ _ecore_evas_x_alpha_set(Ecore_Evas *ee, int alpha)
ee->prop.window = ecore_x_window_override_new(ee->engine.x.win_root, ee->x, ee->y, ee->w, ee->h);
else
ee->prop.window = ecore_x_window_new(ee->engine.x.win_root, ee->x, ee->y, ee->w, ee->h);
- if (ee->engine.x.mask) ecore_x_pixmap_del(ee->engine.x.mask);
+ if (ee->engine.x.mask) ecore_x_pixmap_free(ee->engine.x.mask);
ee->engine.x.mask = 0;
ecore_x_window_shape_input_mask_set(ee->prop.window, 0);
}
@@ -1723,7 +1657,7 @@ _ecore_evas_x_alpha_set(Ecore_Evas *ee, int alpha)
# endif /* XXX no alpha window support for software_16_x11 */
# if 0 /* XXX no shaped window support for software_16_x11 */
-// if (ee->engine.x.mask) ecore_x_pixmap_del(ee->engine.x.mask);
+// if (ee->engine.x.mask) ecore_x_pixmap_free(ee->engine.x.mask);
// ee->engine.x.mask = 0;
einfo->info.mask = ee->engine.x.mask;
# endif /* XXX no shaped window support for software_16_x11 */
@@ -2154,8 +2088,8 @@ _ecore_evas_x_avoid_damage_set(Ecore_Evas *ee, int on)
}
else
{
- if (ee->engine.x.pmap) ecore_x_pixmap_del(ee->engine.x.pmap);
- if (ee->engine.x.gc) ecore_x_gc_del(ee->engine.x.gc);
+ if (ee->engine.x.pmap) ecore_x_pixmap_free(ee->engine.x.pmap);
+ if (ee->engine.x.gc) ecore_x_gc_free(ee->engine.x.gc);
if (ee->engine.x.using_bg_pixmap)
{
ecore_x_window_pixmap_set(ee->prop.window, 0);
@@ -2199,8 +2133,8 @@ _ecore_evas_x_avoid_damage_set(Ecore_Evas *ee, int on)
}
else
{
- if (ee->engine.x.pmap) ecore_x_pixmap_del(ee->engine.x.pmap);
- if (ee->engine.x.gc) ecore_x_gc_del(ee->engine.x.gc);
+ if (ee->engine.x.pmap) ecore_x_pixmap_free(ee->engine.x.pmap);
+ if (ee->engine.x.gc) ecore_x_gc_free(ee->engine.x.gc);
if (ee->engine.x.using_bg_pixmap)
{
ecore_x_window_pixmap_set(ee->prop.window, 0);
diff --git a/src/lib/ecore_fb/ecore_fb_li.c b/src/lib/ecore_fb/ecore_fb_li.c
index 7b864e8..c0e80eb 100644
--- a/src/lib/ecore_fb/ecore_fb_li.c
+++ b/src/lib/ecore_fb/ecore_fb_li.c
@@ -28,7 +28,7 @@ static const char *_ecore_fb_li_kbd_syms[128 * 6] =
* size.
* - bigeasy
*/
-extern int long_has_neither_32_not_64_bits(void);
+extern int long_has_neither_32_nor_64_bits(void);
static inline int test_bit(int bit, unsigned long *array)
{
if (sizeof(long) == 4)
diff --git a/src/lib/ecore_ipc/Makefile.am b/src/lib/ecore_ipc/Makefile.am
index 17c7d24..6b3f186 100644
--- a/src/lib/ecore_ipc/Makefile.am
+++ b/src/lib/ecore_ipc/Makefile.am
@@ -24,7 +24,7 @@ $(top_builddir)/src/lib/ecore_con/libecore_con.la \
@SSL_LIBS@ \
@EINA_LIBS@
-libecore_ipc_la_LDFLAGS = -version-info @version_info@ @ecore_ipc_release_info@
+libecore_ipc_la_LDFLAGS = -no-undefined -version-info @version_info@ @ecore_ipc_release_info@
endif
diff --git a/src/lib/ecore_ipc/Makefile.in b/src/lib/ecore_ipc/Makefile.in
index 0bfb88f..d28b96e 100644
--- a/src/lib/ecore_ipc/Makefile.in
+++ b/src/lib/ecore_ipc/Makefile.in
@@ -407,7 +407,7 @@ AM_CPPFLAGS = \
@BUILD_ECORE_IPC_TRUE@@SSL_LIBS@ \
@BUILD_ECORE_IPC_TRUE@@EINA_LIBS@
- at BUILD_ECORE_IPC_TRUE@libecore_ipc_la_LDFLAGS = -version-info @version_info@ @ecore_ipc_release_info@
+ at BUILD_ECORE_IPC_TRUE@libecore_ipc_la_LDFLAGS = -no-undefined -version-info @version_info@ @ecore_ipc_release_info@
EXTRA_DIST = ecore_ipc_private.h
all: all-am
diff --git a/src/lib/ecore_win32/Ecore_Win32.h b/src/lib/ecore_win32/Ecore_Win32.h
index eef0f27..d08365d 100644
--- a/src/lib/ecore_win32/Ecore_Win32.h
+++ b/src/lib/ecore_win32/Ecore_Win32.h
@@ -38,7 +38,7 @@ extern "C" {
#endif
-typedef void Ecore_Win32_Window;
+typedef struct _Ecore_Win32_Window Ecore_Win32_Window;
typedef void Ecore_Win32_Cursor;
/* Window state */
diff --git a/src/lib/ecore_win32/ecore_win32_event.c b/src/lib/ecore_win32/ecore_win32_event.c
index f1cdd78..17172d6 100644
--- a/src/lib/ecore_win32/ecore_win32_event.c
+++ b/src/lib/ecore_win32/ecore_win32_event.c
@@ -39,6 +39,7 @@ static void _ecore_win32_event_free_key_up(void *data,
void *ev);
static int _ecore_win32_event_keystroke_get(int key,
+ int is_extended,
char **keyname,
char **keysymbol,
char **keycompose);
@@ -65,6 +66,7 @@ _ecore_win32_event_handle_key_press(Ecore_Win32_Callback_Data *msg,
if (is_keystroke)
{
if (!_ecore_win32_event_keystroke_get(LOWORD(msg->window_param),
+ msg->data_param & 0x01000000,
(char **)&e->keyname,
(char **)&e->key,
(char **)&e->string))
@@ -114,6 +116,7 @@ _ecore_win32_event_handle_key_release(Ecore_Win32_Callback_Data *msg,
if (is_keystroke)
{
if (!_ecore_win32_event_keystroke_get(LOWORD(msg->window_param),
+ msg->data_param & 0x01000000,
(char **)&e->keyname,
(char **)&e->key,
(char **)&e->string))
@@ -633,6 +636,7 @@ _ecore_win32_event_free_key_up(void *data,
static int
_ecore_win32_event_keystroke_get(int key,
+ int is_extended,
char **keyname,
char **keysymbol,
char **keycompose)
@@ -649,54 +653,144 @@ _ecore_win32_event_keystroke_get(int key,
{
/* Keystroke */
case VK_PRIOR:
- kn = "KP_Prior";
- ks = "KP_9";
- kc = "KP_Prior";
+ if (is_extended)
+ {
+ kn = "Prior";
+ ks = "Prior";
+ kc = "Prior";
+ }
+ else
+ {
+ kn = "KP_Prior";
+ ks = "KP_9";
+ kc = "KP_Prior";
+ }
break;
case VK_NEXT:
- kn = "KP_Next";
- ks = "KP_3";
- kc = "KP_Next";
+ if (is_extended)
+ {
+ kn = "Next";
+ ks = "Next";
+ kc = "Next";
+ }
+ else
+ {
+ kn = "KP_Next";
+ ks = "KP_3";
+ kc = "KP_Next";
+ }
break;
case VK_END:
- kn = "KP_End";
- ks = "KP_1";
- kc = "KP_End";
+ if (is_extended)
+ {
+ kn = "End";
+ ks = "End";
+ kc = "End";
+ }
+ else
+ {
+ kn = "KP_End";
+ ks = "KP_1";
+ kc = "KP_End";
+ }
break;
case VK_HOME:
- kn = "KP_Home";
- ks = "KP_7";
- kc = "KP_Home";
+ if (is_extended)
+ {
+ kn = "Home";
+ ks = "Home";
+ kc = "Home";
+ }
+ else
+ {
+ kn = "KP_Home";
+ ks = "KP_7";
+ kc = "KP_Home";
+ }
break;
case VK_LEFT:
- kn = "KP_Left";
- ks = "KP_4";
- kc = "KP_Left";
+ if (is_extended)
+ {
+ kn = "Left";
+ ks = "Left";
+ kc = "Left";
+ }
+ else
+ {
+ kn = "KP_Left";
+ ks = "KP_4";
+ kc = "KP_Left";
+ }
break;
case VK_UP:
- kn = "KP_Up";
- ks = "KP_8";
- kc = "KP_Up";
+ if (is_extended)
+ {
+ kn = "Up";
+ ks = "Up";
+ kc = "Up";
+ }
+ else
+ {
+ kn = "KP_Up";
+ ks = "KP_8";
+ kc = "KP_Up";
+ }
break;
case VK_RIGHT:
- kn = "KP_Right";
- ks = "KP_6";
- kc = "KP_Right";
+ if (is_extended)
+ {
+ kn = "Right";
+ ks = "Right";
+ kc = "Right";
+ }
+ else
+ {
+ kn = "KP_Right";
+ ks = "KP_6";
+ kc = "KP_Right";
+ }
break;
case VK_DOWN:
- kn = "KP_Down";
- ks = "KP_2";
- kc = "KP_Down";
+ if (is_extended)
+ {
+ kn = "Down";
+ ks = "Down";
+ kc = "Down";
+ }
+ else
+ {
+ kn = "KP_Down";
+ ks = "KP_2";
+ kc = "KP_Down";
+ }
break;
case VK_INSERT:
- kn = "KP_Insert";
- ks = "KP_0";
- kc = "KP_Insert";
+ if (is_extended)
+ {
+ kn = "Insert";
+ ks = "Insert";
+ kc = "Insert";
+ }
+ else
+ {
+ kn = "KP_Insert";
+ ks = "KP_0";
+ kc = "KP_Insert";
+ }
break;
case VK_DELETE:
- kn = "KP_Delete";
- ks = "KP_Decimal";
- kc = "KP_Delete";
+ if (is_extended)
+ {
+ kn = "Delete";
+ ks = "Delete";
+ kc = "Delete";
+ }
+ else
+ {
+ kn = "KP_Delete";
+ ks = "KP_Decimal";
+ kc = "KP_Delete";
+ }
break;
case VK_F1:
kn = "F1";
@@ -861,9 +955,9 @@ _ecore_win32_event_char_get(int key,
switch (key)
{
case VK_BACK:
- strncpy(kn, "Backspace", 32);
- strncpy(ks, "Backspace", 32);
- strncpy(kc, "Backspace", 32);
+ strncpy(kn, "BackSpace", 32);
+ strncpy(ks, "BackSpace", 32);
+ strncpy(kc, "BackSpace", 32);
break;
case VK_TAB:
strncpy(kn, "Tab", 32);
diff --git a/src/lib/ecore_win32/ecore_win32_window.c b/src/lib/ecore_win32/ecore_win32_window.c
index caf4714..9d26daa 100644
--- a/src/lib/ecore_win32/ecore_win32_window.c
+++ b/src/lib/ecore_win32/ecore_win32_window.c
@@ -207,7 +207,7 @@ ecore_win32_window_resize(Ecore_Win32_Window *window,
if (!MoveWindow(w->window, x, y,
rect.right - rect.left,
rect.bottom - rect.top,
- FALSE))
+ TRUE))
{
EINA_ERROR_PERR("MoveWindow() failed\n");
}
@@ -489,10 +489,12 @@ ecore_win32_window_shape_set(Ecore_Win32_Window *window,
{
wnd->shape.layered = 0;
#if defined(WS_EX_LAYERED)
- if (!SetWindowLong(wnd->window, GWL_EXSTYLE,
- GetWindowLong(wnd->window, GWL_EXSTYLE) & (~WS_EX_LAYERED)))
+ SetLastError(0);
+ if (!SetWindowLongPtr(wnd->window, GWL_EXSTYLE,
+ GetWindowLong(wnd->window, GWL_EXSTYLE) & (~WS_EX_LAYERED)) &&
+ (GetLastError() != 0))
{
- EINA_ERROR_PERR("SetWindowLong() failed\n");
+ EINA_ERROR_PERR("SetWindowLongPtr() failed\n");
return;
}
if (!RedrawWindow(wnd->window, NULL, NULL,
@@ -535,10 +537,12 @@ ecore_win32_window_shape_set(Ecore_Win32_Window *window,
version_info.dwOSVersionInfoSize = sizeof(version_info);
if (GetVersionEx(&version_info) == TRUE && version_info.dwMajorVersion == 5)
{
- if (!SetWindowLong(wnd->window, GWL_EXSTYLE,
- GetWindowLong(wnd->window, GWL_EXSTYLE) | WS_EX_LAYERED))
+ SetLastError(0);
+ if (!SetWindowLongPtr(wnd->window, GWL_EXSTYLE,
+ GetWindowLong(wnd->window, GWL_EXSTYLE) | WS_EX_LAYERED) &&
+ (GetLastError() != 0))
{
- EINA_ERROR_PERR("SetWindowLong() failed\n");
+ EINA_ERROR_PERR("SetWindowLongPtr() failed\n");
return;
}
wnd->shape.layered = 1;
@@ -605,19 +609,11 @@ ecore_win32_window_show(Ecore_Win32_Window *window)
EINA_ERROR_PINFO("showing window\n");
- if (!ShowWindow(((struct _Ecore_Win32_Window *)window)->window, SW_SHOWNORMAL))
- {
- EINA_ERROR_PERR("ShowWindow() failed\n");
- return;
- }
+ ShowWindow(((struct _Ecore_Win32_Window *)window)->window, SW_SHOWNORMAL);
if (!UpdateWindow(((struct _Ecore_Win32_Window *)window)->window))
{
EINA_ERROR_PERR("UpdateWindow() failed\n");
}
- if (!SendMessage(((struct _Ecore_Win32_Window *)window)->window, WM_SHOWWINDOW, 1, 0))
- {
- EINA_ERROR_PERR("SendMessage() failed\n");
- }
}
/* FIXME: seems to block the taskbar */
@@ -628,14 +624,7 @@ ecore_win32_window_hide(Ecore_Win32_Window *window)
EINA_ERROR_PINFO("hiding window\n");
- if (!ShowWindow(((struct _Ecore_Win32_Window *)window)->window, SW_HIDE))
- {
- EINA_ERROR_PERR("ShowWindow() failed\n");
- }
- if (!SendMessage(((struct _Ecore_Win32_Window *)window)->window, WM_SHOWWINDOW, 0, 0))
- {
- EINA_ERROR_PERR("SendMessage() failed\n");
- }
+ ShowWindow(((struct _Ecore_Win32_Window *)window)->window, SW_HIDE);
}
void
@@ -712,10 +701,7 @@ ecore_win32_window_iconified_set(Ecore_Win32_Window *window,
EINA_ERROR_PINFO("iconifying window: %s\n", on ? "yes" : "no");
- if (!ShowWindow(ew->window, on ? SW_MINIMIZE : SW_RESTORE))
- {
- EINA_ERROR_PERR("ShowWindow() failed\n");
- }
+ ShowWindow(ew->window, on ? SW_MINIMIZE : SW_RESTORE);
ew->iconified = on;
}
@@ -735,14 +721,24 @@ ecore_win32_window_borderless_set(Ecore_Win32_Window *window,
((!ew->borderless) && (!on)))
return;
- EINA_ERROR_PINFO("setting window border: %s\n", on ? "yes" : "no");
+ EINA_ERROR_PINFO("setting window without border: %s\n", on ? "yes" : "no");
w = ew->window;
style = GetWindowLong(w, GWL_STYLE);
if (on)
{
- SetWindowLong(w, GWL_STYLE, style & ~WS_CAPTION);
+ if (!GetClientRect(w, &rect))
+ {
+ EINA_ERROR_PERR("GetClientRect() failed\n");
+ return;
+ }
+ SetLastError(0);
+ if (!SetWindowLongPtr(w, GWL_STYLE, style & ~(WS_CAPTION | WS_THICKFRAME)) && (GetLastError() != 0))
+ {
+ EINA_ERROR_PERR("SetWindowLongPtr() failed\n");
+ return;
+ }
}
else
{
@@ -751,15 +747,16 @@ ecore_win32_window_borderless_set(Ecore_Win32_Window *window,
EINA_ERROR_PERR("GetWindowRect() failed\n");
return;
}
- style |= WS_CAPTION;
+ style |= WS_CAPTION | WS_THICKFRAME;
if (!AdjustWindowRect (&rect, style, FALSE))
{
EINA_ERROR_PERR("AdjustWindowRect() failed\n");
return;
}
- if (!SetWindowLong(w, GWL_STYLE, style))
+ SetLastError(0);
+ if (!SetWindowLongPtr(w, GWL_STYLE, style) && (GetLastError() != 0))
{
- EINA_ERROR_PERR("SetWindowLong() failed\n");
+ EINA_ERROR_PERR("SetWindowLongPtr() failed\n");
return;
}
}
@@ -809,14 +806,16 @@ ecore_win32_window_fullscreen_set(Ecore_Win32_Window *window,
}
style = ew->style & ~WS_OVERLAPPEDWINDOW & ~WS_SIZEBOX;
style |= WS_VISIBLE | WS_POPUP;
- if (!SetWindowLong(w, GWL_STYLE, style))
+ SetLastError(0);
+ if (!SetWindowLongPtr(w, GWL_STYLE, style) && (GetLastError() != 0))
{
- EINA_ERROR_PERR("SetWindowLong() failed\n");
+ EINA_ERROR_PERR("SetWindowLongPtr() failed\n");
return;
}
- if (!SetWindowLong(w, GWL_EXSTYLE, WS_EX_TOPMOST))
+ SetLastError(0);
+ if (!SetWindowLongPtr(w, GWL_EXSTYLE, WS_EX_TOPMOST) && (GetLastError() != 0))
{
- EINA_ERROR_PERR("SetWindowLong() failed\n");
+ EINA_ERROR_PERR("SetWindowLongPtr() failed\n");
return;
}
if (!SetWindowPos(w, HWND_TOPMOST, 0, 0,
@@ -829,14 +828,16 @@ ecore_win32_window_fullscreen_set(Ecore_Win32_Window *window,
}
else
{
- if (!SetWindowLong(w, GWL_STYLE, ew->style))
+ SetLastError(0);
+ if (!SetWindowLongPtr(w, GWL_STYLE, ew->style) && (GetLastError() != 0))
{
- EINA_ERROR_PERR("SetWindowLong() failed\n");
+ EINA_ERROR_PERR("SetWindowLongPtr() failed\n");
return;
}
- if (!SetWindowLong(w, GWL_EXSTYLE, 0))
+ SetLastError(0);
+ if (!SetWindowLongPtr(w, GWL_EXSTYLE, 0) && (GetLastError() != 0))
{
- EINA_ERROR_PERR("SetWindowLong() failed\n");
+ EINA_ERROR_PERR("SetWindowLongPtr() failed\n");
return;
}
if (!SetWindowPos(w, HWND_NOTOPMOST,
@@ -1169,9 +1170,9 @@ ecore_win32_window_internal_new(Ecore_Win32_Window *parent,
}
SetLastError(0);
- if (!SetWindowLong(w->window, GWL_USERDATA, (LONG)w) && (GetLastError() != 0))
+ if (!SetWindowLongPtr(w->window, GWL_USERDATA, (LONG)w) && (GetLastError() != 0))
{
- EINA_ERROR_PERR("SetWindowLong() failed\n");
+ EINA_ERROR_PERR("SetWindowLongPtr() failed\n");
DestroyWindow(w->window);
free(w);
return NULL;
diff --git a/src/lib/ecore_wince/Ecore_WinCE.h b/src/lib/ecore_wince/Ecore_WinCE.h
index 1ab2ac2..e3faec1 100644
--- a/src/lib/ecore_wince/Ecore_WinCE.h
+++ b/src/lib/ecore_wince/Ecore_WinCE.h
@@ -44,11 +44,6 @@ typedef void Ecore_WinCE_Window;
/* Events */
-typedef struct _Ecore_WinCE_Event_Key_Down Ecore_WinCE_Event_Key_Down;
-typedef struct _Ecore_WinCE_Event_Key_Up Ecore_WinCE_Event_Key_Up;
-typedef struct _Ecore_WinCE_Event_Mouse_Button_Down Ecore_WinCE_Event_Mouse_Button_Down;
-typedef struct _Ecore_WinCE_Event_Mouse_Button_Up Ecore_WinCE_Event_Mouse_Button_Up;
-typedef struct _Ecore_WinCE_Event_Mouse_Move Ecore_WinCE_Event_Mouse_Move;
typedef struct _Ecore_WinCE_Event_Mouse_In Ecore_WinCE_Event_Mouse_In;
typedef struct _Ecore_WinCE_Event_Mouse_Out Ecore_WinCE_Event_Mouse_Out;
typedef struct _Ecore_WinCE_Event_Window_Focus_In Ecore_WinCE_Event_Window_Focus_In;
@@ -60,54 +55,6 @@ typedef struct _Ecore_WinCE_Event_Window_Hide Ecore_WinCE_Event_Window
typedef struct _Ecore_WinCE_Event_Window_Show Ecore_WinCE_Event_Window_Show;
typedef struct _Ecore_WinCE_Event_Window_Delete_Request Ecore_WinCE_Event_Window_Delete_Request;
-struct _Ecore_WinCE_Event_Key_Down
-{
- Ecore_WinCE_Window *window;
- char *keyname;
- char *keysymbol;
- char *keycompose;
- double time;
-};
-
-struct _Ecore_WinCE_Event_Key_Up
-{
- Ecore_WinCE_Window *window;
- char *keyname;
- char *keysymbol;
- char *keycompose;
- double time;
-};
-
-struct _Ecore_WinCE_Event_Mouse_Button_Down
-{
- Ecore_WinCE_Window *window;
- int button;
- int x;
- int y;
- double time;
- unsigned int double_click : 1;
- unsigned int triple_click : 1;
-};
-
-struct _Ecore_WinCE_Event_Mouse_Button_Up
-{
- Ecore_WinCE_Window *window;
- int button;
- int x;
- int y;
- double time;
- unsigned int double_click : 1;
- unsigned int triple_click : 1;
-};
-
-struct _Ecore_WinCE_Event_Mouse_Move
-{
- Ecore_WinCE_Window *window;
- int x;
- int y;
- double time;
-};
-
struct _Ecore_WinCE_Event_Mouse_In
{
Ecore_WinCE_Window *window;
@@ -177,11 +124,6 @@ struct _Ecore_WinCE_Event_Window_Delete_Request
};
-EAPI extern int ECORE_WINCE_EVENT_KEY_DOWN;
-EAPI extern int ECORE_WINCE_EVENT_KEY_UP;
-EAPI extern int ECORE_WINCE_EVENT_MOUSE_BUTTON_DOWN;
-EAPI extern int ECORE_WINCE_EVENT_MOUSE_BUTTON_UP;
-EAPI extern int ECORE_WINCE_EVENT_MOUSE_MOVE;
EAPI extern int ECORE_WINCE_EVENT_MOUSE_IN;
EAPI extern int ECORE_WINCE_EVENT_MOUSE_OUT;
EAPI extern int ECORE_WINCE_EVENT_WINDOW_FOCUS_IN;
diff --git a/src/lib/ecore_wince/Makefile.am b/src/lib/ecore_wince/Makefile.am
index e9d054c..2ea84f6 100644
--- a/src/lib/ecore_wince/Makefile.am
+++ b/src/lib/ecore_wince/Makefile.am
@@ -2,9 +2,13 @@ MAINTAINERCLEANFILES = Makefile.in
AM_CPPFLAGS = \
-I$(top_srcdir)/src/lib/ecore \
+-I$(top_srcdir)/src/lib/ecore_input \
-I$(top_builddir)/src/lib/ecore \
+-I$(top_builddir)/src/lib/ecore_input \
@EFL_ECORE_WINCE_BUILD@ \
- at EINA_CFLAGS@
+ at EVAS_CFLAGS@ \
+ at EINA_CFLAGS@ \
+ at WIN32_CPPFLAGS@
AM_CFLAGS = @WIN32_CFLAGS@
@@ -23,8 +27,11 @@ ecore_wince_window.c
libecore_wince_la_LIBADD = \
@WIN32_LIBS@ \
+$(top_builddir)/src/lib/ecore_input/libecore_input.la \
$(top_builddir)/src/lib/ecore/libecore.la \
- at EINA_LIBS@
+ at EVAS_LIBS@ \
+ at EINA_LIBS@ \
+ at EVIL_LIBS@
libecore_wince_la_LDFLAGS = -no-undefined @lt_enable_auto_import@ -version-info @version_info@ @ecore_wince_release_info@
diff --git a/src/lib/ecore_wince/Makefile.in b/src/lib/ecore_wince/Makefile.in
index 8614aec..0433bc7 100644
--- a/src/lib/ecore_wince/Makefile.in
+++ b/src/lib/ecore_wince/Makefile.in
@@ -59,7 +59,8 @@ am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(includedir)"
libLTLIBRARIES_INSTALL = $(INSTALL)
LTLIBRARIES = $(lib_LTLIBRARIES)
- at BUILD_ECORE_WINCE_TRUE@libecore_wince_la_DEPENDENCIES = $(top_builddir)/src/lib/ecore/libecore.la
+ at BUILD_ECORE_WINCE_TRUE@libecore_wince_la_DEPENDENCIES = $(top_builddir)/src/lib/ecore_input/libecore_input.la \
+ at BUILD_ECORE_WINCE_TRUE@ $(top_builddir)/src/lib/ecore/libecore.la
am__libecore_wince_la_SOURCES_DIST = ecore_wince.c ecore_wince_event.c \
ecore_wince_window.c
@BUILD_ECORE_WINCE_TRUE at am_libecore_wince_la_OBJECTS = ecore_wince.lo \
@@ -389,9 +390,13 @@ x_libs = @x_libs@
MAINTAINERCLEANFILES = Makefile.in
AM_CPPFLAGS = \
-I$(top_srcdir)/src/lib/ecore \
+-I$(top_srcdir)/src/lib/ecore_input \
-I$(top_builddir)/src/lib/ecore \
+-I$(top_builddir)/src/lib/ecore_input \
@EFL_ECORE_WINCE_BUILD@ \
- at EINA_CFLAGS@
+ at EVAS_CFLAGS@ \
+ at EINA_CFLAGS@ \
+ at WIN32_CPPFLAGS@
AM_CFLAGS = @WIN32_CFLAGS@
@BUILD_ECORE_WINCE_TRUE at lib_LTLIBRARIES = libecore_wince.la
@@ -405,8 +410,11 @@ AM_CFLAGS = @WIN32_CFLAGS@
@BUILD_ECORE_WINCE_TRUE at libecore_wince_la_LIBADD = \
@BUILD_ECORE_WINCE_TRUE@@WIN32_LIBS@ \
+ at BUILD_ECORE_WINCE_TRUE@$(top_builddir)/src/lib/ecore_input/libecore_input.la \
@BUILD_ECORE_WINCE_TRUE@$(top_builddir)/src/lib/ecore/libecore.la \
- at BUILD_ECORE_WINCE_TRUE@@EINA_LIBS@
+ at BUILD_ECORE_WINCE_TRUE@@EVAS_LIBS@ \
+ at BUILD_ECORE_WINCE_TRUE@@EINA_LIBS@ \
+ at BUILD_ECORE_WINCE_TRUE@@EVIL_LIBS@
@BUILD_ECORE_WINCE_TRUE at libecore_wince_la_LDFLAGS = -no-undefined @lt_enable_auto_import@ -version-info @version_info@ @ecore_wince_release_info@
EXTRA_DIST = ecore_wince_private.h
diff --git a/src/lib/ecore_wince/ecore_wince.c b/src/lib/ecore_wince/ecore_wince.c
index 02966d9..5403b25 100644
--- a/src/lib/ecore_wince/ecore_wince.c
+++ b/src/lib/ecore_wince/ecore_wince.c
@@ -14,8 +14,9 @@
#undef WIN32_LEAN_AND_MEAN
#include <Eina.h>
+#include <Ecore.h>
+#include <Ecore_Input.h>
-#include "Ecore.h"
#include "Ecore_WinCE.h"
#include "ecore_wince_private.h"
@@ -27,11 +28,6 @@ double _ecore_wince_event_last_time = 0.0;
Ecore_WinCE_Window *_ecore_wince_event_last_window = NULL;
HINSTANCE _ecore_wince_instance = NULL;
-int ECORE_WINCE_EVENT_KEY_DOWN = 0;
-int ECORE_WINCE_EVENT_KEY_UP = 0;
-int ECORE_WINCE_EVENT_MOUSE_BUTTON_DOWN = 0;
-int ECORE_WINCE_EVENT_MOUSE_BUTTON_UP = 0;
-int ECORE_WINCE_EVENT_MOUSE_MOVE = 0;
int ECORE_WINCE_EVENT_MOUSE_IN = 0;
int ECORE_WINCE_EVENT_MOUSE_OUT = 0;
int ECORE_WINCE_EVENT_WINDOW_FOCUS_IN = 0;
@@ -106,13 +102,8 @@ ecore_wince_init()
return 0;
}
- if (!ECORE_WINCE_EVENT_KEY_DOWN)
+ if (!ECORE_WINCE_EVENT_MOUSE_IN)
{
- ECORE_WINCE_EVENT_KEY_DOWN = ecore_event_type_new();
- ECORE_WINCE_EVENT_KEY_UP = ecore_event_type_new();
- ECORE_WINCE_EVENT_MOUSE_BUTTON_DOWN = ecore_event_type_new();
- ECORE_WINCE_EVENT_MOUSE_BUTTON_UP = ecore_event_type_new();
- ECORE_WINCE_EVENT_MOUSE_MOVE = ecore_event_type_new();
ECORE_WINCE_EVENT_MOUSE_IN = ecore_event_type_new();
ECORE_WINCE_EVENT_MOUSE_OUT = ecore_event_type_new();
ECORE_WINCE_EVENT_WINDOW_FOCUS_IN = ecore_event_type_new();
@@ -125,6 +116,8 @@ ecore_wince_init()
ECORE_WINCE_EVENT_WINDOW_DELETE_REQUEST = ecore_event_type_new();
}
+ ecore_event_init();
+
_ecore_wince_init_count++;
return _ecore_wince_init_count;
@@ -139,7 +132,8 @@ ecore_wince_shutdown()
_ecore_wince_init_count--;
if (_ecore_wince_init_count > 0) return _ecore_wince_init_count;
- if (!_ecore_wince_instance) return _ecore_wince_init_count;
+
+ ecore_event_shutdown();
/* force task bar to be shown (in case the application exits */
/* while being fullscreen) */
diff --git a/src/lib/ecore_wince/ecore_wince_event.c b/src/lib/ecore_wince/ecore_wince_event.c
index 7d8b198..6826d5e 100644
--- a/src/lib/ecore_wince/ecore_wince_event.c
+++ b/src/lib/ecore_wince/ecore_wince_event.c
@@ -13,8 +13,9 @@
#undef WIN32_LEAN_AND_MEAN
#include <Eina.h>
+#include <Ecore.h>
+#include <Ecore_Input.h>
-#include "Ecore.h"
#include "Ecore_WinCE.h"
#include "ecore_wince_private.h"
@@ -52,19 +53,19 @@ void
_ecore_wince_event_handle_key_press(Ecore_WinCE_Callback_Data *msg,
int is_keystroke)
{
- Ecore_WinCE_Event_Key_Down *e;
+ Ecore_Event_Key *e;
EINA_ERROR_PINFO("key pressed\n");
- e = (Ecore_WinCE_Event_Key_Down *)malloc(sizeof(Ecore_WinCE_Event_Key_Down));
+ e = (Ecore_Event_Key *)malloc(sizeof(Ecore_Event_Key));
if (!e) return;
if (is_keystroke)
{
if (!_ecore_wince_event_keystroke_get(LOWORD(msg->window_param),
- &e->keyname,
- &e->keysymbol,
- &e->keycompose))
+ (char **)&e->keyname,
+ (char **)&e->key,
+ (char **)&e->string))
{
free(e);
return;
@@ -73,45 +74,45 @@ _ecore_wince_event_handle_key_press(Ecore_WinCE_Callback_Data *msg,
else
{
if (!_ecore_wince_event_char_get(LOWORD(msg->window_param),
- &e->keyname,
- &e->keysymbol,
- &e->keycompose))
+ (char **)&e->keyname,
+ (char **)&e->key,
+ (char **)&e->string))
{
free(e);
return;
}
}
- e->window = (void *)GetWindowLong(msg->window, GWL_USERDATA);
+ e->window = (Ecore_Window)GetWindowLong(msg->window, GWL_USERDATA);
if (!e->window)
{
free(e);
return;
}
- e->time = (double)msg->time / 1000.0;
+ e->timestamp = (double)msg->time / 1000.0;
- _ecore_wince_event_last_time = e->time;
+ _ecore_wince_event_last_time = e->timestamp;
- ecore_event_add(ECORE_WINCE_EVENT_KEY_DOWN, e, _ecore_wince_event_free_key_down, NULL);
+ ecore_event_add(ECORE_EVENT_KEY_DOWN, e, _ecore_wince_event_free_key_down, NULL);
}
void
_ecore_wince_event_handle_key_release(Ecore_WinCE_Callback_Data *msg,
int is_keystroke)
{
- Ecore_WinCE_Event_Key_Up *e;
+ Ecore_Event_Key *e;
EINA_ERROR_PINFO("key released\n");
- e = (Ecore_WinCE_Event_Key_Up *)calloc(1, sizeof(Ecore_WinCE_Event_Key_Up));
+ e = (Ecore_Event_Key *)calloc(1, sizeof(Ecore_Event_Key));
if (!e) return;
if (is_keystroke)
{
if (!_ecore_wince_event_keystroke_get(LOWORD(msg->window_param),
- &e->keyname,
- &e->keysymbol,
- &e->keycompose))
+ (char **)&e->keyname,
+ (char **)&e->key,
+ (char **)&e->string))
{
free(e);
return;
@@ -120,26 +121,26 @@ _ecore_wince_event_handle_key_release(Ecore_WinCE_Callback_Data *msg,
else
{
if (!_ecore_wince_event_char_get(LOWORD(msg->window_param),
- &e->keyname,
- &e->keysymbol,
- &e->keycompose))
+ (char **)&e->keyname,
+ (char **)&e->key,
+ (char **)&e->string))
{
free(e);
return;
}
}
- e->window = (void *)GetWindowLong(msg->window, GWL_USERDATA);
+ e->window = (Ecore_Window)GetWindowLong(msg->window, GWL_USERDATA);
if (!e->window)
{
free(e);
return;
}
- e->time = (double)msg->time / 1000.0;
+ e->timestamp = (double)msg->time / 1000.0;
- _ecore_wince_event_last_time = e->time;
+ _ecore_wince_event_last_time = e->timestamp;
- ecore_event_add(ECORE_WINCE_EVENT_KEY_UP, e, _ecore_wince_event_free_key_up, NULL);
+ ecore_event_add(ECORE_EVENT_KEY_UP, e, _ecore_wince_event_free_key_up, NULL);
}
void
@@ -150,27 +151,27 @@ _ecore_wince_event_handle_button_press(Ecore_WinCE_Callback_Data *msg,
EINA_ERROR_PINFO("mouse button pressed\n");
- window = (void *)GetWindowLong(msg->window, GWL_USERDATA);
+ window = (Ecore_WinCE_Window *)GetWindowLong(msg->window, GWL_USERDATA);
{
- Ecore_WinCE_Event_Mouse_Move *e;
+ Ecore_Event_Mouse_Move *e;
- e = (Ecore_WinCE_Event_Mouse_Move *)calloc(1, sizeof(Ecore_WinCE_Event_Mouse_Move));
+ e = (Ecore_Event_Mouse_Move *)calloc(1, sizeof(Ecore_Event_Mouse_Move));
if (!e) return;
- e->window = window;
+ e->window = (Ecore_Window)window;
e->x = LOWORD(msg->data_param);
e->y = HIWORD(msg->data_param);
- e->time = (double)msg->time / 1000.0;
+ e->timestamp = (double)msg->time / 1000.0;
- _ecore_wince_event_last_time = e->time;
- _ecore_wince_event_last_window = e->window;
+ _ecore_wince_event_last_time = e->timestamp;
+ _ecore_wince_event_last_window = (Ecore_WinCE_Window *)e->window;
- ecore_event_add(ECORE_WINCE_EVENT_MOUSE_MOVE, e, NULL, NULL);
+ ecore_event_add(ECORE_EVENT_MOUSE_MOVE, e, NULL, NULL);
}
{
- Ecore_WinCE_Event_Mouse_Button_Down *e;
+ Ecore_Event_Mouse_Button *e;
if (_ecore_wince_mouse_down_did_triple)
{
@@ -180,22 +181,22 @@ _ecore_wince_event_handle_button_press(Ecore_WinCE_Callback_Data *msg,
_ecore_wince_mouse_down_last_last_time = 0.0;
}
- e = (Ecore_WinCE_Event_Mouse_Button_Down *)calloc(1, sizeof(Ecore_WinCE_Event_Mouse_Button_Down));
+ e = (Ecore_Event_Mouse_Button *)calloc(1, sizeof(Ecore_Event_Mouse_Button));
if (!e) return;
- e->window = window;
- e->button = button;
+ e->window = (Ecore_Window)window;
+ e->buttons = button;
e->x = LOWORD(msg->data_param);
e->y = HIWORD(msg->data_param);
- e->time = (double)msg->time / 1000.0;
+ e->timestamp = (double)msg->time / 1000.0;
- if (((e->time - _ecore_wince_mouse_down_last_time) <= _ecore_wince_double_click_time) &&
- (e->window == _ecore_wince_mouse_down_last_window))
+ if (((e->timestamp - _ecore_wince_mouse_down_last_time) <= _ecore_wince_double_click_time) &&
+ (e->window == (Ecore_Window)_ecore_wince_mouse_down_last_window))
e->double_click = 1;
- if (((e->time - _ecore_wince_mouse_down_last_last_time) <= (2.0 * _ecore_wince_double_click_time)) &&
- (e->window == _ecore_wince_mouse_down_last_window) &&
- (e->window == _ecore_wince_mouse_down_last_last_window))
+ if (((e->timestamp - _ecore_wince_mouse_down_last_last_time) <= (2.0 * _ecore_wince_double_click_time)) &&
+ (e->window == (Ecore_Window)_ecore_wince_mouse_down_last_window) &&
+ (e->window == (Ecore_Window)_ecore_wince_mouse_down_last_last_window))
{
e->triple_click = 1;
_ecore_wince_mouse_down_did_triple = 1;
@@ -206,24 +207,24 @@ _ecore_wince_event_handle_button_press(Ecore_WinCE_Callback_Data *msg,
if (!e->double_click && !e->triple_click)
_ecore_wince_mouse_up_count = 0;
- _ecore_wince_event_last_time = e->time;
- _ecore_wince_event_last_window = e->window;
+ _ecore_wince_event_last_time = e->timestamp;
+ _ecore_wince_event_last_window = (Ecore_WinCE_Window *)e->window;
if (!_ecore_wince_mouse_down_did_triple)
{
_ecore_wince_mouse_down_last_last_window = _ecore_wince_mouse_down_last_window;
- _ecore_wince_mouse_down_last_window = e->window;
+ _ecore_wince_mouse_down_last_window = (Ecore_WinCE_Window *)e->window;
_ecore_wince_mouse_down_last_last_time = _ecore_wince_mouse_down_last_time;
- _ecore_wince_mouse_down_last_time = e->time;
+ _ecore_wince_mouse_down_last_time = e->timestamp;
}
- ecore_event_add(ECORE_WINCE_EVENT_MOUSE_BUTTON_DOWN, e, NULL, NULL);
+ ecore_event_add(ECORE_EVENT_MOUSE_BUTTON_DOWN, e, NULL, NULL);
}
}
void
_ecore_wince_event_handle_button_release(Ecore_WinCE_Callback_Data *msg,
- int button)
+ int button)
{
Ecore_WinCE_Window *window;
@@ -232,70 +233,70 @@ _ecore_wince_event_handle_button_release(Ecore_WinCE_Callback_Data *msg,
window = (void *)GetWindowLong(msg->window, GWL_USERDATA);
{
- Ecore_WinCE_Event_Mouse_Move *e;
+ Ecore_Event_Mouse_Move *e;
- e = (Ecore_WinCE_Event_Mouse_Move *)calloc(1, sizeof(Ecore_WinCE_Event_Mouse_Move));
+ e = (Ecore_Event_Mouse_Move *)calloc(1, sizeof(Ecore_Event_Mouse_Move));
if (!e) return;
- e->window = window;
+ e->window = (Ecore_Window)window;
e->x = LOWORD(msg->data_param);
e->y = HIWORD(msg->data_param);
- e->time = (double)msg->time / 1000.0;
+ e->timestamp = (double)msg->time / 1000.0;
- _ecore_wince_event_last_time = e->time;
- _ecore_wince_event_last_window = e->window;
+ _ecore_wince_event_last_time = e->timestamp;
+ _ecore_wince_event_last_window = (Ecore_WinCE_Window *)e->window;
- ecore_event_add(ECORE_WINCE_EVENT_MOUSE_MOVE, e, NULL, NULL);
+ ecore_event_add(ECORE_EVENT_MOUSE_MOVE, e, NULL, NULL);
}
{
- Ecore_WinCE_Event_Mouse_Button_Up *e;
+ Ecore_Event_Mouse_Button *e;
- e = (Ecore_WinCE_Event_Mouse_Button_Up *)calloc(1, sizeof(Ecore_WinCE_Event_Mouse_Button_Up));
+ e = (Ecore_Event_Mouse_Button *)calloc(1, sizeof(Ecore_Event_Mouse_Button));
if (!e) return;
- e->window = window;
- e->button = button;
+ e->window = (Ecore_Window)window;
+ e->buttons = button;
e->x = LOWORD(msg->data_param);
e->y = HIWORD(msg->data_param);
- e->time = (double)msg->time / 1000.0;
+ e->timestamp = (double)msg->time / 1000.0;
_ecore_wince_mouse_up_count++;
if ((_ecore_wince_mouse_up_count >= 2) &&
- ((e->time - _ecore_wince_mouse_down_last_time) <= _ecore_wince_double_click_time) &&
- (e->window == _ecore_wince_mouse_down_last_window))
+ ((e->timestamp - _ecore_wince_mouse_down_last_time) <= _ecore_wince_double_click_time) &&
+ (e->window == (Ecore_Window)_ecore_wince_mouse_down_last_window))
e->double_click = 1;
if ((_ecore_wince_mouse_up_count >= 3) &&
- ((e->time - _ecore_wince_mouse_down_last_last_time) <= (2.0 * _ecore_wince_double_click_time)) &&
- (e->window == _ecore_wince_mouse_down_last_window) &&
- (e->window == _ecore_wince_mouse_down_last_last_window))
+ ((e->timestamp - _ecore_wince_mouse_down_last_last_time) <= (2.0 * _ecore_wince_double_click_time)) &&
+ (e->window == (Ecore_Window)_ecore_wince_mouse_down_last_window) &&
+ (e->window == (Ecore_Window)_ecore_wince_mouse_down_last_last_window))
e->triple_click = 1;
- _ecore_wince_event_last_time = e->time;
- _ecore_wince_event_last_window = e->window;
+ _ecore_wince_event_last_time = e->timestamp;
+ _ecore_wince_event_last_window = (Ecore_WinCE_Window *)e->window;
- ecore_event_add(ECORE_WINCE_EVENT_MOUSE_BUTTON_UP, e, NULL, NULL);
+ ecore_event_add(ECORE_EVENT_MOUSE_BUTTON_UP, e, NULL, NULL);
}
}
void
_ecore_wince_event_handle_motion_notify(Ecore_WinCE_Callback_Data *msg)
{
- Ecore_WinCE_Event_Mouse_Move *e;
+ Ecore_Event_Mouse_Move *e;
EINA_ERROR_PINFO("mouse moved\n");
- e = (Ecore_WinCE_Event_Mouse_Move *)calloc(1, sizeof(Ecore_WinCE_Event_Mouse_Move));
+ e = (Ecore_Event_Mouse_Move *)calloc(1, sizeof(Ecore_Event_Mouse_Move));
if (!e) return;
- e->window = (void *)GetWindowLong(msg->window, GWL_USERDATA);
+ e->window = (Ecore_Window)GetWindowLong(msg->window, GWL_USERDATA);
e->x = LOWORD(msg->data_param);
e->y = HIWORD(msg->data_param);
- e->time = (double)msg->time / 1000.0;
+ e->timestamp = (double)msg->time / 1000.0;
- ecore_event_add(ECORE_WINCE_EVENT_MOUSE_MOVE, e, NULL, NULL);
+ ecore_event_add(ECORE_EVENT_MOUSE_MOVE, e, NULL, NULL);
}
void
@@ -308,20 +309,20 @@ _ecore_wince_event_handle_enter_notify(Ecore_WinCE_Callback_Data *msg)
window = (void *)GetWindowLong(msg->window, GWL_USERDATA);
{
- Ecore_WinCE_Event_Mouse_Move *e;
+ Ecore_Event_Mouse_Move *e;
- e = (Ecore_WinCE_Event_Mouse_Move *)calloc(1, sizeof(Ecore_WinCE_Event_Mouse_Move));
+ e = (Ecore_Event_Mouse_Move *)calloc(1, sizeof(Ecore_Event_Mouse_Move));
if (!e) return;
- e->window = window;
+ e->window = (Ecore_Window)window;
e->x = msg->x;
e->y = msg->y;
- e->time = (double)msg->time / 1000.0;
+ e->timestamp = (double)msg->time / 1000.0;
- _ecore_wince_event_last_time = e->time;
- _ecore_wince_event_last_window = e->window;
+ _ecore_wince_event_last_time = e->timestamp;
+ _ecore_wince_event_last_window = (Ecore_WinCE_Window *)e->window;
- ecore_event_add(ECORE_WINCE_EVENT_MOUSE_MOVE, e, NULL, NULL);
+ ecore_event_add(ECORE_EVENT_MOUSE_MOVE, e, NULL, NULL);
}
{
@@ -351,20 +352,20 @@ _ecore_wince_event_handle_leave_notify(Ecore_WinCE_Callback_Data *msg)
window = (void *)GetWindowLong(msg->window, GWL_USERDATA);
{
- Ecore_WinCE_Event_Mouse_Move *e;
+ Ecore_Event_Mouse_Move *e;
- e = (Ecore_WinCE_Event_Mouse_Move *)calloc(1, sizeof(Ecore_WinCE_Event_Mouse_Move));
+ e = (Ecore_Event_Mouse_Move *)calloc(1, sizeof(Ecore_Event_Mouse_Move));
if (!e) return;
- e->window = window;
+ e->window = (Ecore_Window)window;
e->x = msg->x;
e->y = msg->y;
- e->time = (double)msg->time / 1000.0;
+ e->timestamp = (double)msg->time / 1000.0;
- _ecore_wince_event_last_time = e->time;
- _ecore_wince_event_last_window = e->window;
+ _ecore_wince_event_last_time = e->timestamp;
+ _ecore_wince_event_last_window = (Ecore_WinCE_Window *)e->window;
- ecore_event_add(ECORE_WINCE_EVENT_MOUSE_MOVE, e, NULL, NULL);
+ ecore_event_add(ECORE_EVENT_MOUSE_MOVE, e, NULL, NULL);
}
{
@@ -587,12 +588,12 @@ static void
_ecore_wince_event_free_key_down(void *data __UNUSED__,
void *ev)
{
- Ecore_WinCE_Event_Key_Down *e;
+ Ecore_Event_Key *e;
e = ev;
- if (e->keyname) free(e->keyname);
- if (e->keysymbol) free(e->keysymbol);
- if (e->keycompose) free(e->keycompose);
+ if (e->keyname) free((char *)e->keyname);
+ if (e->key) free((char *)e->key);
+ if (e->string) free((char *)e->string);
free(e);
}
@@ -600,12 +601,12 @@ static void
_ecore_wince_event_free_key_up(void *data __UNUSED__,
void *ev)
{
- Ecore_WinCE_Event_Key_Up *e;
+ Ecore_Event_Key *e;
e = ev;
- if (e->keyname) free(e->keyname);
- if (e->keysymbol) free(e->keysymbol);
- if (e->keycompose) free(e->keycompose);
+ if (e->keyname) free((char *)e->keyname);
+ if (e->key) free((char *)e->key);
+ if (e->string) free((char *)e->string);
free(e);
}
@@ -627,54 +628,54 @@ _ecore_wince_event_keystroke_get(int key,
{
/* Keystroke */
case VK_PRIOR:
- kn = "KP_Prior";
- ks = "KP_Prior";
- kc = "";
+ kn = "Prior";
+ ks = "Prior";
+ kc = "Prior";
break;
case VK_NEXT:
- kn = "KP_Next";
- ks = "KP_Next";
- kc = "";
+ kn = "Next";
+ ks = "Next";
+ kc = "Next";
break;
case VK_END:
- kn = "KP_End";
- ks = "KP_End";
- kc = "";
+ kn = "End";
+ ks = "End";
+ kc = "End";
break;
case VK_HOME:
- kn = "KP_Home";
- ks = "KP_Home";
- kc = "";
+ kn = "Home";
+ ks = "Home";
+ kc = "Home";
break;
case VK_LEFT:
- kn = "KP_Left";
- ks = "KP_Left";
- kc = "";
+ kn = "Left";
+ ks = "Left";
+ kc = "Left";
break;
case VK_UP:
- kn = "KP_Up";
- ks = "KP_Up";
- kc = "";
+ kn = "Up";
+ ks = "Up";
+ kc = "Up";
break;
case VK_RIGHT:
- kn = "KP_Right";
- ks = "KP_Right";
- kc = "";
+ kn = "Right";
+ ks = "Right";
+ kc = "Right";
break;
case VK_DOWN:
- kn = "KP_Down";
- ks = "KP_Down";
- kc = "";
+ kn = "Down";
+ ks = "Down";
+ kc = "Down";
break;
case VK_INSERT:
- kn = "KP_Insert";
- ks = "KP_Insert";
- kc = "";
+ kn = "Insert";
+ ks = "Insert";
+ kc = "Insert";
break;
case VK_DELETE:
- kn = "KP_Delete";
- ks = "KP_Delete";
- kc = "";
+ kn = "Delete";
+ ks = "Delete";
+ kc = "Delete";
break;
case VK_F1:
kn = "F1";
@@ -772,25 +773,28 @@ _ecore_wince_event_keystroke_get(int key,
kc = "";
break;
case VK_F20:
- kn = "F20";
- ks = "F20";
- kc = "";
- break;
+ /*
+ * VK_F20 indicates that an arrow key came from a rocker.
+ * This can safely be ignored.
+ */
+ return 0;
case VK_F21:
- kn = "F21";
- ks = "F21";
- kc = "";
- break;
+ /*
+ * VK_F21 indicates that an arrow key came from a directional
+ * pad. This can safely be ignored.
+ */
+ return 0;
case VK_F22:
kn = "F22";
ks = "F22";
kc = "";
break;
case VK_F23:
- kn = "F23";
- ks = "F23";
- kc = "";
- break;
+ /*
+ * Sent with VK_RETURN when doing an action (usually the middle
+ * button on a directional pad. This can safely be ignored.
+ */
+ return 0;
case VK_F24:
kn = "F24";
ks = "F24";
@@ -840,7 +844,7 @@ _ecore_wince_event_char_get(int key,
{
char kn[32];
char ks[32];
- char *kc;
+ char kc[32];
*keyname = NULL;
*keysymbol = NULL;
@@ -850,34 +854,34 @@ _ecore_wince_event_char_get(int key,
{
case VK_APP3:
case VK_BACK:
- strncpy(kn, "Backspace", 32);
- strncpy(ks, "Backspace", 32);
- kc = "";
+ strncpy(kn, "BackSpace", 32);
+ strncpy(ks, "BackSpace", 32);
+ strncpy(kc, "BackSpace", 32);
break;
case VK_APP4:
case VK_TAB:
strncpy(kn, "Tab", 32);
strncpy(ks, "Tab", 32);
- kc = "";
+ strncpy(kc, "Tab", 32);
break;
case VK_APP5:
case 0x0a:
/* Line feed (Shift + Enter) */
strncpy(kn, "LineFeed", 32);
strncpy(ks, "LineFeed", 32);
- kc = "";
+ strncpy(kc, "LineFeed", 32);
break;
case VK_APP2:
case VK_RETURN:
strncpy(kn, "Return", 32);
strncpy(ks, "Return", 32);
- kc = "";
+ strncpy(kc, "Return", 32);
break;
case VK_APP1:
case VK_ESCAPE:
strncpy(kn, "Escape", 32);
strncpy(ks, "Escape", 32);
- kc = "";
+ strncpy(kc, "Escape", 32);
break;
default:
/* displayable characters */
@@ -886,7 +890,8 @@ _ecore_wince_event_char_get(int key,
kn[1] = '\0';
ks[0] = (TCHAR)key;
ks[1] = '\0';
- kc = "";
+ kc[0] = (TCHAR)key;
+ kc[1] = '\0';
break;
}
*keyname = strdup(kn);
diff --git a/src/lib/ecore_x/Ecore_X.h b/src/lib/ecore_x/Ecore_X.h
index f0bac23..1500b18 100644
--- a/src/lib/ecore_x/Ecore_X.h
+++ b/src/lib/ecore_x/Ecore_X.h
@@ -66,6 +66,12 @@ typedef void Ecore_X_Connection;
typedef void Ecore_X_Screen;
typedef Ecore_X_ID Ecore_X_Sync_Counter;
typedef Ecore_X_ID Ecore_X_Sync_Alarm;
+typedef void Ecore_X_XRegion;
+
+typedef Ecore_X_ID Ecore_X_Randr_Output;
+typedef Ecore_X_ID Ecore_X_Randr_Crtc;
+typedef Ecore_X_ID Ecore_X_Randr_Mode;
+typedef unsigned short Ecore_X_Randr_Size_ID;
#ifdef __cplusplus
extern "C" {
@@ -168,6 +174,21 @@ typedef enum _Ecore_X_Randr_Rotation {
ECORE_X_RANDR_FLIP_Y = (1 << 5)
} Ecore_X_Randr_Rotation;
+typedef enum _Ecore_X_Randr_Connection {
+ ECORE_X_RANDR_CONNECTED = 0,
+ ECORE_X_RANDR_DISCONNECTED = 1,
+ ECORE_X_RANDR_UNKNOWN_CONNECTION = 2
+} Ecore_X_Randr_Connection;
+
+typedef enum _Ecore_X_Render_Subpixel_Order {
+ ECORE_X_RENDER_SUBPIXEL_ORDER_UNKNOWN = 0,
+ ECORE_X_RENDER_SUBPIXEL_ORDER_HORIZONTAL_RGB = 1,
+ ECORE_X_RENDER_SUBPIXEL_ORDER_HORIZONTAL_BGR = 2,
+ ECORE_X_RENDER_SUBPIXEL_ORDER_VERTICAL_RGB = 3,
+ ECORE_X_RENDER_SUBPIXEL_ORDER_VERTICAL_BGR = 4,
+ ECORE_X_RENDER_SUBPIXEL_ORDER_NONE = 5
+} Ecore_X_Render_Subpixel_Order;
+
#define ECORE_X_SELECTION_TARGET_TARGETS "TARGETS"
#define ECORE_X_SELECTION_TARGET_TEXT "TEXT"
#define ECORE_X_SELECTION_TARGET_COMPOUND_TEXT "COMPOUND_TEXT"
@@ -299,6 +320,9 @@ typedef struct _Ecore_X_Event_Screensaver_Notify Ecore_X_Event_Screensaver
typedef struct _Ecore_X_Event_Sync_Counter Ecore_X_Event_Sync_Counter;
typedef struct _Ecore_X_Event_Sync_Alarm Ecore_X_Event_Sync_Alarm;
typedef struct _Ecore_X_Event_Screen_Change Ecore_X_Event_Screen_Change;
+typedef struct _Ecore_X_Event_Randr_Crtc_Change Ecore_X_Event_Randr_Crtc_Change;
+typedef struct _Ecore_X_Event_Randr_Output_Change Ecore_X_Event_Randr_Output_Change;
+typedef struct _Ecore_X_Event_Randr_Output_Property_Notify Ecore_X_Event_Randr_Output_Property_Notify;
typedef struct _Ecore_X_Event_Window_Delete_Request Ecore_X_Event_Window_Delete_Request;
typedef struct _Ecore_X_Event_Window_Prop_Title_Change Ecore_X_Event_Window_Prop_Title_Change;
@@ -647,8 +671,49 @@ struct _Ecore_X_Event_Sync_Alarm
struct _Ecore_X_Event_Screen_Change
{
- Ecore_X_Window win, root;
- int width, height;
+ Ecore_X_Window win;
+ Ecore_X_Window root;
+ int width;
+ int height;
+ Ecore_X_Time time;
+ Ecore_X_Time config_time;
+ int mm_width; /* in millimeters */
+ int mm_height; /* in millimeters */
+ Ecore_X_Randr_Rotation rotation;
+ Ecore_X_Render_Subpixel_Order subpixel_order;
+ Ecore_X_Randr_Size_ID size_id;
+};
+
+struct _Ecore_X_Event_Randr_Crtc_Change
+{
+ Ecore_X_Window win;
+ Ecore_X_Randr_Crtc crtc;
+ Ecore_X_Randr_Mode mode;
+ Ecore_X_Randr_Rotation rotation;
+ int x;
+ int y;
+ int width;
+ int height;
+};
+
+struct _Ecore_X_Event_Randr_Output_Change
+{
+ Ecore_X_Window win;
+ Ecore_X_Randr_Output output;
+ Ecore_X_Randr_Crtc crtc;
+ Ecore_X_Randr_Mode mode;
+ Ecore_X_Randr_Rotation rotation;
+ Ecore_X_Randr_Connection connection;
+ Ecore_X_Render_Subpixel_Order subpixel_order;
+};
+
+struct _Ecore_X_Event_Randr_Output_Property_Notify
+{
+ Ecore_X_Window win;
+ Ecore_X_Randr_Output output;
+ Ecore_X_Atom property;
+ Ecore_X_Time time;
+ int state; /* NewValue, Deleted */
};
struct _Ecore_X_Event_Window_Delete_Request
@@ -792,6 +857,9 @@ EAPI extern int ECORE_X_EVENT_SCREENSAVER_NOTIFY;
EAPI extern int ECORE_X_EVENT_SYNC_COUNTER;
EAPI extern int ECORE_X_EVENT_SYNC_ALARM;
EAPI extern int ECORE_X_EVENT_SCREEN_CHANGE;
+EAPI extern int ECORE_X_EVENT_RANDR_CRTC_CHANGE;
+EAPI extern int ECORE_X_EVENT_RANDR_OUTPUT_CHANGE;
+EAPI extern int ECORE_X_EVENT_RANDR_OUTPUT_PROPERTY_NOTIFY;
EAPI extern int ECORE_X_EVENT_DAMAGE_NOTIFY;
EAPI extern int ECORE_X_EVENT_WINDOW_DELETE_REQUEST;
@@ -1192,13 +1260,13 @@ EAPI void ecore_x_window_shape_events_select(Ecore_X_Window win, i
EAPI void ecore_x_window_shape_input_mask_set(Ecore_X_Window win, Ecore_X_Pixmap mask);
EAPI Ecore_X_Pixmap ecore_x_pixmap_new(Ecore_X_Window win, int w, int h, int dep);
-EAPI void ecore_x_pixmap_del(Ecore_X_Pixmap pmap);
+EAPI void ecore_x_pixmap_free(Ecore_X_Pixmap pmap);
EAPI void ecore_x_pixmap_paste(Ecore_X_Pixmap pmap, Ecore_X_Drawable dest, Ecore_X_GC gc, int sx, int sy, int w, int h, int dx, int dy);
EAPI void ecore_x_pixmap_geometry_get(Ecore_X_Pixmap pmap, int *x, int *y, int *w, int *h);
EAPI int ecore_x_pixmap_depth_get(Ecore_X_Pixmap pmap);
EAPI Ecore_X_GC ecore_x_gc_new(Ecore_X_Drawable draw, Ecore_X_GC_Value_Mask value_mask, const unsigned int *value_list);
-EAPI void ecore_x_gc_del(Ecore_X_GC gc);
+EAPI void ecore_x_gc_free(Ecore_X_GC gc);
EAPI int ecore_x_client_message32_send(Ecore_X_Window win, Ecore_X_Atom type, Ecore_X_Event_Mask mask, long d0, long d1, long d2, long d3, long d4);
EAPI int ecore_x_client_message8_send(Ecore_X_Window win, Ecore_X_Atom type, const void *data, int len);
@@ -1211,6 +1279,7 @@ EAPI void ecore_x_drawable_geometry_get_fetch(void);
EAPI void ecore_x_drawable_geometry_get(Ecore_X_Drawable d, int *x, int *y, int *w, int *h);
EAPI int ecore_x_drawable_border_width_get(Ecore_X_Drawable d);
EAPI int ecore_x_drawable_depth_get(Ecore_X_Drawable d);
+EAPI void ecore_x_drawable_rectangle_fill(Ecore_X_Drawable d, Ecore_X_GC gc, int x, int y, int width, int height);
EAPI int ecore_x_cursor_color_supported_get(void);
EAPI Ecore_X_Cursor ecore_x_cursor_new(Ecore_X_Window win, int *pixels, int w, int h, int hot_x, int hot_y);
@@ -1548,6 +1617,19 @@ EAPI void ecore_x_pointer_xy_get_prefetch(Ecore_X_Window window);
EAPI void ecore_x_pointer_xy_get_fetch(void);
EAPI void ecore_x_pointer_xy_get(Ecore_X_Window win, int *x, int *y);
+/* ecore_x_region.c */
+EAPI Ecore_X_XRegion *ecore_x_xregion_new();
+EAPI void ecore_x_xregion_free(Ecore_X_XRegion *region);
+EAPI int ecore_x_xregion_set(Ecore_X_XRegion *region, Ecore_X_GC gc);
+EAPI void ecore_x_xregion_translate(Ecore_X_XRegion *region, int x, int y);
+EAPI int ecore_x_xregion_intersect(Ecore_X_XRegion *dst, Ecore_X_XRegion *r1, Ecore_X_XRegion *r2);
+EAPI int ecore_x_xregion_union(Ecore_X_XRegion *dst, Ecore_X_XRegion *r1, Ecore_X_XRegion *r2);
+EAPI int ecore_x_xregion_union_rect(Ecore_X_XRegion *dst, Ecore_X_XRegion *src, Ecore_X_Rectangle *rect);
+EAPI int ecore_x_xregion_subtract(Ecore_X_XRegion *dst, Ecore_X_XRegion *r1, Ecore_X_XRegion *r2);
+EAPI int ecore_x_xregion_is_empty(Ecore_X_XRegion *region);
+EAPI int ecore_x_xregion_point_contain(Ecore_X_XRegion *region, int x, int y);
+EAPI int ecore_x_xregion_rect_contain(Ecore_X_XRegion *region, Ecore_X_Rectangle *rect);
+
/* ecore_x_sync.c */
EAPI Ecore_X_Sync_Alarm ecore_x_sync_alarm_new(Ecore_X_Sync_Counter counter);
EAPI int ecore_x_sync_alarm_free(Ecore_X_Sync_Alarm alarm);
@@ -1565,7 +1647,7 @@ struct _Ecore_X_Screen_Refresh_Rate
int rate;
};
-EAPI int ecore_x_randr_query();
+EAPI int ecore_x_randr_query(void);
EAPI int ecore_x_randr_events_select(Ecore_X_Window win, int on);
EAPI void ecore_x_randr_get_screen_info_prefetch(Ecore_X_Window window);
EAPI void ecore_x_randr_get_screen_info_fetch(void);
@@ -1597,7 +1679,7 @@ EAPI Ecore_X_Region ecore_x_region_new_from_bitmap(Ecore_X_Pixmap bitmap);
EAPI Ecore_X_Region ecore_x_region_new_from_window(Ecore_X_Window win, Ecore_X_Region_Type type);
EAPI Ecore_X_Region ecore_x_region_new_from_gc(Ecore_X_GC gc);
EAPI Ecore_X_Region ecore_x_region_new_from_picture(Ecore_X_Picture picture);
-EAPI void ecore_x_region_del(Ecore_X_Region region);
+EAPI void ecore_x_region_free(Ecore_X_Region region);
EAPI void ecore_x_region_set(Ecore_X_Region region, Ecore_X_Rectangle *rects, int num);
EAPI void ecore_x_region_copy(Ecore_X_Region dest, Ecore_X_Region source);
EAPI void ecore_x_region_combine(Ecore_X_Region dest, Ecore_X_Region source1, Ecore_X_Region source2);
@@ -1646,7 +1728,7 @@ typedef struct _Ecore_X_Event_Damage Ecore_X_Event_Damage;
EAPI int ecore_x_damage_query(void);
EAPI Ecore_X_Damage ecore_x_damage_new(Ecore_X_Drawable d, Ecore_X_Damage_Report_Level level);
-EAPI void ecore_x_damage_del(Ecore_X_Damage damage);
+EAPI void ecore_x_damage_free(Ecore_X_Damage damage);
EAPI void ecore_x_damage_subtract(Ecore_X_Damage damage, Ecore_X_Region repair, Ecore_X_Region parts);
EAPI int ecore_x_screen_is_composited(int screen);
diff --git a/src/lib/ecore_x/xcb/Makefile.am b/src/lib/ecore_x/xcb/Makefile.am
index 5e46fb2..a9c110a 100644
--- a/src/lib/ecore_x/xcb/Makefile.am
+++ b/src/lib/ecore_x/xcb/Makefile.am
@@ -47,6 +47,7 @@ ecore_xcb_mwm.c \
ecore_xcb_netwm.c \
ecore_xcb_pixmap.c \
ecore_xcb_randr.c \
+ecore_xcb_region.c \
ecore_xcb_reply.c \
ecore_xcb_screensaver.c \
ecore_xcb_selection.c \
diff --git a/src/lib/ecore_x/xcb/Makefile.in b/src/lib/ecore_x/xcb/Makefile.in
index 7fd105c..832e50d 100644
--- a/src/lib/ecore_x/xcb/Makefile.in
+++ b/src/lib/ecore_x/xcb/Makefile.in
@@ -58,7 +58,7 @@ am__libecore_x_xcb_la_SOURCES_DIST = ecore_xcb_atom.c \
ecore_xcb_e.c ecore_xcb_events.c ecore_xcb_fixes.c \
ecore_xcb_gc.c ecore_xcb_icccm.c ecore_xcb_mwm.c \
ecore_xcb_netwm.c ecore_xcb_pixmap.c ecore_xcb_randr.c \
- ecore_xcb_reply.c ecore_xcb_screensaver.c \
+ ecore_xcb_region.c ecore_xcb_reply.c ecore_xcb_screensaver.c \
ecore_xcb_selection.c ecore_xcb_shape.c ecore_xcb_sync.c \
ecore_xcb_window.c ecore_xcb_window_prop.c \
ecore_xcb_window_shadow.c ecore_xcb_xinerama.c ecore_xcb.c
@@ -72,7 +72,7 @@ am__libecore_x_xcb_la_SOURCES_DIST = ecore_xcb_atom.c \
@BUILD_ECORE_X_XCB_TRUE@ ecore_xcb_gc.lo ecore_xcb_icccm.lo \
@BUILD_ECORE_X_XCB_TRUE@ ecore_xcb_mwm.lo ecore_xcb_netwm.lo \
@BUILD_ECORE_X_XCB_TRUE@ ecore_xcb_pixmap.lo ecore_xcb_randr.lo \
- at BUILD_ECORE_X_XCB_TRUE@ ecore_xcb_reply.lo \
+ at BUILD_ECORE_X_XCB_TRUE@ ecore_xcb_region.lo ecore_xcb_reply.lo \
@BUILD_ECORE_X_XCB_TRUE@ ecore_xcb_screensaver.lo \
@BUILD_ECORE_X_XCB_TRUE@ ecore_xcb_selection.lo \
@BUILD_ECORE_X_XCB_TRUE@ ecore_xcb_shape.lo ecore_xcb_sync.lo \
@@ -442,6 +442,7 @@ MAINTAINERCLEANFILES = Makefile.in
@BUILD_ECORE_X_XCB_TRUE at ecore_xcb_netwm.c \
@BUILD_ECORE_X_XCB_TRUE at ecore_xcb_pixmap.c \
@BUILD_ECORE_X_XCB_TRUE at ecore_xcb_randr.c \
+ at BUILD_ECORE_X_XCB_TRUE@ecore_xcb_region.c \
@BUILD_ECORE_X_XCB_TRUE at ecore_xcb_reply.c \
@BUILD_ECORE_X_XCB_TRUE at ecore_xcb_screensaver.c \
@BUILD_ECORE_X_XCB_TRUE at ecore_xcb_selection.c \
@@ -542,6 +543,7 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/ecore_xcb_netwm.Plo at am__quote@
@AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/ecore_xcb_pixmap.Plo at am__quote@
@AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/ecore_xcb_randr.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/ecore_xcb_region.Plo at am__quote@
@AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/ecore_xcb_reply.Plo at am__quote@
@AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/ecore_xcb_screensaver.Plo at am__quote@
@AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/ecore_xcb_selection.Plo at am__quote@
diff --git a/src/lib/ecore_x/xcb/ecore_xcb_damage.c b/src/lib/ecore_x/xcb/ecore_xcb_damage.c
index d5b0c66..6e104b3 100644
--- a/src/lib/ecore_x/xcb/ecore_xcb_damage.c
+++ b/src/lib/ecore_x/xcb/ecore_xcb_damage.c
@@ -103,7 +103,7 @@ ecore_x_damage_new(Ecore_X_Drawable drawable,
* @ingroup Ecore_X_Damage_Group
*/
EAPI void
-ecore_x_damage_del(Ecore_X_Damage damage)
+ecore_x_damage_free(Ecore_X_Damage damage)
{
#ifdef ECORE_XCB_DAMAGE
xcb_damage_destroy(_ecore_xcb_conn, damage);
diff --git a/src/lib/ecore_x/xcb/ecore_xcb_drawable.c b/src/lib/ecore_x/xcb/ecore_xcb_drawable.c
index 3a1bb5b..75b6911 100644
--- a/src/lib/ecore_x/xcb/ecore_xcb_drawable.c
+++ b/src/lib/ecore_x/xcb/ecore_xcb_drawable.c
@@ -127,3 +127,24 @@ ecore_x_drawable_depth_get(Ecore_X_Drawable drawable __UNUSED__)
return reply->depth;
}
+
+/**
+ * Fill the specified rectangle on a drawable.
+ * @param d The given drawable.
+ * @param gc The graphic context that controls the fill rules.
+ * @param x The X coordinate of the top-left corner of the rectangle.
+ * @param y The Y coordinate of the top-left corner of the rectangle.
+ * @param width The width of the rectangle.
+ * @param height The height of the rectangle.
+ */
+EAPI void
+ecore_x_drawable_rectangle_fill(Ecore_X_Drawable d, Ecore_X_GC gc, int x, int y, int width, int height)
+{
+ xcb_rectangle_t rectangle;
+
+ rectangle.x = x;
+ rectangle.y = y;
+ rectangle.width = width;
+ rectangle.height = height;
+ xcb_poly_fill_rectangle(_ecore_xcb_conn, d, gc, 1, &rectangle);
+}
diff --git a/src/lib/ecore_x/xcb/ecore_xcb_fixes.c b/src/lib/ecore_x/xcb/ecore_xcb_fixes.c
index db3d462..d4014d4 100644
--- a/src/lib/ecore_x/xcb/ecore_xcb_fixes.c
+++ b/src/lib/ecore_x/xcb/ecore_xcb_fixes.c
@@ -197,7 +197,7 @@ ecore_x_region_new_from_picture(Ecore_X_Picture picture)
* @ingroup Ecore_X_Fixes_Group
*/
EAPI void
-ecore_x_region_del(Ecore_X_Region region)
+ecore_x_region_free(Ecore_X_Region region)
{
#ifdef ECORE_XCB_FIXES
xcb_xfixes_destroy_region(_ecore_xcb_conn, region);
diff --git a/src/lib/ecore_x/xcb/ecore_xcb_gc.c b/src/lib/ecore_x/xcb/ecore_xcb_gc.c
index 826f3b5..83d019b 100644
--- a/src/lib/ecore_x/xcb/ecore_xcb_gc.c
+++ b/src/lib/ecore_x/xcb/ecore_xcb_gc.c
@@ -42,7 +42,7 @@ ecore_x_gc_new(Ecore_X_Drawable drawable, Ecore_X_GC_Value_Mask value_mask, cons
* storage.
*/
EAPI void
-ecore_x_gc_del(Ecore_X_GC gc)
+ecore_x_gc_free(Ecore_X_GC gc)
{
xcb_free_gc(_ecore_xcb_conn, gc);
}
diff --git a/src/lib/ecore_x/xcb/ecore_xcb_pixmap.c b/src/lib/ecore_x/xcb/ecore_xcb_pixmap.c
index f976f93..11a7675 100644
--- a/src/lib/ecore_x/xcb/ecore_xcb_pixmap.c
+++ b/src/lib/ecore_x/xcb/ecore_xcb_pixmap.c
@@ -52,7 +52,7 @@ ecore_x_pixmap_new(Ecore_X_Window win,
* @ingroup Ecore_X_Pixmap_Group
*/
EAPI void
-ecore_x_pixmap_del(Ecore_X_Pixmap pmap)
+ecore_x_pixmap_free(Ecore_X_Pixmap pmap)
{
xcb_free_pixmap(_ecore_xcb_conn, pmap);
}
diff --git a/src/lib/ecore_x/xcb/ecore_xcb_region.c b/src/lib/ecore_x/xcb/ecore_xcb_region.c
new file mode 100644
index 0000000..ec2847c
--- /dev/null
+++ b/src/lib/ecore_x/xcb/ecore_xcb_region.c
@@ -0,0 +1,170 @@
+/*
+ * vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
+ */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include "ecore_x_private.h"
+
+
+/*
+ * [x] XCreateRegion
+ * [ ] XPolygonRegion
+ * [x] XSetRegion
+ * [x] XDestroyRegion
+ *
+ * [x] XOffsetRegion
+ * [ ] XShrinkRegion
+ *
+ * [ ] XClipBox
+ * [x] XIntersectRegion
+ * [x] XUnionRegion
+ * [x] XUnionRectWithRegion
+ * [x] XSubtractRegion
+ * [ ] XXorRegion
+ *
+ * [x] XEmptyRegion
+ * [x] XEqualRegion
+ *
+ * [x] XPointInRegion
+ * [x] XRectInRegion
+ */
+
+EAPI Ecore_X_XRegion *
+ecore_x_xregion_new()
+{
+ pixman_region16_t *region;
+
+ region = (pixman_region16_t *)malloc (sizeof (pixman_region16_t));
+ if (!region)
+ return NULL;
+
+ pixman_region_init(region);
+
+ return (Ecore_X_XRegion *)region;
+}
+
+EAPI void
+ecore_x_xregion_free(Ecore_X_XRegion *region)
+{
+ if (!region)
+ return;
+
+ pixman_region_fini(region);
+ free(region);
+}
+
+EAPI int
+ecore_x_xregion_set(Ecore_X_XRegion *region, Ecore_X_GC gc)
+{
+ xcb_rectangle_t *rects;
+ pixman_box16_t *boxes;
+ int num;
+
+ if (!region)
+ return 0;
+
+ boxes = pixman_region_rectangles ((pixman_region16_t *)region, &num);
+
+ if (!boxes || (num == 0))
+ return 0;
+
+ rects = (xcb_rectangle_t *)malloc(sizeof(xcb_rectangle_t) * num);
+ if (!rects)
+ return 0;
+
+ for (i = 0; i < num; i++)
+ {
+ rects[i].x = boxes[i].x1;
+ rects[i].y = boxes[i].y1;
+ rects[i].width = boxes[i].x2 - boxes[i].x1 + 1;
+ rects[i].height = boxes[i].y2 - boxes[i].y1 + 1;
+ }
+
+ xcb_set_clip_rectangles(_ecore_x_connection,
+ XCB_CLIP_ORDERING_YX_BANDED,
+ gc,
+ 0, 0,
+ num,
+ rects);
+ return 1;
+}
+
+EAPI void
+ecore_x_xregion_translate(Ecore_X_XRegion *region, int x, int y)
+{
+ if (!region)
+ return;
+
+ pixman_region_translate((pixman_region16_t *)region, x, y);
+}
+
+EAPI int
+ecore_x_xregion_intersect(Ecore_X_XRegion *dst, Ecore_X_XRegion *r1, Ecore_X_XRegion *r2)
+{
+ return pixman_region_intersect((pixman_region16_t *)dst, (pixman_region16_t *)r1, (pixman_region16_t *)r2);
+}
+
+EAPI int
+ecore_x_xregion_union(Ecore_X_XRegion *dst, Ecore_X_XRegion *r1, Ecore_X_XRegion *r2)
+{
+ return pixman_region_union((pixman_region16_t *)dst, (pixman_region16_t *)r1, (pixman_region16_t *)r2);
+}
+
+EAPI int
+ecore_x_xregion_union_rect(Ecore_X_XRegion *dst, Ecore_X_XRegion *src, Ecore_X_Rectangle *rect)
+{
+ return pixman_region_union_rect((pixman_region16_t *)dst, (pixman_region16_t *)src,
+ rect->x, rect->y, rect->width, rect->height);
+}
+
+EAPI int
+ecore_x_xregion_subtract(Ecore_X_XRegion *dst, Ecore_X_XRegion *r1, Ecore_X_XRegion *r2)
+{
+ return pixman_region_subtract((pixman_region16_t *)dst, (pixman_region16_t *)rm, (pixman_region16_t *)rs);
+}
+
+EAPI int
+ecore_x_xregion_is_empty(Ecore_X_XRegion *region)
+{
+ if (!region)
+ return 1;
+
+ return !pixman_region_not_empty((pixman_region16_t *)region);
+}
+
+EAPI int
+ecore_x_xregion_is_empty(Ecore_X_XRegion *r1, Ecore_X_XRegion *r2)
+{
+ if (!r1 || !r2)
+ return 0;
+
+ return pixman_region_equal((pixman_region16_t *)r1, (pixman_region16_t *)r2);
+}
+
+EAPI int
+ecore_x_xregion_point_contain(Ecore_X_XRegion *region, int x, int y)
+{
+ if (!region)
+ return 0;
+
+ return pixman_region_contains_point((pixman_region16_t *)region, x, y);
+}
+
+EAPI int
+ecore_x_xregion_rect_contain(Ecore_X_XRegion *region, Ecore_X_Rectangle *rect)
+{
+ pixman_box16_t box;
+
+ if (!region || !rect)
+ return 0;
+
+ box.x1 = rect->x;
+ box.y1 = rect->y;
+ box.x2 = rect->x + rect->width - 1;
+ box.y2 = rect->y + rect->height - 1;
+
+ return pixman_region_contains_rectangle((pixman_region16_t *)region, &box);
+}
diff --git a/src/lib/ecore_x/xlib/Makefile.am b/src/lib/ecore_x/xlib/Makefile.am
index e9cfbf3..da19a96 100644
--- a/src/lib/ecore_x/xlib/Makefile.am
+++ b/src/lib/ecore_x/xlib/Makefile.am
@@ -56,7 +56,8 @@ ecore_x_dpms.c \
ecore_x_drawable.c \
ecore_x_cursor.c \
ecore_x_test.c \
-ecore_x_atoms.c
+ecore_x_atoms.c \
+ecore_x_region.c
libecore_x_xlib_la_LIBADD = \
@Xcursor_libs@ \
diff --git a/src/lib/ecore_x/xlib/Makefile.in b/src/lib/ecore_x/xlib/Makefile.in
index 6815f18..30fdf5e 100644
--- a/src/lib/ecore_x/xlib/Makefile.in
+++ b/src/lib/ecore_x/xlib/Makefile.in
@@ -60,7 +60,7 @@ am__libecore_x_xlib_la_SOURCES_DIST = ecore_x.c ecore_x_dnd.c \
ecore_x_window_prop.c ecore_x_window_shape.c ecore_x_pixmap.c \
ecore_x_gc.c ecore_x_xinerama.c ecore_x_screensaver.c \
ecore_x_dpms.c ecore_x_drawable.c ecore_x_cursor.c \
- ecore_x_test.c ecore_x_atoms.c
+ ecore_x_test.c ecore_x_atoms.c ecore_x_region.c
@BUILD_ECORE_X_XLIB_TRUE at am_libecore_x_xlib_la_OBJECTS = ecore_x.lo \
@BUILD_ECORE_X_XLIB_TRUE@ ecore_x_dnd.lo ecore_x_sync.lo \
@BUILD_ECORE_X_XLIB_TRUE@ ecore_x_randr.lo ecore_x_fixes.lo \
@@ -77,7 +77,7 @@ am__libecore_x_xlib_la_SOURCES_DIST = ecore_x.c ecore_x_dnd.c \
@BUILD_ECORE_X_XLIB_TRUE@ ecore_x_screensaver.lo \
@BUILD_ECORE_X_XLIB_TRUE@ ecore_x_dpms.lo ecore_x_drawable.lo \
@BUILD_ECORE_X_XLIB_TRUE@ ecore_x_cursor.lo ecore_x_test.lo \
- at BUILD_ECORE_X_XLIB_TRUE@ ecore_x_atoms.lo
+ at BUILD_ECORE_X_XLIB_TRUE@ ecore_x_atoms.lo ecore_x_region.lo
libecore_x_xlib_la_OBJECTS = $(am_libecore_x_xlib_la_OBJECTS)
libecore_x_xlib_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
@@ -449,7 +449,8 @@ MAINTAINERCLEANFILES = Makefile.in
@BUILD_ECORE_X_XLIB_TRUE at ecore_x_drawable.c \
@BUILD_ECORE_X_XLIB_TRUE at ecore_x_cursor.c \
@BUILD_ECORE_X_XLIB_TRUE at ecore_x_test.c \
- at BUILD_ECORE_X_XLIB_TRUE@ecore_x_atoms.c
+ at BUILD_ECORE_X_XLIB_TRUE@ecore_x_atoms.c \
+ at BUILD_ECORE_X_XLIB_TRUE@ecore_x_region.c
@BUILD_ECORE_X_XLIB_TRUE at libecore_x_xlib_la_LIBADD = \
@BUILD_ECORE_X_XLIB_TRUE@@Xcursor_libs@ \
@@ -541,6 +542,7 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/ecore_x_netwm.Plo at am__quote@
@AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/ecore_x_pixmap.Plo at am__quote@
@AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/ecore_x_randr.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/ecore_x_region.Plo at am__quote@
@AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/ecore_x_screensaver.Plo at am__quote@
@AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/ecore_x_selection.Plo at am__quote@
@AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/ecore_x_sync.Plo at am__quote@
diff --git a/src/lib/ecore_x/xlib/ecore_x.c b/src/lib/ecore_x/xlib/ecore_x.c
index 5dd7938..3b033e3 100644
--- a/src/lib/ecore_x/xlib/ecore_x.c
+++ b/src/lib/ecore_x/xlib/ecore_x.c
@@ -93,7 +93,9 @@ EAPI int ECORE_X_EVENT_SYNC_COUNTER = 0;
EAPI int ECORE_X_EVENT_SYNC_ALARM = 0;
EAPI int ECORE_X_EVENT_SCREEN_CHANGE = 0;
EAPI int ECORE_X_EVENT_DAMAGE_NOTIFY = 0;
-
+EAPI int ECORE_X_EVENT_RANDR_CRTC_CHANGE = 0;
+EAPI int ECORE_X_EVENT_RANDR_OUTPUT_CHANGE = 0;
+EAPI int ECORE_X_EVENT_RANDR_OUTPUT_PROPERTY_NOTIFY = 0;
EAPI int ECORE_X_EVENT_WINDOW_DELETE_REQUEST = 0;
/*
EAPI int ECORE_X_EVENT_WINDOW_PROP_TITLE_CHANGE = 0;
@@ -175,19 +177,23 @@ ecore_x_init(const char *name)
if (!_ecore_x_disp) return 0;
_ecore_x_error_handler_init();
_ecore_x_event_handlers_num = LASTEvent;
-
+
+#define ECORE_X_EVENT_HANDLERS_GROW(ext_base, ext_num_events) \
+ do { \
+ if (_ecore_x_event_handlers_num < (ext_base + ext_num_events)) \
+ _ecore_x_event_handlers_num = (ext_base + ext_num_events); \
+ } while (0)
+
if (XShapeQueryExtension(_ecore_x_disp, &shape_base, &shape_err_base))
- _ecore_x_event_shape_id = shape_base + ShapeNotify;
- if (_ecore_x_event_shape_id >= _ecore_x_event_handlers_num)
- _ecore_x_event_handlers_num = _ecore_x_event_shape_id + 1;
-
+ _ecore_x_event_shape_id = shape_base;
+ ECORE_X_EVENT_HANDLERS_GROW(shape_base, ShapeNumberEvents);
+
#ifdef ECORE_XSS
if (XScreenSaverQueryExtension(_ecore_x_disp, &screensaver_base, &screensaver_err_base))
- _ecore_x_event_screensaver_id = screensaver_base + ScreenSaverNotify;
-#endif
- if (_ecore_x_event_screensaver_id >= _ecore_x_event_handlers_num)
- _ecore_x_event_handlers_num = _ecore_x_event_screensaver_id + 1;
-
+ _ecore_x_event_screensaver_id = screensaver_base;
+ ECORE_X_EVENT_HANDLERS_GROW(screensaver_base, ScreenSaverNumberEvents);
+#endif
+
if (XSyncQueryExtension(_ecore_x_disp, &sync_base, &sync_err_base))
{
int major, minor;
@@ -196,28 +202,24 @@ ecore_x_init(const char *name)
if (!XSyncInitialize(_ecore_x_disp, &major, &minor))
_ecore_x_event_sync_id = 0;
}
- if (_ecore_x_event_sync_id + XSyncAlarmNotify >= _ecore_x_event_handlers_num)
- _ecore_x_event_handlers_num = _ecore_x_event_sync_id + XSyncAlarmNotify + 1;
-
+ ECORE_X_EVENT_HANDLERS_GROW(sync_base, XSyncNumberEvents);
+
#ifdef ECORE_XRANDR
if (XRRQueryExtension(_ecore_x_disp, &randr_base, &randr_err_base))
- _ecore_x_event_randr_id = randr_base + RRScreenChangeNotify;
- if (_ecore_x_event_randr_id >= _ecore_x_event_handlers_num)
- _ecore_x_event_handlers_num = _ecore_x_event_randr_id + 1;
+ _ecore_x_event_randr_id = randr_base;
+ ECORE_X_EVENT_HANDLERS_GROW(randr_base, RRNumberEvents);
#endif
#ifdef ECORE_XFIXES
if (XFixesQueryExtension(_ecore_x_disp, &fixes_base, &fixes_err_base))
- _ecore_x_event_fixes_selection_id = fixes_base + XFixesSelectionNotify;
- if (_ecore_x_event_fixes_selection_id >= _ecore_x_event_handlers_num)
- _ecore_x_event_handlers_num = _ecore_x_event_fixes_selection_id + 1;
+ _ecore_x_event_fixes_selection_id = fixes_base;
+ ECORE_X_EVENT_HANDLERS_GROW(fixes_base, XFixesNumberEvents);
#endif
#ifdef ECORE_XDAMAGE
if (XDamageQueryExtension(_ecore_x_disp, &damage_base, &damage_err_base))
- _ecore_x_event_damage_id = damage_base + XDamageNotify;
- if (_ecore_x_event_damage_id >= _ecore_x_event_handlers_num)
- _ecore_x_event_handlers_num = _ecore_x_event_damage_id + 1;
+ _ecore_x_event_damage_id = damage_base;
+ ECORE_X_EVENT_HANDLERS_GROW(damage_base, XDamageNumberEvents);
#endif
_ecore_x_event_handlers = calloc(_ecore_x_event_handlers_num, sizeof(void *));
@@ -277,7 +279,10 @@ ecore_x_init(const char *name)
}
#ifdef ECORE_XRANDR
if (_ecore_x_event_randr_id)
- _ecore_x_event_handlers[_ecore_x_event_randr_id] = _ecore_x_event_handle_randr_change;
+ {
+ _ecore_x_event_handlers[_ecore_x_event_randr_id + RRScreenChangeNotify] = _ecore_x_event_handle_randr_change;
+ _ecore_x_event_handlers[_ecore_x_event_randr_id + RRNotify] = _ecore_x_event_handle_randr_notify;
+ }
#endif
#ifdef ECORE_XFIXES
if (_ecore_x_event_fixes_selection_id)
@@ -334,6 +339,9 @@ ecore_x_init(const char *name)
ECORE_X_EVENT_SYNC_COUNTER = ecore_event_type_new();
ECORE_X_EVENT_SYNC_ALARM = ecore_event_type_new();
ECORE_X_EVENT_SCREEN_CHANGE = ecore_event_type_new();
+ ECORE_X_EVENT_RANDR_CRTC_CHANGE = ecore_event_type_new();
+ ECORE_X_EVENT_RANDR_OUTPUT_CHANGE = ecore_event_type_new();
+ ECORE_X_EVENT_RANDR_OUTPUT_PROPERTY_NOTIFY = ecore_event_type_new();
ECORE_X_EVENT_DAMAGE_NOTIFY = ecore_event_type_new();
ECORE_X_EVENT_WINDOW_DELETE_REQUEST = ecore_event_type_new();
@@ -426,11 +434,13 @@ ecore_x_init(const char *name)
_ecore_x_damage_init();
_ecore_x_composite_init();
_ecore_x_dpms_init();
-
+ _ecore_x_randr_init();
+
_ecore_x_init_count++;
_ecore_x_private_win = ecore_x_window_override_new(0, -77, -777, 123, 456);
-
+
+#ifdef ENABLE_XIM
/* Setup XIM */
if (!_ecore_x_ic && XSupportsLocale())
{
@@ -464,7 +474,7 @@ _im_create_error:
XCloseIM(im);
}
_im_create_end:
-
+#endif
return _ecore_x_init_count;
}
@@ -474,6 +484,8 @@ _ecore_x_shutdown(int close_display)
_ecore_x_init_count--;
if (_ecore_x_init_count > 0) return _ecore_x_init_count;
if (!_ecore_x_disp) return _ecore_x_init_count;
+
+#ifdef ENABLE_XIM
if (_ecore_x_ic)
{
XIM xim;
@@ -482,6 +494,7 @@ _ecore_x_shutdown(int close_display)
XCloseIM(xim);
_ecore_x_ic = NULL;
}
+#endif
if (close_display)
XCloseDisplay(_ecore_x_disp);
else
@@ -557,6 +570,17 @@ ecore_x_fd_get(void)
}
/**
+ * Retrieves the Ecore_X_Screen handle used for the current X connection.
+ * @return The current default screen.
+ * @ingroup Ecore_Xcb_Display_Attr_Group
+ */
+EAPI Ecore_X_Screen*
+ecore_x_default_screen_get(void)
+{
+ return (Ecore_X_Screen*) DefaultScreenOfDisplay(_ecore_x_disp);
+}
+
+/**
* Sets the timeout for a double and triple clicks to be flagged.
*
* This sets the time between clicks before the double_click flag is
@@ -703,8 +727,10 @@ _ecore_x_fd_handler(void *data, Ecore_Fd_Handler *fd_handler __UNUSED__)
XNextEvent(d, &ev);
+#ifdef ENABLE_XIM
/* Filter event for XIM */
if (XFilterEvent(&ev, ev.xkey.window)) continue;
+#endif
if ((ev.type >= 0) && (ev.type < _ecore_x_event_handlers_num))
{
diff --git a/src/lib/ecore_x/xlib/ecore_x_damage.c b/src/lib/ecore_x/xlib/ecore_x_damage.c
index d8ce1e1..564b48f 100644
--- a/src/lib/ecore_x/xlib/ecore_x_damage.c
+++ b/src/lib/ecore_x/xlib/ecore_x_damage.c
@@ -51,7 +51,7 @@ ecore_x_damage_new(Ecore_X_Drawable d, Ecore_X_Damage_Report_Level level)
}
EAPI void
-ecore_x_damage_del(Ecore_X_Damage damage)
+ecore_x_damage_free(Ecore_X_Damage damage)
{
#ifdef ECORE_XDAMAGE
XDamageDestroy(_ecore_x_disp, damage);
diff --git a/src/lib/ecore_x/xlib/ecore_x_drawable.c b/src/lib/ecore_x/xlib/ecore_x_drawable.c
index 1da84de..3daa54a 100644
--- a/src/lib/ecore_x/xlib/ecore_x_drawable.c
+++ b/src/lib/ecore_x/xlib/ecore_x_drawable.c
@@ -86,3 +86,18 @@ ecore_x_drawable_depth_get(Ecore_X_Drawable d)
return (int) depth_ret;
}
+
+/**
+ * Fill the specified rectangle on a drawable.
+ * @param d The given drawable.
+ * @param gc The graphic context that controls the fill rules.
+ * @param x The X coordinate of the top-left corner of the rectangle.
+ * @param y The Y coordinate of the top-left corner of the rectangle.
+ * @param width The width of the rectangle.
+ * @param height The height of the rectangle.
+ */
+EAPI void
+ecore_x_drawable_rectangle_fill(Ecore_X_Drawable d, Ecore_X_GC gc, int x, int y, int width, int height)
+{
+ XFillRectangle(_ecore_x_disp, d, gc, x, y, width, height);
+}
diff --git a/src/lib/ecore_x/xlib/ecore_x_events.c b/src/lib/ecore_x/xlib/ecore_x_events.c
index 8838778..67f3cbe 100644
--- a/src/lib/ecore_x/xlib/ecore_x_events.c
+++ b/src/lib/ecore_x/xlib/ecore_x_events.c
@@ -1852,8 +1852,96 @@ _ecore_x_event_handle_randr_change(XEvent *xevent)
e->root = randr_event->root;
e->width = randr_event->width;
e->height = randr_event->height;
+ e->time = randr_event->timestamp;
+ e->config_time = randr_event->config_timestamp;
+ e->mm_width = randr_event->mwidth;
+ e->mm_height = randr_event->mheight;
+ e->rotation = randr_event->rotation;
+ e->subpixel_order = randr_event->subpixel_order;
ecore_event_add(ECORE_X_EVENT_SCREEN_CHANGE, e, NULL, NULL);
}
+
+static void
+_ecore_x_event_handle_randr_notify_crtc_change(const XRRNotifyEvent *xevent)
+{
+ const XRRCrtcChangeNotifyEvent *randr_event;
+ Ecore_X_Event_Randr_Crtc_Change *e;
+
+ randr_event = (const XRRCrtcChangeNotifyEvent *)xevent;
+
+ e = calloc(1, sizeof(Ecore_X_Event_Randr_Crtc_Change));
+ if (!e) return;
+ e->win = randr_event->window;
+ e->crtc = randr_event->crtc;
+ e->mode = randr_event->mode;
+ e->rotation = randr_event->rotation;
+ e->x = randr_event->x;
+ e->y = randr_event->y;
+ e->width = randr_event->width;
+ e->height = randr_event->height;
+ ecore_event_add(ECORE_X_EVENT_RANDR_CRTC_CHANGE, e, NULL, NULL);
+}
+
+static void
+_ecore_x_event_handle_randr_notify_output_change(const XRRNotifyEvent *xevent)
+{
+ const XRROutputChangeNotifyEvent *randr_event;
+ Ecore_X_Event_Randr_Output_Change *e;
+
+ randr_event = (const XRROutputChangeNotifyEvent *)xevent;
+
+ e = calloc(1, sizeof(Ecore_X_Event_Randr_Output_Change));
+ if (!e) return;
+ e->win = randr_event->window;
+ e->output = randr_event->output;
+ e->crtc = randr_event->crtc;
+ e->mode = randr_event->mode;
+ e->rotation = randr_event->rotation;
+ e->connection = randr_event->connection;
+ e->subpixel_order = randr_event->subpixel_order;
+}
+
+static void
+_ecore_x_event_handle_randr_notify_output_property(const XRRNotifyEvent *xevent)
+{
+ const XRROutputPropertyNotifyEvent *randr_event;
+ Ecore_X_Event_Randr_Output_Property_Notify *e;
+
+ randr_event = (const XRROutputPropertyNotifyEvent *)xevent;
+
+ e = calloc(1, sizeof(Ecore_X_Event_Randr_Output_Property_Notify));
+ if (!e) return;
+ e->win = randr_event->window;
+ e->output = randr_event->output;
+ e->property = randr_event->property;
+ e->time = randr_event->timestamp;
+ e->state = randr_event->state;
+}
+
+void
+_ecore_x_event_handle_randr_notify(XEvent *xevent)
+{
+ const XRRNotifyEvent *randr_event;
+
+ _ecore_x_last_event_mouse_move = 0;
+ randr_event = (const XRRNotifyEvent *)xevent;
+ switch (randr_event->subtype)
+ {
+ case RRNotify_CrtcChange:
+ _ecore_x_event_handle_randr_notify_crtc_change(randr_event);
+ break;
+ case RRNotify_OutputChange:
+ _ecore_x_event_handle_randr_notify_output_change(randr_event);
+ break;
+ case RRNotify_OutputProperty:
+ _ecore_x_event_handle_randr_notify_output_property(randr_event);
+ break;
+ default:
+ fprintf(stderr, "ERROR: unknown XRandR RRNotify subtype: %d.\n",
+ randr_event->subtype);
+ break;
+ }
+}
#endif
#ifdef ECORE_XFIXES
diff --git a/src/lib/ecore_x/xlib/ecore_x_fixes.c b/src/lib/ecore_x/xlib/ecore_x_fixes.c
index 4aeeb61..a6c6bc7 100644
--- a/src/lib/ecore_x/xlib/ecore_x_fixes.c
+++ b/src/lib/ecore_x/xlib/ecore_x_fixes.c
@@ -143,7 +143,7 @@ ecore_x_region_new_from_picture(Ecore_X_Picture picture)
}
EAPI void
-ecore_x_region_del(Ecore_X_Region region)
+ecore_x_region_free(Ecore_X_Region region)
{
#ifdef ECORE_XFIXES
XFixesDestroyRegion(_ecore_x_disp, region);
diff --git a/src/lib/ecore_x/xlib/ecore_x_gc.c b/src/lib/ecore_x/xlib/ecore_x_gc.c
index 84c4201..ef0ff58 100644
--- a/src/lib/ecore_x/xlib/ecore_x_gc.c
+++ b/src/lib/ecore_x/xlib/ecore_x_gc.c
@@ -137,7 +137,7 @@ ecore_x_gc_new(Ecore_X_Drawable draw, Ecore_X_GC_Value_Mask value_mask, const un
* @param gc The given graphics context.
*/
EAPI void
-ecore_x_gc_del(Ecore_X_GC gc)
+ecore_x_gc_free(Ecore_X_GC gc)
{
XFreeGC(_ecore_x_disp, gc);
}
diff --git a/src/lib/ecore_x/xlib/ecore_x_pixmap.c b/src/lib/ecore_x/xlib/ecore_x_pixmap.c
index 4883a3a..a6802db 100644
--- a/src/lib/ecore_x/xlib/ecore_x_pixmap.c
+++ b/src/lib/ecore_x/xlib/ecore_x_pixmap.c
@@ -46,7 +46,7 @@ ecore_x_pixmap_new(Ecore_X_Window win, int w, int h, int dep)
* @ingroup Ecore_X_Pixmap_Group
*/
EAPI void
-ecore_x_pixmap_del(Ecore_X_Pixmap pmap)
+ecore_x_pixmap_free(Ecore_X_Pixmap pmap)
{
XFreePixmap(_ecore_x_disp, pmap);
}
diff --git a/src/lib/ecore_x/xlib/ecore_x_private.h b/src/lib/ecore_x/xlib/ecore_x_private.h
index 3bd0027..3d74bdd 100644
--- a/src/lib/ecore_x/xlib/ecore_x_private.h
+++ b/src/lib/ecore_x/xlib/ecore_x_private.h
@@ -208,6 +208,7 @@ void _ecore_x_event_handle_sync_counter(XEvent *xevent);
void _ecore_x_event_handle_sync_alarm(XEvent *xevent);
#ifdef ECORE_XRANDR
void _ecore_x_event_handle_randr_change(XEvent *xevent);
+void _ecore_x_event_handle_randr_notify(XEvent *xevent);
#endif
#ifdef ECORE_XFIXES
void _ecore_x_event_handle_fixes_selection_notify(XEvent *xevent);
@@ -248,6 +249,7 @@ void _ecore_x_fixes_init(void);
void _ecore_x_damage_init(void);
void _ecore_x_composite_init(void);
void _ecore_x_dpms_init(void);
+void _ecore_x_randr_init(void);
void _ecore_x_atoms_init(void);
diff --git a/src/lib/ecore_x/xlib/ecore_x_randr.c b/src/lib/ecore_x/xlib/ecore_x_randr.c
index 4fc211e..580b49d 100644
--- a/src/lib/ecore_x/xlib/ecore_x_randr.c
+++ b/src/lib/ecore_x/xlib/ecore_x_randr.c
@@ -10,30 +10,57 @@
#include "ecore_x_private.h"
-EAPI int
-ecore_x_randr_query()
+static int _randr_available = 0;
+#ifdef ECORE_XRANDR
+static int _randr_major, _randr_minor, _randr_version;
+#define RANDR_1_2 ((1 << 16) | 2)
+#define RANDR_1_3 ((1 << 16) | 3)
+#endif
+
+void
+_ecore_x_randr_init(void)
{
#ifdef ECORE_XRANDR
- int randr_base = 0;
- int randr_err_base = 0;
+ _randr_major = 1;
+ _randr_minor = 3;
+ _randr_version = 0;
- if (XRRQueryExtension(_ecore_x_disp, &randr_base, &randr_err_base))
- return 1;
+ if (XRRQueryVersion(_ecore_x_disp, &_randr_major, &_randr_minor))
+ {
+ _randr_version = (_randr_major << 16) | _randr_minor;
+ _randr_available = 1;
+ }
else
- return 0;
+ _randr_available = 0;
#else
- return 0;
+ _randr_available = 0;
#endif
}
EAPI int
+ecore_x_randr_query(void)
+{
+ return _randr_available;
+}
+
+EAPI int
ecore_x_randr_events_select(Ecore_X_Window win, int on)
{
#ifdef ECORE_XRANDR
- if (on)
- XRRSelectInput(_ecore_x_disp, win, RRScreenChangeNotifyMask);
+ int mask;
+
+ if (!on)
+ mask = 0;
else
- XRRSelectInput(_ecore_x_disp, win, 0);
+ {
+ mask = RRScreenChangeNotifyMask;
+ if (_randr_version >= RANDR_1_2)
+ mask |= (RRCrtcChangeNotifyMask |
+ RROutputChangeNotifyMask |
+ RROutputPropertyNotifyMask);
+ }
+
+ XRRSelectInput(_ecore_x_disp, win, mask);
return 1;
#else
diff --git a/src/lib/ecore_x/xlib/ecore_x_region.c b/src/lib/ecore_x/xlib/ecore_x_region.c
new file mode 100644
index 0000000..69c7a8c
--- /dev/null
+++ b/src/lib/ecore_x/xlib/ecore_x_region.c
@@ -0,0 +1,131 @@
+/*
+ * vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
+ */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include "ecore_x_private.h"
+
+
+/*
+ * [x] XCreateRegion
+ * [ ] XPolygonRegion
+ * [x] XSetRegion
+ * [x] XDestroyRegion
+ *
+ * [x] XOffsetRegion
+ * [ ] XShrinkRegion
+ *
+ * [ ] XClipBox
+ * [x] XIntersectRegion
+ * [x] XUnionRegion
+ * [x] XUnionRectWithRegion
+ * [x] XSubtractRegion
+ * [ ] XXorRegion
+ *
+ * [x] XEmptyRegion
+ * [x] XEqualRegion
+ *
+ * [x] XPointInRegion
+ * [x] XRectInRegion
+ */
+
+EAPI Ecore_X_XRegion *
+ecore_x_xregion_new()
+{
+ return (Ecore_X_XRegion *)XCreateRegion();
+}
+
+EAPI void
+ecore_x_xregion_free(Ecore_X_XRegion *region)
+{
+ if (!region)
+ return;
+
+ XDestroyRegion((Region)region);
+}
+
+EAPI int
+ecore_x_xregion_set(Ecore_X_XRegion *region, Ecore_X_GC gc)
+{
+ return XSetRegion(_ecore_x_disp, gc, (Region)region);
+}
+
+EAPI void
+ecore_x_xregion_translate(Ecore_X_XRegion *region, int x, int y)
+{
+ if (!region)
+ return;
+
+ /* return value not used */
+ XOffsetRegion((Region)region, x, y);
+}
+
+EAPI int
+ecore_x_xregion_intersect(Ecore_X_XRegion *dst, Ecore_X_XRegion *r1, Ecore_X_XRegion *r2)
+{
+ return XIntersectRegion((Region)r1, (Region)r2, (Region)dst);
+}
+
+int
+ecore_x_xregion_union(Ecore_X_XRegion *dst, Ecore_X_XRegion *r1, Ecore_X_XRegion *r2)
+{
+ return XUnionRegion((Region)r1, (Region)r2, (Region)dst);
+}
+
+EAPI int
+ecore_x_xregion_union_rect(Ecore_X_XRegion *dst, Ecore_X_XRegion *src, Ecore_X_Rectangle *rect)
+{
+ XRectangle xr;
+
+ xr.x = rect->x;
+ xr.y = rect->y;
+ xr.width = rect->width;
+ xr.height = rect->height;
+
+ return XUnionRectWithRegion(&xr, (Region)src, (Region)dst);
+}
+
+EAPI int
+ecore_x_xregion_subtract(Ecore_X_XRegion *dst, Ecore_X_XRegion *rm, Ecore_X_XRegion *rs)
+{
+ return XSubtractRegion((Region)rm, (Region)rs, (Region)dst);
+}
+
+EAPI int
+ecore_x_xregion_is_empty(Ecore_X_XRegion *region)
+{
+ if (!region)
+ return 1;
+
+ return !XEmptyRegion((Region)region);
+}
+
+EAPI int
+ecore_x_xregion_is_equal(Ecore_X_XRegion *r1, Ecore_X_XRegion *r2)
+{
+ if (!r1 || !r2)
+ return 0;
+
+ return XEqualRegion((Region)r1, (Region)r1);
+}
+
+EAPI int
+ecore_x_xregion_point_contain(Ecore_X_XRegion *region, int x, int y)
+{
+ if (!region)
+ return 0;
+
+ return XPointInRegion((Region)region, x, y);
+}
+
+EAPI int
+ecore_x_xregion_rect_contain(Ecore_X_XRegion *region, Ecore_X_Rectangle *rect)
+{
+ if (!region || !rect)
+ return 0;
+
+ return XRectInRegion((Region)region, rect->x, rect->y, rect->width, rect->height);
+}
--
Core abstraction layer for enlightenment DR 0.17
More information about the Pkg-e-commits
mailing list