Merge remote-tracking branch 'origin/upstream'
authorMike McCormack <mj.mccormack@samsung.com>
Thu, 3 Nov 2011 01:52:42 +0000 (10:52 +0900)
committerMike McCormack <mj.mccormack@samsung.com>
Thu, 3 Nov 2011 01:59:35 +0000 (10:59 +0900)
Conflicts:
po/cs.po
src/lib/ecore_evas/Ecore_Evas.h
src/lib/ecore_evas/ecore_evas_util.c
src/lib/ecore_evas/ecore_evas_x.c
src/lib/ecore_x/Ecore_X.h
src/lib/ecore_x/Ecore_X_Atoms.h
src/lib/ecore_x/ecore_x_atoms_decl.h
src/lib/ecore_x/xlib/ecore_x_atoms.c

140 files changed:
AUTHORS
ChangeLog
Makefile.am
configure.ac
po/cs.po
po/de.po
po/el.po
po/fr.po
po/it.po
po/nl.po
po/pt.po
po/sl.po
src/lib/ecore/Ecore.h
src/lib/ecore/Ecore_Getopt.h
src/lib/ecore/ecore.c
src/lib/ecore/ecore_anim.c
src/lib/ecore/ecore_app.c
src/lib/ecore/ecore_events.c
src/lib/ecore/ecore_exe.c
src/lib/ecore/ecore_exe_win32.c
src/lib/ecore/ecore_exe_wince.c
src/lib/ecore/ecore_getopt.c
src/lib/ecore/ecore_glib.c
src/lib/ecore/ecore_idle_enterer.c
src/lib/ecore/ecore_idle_exiter.c
src/lib/ecore/ecore_idler.c
src/lib/ecore/ecore_job.c
src/lib/ecore/ecore_main.c
src/lib/ecore/ecore_pipe.c
src/lib/ecore/ecore_poll.c
src/lib/ecore/ecore_private.h
src/lib/ecore/ecore_signal.c
src/lib/ecore/ecore_thread.c
src/lib/ecore/ecore_throttle.c
src/lib/ecore/ecore_time.c
src/lib/ecore/ecore_timer.c
src/lib/ecore_cocoa/Ecore_Cocoa.h
src/lib/ecore_cocoa/ecore_cocoa.m
src/lib/ecore_cocoa/ecore_cocoa_private.h
src/lib/ecore_cocoa/ecore_cocoa_window.m
src/lib/ecore_con/ecore_con.c
src/lib/ecore_con/ecore_con_info.c
src/lib/ecore_con/ecore_con_url.c
src/lib/ecore_evas/Ecore_Evas.h
src/lib/ecore_evas/Makefile.am
src/lib/ecore_evas/ecore_evas.c
src/lib/ecore_evas/ecore_evas_buffer.c
src/lib/ecore_evas/ecore_evas_cocoa.c [new file with mode: 0644]
src/lib/ecore_evas/ecore_evas_directfb.c
src/lib/ecore_evas/ecore_evas_ews.c
src/lib/ecore_evas/ecore_evas_fb.c
src/lib/ecore_evas/ecore_evas_private.h
src/lib/ecore_evas/ecore_evas_util.c
src/lib/ecore_evas/ecore_evas_wince.c
src/lib/ecore_evas/ecore_evas_x.c
src/lib/ecore_fb/Ecore_Fb.h
src/lib/ecore_fb/Makefile.am
src/lib/ecore_fb/ecore_fb.c
src/lib/ecore_fb/ecore_fb_li.c
src/lib/ecore_fb/ecore_fb_private.h
src/lib/ecore_fb/ecore_fb_ts.c
src/lib/ecore_fb/ecore_fb_vt.c
src/lib/ecore_imf/ecore_imf_module.c
src/lib/ecore_x/Ecore_X.h
src/lib/ecore_x/Ecore_X_Atoms.h
src/lib/ecore_x/ecore_x_atoms_decl.h
src/lib/ecore_x/xcb/ecore_xcb.c
src/lib/ecore_x/xcb/ecore_xcb_atoms.c
src/lib/ecore_x/xcb/ecore_xcb_composite.c
src/lib/ecore_x/xcb/ecore_xcb_cursor.c
src/lib/ecore_x/xcb/ecore_xcb_damage.c
src/lib/ecore_x/xcb/ecore_xcb_dnd.c
src/lib/ecore_x/xcb/ecore_xcb_dpms.c
src/lib/ecore_x/xcb/ecore_xcb_drawable.c
src/lib/ecore_x/xcb/ecore_xcb_e.c
src/lib/ecore_x/xcb/ecore_xcb_error.c
src/lib/ecore_x/xcb/ecore_xcb_events.c
src/lib/ecore_x/xcb/ecore_xcb_extensions.c
src/lib/ecore_x/xcb/ecore_xcb_gc.c
src/lib/ecore_x/xcb/ecore_xcb_icccm.c
src/lib/ecore_x/xcb/ecore_xcb_image.c
src/lib/ecore_x/xcb/ecore_xcb_input.c
src/lib/ecore_x/xcb/ecore_xcb_keymap.c
src/lib/ecore_x/xcb/ecore_xcb_mwm.c
src/lib/ecore_x/xcb/ecore_xcb_netwm.c
src/lib/ecore_x/xcb/ecore_xcb_pixmap.c
src/lib/ecore_x/xcb/ecore_xcb_private.h
src/lib/ecore_x/xcb/ecore_xcb_randr.c
src/lib/ecore_x/xcb/ecore_xcb_region.c
src/lib/ecore_x/xcb/ecore_xcb_render.c
src/lib/ecore_x/xcb/ecore_xcb_screensaver.c
src/lib/ecore_x/xcb/ecore_xcb_selection.c
src/lib/ecore_x/xcb/ecore_xcb_shape.c
src/lib/ecore_x/xcb/ecore_xcb_sync.c
src/lib/ecore_x/xcb/ecore_xcb_textlist.c
src/lib/ecore_x/xcb/ecore_xcb_vsync.c
src/lib/ecore_x/xcb/ecore_xcb_window.c
src/lib/ecore_x/xcb/ecore_xcb_window_prop.c
src/lib/ecore_x/xcb/ecore_xcb_window_shadow.c
src/lib/ecore_x/xcb/ecore_xcb_window_shape.c
src/lib/ecore_x/xcb/ecore_xcb_xdefaults.c
src/lib/ecore_x/xcb/ecore_xcb_xfixes.c
src/lib/ecore_x/xcb/ecore_xcb_xinerama.c
src/lib/ecore_x/xcb/ecore_xcb_xtest.c
src/lib/ecore_x/xlib/ecore_x.c
src/lib/ecore_x/xlib/ecore_x_atoms.c
src/lib/ecore_x/xlib/ecore_x_composite.c
src/lib/ecore_x/xlib/ecore_x_cursor.c
src/lib/ecore_x/xlib/ecore_x_damage.c
src/lib/ecore_x/xlib/ecore_x_dnd.c
src/lib/ecore_x/xlib/ecore_x_dpms.c
src/lib/ecore_x/xlib/ecore_x_drawable.c
src/lib/ecore_x/xlib/ecore_x_e.c
src/lib/ecore_x/xlib/ecore_x_error.c
src/lib/ecore_x/xlib/ecore_x_events.c
src/lib/ecore_x/xlib/ecore_x_fixes.c
src/lib/ecore_x/xlib/ecore_x_gc.c
src/lib/ecore_x/xlib/ecore_x_icccm.c
src/lib/ecore_x/xlib/ecore_x_image.c
src/lib/ecore_x/xlib/ecore_x_mwm.c
src/lib/ecore_x/xlib/ecore_x_netwm.c
src/lib/ecore_x/xlib/ecore_x_pixmap.c
src/lib/ecore_x/xlib/ecore_x_private.h
src/lib/ecore_x/xlib/ecore_x_randr.c
src/lib/ecore_x/xlib/ecore_x_randr.h
src/lib/ecore_x/xlib/ecore_x_randr_11.c
src/lib/ecore_x/xlib/ecore_x_randr_12.c
src/lib/ecore_x/xlib/ecore_x_randr_12_edid.c
src/lib/ecore_x/xlib/ecore_x_randr_13.c
src/lib/ecore_x/xlib/ecore_x_region.c
src/lib/ecore_x/xlib/ecore_x_screensaver.c
src/lib/ecore_x/xlib/ecore_x_selection.c
src/lib/ecore_x/xlib/ecore_x_sync.c
src/lib/ecore_x/xlib/ecore_x_test.c
src/lib/ecore_x/xlib/ecore_x_vsync.c
src/lib/ecore_x/xlib/ecore_x_window.c
src/lib/ecore_x/xlib/ecore_x_window_prop.c
src/lib/ecore_x/xlib/ecore_x_window_shape.c
src/lib/ecore_x/xlib/ecore_x_xi2.c
src/lib/ecore_x/xlib/ecore_x_xinerama.c

diff --git a/AUTHORS b/AUTHORS
index f639625..0ab54f1 100644 (file)
--- a/AUTHORS
+++ b/AUTHORS
@@ -43,3 +43,5 @@ Daniel Juyung Seo <seojuyung2@gmail.com> <juyung.seo@samsung.com>
 Christopher 'devilhorns' Michael <cpmichael1@comcast.net>
 ChunEon Park <hermet@hermet.pe.kr>
 xlopez@igalia.com
+Rafael Antognolli <antognolli@profusion.mobi>
+Kim Yunhan <spbear@gmail.com>
index 9e0d16c..1eb472d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
 
         * Fix bug in Ecore_X generic event handling for extended event
           sizes when freeing (and allocating) the data.
+
+2011-09-29  Youness Alaoui (KaKaRoTo)
+
+        * Port ecore-con to work on systems without IPv6 support
+        * Use inet_ntop instead of getnameinfo for ecore_con_client_get_ip
+        * Added ecore-con unit test
+
+2011-10-28  Jiyoun Park
+
+        * Fix bug in Ecore_X using geometry value instead of
+          recently requested geometry value
+
+2011-10-28 Rafael Antognolli
+
+        * Make the framebuffer engine input use ecore_input_evas instead
+        of feeding evas input events directly.
+
+2011-11-02 Nicolas Aguirre
+
+       * Add support ecore_cocoa_evas engine.
+       * Fix ecore_cocoa code to correctly handle cocoa window.
index 236341e..1e482f0 100644 (file)
@@ -34,24 +34,38 @@ m4/ltoptions.m4 \
 m4/ltsugar.m4 \
 m4/ltversion.m4 \
 m4/codeset.m4 \
-m4/gettext.m4 \
-m4/glibc21.m4 \
+m4/gettext.m4* \
+m4/glibc2*.m4 \
 m4/iconv.m4 \
 m4/intdiv0.m4 \
+m4/intldir.m4 \
+m4/intl.m4 \
+m4/intlmacosx.m4 \
+m4/intmax.m4* \
 m4/inttypes_h.m4 \
 m4/inttypes.m4 \
 m4/inttypes-pri.m4 \
 m4/isc-posix.m4 \
 m4/lcmessage.m4 \
-m4/lib-ld.m4 \
+m4/lib-ld.m4* \
 m4/lib-link.m4 \
-m4/lib-prefix.m4 \
+m4/lib-prefix.m4* \
+m4/lock.m4 \
+m4/longdouble.m4* \
+m4/longlong.m4* \
 m4/nls.m4 \
-m4/po.m4 \
+m4/po.m4* \
+m4/printf-posix.m4* \
 m4/progtest.m4 \
+m4/signed.m4 \
+m4/size_max.m4* \
 m4/stdint_h.m4 \
 m4/uintmax_t.m4 \
-m4/ulonglong.m4
+m4/ulonglong.m4* \
+m4/visibility.m4 \
+m4/wchar_t.m4 \
+m4/wint_t.m4* \
+m4/xsize.m4*
 
 if HAVE_PO
 
@@ -60,11 +74,11 @@ po/boldquot.sed \
 po/en@boldquot.header \
 po/en@quot.header \
 po/insert-header.sin \
-po/Makefile.in.in \
+po/Makefile.in.in* \
 po/Makevars.template \
 po/quot.sed \
 po/remove-potcdate.sin \
-po/Rules-quot
+po/Rules-quot*
 
 endif
 
index 369749c..b441a34 100644 (file)
@@ -65,12 +65,18 @@ AM_GNU_GETTEXT_VERSION([0.17])
 m4_ifdef([AM_GNU_GETTEXT], [
 AM_GNU_GETTEXT([external])
 po_makefile_in=po/Makefile.in
-AM_CONDITIONAL([HAVE_PO], [true])
+have_po="yes"
 ],[
-AM_CONDITIONAL([HAVE_PO], [false])
+have_po="no"
 ])
 AC_SUBST(LTLIBINTL)
 
+if test "x${POSUB}" = "x" ; then
+   have_po="no"
+fi
+
+AM_CONDITIONAL([HAVE_PO], [test "x${have_po}" = "xyes"])
+
 with_max_log_level="<unset>"
 AC_ARG_WITH(internal-maximum-log-level,
    [AC_HELP_STRING([--with-internal-maximum-log-level=NUMBER],
@@ -159,6 +165,7 @@ want_ecore_evas_opengl_glew="no"
 want_ecore_evas_software_16_ddraw="no"
 want_ecore_evas_software_sdl="no"
 want_ecore_evas_gl_sdl="no"
+want_ecore_evas_gl_cocoa="no"
 want_ecore_evas_directfb="no"
 want_ecore_evas_fb="no"
 want_ecore_evas_software_16_wince="no"
@@ -199,6 +206,7 @@ case "$host_os" in
       want_ecore_cocoa="yes"
       want_ecore_evas_software_sdl="yes"
       want_ecore_evas_gl_sdl="yes"
+      want_ecore_evas_gl_cocoa="yes"
       ;;
    *)
       want_curl="yes"
@@ -220,6 +228,7 @@ case "$host_os" in
       want_ecore_evas_software_xcb="no"
       want_ecore_evas_software_sdl="yes"
       want_ecore_evas_gl_sdl="yes"
+      want_ecore_evas_gl_cocoa="no"
       want_ecore_evas_directfb="yes"
       want_ecore_evas_fb="yes"
       want_ecore_imf_xim="yes"
@@ -1116,7 +1125,7 @@ PKG_CHECK_MODULES([EVAS], [evas >= 1.0.0],
 
 ### Checks for header files
 
-AC_CHECK_HEADERS([sys/select.h])
+AC_CHECK_HEADERS([sys/select.h sys/prctl.h])
 
 EFL_CHECK_PATH_MAX
 
@@ -1151,16 +1160,36 @@ AC_CHECK_HEADER([linux/fb.h],
 
 # Cocoa header files (ecore_cocoa)
 
-cocoa_ldflags="";
+cocoa_ldflags=""
 have_cocoa="no"
 m4_ifdef([AC_PROG_OBJC], [
     if test "x${have_gnu_objc}" = "xyes" ; then
        AC_LANG_PUSH([Objective C])
-       AC_CHECK_HEADER([Cocoa/Cocoa.h],
+       LIBS_save="$LIBS"
+       LIBS="$LIBS -framework Cocoa"
+       AC_LINK_IFELSE(
+          [AC_LANG_PROGRAM(
+              [[
+#include <Cocoa/Cocoa.h>
+              ]],
+              [[
+NSWindow *window;
+window = [[NSWindow alloc]
+           initWithContentRect:NSMakeRect(0, 0, 1, 1)
+           styleMask:(NSTitledWindowMask)
+           backing:NSBackingStoreBuffered
+           defer:NO
+           screen:nil
+         ];
+              ]])],
           [
            have_cocoa="yes"
            cocoa_ldflags="-framework Cocoa"
-          ])
+          ],
+          [have_cocoa="no"])
+       LIBS="$LIBS_save"
+       AC_MSG_CHECKING([whether Cocoa framework is supported])
+       AC_MSG_RESULT([${have_cocoa}])
        AC_LANG_POP([Objective C])
     fi
 ])
@@ -1324,19 +1353,36 @@ have_curl="no"
 have_gnutls="no"
 have_openssl="no"
 have_cares="no"
+want_ipv6="yes"
+have_ipv6="no"
+
+AC_ARG_ENABLE([ipv6],
+   [AC_HELP_STRING([--disable-ipv6],
+       [disable ipv6 functionality @<:@default=detect@:>@])],
+   [
+    if test "x${enableval}" = "xyes" ; then
+       want_ipv6="yes"
+    else
+       want_ipv6="no"
+    fi],
+   [want_ipv6="auto"])
+
 if test "x${have_ecore_con}" = "xyes" ; then
 
    # Verify IPV6 availability in headers
-   have_ipv6="no"
-   AC_CHECK_TYPES([struct ipv6_mreq], [have_ipv6="yes"], [have_ipv6="no"],
-               [[
+   if test "x${want_ipv6}" != "xno" ; then
+      AC_CHECK_TYPES([struct ipv6_mreq],
+         [have_ipv6="yes"],
+         [have_ipv6="no"],
+         [[
 #ifdef HAVE_NETINET_IN_H
 # include <netinet/in.h>
 #endif
 #ifdef HAVE_WS2TCPIP_H
 # include <ws2tcpip.h>
 #endif
-        ]])
+         ]])
+   fi
 
    if test "x${have_ipv6}" = "xyes" ; then
       AC_DEFINE(HAVE_IPV6, 1, [Define if IPV6 is supported])
@@ -1674,6 +1720,14 @@ ECORE_EVAS_CHECK_MODULE([opengl-sdl],
    [${have_ecore_sdl}],
    [requirements_ecore_evas="ecore-sdl >= 1.0.0 ${requirements_ecore_evas}"])
 
+# ecore_evas_cocoa
+
+ECORE_EVAS_CHECK_MODULE([opengl-cocoa],
+   [${want_ecore_evas_gl_cocoa}],
+   [OpenGL Cocoa],
+   [${have_ecore_cocoa}],
+   [requirements_ecore_evas="ecore-cocoa >= 1.0.0 ${requirements_ecore_evas}"])
+
 # ecore_evas_directfb
 
 ECORE_EVAS_CHECK_MODULE([directfb],
@@ -1739,7 +1793,6 @@ ecore-directfb.pc
 ecore-evas.pc
 ecore-fb.pc
 ecore-file.pc
-ecore-cocoa.pc
 ecore-imf.pc
 ecore-imf-evas.pc
 ecore-ipc.pc
@@ -1748,6 +1801,7 @@ ecore-input.pc
 ecore-input-evas.pc
 ecore-win32.pc
 ecore-sdl.pc
+ecore-cocoa.pc
 ecore-wince.pc
 ecore.pc
 doc/ecore.dox
@@ -1811,6 +1865,7 @@ if test "x$have_gnutls" = "xyes" ; then
 else
   echo
 fi
+  echo "    IPv6.......................: $have_ipv6"
   echo "    GnuTLS.....................: $have_gnutls"
   echo "    CURL.......................: $have_curl"
   echo "    Local Sockets..............: $want_ecore_con_local_sockets"
@@ -1915,6 +1970,7 @@ if test "x${have_ecore_evas}" = "xyes" ; then
   echo "    OpenGL Glew................: $have_ecore_evas_opengl_glew"
   echo "    Software SDL...............: $have_ecore_evas_software_sdl"
   echo "    OpenGL SDL.................: $have_ecore_evas_opengl_sdl"
+  echo "    OpenGL Cocoa...............: $have_ecore_evas_opengl_cocoa"
   echo "    DirectFB...................: $have_ecore_evas_directfb"
   echo "    Software Framebuffer.......: $have_ecore_evas_fb"
   echo "    Software 8bit grayscale XCB: $have_ecore_evas_software_8_x11"
index 33c229a..804d6a5 100644 (file)
--- a/po/cs.po
+++ b/po/cs.po
@@ -4,7 +4,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: ecore\n"
 "Report-Msgid-Bugs-To: enlightenment-devel@lists.sourceforge.net\n"
-"POT-Creation-Date: 2011-08-12 16:02+0900\n"
+"POT-Creation-Date: 2011-11-03 10:55+0900\n"
 "PO-Revision-Date: 2009-10-27 19:35+0100\n"
 "Last-Translator: quaker66 <quaker66@gmail.com>\n"
 "Language-Team: cs <quaker66@gmail.com>\n"
@@ -13,159 +13,159 @@ msgstr ""
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
 
-#: src/lib/ecore/ecore_getopt.c:87
+#: src/lib/ecore/ecore_getopt.c:90
 msgid "Version:"
 msgstr "Verze:"
 
-#: src/lib/ecore/ecore_getopt.c:95
+#: src/lib/ecore/ecore_getopt.c:99
 msgid "Usage:"
 msgstr "Použití:"
 
-#: src/lib/ecore/ecore_getopt.c:100
+#: src/lib/ecore/ecore_getopt.c:104
 #, c-format
 msgid "%s [options]\n"
 msgstr "%s [volby]\n"
 
-#: src/lib/ecore/ecore_getopt.c:248
+#: src/lib/ecore/ecore_getopt.c:259
 msgid "Copyright:"
 msgstr "Copyright:"
 
-#: src/lib/ecore/ecore_getopt.c:259
+#: src/lib/ecore/ecore_getopt.c:271
 msgid "License:"
 msgstr "Licence:"
 
-#: src/lib/ecore/ecore_getopt.c:411
+#: src/lib/ecore/ecore_getopt.c:452
 msgid "Type: "
 msgstr "Typ: "
 
-#: src/lib/ecore/ecore_getopt.c:478
+#: src/lib/ecore/ecore_getopt.c:528
 msgid "Default: "
 msgstr "Výchozí: "
 
-#: src/lib/ecore/ecore_getopt.c:501
+#: src/lib/ecore/ecore_getopt.c:555
 msgid "Choices: "
 msgstr "Možnosti: "
 
-#: src/lib/ecore/ecore_getopt.c:598
+#: src/lib/ecore/ecore_getopt.c:656
 msgid "Options:\n"
 msgstr "Volby:\n"
 
-#: src/lib/ecore/ecore_getopt.c:718
+#: src/lib/ecore/ecore_getopt.c:781
 #, c-format
 msgid "ERROR: unknown option --%s.\n"
 msgstr "CHYBA: neznámá volba --%s.\n"
 
-#: src/lib/ecore/ecore_getopt.c:720
+#: src/lib/ecore/ecore_getopt.c:783
 #, c-format
 msgid "ERROR: unknown option -%c.\n"
 msgstr "CHYBA: neznámá volba -%c.\n"
 
-#: src/lib/ecore/ecore_getopt.c:776
+#: src/lib/ecore/ecore_getopt.c:841
 msgid "ERROR: "
 msgstr "CHYBA: "
 
-#: src/lib/ecore/ecore_getopt.c:853 src/lib/ecore/ecore_getopt.c:969
-#: src/lib/ecore/ecore_getopt.c:982 src/lib/ecore/ecore_getopt.c:994
-#: src/lib/ecore/ecore_getopt.c:1008 src/lib/ecore/ecore_getopt.c:1052
-#: src/lib/ecore/ecore_getopt.c:1160 src/lib/ecore/ecore_getopt.c:1196
+#: src/lib/ecore/ecore_getopt.c:924 src/lib/ecore/ecore_getopt.c:1061
+#: src/lib/ecore/ecore_getopt.c:1077 src/lib/ecore/ecore_getopt.c:1092
+#: src/lib/ecore/ecore_getopt.c:1109 src/lib/ecore/ecore_getopt.c:1156
+#: src/lib/ecore/ecore_getopt.c:1276 src/lib/ecore/ecore_getopt.c:1317
 msgid "value has no pointer set.\n"
 msgstr "hodnota nemá nastaven pointer.\n"
 
-#: src/lib/ecore/ecore_getopt.c:882 src/lib/ecore/ecore_getopt.c:1071
+#: src/lib/ecore/ecore_getopt.c:956 src/lib/ecore/ecore_getopt.c:1176
 #, c-format
 msgid "unknown boolean value %s.\n"
 msgstr "neznámá boolean hodnota %s.\n"
 
-#: src/lib/ecore/ecore_getopt.c:926 src/lib/ecore/ecore_getopt.c:1151
+#: src/lib/ecore/ecore_getopt.c:1007 src/lib/ecore/ecore_getopt.c:1264
 #, c-format
 msgid "invalid number format %s\n"
 msgstr "neznámý číselný formát %s\n"
 
-#: src/lib/ecore/ecore_getopt.c:1021
+#: src/lib/ecore/ecore_getopt.c:1122
 #, c-format
 msgid "invalid choice \"%s\". Valid values are: "
 msgstr "neznámá volba \"%s\". Možné hodnoty jsou: "
 
-#: src/lib/ecore/ecore_getopt.c:1046
+#: src/lib/ecore/ecore_getopt.c:1150
 msgid "missing parameter to append.\n"
 msgstr "chybějící parametr k připojení.\n"
 
-#: src/lib/ecore/ecore_getopt.c:1141
+#: src/lib/ecore/ecore_getopt.c:1254
 msgid "could not parse value.\n"
 msgstr "nemůžu parsovat hodnotu.\n"
 
-#: src/lib/ecore/ecore_getopt.c:1190
+#: src/lib/ecore/ecore_getopt.c:1311
 msgid "missing parameter.\n"
 msgstr "chybějící parametr.\n"
 
-#: src/lib/ecore/ecore_getopt.c:1203
+#: src/lib/ecore/ecore_getopt.c:1324
 msgid "missing callback function!\n"
 msgstr "chybějící callback funkce!\n"
 
-#: src/lib/ecore/ecore_getopt.c:1226
+#: src/lib/ecore/ecore_getopt.c:1353
 msgid "no version was defined.\n"
 msgstr "nebyla definována verze.\n"
 
-#: src/lib/ecore/ecore_getopt.c:1240
+#: src/lib/ecore/ecore_getopt.c:1370
 msgid "no copyright was defined.\n"
 msgstr "nebyl definován copyright.\n"
 
-#: src/lib/ecore/ecore_getopt.c:1254
+#: src/lib/ecore/ecore_getopt.c:1387
 msgid "no license was defined.\n"
 msgstr "nebyla definována licence.\n"
 
-#: src/lib/ecore/ecore_getopt.c:1308
+#: src/lib/ecore/ecore_getopt.c:1462
 #, c-format
 msgid "ERROR: unknown option --%s, ignored.\n"
 msgstr "CHYBA: neznámá volba --%s, ignoruji.\n"
 
-#: src/lib/ecore/ecore_getopt.c:1341
+#: src/lib/ecore/ecore_getopt.c:1495
 #, c-format
 msgid "ERROR: option --%s requires an argument!\n"
 msgstr "CHYBA: volba --%s vyžaduje argument!\n"
 
-#: src/lib/ecore/ecore_getopt.c:1377
+#: src/lib/ecore/ecore_getopt.c:1537
 #, c-format
 msgid "ERROR: unknown option -%c, ignored.\n"
 msgstr "CHYBA: neznámá volba -%c, ignoruji.\n"
 
-#: src/lib/ecore/ecore_getopt.c:1415
+#: src/lib/ecore/ecore_getopt.c:1575
 #, c-format
 msgid "ERROR: option -%c requires an argument!\n"
 msgstr "CHYBA: volba -%c vyžaduje argument!\n"
 
-#: src/lib/ecore/ecore_getopt.c:1614
+#: src/lib/ecore/ecore_getopt.c:1784
 msgid "ERROR: no parser provided.\n"
 msgstr "CHYBA: nebyl poskytnut parser.\n"
 
-#: src/lib/ecore/ecore_getopt.c:1619
+#: src/lib/ecore/ecore_getopt.c:1789
 msgid "ERROR: no values provided.\n"
 msgstr "CHYBA: nebyly poskytnuty hodnoty.\n"
 
-#: src/lib/ecore/ecore_getopt.c:1628
+#: src/lib/ecore/ecore_getopt.c:1798
 msgid "ERROR: no arguments provided.\n"
 msgstr "CHYBA: nebyly poskytnuty argumenty.\n"
 
-#: src/lib/ecore/ecore_getopt.c:1654
+#: src/lib/ecore/ecore_getopt.c:1824
 msgid "ERROR: invalid options found."
 msgstr "CHYBA: nalezeny neplatné volby."
 
-#: src/lib/ecore/ecore_getopt.c:1660
+#: src/lib/ecore/ecore_getopt.c:1830
 #, c-format
 msgid " See --%s.\n"
 msgstr " viz. --%s.\n"
 
-#: src/lib/ecore/ecore_getopt.c:1662
+#: src/lib/ecore/ecore_getopt.c:1832
 #, c-format
 msgid " See -%c.\n"
 msgstr " viz. -%c.\n"
 
-#: src/lib/ecore/ecore_getopt.c:1699
+#: src/lib/ecore/ecore_getopt.c:1873
 #, c-format
 msgid "ERROR: incorrect geometry value '%s'\n"
 msgstr "CHYBA: neplatná hodnota geometrie '%s'\n"
 
-#: src/lib/ecore/ecore_getopt.c:1722
+#: src/lib/ecore/ecore_getopt.c:1900
 #, c-format
 msgid "ERROR: incorrect size value '%s'\n"
 msgstr "CHYBA: neplatná hodnota velikosti '%s'\n"
index 2700dfc..882857b 100644 (file)
--- a/po/de.po
+++ b/po/de.po
@@ -8,7 +8,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: ecore 0.9.9.063-2\n"
 "Report-Msgid-Bugs-To: enlightenment-devel@lists.sourceforge.net\n"
-"POT-Creation-Date: 2011-08-12 16:02+0900\n"
+"POT-Creation-Date: 2011-11-03 10:51+0900\n"
 "PO-Revision-Date: 2010-01-03 21:52+GMT\n"
 "Last-Translator: Fabian Nowak <timystery@arcor.de>\n"
 "Language-Team: German <debian-l10n-german@lists.debian.org>\n"
@@ -17,159 +17,159 @@ msgstr ""
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
 
-#: src/lib/ecore/ecore_getopt.c:87
+#: src/lib/ecore/ecore_getopt.c:90
 msgid "Version:"
 msgstr "Version:"
 
-#: src/lib/ecore/ecore_getopt.c:95
+#: src/lib/ecore/ecore_getopt.c:99
 msgid "Usage:"
 msgstr "Aufruf:"
 
-#: src/lib/ecore/ecore_getopt.c:100
+#: src/lib/ecore/ecore_getopt.c:104
 #, c-format
 msgid "%s [options]\n"
 msgstr "%s [Optionen]\n"
 
-#: src/lib/ecore/ecore_getopt.c:248
+#: src/lib/ecore/ecore_getopt.c:259
 msgid "Copyright:"
 msgstr "Copyright:"
 
-#: src/lib/ecore/ecore_getopt.c:259
+#: src/lib/ecore/ecore_getopt.c:271
 msgid "License:"
 msgstr "Lizenz:"
 
-#: src/lib/ecore/ecore_getopt.c:411
+#: src/lib/ecore/ecore_getopt.c:452
 msgid "Type: "
 msgstr "Typ: "
 
-#: src/lib/ecore/ecore_getopt.c:478
+#: src/lib/ecore/ecore_getopt.c:528
 msgid "Default: "
 msgstr "Standard: "
 
-#: src/lib/ecore/ecore_getopt.c:501
+#: src/lib/ecore/ecore_getopt.c:555
 msgid "Choices: "
 msgstr "Auswahlmöglichkeiten: "
 
-#: src/lib/ecore/ecore_getopt.c:598
+#: src/lib/ecore/ecore_getopt.c:656
 msgid "Options:\n"
 msgstr "Optionen:\n"
 
-#: src/lib/ecore/ecore_getopt.c:718
+#: src/lib/ecore/ecore_getopt.c:781
 #, c-format
 msgid "ERROR: unknown option --%s.\n"
 msgstr "FEHLER: Unbekannte Option --%s\n"
 
-#: src/lib/ecore/ecore_getopt.c:720
+#: src/lib/ecore/ecore_getopt.c:783
 #, c-format
 msgid "ERROR: unknown option -%c.\n"
 msgstr "FEHLER: Unbekannte Option -%c\n"
 
-#: src/lib/ecore/ecore_getopt.c:776
+#: src/lib/ecore/ecore_getopt.c:841
 msgid "ERROR: "
 msgstr "FEHLER: "
 
-#: src/lib/ecore/ecore_getopt.c:853 src/lib/ecore/ecore_getopt.c:969
-#: src/lib/ecore/ecore_getopt.c:982 src/lib/ecore/ecore_getopt.c:994
-#: src/lib/ecore/ecore_getopt.c:1008 src/lib/ecore/ecore_getopt.c:1052
-#: src/lib/ecore/ecore_getopt.c:1160 src/lib/ecore/ecore_getopt.c:1196
+#: src/lib/ecore/ecore_getopt.c:924 src/lib/ecore/ecore_getopt.c:1061
+#: src/lib/ecore/ecore_getopt.c:1077 src/lib/ecore/ecore_getopt.c:1092
+#: src/lib/ecore/ecore_getopt.c:1109 src/lib/ecore/ecore_getopt.c:1156
+#: src/lib/ecore/ecore_getopt.c:1276 src/lib/ecore/ecore_getopt.c:1317
 msgid "value has no pointer set.\n"
 msgstr "kein Zeiger auf Wert gesetzt\n"
 
-#: src/lib/ecore/ecore_getopt.c:882 src/lib/ecore/ecore_getopt.c:1071
+#: src/lib/ecore/ecore_getopt.c:956 src/lib/ecore/ecore_getopt.c:1176
 #, c-format
 msgid "unknown boolean value %s.\n"
 msgstr "unbekannter boolescher Wert %s\n"
 
-#: src/lib/ecore/ecore_getopt.c:926 src/lib/ecore/ecore_getopt.c:1151
+#: src/lib/ecore/ecore_getopt.c:1007 src/lib/ecore/ecore_getopt.c:1264
 #, c-format
 msgid "invalid number format %s\n"
 msgstr "ungültiges Zahlenformat %s\n"
 
-#: src/lib/ecore/ecore_getopt.c:1021
+#: src/lib/ecore/ecore_getopt.c:1122
 #, c-format
 msgid "invalid choice \"%s\". Valid values are: "
 msgstr "ungültige Auswahl \"%s\". Gültige Werte sind: "
 
-#: src/lib/ecore/ecore_getopt.c:1046
+#: src/lib/ecore/ecore_getopt.c:1150
 msgid "missing parameter to append.\n"
 msgstr "fehlender Parameter zum Anhängen.\n"
 
-#: src/lib/ecore/ecore_getopt.c:1141
+#: src/lib/ecore/ecore_getopt.c:1254
 msgid "could not parse value.\n"
 msgstr "Wert kann nicht ausgewertet werden.\n"
 
-#: src/lib/ecore/ecore_getopt.c:1190
+#: src/lib/ecore/ecore_getopt.c:1311
 msgid "missing parameter.\n"
 msgstr "fehlender Parameter.\n"
 
-#: src/lib/ecore/ecore_getopt.c:1203
+#: src/lib/ecore/ecore_getopt.c:1324
 msgid "missing callback function!\n"
 msgstr "fehlende Rückruffunktion!\n"
 
-#: src/lib/ecore/ecore_getopt.c:1226
+#: src/lib/ecore/ecore_getopt.c:1353
 msgid "no version was defined.\n"
 msgstr "es wurde keine Version angegeben.\n"
 
-#: src/lib/ecore/ecore_getopt.c:1240
+#: src/lib/ecore/ecore_getopt.c:1370
 msgid "no copyright was defined.\n"
 msgstr "es wurde kein Copyright angegeben.\n"
 
-#: src/lib/ecore/ecore_getopt.c:1254
+#: src/lib/ecore/ecore_getopt.c:1387
 msgid "no license was defined.\n"
 msgstr "es wurde keine Lizenz angegeben.\n"
 
-#: src/lib/ecore/ecore_getopt.c:1308
+#: src/lib/ecore/ecore_getopt.c:1462
 #, c-format
 msgid "ERROR: unknown option --%s, ignored.\n"
 msgstr "FEHLER: Unbekannte Option --%s, ignoriert\n"
 
-#: src/lib/ecore/ecore_getopt.c:1341
+#: src/lib/ecore/ecore_getopt.c:1495
 #, c-format
 msgid "ERROR: option --%s requires an argument!\n"
 msgstr "FEHLER: Option --%s benötigt ein Argument!\n"
 
-#: src/lib/ecore/ecore_getopt.c:1377
+#: src/lib/ecore/ecore_getopt.c:1537
 #, c-format
 msgid "ERROR: unknown option -%c, ignored.\n"
 msgstr "FEHLER: Unbekannte Option -%c, ignoriert\n"
 
-#: src/lib/ecore/ecore_getopt.c:1415
+#: src/lib/ecore/ecore_getopt.c:1575
 #, c-format
 msgid "ERROR: option -%c requires an argument!\n"
 msgstr "FEHLER: Option -%c benötigt ein Argument!\n"
 
-#: src/lib/ecore/ecore_getopt.c:1614
+#: src/lib/ecore/ecore_getopt.c:1784
 msgid "ERROR: no parser provided.\n"
 msgstr "FEHLER: Kein Parser bereitgestellt.\n"
 
-#: src/lib/ecore/ecore_getopt.c:1619
+#: src/lib/ecore/ecore_getopt.c:1789
 msgid "ERROR: no values provided.\n"
 msgstr "FEHLER: Keine Werte bereitgestellt.\n"
 
-#: src/lib/ecore/ecore_getopt.c:1628
+#: src/lib/ecore/ecore_getopt.c:1798
 msgid "ERROR: no arguments provided.\n"
 msgstr "FEHLER: Keine Argumente bereitgestellt.\n"
 
-#: src/lib/ecore/ecore_getopt.c:1654
+#: src/lib/ecore/ecore_getopt.c:1824
 msgid "ERROR: invalid options found."
 msgstr "FEHLER: Ungültige Optionen gefunden."
 
-#: src/lib/ecore/ecore_getopt.c:1660
+#: src/lib/ecore/ecore_getopt.c:1830
 #, c-format
 msgid " See --%s.\n"
 msgstr " Siehe --%s\n"
 
-#: src/lib/ecore/ecore_getopt.c:1662
+#: src/lib/ecore/ecore_getopt.c:1832
 #, c-format
 msgid " See -%c.\n"
 msgstr " Siehe -%c\n"
 
-#: src/lib/ecore/ecore_getopt.c:1699
+#: src/lib/ecore/ecore_getopt.c:1873
 #, c-format
 msgid "ERROR: incorrect geometry value '%s'\n"
 msgstr "FEHLER: Falscher Geometriewert \"%s\"\n"
 
-#: src/lib/ecore/ecore_getopt.c:1722
+#: src/lib/ecore/ecore_getopt.c:1900
 #, c-format
 msgid "ERROR: incorrect size value '%s'\n"
 msgstr "FEHLER: Falscher Größenwert \"%s\"\n"
index 62365c0..f08604e 100644 (file)
--- a/po/el.po
+++ b/po/el.po
@@ -6,7 +6,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: Ecore\n"
 "Report-Msgid-Bugs-To: enlightenment-devel@lists.sourceforge.net\n"
-"POT-Creation-Date: 2011-08-12 16:02+0900\n"
+"POT-Creation-Date: 2011-11-03 10:51+0900\n"
 "PO-Revision-Date: 2009-12-15 00:56+0200\n"
 "Last-Translator: Giorgos Koutsikos <ragecryx@yahoo.gr>\n"
 "Language-Team: Greek\n"
@@ -15,159 +15,159 @@ msgstr ""
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
 
-#: src/lib/ecore/ecore_getopt.c:87
+#: src/lib/ecore/ecore_getopt.c:90
 msgid "Version:"
 msgstr "Έκδοση:"
 
-#: src/lib/ecore/ecore_getopt.c:95
+#: src/lib/ecore/ecore_getopt.c:99
 msgid "Usage:"
 msgstr "Χρήση:"
 
-#: src/lib/ecore/ecore_getopt.c:100
+#: src/lib/ecore/ecore_getopt.c:104
 #, c-format
 msgid "%s [options]\n"
 msgstr "%s [επιλογές]\n"
 
-#: src/lib/ecore/ecore_getopt.c:248
+#: src/lib/ecore/ecore_getopt.c:259
 msgid "Copyright:"
 msgstr "Πνευματικά δικαιώματα:"
 
-#: src/lib/ecore/ecore_getopt.c:259
+#: src/lib/ecore/ecore_getopt.c:271
 msgid "License:"
 msgstr "Άδεια:"
 
-#: src/lib/ecore/ecore_getopt.c:411
+#: src/lib/ecore/ecore_getopt.c:452
 msgid "Type: "
 msgstr "Τύπος:"
 
-#: src/lib/ecore/ecore_getopt.c:478
+#: src/lib/ecore/ecore_getopt.c:528
 msgid "Default: "
 msgstr "Προκαθορισμένο:"
 
-#: src/lib/ecore/ecore_getopt.c:501
+#: src/lib/ecore/ecore_getopt.c:555
 msgid "Choices: "
 msgstr "Επιλογές:"
 
-#: src/lib/ecore/ecore_getopt.c:598
+#: src/lib/ecore/ecore_getopt.c:656
 msgid "Options:\n"
 msgstr "Επιλογές:\n"
 
-#: src/lib/ecore/ecore_getopt.c:718
+#: src/lib/ecore/ecore_getopt.c:781
 #, c-format
 msgid "ERROR: unknown option --%s.\n"
 msgstr "ΣΦΑΛΜΑ: άγνωστη παράμετρος --%s.\n"
 
-#: src/lib/ecore/ecore_getopt.c:720
+#: src/lib/ecore/ecore_getopt.c:783
 #, c-format
 msgid "ERROR: unknown option -%c.\n"
 msgstr "ΣΦΑΛΜΑ: άγνωστη παράμετρος -%c.\n"
 
-#: src/lib/ecore/ecore_getopt.c:776
+#: src/lib/ecore/ecore_getopt.c:841
 msgid "ERROR: "
 msgstr "ΣΦΑΛΜΑ:"
 
-#: src/lib/ecore/ecore_getopt.c:853 src/lib/ecore/ecore_getopt.c:969
-#: src/lib/ecore/ecore_getopt.c:982 src/lib/ecore/ecore_getopt.c:994
-#: src/lib/ecore/ecore_getopt.c:1008 src/lib/ecore/ecore_getopt.c:1052
-#: src/lib/ecore/ecore_getopt.c:1160 src/lib/ecore/ecore_getopt.c:1196
+#: src/lib/ecore/ecore_getopt.c:924 src/lib/ecore/ecore_getopt.c:1061
+#: src/lib/ecore/ecore_getopt.c:1077 src/lib/ecore/ecore_getopt.c:1092
+#: src/lib/ecore/ecore_getopt.c:1109 src/lib/ecore/ecore_getopt.c:1156
+#: src/lib/ecore/ecore_getopt.c:1276 src/lib/ecore/ecore_getopt.c:1317
 msgid "value has no pointer set.\n"
 msgstr "η τιμή δεν έχει δείκτη ορισμένο.\n"
 
-#: src/lib/ecore/ecore_getopt.c:882 src/lib/ecore/ecore_getopt.c:1071
+#: src/lib/ecore/ecore_getopt.c:956 src/lib/ecore/ecore_getopt.c:1176
 #, c-format
 msgid "unknown boolean value %s.\n"
 msgstr "άγνωστη τιμή boolean %s.\n"
 
-#: src/lib/ecore/ecore_getopt.c:926 src/lib/ecore/ecore_getopt.c:1151
+#: src/lib/ecore/ecore_getopt.c:1007 src/lib/ecore/ecore_getopt.c:1264
 #, c-format
 msgid "invalid number format %s\n"
 msgstr "άγνωστη μορφή αριθμού %s\n"
 
-#: src/lib/ecore/ecore_getopt.c:1021
+#: src/lib/ecore/ecore_getopt.c:1122
 #, c-format
 msgid "invalid choice \"%s\". Valid values are: "
 msgstr "μη-έγκυρη επιλογή \"%s\". Οι τιμές είναι: "
 
-#: src/lib/ecore/ecore_getopt.c:1046
+#: src/lib/ecore/ecore_getopt.c:1150
 msgid "missing parameter to append.\n"
 msgstr "ελλιπής παράμετρος προς επισύναψη.\n"
 
-#: src/lib/ecore/ecore_getopt.c:1141
+#: src/lib/ecore/ecore_getopt.c:1254
 msgid "could not parse value.\n"
 msgstr ""
 
-#: src/lib/ecore/ecore_getopt.c:1190
+#: src/lib/ecore/ecore_getopt.c:1311
 msgid "missing parameter.\n"
 msgstr "ελλιπής παράμετρος.\n"
 
-#: src/lib/ecore/ecore_getopt.c:1203
+#: src/lib/ecore/ecore_getopt.c:1324
 msgid "missing callback function!\n"
 msgstr ""
 
-#: src/lib/ecore/ecore_getopt.c:1226
+#: src/lib/ecore/ecore_getopt.c:1353
 msgid "no version was defined.\n"
 msgstr "δεν έχει οριστεί έκδοση.\n"
 
-#: src/lib/ecore/ecore_getopt.c:1240
+#: src/lib/ecore/ecore_getopt.c:1370
 msgid "no copyright was defined.\n"
 msgstr "δεν έχουν οριστεί πνευματικά δικαιώματα.\n"
 
-#: src/lib/ecore/ecore_getopt.c:1254
+#: src/lib/ecore/ecore_getopt.c:1387
 msgid "no license was defined.\n"
 msgstr "δεν έχει οριστεί άδεια.\n"
 
-#: src/lib/ecore/ecore_getopt.c:1308
+#: src/lib/ecore/ecore_getopt.c:1462
 #, c-format
 msgid "ERROR: unknown option --%s, ignored.\n"
 msgstr ""
 
-#: src/lib/ecore/ecore_getopt.c:1341
+#: src/lib/ecore/ecore_getopt.c:1495
 #, c-format
 msgid "ERROR: option --%s requires an argument!\n"
 msgstr ""
 
-#: src/lib/ecore/ecore_getopt.c:1377
+#: src/lib/ecore/ecore_getopt.c:1537
 #, c-format
 msgid "ERROR: unknown option -%c, ignored.\n"
 msgstr ""
 
-#: src/lib/ecore/ecore_getopt.c:1415
+#: src/lib/ecore/ecore_getopt.c:1575
 #, c-format
 msgid "ERROR: option -%c requires an argument!\n"
 msgstr ""
 
-#: src/lib/ecore/ecore_getopt.c:1614
+#: src/lib/ecore/ecore_getopt.c:1784
 msgid "ERROR: no parser provided.\n"
 msgstr ""
 
-#: src/lib/ecore/ecore_getopt.c:1619
+#: src/lib/ecore/ecore_getopt.c:1789
 msgid "ERROR: no values provided.\n"
 msgstr ""
 
-#: src/lib/ecore/ecore_getopt.c:1628
+#: src/lib/ecore/ecore_getopt.c:1798
 msgid "ERROR: no arguments provided.\n"
 msgstr ""
 
-#: src/lib/ecore/ecore_getopt.c:1654
+#: src/lib/ecore/ecore_getopt.c:1824
 msgid "ERROR: invalid options found."
 msgstr ""
 
-#: src/lib/ecore/ecore_getopt.c:1660
+#: src/lib/ecore/ecore_getopt.c:1830
 #, c-format
 msgid " See --%s.\n"
 msgstr " Δες --%s.\n"
 
-#: src/lib/ecore/ecore_getopt.c:1662
+#: src/lib/ecore/ecore_getopt.c:1832
 #, c-format
 msgid " See -%c.\n"
 msgstr " Δες -%c.\n"
 
-#: src/lib/ecore/ecore_getopt.c:1699
+#: src/lib/ecore/ecore_getopt.c:1873
 #, c-format
 msgid "ERROR: incorrect geometry value '%s'\n"
 msgstr ""
 
-#: src/lib/ecore/ecore_getopt.c:1722
+#: src/lib/ecore/ecore_getopt.c:1900
 #, c-format
 msgid "ERROR: incorrect size value '%s'\n"
 msgstr ""
index bd5fb36..410e644 100644 (file)
--- a/po/fr.po
+++ b/po/fr.po
@@ -6,7 +6,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: Ecore\n"
 "Report-Msgid-Bugs-To: enlightenment-devel@lists.sourceforge.net\n"
-"POT-Creation-Date: 2011-08-12 16:02+0900\n"
+"POT-Creation-Date: 2011-11-03 10:51+0900\n"
 "PO-Revision-Date: 2010-07-11 11:01+0400\n"
 "Last-Translator: batden <batden@orange.fr>\n"
 "Language-Team: Enlightenment French Team <pourunmondesansgourou@gmail.com>\n"
@@ -19,159 +19,159 @@ msgstr ""
 "X-Poedit-Country: FRANCE\n"
 "X-Poedit-SourceCharset: utf-8\n"
 
-#: src/lib/ecore/ecore_getopt.c:87
+#: src/lib/ecore/ecore_getopt.c:90
 msgid "Version:"
 msgstr "Version :"
 
-#: src/lib/ecore/ecore_getopt.c:95
+#: src/lib/ecore/ecore_getopt.c:99
 msgid "Usage:"
 msgstr "Usage :"
 
-#: src/lib/ecore/ecore_getopt.c:100
+#: src/lib/ecore/ecore_getopt.c:104
 #, c-format
 msgid "%s [options]\n"
 msgstr "%s [options]\n"
 
-#: src/lib/ecore/ecore_getopt.c:248
+#: src/lib/ecore/ecore_getopt.c:259
 msgid "Copyright:"
 msgstr "Copyright :"
 
-#: src/lib/ecore/ecore_getopt.c:259
+#: src/lib/ecore/ecore_getopt.c:271
 msgid "License:"
 msgstr "Licence :"
 
-#: src/lib/ecore/ecore_getopt.c:411
+#: src/lib/ecore/ecore_getopt.c:452
 msgid "Type: "
 msgstr "Type : "
 
-#: src/lib/ecore/ecore_getopt.c:478
+#: src/lib/ecore/ecore_getopt.c:528
 msgid "Default: "
 msgstr "Par défaut :"
 
-#: src/lib/ecore/ecore_getopt.c:501
+#: src/lib/ecore/ecore_getopt.c:555
 msgid "Choices: "
 msgstr "Choix :"
 
-#: src/lib/ecore/ecore_getopt.c:598
+#: src/lib/ecore/ecore_getopt.c:656
 msgid "Options:\n"
 msgstr "Options :\n"
 
-#: src/lib/ecore/ecore_getopt.c:718
+#: src/lib/ecore/ecore_getopt.c:781
 #, c-format
 msgid "ERROR: unknown option --%s.\n"
 msgstr "ERREUR : option inconnue --%s.\n"
 
-#: src/lib/ecore/ecore_getopt.c:720
+#: src/lib/ecore/ecore_getopt.c:783
 #, c-format
 msgid "ERROR: unknown option -%c.\n"
 msgstr "ERREUR : option inconnue -%c.\n"
 
-#: src/lib/ecore/ecore_getopt.c:776
+#: src/lib/ecore/ecore_getopt.c:841
 msgid "ERROR: "
 msgstr "ERREUR :"
 
-#: src/lib/ecore/ecore_getopt.c:853 src/lib/ecore/ecore_getopt.c:969
-#: src/lib/ecore/ecore_getopt.c:982 src/lib/ecore/ecore_getopt.c:994
-#: src/lib/ecore/ecore_getopt.c:1008 src/lib/ecore/ecore_getopt.c:1052
-#: src/lib/ecore/ecore_getopt.c:1160 src/lib/ecore/ecore_getopt.c:1196
+#: src/lib/ecore/ecore_getopt.c:924 src/lib/ecore/ecore_getopt.c:1061
+#: src/lib/ecore/ecore_getopt.c:1077 src/lib/ecore/ecore_getopt.c:1092
+#: src/lib/ecore/ecore_getopt.c:1109 src/lib/ecore/ecore_getopt.c:1156
+#: src/lib/ecore/ecore_getopt.c:1276 src/lib/ecore/ecore_getopt.c:1317
 msgid "value has no pointer set.\n"
 msgstr "la valeur n'a aucun pointeur défini.\n"
 
-#: src/lib/ecore/ecore_getopt.c:882 src/lib/ecore/ecore_getopt.c:1071
+#: src/lib/ecore/ecore_getopt.c:956 src/lib/ecore/ecore_getopt.c:1176
 #, c-format
 msgid "unknown boolean value %s.\n"
 msgstr "valeur booléenne inconnue %s.\n"
 
-#: src/lib/ecore/ecore_getopt.c:926 src/lib/ecore/ecore_getopt.c:1151
+#: src/lib/ecore/ecore_getopt.c:1007 src/lib/ecore/ecore_getopt.c:1264
 #, c-format
 msgid "invalid number format %s\n"
 msgstr "format du nombre non valide %s\n"
 
-#: src/lib/ecore/ecore_getopt.c:1021
+#: src/lib/ecore/ecore_getopt.c:1122
 #, c-format
 msgid "invalid choice \"%s\". Valid values are: "
 msgstr "choix non valide « %s ». Les valeurs valides sont : "
 
-#: src/lib/ecore/ecore_getopt.c:1046
+#: src/lib/ecore/ecore_getopt.c:1150
 msgid "missing parameter to append.\n"
 msgstr "paramètre manquant à ajouter.\n"
 
-#: src/lib/ecore/ecore_getopt.c:1141
+#: src/lib/ecore/ecore_getopt.c:1254
 msgid "could not parse value.\n"
 msgstr "analyse de la valeur impossible.\n"
 
-#: src/lib/ecore/ecore_getopt.c:1190
+#: src/lib/ecore/ecore_getopt.c:1311
 msgid "missing parameter.\n"
 msgstr "paramètre manquant.\n"
 
-#: src/lib/ecore/ecore_getopt.c:1203
+#: src/lib/ecore/ecore_getopt.c:1324
 msgid "missing callback function!\n"
 msgstr "fonction de rappel manquante !\n"
 
-#: src/lib/ecore/ecore_getopt.c:1226
+#: src/lib/ecore/ecore_getopt.c:1353
 msgid "no version was defined.\n"
 msgstr "aucune version n'est définie.\n"
 
-#: src/lib/ecore/ecore_getopt.c:1240
+#: src/lib/ecore/ecore_getopt.c:1370
 msgid "no copyright was defined.\n"
 msgstr "aucun copyright n'est défini.\n"
 
-#: src/lib/ecore/ecore_getopt.c:1254
+#: src/lib/ecore/ecore_getopt.c:1387
 msgid "no license was defined.\n"
 msgstr "aucune licence n'est définie.\n"
 
-#: src/lib/ecore/ecore_getopt.c:1308
+#: src/lib/ecore/ecore_getopt.c:1462
 #, c-format
 msgid "ERROR: unknown option --%s, ignored.\n"
 msgstr "ERREUR : option inconnue --%s, non prise en compte.\n"
 
-#: src/lib/ecore/ecore_getopt.c:1341
+#: src/lib/ecore/ecore_getopt.c:1495
 #, c-format
 msgid "ERROR: option --%s requires an argument!\n"
 msgstr "ERREUR : l'option --%s requiert un argument !\n"
 
-#: src/lib/ecore/ecore_getopt.c:1377
+#: src/lib/ecore/ecore_getopt.c:1537
 #, c-format
 msgid "ERROR: unknown option -%c, ignored.\n"
 msgstr "ERREUR : option inconnue -%c, non prise en compte.\n"
 
-#: src/lib/ecore/ecore_getopt.c:1415
+#: src/lib/ecore/ecore_getopt.c:1575
 #, c-format
 msgid "ERROR: option -%c requires an argument!\n"
 msgstr "ERREUR : l'option -%c requiert un argument !\n"
 
-#: src/lib/ecore/ecore_getopt.c:1614
+#: src/lib/ecore/ecore_getopt.c:1784
 msgid "ERROR: no parser provided.\n"
 msgstr "ERREUR : aucun analyseur n'est fourni.\n"
 
-#: src/lib/ecore/ecore_getopt.c:1619
+#: src/lib/ecore/ecore_getopt.c:1789
 msgid "ERROR: no values provided.\n"
 msgstr "ERREUR : aucune valeur n'est fournie.\n"
 
-#: src/lib/ecore/ecore_getopt.c:1628
+#: src/lib/ecore/ecore_getopt.c:1798
 msgid "ERROR: no arguments provided.\n"
 msgstr "ERREUR : aucun argument n'est fourni.\n"
 
-#: src/lib/ecore/ecore_getopt.c:1654
+#: src/lib/ecore/ecore_getopt.c:1824
 msgid "ERROR: invalid options found."
 msgstr "ERREUR : options non valides détectées."
 
-#: src/lib/ecore/ecore_getopt.c:1660
+#: src/lib/ecore/ecore_getopt.c:1830
 #, c-format
 msgid " See --%s.\n"
 msgstr " Voir --%s.\n"
 
-#: src/lib/ecore/ecore_getopt.c:1662
+#: src/lib/ecore/ecore_getopt.c:1832
 #, c-format
 msgid " See -%c.\n"
 msgstr " Voir -%c.\n"
 
-#: src/lib/ecore/ecore_getopt.c:1699
+#: src/lib/ecore/ecore_getopt.c:1873
 #, c-format
 msgid "ERROR: incorrect geometry value '%s'\n"
 msgstr "ERREUR : valeur géométrique incorrecte « %s »\n"
 
-#: src/lib/ecore/ecore_getopt.c:1722
+#: src/lib/ecore/ecore_getopt.c:1900
 #, c-format
 msgid "ERROR: incorrect size value '%s'\n"
 msgstr "ERREUR : valeur de taille incorrecte « %s »\n"
index 7224129..90b3811 100644 (file)
--- a/po/it.po
+++ b/po/it.po
@@ -6,7 +6,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: Ecore\n"
 "Report-Msgid-Bugs-To: enlightenment-devel@lists.sourceforge.net\n"
-"POT-Creation-Date: 2011-08-12 16:02+0900\n"
+"POT-Creation-Date: 2011-11-03 10:51+0900\n"
 "PO-Revision-Date: 2009-10-27 19:36+0100\n"
 "Last-Translator: quaker66 <quaker66@gmail.com>\n"
 "Language-Team: none\n"
@@ -15,159 +15,159 @@ msgstr ""
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
 
-#: src/lib/ecore/ecore_getopt.c:87
+#: src/lib/ecore/ecore_getopt.c:90
 msgid "Version:"
 msgstr "Versione:"
 
-#: src/lib/ecore/ecore_getopt.c:95
+#: src/lib/ecore/ecore_getopt.c:99
 msgid "Usage:"
 msgstr "Uso:"
 
-#: src/lib/ecore/ecore_getopt.c:100
+#: src/lib/ecore/ecore_getopt.c:104
 #, c-format
 msgid "%s [options]\n"
 msgstr "%s [opzioni]\n"
 
-#: src/lib/ecore/ecore_getopt.c:248
+#: src/lib/ecore/ecore_getopt.c:259
 msgid "Copyright:"
 msgstr "Copyright:"
 
-#: src/lib/ecore/ecore_getopt.c:259
+#: src/lib/ecore/ecore_getopt.c:271
 msgid "License:"
 msgstr "Licenza:"
 
-#: src/lib/ecore/ecore_getopt.c:411
+#: src/lib/ecore/ecore_getopt.c:452
 msgid "Type: "
 msgstr "Tipo: "
 
-#: src/lib/ecore/ecore_getopt.c:478
+#: src/lib/ecore/ecore_getopt.c:528
 msgid "Default: "
 msgstr "Predefinito:"
 
-#: src/lib/ecore/ecore_getopt.c:501
+#: src/lib/ecore/ecore_getopt.c:555
 msgid "Choices: "
 msgstr "Scelte:"
 
-#: src/lib/ecore/ecore_getopt.c:598
+#: src/lib/ecore/ecore_getopt.c:656
 msgid "Options:\n"
 msgstr "Opzioni:\n"
 
-#: src/lib/ecore/ecore_getopt.c:718
+#: src/lib/ecore/ecore_getopt.c:781
 #, c-format
 msgid "ERROR: unknown option --%s.\n"
 msgstr "ERRORE: opzione sconosciuta --%s.\n"
 
-#: src/lib/ecore/ecore_getopt.c:720
+#: src/lib/ecore/ecore_getopt.c:783
 #, c-format
 msgid "ERROR: unknown option -%c.\n"
 msgstr "ERRORE: opzione sconosciuta -%c.\n"
 
-#: src/lib/ecore/ecore_getopt.c:776
+#: src/lib/ecore/ecore_getopt.c:841
 msgid "ERROR: "
 msgstr "ERRORE:"
 
-#: src/lib/ecore/ecore_getopt.c:853 src/lib/ecore/ecore_getopt.c:969
-#: src/lib/ecore/ecore_getopt.c:982 src/lib/ecore/ecore_getopt.c:994
-#: src/lib/ecore/ecore_getopt.c:1008 src/lib/ecore/ecore_getopt.c:1052
-#: src/lib/ecore/ecore_getopt.c:1160 src/lib/ecore/ecore_getopt.c:1196
+#: src/lib/ecore/ecore_getopt.c:924 src/lib/ecore/ecore_getopt.c:1061
+#: src/lib/ecore/ecore_getopt.c:1077 src/lib/ecore/ecore_getopt.c:1092
+#: src/lib/ecore/ecore_getopt.c:1109 src/lib/ecore/ecore_getopt.c:1156
+#: src/lib/ecore/ecore_getopt.c:1276 src/lib/ecore/ecore_getopt.c:1317
 msgid "value has no pointer set.\n"
 msgstr "il valore non ha puntatori impostati.\n"
 
-#: src/lib/ecore/ecore_getopt.c:882 src/lib/ecore/ecore_getopt.c:1071
+#: src/lib/ecore/ecore_getopt.c:956 src/lib/ecore/ecore_getopt.c:1176
 #, c-format
 msgid "unknown boolean value %s.\n"
 msgstr "valore booleano sconosciuto %s.\n"
 
-#: src/lib/ecore/ecore_getopt.c:926 src/lib/ecore/ecore_getopt.c:1151
+#: src/lib/ecore/ecore_getopt.c:1007 src/lib/ecore/ecore_getopt.c:1264
 #, c-format
 msgid "invalid number format %s\n"
 msgstr "formato numero non valido %s\n"
 
-#: src/lib/ecore/ecore_getopt.c:1021
+#: src/lib/ecore/ecore_getopt.c:1122
 #, c-format
 msgid "invalid choice \"%s\". Valid values are: "
 msgstr "scelta non valida \"%s\". I valori ammessi sono: "
 
-#: src/lib/ecore/ecore_getopt.c:1046
+#: src/lib/ecore/ecore_getopt.c:1150
 msgid "missing parameter to append.\n"
 msgstr "parametro da appendere mancante.\n"
 
-#: src/lib/ecore/ecore_getopt.c:1141
+#: src/lib/ecore/ecore_getopt.c:1254
 msgid "could not parse value.\n"
 msgstr "impossibile il parsing del valore.\n"
 
-#: src/lib/ecore/ecore_getopt.c:1190
+#: src/lib/ecore/ecore_getopt.c:1311
 msgid "missing parameter.\n"
 msgstr "parametro mancante.\n"
 
-#: src/lib/ecore/ecore_getopt.c:1203
+#: src/lib/ecore/ecore_getopt.c:1324
 msgid "missing callback function!\n"
 msgstr "funzione callback mancante!\n"
 
-#: src/lib/ecore/ecore_getopt.c:1226
+#: src/lib/ecore/ecore_getopt.c:1353
 msgid "no version was defined.\n"
 msgstr "nessuna versione definita.\n"
 
-#: src/lib/ecore/ecore_getopt.c:1240
+#: src/lib/ecore/ecore_getopt.c:1370
 msgid "no copyright was defined.\n"
 msgstr "nessun copyright definito.\n"
 
-#: src/lib/ecore/ecore_getopt.c:1254
+#: src/lib/ecore/ecore_getopt.c:1387
 msgid "no license was defined.\n"
 msgstr "nessuna licenza definita.\n"
 
-#: src/lib/ecore/ecore_getopt.c:1308
+#: src/lib/ecore/ecore_getopt.c:1462
 #, c-format
 msgid "ERROR: unknown option --%s, ignored.\n"
 msgstr "ERRORE: opzione sconosciuta --%s, ignorata.\n"
 
-#: src/lib/ecore/ecore_getopt.c:1341
+#: src/lib/ecore/ecore_getopt.c:1495
 #, c-format
 msgid "ERROR: option --%s requires an argument!\n"
 msgstr "ERRORE: l'opzione --%s richiede un argomento!\n"
 
-#: src/lib/ecore/ecore_getopt.c:1377
+#: src/lib/ecore/ecore_getopt.c:1537
 #, c-format
 msgid "ERROR: unknown option -%c, ignored.\n"
 msgstr "ERRORE: opzione sconosciuta -%c, ignorata.\n"
 
-#: src/lib/ecore/ecore_getopt.c:1415
+#: src/lib/ecore/ecore_getopt.c:1575
 #, c-format
 msgid "ERROR: option -%c requires an argument!\n"
 msgstr "ERRORE: l'opzione -%c richiede un argomento!\n"
 
-#: src/lib/ecore/ecore_getopt.c:1614
+#: src/lib/ecore/ecore_getopt.c:1784
 msgid "ERROR: no parser provided.\n"
 msgstr "ERRORE: nessun parser fornito.\n"
 
-#: src/lib/ecore/ecore_getopt.c:1619
+#: src/lib/ecore/ecore_getopt.c:1789
 msgid "ERROR: no values provided.\n"
 msgstr "ERRORE: nessun valore fornito.\n"
 
-#: src/lib/ecore/ecore_getopt.c:1628
+#: src/lib/ecore/ecore_getopt.c:1798
 msgid "ERROR: no arguments provided.\n"
 msgstr "ERRORE: nessun argomento fornito.\n"
 
-#: src/lib/ecore/ecore_getopt.c:1654
+#: src/lib/ecore/ecore_getopt.c:1824
 msgid "ERROR: invalid options found."
 msgstr "ERRORE: trovate opzioni non valide."
 
-#: src/lib/ecore/ecore_getopt.c:1660
+#: src/lib/ecore/ecore_getopt.c:1830
 #, c-format
 msgid " See --%s.\n"
 msgstr " Vedere --%s.\n"
 
-#: src/lib/ecore/ecore_getopt.c:1662
+#: src/lib/ecore/ecore_getopt.c:1832
 #, c-format
 msgid " See -%c.\n"
 msgstr " Vedere -%c.\n"
 
-#: src/lib/ecore/ecore_getopt.c:1699
+#: src/lib/ecore/ecore_getopt.c:1873
 #, c-format
 msgid "ERROR: incorrect geometry value '%s'\n"
 msgstr "ERRORE: valore geometrico non corretto '%s'\n"
 
-#: src/lib/ecore/ecore_getopt.c:1722
+#: src/lib/ecore/ecore_getopt.c:1900
 #, c-format
 msgid "ERROR: incorrect size value '%s'\n"
 msgstr "ERRORE: valore dimensione non corretto '%s'\n"
index 268a425..ab20b9c 100644 (file)
--- a/po/nl.po
+++ b/po/nl.po
@@ -6,7 +6,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: Ecore\n"
 "Report-Msgid-Bugs-To: enlightenment-devel@lists.sourceforge.net\n"
-"POT-Creation-Date: 2011-10-05 15:14+0900\n"
+"POT-Creation-Date: 2011-11-03 10:51+0900\n"
 "PO-Revision-Date: 2011-09-03 15:48+0100\n"
 "Last-Translator: Heimen Stoffels <vistausss@gmail.com>\n"
 "Language-Team:  <vistausss@gmail.com>\n"
@@ -17,159 +17,159 @@ msgstr ""
 "X-Poedit-Language: NL\n"
 "X-Poedit-Country: Nederland\n"
 
-#: src/lib/ecore/ecore_getopt.c:87
+#: src/lib/ecore/ecore_getopt.c:90
 msgid "Version:"
 msgstr "Versie:"
 
-#: src/lib/ecore/ecore_getopt.c:95
+#: src/lib/ecore/ecore_getopt.c:99
 msgid "Usage:"
 msgstr "Gebruik:"
 
-#: src/lib/ecore/ecore_getopt.c:100
+#: src/lib/ecore/ecore_getopt.c:104
 #, c-format
 msgid "%s [options]\n"
 msgstr "%s [opties]\n"
 
-#: src/lib/ecore/ecore_getopt.c:248
+#: src/lib/ecore/ecore_getopt.c:259
 msgid "Copyright:"
 msgstr "Copyright:"
 
-#: src/lib/ecore/ecore_getopt.c:259
+#: src/lib/ecore/ecore_getopt.c:271
 msgid "License:"
 msgstr "Licentie:"
 
-#: src/lib/ecore/ecore_getopt.c:411
+#: src/lib/ecore/ecore_getopt.c:452
 msgid "Type: "
 msgstr "Type:"
 
-#: src/lib/ecore/ecore_getopt.c:478
+#: src/lib/ecore/ecore_getopt.c:528
 msgid "Default: "
 msgstr "Standaard:"
 
-#: src/lib/ecore/ecore_getopt.c:501
+#: src/lib/ecore/ecore_getopt.c:555
 msgid "Choices: "
 msgstr "Keuzes:"
 
-#: src/lib/ecore/ecore_getopt.c:598
+#: src/lib/ecore/ecore_getopt.c:656
 msgid "Options:\n"
 msgstr "Opties:\n"
 
-#: src/lib/ecore/ecore_getopt.c:718
+#: src/lib/ecore/ecore_getopt.c:781
 #, c-format
 msgid "ERROR: unknown option --%s.\n"
 msgstr "FOUT: onbekende optie --%s.\n"
 
-#: src/lib/ecore/ecore_getopt.c:720
+#: src/lib/ecore/ecore_getopt.c:783
 #, c-format
 msgid "ERROR: unknown option -%c.\n"
 msgstr "FOUT: onbekende optie -%c.\n"
 
-#: src/lib/ecore/ecore_getopt.c:776
+#: src/lib/ecore/ecore_getopt.c:841
 msgid "ERROR: "
 msgstr "FOUT:"
 
-#: src/lib/ecore/ecore_getopt.c:853 src/lib/ecore/ecore_getopt.c:969
-#: src/lib/ecore/ecore_getopt.c:982 src/lib/ecore/ecore_getopt.c:994
-#: src/lib/ecore/ecore_getopt.c:1008 src/lib/ecore/ecore_getopt.c:1052
-#: src/lib/ecore/ecore_getopt.c:1160 src/lib/ecore/ecore_getopt.c:1196
+#: src/lib/ecore/ecore_getopt.c:924 src/lib/ecore/ecore_getopt.c:1061
+#: src/lib/ecore/ecore_getopt.c:1077 src/lib/ecore/ecore_getopt.c:1092
+#: src/lib/ecore/ecore_getopt.c:1109 src/lib/ecore/ecore_getopt.c:1156
+#: src/lib/ecore/ecore_getopt.c:1276 src/lib/ecore/ecore_getopt.c:1317
 msgid "value has no pointer set.\n"
 msgstr "waarde heeft geen pointer ingsteld.\n"
 
-#: src/lib/ecore/ecore_getopt.c:882 src/lib/ecore/ecore_getopt.c:1071
+#: src/lib/ecore/ecore_getopt.c:956 src/lib/ecore/ecore_getopt.c:1176
 #, c-format
 msgid "unknown boolean value %s.\n"
 msgstr "onbekende boolean-waarde %s.\n"
 
-#: src/lib/ecore/ecore_getopt.c:926 src/lib/ecore/ecore_getopt.c:1151
+#: src/lib/ecore/ecore_getopt.c:1007 src/lib/ecore/ecore_getopt.c:1264
 #, c-format
 msgid "invalid number format %s\n"
 msgstr "ongeldig nummerformaat %s\n"
 
-#: src/lib/ecore/ecore_getopt.c:1021
+#: src/lib/ecore/ecore_getopt.c:1122
 #, c-format
 msgid "invalid choice \"%s\". Valid values are: "
 msgstr "ongeldige keuze \"%s\". Geldige waardes zijn:"
 
-#: src/lib/ecore/ecore_getopt.c:1046
+#: src/lib/ecore/ecore_getopt.c:1150
 msgid "missing parameter to append.\n"
 msgstr "parameter om toe te wijzen ontbreekt.\n"
 
-#: src/lib/ecore/ecore_getopt.c:1141
+#: src/lib/ecore/ecore_getopt.c:1254
 msgid "could not parse value.\n"
 msgstr "kon waarde niet doorvoeren.\n"
 
-#: src/lib/ecore/ecore_getopt.c:1190
+#: src/lib/ecore/ecore_getopt.c:1311
 msgid "missing parameter.\n"
 msgstr "paramater ontbreekt.\n"
 
-#: src/lib/ecore/ecore_getopt.c:1203
+#: src/lib/ecore/ecore_getopt.c:1324
 msgid "missing callback function!\n"
 msgstr "ontbrekende terugroep-functie!\n"
 
-#: src/lib/ecore/ecore_getopt.c:1226
+#: src/lib/ecore/ecore_getopt.c:1353
 msgid "no version was defined.\n"
 msgstr "geen versie was gedefinieerd.\n"
 
-#: src/lib/ecore/ecore_getopt.c:1240
+#: src/lib/ecore/ecore_getopt.c:1370
 msgid "no copyright was defined.\n"
 msgstr "geen copyright was gedefinieerd.\n"
 
-#: src/lib/ecore/ecore_getopt.c:1254
+#: src/lib/ecore/ecore_getopt.c:1387
 msgid "no license was defined.\n"
 msgstr "geen licentie was gedefinieerd.\n"
 
-#: src/lib/ecore/ecore_getopt.c:1308
+#: src/lib/ecore/ecore_getopt.c:1462
 #, c-format
 msgid "ERROR: unknown option --%s, ignored.\n"
 msgstr "FOUT: onbekende optie --%s, genegeerd.\n"
 
-#: src/lib/ecore/ecore_getopt.c:1341
+#: src/lib/ecore/ecore_getopt.c:1495
 #, c-format
 msgid "ERROR: option --%s requires an argument!\n"
 msgstr "FOUT: optie --%s vereist een argument!\n"
 
-#: src/lib/ecore/ecore_getopt.c:1377
+#: src/lib/ecore/ecore_getopt.c:1537
 #, c-format
 msgid "ERROR: unknown option -%c, ignored.\n"
 msgstr "FOUT: onbekende opties -%c, genegeerd.\n"
 
-#: src/lib/ecore/ecore_getopt.c:1415
+#: src/lib/ecore/ecore_getopt.c:1575
 #, c-format
 msgid "ERROR: option -%c requires an argument!\n"
 msgstr "FOUT: optie -%c vereist een argument!\n"
 
-#: src/lib/ecore/ecore_getopt.c:1614
+#: src/lib/ecore/ecore_getopt.c:1784
 msgid "ERROR: no parser provided.\n"
 msgstr "FOUT: geen doorvoerder beschikbaar gesteld.\n"
 
-#: src/lib/ecore/ecore_getopt.c:1619
+#: src/lib/ecore/ecore_getopt.c:1789
 msgid "ERROR: no values provided.\n"
 msgstr "FOUT: geen waarden beschikbaar gesteld.\n"
 
-#: src/lib/ecore/ecore_getopt.c:1628
+#: src/lib/ecore/ecore_getopt.c:1798
 msgid "ERROR: no arguments provided.\n"
 msgstr "FOUT: geen argumenten beschibaar gesteld.\n"
 
-#: src/lib/ecore/ecore_getopt.c:1654
+#: src/lib/ecore/ecore_getopt.c:1824
 msgid "ERROR: invalid options found."
 msgstr "FOUT: ongeldige opties gevonden."
 
-#: src/lib/ecore/ecore_getopt.c:1660
+#: src/lib/ecore/ecore_getopt.c:1830
 #, c-format
 msgid " See --%s.\n"
 msgstr "Zie --%s.\n"
 
-#: src/lib/ecore/ecore_getopt.c:1662
+#: src/lib/ecore/ecore_getopt.c:1832
 #, c-format
 msgid " See -%c.\n"
 msgstr "Zie -%c.\n"
 
-#: src/lib/ecore/ecore_getopt.c:1699
+#: src/lib/ecore/ecore_getopt.c:1873
 #, c-format
 msgid "ERROR: incorrect geometry value '%s'\n"
 msgstr "Fout: foutieve wiskundige waarde '%s'\n"
 
-#: src/lib/ecore/ecore_getopt.c:1722
+#: src/lib/ecore/ecore_getopt.c:1900
 #, c-format
 msgid "ERROR: incorrect size value '%s'\n"
 msgstr "FOUT: foutieve grootte-waarden '%s'\n"
index 95e6685..08e45be 100644 (file)
--- a/po/pt.po
+++ b/po/pt.po
@@ -6,7 +6,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: ecore\n"
 "Report-Msgid-Bugs-To: enlightenment-devel@lists.sourceforge.net\n"
-"POT-Creation-Date: 2011-08-12 16:02+0900\n"
+"POT-Creation-Date: 2011-11-03 10:51+0900\n"
 "PO-Revision-Date: 2010-10-06 12:37-0000\n"
 "Last-Translator: Sérgio Marques <smarquespt@gmail.com>\n"
 "Language-Team: \n"
@@ -18,159 +18,159 @@ msgstr ""
 "X-Poedit-Language: Portuguese\n"
 "X-Poedit-Country: Portugal\n"
 
-#: src/lib/ecore/ecore_getopt.c:87
+#: src/lib/ecore/ecore_getopt.c:90
 msgid "Version:"
 msgstr "Versão:"
 
-#: src/lib/ecore/ecore_getopt.c:95
+#: src/lib/ecore/ecore_getopt.c:99
 msgid "Usage:"
 msgstr "Utilização:"
 
-#: src/lib/ecore/ecore_getopt.c:100
+#: src/lib/ecore/ecore_getopt.c:104
 #, c-format
 msgid "%s [options]\n"
 msgstr "%s [opções]\n"
 
-#: src/lib/ecore/ecore_getopt.c:248
+#: src/lib/ecore/ecore_getopt.c:259
 msgid "Copyright:"
 msgstr "Direitos de autor:"
 
-#: src/lib/ecore/ecore_getopt.c:259
+#: src/lib/ecore/ecore_getopt.c:271
 msgid "License:"
 msgstr "Licença:"
 
-#: src/lib/ecore/ecore_getopt.c:411
+#: src/lib/ecore/ecore_getopt.c:452
 msgid "Type: "
 msgstr "Tipo:"
 
-#: src/lib/ecore/ecore_getopt.c:478
+#: src/lib/ecore/ecore_getopt.c:528
 msgid "Default: "
 msgstr "Omissão:"
 
-#: src/lib/ecore/ecore_getopt.c:501
+#: src/lib/ecore/ecore_getopt.c:555
 msgid "Choices: "
 msgstr "Escolhas:"
 
-#: src/lib/ecore/ecore_getopt.c:598
+#: src/lib/ecore/ecore_getopt.c:656
 msgid "Options:\n"
 msgstr "Opções:\n"
 
-#: src/lib/ecore/ecore_getopt.c:718
+#: src/lib/ecore/ecore_getopt.c:781
 #, c-format
 msgid "ERROR: unknown option --%s.\n"
 msgstr "ERRO: opção desconhecida --%s.\n"
 
-#: src/lib/ecore/ecore_getopt.c:720
+#: src/lib/ecore/ecore_getopt.c:783
 #, c-format
 msgid "ERROR: unknown option -%c.\n"
 msgstr "ERRO: opção desconhecida -%c.\n"
 
-#: src/lib/ecore/ecore_getopt.c:776
+#: src/lib/ecore/ecore_getopt.c:841
 msgid "ERROR: "
 msgstr "ERRO: "
 
-#: src/lib/ecore/ecore_getopt.c:853 src/lib/ecore/ecore_getopt.c:969
-#: src/lib/ecore/ecore_getopt.c:982 src/lib/ecore/ecore_getopt.c:994
-#: src/lib/ecore/ecore_getopt.c:1008 src/lib/ecore/ecore_getopt.c:1052
-#: src/lib/ecore/ecore_getopt.c:1160 src/lib/ecore/ecore_getopt.c:1196
+#: src/lib/ecore/ecore_getopt.c:924 src/lib/ecore/ecore_getopt.c:1061
+#: src/lib/ecore/ecore_getopt.c:1077 src/lib/ecore/ecore_getopt.c:1092
+#: src/lib/ecore/ecore_getopt.c:1109 src/lib/ecore/ecore_getopt.c:1156
+#: src/lib/ecore/ecore_getopt.c:1276 src/lib/ecore/ecore_getopt.c:1317
 msgid "value has no pointer set.\n"
 msgstr "o valor não está definido.\n"
 
-#: src/lib/ecore/ecore_getopt.c:882 src/lib/ecore/ecore_getopt.c:1071
+#: src/lib/ecore/ecore_getopt.c:956 src/lib/ecore/ecore_getopt.c:1176
 #, c-format
 msgid "unknown boolean value %s.\n"
 msgstr "valor booleano desconhecido %s.\n"
 
-#: src/lib/ecore/ecore_getopt.c:926 src/lib/ecore/ecore_getopt.c:1151
+#: src/lib/ecore/ecore_getopt.c:1007 src/lib/ecore/ecore_getopt.c:1264
 #, c-format
 msgid "invalid number format %s\n"
 msgstr "formato do número inválido %s\n"
 
-#: src/lib/ecore/ecore_getopt.c:1021
+#: src/lib/ecore/ecore_getopt.c:1122
 #, c-format
 msgid "invalid choice \"%s\". Valid values are: "
 msgstr "escolha inválida \"%s\". O valores possíveis são:"
 
-#: src/lib/ecore/ecore_getopt.c:1046
+#: src/lib/ecore/ecore_getopt.c:1150
 msgid "missing parameter to append.\n"
 msgstr "faltam os parâmetros a anexar.\n"
 
-#: src/lib/ecore/ecore_getopt.c:1141
+#: src/lib/ecore/ecore_getopt.c:1254
 msgid "could not parse value.\n"
 msgstr "incapaz de analisar o valor.\n"
 
-#: src/lib/ecore/ecore_getopt.c:1190
+#: src/lib/ecore/ecore_getopt.c:1311
 msgid "missing parameter.\n"
 msgstr "parâmetro em falta.\n"
 
-#: src/lib/ecore/ecore_getopt.c:1203
+#: src/lib/ecore/ecore_getopt.c:1324
 msgid "missing callback function!\n"
 msgstr "função de chamada em falta!\n"
 
-#: src/lib/ecore/ecore_getopt.c:1226
+#: src/lib/ecore/ecore_getopt.c:1353
 msgid "no version was defined.\n"
 msgstr "nenhuma versão definida.\n"
 
-#: src/lib/ecore/ecore_getopt.c:1240
+#: src/lib/ecore/ecore_getopt.c:1370
 msgid "no copyright was defined.\n"
 msgstr "direitos de autor não definidos.\n"
 
-#: src/lib/ecore/ecore_getopt.c:1254
+#: src/lib/ecore/ecore_getopt.c:1387
 msgid "no license was defined.\n"
 msgstr "licença não definida.\n"
 
-#: src/lib/ecore/ecore_getopt.c:1308
+#: src/lib/ecore/ecore_getopt.c:1462
 #, c-format
 msgid "ERROR: unknown option --%s, ignored.\n"
 msgstr "ERRO: opção desconhecida --%s, ignorada.\n"
 
-#: src/lib/ecore/ecore_getopt.c:1341
+#: src/lib/ecore/ecore_getopt.c:1495
 #, c-format
 msgid "ERROR: option --%s requires an argument!\n"
 msgstr "ERRO: a opção --%s requer um argumento!\n"
 
-#: src/lib/ecore/ecore_getopt.c:1377
+#: src/lib/ecore/ecore_getopt.c:1537
 #, c-format
 msgid "ERROR: unknown option -%c, ignored.\n"
 msgstr "ERRO: opção desconhecida --%c, ignorada.\n"
 
-#: src/lib/ecore/ecore_getopt.c:1415
+#: src/lib/ecore/ecore_getopt.c:1575
 #, c-format
 msgid "ERROR: option -%c requires an argument!\n"
 msgstr "ERRO: a opção --%c requer um argumento!\n"
 
-#: src/lib/ecore/ecore_getopt.c:1614
+#: src/lib/ecore/ecore_getopt.c:1784
 msgid "ERROR: no parser provided.\n"
 msgstr "ERRO: nenhum analisador fornecido.\n"
 
-#: src/lib/ecore/ecore_getopt.c:1619
+#: src/lib/ecore/ecore_getopt.c:1789
 msgid "ERROR: no values provided.\n"
 msgstr "ERRO: nenhum valor fornecido.\n"
 
-#: src/lib/ecore/ecore_getopt.c:1628
+#: src/lib/ecore/ecore_getopt.c:1798
 msgid "ERROR: no arguments provided.\n"
 msgstr "ERRO: nenhum argumento fornecido.\n"
 
-#: src/lib/ecore/ecore_getopt.c:1654
+#: src/lib/ecore/ecore_getopt.c:1824
 msgid "ERROR: invalid options found."
 msgstr "ERRO: encontradas opções inválidas."
 
-#: src/lib/ecore/ecore_getopt.c:1660
+#: src/lib/ecore/ecore_getopt.c:1830
 #, c-format
 msgid " See --%s.\n"
 msgstr " Veja --%s.\n"
 
-#: src/lib/ecore/ecore_getopt.c:1662
+#: src/lib/ecore/ecore_getopt.c:1832
 #, c-format
 msgid " See -%c.\n"
 msgstr " Veja -%c.\n"
 
-#: src/lib/ecore/ecore_getopt.c:1699
+#: src/lib/ecore/ecore_getopt.c:1873
 #, c-format
 msgid "ERROR: incorrect geometry value '%s'\n"
 msgstr "ERRO: valor geométrico incorreto \"%s\"\n"
 
-#: src/lib/ecore/ecore_getopt.c:1722
+#: src/lib/ecore/ecore_getopt.c:1900
 #, c-format
 msgid "ERROR: incorrect size value '%s'\n"
 msgstr "ERRO: tamanho incorreto \"%s\"\n"
index 7c4735f..ce08b01 100644 (file)
--- a/po/sl.po
+++ b/po/sl.po
@@ -8,7 +8,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: ecore 1.0\n"
 "Report-Msgid-Bugs-To: enlightenment-devel@lists.sourceforge.net\n"
-"POT-Creation-Date: 2011-07-07 17:03+0900\n"
+"POT-Creation-Date: 2011-11-03 10:51+0900\n"
 "PO-Revision-Date: 2011-02-24 16:54+0100\n"
 "Last-Translator: r1to <renato.rener@gmail.com>\n"
 "Language-Team: Slovenian <sl@li.org>\n"
@@ -17,159 +17,159 @@ msgstr ""
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
 
-#: src/lib/ecore/ecore_getopt.c:87
+#: src/lib/ecore/ecore_getopt.c:90
 msgid "Version:"
 msgstr "Različica"
 
-#: src/lib/ecore/ecore_getopt.c:95
+#: src/lib/ecore/ecore_getopt.c:99
 msgid "Usage:"
 msgstr "Uporaba:"
 
-#: src/lib/ecore/ecore_getopt.c:100
+#: src/lib/ecore/ecore_getopt.c:104
 #, c-format
 msgid "%s [options]\n"
 msgstr "%s·[možnosti]\n"
 
-#: src/lib/ecore/ecore_getopt.c:248
+#: src/lib/ecore/ecore_getopt.c:259
 msgid "Copyright:"
 msgstr "Avtorstvo:"
 
-#: src/lib/ecore/ecore_getopt.c:259
+#: src/lib/ecore/ecore_getopt.c:271
 msgid "License:"
 msgstr "Licenca:"
 
-#: src/lib/ecore/ecore_getopt.c:411
+#: src/lib/ecore/ecore_getopt.c:452
 msgid "Type: "
 msgstr "Vrsta:·"
 
-#: src/lib/ecore/ecore_getopt.c:478
+#: src/lib/ecore/ecore_getopt.c:528
 msgid "Default: "
 msgstr "Privzeto:·"
 
-#: src/lib/ecore/ecore_getopt.c:501
+#: src/lib/ecore/ecore_getopt.c:555
 msgid "Choices: "
 msgstr "Izbire:·"
 
-#: src/lib/ecore/ecore_getopt.c:598
+#: src/lib/ecore/ecore_getopt.c:656
 msgid "Options:\n"
 msgstr "Možnosti:\n"
 
-#: src/lib/ecore/ecore_getopt.c:718
+#: src/lib/ecore/ecore_getopt.c:781
 #, c-format
 msgid "ERROR: unknown option --%s.\n"
 msgstr "NAPAKA:·Neznana možnost·--%s.\n"
 
-#: src/lib/ecore/ecore_getopt.c:720
+#: src/lib/ecore/ecore_getopt.c:783
 #, c-format
 msgid "ERROR: unknown option -%c.\n"
 msgstr "NAPAKA:·neznana možnost·-%c.\n"
 
-#: src/lib/ecore/ecore_getopt.c:776
+#: src/lib/ecore/ecore_getopt.c:841
 msgid "ERROR: "
 msgstr "NAPAKA:"
 
-#: src/lib/ecore/ecore_getopt.c:853 src/lib/ecore/ecore_getopt.c:969
-#: src/lib/ecore/ecore_getopt.c:982 src/lib/ecore/ecore_getopt.c:994
-#: src/lib/ecore/ecore_getopt.c:1008 src/lib/ecore/ecore_getopt.c:1052
-#: src/lib/ecore/ecore_getopt.c:1160 src/lib/ecore/ecore_getopt.c:1196
+#: src/lib/ecore/ecore_getopt.c:924 src/lib/ecore/ecore_getopt.c:1061
+#: src/lib/ecore/ecore_getopt.c:1077 src/lib/ecore/ecore_getopt.c:1092
+#: src/lib/ecore/ecore_getopt.c:1109 src/lib/ecore/ecore_getopt.c:1156
+#: src/lib/ecore/ecore_getopt.c:1276 src/lib/ecore/ecore_getopt.c:1317
 msgid "value has no pointer set.\n"
 msgstr "vrednost nima nastavljenega kazalnika.\n"
 
-#: src/lib/ecore/ecore_getopt.c:882 src/lib/ecore/ecore_getopt.c:1071
+#: src/lib/ecore/ecore_getopt.c:956 src/lib/ecore/ecore_getopt.c:1176
 #, c-format
 msgid "unknown boolean value %s.\n"
 msgstr "neznana Boolova vrednost·%s.\n"
 
-#: src/lib/ecore/ecore_getopt.c:926 src/lib/ecore/ecore_getopt.c:1151
+#: src/lib/ecore/ecore_getopt.c:1007 src/lib/ecore/ecore_getopt.c:1264
 #, c-format
 msgid "invalid number format %s\n"
 msgstr "napačen·format števila·%s\n"
 
-#: src/lib/ecore/ecore_getopt.c:1021
+#: src/lib/ecore/ecore_getopt.c:1122
 #, c-format
 msgid "invalid choice \"%s\". Valid values are: "
 msgstr "napačna izbira·\"%s\".·Pravilne izbire so:·"
 
-#: src/lib/ecore/ecore_getopt.c:1046
+#: src/lib/ecore/ecore_getopt.c:1150
 msgid "missing parameter to append.\n"
 msgstr "manjka·parameter·za dodajo.\n"
 
-#: src/lib/ecore/ecore_getopt.c:1141
+#: src/lib/ecore/ecore_getopt.c:1254
 msgid "could not parse value.\n"
 msgstr "vrednosti ni bilo možno razčleniti.\n"
 
-#: src/lib/ecore/ecore_getopt.c:1190
+#: src/lib/ecore/ecore_getopt.c:1311
 msgid "missing parameter.\n"
 msgstr "manjkajoči·parameter.\n"
 
-#: src/lib/ecore/ecore_getopt.c:1203
+#: src/lib/ecore/ecore_getopt.c:1324
 msgid "missing callback function!\n"
 msgstr "manjkajoča povratno-zasilna funkcija !\n"
 
-#: src/lib/ecore/ecore_getopt.c:1226
+#: src/lib/ecore/ecore_getopt.c:1353
 msgid "no version was defined.\n"
 msgstr "definirana ni bila nobena različica.\n"
 
-#: src/lib/ecore/ecore_getopt.c:1240
+#: src/lib/ecore/ecore_getopt.c:1370
 msgid "no copyright was defined.\n"
 msgstr "definirano ni bilo nobeno avtorstvo.\n"
 
-#: src/lib/ecore/ecore_getopt.c:1254
+#: src/lib/ecore/ecore_getopt.c:1387
 msgid "no license was defined.\n"
 msgstr "definirana ni bila nobena licenca.\n"
 
-#: src/lib/ecore/ecore_getopt.c:1308
+#: src/lib/ecore/ecore_getopt.c:1462
 #, c-format
 msgid "ERROR: unknown option --%s, ignored.\n"
 msgstr "NAPAKA:·neznana možnost·--%s,·prezrto.\n"
 
-#: src/lib/ecore/ecore_getopt.c:1341
+#: src/lib/ecore/ecore_getopt.c:1495
 #, c-format
 msgid "ERROR: option --%s requires an argument!\n"
 msgstr "NAPAKA:·možnost·--%s·zahteva argument!\n"
 
-#: src/lib/ecore/ecore_getopt.c:1377
+#: src/lib/ecore/ecore_getopt.c:1537
 #, c-format
 msgid "ERROR: unknown option -%c, ignored.\n"
 msgstr "NAPAKA:·neznana možnost·-%c,·prezrto.\n"
 
-#: src/lib/ecore/ecore_getopt.c:1415
+#: src/lib/ecore/ecore_getopt.c:1575
 #, c-format
 msgid "ERROR: option -%c requires an argument!\n"
 msgstr "NAPAKA:·možnost·-%c zahteva argument!\n"
 
-#: src/lib/ecore/ecore_getopt.c:1614
+#: src/lib/ecore/ecore_getopt.c:1784
 msgid "ERROR: no parser provided.\n"
 msgstr "NAPAKA:·ni podan razčlenjevalnik.\n"
 
-#: src/lib/ecore/ecore_getopt.c:1619
+#: src/lib/ecore/ecore_getopt.c:1789
 msgid "ERROR: no values provided.\n"
 msgstr "NAPAKA::·ni podanih vrednosti.\n"
 
-#: src/lib/ecore/ecore_getopt.c:1628
+#: src/lib/ecore/ecore_getopt.c:1798
 msgid "ERROR: no arguments provided.\n"
 msgstr "NAPAKA::·ni podanih argumentov.\n"
 
-#: src/lib/ecore/ecore_getopt.c:1654
+#: src/lib/ecore/ecore_getopt.c:1824
 msgid "ERROR: invalid options found."
 msgstr "NAPAKA::·najdene nepravilne možnosti"
 
-#: src/lib/ecore/ecore_getopt.c:1660
+#: src/lib/ecore/ecore_getopt.c:1830
 #, c-format
 msgid " See --%s.\n"
 msgstr "·Glej·--%s.\n"
 
-#: src/lib/ecore/ecore_getopt.c:1662
+#: src/lib/ecore/ecore_getopt.c:1832
 #, c-format
 msgid " See -%c.\n"
 msgstr "·Glej·-%c.\n"
 
-#: src/lib/ecore/ecore_getopt.c:1699
+#: src/lib/ecore/ecore_getopt.c:1873
 #, c-format
 msgid "ERROR: incorrect geometry value '%s'\n"
 msgstr "NAPAKA::·nepravilna geometrijska vrednost·'%s'\n"
 
-#: src/lib/ecore/ecore_getopt.c:1722
+#: src/lib/ecore/ecore_getopt.c:1900
 #, c-format
 msgid "ERROR: incorrect size value '%s'\n"
 msgstr "NAPAKA::·nepravilna vrednost velikosti·'%s'\n"
index b2b2a83..ac71d95 100644 (file)
-/** 
-@brief Ecore Library Public API Calls
-These routines are used for Ecore Library interaction
-*/
-
-/**
-
-@mainpage Ecore
-
-@version 1.1
-@date 2000-2011
-
-Please see the @ref authors page for contact details.
-
-@section intro Introduction
-
-Ecore is a library of convenience functions. A brief explanation of how to use
-it can be found in @ref Ecore_Main_Loop_Page.
-
-The Ecore library provides the following modules:
-@li @ref Ecore_Main_Loop_Group
-@li @ref Ecore_File_Group
-@li @ref Ecore_Con_Group
-@li @link Ecore_Evas.h   Ecore_Evas - Evas convenience functions. @endlink
-@li @ref Ecore_FB_Group
-@li @link Ecore_Ipc.h    Ecore_IPC - Inter Process Communication functions. @endlink
-@li @link Ecore_X.h      Ecore_X - X Windows System wrapper. @endlink
-@li @ref Ecore_Win32_Group
-@li @ref Ecore_WinCE_Group
-
-For more info on Ecore usage, there are these @ref Examples.
-
-@section compiling How to compile using Ecore?
-pkgconfig (.pc) files are installed for every ecore module.
-Thus, to compile using any of them, you can use something like the following:
-
-@verbatim
-gcc *.c $(pkg-config ecore ecore-$x ecore-$y [...] --cflags --libs)
-@endverbatim
-
-@section install How is it installed?
-
-Suggested configure options for evas for a Linux desktop X display:
-
-@verbatim
-./configure \
-make
-su -
-...
-make install
-@endverbatim
-
-*/
-
-/**
-@page authors Authors
-@author Carsten Haitzler <raster@rasterman.com>
-@author Tom Gilbert <tom@linuxbrit.co.uk>
-@author Burra <burra@colorado.edu>
-@author Chris Ross <chris@darkrock.co.uk>
-@author Term <term@twistedpath.org>
-@author Tilman Sauerbeck <tilman@code-monkey.de>
-@author Ibukun Olumuyiwa <ibukun@computer.org>
-@author Yuri <da2001@hotmail.ru>
-@author Nicholas Curran <quasar@bigblue.net.au>
-@author Howell Tam <pigeon@pigeond.net>
-@author Nathan Ingersoll <rbdpngn@users.sourceforge.net>
-@author Andrew Elcock <andy@elcock.org>
-@author Kim Woelders <kim@woelders.dk>
-@author Sebastian Dransfeld <sebastid@tango.flipp.net>
-@author Simon Poole <simon.armlinux@themalago.net>
-@author Jorge Luis Zapata Muga <jorgeluis.zapata@gmail.com>
-@author dan sinclair <zero@everburning.com>
-@author Michael 'Mickey' Lauer <mickey@tm.informatik.uni-frankfurt.de>
-@author David 'onefang' Seikel <onefang@gmail.com>
-@author Hisham 'CodeWarrior' Mardam Bey <hisham@hisham.cc>
-@author Brian 'rephorm' Mattern <rephorm@rephorm.com>
-@author Tim Horton <hortont424@gmail.com>
-@author Arnaud de Turckheim 'quarium' <quarium@gmail.com>
-@author Matt Barclay <mbarclay@gmail.com>
-@author Peter Wehrfritz <peter.wehrfritz@web.de>
-@author Albin "Lutin" Tonnerre <albin.tonnerre@gmail.com>
-@author Vincent Torri <vincent.torri@gmail.com>
-@author Lars Munch <lars@segv.dk>
-@author Andre Dieb <andre.dieb@gmail.com>
-@author Mathieu Taillefumier <mathieu.taillefumier@free.fr>
-@author Rui Miguel Silva Seabra <rms@1407.org>
-@author Samsung Electronics
-@author Samsung SAIT
-@author Nicolas Aguirre <aguirre.nicolas@gmail.com>
-@author Brett Nash <nash@nash.id.au>
-@author Mike Blumenkrantz <mike@zentific.com>
-@author Leif Middelschulte <leif.middelschulte@gmail.com>
-@author Mike McCormack <mj.mccormack@samsung.com>
-@author Sangho Park <gouache95@gmail.com>
-@author Jihoon Kim <jihoon48.kim@samsung.com> <imfine98@gmail.com>
-@author Daniel Juyung Seo <seojuyung2@gmail.com> <juyung.seo@samsung.com>
-
-Please contact <enlightenment-devel@lists.sourceforge.net> to get in
-contact with the developers and maintainers.
-*/
-
-/*
-@page Ecore_Main_Loop_Page The Ecore Main Loop
-
-@section intro What is Ecore?
-
-Ecore is a clean and tiny event loop library with many modules to do lots of
-convenient things for a programmer, to save time and effort.
-
-It's small and lean, designed to work on embedded systems all the way to
-large and powerful multi-cpu workstations. It serialises all system signals,
-events etc. into a single event queue, that is easily processed without
-needing to worry about concurrency. A properly written, event-driven program
-using this kind of programming doesn't need threads, nor has to worry about
-concurrency. It turns a program into a state machine, and makes it very
-robust and easy to follow.
-
-Ecore gives you other handy primitives, such as timers to tick over for you
-and call specified functions at particular times so the programmer can use
-this to do things, like animate, or time out on connections or tasks that take
-too long etc.
+/**
+   @brief Ecore Library Public API Calls
 
-Idle handlers are provided too, as well as calls on entering an idle state
-(often a very good time to update the state of the program). All events that
-enter the system are passed to specific callback functions that the program
-sets up to handle those events. Handling them is simple and other Ecore
-modules produce more events on the queue, coming from other sources such as
-file descriptors etc.
+   These routines are used for Ecore Library interaction
+ */
 
-Ecore also lets you have functions called when file descriptors become active
-for reading or writing, allowing for streamlined, non-blocking IO.
+/**
 
-Here is an example of a simple program and its basic event loop flow:
+   @mainpage Ecore
 
-@image html  prog_flow.png
-@image latex prog_flow.eps width=\textwidth
+   @version 1.1
+   @date 2000-2011
 
+   Please see the @ref authors page for contact details.
 
+   @section intro Introduction
 
-@section work How does Ecore work?
+   Ecore is a library of convenience functions. A brief explanation of how to use
+   it can be found in @ref Ecore_Main_Loop_Page.
 
-Ecore is very easy to learn and use. All the function calls are designed to
-be easy to remember, explicit in describing what they do, and heavily
-name-spaced. Ecore programs can start and be very simple.
+   The Ecore library provides the following modules:
+   @li @ref Ecore_Main_Loop_Group
+   @li @ref Ecore_File_Group
+   @li @ref Ecore_Con_Group
+   @li @link Ecore_Evas.h   Ecore_Evas - Evas convenience functions. @endlink
+   @li @ref Ecore_FB_Group
+   @li @link Ecore_Ipc.h    Ecore_IPC - Inter Process Communication functions. @endlink
+   @li @link Ecore_X.h      Ecore_X - X Windows System wrapper. @endlink
+   @li @ref Ecore_Win32_Group
+   @li @ref Ecore_WinCE_Group
 
-For example:
+   For more info on Ecore usage, there are these @ref Examples.
 
-@code
-#include <Ecore.h>
+   @section compiling How to compile using Ecore?
+   pkgconfig (.pc) files are installed for every ecore module.
+   Thus, to compile using any of them, you can use something like the following:
 
-int main(int argc, const char **argv)
-{
-  ecore_init();
-  ecore_app_args_set(argc, argv);
-  ecore_main_loop_begin();
-  ecore_shutdown();
-  return 0;
-}
-@endcode
+   @verbatim
+   gcc *.c $(pkg-config ecore ecore-$x ecore-$y [...] --cflags --libs)
+   @endverbatim
 
-This program is very simple and doesn't check for errors, but it does start up
-and begin a main loop waiting for events or timers to tick off. This program
-doesn't set up any, but now we can expand on this simple program a little
-more by adding some event handlers and timers.
+   @section install How is it installed?
 
-@code
-#include <Ecore.h>
+   Suggested configure options for evas for a Linux desktop X display:
 
-Ecore_Timer         *timer1     = NULL;
-Ecore_Event_Handler *handler1   = NULL;
-double               start_time = 0.0;
+   @verbatim
+   ./configure \
+   make
+   su -
+   ...
+   make install
+   @endverbatim
 
-int timer_func(void *data)
-{
-  printf("Tick timer. Sec: %3.2f\n", ecore_time_get() - start_time);
-  return 1;
-}
+ */
 
-int exit_func(void *data, int ev_type, void *ev)
-{
-  Ecore_Event_Signal_Exit *e;
-
-  e = (Ecore_Event_Signal_Exit *)ev;
-  if (e->interrupt)      printf("Exit: interrupt\n");
-  else if (e->quit)      printf("Exit: quit\n");
-  else if (e->terminate) printf("Exit: terminate\n");
-  ecore_main_loop_quit();
-  return 1;
-}
+/**
+   @page authors Authors
+   @author Carsten Haitzler <raster@rasterman.com>
+   @author Tom Gilbert <tom@linuxbrit.co.uk>
+   @author Burra <burra@colorado.edu>
+   @author Chris Ross <chris@darkrock.co.uk>
+   @author Term <term@twistedpath.org>
+   @author Tilman Sauerbeck <tilman@code-monkey.de>
+   @author Ibukun Olumuyiwa <ibukun@computer.org>
+   @author Yuri <da2001@hotmail.ru>
+   @author Nicholas Curran <quasar@bigblue.net.au>
+   @author Howell Tam <pigeon@pigeond.net>
+   @author Nathan Ingersoll <rbdpngn@users.sourceforge.net>
+   @author Andrew Elcock <andy@elcock.org>
+   @author Kim Woelders <kim@woelders.dk>
+   @author Sebastian Dransfeld <sebastid@tango.flipp.net>
+   @author Simon Poole <simon.armlinux@themalago.net>
+   @author Jorge Luis Zapata Muga <jorgeluis.zapata@gmail.com>
+   @author dan sinclair <zero@everburning.com>
+   @author Michael 'Mickey' Lauer <mickey@tm.informatik.uni-frankfurt.de>
+   @author David 'onefang' Seikel <onefang@gmail.com>
+   @author Hisham 'CodeWarrior' Mardam Bey <hisham@hisham.cc>
+   @author Brian 'rephorm' Mattern <rephorm@rephorm.com>
+   @author Tim Horton <hortont424@gmail.com>
+   @author Arnaud de Turckheim 'quarium' <quarium@gmail.com>
+   @author Matt Barclay <mbarclay@gmail.com>
+   @author Peter Wehrfritz <peter.wehrfritz@web.de>
+   @author Albin "Lutin" Tonnerre <albin.tonnerre@gmail.com>
+   @author Vincent Torri <vincent.torri@gmail.com>
+   @author Lars Munch <lars@segv.dk>
+   @author Andre Dieb <andre.dieb@gmail.com>
+   @author Mathieu Taillefumier <mathieu.taillefumier@free.fr>
+   @author Rui Miguel Silva Seabra <rms@1407.org>
+   @author Samsung Electronics
+   @author Samsung SAIT
+   @author Nicolas Aguirre <aguirre.nicolas@gmail.com>
+   @author Brett Nash <nash@nash.id.au>
+   @author Mike Blumenkrantz <mike@zentific.com>
+   @author Leif Middelschulte <leif.middelschulte@gmail.com>
+   @author Mike McCormack <mj.mccormack@samsung.com>
+   @author Sangho Park <gouache95@gmail.com>
+   @author Jihoon Kim <jihoon48.kim@samsung.com> <imfine98@gmail.com>
+   @author Daniel Juyung Seo <seojuyung2@gmail.com> <juyung.seo@samsung.com>
+
+   Please contact <enlightenment-devel@lists.sourceforge.net> to get in
+   contact with the developers and maintainers.
+ */
 
-int main(int argc, const char **argv)
-{
-  ecore_init();
-  ecore_app_args_set(argc, argv);  
-  start_time = ecore_time_get();
-  handler1 = ecore_event_handler_add(ECORE_EVENT_SIGNAL_EXIT, exit_func, NULL);
-  timer1 = ecore_timer_add(0.5, timer_func, NULL);  
-  ecore_main_loop_begin();
-  ecore_shutdown();
-  return 0;
-}
-@endcode
-
-In the previous example, we initialize our application and get the time at
-which our program has started so we can calculate an offset. We set
-up a timer to tick off in 0.5 seconds, and since it returns 1, will
-keep ticking off every 0.5 seconds until it returns 0, or is deleted
-by hand. An event handler is set up to call a function - exit_func(),
-whenever an event of type ECORE_EVENT_SIGNAL_EXIT is received (CTRL-C
-on the command line will cause such an event to happen). If this event
-occurs it tells you what kind of exit signal was received, and asks
-the main loop to quit when it is finished by calling
-ecore_main_loop_quit().
-
-The handles returned by ecore_timer_add() and ecore_event_handler_add() are 
-only stored here as an example. If you don't need to address the timer or 
-event handler again you don't need to store the result, so just call the 
-function, and don't assign the result to any variable.
-
-This program looks slightly more complex than needed to do these simple
-things, but in principle, programs don't get any more complex. You add more
-event handlers, for more events, will have more timers and such, BUT it all
-follows the same principles as shown in this example.
-
-*/
+/*
+   @page Ecore_Main_Loop_Page The Ecore Main Loop
+
+   @section intro What is Ecore?
+
+   Ecore is a clean and tiny event loop library with many modules to do lots of
+   convenient things for a programmer, to save time and effort.
+
+   It's small and lean, designed to work on embedded systems all the way to
+   large and powerful multi-cpu workstations. It serialises all system signals,
+   events etc. into a single event queue, that is easily processed without
+   needing to worry about concurrency. A properly written, event-driven program
+   using this kind of programming doesn't need threads, nor has to worry about
+   concurrency. It turns a program into a state machine, and makes it very
+   robust and easy to follow.
+
+   Ecore gives you other handy primitives, such as timers to tick over for you
+   and call specified functions at particular times so the programmer can use
+   this to do things, like animate, or time out on connections or tasks that take
+   too long etc.
+
+   Idle handlers are provided too, as well as calls on entering an idle state
+   (often a very good time to update the state of the program). All events that
+   enter the system are passed to specific callback functions that the program
+   sets up to handle those events. Handling them is simple and other Ecore
+   modules produce more events on the queue, coming from other sources such as
+   file descriptors etc.
+
+   Ecore also lets you have functions called when file descriptors become active
+   for reading or writing, allowing for streamlined, non-blocking IO.
+
+   Here is an example of a simple program and its basic event loop flow:
+
+   @image html  prog_flow.png
+   @image latex prog_flow.eps width=\textwidth
+
+
+
+   @section work How does Ecore work?
+
+   Ecore is very easy to learn and use. All the function calls are designed to
+   be easy to remember, explicit in describing what they do, and heavily
+   name-spaced. Ecore programs can start and be very simple.
+
+   For example:
+
+   @code
+   #include <Ecore.h>
+
+   int
+   main(int argc, const char **argv)
+   {
+   ecore_init();
+   ecore_app_args_set(argc, argv);
+   ecore_main_loop_begin();
+   ecore_shutdown();
+   return 0;
+   }
+   @endcode
+
+   This program is very simple and doesn't check for errors, but it does start up
+   and begin a main loop waiting for events or timers to tick off. This program
+   doesn't set up any, but now we can expand on this simple program a little
+   more by adding some event handlers and timers.
+
+   @code
+   #include <Ecore.h>
+
+   Ecore_Timer         *timer1     = NULL;
+   Ecore_Event_Handler *handler1   = NULL;
+   double               start_time = 0.0;
+
+   int
+   timer_func(void *data)
+   {
+   printf("Tick timer. Sec: %3.2f\n", ecore_time_get() - start_time);
+   return 1;
+   }
+
+   int
+   exit_func(void *data, int ev_type, void *ev)
+   {
+   Ecore_Event_Signal_Exit *e;
+
+   e = (Ecore_Event_Signal_Exit *)ev;
+   if (e->interrupt)      printf("Exit: interrupt\n");
+   else if (e->quit)      printf("Exit: quit\n");
+   else if (e->terminate) printf("Exit: terminate\n");
+   ecore_main_loop_quit();
+   return 1;
+   }
+
+   int
+   main(int argc, const char **argv)
+   {
+   ecore_init();
+   ecore_app_args_set(argc, argv);
+   start_time = ecore_time_get();
+   handler1 = ecore_event_handler_add(ECORE_EVENT_SIGNAL_EXIT, exit_func, NULL);
+   timer1 = ecore_timer_add(0.5, timer_func, NULL);
+   ecore_main_loop_begin();
+   ecore_shutdown();
+   return 0;
+   }
+   @endcode
+
+   In the previous example, we initialize our application and get the time at
+   which our program has started so we can calculate an offset. We set
+   up a timer to tick off in 0.5 seconds, and since it returns 1, will
+   keep ticking off every 0.5 seconds until it returns 0, or is deleted
+   by hand. An event handler is set up to call a function -
+   exit_func(),
+   whenever an event of type ECORE_EVENT_SIGNAL_EXIT is received (CTRL-C
+   on the command line will cause such an event to happen). If this event
+   occurs it tells you what kind of exit signal was received, and asks
+   the main loop to quit when it is finished by calling
+   ecore_main_loop_quit().
+
+   The handles returned by ecore_timer_add() and
+   ecore_event_handler_add() are
+   only stored here as an example. If you don't need to address the timer or
+   event handler again you don't need to store the result, so just call the
+   function, and don't assign the result to any variable.
+
+   This program looks slightly more complex than needed to do these simple
+   things, but in principle, programs don't get any more complex. You add more
+   event handlers, for more events, will have more timers and such, BUT it all
+   follows the same principles as shown in this example.
+
+ */
 
 /*
-@page Ecore_Config_Page The Enlightened Property Library
+   @page Ecore_Config_Page The Enlightened Property Library
 
-The Enlightened Property Library (Ecore_Config) is an adbstraction
-from the complexities of writing your own configuration. It provides
-many features using the Enlightenment 17 development libraries.
+   The Enlightened Property Library (Ecore_Config) is an adbstraction
+   from the complexities of writing your own configuration. It provides
+   many features using the Enlightenment 17 development libraries.
 
-To use the library, you:
-@li Set the default values of your properties.
-@li Load the configuration from a file.  You must set the default values
+   To use the library, you:
+   @li Set the default values of your properties.
+   @li Load the configuration from a file.  You must set the default values
     first, so that the library knows the correct type of each argument.
 
-The following examples show how to use the Enlightened Property Library:
-@li @link config_basic_example.c config_basic_example.c @endlink
-@li @link config_listener_example.c config_listener_example.c @endlink
+   The following examples show how to use the Enlightened Property Library:
+   @li @link config_basic_example.c config_basic_example.c @endlink
+   @li @link config_listener_example.c config_listener_example.c @endlink
 
-*/
+ */
 
 /**
-@page X_Window_System_Page X Window System
+   @page X_Window_System_Page X Window System
 
-The Ecore library includes a wrapper for handling the X window system.
-This page briefly explains what the X window system is and various terms
-that are used.
-*/
+   The Ecore library includes a wrapper for handling the X window system.
+   This page briefly explains what the X window system is and various terms
+   that are used.
+ */
 
 #ifndef _ECORE_H
 #define _ECORE_H
@@ -303,225 +309,240 @@ that are used.
 extern "C" {
 #endif
 
-  /**
-   * @defgroup Ecore_Init_Group Ecore initialization and shutdown functions.
-   *
-   * @{
-   */
-
-   EAPI int  ecore_init(void);
-   EAPI int  ecore_shutdown(void);
-
-  /**
-   * @}
-   */
-
-  /**
-   *
-   * @defgroup Ecore_Main_Loop_Group Ecore main loop functions
-   *
-   * These are functions acting on Ecore's main loop itself or on
-   * events and infrastructure directly linked to it. This loop is
-   * designed to work on embedded systems all the way to large and
-   * powerful multi-cpu workstations.
-   *
-   * It serialises all system signals and events into a single event
-   * queue, that can be easily processed without needing to worry
-   * about concurrency. A properly written, event-driven program
-   * using this kind of programming does not need threads. It makes
-   * the program very robust and easy to follow.
-   *
-   * For example, for the main loop to be of any use, you need to be
-   * able to add @b events and event handlers on it. Events for file
-   * descriptor events are covered in @ref Ecore_FD_Handler_Group.
-   *
-   * Timer functions are covered in @ref Ecore_Time_Group.
-   *
-   * There is also provision for callbacks for when the loop enters or
-   * exits an @b idle state. See @ref Ecore_Idle_Group for more
-   * information on it.
-   *
-   * Functions are also provided for spawning child processes using
-   * @c fork(). See @ref Ecore_Exe_Group for more details on it.
-   *
-   * Here is an example of simple program and its basic event loop
-   * flow:
-   *
-   * @image html prog_flow.png
-   * @image latex prog_flow.eps width=\textwidth
-   *
-   * For examples of setting up and using a main loop, see
-   * @ref Ecore_Main_Loop_Page.
-   *
-   * @{
-   */
+/**
+ * @defgroup Ecore_Init_Group Ecore initialization and shutdown functions.
+ *
+ * @{
+ */
+
+EAPI int
+ ecore_init(void);
+EAPI int
+ ecore_shutdown(void);
+
+/**
+ * @}
+ */
+
+/**
+ *
+ * @defgroup Ecore_Main_Loop_Group Ecore main loop functions
+ *
+ * These are functions acting on Ecore's main loop itself or on
+ * events and infrastructure directly linked to it. This loop is
+ * designed to work on embedded systems all the way to large and
+ * powerful multi-cpu workstations.
+ *
+ * It serialises all system signals and events into a single event
+ * queue, that can be easily processed without needing to worry
+ * about concurrency. A properly written, event-driven program
+ * using this kind of programming does not need threads. It makes
+ * the program very robust and easy to follow.
+ *
+ * For example, for the main loop to be of any use, you need to be
+ * able to add @b events and event handlers on it. Events for file
+ * descriptor events are covered in @ref Ecore_FD_Handler_Group.
+ *
+ * Timer functions are covered in @ref Ecore_Time_Group.
+ *
+ * There is also provision for callbacks for when the loop enters or
+ * exits an @b idle state. See @ref Ecore_Idle_Group for more
+ * information on it.
+ *
+ * Functions are also provided for spawning child processes using
+ * @c fork(). See @ref Ecore_Exe_Group for more details on it.
+ *
+ * Here is an example of simple program and its basic event loop
+ * flow:
+ *
+ * @image html prog_flow.png
+ * @image latex prog_flow.eps width=\textwidth
+ *
+ * For examples of setting up and using a main loop, see
+ * @ref Ecore_Main_Loop_Page.
+ *
+ * @{
+ */
 
 #define ECORE_VERSION_MAJOR 1
 #define ECORE_VERSION_MINOR 0
 
-   typedef struct _Ecore_Version
-     {
-        int major;
-        int minor;
-        int micro;
-        int revision;
-     } Ecore_Version;
+typedef struct _Ecore_Version
+{
+   int major;
+   int minor;
+   int micro;
+   int revision;
+} Ecore_Version;
 
-   EAPI extern Ecore_Version *ecore_version;
+EAPI extern Ecore_Version *ecore_version;
 
-#define ECORE_CALLBACK_CANCEL EINA_FALSE /**< Return value to remove a callback */
-#define ECORE_CALLBACK_RENEW EINA_TRUE  /**< Return value to keep a callback */
+#define ECORE_CALLBACK_CANCEL  EINA_FALSE /**< Return value to remove a callback */
+#define ECORE_CALLBACK_RENEW   EINA_TRUE /**< Return value to keep a callback */
 
 #define ECORE_CALLBACK_PASS_ON EINA_TRUE /**< Return value to pass event to next handler */
-#define ECORE_CALLBACK_DONE EINA_FALSE /**< Return value to stop event handling */
-
-   /**
-    * @typedef Ecore_Task_Cb Ecore_Task_Cb
-    * A callback run for a task (timer, idler, poller, animator, etc)
-    */
-   typedef Eina_Bool (*Ecore_Task_Cb) (void *data);
-
-   /**
-    * @typedef Ecore_Eselect_Function Ecore_Eselect_Function
-    * A function which can be used to replace select() in the main loop
-    */
-   typedef int (*Ecore_Select_Function)(int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds, struct timeval *timeout);
-
-   EAPI void              ecore_main_loop_iterate(void);
-
-   EAPI void              ecore_main_loop_select_func_set(Ecore_Select_Function func);
-   EAPI Ecore_Select_Function ecore_main_loop_select_func_get(void);
-
-   EAPI Eina_Bool         ecore_main_loop_glib_integrate(void);
-   EAPI void              ecore_main_loop_glib_always_integrate_disable(void);
-
-   EAPI void              ecore_main_loop_begin(void);
-   EAPI void              ecore_main_loop_quit(void);
-
-   /**
-    * @typedef Ecore_Cb Ecore_Cb
-    * A generic callback called as a hook when a certain point in
-    * execution is reached.
-    */
-   typedef void (*Ecore_Cb) (void *data);
-
-   /**
-    * @typedef Ecore_Data_Cb Ecore_Data_Cb
-    * A callback which is used to return data to the main function
-    */
-   typedef void *(*Ecore_Data_Cb) (void *data);
-
-  /**
-   * @brief Call callback asynchronously in the main loop.
-   * @since 1.1.0
-   *
-   * @param callback The callback to call in the main loop
-   * @param data The data to give to that call back
-   *
-   * For all calls that need to happen in the main loop (most EFL functions do),
-   * this helper function provides the infrastructure needed to do it safely
-   * by avoiding dead lock, race condition and properly wake up the main loop.
-   *
-   * Remember after that function call, you should never touch again the @p data
-   * in the thread, it is owned by the main loop and your callback should take
-   * care of freeing it if necessary.
-   */
-   EAPI void                 ecore_main_loop_thread_safe_call_async(Ecore_Cb callback, void *data);
-
-  /**
-   * @brief Call callback synchronously in the main loop.
-   * @since 1.1.0
-   *
-   * @param callback The callback to call in the main loop
-   * @param data The data to give to that call back
-   * @return the value returned by the callback in the main loop
-   *
-   * For all calls that need to happen in the main loop (most EFL functions do),
-   * this helper function provides the infrastructure needed to do it safely
-   * by avoiding dead lock, race condition and properly wake up the main loop.
-   *
-   * Remember this function will block until the callback is executed in the
-   * main loop. It can take time and you have no guaranty about the timeline.
-   */
-  EAPI void                 *ecore_main_loop_thread_safe_call_sync(Ecore_Data_Cb callback, void *data);
-
-  /**
-   * @brief This function suspend the main loop in a know state
-   * @since 1.1.0
-   *
-   * @result the number of time ecore_thread_main_loop_begin() has been called
-   * in this thread, if the main loop was suspended correctly. If not, it return @c -1.
-   *
-   * This function suspend the main loop in a know state, this let you
-   * use any EFL call you want after it return. Be carefull, the main loop
-   * is blocked until you call ecore_thread_main_loop_end(). This is
-   * the only sane way to achieve pseudo thread safety.
-   *
-   * Notice that until the main loop is blocked, the thread is blocked
-   * and their is noway around that.
-   *
-   * We still advise you, when possible, to use ecore_main_loop_thread_safe_call_async()
-   * as it will not block the thread nor the main loop.
-   */
-  EAPI int ecore_thread_main_loop_begin(void);
-
-  /**
-   * @brief Unlock the main loop.
-   * @since 1.1.0
-   *
-   * @result the number of time ecore_thread_main_loop_end() need to be called before
-   * the main loop is unlocked again. @c -1 will be returned if you are trying to unlock
-   * when there wasn't enough call to ecore_thread_main_loop_begin().
-   *
-   * After a call to ecore_thread_main_loop_begin(), you need to absolutly
-   * call ecore_thread_main_loop_end(), or you application will stay frozen.
-   */
-  EAPI int ecore_thread_main_loop_end(void);
-
-   /**
-    * @}
-    */
-
-   /**
-    * @defgroup Ecore_Event_Group Ecore Event functions
-    *
-    * Ecore events are used to wake up the Ecore main loop to warn
-    * about state changes, tasks completed, data available for reading
-    * or writing, etc. They are the base of the event oriented
-    * programming.
-    *
-    * The idea is to write many functions (callbacks) that will be
-    * registered to specific events, and called when these events
-    * happen. This way, when the system state changes (a mouse click is
-    * detected, a key is pressed, or the content of a file changes, for
-    * example), the respective callbacks will be called with some
-    * information about that event. Usually the function/callback will
-    * have a data pointer to the event info (the position in the screen
-    * where the mouse was clicked, the name of the key that was
-    * pressed, or the name of the file that has changed).
-    *
-    * The basic usage, when one needs to watch for an existing event,
-    * is to register a callback to it using ecore_event_add(). Of
-    * course it's necessary to know beforehand what are the types of
-    * events that the system/library will emmit.  This should be
-    * available with the documentation from that system/library.
-    *
-    * When writing a library or group of functions that need to inform
-    * about something, and you already are running on top of a main
-    * loop, it is usually a good approach to use events. This way you
-    * allow others to register as many callbacks as necessary to this
-    * event, and don't have to care about who is registering to it. The
-    * functions ecore_event_type_new() and ecore_event_add() are
-    * available for this purpose.
-    *
-    * Example that deals with events:
-    *
-    * @li @ref ecore_event_example_c
-    *
-    * @ingroup Ecore_Main_Loop_Group
-    *
-    * @{
-    */
+#define ECORE_CALLBACK_DONE    EINA_FALSE /**< Return value to stop event handling */
+
+/**
+ * @typedef Ecore_Task_Cb Ecore_Task_Cb
+ * A callback run for a task (timer, idler, poller, animator, etc)
+ */
+typedef Eina_Bool (*Ecore_Task_Cb)(void *data);
+
+/**
+ * @typedef Ecore_Eselect_Function Ecore_Eselect_Function
+ * A function which can be used to replace select() in the main loop
+ */
+typedef int (*Ecore_Select_Function)(int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds, struct timeval *timeout);
+
+EAPI void
+ecore_main_loop_iterate(void);
+
+EAPI void
+ ecore_main_loop_select_func_set(Ecore_Select_Function func);
+EAPI Ecore_Select_Function
+ ecore_main_loop_select_func_get(void);
+
+EAPI Eina_Bool
+ ecore_main_loop_glib_integrate(void);
+EAPI void
+ ecore_main_loop_glib_always_integrate_disable(void);
+
+EAPI void
+ ecore_main_loop_begin(void);
+EAPI void
+ ecore_main_loop_quit(void);
+
+/**
+ * @typedef Ecore_Cb Ecore_Cb
+ * A generic callback called as a hook when a certain point in
+ * execution is reached.
+ */
+typedef void (*Ecore_Cb)(void *data);
+
+/**
+ * @typedef Ecore_Data_Cb Ecore_Data_Cb
+ * A callback which is used to return data to the main function
+ */
+typedef void *(*Ecore_Data_Cb)(void *data);
+
+/**
+ * @brief Call callback asynchronously in the main loop.
+ * @since 1.1.0
+ *
+ * @param callback The callback to call in the main loop
+ * @param data The data to give to that call back
+ *
+ * For all calls that need to happen in the main loop (most EFL functions do),
+ * this helper function provides the infrastructure needed to do it safely
+ * by avoiding dead lock, race condition and properly wake up the main loop.
+ *
+ * Remember after that function call, you should never touch again the @p data
+ * in the thread, it is owned by the main loop and your callback should take
+ * care of freeing it if necessary.
+ */
+EAPI void
+ecore_main_loop_thread_safe_call_async(Ecore_Cb callback,
+                                       void *data);
+
+/**
+ * @brief Call callback synchronously in the main loop.
+ * @since 1.1.0
+ *
+ * @param callback The callback to call in the main loop
+ * @param data The data to give to that call back
+ * @return the value returned by the callback in the main loop
+ *
+ * For all calls that need to happen in the main loop (most EFL functions do),
+ * this helper function provides the infrastructure needed to do it safely
+ * by avoiding dead lock, race condition and properly wake up the main loop.
+ *
+ * Remember this function will block until the callback is executed in the
+ * main loop. It can take time and you have no guaranty about the timeline.
+ */
+EAPI void *
+ecore_main_loop_thread_safe_call_sync(Ecore_Data_Cb callback,
+                                      void *data);
+
+/**
+ * @brief This function suspend the main loop in a know state
+ * @since 1.1.0
+ *
+ * @result the number of time ecore_thread_main_loop_begin() has been called
+ * in this thread, if the main loop was suspended correctly. If not, it return @c -1.
+ *
+ * This function suspend the main loop in a know state, this let you
+ * use any EFL call you want after it return. Be carefull, the main loop
+ * is blocked until you call ecore_thread_main_loop_end(). This is
+ * the only sane way to achieve pseudo thread safety.
+ *
+ * Notice that until the main loop is blocked, the thread is blocked
+ * and their is noway around that.
+ *
+ * We still advise you, when possible, to use ecore_main_loop_thread_safe_call_async()
+ * as it will not block the thread nor the main loop.
+ */
+EAPI int
+ecore_thread_main_loop_begin(void);
+
+/**
+ * @brief Unlock the main loop.
+ * @since 1.1.0
+ *
+ * @result the number of time ecore_thread_main_loop_end() need to be called before
+ * the main loop is unlocked again. @c -1 will be returned if you are trying to unlock
+ * when there wasn't enough call to ecore_thread_main_loop_begin().
+ *
+ * After a call to ecore_thread_main_loop_begin(), you need to absolutly
+ * call ecore_thread_main_loop_end(), or you application will stay frozen.
+ */
+EAPI int
+ecore_thread_main_loop_end(void);
+
+/**
+ * @}
+ */
+
+/**
+ * @defgroup Ecore_Event_Group Ecore Event functions
+ *
+ * Ecore events are used to wake up the Ecore main loop to warn
+ * about state changes, tasks completed, data available for reading
+ * or writing, etc. They are the base of the event oriented
+ * programming.
+ *
+ * The idea is to write many functions (callbacks) that will be
+ * registered to specific events, and called when these events
+ * happen. This way, when the system state changes (a mouse click is
+ * detected, a key is pressed, or the content of a file changes, for
+ * example), the respective callbacks will be called with some
+ * information about that event. Usually the function/callback will
+ * have a data pointer to the event info (the position in the screen
+ * where the mouse was clicked, the name of the key that was
+ * pressed, or the name of the file that has changed).
+ *
+ * The basic usage, when one needs to watch for an existing event,
+ * is to register a callback to it using ecore_event_add(). Of
+ * course it's necessary to know beforehand what are the types of
+ * events that the system/library will emmit.  This should be
+ * available with the documentation from that system/library.
+ *
+ * When writing a library or group of functions that need to inform
+ * about something, and you already are running on top of a main
+ * loop, it is usually a good approach to use events. This way you
+ * allow others to register as many callbacks as necessary to this
+ * event, and don't have to care about who is registering to it. The
+ * functions ecore_event_type_new() and ecore_event_add() are
+ * available for this purpose.
+ *
+ * Example that deals with events:
+ *
+ * @li @ref ecore_event_example_c
+ *
+ * @ingroup Ecore_Main_Loop_Group
+ *
+ * @{
+ */
 
 #define ECORE_EVENT_NONE            0
 #define ECORE_EVENT_SIGNAL_USER     1 /**< User signal event */
@@ -531,1590 +552,1793 @@ extern "C" {
 #define ECORE_EVENT_SIGNAL_REALTIME 5 /**< Realtime signal event */
 #define ECORE_EVENT_COUNT           6
 
-   typedef struct _Ecore_Win32_Handler         Ecore_Win32_Handler; /**< A handle for HANDLE handlers on Windows */
-   typedef struct _Ecore_Event_Handler         Ecore_Event_Handler; /**< A handle for an event handler */
-   typedef struct _Ecore_Event_Filter          Ecore_Event_Filter; /**< A handle for an event filter */
-   typedef struct _Ecore_Event                 Ecore_Event; /**< A handle for an event */
-   typedef struct _Ecore_Event_Signal_User     Ecore_Event_Signal_User; /**< User signal event */
-   typedef struct _Ecore_Event_Signal_Hup      Ecore_Event_Signal_Hup; /**< Hup signal event */
-   typedef struct _Ecore_Event_Signal_Exit     Ecore_Event_Signal_Exit; /**< Exit signal event */
-   typedef struct _Ecore_Event_Signal_Power    Ecore_Event_Signal_Power; /**< Power signal event */
-   typedef struct _Ecore_Event_Signal_Realtime Ecore_Event_Signal_Realtime; /**< Realtime signal event */
-
-   /**
   * @typedef Ecore_Filter_Cb
   * A callback used for filtering events from the main loop.
   */
-   typedef Eina_Bool (*Ecore_Filter_Cb) (void *data, void *loop_data, int type, void *event);
-
-   /**
   * @typedef Ecore_End_Cb Ecore_End_Cb
   * This is the callback which is called at the end of a function,
   * usually for cleanup purposes.
   */
-   typedef void (*Ecore_End_Cb) (void *user_data, void *func_data);
-
-   /**
   * @typedef Ecore_Event_Handler_Cb Ecore_Event_Handler_Cb
   * A callback used by the main loop to handle events of a specified
   * type.
   */
-   typedef Eina_Bool (*Ecore_Event_Handler_Cb) (void *data, int type, void *event);
-
-   struct _Ecore_Event_Signal_User /** User signal event */
-     {
-        int   number; /**< The signal number. Either 1 or 2 */
-        void *ext_data; /**< Extension data - not used */
+typedef struct _Ecore_Win32_Handler         Ecore_Win32_Handler;    /**< A handle for HANDLE handlers on Windows */
+typedef struct _Ecore_Event_Handler         Ecore_Event_Handler;    /**< A handle for an event handler */
+typedef struct _Ecore_Event_Filter          Ecore_Event_Filter;    /**< A handle for an event filter */
+typedef struct _Ecore_Event                 Ecore_Event;    /**< A handle for an event */
+typedef struct _Ecore_Event_Signal_User     Ecore_Event_Signal_User;    /**< User signal event */
+typedef struct _Ecore_Event_Signal_Hup      Ecore_Event_Signal_Hup;    /**< Hup signal event */
+typedef struct _Ecore_Event_Signal_Exit     Ecore_Event_Signal_Exit;    /**< Exit signal event */
+typedef struct _Ecore_Event_Signal_Power    Ecore_Event_Signal_Power;    /**< Power signal event */
+typedef struct _Ecore_Event_Signal_Realtime Ecore_Event_Signal_Realtime;    /**< Realtime signal event */
+
+/**
+ * @typedef Ecore_Filter_Cb
+ * A callback used for filtering events from the main loop.
+ */
+typedef Eina_Bool (*Ecore_Filter_Cb)(void *data, void *loop_data, int type, void *event);
+
+/**
+ * @typedef Ecore_End_Cb Ecore_End_Cb
+ * This is the callback which is called at the end of a function,
+ * usually for cleanup purposes.
+ */
+typedef void (*Ecore_End_Cb)(void *user_data, void *func_data);
+
+/**
+ * @typedef Ecore_Event_Handler_Cb Ecore_Event_Handler_Cb
+ * A callback used by the main loop to handle events of a specified
+ * type.
+ */
+typedef Eina_Bool (*Ecore_Event_Handler_Cb)(void *data, int type, void *event);
+
+struct _Ecore_Event_Signal_User    /** User signal event */
+{
+   int       number;  /**< The signal number. Either 1 or 2 */
+   void     *ext_data;  /**< Extension data - not used */
 
 #if !defined (_WIN32) && !defined (__lv2ppu__)
-        siginfo_t data; /**< Signal info */
+   siginfo_t data; /**< Signal info */
 #endif
-     };
+};
 
-   struct _Ecore_Event_Signal_Hup /** Hup signal event */
-     {
-        void *ext_data; /**< Extension data - not used */
+struct _Ecore_Event_Signal_Hup    /** Hup signal event */
+{
+   void     *ext_data;  /**< Extension data - not used */
 
 #if !defined (_WIN32) && !defined (__lv2ppu__)
-        siginfo_t data; /**< Signal info */
+   siginfo_t data; /**< Signal info */
 #endif
-     };
+};
 
-   struct _Ecore_Event_Signal_Exit /** Exit request event */
-     {
-        Eina_Bool   interrupt : 1; /**< Set if the exit request was an interrupt  signal*/
-        Eina_Bool   quit      : 1; /**< set if the exit request was a quit signal */
-        Eina_Bool   terminate : 1; /**< Set if the exit request was a terminate singal */
-        void          *ext_data; /**< Extension data - not used */
+struct _Ecore_Event_Signal_Exit    /** Exit request event */
+{
+   Eina_Bool interrupt : 1; /**< Set if the exit request was an interrupt  signal*/
+   Eina_Bool quit      : 1; /**< set if the exit request was a quit signal */
+   Eina_Bool terminate : 1; /**< Set if the exit request was a terminate singal */
+   void     *ext_data; /**< Extension data - not used */
 
 #if !defined (_WIN32) && !defined (__lv2ppu__)
-        siginfo_t data; /**< Signal info */
+   siginfo_t data; /**< Signal info */
 #endif
-     };
+};
 
-   struct _Ecore_Event_Signal_Power /** Power event */
-     {
-        void *ext_data; /**< Extension data - not used */
+struct _Ecore_Event_Signal_Power    /** Power event */
+{
+   void     *ext_data;  /**< Extension data - not used */
 
 #if !defined (_WIN32) && !defined (__lv2ppu__)
-        siginfo_t data; /**< Signal info */
+   siginfo_t data; /**< Signal info */
 #endif
-     };
+};
 
-   struct _Ecore_Event_Signal_Realtime /** Realtime event */
-     {
-        int num; /**< The realtime signal's number */
+struct _Ecore_Event_Signal_Realtime    /** Realtime event */
+{
+   int       num; /**< The realtime signal's number */
 
 #if !defined (_WIN32) && !defined (__lv2ppu__)
-        siginfo_t data; /**< Signal info */
+   siginfo_t data; /**< Signal info */
 #endif
-     };
-
-   EAPI Ecore_Event_Handler *ecore_event_handler_add(int type, Ecore_Event_Handler_Cb func, const void *data);
-   EAPI void                *ecore_event_handler_del(Ecore_Event_Handler *event_handler);
-   EAPI Ecore_Event         *ecore_event_add(int type, void *ev, Ecore_End_Cb func_free, void *data);
-   EAPI void                *ecore_event_del(Ecore_Event *event);
-   EAPI void                *ecore_event_handler_data_get(Ecore_Event_Handler *eh);
-   EAPI void                *ecore_event_handler_data_set(Ecore_Event_Handler *eh, const void *data);
-   EAPI int                  ecore_event_type_new(void);
-   EAPI Ecore_Event_Filter  *ecore_event_filter_add(Ecore_Data_Cb func_start, Ecore_Filter_Cb func_filter, Ecore_End_Cb func_end, const void *data);
-   EAPI void                *ecore_event_filter_del(Ecore_Event_Filter *ef);
-   EAPI int                  ecore_event_current_type_get(void);
-   EAPI void                *ecore_event_current_event_get(void);
-
-   /**
-    * @}
-    */
-
-    /**
-     * @defgroup Ecore_Exe_Group Process Spawning Functions
-     *
-     * Functions that deal with and send signals to spawned processes.
-     *
-     * @ingroup Ecore_Main_Loop_Group
-     *
-     * @{
-     */
+};
+
+EAPI Ecore_Event_Handler *
+ecore_event_handler_add(int type,
+                        Ecore_Event_Handler_Cb func,
+                        const void *data);
+EAPI void *
+ ecore_event_handler_del(Ecore_Event_Handler *event_handler);
+EAPI Ecore_Event *
+ ecore_event_add(int type,
+                void *ev,
+                Ecore_End_Cb func_free,
+                void *data);
+EAPI void *
+ ecore_event_del(Ecore_Event *event);
+EAPI void *
+ ecore_event_handler_data_get(Ecore_Event_Handler *eh);
+EAPI void *
+ ecore_event_handler_data_set(Ecore_Event_Handler *eh,
+                             const void *data);
+EAPI int
+ ecore_event_type_new(void);
+EAPI Ecore_Event_Filter *
+ ecore_event_filter_add(Ecore_Data_Cb func_start,
+                       Ecore_Filter_Cb func_filter,
+                       Ecore_End_Cb func_end,
+                       const void *data);
+EAPI void *
+ ecore_event_filter_del(Ecore_Event_Filter *ef);
+EAPI int
+ ecore_event_current_type_get(void);
+EAPI void *
+ ecore_event_current_event_get(void);
+
+/**
+ * @}
+ */
+
+/**
+ * @defgroup Ecore_Exe_Group Process Spawning Functions
+ *
+ * Functions that deal with and send signals to spawned processes.
+ *
+ * @ingroup Ecore_Main_Loop_Group
+ *
+ * @{
+ */
 
  #define ECORE_EXE_PRIORITY_INHERIT 9999
 
-    EAPI extern int ECORE_EXE_EVENT_ADD; /**< A child process has been added */
-    EAPI extern int ECORE_EXE_EVENT_DEL; /**< A child process has been deleted (it exited, naming consistent with the rest of ecore). */
-   EAPI extern int ECORE_EXE_EVENT_DATA; /**< Data from a child process. */
-   EAPI extern int ECORE_EXE_EVENT_ERROR; /**< Errors from a child process. */
-
-   enum _Ecore_Exe_Flags /* flags for executing a child with its stdin and/or stdout piped back */
-     {
-        ECORE_EXE_NONE = 0, /**< No exe flags at all */
-        ECORE_EXE_PIPE_READ = 1, /**< Exe Pipe Read mask */
-        ECORE_EXE_PIPE_WRITE = 2, /**< Exe Pipe Write mask */
-        ECORE_EXE_PIPE_ERROR = 4, /**< Exe Pipe error mask */
-        ECORE_EXE_PIPE_READ_LINE_BUFFERED = 8, /**< Reads are buffered until a newline and split 1 line per Ecore_Exe_Event_Data_Line */
-        ECORE_EXE_PIPE_ERROR_LINE_BUFFERED = 16, /**< Errors are buffered until a newline and split 1 line per Ecore_Exe_Event_Data_Line */
-        ECORE_EXE_PIPE_AUTO = 32, /**< stdout and stderr are buffered automatically */
-        ECORE_EXE_RESPAWN = 64, /**< FIXME: Exe is restarted if it dies */
-        ECORE_EXE_USE_SH = 128, /**< Use /bin/sh to run the command. */
-        ECORE_EXE_NOT_LEADER = 256 /**< Do not use setsid() to have the executed process be its own session leader */
-     };
-   typedef enum _Ecore_Exe_Flags Ecore_Exe_Flags;
-
-   enum _Ecore_Exe_Win32_Priority
-     {
-       ECORE_EXE_WIN32_PRIORITY_IDLE, /**< Idle priority, for monitoring the system */
-       ECORE_EXE_WIN32_PRIORITY_BELOW_NORMAL, /**< Below default priority */
-       ECORE_EXE_WIN32_PRIORITY_NORMAL, /**< Default priority */
-       ECORE_EXE_WIN32_PRIORITY_ABOVE_NORMAL, /**< Above default priority */
-       ECORE_EXE_WIN32_PRIORITY_HIGH, /**< High priority, use with care as other threads in the system will not get processor time */
-       ECORE_EXE_WIN32_PRIORITY_REALTIME /**< Realtime priority, should be almost never used as it can interrupt system threads that manage mouse input, keyboard input, and background disk flushing */
-     };
-   typedef enum _Ecore_Exe_Win32_Priority Ecore_Exe_Win32_Priority;
-
-   typedef struct _Ecore_Exe                   Ecore_Exe; /**< A handle for spawned processes */
-
-   /**
-    * @typedef Ecore_Exe_Cb Ecore_Exe_Cb
-    * A callback to run with the associated @ref Ecore_Exe, usually
-    * for cleanup purposes.
-    */
-   typedef void (*Ecore_Exe_Cb)(void *data, const Ecore_Exe *exe);
-
-   typedef struct _Ecore_Exe_Event_Add         Ecore_Exe_Event_Add; /**< Spawned Exe add event */
-   typedef struct _Ecore_Exe_Event_Del         Ecore_Exe_Event_Del; /**< Spawned Exe exit event */
-   typedef struct _Ecore_Exe_Event_Data_Line   Ecore_Exe_Event_Data_Line; /**< Lines from a child process */
-   typedef struct _Ecore_Exe_Event_Data        Ecore_Exe_Event_Data; /**< Data from a child process */
-
-   struct _Ecore_Exe_Event_Add /** Process add event */
-     {
-        Ecore_Exe *exe; /**< The handle to the added process */
-        void      *ext_data; /**< Extension data - not used */
-     };
-
-   struct _Ecore_Exe_Event_Del /** Process exit event */
-     {
-        pid_t         pid; /**< The process ID of the process that exited */
-        int           exit_code; /**< The exit code of the process */
-        Ecore_Exe    *exe; /**< The handle to the exited process, or NULL if not found */
-        int           exit_signal; /** < The signal that caused the process to exit */
-        Eina_Bool  exited    : 1; /** < set to 1 if the process exited of its own accord */
-        Eina_Bool  signalled : 1; /** < set to 1 id the process exited due to uncaught signal */
-        void         *ext_data; /**< Extension data - not used */
+EAPI extern int ECORE_EXE_EVENT_ADD;     /**< A child process has been added */
+EAPI extern int ECORE_EXE_EVENT_DEL;     /**< A child process has been deleted (it exited, naming consistent with the rest of ecore). */
+EAPI extern int ECORE_EXE_EVENT_DATA;    /**< Data from a child process. */
+EAPI extern int ECORE_EXE_EVENT_ERROR;    /**< Errors from a child process. */
+
+enum _Ecore_Exe_Flags    /* flags for executing a child with its stdin and/or stdout piped back */
+{
+   ECORE_EXE_NONE = 0, /**< No exe flags at all */
+   ECORE_EXE_PIPE_READ = 1, /**< Exe Pipe Read mask */
+   ECORE_EXE_PIPE_WRITE = 2, /**< Exe Pipe Write mask */
+   ECORE_EXE_PIPE_ERROR = 4, /**< Exe Pipe error mask */
+   ECORE_EXE_PIPE_READ_LINE_BUFFERED = 8, /**< Reads are buffered until a newline and split 1 line per Ecore_Exe_Event_Data_Line */
+   ECORE_EXE_PIPE_ERROR_LINE_BUFFERED = 16, /**< Errors are buffered until a newline and split 1 line per Ecore_Exe_Event_Data_Line */
+   ECORE_EXE_PIPE_AUTO = 32, /**< stdout and stderr are buffered automatically */
+   ECORE_EXE_RESPAWN = 64, /**< FIXME: Exe is restarted if it dies */
+   ECORE_EXE_USE_SH = 128, /**< Use /bin/sh to run the command. */
+   ECORE_EXE_NOT_LEADER = 256, /**< Do not use setsid() to have the executed process be its own session leader */
+   ECORE_EXE_TERM_WITH_PARENT = 512 /**< Makes child receive SIGTERM when parent dies. */
+};
+typedef enum _Ecore_Exe_Flags Ecore_Exe_Flags;
+
+enum _Ecore_Exe_Win32_Priority
+{
+   ECORE_EXE_WIN32_PRIORITY_IDLE,     /**< Idle priority, for monitoring the system */
+   ECORE_EXE_WIN32_PRIORITY_BELOW_NORMAL,     /**< Below default priority */
+   ECORE_EXE_WIN32_PRIORITY_NORMAL,     /**< Default priority */
+   ECORE_EXE_WIN32_PRIORITY_ABOVE_NORMAL,     /**< Above default priority */
+   ECORE_EXE_WIN32_PRIORITY_HIGH,     /**< High priority, use with care as other threads in the system will not get processor time */
+   ECORE_EXE_WIN32_PRIORITY_REALTIME     /**< Realtime priority, should be almost never used as it can interrupt system threads that manage mouse input, keyboard input, and background disk flushing */
+};
+typedef enum _Ecore_Exe_Win32_Priority Ecore_Exe_Win32_Priority;
+
+typedef struct _Ecore_Exe              Ecore_Exe; /**< A handle for spawned processes */
+
+/**
+ * @typedef Ecore_Exe_Cb Ecore_Exe_Cb
+ * A callback to run with the associated @ref Ecore_Exe, usually
+ * for cleanup purposes.
+ */
+typedef void                            (*Ecore_Exe_Cb)(void *data, const Ecore_Exe *exe);
+
+typedef struct _Ecore_Exe_Event_Add       Ecore_Exe_Event_Add; /**< Spawned Exe add event */
+typedef struct _Ecore_Exe_Event_Del       Ecore_Exe_Event_Del; /**< Spawned Exe exit event */
+typedef struct _Ecore_Exe_Event_Data_Line Ecore_Exe_Event_Data_Line; /**< Lines from a child process */
+typedef struct _Ecore_Exe_Event_Data      Ecore_Exe_Event_Data; /**< Data from a child process */
+
+struct _Ecore_Exe_Event_Add    /** Process add event */
+{
+   Ecore_Exe *exe; /**< The handle to the added process */
+   void      *ext_data; /**< Extension data - not used */
+};
+
+struct _Ecore_Exe_Event_Del    /** Process exit event */
+{
+   pid_t      pid; /**< The process ID of the process that exited */
+   int        exit_code; /**< The exit code of the process */
+   Ecore_Exe *exe; /**< The handle to the exited process, or NULL if not found */
+   int        exit_signal; /** < The signal that caused the process to exit */
+   Eina_Bool  exited    : 1; /** < set to 1 if the process exited of its own accord */
+   Eina_Bool  signalled : 1; /** < set to 1 id the process exited due to uncaught signal */
+   void      *ext_data; /**< Extension data - not used */
 #if !defined (_WIN32) && !defined (__lv2ppu__)
-        siginfo_t     data; /**< Signal info */
+   siginfo_t  data; /**< Signal info */
 #endif
-     };
-
-   struct _Ecore_Exe_Event_Data_Line /**< Lines from a child process */
-      {
-         char *line;
-         int   size;
-      };
-
-   struct _Ecore_Exe_Event_Data /** Data from a child process event */
-     {
-        Ecore_Exe *exe; /**< The handle to the process */
-        void *data; /**< the raw binary data from the child process that was received */
-        int   size; /**< the size of this data in bytes */
-        Ecore_Exe_Event_Data_Line *lines; /**< an array of line data if line buffered, the last one has it's line member set to NULL */
-     };
-
-   EAPI void        ecore_exe_run_priority_set(int pri);
-   EAPI int         ecore_exe_run_priority_get(void);
-   EAPI Ecore_Exe  *ecore_exe_run(const char *exe_cmd, const void *data);
-   EAPI Ecore_Exe  *ecore_exe_pipe_run(const char *exe_cmd, Ecore_Exe_Flags flags, const void *data);
-   EAPI void        ecore_exe_callback_pre_free_set(Ecore_Exe *exe, Ecore_Exe_Cb func);
-   EAPI Eina_Bool   ecore_exe_send(Ecore_Exe *exe, const void *data, int size);
-   EAPI void        ecore_exe_close_stdin(Ecore_Exe *exe);
-   EAPI void        ecore_exe_auto_limits_set(Ecore_Exe *exe, int start_bytes, int end_bytes, int start_lines, int end_lines);
-   EAPI Ecore_Exe_Event_Data *ecore_exe_event_data_get(Ecore_Exe *exe, Ecore_Exe_Flags flags);
-   EAPI void        ecore_exe_event_data_free(Ecore_Exe_Event_Data *data);
-   EAPI void       *ecore_exe_free(Ecore_Exe *exe);
-   EAPI pid_t       ecore_exe_pid_get(const Ecore_Exe *exe);
-   EAPI void        ecore_exe_tag_set(Ecore_Exe *exe, const char *tag);
-   EAPI const char *ecore_exe_tag_get(const Ecore_Exe *exe);
-   EAPI const char *ecore_exe_cmd_get(const Ecore_Exe *exe);
-   EAPI void       *ecore_exe_data_get(const Ecore_Exe *exe);
-   EAPI void       *ecore_exe_data_set(Ecore_Exe *exe, void *data);
-   EAPI Ecore_Exe_Flags ecore_exe_flags_get(const Ecore_Exe *exe);
-   EAPI void        ecore_exe_pause(Ecore_Exe *exe);
-   EAPI void        ecore_exe_continue(Ecore_Exe *exe);
-   EAPI void        ecore_exe_interrupt(Ecore_Exe *exe);
-   EAPI void        ecore_exe_quit(Ecore_Exe *exe);
-   EAPI void        ecore_exe_terminate(Ecore_Exe *exe);
-   EAPI void        ecore_exe_kill(Ecore_Exe *exe);
-   EAPI void        ecore_exe_signal(Ecore_Exe *exe, int num);
-   EAPI void        ecore_exe_hup(Ecore_Exe *exe);
-
-   /**
-    * @}
-    */
-
-   /**
-    * @defgroup Ecore_FD_Handler_Group File Event Handling Functions
-    *
-    * Functions that deal with file descriptor handlers.
-    *
-    * The @ref Ecore_Fd_Handler can be used to watch a file descriptor
-    * for data available for reading, for the availability to write
-    * without blocking, and for errors on the file descriptor.
-    *
-    * ecore_main_fd_handler_add() is used to setup a handler for a
-    * given file descriptor. This file descriptor can be the standard
-    * input, a network socket, a stream received through some driver
-    * of a hardware decoder, etc. Thus it can contain errors, like a
-    * disconnection, a broken pipe, and so, and that's why it's
-    * possible to check for these errors with the @ref ECORE_FD_ERROR
-    * flag.
-    *
-    * An @ref Ecore_Fd_Handler can be used to watch on a file
-    * descriptor without blocking, still being able to receive events,
-    * expire timers, and other watch for other things that happen in
-    * the Ecore main loop.
-    *
-    * Example of use of a file descriptor handler:
-    * @li @ref ecore_fd_handler_example_c
-    *
-    * @ingroup Ecore_Main_Loop_Group
-    *
-    * @{
-    */
-
-   typedef struct _Ecore_Fd_Handler            Ecore_Fd_Handler; /**< A handle for Fd handlers */
-
-   enum _Ecore_Fd_Handler_Flags
-     {
-        ECORE_FD_READ = 1, /**< Fd Read mask */
-        ECORE_FD_WRITE = 2, /**< Fd Write mask */
-        ECORE_FD_ERROR = 4 /**< Fd Error mask */
-     };
-   typedef enum _Ecore_Fd_Handler_Flags Ecore_Fd_Handler_Flags;
-
-   /**
-    * @typedef Ecore_Fd_Cb Ecore_Fd_Cb
-    * A callback used by an @ref Ecore_Fd_Handler.
-    */
-   typedef Eina_Bool (*Ecore_Fd_Cb) (void *data, Ecore_Fd_Handler *fd_handler);
-
-   /**
-    * @typedef Ecore_Fd_Prep_Cb Ecore_Fd_Prep_Cb
-    * A callback used by an @ref Ecore_Fd_Handler.
-    */
-   typedef void (*Ecore_Fd_Prep_Cb) (void *data, Ecore_Fd_Handler *fd_handler);
-
-   /**
-    * @typedef Ecore_Win32_Handle_Cb Ecore_Win32_Handle_Cb
-    * A callback used by an @ref Ecore_Win32_Handler.
-    */
-   typedef Eina_Bool (*Ecore_Win32_Handle_Cb) (void *data, Ecore_Win32_Handler *wh);
-
-   EAPI Ecore_Fd_Handler *ecore_main_fd_handler_add(int fd, Ecore_Fd_Handler_Flags flags, Ecore_Fd_Cb func, const void *data,
-                                                    Ecore_Fd_Cb buf_func, const void *buf_data);
-   EAPI void              ecore_main_fd_handler_prepare_callback_set(Ecore_Fd_Handler *fd_handler, Ecore_Fd_Prep_Cb func, const void *data);
-   EAPI void             *ecore_main_fd_handler_del(Ecore_Fd_Handler *fd_handler);
-   EAPI int               ecore_main_fd_handler_fd_get(Ecore_Fd_Handler *fd_handler);
-   EAPI Eina_Bool         ecore_main_fd_handler_active_get(Ecore_Fd_Handler *fd_handler, Ecore_Fd_Handler_Flags flags);
-   EAPI void              ecore_main_fd_handler_active_set(Ecore_Fd_Handler *fd_handler, Ecore_Fd_Handler_Flags flags);
-
-   EAPI Ecore_Win32_Handler *ecore_main_win32_handler_add(void *h, Ecore_Win32_Handle_Cb func, const void *data);
-   EAPI void                *ecore_main_win32_handler_del(Ecore_Win32_Handler *win32_handler);
-
-   /**
-    * @}
-    */
-
-  /**
-   * @defgroup Ecore_Poller_Group Ecore Poll functions
-   *
-   * These functions are for the need to poll information, but provide
-   * a shared abstracted API to pool such polling to minimise wakeup
-   * and ensure all the polling happens in as few spots as possible
-   * areound a core poll interval.  For now only 1 core poller type is
-   * supprted: ECORE_POLLER_CORE
-   *
-   * Example of @ref Ecore_Poller:
-   * @li @ref ecore_poller_example_c
-   *
-   * @ingroup Ecore_Main_Loop_Group
-   *
-   * @{
-   */
-
-   enum _Ecore_Poller_Type /* Poller types */
-     {
-        ECORE_POLLER_CORE = 0 /**< The core poller interval */
-     };
-   typedef enum _Ecore_Poller_Type Ecore_Poller_Type;
-
-   typedef struct _Ecore_Poller                Ecore_Poller; /**< A handle for pollers */
-
-   EAPI void          ecore_poller_poll_interval_set(Ecore_Poller_Type type, double poll_time);
-   EAPI double        ecore_poller_poll_interval_get(Ecore_Poller_Type type);
-   EAPI Eina_Bool     ecore_poller_poller_interval_set(Ecore_Poller *poller, int interval);
-   EAPI int           ecore_poller_poller_interval_get(Ecore_Poller *poller);
-   EAPI Ecore_Poller *ecore_poller_add(Ecore_Poller_Type type, int interval, Ecore_Task_Cb func, const void *data);
-   EAPI void         *ecore_poller_del(Ecore_Poller *poller);
-
-  /**
-   * @}
-   */
-
-  /**
-   * @defgroup Ecore_Animator_Group Ecore Animator functions
-   *
-   * @brief Ecore animators are a helper to simplify creating
-   * animations.
-   *
-   * Creating an animation is as simple as saying for how long it
-   * should be run and having a callback that does the animation,
-   * something like this:
-   * @code
-   * static Eina_Bool
-   * _do_animation(void *data, double pos)
-   * {
-   *    evas_object_move(data, 100 * pos, 100 * pos);
-   *    ... do some more animating ...
-   * }
-   * ...
-   * ecore_animator_timeline_add(2, _do_animation, my_evas_object);
-   * @endcode
-   * In the sample above we create an animation to move
-   * @c my_evas_object from position (0,0) to (100,100) in 2 seconds.
-   *
-   * If your animation will run for an unspecified amount of time you
-   * can use ecore_animator_add(), which is like using
-   * ecore_timer_add() with the interval being the
-   * @ref ecore_animator_frametime_set "framerate". Note that this has
-   * tangible benefits to creating a timer for each animation in terms
-   * of performance.
-   *
-   * For a more detailed example that show several animation see
-   * @ref tutorial_ecore_animator.
-   *
-   * @ingroup Ecore_Main_Loop_Group
-   *
-   * @{
-   */
-
-   typedef struct _Ecore_Animator              Ecore_Animator; /**< A handle for animators */
-
-   enum _Ecore_Pos_Map /* Position mappings */
-     {
-        ECORE_POS_MAP_LINEAR,     /**< Linear 0.0 -> 1.0 */
-        ECORE_POS_MAP_ACCELERATE, /**< Start slow then speed up */
-        ECORE_POS_MAP_DECELERATE, /**< Start fast then slow down */
-        ECORE_POS_MAP_SINUSOIDAL, /**< Start slow, speed up then slow down at end */
-        ECORE_POS_MAP_ACCELERATE_FACTOR, /**< Start slow then speed up, v1 being a power factor, 0.0 being linear, 1.0 being normal accelerate, 2.0 being much more pronounced accelerate (squared), 3.0 being cubed, etc. */
-        ECORE_POS_MAP_DECELERATE_FACTOR, /**< Start fast then slow down, v1 being a power factor, 0.0 being linear, 1.0 being normal decelerate, 2.0 being much more pronounced decelerate (squared), 3.0 being cubed, etc. */
-        ECORE_POS_MAP_SINUSOIDAL_FACTOR, /**< Start slow, speed up then slow down at end, v1 being a power factor, 0.0 being linear, 1.0 being normal sinusoidal, 2.0 being much more pronounced sinusoidal (squared), 3.0 being cubed, etc. */
-        ECORE_POS_MAP_DIVISOR_INTERP, /**< Start at gradient * v1, interpolated via power of v2 curve */
-        ECORE_POS_MAP_BOUNCE, /**< Start at 0.0 then "drop" like a ball bouncing to the ground at 1.0, and bounce v2 times, with decay factor of v1 */
-        ECORE_POS_MAP_SPRING  /**< Start at 0.0 then "wobble" like a spring rest position 1.0, and wobble v2 times, with decay factor of v1 */
-     };
-   typedef enum _Ecore_Pos_Map Ecore_Pos_Map;
-
-   enum _Ecore_Animator_Source /* Timing sources for animators */
-     {
-        ECORE_ANIMATOR_SOURCE_TIMER, /**< The default system clock/timer based animator that ticks every "frametime" seconds */
-        ECORE_ANIMATOR_SOURCE_CUSTOM /**< A custom animator trigger that you need to call ecore_animator_trigger() to make it tick */
-     };
-   typedef enum _Ecore_Animator_Source Ecore_Animator_Source;
-
-   /**
-    * @typedef Ecore_Timeline_Cb Ecore_Timeline_Cb
-    * A callback run for a task (animators with runtimes)
-    */
-   typedef Eina_Bool (*Ecore_Timeline_Cb) (void *data, double pos);
-
-  /**
-   * @brief Add an animator to call @p func at every animaton tick during main
-   * loop execution.
-   *
-   * @param func The function to call when it ticks off
-   * @param data The data to pass to the function
-   * @return A handle to the new animator
-   *
-   * This function adds a animator and returns its handle on success and NULL on
-   * failure. The function @p func will be called every N seconds where N is the
-   * @p frametime interval set by ecore_animator_frametime_set(). The function
-   * will be passed the @p data pointer as its parameter.
-   *
-   * When the animator @p func is called, it must return a value of either 1 or
-   * 0. If it returns 1 (or ECORE_CALLBACK_RENEW), it will be called again at
-   * the next tick, or if it returns 0 (or ECORE_CALLBACK_CANCEL) it will be
-   * deleted automatically making any references/handles for it invalid.
-   *
-   * @note The default @p frametime value is 1/30th of a second.
-   *
-   * @see ecore_animator_timeline_add()
-   * @see ecore_animator_frametime_set()
-   */
-   EAPI Ecore_Animator *ecore_animator_add(Ecore_Task_Cb func, const void *data);
-  /**
-   * @brief Add a animator that runs for a limited time
-   *
-   * @param runtime The time to run in seconds
-   * @param func The function to call when it ticks off
-   * @param data The data to pass to the function
-   * @return A handle to the new animator
-   *
-   * This function is just like ecore_animator_add() except the animator only
-   * runs for a limited time specified in seconds by @p runtime. Once the
-   * runtime the animator has elapsed (animator finished) it will automatically
-   * be deleted. The callback function @p func can return ECORE_CALLBACK_RENEW
-   * to keep the animator running or ECORE_CALLBACK_CANCEL ro stop it and have
-   * it be deleted automatically at any time.
-   *
-   * The @p func will ALSO be passed a position parameter that will be in value
-   * from 0.0 to 1.0 to indicate where along the timeline (0.0 start, 1.0 end)
-   * the animator run is at. If the callback wishes not to have a linear
-   * transition it can "map" this value to one of several curves and mappings
-   * via ecore_animator_pos_map().
-   *
-   * @note The default @p frametime value is 1/30th of a second.
-   *
-   * @see ecore_animator_add()
-   * @see ecore_animator_pos_map()
-   * @since 1.1.0
-   */
-   EAPI Ecore_Animator *ecore_animator_timeline_add(double runtime, Ecore_Timeline_Cb func, const void *data);
-  /**
-   * @brief Delete the specified animator from the animator list.
-   *
-   * @param animator The animator to delete
-   * @return The data pointer set for the animator on add
-   *
-   * Delete the specified @p animator from the set of animators that are
-   * executed during main loop execution. This function returns the data
-   * parameter that was being passed to the callback on success, or NULL on
-   * failure. After this call returns the specified animator object @p animator
-   * is invalid and should not be used again. It will not get called again after
-   * deletion.
-   */
-   EAPI void           *ecore_animator_del(Ecore_Animator *animator);
-  /**
-   * @brief Suspend the specified animator.
-   *
-   * @param animator The animator to delete
-   *
-   * The specified @p animator will be temporarly removed from the set of
-   * animators that are executed during main loop.
-   *
-   * @warning Freezing an animator doesn't freeze accounting of how long that
-   * animator has been running. Therefore if the animator was created with
-   * ecore_animator_timeline_add() the @p pos argument given to the callback
-   * will increase as if the animator hadn't been frozen and the animator may
-   * have it's execution halted if @p runtime elapsed.
-   */
-   EAPI void            ecore_animator_freeze(Ecore_Animator *animator);
-  /**
-   * @brief Restore execution of the specified animator.
-   *
-   * @param animator The animator to delete
-   *
-   * The specified @p animator will be put back in the set of animators that are
-   * executed during main loop.
-   */
-   EAPI void            ecore_animator_thaw(Ecore_Animator *animator);
-  /**
-   * @brief Set the animator call interval in seconds.
-   *
-   * @param frametime The time in seconds in between animator ticks.
-   *
-   * This function sets the time interval (in seconds) between animator ticks.
-   * At every tick the callback of every existing animator will be called.
-   *
-   * @warning Too small a value may cause performance issues and too high a
-   * value may cause your animation to seem "jerky".
-   *
-   * @note The default @p frametime value is 1/30th of a second.
-   */
-   EAPI void            ecore_animator_frametime_set(double frametime);
-  /**
-   * @brief Get the animator call interval in seconds.
-   *
-   * @return The time in second in between animator ticks.
-   *
-   * This function retrieves the time in seconds between animator ticks.
-   *
-   * @see ecore_animator_frametime_set()
-   */
-   EAPI double          ecore_animator_frametime_get(void);
-  /**
-   * @brief Maps an input position from 0.0 to 1.0 along a timeline to a
-   * position in a different curve.
-   *
-   * @param pos The input position to map
-   * @param map The mapping to use
-   * @param v1 A parameter use by the mapping (pass 0.0 if not used)
-   * @param v2 A parameter use by the mapping (pass 0.0 if not used)
-   * @return The mapped value
-   *
-   * Takes an input position (0.0 to 1.0) and maps to a new position (normally
-   * between 0.0 and 1.0, but it may go above/below 0.0 or 1.0 to show that it
-   * has "overshot" the mark) using some interpolation (mapping) algorithm.
-   *
-   * This function useful to create non-linear animations. It offers a variety
-   * of possible animaton curves to be used:
-   * @li ECORE_POS_MAP_LINEAR - Linear, returns @p pos
-   * @li ECORE_POS_MAP_ACCELERATE - Start slow then speed up
-   * @li ECORE_POS_MAP_DECELERATE - Start fast then slow down
-   * @li ECORE_POS_MAP_SINUSOIDAL - Start slow, speed up then slow down at end
-   * @li ECORE_POS_MAP_ACCELERATE_FACTOR - Start slow then speed up, v1 being a
-   * power factor, 0.0 being linear, 1.0 being ECORE_POS_MAP_ACCELERATE, 2.0
-   * being much more pronounced accelerate (squared), 3.0 being cubed, etc.
-   * @li ECORE_POS_MAP_DECELERATE_FACTOR - Start fast then slow down, v1 being a
-   * power factor, 0.0 being linear, 1.0 being ECORE_POS_MAP_DECELERATE, 2.0
-   * being much more pronounced decelerate (squared), 3.0 being cubed, etc.
-   * @li ECORE_POS_MAP_SINUSOIDAL_FACTOR - Start slow, speed up then slow down
-   * at end, v1 being a power factor, 0.0 being linear, 1.0 being
-   * ECORE_POS_MAP_SINUSOIDAL, 2.0 being much more pronounced sinusoidal
-   * (squared), 3.0 being cubed, etc.
-   * @li ECORE_POS_MAP_DIVISOR_INTERP - Start at gradient * v1, interpolated via
-   * power of v2 curve
-   * @li ECORE_POS_MAP_BOUNCE - Start at 0.0 then "drop" like a ball bouncing to
-   * the ground at 1.0, and bounce v2 times, with decay factor of v1
-   * @li ECORE_POS_MAP_SPRING - Start at 0.0 then "wobble" like a spring rest
-   * position 1.0, and wobble v2 times, with decay factor of v1
-   * @note When not listed v1 and v2 have no effect.
-   *
-   * @image html ecore-pos-map.png
-   * @image latex ecore-pos-map.eps width=\textwidth
-   *
-   * One way to use this would be:
-   * @code
-   * double pos; // input position in a timeline from 0.0 to 1.0
-   * double out; // output position after mapping
-   * int x1, y1, x2, y2; // x1 & y1 are start position, x2 & y2 are end position
-   * int x, y; // x & y are the calculated position
-   *
-   * out = ecore_animator_pos_map(pos, ECORE_POS_MAP_BOUNCE, 1.8, 7);
-   * x = (x1 * out) + (x2 * (1.0 - out));
-   * y = (y1 * out) + (y2 * (1.0 - out));
-   * move_my_object_to(myobject, x, y);
-   * @endcode
-   * This will make an animaton that bounces 7 each times diminishing by a
-   * factor of 1.8.
-   *
-   * @see _Ecore_Pos_Map
-   *
-   * @since 1.1.0
-   */
-   EAPI double          ecore_animator_pos_map(double pos, Ecore_Pos_Map map, double v1, double v2);
-  /**
-   * @brief Set the source of animator ticks for the mainloop
-   *
-   * @param source The source of animator ticks to use
-   *
-   * This sets the source of animator ticks. When an animator is active the
-   * mainloop will "tick" over frame by frame calling all animators that are
-   * registered until none are. The mainloop will tick at a given rate based
-   * on the animator source. The default source is the system clock timer
-   * source - ECORE_ANIMATOR_SOURCE_TIMER. This source uses the system clock
-   * to tick over every N seconds (specified by ecore_animator_frametime_set(),
-   * with the default being 1/30th of a second unless set otherwise). You can
-   * set a custom tick source by setting the source to
-   * ECORE_ANIMATOR_SOURCE_CUSTOM and then drive it yourself based on some input
-   * tick source (like another application via ipc, some vertical blanking
-   * interrupt interrupt etc.) using
-   * ecore_animator_custom_source_tick_begin_callback_set() and
-   * ecore_animator_custom_source_tick_end_callback_set() to set the functions
-   * that will be called to start and stop the ticking source, which when it
-   * gets a "tick" should call ecore_animator_custom_tick() to make the "tick" over 1
-   * frame.
-   */
-   EAPI void            ecore_animator_source_set(Ecore_Animator_Source source);
-  /**
-   * @brief Get the animator source currently set.
-   *
-   * @return The current animator source
-   *
-   * This gets the current animator source.
-   *
-   * @see ecore_animator_source_set()
-   */
-   EAPI Ecore_Animator_Source ecore_animator_source_get(void);
-  /**
-   * @brief Set the function that begins a custom animator tick source
-   *
-   * @param func The function to call when ticking is to begin
-   * @param data The data passed to the tick begin function as its parameter
-   *
-   * The Ecore Animator infrastructure handles tracking if animators are needed
-   * or not and which ones need to be called and when, but when the tick source
-   * is custom, you have to provide a tick source by calling
-   * ecore_animator_custom_tick() to indicate a frame tick happened. In order
-   * to allow the source of ticks to be dynamically enabled or disabled as
-   * needed, the @p func when set is called to enable the tick source to
-   * produce tick events that call ecore_animator_custom_tick(). If @p func
-   * is NULL then no function is called to begin custom ticking.
-   *
-   * @see ecore_animator_source_set()
-   * @see ecore_animator_custom_source_tick_end_callback_set()
-   * @see ecore_animator_custom_tick()
-   */
-   EAPI void            ecore_animator_custom_source_tick_begin_callback_set(Ecore_Cb func, const void *data);
-  /**
-   * @brief Set the function that ends a custom animator tick source
-   *
-   * @param func The function to call when ticking is to end
-   * @param data The data passed to the tick end function as its parameter
-   *
-   * This function is a matching pair to the function set by
-   * ecore_animator_custom_source_tick_begin_callback_set() and is called
-   * when ticking is to stop. If @p func is NULL then no function will be
-   * called to stop ticking. For more information please see
-   * ecore_animator_custom_source_tick_begin_callback_set().
-   *
-   * @see ecore_animator_source_set()
-   * @see ecore_animator_custom_source_tick_begin_callback_set()
-   * @see ecore_animator_custom_tick()
-   */
-   EAPI void            ecore_animator_custom_source_tick_end_callback_set(Ecore_Cb func, const void *data);
-  /**
-   * @brief Trigger a custom animator tick
-   *
-   * When animator source is set to ECORE_ANIMATOR_SOURCE_CUSTOM, then calling
-   * this function triggers a run of all animators currently registered with
-   * Ecore as this indicates a "frame tick" happened. This will do nothing if
-   * the animator source(set by ecore_animator_source_set()) is not set to
-   * ECORE_ANIMATOR_SOURCE_CUSTOM.
-   *
-   * @see ecore_animator_source_set()
-   * @see ecore_animator_custom_source_tick_begin_callback_set
-   * @see ecore_animator_custom_source_tick_end_callback_set()()
-   */
-   EAPI void            ecore_animator_custom_tick(void);
-
-  /**
-   * @}
-   */
-
-   /**
-    * @defgroup Ecore_Time_Group Ecore Time functions
-    *
-    * Functions that deal with time. These functions include those
-    * that simply retrieve it in a given format, and those that create
-    * events based on it.
-    *
-    * The timer allows callbacks to be called at specific intervals.
-    *
-    * Examples with functions that deal with time:
-    * @li @ref ecore_time_functions_example_c
-    * @li @ref ecore_timer_example_c
-    *
-    * @ingroup Ecore_Main_Loop_Group
-    *
-    * @{
-    */
-
-   typedef struct _Ecore_Timer                 Ecore_Timer; /**< A handle for timers */
-
-   EAPI double ecore_time_get(void);
-   EAPI double ecore_time_unix_get(void);
-   EAPI double ecore_loop_time_get(void);
-
-   EAPI Ecore_Timer *ecore_timer_add(double in, Ecore_Task_Cb func, const void *data);
-   EAPI Ecore_Timer *ecore_timer_loop_add(double in, Ecore_Task_Cb func, 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);
-   EAPI double       ecore_timer_pending_get(Ecore_Timer *timer);
-   EAPI double       ecore_timer_precision_get(void);
-   EAPI void         ecore_timer_precision_set(double precision);
-   EAPI char        *ecore_timer_dump(void);
-
-  /**
-   * @}
-   */
-
-   /**
-    * @defgroup Ecore_Idle_Group Ecore Idle functions
-    *
-    * Callbacks that are called when the program enters or exits an
-    * idle state.
-    *
-    * The ecore main loop enters an idle state when it is waiting for
-    * timers to time out, data to come in on a file descriptor or any
-    * other event to occur.  You can set callbacks to be called when
-    * the main loop enters an idle state, during an idle state or just
-    * after the program wakes up.
-    *
-    * Enterer callbacks are good for updating your program's state, if
-    * it has a state engine.  Once all of the enterer handlers are
-    * called, the program will enter a "sleeping" state.
-    *
-    * Idler callbacks are called when the main loop has called all
-    * enterer handlers.  They are useful for interfaces that require
-    * polling and timers would be too slow to use.
-    *
-    * If no idler callbacks are specified, then the process literally
-    * goes to sleep.  Otherwise, the idler callbacks are called
-    * continuously while the loop is "idle", using as much CPU as is
-    * available to the process.
-    *
-    * Exiter callbacks are called when the main loop wakes up from an
-    * idle state.
-    *
-    * @note Idle state doesn't mean that the @b program is idle, but
-    * that the <b>main loop</b> is idle. It doesn't have any timers,
-    * events, fd handlers or anything else to process (which in most
-    * <em>event driven</em> programs also means that the @b program is
-    * idle too, but it's not a rule). The program itself may be doing
-    * a lot of processing in the idler, or in another thread, for
-    * example.
-    *
-    * Example with functions that deal with idle state:
-    *
-    * @li @ref ecore_idler_example_c
-    *
-    * @ingroup Ecore_Main_Loop_Group
-    *
-    * @{
-    */
-
-   typedef struct _Ecore_Idler                 Ecore_Idler; /**< A handle for idlers */
-   typedef struct _Ecore_Idle_Enterer          Ecore_Idle_Enterer; /**< A handle for idle enterers */
-   typedef struct _Ecore_Idle_Exiter           Ecore_Idle_Exiter; /**< A handle for idle exiters */
-
-   /**
-    * Add an idler handler.
-    * @param  func The function to call when idling.
-    * @param  data The data to be passed to this @p func call.
-    * @return A idler handle if successfully added.  NULL otherwise.
-    *
-    * Add an idler handle to the event loop, returning a handle on
-    * success and NULL otherwise.  The function @p func will be called
-    * repeatedly while no other events are ready to be processed, as
-    * long as it returns 1 (or ECORE_CALLBACK_RENEW). A return of 0
-    * (or ECORE_CALLBACK_CANCEL) deletes the idler.
-    *
-    * Idlers are useful for progressively prossessing data without blocking.
-    */
-   EAPI Ecore_Idler *ecore_idler_add(Ecore_Task_Cb func, const void *data);
-
-   /**
-    * Delete an idler callback from the list to be executed.
-    * @param  idler The handle of the idler callback to delete
-    * @return The data pointer passed to the idler callback on success.  NULL
-    *         otherwise.
-    */
-   EAPI void        *ecore_idler_del(Ecore_Idler *idler);
-
-   EAPI Ecore_Idle_Enterer *ecore_idle_enterer_add(Ecore_Task_Cb func, const void *data);
-   EAPI Ecore_Idle_Enterer *ecore_idle_enterer_before_add(Ecore_Task_Cb func, const void *data);
-   EAPI void               *ecore_idle_enterer_del(Ecore_Idle_Enterer *idle_enterer);
-
-   EAPI Ecore_Idle_Exiter *ecore_idle_exiter_add(Ecore_Task_Cb func, const void *data);
-   EAPI void              *ecore_idle_exiter_del(Ecore_Idle_Exiter *idle_exiter);
-
-  /**
-   * @}
-   */
-
-  /**
-   * @defgroup Ecore_Thread_Group Ecore Thread functions
-   *
-   * Facilities to run heavy tasks in different threads to avoid blocking
-   * the main loop.
-   *
-   * The EFL is, for the most part, not thread safe. This means that if you
-   * have some task running in another thread and you have, for example, an
-   * Evas object to show the status progress of this task, you cannot update
-   * the object from within the thread. This can only be done from the main
-   * thread, the one running the main loop. This problem can be solved
-   * by running a thread that sends messages to the main one using an
-   * @ref Ecore_Pipe_Group "Ecore_Pipe", but when you need to handle other
-   * things like cancelling the thread, your code grows in coplexity and gets
-   * much harder to maintain.
-   *
-   * Ecore Thread is here to solve that problem. It is @b not a simple wrapper
-   * around standard POSIX threads (or the equivalent in other systems) and
-   * it's not meant to be used to run parallel tasks throughout the entire
-   * duration of the program, especially when these tasks are performance
-   * critical, as Ecore manages these tasks using a pool of threads based on
-   * system configuration.
-   *
-   * What Ecore Thread does, is make it a lot easier to dispatch a worker
-   * function to perform some heavy task and then get the result once it
-   * completes, without blocking the application's UI. In addition, cancelling
-   * and rescheduling comes practically for free and the developer needs not
-   * worry about how many threads are launched, since Ecore will schedule
-   * them according to the number of processors the system has and maximum
-   * amount of concurrent threads set for the application.
-   *
-   * At the system level, Ecore will start a new thread on an as-needed basis
-   * until the maximum set is reached. When no more threads can be launched,
-   * new worker functions will be queued in a waiting list until a thread
-   * becomes available. This way, system threads will be shared throughout
-   * different worker functions, but running only one at a time. At the same
-   * time, a worker function that is rescheduled may be run on a different
-   * thread the next time.
-   *
-   * The ::Ecore_Thread handler has two meanings, depending on what context
-   * it is on. The one returned when starting a worker with any of the
-   * functions ecore_thread_run() or ecore_thread_feedback_run() is an
-   * identifier of that specific instance of the function and can be used from
-   * the main loop with the ecore_thread_cancel() and ecore_thread_check()
-   * functions. This handler must not be shared with the worker function
-   * function running in the thread. This same handler will be the one received
-   * on the @c end, @c cancel and @c feedback callbacks.
-   *
-   * The worker function, that's the one running in the thread, also receives
-   * an ::Ecore_Thread handler that can be used with ecore_thread_cancel() and
-   * ecore_thread_check(), sharing the flag with the main loop. But this
-   * handler is also associated with the thread where the function is running.
-   * This has strong implications when working with thread local data.
-   *
-   * There are two kinds of worker threads Ecore handles: simple, or short,
-   * workers and feedback workers.
-   *
-   * The first kind is for simple functions that perform a
-   * usually small but time consuming task. Ecore will run this function in
-   * a thread as soon as one becomes available and notify the calling user of
-   * its completion once the task is done.
-   *
-   * The following image shows the flow of a program running four tasks on
-   * a pool of two threads.
-   *
-   * @image html ecore_thread.png
-   * @image rtf ecore_thread.png
-   * @image latex ecore_thread.eps width=\textwidth
-   *
-   * For larger tasks that may require continuous communication with the main
-   * program, the feedback workers provide the same functionality plus a way
-   * for the function running in the thread to send messages to the main
-   * thread.
-   *
-   * The next diagram omits some details shown in the previous one regarding
-   * how threads are spawned and tasks are queued, but illustrates how feedback
-   * jobs communicate with the main loop and the special case of threads
-   * running out of pool.
-   *
-   * @image html ecore_thread_feedback.png
-   * @image rtf ecore_thread_feedback.png
-   * @image latex ecore_thread_feedback.eps width=\textwidth
-   *
-   * See an overview example in @ref ecore_thread_example_c.
-   *
-   * @ingroup Ecore_Main_Loop_Group
-   *
-   * @{
-   */
-
-   typedef struct _Ecore_Thread                Ecore_Thread; /**< A handle for threaded jobs */
-
-   /**
-    * @typedef Ecore_Thread_Cb Ecore_Thread_Cb
-    * A callback used by Ecore_Thread helper.
-    */
-  typedef void (*Ecore_Thread_Cb) (void *data, Ecore_Thread *thread);
-   /**
-    * @typedef Ecore_Thread_Notify_Cb Ecore_Thread_Notify_Cb
-    * A callback used by the main loop to receive data sent by an
-    * @ref Ecore_Thread_Group.
-    */
-  typedef void (*Ecore_Thread_Notify_Cb) (void *data, Ecore_Thread *thread, void *msg_data);
-
-  /**
-   * Schedule a task to run in a parallel thread to avoid locking the main loop
-   *
-   * @param func_blocking The function that should run in another thread.
-   * @param func_end Function to call from main loop when @p func_blocking
-   * completes its task successfully (may be NULL)
-   * @param func_cancel Function to call from main loop if the thread running
-   * @p func_blocking is cancelled or fails to start (may be NULL)
-   * @param data User context data to pass to all callbacks.
-   * @return A new thread handler, or NULL on failure
-   *
-   * This function will try to create a new thread to run @p func_blocking in,
-   * or if the maximum number of concurrent threads has been reached, will
-   * add it to the pending list, where it will wait until a thread becomes
-   * available. The return value will be an ::Ecore_Thread handle that can
-   * be used to cancel the thread before its completion.
-   *
-   * @note This function should always return immediately, but in the rare
-   * case that Ecore is built with no thread support, @p func_blocking will
-   * be called here, actually blocking the main loop.
-   *
-   * Once a thread becomes available, @p func_blocking will be run in it until
-   * it finishes, then @p func_end is called from the thread containing the
-   * main loop to inform the user of its completion. While in @p func_blocking,
-   * no functions from the EFL can be used, except for those from Eina that are
-   * marked to be thread-safe. Even for the latter, caution needs to be taken
-   * if the data is shared across several threads.
-   *
-   * @p func_end will be called from the main thread when @p func_blocking ends,
-   * so here it's safe to use anything from the EFL freely.
-   *
-   * The thread can also be cancelled before its completion calling
-   * ecore_thread_cancel(), either from the main thread or @p func_blocking.
-   * In this case, @p func_cancel will be called, also from the main thread
-   * to inform of this happening. If the thread could not be created, this
-   * function will be called and it's @c thread parameter will be NULL. It's
-   * also safe to call any EFL function here, as it will be running in the
-   * main thread.
-   *
-   * Inside @p func_blocking, it's possible to call ecore_thread_reschedule()
-   * to tell Ecore that this function should be called again.
-   *
-   * Be aware that no assumptions can be made about the order in which the
-   * @p func_end callbacks for each task will be called. Once the function is
-   * running in a different thread, it's the OS that will handle its running
-   * schedule, and different functions may take longer to finish than others.
-   * Also remember that just starting several tasks together doesn't mean they
-   * will be running at the same time. Ecore will schedule them based on the
-   * number of threads available for the particular system it's running in,
-   * so some of the jobs started may be waiting until another one finishes
-   * before it can execute its own @p func_blocking.
-   *
-   * @see ecore_thread_feedback_run()
-   * @see ecore_thread_cancel()
-   * @see ecore_thread_reschedule()
-   * @see ecore_thread_max_set()
-   */
-   EAPI Ecore_Thread *ecore_thread_run(Ecore_Thread_Cb func_blocking,
-                                       Ecore_Thread_Cb func_end,
-                                       Ecore_Thread_Cb func_cancel,
-                                       const void *data);
-  /**
-   * Launch a thread to run a task than can talk back to the main thread
-   *
-   * @param func_heavy The function that should run in another thread.
-   * @param func_notify Function that receives the data sent from the thread
-   * @param func_end Function to call from main loop when @p func_heavy
-   * completes its task successfully
-   * @param func_cancel Function to call from main loop if the thread running
-   * @p func_heavy is cancelled or fails to start
-   * @param data User context data to pass to all callback.
-   * @param try_no_queue If you want to run outside of the thread pool.
-   * @return A new thread handler, or NULL on failure
-   *
-   * See ecore_thread_run() for a general description of this function.
-   *
-   * The difference with the above is that ecore_thread_run() is meant for
-   * tasks that don't need to communicate anything until they finish, while
-   * this function is provided with a new callback, @p func_notify, that will
-   * be called from the main thread for every message sent from @p func_heavy
-   * with ecore_thread_feedback().
-   *
-   * Like with ecore_thread_run(), a new thread will be launched to run
-   * @p func_heavy unless the maximum number of simultaneous threadas has been
-   * reached, in which case the function will be scheduled to run whenever a
-   * running task ends and a thread becomes free. But if @p try_no_queue is
-   * set, Ecore will first try to launch a thread outside of the pool to run
-   * the task. If it fails, it will revert to the normal behaviour of using a
-   * thread from the pool as if @p try_no_queue had not been set.
-   *
-   * Keep in mind that Ecore handles the thread pool based on the number of
-   * CPUs available, but running a thread outside of the pool doesn't count for
-   * this, so having too many of them may have drastic effects over the
-   * program's performance.
-   *
-   * @see ecore_thread_feedback()
-   * @see ecore_thread_run()
-   * @see ecore_thread_cancel()
-   * @see ecore_thread_reschedule()
-   * @see ecore_thread_max_set()
-   */
-   EAPI Ecore_Thread *ecore_thread_feedback_run(Ecore_Thread_Cb func_heavy,
-                                                Ecore_Thread_Notify_Cb func_notify,
-                                                Ecore_Thread_Cb func_end,
-                                                Ecore_Thread_Cb func_cancel,
-                                                const void *data,
-                                                Eina_Bool try_no_queue);
-  /**
-   * Cancel a running thread.
-   *
-   * @param thread The thread to cancel.
-   * @return Will return EINA_TRUE if the thread has been cancelled,
-   *         EINA_FALSE if it is pending.
-   *
-   * This function can be called both in the main loop or in the running thread.
-   *
-   * This function cancels a running thread. If @p thread can be immediately
-   * cancelled (it's still pending execution after creation or rescheduling),
-   * then the @c cancel callback will be called, @p thread will be freed and
-   * the function will return EINA_TRUE.
-   *
-   * If the thread is already running, then this function returns EINA_FALSE
-   * after marking the @p thread as pending cancellation. For the thread to
-   * actually be terminated, it needs to return from the user function back
-   * into Ecore control. This can happen in several ways:
-   * @li The function ends and returns normally. If it hadn't been cancelled,
-   * @c func_end would be called here, but instead @c func_cancel will happen.
-   * @li The function returns after requesting to be rescheduled with
-   * ecore_thread_reschedule().
-   * @li The function is prepared to leave early by checking if
-   * ecore_thread_check() returns EINA_TRUE.
-   *
-   * The user function can cancel itself by calling ecore_thread_cancel(), but
-   * it should always use the ::Ecore_Thread handle passed to it and never
-   * share it with the main loop thread by means of shared user data or any
-   * other way.
-   *
-   * @p thread will be freed and should not be used again if this function
-   * returns EINA_TRUE or after the @c func_cancel callback returns.
-   *
-   * @see ecore_thread_check()
-   */
-   EAPI Eina_Bool     ecore_thread_cancel(Ecore_Thread *thread);
-  /**
-   * Checks if a thread is pending cancellation
-   *
-   * @param thread The thread to test.
-   * @return EINA_TRUE if the thread is pending cancellation,
-   *         EINA_FALSE if it is not.
-   *
-   * This function can be called both in the main loop or in the running thread.
-   *
-   * When ecore_thread_cancel() is called on an already running task, the
-   * thread is marked as pending cancellation. This function returns EINA_TRUE
-   * if this mark is set for the given @p thread and can be used from the
-   * main loop thread to check if a still active thread has been cancelled,
-   * or from the user function running in the thread to check if it should
-   * stop doing what it's doing and return early, effectively cancelling the
-   * task.
-   *
-   * @see ecore_thread_cancel()
-   */
-   EAPI Eina_Bool     ecore_thread_check(Ecore_Thread *thread);
-  /**
-   * Sends data from the worker thread to the main loop
-   *
-   * @param thread The current ::Ecore_Thread context to send data from
-   * @param msg_data Data to be transmitted to the main loop
-   * @return EINA_TRUE if @p msg_data was successfully sent to main loop,
-   *         EINA_FALSE if anything goes wrong.
-   *
-   * You should use this function only in the @c func_heavy call.
-   *
-   * Only the address to @p msg_data will be sent and once this function
-   * returns EINA_TRUE, the job running in the thread should never touch the
-   * contents of it again. The data sent should be malloc()'ed or something
-   * similar, as long as it's not memory local to the thread that risks being
-   * overwritten or deleted once it goes out of scope or the thread finishes.
-   *
-   * Care must be taken that @p msg_data is properly freed in the @c func_notify
-   * callback set when creating the thread.
-   *
-   * @see ecore_thread_feedback_run()
-   */
-   EAPI Eina_Bool     ecore_thread_feedback(Ecore_Thread *thread, const void *msg_data);
-  /**
-   * Asks for the function in the thread to be called again at a later time
-   *
-   * @param thread The current ::Ecore_Thread context to rescheduled
-   * @return EINA_TRUE if the task was successfully rescheduled,
-   *         EINA_FALSE if anything goes wrong.
-   *
-   * This function should be called only from the same function represented
-   * by @pthread.
-   *
-   * Calling this function will mark the thread for a reschedule, so as soon
-   * as it returns, it will be added to the end of the list of pending tasks.
-   * If no other tasks are waiting or there are sufficient threads available,
-   * the rescheduled task will be launched again immediately.
-   *
-   * This should never return EINA_FALSE, unless it was called from the wrong
-   * thread or with the wrong arguments.
-   *
-   * The @c func_end callback set when the thread is created will not be
-   * called until the function in the thread returns without being rescheduled.
-   * Similarly, if the @p thread is cancelled, the reschedule will not take
-   * effect.
-   */
-   EAPI Eina_Bool     ecore_thread_reschedule(Ecore_Thread *thread);
-  /**
-   * Gets the number of active threads running jobs
-   *
-   * @return Number of active threads running jobs
-   *
-   * This returns the number of threads currently running jobs of any type
-   * through the Ecore_Thread API.
-   *
-   * @note Jobs started through the ecore_thread_feedback_run() function with
-   * the @c try_no_queue parameter set to EINA_TRUE will not be accounted for
-   * in the return of this function unless the thread creation fails and it
-   * falls back to using one from the pool.
-   */
-   EAPI int           ecore_thread_active_get(void);
-  /**
-   * Gets the number of short jobs waiting for a thread to run
-   *
-   * @return Number of pending threads running "short" jobs
-   *
-   * This returns the number of tasks started with ecore_thread_run() that are
-   * pending, waiting for a thread to become available to run them.
-   */
-   EAPI int           ecore_thread_pending_get(void);
-  /**
-   * Gets the number of feedback jobs waiting for a thread to run
-   *
-   * @return Number of pending threads running "feedback" jobs
-   *
-   * This returns the number of tasks started with ecore_thread_feedback_run()
-   * that are pending, waiting for a thread to become available to run them.
-   */
-   EAPI int           ecore_thread_pending_feedback_get(void);
-  /**
-   * Gets the total number of pending jobs
-   *
-   * @return Number of pending threads running jobs
-   *
-   * Same as the sum of ecore_thread_pending_get() and
-   * ecore_thread_pending_feedback_get().
-   */
-   EAPI int           ecore_thread_pending_total_get(void);
-  /**
-   * Gets the maximum number of threads that can run simultaneously
-   *
-   * @return Max possible number of Ecore_Thread's running concurrently
-   *
-   * This returns the maximum number of Ecore_Thread's that may be running at
-   * the same time. If this number is reached, new jobs started by either
-   * ecore_thread_run() or ecore_thread_feedback_run() will be added to the
-   * respective pending queue until one of the running threads finishes its
-   * task and becomes available to run a new one.
-   *
-   * By default, this will be the number of available CPUs for the
-   * running program (as returned by eina_cpu_count()), or 1 if this value
-   * could not be fetched.
-   *
-   * @see ecore_thread_max_set()
-   * @see ecore_thread_max_reset()
-   */
-   EAPI int           ecore_thread_max_get(void);
-  /**
-   * Sets the maximum number of threads allowed to run simultaneously
-   *
-   * @param num The new maximum
-   *
-   * This sets a new value for the maximum number of concurrently running
-   * Ecore_Thread's. It @b must an integer between 1 and (2 * @c x), where @c x
-   * is the number for CPUs available.
-   *
-   * @see ecore_thread_max_get()
-   * @see ecore_thread_max_reset()
-   */
-   EAPI void          ecore_thread_max_set(int num);
-  /**
-   * Resets the maximum number of concurrently running threads to the default
-   *
-   * This resets the value returned by ecore_thread_max_get() back to its
-   * default.
-   *
-   * @see ecore_thread_max_get()
-   * @see ecore_thread_max_set()
-   */
-   EAPI void          ecore_thread_max_reset(void);
-  /**
-   * Gets the number of threads available for running tasks
-   *
-   * @return The number of available threads
-   *
-   * Same as doing ecore_thread_max_get() - ecore_thread_active_get().
-   *
-   * This function may return a negative number only in the case the user
-   * changed the maximum number of running threads while other tasks are
-   * running.
-   */
-   EAPI int           ecore_thread_available_get(void);
-  /**
-   * Adds some data to a hash local to the thread
-   *
-   * @param thread The thread context the data belongs to
-   * @param key The name under which the data will be stored
-   * @param value The data to add
-   * @param cb Function to free the data when removed from the hash
-   * @param direct If true, this will not copy the key string (like
-   * eina_hash_direct_add())
-   * @return EINA_TRUE on success, EINA_FALSE on failure
-   *
-   * Ecore Thread has a mechanism to share data across several worker functions
-   * that run on the same system thread. That is, the data is stored per
-   * thread and for a worker function to have access to it, it must be run
-   * by the same thread that stored the data.
-   *
-   * When there are no more workers pending, the thread will be destroyed
-   * along with the internal hash and any data left in it will be freed with
-   * the @p cb function given.
-   *
-   * This set of functions is useful to share things around several instances
-   * of a function when that thing is costly to create and can be reused, but
-   * may only be used by one function at a time.
-   *
-   * For example, if you have a program doing requisitions to a database,
-   * these requisitions can be done in threads so that waiting for the
-   * database to respond doesn't block the UI. Each of these threads will
-   * run a function, and each function will be dependent on a connection to
-   * the database, which may not be able to handle more than one request at
-   * a time so for each running function you will need one connection handle.
-   * The options then are:
-   * @li Each function opens a connection when it's called, does the work and
-   * closes the connection when it finishes. This may be costly, wasting a lot
-   * of time on resolving hostnames, negotiating permissions and allocating
-   * memory.
-   * @li Open the connections in the main loop and pass it to the threads
-   * using the data pointer. Even worse, it's just as costly as before and now
-   * it may even be kept with connections open doing nothing until a thread
-   * becomes available to run the function.
-   * @li Have a way to share connection handles, so that each instance of the
-   * function can check if an available connection exists, and if it doesn't,
-   * create one and add it to the pool. When no more connections are needed,
-   * they are all closed.
-   *
-   * The last option is the most efficient, but it requires a lot of work to
-   * implement properly. Using thread local data helps to achieve the same
-   * result while avoiding doing all the tracking work on your code. The way
-   * to use it would be, at the worker function, to ask for the connection
-   * with ecore_thread_local_data_find() and if it doesn't exist, then open
-   * a new one and save it with ecore_thread_local_data_add(). Do the work and
-   * forget about the connection handle, when everything is done the function
-   * just ends. The next worker to run on that thread will check if a
-   * connection exists and find that it does, so the process of opening a
-   * new one has been spared. When no more workers exist, the thread is
-   * destroyed and the callback used when saving the connection will be called
-   * to close it.
-   *
-   * This function adds the data @p value to the thread data under the given
-   * @p key.
-   * No other value in the hash may have the same @p key. If you need to
-   * change the value under a @p key, or you don't know if one exists already,
-   * you can use ecore_thread_local_data_set().
-   *
-   * Neither @p key nor @p value may be NULL and @p key will be copied in the
-   * hash, unless @p direct is set, in which case the string used should not
-   * be freed until the data is removed from the hash.
-   *
-   * The @p cb function will be called when the data in the hash needs to be
-   * freed, be it because it got deleted with ecore_thread_local_data_del() or
-   * because @p thread was terminated and the hash destroyed. This parameter
-   * may be NULL, in which case @p value needs to be manually freed after
-   * removing it from the hash with either ecore_thread_local_data_del() or
-   * ecore_thread_local_data_set(), but it's very unlikely that this is what
-   * you want.
-   *
-   * This function, and all of the others in the @c ecore_thread_local_data
-   * family of functions, can only be called within the worker function running
-   * in the thread. Do not call them from the main loop or from a thread
-   * other than the one represented by @p thread.
-   *
-   * @see ecore_thread_local_data_set()
-   * @see ecore_thread_local_data_find()
-   * @see ecore_thread_local_data_del()
-   */
-   EAPI Eina_Bool     ecore_thread_local_data_add(Ecore_Thread *thread, const char *key, void *value, Eina_Free_Cb cb, Eina_Bool direct);
-  /**
-   * Sets some data in the hash local to the given thread
-   *
-   * @param thread The thread context the data belongs to
-   * @param key The name under which the data will be stored
-   * @param value The data to add
-   * @param cb Function to free the data when removed from the hash
-   *
-   * If no data exists in the hash under the @p key, this function adds
-   * @p value in the hash under the given @p key and returns NULL.
-   * The key itself is copied.
-   *
-   * If the hash already contains something under @p key, the data will be
-   * replaced by @p value and the old value will be returned.
-   *
-   * NULL will also be returned if either @p key or @p value are NULL, or if
-   * an error occurred.
-   *
-   * This function, and all of the others in the @c ecore_thread_local_data
-   * family of functions, can only be called within the worker function running
-   * in the thread. Do not call them from the main loop or from a thread
-   * other than the one represented by @p thread.
-   *
-   * @see ecore_thread_local_data_add()
-   * @see ecore_thread_local_data_del()
-   * @see ecore_thread_local_data_find()
-   */
-   EAPI void         *ecore_thread_local_data_set(Ecore_Thread *thread, const char *key, void *value, Eina_Free_Cb cb);
-  /**
-   * Gets data stored in the hash local to the given thread
-   *
-   * @param thread The thread context the data belongs to
-   * @param key The name under which the data is stored
-   * @return The value under the given key, or NULL on error
-   *
-   * Finds and return the data stored in the shared hash under the key @p key.
-   *
-   * This function, and all of the others in the @c ecore_thread_local_data
-   * family of functions, can only be called within the worker function running
-   * in the thread. Do not call them from the main loop or from a thread
-   * other than the one represented by @p thread.
-   *
-   * @see ecore_thread_local_data_add()
-   * @see ecore_thread_local_data_wait()
-   */
-   EAPI void         *ecore_thread_local_data_find(Ecore_Thread *thread, const char *key);
-  /**
-   * Deletes from the thread's hash the data corresponding to the given key
-   *
-   * @param thread The thread context the data belongs to
-   * @param key The name under which the data is stored
-   * @return EINA_TRUE on success, EINA_FALSE on failure
-   *
-   * If there's any data stored associated with @p key in the global hash,
-   * this function will remove it from it and return EINA_TRUE. If no data
-   * exists or an error occurs, it returns EINA_FALSE.
-   *
-   * If the data was added to the hash with a free function, then it will
-   * also be freed after removing it from the hash, otherwise it requires
-   * to be manually freed by the user, which means that if no other reference
-   * to it exists before calling this function, it will result in a memory
-   * leak.
-   *
-   * This function, and all of the others in the @c ecore_thread_local_data
-   * family of functions, can only be called within the worker function running
-   * in the thread. Do not call them from the main loop or from a thread
-   * other than the one represented by @p thread.
-   *
-   * @see ecore_thread_local_data_add()
-   */
-   EAPI Eina_Bool     ecore_thread_local_data_del(Ecore_Thread *thread, const char *key);
-
-  /**
-   * Adds some data to a hash shared by all threads
-   *
-   * @param key The name under which the data will be stored
-   * @param value The data to add
-   * @param cb Function to free the data when removed from the hash
-   * @param direct If true, this will not copy the key string (like
-   * eina_hash_direct_add())
-   * @return EINA_TRUE on success, EINA_FALSE on failure
-   *
-   * Ecore Thread keeps a hash that can be used to share data across several
-   * threads, including the main loop one, without having to manually handle
-   * mutexes to do so safely.
-   *
-   * This function adds the data @p value to this hash under the given @p key.
-   * No other value in the hash may have the same @p key. If you need to
-   * change the value under a @p key, or you don't know if one exists already,
-   * you can use ecore_thread_global_data_set().
-   *
-   * Neither @p key nor @p value may be NULL and @p key will be copied in the
-   * hash, unless @p direct is set, in which case the string used should not
-   * be freed until the data is removed from the hash.
-   *
-   * The @p cb function will be called when the data in the hash needs to be
-   * freed, be it because it got deleted with ecore_thread_global_data_del() or
-   * because Ecore Thread was shut down and the hash destroyed. This parameter
-   * may be NULL, in which case @p value needs to be manually freed after
-   * removing it from the hash with either ecore_thread_global_data_del() or
-   * ecore_thread_global_data_set().
-   *
-   * Manually freeing any data that was added to the hash with a @p cb function
-   * is likely to produce a segmentation fault, or any other strange
-   * happenings, later on in the program.
-   *
-   * @see ecore_thread_global_data_del()
-   * @see ecore_thread_global_data_set()
-   * @see ecore_thread_global_data_find()
-   */
-   EAPI Eina_Bool     ecore_thread_global_data_add(const char *key, void *value, Eina_Free_Cb cb, Eina_Bool direct);
-  /**
-   * Sets some data in the hash shared by all threads
-   *
-   * @param key The name under which the data will be stored
-   * @param value The data to add
-   * @param cb Function to free the data when removed from the hash
-   *
-   * If no data exists in the hash under the @p key, this function adds
-   * @p value in the hash under the given @p key and returns NULL.
-   * The key itself is copied.
-   *
-   * If the hash already contains something under @p key, the data will be
-   * replaced by @p value and the old value will be returned.
-   *
-   * NULL will also be returned if either @p key or @p value are NULL, or if
-   * an error occurred.
-   *
-   * @see ecore_thread_global_data_add()
-   * @see ecore_thread_global_data_del()
-   * @see ecore_thread_global_data_find()
-   */
-   EAPI void         *ecore_thread_global_data_set(const char *key, void *value, Eina_Free_Cb cb);
-  /**
-   * Gets data stored in the hash shared by all threads
-   *
-   * @param key The name under which the data is stored
-   * @return The value under the given key, or NULL on error
-   *
-   * Finds and return the data stored in the shared hash under the key @p key.
-   *
-   * Keep in mind that the data returned may be used by more than one thread
-   * at the same time and no reference counting is done on it by Ecore.
-   * Freeing the data or modifying its contents may require additional
-   * precautions to be considered, depending on the application's design.
-   *
-   * @see ecore_thread_global_data_add()
-   * @see ecore_thread_global_data_wait()
-   */
-   EAPI void         *ecore_thread_global_data_find(const char *key);
-  /**
-   * Deletes from the shared hash the data corresponding to the given key
-   *
-   * @param key The name under which the data is stored
-   * @return EINA_TRUE on success, EINA_FALSE on failure
-   *
-   * If there's any data stored associated with @p key in the global hash,
-   * this function will remove it from it and return EINA_TRUE. If no data
-   * exists or an error occurs, it returns EINA_FALSE.
-   *
-   * If the data was added to the hash with a free function, then it will
-   * also be freed after removing it from the hash, otherwise it requires
-   * to be manually freed by the user, which means that if no other reference
-   * to it exists before calling this function, it will result in a memory
-   * leak.
-   *
-   * Note, also, that freeing data that other threads may be using will result
-   * in a crash, so appropriate care must be taken by the application when
-   * that possibility exists.
-   *
-   * @see ecore_thread_global_data_add()
-   */
-   EAPI Eina_Bool     ecore_thread_global_data_del(const char *key);
-  /**
-   * Gets data stored in the shared hash, or wait for it if it doesn't exist
-   *
-   * @param key The name under which the data is stored
-   * @param seconds The amount of time in seconds to wait for the data.
-   * @return The value under the given key, or NULL on error
-   *
-   * Finds and return the data stored in the shared hash under the key @p key.
-   *
-   * If there's nothing in the hash under the given @p key, the function
-   * will block and wait up to @p seconds seconds for some other thread to
-   * add it with either ecore_thread_global_data_add() or
-   * ecore_thread_global_data_set(). If after waiting there's still no data
-   * to get, NULL will be returned.
-   *
-   * If @p seconds is 0, then no waiting will happen and this function works
-   * like ecore_thread_global_data_find(). If @p seconds is less than 0, then
-   * the function will wait indefinitely.
-   *
-   * Keep in mind that the data returned may be used by more than one thread
-   * at the same time and no reference counting is done on it by Ecore.
-   * Freeing the data or modifying its contents may require additional
-   * precautions to be considered, depending on the application's design.
-   *
-   * @see ecore_thread_global_data_add()
-   * @see ecore_thread_global_data_find()
-   */
-   EAPI void         *ecore_thread_global_data_wait(const char *key, double seconds);
-
-  /**
-   * @}
-   */
-
-  /**
-   * @defgroup Ecore_Pipe_Group Pipe wrapper
-   *
-   * These functions wrap the pipe / write / read functions to easily
-   * integrate its use into ecore's main loop.
-   *
-   * The ecore_pipe_add() function creates file descriptors (sockets
-   * on Windows) and attach a handle to the ecore main loop. That
-   * handle is called when data is read in the pipe. To write data in
-   * the pipe, just call ecore_pipe_write(). When you are done, just
-   * call ecore_pipe_del().
-   *
-   * For examples see here:
-   * @li @ref tutorial_ecore_pipe_gstreamer_example
-   * @li @ref tutorial_ecore_pipe_simple_example
-   *
-   * @ingroup Ecore_Main_Loop_Group
-   *
-   * @{
-   */
-
-   typedef struct _Ecore_Pipe                  Ecore_Pipe; /**< A handle for pipes */
-
-   /**
-    * @typedef Ecore_Pipe_Cb Ecore_Pipe_Cb
-    * The callback that data written to the pipe is sent to.
-    */
-   typedef void (*Ecore_Pipe_Cb) (void *data, void *buffer, unsigned int nbyte);
-
-   EAPI Ecore_Pipe  *ecore_pipe_add(Ecore_Pipe_Cb handler, const void *data);
-   EAPI void        *ecore_pipe_del(Ecore_Pipe *p);
-   EAPI Eina_Bool    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 void         ecore_pipe_thaw(Ecore_Pipe *p);
-   EAPI void         ecore_pipe_freeze(Ecore_Pipe *p);
-   EAPI int          ecore_pipe_wait(Ecore_Pipe *p, int message_count, double wait);
-
-  /**
-   * @}
-   */
-
-   /**
-    * @defgroup Ecore_Job_Group Ecore Job functions
-    *
-    * You can queue jobs that are to be done by the main loop when the
-    * current event is dealt with.
-    *
-    * Jobs are processed by the main loop similarly to events. They
-    * also will be executed in the order in which they were added.
-    *
-    * A good use for them is when you don't want to execute an action
-    * immeditately, but want to give the control back to the main loop
-    * so that it will call your job callback when jobs start being
-    * processed (and if there are other jobs added before yours, they
-    * will be processed first). This also gives the chance to other
-    * actions in your program to cancel the job before it is started.
-    *
-    * Examples of using @ref Ecore_Job:
-    * @li @ref ecore_job_example_c
-    *
-    * @ingroup Ecore_Main_Loop_Group
-    *
-    * @{
-    */
-
-   typedef struct _Ecore_Job Ecore_Job; /**< A job handle */
-
-   EAPI Ecore_Job *ecore_job_add(Ecore_Cb func, const void *data);
-   EAPI void      *ecore_job_del(Ecore_Job *job);
-
-  /**
-   * @}
-   */
-
-  /**
-   * @defgroup Ecore_Application_Group Ecore Application functions
-   *
-   * @{
-   */
-
-   EAPI void ecore_app_args_set(int argc, const char **argv);
-   EAPI void ecore_app_args_get(int *argc, char ***argv);
-   EAPI void ecore_app_restart(void);
-
-  /**
-   * @}
-   */
-
-  /**
-   * @defgroup Ecore_Throttle_Group Ecore Throttle functions
-   *
-   * @ingroup Ecore_Main_Loop_Group
-   *
-   * @{
-   */
-
-   EAPI void       ecore_throttle_adjust(double amount );
-   EAPI double     ecore_throttle_get(void);
-
-  /**
-   * @}
-   */
+};
+
+struct _Ecore_Exe_Event_Data_Line    /**< Lines from a child process */
+{
+   char *line;
+   int   size;
+};
+
+struct _Ecore_Exe_Event_Data    /** Data from a child process event */
+{
+   Ecore_Exe                 *exe; /**< The handle to the process */
+   void                      *data; /**< the raw binary data from the child process that was received */
+   int                        size; /**< the size of this data in bytes */
+   Ecore_Exe_Event_Data_Line *lines; /**< an array of line data if line buffered, the last one has it's line member set to NULL */
+};
+
+EAPI void
+ ecore_exe_run_priority_set(int pri);
+EAPI int
+ ecore_exe_run_priority_get(void);
+EAPI Ecore_Exe *
+ ecore_exe_run(const char *exe_cmd,
+              const void *data);
+EAPI Ecore_Exe *
+ecore_exe_pipe_run(const char *exe_cmd,
+                   Ecore_Exe_Flags flags,
+                   const void *data);
+EAPI void
+ecore_exe_callback_pre_free_set(Ecore_Exe *exe,
+                                Ecore_Exe_Cb func);
+EAPI Eina_Bool
+ecore_exe_send(Ecore_Exe *exe,
+               const void *data,
+               int size);
+EAPI void
+ ecore_exe_close_stdin(Ecore_Exe *exe);
+EAPI void
+ ecore_exe_auto_limits_set(Ecore_Exe *exe,
+                          int start_bytes,
+                          int end_bytes,
+                          int start_lines,
+                          int end_lines);
+EAPI Ecore_Exe_Event_Data *
+ecore_exe_event_data_get(Ecore_Exe *exe,
+                         Ecore_Exe_Flags flags);
+EAPI void
+ ecore_exe_event_data_free(Ecore_Exe_Event_Data *data);
+EAPI void *
+ ecore_exe_free(Ecore_Exe *exe);
+EAPI pid_t
+ ecore_exe_pid_get(const Ecore_Exe *exe);
+EAPI void
+ ecore_exe_tag_set(Ecore_Exe *exe,
+                  const char *tag);
+EAPI const char *
+ ecore_exe_tag_get(const Ecore_Exe *exe);
+EAPI const char *
+ ecore_exe_cmd_get(const Ecore_Exe *exe);
+EAPI void *
+ ecore_exe_data_get(const Ecore_Exe *exe);
+EAPI void *
+ ecore_exe_data_set(Ecore_Exe *exe,
+                   void *data);
+EAPI Ecore_Exe_Flags
+ ecore_exe_flags_get(const Ecore_Exe *exe);
+EAPI void
+ ecore_exe_pause(Ecore_Exe *exe);
+EAPI void
+ ecore_exe_continue(Ecore_Exe *exe);
+EAPI void
+ ecore_exe_interrupt(Ecore_Exe *exe);
+EAPI void
+ ecore_exe_quit(Ecore_Exe *exe);
+EAPI void
+ ecore_exe_terminate(Ecore_Exe *exe);
+EAPI void
+ ecore_exe_kill(Ecore_Exe *exe);
+EAPI void
+ ecore_exe_signal(Ecore_Exe *exe,
+                 int num);
+EAPI void
+ecore_exe_hup(Ecore_Exe *exe);
+
+/**
+ * @}
+ */
+
+/**
+ * @defgroup Ecore_FD_Handler_Group File Event Handling Functions
+ *
+ * Functions that deal with file descriptor handlers.
+ *
+ * The @ref Ecore_Fd_Handler can be used to watch a file descriptor
+ * for data available for reading, for the availability to write
+ * without blocking, and for errors on the file descriptor.
+ *
+ * ecore_main_fd_handler_add() is used to setup a handler for a
+ * given file descriptor. This file descriptor can be the standard
+ * input, a network socket, a stream received through some driver
+ * of a hardware decoder, etc. Thus it can contain errors, like a
+ * disconnection, a broken pipe, and so, and that's why it's
+ * possible to check for these errors with the @ref ECORE_FD_ERROR
+ * flag.
+ *
+ * An @ref Ecore_Fd_Handler can be used to watch on a file
+ * descriptor without blocking, still being able to receive events,
+ * expire timers, and other watch for other things that happen in
+ * the Ecore main loop.
+ *
+ * Example of use of a file descriptor handler:
+ * @li @ref ecore_fd_handler_example_c
+ *
+ * @ingroup Ecore_Main_Loop_Group
+ *
+ * @{
+ */
+
+typedef struct _Ecore_Fd_Handler Ecore_Fd_Handler; /**< A handle for Fd handlers */
+
+enum _Ecore_Fd_Handler_Flags
+{
+   ECORE_FD_READ = 1, /**< Fd Read mask */
+   ECORE_FD_WRITE = 2, /**< Fd Write mask */
+   ECORE_FD_ERROR = 4 /**< Fd Error mask */
+};
+typedef enum _Ecore_Fd_Handler_Flags Ecore_Fd_Handler_Flags;
+
+/**
+ * @typedef Ecore_Fd_Cb Ecore_Fd_Cb
+ * A callback used by an @ref Ecore_Fd_Handler.
+ */
+typedef Eina_Bool (*Ecore_Fd_Cb)(void *data, Ecore_Fd_Handler *fd_handler);
+
+/**
+ * @typedef Ecore_Fd_Prep_Cb Ecore_Fd_Prep_Cb
+ * A callback used by an @ref Ecore_Fd_Handler.
+ */
+typedef void (*Ecore_Fd_Prep_Cb)(void *data, Ecore_Fd_Handler *fd_handler);
+
+/**
+ * @typedef Ecore_Win32_Handle_Cb Ecore_Win32_Handle_Cb
+ * A callback used by an @ref Ecore_Win32_Handler.
+ */
+typedef Eina_Bool (*Ecore_Win32_Handle_Cb)(void *data, Ecore_Win32_Handler *wh);
+
+EAPI Ecore_Fd_Handler *
+ecore_main_fd_handler_add(int fd,
+                          Ecore_Fd_Handler_Flags flags,
+                          Ecore_Fd_Cb func,
+                          const void *data,
+                          Ecore_Fd_Cb buf_func,
+                          const void *buf_data);
+EAPI void
+ecore_main_fd_handler_prepare_callback_set(Ecore_Fd_Handler *fd_handler,
+                                           Ecore_Fd_Prep_Cb func,
+                                           const void *data);
+EAPI void *
+ ecore_main_fd_handler_del(Ecore_Fd_Handler *fd_handler);
+EAPI int
+ ecore_main_fd_handler_fd_get(Ecore_Fd_Handler *fd_handler);
+EAPI Eina_Bool
+ ecore_main_fd_handler_active_get(Ecore_Fd_Handler *fd_handler,
+                                 Ecore_Fd_Handler_Flags flags);
+EAPI void
+ecore_main_fd_handler_active_set(Ecore_Fd_Handler *fd_handler,
+                                 Ecore_Fd_Handler_Flags flags);
+
+EAPI Ecore_Win32_Handler *
+ecore_main_win32_handler_add(void *h,
+                             Ecore_Win32_Handle_Cb func,
+                             const void *data);
+EAPI void *
+ecore_main_win32_handler_del(Ecore_Win32_Handler *win32_handler);
+
+/**
+ * @}
+ */
+
+/**
+ * @defgroup Ecore_Poller_Group Ecore Poll functions
+ *
+ * These functions are for the need to poll information, but provide
+ * a shared abstracted API to pool such polling to minimise wakeup
+ * and ensure all the polling happens in as few spots as possible
+ * areound a core poll interval.  For now only 1 core poller type is
+ * supprted: ECORE_POLLER_CORE
+ *
+ * Example of @ref Ecore_Poller:
+ * @li @ref ecore_poller_example_c
+ *
+ * @ingroup Ecore_Main_Loop_Group
+ *
+ * @{
+ */
+
+enum _Ecore_Poller_Type    /* Poller types */
+{
+   ECORE_POLLER_CORE = 0 /**< The core poller interval */
+};
+typedef enum _Ecore_Poller_Type Ecore_Poller_Type;
+
+typedef struct _Ecore_Poller    Ecore_Poller; /**< A handle for pollers */
+
+EAPI void
+ecore_poller_poll_interval_set(Ecore_Poller_Type type,
+                               double poll_time);
+EAPI double
+ ecore_poller_poll_interval_get(Ecore_Poller_Type type);
+EAPI Eina_Bool
+ ecore_poller_poller_interval_set(Ecore_Poller *poller,
+                                 int interval);
+EAPI int
+ ecore_poller_poller_interval_get(Ecore_Poller *poller);
+EAPI Ecore_Poller *
+ ecore_poller_add(Ecore_Poller_Type type,
+                 int interval,
+                 Ecore_Task_Cb func,
+                 const void *data);
+EAPI void *ecore_poller_del(Ecore_Poller *poller);
+
+/**
+ * @}
+ */
+
+/**
+ * @defgroup Ecore_Animator_Group Ecore Animator functions
+ *
+ * @brief Ecore animators are a helper to simplify creating
+ * animations.
+ *
+ * Creating an animation is as simple as saying for how long it
+ * should be run and having a callback that does the animation,
+ * something like this:
+ * @code
+ * static Eina_Bool
+ * _do_animation(void *data, double pos)
+ * {
+ *    evas_object_move(data, 100 * pos, 100 * pos);
+ *    ... do some more animating ...
+ * }
+ * ...
+ * ecore_animator_timeline_add(2, _do_animation, my_evas_object);
+ * @endcode
+ * In the sample above we create an animation to move
+ * @c my_evas_object from position (0,0) to (100,100) in 2 seconds.
+ *
+ * If your animation will run for an unspecified amount of time you
+ * can use ecore_animator_add(), which is like using
+ * ecore_timer_add() with the interval being the
+ * @ref ecore_animator_frametime_set "framerate". Note that this has
+ * tangible benefits to creating a timer for each animation in terms
+ * of performance.
+ *
+ * For a more detailed example that show several animation see
+ * @ref tutorial_ecore_animator.
+ *
+ * @ingroup Ecore_Main_Loop_Group
+ *
+ * @{
+ */
+
+typedef struct _Ecore_Animator Ecore_Animator; /**< A handle for animators */
+
+enum _Ecore_Pos_Map    /* Position mappings */
+{
+   ECORE_POS_MAP_LINEAR, /**< Linear 0.0 -> 1.0 */
+   ECORE_POS_MAP_ACCELERATE, /**< Start slow then speed up */
+   ECORE_POS_MAP_DECELERATE, /**< Start fast then slow down */
+   ECORE_POS_MAP_SINUSOIDAL, /**< Start slow, speed up then slow down at end */
+   ECORE_POS_MAP_ACCELERATE_FACTOR, /**< Start slow then speed up, v1 being a power factor, 0.0 being linear, 1.0 being normal accelerate, 2.0 being much more pronounced accelerate (squared), 3.0 being cubed, etc. */
+   ECORE_POS_MAP_DECELERATE_FACTOR, /**< Start fast then slow down, v1 being a power factor, 0.0 being linear, 1.0 being normal decelerate, 2.0 being much more pronounced decelerate (squared), 3.0 being cubed, etc. */
+   ECORE_POS_MAP_SINUSOIDAL_FACTOR, /**< Start slow, speed up then slow down at end, v1 being a power factor, 0.0 being linear, 1.0 being normal sinusoidal, 2.0 being much more pronounced sinusoidal (squared), 3.0 being cubed, etc. */
+   ECORE_POS_MAP_DIVISOR_INTERP, /**< Start at gradient * v1, interpolated via power of v2 curve */
+   ECORE_POS_MAP_BOUNCE, /**< Start at 0.0 then "drop" like a ball bouncing to the ground at 1.0, and bounce v2 times, with decay factor of v1 */
+   ECORE_POS_MAP_SPRING /**< Start at 0.0 then "wobble" like a spring rest position 1.0, and wobble v2 times, with decay factor of v1 */
+};
+typedef enum _Ecore_Pos_Map Ecore_Pos_Map;
+
+enum _Ecore_Animator_Source    /* Timing sources for animators */
+{
+   ECORE_ANIMATOR_SOURCE_TIMER, /**< The default system clock/timer based animator that ticks every "frametime" seconds */
+   ECORE_ANIMATOR_SOURCE_CUSTOM /**< A custom animator trigger that you need to call ecore_animator_trigger() to make it tick */
+};
+typedef enum _Ecore_Animator_Source Ecore_Animator_Source;
+
+/**
+ * @typedef Ecore_Timeline_Cb Ecore_Timeline_Cb
+ * A callback run for a task (animators with runtimes)
+ */
+typedef Eina_Bool (*Ecore_Timeline_Cb)(void *data, double pos);
+
+/**
+ * @brief Add an animator to call @p func at every animaton tick during main
+ * loop execution.
+ *
+ * @param func The function to call when it ticks off
+ * @param data The data to pass to the function
+ * @return A handle to the new animator
+ *
+ * This function adds a animator and returns its handle on success and NULL on
+ * failure. The function @p func will be called every N seconds where N is the
+ * @p frametime interval set by ecore_animator_frametime_set(). The function
+ * will be passed the @p data pointer as its parameter.
+ *
+ * When the animator @p func is called, it must return a value of either 1 or
+ * 0. If it returns 1 (or ECORE_CALLBACK_RENEW), it will be called again at
+ * the next tick, or if it returns 0 (or ECORE_CALLBACK_CANCEL) it will be
+ * deleted automatically making any references/handles for it invalid.
+ *
+ * @note The default @p frametime value is 1/30th of a second.
+ *
+ * @see ecore_animator_timeline_add()
+ * @see ecore_animator_frametime_set()
+ */
+EAPI Ecore_Animator *ecore_animator_add(Ecore_Task_Cb func,
+                                        const void *data);
+/**
+ * @brief Add a animator that runs for a limited time
+ *
+ * @param runtime The time to run in seconds
+ * @param func The function to call when it ticks off
+ * @param data The data to pass to the function
+ * @return A handle to the new animator
+ *
+ * This function is just like ecore_animator_add() except the animator only
+ * runs for a limited time specified in seconds by @p runtime. Once the
+ * runtime the animator has elapsed (animator finished) it will automatically
+ * be deleted. The callback function @p func can return ECORE_CALLBACK_RENEW
+ * to keep the animator running or ECORE_CALLBACK_CANCEL ro stop it and have
+ * it be deleted automatically at any time.
+ *
+ * The @p func will ALSO be passed a position parameter that will be in value
+ * from 0.0 to 1.0 to indicate where along the timeline (0.0 start, 1.0 end)
+ * the animator run is at. If the callback wishes not to have a linear
+ * transition it can "map" this value to one of several curves and mappings
+ * via ecore_animator_pos_map().
+ *
+ * @note The default @p frametime value is 1/30th of a second.
+ *
+ * @see ecore_animator_add()
+ * @see ecore_animator_pos_map()
+ * @since 1.1.0
+ */
+EAPI Ecore_Animator *
+ecore_animator_timeline_add(double runtime,
+                            Ecore_Timeline_Cb func,
+                            const void *data);
+/**
+ * @brief Delete the specified animator from the animator list.
+ *
+ * @param animator The animator to delete
+ * @return The data pointer set for the animator on add
+ *
+ * Delete the specified @p animator from the set of animators that are
+ * executed during main loop execution. This function returns the data
+ * parameter that was being passed to the callback on success, or NULL on
+ * failure. After this call returns the specified animator object @p animator
+ * is invalid and should not be used again. It will not get called again after
+ * deletion.
+ */
+EAPI void *
+ecore_animator_del(Ecore_Animator *animator);
+/**
+ * @brief Suspend the specified animator.
+ *
+ * @param animator The animator to delete
+ *
+ * The specified @p animator will be temporarly removed from the set of
+ * animators that are executed during main loop.
+ *
+ * @warning Freezing an animator doesn't freeze accounting of how long that
+ * animator has been running. Therefore if the animator was created with
+ * ecore_animator_timeline_add() the @p pos argument given to the callback
+ * will increase as if the animator hadn't been frozen and the animator may
+ * have it's execution halted if @p runtime elapsed.
+ */
+EAPI void
+ecore_animator_freeze(Ecore_Animator *animator);
+/**
+ * @brief Restore execution of the specified animator.
+ *
+ * @param animator The animator to delete
+ *
+ * The specified @p animator will be put back in the set of animators that are
+ * executed during main loop.
+ */
+EAPI void
+ecore_animator_thaw(Ecore_Animator *animator);
+/**
+ * @brief Set the animator call interval in seconds.
+ *
+ * @param frametime The time in seconds in between animator ticks.
+ *
+ * This function sets the time interval (in seconds) between animator ticks.
+ * At every tick the callback of every existing animator will be called.
+ *
+ * @warning Too small a value may cause performance issues and too high a
+ * value may cause your animation to seem "jerky".
+ *
+ * @note The default @p frametime value is 1/30th of a second.
+ */
+EAPI void
+ecore_animator_frametime_set(double frametime);
+/**
+ * @brief Get the animator call interval in seconds.
+ *
+ * @return The time in second in between animator ticks.
+ *
+ * This function retrieves the time in seconds between animator ticks.
+ *
+ * @see ecore_animator_frametime_set()
+ */
+EAPI double
+ecore_animator_frametime_get(void);
+/**
+ * @brief Maps an input position from 0.0 to 1.0 along a timeline to a
+ * position in a different curve.
+ *
+ * @param pos The input position to map
+ * @param map The mapping to use
+ * @param v1 A parameter use by the mapping (pass 0.0 if not used)
+ * @param v2 A parameter use by the mapping (pass 0.0 if not used)
+ * @return The mapped value
+ *
+ * Takes an input position (0.0 to 1.0) and maps to a new position (normally
+ * between 0.0 and 1.0, but it may go above/below 0.0 or 1.0 to show that it
+ * has "overshot" the mark) using some interpolation (mapping) algorithm.
+ *
+ * This function useful to create non-linear animations. It offers a variety
+ * of possible animaton curves to be used:
+ * @li ECORE_POS_MAP_LINEAR - Linear, returns @p pos
+ * @li ECORE_POS_MAP_ACCELERATE - Start slow then speed up
+ * @li ECORE_POS_MAP_DECELERATE - Start fast then slow down
+ * @li ECORE_POS_MAP_SINUSOIDAL - Start slow, speed up then slow down at end
+ * @li ECORE_POS_MAP_ACCELERATE_FACTOR - Start slow then speed up, v1 being a
+ * power factor, 0.0 being linear, 1.0 being ECORE_POS_MAP_ACCELERATE, 2.0
+ * being much more pronounced accelerate (squared), 3.0 being cubed, etc.
+ * @li ECORE_POS_MAP_DECELERATE_FACTOR - Start fast then slow down, v1 being a
+ * power factor, 0.0 being linear, 1.0 being ECORE_POS_MAP_DECELERATE, 2.0
+ * being much more pronounced decelerate (squared), 3.0 being cubed, etc.
+ * @li ECORE_POS_MAP_SINUSOIDAL_FACTOR - Start slow, speed up then slow down
+ * at end, v1 being a power factor, 0.0 being linear, 1.0 being
+ * ECORE_POS_MAP_SINUSOIDAL, 2.0 being much more pronounced sinusoidal
+ * (squared), 3.0 being cubed, etc.
+ * @li ECORE_POS_MAP_DIVISOR_INTERP - Start at gradient * v1, interpolated via
+ * power of v2 curve
+ * @li ECORE_POS_MAP_BOUNCE - Start at 0.0 then "drop" like a ball bouncing to
+ * the ground at 1.0, and bounce v2 times, with decay factor of v1
+ * @li ECORE_POS_MAP_SPRING - Start at 0.0 then "wobble" like a spring rest
+ * position 1.0, and wobble v2 times, with decay factor of v1
+ * @note When not listed v1 and v2 have no effect.
+ *
+ * @image html ecore-pos-map.png
+ * @image latex ecore-pos-map.eps width=\textwidth
+ *
+ * One way to use this would be:
+ * @code
+ * double pos; // input position in a timeline from 0.0 to 1.0
+ * double out; // output position after mapping
+ * int x1, y1, x2, y2; // x1 & y1 are start position, x2 & y2 are end position
+ * int x, y; // x & y are the calculated position
+ *
+ * out = ecore_animator_pos_map(pos, ECORE_POS_MAP_BOUNCE, 1.8, 7);
+ * x = (x1 * out) + (x2 * (1.0 - out));
+ * y = (y1 * out) + (y2 * (1.0 - out));
+ * move_my_object_to(myobject, x, y);
+ * @endcode
+ * This will make an animaton that bounces 7 each times diminishing by a
+ * factor of 1.8.
+ *
+ * @see _Ecore_Pos_Map
+ *
+ * @since 1.1.0
+ */
+EAPI double
+ecore_animator_pos_map(double pos,
+                       Ecore_Pos_Map map,
+                       double v1,
+                       double v2);
+/**
+ * @brief Set the source of animator ticks for the mainloop
+ *
+ * @param source The source of animator ticks to use
+ *
+ * This sets the source of animator ticks. When an animator is active the
+ * mainloop will "tick" over frame by frame calling all animators that are
+ * registered until none are. The mainloop will tick at a given rate based
+ * on the animator source. The default source is the system clock timer
+ * source - ECORE_ANIMATOR_SOURCE_TIMER. This source uses the system clock
+ * to tick over every N seconds (specified by ecore_animator_frametime_set(),
+ * with the default being 1/30th of a second unless set otherwise). You can
+ * set a custom tick source by setting the source to
+ * ECORE_ANIMATOR_SOURCE_CUSTOM and then drive it yourself based on some input
+ * tick source (like another application via ipc, some vertical blanking
+ * interrupt interrupt etc.) using
+ * ecore_animator_custom_source_tick_begin_callback_set() and
+ * ecore_animator_custom_source_tick_end_callback_set() to set the functions
+ * that will be called to start and stop the ticking source, which when it
+ * gets a "tick" should call ecore_animator_custom_tick() to make the "tick" over 1
+ * frame.
+ */
+EAPI void
+ecore_animator_source_set(Ecore_Animator_Source source);
+/**
+ * @brief Get the animator source currently set.
+ *
+ * @return The current animator source
+ *
+ * This gets the current animator source.
+ *
+ * @see ecore_animator_source_set()
+ */
+EAPI Ecore_Animator_Source
+ecore_animator_source_get(void);
+/**
+ * @brief Set the function that begins a custom animator tick source
+ *
+ * @param func The function to call when ticking is to begin
+ * @param data The data passed to the tick begin function as its parameter
+ *
+ * The Ecore Animator infrastructure handles tracking if animators are needed
+ * or not and which ones need to be called and when, but when the tick source
+ * is custom, you have to provide a tick source by calling
+ * ecore_animator_custom_tick() to indicate a frame tick happened. In order
+ * to allow the source of ticks to be dynamically enabled or disabled as
+ * needed, the @p func when set is called to enable the tick source to
+ * produce tick events that call ecore_animator_custom_tick(). If @p func
+ * is NULL then no function is called to begin custom ticking.
+ *
+ * @see ecore_animator_source_set()
+ * @see ecore_animator_custom_source_tick_end_callback_set()
+ * @see ecore_animator_custom_tick()
+ */
+EAPI void
+ecore_animator_custom_source_tick_begin_callback_set(Ecore_Cb func,
+                                                     const void *data);
+/**
+ * @brief Set the function that ends a custom animator tick source
+ *
+ * @param func The function to call when ticking is to end
+ * @param data The data passed to the tick end function as its parameter
+ *
+ * This function is a matching pair to the function set by
+ * ecore_animator_custom_source_tick_begin_callback_set() and is called
+ * when ticking is to stop. If @p func is NULL then no function will be
+ * called to stop ticking. For more information please see
+ * ecore_animator_custom_source_tick_begin_callback_set().
+ *
+ * @see ecore_animator_source_set()
+ * @see ecore_animator_custom_source_tick_begin_callback_set()
+ * @see ecore_animator_custom_tick()
+ */
+EAPI void
+ecore_animator_custom_source_tick_end_callback_set(Ecore_Cb func,
+                                                   const void *data);
+/**
+ * @brief Trigger a custom animator tick
+ *
+ * When animator source is set to ECORE_ANIMATOR_SOURCE_CUSTOM, then calling
+ * this function triggers a run of all animators currently registered with
+ * Ecore as this indicates a "frame tick" happened. This will do nothing if
+ * the animator source(set by ecore_animator_source_set()) is not set to
+ * ECORE_ANIMATOR_SOURCE_CUSTOM.
+ *
+ * @see ecore_animator_source_set()
+ * @see ecore_animator_custom_source_tick_begin_callback_set
+ * @see ecore_animator_custom_source_tick_end_callback_set()()
+ */
+EAPI void
+ecore_animator_custom_tick(void);
+
+/**
+ * @}
+ */
+
+/**
+ * @defgroup Ecore_Time_Group Ecore Time functions
+ *
+ * Functions that deal with time. These functions include those
+ * that simply retrieve it in a given format, and those that create
+ * events based on it.
+ *
+ * The timer allows callbacks to be called at specific intervals.
+ *
+ * Examples with functions that deal with time:
+ * @li @ref ecore_time_functions_example_c
+ * @li @ref ecore_timer_example_c
+ *
+ * @ingroup Ecore_Main_Loop_Group
+ *
+ * @{
+ */
+
+typedef struct _Ecore_Timer Ecore_Timer; /**< A handle for timers */
+
+EAPI double
+ ecore_time_get(void);
+EAPI double
+ ecore_time_unix_get(void);
+EAPI double
+ ecore_loop_time_get(void);
+
+EAPI Ecore_Timer *
+ecore_timer_add(double in,
+                Ecore_Task_Cb func,
+                const void *data);
+EAPI Ecore_Timer *
+ecore_timer_loop_add(double in,
+                     Ecore_Task_Cb func,
+                     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);
+EAPI double
+ ecore_timer_pending_get(Ecore_Timer *timer);
+EAPI double
+ ecore_timer_precision_get(void);
+EAPI void
+ ecore_timer_precision_set(double precision);
+EAPI char *
+ ecore_timer_dump(void);
+
+/**
+ * @}
+ */
+
+/**
+ * @defgroup Ecore_Idle_Group Ecore Idle functions
+ *
+ * Callbacks that are called when the program enters or exits an
+ * idle state.
+ *
+ * The ecore main loop enters an idle state when it is waiting for
+ * timers to time out, data to come in on a file descriptor or any
+ * other event to occur.  You can set callbacks to be called when
+ * the main loop enters an idle state, during an idle state or just
+ * after the program wakes up.
+ *
+ * Enterer callbacks are good for updating your program's state, if
+ * it has a state engine.  Once all of the enterer handlers are
+ * called, the program will enter a "sleeping" state.
+ *
+ * Idler callbacks are called when the main loop has called all
+ * enterer handlers.  They are useful for interfaces that require
+ * polling and timers would be too slow to use.
+ *
+ * If no idler callbacks are specified, then the process literally
+ * goes to sleep.  Otherwise, the idler callbacks are called
+ * continuously while the loop is "idle", using as much CPU as is
+ * available to the process.
+ *
+ * Exiter callbacks are called when the main loop wakes up from an
+ * idle state.
+ *
+ * @note Idle state doesn't mean that the @b program is idle, but
+ * that the <b>main loop</b> is idle. It doesn't have any timers,
+ * events, fd handlers or anything else to process (which in most
+ * <em>event driven</em> programs also means that the @b program is
+ * idle too, but it's not a rule). The program itself may be doing
+ * a lot of processing in the idler, or in another thread, for
+ * example.
+ *
+ * Example with functions that deal with idle state:
+ *
+ * @li @ref ecore_idler_example_c
+ *
+ * @ingroup Ecore_Main_Loop_Group
+ *
+ * @{
+ */
+
+typedef struct _Ecore_Idler        Ecore_Idler; /**< A handle for idlers */
+typedef struct _Ecore_Idle_Enterer Ecore_Idle_Enterer; /**< A handle for idle enterers */
+typedef struct _Ecore_Idle_Exiter  Ecore_Idle_Exiter; /**< A handle for idle exiters */
+
+/**
+ * Add an idler handler.
+ * @param  func The function to call when idling.
+ * @param  data The data to be passed to this @p func call.
+ * @return A idler handle if successfully added.  NULL otherwise.
+ *
+ * Add an idler handle to the event loop, returning a handle on
+ * success and NULL otherwise.  The function @p func will be called
+ * repeatedly while no other events are ready to be processed, as
+ * long as it returns 1 (or ECORE_CALLBACK_RENEW). A return of 0
+ * (or ECORE_CALLBACK_CANCEL) deletes the idler.
+ *
+ * Idlers are useful for progressively prossessing data without blocking.
+ */
+EAPI Ecore_Idler *
+ecore_idler_add(Ecore_Task_Cb func,
+                const void *data);
+
+/**
+ * Delete an idler callback from the list to be executed.
+ * @param  idler The handle of the idler callback to delete
+ * @return The data pointer passed to the idler callback on success.  NULL
+ *         otherwise.
+ */
+EAPI void *
+ecore_idler_del(Ecore_Idler *idler);
+
+EAPI Ecore_Idle_Enterer *
+ecore_idle_enterer_add(Ecore_Task_Cb func,
+                       const void *data);
+EAPI Ecore_Idle_Enterer *
+ecore_idle_enterer_before_add(Ecore_Task_Cb func,
+                              const void *data);
+EAPI void *
+ecore_idle_enterer_del(Ecore_Idle_Enterer *idle_enterer);
+
+EAPI Ecore_Idle_Exiter *
+ecore_idle_exiter_add(Ecore_Task_Cb func,
+                      const void *data);
+EAPI void *
+ecore_idle_exiter_del(Ecore_Idle_Exiter *idle_exiter);
+
+/**
+ * @}
+ */
+
+/**
+ * @defgroup Ecore_Thread_Group Ecore Thread functions
+ *
+ * Facilities to run heavy tasks in different threads to avoid blocking
+ * the main loop.
+ *
+ * The EFL is, for the most part, not thread safe. This means that if you
+ * have some task running in another thread and you have, for example, an
+ * Evas object to show the status progress of this task, you cannot update
+ * the object from within the thread. This can only be done from the main
+ * thread, the one running the main loop. This problem can be solved
+ * by running a thread that sends messages to the main one using an
+ * @ref Ecore_Pipe_Group "Ecore_Pipe", but when you need to handle other
+ * things like cancelling the thread, your code grows in coplexity and gets
+ * much harder to maintain.
+ *
+ * Ecore Thread is here to solve that problem. It is @b not a simple wrapper
+ * around standard POSIX threads (or the equivalent in other systems) and
+ * it's not meant to be used to run parallel tasks throughout the entire
+ * duration of the program, especially when these tasks are performance
+ * critical, as Ecore manages these tasks using a pool of threads based on
+ * system configuration.
+ *
+ * What Ecore Thread does, is make it a lot easier to dispatch a worker
+ * function to perform some heavy task and then get the result once it
+ * completes, without blocking the application's UI. In addition, cancelling
+ * and rescheduling comes practically for free and the developer needs not
+ * worry about how many threads are launched, since Ecore will schedule
+ * them according to the number of processors the system has and maximum
+ * amount of concurrent threads set for the application.
+ *
+ * At the system level, Ecore will start a new thread on an as-needed basis
+ * until the maximum set is reached. When no more threads can be launched,
+ * new worker functions will be queued in a waiting list until a thread
+ * becomes available. This way, system threads will be shared throughout
+ * different worker functions, but running only one at a time. At the same
+ * time, a worker function that is rescheduled may be run on a different
+ * thread the next time.
+ *
+ * The ::Ecore_Thread handler has two meanings, depending on what context
+ * it is on. The one returned when starting a worker with any of the
+ * functions ecore_thread_run() or ecore_thread_feedback_run() is an
+ * identifier of that specific instance of the function and can be used from
+ * the main loop with the ecore_thread_cancel() and ecore_thread_check()
+ * functions. This handler must not be shared with the worker function
+ * function running in the thread. This same handler will be the one received
+ * on the @c end, @c cancel and @c feedback callbacks.
+ *
+ * The worker function, that's the one running in the thread, also receives
+ * an ::Ecore_Thread handler that can be used with ecore_thread_cancel() and
+ * ecore_thread_check(), sharing the flag with the main loop. But this
+ * handler is also associated with the thread where the function is running.
+ * This has strong implications when working with thread local data.
+ *
+ * There are two kinds of worker threads Ecore handles: simple, or short,
+ * workers and feedback workers.
+ *
+ * The first kind is for simple functions that perform a
+ * usually small but time consuming task. Ecore will run this function in
+ * a thread as soon as one becomes available and notify the calling user of
+ * its completion once the task is done.
+ *
+ * The following image shows the flow of a program running four tasks on
+ * a pool of two threads.
+ *
+ * @image html ecore_thread.png
+ * @image rtf ecore_thread.png
+ * @image latex ecore_thread.eps width=\textwidth
+ *
+ * For larger tasks that may require continuous communication with the main
+ * program, the feedback workers provide the same functionality plus a way
+ * for the function running in the thread to send messages to the main
+ * thread.
+ *
+ * The next diagram omits some details shown in the previous one regarding
+ * how threads are spawned and tasks are queued, but illustrates how feedback
+ * jobs communicate with the main loop and the special case of threads
+ * running out of pool.
+ *
+ * @image html ecore_thread_feedback.png
+ * @image rtf ecore_thread_feedback.png
+ * @image latex ecore_thread_feedback.eps width=\textwidth
+ *
+ * See an overview example in @ref ecore_thread_example_c.
+ *
+ * @ingroup Ecore_Main_Loop_Group
+ *
+ * @{
+ */
+
+typedef struct _Ecore_Thread Ecore_Thread; /**< A handle for threaded jobs */
+
+/**
+ * @typedef Ecore_Thread_Cb Ecore_Thread_Cb
+ * A callback used by Ecore_Thread helper.
+ */
+typedef void (*Ecore_Thread_Cb)(void *data, Ecore_Thread *thread);
+/**
+ * @typedef Ecore_Thread_Notify_Cb Ecore_Thread_Notify_Cb
+ * A callback used by the main loop to receive data sent by an
+ * @ref Ecore_Thread_Group.
+ */
+typedef void (*Ecore_Thread_Notify_Cb)(void *data, Ecore_Thread *thread, void *msg_data);
+
+/**
+ * Schedule a task to run in a parallel thread to avoid locking the main loop
+ *
+ * @param func_blocking The function that should run in another thread.
+ * @param func_end Function to call from main loop when @p func_blocking
+ * completes its task successfully (may be NULL)
+ * @param func_cancel Function to call from main loop if the thread running
+ * @p func_blocking is cancelled or fails to start (may be NULL)
+ * @param data User context data to pass to all callbacks.
+ * @return A new thread handler, or NULL on failure
+ *
+ * This function will try to create a new thread to run @p func_blocking in,
+ * or if the maximum number of concurrent threads has been reached, will
+ * add it to the pending list, where it will wait until a thread becomes
+ * available. The return value will be an ::Ecore_Thread handle that can
+ * be used to cancel the thread before its completion.
+ *
+ * @note This function should always return immediately, but in the rare
+ * case that Ecore is built with no thread support, @p func_blocking will
+ * be called here, actually blocking the main loop.
+ *
+ * Once a thread becomes available, @p func_blocking will be run in it until
+ * it finishes, then @p func_end is called from the thread containing the
+ * main loop to inform the user of its completion. While in @p func_blocking,
+ * no functions from the EFL can be used, except for those from Eina that are
+ * marked to be thread-safe. Even for the latter, caution needs to be taken
+ * if the data is shared across several threads.
+ *
+ * @p func_end will be called from the main thread when @p func_blocking ends,
+ * so here it's safe to use anything from the EFL freely.
+ *
+ * The thread can also be cancelled before its completion calling
+ * ecore_thread_cancel(), either from the main thread or @p func_blocking.
+ * In this case, @p func_cancel will be called, also from the main thread
+ * to inform of this happening. If the thread could not be created, this
+ * function will be called and it's @c thread parameter will be NULL. It's
+ * also safe to call any EFL function here, as it will be running in the
+ * main thread.
+ *
+ * Inside @p func_blocking, it's possible to call ecore_thread_reschedule()
+ * to tell Ecore that this function should be called again.
+ *
+ * Be aware that no assumptions can be made about the order in which the
+ * @p func_end callbacks for each task will be called. Once the function is
+ * running in a different thread, it's the OS that will handle its running
+ * schedule, and different functions may take longer to finish than others.
+ * Also remember that just starting several tasks together doesn't mean they
+ * will be running at the same time. Ecore will schedule them based on the
+ * number of threads available for the particular system it's running in,
+ * so some of the jobs started may be waiting until another one finishes
+ * before it can execute its own @p func_blocking.
+ *
+ * @see ecore_thread_feedback_run()
+ * @see ecore_thread_cancel()
+ * @see ecore_thread_reschedule()
+ * @see ecore_thread_max_set()
+ */
+EAPI Ecore_Thread *
+ecore_thread_run(Ecore_Thread_Cb func_blocking,
+                 Ecore_Thread_Cb func_end,
+                 Ecore_Thread_Cb func_cancel,
+                 const void *data);
+/**
+ * Launch a thread to run a task than can talk back to the main thread
+ *
+ * @param func_heavy The function that should run in another thread.
+ * @param func_notify Function that receives the data sent from the thread
+ * @param func_end Function to call from main loop when @p func_heavy
+ * completes its task successfully
+ * @param func_cancel Function to call from main loop if the thread running
+ * @p func_heavy is cancelled or fails to start
+ * @param data User context data to pass to all callback.
+ * @param try_no_queue If you want to run outside of the thread pool.
+ * @return A new thread handler, or NULL on failure
+ *
+ * See ecore_thread_run() for a general description of this function.
+ *
+ * The difference with the above is that ecore_thread_run() is meant for
+ * tasks that don't need to communicate anything until they finish, while
+ * this function is provided with a new callback, @p func_notify, that will
+ * be called from the main thread for every message sent from @p func_heavy
+ * with ecore_thread_feedback().
+ *
+ * Like with ecore_thread_run(), a new thread will be launched to run
+ * @p func_heavy unless the maximum number of simultaneous threadas has been
+ * reached, in which case the function will be scheduled to run whenever a
+ * running task ends and a thread becomes free. But if @p try_no_queue is
+ * set, Ecore will first try to launch a thread outside of the pool to run
+ * the task. If it fails, it will revert to the normal behaviour of using a
+ * thread from the pool as if @p try_no_queue had not been set.
+ *
+ * Keep in mind that Ecore handles the thread pool based on the number of
+ * CPUs available, but running a thread outside of the pool doesn't count for
+ * this, so having too many of them may have drastic effects over the
+ * program's performance.
+ *
+ * @see ecore_thread_feedback()
+ * @see ecore_thread_run()
+ * @see ecore_thread_cancel()
+ * @see ecore_thread_reschedule()
+ * @see ecore_thread_max_set()
+ */
+EAPI Ecore_Thread *
+ecore_thread_feedback_run(Ecore_Thread_Cb func_heavy,
+                          Ecore_Thread_Notify_Cb func_notify,
+                          Ecore_Thread_Cb func_end,
+                          Ecore_Thread_Cb func_cancel,
+                          const void *data,
+                          Eina_Bool try_no_queue);
+/**
+ * Cancel a running thread.
+ *
+ * @param thread The thread to cancel.
+ * @return Will return EINA_TRUE if the thread has been cancelled,
+ *         EINA_FALSE if it is pending.
+ *
+ * This function can be called both in the main loop or in the running thread.
+ *
+ * This function cancels a running thread. If @p thread can be immediately
+ * cancelled (it's still pending execution after creation or rescheduling),
+ * then the @c cancel callback will be called, @p thread will be freed and
+ * the function will return EINA_TRUE.
+ *
+ * If the thread is already running, then this function returns EINA_FALSE
+ * after marking the @p thread as pending cancellation. For the thread to
+ * actually be terminated, it needs to return from the user function back
+ * into Ecore control. This can happen in several ways:
+ * @li The function ends and returns normally. If it hadn't been cancelled,
+ * @c func_end would be called here, but instead @c func_cancel will happen.
+ * @li The function returns after requesting to be rescheduled with
+ * ecore_thread_reschedule().
+ * @li The function is prepared to leave early by checking if
+ * ecore_thread_check() returns EINA_TRUE.
+ *
+ * The user function can cancel itself by calling ecore_thread_cancel(), but
+ * it should always use the ::Ecore_Thread handle passed to it and never
+ * share it with the main loop thread by means of shared user data or any
+ * other way.
+ *
+ * @p thread will be freed and should not be used again if this function
+ * returns EINA_TRUE or after the @c func_cancel callback returns.
+ *
+ * @see ecore_thread_check()
+ */
+EAPI Eina_Bool
+ecore_thread_cancel(Ecore_Thread *thread);
+/**
+ * Checks if a thread is pending cancellation
+ *
+ * @param thread The thread to test.
+ * @return EINA_TRUE if the thread is pending cancellation,
+ *         EINA_FALSE if it is not.
+ *
+ * This function can be called both in the main loop or in the running thread.
+ *
+ * When ecore_thread_cancel() is called on an already running task, the
+ * thread is marked as pending cancellation. This function returns EINA_TRUE
+ * if this mark is set for the given @p thread and can be used from the
+ * main loop thread to check if a still active thread has been cancelled,
+ * or from the user function running in the thread to check if it should
+ * stop doing what it's doing and return early, effectively cancelling the
+ * task.
+ *
+ * @see ecore_thread_cancel()
+ */
+EAPI Eina_Bool
+ecore_thread_check(Ecore_Thread *thread);
+/**
+ * Sends data from the worker thread to the main loop
+ *
+ * @param thread The current ::Ecore_Thread context to send data from
+ * @param msg_data Data to be transmitted to the main loop
+ * @return EINA_TRUE if @p msg_data was successfully sent to main loop,
+ *         EINA_FALSE if anything goes wrong.
+ *
+ * You should use this function only in the @c func_heavy call.
+ *
+ * Only the address to @p msg_data will be sent and once this function
+ * returns EINA_TRUE, the job running in the thread should never touch the
+ * contents of it again. The data sent should be malloc()'ed or something
+ * similar, as long as it's not memory local to the thread that risks being
+ * overwritten or deleted once it goes out of scope or the thread finishes.
+ *
+ * Care must be taken that @p msg_data is properly freed in the @c func_notify
+ * callback set when creating the thread.
+ *
+ * @see ecore_thread_feedback_run()
+ */
+EAPI Eina_Bool
+ecore_thread_feedback(Ecore_Thread *thread,
+                      const void *msg_data);
+/**
+ * Asks for the function in the thread to be called again at a later time
+ *
+ * @param thread The current ::Ecore_Thread context to rescheduled
+ * @return EINA_TRUE if the task was successfully rescheduled,
+ *         EINA_FALSE if anything goes wrong.
+ *
+ * This function should be called only from the same function represented
+ * by @pthread.
+ *
+ * Calling this function will mark the thread for a reschedule, so as soon
+ * as it returns, it will be added to the end of the list of pending tasks.
+ * If no other tasks are waiting or there are sufficient threads available,
+ * the rescheduled task will be launched again immediately.
+ *
+ * This should never return EINA_FALSE, unless it was called from the wrong
+ * thread or with the wrong arguments.
+ *
+ * The @c func_end callback set when the thread is created will not be
+ * called until the function in the thread returns without being rescheduled.
+ * Similarly, if the @p thread is cancelled, the reschedule will not take
+ * effect.
+ */
+EAPI Eina_Bool
+ecore_thread_reschedule(Ecore_Thread *thread);
+/**
+ * Gets the number of active threads running jobs
+ *
+ * @return Number of active threads running jobs
+ *
+ * This returns the number of threads currently running jobs of any type
+ * through the Ecore_Thread API.
+ *
+ * @note Jobs started through the ecore_thread_feedback_run() function with
+ * the @c try_no_queue parameter set to EINA_TRUE will not be accounted for
+ * in the return of this function unless the thread creation fails and it
+ * falls back to using one from the pool.
+ */
+EAPI int
+ecore_thread_active_get(void);
+/**
+ * Gets the number of short jobs waiting for a thread to run
+ *
+ * @return Number of pending threads running "short" jobs
+ *
+ * This returns the number of tasks started with ecore_thread_run() that are
+ * pending, waiting for a thread to become available to run them.
+ */
+EAPI int
+ecore_thread_pending_get(void);
+/**
+ * Gets the number of feedback jobs waiting for a thread to run
+ *
+ * @return Number of pending threads running "feedback" jobs
+ *
+ * This returns the number of tasks started with ecore_thread_feedback_run()
+ * that are pending, waiting for a thread to become available to run them.
+ */
+EAPI int
+ecore_thread_pending_feedback_get(void);
+/**
+ * Gets the total number of pending jobs
+ *
+ * @return Number of pending threads running jobs
+ *
+ * Same as the sum of ecore_thread_pending_get() and
+ * ecore_thread_pending_feedback_get().
+ */
+EAPI int
+ecore_thread_pending_total_get(void);
+/**
+ * Gets the maximum number of threads that can run simultaneously
+ *
+ * @return Max possible number of Ecore_Thread's running concurrently
+ *
+ * This returns the maximum number of Ecore_Thread's that may be running at
+ * the same time. If this number is reached, new jobs started by either
+ * ecore_thread_run() or ecore_thread_feedback_run() will be added to the
+ * respective pending queue until one of the running threads finishes its
+ * task and becomes available to run a new one.
+ *
+ * By default, this will be the number of available CPUs for the
+ * running program (as returned by eina_cpu_count()), or 1 if this value
+ * could not be fetched.
+ *
+ * @see ecore_thread_max_set()
+ * @see ecore_thread_max_reset()
+ */
+EAPI int
+ecore_thread_max_get(void);
+/**
+ * Sets the maximum number of threads allowed to run simultaneously
+ *
+ * @param num The new maximum
+ *
+ * This sets a new value for the maximum number of concurrently running
+ * Ecore_Thread's. It @b must an integer between 1 and (2 * @c x), where @c x
+ * is the number for CPUs available.
+ *
+ * @see ecore_thread_max_get()
+ * @see ecore_thread_max_reset()
+ */
+EAPI void
+ecore_thread_max_set(int num);
+/**
+ * Resets the maximum number of concurrently running threads to the default
+ *
+ * This resets the value returned by ecore_thread_max_get() back to its
+ * default.
+ *
+ * @see ecore_thread_max_get()
+ * @see ecore_thread_max_set()
+ */
+EAPI void
+ecore_thread_max_reset(void);
+/**
+ * Gets the number of threads available for running tasks
+ *
+ * @return The number of available threads
+ *
+ * Same as doing ecore_thread_max_get() - ecore_thread_active_get().
+ *
+ * This function may return a negative number only in the case the user
+ * changed the maximum number of running threads while other tasks are
+ * running.
+ */
+EAPI int
+ecore_thread_available_get(void);
+/**
+ * Adds some data to a hash local to the thread
+ *
+ * @param thread The thread context the data belongs to
+ * @param key The name under which the data will be stored
+ * @param value The data to add
+ * @param cb Function to free the data when removed from the hash
+ * @param direct If true, this will not copy the key string (like
+ * eina_hash_direct_add())
+ * @return EINA_TRUE on success, EINA_FALSE on failure
+ *
+ * Ecore Thread has a mechanism to share data across several worker functions
+ * that run on the same system thread. That is, the data is stored per
+ * thread and for a worker function to have access to it, it must be run
+ * by the same thread that stored the data.
+ *
+ * When there are no more workers pending, the thread will be destroyed
+ * along with the internal hash and any data left in it will be freed with
+ * the @p cb function given.
+ *
+ * This set of functions is useful to share things around several instances
+ * of a function when that thing is costly to create and can be reused, but
+ * may only be used by one function at a time.
+ *
+ * For example, if you have a program doing requisitions to a database,
+ * these requisitions can be done in threads so that waiting for the
+ * database to respond doesn't block the UI. Each of these threads will
+ * run a function, and each function will be dependent on a connection to
+ * the database, which may not be able to handle more than one request at
+ * a time so for each running function you will need one connection handle.
+ * The options then are:
+ * @li Each function opens a connection when it's called, does the work and
+ * closes the connection when it finishes. This may be costly, wasting a lot
+ * of time on resolving hostnames, negotiating permissions and allocating
+ * memory.
+ * @li Open the connections in the main loop and pass it to the threads
+ * using the data pointer. Even worse, it's just as costly as before and now
+ * it may even be kept with connections open doing nothing until a thread
+ * becomes available to run the function.
+ * @li Have a way to share connection handles, so that each instance of the
+ * function can check if an available connection exists, and if it doesn't,
+ * create one and add it to the pool. When no more connections are needed,
+ * they are all closed.
+ *
+ * The last option is the most efficient, but it requires a lot of work to
+ * implement properly. Using thread local data helps to achieve the same
+ * result while avoiding doing all the tracking work on your code. The way
+ * to use it would be, at the worker function, to ask for the connection
+ * with ecore_thread_local_data_find() and if it doesn't exist, then open
+ * a new one and save it with ecore_thread_local_data_add(). Do the work and
+ * forget about the connection handle, when everything is done the function
+ * just ends. The next worker to run on that thread will check if a
+ * connection exists and find that it does, so the process of opening a
+ * new one has been spared. When no more workers exist, the thread is
+ * destroyed and the callback used when saving the connection will be called
+ * to close it.
+ *
+ * This function adds the data @p value to the thread data under the given
+ * @p key.
+ * No other value in the hash may have the same @p key. If you need to
+ * change the value under a @p key, or you don't know if one exists already,
+ * you can use ecore_thread_local_data_set().
+ *
+ * Neither @p key nor @p value may be NULL and @p key will be copied in the
+ * hash, unless @p direct is set, in which case the string used should not
+ * be freed until the data is removed from the hash.
+ *
+ * The @p cb function will be called when the data in the hash needs to be
+ * freed, be it because it got deleted with ecore_thread_local_data_del() or
+ * because @p thread was terminated and the hash destroyed. This parameter
+ * may be NULL, in which case @p value needs to be manually freed after
+ * removing it from the hash with either ecore_thread_local_data_del() or
+ * ecore_thread_local_data_set(), but it's very unlikely that this is what
+ * you want.
+ *
+ * This function, and all of the others in the @c ecore_thread_local_data
+ * family of functions, can only be called within the worker function running
+ * in the thread. Do not call them from the main loop or from a thread
+ * other than the one represented by @p thread.
+ *
+ * @see ecore_thread_local_data_set()
+ * @see ecore_thread_local_data_find()
+ * @see ecore_thread_local_data_del()
+ */
+EAPI Eina_Bool
+ecore_thread_local_data_add(Ecore_Thread *thread,
+                            const char *key,
+                            void *value,
+                            Eina_Free_Cb cb,
+                            Eina_Bool direct);
+/**
+ * Sets some data in the hash local to the given thread
+ *
+ * @param thread The thread context the data belongs to
+ * @param key The name under which the data will be stored
+ * @param value The data to add
+ * @param cb Function to free the data when removed from the hash
+ *
+ * If no data exists in the hash under the @p key, this function adds
+ * @p value in the hash under the given @p key and returns NULL.
+ * The key itself is copied.
+ *
+ * If the hash already contains something under @p key, the data will be
+ * replaced by @p value and the old value will be returned.
+ *
+ * NULL will also be returned if either @p key or @p value are NULL, or if
+ * an error occurred.
+ *
+ * This function, and all of the others in the @c ecore_thread_local_data
+ * family of functions, can only be called within the worker function running
+ * in the thread. Do not call them from the main loop or from a thread
+ * other than the one represented by @p thread.
+ *
+ * @see ecore_thread_local_data_add()
+ * @see ecore_thread_local_data_del()
+ * @see ecore_thread_local_data_find()
+ */
+EAPI void *
+ecore_thread_local_data_set(Ecore_Thread *thread,
+                            const char *key,
+                            void *value,
+                            Eina_Free_Cb cb);
+/**
+ * Gets data stored in the hash local to the given thread
+ *
+ * @param thread The thread context the data belongs to
+ * @param key The name under which the data is stored
+ * @return The value under the given key, or NULL on error
+ *
+ * Finds and return the data stored in the shared hash under the key @p key.
+ *
+ * This function, and all of the others in the @c ecore_thread_local_data
+ * family of functions, can only be called within the worker function running
+ * in the thread. Do not call them from the main loop or from a thread
+ * other than the one represented by @p thread.
+ *
+ * @see ecore_thread_local_data_add()
+ * @see ecore_thread_local_data_wait()
+ */
+EAPI void *
+ecore_thread_local_data_find(Ecore_Thread *thread,
+                             const char *key);
+/**
+ * Deletes from the thread's hash the data corresponding to the given key
+ *
+ * @param thread The thread context the data belongs to
+ * @param key The name under which the data is stored
+ * @return EINA_TRUE on success, EINA_FALSE on failure
+ *
+ * If there's any data stored associated with @p key in the global hash,
+ * this function will remove it from it and return EINA_TRUE. If no data
+ * exists or an error occurs, it returns EINA_FALSE.
+ *
+ * If the data was added to the hash with a free function, then it will
+ * also be freed after removing it from the hash, otherwise it requires
+ * to be manually freed by the user, which means that if no other reference
+ * to it exists before calling this function, it will result in a memory
+ * leak.
+ *
+ * This function, and all of the others in the @c ecore_thread_local_data
+ * family of functions, can only be called within the worker function running
+ * in the thread. Do not call them from the main loop or from a thread
+ * other than the one represented by @p thread.
+ *
+ * @see ecore_thread_local_data_add()
+ */
+EAPI Eina_Bool
+ecore_thread_local_data_del(Ecore_Thread *thread,
+                            const char *key);
+
+/**
+ * Adds some data to a hash shared by all threads
+ *
+ * @param key The name under which the data will be stored
+ * @param value The data to add
+ * @param cb Function to free the data when removed from the hash
+ * @param direct If true, this will not copy the key string (like
+ * eina_hash_direct_add())
+ * @return EINA_TRUE on success, EINA_FALSE on failure
+ *
+ * Ecore Thread keeps a hash that can be used to share data across several
+ * threads, including the main loop one, without having to manually handle
+ * mutexes to do so safely.
+ *
+ * This function adds the data @p value to this hash under the given @p key.
+ * No other value in the hash may have the same @p key. If you need to
+ * change the value under a @p key, or you don't know if one exists already,
+ * you can use ecore_thread_global_data_set().
+ *
+ * Neither @p key nor @p value may be NULL and @p key will be copied in the
+ * hash, unless @p direct is set, in which case the string used should not
+ * be freed until the data is removed from the hash.
+ *
+ * The @p cb function will be called when the data in the hash needs to be
+ * freed, be it because it got deleted with ecore_thread_global_data_del() or
+ * because Ecore Thread was shut down and the hash destroyed. This parameter
+ * may be NULL, in which case @p value needs to be manually freed after
+ * removing it from the hash with either ecore_thread_global_data_del() or
+ * ecore_thread_global_data_set().
+ *
+ * Manually freeing any data that was added to the hash with a @p cb function
+ * is likely to produce a segmentation fault, or any other strange
+ * happenings, later on in the program.
+ *
+ * @see ecore_thread_global_data_del()
+ * @see ecore_thread_global_data_set()
+ * @see ecore_thread_global_data_find()
+ */
+EAPI Eina_Bool
+ecore_thread_global_data_add(const char *key,
+                             void *value,
+                             Eina_Free_Cb cb,
+                             Eina_Bool direct);
+/**
+ * Sets some data in the hash shared by all threads
+ *
+ * @param key The name under which the data will be stored
+ * @param value The data to add
+ * @param cb Function to free the data when removed from the hash
+ *
+ * If no data exists in the hash under the @p key, this function adds
+ * @p value in the hash under the given @p key and returns NULL.
+ * The key itself is copied.
+ *
+ * If the hash already contains something under @p key, the data will be
+ * replaced by @p value and the old value will be returned.
+ *
+ * NULL will also be returned if either @p key or @p value are NULL, or if
+ * an error occurred.
+ *
+ * @see ecore_thread_global_data_add()
+ * @see ecore_thread_global_data_del()
+ * @see ecore_thread_global_data_find()
+ */
+EAPI void *
+ecore_thread_global_data_set(const char *key,
+                             void *value,
+                             Eina_Free_Cb cb);
+/**
+ * Gets data stored in the hash shared by all threads
+ *
+ * @param key The name under which the data is stored
+ * @return The value under the given key, or NULL on error
+ *
+ * Finds and return the data stored in the shared hash under the key @p key.
+ *
+ * Keep in mind that the data returned may be used by more than one thread
+ * at the same time and no reference counting is done on it by Ecore.
+ * Freeing the data or modifying its contents may require additional
+ * precautions to be considered, depending on the application's design.
+ *
+ * @see ecore_thread_global_data_add()
+ * @see ecore_thread_global_data_wait()
+ */
+EAPI void *
+ecore_thread_global_data_find(const char *key);
+/**
+ * Deletes from the shared hash the data corresponding to the given key
+ *
+ * @param key The name under which the data is stored
+ * @return EINA_TRUE on success, EINA_FALSE on failure
+ *
+ * If there's any data stored associated with @p key in the global hash,
+ * this function will remove it from it and return EINA_TRUE. If no data
+ * exists or an error occurs, it returns EINA_FALSE.
+ *
+ * If the data was added to the hash with a free function, then it will
+ * also be freed after removing it from the hash, otherwise it requires
+ * to be manually freed by the user, which means that if no other reference
+ * to it exists before calling this function, it will result in a memory
+ * leak.
+ *
+ * Note, also, that freeing data that other threads may be using will result
+ * in a crash, so appropriate care must be taken by the application when
+ * that possibility exists.
+ *
+ * @see ecore_thread_global_data_add()
+ */
+EAPI Eina_Bool
+ecore_thread_global_data_del(const char *key);
+/**
+ * Gets data stored in the shared hash, or wait for it if it doesn't exist
+ *
+ * @param key The name under which the data is stored
+ * @param seconds The amount of time in seconds to wait for the data.
+ * @return The value under the given key, or NULL on error
+ *
+ * Finds and return the data stored in the shared hash under the key @p key.
+ *
+ * If there's nothing in the hash under the given @p key, the function
+ * will block and wait up to @p seconds seconds for some other thread to
+ * add it with either ecore_thread_global_data_add() or
+ * ecore_thread_global_data_set(). If after waiting there's still no data
+ * to get, NULL will be returned.
+ *
+ * If @p seconds is 0, then no waiting will happen and this function works
+ * like ecore_thread_global_data_find(). If @p seconds is less than 0, then
+ * the function will wait indefinitely.
+ *
+ * Keep in mind that the data returned may be used by more than one thread
+ * at the same time and no reference counting is done on it by Ecore.
+ * Freeing the data or modifying its contents may require additional
+ * precautions to be considered, depending on the application's design.
+ *
+ * @see ecore_thread_global_data_add()
+ * @see ecore_thread_global_data_find()
+ */
+EAPI void *
+ecore_thread_global_data_wait(const char *key,
+                              double seconds);
+
+/**
+ * @}
+ */
+
+/**
+ * @defgroup Ecore_Pipe_Group Pipe wrapper
+ *
+ * These functions wrap the pipe / write / read functions to easily
+ * integrate its use into ecore's main loop.
+ *
+ * The ecore_pipe_add() function creates file descriptors (sockets
+ * on Windows) and attach a handle to the ecore main loop. That
+ * handle is called when data is read in the pipe. To write data in
+ * the pipe, just call ecore_pipe_write(). When you are done, just
+ * call ecore_pipe_del().
+ *
+ * For examples see here:
+ * @li @ref tutorial_ecore_pipe_gstreamer_example
+ * @li @ref tutorial_ecore_pipe_simple_example
+ *
+ * @ingroup Ecore_Main_Loop_Group
+ *
+ * @{
+ */
+
+typedef struct _Ecore_Pipe Ecore_Pipe; /**< A handle for pipes */
+
+/**
+ * @typedef Ecore_Pipe_Cb Ecore_Pipe_Cb
+ * The callback that data written to the pipe is sent to.
+ */
+typedef void (*Ecore_Pipe_Cb)(void *data, void *buffer, unsigned int nbyte);
+
+EAPI Ecore_Pipe *
+ecore_pipe_add(Ecore_Pipe_Cb handler,
+               const void *data);
+EAPI void *
+ ecore_pipe_del(Ecore_Pipe *p);
+EAPI Eina_Bool
+ 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 void
+ ecore_pipe_thaw(Ecore_Pipe *p);
+EAPI void
+ ecore_pipe_freeze(Ecore_Pipe *p);
+EAPI int
+ ecore_pipe_wait(Ecore_Pipe *p,
+                int message_count,
+                double wait);
+
+/**
+ * @}
+ */
+
+/**
+ * @defgroup Ecore_Job_Group Ecore Job functions
+ *
+ * You can queue jobs that are to be done by the main loop when the
+ * current event is dealt with.
+ *
+ * Jobs are processed by the main loop similarly to events. They
+ * also will be executed in the order in which they were added.
+ *
+ * A good use for them is when you don't want to execute an action
+ * immeditately, but want to give the control back to the main loop
+ * so that it will call your job callback when jobs start being
+ * processed (and if there are other jobs added before yours, they
+ * will be processed first). This also gives the chance to other
+ * actions in your program to cancel the job before it is started.
+ *
+ * Examples of using @ref Ecore_Job:
+ * @li @ref ecore_job_example_c
+ *
+ * @ingroup Ecore_Main_Loop_Group
+ *
+ * @{
+ */
+
+typedef struct _Ecore_Job Ecore_Job;    /**< A job handle */
+
+EAPI Ecore_Job *
+ecore_job_add(Ecore_Cb func,
+              const void *data);
+EAPI void *
+ecore_job_del(Ecore_Job *job);
+
+/**
+ * @}
+ */
+
+/**
+ * @defgroup Ecore_Application_Group Ecore Application functions
+ *
+ * @{
+ */
+
+EAPI void
+ecore_app_args_set(int argc,
+                   const char **argv);
+EAPI void
+ecore_app_args_get(int *argc,
+                   char ***argv);
+EAPI void
+ecore_app_restart(void);
+
+/**
+ * @}
+ */
+
+/**
+ * @defgroup Ecore_Throttle_Group Ecore Throttle functions
+ *
+ * @ingroup Ecore_Main_Loop_Group
+ *
+ * @{
+ */
+
+EAPI void
+ ecore_throttle_adjust(double amount);
+EAPI double
+ ecore_throttle_get(void);
+
+/**
+ * @}
+ */
 
 #ifdef __cplusplus
 }
index a2dfd75..0a11787 100644 (file)
  * use multiple values with the same parser.
  */
 
-
 #ifdef __cplusplus
 extern "C" {
 #endif
 
-  typedef enum {
-    ECORE_GETOPT_ACTION_STORE,
-    ECORE_GETOPT_ACTION_STORE_CONST,
-    ECORE_GETOPT_ACTION_STORE_TRUE,
-    ECORE_GETOPT_ACTION_STORE_FALSE,
-    ECORE_GETOPT_ACTION_CHOICE,
-    ECORE_GETOPT_ACTION_APPEND,
-    ECORE_GETOPT_ACTION_COUNT,
-    ECORE_GETOPT_ACTION_CALLBACK,
-    ECORE_GETOPT_ACTION_HELP,
-    ECORE_GETOPT_ACTION_VERSION,
-    ECORE_GETOPT_ACTION_COPYRIGHT,
-    ECORE_GETOPT_ACTION_LICENSE
-  } Ecore_Getopt_Action;
-
-  typedef enum {
-    ECORE_GETOPT_TYPE_STR,
-    ECORE_GETOPT_TYPE_BOOL,
-    ECORE_GETOPT_TYPE_SHORT,
-    ECORE_GETOPT_TYPE_INT,
-    ECORE_GETOPT_TYPE_LONG,
-    ECORE_GETOPT_TYPE_USHORT,
-    ECORE_GETOPT_TYPE_UINT,
-    ECORE_GETOPT_TYPE_ULONG,
-    ECORE_GETOPT_TYPE_DOUBLE
-  } Ecore_Getopt_Type;
-
-  typedef enum {
-    ECORE_GETOPT_DESC_ARG_REQUIREMENT_NO = 0,
-    ECORE_GETOPT_DESC_ARG_REQUIREMENT_YES = 1,
-    ECORE_GETOPT_DESC_ARG_REQUIREMENT_OPTIONAL = 3
-  } Ecore_Getopt_Desc_Arg_Requirement;
-
-  typedef union _Ecore_Getopt_Value             Ecore_Getopt_Value;
-
-  typedef struct _Ecore_Getopt_Desc_Store       Ecore_Getopt_Desc_Store;
-  typedef struct _Ecore_Getopt_Desc_Callback    Ecore_Getopt_Desc_Callback;
-  typedef struct _Ecore_Getopt_Desc             Ecore_Getopt_Desc;
-  typedef struct _Ecore_Getopt                  Ecore_Getopt;
-
-  union _Ecore_Getopt_Value
-  {
-     char **strp;
-     unsigned char *boolp;
-     short *shortp;
-     int *intp;
-     long *longp;
-     unsigned short *ushortp;
-     unsigned int *uintp;
-     unsigned long *ulongp;
-     double *doublep;
-     Eina_List **listp;
-     void **ptrp;
-  };
-
-  struct _Ecore_Getopt_Desc_Store
-  {
-     Ecore_Getopt_Type type;           /**< type of data being handled */
-     Ecore_Getopt_Desc_Arg_Requirement arg_req;
-     union
-     {
-        const char *strv;
-        Eina_Bool boolv;
-        short shortv;
-        int intv;
-        long longv;
-        unsigned short ushortv;
-        unsigned int uintv;
-        unsigned long ulongv;
-        double doublev;
-     } def;
-  };
-
-  struct _Ecore_Getopt_Desc_Callback
-  {
-     Eina_Bool (*func)(const Ecore_Getopt *parser, const Ecore_Getopt_Desc *desc, const char *str, void *data, Ecore_Getopt_Value *storage);
-     const void *data;
-     Ecore_Getopt_Desc_Arg_Requirement arg_req;
-     const char *def;
-  };
-
-  struct _Ecore_Getopt_Desc
-  {
-     char shortname;       /**< used with a single dash */
-     const char *longname; /**< used with double dashes */
-     const char *help;     /**< used by --help/ecore_getopt_help() */
-     const char *metavar;  /**< used by ecore_getopt_help() with nargs > 0 */
-
-     Ecore_Getopt_Action action; /**< define how to handle it */
-     union
-     {
-        const Ecore_Getopt_Desc_Store store;
-        const void *store_const;
-        const char *const *choices; /* NULL terminated. */
-        const Ecore_Getopt_Type append_type;
-        const Ecore_Getopt_Desc_Callback callback;
-        const void *dummy;
-     } action_param;
-  };
-
-  struct _Ecore_Getopt
-  {
-     const char *prog; /**< to be used when ecore_app_args_get() fails */
-     const char *usage; /**< usage example, %prog is replaced */
-     const char *version; /**< if exists, --version will work */
-     const char *copyright; /**< if exists, --copyright will work */
-     const char *license; /**< if exists, --license will work */
-     const char *description; /**< long description, possible multiline */
-     Eina_Bool strict : 1; /**< fail on errors */
-     const Ecore_Getopt_Desc descs[]; /* NULL terminated. */
-  };
+typedef enum {
+   ECORE_GETOPT_ACTION_STORE,
+   ECORE_GETOPT_ACTION_STORE_CONST,
+   ECORE_GETOPT_ACTION_STORE_TRUE,
+   ECORE_GETOPT_ACTION_STORE_FALSE,
+   ECORE_GETOPT_ACTION_CHOICE,
+   ECORE_GETOPT_ACTION_APPEND,
+   ECORE_GETOPT_ACTION_COUNT,
+   ECORE_GETOPT_ACTION_CALLBACK,
+   ECORE_GETOPT_ACTION_HELP,
+   ECORE_GETOPT_ACTION_VERSION,
+   ECORE_GETOPT_ACTION_COPYRIGHT,
+   ECORE_GETOPT_ACTION_LICENSE
+} Ecore_Getopt_Action;
+
+typedef enum {
+   ECORE_GETOPT_TYPE_STR,
+   ECORE_GETOPT_TYPE_BOOL,
+   ECORE_GETOPT_TYPE_SHORT,
+   ECORE_GETOPT_TYPE_INT,
+   ECORE_GETOPT_TYPE_LONG,
+   ECORE_GETOPT_TYPE_USHORT,
+   ECORE_GETOPT_TYPE_UINT,
+   ECORE_GETOPT_TYPE_ULONG,
+   ECORE_GETOPT_TYPE_DOUBLE
+} Ecore_Getopt_Type;
+
+typedef enum {
+   ECORE_GETOPT_DESC_ARG_REQUIREMENT_NO = 0,
+   ECORE_GETOPT_DESC_ARG_REQUIREMENT_YES = 1,
+   ECORE_GETOPT_DESC_ARG_REQUIREMENT_OPTIONAL = 3
+} Ecore_Getopt_Desc_Arg_Requirement;
+
+typedef union _Ecore_Getopt_Value          Ecore_Getopt_Value;
+
+typedef struct _Ecore_Getopt_Desc_Store    Ecore_Getopt_Desc_Store;
+typedef struct _Ecore_Getopt_Desc_Callback Ecore_Getopt_Desc_Callback;
+typedef struct _Ecore_Getopt_Desc          Ecore_Getopt_Desc;
+typedef struct _Ecore_Getopt               Ecore_Getopt;
+
+union _Ecore_Getopt_Value
+{
+   char          **strp;
+   unsigned char  *boolp;
+   short          *shortp;
+   int            *intp;
+   long           *longp;
+   unsigned short *ushortp;
+   unsigned int   *uintp;
+   unsigned long  *ulongp;
+   double         *doublep;
+   Eina_List     **listp;
+   void          **ptrp;
+};
+
+struct _Ecore_Getopt_Desc_Store
+{
+   Ecore_Getopt_Type                 type; /**< type of data being handled */
+   Ecore_Getopt_Desc_Arg_Requirement arg_req;
+   union
+   {
+      const char    *strv;
+      Eina_Bool      boolv;
+      short          shortv;
+      int            intv;
+      long           longv;
+      unsigned short ushortv;
+      unsigned int   uintv;
+      unsigned long  ulongv;
+      double         doublev;
+   } def;
+};
+
+struct _Ecore_Getopt_Desc_Callback
+{
+   Eina_Bool                         (*func)(const Ecore_Getopt *parser,
+                                             const Ecore_Getopt_Desc *desc,
+                                             const char *str,
+                                             void *data,
+                                             Ecore_Getopt_Value *storage);
+   const void                       *data;
+   Ecore_Getopt_Desc_Arg_Requirement arg_req;
+   const char                       *def;
+};
+
+struct _Ecore_Getopt_Desc
+{
+   char                shortname; /**< used with a single dash */
+   const char         *longname; /**< used with double dashes */
+   const char         *help; /**< used by --help/ecore_getopt_help() */
+   const char         *metavar; /**< used by ecore_getopt_help() with nargs > 0 */
+
+   Ecore_Getopt_Action action;   /**< define how to handle it */
+   union
+   {
+      const Ecore_Getopt_Desc_Store    store;
+      const void                      *store_const;
+      const char *const               *choices; /* NULL terminated. */
+      const Ecore_Getopt_Type          append_type;
+      const Ecore_Getopt_Desc_Callback callback;
+      const void                      *dummy;
+   } action_param;
+};
+
+struct _Ecore_Getopt
+{
+   const char             *prog; /**< to be used when ecore_app_args_get() fails */
+   const char             *usage; /**< usage example, %prog is replaced */
+   const char             *version; /**< if exists, --version will work */
+   const char             *copyright; /**< if exists, --copyright will work */
+   const char             *license; /**< if exists, --license will work */
+   const char             *description; /**< long description, possible multiline */
+   Eina_Bool               strict : 1; /**< fail on errors */
+   const Ecore_Getopt_Desc descs[];   /* NULL terminated. */
+};
 
 #define ECORE_GETOPT_STORE_FULL(shortname, longname, help, metavar, type, arg_requirement, default_value) \
-  {shortname, longname, help, metavar, ECORE_GETOPT_ACTION_STORE,        \
-       {.store = {type, arg_requirement, default_value}}}
+  {shortname, longname, help, metavar, ECORE_GETOPT_ACTION_STORE,                                         \
+   {.store = {type, arg_requirement, default_value}}}
 
-#define ECORE_GETOPT_STORE(shortname, longname, help, type)             \
-  ECORE_GETOPT_STORE_FULL(shortname, longname, help, NULL, type,        \
+#define ECORE_GETOPT_STORE(shortname, longname, help, type)      \
+  ECORE_GETOPT_STORE_FULL(shortname, longname, help, NULL, type, \
                           ECORE_GETOPT_DESC_ARG_REQUIREMENT_YES, {})
 
-#define ECORE_GETOPT_STORE_STR(shortname, longname, help)               \
+#define ECORE_GETOPT_STORE_STR(shortname, longname, help) \
   ECORE_GETOPT_STORE(shortname, longname, help, ECORE_GETOPT_TYPE_STR)
-#define ECORE_GETOPT_STORE_BOOL(shortname, longname, help)              \
+#define ECORE_GETOPT_STORE_BOOL(shortname, longname, help) \
   ECORE_GETOPT_STORE(shortname, longname, help, ECORE_GETOPT_TYPE_BOOL)
-#define ECORE_GETOPT_STORE_SHORT(shortname, longname, help)             \
+#define ECORE_GETOPT_STORE_SHORT(shortname, longname, help) \
   ECORE_GETOPT_STORE(shortname, longname, help, ECORE_GETOPT_TYPE_SHORT)
-#define ECORE_GETOPT_STORE_INT(shortname, longname, help)               \
+#define ECORE_GETOPT_STORE_INT(shortname, longname, help) \
   ECORE_GETOPT_STORE(shortname, longname, help, ECORE_GETOPT_TYPE_INT)
-#define ECORE_GETOPT_STORE_LONG(shortname, longname, help)              \
+#define ECORE_GETOPT_STORE_LONG(shortname, longname, help) \
   ECORE_GETOPT_STORE(shortname, longname, help, ECORE_GETOPT_TYPE_LONG)
-#define ECORE_GETOPT_STORE_USHORT(shortname, longname, help)            \
+#define ECORE_GETOPT_STORE_USHORT(shortname, longname, help) \
   ECORE_GETOPT_STORE(shortname, longname, help, ECORE_GETOPT_TYPE_USHORT)
-#define ECORE_GETOPT_STORE_UINT(shortname, longname, help)              \
+#define ECORE_GETOPT_STORE_UINT(shortname, longname, help) \
   ECORE_GETOPT_STORE(shortname, longname, help, ECORE_GETOPT_TYPE_UINT)
-#define ECORE_GETOPT_STORE_ULONG(shortname, longname, help)             \
+#define ECORE_GETOPT_STORE_ULONG(shortname, longname, help) \
   ECORE_GETOPT_STORE(shortname, longname, help, ECORE_GETOPT_TYPE_ULONG)
-#define ECORE_GETOPT_STORE_DOUBLE(shortname, longname, help)            \
+#define ECORE_GETOPT_STORE_DOUBLE(shortname, longname, help) \
   ECORE_GETOPT_STORE(shortname, longname, help, ECORE_GETOPT_TYPE_DOUBLE)
 
-
 #define ECORE_GETOPT_STORE_METAVAR(shortname, longname, help, metavar, type) \
-  ECORE_GETOPT_STORE_FULL(shortname, longname, help, metavar, type,        \
+  ECORE_GETOPT_STORE_FULL(shortname, longname, help, metavar, type,          \
                           ECORE_GETOPT_DESC_ARG_REQUIREMENT_YES, {})
 
 #define ECORE_GETOPT_STORE_METAVAR_STR(shortname, longname, help, metavar) \
@@ -216,7 +218,6 @@ extern "C" {
 #define ECORE_GETOPT_STORE_METAVAR_DOUBLE(shortname, longname, help, metavar) \
   ECORE_GETOPT_STORE_METAVAR(shortname, longname, help, metavar, ECORE_GETOPT_TYPE_DOUBLE)
 
-
 #define ECORE_GETOPT_STORE_DEF(shortname, longname, help, type, default_value) \
   ECORE_GETOPT_STORE_FULL(shortname, longname, help, NULL, type,               \
                           ECORE_GETOPT_DESC_ARG_REQUIREMENT_OPTIONAL,          \
@@ -262,7 +263,7 @@ extern "C" {
 #define ECORE_GETOPT_STORE_FULL_STR(shortname, longname, help, metavar, arg_requirement, default_value) \
   ECORE_GETOPT_STORE_FULL(shortname, longname, help, metavar,                                           \
                           ECORE_GETOPT_TYPE_STR,                                                        \
-                          arg_requirement,                                                               \
+                          arg_requirement,                                                              \
                           {.strv = default_value})
 #define ECORE_GETOPT_STORE_FULL_BOOL(shortname, longname, help, metavar, arg_requirement, default_value) \
   ECORE_GETOPT_STORE_FULL(shortname, longname, help, metavar,                                            \
@@ -307,37 +308,36 @@ extern "C" {
 
 #define ECORE_GETOPT_STORE_CONST(shortname, longname, help, value)   \
   {shortname, longname, help, NULL, ECORE_GETOPT_ACTION_STORE_CONST, \
-       {.store_const = value}}
+   {.store_const = value}}
 #define ECORE_GETOPT_STORE_TRUE(shortname, longname, help)          \
   {shortname, longname, help, NULL, ECORE_GETOPT_ACTION_STORE_TRUE, \
-       {.dummy = NULL}}
+   {.dummy = NULL}}
 #define ECORE_GETOPT_STORE_FALSE(shortname, longname, help)          \
   {shortname, longname, help, NULL, ECORE_GETOPT_ACTION_STORE_FALSE, \
-       {.dummy = NULL}}
+   {.dummy = NULL}}
 
 #define ECORE_GETOPT_CHOICE(shortname, longname, help, choices_array) \
   {shortname, longname, help, NULL, ECORE_GETOPT_ACTION_CHOICE,       \
-       {.choices = choices_array}}
+   {.choices = choices_array}}
 #define ECORE_GETOPT_CHOICE_METAVAR(shortname, longname, help, metavar, choices_array) \
   {shortname, longname, help, metavar, ECORE_GETOPT_ACTION_CHOICE,                     \
-       {.choices = choices_array}}
-
+   {.choices = choices_array}}
 
 #define ECORE_GETOPT_APPEND(shortname, longname, help, sub_type) \
   {shortname, longname, help, NULL, ECORE_GETOPT_ACTION_APPEND,  \
-       {.append_type = sub_type}}
+   {.append_type = sub_type}}
 #define ECORE_GETOPT_APPEND_METAVAR(shortname, longname, help, metavar, type) \
   {shortname, longname, help, metavar, ECORE_GETOPT_ACTION_APPEND,            \
-       {.append_type = type}}
+   {.append_type = type}}
 
 #define ECORE_GETOPT_COUNT(shortname, longname, help)          \
   {shortname, longname, help, NULL, ECORE_GETOPT_ACTION_COUNT, \
-       {.dummy = NULL}}
+   {.dummy = NULL}}
 
 #define ECORE_GETOPT_CALLBACK_FULL(shortname, longname, help, metavar, callback_func, callback_data, argument_requirement, default_value) \
   {shortname, longname, help, metavar, ECORE_GETOPT_ACTION_CALLBACK,                                                                      \
-       {.callback = {callback_func, callback_data,                                                                                        \
-                     argument_requirement, default_value}}}
+   {.callback = {callback_func, callback_data,                                                                                            \
+                 argument_requirement, default_value}}}
 #define ECORE_GETOPT_CALLBACK_NOARGS(shortname, longname, help, callback_func, callback_data) \
   ECORE_GETOPT_CALLBACK_FULL(shortname, longname, help, NULL,                                 \
                              callback_func, callback_data,                                    \
@@ -351,23 +351,23 @@ extern "C" {
 
 #define ECORE_GETOPT_HELP(shortname, longname)      \
   {shortname, longname, "show this message.", NULL, \
-       ECORE_GETOPT_ACTION_HELP,                    \
-       {.dummy = NULL}}
+   ECORE_GETOPT_ACTION_HELP,                        \
+   {.dummy = NULL}}
 
 #define ECORE_GETOPT_VERSION(shortname, longname)      \
   {shortname, longname, "show program version.", NULL, \
-       ECORE_GETOPT_ACTION_VERSION,                    \
-       {.dummy = NULL}}
+   ECORE_GETOPT_ACTION_VERSION,                        \
+   {.dummy = NULL}}
 
 #define ECORE_GETOPT_COPYRIGHT(shortname, longname) \
   {shortname, longname, "show copyright.", NULL,    \
-       ECORE_GETOPT_ACTION_COPYRIGHT,               \
-       {.dummy = NULL}}
+   ECORE_GETOPT_ACTION_COPYRIGHT,                   \
+   {.dummy = NULL}}
 
 #define ECORE_GETOPT_LICENSE(shortname, longname) \
   {shortname, longname, "show license.", NULL,    \
-       ECORE_GETOPT_ACTION_LICENSE,               \
-       {.dummy = NULL}}
+   ECORE_GETOPT_ACTION_LICENSE,                   \
+   {.dummy = NULL}}
 
 #define ECORE_GETOPT_SENTINEL {0, NULL, NULL, NULL, 0, {.dummy = NULL}}
 
@@ -383,19 +383,35 @@ extern "C" {
 #define ECORE_GETOPT_VALUE_PTR(val)      {.ptrp = &(val)}
 #define ECORE_GETOPT_VALUE_PTR_CAST(val) {.ptrp = (void **)&(val)}
 #define ECORE_GETOPT_VALUE_LIST(val)     {.listp = &(val)}
-#define ECORE_GETOPT_VALUE_NONE          {.ptrp = NULL}
-
-  EAPI void ecore_getopt_help(FILE *fp, const Ecore_Getopt *info);
-
-  EAPI Eina_Bool ecore_getopt_parser_has_duplicates(const Ecore_Getopt *parser);
-  EAPI int ecore_getopt_parse(const Ecore_Getopt *parser, Ecore_Getopt_Value *values, int argc, char **argv);
-
-  EAPI Eina_List *ecore_getopt_list_free(Eina_List *list);
-
-  /* helper functions to be used with ECORE_GETOPT_CALLBACK_*() */
-  EAPI Eina_Bool ecore_getopt_callback_geometry_parse(const Ecore_Getopt *parser, const Ecore_Getopt_Desc *desc, const char *str, void *data, Ecore_Getopt_Value *storage);
-  EAPI Eina_Bool ecore_getopt_callback_size_parse(const Ecore_Getopt *parser, const Ecore_Getopt_Desc *desc, const char *str, void *data, Ecore_Getopt_Value *storage);
-
+#define ECORE_GETOPT_VALUE_NONE {.ptrp = NULL}
+
+EAPI void
+ecore_getopt_help(FILE *fp,
+                  const Ecore_Getopt *info);
+
+EAPI Eina_Bool
+ ecore_getopt_parser_has_duplicates(const Ecore_Getopt *parser);
+EAPI int
+ ecore_getopt_parse(const Ecore_Getopt *parser,
+                   Ecore_Getopt_Value *values,
+                   int argc,
+                   char **argv);
+
+EAPI Eina_List *ecore_getopt_list_free(Eina_List *list);
+
+/* helper functions to be used with ECORE_GETOPT_CALLBACK_*() */
+EAPI Eina_Bool
+ecore_getopt_callback_geometry_parse(const Ecore_Getopt *parser,
+                                     const Ecore_Getopt_Desc *desc,
+                                     const char *str,
+                                     void *data,
+                                     Ecore_Getopt_Value *storage);
+EAPI Eina_Bool
+ecore_getopt_callback_size_parse(const Ecore_Getopt *parser,
+                                 const Ecore_Getopt_Desc *desc,
+                                 const char *str,
+                                 void *data,
+                                 Ecore_Getopt_Value *storage);
 
 #ifdef __cplusplus
 }
index b9ab179..99d79c1 100644 (file)
@@ -38,9 +38,9 @@
 static Ecore_Version _version = { VERS_MAJ, VERS_MIN, VERS_MIC, VERS_REV };
 EAPI Ecore_Version *ecore_version = &_version;
 
-#define KEEP_MAX(Global, Local)                        \
-   if (Global < (Local))                        \
-     Global = Local;
+#define KEEP_MAX(Global, Local) \
+  if (Global < (Local))         \
+    Global = Local;
 
 static Eina_Bool _ecore_memory_statistic(void *data);
 static int _ecore_memory_max_total = 0;
@@ -57,23 +57,25 @@ typedef struct _Ecore_Safe_Call Ecore_Safe_Call;
 struct _Ecore_Safe_Call
 {
    union {
-      Ecore_Cb async;
+      Ecore_Cb      async;
       Ecore_Data_Cb sync;
    } cb;
-   void *data;
+   void          *data;
 
-   Eina_Lock m;
+   Eina_Lock      m;
    Eina_Condition c;
 
-   int current_id;
+   int            current_id;
 
-   Eina_Bool sync : 1;
-   Eina_Bool suspend : 1;
+   Eina_Bool      sync : 1;
+   Eina_Bool      suspend : 1;
 };
 
 static void _ecore_main_loop_thread_safe_call(Ecore_Safe_Call *order);
 static void _thread_safe_cleanup(void *data);
-static void _thread_callback(void *data, void *buffer, unsigned int nbyte);
+static void _thread_callback(void        *data,
+                             void        *buffer,
+                             unsigned int nbyte);
 static Eina_List *_thread_cb = NULL;
 static Ecore_Pipe *_thread_call = NULL;
 static Eina_Lock _thread_safety;
@@ -138,11 +140,11 @@ ecore_init(void)
    setlocale(LC_CTYPE, "");
 #endif
    /*
-     if (strcmp(nl_langinfo(CODESET), "UTF-8"))
-     {
+      if (strcmp(nl_langinfo(CODESET), "UTF-8"))
+      {
         WRN("Not a utf8 locale!");
-     }
-   */
+      }
+    */
 #ifdef HAVE_EVIL
    if (!evil_init())
      return --_ecore_init_count;
@@ -189,9 +191,9 @@ ecore_init(void)
 
    return _ecore_init_count;
 
- shutdown_log_dom:
+shutdown_log_dom:
    eina_shutdown();
- shutdown_evil:
+shutdown_evil:
 #ifdef HAVE_EVIL
    evil_shutdown();
 #endif
@@ -214,56 +216,56 @@ ecore_shutdown(void)
    /*
     * take a lock here because _ecore_event_shutdown() does callbacks
     */
-   _ecore_lock();
-   if (--_ecore_init_count != 0)
-     goto unlock;
-
-   ecore_pipe_del(_thread_call);
-   eina_lock_free(&_thread_safety);
-   eina_condition_free(&_thread_cond);
-   eina_lock_free(&_thread_mutex);
-   eina_condition_free(&_thread_feedback_cond);
-   eina_lock_free(&_thread_feedback_mutex);
-   eina_lock_free(&_thread_id_lock);
-
-   if (_ecore_fps_debug) _ecore_fps_debug_shutdown();
-   _ecore_poller_shutdown();
-   _ecore_animator_shutdown();
-   _ecore_glib_shutdown();
-   _ecore_job_shutdown();
-   _ecore_thread_shutdown();
-   _ecore_exe_shutdown();
-   _ecore_idle_enterer_shutdown();
-   _ecore_idle_exiter_shutdown();
-   _ecore_idler_shutdown();
-   _ecore_timer_shutdown();
-   _ecore_event_shutdown();
-   _ecore_main_shutdown();
-   _ecore_signal_shutdown();
-   _ecore_main_loop_shutdown();
+     _ecore_lock();
+     if (--_ecore_init_count != 0)
+       goto unlock;
+
+     ecore_pipe_del(_thread_call);
+     eina_lock_free(&_thread_safety);
+     eina_condition_free(&_thread_cond);
+     eina_lock_free(&_thread_mutex);
+     eina_condition_free(&_thread_feedback_cond);
+     eina_lock_free(&_thread_feedback_mutex);
+     eina_lock_free(&_thread_id_lock);
+
+     if (_ecore_fps_debug) _ecore_fps_debug_shutdown();
+     _ecore_poller_shutdown();
+     _ecore_animator_shutdown();
+     _ecore_glib_shutdown();
+     _ecore_job_shutdown();
+     _ecore_thread_shutdown();
+     _ecore_exe_shutdown();
+     _ecore_idle_enterer_shutdown();
+     _ecore_idle_exiter_shutdown();
+     _ecore_idler_shutdown();
+     _ecore_timer_shutdown();
+     _ecore_event_shutdown();
+     _ecore_main_shutdown();
+     _ecore_signal_shutdown();
+     _ecore_main_loop_shutdown();
 
 #if HAVE_MALLINFO
-   if (getenv("ECORE_MEM_STAT"))
-     {
-        _ecore_memory_statistic(NULL);
-
-        ERR("[%i] Memory MAX total: %i, free: %i",
-            _ecore_memory_pid,
-            _ecore_memory_max_total,
-            _ecore_memory_max_free);
-     }
+     if (getenv("ECORE_MEM_STAT"))
+       {
+          _ecore_memory_statistic(NULL);
+
+          ERR("[%i] Memory MAX total: %i, free: %i",
+              _ecore_memory_pid,
+              _ecore_memory_max_total,
+              _ecore_memory_max_free);
+       }
 #endif
 
-   eina_log_domain_unregister(_ecore_log_dom);
-   _ecore_log_dom = -1;
-   eina_shutdown();
+     eina_log_domain_unregister(_ecore_log_dom);
+     _ecore_log_dom = -1;
+     eina_shutdown();
 #ifdef HAVE_EVIL
-   evil_shutdown();
+     evil_shutdown();
 #endif
 unlock:
-   _ecore_unlock();
+     _ecore_unlock();
 
-   return _ecore_init_count;
+     return _ecore_init_count;
 }
 
 /**
@@ -273,20 +275,21 @@ unlock:
 static int wakeup = 42;
 
 EAPI void
-ecore_main_loop_thread_safe_call_async(Ecore_Cb callback, void *data)
+ecore_main_loop_thread_safe_call_async(Ecore_Cb callback,
+                                       void    *data)
 {
    Ecore_Safe_Call *order;
 
-   if (!callback) return ;
+   if (!callback) return;
 
    if (eina_main_loop_is())
      {
         callback(data);
-        return ;
+        return;
      }
 
    order = malloc(sizeof (Ecore_Safe_Call));
-   if (!order) return ;
+   if (!order) return;
 
    order->cb.async = callback;
    order->data = data;
@@ -297,7 +300,8 @@ ecore_main_loop_thread_safe_call_async(Ecore_Cb callback, void *data)
 }
 
 EAPI void *
-ecore_main_loop_thread_safe_call_sync(Ecore_Data_Cb callback, void *data)
+ecore_main_loop_thread_safe_call_sync(Ecore_Data_Cb callback,
+                                      void         *data)
 {
    Ecore_Safe_Call *order;
    void *ret;
@@ -354,7 +358,7 @@ ecore_thread_main_loop_begin(void)
    if (order->current_id < 0)
      {
         _thread_id_max = 0;
-       order->current_id = ++_thread_id_max;
+        order->current_id = ++_thread_id_max;
      }
    eina_lock_release(&_thread_id_lock);
 
@@ -414,7 +418,8 @@ ecore_thread_main_loop_end(void)
 }
 
 EAPI void
-ecore_print_warning(const char *function, const char *sparam)
+ecore_print_warning(const char *function,
+                    const char *sparam)
 {
    WRN("***** Developer Warning ***** :\n"
        "\tThis program is calling:\n\n"
@@ -426,7 +431,10 @@ ecore_print_warning(const char *function, const char *sparam)
 }
 
 EAPI void
-_ecore_magic_fail(const void *d, Ecore_Magic m, Ecore_Magic req_m, const char *fname)
+_ecore_magic_fail(const void *d,
+                  Ecore_Magic m,
+                  Ecore_Magic req_m,
+                  const char *fname)
 {
    ERR("\n"
        "*** ECORE ERROR: Ecore Magic Check Failed!!!\n"
@@ -441,9 +449,9 @@ _ecore_magic_fail(const void *d, Ecore_Magic m, Ecore_Magic req_m, const char *f
          "    Supplied: %08x - %s",
          (unsigned int)req_m, _ecore_magic_string_get(req_m),
          (unsigned int)m, _ecore_magic_string_get(m));
-     ERR("*** NAUGHTY PROGRAMMER!!!\n"
-         "*** SPANK SPANK SPANK!!!\n"
-         "*** Now go fix your code. Tut tut tut!");
+   ERR("*** NAUGHTY PROGRAMMER!!!\n"
+       "*** SPANK SPANK SPANK!!!\n"
+       "*** Now go fix your code. Tut tut tut!");
    if (getenv("ECORE_ERROR_ABORT")) abort();
 }
 
@@ -455,36 +463,46 @@ _ecore_magic_string_get(Ecore_Magic m)
       case ECORE_MAGIC_NONE:
         return "None (Freed Object)";
         break;
+
       case ECORE_MAGIC_EXE:
         return "Ecore_Exe (Executable)";
         break;
+
       case ECORE_MAGIC_TIMER:
         return "Ecore_Timer (Timer)";
         break;
+
       case ECORE_MAGIC_IDLER:
         return "Ecore_Idler (Idler)";
         break;
+
       case ECORE_MAGIC_IDLE_ENTERER:
         return "Ecore_Idle_Enterer (Idler Enterer)";
         break;
+
       case ECORE_MAGIC_IDLE_EXITER:
         return "Ecore_Idle_Exiter (Idler Exiter)";
         break;
+
       case ECORE_MAGIC_FD_HANDLER:
         return "Ecore_Fd_Handler (Fd Handler)";
         break;
+
       case ECORE_MAGIC_WIN32_HANDLER:
         return "Ecore_Win32_Handler (Win32 Handler)";
         break;
+
       case ECORE_MAGIC_EVENT_HANDLER:
         return "Ecore_Event_Handler (Event Handler)";
         break;
+
       case ECORE_MAGIC_EVENT:
         return "Ecore_Event (Event)";
         break;
+
       default:
         return "<UNKNOWN>";
-     };
+     }
 }
 
 /* fps debug calls - for debugging how much time your app actually spends */
@@ -498,9 +516,9 @@ unsigned int *_ecore_fps_runtime_mmap = NULL;
 void
 _ecore_fps_debug_init(void)
 {
-   char  buf[PATH_MAX];
+   char buf[PATH_MAX];
    const char *tmp;
-   int   pid;
+   int pid;
 
    _ecore_fps_debug_init_count++;
    if (_ecore_fps_debug_init_count > 1) return;
@@ -561,14 +579,14 @@ _ecore_fps_debug_shutdown(void)
      {
         char buf[4096];
         const char *tmp;
-        int   pid;
+        int pid;
 
 #ifndef HAVE_EVIL
-   tmp = "/tmp";
+        tmp = "/tmp";
 #else
-   tmp = (char *)evil_tmpdir_get ();
+        tmp = (char *)evil_tmpdir_get ();
 #endif /* HAVE_EVIL */
-   pid = (int)getpid();
+        pid = (int)getpid();
         snprintf(buf, sizeof(buf), "%s/.ecore_fps_debug-%i", tmp, pid);
         unlink(buf);
         if (_ecore_fps_runtime_mmap)
@@ -611,12 +629,12 @@ _ecore_memory_statistic(__UNUSED__ void *data)
 
    mi = mallinfo();
 
-#define HAS_CHANGED(Global, Local)                \
-   if (Global != Local)                                \
-     {                                                \
-        Global = Local;                                \
-        changed = EINA_TRUE;                        \
-     }
+#define HAS_CHANGED(Global, Local) \
+  if (Global != Local)             \
+    {                              \
+       Global = Local;             \
+       changed = EINA_TRUE;        \
+    }
 
    HAS_CHANGED(uordblks, mi.uordblks);
    HAS_CHANGED(fordblks, mi.fordblks);
@@ -659,8 +677,8 @@ _thread_safe_cleanup(void *data)
 }
 
 static void
-_thread_callback(void *data __UNUSED__,
-                 void *buffer __UNUSED__,
+_thread_callback(void        *data __UNUSED__,
+                 void        *buffer __UNUSED__,
                  unsigned int nbyte __UNUSED__)
 {
    Ecore_Safe_Call *call;
@@ -677,23 +695,23 @@ _thread_callback(void *data __UNUSED__,
           {
              eina_lock_take(&_thread_mutex);
 
-            eina_lock_take(&call->m);
-            _thread_id = call->current_id;
+             eina_lock_take(&call->m);
+             _thread_id = call->current_id;
              eina_condition_broadcast(&call->c);
-            eina_lock_release(&call->m);
+             eina_lock_release(&call->m);
 
-            while (_thread_id_update != _thread_id)
-              eina_condition_wait(&_thread_cond);
+             while (_thread_id_update != _thread_id)
+               eina_condition_wait(&_thread_cond);
              eina_lock_release(&_thread_mutex);
 
              eina_main_loop_define();
 
-            eina_lock_take(&_thread_feedback_mutex);
+             eina_lock_take(&_thread_feedback_mutex);
 
-            _thread_id = -1;
+             _thread_id = -1;
 
-            eina_condition_broadcast(&_thread_feedback_cond);
-            eina_lock_release(&_thread_feedback_mutex);
+             eina_condition_broadcast(&_thread_feedback_cond);
+             eina_lock_release(&_thread_feedback_mutex);
 
              _thread_safe_cleanup(call);
              free(call);
@@ -710,3 +728,4 @@ _thread_callback(void *data __UNUSED__,
           }
      }
 }
+
index de5455a..9adaa77 100644 (file)
@@ -8,38 +8,36 @@
 #include "Ecore.h"
 #include "ecore_private.h"
 
-
 struct _Ecore_Animator
 {
    EINA_INLIST;
-   ECORE_MAGIC;
+                     ECORE_MAGIC;
 
-   Ecore_Task_Cb func;
-   void          *data;
+   Ecore_Task_Cb     func;
+   void             *data;
 
-   double             start, run;
-   Ecore_Timeline_Cb  run_func;
-   void              *run_data;
+   double            start, run;
+   Ecore_Timeline_Cb run_func;
+   void             *run_data;
 
-   Eina_Bool     delete_me : 1;
-   Eina_Bool     suspended : 1;
+   Eina_Bool         delete_me : 1;
+   Eina_Bool         suspended : 1;
 };
 
-
 static Eina_Bool _ecore_animator_run(void *data);
 static Eina_Bool _ecore_animator(void *data);
 
-static int                    animators_delete_me = 0;
-static Ecore_Animator        *animators = NULL;
-static double                 animators_frametime = 1.0 / 30.0;
+static int animators_delete_me = 0;
+static Ecore_Animator *animators = NULL;
+static double animators_frametime = 1.0 / 30.0;
 
-static Ecore_Animator_Source  src = ECORE_ANIMATOR_SOURCE_TIMER;
-static Ecore_Timer           *timer = NULL;
-static int                    ticking = 0;
-static Ecore_Cb               begin_tick_cb = NULL;
-static const void            *begin_tick_data = NULL;
-static Ecore_Cb               end_tick_cb = NULL;
-static const void            *end_tick_data = NULL;
+static Ecore_Animator_Source src = ECORE_ANIMATOR_SOURCE_TIMER;
+static Ecore_Timer *timer = NULL;
+static int ticking = 0;
+static Ecore_Cb begin_tick_cb = NULL;
+static const void *begin_tick_data = NULL;
+static Ecore_Cb end_tick_cb = NULL;
+static const void *end_tick_data = NULL;
 
 static void
 _begin_tick(void)
@@ -56,13 +54,15 @@ _begin_tick(void)
              double d = -fmod(t_loop - sync_0, animators_frametime);
 
              timer = _ecore_timer_loop_add(animators_frametime,
-                                                    _ecore_animator, NULL);
+                                           _ecore_animator, NULL);
              _ecore_timer_delay(timer, d);
           }
         break;
+
       case ECORE_ANIMATOR_SOURCE_CUSTOM:
         if (begin_tick_cb) begin_tick_cb((void *)begin_tick_data);
         break;
+
       default:
         break;
      }
@@ -82,9 +82,11 @@ _end_tick(void)
              timer = NULL;
           }
         break;
+
       case ECORE_ANIMATOR_SOURCE_CUSTOM:
         if (end_tick_cb) end_tick_cb((void *)end_tick_data);
         break;
+
       default:
         break;
      }
@@ -109,15 +111,15 @@ _do_tick(void)
    if (animators_delete_me)
      {
         Ecore_Animator *l;
-        for (l = animators; l;)
+        for (l = animators; l; )
           {
              animator = l;
-             l = (Ecore_Animator *) EINA_INLIST_GET(l)->next;
+             l = (Ecore_Animator *)EINA_INLIST_GET(l)->next;
              if (animator->delete_me)
                {
                   animators = (Ecore_Animator *)
-                     eina_inlist_remove(EINA_INLIST_GET(animators), 
-                                        EINA_INLIST_GET(animator));
+                    eina_inlist_remove(EINA_INLIST_GET(animators),
+                                       EINA_INLIST_GET(animator));
                   ECORE_MAGIC_SET(animator, ECORE_MAGIC_NONE);
                   free(animator);
                   animators_delete_me--;
@@ -134,7 +136,8 @@ _do_tick(void)
 }
 
 static Ecore_Animator *
-_ecore_animator_add(Ecore_Task_Cb func, const void *data)
+_ecore_animator_add(Ecore_Task_Cb func,
+                    const void   *data)
 {
    Ecore_Animator *animator = NULL;
 
@@ -150,7 +153,8 @@ _ecore_animator_add(Ecore_Task_Cb func, const void *data)
 }
 
 EAPI Ecore_Animator *
-ecore_animator_add(Ecore_Task_Cb func, const void *data)
+ecore_animator_add(Ecore_Task_Cb func,
+                   const void   *data)
 {
    Ecore_Animator *animator;
 
@@ -162,7 +166,9 @@ ecore_animator_add(Ecore_Task_Cb func, const void *data)
 }
 
 EAPI Ecore_Animator *
-ecore_animator_timeline_add(double runtime, Ecore_Timeline_Cb func, const void *data)
+ecore_animator_timeline_add(double            runtime,
+                            Ecore_Timeline_Cb func,
+                            const void       *data)
 {
    Ecore_Animator *animator;
 
@@ -191,7 +197,8 @@ _pos_map_cos(double in)
 }
 
 static double
-_pos_map_accel_factor(double pos, double v1)
+_pos_map_accel_factor(double pos,
+                      double v1)
 {
    int i, fact = (int)v1;
    double p, o1 = pos, o2 = pos, v;
@@ -208,7 +215,9 @@ _pos_map_accel_factor(double pos, double v1)
 }
 
 static double
-_pos_map_pow(double pos, double divis, int p)
+_pos_map_pow(double pos,
+             double divis,
+             int    p)
 {
    double v = 1.0;
    int i;
@@ -217,7 +226,9 @@ _pos_map_pow(double pos, double divis, int p)
 }
 
 static double
-_pos_map_spring(double pos, int bounces, double decfac)
+_pos_map_spring(double pos,
+                int    bounces,
+                double decfac)
 {
    int segnum, segpos, b1, b2;
    double len, decay, decpos, p2;
@@ -235,50 +246,63 @@ _pos_map_spring(double pos, int bounces, double decfac)
 }
 
 EAPI double
-ecore_animator_pos_map(double pos, Ecore_Pos_Map map, double v1, double v2)
+ecore_animator_pos_map(double        pos,
+                       Ecore_Pos_Map map,
+                       double        v1,
+                       double        v2)
 {
    /* purely functional - locking not required */
-   if (pos > 1.0) pos = 1.0;
-   else if (pos < 0.0) pos = 0.0;
-   switch (map)
-     {
-      case ECORE_POS_MAP_LINEAR:
-        return pos;
-      case ECORE_POS_MAP_ACCELERATE:
-        pos = 1.0 - _pos_map_sin((M_PI / 2.0) + ((pos * M_PI) / 2.0));
-        return pos;
-      case ECORE_POS_MAP_DECELERATE:
-        pos = _pos_map_sin((pos * M_PI) / 2.0);
-        return pos;
-      case ECORE_POS_MAP_SINUSOIDAL:
-        pos = (1.0 - _pos_map_cos(pos * M_PI)) / 2.0;
-        return pos;
-      case ECORE_POS_MAP_ACCELERATE_FACTOR:
-        pos = _pos_map_accel_factor(pos, v1);
-        return pos;
-      case ECORE_POS_MAP_DECELERATE_FACTOR:
-        pos = 1.0 - _pos_map_accel_factor(1.0 - pos, v1);
-        return pos;
-      case ECORE_POS_MAP_SINUSOIDAL_FACTOR:
-        if (pos < 0.5) pos = _pos_map_accel_factor(pos * 2.0, v1) / 2.0;
-        else pos = 1.0 - (_pos_map_accel_factor((1.0 - pos) * 2.0, v1) / 2.0);
-        return pos;
-      case ECORE_POS_MAP_DIVISOR_INTERP:
-        pos = _pos_map_pow(pos, v1, (int)v2);
-        return pos;
-      case ECORE_POS_MAP_BOUNCE:
-        pos = _pos_map_spring(pos, (int)v2, v1);
-        if (pos < 0.0) pos = -pos;
-        pos = 1.0 - pos;
-        return pos;
-      case ECORE_POS_MAP_SPRING:
-        pos = 1.0 - _pos_map_spring(pos, (int)v2, v1);
-        return pos;
-      default:
-        return pos;
-     }
-   return pos;
-   v2 = 0.0;
+    if (pos > 1.0) pos = 1.0;
+    else if (pos < 0.0)
+      pos = 0.0;
+    switch (map)
+      {
+       case ECORE_POS_MAP_LINEAR:
+         return pos;
+
+       case ECORE_POS_MAP_ACCELERATE:
+         pos = 1.0 - _pos_map_sin((M_PI / 2.0) + ((pos * M_PI) / 2.0));
+         return pos;
+
+       case ECORE_POS_MAP_DECELERATE:
+         pos = _pos_map_sin((pos * M_PI) / 2.0);
+         return pos;
+
+       case ECORE_POS_MAP_SINUSOIDAL:
+         pos = (1.0 - _pos_map_cos(pos * M_PI)) / 2.0;
+         return pos;
+
+       case ECORE_POS_MAP_ACCELERATE_FACTOR:
+         pos = _pos_map_accel_factor(pos, v1);
+         return pos;
+
+       case ECORE_POS_MAP_DECELERATE_FACTOR:
+         pos = 1.0 - _pos_map_accel_factor(1.0 - pos, v1);
+         return pos;
+
+       case ECORE_POS_MAP_SINUSOIDAL_FACTOR:
+         if (pos < 0.5) pos = _pos_map_accel_factor(pos * 2.0, v1) / 2.0;
+         else pos = 1.0 - (_pos_map_accel_factor((1.0 - pos) * 2.0, v1) / 2.0);
+         return pos;
+
+       case ECORE_POS_MAP_DIVISOR_INTERP:
+         pos = _pos_map_pow(pos, v1, (int)v2);
+         return pos;
+
+       case ECORE_POS_MAP_BOUNCE:
+         pos = _pos_map_spring(pos, (int)v2, v1);
+         if (pos < 0.0) pos = -pos;
+         pos = 1.0 - pos;
+         return pos;
+
+       case ECORE_POS_MAP_SPRING:
+         pos = 1.0 - _pos_map_spring(pos, (int)v2, v1);
+         return pos;
+
+       default:
+         return pos;
+      }
+    return pos;
 }
 
 EAPI void *
@@ -377,7 +401,8 @@ ecore_animator_source_get(void)
 }
 
 EAPI void
-ecore_animator_custom_source_tick_begin_callback_set(Ecore_Cb func, const void *data)
+ecore_animator_custom_source_tick_begin_callback_set(Ecore_Cb    func,
+                                                     const void *data)
 {
    _ecore_lock();
    begin_tick_cb = func;
@@ -388,7 +413,8 @@ ecore_animator_custom_source_tick_begin_callback_set(Ecore_Cb func, const void *
 }
 
 EAPI void
-ecore_animator_custom_source_tick_end_callback_set(Ecore_Cb func, const void *data)
+ecore_animator_custom_source_tick_end_callback_set(Ecore_Cb    func,
+                                                   const void *data)
 {
    _ecore_lock();
    end_tick_cb = func;
@@ -415,7 +441,7 @@ _ecore_animator_shutdown(void)
         Ecore_Animator *animator;
 
         animator = animators;
-        animators = (Ecore_Animator *) eina_inlist_remove(EINA_INLIST_GET(animators), EINA_INLIST_GET(animators));
+        animators = (Ecore_Animator *)eina_inlist_remove(EINA_INLIST_GET(animators), EINA_INLIST_GET(animators));
         ECORE_MAGIC_SET(animator, ECORE_MAGIC_NONE);
         free(animator);
      }
@@ -433,7 +459,8 @@ _ecore_animator_run(void *data)
      {
         pos = (t - animator->start) / animator->run;
         if (pos > 1.0) pos = 1.0;
-        else if (pos < 0.0) pos = 0.0;
+        else if (pos < 0.0)
+          pos = 0.0;
      }
    run_ret = animator->run_func(animator->run_data, pos);
    if (t >= (animator->start + animator->run)) run_ret = EINA_FALSE;
@@ -449,3 +476,4 @@ _ecore_animator(void *data __UNUSED__)
    _ecore_unlock();
    return r;
 }
+
index ffed2d7..5e4bf02 100644 (file)
@@ -35,7 +35,8 @@ static char **app_argv = NULL;
  * for later use by ecore_app_restart() or ecore_app_args_get().
  */
 EAPI void
-ecore_app_args_set(int argc, const char **argv)
+ecore_app_args_set(int          argc,
+                   const char **argv)
 {
    EINA_MAIN_LOOP_CHECK_RETURN;
 
@@ -57,7 +58,8 @@ ecore_app_args_set(int argc, const char **argv)
  * same set by ecore_app_args_set().
  */
 EAPI void
-ecore_app_args_get(int *argc, char ***argv)
+ecore_app_args_get(int    *argc,
+                   char ***argv)
 {
    EINA_MAIN_LOOP_CHECK_RETURN;
 
index 9249044..f31baf8 100644 (file)
@@ -12,40 +12,39 @@ static int inpurge = 0;
 struct _Ecore_Event_Handler
 {
    EINA_INLIST;
-   ECORE_MAGIC;
-   int type;
+                          ECORE_MAGIC;
+   int                    type;
    Ecore_Event_Handler_Cb func;
-   void *data;
-   int       references;
-   Eina_Bool delete_me : 1;
+   void                  *data;
+   int                    references;
+   Eina_Bool              delete_me : 1;
 };
 
 struct _Ecore_Event_Filter
 {
    EINA_INLIST;
-   ECORE_MAGIC;
-   Ecore_Data_Cb func_start;
+                   ECORE_MAGIC;
+   Ecore_Data_Cb   func_start;
    Ecore_Filter_Cb func_filter;
-   Ecore_End_Cb func_end;
-   void *loop_data;
-   void *data;
-   int       references;
-   Eina_Bool delete_me : 1;
+   Ecore_End_Cb    func_end;
+   void           *loop_data;
+   void           *data;
+   int             references;
+   Eina_Bool       delete_me : 1;
 };
 
 struct _Ecore_Event
 {
    EINA_INLIST;
-   ECORE_MAGIC;
-   int type;
-   void *event;
+                ECORE_MAGIC;
+   int          type;
+   void        *event;
    Ecore_End_Cb func_free;
-   void *data;
-   int       references;
-   Eina_Bool delete_me : 1;
+   void        *data;
+   int          references;
+   Eina_Bool    delete_me : 1;
 };
 
-
 static int events_num = 0;
 static Ecore_Event *events = NULL;
 static Ecore_Event *event_current = NULL;
@@ -65,13 +64,11 @@ static Ecore_Event *event_filter_event_current = NULL;
 static int event_filters_delete_me = 0;
 static int event_id_max = ECORE_EVENT_COUNT;
 static int ecore_raw_event_type = ECORE_EVENT_NONE;
-static void *ecore_raw_event_event =  NULL;
-
+static void *ecore_raw_event_event = NULL;
 
-static void _ecore_event_purge_deleted(void);
+static void  _ecore_event_purge_deleted(void);
 static void *_ecore_event_del(Ecore_Event *event);
 
-
 /**
  * @addtogroup Ecore_Event_Group
  *
@@ -102,7 +99,9 @@ static void *_ecore_event_del(Ecore_Event *event);
  * been called, will not be.
  */
 EAPI Ecore_Event_Handler *
-ecore_event_handler_add(int type, Ecore_Event_Handler_Cb func, const void *data)
+ecore_event_handler_add(int                    type,
+                        Ecore_Event_Handler_Cb func,
+                        const void            *data)
 {
    Ecore_Event_Handler *eh = NULL;
 
@@ -213,7 +212,8 @@ unlock:
  * which was previously associated with @p eh by ecore_event_handler_add().
  */
 EAPI void *
-ecore_event_handler_data_set(Ecore_Event_Handler *eh, const void *data)
+ecore_event_handler_data_set(Ecore_Event_Handler *eh,
+                             const void          *data)
 {
    void *old = NULL;
 
@@ -232,7 +232,8 @@ unlock:
 }
 
 static void
-_ecore_event_generic_free (void *data __UNUSED__, void *event)
+_ecore_event_generic_free(void *data __UNUSED__,
+                          void *event)
 {
    free (event);
 }
@@ -256,7 +257,10 @@ _ecore_event_generic_free (void *data __UNUSED__, void *event)
  * func_free is passed @p data as its data parameter.
  */
 EAPI Ecore_Event *
-ecore_event_add(int type, void *ev, Ecore_End_Cb func_free, void *data)
+ecore_event_add(int          type,
+                void        *ev,
+                Ecore_End_Cb func_free,
+                void        *data)
 {
    Ecore_Event *event = NULL;
 
@@ -345,7 +349,10 @@ ecore_event_type_new(void)
  * and @p data pointer to clean up.
  */
 EAPI Ecore_Event_Filter *
-ecore_event_filter_add(Ecore_Data_Cb func_start, Ecore_Filter_Cb func_filter, Ecore_End_Cb func_end, const void *data)
+ecore_event_filter_add(Ecore_Data_Cb   func_start,
+                       Ecore_Filter_Cb func_filter,
+                       Ecore_End_Cb    func_end,
+                       const void     *data)
 {
    Ecore_Event_Filter *ef = NULL;
 
@@ -358,7 +365,7 @@ ecore_event_filter_add(Ecore_Data_Cb func_start, Ecore_Filter_Cb func_filter, Ec
    ef->func_filter = func_filter;
    ef->func_end = func_end;
    ef->data = (void *)data;
-   event_filters = (Ecore_Event_Filter *) eina_inlist_append(EINA_INLIST_GET(event_filters), EINA_INLIST_GET(ef));
+   event_filters = (Ecore_Event_Filter *)eina_inlist_append(EINA_INLIST_GET(event_filters), EINA_INLIST_GET(ef));
 unlock:
    _ecore_unlock();
    return ef;
@@ -460,7 +467,7 @@ _ecore_event_shutdown(void)
      {
         while ((eh = event_handlers[i]))
           {
-             event_handlers[i] = (Ecore_Event_Handler *) eina_inlist_remove(EINA_INLIST_GET(event_handlers[i]), EINA_INLIST_GET(event_handlers[i]));
+             event_handlers[i] = (Ecore_Event_Handler *)eina_inlist_remove(EINA_INLIST_GET(event_handlers[i]), EINA_INLIST_GET(event_handlers[i]));
              ECORE_MAGIC_SET(eh, ECORE_MAGIC_NONE);
              if (!eh->delete_me) free(eh);
           }
@@ -473,7 +480,7 @@ _ecore_event_shutdown(void)
    event_handlers_alloc_num = 0;
    while ((ef = event_filters))
      {
-        event_filters = (Ecore_Event_Filter *) eina_inlist_remove(EINA_INLIST_GET(event_filters), EINA_INLIST_GET(event_filters));
+        event_filters = (Ecore_Event_Filter *)eina_inlist_remove(EINA_INLIST_GET(event_filters), EINA_INLIST_GET(event_filters));
         ECORE_MAGIC_SET(ef, ECORE_MAGIC_NONE);
         free(ef);
      }
@@ -492,7 +499,10 @@ _ecore_event_exist(void)
 }
 
 Ecore_Event *
-_ecore_event_add(int type, void *ev, Ecore_End_Cb func_free, void *data)
+_ecore_event_add(int          type,
+                 void        *ev,
+                 Ecore_End_Cb func_free,
+                 void        *data)
 {
    Ecore_Event *e;
 
@@ -523,7 +533,7 @@ _ecore_event_del(Ecore_Event *event)
 
    data = event->data;
    if (event->func_free) _ecore_call_end_cb(event->func_free, event->data, event->event);
-   events = (Ecore_Event *) eina_inlist_remove(EINA_INLIST_GET(events), EINA_INLIST_GET(event));
+   events = (Ecore_Event *)eina_inlist_remove(EINA_INLIST_GET(events), EINA_INLIST_GET(event));
    ECORE_MAGIC_SET(event, ECORE_MAGIC_NONE);
    free(event);
    events_num--;
@@ -555,16 +565,15 @@ _ecore_event_purge_deleted(void)
 static inline void
 _ecore_event_filters_apply()
 {
-
    if (!event_filter_current)
      {
         /* regular main loop, start from head */
-        event_filter_current = event_filters;
+         event_filter_current = event_filters;
      }
    else
      {
         /* recursive main loop, continue from where we were */
-        event_filter_current = (Ecore_Event_Filter *)EINA_INLIST_GET(event_filter_current)->next;
+         event_filter_current = (Ecore_Event_Filter *)EINA_INLIST_GET(event_filter_current)->next;
      }
 
    while (event_filter_current)
@@ -580,13 +589,13 @@ _ecore_event_filters_apply()
 
              if (!event_filter_event_current)
                {
-                  /* regular main loop, start from head */
-                  event_filter_event_current = events;
+     /* regular main loop, start from head */
+                   event_filter_event_current = events;
                }
              else
                {
-                  /* recursive main loop, continue from where we were */
-                  event_filter_event_current = (Ecore_Event *)EINA_INLIST_GET(event_filter_event_current)->next;
+     /* recursive main loop, continue from where we were */
+                   event_filter_event_current = (Ecore_Event *)EINA_INLIST_GET(event_filter_event_current)->next;
                }
 
              while (event_filter_event_current)
@@ -594,7 +603,7 @@ _ecore_event_filters_apply()
                   Ecore_Event *e = event_filter_event_current;
 
                   if (!_ecore_call_filter_cb(ef->func_filter, ef->data,
-                                               ef->loop_data, e->type, e->event))
+                                             ef->loop_data, e->type, e->event))
                     {
                        ecore_event_del(e);
                     }
@@ -615,10 +624,10 @@ _ecore_event_filters_apply()
      {
         int deleted_in_use = 0;
         Ecore_Event_Filter *l;
-        for (l = event_filters; l;)
+        for (l = event_filters; l; )
           {
              Ecore_Event_Filter *ef = l;
-             l = (Ecore_Event_Filter *) EINA_INLIST_GET(l)->next;
+             l = (Ecore_Event_Filter *)EINA_INLIST_GET(l)->next;
              if (ef->delete_me)
                {
                   if (ef->references)
@@ -627,7 +636,7 @@ _ecore_event_filters_apply()
                        continue;
                     }
 
-                  event_filters = (Ecore_Event_Filter *) eina_inlist_remove(EINA_INLIST_GET(event_filters), EINA_INLIST_GET(ef));
+                  event_filters = (Ecore_Event_Filter *)eina_inlist_remove(EINA_INLIST_GET(event_filters), EINA_INLIST_GET(ef));
                   ECORE_MAGIC_SET(ef, ECORE_MAGIC_NONE);
                   free(ef);
                }
@@ -636,6 +645,7 @@ _ecore_event_filters_apply()
           event_filters_delete_me = 0;
      }
 }
+
 void
 _ecore_event_call(void)
 {
@@ -647,8 +657,8 @@ _ecore_event_call(void)
    if (!event_current)
      {
         /* regular main loop, start from head */
-        event_current = events;
-        event_handler_current = NULL;
+         event_current = events;
+         event_handler_current = NULL;
      }
 
    while (event_current)
@@ -669,13 +679,13 @@ _ecore_event_call(void)
           {
              if (!event_handler_current)
                {
-                  /* regular main loop, start from head */
-                  event_handler_current = event_handlers[e->type];
+     /* regular main loop, start from head */
+                   event_handler_current = event_handlers[e->type];
                }
              else
                {
-                  /* recursive main loop, continue from where we were */
-                  event_handler_current = (Ecore_Event_Handler *)EINA_INLIST_GET(event_handler_current)->next;
+     /* recursive main loop, continue from where we were */
+                   event_handler_current = (Ecore_Event_Handler *)EINA_INLIST_GET(event_handler_current)->next;
                }
 
              while ((event_handler_current) && (!e->delete_me))
@@ -730,7 +740,7 @@ _ecore_event_call(void)
 
         event_handlers_delete_list = eina_list_remove_list(event_handlers_delete_list, l);
 
-        event_handlers[eh->type] = (Ecore_Event_Handler *) eina_inlist_remove(EINA_INLIST_GET(event_handlers[eh->type]), EINA_INLIST_GET(eh));
+        event_handlers[eh->type] = (Ecore_Event_Handler *)eina_inlist_remove(EINA_INLIST_GET(event_handlers[eh->type]), EINA_INLIST_GET(eh));
         ECORE_MAGIC_SET(eh, ECORE_MAGIC_NONE);
         free(eh);
      }
@@ -777,3 +787,4 @@ _ecore_event_signal_realtime_new(void)
 {
    return calloc(1, sizeof(Ecore_Event_Signal_Realtime));
 }
+
index 07407ef..d5465fc 100644 (file)
 #include <unistd.h>
 #include <fcntl.h>
 
+#ifdef HAVE_SYS_PRCTL_H
+# include <sys/prctl.h>
+#endif
+
 #ifdef HAVE_SYS_WAIT_H
 # include <sys/wait.h>
 #endif
 #include "Ecore.h"
 #include "ecore_private.h"
 
-
-   /* FIXME: Getting respawn to work
-    *
-    * There is no way that we can do anything about the internal state info of
-    * an external exe.  The same can be said about the state of user code.  User
-    * code in this context means the code that is using ecore_exe to manage exe's
-    * for it.
-    *
-    * Document that the exe must be respawnable, in other words, there is no
-    * state that it cannot regenerate by just killing it and starting it again.
-    * This includes state that the user code knows about, as the respawn is
-    * transparent to that code.  On the other hand, maybe a respawn event might
-    * be useful, or maybe resend the currently non existent add event.  For
-    * consistancy with ecore_con, an add event is good anyway.
-    *
-    * The Ecore_exe structure is reused for respawning, so that the (opaque)
-    * pointer held by the user remains valid.  This means that the Ecore_Exe
-    * init and del functions may need to be split into two parts each to avoid
-    * duplicating code - common code part, and the rest.  This implies that
-    * the unchanging members mentioned next should NEVER change.
-    *
-    * These structure members don't need to change -
-    *   __list_data       - we stay on the list
-    *   ECORE_MAGIC       - this is a constant
-    *   data              - passed in originally
-    *   cmd               - passed in originally
-    *   flags             - passed in originally
-    *
-    * These structure members need to change -
-    *   tag               - state that must be regenerated, zap it
-    *   pid               - it will be different
-    *   child_fd_write    - it will be different
-    *   child_fd_read     - it will be different
-    *   child_fd_error    - it will be different
-    *   write_fd_handler  - we cannot change the fd used by a handler, this changes coz the fd changes.
-    *   read_fd_handler   - we cannot change the fd used by a handler, this changes coz the fd changes.
-    *   error_fd_handler  - we cannot change the fd used by a handler, this changes coz the fd changes.
-    *
-    * Hmm, the read, write, and error buffers could be tricky.
-    * They are not atomic, and could be in a semi complete state.
-    * They fall into the "state must be regenerated" mentioned above.
-    * A respawn/add event should take care of it.
-    *
-    * These structure members need to change -
-    *   write_data_buf    - state that must be regenerated, zap it
-    *   write_data_size   - state that must be regenerated, zap it
-    *   write_data_offset - state that must be regenerated, zap it
-    *   read_data_buf     - state that must be regenerated, zap it
-    *   read_data_size    - state that must be regenerated, zap it
-    *   error_data_buf    - state that must be regenerated, zap it
-    *   error_data_size   - state that must be regenerated, zap it
-    *   close_write       - state that must be regenerated, zap it
-    *
-    * There is the problem that an exe that fell over and needs respawning
-    * might keep falling over, keep needing to be respawned, and tie up system
-    * resources with the constant respawning.  An exponentially increasing
-    * timeout (with maximum timeout) between respawns should take care of that.
-    * Although this is not a "contention for a resource" problem, the exe falling
-    * over may be, so a random element added to the timeout may help, and won't
-    * hurt.  The user code may need to be informed that a timeout is in progress.
-    */
+/* FIXME: Getting respawn to work
+ *
+ * There is no way that we can do anything about the internal state info of
+ * an external exe.  The same can be said about the state of user code.  User
+ * code in this context means the code that is using ecore_exe to manage exe's
+ * for it.
+ *
+ * Document that the exe must be respawnable, in other words, there is no
+ * state that it cannot regenerate by just killing it and starting it again.
+ * This includes state that the user code knows about, as the respawn is
+ * transparent to that code.  On the other hand, maybe a respawn event might
+ * be useful, or maybe resend the currently non existent add event.  For
+ * consistancy with ecore_con, an add event is good anyway.
+ *
+ * The Ecore_exe structure is reused for respawning, so that the (opaque)
+ * pointer held by the user remains valid.  This means that the Ecore_Exe
+ * init and del functions may need to be split into two parts each to avoid
+ * duplicating code - common code part, and the rest.  This implies that
+ * the unchanging members mentioned next should NEVER change.
+ *
+ * These structure members don't need to change -
+ *   __list_data       - we stay on the list
+ *   ECORE_MAGIC       - this is a constant
+ *   data              - passed in originally
+ *   cmd               - passed in originally
+ *   flags             - passed in originally
+ *
+ * These structure members need to change -
+ *   tag               - state that must be regenerated, zap it
+ *   pid               - it will be different
+ *   child_fd_write    - it will be different
+ *   child_fd_read     - it will be different
+ *   child_fd_error    - it will be different
+ *   write_fd_handler  - we cannot change the fd used by a handler, this changes coz the fd changes.
+ *   read_fd_handler   - we cannot change the fd used by a handler, this changes coz the fd changes.
+ *   error_fd_handler  - we cannot change the fd used by a handler, this changes coz the fd changes.
+ *
+ * Hmm, the read, write, and error buffers could be tricky.
+ * They are not atomic, and could be in a semi complete state.
+ * They fall into the "state must be regenerated" mentioned above.
+ * A respawn/add event should take care of it.
+ *
+ * These structure members need to change -
+ *   write_data_buf    - state that must be regenerated, zap it
+ *   write_data_size   - state that must be regenerated, zap it
+ *   write_data_offset - state that must be regenerated, zap it
+ *   read_data_buf     - state that must be regenerated, zap it
+ *   read_data_size    - state that must be regenerated, zap it
+ *   error_data_buf    - state that must be regenerated, zap it
+ *   error_data_size   - state that must be regenerated, zap it
+ *   close_write       - state that must be regenerated, zap it
+ *
+ * There is the problem that an exe that fell over and needs respawning
+ * might keep falling over, keep needing to be respawned, and tie up system
+ * resources with the constant respawning.  An exponentially increasing
+ * timeout (with maximum timeout) between respawns should take care of that.
+ * Although this is not a "contention for a resource" problem, the exe falling
+ * over may be, so a random element added to the timeout may help, and won't
+ * hurt.  The user code may need to be informed that a timeout is in progress.
+ */
 
 struct _Ecore_Exe
 {
    EINA_INLIST;
-   ECORE_MAGIC;
-   pid_t pid;
-   void *data;
-   char *tag, *cmd;
-   Ecore_Exe_Flags  flags;
+                     ECORE_MAGIC;
+   pid_t             pid;
+   void             *data;
+   char             *tag, *cmd;
+   Ecore_Exe_Flags   flags;
    Ecore_Fd_Handler *write_fd_handler; /* the fd_handler to handle write to child - if this was used, or NULL if not */
    Ecore_Fd_Handler *read_fd_handler; /* the fd_handler to handle read from child - if this was used, or NULL if not */
    Ecore_Fd_Handler *error_fd_handler; /* the fd_handler to handle errors from child - if this was used, or NULL if not */
-   void  *write_data_buf; /* a data buffer for data to write to the child -
-                                 * realloced as needed for more data and flushed when the fd handler says writes are possible
-                                 */
-   int write_data_size; /* the size in bytes of the data buffer */
-   int write_data_offset; /* the offset in bytes in the data buffer */
-   void *read_data_buf; /* data read from the child awating delivery to an event */
-   int read_data_size; /* data read from child in bytes */
-   void *error_data_buf; /* errors read from the child awating delivery to an event */
-   int error_data_size; /* errors read from child in bytes */
-   int child_fd_write; /* fd to write TO to send data to the child */
-   int child_fd_read; /* fd to read FROM when child has sent us (the parent) data */
-   int child_fd_error; /* fd to read FROM when child has sent us (the parent) errors */
-   int child_fd_write_x; /* fd to write TO to send data to the child */
-   int child_fd_read_x; /* fd to read FROM when child has sent us (the parent) data */
-   int child_fd_error_x; /* fd to read FROM when child has sent us (the parent) errors */
-   Eina_Bool close_stdin : 1;
-
-   int start_bytes, end_bytes, start_lines, end_lines; /* Number of bytes/lines to auto pipe at start/end of stdout/stderr. */
-
-   Ecore_Timer *doomsday_clock; /* The Timer of Death.  Muahahahaha. */
-   void *doomsday_clock_dead; /* data for the doomsday clock */
-
-   Ecore_Exe_Cb pre_free_cb;
+   void             *write_data_buf; /* a data buffer for data to write to the child -
+                                      * realloced as needed for more data and flushed when the fd handler says writes are possible
+                                      */
+   int               write_data_size; /* the size in bytes of the data buffer */
+   int               write_data_offset; /* the offset in bytes in the data buffer */
+   void             *read_data_buf; /* data read from the child awating delivery to an event */
+   int               read_data_size; /* data read from child in bytes */
+   void             *error_data_buf; /* errors read from the child awating delivery to an event */
+   int               error_data_size; /* errors read from child in bytes */
+   int               child_fd_write; /* fd to write TO to send data to the child */
+   int               child_fd_read; /* fd to read FROM when child has sent us (the parent) data */
+   int               child_fd_error; /* fd to read FROM when child has sent us (the parent) errors */
+   int               child_fd_write_x; /* fd to write TO to send data to the child */
+   int               child_fd_read_x; /* fd to read FROM when child has sent us (the parent) data */
+   int               child_fd_error_x; /* fd to read FROM when child has sent us (the parent) errors */
+   Eina_Bool         close_stdin : 1;
+
+   int               start_bytes, end_bytes, start_lines, end_lines; /* Number of bytes/lines to auto pipe at start/end of stdout/stderr. */
+
+   Ecore_Timer      *doomsday_clock; /* The Timer of Death.  Muahahahaha. */
+   void             *doomsday_clock_dead; /* data for the doomsday clock */
+
+   Ecore_Exe_Cb      pre_free_cb;
 };
 
-
 /* TODO: Something to let people build a command line and does auto escaping -
  *
  * ecore_exe_snprintf()
@@ -139,19 +141,27 @@ struct _ecore_exe_dead_exe
    char *cmd;
 };
 
-static inline void _ecore_exe_exec_it(const char *exe_cmd, Ecore_Exe_Flags flags);
-static Eina_Bool _ecore_exe_data_generic_handler(void *data, Ecore_Fd_Handler *fd_handler, Ecore_Exe_Flags flags);
-static Eina_Bool _ecore_exe_data_error_handler(void *data, Ecore_Fd_Handler *fd_handler);
-static Eina_Bool _ecore_exe_data_read_handler(void *data, Ecore_Fd_Handler *fd_handler);
-static Eina_Bool _ecore_exe_data_write_handler(void *data, Ecore_Fd_Handler *fd_handler);
-static void _ecore_exe_flush(Ecore_Exe * exe);
-static void _ecore_exe_event_exe_data_free(void *data __UNUSED__, void *ev);
-static Ecore_Exe *_ecore_exe_is_it_alive(pid_t pid);
-static Eina_Bool _ecore_exe_make_sure_its_dead(void *data);
-static Eina_Bool _ecore_exe_make_sure_its_really_dead(void *data);
+static inline void _ecore_exe_exec_it(const char     *exe_cmd,
+                                      Ecore_Exe_Flags flags);
+static Eina_Bool   _ecore_exe_data_generic_handler(void             *data,
+                                                   Ecore_Fd_Handler *fd_handler,
+                                                   Ecore_Exe_Flags   flags);
+static Eina_Bool            _ecore_exe_data_error_handler(void             *data,
+                                                          Ecore_Fd_Handler *fd_handler);
+static Eina_Bool            _ecore_exe_data_read_handler(void             *data,
+                                                         Ecore_Fd_Handler *fd_handler);
+static Eina_Bool            _ecore_exe_data_write_handler(void             *data,
+                                                          Ecore_Fd_Handler *fd_handler);
+static void                 _ecore_exe_flush(Ecore_Exe *exe);
+static void                 _ecore_exe_event_exe_data_free(void *data __UNUSED__,
+                                                           void *ev);
+static Ecore_Exe           *_ecore_exe_is_it_alive(pid_t pid);
+static Eina_Bool            _ecore_exe_make_sure_its_dead(void *data);
+static Eina_Bool            _ecore_exe_make_sure_its_really_dead(void *data);
 static Ecore_Exe_Event_Add *_ecore_exe_event_add_new(void);
-static void _ecore_exe_event_add_free(void *data, void *ev);
-static void _ecore_exe_dead_attach(Ecore_Exe *exe);
+static void                 _ecore_exe_event_add_free(void *data,
+                                                      void *ev);
+static void                 _ecore_exe_dead_attach(Ecore_Exe *exe);
 
 EAPI int ECORE_EXE_EVENT_ADD = 0;
 EAPI int ECORE_EXE_EVENT_DEL = 0;
@@ -164,26 +174,30 @@ static const char *shell = NULL;
 /* FIXME: This errno checking stuff should be put elsewhere for everybody to use.
  * For now it lives here though, just to make testing easier.
  */
-static int _ecore_exe_check_errno(int result, const char *file, int line);
+static int _ecore_exe_check_errno(int         result,
+                                  const char *file,
+                                  int         line);
 
-#define E_IF_NO_ERRNO(result, foo, ok) \
-  while (((ok) = _ecore_exe_check_errno( (result) = (foo), __FILE__, __LINE__)) == -1)   sleep(1); \
-  if (ok)
+#define E_IF_NO_ERRNO(result, foo, ok)                                                           \
+  while (((ok) = _ecore_exe_check_errno((result) = (foo), __FILE__, __LINE__)) == -1) sleep(1);  \
+          if (ok)
 
 #define E_NO_ERRNO(result, foo, ok) \
-  while (((ok) = _ecore_exe_check_errno( (result) = (foo), __FILE__, __LINE__)) == -1)   sleep(1)
+  while (((ok) = _ecore_exe_check_errno((result) = (foo), __FILE__, __LINE__)) == -1) sleep(1)
 
 #define E_IF_NO_ERRNO_NOLOOP(result, foo, ok) \
-  if (((ok) = _ecore_exe_check_errno( (result) = (foo), __FILE__, __LINE__)))
+  if (((ok) = _ecore_exe_check_errno((result) = (foo), __FILE__, __LINE__)))
 
 static int
-_ecore_exe_check_errno(int result, const char *file, int line)
+_ecore_exe_check_errno(int         result,
+                       const char *file,
+                       int         line)
 {
    int saved_errno = errno;
 
    if (result == -1)
-     {
-        perror("*** errno reports ");
+   {
+      perror("*** errno reports ");
 /* What is currently supported -
  *
  *   pipe
@@ -239,59 +253,63 @@ _ecore_exe_check_errno(int result, const char *file, int line)
  *        // Something failed, cleanup.
  *     }
  */
-        switch (saved_errno)
-          {
-           case EACCES:
-           case EAGAIN:
-           case EINTR:
-               { /* Not now, try later. */
-                  ERR("*** Must try again in %s @%u.", file, line);
-                  result = -1;
-                  break;
-               }
-           case EMFILE:
-           case ENFILE:
-           case ENOLCK:
-               { /* Low on resources. */
-                  ERR("*** Low on resources in %s @%u.", file,
-                      line);
-                  result = 0;
-                  break;
-               }
-           case EIO:
-               { /* I/O error. */
-                  ERR("*** I/O error in %s @%u.", file, line);
-                  result = 0;
-                  break;
-               }
-           case EFAULT:
-           case EBADF:
-           case EINVAL:
-           case EROFS:
-           case EISDIR:
-           case EDEADLK:
-           case EPERM:
-           case EBUSY:
-               { /* Programmer fucked up. */
-                  ERR("*** NAUGHTY PROGRAMMER!!!\n"
-                      "*** SPANK SPANK SPANK!!!\n"
-                      "*** Now go fix your code in %s @%u. Tut tut tut!",
-                      file, line);
-                  result = 0;
-                  break;
-               }
-           default:
-               { /* Unsupported errno code, please add this one. */
-                  ERR("*** NAUGHTY PROGRAMMER!!!\n"
-                      "*** SPANK SPANK SPANK!!!\n"
-                      "*** Unsupported errno code %d, please add this one.\n"
-                      "*** Now go fix your code in %s @%u, from %s @%u. Tut tut tut!",
-                      saved_errno, __FILE__, __LINE__, file, line);
-                  result = 0;
-                  break;
-               }
-          }
-     }
+      switch (saved_errno)
+      {
+       case EACCES:
+       case EAGAIN:
+       case EINTR:
+         { /* Not now, try later. */
+            ERR("*** Must try again in %s @%u.", file, line);
+            result = -1;
+            break;
+         }
+
+       case EMFILE:
+       case ENFILE:
+       case ENOLCK:
+         { /* Low on resources. */
+            ERR("*** Low on resources in %s @%u.", file,
+                line);
+            result = 0;
+            break;
+         }
+
+       case EIO:
+         { /* I/O error. */
+            ERR("*** I/O error in %s @%u.", file, line);
+            result = 0;
+            break;
+         }
+
+       case EFAULT:
+       case EBADF:
+       case EINVAL:
+       case EROFS:
+       case EISDIR:
+       case EDEADLK:
+       case EPERM:
+       case EBUSY:
+         { /* Programmer fucked up. */
+            ERR("*** NAUGHTY PROGRAMMER!!!\n"
+                "*** SPANK SPANK SPANK!!!\n"
+                "*** Now go fix your code in %s @%u. Tut tut tut!",
+                file, line);
+            result = 0;
+            break;
+         }
+
+       default:
+         { /* Unsupported errno code, please add this one. */
+            ERR("*** NAUGHTY PROGRAMMER!!!\n"
+                "*** SPANK SPANK SPANK!!!\n"
+                "*** Unsupported errno code %d, please add this one.\n"
+                "*** Now go fix your code in %s @%u, from %s @%u. Tut tut tut!",
+                saved_errno, __FILE__, __LINE__, file, line);
+            result = 0;
+            break;
+         }
+      }
+   }
    else /* Everything is fine. */
      result = 1;
 
@@ -354,7 +372,8 @@ ecore_exe_run_priority_get(void)
  * @return  A process handle to the spawned process.
  */
 EAPI Ecore_Exe *
-ecore_exe_run(const char *exe_cmd, const void *data)
+ecore_exe_run(const char *exe_cmd,
+              const void *data)
 {
    return ecore_exe_pipe_run(exe_cmd, 0, data);
 }
@@ -385,7 +404,9 @@ ecore_exe_run(const char *exe_cmd, const void *data)
  * @return  A process handle to the spawned process.
  */
 EAPI Ecore_Exe *
-ecore_exe_pipe_run(const char *exe_cmd, Ecore_Exe_Flags flags, const void *data)
+ecore_exe_pipe_run(const char     *exe_cmd,
+                   Ecore_Exe_Flags flags,
+                   const void     *data)
 {
    Ecore_Exe *exe = NULL;
    int statusPipe[2] = { -1, -1 };
@@ -414,249 +435,258 @@ ecore_exe_pipe_run(const char *exe_cmd, Ecore_Exe_Flags flags, const void *data)
 
    /*  Create some pipes. */
    if (ok)
-     {
-        E_IF_NO_ERRNO_NOLOOP(result, pipe(statusPipe), ok)
-          {
-          }
-     }
+   {
+      E_IF_NO_ERRNO_NOLOOP(result, pipe(statusPipe), ok)
+      {
+      }
+   }
    if (ok && (flags & ECORE_EXE_PIPE_ERROR))
-     {
-        E_IF_NO_ERRNO_NOLOOP(result, pipe(errorPipe), ok)
-          {
-             exe->child_fd_error = errorPipe[0];
-             exe->child_fd_error_x = errorPipe[1];
-          }
-     }
+   {
+      E_IF_NO_ERRNO_NOLOOP(result, pipe(errorPipe), ok)
+      {
+         exe->child_fd_error = errorPipe[0];
+         exe->child_fd_error_x = errorPipe[1];
+      }
+   }
    if (ok && (flags & ECORE_EXE_PIPE_READ))
-     {
-        E_IF_NO_ERRNO_NOLOOP(result, pipe(readPipe), ok)
-          {
-             exe->child_fd_read = readPipe[0];
-             exe->child_fd_read_x = readPipe[1];
-          }
-     }
+   {
+      E_IF_NO_ERRNO_NOLOOP(result, pipe(readPipe), ok)
+      {
+         exe->child_fd_read = readPipe[0];
+         exe->child_fd_read_x = readPipe[1];
+      }
+   }
    if (ok && (flags & ECORE_EXE_PIPE_WRITE))
-     {
-        E_IF_NO_ERRNO_NOLOOP(result, pipe(writePipe), ok)
-          {
-             exe->child_fd_write = writePipe[1];
-             exe->child_fd_write_x = writePipe[0];
-          }
-     }
+   {
+      E_IF_NO_ERRNO_NOLOOP(result, pipe(writePipe), ok)
+      {
+         exe->child_fd_write = writePipe[1];
+         exe->child_fd_write_x = writePipe[0];
+      }
+   }
    if (ok)
-     {
-        pid_t pid = 0;
-        volatile int vfork_exec_errno = 0;
-
-        /* FIXME: I should double check this.  After a quick look around, this is already done, but via a more modern method. */
-        /* signal(SIGPIPE, SIG_IGN);    We only want EPIPE on errors */
-        pid = fork();
-
-        if (pid == -1)
-          {
-             ERR("Failed to fork process");
-             pid = 0;
-          }
-        else if (pid == 0)        /* child */
-          {
-             if (run_pri != ECORE_EXE_PRIORITY_INHERIT)
-               {
-                  if ((run_pri >= -20) && (run_pri <= 19))
-                    setpriority(PRIO_PROCESS, 0, run_pri);
-               }
-             /* dup2 STDERR, STDIN, and STDOUT.  dup2() allegedly closes the
-              * second pipe if it's open. On the other hand, there was the
-              * Great FD Leak Scare of '06, so let's be paranoid. */
-             if (ok && (flags & ECORE_EXE_PIPE_ERROR))
-               {
-                  E_NO_ERRNO(result, close(STDERR_FILENO), ok);
-                  E_NO_ERRNO(result, dup2(errorPipe[1], STDERR_FILENO), ok);
-               }
-             if (ok && (flags & ECORE_EXE_PIPE_READ))
-               {
-                  E_NO_ERRNO(result, close(STDOUT_FILENO), ok);
-                  E_NO_ERRNO(result, dup2(readPipe[1], STDOUT_FILENO), ok);
-               }
-             if (ok && (flags & ECORE_EXE_PIPE_WRITE))
-               {
-                  E_NO_ERRNO(result, close(STDIN_FILENO), ok);
-                  E_NO_ERRNO(result, dup2(writePipe[0], STDIN_FILENO), ok);
-               }
-
-             if (ok)
-               {
-                  /* Setup the status pipe. */
-                  E_NO_ERRNO(result, close(statusPipe[0]), ok);
-                  E_IF_NO_ERRNO(result, fcntl(statusPipe[1], F_SETFD, FD_CLOEXEC), ok)        /* close on exec shows success */
-                    {
-                       /* Run the actual command. */
-                       _ecore_exe_exec_it(exe_cmd, flags); /* no return */
-                    }
-               }
-
-             /* Something went 'orribly wrong. */
-             vfork_exec_errno = errno;
-
-             /* Close the pipes. */
-             if (flags & ECORE_EXE_PIPE_ERROR)
-               E_NO_ERRNO(result, close(errorPipe[1]), ok);
-             if (flags & ECORE_EXE_PIPE_READ)
-               E_NO_ERRNO(result, close(readPipe[1]), ok);
-             if (flags & ECORE_EXE_PIPE_WRITE)
-               E_NO_ERRNO(result, close(writePipe[0]), ok);
-             E_NO_ERRNO(result, close(statusPipe[1]), ok);
-
-             _exit(-1);
-          }
-        else /* parent */
-          {
-             /* Close the unused pipes. */
-             E_NO_ERRNO(result, close(statusPipe[1]), ok);
-
-             /* FIXME: after having a good look at the current e fd
-              * handling, investigate fcntl(dataPipe[x], F_SETSIG, ...) */
-             /* FIXME: above F_SETSIG etc. - this is async SIGIO based IO
-              * which is also linux specific so we probably don't want to
-              * do this as long as select() is working fine. the only time
-              * we really want to think of SIGIO async IO is when it all
-              * actually works basically everywhere and we can turn all
-              * IO into DMA async activities (i.e. you do a read() then
-              * the read is complete not on return but when you get a
-              * SIGIO - the read() just starts the transfer and it is
-              * completed in the background by DMA (or whatever mechanism
-              * the kernel choses)) */
-
-             /* Wait for it to start executing. */
-             /* FIXME: this doesn't seem very nice - we sit and block
-              * waiting on a child process... even though it's just
-              * the segment between the fork() and the exec) it just feels
-              * wrong */
-             for (;;)
-               {
-                  char buf;
-
-                  E_NO_ERRNO(result, read(statusPipe[0], &buf, 1), ok);
-                  if (result == 0)
-                    {
-                       if (vfork_exec_errno != 0)
-                         {
-                            n = vfork_exec_errno;
-                            ERR("Could not start \"%s\"", exe_cmd);
-                            pid = 0;
-                         }
-                       break;
-                    }
-               }
-
-             /* Close the status pipe. */
+   {
+      pid_t pid = 0;
+      volatile int vfork_exec_errno = 0;
+
+      /* FIXME: I should double check this.  After a quick look around, this is already done, but via a more modern method. */
+      /* signal(SIGPIPE, SIG_IGN);    We only want EPIPE on errors */
+      pid = fork();
+
+      if (pid == -1)
+      {
+         ERR("Failed to fork process");
+         pid = 0;
+      }
+      else if (pid == 0) /* child */
+      {
+         if (run_pri != ECORE_EXE_PRIORITY_INHERIT)
+         {
+            if ((run_pri >= -20) && (run_pri <= 19))
+              setpriority(PRIO_PROCESS, 0, run_pri);
+         }
+         /* dup2 STDERR, STDIN, and STDOUT.  dup2() allegedly closes the
+          * second pipe if it's open. On the other hand, there was the
+          * Great FD Leak Scare of '06, so let's be paranoid. */
+         if (ok && (flags & ECORE_EXE_PIPE_ERROR))
+         {
+            E_NO_ERRNO(result, close(STDERR_FILENO), ok);
+            E_NO_ERRNO(result, dup2(errorPipe[1], STDERR_FILENO), ok);
+         }
+         if (ok && (flags & ECORE_EXE_PIPE_READ))
+         {
+            E_NO_ERRNO(result, close(STDOUT_FILENO), ok);
+            E_NO_ERRNO(result, dup2(readPipe[1], STDOUT_FILENO), ok);
+         }
+         if (ok && (flags & ECORE_EXE_PIPE_WRITE))
+         {
+            E_NO_ERRNO(result, close(STDIN_FILENO), ok);
+            E_NO_ERRNO(result, dup2(writePipe[0], STDIN_FILENO), ok);
+         }
+
+         if (ok)
+         {
+            /* Setup the status pipe. */
              E_NO_ERRNO(result, close(statusPipe[0]), ok);
+             E_IF_NO_ERRNO(result, fcntl(statusPipe[1], F_SETFD, FD_CLOEXEC), ok) /* close on exec shows success */
+             {
+                /* Run the actual command. */
+                 _ecore_exe_exec_it(exe_cmd, flags); /* no return */
+             }
+         }
+
+         /* Something went 'orribly wrong. */
+         vfork_exec_errno = errno;
+
+         /* Close the pipes. */
+         if (flags & ECORE_EXE_PIPE_ERROR)
+           E_NO_ERRNO(result, close(errorPipe[1]), ok);
+         if (flags & ECORE_EXE_PIPE_READ)
+           E_NO_ERRNO(result, close(readPipe[1]), ok);
+         if (flags & ECORE_EXE_PIPE_WRITE)
+           E_NO_ERRNO(result, close(writePipe[0]), ok);
+         E_NO_ERRNO(result, close(statusPipe[1]), ok);
+
+         _exit(-1);
+      }
+      else   /* parent */
+      {
+         /* Close the unused pipes. */
+          E_NO_ERRNO(result, close(statusPipe[1]), ok);
+
+          /* FIXME: after having a good look at the current e fd
+           * handling, investigate fcntl(dataPipe[x], F_SETSIG, ...) */
+          /* FIXME: above F_SETSIG etc. - this is async SIGIO based IO
+           * which is also linux specific so we probably don't want to
+           * do this as long as select() is working fine. the only time
+           * we really want to think of SIGIO async IO is when it all
+           * actually works basically everywhere and we can turn all
+           * IO into DMA async activities (i.e. you do a read() then
+           * the read is complete not on return but when you get a
+           * SIGIO - the read() just starts the transfer and it is
+           * completed in the background by DMA (or whatever mechanism
+           * the kernel choses)) */
+
+          /* Wait for it to start executing. */
+          /* FIXME: this doesn't seem very nice - we sit and block
+           * waiting on a child process... even though it's just
+           * the segment between the fork() and the exec) it just feels
+           * wrong */
+          for (;; )
+          {
+             char buf;
+
+             E_NO_ERRNO(result, read(statusPipe[0], &buf, 1), ok);
+             if (result == 0)
+             {
+                if (vfork_exec_errno != 0)
+                {
+                   n = vfork_exec_errno;
+                   ERR("Could not start \"%s\"", exe_cmd);
+                   pid = 0;
+                }
+                break;
+             }
           }
 
-        if (pid)
+          /* Close the status pipe. */
+          E_NO_ERRNO(result, close(statusPipe[0]), ok);
+      }
+
+      if (pid)
+      {
+         /* Setup the exe structure. */
+          ECORE_MAGIC_SET(exe, ECORE_MAGIC_EXE);
+          exe->start_bytes = -1;
+          exe->end_bytes = -1;
+          exe->start_lines = -1;
+          exe->end_lines = -1;
+          exe->pid = pid;
+          exe->flags = flags;
+          exe->data = (void *)data;
+          if ((exe->cmd = strdup(exe_cmd)))
           {
-             /* Setup the exe structure. */
-             ECORE_MAGIC_SET(exe, ECORE_MAGIC_EXE);
-             exe->start_bytes = -1;
-             exe->end_bytes = -1;
-             exe->start_lines = -1;
-             exe->end_lines = -1;
-             exe->pid = pid;
-             exe->flags = flags;
-             exe->data = (void *)data;
-             if ((exe->cmd = strdup(exe_cmd)))
-               {
-                  if (flags & ECORE_EXE_PIPE_ERROR)
-                    { /* Setup the error stuff. */
-                       E_IF_NO_ERRNO(result,
-                                     fcntl(exe->child_fd_error, F_SETFL,
-                                           O_NONBLOCK), ok) {}
-                       E_IF_NO_ERRNO(result,
-                                     fcntl(exe->child_fd_error, F_SETFD,
-                                           FD_CLOEXEC), ok) {}
-                       E_IF_NO_ERRNO(result,
-                                     fcntl(exe->child_fd_error_x, F_SETFD,
-                                           FD_CLOEXEC), ok) {}
-                       {
-                          exe->error_fd_handler =
-                             ecore_main_fd_handler_add(exe->child_fd_error,
-                                                       ECORE_FD_READ,
-                                                       _ecore_exe_data_error_handler,
-                                                       exe, NULL, NULL);
-                          if (!exe->error_fd_handler)
-                             ok = 0;
-                       }
-                    }
-                  if (ok && (flags & ECORE_EXE_PIPE_READ))
-                    { /* Setup the read stuff. */
-                       E_IF_NO_ERRNO(result,
-                                     fcntl(exe->child_fd_read, F_SETFL,
-                                           O_NONBLOCK), ok) {}
-                       E_IF_NO_ERRNO(result,
-                                     fcntl(exe->child_fd_read, F_SETFD,
-                                           FD_CLOEXEC), ok) {}
-                       E_IF_NO_ERRNO(result,
-                                     fcntl(exe->child_fd_read_x, F_SETFD,
-                                           FD_CLOEXEC), ok) {}
-                       {
-                          exe->read_fd_handler =
-                             ecore_main_fd_handler_add(exe->child_fd_read,
-                                                       ECORE_FD_READ,
-                                                       _ecore_exe_data_read_handler,
-                                                       exe, NULL, NULL);
-                          if (!exe->read_fd_handler)
-                             ok = 0;
-                       }
-                    }
-                  if (ok && (flags & ECORE_EXE_PIPE_WRITE))
-                    {                /* Setup the write stuff. */
-                       E_IF_NO_ERRNO(result,
-                                     fcntl(exe->child_fd_write, F_SETFL,
-                                           O_NONBLOCK), ok) {}
-                       E_IF_NO_ERRNO(result,
-                                     fcntl(exe->child_fd_write, F_SETFD,
-                                           FD_CLOEXEC), ok) {}
-                       E_IF_NO_ERRNO(result,
-                                     fcntl(exe->child_fd_write_x, F_SETFD,
-                                           FD_CLOEXEC), ok) {}
-                       {
-                          exe->write_fd_handler =
-                             ecore_main_fd_handler_add(exe->child_fd_write,
-                                                       ECORE_FD_WRITE,
-                                                       _ecore_exe_data_write_handler,
-                                                       exe, NULL, NULL);
-                          if (exe->write_fd_handler)
-                             ecore_main_fd_handler_active_set(exe->write_fd_handler, 0);        /* Nothing to write to start with. */
-                          else
-                             ok = 0;
-                       }
-                    }
-
-                  exes = (Ecore_Exe *) eina_inlist_append(EINA_INLIST_GET(exes), EINA_INLIST_GET(exe));
-                  n = 0;
-               }
-             else
-               ok = 0;
+             if (flags & ECORE_EXE_PIPE_ERROR) /* Setup the error stuff. */
+             {
+                E_IF_NO_ERRNO(result,
+                              fcntl(exe->child_fd_error, F_SETFL,
+                                    O_NONBLOCK), ok) {
+                }
+                E_IF_NO_ERRNO(result,
+                              fcntl(exe->child_fd_error, F_SETFD,
+                                    FD_CLOEXEC), ok) {
+                }
+                E_IF_NO_ERRNO(result,
+                              fcntl(exe->child_fd_error_x, F_SETFD,
+                                    FD_CLOEXEC), ok) {
+                }
+                {
+                   exe->error_fd_handler =
+                     ecore_main_fd_handler_add(exe->child_fd_error,
+                                               ECORE_FD_READ,
+                                               _ecore_exe_data_error_handler,
+                                               exe, NULL, NULL);
+                   if (!exe->error_fd_handler)
+                     ok = 0;
+                }
+             }
+             if (ok && (flags & ECORE_EXE_PIPE_READ)) /* Setup the read stuff. */
+             {
+                E_IF_NO_ERRNO(result,
+                              fcntl(exe->child_fd_read, F_SETFL,
+                                    O_NONBLOCK), ok) {
+                }
+                E_IF_NO_ERRNO(result,
+                              fcntl(exe->child_fd_read, F_SETFD,
+                                    FD_CLOEXEC), ok) {
+                }
+                E_IF_NO_ERRNO(result,
+                              fcntl(exe->child_fd_read_x, F_SETFD,
+                                    FD_CLOEXEC), ok) {
+                }
+                {
+                   exe->read_fd_handler =
+                     ecore_main_fd_handler_add(exe->child_fd_read,
+                                               ECORE_FD_READ,
+                                               _ecore_exe_data_read_handler,
+                                               exe, NULL, NULL);
+                   if (!exe->read_fd_handler)
+                     ok = 0;
+                }
+             }
+             if (ok && (flags & ECORE_EXE_PIPE_WRITE)) /* Setup the write stuff. */
+             {
+                E_IF_NO_ERRNO(result,
+                              fcntl(exe->child_fd_write, F_SETFL,
+                                    O_NONBLOCK), ok) {
+                }
+                E_IF_NO_ERRNO(result,
+                              fcntl(exe->child_fd_write, F_SETFD,
+                                    FD_CLOEXEC), ok) {
+                }
+                E_IF_NO_ERRNO(result,
+                              fcntl(exe->child_fd_write_x, F_SETFD,
+                                    FD_CLOEXEC), ok) {
+                }
+                {
+                   exe->write_fd_handler =
+                     ecore_main_fd_handler_add(exe->child_fd_write,
+                                               ECORE_FD_WRITE,
+                                               _ecore_exe_data_write_handler,
+                                               exe, NULL, NULL);
+                   if (exe->write_fd_handler)
+                     ecore_main_fd_handler_active_set(exe->write_fd_handler, 0);  /* Nothing to write to start with. */
+                   else
+                     ok = 0;
+                }
+             }
+
+             exes = (Ecore_Exe *)eina_inlist_append(EINA_INLIST_GET(exes), EINA_INLIST_GET(exe));
+             n = 0;
           }
-        else
-          ok = 0;
-     }
-
-   if (!ok)
-     { /* Something went wrong, so pull down everything. */
-        if (exe->pid) ecore_exe_terminate(exe);
-        IF_FN_DEL(ecore_exe_free, exe);
-     }
+          else
+            ok = 0;
+      }
+      else
+        ok = 0;
+   }
+
+   if (!ok) /* Something went wrong, so pull down everything. */
+   {
+      if (exe->pid) ecore_exe_terminate(exe);
+      IF_FN_DEL(ecore_exe_free, exe);
+   }
    else
-     {
-        Ecore_Exe_Event_Add *e;
+   {
+      Ecore_Exe_Event_Add *e;
 
-        e = _ecore_exe_event_add_new();
-        e->exe = exe;
-        if (e) /* Send the event. */
-          ecore_event_add(ECORE_EXE_EVENT_ADD, e,
-                          _ecore_exe_event_add_free, NULL);
-        /* INF("Running as %d for %s.\n", exe->pid, exe->cmd); */
-     }
+      e = _ecore_exe_event_add_new();
+      e->exe = exe;
+      if (e) /* Send the event. */
+        ecore_event_add(ECORE_EXE_EVENT_ADD, e,
+                        _ecore_exe_event_add_free, NULL);
+      /* INF("Running as %d for %s.\n", exe->pid, exe->cmd); */
+   }
 
    errno = n;
    return exe;
@@ -676,14 +706,15 @@ ecore_exe_pipe_run(const char *exe_cmd, Ecore_Exe_Flags flags, const void *data)
  * @param func The function to call before @a exe is freed.
  */
 EAPI void
-ecore_exe_callback_pre_free_set(Ecore_Exe *exe, Ecore_Exe_Cb func)
+ecore_exe_callback_pre_free_set(Ecore_Exe   *exe,
+                                Ecore_Exe_Cb func)
 {
    if (!ECORE_MAGIC_CHECK(exe, ECORE_MAGIC_EXE))
-     {
-        ECORE_MAGIC_FAIL(exe, ECORE_MAGIC_EXE,
-                         "ecore_exe_callback_pre_free_set");
-        return;
-     }
+   {
+      ECORE_MAGIC_FAIL(exe, ECORE_MAGIC_EXE,
+                       "ecore_exe_callback_pre_free_set");
+      return;
+   }
    exe->pre_free_cb = func;
 }
 
@@ -700,29 +731,31 @@ ecore_exe_callback_pre_free_set(Ecore_Exe *exe, Ecore_Exe_Cb func)
  * @return EINA_TRUE if successful, EINA_FALSE on failure.
  */
 EAPI Eina_Bool
-ecore_exe_send(Ecore_Exe * exe, const void *data, int size)
+ecore_exe_send(Ecore_Exe  *exe,
+               const void *data,
+               int         size)
 {
    void *buf;
 
    if (!ECORE_MAGIC_CHECK(exe, ECORE_MAGIC_EXE))
-     {
-        ECORE_MAGIC_FAIL(exe, ECORE_MAGIC_EXE, "ecore_exe_send");
-        return EINA_FALSE;
-     }
+   {
+      ECORE_MAGIC_FAIL(exe, ECORE_MAGIC_EXE, "ecore_exe_send");
+      return EINA_FALSE;
+   }
 
    if (exe->close_stdin)
-     {
-        ERR("Ecore_Exe %p stdin is closed! Cannot send %d bytes from %p",
-            exe, size, data);
-        return EINA_FALSE;
-     }
+   {
+      ERR("Ecore_Exe %p stdin is closed! Cannot send %d bytes from %p",
+          exe, size, data);
+      return EINA_FALSE;
+   }
 
    if (exe->child_fd_write == -1)
-     {
-        ERR("Ecore_Exe %p created without ECORE_EXE_PIPE_WRITE! "
-            "Cannot send %d bytes from %p", exe, size, data);
-        return EINA_FALSE;
-     }
+   {
+      ERR("Ecore_Exe %p created without ECORE_EXE_PIPE_WRITE! "
+          "Cannot send %d bytes from %p", exe, size, data);
+      return EINA_FALSE;
+   }
 
    buf = realloc(exe->write_data_buf, exe->write_data_size + size);
    if (!buf) return EINA_FALSE;
@@ -732,7 +765,7 @@ ecore_exe_send(Ecore_Exe * exe, const void *data, int size)
    exe->write_data_size += size;
 
    if (exe->write_fd_handler)
-      ecore_main_fd_handler_active_set(exe->write_fd_handler, ECORE_FD_WRITE);
+     ecore_main_fd_handler_active_set(exe->write_fd_handler, ECORE_FD_WRITE);
 
    return EINA_TRUE;
 }
@@ -746,10 +779,10 @@ EAPI void
 ecore_exe_close_stdin(Ecore_Exe *exe)
 {
    if (!ECORE_MAGIC_CHECK(exe, ECORE_MAGIC_EXE))
-     {
-        ECORE_MAGIC_FAIL(exe, ECORE_MAGIC_EXE, "ecore_exe_close_stdin");
-        return;
-     }
+   {
+      ECORE_MAGIC_FAIL(exe, ECORE_MAGIC_EXE, "ecore_exe_close_stdin");
+      return;
+   }
    exe->close_stdin = 1;
 }
 
@@ -764,13 +797,17 @@ ecore_exe_close_stdin(Ecore_Exe *exe)
  * @param   end_lines limit of lines at end of output to buffer.
  */
 EAPI void
-ecore_exe_auto_limits_set(Ecore_Exe *exe, int start_bytes, int end_bytes, int start_lines, int end_lines)
+ecore_exe_auto_limits_set(Ecore_Exe *exe,
+                          int        start_bytes,
+                          int        end_bytes,
+                          int        start_lines,
+                          int        end_lines)
 {
    if (!ECORE_MAGIC_CHECK(exe, ECORE_MAGIC_EXE))
-     {
-        ECORE_MAGIC_FAIL(exe, ECORE_MAGIC_EXE, "ecore_exe_auto_limits_set");
-        return;
-     }
+   {
+      ECORE_MAGIC_FAIL(exe, ECORE_MAGIC_EXE, "ecore_exe_auto_limits_set");
+      return;
+   }
    /* FIXME: sanitize the input. */
    exe->start_bytes = start_bytes;
    exe->end_bytes = end_bytes;
@@ -824,7 +861,8 @@ ecore_exe_auto_limits_set(Ecore_Exe *exe, int start_bytes, int end_bytes, int st
  * @param   flags   Is this a ECORE_EXE_PIPE_READ or ECORE_EXE_PIPE_ERROR?
  */
 EAPI Ecore_Exe_Event_Data *
-ecore_exe_event_data_get(Ecore_Exe *exe, Ecore_Exe_Flags flags)
+ecore_exe_event_data_get(Ecore_Exe      *exe,
+                         Ecore_Exe_Flags flags)
 {
    Ecore_Exe_Event_Data *e = NULL;
    int is_buffered = 0;
@@ -832,117 +870,117 @@ ecore_exe_event_data_get(Ecore_Exe *exe, Ecore_Exe_Flags flags)
    int inbuf_num;
 
    if (!ECORE_MAGIC_CHECK(exe, ECORE_MAGIC_EXE))
-     {
-        ECORE_MAGIC_FAIL(exe, ECORE_MAGIC_EXE, "ecore_exe_event_data_get");
-        return NULL;
-     }
+   {
+      ECORE_MAGIC_FAIL(exe, ECORE_MAGIC_EXE, "ecore_exe_event_data_get");
+      return NULL;
+   }
 
    /* Sort out what sort of event we are. */
    if (flags & ECORE_EXE_PIPE_READ)
-     {
-        flags = ECORE_EXE_PIPE_READ;
-        if (exe->flags & ECORE_EXE_PIPE_READ_LINE_BUFFERED)
-           is_buffered = 1;
-     }
+   {
+      flags = ECORE_EXE_PIPE_READ;
+      if (exe->flags & ECORE_EXE_PIPE_READ_LINE_BUFFERED)
+        is_buffered = 1;
+   }
    else
-     {
-        flags = ECORE_EXE_PIPE_ERROR;
-        if (exe->flags & ECORE_EXE_PIPE_ERROR_LINE_BUFFERED)
-           is_buffered = 1;
-     }
+   {
+      flags = ECORE_EXE_PIPE_ERROR;
+      if (exe->flags & ECORE_EXE_PIPE_ERROR_LINE_BUFFERED)
+        is_buffered = 1;
+   }
 
    /* Get the data. */
    if (flags & ECORE_EXE_PIPE_READ)
-     {
-        inbuf = exe->read_data_buf;
-        inbuf_num = exe->read_data_size;
-        exe->read_data_buf = NULL;
-        exe->read_data_size = 0;
-     }
+   {
+      inbuf = exe->read_data_buf;
+      inbuf_num = exe->read_data_size;
+      exe->read_data_buf = NULL;
+      exe->read_data_size = 0;
+   }
    else
-     {
-        inbuf = exe->error_data_buf;
-        inbuf_num = exe->error_data_size;
-        exe->error_data_buf = NULL;
-        exe->error_data_size = 0;
-     }
+   {
+      inbuf = exe->error_data_buf;
+      inbuf_num = exe->error_data_size;
+      exe->error_data_buf = NULL;
+      exe->error_data_size = 0;
+   }
 
    e = calloc(1, sizeof(Ecore_Exe_Event_Data));
    if (e)
-     {
-        e->exe = exe;
-        e->data = inbuf;
-        e->size = inbuf_num;
-
-        if (is_buffered)
-          {                        /* Deal with line buffering. */
-             int max = 0;
-             int count = 0;
-             int i;
-             int last = 0;
-             char *c;
-
-             c = (char *)inbuf;
-             for (i = 0; i < inbuf_num; i++)        /* Find the lines. */
+   {
+      e->exe = exe;
+      e->data = inbuf;
+      e->size = inbuf_num;
+
+      if (is_buffered) /* Deal with line buffering. */
+      {
+         int max = 0;
+         int count = 0;
+         int i;
+         int last = 0;
+         char *c;
+
+         c = (char *)inbuf;
+         for (i = 0; i < inbuf_num; i++) /* Find the lines. */
+         {
+            if (inbuf[i] == '\n')
+            {
+               if (count >= max)
                {
-                  if (inbuf[i] == '\n')
-                    {
-                       if (count >= max)
-                         {
-                            /* In testing, the lines seem to arrive in batches of 500 to 1000 lines at most, roughly speaking. */
-                            max += 10;        /* FIXME: Maybe keep track of the largest number of lines ever sent, and add half that many instead of 10. */
-                            e->lines = realloc(e->lines, sizeof(Ecore_Exe_Event_Data_Line) * (max + 1));        /* Allow room for the NULL termination. */
-                         }
-                       /* raster said to leave the line endings as line endings, however -
-                        * This is line buffered mode, we are not dealing with binary here, but lines.
-                        * If we are not dealing with binary, we must be dealing with ASCII, unicode, or some other text format.
-                        * Thus the user is most likely gonna deal with this text as strings.
-                        * Thus the user is most likely gonna pass this data to str functions.
-                        * rasters way - the endings are always gonna be '\n';  onefangs way - they will always be '\0'
-                        * We are handing them the string length as a convenience.
-                        * Thus if they really want it in raw format, they can e->lines[i].line[e->lines[i].size - 1] = '\n'; easily enough.
-                        * In the default case, we can do this conversion quicker than the user can, as we already have the index and pointer.
-                        * Let's make it easy on them to use these as standard C strings.
-                        *
-                        * onefang is proud to announce that he has just set a new personal record for the
-                        * most over documentation of a simple assignment statement.  B-)
-                        */
-                       inbuf[i] = '\0';
-                       e->lines[count].line = c;
-                       e->lines[count].size = i - last;
-                       last = i + 1;
-                       c = (char *)&inbuf[last];
-                       count++;
-                    }
+                  /* In testing, the lines seem to arrive in batches of 500 to 1000 lines at most, roughly speaking. */
+                   max += 10; /* FIXME: Maybe keep track of the largest number of lines ever sent, and add half that many instead of 10. */
+                   e->lines = realloc(e->lines, sizeof(Ecore_Exe_Event_Data_Line) * (max + 1)); /* Allow room for the NULL termination. */
                }
-             if (i > last)        /* Partial line left over, save it for next time. */
-               {
-                  if (count != 0) e->size = last;
-                  if (flags & ECORE_EXE_PIPE_READ)
-                    {
-                       exe->read_data_size = i - last;
-                       exe->read_data_buf = malloc(exe->read_data_size);
-                       memcpy(exe->read_data_buf, c, exe->read_data_size);
-                    }
-                  else
-                    {
-                       exe->error_data_size = i - last;
-                       exe->error_data_buf = malloc(exe->error_data_size);
-                       memcpy(exe->error_data_buf, c, exe->error_data_size);
-                    }
-               }
-             if (count == 0)        /* No lines to send, cancel the event. */
-               {
-                  _ecore_exe_event_exe_data_free(NULL, e);
-                  e = NULL;
-               }
-             else                /* NULL terminate the array, so that people know where the end is. */
-               {
-                  e->lines[count].line = NULL;
-                  e->lines[count].size = 0;
-               }
-          }
-     }
+               /* raster said to leave the line endings as line endings, however -
+                * This is line buffered mode, we are not dealing with binary here, but lines.
+                * If we are not dealing with binary, we must be dealing with ASCII, unicode, or some other text format.
+                * Thus the user is most likely gonna deal with this text as strings.
+                * Thus the user is most likely gonna pass this data to str functions.
+                * rasters way - the endings are always gonna be '\n';  onefangs way - they will always be '\0'
+                * We are handing them the string length as a convenience.
+                * Thus if they really want it in raw format, they can e->lines[i].line[e->lines[i].size - 1] = '\n'; easily enough.
+                * In the default case, we can do this conversion quicker than the user can, as we already have the index and pointer.
+                * Let's make it easy on them to use these as standard C strings.
+                *
+                * onefang is proud to announce that he has just set a new personal record for the
+                * most over documentation of a simple assignment statement.  B-)
+                */
+               inbuf[i] = '\0';
+               e->lines[count].line = c;
+               e->lines[count].size = i - last;
+               last = i + 1;
+               c = (char *)&inbuf[last];
+               count++;
+            }
+         }
+         if (i > last) /* Partial line left over, save it for next time. */
+         {
+            if (count != 0) e->size = last;
+            if (flags & ECORE_EXE_PIPE_READ)
+            {
+               exe->read_data_size = i - last;
+               exe->read_data_buf = malloc(exe->read_data_size);
+               memcpy(exe->read_data_buf, c, exe->read_data_size);
+            }
+            else
+            {
+               exe->error_data_size = i - last;
+               exe->error_data_buf = malloc(exe->error_data_size);
+               memcpy(exe->error_data_buf, c, exe->error_data_size);
+            }
+         }
+         if (count == 0) /* No lines to send, cancel the event. */
+         {
+            _ecore_exe_event_exe_data_free(NULL, e);
+            e = NULL;
+         }
+         else /* NULL terminate the array, so that people know where the end is. */
+         {
+            e->lines[count].line = NULL;
+            e->lines[count].size = 0;
+         }
+      }
+   }
 
    return e;
 }
@@ -954,18 +992,19 @@ ecore_exe_event_data_get(Ecore_Exe *exe, Ecore_Exe_Flags flags)
  * @param   tag The string tag to set on the process handle.
  */
 EAPI void
-ecore_exe_tag_set(Ecore_Exe *exe, const char *tag)
+ecore_exe_tag_set(Ecore_Exe  *exe,
+                  const char *tag)
 {
    if (!ECORE_MAGIC_CHECK(exe, ECORE_MAGIC_EXE))
-     {
-        ECORE_MAGIC_FAIL(exe, ECORE_MAGIC_EXE, "ecore_exe_tag_set");
-        return;
-     }
+   {
+      ECORE_MAGIC_FAIL(exe, ECORE_MAGIC_EXE, "ecore_exe_tag_set");
+      return;
+   }
    IF_FREE(exe->tag);
    if (tag)
-      exe->tag = strdup(tag);
+     exe->tag = strdup(tag);
    else
-      exe->tag = NULL;
+     exe->tag = NULL;
 }
 
 /**
@@ -983,10 +1022,10 @@ EAPI const char *
 ecore_exe_tag_get(const Ecore_Exe *exe)
 {
    if (!ECORE_MAGIC_CHECK(exe, ECORE_MAGIC_EXE))
-     {
-        ECORE_MAGIC_FAIL(exe, ECORE_MAGIC_EXE, "ecore_exe_tag_get");
-        return NULL;
-     }
+   {
+      ECORE_MAGIC_FAIL(exe, ECORE_MAGIC_EXE, "ecore_exe_tag_get");
+      return NULL;
+   }
    return exe->tag;
 }
 
@@ -1008,10 +1047,10 @@ ecore_exe_free(Ecore_Exe *exe)
    int result;
 
    if (!ECORE_MAGIC_CHECK(exe, ECORE_MAGIC_EXE))
-     {
-        ECORE_MAGIC_FAIL(exe, ECORE_MAGIC_EXE, "ecore_exe_free");
-        return NULL;
-     }
+   {
+      ECORE_MAGIC_FAIL(exe, ECORE_MAGIC_EXE, "ecore_exe_free");
+      return NULL;
+   }
 
    data = exe->data;
 
@@ -1019,40 +1058,40 @@ ecore_exe_free(Ecore_Exe *exe)
      exe->pre_free_cb(data, exe);
 
    if (exe->doomsday_clock)
-     {
-        struct _ecore_exe_dead_exe *dead;
-
-        ecore_timer_del(exe->doomsday_clock);
-        exe->doomsday_clock = NULL;
-        dead = exe->doomsday_clock_dead;
-        if (dead)
-          {
-             IF_FREE(dead->cmd);
-             free(dead);
-             exe->doomsday_clock_dead = NULL;
-          }
-     }
+   {
+      struct _ecore_exe_dead_exe *dead;
+
+      ecore_timer_del(exe->doomsday_clock);
+      exe->doomsday_clock = NULL;
+      dead = exe->doomsday_clock_dead;
+      if (dead)
+      {
+         IF_FREE(dead->cmd);
+         free(dead);
+         exe->doomsday_clock_dead = NULL;
+      }
+   }
    IF_FN_DEL(ecore_main_fd_handler_del, exe->write_fd_handler);
    IF_FN_DEL(ecore_main_fd_handler_del, exe->read_fd_handler);
    IF_FN_DEL(ecore_main_fd_handler_del, exe->error_fd_handler);
    if (exe->child_fd_write_x != -1)
-      E_NO_ERRNO(result, close(exe->child_fd_write_x), ok);
+     E_NO_ERRNO(result, close(exe->child_fd_write_x), ok);
    if (exe->child_fd_read_x != -1)
-      E_NO_ERRNO(result, close(exe->child_fd_read_x), ok);
+     E_NO_ERRNO(result, close(exe->child_fd_read_x), ok);
    if (exe->child_fd_error_x != -1)
-      E_NO_ERRNO(result, close(exe->child_fd_error_x), ok);
+     E_NO_ERRNO(result, close(exe->child_fd_error_x), ok);
    if (exe->child_fd_write != -1)
-      E_NO_ERRNO(result, close(exe->child_fd_write), ok);
+     E_NO_ERRNO(result, close(exe->child_fd_write), ok);
    if (exe->child_fd_read != -1)
-      E_NO_ERRNO(result, close(exe->child_fd_read), ok);
+     E_NO_ERRNO(result, close(exe->child_fd_read), ok);
    if (exe->child_fd_error != -1)
-      E_NO_ERRNO(result, close(exe->child_fd_error), ok);
+     E_NO_ERRNO(result, close(exe->child_fd_error), ok);
    IF_FREE(exe->write_data_buf);
    IF_FREE(exe->read_data_buf);
    IF_FREE(exe->error_data_buf);
    IF_FREE(exe->cmd);
 
-   exes = (Ecore_Exe *) eina_inlist_remove(EINA_INLIST_GET(exes), EINA_INLIST_GET(exe));
+   exes = (Ecore_Exe *)eina_inlist_remove(EINA_INLIST_GET(exes), EINA_INLIST_GET(exe));
    ECORE_MAGIC_SET(exe, ECORE_MAGIC_NONE);
    IF_FREE(exe->tag);
    free(exe);
@@ -1082,10 +1121,10 @@ EAPI pid_t
 ecore_exe_pid_get(const Ecore_Exe *exe)
 {
    if (!ECORE_MAGIC_CHECK(exe, ECORE_MAGIC_EXE))
-     {
-        ECORE_MAGIC_FAIL(exe, ECORE_MAGIC_EXE, "ecore_exe_pid_get");
-        return -1;
-     }
+   {
+      ECORE_MAGIC_FAIL(exe, ECORE_MAGIC_EXE, "ecore_exe_pid_get");
+      return -1;
+   }
    return exe->pid;
 }
 
@@ -1100,10 +1139,10 @@ EAPI const char *
 ecore_exe_cmd_get(const Ecore_Exe *exe)
 {
    if (!ECORE_MAGIC_CHECK(exe, ECORE_MAGIC_EXE))
-     {
-        ECORE_MAGIC_FAIL(exe, ECORE_MAGIC_EXE, "ecore_exe_cmd_get");
-        return NULL;
-     }
+   {
+      ECORE_MAGIC_FAIL(exe, ECORE_MAGIC_EXE, "ecore_exe_cmd_get");
+      return NULL;
+   }
    return exe->cmd;
 }
 
@@ -1117,10 +1156,10 @@ EAPI void *
 ecore_exe_data_get(const Ecore_Exe *exe)
 {
    if (!ECORE_MAGIC_CHECK(exe, ECORE_MAGIC_EXE))
-     {
-        ECORE_MAGIC_FAIL(exe, ECORE_MAGIC_EXE, "ecore_exe_data_get");
-        return NULL;
-     }
+   {
+      ECORE_MAGIC_FAIL(exe, ECORE_MAGIC_EXE, "ecore_exe_data_get");
+      return NULL;
+   }
    return exe->data;
 }
 
@@ -1133,14 +1172,15 @@ ecore_exe_data_get(const Ecore_Exe *exe)
  * @since 1.1
  */
 EAPI void *
-ecore_exe_data_set(Ecore_Exe *exe, void *data)
+ecore_exe_data_set(Ecore_Exe *exe,
+                   void      *data)
 {
    void *ret;
    if (!ECORE_MAGIC_CHECK(exe, ECORE_MAGIC_EXE))
-     {
-        ECORE_MAGIC_FAIL(exe, ECORE_MAGIC_EXE, __func__);
-        return NULL;
-     }
+   {
+      ECORE_MAGIC_FAIL(exe, ECORE_MAGIC_EXE, __func__);
+      return NULL;
+   }
    ret = exe->data;
    exe->data = data;
    return ret;
@@ -1155,10 +1195,10 @@ EAPI Ecore_Exe_Flags
 ecore_exe_flags_get(const Ecore_Exe *exe)
 {
    if (!ECORE_MAGIC_CHECK(exe, ECORE_MAGIC_EXE))
-     {
-        ECORE_MAGIC_FAIL(exe, ECORE_MAGIC_EXE, "ecore_exe_data_get");
-        return 0;
-     }
+   {
+      ECORE_MAGIC_FAIL(exe, ECORE_MAGIC_EXE, "ecore_exe_data_get");
+      return 0;
+   }
    return exe->flags;
 }
 
@@ -1170,10 +1210,10 @@ EAPI void
 ecore_exe_pause(Ecore_Exe *exe)
 {
    if (!ECORE_MAGIC_CHECK(exe, ECORE_MAGIC_EXE))
-     {
-        ECORE_MAGIC_FAIL(exe, ECORE_MAGIC_EXE, "ecore_exe_pause");
-        return;
-     }
+   {
+      ECORE_MAGIC_FAIL(exe, ECORE_MAGIC_EXE, "ecore_exe_pause");
+      return;
+   }
    kill(exe->pid, SIGSTOP);
 }
 
@@ -1185,10 +1225,10 @@ EAPI void
 ecore_exe_continue(Ecore_Exe *exe)
 {
    if (!ECORE_MAGIC_CHECK(exe, ECORE_MAGIC_EXE))
-     {
-        ECORE_MAGIC_FAIL(exe, ECORE_MAGIC_EXE, "ecore_exe_continue");
-        return;
-     }
+   {
+      ECORE_MAGIC_FAIL(exe, ECORE_MAGIC_EXE, "ecore_exe_continue");
+      return;
+   }
    kill(exe->pid, SIGCONT);
 }
 
@@ -1200,10 +1240,10 @@ EAPI void
 ecore_exe_interrupt(Ecore_Exe *exe)
 {
    if (!ECORE_MAGIC_CHECK(exe, ECORE_MAGIC_EXE))
-     {
-        ECORE_MAGIC_FAIL(exe, ECORE_MAGIC_EXE, "ecore_exe_interrupt");
-        return;
-     }
+   {
+      ECORE_MAGIC_FAIL(exe, ECORE_MAGIC_EXE, "ecore_exe_interrupt");
+      return;
+   }
    _ecore_exe_dead_attach(exe);
    kill(exe->pid, SIGINT);
 }
@@ -1216,10 +1256,10 @@ EAPI void
 ecore_exe_quit(Ecore_Exe *exe)
 {
    if (!ECORE_MAGIC_CHECK(exe, ECORE_MAGIC_EXE))
-     {
-        ECORE_MAGIC_FAIL(exe, ECORE_MAGIC_EXE, "ecore_exe_quit");
-        return;
-     }
+   {
+      ECORE_MAGIC_FAIL(exe, ECORE_MAGIC_EXE, "ecore_exe_quit");
+      return;
+   }
    _ecore_exe_dead_attach(exe);
    kill(exe->pid, SIGQUIT);
 }
@@ -1232,10 +1272,10 @@ EAPI void
 ecore_exe_terminate(Ecore_Exe *exe)
 {
    if (!ECORE_MAGIC_CHECK(exe, ECORE_MAGIC_EXE))
-     {
-        ECORE_MAGIC_FAIL(exe, ECORE_MAGIC_EXE, "ecore_exe_terminate");
-        return;
-     }
+   {
+      ECORE_MAGIC_FAIL(exe, ECORE_MAGIC_EXE, "ecore_exe_terminate");
+      return;
+   }
    _ecore_exe_dead_attach(exe);
    INF("Sending TERM signal to %s (%d).", exe->cmd, exe->pid);
    kill(exe->pid, SIGTERM);
@@ -1251,20 +1291,20 @@ ecore_exe_kill(Ecore_Exe *exe)
    struct _ecore_exe_dead_exe *dead;
 
    if (!ECORE_MAGIC_CHECK(exe, ECORE_MAGIC_EXE))
-     {
-        ECORE_MAGIC_FAIL(exe, ECORE_MAGIC_EXE, "ecore_exe_kill");
-        return;
-     }
+   {
+      ECORE_MAGIC_FAIL(exe, ECORE_MAGIC_EXE, "ecore_exe_kill");
+      return;
+   }
 
    dead = calloc(1, sizeof(struct _ecore_exe_dead_exe));
    if (dead)
-     {
-        dead->pid = exe->pid;
-        dead->cmd = strdup(exe->cmd);
-        IF_FN_DEL(ecore_timer_del, exe->doomsday_clock);
-        exe->doomsday_clock =
-           ecore_timer_add(10.0, _ecore_exe_make_sure_its_really_dead, dead);
-     }
+   {
+      dead->pid = exe->pid;
+      dead->cmd = strdup(exe->cmd);
+      IF_FN_DEL(ecore_timer_del, exe->doomsday_clock);
+      exe->doomsday_clock =
+        ecore_timer_add(10.0, _ecore_exe_make_sure_its_really_dead, dead);
+   }
 
    INF("Sending KILL signal to %s (%d).", exe->cmd, exe->pid);
    kill(exe->pid, SIGKILL);
@@ -1277,17 +1317,18 @@ ecore_exe_kill(Ecore_Exe *exe)
  *              the signal will be ignored.
  */
 EAPI void
-ecore_exe_signal(Ecore_Exe *exe, int num)
+ecore_exe_signal(Ecore_Exe *exe,
+                 int        num)
 {
    if (!ECORE_MAGIC_CHECK(exe, ECORE_MAGIC_EXE))
-     {
-        ECORE_MAGIC_FAIL(exe, ECORE_MAGIC_EXE, "ecore_exe_signal");
-        return;
-     }
+   {
+      ECORE_MAGIC_FAIL(exe, ECORE_MAGIC_EXE, "ecore_exe_signal");
+      return;
+   }
    if (num == 1)
-      kill(exe->pid, SIGUSR1);
+     kill(exe->pid, SIGUSR1);
    else if (num == 2)
-      kill(exe->pid, SIGUSR2);
+     kill(exe->pid, SIGUSR2);
 }
 
 /**
@@ -1298,10 +1339,10 @@ EAPI void
 ecore_exe_hup(Ecore_Exe *exe)
 {
    if (!ECORE_MAGIC_CHECK(exe, ECORE_MAGIC_EXE))
-     {
-        ECORE_MAGIC_FAIL(exe, ECORE_MAGIC_EXE, "ecore_exe_hup");
-        return;
-     }
+   {
+      ECORE_MAGIC_FAIL(exe, ECORE_MAGIC_EXE, "ecore_exe_hup");
+      return;
+   }
    kill(exe->pid, SIGHUP);
 }
 
@@ -1338,10 +1379,10 @@ _ecore_exe_is_it_alive(pid_t pid)
     */
    exe = _ecore_exe_find(pid);
    if (exe)
-     {
-        if (!ECORE_MAGIC_CHECK(exe, ECORE_MAGIC_EXE))
-           exe = NULL;
-     }
+   {
+      if (!ECORE_MAGIC_CHECK(exe, ECORE_MAGIC_EXE))
+        exe = NULL;
+   }
 
    return exe;
 }
@@ -1353,28 +1394,28 @@ _ecore_exe_make_sure_its_dead(void *data)
 
    dead = data;
    if (dead)
-     {
-        Ecore_Exe *exe = NULL;
-
-        if ((exe = _ecore_exe_is_it_alive(dead->pid)))
-          {
-             if (dead->cmd)
-                INF("Sending KILL signal to allegedly dead %s (%d).",
-                       dead->cmd, dead->pid);
-             else
-                INF("Sending KILL signal to allegedly dead PID %d.",
-                    dead->pid);
-             exe->doomsday_clock =
-                ecore_timer_add(10.0, _ecore_exe_make_sure_its_really_dead,
-                                dead);
-             kill(dead->pid, SIGKILL);
-          }
-        else
-          {
-             IF_FREE(dead->cmd);
-             free(dead);
-          }
-     }
+   {
+      Ecore_Exe *exe = NULL;
+
+      if ((exe = _ecore_exe_is_it_alive(dead->pid)))
+      {
+         if (dead->cmd)
+           INF("Sending KILL signal to allegedly dead %s (%d).",
+               dead->cmd, dead->pid);
+         else
+           INF("Sending KILL signal to allegedly dead PID %d.",
+               dead->pid);
+         exe->doomsday_clock =
+           ecore_timer_add(10.0, _ecore_exe_make_sure_its_really_dead,
+                           dead);
+         kill(dead->pid, SIGKILL);
+      }
+      else
+      {
+         IF_FREE(dead->cmd);
+         free(dead);
+      }
+   }
    return ECORE_CALLBACK_CANCEL;
 }
 
@@ -1385,21 +1426,21 @@ _ecore_exe_make_sure_its_really_dead(void *data)
 
    dead = data;
    if (dead)
-     {
-        Ecore_Exe *exe = NULL;
-
-        if ((exe = _ecore_exe_is_it_alive(dead->pid)))
-          {
-             ERR("RUN!  The zombie wants to eat your brains!  And your CPU!");
-             if (dead->cmd)
-                INF("%s (%d) is not really dead.", dead->cmd, dead->pid);
-             else
-                INF("PID %d is not really dead.", dead->pid);
-             exe->doomsday_clock = NULL;
-          }
-        IF_FREE(dead->cmd);
-        free(dead);
-     }
+   {
+      Ecore_Exe *exe = NULL;
+
+      if ((exe = _ecore_exe_is_it_alive(dead->pid)))
+      {
+         ERR("RUN!  The zombie wants to eat your brains!  And your CPU!");
+         if (dead->cmd)
+           INF("%s (%d) is not really dead.", dead->cmd, dead->pid);
+         else
+           INF("PID %d is not really dead.", dead->pid);
+         exe->doomsday_clock = NULL;
+      }
+      IF_FREE(dead->cmd);
+      free(dead);
+   }
    return ECORE_CALLBACK_CANCEL;
 }
 
@@ -1425,10 +1466,10 @@ _ecore_exe_find(pid_t pid)
    Ecore_Exe *exe;
 
    EINA_INLIST_FOREACH(exes, exe)
-     {
-        if (exe->pid == pid)
-           return exe;
-     }
+   {
+      if (exe->pid == pid)
+        return exe;
+   }
    return NULL;
 }
 
@@ -1439,18 +1480,20 @@ _ecore_exe_doomsday_clock_get(Ecore_Exe *exe)
 }
 
 void
-_ecore_exe_doomsday_clock_set(Ecore_Exe *exe, Ecore_Timer *dc)
+_ecore_exe_doomsday_clock_set(Ecore_Exe   *exe,
+                              Ecore_Timer *dc)
 {
    exe->doomsday_clock = dc;
 }
 
 static inline void
-_ecore_exe_exec_it(const char *exe_cmd, Ecore_Exe_Flags flags)
+_ecore_exe_exec_it(const char     *exe_cmd,
+                   Ecore_Exe_Flags flags)
 {
    char use_sh = 1;
    char *buf = NULL;
    char **args = NULL;
-   int  save_errno = 0;
+   int save_errno = 0;
 
    /* So what is this doing?
     *
@@ -1459,85 +1502,92 @@ _ecore_exe_exec_it(const char *exe_cmd, Ecore_Exe_Flags flags)
     * If we don't find them, we can call the exe directly.
     */
    if (!strpbrk(exe_cmd, "|&;<>()$`\\\"'*?#"))
-     {
-        char *token;
-        char pre_command = 1;
-        int num_tokens = 0;
-
-        if (!(buf = strdup(exe_cmd)))
-           return;
+   {
+      char *token;
+      char pre_command = 1;
+      int num_tokens = 0;
 
-        token = strtok(buf, " \t\n\v");
-        while (token)
-          {
-             if (token[0] == '~')
-               break;
-             if (pre_command)
-               {
-                  if (token[0] == '[')
-                    break;
-                  if (strchr(token, '='))
-                    break;
-                  else
-                    pre_command = 0;
-               }
-             num_tokens++;
-             token = strtok(NULL, " \t\n\v");
-          }
-        IF_FREE(buf);
-        if ((!token) && (num_tokens))
-          {
-             int i = 0;
+      if (!(buf = strdup(exe_cmd)))
+        return;
 
-             if (!(buf = strdup(exe_cmd)))
-               return;
+      token = strtok(buf, " \t\n\v");
+      while (token)
+      {
+         if (token[0] == '~')
+           break;
+         if (pre_command)
+         {
+            if (token[0] == '[')
+              break;
+            if (strchr(token, '='))
+              break;
+            else
+              pre_command = 0;
+         }
+         num_tokens++;
+         token = strtok(NULL, " \t\n\v");
+      }
+      IF_FREE(buf);
+      if ((!token) && (num_tokens))
+      {
+         int i = 0;
+
+         if (!(buf = strdup(exe_cmd)))
+           return;
 
-             token = strtok(buf, " \t\n\v");
-             use_sh = 0;
-             if (!(args = (char **)calloc(num_tokens + 1, sizeof(char *))))
-               {
-                  IF_FREE(buf);
-                  return;
-               }
-             for (i = 0; i < num_tokens; i++)
-               {
-                  if (token)
-                    args[i] = token;
-                  token = strtok(NULL, " \t\n\v");
-               }
-             args[num_tokens] = NULL;
-          }
-     }
+         token = strtok(buf, " \t\n\v");
+         use_sh = 0;
+         if (!(args = (char **)calloc(num_tokens + 1, sizeof(char *))))
+         {
+            IF_FREE(buf);
+            return;
+         }
+         for (i = 0; i < num_tokens; i++)
+         {
+            if (token)
+              args[i] = token;
+            token = strtok(NULL, " \t\n\v");
+         }
+         args[num_tokens] = NULL;
+      }
+   }
+
+#ifdef HAVE_SYS_PRCTL_H
+   if ((flags & ECORE_EXE_TERM_WITH_PARENT))
+   {
+      prctl(PR_SET_PDEATHSIG, SIGTERM);
+   }
+#endif
 
    if (!(flags & ECORE_EXE_NOT_LEADER)) setsid();
    if ((flags & ECORE_EXE_USE_SH))
-     {
-        errno = 0;
-        execl("/bin/sh", "/bin/sh", "-c", exe_cmd, (char *)NULL);
-     }
-   else if (use_sh)
-     {                                /* We have to use a shell to run this. */
-        if (!shell)
-          {                        /* Find users preferred shell. */
-             shell = getenv("SHELL");
-             if (!shell)
-               shell = "/bin/sh";
-          }
-        errno = 0;
-        execl(shell, shell, "-c", exe_cmd, (char *)NULL);
-     }
+   {
+      errno = 0;
+      execl("/bin/sh", "/bin/sh", "-c", exe_cmd, (char *)NULL);
+   }
+   else if (use_sh) /* We have to use a shell to run this. */
+   {
+      if (!shell) /* Find users preferred shell. */
+      {
+         shell = getenv("SHELL");
+         if (!shell)
+           shell = "/bin/sh";
+      }
+      errno = 0;
+      execl(shell, shell, "-c", exe_cmd, (char *)NULL);
+   }
    else
-     {                                /* We can run this directly. */
-        if (!args)
-          {
-             IF_FREE(buf);
-             IF_FREE(args);
-             ERR("arg[0] is NULL!");
-             return;
-          }
-        errno = 0;
-        execvp(args[0], args);
-     }
+   { /* We can run this directly. */
+      if (!args)
+      {
+         IF_FREE(buf);
+         IF_FREE(args);
+         ERR("arg[0] is NULL!");
+         return;
+      }
+      errno = 0;
+      execvp(args[0], args);
+   }
 
    save_errno = errno;
    IF_FREE(buf);
@@ -1547,7 +1597,9 @@ _ecore_exe_exec_it(const char *exe_cmd, Ecore_Exe_Flags flags)
 }
 
 static Eina_Bool
-_ecore_exe_data_generic_handler(void *data, Ecore_Fd_Handler *fd_handler, Ecore_Exe_Flags flags)
+_ecore_exe_data_generic_handler(void             *data,
+                                Ecore_Fd_Handler *fd_handler,
+                                Ecore_Exe_Flags   flags)
 {
    Ecore_Exe *exe;
    int child_fd;
@@ -1557,163 +1609,166 @@ _ecore_exe_data_generic_handler(void *data, Ecore_Fd_Handler *fd_handler, Ecore_
 
    /* Sort out what sort of handler we are. */
    if (flags & ECORE_EXE_PIPE_READ)
-     {
-        flags = ECORE_EXE_PIPE_READ;
-        event_type = ECORE_EXE_EVENT_DATA;
-        child_fd = exe->child_fd_read;
-     }
+   {
+      flags = ECORE_EXE_PIPE_READ;
+      event_type = ECORE_EXE_EVENT_DATA;
+      child_fd = exe->child_fd_read;
+   }
    else
-     {
-        flags = ECORE_EXE_PIPE_ERROR;
-        event_type = ECORE_EXE_EVENT_ERROR;
-        child_fd = exe->child_fd_error;
-     }
+   {
+      flags = ECORE_EXE_PIPE_ERROR;
+      event_type = ECORE_EXE_EVENT_ERROR;
+      child_fd = exe->child_fd_error;
+   }
 
    if ((fd_handler)
        && (ecore_main_fd_handler_active_get(fd_handler, ECORE_FD_READ)))
-     {
-        unsigned char *inbuf;
-        int inbuf_num;
-
-        /* Get any left over data from last time. */
-        if (flags & ECORE_EXE_PIPE_READ)
-          {
-             inbuf = exe->read_data_buf;
-             inbuf_num = exe->read_data_size;
-             exe->read_data_buf = NULL;
-             exe->read_data_size = 0;
-          }
-        else
-          {
-             inbuf = exe->error_data_buf;
-             inbuf_num = exe->error_data_size;
-             exe->error_data_buf = NULL;
-             exe->error_data_size = 0;
-          }
+   {
+      unsigned char *inbuf;
+      int inbuf_num;
+
+      /* Get any left over data from last time. */
+      if (flags & ECORE_EXE_PIPE_READ)
+      {
+         inbuf = exe->read_data_buf;
+         inbuf_num = exe->read_data_size;
+         exe->read_data_buf = NULL;
+         exe->read_data_size = 0;
+      }
+      else
+      {
+         inbuf = exe->error_data_buf;
+         inbuf_num = exe->error_data_size;
+         exe->error_data_buf = NULL;
+         exe->error_data_size = 0;
+      }
+
+      for (;; )
+      {
+         int num, lost_exe;
+         char buf[READBUFSIZ];
+
+         lost_exe = 0;
+         errno = 0;
+         if ((num = read(child_fd, buf, READBUFSIZ)) < 1)
+         {
+            /* FIXME: SPEED/SIZE TRADE OFF - add a smaller READBUFSIZE
+             * (currently 64k) to inbuf, use that instead of buf, and
+             * save ourselves a memcpy(). */
+              lost_exe = ((errno == EIO) ||
+                          (errno == EBADF) ||
+                          (errno == EPIPE) ||
+                          (errno == EINVAL) || (errno == ENOSPC));
+              if ((errno != EAGAIN) && (errno != EINTR))
+                perror("_ecore_exe_generic_handler() read problem ");
+         }
+         if (num > 0) /* data got read. */
+         {
+            inbuf = realloc(inbuf, inbuf_num + num);
+            memcpy(inbuf + inbuf_num, buf, num);
+            inbuf_num += num;
+         }
+         else
+         { /* No more data to read. */
+            if (inbuf)
+            {
+               Ecore_Exe_Event_Data *e;
+
+               /* Stash the data away for later. */
+               if (flags & ECORE_EXE_PIPE_READ)
+               {
+                  exe->read_data_buf = inbuf;
+                  exe->read_data_size = inbuf_num;
+               }
+               else
+               {
+                  exe->error_data_buf = inbuf;
+                  exe->error_data_size = inbuf_num;
+               }
 
-        for (;;)
-          {
-             int num, lost_exe;
-             char buf[READBUFSIZ];
-
-             lost_exe = 0;
-             errno = 0;
-             if ((num = read(child_fd, buf, READBUFSIZ)) < 1)
-               /* FIXME: SPEED/SIZE TRADE OFF - add a smaller READBUFSIZE
-                * (currently 64k) to inbuf, use that instead of buf, and
-                * save ourselves a memcpy(). */
+               if (!(exe->flags & ECORE_EXE_PIPE_AUTO))
                {
-                  lost_exe = ((errno == EIO) ||
-                              (errno == EBADF) ||
-                              (errno == EPIPE) ||
-                              (errno == EINVAL) || (errno == ENOSPC));
-                  if ((errno != EAGAIN) && (errno != EINTR))
-                     perror("_ecore_exe_generic_handler() read problem ");
+                  e = ecore_exe_event_data_get(exe, flags);
+                  if (e) /* Send the event. */
+                    ecore_event_add(event_type, e,
+                                    _ecore_exe_event_exe_data_free,
+                                    NULL);
                }
-             if (num > 0)
-               {                /* data got read. */
-                  inbuf = realloc(inbuf, inbuf_num + num);
-                  memcpy(inbuf + inbuf_num, buf, num);
-                  inbuf_num += num;
+            }
+            if (lost_exe)
+            {
+               if (flags & ECORE_EXE_PIPE_READ)
+               {
+                  if (exe->read_data_size)
+                    INF("There are %d bytes left unsent from the dead exe %s.",
+                        exe->read_data_size, exe->cmd);
                }
-             else
-               {                /* No more data to read. */
-                  if (inbuf)
-                    {
-                       Ecore_Exe_Event_Data *e;
-
-                       /* Stash the data away for later. */
-                       if (flags & ECORE_EXE_PIPE_READ)
-                         {
-                            exe->read_data_buf = inbuf;
-                            exe->read_data_size = inbuf_num;
-                         }
-                       else
-                         {
-                            exe->error_data_buf = inbuf;
-                            exe->error_data_size = inbuf_num;
-                         }
-
-                       if (!(exe->flags & ECORE_EXE_PIPE_AUTO))
-                         {
-                            e = ecore_exe_event_data_get(exe, flags);
-                            if (e)        /* Send the event. */
-                              ecore_event_add(event_type, e,
-                                              _ecore_exe_event_exe_data_free,
-                                              NULL);
-                         }
-                    }
-                  if (lost_exe)
-                    {
-                       if (flags & ECORE_EXE_PIPE_READ)
-                         {
-                            if (exe->read_data_size)
-                              INF("There are %d bytes left unsent from the dead exe %s.",
-                                  exe->read_data_size, exe->cmd);
-                         }
-                       else
-                         {
-                            if (exe->error_data_size)
-                              INF("There are %d bytes left unsent from the dead exe %s.",
-                                  exe->error_data_size, exe->cmd);
-                         }
-                       /* Thought about this a bit.  If the exe has actually
-                        * died, this won't do any harm as it must have died
-                        * recently and the pid has not had a chance to recycle.
-                        * It is also a paranoid catchall, coz the usual ecore_signal
-                        * mechenism should kick in.  But let's give it a good
-                        * kick in the head anyway.
-                        */
-                       ecore_exe_terminate(exe);
-                    }
-                  break;
+               else
+               {
+                  if (exe->error_data_size)
+                    INF("There are %d bytes left unsent from the dead exe %s.",
+                        exe->error_data_size, exe->cmd);
                }
-          }
-     }
+               /* Thought about this a bit.  If the exe has actually
+                * died, this won't do any harm as it must have died
+                * recently and the pid has not had a chance to recycle.
+                * It is also a paranoid catchall, coz the usual ecore_signal
+                * mechenism should kick in.  But let's give it a good
+                * kick in the head anyway.
+                */
+               ecore_exe_terminate(exe);
+            }
+            break;
+         }
+      }
+   }
 
    return ECORE_CALLBACK_RENEW;
 }
 
 static Eina_Bool
-_ecore_exe_data_error_handler(void *data, Ecore_Fd_Handler *fd_handler)
+_ecore_exe_data_error_handler(void             *data,
+                              Ecore_Fd_Handler *fd_handler)
 {
    return _ecore_exe_data_generic_handler(data, fd_handler,
                                           ECORE_EXE_PIPE_ERROR);
 }
 
 static Eina_Bool
-_ecore_exe_data_read_handler(void *data, Ecore_Fd_Handler *fd_handler)
+_ecore_exe_data_read_handler(void             *data,
+                             Ecore_Fd_Handler *fd_handler)
 {
    return _ecore_exe_data_generic_handler(data, fd_handler,
                                           ECORE_EXE_PIPE_READ);
 }
 
 static Eina_Bool
-_ecore_exe_data_write_handler(void *data, Ecore_Fd_Handler *fd_handler __UNUSED__)
+_ecore_exe_data_write_handler(void             *data,
+                              Ecore_Fd_Handler *fd_handler __UNUSED__)
 {
    Ecore_Exe *exe;
 
    exe = data;
    if ((exe->write_fd_handler) &&
        (ecore_main_fd_handler_active_get
-        (exe->write_fd_handler, ECORE_FD_WRITE)))
+          (exe->write_fd_handler, ECORE_FD_WRITE)))
      _ecore_exe_flush(exe);
 
    /* If we have sent all there is to send, and we need to close the pipe, then close it. */
    if ((exe->close_stdin == 1)
        && (exe->write_data_size == exe->write_data_offset))
-     {
-        int ok = 0;
-        int result;
-
-        INF("Closing stdin for %s", exe->cmd);
-        /* if (exe->child_fd_write != -1)  E_NO_ERRNO(result, fsync(exe->child_fd_write), ok);   This a) doesn't work, and b) isn't needed. */
-        IF_FN_DEL(ecore_main_fd_handler_del, exe->write_fd_handler);
-        if (exe->child_fd_write != -1)
-           E_NO_ERRNO(result, close(exe->child_fd_write), ok);
-        exe->child_fd_write = -1;
-        IF_FREE(exe->write_data_buf);
-     }
+   {
+      int ok = 0;
+      int result;
+
+      INF("Closing stdin for %s", exe->cmd);
+      /* if (exe->child_fd_write != -1)  E_NO_ERRNO(result, fsync(exe->child_fd_write), ok);   This a) doesn't work, and b) isn't needed. */
+      IF_FN_DEL(ecore_main_fd_handler_del, exe->write_fd_handler);
+      if (exe->child_fd_write != -1)
+        E_NO_ERRNO(result, close(exe->child_fd_write), ok);
+      exe->child_fd_write = -1;
+      IF_FREE(exe->write_data_buf);
+   }
 
    return ECORE_CALLBACK_RENEW;
 }
@@ -1725,38 +1780,39 @@ _ecore_exe_flush(Ecore_Exe *exe)
 
    /* check whether we need to write anything at all. */
    if ((exe->child_fd_write == -1) || (!exe->write_data_buf))
-      return;
+     return;
    if (exe->write_data_size == exe->write_data_offset)
-      return;
+     return;
 
    count = write(exe->child_fd_write,
                  (char *)exe->write_data_buf + exe->write_data_offset,
                  exe->write_data_size - exe->write_data_offset);
    if (count < 1)
-     {
-        if (errno == EIO || errno == EBADF || errno == EPIPE || errno == EINVAL || errno == ENOSPC)        /* we lost our exe! */
-          {
-             ecore_exe_terminate(exe);
-             if (exe->write_fd_handler)
-                ecore_main_fd_handler_active_set(exe->write_fd_handler, 0);
-          }
-     }
+   {
+      if (errno == EIO || errno == EBADF || errno == EPIPE || errno == EINVAL || errno == ENOSPC) /* we lost our exe! */
+      {
+         ecore_exe_terminate(exe);
+         if (exe->write_fd_handler)
+           ecore_main_fd_handler_active_set(exe->write_fd_handler, 0);
+      }
+   }
    else
-     {
-        exe->write_data_offset += count;
-        if (exe->write_data_offset >= exe->write_data_size)
-          {                        /* Nothing left to write, clean up. */
-             exe->write_data_size = 0;
-             exe->write_data_offset = 0;
-             IF_FREE(exe->write_data_buf);
-             if (exe->write_fd_handler)
-                ecore_main_fd_handler_active_set(exe->write_fd_handler, 0);
-          }
-     }
+   {
+      exe->write_data_offset += count;
+      if (exe->write_data_offset >= exe->write_data_size) /* Nothing left to write, clean up. */
+      {
+         exe->write_data_size = 0;
+         exe->write_data_offset = 0;
+         IF_FREE(exe->write_data_buf);
+         if (exe->write_fd_handler)
+           ecore_main_fd_handler_active_set(exe->write_fd_handler, 0);
+      }
+   }
 }
 
 static void
-_ecore_exe_event_exe_data_free(void *data __UNUSED__, void *ev)
+_ecore_exe_event_exe_data_free(void *data __UNUSED__,
+                               void *ev)
 {
    Ecore_Exe_Event_Data *e;
 
@@ -1774,7 +1830,8 @@ _ecore_exe_event_add_new(void)
 }
 
 static void
-_ecore_exe_event_add_free(void *data __UNUSED__, void *ev)
+_ecore_exe_event_add_free(void *data __UNUSED__,
+                          void *ev)
 {
    Ecore_Exe_Event_Add *e;
 
@@ -1782,7 +1839,7 @@ _ecore_exe_event_add_free(void *data __UNUSED__, void *ev)
    free(e);
 }
 
-void               *
+void *
 _ecore_exe_event_del_new(void)
 {
    Ecore_Exe_Event_Del *e;
@@ -1792,7 +1849,8 @@ _ecore_exe_event_del_new(void)
 }
 
 void
-_ecore_exe_event_del_free(void *data __UNUSED__, void *ev)
+_ecore_exe_event_del_free(void *data __UNUSED__,
+                          void *ev)
 {
    Ecore_Exe_Event_Del *e;
 
@@ -1810,12 +1868,13 @@ _ecore_exe_dead_attach(Ecore_Exe *exe)
    if (exe->doomsday_clock_dead) return;
    dead = calloc(1, sizeof(struct _ecore_exe_dead_exe));
    if (dead)
-     {
-        dead->pid = exe->pid;
-        dead->cmd = strdup(exe->cmd);
-        IF_FN_DEL(ecore_timer_del, exe->doomsday_clock);
-        exe->doomsday_clock =
-           ecore_timer_add(10.0, _ecore_exe_make_sure_its_dead, dead);
-        exe->doomsday_clock_dead = dead;
-     }
+   {
+      dead->pid = exe->pid;
+      dead->cmd = strdup(exe->cmd);
+      IF_FN_DEL(ecore_timer_del, exe->doomsday_clock);
+      exe->doomsday_clock =
+        ecore_timer_add(10.0, _ecore_exe_make_sure_its_dead, dead);
+      exe->doomsday_clock_dead = dead;
+   }
 }
+
index 2d5f535..1f5cb4e 100644 (file)
 
 typedef enum
 {
-  ECORE_EXE_WIN32_SIGINT,
-  ECORE_EXE_WIN32_SIGQUIT,
-  ECORE_EXE_WIN32_SIGTERM,
-  ECORE_EXE_WIN32_SIGKILL
+   ECORE_EXE_WIN32_SIGINT,
+   ECORE_EXE_WIN32_SIGQUIT,
+   ECORE_EXE_WIN32_SIGTERM,
+   ECORE_EXE_WIN32_SIGKILL
 } Ecore_Exe_Win32_Signal;
 
 struct _Ecore_Exe
 {
    EINA_INLIST;
-   ECORE_MAGIC;
-
-   HANDLE process2;
-   HANDLE process; /* CloseHandle */
-   HANDLE process_thread;
-   DWORD  process_id;
-   DWORD  thread_id;
-   void  *data;
-   char  *tag;
-   char  *cmd;
-   Ecore_Exe_Flags flags;
+                          ECORE_MAGIC;
+
+   HANDLE                 process2;
+   HANDLE                 process; /* CloseHandle */
+   HANDLE                 process_thread;
+   DWORD                  process_id;
+   DWORD                  thread_id;
+   void                  *data;
+   char                  *tag;
+   char                  *cmd;
+   Ecore_Exe_Flags        flags;
    Ecore_Exe_Win32_Signal sig;
-   Ecore_Win32_Handler *h_close;
+   Ecore_Win32_Handler   *h_close;
    struct
    {
-      HANDLE child_pipe;
-      HANDLE child_pipe_x;
+      HANDLE      child_pipe;
+      HANDLE      child_pipe_x;
       Ecore_Pipe *p;
-      HANDLE thread;
-      void  *data_buf;
-      int    data_size;
+      HANDLE      thread;
+      void       *data_buf;
+      int         data_size;
    } pipe_read;
    struct
    {
-      HANDLE child_pipe;
-      HANDLE child_pipe_x;
-      HANDLE thread;
+      HANDLE               child_pipe;
+      HANDLE               child_pipe_x;
+      HANDLE               thread;
       Ecore_Win32_Handler *h;
-      void  *data_buf;
-      int    data_size;
+      void                *data_buf;
+      int                  data_size;
    } pipe_write;
    struct
    {
-      HANDLE child_pipe;
-      HANDLE child_pipe_x;
+      HANDLE      child_pipe;
+      HANDLE      child_pipe_x;
       Ecore_Pipe *p;
-      HANDLE thread;
-      void  *data_buf;
-      int    data_size;
+      HANDLE      thread;
+      void       *data_buf;
+      int         data_size;
    } pipe_error;
    Eina_Bool    close_stdin : 1;
    Eina_Bool    is_suspended : 1;
@@ -86,18 +86,28 @@ static Ecore_Exe *exes = NULL;
 static int           _ecore_exe_win32_pipes_set(Ecore_Exe *exe);
 static void          _ecore_exe_win32_pipes_close(Ecore_Exe *exe);
 
-static BOOL CALLBACK _ecore_exe_enum_windows_procedure(HWND window, LPARAM data);
-static void          _ecore_exe_event_add_free(void *data, void *ev);
-static void          _ecore_exe_event_del_free(void *data, void *ev);
+static BOOL CALLBACK _ecore_exe_enum_windows_procedure(HWND   window,
+                                                       LPARAM data);
+static void          _ecore_exe_event_add_free(void *data,
+                                               void *ev);
+static void          _ecore_exe_event_del_free(void *data,
+                                               void *ev);
 static void          _ecore_exe_event_exe_data_free(void *data,
                                                     void *ev);
-static int           _ecore_exe_win32_pipe_thread_generic_cb(void *data, Ecore_Exe_Flags flags);
+static int           _ecore_exe_win32_pipe_thread_generic_cb(void           *data,
+                                                             Ecore_Exe_Flags flags);
 static DWORD WINAPI  _ecore_exe_win32_pipe_thread_read_cb(void *data);
 static DWORD WINAPI  _ecore_exe_win32_pipe_thread_error_cb(void *data);
-static Eina_Bool     _ecore_exe_close_cb(void *data, Ecore_Win32_Handler *wh);
-static void          _ecore_exe_pipe_read_cb(void *data, void *buf, unsigned int size);
-static int           _ecore_exe_pipe_write_cb(void *data, Ecore_Win32_Handler *wh);
-static void          _ecore_exe_pipe_error_cb(void *data, void *buf, unsigned int size);
+static Eina_Bool     _ecore_exe_close_cb(void                *data,
+                                         Ecore_Win32_Handler *wh);
+static void          _ecore_exe_pipe_read_cb(void        *data,
+                                             void        *buf,
+                                             unsigned int size);
+static int  _ecore_exe_pipe_write_cb(void                *data,
+                                     Ecore_Win32_Handler *wh);
+static void _ecore_exe_pipe_error_cb(void        *data,
+                                     void        *buf,
+                                     unsigned int size);
 
 EAPI int ECORE_EXE_EVENT_ADD = 0;
 EAPI int ECORE_EXE_EVENT_DEL = 0;
@@ -117,7 +127,7 @@ void
 _ecore_exe_shutdown(void)
 {
    while (exes)
-      ecore_exe_free(exes);
+     ecore_exe_free(exes);
 }
 
 static int run_pri = NORMAL_PRIORITY_CLASS;
@@ -127,26 +137,32 @@ ecore_exe_run_priority_set(int pri)
 {
    switch (pri)
      {
-     case ECORE_EXE_WIN32_PRIORITY_IDLE:
-       run_pri = IDLE_PRIORITY_CLASS;
-       break;
-     case ECORE_EXE_WIN32_PRIORITY_BELOW_NORMAL:
-       run_pri = BELOW_NORMAL_PRIORITY_CLASS;
-       break;
-     case ECORE_EXE_WIN32_PRIORITY_NORMAL:
-       run_pri = NORMAL_PRIORITY_CLASS;
-       break;
-     case ECORE_EXE_WIN32_PRIORITY_ABOVE_NORMAL:
-       run_pri = ABOVE_NORMAL_PRIORITY_CLASS;
-       break;
-     case ECORE_EXE_WIN32_PRIORITY_HIGH:
-       run_pri = HIGH_PRIORITY_CLASS;
-       break;
-     case ECORE_EXE_WIN32_PRIORITY_REALTIME:
-       run_pri = REALTIME_PRIORITY_CLASS;
-       break;
-     default:
-       break;
+      case ECORE_EXE_WIN32_PRIORITY_IDLE:
+        run_pri = IDLE_PRIORITY_CLASS;
+        break;
+
+      case ECORE_EXE_WIN32_PRIORITY_BELOW_NORMAL:
+        run_pri = BELOW_NORMAL_PRIORITY_CLASS;
+        break;
+
+      case ECORE_EXE_WIN32_PRIORITY_NORMAL:
+        run_pri = NORMAL_PRIORITY_CLASS;
+        break;
+
+      case ECORE_EXE_WIN32_PRIORITY_ABOVE_NORMAL:
+        run_pri = ABOVE_NORMAL_PRIORITY_CLASS;
+        break;
+
+      case ECORE_EXE_WIN32_PRIORITY_HIGH:
+        run_pri = HIGH_PRIORITY_CLASS;
+        break;
+
+      case ECORE_EXE_WIN32_PRIORITY_REALTIME:
+        run_pri = REALTIME_PRIORITY_CLASS;
+        break;
+
+      default:
+        break;
      }
 }
 
@@ -155,38 +171,47 @@ ecore_exe_run_priority_get(void)
 {
    switch (run_pri)
      {
-     case IDLE_PRIORITY_CLASS:
-       return ECORE_EXE_WIN32_PRIORITY_IDLE;
-     case BELOW_NORMAL_PRIORITY_CLASS:
-       return ECORE_EXE_WIN32_PRIORITY_BELOW_NORMAL;
-     case NORMAL_PRIORITY_CLASS:
-       return ECORE_EXE_WIN32_PRIORITY_NORMAL;
-     case ABOVE_NORMAL_PRIORITY_CLASS:
-       return ECORE_EXE_WIN32_PRIORITY_ABOVE_NORMAL;
-     case HIGH_PRIORITY_CLASS:
-       return ECORE_EXE_WIN32_PRIORITY_HIGH;
-     case REALTIME_PRIORITY_CLASS:
-       return ECORE_EXE_WIN32_PRIORITY_REALTIME;
-       /* default should not be reached */
-     default:
-       return ECORE_EXE_WIN32_PRIORITY_NORMAL;
+      case IDLE_PRIORITY_CLASS:
+        return ECORE_EXE_WIN32_PRIORITY_IDLE;
+
+      case BELOW_NORMAL_PRIORITY_CLASS:
+        return ECORE_EXE_WIN32_PRIORITY_BELOW_NORMAL;
+
+      case NORMAL_PRIORITY_CLASS:
+        return ECORE_EXE_WIN32_PRIORITY_NORMAL;
+
+      case ABOVE_NORMAL_PRIORITY_CLASS:
+        return ECORE_EXE_WIN32_PRIORITY_ABOVE_NORMAL;
+
+      case HIGH_PRIORITY_CLASS:
+        return ECORE_EXE_WIN32_PRIORITY_HIGH;
+
+      case REALTIME_PRIORITY_CLASS:
+        return ECORE_EXE_WIN32_PRIORITY_REALTIME;
+
+      /* default should not be reached */
+      default:
+        return ECORE_EXE_WIN32_PRIORITY_NORMAL;
      }
 }
 
 EAPI Ecore_Exe *
-ecore_exe_run(const char *exe_cmd, const void *data)
+ecore_exe_run(const char *exe_cmd,
+              const void *data)
 {
    return ecore_exe_pipe_run(exe_cmd, 0, data);
 }
 
 EAPI Ecore_Exe *
-ecore_exe_pipe_run(const char *exe_cmd, Ecore_Exe_Flags flags, const void *data)
+ecore_exe_pipe_run(const char     *exe_cmd,
+                   Ecore_Exe_Flags flags,
+                   const void     *data)
 {
-   STARTUPINFO          si;
-   PROCESS_INFORMATION  pi;
+   STARTUPINFO si;
+   PROCESS_INFORMATION pi;
    Ecore_Exe_Event_Add *e;
-   Ecore_Exe           *exe;
-   char                *ret = NULL;
+   Ecore_Exe *exe;
+   char *ret = NULL;
 
    exe = calloc(1, sizeof(Ecore_Exe));
    if (!exe)
@@ -271,24 +296,25 @@ ecore_exe_pipe_run(const char *exe_cmd, Ecore_Exe_Flags flags, const void *data)
 
    return exe;
 
- delete_h_close:
+delete_h_close:
    ecore_main_win32_handler_del(exe->h_close);
- close_process2:
+close_process2:
    CloseHandle(exe->process2);
- close_thread:
+close_thread:
    CloseHandle(exe->process_thread);
    CloseHandle(exe->process);
- free_exe_cmd:
+free_exe_cmd:
    free(exe->cmd);
- close_pipes:
+close_pipes:
    _ecore_exe_win32_pipes_close(exe);
- free_exe:
+free_exe:
    free(exe);
    return NULL;
 }
 
 EAPI void
-ecore_exe_callback_pre_free_set(Ecore_Exe *exe, Ecore_Exe_Cb func)
+ecore_exe_callback_pre_free_set(Ecore_Exe   *exe,
+                                Ecore_Exe_Cb func)
 {
    if (!ECORE_MAGIC_CHECK(exe, ECORE_MAGIC_EXE))
      {
@@ -300,7 +326,9 @@ ecore_exe_callback_pre_free_set(Ecore_Exe *exe, Ecore_Exe_Cb func)
 }
 
 EAPI Eina_Bool
-ecore_exe_send(Ecore_Exe *exe, const void *data, int size)
+ecore_exe_send(Ecore_Exe  *exe,
+               const void *data,
+               int         size)
 {
    void *buf;
 
@@ -350,16 +378,21 @@ ecore_exe_close_stdin(Ecore_Exe *exe)
 
 /* Not used on Windows */
 EAPI void
-ecore_exe_auto_limits_set(Ecore_Exe *exe __UNUSED__, int start_bytes __UNUSED__, int end_bytes __UNUSED__, int start_lines __UNUSED__, int end_lines __UNUSED__)
+ecore_exe_auto_limits_set(Ecore_Exe *exe __UNUSED__,
+                          int        start_bytes __UNUSED__,
+                          int        end_bytes __UNUSED__,
+                          int        start_lines __UNUSED__,
+                          int        end_lines __UNUSED__)
 {
 }
 
 EAPI Ecore_Exe_Event_Data *
-ecore_exe_event_data_get(Ecore_Exe *exe, Ecore_Exe_Flags flags)
+ecore_exe_event_data_get(Ecore_Exe      *exe,
+                         Ecore_Exe_Flags flags)
 {
    Ecore_Exe_Event_Data *e = NULL;
-   unsigned char        *inbuf;
-   int                   inbuf_num;
+   unsigned char *inbuf;
+   int inbuf_num;
 
    if (!ECORE_MAGIC_CHECK(exe, ECORE_MAGIC_EXE))
      {
@@ -445,7 +478,8 @@ ecore_exe_pid_get(const Ecore_Exe *exe)
 }
 
 EAPI void
-ecore_exe_tag_set(Ecore_Exe *exe, const char *tag)
+ecore_exe_tag_set(Ecore_Exe  *exe,
+                  const char *tag)
 {
    if (!ECORE_MAGIC_CHECK(exe, ECORE_MAGIC_EXE))
      {
@@ -454,7 +488,7 @@ ecore_exe_tag_set(Ecore_Exe *exe, const char *tag)
      }
    IF_FREE(exe->tag);
    if (tag)
-      exe->tag = strdup(tag);
+     exe->tag = strdup(tag);
 }
 
 EAPI const char *
@@ -545,7 +579,7 @@ ecore_exe_interrupt(Ecore_Exe *exe)
    CloseHandle(exe->process_thread);
    CloseHandle(exe->process);
    exe->sig = ECORE_EXE_WIN32_SIGINT;
-   while (EnumWindows(_ecore_exe_enum_windows_procedure, (LPARAM)exe));
+   while (EnumWindows(_ecore_exe_enum_windows_procedure, (LPARAM)exe)) ;
 }
 
 EAPI void
@@ -560,7 +594,7 @@ ecore_exe_quit(Ecore_Exe *exe)
    CloseHandle(exe->process_thread);
    CloseHandle(exe->process);
    exe->sig = ECORE_EXE_WIN32_SIGQUIT;
-   while (EnumWindows(_ecore_exe_enum_windows_procedure, (LPARAM)exe));
+   while (EnumWindows(_ecore_exe_enum_windows_procedure, (LPARAM)exe)) ;
 }
 
 EAPI void
@@ -575,7 +609,7 @@ ecore_exe_terminate(Ecore_Exe *exe)
 /*    CloseHandle(exe->thread); */
    CloseHandle(exe->process);
    exe->sig = ECORE_EXE_WIN32_SIGTERM;
-   while (EnumWindows(_ecore_exe_enum_windows_procedure, (LPARAM)exe));
+   while (EnumWindows(_ecore_exe_enum_windows_procedure, (LPARAM)exe)) ;
 }
 
 EAPI void
@@ -590,11 +624,12 @@ ecore_exe_kill(Ecore_Exe *exe)
    CloseHandle(exe->process_thread);
    CloseHandle(exe->process);
    exe->sig = ECORE_EXE_WIN32_SIGKILL;
-   while (EnumWindows(_ecore_exe_enum_windows_procedure, (LPARAM)exe));
+   while (EnumWindows(_ecore_exe_enum_windows_procedure, (LPARAM)exe)) ;
 }
 
 EAPI void
-ecore_exe_signal(Ecore_Exe *exe, int num __UNUSED__)
+ecore_exe_signal(Ecore_Exe *exe,
+                 int        num __UNUSED__)
 {
    if (!ECORE_MAGIC_CHECK(exe, ECORE_MAGIC_EXE))
      {
@@ -619,17 +654,18 @@ ecore_exe_hup(Ecore_Exe *exe)
 
 /* FIXME: manage error mode */
 static int
-_ecore_exe_win32_pipe_thread_generic_cb(void *data, Ecore_Exe_Flags flags)
+_ecore_exe_win32_pipe_thread_generic_cb(void           *data,
+                                        Ecore_Exe_Flags flags)
 {
 #define BUFSIZE 2048
-   char        buf[BUFSIZE];
-   Ecore_Exe  *exe;
-   char       *current_buf = NULL;
-   HANDLE      child_pipe;
+   char buf[BUFSIZE];
+   Ecore_Exe *exe;
+   char *current_buf = NULL;
+   HANDLE child_pipe;
    Ecore_Pipe *ecore_pipe;
    Ecore_Exe_Event_Data *event;
-   DWORD       size;
-   DWORD       current_size = 0;
+   DWORD size;
+   DWORD current_size = 0;
    BOOL res;
 
    exe = (Ecore_Exe *)data;
@@ -653,7 +689,7 @@ _ecore_exe_win32_pipe_thread_generic_cb(void *data, Ecore_Exe_Flags flags)
 
    while (1)
      {
-       if (!PeekNamedPipe(child_pipe, buf, sizeof(buf), &size, &current_size, NULL))
+        if (!PeekNamedPipe(child_pipe, buf, sizeof(buf), &size, &current_size, NULL))
           continue;
         if (size == 0)
           continue;
@@ -700,13 +736,13 @@ _ecore_exe_win32_pipe_thread_generic_cb(void *data, Ecore_Exe_Flags flags)
 static DWORD WINAPI
 _ecore_exe_win32_pipe_thread_read_cb(void *data)
 {
-  return _ecore_exe_win32_pipe_thread_generic_cb(data, ECORE_EXE_PIPE_READ);
+   return _ecore_exe_win32_pipe_thread_generic_cb(data, ECORE_EXE_PIPE_READ);
 }
 
 static DWORD WINAPI
 _ecore_exe_win32_pipe_thread_error_cb(void *data)
 {
-  return _ecore_exe_win32_pipe_thread_generic_cb(data, ECORE_EXE_PIPE_ERROR);
+   return _ecore_exe_win32_pipe_thread_generic_cb(data, ECORE_EXE_PIPE_ERROR);
 }
 
 static int
@@ -756,13 +792,13 @@ _ecore_exe_win32_pipes_set(Ecore_Exe *exe)
         exe->pipe_error.child_pipe_x = child_pipe_x;
         exe->pipe_error.p = ecore_pipe_add(_ecore_exe_pipe_error_cb, exe);
         exe->pipe_error.thread = CreateThread(NULL, 0,
-                                             _ecore_exe_win32_pipe_thread_error_cb,
-                                             exe, 0, NULL);
+                                              _ecore_exe_win32_pipe_thread_error_cb,
+                                              exe, 0, NULL);
      }
 
    return 1;
 
- close_pipe:
+close_pipe:
    CloseHandle(child_pipe);
    CloseHandle(child_pipe_x);
 
@@ -774,44 +810,44 @@ _ecore_exe_win32_pipes_close(Ecore_Exe *exe)
 {
    if (exe->flags & ECORE_EXE_PIPE_READ)
      {
-       if (exe->pipe_read.child_pipe)
-         {
-            CloseHandle(exe->pipe_read.child_pipe);
-            exe->pipe_read.child_pipe = NULL;
-         }
-       if (exe->pipe_read.child_pipe_x)
-         {
-           CloseHandle(exe->pipe_read.child_pipe_x);
-           exe->pipe_read.child_pipe_x = NULL;
-         }
+        if (exe->pipe_read.child_pipe)
+          {
+             CloseHandle(exe->pipe_read.child_pipe);
+             exe->pipe_read.child_pipe = NULL;
+          }
+        if (exe->pipe_read.child_pipe_x)
+          {
+             CloseHandle(exe->pipe_read.child_pipe_x);
+             exe->pipe_read.child_pipe_x = NULL;
+          }
      }
 
    if (exe->flags & ECORE_EXE_PIPE_WRITE)
      {
-       if (exe->pipe_write.child_pipe)
-         {
-            CloseHandle(exe->pipe_write.child_pipe);
-            exe->pipe_write.child_pipe = NULL;
-         }
-       if (exe->pipe_write.child_pipe_x)
-         {
-           CloseHandle(exe->pipe_write.child_pipe_x);
-           exe->pipe_write.child_pipe_x = NULL;
-         }
+        if (exe->pipe_write.child_pipe)
+          {
+             CloseHandle(exe->pipe_write.child_pipe);
+             exe->pipe_write.child_pipe = NULL;
+          }
+        if (exe->pipe_write.child_pipe_x)
+          {
+             CloseHandle(exe->pipe_write.child_pipe_x);
+             exe->pipe_write.child_pipe_x = NULL;
+          }
      }
 
    if (exe->flags & ECORE_EXE_PIPE_ERROR)
      {
-       if (exe->pipe_error.child_pipe)
-         {
-            CloseHandle(exe->pipe_error.child_pipe);
-            exe->pipe_error.child_pipe = NULL;
-         }
-       if (exe->pipe_error.child_pipe_x)
-         {
-           CloseHandle(exe->pipe_error.child_pipe_x);
-           exe->pipe_error.child_pipe_x = NULL;
-         }
+        if (exe->pipe_error.child_pipe)
+          {
+             CloseHandle(exe->pipe_error.child_pipe);
+             exe->pipe_error.child_pipe = NULL;
+          }
+        if (exe->pipe_error.child_pipe_x)
+          {
+             CloseHandle(exe->pipe_error.child_pipe_x);
+             exe->pipe_error.child_pipe_x = NULL;
+          }
      }
 }
 
@@ -824,10 +860,11 @@ _ecore_exe_thread_procedure(LPVOID data __UNUSED__)
 }
 
 static BOOL CALLBACK
-_ecore_exe_enum_windows_procedure(HWND window, LPARAM data)
+_ecore_exe_enum_windows_procedure(HWND   window,
+                                  LPARAM data)
 {
    Ecore_Exe *exe;
-   DWORD      thread_id;
+   DWORD thread_id;
 
    exe = (Ecore_Exe *)data;
    thread_id = GetWindowThreadProcessId(window, NULL);
@@ -835,62 +872,63 @@ _ecore_exe_enum_windows_procedure(HWND window, LPARAM data)
    if (thread_id == exe->thread_id)
      {
         /* Ctrl-C or Ctrl-Break */
-        if (CreateRemoteThread(exe->process, NULL, 0,
-                               (LPTHREAD_START_ROUTINE)_ecore_exe_thread_procedure, NULL,
-                               0, NULL))
-          {
-            printf ("remote thread\n");
-            return EINA_FALSE;
-          }
-
-        if ((exe->sig == ECORE_EXE_WIN32_SIGINT) ||
-            (exe->sig == ECORE_EXE_WIN32_SIGQUIT))
-          {
-            printf ("int or quit\n");
-            return EINA_FALSE;
-          }
-
-        /* WM_CLOSE message */
-        PostMessage(window, WM_CLOSE, 0, 0);
-        if (WaitForSingleObject(exe->process, ECORE_EXE_WIN32_TIMEOUT) == WAIT_OBJECT_0)
-          {
-            printf ("CLOSE\n");
-            return EINA_FALSE;
-          }
-
-        /* WM_QUIT message */
-        PostMessage(window, WM_QUIT, 0, 0);
-        if (WaitForSingleObject(exe->process, ECORE_EXE_WIN32_TIMEOUT) == WAIT_OBJECT_0)
-          {
-            printf ("QUIT\n");
-            return EINA_FALSE;
-          }
-
-        /* Exit process */
-        if (CreateRemoteThread(exe->process, NULL, 0,
-                               (LPTHREAD_START_ROUTINE)ExitProcess, NULL,
-                               0, NULL))
-          {
-            printf ("remote thread 2\n");
-            return EINA_FALSE;
-          }
-
-        if (exe->sig == ECORE_EXE_WIN32_SIGTERM)
-          {
-            printf ("term\n");
-            return EINA_FALSE;
-          }
-
-        TerminateProcess(exe->process, 0);
-
-        return EINA_FALSE;
+         if (CreateRemoteThread(exe->process, NULL, 0,
+                                (LPTHREAD_START_ROUTINE)_ecore_exe_thread_procedure, NULL,
+                                0, NULL))
+           {
+              printf ("remote thread\n");
+              return EINA_FALSE;
+           }
+
+         if ((exe->sig == ECORE_EXE_WIN32_SIGINT) ||
+             (exe->sig == ECORE_EXE_WIN32_SIGQUIT))
+           {
+              printf ("int or quit\n");
+              return EINA_FALSE;
+           }
+
+         /* WM_CLOSE message */
+         PostMessage(window, WM_CLOSE, 0, 0);
+         if (WaitForSingleObject(exe->process, ECORE_EXE_WIN32_TIMEOUT) == WAIT_OBJECT_0)
+           {
+              printf ("CLOSE\n");
+              return EINA_FALSE;
+           }
+
+         /* WM_QUIT message */
+         PostMessage(window, WM_QUIT, 0, 0);
+         if (WaitForSingleObject(exe->process, ECORE_EXE_WIN32_TIMEOUT) == WAIT_OBJECT_0)
+           {
+              printf ("QUIT\n");
+              return EINA_FALSE;
+           }
+
+         /* Exit process */
+         if (CreateRemoteThread(exe->process, NULL, 0,
+                                (LPTHREAD_START_ROUTINE)ExitProcess, NULL,
+                                0, NULL))
+           {
+              printf ("remote thread 2\n");
+              return EINA_FALSE;
+           }
+
+         if (exe->sig == ECORE_EXE_WIN32_SIGTERM)
+           {
+              printf ("term\n");
+              return EINA_FALSE;
+           }
+
+         TerminateProcess(exe->process, 0);
+
+         return EINA_FALSE;
      }
 
    return EINA_TRUE;
 }
 
 static void
-_ecore_exe_event_add_free(void *data __UNUSED__, void *ev)
+_ecore_exe_event_add_free(void *data __UNUSED__,
+                          void *ev)
 {
    Ecore_Exe_Event_Add *e;
 
@@ -899,7 +937,8 @@ _ecore_exe_event_add_free(void *data __UNUSED__, void *ev)
 }
 
 static void
-_ecore_exe_event_del_free(void *data __UNUSED__, void *ev)
+_ecore_exe_event_del_free(void *data __UNUSED__,
+                          void *ev)
 {
    Ecore_Exe_Event_Del *e;
 
@@ -910,7 +949,8 @@ _ecore_exe_event_del_free(void *data __UNUSED__, void *ev)
 }
 
 static void
-_ecore_exe_event_exe_data_free(void *data __UNUSED__, void *ev)
+_ecore_exe_event_exe_data_free(void *data __UNUSED__,
+                               void *ev)
 {
    Ecore_Exe_Event_Data *e;
 
@@ -919,11 +959,12 @@ _ecore_exe_event_exe_data_free(void *data __UNUSED__, void *ev)
 }
 
 static Eina_Bool
-_ecore_exe_close_cb(void *data, Ecore_Win32_Handler *wh __UNUSED__)
+_ecore_exe_close_cb(void                *data,
+                    Ecore_Win32_Handler *wh __UNUSED__)
 {
    Ecore_Exe_Event_Del *e;
-   Ecore_Exe           *exe;
-   DWORD                exit_code = 0;
+   Ecore_Exe *exe;
+   DWORD exit_code = 0;
 
    e = calloc(1, sizeof(Ecore_Exe_Event_Del));
    if (!e) return 0;
@@ -943,17 +984,19 @@ _ecore_exe_close_cb(void *data, Ecore_Win32_Handler *wh __UNUSED__)
         printf("%s\n", msg);
         free(msg);
      }
-     e->pid = exe->process_id;
-     e->exe = exe;
+   e->pid = exe->process_id;
+   e->exe = exe;
 
-     ecore_event_add(ECORE_EXE_EVENT_DEL, e,
-                     _ecore_exe_event_del_free, NULL);
+   ecore_event_add(ECORE_EXE_EVENT_DEL, e,
+                   _ecore_exe_event_del_free, NULL);
 
    return 0;
 }
 
 static void
-_ecore_exe_pipe_read_cb(void *data, void *buf, unsigned int size)
+_ecore_exe_pipe_read_cb(void        *data,
+                        void        *buf,
+                        unsigned int size)
 {
    Ecore_Exe_Event_Data *e;
 
@@ -965,19 +1008,20 @@ _ecore_exe_pipe_read_cb(void *data, void *buf, unsigned int size)
 }
 
 static int
-_ecore_exe_pipe_write_cb(void *data, Ecore_Win32_Handler *wh __UNUSED__)
+_ecore_exe_pipe_write_cb(void                *data,
+                         Ecore_Win32_Handler *wh __UNUSED__)
 {
-   char       buf[READBUFSIZ];
+   char buf[READBUFSIZ];
    Ecore_Exe *exe;
-   DWORD      num_exe;
-   BOOL       res;
+   DWORD num_exe;
+   BOOL res;
 
    exe = (Ecore_Exe *)data;
 
    res = WriteFile(exe->pipe_write.child_pipe_x, buf, READBUFSIZ, &num_exe, NULL);
    if (!res || num_exe == 0)
      {
-       /* FIXME: what to do here ?? */
+        /* FIXME: what to do here ?? */
      }
 
    if (exe->close_stdin == 1)
@@ -996,7 +1040,9 @@ _ecore_exe_pipe_write_cb(void *data, Ecore_Win32_Handler *wh __UNUSED__)
 }
 
 static void
-_ecore_exe_pipe_error_cb(void *data, void *buf, unsigned int size)
+_ecore_exe_pipe_error_cb(void        *data,
+                         void        *buf,
+                         unsigned int size)
 {
    Ecore_Exe_Event_Data *e;
 
@@ -1006,3 +1052,4 @@ _ecore_exe_pipe_error_cb(void *data, void *buf, unsigned int size)
                      _ecore_exe_event_exe_data_free,
                      NULL);
 }
+
index ad05867..c07fcbe 100644 (file)
@@ -18,3 +18,4 @@ void
 _ecore_exe_shutdown(void)
 {
 }
+
index 83840af..a978283 100644 (file)
@@ -16,7 +16,7 @@
 # ifdef  __cplusplus
 extern "C"
 # endif
-void *alloca (size_t);
+void *alloca(size_t);
 #endif
 
 #include <stdio.h>
@@ -27,11 +27,11 @@ void *alloca (size_t);
 #ifdef ENABLE_NLS
 # include <libintl.h>
 #else
-# define gettext(x) (x)
+# define gettext(x)          (x)
 # define dgettext(domain, x) (x)
 #endif
 
-#define _(x) dgettext("ecore", x)
+#define _(x)                 dgettext("ecore", x)
 
 #ifdef _WIN32_WCE
 # include <Evil.h>
@@ -47,7 +47,9 @@ static int cols = 80;
 static int helpcol = 80 / 3;
 
 static void
-_ecore_getopt_help_print_replace_program(FILE *fp, const Ecore_Getopt *parser __UNUSED__, const char *text)
+_ecore_getopt_help_print_replace_program(FILE               *fp,
+                                         const Ecore_Getopt *parser __UNUSED__,
+                                         const char         *text)
 {
    do
      {
@@ -82,7 +84,8 @@ _ecore_getopt_help_print_replace_program(FILE *fp, const Ecore_Getopt *parser __
 }
 
 static void
-_ecore_getopt_version(FILE *fp, const Ecore_Getopt *parser)
+_ecore_getopt_version(FILE               *fp,
+                      const Ecore_Getopt *parser)
 {
    fputs(_("Version:"), fp);
    fputc(' ', fp);
@@ -90,7 +93,8 @@ _ecore_getopt_version(FILE *fp, const Ecore_Getopt *parser)
 }
 
 static void
-_ecore_getopt_help_usage(FILE *fp, const Ecore_Getopt *parser)
+_ecore_getopt_help_usage(FILE               *fp,
+                         const Ecore_Getopt *parser)
 {
    fputs(_("Usage:"), fp);
    fputc(' ', fp);
@@ -105,80 +109,85 @@ _ecore_getopt_help_usage(FILE *fp, const Ecore_Getopt *parser)
 }
 
 static int
-_ecore_getopt_help_line(FILE *fp, const int base, const int total, int used, const char *text, int len)
+_ecore_getopt_help_line(FILE       *fp,
+                        const int   base,
+                        const int   total,
+                        int         used,
+                        const char *text,
+                        int         len)
 {
    int linebreak = 0;
    do
      {
         /* process line considering spaces (new line and tabs are spaces!) */
-        while ((used < total) && (len > 0))
-          {
-             const char *space = NULL;
-             int i, todo;
-
-             todo = total - used;
-             if (todo > len)
-               todo = len;
-
-             for (i = 0; i < todo; i++)
-               if (isspace(text[i]))
-                 {
-                    space = text + i;
-                    break;
-                 }
-
-             if (space)
-               {
-                  i = fwrite(text, 1, i, fp);
-                  i++;
-                  text += i;
-                  len -= i;
-                  used += i;
-
-                  if (linebreak)
-                    {
-                       linebreak = 0;
-                       continue;
-                    }
-
-                  if (space[0] == '\n')
-                    break;
-                  else if (space[0] == '\t')
-                    {
-                       int c;
-
-                       used--;
-                       c = ((used / 8) + 1) * 8;
-                       if (c < total)
-                         {
-                            for (; used < c; used++)
-                              fputc(' ', fp);
-                         }
-                       else
-                         {
-                            text--;
-                            len++;
-                            break;
-                         }
-                    }
-                  else if (used < total)
-                    fputc(space[0], fp);
-               }
-             else
-               {
-                  i = fwrite(text, 1, i, fp);
-                  text += i;
-                  len -= i;
-                  used += i;
-               }
-             linebreak = 0;
-          }
-        if (len <= 0)
-          break;
-        linebreak = 1;
-        fputc('\n', fp);
-        for (used = 0; used < base; used++)
-          fputc(' ', fp);
+         while ((used < total) && (len > 0))
+           {
+              const char *space = NULL;
+              int i, todo;
+
+              todo = total - used;
+              if (todo > len)
+                todo = len;
+
+              for (i = 0; i < todo; i++)
+                if (isspace(text[i]))
+                  {
+                     space = text + i;
+                     break;
+                  }
+
+              if (space)
+                {
+                   i = fwrite(text, 1, i, fp);
+                   i++;
+                   text += i;
+                   len -= i;
+                   used += i;
+
+                   if (linebreak)
+                     {
+                        linebreak = 0;
+                        continue;
+                     }
+
+                   if (space[0] == '\n')
+                     break;
+                   else if (space[0] == '\t')
+                     {
+                        int c;
+
+                        used--;
+                        c = ((used / 8) + 1) * 8;
+                        if (c < total)
+                          {
+                             for (; used < c; used++)
+                               fputc(' ', fp);
+                          }
+                        else
+                          {
+                             text--;
+                             len++;
+                             break;
+                          }
+                     }
+                   else if (used < total)
+                     fputc(space[0], fp);
+                }
+              else
+                {
+                   i = fwrite(text, 1, i, fp);
+                   text += i;
+                   len -= i;
+                   used += i;
+                }
+              linebreak = 0;
+           }
+         if (len <= 0)
+           break;
+         linebreak = 1;
+         fputc('\n', fp);
+         for (used = 0; used < base; used++)
+           fputc(' ', fp);
      }
    while (1);
 
@@ -186,7 +195,8 @@ _ecore_getopt_help_line(FILE *fp, const int base, const int total, int used, con
 }
 
 static void
-_ecore_getopt_help_description(FILE *fp, const Ecore_Getopt *parser)
+_ecore_getopt_help_description(FILE               *fp,
+                               const Ecore_Getopt *parser)
 {
    const char *p, *prg, *ver;
    int used, prglen, verlen;
@@ -242,7 +252,8 @@ _ecore_getopt_help_description(FILE *fp, const Ecore_Getopt *parser)
 }
 
 static void
-_ecore_getopt_copyright(FILE *fp, const Ecore_Getopt *parser)
+_ecore_getopt_copyright(FILE               *fp,
+                        const Ecore_Getopt *parser)
 {
    const char *txt = gettext(parser->copyright);
    fputs(_("Copyright:"), fp);
@@ -253,7 +264,8 @@ _ecore_getopt_copyright(FILE *fp, const Ecore_Getopt *parser)
 }
 
 static void
-_ecore_getopt_license(FILE *fp, const Ecore_Getopt *parser)
+_ecore_getopt_license(FILE               *fp,
+                      const Ecore_Getopt *parser)
 {
    const char *txt = gettext(parser->license);
    fputs(_("License:"), fp);
@@ -269,32 +281,45 @@ _ecore_getopt_desc_arg_requirement(const Ecore_Getopt_Desc *desc)
    switch (desc->action)
      {
       case ECORE_GETOPT_ACTION_STORE:
-         return desc->action_param.store.arg_req;
+        return desc->action_param.store.arg_req;
+
       case ECORE_GETOPT_ACTION_STORE_CONST:
-         return ECORE_GETOPT_DESC_ARG_REQUIREMENT_NO;
+        return ECORE_GETOPT_DESC_ARG_REQUIREMENT_NO;
+
       case ECORE_GETOPT_ACTION_STORE_TRUE:
-         return ECORE_GETOPT_DESC_ARG_REQUIREMENT_NO;
+        return ECORE_GETOPT_DESC_ARG_REQUIREMENT_NO;
+
       case ECORE_GETOPT_ACTION_STORE_FALSE:
-         return ECORE_GETOPT_DESC_ARG_REQUIREMENT_NO;
+        return ECORE_GETOPT_DESC_ARG_REQUIREMENT_NO;
+
       case ECORE_GETOPT_ACTION_CHOICE:
-         return ECORE_GETOPT_DESC_ARG_REQUIREMENT_YES;
+        return ECORE_GETOPT_DESC_ARG_REQUIREMENT_YES;
+
       case ECORE_GETOPT_ACTION_APPEND:
-         return ECORE_GETOPT_DESC_ARG_REQUIREMENT_YES;
+        return ECORE_GETOPT_DESC_ARG_REQUIREMENT_YES;
+
       case ECORE_GETOPT_ACTION_COUNT:
-         return ECORE_GETOPT_DESC_ARG_REQUIREMENT_NO;
+        return ECORE_GETOPT_DESC_ARG_REQUIREMENT_NO;
+
       case ECORE_GETOPT_ACTION_CALLBACK:
-         return desc->action_param.callback.arg_req;
+        return desc->action_param.callback.arg_req;
+
       case ECORE_GETOPT_ACTION_HELP:
-         return ECORE_GETOPT_DESC_ARG_REQUIREMENT_NO;
+        return ECORE_GETOPT_DESC_ARG_REQUIREMENT_NO;
+
       case ECORE_GETOPT_ACTION_VERSION:
-         return ECORE_GETOPT_DESC_ARG_REQUIREMENT_NO;
+        return ECORE_GETOPT_DESC_ARG_REQUIREMENT_NO;
+
       default:
-         return ECORE_GETOPT_DESC_ARG_REQUIREMENT_NO;
+        return ECORE_GETOPT_DESC_ARG_REQUIREMENT_NO;
      }
 }
 
 static void
-_ecore_getopt_help_desc_setup_metavar(const Ecore_Getopt_Desc *desc, char *metavar, int *metavarlen, int maxsize)
+_ecore_getopt_help_desc_setup_metavar(const Ecore_Getopt_Desc *desc,
+                                      char                    *metavar,
+                                      int                     *metavarlen,
+                                      int                      maxsize)
 {
    if (desc->metavar)
      {
@@ -321,7 +346,10 @@ _ecore_getopt_help_desc_setup_metavar(const Ecore_Getopt_Desc *desc, char *metav
 }
 
 static int
-_ecore_getopt_help_desc_show_arg(FILE *fp, Ecore_Getopt_Desc_Arg_Requirement requirement, const char *metavar, int metavarlen)
+_ecore_getopt_help_desc_show_arg(FILE                             *fp,
+                                 Ecore_Getopt_Desc_Arg_Requirement requirement,
+                                 const char                       *metavar,
+                                 int                               metavarlen)
 {
    int used;
 
@@ -353,7 +381,11 @@ _ecore_getopt_help_desc_show_arg(FILE *fp, Ecore_Getopt_Desc_Arg_Requirement req
 }
 
 static int
-_ecore_getopt_help_desc_store(FILE *fp, const int base, const int total, int used, const Ecore_Getopt_Desc *desc)
+_ecore_getopt_help_desc_store(FILE                    *fp,
+                              const int                base,
+                              const int                total,
+                              int                      used,
+                              const Ecore_Getopt_Desc *desc)
 {
    const Ecore_Getopt_Desc_Store *store = &desc->action_param.store;
    char buf[64];
@@ -367,123 +399,145 @@ _ecore_getopt_help_desc_store(FILE *fp, const int base, const int total, int use
    switch (store->type)
      {
       case ECORE_GETOPT_TYPE_STR:
-         str = "STR";
-         len = sizeof("STR") - 1;
-         break;
+        str = "STR";
+        len = sizeof("STR") - 1;
+        break;
+
       case ECORE_GETOPT_TYPE_BOOL:
-         str = "BOOL";
-         len = sizeof("BOOL") - 1;
-         break;
+        str = "BOOL";
+        len = sizeof("BOOL") - 1;
+        break;
+
       case ECORE_GETOPT_TYPE_SHORT:
-         str = "SHORT";
-         len = sizeof("SHORT") - 1;
-         break;
+        str = "SHORT";
+        len = sizeof("SHORT") - 1;
+        break;
+
       case ECORE_GETOPT_TYPE_INT:
-         str = "INT";
-         len = sizeof("INT") - 1;
-         break;
+        str = "INT";
+        len = sizeof("INT") - 1;
+        break;
+
       case ECORE_GETOPT_TYPE_LONG:
-         str = "LONG";
-         len = sizeof("LONG") - 1;
-         break;
+        str = "LONG";
+        len = sizeof("LONG") - 1;
+        break;
+
       case ECORE_GETOPT_TYPE_USHORT:
-         str = "USHORT";
-         len = sizeof("USHORT") - 1;
-         break;
+        str = "USHORT";
+        len = sizeof("USHORT") - 1;
+        break;
+
       case ECORE_GETOPT_TYPE_UINT:
-         str = "UINT";
-         len = sizeof("UINT") - 1;
-         break;
+        str = "UINT";
+        len = sizeof("UINT") - 1;
+        break;
+
       case ECORE_GETOPT_TYPE_ULONG:
-         str = "ULONG";
-         len = sizeof("ULONG") - 1;
-         break;
+        str = "ULONG";
+        len = sizeof("ULONG") - 1;
+        break;
+
       case ECORE_GETOPT_TYPE_DOUBLE:
-         str = "DOUBLE";
-         len = sizeof("DOUBLE") - 1;
-         break;
+        str = "DOUBLE";
+        len = sizeof("DOUBLE") - 1;
+        break;
+
       default:
-         str = "???";
-         len = sizeof("???") - 1;
+        str = "???";
+        len = sizeof("???") - 1;
      }
 
    used = _ecore_getopt_help_line
-     (fp, base, total, used, _("Type: "), strlen(_("Type: ")));
+       (fp, base, total, used, _("Type: "), strlen(_("Type: ")));
    used = _ecore_getopt_help_line(fp, base, total, used, str, len);
 
    if (store->arg_req == ECORE_GETOPT_DESC_ARG_REQUIREMENT_YES)
      goto end;
 
    used = _ecore_getopt_help_line
-     (fp, base, total, used, ". ", sizeof(". ") - 1);
+       (fp, base, total, used, ". ", sizeof(". ") - 1);
 
    switch (store->type)
      {
       case ECORE_GETOPT_TYPE_STR:
-         str = store->def.strv;
-         len = str ? strlen(str) : 0;
-         break;
+        str = store->def.strv;
+        len = str ? strlen(str) : 0;
+        break;
+
       case ECORE_GETOPT_TYPE_BOOL:
-         str = store->def.boolv ? "true" : "false";
-         len = strlen(str);
-         break;
+        str = store->def.boolv ? "true" : "false";
+        len = strlen(str);
+        break;
+
       case ECORE_GETOPT_TYPE_SHORT:
-         str = buf;
-         len = snprintf(buf, sizeof(buf), "%hd", store->def.shortv);
-         if (len > sizeof(buf) - 1)
-           len = sizeof(buf) - 1;
-         break;
+        str = buf;
+        len = snprintf(buf, sizeof(buf), "%hd", store->def.shortv);
+        if (len > sizeof(buf) - 1)
+          len = sizeof(buf) - 1;
+        break;
+
       case ECORE_GETOPT_TYPE_INT:
-         str = buf;
-         len = snprintf(buf, sizeof(buf), "%d", store->def.intv);
-         if (len > sizeof(buf) - 1)
-           len = sizeof(buf) - 1;
-         break;
+        str = buf;
+        len = snprintf(buf, sizeof(buf), "%d", store->def.intv);
+        if (len > sizeof(buf) - 1)
+          len = sizeof(buf) - 1;
+        break;
+
       case ECORE_GETOPT_TYPE_LONG:
-         str = buf;
-         len = snprintf(buf, sizeof(buf), "%ld", store->def.longv);
-         if (len > sizeof(buf) - 1)
-           len = sizeof(buf) - 1;
-         break;
+        str = buf;
+        len = snprintf(buf, sizeof(buf), "%ld", store->def.longv);
+        if (len > sizeof(buf) - 1)
+          len = sizeof(buf) - 1;
+        break;
+
       case ECORE_GETOPT_TYPE_USHORT:
-         str = buf;
-         len = snprintf(buf, sizeof(buf), "%hu", store->def.ushortv);
-         if (len > sizeof(buf) - 1)
-           len = sizeof(buf) - 1;
-         break;
+        str = buf;
+        len = snprintf(buf, sizeof(buf), "%hu", store->def.ushortv);
+        if (len > sizeof(buf) - 1)
+          len = sizeof(buf) - 1;
+        break;
+
       case ECORE_GETOPT_TYPE_UINT:
-         str = buf;
-         len = snprintf(buf, sizeof(buf), "%u", store->def.uintv);
-         if (len > sizeof(buf) - 1)
-           len = sizeof(buf) - 1;
-         break;
+        str = buf;
+        len = snprintf(buf, sizeof(buf), "%u", store->def.uintv);
+        if (len > sizeof(buf) - 1)
+          len = sizeof(buf) - 1;
+        break;
+
       case ECORE_GETOPT_TYPE_ULONG:
-         str = buf;
-         len = snprintf(buf, sizeof(buf), "%lu", store->def.ulongv);
-         if (len > sizeof(buf) - 1)
-           len = sizeof(buf) - 1;
-         break;
+        str = buf;
+        len = snprintf(buf, sizeof(buf), "%lu", store->def.ulongv);
+        if (len > sizeof(buf) - 1)
+          len = sizeof(buf) - 1;
+        break;
+
       case ECORE_GETOPT_TYPE_DOUBLE:
-         str = buf;
-         len = snprintf(buf, sizeof(buf), "%f", store->def.doublev);
-         if (len > sizeof(buf) - 1)
-           len = sizeof(buf) - 1;
-         break;
+        str = buf;
+        len = snprintf(buf, sizeof(buf), "%f", store->def.doublev);
+        if (len > sizeof(buf) - 1)
+          len = sizeof(buf) - 1;
+        break;
+
       default:
-         str = "???";
-         len = sizeof("???") - 1;
+        str = "???";
+        len = sizeof("???") - 1;
      }
 
    used = _ecore_getopt_help_line
-     (fp, base, total, used, _("Default: "), strlen(_("Default: ")));
+       (fp, base, total, used, _("Default: "), strlen(_("Default: ")));
    used = _ecore_getopt_help_line(fp, base, total, used, str, len);
 
- end:
+end:
    return _ecore_getopt_help_line(fp, base, total, used, ".", 1);
 }
 
 static int
-_ecore_getopt_help_desc_choices(FILE *fp, const int base, const int total, int used, const Ecore_Getopt_Desc *desc)
+_ecore_getopt_help_desc_choices(FILE                    *fp,
+                                const int                base,
+                                const int                total,
+                                int                      used,
+                                const Ecore_Getopt_Desc *desc)
 {
    const char *const *itr;
    const char sep[] = ", ";
@@ -498,12 +552,12 @@ _ecore_getopt_help_desc_choices(FILE *fp, const int base, const int total, int u
      fputc(' ', fp);
 
    used = _ecore_getopt_help_line
-     (fp, base, total, used, _("Choices: "), strlen(_("Choices: ")));
+       (fp, base, total, used, _("Choices: "), strlen(_("Choices: ")));
 
    for (itr = desc->action_param.choices; *itr; itr++)
      {
         used = _ecore_getopt_help_line
-          (fp, base, total, used, *itr, strlen(*itr));
+            (fp, base, total, used, *itr, strlen(*itr));
         if (itr[1])
           used = _ecore_getopt_help_line(fp, base, total, used, sep, seplen);
      }
@@ -512,7 +566,8 @@ _ecore_getopt_help_desc_choices(FILE *fp, const int base, const int total, int u
 }
 
 static void
-_ecore_getopt_help_desc(FILE *fp, const Ecore_Getopt_Desc *desc)
+_ecore_getopt_help_desc(FILE                    *fp,
+                        const Ecore_Getopt_Desc *desc)
 {
    Ecore_Getopt_Desc_Arg_Requirement arg_req;
    char metavar[32] = "ARG";
@@ -533,7 +588,7 @@ _ecore_getopt_help_desc(FILE *fp, const Ecore_Getopt_Desc *desc)
         fputc(desc->shortname, fp);
         used += 2;
         used += _ecore_getopt_help_desc_show_arg
-          (fp, arg_req, metavar, metavarlen);
+            (fp, arg_req, metavar, metavarlen);
      }
 
    if (desc->shortname && desc->longname)
@@ -550,7 +605,7 @@ _ecore_getopt_help_desc(FILE *fp, const Ecore_Getopt_Desc *desc)
         fputs(desc->longname, fp);
         used += 2 + namelen;
         used += _ecore_getopt_help_desc_show_arg
-          (fp, arg_req, metavar, metavarlen);
+            (fp, arg_req, metavar, metavarlen);
      }
 
    if (!desc->help)
@@ -566,21 +621,23 @@ _ecore_getopt_help_desc(FILE *fp, const Ecore_Getopt_Desc *desc)
      fputc(' ', fp);
 
    used = _ecore_getopt_help_line
-     (fp, helpcol, cols, used, desc->help, strlen(desc->help));
+       (fp, helpcol, cols, used, desc->help, strlen(desc->help));
 
    switch (desc->action)
      {
       case ECORE_GETOPT_ACTION_STORE:
-         _ecore_getopt_help_desc_store(fp, helpcol, cols, used, desc);
-         break;
+        _ecore_getopt_help_desc_store(fp, helpcol, cols, used, desc);
+        break;
+
       case ECORE_GETOPT_ACTION_CHOICE:
-         _ecore_getopt_help_desc_choices(fp, helpcol, cols, used, desc);
-         break;
+        _ecore_getopt_help_desc_choices(fp, helpcol, cols, used, desc);
+        break;
+
       default:
-         break;
+        break;
      }
 
- end:
+end:
    fputc('\n', fp);
 }
 
@@ -591,7 +648,8 @@ _ecore_getopt_desc_is_sentinel(const Ecore_Getopt_Desc *desc)
 }
 
 static void
-_ecore_getopt_help_options(FILE *fp, const Ecore_Getopt *parser)
+_ecore_getopt_help_options(FILE               *fp,
+                           const Ecore_Getopt *parser)
 {
    const Ecore_Getopt_Desc *desc;
 
@@ -609,7 +667,8 @@ _ecore_getopt_help_options(FILE *fp, const Ecore_Getopt *parser)
  * Message will be print to stderr.
  */
 void
-ecore_getopt_help(FILE *fp, const Ecore_Getopt *parser)
+ecore_getopt_help(FILE               *fp,
+                  const Ecore_Getopt *parser)
 {
    const char *var;
 
@@ -640,7 +699,8 @@ ecore_getopt_help(FILE *fp, const Ecore_Getopt *parser)
 }
 
 static const Ecore_Getopt_Desc *
-_ecore_getopt_parse_find_long(const Ecore_Getopt *parser, const char *name)
+_ecore_getopt_parse_find_long(const Ecore_Getopt *parser,
+                              const char         *name)
 {
    const Ecore_Getopt_Desc *desc = parser->descs;
    const char *p = strchr(name, '=');
@@ -671,7 +731,8 @@ _ecore_getopt_parse_find_long(const Ecore_Getopt *parser, const char *name)
 }
 
 static const Ecore_Getopt_Desc *
-_ecore_getopt_parse_find_short(const Ecore_Getopt *parser, char name)
+_ecore_getopt_parse_find_short(const Ecore_Getopt *parser,
+                               char                name)
 {
    const Ecore_Getopt_Desc *desc = parser->descs;
    for (; !_ecore_getopt_desc_is_sentinel(desc); desc++)
@@ -681,12 +742,14 @@ _ecore_getopt_parse_find_short(const Ecore_Getopt *parser, char name)
 }
 
 static int
-_ecore_getopt_parse_find_nonargs_base(const Ecore_Getopt *parser, int argc, char **argv)
+_ecore_getopt_parse_find_nonargs_base(const Ecore_Getopt *parser,
+                                      int                 argc,
+                                      char              **argv)
 {
    char **nonargs;
    int src, dst, used, base;
 
-   nonargs = alloca(sizeof(char*) * argc);
+   nonargs = alloca(sizeof(char *) * argc);
    src = 1;
    dst = 1;
    used = 0;
@@ -748,7 +811,7 @@ _ecore_getopt_parse_find_nonargs_base(const Ecore_Getopt *parser, int argc, char
         dst++;
         continue;
 
-     found_nonarg:
+found_nonarg:
         nonargs[used] = arg;
         used++;
         src++;
@@ -769,7 +832,9 @@ _ecore_getopt_parse_find_nonargs_base(const Ecore_Getopt *parser, int argc, char
 }
 
 static void
-_ecore_getopt_desc_print_error(const Ecore_Getopt_Desc *desc, const char *fmt, ...)
+_ecore_getopt_desc_print_error(const Ecore_Getopt_Desc *desc,
+                               const char              *fmt,
+                               ...)
 {
    va_list ap;
 
@@ -798,7 +863,8 @@ _ecore_getopt_desc_print_error(const Ecore_Getopt_Desc *desc, const char *fmt, .
 }
 
 static Eina_Bool
-_ecore_getopt_parse_bool(const char *str, Eina_Bool *v)
+_ecore_getopt_parse_bool(const char *str,
+                         Eina_Bool  *v)
 {
    if ((strcmp(str, "0") == 0) ||
        (strcasecmp(str, "f") == 0) ||
@@ -825,7 +891,8 @@ _ecore_getopt_parse_bool(const char *str, Eina_Bool *v)
 }
 
 static Eina_Bool
-_ecore_getopt_parse_long(const char *str, long int *v)
+_ecore_getopt_parse_long(const char *str,
+                         long int   *v)
 {
    char *endptr = NULL;
    *v = strtol(str, &endptr, 0);
@@ -833,7 +900,8 @@ _ecore_getopt_parse_long(const char *str, long int *v)
 }
 
 static Eina_Bool
-_ecore_getopt_parse_double(const char *str, double *v)
+_ecore_getopt_parse_double(const char *str,
+                           double     *v)
 {
    char *endptr = NULL;
    *v = strtod(str, &endptr);
@@ -841,7 +909,10 @@ _ecore_getopt_parse_double(const char *str, double *v)
 }
 
 static Eina_Bool
-_ecore_getopt_parse_store(const Ecore_Getopt *parser __UNUSED__, const Ecore_Getopt_Desc *desc, Ecore_Getopt_Value *value, const char *arg_val)
+_ecore_getopt_parse_store(const Ecore_Getopt      *parser __UNUSED__,
+                          const Ecore_Getopt_Desc *desc,
+                          Ecore_Getopt_Value      *value,
+                          const char              *arg_val)
 {
    const Ecore_Getopt_Desc_Store *store = &desc->action_param.store;
    long int v;
@@ -857,112 +928,133 @@ _ecore_getopt_parse_store(const Ecore_Getopt *parser __UNUSED__, const Ecore_Get
    switch (store->arg_req)
      {
       case ECORE_GETOPT_DESC_ARG_REQUIREMENT_NO:
-         goto use_optional;
+        goto use_optional;
+
       case ECORE_GETOPT_DESC_ARG_REQUIREMENT_OPTIONAL:
-         if (!arg_val)
-           goto use_optional;
+        if (!arg_val)
+          goto use_optional;
+
       case ECORE_GETOPT_DESC_ARG_REQUIREMENT_YES:
-         break;
+        break;
      }
 
    switch (store->type)
      {
       case ECORE_GETOPT_TYPE_STR:
-         *value->strp = (char *)arg_val;
-         return EINA_TRUE;
+        *value->strp = (char *)arg_val;
+        return EINA_TRUE;
+
       case ECORE_GETOPT_TYPE_BOOL:
-         if (_ecore_getopt_parse_bool(arg_val, &b))
-           {
-              *value->boolp = b;
-              return EINA_TRUE;
-           }
-         else
-           {
-              _ecore_getopt_desc_print_error
-                (desc, _("unknown boolean value %s.\n"), arg_val);
-              return EINA_FALSE;
-           }
+        if (_ecore_getopt_parse_bool(arg_val, &b))
+          {
+             *value->boolp = b;
+             return EINA_TRUE;
+          }
+        else
+          {
+             _ecore_getopt_desc_print_error
+               (desc, _("unknown boolean value %s.\n"), arg_val);
+             return EINA_FALSE;
+          }
+
       case ECORE_GETOPT_TYPE_SHORT:
-         if (!_ecore_getopt_parse_long(arg_val, &v))
-           goto error;
-         *value->shortp = v;
-         return EINA_TRUE;
+        if (!_ecore_getopt_parse_long(arg_val, &v))
+          goto error;
+        *value->shortp = v;
+        return EINA_TRUE;
+
       case ECORE_GETOPT_TYPE_INT:
-         if (!_ecore_getopt_parse_long(arg_val, &v))
-           goto error;
-         *value->intp = v;
-         return EINA_TRUE;
+        if (!_ecore_getopt_parse_long(arg_val, &v))
+          goto error;
+        *value->intp = v;
+        return EINA_TRUE;
+
       case ECORE_GETOPT_TYPE_LONG:
-         if (!_ecore_getopt_parse_long(arg_val, &v))
-           goto error;
-         *value->longp = v;
-         return EINA_TRUE;
+        if (!_ecore_getopt_parse_long(arg_val, &v))
+          goto error;
+        *value->longp = v;
+        return EINA_TRUE;
+
       case ECORE_GETOPT_TYPE_USHORT:
-         if (!_ecore_getopt_parse_long(arg_val, &v))
-           goto error;
-         *value->ushortp = v;
-         return EINA_TRUE;
+        if (!_ecore_getopt_parse_long(arg_val, &v))
+          goto error;
+        *value->ushortp = v;
+        return EINA_TRUE;
+
       case ECORE_GETOPT_TYPE_UINT:
-         if (!_ecore_getopt_parse_long(arg_val, &v))
-           goto error;
-         *value->uintp = v;
-         return EINA_TRUE;
+        if (!_ecore_getopt_parse_long(arg_val, &v))
+          goto error;
+        *value->uintp = v;
+        return EINA_TRUE;
+
       case ECORE_GETOPT_TYPE_ULONG:
-         if (!_ecore_getopt_parse_long(arg_val, &v))
-           goto error;
-         *value->ulongp = v;
-         return EINA_TRUE;
+        if (!_ecore_getopt_parse_long(arg_val, &v))
+          goto error;
+        *value->ulongp = v;
+        return EINA_TRUE;
+
       case ECORE_GETOPT_TYPE_DOUBLE:
-         if (!_ecore_getopt_parse_double(arg_val, &d))
-           goto error;
-         *value->doublep = d;
-         break;
+        if (!_ecore_getopt_parse_double(arg_val, &d))
+          goto error;
+        *value->doublep = d;
+        break;
      }
 
    return EINA_TRUE;
 
- error:
+error:
    _ecore_getopt_desc_print_error
      (desc, _("invalid number format %s\n"), arg_val);
    return EINA_FALSE;
 
- use_optional:
+use_optional:
    switch (store->type)
      {
       case ECORE_GETOPT_TYPE_STR:
-         *value->strp = (char *)store->def.strv;
-         break;
+        *value->strp = (char *)store->def.strv;
+        break;
+
       case ECORE_GETOPT_TYPE_BOOL:
-         *value->boolp = store->def.boolv;
-         break;
+        *value->boolp = store->def.boolv;
+        break;
+
       case ECORE_GETOPT_TYPE_SHORT:
-         *value->shortp = store->def.shortv;
-         break;
+        *value->shortp = store->def.shortv;
+        break;
+
       case ECORE_GETOPT_TYPE_INT:
-         *value->intp = store->def.intv;
-         break;
+        *value->intp = store->def.intv;
+        break;
+
       case ECORE_GETOPT_TYPE_LONG:
-         *value->longp = store->def.longv;
-         break;
+        *value->longp = store->def.longv;
+        break;
+
       case ECORE_GETOPT_TYPE_USHORT:
-         *value->ushortp = store->def.ushortv;
-         break;
+        *value->ushortp = store->def.ushortv;
+        break;
+
       case ECORE_GETOPT_TYPE_UINT:
-         *value->uintp = store->def.uintv;
-         break;
+        *value->uintp = store->def.uintv;
+        break;
+
       case ECORE_GETOPT_TYPE_ULONG:
-         *value->ulongp = store->def.ulongv;
-         break;
+        *value->ulongp = store->def.ulongv;
+        break;
+
       case ECORE_GETOPT_TYPE_DOUBLE:
-         *value->doublep = store->def.doublev;
-         break;
+        *value->doublep = store->def.doublev;
+        break;
      }
 
    return EINA_TRUE;
 }
 
 static Eina_Bool
-_ecore_getopt_parse_store_const(const Ecore_Getopt *parser __UNUSED__, const Ecore_Getopt_Desc *desc, Ecore_Getopt_Value *val, const char *arg_val __UNUSED__)
+_ecore_getopt_parse_store_const(const Ecore_Getopt      *parser __UNUSED__,
+                                const Ecore_Getopt_Desc *desc,
+                                Ecore_Getopt_Value      *val,
+                                const char              *arg_val __UNUSED__)
 {
    if (!val->ptrp)
      {
@@ -975,7 +1067,10 @@ _ecore_getopt_parse_store_const(const Ecore_Getopt *parser __UNUSED__, const Eco
 }
 
 static Eina_Bool
-_ecore_getopt_parse_store_true(const Ecore_Getopt *parser __UNUSED__, const Ecore_Getopt_Desc *desc, Ecore_Getopt_Value *val, const char *arg_val __UNUSED__)
+_ecore_getopt_parse_store_true(const Ecore_Getopt      *parser __UNUSED__,
+                               const Ecore_Getopt_Desc *desc,
+                               Ecore_Getopt_Value      *val,
+                               const char              *arg_val __UNUSED__)
 {
    if (!val->boolp)
      {
@@ -987,7 +1082,10 @@ _ecore_getopt_parse_store_true(const Ecore_Getopt *parser __UNUSED__, const Ecor
 }
 
 static Eina_Bool
-_ecore_getopt_parse_store_false(const Ecore_Getopt *parser __UNUSED__, const Ecore_Getopt_Desc *desc, Ecore_Getopt_Value *val, const char *arg_val __UNUSED__)
+_ecore_getopt_parse_store_false(const Ecore_Getopt      *parser __UNUSED__,
+                                const Ecore_Getopt_Desc *desc,
+                                Ecore_Getopt_Value      *val,
+                                const char              *arg_val __UNUSED__)
 {
    if (!val->boolp)
      {
@@ -999,9 +1097,12 @@ _ecore_getopt_parse_store_false(const Ecore_Getopt *parser __UNUSED__, const Eco
 }
 
 static Eina_Bool
-_ecore_getopt_parse_choice(const Ecore_Getopt *parser __UNUSED__, const Ecore_Getopt_Desc *desc, Ecore_Getopt_Value *val, const char *arg_val)
+_ecore_getopt_parse_choice(const Ecore_Getopt      *parser __UNUSED__,
+                           const Ecore_Getopt_Desc *desc,
+                           Ecore_Getopt_Value      *val,
+                           const char              *arg_val)
 {
-   const char * const *pchoice;
+   const char *const *pchoice;
 
    if (!val->strp)
      {
@@ -1033,7 +1134,10 @@ _ecore_getopt_parse_choice(const Ecore_Getopt *parser __UNUSED__, const Ecore_Ge
 }
 
 static Eina_Bool
-_ecore_getopt_parse_append(const Ecore_Getopt *parser __UNUSED__, const Ecore_Getopt_Desc *desc, Ecore_Getopt_Value *val, const char *arg_val)
+_ecore_getopt_parse_append(const Ecore_Getopt      *parser __UNUSED__,
+                           const Ecore_Getopt_Desc *desc,
+                           Ecore_Getopt_Value      *val,
+                           const char              *arg_val)
 {
    void *data;
    long int v;
@@ -1056,104 +1160,116 @@ _ecore_getopt_parse_append(const Ecore_Getopt *parser __UNUSED__, const Ecore_Ge
    switch (desc->action_param.append_type)
      {
       case ECORE_GETOPT_TYPE_STR:
-         data = strdup(arg_val);
-         break;
-      case ECORE_GETOPT_TYPE_BOOL:
-        {
-           if (_ecore_getopt_parse_bool(arg_val, &b))
-             {
-                data = malloc(sizeof(Eina_Bool));
-                if (data)
-                  *(Eina_Bool *)data = b;
-             }
-           else
-             {
-                _ecore_getopt_desc_print_error(desc, _("unknown boolean value %s.\n"), arg_val);
-                return EINA_FALSE;
-             }
-        }
+        data = strdup(arg_val);
         break;
+
+      case ECORE_GETOPT_TYPE_BOOL:
+      {
+         if (_ecore_getopt_parse_bool(arg_val, &b))
+           {
+              data = malloc(sizeof(Eina_Bool));
+              if (data)
+                *(Eina_Bool *)data = b;
+           }
+         else
+           {
+              _ecore_getopt_desc_print_error(desc, _("unknown boolean value %s.\n"), arg_val);
+              return EINA_FALSE;
+           }
+      }
+      break;
+
       case ECORE_GETOPT_TYPE_SHORT:
-        {
-           if (!_ecore_getopt_parse_long(arg_val, &v))
-             goto error;
-           data = malloc(sizeof(short));
-           if (data)
-             *(short *)data = (short)v;
-        }
-        break;
+      {
+         if (!_ecore_getopt_parse_long(arg_val, &v))
+           goto error;
+         data = malloc(sizeof(short));
+         if (data)
+           *(short *)data = (short)v;
+      }
+      break;
+
       case ECORE_GETOPT_TYPE_INT:
-        {
-           if (!_ecore_getopt_parse_long(arg_val, &v))
-             goto error;
-           data = malloc(sizeof(int));
-           if (data)
-             *(int *)data = (int)v;
-        }
-        break;
+      {
+         if (!_ecore_getopt_parse_long(arg_val, &v))
+           goto error;
+         data = malloc(sizeof(int));
+         if (data)
+           *(int *)data = (int)v;
+      }
+      break;
+
       case ECORE_GETOPT_TYPE_LONG:
-        {
-           if (!_ecore_getopt_parse_long(arg_val, &v))
-             goto error;
-           data = malloc(sizeof(long));
-           if (data)
-             *(long *)data = v;
-        }
-        break;
+      {
+         if (!_ecore_getopt_parse_long(arg_val, &v))
+           goto error;
+         data = malloc(sizeof(long));
+         if (data)
+           *(long *)data = v;
+      }
+      break;
+
       case ECORE_GETOPT_TYPE_USHORT:
-        {
-           if (!_ecore_getopt_parse_long(arg_val, &v))
-             goto error;
-           data = malloc(sizeof(unsigned short));
-           if (data)
-             *(unsigned short *)data = (unsigned short)v;
-        }
-        break;
+      {
+         if (!_ecore_getopt_parse_long(arg_val, &v))
+           goto error;
+         data = malloc(sizeof(unsigned short));
+         if (data)
+           *(unsigned short *)data = (unsigned short)v;
+      }
+      break;
+
       case ECORE_GETOPT_TYPE_UINT:
-        {
-           if (!_ecore_getopt_parse_long(arg_val, &v))
-             goto error;
-           data = malloc(sizeof(unsigned int));
-           if (data)
-             *(unsigned int *)data = (unsigned int)v;
-        }
-        break;
+      {
+         if (!_ecore_getopt_parse_long(arg_val, &v))
+           goto error;
+         data = malloc(sizeof(unsigned int));
+         if (data)
+           *(unsigned int *)data = (unsigned int)v;
+      }
+      break;
+
       case ECORE_GETOPT_TYPE_ULONG:
-        {
-           if (!_ecore_getopt_parse_long(arg_val, &v))
-             goto error;
-           data = malloc(sizeof(unsigned long));
-           if (data)
-             *(unsigned long *)data = v;
-        }
-        break;
+      {
+         if (!_ecore_getopt_parse_long(arg_val, &v))
+           goto error;
+         data = malloc(sizeof(unsigned long));
+         if (data)
+           *(unsigned long *)data = v;
+      }
+      break;
+
       case ECORE_GETOPT_TYPE_DOUBLE:
-        {
-           if (!_ecore_getopt_parse_double(arg_val, &d))
-             goto error;
-           data = malloc(sizeof(double));
-           if (data)
-             *(double *)data = d;
-        }
-        break;
+      {
+         if (!_ecore_getopt_parse_double(arg_val, &d))
+           goto error;
+         data = malloc(sizeof(double));
+         if (data)
+           *(double *)data = d;
+      }
+      break;
+
       default:
-        {
-           _ecore_getopt_desc_print_error(desc, _("could not parse value.\n"));
-           return EINA_FALSE;
-        }
+      {
+         _ecore_getopt_desc_print_error(desc, _("could not parse value.\n"));
+         return EINA_FALSE;
+      }
      }
 
    *val->listp = eina_list_append(*val->listp, data);
    return EINA_TRUE;
 
- error:
+error:
    _ecore_getopt_desc_print_error
      (desc, _("invalid number format %s\n"), arg_val);
    return EINA_FALSE;
 }
 
 static Eina_Bool
-_ecore_getopt_parse_count(const Ecore_Getopt *parser __UNUSED__, const Ecore_Getopt_Desc *desc, Ecore_Getopt_Value *val, const char *arg_val __UNUSED__)
+_ecore_getopt_parse_count(const Ecore_Getopt      *parser __UNUSED__,
+                          const Ecore_Getopt_Desc *desc,
+                          Ecore_Getopt_Value      *val,
+                          const char              *arg_val __UNUSED__)
 {
    if (!val->intp)
      {
@@ -1166,21 +1282,26 @@ _ecore_getopt_parse_count(const Ecore_Getopt *parser __UNUSED__, const Ecore_Get
 }
 
 static Eina_Bool
-_ecore_getopt_parse_callback(const Ecore_Getopt *parser, const Ecore_Getopt_Desc *desc, Ecore_Getopt_Value *val, const char *arg_val)
+_ecore_getopt_parse_callback(const Ecore_Getopt      *parser,
+                             const Ecore_Getopt_Desc *desc,
+                             Ecore_Getopt_Value      *val,
+                             const char              *arg_val)
 {
    const Ecore_Getopt_Desc_Callback *cb = &desc->action_param.callback;
 
    switch (cb->arg_req)
      {
       case ECORE_GETOPT_DESC_ARG_REQUIREMENT_NO:
-         arg_val = cb->def;
-         break;
+        arg_val = cb->def;
+        break;
+
       case ECORE_GETOPT_DESC_ARG_REQUIREMENT_OPTIONAL:
-         if (!arg_val)
-           arg_val = cb->def;
-         break;
+        if (!arg_val)
+          arg_val = cb->def;
+        break;
+
       case ECORE_GETOPT_DESC_ARG_REQUIREMENT_YES:
-         break;
+        break;
      }
 
    if (cb->arg_req != ECORE_GETOPT_DESC_ARG_REQUIREMENT_NO)
@@ -1208,7 +1329,10 @@ _ecore_getopt_parse_callback(const Ecore_Getopt *parser, const Ecore_Getopt_Desc
 }
 
 static Eina_Bool
-_ecore_getopt_parse_help(const Ecore_Getopt *parser, const Ecore_Getopt_Desc *desc __UNUSED__, Ecore_Getopt_Value *val, const char *arg_val __UNUSED__)
+_ecore_getopt_parse_help(const Ecore_Getopt      *parser,
+                         const Ecore_Getopt_Desc *desc __UNUSED__,
+                         Ecore_Getopt_Value      *val,
+                         const char              *arg_val __UNUSED__)
 {
    if (val->boolp)
      (*val->boolp) = EINA_TRUE;
@@ -1217,7 +1341,10 @@ _ecore_getopt_parse_help(const Ecore_Getopt *parser, const Ecore_Getopt_Desc *de
 }
 
 static Eina_Bool
-_ecore_getopt_parse_version(const Ecore_Getopt *parser, const Ecore_Getopt_Desc *desc, Ecore_Getopt_Value *val, const char *arg_val __UNUSED__)
+_ecore_getopt_parse_version(const Ecore_Getopt      *parser,
+                            const Ecore_Getopt_Desc *desc,
+                            Ecore_Getopt_Value      *val,
+                            const char              *arg_val __UNUSED__)
 {
    if (val->boolp)
      (*val->boolp) = EINA_TRUE;
@@ -1231,7 +1358,10 @@ _ecore_getopt_parse_version(const Ecore_Getopt *parser, const Ecore_Getopt_Desc
 }
 
 static Eina_Bool
-_ecore_getopt_parse_copyright(const Ecore_Getopt *parser, const Ecore_Getopt_Desc *desc, Ecore_Getopt_Value *val, const char *arg_val __UNUSED__)
+_ecore_getopt_parse_copyright(const Ecore_Getopt      *parser,
+                              const Ecore_Getopt_Desc *desc,
+                              Ecore_Getopt_Value      *val,
+                              const char              *arg_val __UNUSED__)
 {
    if (val->boolp)
      (*val->boolp) = EINA_TRUE;
@@ -1245,7 +1375,10 @@ _ecore_getopt_parse_copyright(const Ecore_Getopt *parser, const Ecore_Getopt_Des
 }
 
 static Eina_Bool
-_ecore_getopt_parse_license(const Ecore_Getopt *parser, const Ecore_Getopt_Desc *desc, Ecore_Getopt_Value *val, const char *arg_val __UNUSED__)
+_ecore_getopt_parse_license(const Ecore_Getopt      *parser,
+                            const Ecore_Getopt_Desc *desc,
+                            Ecore_Getopt_Value      *val,
+                            const char              *arg_val __UNUSED__)
 {
    if (val->boolp)
      (*val->boolp) = EINA_TRUE;
@@ -1259,41 +1392,62 @@ _ecore_getopt_parse_license(const Ecore_Getopt *parser, const Ecore_Getopt_Desc
 }
 
 static Eina_Bool
-_ecore_getopt_desc_handle(const Ecore_Getopt *parser, const Ecore_Getopt_Desc *desc, Ecore_Getopt_Value *value, const char *arg_val)
+_ecore_getopt_desc_handle(const Ecore_Getopt      *parser,
+                          const Ecore_Getopt_Desc *desc,
+                          Ecore_Getopt_Value      *value,
+                          const char              *arg_val)
 {
    switch (desc->action)
      {
       case ECORE_GETOPT_ACTION_STORE:
-         return _ecore_getopt_parse_store(parser, desc, value, arg_val);
+        return _ecore_getopt_parse_store(parser, desc, value, arg_val);
+
       case ECORE_GETOPT_ACTION_STORE_CONST:
-         return _ecore_getopt_parse_store_const(parser, desc, value, arg_val);
+        return _ecore_getopt_parse_store_const(parser, desc, value, arg_val);
+
       case ECORE_GETOPT_ACTION_STORE_TRUE:
-         return _ecore_getopt_parse_store_true(parser, desc, value, arg_val);
+        return _ecore_getopt_parse_store_true(parser, desc, value, arg_val);
+
       case ECORE_GETOPT_ACTION_STORE_FALSE:
-         return _ecore_getopt_parse_store_false(parser, desc, value, arg_val);
+        return _ecore_getopt_parse_store_false(parser, desc, value, arg_val);
+
       case ECORE_GETOPT_ACTION_CHOICE:
-         return _ecore_getopt_parse_choice(parser, desc, value, arg_val);
+        return _ecore_getopt_parse_choice(parser, desc, value, arg_val);
+
       case ECORE_GETOPT_ACTION_APPEND:
-         return _ecore_getopt_parse_append(parser, desc, value, arg_val);
+        return _ecore_getopt_parse_append(parser, desc, value, arg_val);
+
       case ECORE_GETOPT_ACTION_COUNT:
-         return _ecore_getopt_parse_count(parser, desc, value, arg_val);
+        return _ecore_getopt_parse_count(parser, desc, value, arg_val);
+
       case ECORE_GETOPT_ACTION_CALLBACK:
-         return _ecore_getopt_parse_callback(parser, desc, value, arg_val);
+        return _ecore_getopt_parse_callback(parser, desc, value, arg_val);
+
       case ECORE_GETOPT_ACTION_HELP:
-         return _ecore_getopt_parse_help(parser, desc, value, arg_val);
+        return _ecore_getopt_parse_help(parser, desc, value, arg_val);
+
       case ECORE_GETOPT_ACTION_VERSION:
-         return _ecore_getopt_parse_version(parser, desc, value, arg_val);
+        return _ecore_getopt_parse_version(parser, desc, value, arg_val);
+
       case ECORE_GETOPT_ACTION_COPYRIGHT:
-         return _ecore_getopt_parse_copyright(parser, desc, value, arg_val);
+        return _ecore_getopt_parse_copyright(parser, desc, value, arg_val);
+
       case ECORE_GETOPT_ACTION_LICENSE:
-         return _ecore_getopt_parse_license(parser, desc, value, arg_val);
+        return _ecore_getopt_parse_license(parser, desc, value, arg_val);
+
       default:
-         return EINA_FALSE;
+        return EINA_FALSE;
      }
 }
 
 static Eina_Bool
-_ecore_getopt_parse_arg_long(const Ecore_Getopt *parser, Ecore_Getopt_Value *values, int argc __UNUSED__, char **argv, int *idx, int *nonargs, const char *arg)
+_ecore_getopt_parse_arg_long(const Ecore_Getopt *parser,
+                             Ecore_Getopt_Value *values,
+                             int                 argc __UNUSED__,
+                             char              **argv,
+                             int                *idx,
+                             int                *nonargs,
+                             const char         *arg)
 {
    const Ecore_Getopt_Desc *desc;
    Ecore_Getopt_Desc_Arg_Requirement arg_req;
@@ -1357,7 +1511,13 @@ _ecore_getopt_parse_arg_long(const Ecore_Getopt *parser, Ecore_Getopt_Value *val
 }
 
 static Eina_Bool
-_ecore_getopt_parse_arg_short(const Ecore_Getopt *parser, Ecore_Getopt_Value *values, int argc __UNUSED__, char **argv, int *idx, int *nonargs, const char *arg)
+_ecore_getopt_parse_arg_short(const Ecore_Getopt *parser,
+                              Ecore_Getopt_Value *values,
+                              int                 argc __UNUSED__,
+                              char              **argv,
+                              int                *idx,
+                              int                *nonargs,
+                              const char         *arg)
 {
    int run = 1;
    while (run && (arg[0] != '\0'))
@@ -1413,7 +1573,7 @@ _ecore_getopt_parse_arg_short(const Ecore_Getopt *parser, Ecore_Getopt_Value *va
                {
                   fprintf
                     (stderr, _("ERROR: option -%c requires an argument!\n"),
-                     opt);
+                    opt);
                   if (parser->strict)
                     return EINA_FALSE;
                   return EINA_TRUE;
@@ -1436,7 +1596,12 @@ _ecore_getopt_parse_arg_short(const Ecore_Getopt *parser, Ecore_Getopt_Value *va
 }
 
 static Eina_Bool
-_ecore_getopt_parse_arg(const Ecore_Getopt *parser, Ecore_Getopt_Value *values, int argc, char **argv, int *idx, int *nonargs)
+_ecore_getopt_parse_arg(const Ecore_Getopt *parser,
+                        Ecore_Getopt_Value *values,
+                        int                 argc,
+                        char              **argv,
+                        int                *idx,
+                        int                *nonargs)
 {
    char *arg = argv[*idx];
 
@@ -1463,7 +1628,8 @@ _ecore_getopt_parse_arg(const Ecore_Getopt *parser, Ecore_Getopt_Value *values,
 }
 
 static const Ecore_Getopt_Desc *
-_ecore_getopt_parse_find_short_other(const Ecore_Getopt *parser, const Ecore_Getopt_Desc *orig)
+_ecore_getopt_parse_find_short_other(const Ecore_Getopt      *parser,
+                                     const Ecore_Getopt_Desc *orig)
 {
    const Ecore_Getopt_Desc *desc = parser->descs;
    const char c = orig->shortname;
@@ -1481,7 +1647,8 @@ _ecore_getopt_parse_find_short_other(const Ecore_Getopt *parser, const Ecore_Get
 }
 
 static const Ecore_Getopt_Desc *
-_ecore_getopt_parse_find_long_other(const Ecore_Getopt *parser, const Ecore_Getopt_Desc *orig)
+_ecore_getopt_parse_find_long_other(const Ecore_Getopt      *parser,
+                                    const Ecore_Getopt_Desc *orig)
 {
    const Ecore_Getopt_Desc *desc = parser->descs;
    const char *name = orig->longname;
@@ -1509,37 +1676,37 @@ ecore_getopt_parser_has_duplicates(const Ecore_Getopt *parser)
    const Ecore_Getopt_Desc *desc = parser->descs;
    for (; !_ecore_getopt_desc_is_sentinel(desc); desc++)
      {
-       if (desc->shortname)
-         {
-           const Ecore_Getopt_Desc *other;
-           other = _ecore_getopt_parse_find_short_other(parser, desc);
-           if (other)
-             {
-                _ecore_getopt_desc_print_error(desc, "short name -%c already exists.", desc->shortname);
-
-                if (other->longname)
-                  fprintf(stderr, " Other is --%s.\n", other->longname);
-                else
-                  fputc('\n', stderr);
-                return EINA_TRUE;
-             }
-         }
-
-       if (desc->longname)
-         {
-           const Ecore_Getopt_Desc *other;
-           other = _ecore_getopt_parse_find_long_other(parser, desc);
-           if (other)
-             {
-                _ecore_getopt_desc_print_error(desc, "long name --%s already exists.", desc->longname);
-
-                if (other->shortname)
-                  fprintf(stderr, " Other is -%c.\n", other->shortname);
-                else
-                  fputc('\n', stderr);
-                return EINA_TRUE;
-             }
-         }
+        if (desc->shortname)
+          {
+             const Ecore_Getopt_Desc *other;
+             other = _ecore_getopt_parse_find_short_other(parser, desc);
+             if (other)
+               {
+                  _ecore_getopt_desc_print_error(desc, "short name -%c already exists.", desc->shortname);
+
+                  if (other->longname)
+                    fprintf(stderr, " Other is --%s.\n", other->longname);
+                  else
+                    fputc('\n', stderr);
+                  return EINA_TRUE;
+               }
+          }
+
+        if (desc->longname)
+          {
+             const Ecore_Getopt_Desc *other;
+             other = _ecore_getopt_parse_find_long_other(parser, desc);
+             if (other)
+               {
+                  _ecore_getopt_desc_print_error(desc, "long name --%s already exists.", desc->longname);
+
+                  if (other->shortname)
+                    fprintf(stderr, " Other is -%c.\n", other->shortname);
+                  else
+                    fputc('\n', stderr);
+                  return EINA_TRUE;
+               }
+          }
      }
    return EINA_FALSE;
 }
@@ -1605,7 +1772,10 @@ _ecore_getopt_find_help(const Ecore_Getopt *parser)
  * @return index of first non-option parameter or -1 on error.
  */
 int
-ecore_getopt_parse(const Ecore_Getopt *parser, Ecore_Getopt_Value *values, int argc, char **argv)
+ecore_getopt_parse(const Ecore_Getopt *parser,
+                   Ecore_Getopt_Value *values,
+                   int                 argc,
+                   char              **argv)
 {
    int i, nonargs;
 
@@ -1648,7 +1818,7 @@ ecore_getopt_parse(const Ecore_Getopt *parser, Ecore_Getopt_Value *values, int a
 
    return nonargs;
 
- error:
+error:
    {
       const Ecore_Getopt_Desc *help;
       fputs(_("ERROR: invalid options found."), stderr);
@@ -1690,7 +1860,11 @@ ecore_getopt_list_free(Eina_List *list)
  * @c callback_data value is ignored, you can safely use @c NULL.
  */
 Eina_Bool
-ecore_getopt_callback_geometry_parse(const Ecore_Getopt *parser __UNUSED__, const Ecore_Getopt_Desc *desc __UNUSED__, const char *str, void *data __UNUSED__, Ecore_Getopt_Value *storage)
+ecore_getopt_callback_geometry_parse(const Ecore_Getopt      *parser __UNUSED__,
+                                     const Ecore_Getopt_Desc *desc __UNUSED__,
+                                     const char              *str,
+                                     void                    *data __UNUSED__,
+                                     Ecore_Getopt_Value      *storage)
 {
    Eina_Rectangle *v = (Eina_Rectangle *)storage->ptrp;
 
@@ -1713,7 +1887,11 @@ ecore_getopt_callback_geometry_parse(const Ecore_Getopt *parser __UNUSED__, cons
  * @c callback_data value is ignored, you can safely use @c NULL.
  */
 Eina_Bool
-ecore_getopt_callback_size_parse(const Ecore_Getopt *parser __UNUSED__, const Ecore_Getopt_Desc *desc __UNUSED__, const char *str, void *data __UNUSED__, Ecore_Getopt_Value *storage)
+ecore_getopt_callback_size_parse(const Ecore_Getopt      *parser __UNUSED__,
+                                 const Ecore_Getopt_Desc *desc __UNUSED__,
+                                 const char              *str,
+                                 void                    *data __UNUSED__,
+                                 Ecore_Getopt_Value      *storage)
 {
    Eina_Rectangle *v = (Eina_Rectangle *)storage->ptrp;
 
@@ -1727,3 +1905,4 @@ ecore_getopt_callback_size_parse(const Ecore_Getopt *parser __UNUSED__, const Ec
 
    return EINA_TRUE;
 }
+
index 71288e6..6ddcd36 100644 (file)
@@ -37,7 +37,9 @@ _ecore_glib_fds_resize(size_t size)
 }
 
 static int
-_ecore_glib_context_query(GMainContext *ctx, int priority, int *p_timer)
+_ecore_glib_context_query(GMainContext *ctx,
+                          int           priority,
+                          int          *p_timer)
 {
    int reqfds;
 
@@ -51,7 +53,7 @@ _ecore_glib_context_query(GMainContext *ctx, int priority, int *p_timer)
         size_t size;
 
         reqfds = g_main_context_query
-          (ctx, priority, p_timer, _ecore_glib_fds, _ecore_glib_fds_size);
+            (ctx, priority, p_timer, _ecore_glib_fds, _ecore_glib_fds_size);
         if (reqfds <= (int)_ecore_glib_fds_size) break;
 
         size = (1 + reqfds / ECORE_GLIB_FDS_STEP) * ECORE_GLIB_FDS_STEP;
@@ -70,7 +72,11 @@ _ecore_glib_context_query(GMainContext *ctx, int priority, int *p_timer)
 }
 
 static int
-_ecore_glib_context_poll_from(const GPollFD *pfds, int count, fd_set *rfds, fd_set *wfds, fd_set *efds)
+_ecore_glib_context_poll_from(const GPollFD *pfds,
+                              int            count,
+                              fd_set        *rfds,
+                              fd_set        *wfds,
+                              fd_set        *efds)
 {
    const GPollFD *itr = pfds, *itr_end = pfds + count;
    int glib_fds = -1;
@@ -92,7 +98,12 @@ _ecore_glib_context_poll_from(const GPollFD *pfds, int count, fd_set *rfds, fd_s
 }
 
 static int
-_ecore_glib_context_poll_to(GPollFD *pfds, int count, const fd_set *rfds, const fd_set *wfds, const fd_set *efds, int ready)
+_ecore_glib_context_poll_to(GPollFD      *pfds,
+                            int           count,
+                            const fd_set *rfds,
+                            const fd_set *wfds,
+                            const fd_set *efds,
+                            int           ready)
 {
    GPollFD *itr = pfds, *itr_end = pfds + count;
 
@@ -119,7 +130,12 @@ _ecore_glib_context_poll_to(GPollFD *pfds, int count, const fd_set *rfds, const
 }
 
 static int
-_ecore_glib_select__locked(GMainContext *ctx, int ecore_fds, fd_set *rfds, fd_set *wfds, fd_set *efds, struct timeval *ecore_timeout)
+_ecore_glib_select__locked(GMainContext   *ctx,
+                           int             ecore_fds,
+                           fd_set         *rfds,
+                           fd_set         *wfds,
+                           fd_set         *efds,
+                           struct timeval *ecore_timeout)
 {
    int priority, maxfds, glib_fds, reqfds, reqtimeout, ret;
    struct timeval *timeout, glib_timeout;
@@ -129,7 +145,7 @@ _ecore_glib_select__locked(GMainContext *ctx, int ecore_fds, fd_set *rfds, fd_se
    if (reqfds < 0) goto error;
 
    glib_fds = _ecore_glib_context_poll_from
-     (_ecore_glib_fds, reqfds, rfds, wfds, efds);
+       (_ecore_glib_fds, reqfds, rfds, wfds, efds);
 
    if (reqtimeout == -1)
      timeout = ecore_timeout;
@@ -148,20 +164,24 @@ _ecore_glib_select__locked(GMainContext *ctx, int ecore_fds, fd_set *rfds, fd_se
    ret = _ecore_glib_select_original(maxfds, rfds, wfds, efds, timeout);
 
    ret = _ecore_glib_context_poll_to
-     (_ecore_glib_fds, reqfds, rfds, wfds, efds, ret);
+       (_ecore_glib_fds, reqfds, rfds, wfds, efds, ret);
 
    if (g_main_context_check(ctx, priority, _ecore_glib_fds, reqfds))
      g_main_context_dispatch(ctx);
 
    return ret;
 
- error:
+error:
    return _ecore_glib_select_original
-     (ecore_fds, rfds, wfds, efds, ecore_timeout);
+            (ecore_fds, rfds, wfds, efds, ecore_timeout);
 }
 
 static int
-_ecore_glib_select(int ecore_fds, fd_set *rfds, fd_set *wfds, fd_set *efds, struct timeval *ecore_timeout)
+_ecore_glib_select(int             ecore_fds,
+                   fd_set         *rfds,
+                   fd_set         *wfds,
+                   fd_set         *efds,
+                   struct timeval *ecore_timeout)
 {
    GStaticMutex lock = G_STATIC_MUTEX_INIT;
    GMutex *mutex = g_static_mutex_get_mutex(&lock);
@@ -180,13 +200,14 @@ _ecore_glib_select(int ecore_fds, fd_set *rfds, fd_set *wfds, fd_set *efds, stru
      }
 
    ret = _ecore_glib_select__locked
-     (ctx, ecore_fds, rfds, wfds, efds, ecore_timeout);
+       (ctx, ecore_fds, rfds, wfds, efds, ecore_timeout);
 
    g_mutex_unlock(mutex);
    g_main_context_release(ctx);
 
    return ret;
 }
+
 #endif
 
 void
index bfbd065..03cd1c4 100644 (file)
@@ -7,21 +7,19 @@
 #include "Ecore.h"
 #include "ecore_private.h"
 
-
 struct _Ecore_Idle_Enterer
 {
    EINA_INLIST;
-   ECORE_MAGIC;
+                 ECORE_MAGIC;
    Ecore_Task_Cb func;
-   void        *data;
-   int          references;
-   Eina_Bool    delete_me : 1;
+   void         *data;
+   int           references;
+   Eina_Bool     delete_me : 1;
 };
 
-
 static Ecore_Idle_Enterer *idle_enterers = NULL;
 static Ecore_Idle_Enterer *idle_enterer_current = NULL;
-static int                 idle_enterers_delete_me = 0;
+static int idle_enterers_delete_me = 0;
 
 static void *
 _ecore_idle_enterer_del(Ecore_Idle_Enterer *idle_enterer);
@@ -43,7 +41,8 @@ _ecore_idle_enterer_del(Ecore_Idle_Enterer *idle_enterer);
  * (or ECORE_CALLBACK_CANCEL) deletes the idle enterer.
  */
 EAPI Ecore_Idle_Enterer *
-ecore_idle_enterer_add(Ecore_Task_Cb func, const void *data)
+ecore_idle_enterer_add(Ecore_Task_Cb func,
+                       const void   *data)
 {
    Ecore_Idle_Enterer *ie = NULL;
 
@@ -55,7 +54,7 @@ ecore_idle_enterer_add(Ecore_Task_Cb func, const void *data)
    ECORE_MAGIC_SET(ie, ECORE_MAGIC_IDLE_ENTERER);
    ie->func = func;
    ie->data = (void *)data;
-   idle_enterers = (Ecore_Idle_Enterer *) eina_inlist_append(EINA_INLIST_GET(idle_enterers), EINA_INLIST_GET(ie));
+   idle_enterers = (Ecore_Idle_Enterer *)eina_inlist_append(EINA_INLIST_GET(idle_enterers), EINA_INLIST_GET(ie));
 unlock:
    _ecore_unlock();
    return ie;
@@ -72,7 +71,8 @@ unlock:
  * (or ECORE_CALLBACK_CANCEL) deletes the idle enterer.
  */
 EAPI Ecore_Idle_Enterer *
-ecore_idle_enterer_before_add(Ecore_Task_Cb func, const void *data)
+ecore_idle_enterer_before_add(Ecore_Task_Cb func,
+                              const void   *data)
 {
    Ecore_Idle_Enterer *ie = NULL;
 
@@ -84,7 +84,7 @@ ecore_idle_enterer_before_add(Ecore_Task_Cb func, const void *data)
    ECORE_MAGIC_SET(ie, ECORE_MAGIC_IDLE_ENTERER);
    ie->func = func;
    ie->data = (void *)data;
-   idle_enterers = (Ecore_Idle_Enterer *) eina_inlist_prepend(EINA_INLIST_GET(idle_enterers), EINA_INLIST_GET(ie));
+   idle_enterers = (Ecore_Idle_Enterer *)eina_inlist_prepend(EINA_INLIST_GET(idle_enterers), EINA_INLIST_GET(ie));
 unlock:
    _ecore_unlock();
    return ie;
@@ -126,14 +126,13 @@ _ecore_idle_enterer_del(Ecore_Idle_Enterer *idle_enterer)
    return idle_enterer->data;
 }
 
-
 void
 _ecore_idle_enterer_shutdown(void)
 {
    Ecore_Idle_Enterer *ie;
    while ((ie = idle_enterers))
      {
-        idle_enterers = (Ecore_Idle_Enterer *) eina_inlist_remove(EINA_INLIST_GET(idle_enterers), EINA_INLIST_GET(idle_enterers));
+        idle_enterers = (Ecore_Idle_Enterer *)eina_inlist_remove(EINA_INLIST_GET(idle_enterers), EINA_INLIST_GET(idle_enterers));
         ECORE_MAGIC_SET(ie, ECORE_MAGIC_NONE);
         free(ie);
      }
@@ -147,13 +146,13 @@ _ecore_idle_enterer_call(void)
    if (!idle_enterer_current)
      {
         /* regular main loop, start from head */
-        idle_enterer_current = idle_enterers;
+         idle_enterer_current = idle_enterers;
      }
    else
      {
         /* recursive main loop, continue from where we were */
-        idle_enterer_current =
-          (Ecore_Idle_Enterer *)EINA_INLIST_GET(idle_enterer_current)->next;
+         idle_enterer_current =
+           (Ecore_Idle_Enterer *)EINA_INLIST_GET(idle_enterer_current)->next;
      }
 
    while (idle_enterer_current)
@@ -177,10 +176,10 @@ _ecore_idle_enterer_call(void)
         Ecore_Idle_Enterer *l;
         int deleted_idler_enterers_in_use = 0;
 
-        for (l = idle_enterers; l;)
+        for (l = idle_enterers; l; )
           {
              Ecore_Idle_Enterer *ie = l;
-             l = (Ecore_Idle_Enterer *) EINA_INLIST_GET(l)->next;
+             l = (Ecore_Idle_Enterer *)EINA_INLIST_GET(l)->next;
              if (ie->delete_me)
                {
                   if (ie->references)
@@ -189,7 +188,7 @@ _ecore_idle_enterer_call(void)
                        continue;
                     }
 
-                  idle_enterers = (Ecore_Idle_Enterer *) eina_inlist_remove(EINA_INLIST_GET(idle_enterers), EINA_INLIST_GET(ie));
+                  idle_enterers = (Ecore_Idle_Enterer *)eina_inlist_remove(EINA_INLIST_GET(idle_enterers), EINA_INLIST_GET(ie));
                   ECORE_MAGIC_SET(ie, ECORE_MAGIC_NONE);
                   free(ie);
                }
@@ -205,3 +204,4 @@ _ecore_idle_enterer_exist(void)
    if (idle_enterers) return 1;
    return 0;
 }
+
index af068d8..70c6a7a 100644 (file)
@@ -7,21 +7,19 @@
 #include "Ecore.h"
 #include "ecore_private.h"
 
-
 struct _Ecore_Idle_Exiter
 {
    EINA_INLIST;
-   ECORE_MAGIC;
+                 ECORE_MAGIC;
    Ecore_Task_Cb func;
-   void        *data;
-   int          references;
-   Eina_Bool    delete_me : 1;
+   void         *data;
+   int           references;
+   Eina_Bool     delete_me : 1;
 };
 
-
 static Ecore_Idle_Exiter *idle_exiters = NULL;
 static Ecore_Idle_Exiter *idle_exiter_current = NULL;
-static int                idle_exiters_delete_me = 0;
+static int idle_exiters_delete_me = 0;
 
 static void *
 _ecore_idle_exiter_del(Ecore_Idle_Exiter *idle_exiter);
@@ -42,7 +40,8 @@ _ecore_idle_exiter_del(Ecore_Idle_Exiter *idle_exiter);
  * (or ECORE_CALLBACK_CANCEL) deletes the idle exiter.
  */
 EAPI Ecore_Idle_Exiter *
-ecore_idle_exiter_add(Ecore_Task_Cb func, const void *data)
+ecore_idle_exiter_add(Ecore_Task_Cb func,
+                      const void   *data)
 {
    Ecore_Idle_Exiter *ie = NULL;
 
@@ -53,7 +52,7 @@ ecore_idle_exiter_add(Ecore_Task_Cb func, const void *data)
    ECORE_MAGIC_SET(ie, ECORE_MAGIC_IDLE_EXITER);
    ie->func = func;
    ie->data = (void *)data;
-   idle_exiters = (Ecore_Idle_Exiter *) eina_inlist_append(EINA_INLIST_GET(idle_exiters), EINA_INLIST_GET(ie));
+   idle_exiters = (Ecore_Idle_Exiter *)eina_inlist_append(EINA_INLIST_GET(idle_exiters), EINA_INLIST_GET(ie));
 unlock:
    _ecore_unlock();
    return ie;
@@ -101,7 +100,7 @@ _ecore_idle_exiter_shutdown(void)
    Ecore_Idle_Exiter *ie;
    while ((ie = idle_exiters))
      {
-        idle_exiters = (Ecore_Idle_Exiter *) eina_inlist_remove(EINA_INLIST_GET(idle_exiters), EINA_INLIST_GET(idle_exiters));
+        idle_exiters = (Ecore_Idle_Exiter *)eina_inlist_remove(EINA_INLIST_GET(idle_exiters), EINA_INLIST_GET(idle_exiters));
         ECORE_MAGIC_SET(ie, ECORE_MAGIC_NONE);
         free(ie);
      }
@@ -115,13 +114,13 @@ _ecore_idle_exiter_call(void)
    if (!idle_exiter_current)
      {
         /* regular main loop, start from head */
-        idle_exiter_current = idle_exiters;
+         idle_exiter_current = idle_exiters;
      }
    else
      {
         /* recursive main loop, continue from where we were */
-        idle_exiter_current =
-          (Ecore_Idle_Exiter *)EINA_INLIST_GET(idle_exiter_current)->next;
+         idle_exiter_current =
+           (Ecore_Idle_Exiter *)EINA_INLIST_GET(idle_exiter_current)->next;
      }
 
    while (idle_exiter_current)
@@ -145,11 +144,11 @@ _ecore_idle_exiter_call(void)
         Ecore_Idle_Exiter *l;
         int deleted_idler_exiters_in_use = 0;
 
-        for (l = idle_exiters; l;)
+        for (l = idle_exiters; l; )
           {
              Ecore_Idle_Exiter *ie = l;
 
-             l = (Ecore_Idle_Exiter *) EINA_INLIST_GET(l)->next;
+             l = (Ecore_Idle_Exiter *)EINA_INLIST_GET(l)->next;
              if (ie->delete_me)
                {
                   if (ie->references)
@@ -158,7 +157,7 @@ _ecore_idle_exiter_call(void)
                        continue;
                     }
 
-                  idle_exiters = (Ecore_Idle_Exiter *) eina_inlist_remove(EINA_INLIST_GET(idle_exiters), EINA_INLIST_GET(ie));
+                  idle_exiters = (Ecore_Idle_Exiter *)eina_inlist_remove(EINA_INLIST_GET(idle_exiters), EINA_INLIST_GET(ie));
                   ECORE_MAGIC_SET(ie, ECORE_MAGIC_NONE);
                   free(ie);
                }
@@ -174,3 +173,4 @@ _ecore_idle_exiter_exist(void)
    if (idle_exiters) return 1;
    return 0;
 }
+
index d0999e6..6c0cab8 100644 (file)
@@ -7,27 +7,26 @@
 #include "Ecore.h"
 #include "ecore_private.h"
 
-
 struct _Ecore_Idler
 {
    EINA_INLIST;
-   ECORE_MAGIC;
+                 ECORE_MAGIC;
    Ecore_Task_Cb func;
-   void        *data;
-   int          references;
-   Eina_Bool    delete_me : 1;
+   void         *data;
+   int           references;
+   Eina_Bool     delete_me : 1;
 };
 
-
 static Ecore_Idler *idlers = NULL;
 static Ecore_Idler *idler_current = NULL;
-static int          idlers_delete_me = 0;
+static int idlers_delete_me = 0;
 
 static void *
 _ecore_idler_del(Ecore_Idler *idler);
 
 EAPI Ecore_Idler *
-ecore_idler_add(Ecore_Task_Cb func, const void *data)
+ecore_idler_add(Ecore_Task_Cb func,
+                const void   *data)
 {
    Ecore_Idler *ie = NULL;
 
@@ -38,7 +37,7 @@ ecore_idler_add(Ecore_Task_Cb func, const void *data)
    ECORE_MAGIC_SET(ie, ECORE_MAGIC_IDLER);
    ie->func = func;
    ie->data = (void *)data;
-   idlers = (Ecore_Idler *) eina_inlist_append(EINA_INLIST_GET(idlers), EINA_INLIST_GET(ie));
+   idlers = (Ecore_Idler *)eina_inlist_append(EINA_INLIST_GET(idlers), EINA_INLIST_GET(ie));
 unlock:
    _ecore_unlock();
    return ie;
@@ -79,14 +78,13 @@ _ecore_idler_del(Ecore_Idler *idler)
    return idler->data;
 }
 
-
 void
 _ecore_idler_shutdown(void)
 {
    Ecore_Idler *ie;
    while ((ie = idlers))
      {
-        idlers = (Ecore_Idler *) eina_inlist_remove(EINA_INLIST_GET(idlers), EINA_INLIST_GET(idlers));
+        idlers = (Ecore_Idler *)eina_inlist_remove(EINA_INLIST_GET(idlers), EINA_INLIST_GET(idlers));
         ECORE_MAGIC_SET(ie, ECORE_MAGIC_NONE);
         free(ie);
      }
@@ -100,12 +98,12 @@ _ecore_idler_all_call(void)
    if (!idler_current)
      {
         /* regular main loop, start from head */
-        idler_current = idlers;
+         idler_current = idlers;
      }
    else
      {
         /* recursive main loop, continue from where we were */
-        idler_current = (Ecore_Idler *)EINA_INLIST_GET(idler_current)->next;
+         idler_current = (Ecore_Idler *)EINA_INLIST_GET(idler_current)->next;
      }
 
    while (idler_current)
@@ -127,10 +125,10 @@ _ecore_idler_all_call(void)
      {
         Ecore_Idler *l;
         int deleted_idlers_in_use = 0;
-        for (l = idlers; l;)
+        for (l = idlers; l; )
           {
              Ecore_Idler *ie = l;
-             l = (Ecore_Idler *) EINA_INLIST_GET(l)->next;
+             l = (Ecore_Idler *)EINA_INLIST_GET(l)->next;
              if (ie->delete_me)
                {
                   if (ie->references)
@@ -139,7 +137,7 @@ _ecore_idler_all_call(void)
                        continue;
                     }
 
-                  idlers = (Ecore_Idler *) eina_inlist_remove(EINA_INLIST_GET(idlers), EINA_INLIST_GET(ie));
+                  idlers = (Ecore_Idler *)eina_inlist_remove(EINA_INLIST_GET(idlers), EINA_INLIST_GET(ie));
                   ECORE_MAGIC_SET(ie, ECORE_MAGIC_NONE);
                   free(ie);
                }
@@ -157,3 +155,4 @@ _ecore_idler_exist(void)
    if (idlers) return 1;
    return 0;
 }
+
index dfaa94b..481c3f3 100644 (file)
@@ -7,18 +7,21 @@
 #include "Ecore.h"
 #include "ecore_private.h"
 
-static Eina_Bool _ecore_job_event_handler(void *data, int type, void *ev);
-static void _ecore_job_event_free(void *data, void *ev);
+static Eina_Bool _ecore_job_event_handler(void *data,
+                                          int   type,
+                                          void *ev);
+static void _ecore_job_event_free(void *data,
+                                  void *ev);
 
 static int ecore_event_job_type = 0;
-static Ecore_Event_Handler_ecore_job_handler = NULL;
+static Ecore_Event_Handler *_ecore_job_handler = NULL;
 
 struct _Ecore_Job
 {
-   ECORE_MAGIC;
-   Ecore_Event  *event;
-   Ecore_Cb func;
-   void         *data;
+                ECORE_MAGIC;
+   Ecore_Event *event;
+   Ecore_Cb     func;
+   void        *data;
 };
 
 void
@@ -51,7 +54,8 @@ _ecore_job_shutdown(void)
  * @note    Once the job has been executed, the job handle is invalid.
  */
 EAPI Ecore_Job *
-ecore_job_add(Ecore_Cb func, const void *data)
+ecore_job_add(Ecore_Cb    func,
+              const void *data)
 {
    Ecore_Job *job;
 
@@ -98,7 +102,9 @@ ecore_job_del(Ecore_Job *job)
  */
 
 static Eina_Bool
-_ecore_job_event_handler(void *data __UNUSED__, int type __UNUSED__, void *ev)
+_ecore_job_event_handler(void *data __UNUSED__,
+                         int   type __UNUSED__,
+                         void *ev)
 {
    Ecore_Job *job;
 
@@ -108,7 +114,9 @@ _ecore_job_event_handler(void *data __UNUSED__, int type __UNUSED__, void *ev)
 }
 
 static void
-_ecore_job_event_free(void *data __UNUSED__, void *ev)
+_ecore_job_event_free(void *data __UNUSED__,
+                      void *ev)
 {
    free(ev);
 }
+
index df657cb..235191e 100644 (file)
@@ -31,7 +31,7 @@
 #endif
 
 #ifdef HAVE_ISFINITE
-# define ECORE_FINITE(t) isfinite(t)
+# define ECORE_FINITE(t)  isfinite(t)
 #else
 # ifdef _MSC_VER
 #  define ECORE_FINITE(t) _finite(t)
 #include "ecore_private.h"
 
 #ifdef HAVE_SYS_EPOLL_H
-# define HAVE_EPOLL 1
+# define HAVE_EPOLL   1
 # include <sys/epoll.h>
 #else
 
-# define HAVE_EPOLL 0
-# define EPOLLIN 1
-# define EPOLLOUT 2
-# define EPOLLERR 8
+# define HAVE_EPOLL   0
+# define EPOLLIN      1
+# define EPOLLOUT     2
+# define EPOLLERR     8
 
 #define EPOLL_CTL_ADD 1
 #define EPOLL_CTL_DEL 2
@@ -79,7 +79,8 @@ typedef union epoll_data {
    uint64_t u64;
 } epoll_data_t;
 
-struct epoll_event {
+struct epoll_event
+{
    uint32_t     events;
    epoll_data_t data;
 };
@@ -87,21 +88,25 @@ struct epoll_event {
 static inline int
 epoll_create(int size __UNUSED__)
 {
-  return -1;
+   return -1;
 }
 
 static inline int
-epoll_wait(int epfd __UNUSED__, struct epoll_event *events __UNUSED__,
-           int maxevents __UNUSED__, int timeout __UNUSED__)
+epoll_wait(int                 epfd __UNUSED__,
+           struct epoll_event *events __UNUSED__,
+           int                 maxevents __UNUSED__,
+           int                 timeout __UNUSED__)
 {
-  return -1;
+   return -1;
 }
 
 static inline int
-epoll_ctl(int epfd __UNUSED__, int op __UNUSED__, int fd __UNUSED__,
+epoll_ctl(int                 epfd __UNUSED__,
+          int                 op __UNUSED__,
+          int                 fd __UNUSED__,
           struct epoll_event *event __UNUSED__)
 {
-  return -1;
+   return -1;
 }
 
 #endif
@@ -114,20 +119,24 @@ epoll_ctl(int epfd __UNUSED__, int op __UNUSED__, int fd __UNUSED__,
 #define CLOCK_MONOTONIC 0 /* bogus value */
 #endif
 #ifndef TFD_NONBLOCK
-#define TFD_NONBLOCK 0 /* bogus value */
+#define TFD_NONBLOCK    0 /* bogus value */
 #endif
 static inline int
-timerfd_create(int clockid __UNUSED__, int flags __UNUSED__)
+timerfd_create(int clockid __UNUSED__,
+               int flags __UNUSED__)
 {
-  return -1;
+   return -1;
 }
+
 static inline int
-timerfd_settime(int fd __UNUSED__, int flags __UNUSED__,
+timerfd_settime(int                      fd __UNUSED__,
+                int                      flags __UNUSED__,
                 const struct itimerspec *new_value __UNUSED__,
-                struct itimerspec *old_value __UNUSED__)
+                struct itimerspec       *old_value __UNUSED__)
 {
-  return -1;
+   return -1;
 }
+
 #endif /* HAVE_SYS_TIMERFD_H */
 
 #ifdef USE_G_MAIN_LOOP
@@ -139,23 +148,23 @@ timerfd_settime(int fd __UNUSED__, int flags __UNUSED__,
 struct _Ecore_Fd_Handler
 {
    EINA_INLIST;
-   ECORE_MAGIC;
-   Ecore_Fd_Handler        *next_ready;
-   int                      fd;
-   Ecore_Fd_Handler_Flags   flags;
-   Ecore_Fd_Cb              func;
-   void                    *data;
-   Ecore_Fd_Cb              buf_func;
-   void                    *buf_data;
-   Ecore_Fd_Prep_Cb         prep_func;
-   void                    *prep_data;
-   int                      references;
-   Eina_Bool                read_active : 1;
-   Eina_Bool                write_active : 1;
-   Eina_Bool                error_active : 1;
-   Eina_Bool                delete_me : 1;
+                          ECORE_MAGIC;
+   Ecore_Fd_Handler      *next_ready;
+   int                    fd;
+   Ecore_Fd_Handler_Flags flags;
+   Ecore_Fd_Cb            func;
+   void                  *data;
+   Ecore_Fd_Cb            buf_func;
+   void                  *buf_data;
+   Ecore_Fd_Prep_Cb       prep_func;
+   void                  *prep_data;
+   int                    references;
+   Eina_Bool              read_active : 1;
+   Eina_Bool              write_active : 1;
+   Eina_Bool              error_active : 1;
+   Eina_Bool              delete_me : 1;
 #if defined(USE_G_MAIN_LOOP)
-   GPollFD                  gfd;
+   GPollFD                gfd;
 #endif
 };
 
@@ -163,7 +172,7 @@ struct _Ecore_Fd_Handler
 struct _Ecore_Win32_Handler
 {
    EINA_INLIST;
-   ECORE_MAGIC;
+                         ECORE_MAGIC;
    HANDLE                h;
    Ecore_Win32_Handle_Cb func;
    void                 *data;
@@ -172,7 +181,6 @@ struct _Ecore_Win32_Handler
 };
 #endif
 
-
 #ifndef USE_G_MAIN_LOOP
 static int  _ecore_main_select(double timeout);
 #endif
@@ -190,29 +198,32 @@ static void _ecore_main_loop_iterate_internal(int once_only);
 #endif
 
 #ifdef _WIN32
-static int _ecore_main_win32_select(int nfds, fd_set *readfds, fd_set *writefds,
-                                    fd_set *exceptfds, struct timeval *timeout);
+static int _ecore_main_win32_select(int             nfds,
+                                    fd_set         *readfds,
+                                    fd_set         *writefds,
+                                    fd_set         *exceptfds,
+                                    struct timeval *timeout);
 static void _ecore_main_win32_handlers_cleanup(void);
 #endif
 
-static int               in_main_loop = 0;
+static int in_main_loop = 0;
 #ifndef USE_G_MAIN_LOOP
-static int               do_quit = 0;
+static int do_quit = 0;
 #endif
 static Ecore_Fd_Handler *fd_handlers = NULL;
 static Ecore_Fd_Handler *fd_handler_current = NULL;
-static Eina_List        *fd_handlers_with_prep = NULL;
-static Eina_List        *fd_handlers_with_buffer = NULL;
-static Eina_List        *fd_handlers_to_delete = NULL;
+static Eina_List *fd_handlers_with_prep = NULL;
+static Eina_List *fd_handlers_with_buffer = NULL;
+static Eina_List *fd_handlers_to_delete = NULL;
 
 /* single linked list of ready fdhs, terminated by loop to self */
-static Ecore_Fd_Handler    *fd_handlers_to_call;
-static Ecore_Fd_Handler    *fd_handlers_to_call_current;
+static Ecore_Fd_Handler *fd_handlers_to_call;
+static Ecore_Fd_Handler *fd_handlers_to_call_current;
 
 #ifdef _WIN32
 static Ecore_Win32_Handler *win32_handlers = NULL;
 static Ecore_Win32_Handler *win32_handler_current = NULL;
-static Eina_Bool            win32_handlers_delete_me = EINA_FALSE;
+static Eina_Bool win32_handlers_delete_me = EINA_FALSE;
 #endif
 
 #ifdef _WIN32
@@ -225,8 +236,8 @@ Ecore_Select_Function main_loop_select = select;
 #endif
 
 #ifndef USE_G_MAIN_LOOP
-static double            t1 = 0.0;
-static double            t2 = 0.0;
+static double t1 = 0.0;
+static double t2 = 0.0;
 #endif
 
 static int timer_fd = -1;
@@ -238,7 +249,7 @@ static GPollFD ecore_epoll_fd;
 static GPollFD ecore_timer_fd;
 static GSource *ecore_glib_source;
 static guint ecore_glib_source_id;
-static GMainLoopecore_main_loop;
+static GMainLoop *ecore_main_loop;
 static gboolean ecore_idling;
 static gboolean _ecore_glib_idle_enterer_called;
 static gboolean ecore_fds_ready;
@@ -261,18 +272,18 @@ static inline void
 _ecore_try_add_to_call_list(Ecore_Fd_Handler *fdh)
 {
    /* check if this fdh is already in the list */
-   if (fdh->next_ready)
-     return;
-   if (fdh->read_active || fdh->write_active || fdh->error_active)
-     {
-        /*
-         * make sure next_ready is non-null by pointing to ourselves
-         * use that to indicate this fdh is in the ready list
-         * insert at the head of the list to avoid trouble
-         */
-        fdh->next_ready = fd_handlers_to_call ? fd_handlers_to_call : fdh;
-        fd_handlers_to_call = fdh;
-     }
+    if (fdh->next_ready)
+      return;
+    if (fdh->read_active || fdh->write_active || fdh->error_active)
+      {
+         /*
+          * make sure next_ready is non-null by pointing to ourselves
+          * use that to indicate this fdh is in the ready list
+          * insert at the head of the list to avoid trouble
+          */
+           fdh->next_ready = fd_handlers_to_call ? fd_handlers_to_call : fdh;
+           fd_handlers_to_call = fdh;
+      }
 }
 
 static inline int
@@ -281,7 +292,7 @@ _ecore_get_epoll_fd(void)
    if (epoll_pid && epoll_pid != getpid())
      {
         /* forked! */
-        _ecore_main_loop_shutdown();
+         _ecore_main_loop_shutdown();
      }
    if (epoll_pid == 0 && epoll_fd < 0)
      {
@@ -291,7 +302,10 @@ _ecore_get_epoll_fd(void)
 }
 
 static inline int
-_ecore_epoll_add(int efd, int fd, int events, void *ptr)
+_ecore_epoll_add(int   efd,
+                 int   fd,
+                 int   events,
+                 void *ptr)
 {
    struct epoll_event ev;
 
@@ -306,7 +320,7 @@ static inline int
 _ecore_poll_events_from_fdh(Ecore_Fd_Handler *fdh)
 {
    int events = 0;
-   if (fdh->flags & ECORE_FD_READ)  events |= EPOLLIN;
+   if (fdh->flags & ECORE_FD_READ) events |= EPOLLIN;
    if (fdh->flags & ECORE_FD_WRITE) events |= EPOLLOUT;
    if (fdh->flags & ECORE_FD_ERROR) events |= EPOLLERR;
    return events;
@@ -317,11 +331,12 @@ static inline int
 _gfd_events_from_fdh(Ecore_Fd_Handler *fdh)
 {
    int events = 0;
-   if (fdh->flags & ECORE_FD_READ)  events |= G_IO_IN;
+   if (fdh->flags & ECORE_FD_READ) events |= G_IO_IN;
    if (fdh->flags & ECORE_FD_WRITE) events |= G_IO_OUT;
    if (fdh->flags & ECORE_FD_ERROR) events |= G_IO_ERR;
    return events;
 }
+
 #endif
 
 static inline int
@@ -412,7 +427,8 @@ _ecore_main_fdh_poll_modify(Ecore_Fd_Handler *fdh)
    return r;
 }
 
-static inline int _ecore_main_fdh_epoll_mark_active(void)
+static inline int
+_ecore_main_fdh_epoll_mark_active(void)
 {
    struct epoll_event ev[32];
    int i, ret;
@@ -459,7 +475,8 @@ static inline int _ecore_main_fdh_epoll_mark_active(void)
 
 #ifdef USE_G_MAIN_LOOP
 
-static inline int _ecore_main_fdh_glib_mark_active(void)
+static inline int
+_ecore_main_fdh_glib_mark_active(void)
 {
    Ecore_Fd_Handler *fdh;
    int ret = 0;
@@ -468,18 +485,18 @@ static inline int _ecore_main_fdh_glib_mark_active(void)
    EINA_INLIST_FOREACH(fd_handlers, fdh)
      {
         if (fdh->delete_me)
-           continue;
+          continue;
 
         if (fdh->gfd.revents & G_IO_IN)
-           fdh->read_active = EINA_TRUE;
+          fdh->read_active = EINA_TRUE;
         if (fdh->gfd.revents & G_IO_OUT)
-           fdh->write_active = EINA_TRUE;
+          fdh->write_active = EINA_TRUE;
         if (fdh->gfd.revents & G_IO_ERR)
-           fdh->error_active = EINA_TRUE;
+          fdh->error_active = EINA_TRUE;
 
         _ecore_try_add_to_call_list(fdh);
 
-        if (fdh->gfd.revents & (G_IO_IN|G_IO_OUT|G_IO_ERR)) ret++;
+        if (fdh->gfd.revents & (G_IO_IN | G_IO_OUT | G_IO_ERR)) ret++;
      }
 
    return ret;
@@ -487,7 +504,8 @@ static inline int _ecore_main_fdh_glib_mark_active(void)
 
 /* like we are about to enter main_loop_select in  _ecore_main_select */
 static gboolean
-_ecore_main_gsource_prepare(GSource *source __UNUSED__, gint *next_time)
+_ecore_main_gsource_prepare(GSource *source __UNUSED__,
+                            gint    *next_time)
 {
    gboolean ready = FALSE;
 
@@ -514,56 +532,56 @@ _ecore_main_gsource_prepare(GSource *source __UNUSED__, gint *next_time)
    if (g_main_loop_is_running(ecore_main_loop))
      {
         /* only set idling state in dispatch */
-        if (ecore_idling && !_ecore_idler_exist() && !_ecore_event_exist())
-          {
-             if (_ecore_timers_exists())
-               {
-                  int r = -1;
-                  double t = _ecore_timer_next_get();
-                  if (timer_fd >= 0 && t > 0.0)
-                    {
-                       struct itimerspec ts;
-
-                       ts.it_interval.tv_sec = 0;
-                       ts.it_interval.tv_nsec = 0;
-                       ts.it_value.tv_sec = t;
-                       ts.it_value.tv_nsec = fmod(t*NS_PER_SEC, NS_PER_SEC);
-
-                       /* timerfd cannot sleep for 0 time */
-                       if (ts.it_value.tv_sec || ts.it_value.tv_nsec)
-                         {
-                            r = timerfd_settime(timer_fd, 0, &ts, NULL);
-                            if (r < 0)
-                              {
-                                 ERR("timer set returned %d (errno=%d)", r, errno);
-                                 close(timer_fd);
-                                 timer_fd = -1;
-                              }
-                            else
-                              INF("sleeping for %ld s %06ldus",
-                                  ts.it_value.tv_sec,
-                                  ts.it_value.tv_nsec/1000);
-                         }
-                    }
-                  if (r == -1)
-                    {
-                       *next_time = ceil(t * 1000.0);
-                       if (t == 0.0)
-                         ready = TRUE;
-                    }
-               }
-             else
-               *next_time = -1;
-          }
-        else
-          {
-            *next_time = 0;
-            if (_ecore_event_exist())
-              ready = TRUE;
-          }
-
-        if (fd_handlers_with_prep)
-          _ecore_main_prepare_handlers();
+         if (ecore_idling && !_ecore_idler_exist() && !_ecore_event_exist())
+           {
+              if (_ecore_timers_exists())
+                {
+                   int r = -1;
+                   double t = _ecore_timer_next_get();
+                   if (timer_fd >= 0 && t > 0.0)
+                     {
+                        struct itimerspec ts;
+
+                        ts.it_interval.tv_sec = 0;
+                        ts.it_interval.tv_nsec = 0;
+                        ts.it_value.tv_sec = t;
+                        ts.it_value.tv_nsec = fmod(t * NS_PER_SEC, NS_PER_SEC);
+
+     /* timerfd cannot sleep for 0 time */
+                        if (ts.it_value.tv_sec || ts.it_value.tv_nsec)
+                          {
+                             r = timerfd_settime(timer_fd, 0, &ts, NULL);
+                             if (r < 0)
+                               {
+                                  ERR("timer set returned %d (errno=%d)", r, errno);
+                                  close(timer_fd);
+                                  timer_fd = -1;
+                               }
+                             else
+                               INF("sleeping for %ld s %06ldus",
+                                   ts.it_value.tv_sec,
+                                   ts.it_value.tv_nsec / 1000);
+                          }
+                     }
+                   if (r == -1)
+                     {
+                        *next_time = ceil(t * 1000.0);
+                        if (t == 0.0)
+                          ready = TRUE;
+                     }
+                }
+              else
+                *next_time = -1;
+           }
+         else
+           {
+              *next_time = 0;
+              if (_ecore_event_exist())
+                ready = TRUE;
+           }
+
+         if (fd_handlers_with_prep)
+           _ecore_main_prepare_handlers();
      }
    else
      ready = TRUE;
@@ -597,10 +615,10 @@ _ecore_main_gsource_check(GSource *source __UNUSED__)
                ret = TRUE;
              else
                {
-                  /* unexpected things happened... fail back to old way */
-                  ERR("timer read returned %d (errno=%d)", r, errno);
-                  close(timer_fd);
-                  timer_fd = -1;
+     /* unexpected things happened... fail back to old way */
+                   ERR("timer read returned %d (errno=%d)", r, errno);
+                   close(timer_fd);
+                   timer_fd = -1;
                }
           }
      }
@@ -628,7 +646,9 @@ _ecore_main_gsource_check(GSource *source __UNUSED__)
 
 /* like we just came out of main_loop_select in  _ecore_main_select */
 static gboolean
-_ecore_main_gsource_dispatch(GSource *source __UNUSED__, GSourceFunc callback __UNUSED__, gpointer user_data __UNUSED__)
+_ecore_main_gsource_dispatch(GSource    *source __UNUSED__,
+                             GSourceFunc callback __UNUSED__,
+                             gpointer    user_data __UNUSED__)
 {
    gboolean events_ready, timers_ready, idlers_ready;
    double next_time;
@@ -704,8 +724,8 @@ _ecore_main_gsource_finalize(GSource *source __UNUSED__)
 
 static GSourceFuncs ecore_gsource_funcs =
 {
-   .prepare  = _ecore_main_gsource_prepare,
-   .check    = _ecore_main_gsource_check,
+   .prepare = _ecore_main_gsource_prepare,
+   .check = _ecore_main_gsource_check,
    .dispatch = _ecore_main_gsource_dispatch,
    .finalize = _ecore_main_gsource_finalize,
 };
@@ -717,7 +737,7 @@ _ecore_main_loop_init(void)
 {
    epoll_fd = epoll_create(1);
    if (epoll_fd < 0)
-      WRN("Failed to create epoll fd!");
+     WRN("Failed to create epoll fd!");
    epoll_pid = getpid();
 
    /* add polls on all our file descriptors */
@@ -725,7 +745,7 @@ _ecore_main_loop_init(void)
    EINA_INLIST_FOREACH(fd_handlers, fdh)
      {
         if (fdh->delete_me)
-           continue;
+          continue;
         _ecore_epoll_add(epoll_fd, fdh->fd,
                          _ecore_poll_events_from_fdh(fdh), fdh);
         _ecore_main_fdh_poll_add(fdh);
@@ -735,34 +755,34 @@ _ecore_main_loop_init(void)
 #ifdef USE_G_MAIN_LOOP
    ecore_glib_source = g_source_new(&ecore_gsource_funcs, sizeof (GSource));
    if (!ecore_glib_source)
-      CRIT("Failed to create glib source for epoll!");
+     CRIT("Failed to create glib source for epoll!");
    else
      {
         g_source_set_priority(ecore_glib_source, G_PRIORITY_HIGH_IDLE + 20);
         if (HAVE_EPOLL && epoll_fd >= 0)
           {
              /* epoll multiplexes fds into the g_main_loop */
-             ecore_epoll_fd.fd = epoll_fd;
-             ecore_epoll_fd.events = G_IO_IN;
-             ecore_epoll_fd.revents = 0;
-             g_source_add_poll(ecore_glib_source, &ecore_epoll_fd);
+              ecore_epoll_fd.fd = epoll_fd;
+              ecore_epoll_fd.events = G_IO_IN;
+              ecore_epoll_fd.revents = 0;
+              g_source_add_poll(ecore_glib_source, &ecore_epoll_fd);
           }
 
-       /* timerfd gives us better than millisecond accuracy in g_main_loop */
-       timer_fd = timerfd_create(CLOCK_MONOTONIC, TFD_NONBLOCK);
-       if (timer_fd < 0)
+        /* timerfd gives us better than millisecond accuracy in g_main_loop */
+        timer_fd = timerfd_create(CLOCK_MONOTONIC, TFD_NONBLOCK);
+        if (timer_fd < 0)
           WRN("failed to create timer fd!");
-       else
-         {
-            ecore_timer_fd.fd = timer_fd;
-            ecore_timer_fd.events = G_IO_IN;
-            ecore_timer_fd.revents = 0;
-            g_source_add_poll(ecore_glib_source, &ecore_timer_fd);
-         }
+        else
+          {
+             ecore_timer_fd.fd = timer_fd;
+             ecore_timer_fd.events = G_IO_IN;
+             ecore_timer_fd.revents = 0;
+             g_source_add_poll(ecore_glib_source, &ecore_timer_fd);
+          }
 
         ecore_glib_source_id = g_source_attach(ecore_glib_source, NULL);
         if (ecore_glib_source_id <= 0)
-           CRIT("Failed to attach glib source to default context");
+          CRIT("Failed to attach glib source to default context");
      }
 #endif
 }
@@ -783,7 +803,7 @@ _ecore_main_loop_shutdown(void)
         close(epoll_fd);
         epoll_fd = -1;
      }
-    epoll_pid = 0;
+   epoll_pid = 0;
 
    if (timer_fd >= 0)
      {
@@ -824,6 +844,9 @@ _ecore_main_fd_handler_del(Ecore_Fd_Handler *fd_handler)
  * It does everything that is already done inside an @c Ecore main loop, like
  * checking for expired timers, idlers, etc. But it will do it only once and
  * return, instead of keep watching for new events.
+ *
+ * DO NOT use this function unless you are the person God comes to ask for
+ * advice when He has trouble managing the Universe.
  */
 EAPI void
 ecore_main_loop_iterate(void)
@@ -951,8 +974,12 @@ ecore_main_loop_select_func_get(void)
  * @ingroup Ecore_FD_Handler_Group
  */
 EAPI Ecore_Fd_Handler *
-ecore_main_fd_handler_add(int fd, Ecore_Fd_Handler_Flags flags, Ecore_Fd_Cb func, const void *data,
-                          Ecore_Fd_Cb buf_func, const void *buf_data)
+ecore_main_fd_handler_add(int                    fd,
+                          Ecore_Fd_Handler_Flags flags,
+                          Ecore_Fd_Cb            func,
+                          const void            *data,
+                          Ecore_Fd_Cb            buf_func,
+                          const void            *buf_data)
 {
    Ecore_Fd_Handler *fdh = NULL;
 
@@ -984,8 +1011,8 @@ ecore_main_fd_handler_add(int fd, Ecore_Fd_Handler_Flags flags, Ecore_Fd_Cb func
      fd_handlers_with_buffer = eina_list_append(fd_handlers_with_buffer, fdh);
    fdh->buf_data = (void *)buf_data;
    fd_handlers = (Ecore_Fd_Handler *)
-      eina_inlist_append(EINA_INLIST_GET(fd_handlers),
-                         EINA_INLIST_GET(fdh));
+     eina_inlist_append(EINA_INLIST_GET(fd_handlers),
+                        EINA_INLIST_GET(fdh));
 unlock:
    _ecore_unlock();
 
@@ -994,7 +1021,9 @@ unlock:
 
 #ifdef _WIN32
 EAPI Ecore_Win32_Handler *
-ecore_main_win32_handler_add(void *h, Ecore_Win32_Handle_Cb func, const void *data)
+ecore_main_win32_handler_add(void                 *h,
+                             Ecore_Win32_Handle_Cb func,
+                             const void           *data)
 {
    Ecore_Win32_Handler *wh;
 
@@ -1008,19 +1037,21 @@ ecore_main_win32_handler_add(void *h, Ecore_Win32_Handle_Cb func, const void *da
    wh->func = func;
    wh->data = (void *)data;
    win32_handlers = (Ecore_Win32_Handler *)
-      eina_inlist_append(EINA_INLIST_GET(win32_handlers),
-                         EINA_INLIST_GET(wh));
+     eina_inlist_append(EINA_INLIST_GET(win32_handlers),
+                        EINA_INLIST_GET(wh));
    return wh;
 }
+
 #else
 EAPI Ecore_Win32_Handler *
-ecore_main_win32_handler_add(void *h __UNUSED__, Ecore_Win32_Handle_Cb func __UNUSED__,
-                             const void *data __UNUSED__)
+ecore_main_win32_handler_add(void                 *h __UNUSED__,
+                             Ecore_Win32_Handle_Cb func __UNUSED__,
+                             const void           *data __UNUSED__)
 {
    return NULL;
 }
-#endif
 
+#endif
 
 /**
  * Marks an FD handler for deletion.
@@ -1069,12 +1100,14 @@ ecore_main_win32_handler_del(Ecore_Win32_Handler *win32_handler)
    win32_handlers_delete_me = EINA_TRUE;
    return win32_handler->data;
 }
+
 #else
 EAPI void *
 ecore_main_win32_handler_del(Ecore_Win32_Handler *win32_handler __UNUSED__)
 {
    return NULL;
 }
+
 #endif
 
 /**
@@ -1096,7 +1129,9 @@ ecore_main_win32_handler_del(Ecore_Win32_Handler *win32_handler __UNUSED__)
  * @ingroup Ecore_FD_Handler_Group
  */
 EAPI void
-ecore_main_fd_handler_prepare_callback_set(Ecore_Fd_Handler *fd_handler, Ecore_Fd_Prep_Cb func, const void *data)
+ecore_main_fd_handler_prepare_callback_set(Ecore_Fd_Handler *fd_handler,
+                                           Ecore_Fd_Prep_Cb  func,
+                                           const void       *data)
 {
    _ecore_lock();
 
@@ -1109,7 +1144,7 @@ ecore_main_fd_handler_prepare_callback_set(Ecore_Fd_Handler *fd_handler, Ecore_F
    fd_handler->prep_func = func;
    fd_handler->prep_data = (void *)data;
    if ((!fd_handlers_with_prep) ||
-      (fd_handlers_with_prep && (!eina_list_data_find(fd_handlers_with_prep, fd_handler))))
+       (fd_handlers_with_prep && (!eina_list_data_find(fd_handlers_with_prep, fd_handler))))
      /* FIXME: THIS WILL NOT SCALE WITH LOTS OF PREP FUNCTIONS!!! */
      fd_handlers_with_prep = eina_list_append(fd_handlers_with_prep, fd_handler);
 unlock:
@@ -1151,7 +1186,8 @@ unlock:
  * @ingroup Ecore_FD_Handler_Group
  */
 EAPI Eina_Bool
-ecore_main_fd_handler_active_get(Ecore_Fd_Handler *fd_handler, Ecore_Fd_Handler_Flags flags)
+ecore_main_fd_handler_active_get(Ecore_Fd_Handler      *fd_handler,
+                                 Ecore_Fd_Handler_Flags flags)
 {
    int ret = EINA_FALSE;
 
@@ -1178,7 +1214,8 @@ unlock:
  * @ingroup Ecore_FD_Handler_Group
  */
 EAPI void
-ecore_main_fd_handler_active_set(Ecore_Fd_Handler *fd_handler, Ecore_Fd_Handler_Flags flags)
+ecore_main_fd_handler_active_set(Ecore_Fd_Handler      *fd_handler,
+                                 Ecore_Fd_Handler_Flags flags)
 {
    int ret;
 
@@ -1209,9 +1246,9 @@ _ecore_main_shutdown(void)
 {
    if (in_main_loop)
      {
-       ERR("\n"
-           "*** ECORE WARINING: Calling ecore_shutdown() while still in the main loop.\n"
-           "***                 Program may crash or behave strangely now.");
+        ERR("\n"
+            "*** ECORE WARINING: Calling ecore_shutdown() while still in the main loop.\n"
+            "***                 Program may crash or behave strangely now.");
         return;
      }
    while (fd_handlers)
@@ -1219,8 +1256,8 @@ _ecore_main_shutdown(void)
         Ecore_Fd_Handler *fdh;
 
         fdh = fd_handlers;
-        fd_handlers = (Ecore_Fd_Handler *) eina_inlist_remove(EINA_INLIST_GET(fd_handlers),
-                                                              EINA_INLIST_GET(fdh));
+        fd_handlers = (Ecore_Fd_Handler *)eina_inlist_remove(EINA_INLIST_GET(fd_handlers),
+                                                             EINA_INLIST_GET(fdh));
         ECORE_MAGIC_SET(fdh, ECORE_MAGIC_NONE);
         free(fdh);
      }
@@ -1242,8 +1279,8 @@ _ecore_main_shutdown(void)
         Ecore_Win32_Handler *wh;
 
         wh = win32_handlers;
-        win32_handlers = (Ecore_Win32_Handler *) eina_inlist_remove(EINA_INLIST_GET(win32_handlers),
-                                                                    EINA_INLIST_GET(wh));
+        win32_handlers = (Ecore_Win32_Handler *)eina_inlist_remove(EINA_INLIST_GET(win32_handlers),
+                                                                   EINA_INLIST_GET(wh));
         ECORE_MAGIC_SET(wh, ECORE_MAGIC_NONE);
         free(wh);
      }
@@ -1282,9 +1319,9 @@ static int
 _ecore_main_select(double timeout)
 {
    struct timeval tv, *t;
-   fd_set         rfds, wfds, exfds;
-   int            max_fd;
-   int            ret;
+   fd_set rfds, wfds, exfds;
+   int max_fd;
+   int ret;
 
    t = NULL;
    if ((!ECORE_FINITE(timeout)) || (timeout == 0.0)) /* finite() tests for NaN, too big, too small, and infinity.  */
@@ -1342,13 +1379,13 @@ _ecore_main_select(double timeout)
                        if (fdh->fd > max_fd) max_fd = fdh->fd;
                     }
                }
-         }
+          }
      }
    else
      {
         /* polling on the epoll fd will wake when an fd in the epoll set is active */
-        max_fd = _ecore_get_epoll_fd();
-        FD_SET(max_fd, &rfds);
+         max_fd = _ecore_get_epoll_fd();
+         FD_SET(max_fd, &rfds);
      }
 
    if (_ecore_signal_count_get()) return -1;
@@ -1362,7 +1399,8 @@ _ecore_main_select(double timeout)
      {
 #ifndef _WIN32
         if (errno == EINTR) return -1;
-        else if (errno == EBADF) _ecore_main_fd_handlers_bads_rem();
+        else if (errno == EBADF)
+          _ecore_main_fd_handlers_bads_rem();
 #endif
      }
    if (ret > 0)
@@ -1396,6 +1434,7 @@ _ecore_main_select(double timeout)
      }
    return 0;
 }
+
 #endif
 
 #ifndef _WIN32
@@ -1410,7 +1449,7 @@ _ecore_main_fd_handlers_bads_rem(void)
    ERR("Removing bad fds");
    for (l = EINA_INLIST_GET(fd_handlers); l; )
      {
-        fdh = (Ecore_Fd_Handler *) l;
+        fdh = (Ecore_Fd_Handler *)l;
         l = l->next;
         errno = 0;
 
@@ -1445,7 +1484,7 @@ _ecore_main_fd_handlers_bads_rem(void)
                   found++;
                }
           }
-    }
+     }
    if (found == 0)
      {
 #  ifdef HAVE_GLIB
@@ -1456,6 +1495,7 @@ _ecore_main_fd_handlers_bads_rem(void)
      }
    _ecore_main_fd_handlers_cleanup();
 }
+
 # endif
 #endif
 
@@ -1481,7 +1521,7 @@ _ecore_main_fd_handlers_cleanup(void)
         if (fdh->prep_func && fd_handlers_with_prep)
           fd_handlers_with_prep = eina_list_remove(fd_handlers_with_prep, fdh);
         fd_handlers = (Ecore_Fd_Handler *)
-                      eina_inlist_remove(EINA_INLIST_GET(fd_handlers), EINA_INLIST_GET(fdh));
+          eina_inlist_remove(EINA_INLIST_GET(fd_handlers), EINA_INLIST_GET(fdh));
         ECORE_MAGIC_SET(fdh, ECORE_MAGIC_NONE);
         free(fdh);
         fd_handlers_to_delete = eina_list_remove_list(fd_handlers_to_delete, l);
@@ -1511,66 +1551,66 @@ _ecore_main_win32_handlers_cleanup(void)
                }
 
              win32_handlers = (Ecore_Win32_Handler *)
-                eina_inlist_remove(EINA_INLIST_GET(win32_handlers),
-                                   EINA_INLIST_GET(wh));
+               eina_inlist_remove(EINA_INLIST_GET(win32_handlers),
+                                  EINA_INLIST_GET(wh));
              ECORE_MAGIC_SET(wh, ECORE_MAGIC_NONE);
              free(wh);
           }
      }
    if (!deleted_in_use) win32_handlers_delete_me = EINA_FALSE;
 }
+
 #endif
 
 static void
 _ecore_main_fd_handlers_call(void)
 {
    /* grab a new list */
-   if (!fd_handlers_to_call_current)
-     {
-        fd_handlers_to_call_current = fd_handlers_to_call;
-        fd_handlers_to_call = NULL;
-     }
-
-   while (fd_handlers_to_call_current)
-     {
-        Ecore_Fd_Handler *fdh = fd_handlers_to_call_current;
-
-        if (!fdh->delete_me)
-          {
-             if ((fdh->read_active) ||
-                 (fdh->write_active) ||
-                 (fdh->error_active))
-               {
-                  fdh->references++;
-                  if (!_ecore_call_fd_cb(fdh->func, fdh->data, fdh))
-                    {
-                       if (!fdh->delete_me)
-                         {
-                            fdh->delete_me = EINA_TRUE;
-                            fd_handlers_to_delete = eina_list_append(fd_handlers_to_delete, fdh);
-                         }
-
-                    }
-                  fdh->references--;
-                  _ecore_fd_valid();
-
-                  fdh->read_active = EINA_FALSE;
-                  fdh->write_active = EINA_FALSE;
-                  fdh->error_active = EINA_FALSE;
-               }
-          }
-
-        /* stop when we point to ourselves */
-        if (fdh->next_ready == fdh)
-          {
-             fdh->next_ready = NULL;
-             fd_handlers_to_call_current = NULL;
-             break;
-          }
-
-        fd_handlers_to_call_current = fdh->next_ready;
-        fdh->next_ready = NULL;
-     }
+    if (!fd_handlers_to_call_current)
+      {
+         fd_handlers_to_call_current = fd_handlers_to_call;
+         fd_handlers_to_call = NULL;
+      }
+
+    while (fd_handlers_to_call_current)
+      {
+         Ecore_Fd_Handler *fdh = fd_handlers_to_call_current;
+
+         if (!fdh->delete_me)
+           {
+              if ((fdh->read_active) ||
+                  (fdh->write_active) ||
+                  (fdh->error_active))
+                {
+                   fdh->references++;
+                   if (!_ecore_call_fd_cb(fdh->func, fdh->data, fdh))
+                     {
+                        if (!fdh->delete_me)
+                          {
+                             fdh->delete_me = EINA_TRUE;
+                             fd_handlers_to_delete = eina_list_append(fd_handlers_to_delete, fdh);
+                          }
+                     }
+                   fdh->references--;
+                   _ecore_fd_valid();
+
+                   fdh->read_active = EINA_FALSE;
+                   fdh->write_active = EINA_FALSE;
+                   fdh->error_active = EINA_FALSE;
+                }
+           }
+
+         /* stop when we point to ourselves */
+         if (fdh->next_ready == fdh)
+           {
+              fdh->next_ready = NULL;
+              fd_handlers_to_call_current = NULL;
+              break;
+           }
+
+         fd_handlers_to_call_current = fdh->next_ready;
+         fdh->next_ready = NULL;
+      }
 }
 
 static int
@@ -1617,16 +1657,16 @@ static int
 _ecore_main_loop_spin_core(void)
 {
    /* as we are spinning we need to update loop time per spin */
-   _ecore_time_loop_time = ecore_time_get();
-   /* call all idlers, which returns false if no more idelrs exist */
-   if (!_ecore_idler_all_call()) return SPIN_RESTART;
-   /* sneaky - drop through or if checks - the first one to succeed
-    * drops through and returns "continue" so further ones dont run */
-   if ((_ecore_main_select(0.0) > 0) || (_ecore_event_exist()) ||
-       (_ecore_signal_count_get() > 0) || (do_quit))
+    _ecore_time_loop_time = ecore_time_get();
+    /* call all idlers, which returns false if no more idelrs exist */
+    if (!_ecore_idler_all_call()) return SPIN_RESTART;
+    /* sneaky - drop through or if checks - the first one to succeed
+     * drops through and returns "continue" so further ones dont run */
+    if ((_ecore_main_select(0.0) > 0) || (_ecore_event_exist()) ||
+        (_ecore_signal_count_get() > 0) || (do_quit))
       return LOOP_CONTINUE;
-   /* default - spin more */
-   return SPIN_MORE;
+    /* default - spin more */
+    return SPIN_MORE;
 }
 
 static int
@@ -1634,16 +1674,16 @@ _ecore_main_loop_spin_no_timers(void)
 {
    /* if we have idlers we HAVE to spin and handle everything
     * in a polling way - spin in a tight polling loop */
-   for (;;)
-     {
-        int action = _ecore_main_loop_spin_core();
-        if (action != SPIN_MORE) return action;
-        /* if an idler has added a timer then we need to go through
-         * the start of the spin cycle again to handle cases properly */
-        if (_ecore_timers_exists()) return SPIN_RESTART;
-     }
-   /* just contiune handling events etc. */
-   return LOOP_CONTINUE;
+     for (;; )
+       {
+          int action = _ecore_main_loop_spin_core();
+          if (action != SPIN_MORE) return action;
+          /* if an idler has added a timer then we need to go through
+           * the start of the spin cycle again to handle cases properly */
+          if (_ecore_timers_exists()) return SPIN_RESTART;
+       }
+     /* just contiune handling events etc. */
+     return LOOP_CONTINUE;
 }
 
 static int
@@ -1651,17 +1691,17 @@ _ecore_main_loop_spin_timers(void)
 {
    /* if we have idlers we HAVE to spin and handle everything
     * in a polling way - spin in a tight polling loop */
-   for (;;)
-     {
-        int action = _ecore_main_loop_spin_core();
-        if (action != SPIN_MORE) return action;
-        /* if next timer expires now or in the past - stop spinning and
-         * continue the mainloop walk as our "select" timeout has
-         * expired now */
-        if (_ecore_timer_next_get() <= 0.0) return LOOP_CONTINUE;
-     }
-   /* just contiune handling events etc. */
-   return LOOP_CONTINUE;
+     for (;; )
+       {
+          int action = _ecore_main_loop_spin_core();
+          if (action != SPIN_MORE) return action;
+          /* if next timer expires now or in the past - stop spinning and
+           * continue the mainloop walk as our "select" timeout has
+           * expired now */
+          if (_ecore_timer_next_get() <= 0.0) return LOOP_CONTINUE;
+       }
+     /* just contiune handling events etc. */
+     return LOOP_CONTINUE;
 }
 
 static void
@@ -1696,40 +1736,40 @@ _ecore_main_loop_iterate_internal(int once_only)
    if (_ecore_event_exist())
      {
         /* but first conceptually enter an idle state */
-        _ecore_idle_enterer_call();
-        _ecore_throttle();
-        /* now quickly poll to see which input fd's are active */
-        _ecore_main_select(0.0);
-        /* allow newly queued timers to expire from now on */
-        _ecore_timer_enable_new();
-        /* go straight to processing the events we had queued */
-        goto process_all;
+         _ecore_idle_enterer_call();
+         _ecore_throttle();
+         /* now quickly poll to see which input fd's are active */
+         _ecore_main_select(0.0);
+         /* allow newly queued timers to expire from now on */
+         _ecore_timer_enable_new();
+         /* go straight to processing the events we had queued */
+         goto process_all;
      }
-   
+
    if (once_only)
      {
         /* in once_only mode we should quickly poll for inputs, signals
          * if we got any events or signals, allow new timers to process.
          * use bitwise or to force both conditions to be tested and
          * merged together */
-        if (_ecore_main_select(0.0) | _ecore_signal_count_get())
-          {
-             _ecore_timer_enable_new();
-             goto process_all;
-          }
+          if (_ecore_main_select(0.0) | _ecore_signal_count_get())
+            {
+               _ecore_timer_enable_new();
+               goto process_all;
+            }
      }
    else
      {
         /* call idle enterers ... */
-        _ecore_idle_enterer_call();
-        _ecore_throttle();
+         _ecore_idle_enterer_call();
+         _ecore_throttle();
      }
 
    /* if these calls caused any buffered events to appear - deal with them */
    if (fd_handlers_with_buffer)
      _ecore_main_fd_handlers_buf_call();
 
-   /* if there are any (buffered fd handling may generate them) 
+   /* if there are any (buffered fd handling may generate them)
     * then jump to processing them */
    if (_ecore_event_exist())
      {
@@ -1737,18 +1777,18 @@ _ecore_main_loop_iterate_internal(int once_only)
         _ecore_timer_enable_new();
         goto process_all;
      }
-   
+
    if (once_only)
      {
         /* in once_only mode enter idle here instead and then return */
-        _ecore_idle_enterer_call();
-        _ecore_throttle();
-        _ecore_timer_enable_new();
-        goto done;
+         _ecore_idle_enterer_call();
+         _ecore_throttle();
+         _ecore_timer_enable_new();
+         goto done;
      }
 
    _ecore_fps_marker_1();
-   
+
    /* start of the sleeping or looping section */
 start_loop: /***************************************************************/
    /* any timers re-added as a result of these are allowed to go */
@@ -1762,30 +1802,29 @@ start_loop: /***************************************************************/
    if (!_ecore_event_exist())
      {
         /* init flags */
-        next_time = _ecore_timer_next_get();
-        /* no idlers */
-        if (!_ecore_idler_exist())
-          {
-             /* sleep until timeout or forever (-1.0) waiting for on fds */
-             _ecore_main_select(next_time);
-          }
-        else
-          {
-             int action = LOOP_CONTINUE;
-             
-             /* no timers - spin */
-             if (next_time < 0) action = _ecore_main_loop_spin_no_timers();
-             /* timers - spin */
-             else action = _ecore_main_loop_spin_timers();
-             if (action == SPIN_RESTART) goto start_loop;
-          }
+         next_time = _ecore_timer_next_get();
+         /* no idlers */
+         if (!_ecore_idler_exist())
+           {
+     /* sleep until timeout or forever (-1.0) waiting for on fds */
+               _ecore_main_select(next_time);
+           }
+         else
+           {
+              int action = LOOP_CONTINUE;
+
+     /* no timers - spin */
+              if (next_time < 0) action = _ecore_main_loop_spin_no_timers();
+     /* timers - spin */
+              else action = _ecore_main_loop_spin_timers();
+              if (action == SPIN_RESTART) goto start_loop;
+           }
      }
    _ecore_fps_marker_2();
 
-   
    /* actually wake up and deal with input, events etc. */
 process_all: /***********************************************************/
-   
+
    /* we came out of our "wait state" so idle has exited */
    if (!once_only) _ecore_idle_exiter_call();
    /* call the fd handler per fd that became alive... */
@@ -1802,32 +1841,36 @@ process_all: /***********************************************************/
    if (once_only)
      {
         /* if in once_only mode handle idle exiting */
-        _ecore_idle_enterer_call();
-        _ecore_throttle();
+         _ecore_idle_enterer_call();
+         _ecore_throttle();
      }
-   
+
 done: /*******************************************************************/
    in_main_loop--;
 }
+
 #endif
 
 #ifdef _WIN32
 static int
-_ecore_main_win32_select(int nfds __UNUSED__, fd_set *readfds, fd_set *writefds,
-                         fd_set *exceptfds, struct timeval *tv)
+_ecore_main_win32_select(int             nfds __UNUSED__,
+                         fd_set         *readfds,
+                         fd_set         *writefds,
+                         fd_set         *exceptfds,
+                         struct timeval *tv)
 {
-   HANDLE       objects[MAXIMUM_WAIT_OBJECTS];
-   int          sockets[MAXIMUM_WAIT_OBJECTS];
+   HANDLE objects[MAXIMUM_WAIT_OBJECTS];
+   int sockets[MAXIMUM_WAIT_OBJECTS];
    Ecore_Fd_Handler *fdh;
    Ecore_Win32_Handler *wh;
    unsigned int objects_nbr = 0;
    unsigned int handles_nbr = 0;
    unsigned int events_nbr = 0;
-   DWORD        result;
-   DWORD        timeout;
-   MSG          msg;
+   DWORD result;
+   DWORD timeout;
+   MSG msg;
    unsigned int i;
-   int          res;
+   int res;
 
    /* Create an event object per socket */
    EINA_INLIST_FOREACH(fd_handlers, fdh)
@@ -1898,7 +1941,7 @@ _ecore_main_win32_select(int nfds __UNUSED__, fd_set *readfds, fd_set *writefds,
    else if (result == WAIT_TIMEOUT)
      {
         /* ERR("time out\n"); */
-        res = 0;
+         res = 0;
      }
    else if (result == (WAIT_OBJECT_0 + objects_nbr))
      {
@@ -1917,11 +1960,11 @@ _ecore_main_win32_select(int nfds __UNUSED__, fd_set *readfds, fd_set *writefds,
         WSAEnumNetworkEvents(sockets[result], objects[result], &network_event);
 
         if (network_event.lNetworkEvents & FD_READ)
-           FD_SET(sockets[result], readfds);
+          FD_SET(sockets[result], readfds);
         if (network_event.lNetworkEvents & FD_WRITE)
-           FD_SET(sockets[result], writefds);
+          FD_SET(sockets[result], writefds);
         if (network_event.lNetworkEvents & FD_OOB)
-           FD_SET(sockets[result], exceptfds);
+          FD_SET(sockets[result], exceptfds);
 
         res = 1;
      }
@@ -1931,12 +1974,12 @@ _ecore_main_win32_select(int nfds __UNUSED__, fd_set *readfds, fd_set *writefds,
         if (!win32_handler_current)
           {
              /* regular main loop, start from head */
-             win32_handler_current = win32_handlers;
+              win32_handler_current = win32_handlers;
           }
         else
           {
              /* recursive main loop, continue from where we were */
-             win32_handler_current = (Ecore_Win32_Handler *)EINA_INLIST_GET(win32_handler_current)->next;
+              win32_handler_current = (Ecore_Win32_Handler *)EINA_INLIST_GET(win32_handler_current)->next;
           }
 
         while (win32_handler_current)
@@ -1972,4 +2015,5 @@ _ecore_main_win32_select(int nfds __UNUSED__, fd_set *readfds, fd_set *writefds,
 
    return res;
 }
+
 #endif
index 38c6222..2512090 100644 (file)
@@ -8,7 +8,7 @@
 #include <math.h>
 
 #ifdef HAVE_ISFINITE
-# define ECORE_FINITE(t) isfinite(t)
+# define ECORE_FINITE(t)  isfinite(t)
 #else
 # ifdef _MSC_VER
 #  define ECORE_FINITE(t) _finite(t)
@@ -54,8 +54,8 @@
 # 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
+# define PIPE_FD_INVALID INVALID_SOCKET
+# define PIPE_FD_ERROR   SOCKET_ERROR
 
 #else
 
 # 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
+# define PIPE_FD_INVALID -1
+# define PIPE_FD_ERROR   -1
 
 #endif /* ! _WIN32 */
 
 struct _Ecore_Pipe
 {
-   ECORE_MAGIC;
+                     ECORE_MAGIC;
    int               fd_read;
    int               fd_write;
    Ecore_Fd_Handler *fd_handler;
@@ -86,9 +86,8 @@ struct _Ecore_Pipe
    Eina_Bool         delete_me : 1;
 };
 
-
-static Eina_Bool _ecore_pipe_read(void *data, Ecore_Fd_Handler *fd_handler);
-
+static Eina_Bool _ecore_pipe_read(void             *data,
+                                  Ecore_Fd_Handler *fd_handler);
 
 /**
  * @addtogroup Ecore_Pipe_Group
@@ -108,10 +107,11 @@ static Eina_Bool _ecore_pipe_read(void *data, Ecore_Fd_Handler *fd_handler);
  *                @c NULL otherwise.
  */
 EAPI Ecore_Pipe *
-ecore_pipe_add(Ecore_Pipe_Cb handler, const void *data)
+ecore_pipe_add(Ecore_Pipe_Cb handler,
+               const void   *data)
 {
    Ecore_Pipe *p;
-   int         fds[2];
+   int fds[2];
 
    if (!handler) return NULL;
 
@@ -132,10 +132,10 @@ ecore_pipe_add(Ecore_Pipe_Cb handler, const void *data)
 
    fcntl(p->fd_read, F_SETFL, O_NONBLOCK);
    p->fd_handler = ecore_main_fd_handler_add(p->fd_read,
-                                          ECORE_FD_READ,
-                                          _ecore_pipe_read,
-                                          p,
-                                          NULL, NULL);
+                                             ECORE_FD_READ,
+                                             _ecore_pipe_read,
+                                             p,
+                                             NULL, NULL);
    return p;
 }
 
@@ -250,7 +250,9 @@ ecore_pipe_thaw(Ecore_Pipe *p)
  * Negative value for @p wait means infite wait.
  */
 EAPI int
-ecore_pipe_wait(Ecore_Pipe *p, int message_count, double wait)
+ecore_pipe_wait(Ecore_Pipe *p,
+                int         message_count,
+                double      wait)
 {
    struct timeval tv, *t;
    fd_set rset;
@@ -274,26 +276,26 @@ ecore_pipe_wait(Ecore_Pipe *p, int message_count, double wait)
         if (wait >= 0.0)
           {
              /* finite() tests for NaN, too big, too small, and infinity.  */
-             if ((!ECORE_FINITE(timeout)) || (timeout == 0.0))
-               {
-                  tv.tv_sec = 0;
-                  tv.tv_usec = 0;
-               }
-             else if (timeout > 0.0)
-               {
-                  int sec, usec;
+              if ((!ECORE_FINITE(timeout)) || (timeout == 0.0))
+                {
+                   tv.tv_sec = 0;
+                   tv.tv_usec = 0;
+                }
+              else if (timeout > 0.0)
+                {
+                   int sec, usec;
 #ifdef FIX_HZ
-                  timeout += (0.5 / HZ);
-                  sec = (int)timeout;
-                  usec = (int)((timeout - (double)sec) * 1000000);
+                   timeout += (0.5 / HZ);
+                   sec = (int)timeout;
+                   usec = (int)((timeout - (double)sec) * 1000000);
 #else
-                  sec = (int)timeout;
-                  usec = (int)((timeout - (double)sec) * 1000000);
+                   sec = (int)timeout;
+                   usec = (int)((timeout - (double)sec) * 1000000);
 #endif
-                  tv.tv_sec = sec;
-                  tv.tv_usec = usec;
-               }
-             t = &tv;
+                   tv.tv_sec = sec;
+                   tv.tv_usec = usec;
+                }
+              t = &tv;
           }
         else
           {
@@ -356,11 +358,13 @@ ecore_pipe_write_close(Ecore_Pipe *p)
  * @return       Returns EINA_TRUE on a successful write, EINA_FALSE on an error
  */
 EAPI Eina_Bool
-ecore_pipe_write(Ecore_Pipe *p, const void *buffer, unsigned int nbytes)
+ecore_pipe_write(Ecore_Pipe  *p,
+                 const void  *buffer,
+                 unsigned int nbytes)
 {
    ssize_t ret;
-   size_t  already_written = 0;
-   int     retry = ECORE_PIPE_WRITE_RETRY;
+   size_t already_written = 0;
+   int retry = ECORE_PIPE_WRITE_RETRY;
 
    if (!ECORE_MAGIC_CHECK(p, ECORE_MAGIC_PIPE))
      {
@@ -384,9 +388,9 @@ ecore_pipe_write(Ecore_Pipe *p, const void *buffer, unsigned int nbytes)
         else if (ret > 0)
           {
              /* XXX What should we do here? */
-             ERR("The length of the data was not written complete"
-                 " to the pipe");
-             return EINA_FALSE;
+              ERR("The length of the data was not written complete"
+                  " to the pipe");
+              return EINA_FALSE;
           }
         else if (ret == PIPE_FD_ERROR && errno == EPIPE)
           {
@@ -459,15 +463,16 @@ _ecore_pipe_unhandle(Ecore_Pipe *p)
 }
 
 static Eina_Bool
-_ecore_pipe_read(void *data, Ecore_Fd_Handler *fd_handler __UNUSED__)
+_ecore_pipe_read(void             *data,
+                 Ecore_Fd_Handler *fd_handler __UNUSED__)
 {
-   Ecore_Pipe  *p = (Ecore_Pipe *)data;
-   int          i;
+   Ecore_Pipe *p = (Ecore_Pipe *)data;
+   int i;
 
    p->handling++;
    for (i = 0; i < 16; i++)
      {
-        ssize_t       ret;
+        ssize_t ret;
 
         /* if we already have read some data we don't need to read the len
          * but to finish the already started job
@@ -475,81 +480,81 @@ _ecore_pipe_read(void *data, Ecore_Fd_Handler *fd_handler __UNUSED__)
         if (p->len == 0)
           {
              /* read the len of the passed data */
-             ret = pipe_read(p->fd_read, &p->len, sizeof(p->len));
-
-             /* catch the non error case first */
-             /* read amount ok - nothing more to do */
-             if (ret == sizeof(p->len))
-               ;
-             else if (ret > 0)
-               {
-                  /* we got more data than we asked for - definite error */
-                  ERR("Only read %i bytes from the pipe, although"
-                      " we need to read %i bytes.", 
-                      (int)ret, (int)sizeof(p->len));
-                  _ecore_pipe_unhandle(p);
-                  return ECORE_CALLBACK_CANCEL;
-               }
-             else if (ret == 0)
-               {
-                  /* we got no data */
-                  if (i == 0)
-                    {
-                       /* no data on first try through means an error */
-                       if (!p->delete_me)
-                          p->handler((void *)p->data, NULL, 0);
-                       if (p->passed_data) free(p->passed_data);
-                       p->passed_data = NULL;
-                       p->already_read = 0;
-                       p->len = 0;
-                       p->message++;
-                       pipe_close(p->fd_read);
-                       p->fd_read = PIPE_FD_INVALID;
-                       p->fd_handler = NULL;
-                       _ecore_pipe_unhandle(p);
-                       return ECORE_CALLBACK_CANCEL;
-                    }
-                  else
-                    {
-                       /* no data after first loop try is ok */
-                       _ecore_pipe_unhandle(p);
-                       return ECORE_CALLBACK_RENEW;
-                    }
-               }
+              ret = pipe_read(p->fd_read, &p->len, sizeof(p->len));
+
+     /* catch the non error case first */
+              /* read amount ok - nothing more to do */
+              if (ret == sizeof(p->len))
+                ;
+              else if (ret > 0)
+                {
+     /* we got more data than we asked for - definite error */
+                    ERR("Only read %i bytes from the pipe, although"
+                        " we need to read %i bytes.",
+                        (int)ret, (int)sizeof(p->len));
+                    _ecore_pipe_unhandle(p);
+                    return ECORE_CALLBACK_CANCEL;
+                }
+              else if (ret == 0)
+                {
+     /* we got no data */
+                    if (i == 0)
+                      {
+     /* no data on first try through means an error */
+                          if (!p->delete_me)
+                            p->handler((void *)p->data, NULL, 0);
+                          if (p->passed_data) free(p->passed_data);
+                          p->passed_data = NULL;
+                          p->already_read = 0;
+                          p->len = 0;
+                          p->message++;
+                          pipe_close(p->fd_read);
+                          p->fd_read = PIPE_FD_INVALID;
+                          p->fd_handler = NULL;
+                          _ecore_pipe_unhandle(p);
+                          return ECORE_CALLBACK_CANCEL;
+                      }
+                    else
+                      {
+     /* no data after first loop try is ok */
+                          _ecore_pipe_unhandle(p);
+                          return ECORE_CALLBACK_RENEW;
+                      }
+                }
 #ifndef _WIN32
-             else if ((ret == PIPE_FD_ERROR) &&
-                      ((errno == EINTR) || (errno == EAGAIN)))
-               {
-                  _ecore_pipe_unhandle(p);
-                  return ECORE_CALLBACK_RENEW;
-               }
-             else
-               {
-                  ERR("An unhandled error (ret: %i errno: %i [%s])"
-                      "occurred while reading from the pipe the length",
-                      (int)ret, errno, strerror(errno));
-                  _ecore_pipe_unhandle(p);
-                  return ECORE_CALLBACK_RENEW;
-               }
+              else if ((ret == PIPE_FD_ERROR) &&
+                       ((errno == EINTR) || (errno == EAGAIN)))
+                {
+                   _ecore_pipe_unhandle(p);
+                   return ECORE_CALLBACK_RENEW;
+                }
+              else
+                {
+                   ERR("An unhandled error (ret: %i errno: %i [%s])"
+                       "occurred while reading from the pipe the length",
+                       (int)ret, errno, strerror(errno));
+                   _ecore_pipe_unhandle(p);
+                   return ECORE_CALLBACK_RENEW;
+                }
 #else
-             else /* ret == PIPE_FD_ERROR is the only other case on Windows */
-               {
-                  if (WSAGetLastError() != WSAEWOULDBLOCK)
-                    {
-                       if (!p->delete_me)
+              else /* ret == PIPE_FD_ERROR is the only other case on Windows */
+                {
+                   if (WSAGetLastError() != WSAEWOULDBLOCK)
+                     {
+                        if (!p->delete_me)
                           p->handler((void *)p->data, NULL, 0);
-                       if (p->passed_data) free(p->passed_data);
-                       p->passed_data = NULL;
-                       p->already_read = 0;
-                       p->len = 0;
-                       p->message++;
-                       pipe_close(p->fd_read);
-                       p->fd_read = PIPE_FD_INVALID;
-                       p->fd_handler = NULL;
-                       _ecore_pipe_unhandle(p);
-                       return ECORE_CALLBACK_CANCEL;
-                    }
-               }
+                        if (p->passed_data) free(p->passed_data);
+                        p->passed_data = NULL;
+                        p->already_read = 0;
+                        p->len = 0;
+                        p->message++;
+                        pipe_close(p->fd_read);
+                        p->fd_read = PIPE_FD_INVALID;
+                        p->fd_handler = NULL;
+                        _ecore_pipe_unhandle(p);
+                        return ECORE_CALLBACK_CANCEL;
+                     }
+                }
 #endif
           }
 
@@ -559,7 +564,7 @@ _ecore_pipe_read(void *data, Ecore_Fd_Handler *fd_handler __UNUSED__)
         if (p->len == 0)
           {
              if (!p->delete_me)
-                p->handler((void *)p->data, NULL, 0);
+               p->handler((void *)p->data, NULL, 0);
              /* reset all values to 0 */
              if (p->passed_data) free(p->passed_data);
              p->passed_data = NULL;
@@ -578,8 +583,8 @@ _ecore_pipe_read(void *data, Ecore_Fd_Handler *fd_handler __UNUSED__)
              if (!p->passed_data)
                {
                   if (!p->delete_me)
-                     p->handler((void *)p->data, NULL, 0);
-                  /* close the pipe */
+                    p->handler((void *)p->data, NULL, 0);
+     /* close the pipe */
                   p->already_read = 0;
                   p->len = 0;
                   p->message++;
@@ -601,7 +606,7 @@ _ecore_pipe_read(void *data, Ecore_Fd_Handler *fd_handler __UNUSED__)
         if (ret == (ssize_t)(p->len - p->already_read))
           {
              if (!p->delete_me)
-                p->handler((void *)p->data, p->passed_data, p->len);
+               p->handler((void *)p->data, p->passed_data, p->len);
              free(p->passed_data);
              /* reset all values to 0 */
              p->passed_data = NULL;
@@ -612,15 +617,15 @@ _ecore_pipe_read(void *data, Ecore_Fd_Handler *fd_handler __UNUSED__)
         else if (ret > 0)
           {
              /* more data left to read */
-             p->already_read += ret;
-             _ecore_pipe_unhandle(p);
-             return ECORE_CALLBACK_RENEW;
+              p->already_read += ret;
+              _ecore_pipe_unhandle(p);
+              return ECORE_CALLBACK_RENEW;
           }
         else if (ret == 0)
           {
              /* 0 bytes to read - could be more to read next select wake up */
-             _ecore_pipe_unhandle(p);
-             return ECORE_CALLBACK_RENEW;
+              _ecore_pipe_unhandle(p);
+              return ECORE_CALLBACK_RENEW;
           }
 #ifndef _WIN32
         else if ((ret == PIPE_FD_ERROR) &&
@@ -643,7 +648,7 @@ _ecore_pipe_read(void *data, Ecore_Fd_Handler *fd_handler __UNUSED__)
              if (WSAGetLastError() != WSAEWOULDBLOCK)
                {
                   if (!p->delete_me)
-                     p->handler((void *)p->data, NULL, 0);
+                    p->handler((void *)p->data, NULL, 0);
                   if (p->passed_data) free(p->passed_data);
                   p->passed_data = NULL;
                   p->already_read = 0;
@@ -664,3 +669,4 @@ _ecore_pipe_read(void *data, Ecore_Fd_Handler *fd_handler __UNUSED__)
    _ecore_pipe_unhandle(p);
    return ECORE_CALLBACK_RENEW;
 }
+
index cc0ada6..a283cb5 100644 (file)
@@ -7,40 +7,38 @@
 #include "Ecore.h"
 #include "ecore_private.h"
 
-
 struct _Ecore_Poller
 {
    EINA_INLIST;
-   ECORE_MAGIC;
+                 ECORE_MAGIC;
    int           ibit;
    unsigned char delete_me : 1;
    Ecore_Task_Cb func;
-   void          *data;
+   void         *data;
 };
 
-
-static Ecore_Timer    *timer = NULL;
-static int             min_interval = -1;
-static int             interval_incr = 0;
-static int             at_tick = 0;
-static int             just_added_poller = 0;
-static int             poller_delete_count = 0;
-static int             poller_walking = 0;
-static double          poll_interval = 0.125;
-static double          poll_cur_interval = 0.0;
-static double          last_tick = 0.0;
-static Ecore_Poller   *pollers[16] =
+static Ecore_Timer *timer = NULL;
+static int min_interval = -1;
+static int interval_incr = 0;
+static int at_tick = 0;
+static int just_added_poller = 0;
+static int poller_delete_count = 0;
+static int poller_walking = 0;
+static double poll_interval = 0.125;
+static double poll_cur_interval = 0.0;
+static double last_tick = 0.0;
+static Ecore_Poller *pollers[16] =
 {
-   NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
-   NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL
+   NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
+   NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL
 };
-static unsigned short  poller_counters[16] =
+static unsigned short poller_counters[16] =
 {
-   0,0,0,0,0,0,0,0,
-   0,0,0,0,0,0,0,0
+   0, 0, 0, 0, 0, 0, 0, 0,
+   0, 0, 0, 0, 0, 0, 0, 0
 };
 
-static void _ecore_poller_next_tick_eval(void);
+static void      _ecore_poller_next_tick_eval(void);
 static Eina_Bool _ecore_poller_cb_timer(void *data);
 
 static void
@@ -61,12 +59,12 @@ _ecore_poller_next_tick_eval(void)
    if (min_interval < 0)
      {
         /* no pollers */
-        if (timer)
-          {
-             ecore_timer_del(timer);
-             timer = NULL;
-          }
-        return;
+         if (timer)
+           {
+              ecore_timer_del(timer);
+              timer = NULL;
+           }
+         return;
      }
    interval_incr = (1 << min_interval);
    interval = interval_incr * poll_interval;
@@ -91,8 +89,8 @@ _ecore_poller_next_tick_eval(void)
              if (interval != poll_cur_interval)
                {
                   t -= last_tick; /* time since we last ticked */
-                  /* delete the timer and reset it to tick off in the new
-                   * time interval. at the tick this will be adjusted */
+     /* delete the timer and reset it to tick off in the new
+      * time interval. at the tick this will be adjusted */
                   ecore_timer_del(timer);
                   timer = ecore_timer_add(interval - t,
                                           _ecore_poller_cb_timer, NULL);
@@ -128,23 +126,23 @@ _ecore_poller_cb_timer(void *data __UNUSED__)
      {
         /* if the counter is @ 0 - this means that counter "went off" this
          * tick interval, so run all pollers hooked to that counter */
-        if (poller_counters[i] == 0)
-          {
-             EINA_INLIST_FOREACH(pollers[i], poller)
-               {
-                  if (!poller->delete_me)
-                    {
-                       if (!poller->func(poller->data))
-                         {
-                            if (!poller->delete_me)
-                              {
-                                 poller->delete_me = 1;
-                                 poller_delete_count++;
-                              }
-                         }
-                    }
-               }
-          }
+          if (poller_counters[i] == 0)
+            {
+               EINA_INLIST_FOREACH(pollers[i], poller)
+                 {
+                    if (!poller->delete_me)
+                      {
+                         if (!poller->func(poller->data))
+                           {
+                              if (!poller->delete_me)
+                                {
+                                   poller->delete_me = 1;
+                                   poller_delete_count++;
+                                }
+                           }
+                      }
+                 }
+            }
      }
    poller_walking--;
 
@@ -152,23 +150,23 @@ _ecore_poller_cb_timer(void *data __UNUSED__)
    if (poller_delete_count > 0)
      {
         /* FIXME: walk all pollers and remove deleted ones */
-        for (i = 0; i < 15; i++)
-          {
-             for (l = pollers[i]; l;)
-               {
-                  poller = l;
-                  l = (Ecore_Poller *) EINA_INLIST_GET(l)->next;
-                  if (poller->delete_me)
-                    {
-                       pollers[i] = (Ecore_Poller *) eina_inlist_remove(EINA_INLIST_GET(pollers[i]), EINA_INLIST_GET(poller));
-                       free(poller);
-                       poller_delete_count--;
-                       changes++;
-                       if (poller_delete_count <= 0) break;
-                    }
-               }
-             if (poller_delete_count <= 0) break;
-          }
+         for (i = 0; i < 15; i++)
+           {
+              for (l = pollers[i]; l; )
+                {
+                   poller = l;
+                   l = (Ecore_Poller *)EINA_INLIST_GET(l)->next;
+                   if (poller->delete_me)
+                     {
+                        pollers[i] = (Ecore_Poller *)eina_inlist_remove(EINA_INLIST_GET(pollers[i]), EINA_INLIST_GET(poller));
+                        free(poller);
+                        poller_delete_count--;
+                        changes++;
+                        if (poller_delete_count <= 0) break;
+                     }
+                }
+              if (poller_delete_count <= 0) break;
+           }
      }
    /* if we deleted or added any pollers, then we need to re-evaluate our
     * minimum poll interval */
@@ -196,7 +194,6 @@ _ecore_poller_cb_timer(void *data __UNUSED__)
  * @{
  */
 
-
 /**
  * Sets the time between ticks (in seconds) for the given ticker clock.
  * @param   type The ticker type to adjust
@@ -206,7 +203,8 @@ _ecore_poller_cb_timer(void *data __UNUSED__)
  * by @p type to the time period defined by @p poll_time.
  */
 EAPI void
-ecore_poller_poll_interval_set(Ecore_Poller_Type type __UNUSED__, double poll_time)
+ecore_poller_poll_interval_set(Ecore_Poller_Type type __UNUSED__,
+                               double            poll_time)
 {
    poll_interval = poll_time;
    _ecore_poller_next_tick_eval();
@@ -272,7 +270,10 @@ ecore_poller_poll_interval_get(Ecore_Poller_Type type __UNUSED__)
  * invalid.
  */
 EAPI Ecore_Poller *
-ecore_poller_add(Ecore_Poller_Type type __UNUSED__, int interval, Ecore_Task_Cb func, const void *data)
+ecore_poller_add(Ecore_Poller_Type type __UNUSED__,
+                 int               interval,
+                 Ecore_Task_Cb     func,
+                 const void       *data)
 {
    Ecore_Poller *poller;
    int ibit;
@@ -297,7 +298,7 @@ ecore_poller_add(Ecore_Poller_Type type __UNUSED__, int interval, Ecore_Task_Cb
    poller->ibit = ibit;
    poller->func = func;
    poller->data = (void *)data;
-   pollers[poller->ibit] = (Ecore_Poller *) eina_inlist_prepend(EINA_INLIST_GET(pollers[poller->ibit]), EINA_INLIST_GET(poller));
+   pollers[poller->ibit] = (Ecore_Poller *)eina_inlist_prepend(EINA_INLIST_GET(pollers[poller->ibit]), EINA_INLIST_GET(poller));
    if (poller_walking)
      just_added_poller++;
    else
@@ -316,14 +317,15 @@ ecore_poller_add(Ecore_Poller_Type type __UNUSED__, int interval, Ecore_Task_Cb
  * a poll rate without deleting and re-creating a poller.
  */
 EAPI Eina_Bool
-ecore_poller_poller_interval_set(Ecore_Poller *poller, int interval)
+ecore_poller_poller_interval_set(Ecore_Poller *poller,
+                                 int           interval)
 {
    int ibit;
 
    if (!ECORE_MAGIC_CHECK(poller, ECORE_MAGIC_POLLER))
      {
         ECORE_MAGIC_FAIL(poller, ECORE_MAGIC_POLLER,
-           "ecore_poller_poller_interval_set");
+                         "ecore_poller_poller_interval_set");
         return EINA_FALSE;
      }
 
@@ -332,17 +334,17 @@ ecore_poller_poller_interval_set(Ecore_Poller *poller, int interval)
    ibit = -1;
    while (interval != 0)
      {
-       ibit++;
-       interval >>= 1;
+        ibit++;
+        interval >>= 1;
      }
    /* only allow up to 32768 - i.e. ibit == 15, so limit it */
    if (ibit > 15) ibit = 15;
    /* if interval specified is the same as interval set, return true without wasting time */
    if (poller->ibit == ibit)
      return EINA_TRUE;
-   pollers[poller->ibit] = (Ecore_Poller *) eina_inlist_remove(EINA_INLIST_GET(pollers[poller->ibit]), EINA_INLIST_GET(poller));
+   pollers[poller->ibit] = (Ecore_Poller *)eina_inlist_remove(EINA_INLIST_GET(pollers[poller->ibit]), EINA_INLIST_GET(poller));
    poller->ibit = ibit;
-   pollers[poller->ibit] = (Ecore_Poller *) eina_inlist_prepend(EINA_INLIST_GET(pollers[poller->ibit]), EINA_INLIST_GET(poller));
+   pollers[poller->ibit] = (Ecore_Poller *)eina_inlist_prepend(EINA_INLIST_GET(pollers[poller->ibit]), EINA_INLIST_GET(poller));
    if (poller_walking)
      just_added_poller++;
    else
@@ -366,15 +368,15 @@ ecore_poller_poller_interval_get(Ecore_Poller *poller)
    if (!ECORE_MAGIC_CHECK(poller, ECORE_MAGIC_POLLER))
      {
         ECORE_MAGIC_FAIL(poller, ECORE_MAGIC_POLLER,
-           "ecore_poller_poller_interval_get");
+                         "ecore_poller_poller_interval_get");
         return 0;
      }
 
    ibit = poller->ibit;
    while (ibit != 0)
      {
-       ibit--;
-       interval <<= 1;
+        ibit--;
+        interval <<= 1;
      }
    return interval;
 }
@@ -396,7 +398,7 @@ ecore_poller_del(Ecore_Poller *poller)
    if (!ECORE_MAGIC_CHECK(poller, ECORE_MAGIC_POLLER))
      {
         ECORE_MAGIC_FAIL(poller, ECORE_MAGIC_POLLER,
-           "ecore_poller_del");
+                         "ecore_poller_del");
         return NULL;
      }
    /* we are walking the poller list - a bad idea to remove from it while
@@ -410,7 +412,7 @@ ecore_poller_del(Ecore_Poller *poller)
      }
    /* not in loop so safe - delete immediately */
    data = poller->data;
-   pollers[poller->ibit] = (Ecore_Poller *) eina_inlist_remove(EINA_INLIST_GET(pollers[poller->ibit]), EINA_INLIST_GET(poller));
+   pollers[poller->ibit] = (Ecore_Poller *)eina_inlist_remove(EINA_INLIST_GET(pollers[poller->ibit]), EINA_INLIST_GET(poller));
    free(poller);
    _ecore_poller_next_tick_eval();
    return data;
@@ -430,8 +432,9 @@ _ecore_poller_shutdown(void)
      {
         while ((poller = pollers[i]))
           {
-             pollers[i] = (Ecore_Poller *) eina_inlist_remove(EINA_INLIST_GET(pollers[i]), EINA_INLIST_GET(pollers[i]));
+             pollers[i] = (Ecore_Poller *)eina_inlist_remove(EINA_INLIST_GET(pollers[i]), EINA_INLIST_GET(pollers[i]));
              free(poller);
           }
      }
 }
+
index fe95580..f328605 100644 (file)
@@ -3,7 +3,7 @@
 
 #include <assert.h>
 
-extern int _ecore_log_dom ;
+extern int _ecore_log_dom;
 #ifdef  _ECORE_DEFAULT_LOG_DOM
 # undef _ECORE_DEFAULT_LOG_DOM
 #endif
@@ -44,155 +44,172 @@ extern int _ecore_log_dom ;
 #endif
 
 #ifndef MIN
-# define MIN(x, y) (((x) > (y)) ? (y) : (x))
+# define MIN(x, y)          (((x) > (y)) ? (y) : (x))
 #endif
 
 #ifndef MAX
-# define MAX(x, y) (((x) > (y)) ? (x) : (y))
+# define MAX(x, y)          (((x) > (y)) ? (x) : (y))
 #endif
 
 #ifndef ABS
-# define ABS(x) ((x) < 0 ? -(x) : (x))
+# define ABS(x)             ((x) < 0 ? -(x) : (x))
 #endif
 
 #ifndef CLAMP
 # define CLAMP(x, min, max) (((x) > (max)) ? (max) : (((x) < (min)) ? (min) : (x)))
 #endif
 
-#define EVAS_FRAME_QUEUING 1 /* for test */
+#define EVAS_FRAME_QUEUING        1 /* for test */
 
-#define READBUFSIZ 65536
+#define READBUFSIZ                65536
 
-#define ECORE_MAGIC_NONE            0x1234fedc
-#define ECORE_MAGIC_EXE             0xf7e812f5
-#define ECORE_MAGIC_TIMER           0xf7d713f4
-#define ECORE_MAGIC_IDLER           0xf7c614f3
-#define ECORE_MAGIC_IDLE_ENTERER    0xf7b515f2
-#define ECORE_MAGIC_IDLE_EXITER     0xf7601afd
-#define ECORE_MAGIC_FD_HANDLER      0xf7a416f1
-#define ECORE_MAGIC_EVENT_HANDLER   0xf79317f0
-#define ECORE_MAGIC_EVENT_FILTER    0xf78218ff
-#define ECORE_MAGIC_EVENT           0xf77119fe
-#define ECORE_MAGIC_ANIMATOR        0xf7643ea5
-#define ECORE_MAGIC_POLLER          0xf7568127
-#define ECORE_MAGIC_PIPE            0xf7458226
-#define ECORE_MAGIC_WIN32_HANDLER   0xf7e8f1a3
-#define ECORE_MAGIC_JOB             0x76543210
+#define ECORE_MAGIC_NONE          0x1234fedc
+#define ECORE_MAGIC_EXE           0xf7e812f5
+#define ECORE_MAGIC_TIMER         0xf7d713f4
+#define ECORE_MAGIC_IDLER         0xf7c614f3
+#define ECORE_MAGIC_IDLE_ENTERER  0xf7b515f2
+#define ECORE_MAGIC_IDLE_EXITER   0xf7601afd
+#define ECORE_MAGIC_FD_HANDLER    0xf7a416f1
+#define ECORE_MAGIC_EVENT_HANDLER 0xf79317f0
+#define ECORE_MAGIC_EVENT_FILTER  0xf78218ff
+#define ECORE_MAGIC_EVENT         0xf77119fe
+#define ECORE_MAGIC_ANIMATOR      0xf7643ea5
+#define ECORE_MAGIC_POLLER        0xf7568127
+#define ECORE_MAGIC_PIPE          0xf7458226
+#define ECORE_MAGIC_WIN32_HANDLER 0xf7e8f1a3
+#define ECORE_MAGIC_JOB           0x76543210
 
+#define ECORE_MAGIC               Ecore_Magic __magic
 
-#define ECORE_MAGIC                 Ecore_Magic  __magic
-
-#define ECORE_MAGIC_SET(d, m)       (d)->__magic = (m)
-#define ECORE_MAGIC_CHECK(d, m)     ((d) && ((d)->__magic == (m)))
-#define ECORE_MAGIC_FAIL(d, m, fn)  _ecore_magic_fail((d), (d) ? (d)->__magic : 0, (m), (fn));
+#define ECORE_MAGIC_SET(d, m)      (d)->__magic = (m)
+#define ECORE_MAGIC_CHECK(d, m)    ((d) && ((d)->__magic == (m)))
+#define ECORE_MAGIC_FAIL(d, m, fn) _ecore_magic_fail((d), (d) ? (d)->__magic : 0, (m), (fn));
 
 /* undef the following, we want our version */
 #undef FREE
-#define FREE(ptr) free(ptr); ptr = NULL;
+#define FREE(ptr)                  free(ptr); ptr = NULL;
 
 #undef IF_FREE
-#define IF_FREE(ptr) if (ptr) free(ptr); ptr = NULL;
+#define IF_FREE(ptr)               if (ptr) free(ptr); ptr = NULL;
 
 #undef IF_FN_DEL
-#define IF_FN_DEL(_fn, ptr) if (ptr) { _fn(ptr); ptr = NULL; }
+#define IF_FN_DEL(_fn, ptr)        if (ptr) { _fn(ptr); ptr = NULL; }
 
-EAPI void ecore_print_warning(const char *function, const char *sparam);
+EAPI void
+ecore_print_warning(const char *function,
+                    const char *sparam);
 
 /* convenience macros for checking pointer parameters for non-NULL */
 #undef CHECK_PARAM_POINTER_RETURN
 #define CHECK_PARAM_POINTER_RETURN(sparam, param, ret) \
-     if (!(param)) \
-         { \
-            ecore_print_warning(__FUNCTION__, sparam); \
-            return ret; \
-         }
+  if (!(param))                                        \
+    {                                                  \
+       ecore_print_warning(__FUNCTION__, sparam);      \
+       return ret;                                     \
+    }
 
 #undef CHECK_PARAM_POINTER
-#define CHECK_PARAM_POINTER(sparam, param) \
-     if (!(param)) \
-         { \
-            ecore_print_warning(__FUNCTION__, sparam); \
-            return; \
-         }
-
-typedef unsigned int              Ecore_Magic;
-
-EAPI void          _ecore_magic_fail(const void *d, Ecore_Magic m, Ecore_Magic req_m, const char *fname);
-
-void          _ecore_time_init(void);
-
-Ecore_Timer  *_ecore_timer_loop_add(double in, Ecore_Task_Cb func, const void *data);
-void         *_ecore_timer_del(Ecore_Timer *timer);
-void          _ecore_timer_delay(Ecore_Timer *timer, double add);
-void          _ecore_timer_shutdown(void);
-void          _ecore_timer_cleanup(void);
-void          _ecore_timer_enable_new(void);
-double        _ecore_timer_next_get(void);
-void          _ecore_timer_expired_timers_call(double when);
-int           _ecore_timers_exists(void);
-
-int           _ecore_timer_expired_call(double when);
-
-void          _ecore_idler_shutdown(void);
-int           _ecore_idler_all_call(void);
-int           _ecore_idler_exist(void);
-
-void          _ecore_idle_enterer_shutdown(void);
-void          _ecore_idle_enterer_call(void);
-int           _ecore_idle_enterer_exist(void);
-
-void          _ecore_idle_exiter_shutdown(void);
-void          _ecore_idle_exiter_call(void);
-int           _ecore_idle_exiter_exist(void);
-
-void          _ecore_event_shutdown(void);
-int           _ecore_event_exist(void);
-Ecore_Event  *_ecore_event_add(int type, void *ev, Ecore_End_Cb func_free, void *data);
-void          _ecore_event_call(void);
-void         *_ecore_event_handler_del(Ecore_Event_Handler *event_handler);
-
-Ecore_Timer  *_ecore_exe_doomsday_clock_get(Ecore_Exe *exe);
-void          _ecore_exe_doomsday_clock_set(Ecore_Exe *exe, Ecore_Timer *dc);
-
-EAPI void    *_ecore_event_signal_user_new(void);
-void         *_ecore_event_signal_hup_new(void);
-void         *_ecore_event_signal_exit_new(void);
-void         *_ecore_event_signal_power_new(void);
-void         *_ecore_event_signal_realtime_new(void);
-
-void         *_ecore_main_fd_handler_del(Ecore_Fd_Handler *fd_handler);
-
-void          _ecore_main_shutdown(void);
+#define CHECK_PARAM_POINTER(sparam, param)        \
+  if (!(param))                                   \
+    {                                             \
+       ecore_print_warning(__FUNCTION__, sparam); \
+       return;                                    \
+    }
+
+typedef unsigned int Ecore_Magic;
+
+EAPI void _ecore_magic_fail(const void *d,
+                            Ecore_Magic m,
+                            Ecore_Magic req_m,
+                            const char *fname);
+
+void         _ecore_time_init(void);
+
+Ecore_Timer *_ecore_timer_loop_add(double in,
+                                   Ecore_Task_Cb func,
+                                   const void *data);
+void        *_ecore_timer_del(Ecore_Timer *timer);
+void         _ecore_timer_delay(Ecore_Timer *timer,
+                                double add);
+void         _ecore_timer_shutdown(void);
+void         _ecore_timer_cleanup(void);
+void         _ecore_timer_enable_new(void);
+double       _ecore_timer_next_get(void);
+void         _ecore_timer_expired_timers_call(double when);
+int          _ecore_timers_exists(void);
+
+int          _ecore_timer_expired_call(double when);
+
+void         _ecore_idler_shutdown(void);
+int          _ecore_idler_all_call(void);
+int          _ecore_idler_exist(void);
+
+void         _ecore_idle_enterer_shutdown(void);
+void         _ecore_idle_enterer_call(void);
+int          _ecore_idle_enterer_exist(void);
+
+void         _ecore_idle_exiter_shutdown(void);
+void         _ecore_idle_exiter_call(void);
+int          _ecore_idle_exiter_exist(void);
+
+void         _ecore_event_shutdown(void);
+int          _ecore_event_exist(void);
+Ecore_Event *_ecore_event_add(int type,
+                              void *ev,
+                              Ecore_End_Cb func_free,
+                              void *data);
+void         _ecore_event_call(void);
+void        *_ecore_event_handler_del(Ecore_Event_Handler *event_handler);
+
+Ecore_Timer *_ecore_exe_doomsday_clock_get(Ecore_Exe *exe);
+void         _ecore_exe_doomsday_clock_set(Ecore_Exe *exe,
+                                           Ecore_Timer *dc);
+
+EAPI void *_ecore_event_signal_user_new(void);
+void      *_ecore_event_signal_hup_new(void);
+void      *_ecore_event_signal_exit_new(void);
+void      *_ecore_event_signal_power_new(void);
+void      *_ecore_event_signal_realtime_new(void);
+
+void      *_ecore_main_fd_handler_del(Ecore_Fd_Handler *fd_handler);
+
+void       _ecore_main_shutdown(void);
 
 #if defined (_WIN32) || defined (__lv2ppu__)
 static inline void _ecore_signal_shutdown(void) { }
+
 static inline void _ecore_signal_init(void) { }
+
 static inline void _ecore_signal_received_process(void) { }
-static inline int  _ecore_signal_count_get(void) { return 0; }
+
+static inline int _ecore_signal_count_get(void) { return 0; }
+
 static inline void _ecore_signal_call(void) { }
+
 #else
-void          _ecore_signal_shutdown(void);
-void          _ecore_signal_init(void);
-void          _ecore_signal_received_process(void);
-int           _ecore_signal_count_get(void);
-void          _ecore_signal_call(void);
+void _ecore_signal_shutdown(void);
+void _ecore_signal_init(void);
+void _ecore_signal_received_process(void);
+int  _ecore_signal_count_get(void);
+void _ecore_signal_call(void);
 #endif
 
-void          _ecore_exe_init(void);
-void          _ecore_exe_shutdown(void);
+void       _ecore_exe_init(void);
+void       _ecore_exe_shutdown(void);
 #ifndef _WIN32
-Ecore_Exe    *_ecore_exe_find(pid_t pid);
-void         *_ecore_exe_event_del_new(void);
-void          _ecore_exe_event_del_free(void *data, void *ev);
+Ecore_Exe *_ecore_exe_find(pid_t pid);
+void      *_ecore_exe_event_del_new(void);
+void       _ecore_exe_event_del_free(void *data,
+                                     void *ev);
 #endif
 
-void          _ecore_animator_shutdown(void);
+void _ecore_animator_shutdown(void);
 
-void          _ecore_poller_shutdown(void);
+void _ecore_poller_shutdown(void);
 
-void          _ecore_fps_debug_init(void);
-void          _ecore_fps_debug_shutdown(void);
-void          _ecore_fps_debug_runtime_add(double t);
+void _ecore_fps_debug_init(void);
+void _ecore_fps_debug_shutdown(void);
+void _ecore_fps_debug_runtime_add(double t);
 
 void _ecore_thread_init(void);
 void _ecore_thread_shutdown(void);
@@ -238,7 +255,8 @@ _ecore_unlock(void)
  * Callback wrappers all assume that ecore _ecore_lock has been called
  */
 static inline Eina_Bool
-_ecore_call_task_cb(Ecore_Task_Cb func, void *data)
+_ecore_call_task_cb(Ecore_Task_Cb func,
+                    void *data)
 {
    Eina_Bool r;
 
@@ -250,7 +268,8 @@ _ecore_call_task_cb(Ecore_Task_Cb func, void *data)
 }
 
 static inline void *
-_ecore_call_data_cb(Ecore_Data_Cb func, void *data)
+_ecore_call_data_cb(Ecore_Data_Cb func,
+                    void *data)
 {
    void *r;
 
@@ -262,7 +281,9 @@ _ecore_call_data_cb(Ecore_Data_Cb func, void *data)
 }
 
 static inline void
-_ecore_call_end_cb(Ecore_End_Cb func, void *user_data, void *func_data)
+_ecore_call_end_cb(Ecore_End_Cb func,
+                   void *user_data,
+                   void *func_data)
 {
    _ecore_unlock();
    func(user_data, func_data);
@@ -270,8 +291,11 @@ _ecore_call_end_cb(Ecore_End_Cb func, void *user_data, void *func_data)
 }
 
 static inline Eina_Bool
-_ecore_call_filter_cb(Ecore_Filter_Cb func, void *data,
-                        void *loop_data, int type, void *event)
+_ecore_call_filter_cb(Ecore_Filter_Cb func,
+                      void *data,
+                      void *loop_data,
+                      int type,
+                      void *event)
 {
    Eina_Bool r;
 
@@ -283,7 +307,10 @@ _ecore_call_filter_cb(Ecore_Filter_Cb func, void *data,
 }
 
 static inline Eina_Bool
-_ecore_call_handler_cb(Ecore_Event_Handler_Cb func, void *data, int type, void *event)
+_ecore_call_handler_cb(Ecore_Event_Handler_Cb func,
+                       void *data,
+                       int type,
+                       void *event)
 {
    Eina_Bool r;
 
@@ -295,7 +322,9 @@ _ecore_call_handler_cb(Ecore_Event_Handler_Cb func, void *data, int type, void *
 }
 
 static inline void
-_ecore_call_prep_cb(Ecore_Fd_Prep_Cb func, void *data, Ecore_Fd_Handler *fd_handler)
+_ecore_call_prep_cb(Ecore_Fd_Prep_Cb func,
+                    void *data,
+                    Ecore_Fd_Handler *fd_handler)
 {
    _ecore_unlock();
    func(data, fd_handler);
@@ -303,7 +332,9 @@ _ecore_call_prep_cb(Ecore_Fd_Prep_Cb func, void *data, Ecore_Fd_Handler *fd_hand
 }
 
 static inline Eina_Bool
-_ecore_call_fd_cb(Ecore_Fd_Cb func, void *data, Ecore_Fd_Handler *fd_handler)
+_ecore_call_fd_cb(Ecore_Fd_Cb func,
+                  void *data,
+                  Ecore_Fd_Handler *fd_handler)
 {
    Eina_Bool r;
 
@@ -314,7 +345,7 @@ _ecore_call_fd_cb(Ecore_Fd_Cb func, void *data, Ecore_Fd_Handler *fd_handler)
    return r;
 }
 
-extern int    _ecore_fps_debug;
+extern int _ecore_fps_debug;
 extern double _ecore_time_loop_time;
 extern Eina_Bool _ecore_glib_always_integrate;
 extern Ecore_Select_Function main_loop_select;
index 9bce55e..78edb8c 100644 (file)
 
 typedef void (*Signal_Handler)(int sig, siginfo_t *si, void *foo);
 
-static void _ecore_signal_callback_set(int sig, Signal_Handler func);
-static void _ecore_signal_callback_ignore(int sig, siginfo_t *si, void *foo);
-static void _ecore_signal_callback_sigchld(int sig, siginfo_t *si, void *foo);
-static void _ecore_signal_callback_sigusr1(int sig, siginfo_t *si, void *foo);
-static void _ecore_signal_callback_sigusr2(int sig, siginfo_t *si, void *foo);
-static void _ecore_signal_callback_sighup(int sig, siginfo_t *si, void *foo);
-static void _ecore_signal_callback_sigquit(int sig, siginfo_t *si, void *foo);
-static void _ecore_signal_callback_sigint(int sig, siginfo_t *si, void *foo);
-static void _ecore_signal_callback_sigterm(int sig, siginfo_t *si, void *foo);
+static void _ecore_signal_callback_set(int            sig,
+                                       Signal_Handler func);
+static void _ecore_signal_callback_ignore(int        sig,
+                                          siginfo_t *si,
+                                          void      *foo);
+static void _ecore_signal_callback_sigchld(int        sig,
+                                           siginfo_t *si,
+                                           void      *foo);
+static void _ecore_signal_callback_sigusr1(int        sig,
+                                           siginfo_t *si,
+                                           void      *foo);
+static void _ecore_signal_callback_sigusr2(int        sig,
+                                           siginfo_t *si,
+                                           void      *foo);
+static void _ecore_signal_callback_sighup(int        sig,
+                                          siginfo_t *si,
+                                          void      *foo);
+static void _ecore_signal_callback_sigquit(int        sig,
+                                           siginfo_t *si,
+                                           void      *foo);
+static void _ecore_signal_callback_sigint(int        sig,
+                                          siginfo_t *si,
+                                          void      *foo);
+static void _ecore_signal_callback_sigterm(int        sig,
+                                           siginfo_t *si,
+                                           void      *foo);
 #ifdef SIGPWR
-static void _ecore_signal_callback_sigpwr(int sig, siginfo_t *si, void *foo);
+static void _ecore_signal_callback_sigpwr(int        sig,
+                                          siginfo_t *si,
+                                          void      *foo);
 #endif
 
 static Eina_Bool _ecore_signal_exe_exit_delay(void *data);
@@ -62,17 +81,17 @@ static volatile siginfo_t sigpwr_info[MAXSIGQ];
 void
 _ecore_signal_shutdown(void)
 {
-   _ecore_signal_callback_set(SIGPIPE, (Signal_Handler) SIG_DFL);
-   _ecore_signal_callback_set(SIGALRM, (Signal_Handler) SIG_DFL);
-   _ecore_signal_callback_set(SIGCHLD, (Signal_Handler) SIG_DFL);
-   _ecore_signal_callback_set(SIGUSR1, (Signal_Handler) SIG_DFL);
-   _ecore_signal_callback_set(SIGUSR2, (Signal_Handler) SIG_DFL);
-   _ecore_signal_callback_set(SIGHUP,  (Signal_Handler) SIG_DFL);
-   _ecore_signal_callback_set(SIGQUIT, (Signal_Handler) SIG_DFL);
-   _ecore_signal_callback_set(SIGINT,  (Signal_Handler) SIG_DFL);
-   _ecore_signal_callback_set(SIGTERM, (Signal_Handler) SIG_DFL);
+   _ecore_signal_callback_set(SIGPIPE, (Signal_Handler)SIG_DFL);
+   _ecore_signal_callback_set(SIGALRM, (Signal_Handler)SIG_DFL);
+   _ecore_signal_callback_set(SIGCHLD, (Signal_Handler)SIG_DFL);
+   _ecore_signal_callback_set(SIGUSR1, (Signal_Handler)SIG_DFL);
+   _ecore_signal_callback_set(SIGUSR2, (Signal_Handler)SIG_DFL);
+   _ecore_signal_callback_set(SIGHUP, (Signal_Handler)SIG_DFL);
+   _ecore_signal_callback_set(SIGQUIT, (Signal_Handler)SIG_DFL);
+   _ecore_signal_callback_set(SIGINT, (Signal_Handler)SIG_DFL);
+   _ecore_signal_callback_set(SIGTERM, (Signal_Handler)SIG_DFL);
 #ifdef SIGPWR
-   _ecore_signal_callback_set(SIGPWR, (Signal_Handler) SIG_DFL);
+   _ecore_signal_callback_set(SIGPWR, (Signal_Handler)SIG_DFL);
    sigpwr_count = 0;
 #endif
    sigchld_count = 0;
@@ -83,7 +102,6 @@ _ecore_signal_shutdown(void)
    sigint_count = 0;
    sigterm_count = 0;
    sig_count = 0;
-
 }
 
 void
@@ -94,12 +112,12 @@ _ecore_signal_init(void)
    _ecore_signal_callback_set(SIGCHLD, _ecore_signal_callback_sigchld);
    _ecore_signal_callback_set(SIGUSR1, _ecore_signal_callback_sigusr1);
    _ecore_signal_callback_set(SIGUSR2, _ecore_signal_callback_sigusr2);
-   _ecore_signal_callback_set(SIGHUP,  _ecore_signal_callback_sighup);
+   _ecore_signal_callback_set(SIGHUP, _ecore_signal_callback_sighup);
    _ecore_signal_callback_set(SIGQUIT, _ecore_signal_callback_sigquit);
-   _ecore_signal_callback_set(SIGINT,  _ecore_signal_callback_sigint);
+   _ecore_signal_callback_set(SIGINT, _ecore_signal_callback_sigint);
    _ecore_signal_callback_set(SIGTERM, _ecore_signal_callback_sigterm);
 #ifdef SIGPWR
-   _ecore_signal_callback_set(SIGPWR,  _ecore_signal_callback_sigpwr);
+   _ecore_signal_callback_set(SIGPWR, _ecore_signal_callback_sigpwr);
 #endif
 }
 
@@ -138,7 +156,7 @@ _ecore_signal_call(void)
    sigprocmask(SIG_BLOCK, &newset, &oldset);
    if (sigchld_count > MAXSIGQ)
      WRN("%i SIGCHLD in queue. max queue size %i. losing "
-          "siginfo for extra signals.", sigchld_count, MAXSIGQ);
+         "siginfo for extra signals.", sigchld_count, MAXSIGQ);
    for (n = 0; n < sigchld_count; n++)
      {
         pid_t pid;
@@ -168,46 +186,46 @@ _ecore_signal_call(void)
                   e->exe = _ecore_exe_find(pid);
 
                   if ((n < MAXSIGQ) && (sigchld_info[n].si_signo))
-                    e->data = sigchld_info[n]; /* No need to clone this. */
+                    e->data = sigchld_info[n];  /* No need to clone this. */
 
                   if ((e->exe) && (ecore_exe_flags_get(e->exe) & (ECORE_EXE_PIPE_READ | ECORE_EXE_PIPE_ERROR)))
-                     {
-                        /* We want to report the Last Words of the exe, so delay this event.
-                         * This is twice as relevant for stderr.
-                         * There are three possibilities here -
-                         *  1 There are no Last Words.
-                         *  2 There are Last Words, they are not ready to be read.
-                         *  3 There are Last Words, they are ready to be read.
-                         *
-                         * For 1 we don't want to delay, for 3 we want to delay.
-                         * 2 is the problem.  If we check for data now and there
-                         * is none, then there is no way to differentiate 1 and 2.
-                         * If we don't delay, we may loose data, but if we do delay,
-                         * there may not be data and the exit event never gets sent.
-                         *
-                         * Any way you look at it, there has to be some time passed
-                         * before the exit event gets sent.  So the strategy here is
-                         * to setup a timer event that will send the exit event after
-                         * an arbitrary, but brief, time.
-                         *
-                         * This is probably paranoid, for the less paraniod, we could
-                         * check to see for Last Words, and only delay if there are any.
-                         * This has it's own set of problems.
-                         */
-                        Ecore_Timer *doomsday_clock;
-
-                        doomsday_clock = _ecore_exe_doomsday_clock_get(e->exe);
-                        IF_FN_DEL(ecore_timer_del, doomsday_clock);
-                        _ecore_unlock();
-                        doomsday_clock = ecore_timer_add
-                           (0.1, _ecore_signal_exe_exit_delay, e);
-                        _ecore_lock();
-                        _ecore_exe_doomsday_clock_set(e->exe, doomsday_clock);
-                     }
+                    {
+     /* We want to report the Last Words of the exe, so delay this event.
+      * This is twice as relevant for stderr.
+      * There are three possibilities here -
+      *  1 There are no Last Words.
+      *  2 There are Last Words, they are not ready to be read.
+      *  3 There are Last Words, they are ready to be read.
+      *
+      * For 1 we don't want to delay, for 3 we want to delay.
+      * 2 is the problem.  If we check for data now and there
+      * is none, then there is no way to differentiate 1 and 2.
+      * If we don't delay, we may loose data, but if we do delay,
+      * there may not be data and the exit event never gets sent.
+      *
+      * Any way you look at it, there has to be some time passed
+      * before the exit event gets sent.  So the strategy here is
+      * to setup a timer event that will send the exit event after
+      * an arbitrary, but brief, time.
+      *
+      * This is probably paranoid, for the less paraniod, we could
+      * check to see for Last Words, and only delay if there are any.
+      * This has it's own set of problems.
+      */
+                         Ecore_Timer *doomsday_clock;
+
+                         doomsday_clock = _ecore_exe_doomsday_clock_get(e->exe);
+                         IF_FN_DEL(ecore_timer_del, doomsday_clock);
+                         _ecore_unlock();
+                         doomsday_clock = ecore_timer_add
+                             (0.1, _ecore_signal_exe_exit_delay, e);
+                         _ecore_lock();
+                         _ecore_exe_doomsday_clock_set(e->exe, doomsday_clock);
+                    }
                   else
                     {
                        _ecore_event_add(ECORE_EXE_EVENT_DEL, e,
-                                   _ecore_exe_event_del_free, NULL);
+                                        _ecore_exe_event_del_free, NULL);
                     }
                }
           }
@@ -364,9 +382,10 @@ _ecore_signal_call(void)
 }
 
 static void
-_ecore_signal_callback_set(int sig, Signal_Handler func)
+_ecore_signal_callback_set(int            sig,
+                           Signal_Handler func)
 {
-   struct sigaction  sa;
+   struct sigaction sa;
 
    sa.sa_sigaction = func;
    sa.sa_flags = SA_RESTART | SA_SIGINFO;
@@ -375,12 +394,16 @@ _ecore_signal_callback_set(int sig, Signal_Handler func)
 }
 
 static void
-_ecore_signal_callback_ignore(int sig __UNUSED__, siginfo_t *si __UNUSED__, void *foo __UNUSED__)
+_ecore_signal_callback_ignore(int        sig __UNUSED__,
+                              siginfo_t *si __UNUSED__,
+                              void      *foo __UNUSED__)
 {
 }
 
 static void
-_ecore_signal_callback_sigchld(int sig __UNUSED__, siginfo_t *si, void *foo __UNUSED__)
+_ecore_signal_callback_sigchld(int        sig __UNUSED__,
+                               siginfo_t *si,
+                               void      *foo __UNUSED__)
 {
    volatile sig_atomic_t n;
    n = sigchld_count;
@@ -397,7 +420,9 @@ _ecore_signal_callback_sigchld(int sig __UNUSED__, siginfo_t *si, void *foo __UN
 }
 
 static void
-_ecore_signal_callback_sigusr1(int sig __UNUSED__, siginfo_t *si, void *foo __UNUSED__)
+_ecore_signal_callback_sigusr1(int        sig __UNUSED__,
+                               siginfo_t *si,
+                               void      *foo __UNUSED__)
 {
    volatile sig_atomic_t n;
    n = sigusr1_count;
@@ -413,7 +438,9 @@ _ecore_signal_callback_sigusr1(int sig __UNUSED__, siginfo_t *si, void *foo __UN
 }
 
 static void
-_ecore_signal_callback_sigusr2(int sig __UNUSED__, siginfo_t *si, void *foo __UNUSED__)
+_ecore_signal_callback_sigusr2(int        sig __UNUSED__,
+                               siginfo_t *si,
+                               void      *foo __UNUSED__)
 {
    volatile sig_atomic_t n;
    n = sigusr2_count;
@@ -429,7 +456,9 @@ _ecore_signal_callback_sigusr2(int sig __UNUSED__, siginfo_t *si, void *foo __UN
 }
 
 static void
-_ecore_signal_callback_sighup(int sig __UNUSED__, siginfo_t *si, void *foo __UNUSED__)
+_ecore_signal_callback_sighup(int        sig __UNUSED__,
+                              siginfo_t *si,
+                              void      *foo __UNUSED__)
 {
    volatile sig_atomic_t n;
    n = sighup_count;
@@ -445,7 +474,9 @@ _ecore_signal_callback_sighup(int sig __UNUSED__, siginfo_t *si, void *foo __UNU
 }
 
 static void
-_ecore_signal_callback_sigquit(int sig __UNUSED__, siginfo_t *si, void *foo __UNUSED__)
+_ecore_signal_callback_sigquit(int        sig __UNUSED__,
+                               siginfo_t *si,
+                               void      *foo __UNUSED__)
 {
    volatile sig_atomic_t n;
    n = sigquit_count;
@@ -461,7 +492,9 @@ _ecore_signal_callback_sigquit(int sig __UNUSED__, siginfo_t *si, void *foo __UN
 }
 
 static void
-_ecore_signal_callback_sigint(int sig __UNUSED__, siginfo_t *si, void *foo __UNUSED__)
+_ecore_signal_callback_sigint(int        sig __UNUSED__,
+                              siginfo_t *si,
+                              void      *foo __UNUSED__)
 {
    volatile sig_atomic_t n;
    n = sigint_count;
@@ -477,7 +510,9 @@ _ecore_signal_callback_sigint(int sig __UNUSED__, siginfo_t *si, void *foo __UNU
 }
 
 static void
-_ecore_signal_callback_sigterm(int sig __UNUSED__, siginfo_t *si, void *foo __UNUSED__)
+_ecore_signal_callback_sigterm(int        sig __UNUSED__,
+                               siginfo_t *si,
+                               void      *foo __UNUSED__)
 {
    volatile sig_atomic_t n;
    n = sigterm_count;
@@ -494,7 +529,9 @@ _ecore_signal_callback_sigterm(int sig __UNUSED__, siginfo_t *si, void *foo __UN
 
 #ifdef SIGPWR
 static void
-_ecore_signal_callback_sigpwr(int sig __UNUSED__, siginfo_t *si, void *foo __UNUSED__)
+_ecore_signal_callback_sigpwr(int        sig __UNUSED__,
+                              siginfo_t *si,
+                              void      *foo __UNUSED__)
 {
    volatile sig_atomic_t n;
    n = sigpwr_count;
@@ -508,6 +545,7 @@ _ecore_signal_callback_sigpwr(int sig __UNUSED__, siginfo_t *si, void *foo __UNU
    sigpwr_count++;
    sig_count++;
 }
+
 #endif
 
 static Eina_Bool
@@ -524,3 +562,4 @@ _ecore_signal_exe_exit_delay(void *data)
      }
    return ECORE_CALLBACK_CANCEL;
 }
+
index 0acf62e..8fdc245 100644 (file)
 #  define PH(x)        pthread_t x
 #  define PHE(x, y)    pthread_equal(x, y)
 #  define PHS()        pthread_self()
-#  define PHC(x, f, d) pthread_create(&(x), NULL, (void*) f, d)
-#  define PHJ(x, p)    pthread_join(x, (void**)(&(p)))
+#  define PHC(x, f, d) pthread_create(&(x), NULL, (void *)f, d)
+#  define PHJ(x, p)    pthread_join(x, (void **)(&(p)))
 #  define PHA(x)       pthread_cancel(x)
 
-#  define CD(x)  pthread_cond_t x
-#  define CDI(x) pthread_cond_init(&(x), NULL);
-#  define CDD(x) pthread_cond_destroy(&(x));
-#  define CDB(x) pthread_cond_broadcast(&(x));
+#  define CD(x)        pthread_cond_t x
+#  define CDI(x)       pthread_cond_init(&(x), NULL);
+#  define CDD(x)       pthread_cond_destroy(&(x));
+#  define CDB(x)       pthread_cond_broadcast(&(x));
 #  define CDW(x, y, t) pthread_cond_timedwait(&(x), &(y), t);
 
-#  define LK(x)  pthread_mutex_t x
-#  define LKI(x) pthread_mutex_init(&(x), NULL);
-#  define LKD(x) pthread_mutex_destroy(&(x));
-#  define LKL(x) pthread_mutex_lock(&(x));
-#  define LKU(x) pthread_mutex_unlock(&(x));
+#  define LK(x)        pthread_mutex_t x
+#  define LKI(x)       pthread_mutex_init(&(x), NULL);
+#  define LKD(x)       pthread_mutex_destroy(&(x));
+#  define LKL(x)       pthread_mutex_lock(&(x));
+#  define LKU(x)       pthread_mutex_unlock(&(x));
 
-#  define LRWK(x)   pthread_rwlock_t x
-#  define LRWKI(x)  pthread_rwlock_init(&(x), NULL);
-#  define LRWKD(x)  pthread_rwlock_destroy(&(x));
-#  define LRWKWL(x) pthread_rwlock_wrlock(&(x));
-#  define LRWKRL(x) pthread_rwlock_rdlock(&(x));
-#  define LRWKU(x)  pthread_rwlock_unlock(&(x));
+#  define LRWK(x)      pthread_rwlock_t x
+#  define LRWKI(x)     pthread_rwlock_init(&(x), NULL);
+#  define LRWKD(x)     pthread_rwlock_destroy(&(x));
+#  define LRWKWL(x)    pthread_rwlock_wrlock(&(x));
+#  define LRWKRL(x)    pthread_rwlock_rdlock(&(x));
+#  define LRWKU(x)     pthread_rwlock_unlock(&(x));
 
 # else /* EFL_HAVE_WIN32_THREADS */
 
 
 typedef struct
 {
-  HANDLE thread;
-  void *val;
+   HANDLE thread;
+   void  *val;
 } win32_thread;
 
-#  define PH(x)        win32_thread *x
-#  define PHE(x, y)    ((x) == (y))
-#  define PHS()        (HANDLE)GetCurrentThreadId()
+#  define PH(x)     win32_thread * x
+#  define PHE(x, y) ((x) == (y))
+#  define PHS()     (HANDLE)GetCurrentThreadId()
 
-int _ecore_thread_win32_create(win32_thread **x, LPTHREAD_START_ROUTINE f, void *d)
+int
+_ecore_thread_win32_create(win32_thread         **x,
+                           LPTHREAD_START_ROUTINE f,
+                           void                  *d)
 {
-  win32_thread *t;
-  t = (win32_thread *)calloc(1, sizeof(win32_thread));
-  if (!t)
-    return -1;
-
-  (t)->thread = CreateThread(NULL, 0, f, d, 0, NULL);
-  if (!t->thread)
-    {
-      free(t);
-      return -1;
-    }
-  t->val = d;
-  *x = t;
-
-  return 0;
+   win32_thread *t;
+   t = (win32_thread *)calloc(1, sizeof(win32_thread));
+   if (!t)
+     return -1;
+
+   (t)->thread = CreateThread(NULL, 0, f, d, 0, NULL);
+   if (!t->thread)
+     {
+        free(t);
+        return -1;
+     }
+   t->val = d;
+   *x = t;
+
+   return 0;
 }
+
 #  define PHC(x, f, d) _ecore_thread_win32_create(&(x), (LPTHREAD_START_ROUTINE)f, d)
 
-int _ecore_thread_win32_join(win32_thread *x, void **res)
+int
+_ecore_thread_win32_join(win32_thread *x,
+                         void        **res)
 {
-  if (!PHE(x, PHS()))
-    {
-      WaitForSingleObject(x->thread, INFINITE);
-      CloseHandle(x->thread);
-    }
-  if (res) *res = x->val;
-  free(x);
-
-  return 0;
+   if (!PHE(x, PHS()))
+     {
+        WaitForSingleObject(x->thread, INFINITE);
+        CloseHandle(x->thread);
+     }
+   if (res) *res = x->val;
+   free(x);
+
+   return 0;
 }
 
-#  define PHJ(x, p) _ecore_thread_win32_join(x, (void**)(&(p)))
-#  define PHA(x) TerminateThread(x->thread, 0)
+#  define PHJ(x, p) _ecore_thread_win32_join(x, (void **)(&(p)))
+#  define PHA(x)    TerminateThread(x->thread, 0)
 
-#  define LK(x)  HANDLE x
-#  define LKI(x) x = CreateMutex(NULL, FALSE, NULL)
-#  define LKD(x) CloseHandle(x)
-#  define LKL(x) WaitForSingleObject(x, INFINITE)
-#  define LKU(x) ReleaseMutex(x)
+#  define LK(x)     HANDLE x
+#  define LKI(x)    x = CreateMutex(NULL, FALSE, NULL)
+#  define LKD(x)    CloseHandle(x)
+#  define LKL(x)    WaitForSingleObject(x, INFINITE)
+#  define LKU(x)    ReleaseMutex(x)
 
 typedef struct
 {
-  HANDLE semaphore;
-  LONG threads_count;
-  CRITICAL_SECTION threads_count_lock;
+   HANDLE           semaphore;
+   LONG             threads_count;
+   CRITICAL_SECTION threads_count_lock;
 } win32_cond;
 
-#  define CD(x)  win32_cond *x
-
-#  define CDI(x)                                                     \
-   do {                                                              \
-     x = (win32_cond *)calloc(1, sizeof(win32_cond));                \
-     if (x)                                                          \
-        {                                                            \
-          x->semaphore = CreateSemaphore(NULL, 0, 0x7fffffff, NULL); \
-          if (x->semaphore)                                          \
-            InitializeCriticalSection(&x->threads_count_lock);     \
-          else                                                       \
-            {                                                        \
-              free(x);                                               \
-              x = NULL;                                              \
-            }                                                        \
-        }                                                            \
-   } while (0)
-
-#  define CDD(x)               \
-  do {                         \
-    CloseHandle(x->semaphore); \
-    free(x);                   \
-    x = NULL;                  \
-   } while (0)
-
-#  define CDB(x)                                            \
-do {                                                        \
-  EnterCriticalSection(&x->threads_count_lock);             \
-  if (x->threads_count > 0)                                 \
-    ReleaseSemaphore(x->semaphore, x->threads_count, NULL); \
-  LeaveCriticalSection (&x->threads_count_lock);            \
- } while (0)
-
-int _ecore_thread_win32_cond_timedwait(win32_cond *c, HANDLE *external_mutex, struct timeval *t)
+#  define CD(x) win32_cond * x
+
+#  define CDI(x)                                                       \
+  do {                                                                 \
+       x = (win32_cond *)calloc(1, sizeof(win32_cond));                \
+       if (x)                                                          \
+         {                                                             \
+            x->semaphore = CreateSemaphore(NULL, 0, 0x7fffffff, NULL); \
+            if (x->semaphore)                                          \
+              InitializeCriticalSection(&x->threads_count_lock);       \
+            else                                                       \
+              {                                                        \
+                 free(x);                                              \
+                 x = NULL;                                             \
+              }                                                        \
+         }                                                             \
+    } while (0)
+
+#  define CDD(x)                  \
+  do {                            \
+       CloseHandle(x->semaphore); \
+       free(x);                   \
+       x = NULL;                  \
+    } while (0)
+
+#  define CDB(x)                                                  \
+  do {                                                            \
+       EnterCriticalSection(&x->threads_count_lock);              \
+       if (x->threads_count > 0)                                  \
+         ReleaseSemaphore(x->semaphore, x->threads_count, NULL);  \
+       LeaveCriticalSection (&x->threads_count_lock);             \
+    } while (0)
+
+int
+_ecore_thread_win32_cond_timedwait(win32_cond     *c,
+                                   HANDLE         *external_mutex,
+                                   struct timeval *t)
 {
-  DWORD res;
-  DWORD val = t->tv_sec * 1000 + (t->tv_usec / 1000);
-  LKL(external_mutex);
-  EnterCriticalSection (&c->threads_count_lock);
-  c->threads_count++;
-  LeaveCriticalSection (&c->threads_count_lock);
-  LKU(external_mutex);
-  res = WaitForSingleObject(c->semaphore, val);
-  if (res == WAIT_OBJECT_0)
-    return 0;
-  else
-    return -1;
+   DWORD res;
+   DWORD val = t->tv_sec * 1000 + (t->tv_usec / 1000);
+   LKL(external_mutex);
+   EnterCriticalSection (&c->threads_count_lock);
+   c->threads_count++;
+   LeaveCriticalSection (&c->threads_count_lock);
+   LKU(external_mutex);
+   res = WaitForSingleObject(c->semaphore, val);
+   if (res == WAIT_OBJECT_0)
+     return 0;
+   else
+     return -1;
 }
+
 #  define CDW(x, y, t) _ecore_thread_win32_cond_timedwait(x, y, t)
 
 typedef struct
 {
-  LONG readers_count;
-  LONG writers_count;
-  int readers;
-  int writers;
-  LK(mutex);
-  CD(cond_read);
-  CD(cond_write);
+   LONG readers_count;
+   LONG writers_count;
+   int  readers;
+   int  writers;
+   LK(mutex);
+   CD(cond_read);
+   CD(cond_write);
 } win32_rwl;
 
-#  define LRWK(x)   win32_rwl *x
-#  define LRWKI(x)                                 \
-  do {                                             \
-    x = (win32_rwl *)calloc(1, sizeof(win32_rwl)); \
-    if (x)                                         \
-      {                                            \
-        LKI(x->mutex);                             \
-        if (x->mutex)                              \
-                                                 \
-            CDI(x->cond_read);                     \
-            if (x->cond_read)                      \
-              {                                    \
-                CDI(x->cond_write);                \
-                if (!x->cond_write)                \
-                  {                                \
-                    CDD(x->cond_read);             \
-                    LKD(x->mutex);                 \
-                    free(x);                       \
-                    x = NULL;                      \
-                  }                                \
-              }                                    \
-            else                                   \
-              {                                    \
-                LKD(x->mutex);                     \
-                free(x);                           \
-                x = NULL;                          \
-              }                                    \
-                                                 \
-        else                                       \
-                                                 \
-            free(x);                               \
-            x = NULL;                              \
-                                                 \
-      }                                            \
-  } while (0)
-
-#  define LRWKD(x)                   \
-  do {                               \
-    LKU(x->mutex);                   \
-    LKD(x->mutex);                   \
-    CDD(x->cond_write);              \
-    CDD(x->cond_read);               \
-    free(x);                         \
-  } while (0)
-#  define LRWKWL(x)                                                       \
-  do {                                                                    \
-    DWORD res;                                                            \
-    LKU(x->mutex);                                                        \
-    if (x->writers || x->readers > 0)                                     \
-      {                                                                   \
-        x->writers_count++;                                               \
-        while (x->writers || x->readers > 0)                              \
-          {                                                               \
-            EnterCriticalSection(&x->cond_write->threads_count_lock);     \
-            x->cond_read->threads_count++;                                \
-            LeaveCriticalSection(&x->cond_write->threads_count_lock);     \
-            res = WaitForSingleObject(x->cond_write->semaphore, INFINITE); \
-            if (res != WAIT_OBJECT_0) break;                              \
-          }                                                               \
-        x->writers_count--;                                               \
-      }                                                                   \
-    if (res == 0) x->writers_count = 1;                                   \
-    LKU(x->mutex);                                                        \
-  } while (0)
-#  define LRWKRL(x)                                                       \
-  do {                                                                    \
-    DWORD res;                                                            \
-    LKL(x->mutex);                                                        \
-    if (x->writers)                                                       \
-      {                                                                   \
-        x->readers_count++;                                               \
-        while (x->writers)                                                \
-          {                                                               \
-            EnterCriticalSection(&x->cond_write->threads_count_lock);     \
-            x->cond_read->threads_count++;                                \
-            LeaveCriticalSection(&x->cond_write->threads_count_lock);     \
-            res = WaitForSingleObject(x->cond_write->semaphore, INFINITE); \
-            if (res != WAIT_OBJECT_0) break;                              \
-          }                                                               \
-        x->readers_count--;                                               \
-      }                                                                   \
-    if (res == 0)                                                         \
-      x->readers++;                                                       \
-    LKU(x->mutex);                                                        \
-  } while (0)
-#  define LRWKU(x)                                                     \
-  do {                                                                 \
-    LKL(x->mutex);                                                     \
-    if (x->writers)                                                    \
-      {                                                                \
-        x->writers = 0;                                                \
-        if (x->readers_count == 1)                                     \
-          {                                                            \
-            EnterCriticalSection(&x->cond_read->threads_count_lock);   \
-            if (x->cond_read->threads_count > 0)                       \
-              ReleaseSemaphore(x->cond_read->semaphore, 1, 0);         \
-            LeaveCriticalSection(&x->cond_read->threads_count_lock);   \
-          }                                                            \
-        else if (x->readers_count > 0)                                 \
-          CDB(x->cond_read);                                           \
-        else if (x->writers_count > 0)                                 \
-          {                                                            \
-            EnterCriticalSection (&x->cond_write->threads_count_lock); \
-            if (x->cond_write->threads_count > 0)                      \
-              ReleaseSemaphore(x->cond_write->semaphore, 1, 0);        \
-            LeaveCriticalSection (&x->cond_write->threads_count_lock); \
-          }                                                            \
-      }                                                                \
-    else if (x->readers > 0)                                           \
-      {                                                                \
-        x->readers--;                                                  \
-        if (x->readers == 0 && x->writers_count > 0)                   \
-          {                                                            \
-            EnterCriticalSection (&x->cond_write->threads_count_lock); \
-            if (x->cond_write->threads_count > 0)                      \
-              ReleaseSemaphore(x->cond_write->semaphore, 1, 0);        \
-            LeaveCriticalSection (&x->cond_write->threads_count_lock); \
-          }                                                            \
-      }                                                                \
-    LKU(x->mutex);                                                     \
-  } while (0)
+#  define LRWK(x) win32_rwl * x
+#  define LRWKI(x)                                    \
+  do {                                                \
+       x = (win32_rwl *)calloc(1, sizeof(win32_rwl)); \
+       if (x)                                         \
+         {                                            \
+            LKI(x->mutex);                            \
+            if (x->mutex)                             \
+              {                                       \
+                 CDI(x->cond_read);                   \
+                 if (x->cond_read)                    \
+                   {                                  \
+                      CDI(x->cond_write);             \
+                      if (!x->cond_write)             \
+                        {                             \
+                           CDD(x->cond_read);         \
+                           LKD(x->mutex);             \
+                           free(x);                   \
+                           x = NULL;                  \
+                        }                             \
+                   }                                  \
+                 else                                 \
+                   {                                  \
+                      LKD(x->mutex);                  \
+                      free(x);                        \
+                      x = NULL;                       \
+                   }                                  \
+              }                                       \
+            else                                      \
+              {                                       \
+                 free(x);                             \
+                 x = NULL;                            \
+              }                                       \
+         }                                            \
+    } while (0)
+
+#  define LRWKD(x)         \
+  do {                     \
+       LKU(x->mutex);      \
+       LKD(x->mutex);      \
+       CDD(x->cond_write); \
+       CDD(x->cond_read);  \
+       free(x);            \
+    } while (0)
+#  define LRWKWL(x)                                                             \
+  do {                                                                          \
+       DWORD res;                                                               \
+       LKU(x->mutex);                                                           \
+       if (x->writers || x->readers > 0)                                        \
+         {                                                                      \
+            x->writers_count++;                                                 \
+            while (x->writers || x->readers > 0)                                \
+              {                                                                 \
+                 EnterCriticalSection(&x->cond_write->threads_count_lock);      \
+                 x->cond_read->threads_count++;                                 \
+                 LeaveCriticalSection(&x->cond_write->threads_count_lock);      \
+                 res = WaitForSingleObject(x->cond_write->semaphore, INFINITE); \
+                 if (res != WAIT_OBJECT_0) break;                               \
+              }                                                                 \
+            x->writers_count--;                                                 \
+         }                                                                      \
+       if (res == 0) x->writers_count = 1;                                      \
+       LKU(x->mutex);                                                           \
+    } while (0)
+#  define LRWKRL(x)                                                             \
+  do {                                                                          \
+       DWORD res;                                                               \
+       LKL(x->mutex);                                                           \
+       if (x->writers)                                                          \
+         {                                                                      \
+            x->readers_count++;                                                 \
+            while (x->writers)                                                  \
+              {                                                                 \
+                 EnterCriticalSection(&x->cond_write->threads_count_lock);      \
+                 x->cond_read->threads_count++;                                 \
+                 LeaveCriticalSection(&x->cond_write->threads_count_lock);      \
+                 res = WaitForSingleObject(x->cond_write->semaphore, INFINITE); \
+                 if (res != WAIT_OBJECT_0) break;                               \
+              }                                                                 \
+            x->readers_count--;                                                 \
+         }                                                                      \
+       if (res == 0)                                                            \
+         x->readers++;                                                          \
+       LKU(x->mutex);                                                           \
+    } while (0)
+#  define LRWKU(x)                                                          \
+  do {                                                                      \
+       LKL(x->mutex);                                                       \
+       if (x->writers)                                                      \
+         {                                                                  \
+            x->writers = 0;                                                 \
+            if (x->readers_count == 1)                                      \
+              {                                                             \
+                 EnterCriticalSection(&x->cond_read->threads_count_lock);   \
+                 if (x->cond_read->threads_count > 0)                       \
+                   ReleaseSemaphore(x->cond_read->semaphore, 1, 0);         \
+                 LeaveCriticalSection(&x->cond_read->threads_count_lock);   \
+              }                                                             \
+            else if (x->readers_count > 0)                                  \
+              CDB(x->cond_read);                                            \
+            else if (x->writers_count > 0)                                  \
+              {                                                             \
+                 EnterCriticalSection (&x->cond_write->threads_count_lock); \
+                 if (x->cond_write->threads_count > 0)                      \
+                   ReleaseSemaphore(x->cond_write->semaphore, 1, 0);        \
+                 LeaveCriticalSection (&x->cond_write->threads_count_lock); \
+              }                                                             \
+         }                                                                  \
+       else if (x->readers > 0)                                             \
+         {                                                                  \
+            x->readers--;                                                   \
+            if (x->readers == 0 && x->writers_count > 0)                    \
+              {                                                             \
+                 EnterCriticalSection (&x->cond_write->threads_count_lock); \
+                 if (x->cond_write->threads_count > 0)                      \
+                   ReleaseSemaphore(x->cond_write->semaphore, 1, 0);        \
+                 LeaveCriticalSection (&x->cond_write->threads_count_lock); \
+              }                                                             \
+         }                                                                  \
+       LKU(x->mutex);                                                       \
+    } while (0)
 
 # endif
 
 #endif
 
 typedef struct _Ecore_Pthread_Worker Ecore_Pthread_Worker;
-typedef struct _Ecore_Pthread Ecore_Pthread;
-typedef struct _Ecore_Thread_Data  Ecore_Thread_Data;
+typedef struct _Ecore_Pthread        Ecore_Pthread;
+typedef struct _Ecore_Thread_Data    Ecore_Thread_Data;
 
 struct _Ecore_Thread_Data
 {
-   void *data;
+   void        *data;
    Eina_Free_Cb cb;
 };
 
 struct _Ecore_Pthread_Worker
 {
    union {
-      struct {
+      struct
+      {
          Ecore_Thread_Cb func_blocking;
       } short_run;
-      struct {
-         Ecore_Thread_Cb func_heavy;
+      struct
+      {
+         Ecore_Thread_Cb        func_heavy;
          Ecore_Thread_Notify_Cb func_notify;
-         Ecore_Pipe *notify;
+         Ecore_Pipe            *notify;
 
-         Ecore_Pipe *direct_pipe;
-         Ecore_Pthread_Worker *direct_worker;
+         Ecore_Pipe            *direct_pipe;
+         Ecore_Pthread_Worker  *direct_worker;
 
-         int send;
-         int received;
+         int                    send;
+         int                    received;
       } feedback_run;
    } u;
 
    Ecore_Thread_Cb func_cancel;
    Ecore_Thread_Cb func_end;
 #ifdef EFL_HAVE_THREADS
-   PH(self);
-   Eina_Hash *hash;
-   CD(cond);
-   LK(mutex);
+                   PH(self);
+   Eina_Hash      *hash;
+                   CD(cond);
+                   LK(mutex);
 #endif
 
-   const void *data;
+   const void     *data;
 
-   Eina_Bool cancel : 1;
-   Eina_Bool feedback_run : 1;
-   Eina_Bool kill : 1;
-   Eina_Bool reschedule : 1;
-   Eina_Bool no_queue : 1;
+   Eina_Bool       cancel : 1;
+   Eina_Bool       feedback_run : 1;
+   Eina_Bool       kill : 1;
+   Eina_Bool       reschedule : 1;
+   Eina_Bool       no_queue : 1;
 };
 
 #ifdef EFL_HAVE_THREADS
@@ -355,22 +367,23 @@ typedef struct _Ecore_Pthread_Data Ecore_Pthread_Data;
 struct _Ecore_Pthread_Data
 {
    Ecore_Pthread_Worker *death_job;
-   Ecore_Pipe *p;
-   void *data;
-   PH(thread);
+   Ecore_Pipe           *p;
+   void                 *data;
+                         PH(thread);
 };
 #endif
 
-
 static int _ecore_thread_count_max = 0;
 static int ECORE_THREAD_PIPE_DEL = 0;
 static Eina_Array *_ecore_thread_pipe = NULL;
 
 #ifdef EFL_HAVE_THREADS
 
-static void _ecore_thread_handler(void *data __UNUSED__, void *buffer, unsigned int nbyte);
+static void _ecore_thread_handler(void        *data __UNUSED__,
+                                  void        *buffer,
+                                  unsigned int nbyte);
 
-static Ecore_Pipe*
+static Ecore_Pipe *
 _ecore_thread_pipe_get(void)
 {
    if (eina_array_count_get(_ecore_thread_pipe) > 0)
@@ -397,23 +410,23 @@ static Eina_Bool have_main_loop_thread = 0;
 static Eina_Trash *_ecore_thread_worker_trash = NULL;
 static int _ecore_thread_worker_count = 0;
 
-static void *_ecore_thread_worker(Ecore_Pthread_Data *pth);
+static void                 *_ecore_thread_worker(Ecore_Pthread_Data *pth);
 static Ecore_Pthread_Worker *_ecore_thread_worker_new(void);
 
-static PH(get_main_loop_thread)(void)
+static PH(get_main_loop_thread) (void)
 {
-  static PH(main_loop_thread);
-  static pid_t main_loop_pid;
-  pid_t pid = getpid();
-
-  if (pid != main_loop_pid)
-    {
-       main_loop_pid = pid;
-       main_loop_thread = PHS();
-       have_main_loop_thread = 1;
-    }
-
-  return main_loop_thread;
+   static PH(main_loop_thread);
+   static pid_t main_loop_pid;
+   pid_t pid = getpid();
+
+   if (pid != main_loop_pid)
+     {
+        main_loop_pid = pid;
+        main_loop_thread = PHS();
+        have_main_loop_thread = 1;
+     }
+
+   return main_loop_thread;
 }
 
 static void
@@ -422,7 +435,7 @@ _ecore_thread_worker_free(Ecore_Pthread_Worker *worker)
    if (_ecore_thread_worker_count > (_ecore_thread_count_max + 1) * 16)
      {
         free(worker);
-        return ;
+        return;
      }
 
    eina_trash_push(&_ecore_thread_worker_trash, worker);
@@ -438,7 +451,8 @@ _ecore_thread_data_free(void *data)
 }
 
 static void
-_ecore_thread_pipe_free(void *data __UNUSED__, void *event)
+_ecore_thread_pipe_free(void *data __UNUSED__,
+                        void *event)
 {
    Ecore_Pipe *p = event;
 
@@ -450,46 +464,49 @@ _ecore_thread_pipe_free(void *data __UNUSED__, void *event)
 }
 
 static Eina_Bool
-_ecore_thread_pipe_del(void *data __UNUSED__, int type __UNUSED__, void *event __UNUSED__)
+_ecore_thread_pipe_del(void *data __UNUSED__,
+                       int   type __UNUSED__,
+                       void *event __UNUSED__)
 {
    /* This is a hack to delay pipe destruction until we are out of its internal loop. */
-   return ECORE_CALLBACK_CANCEL;
+    return ECORE_CALLBACK_CANCEL;
 }
 
 static void
-_ecore_thread_end(Ecore_Pthread_Data *pth, Ecore_Thread *work)
+_ecore_thread_end(Ecore_Pthread_Data *pth,
+                  Ecore_Thread       *work)
 {
-   Ecore_Pthread_Worker *worker = (Ecore_Pthread_Worker *) work;
+   Ecore_Pthread_Worker *worker = (Ecore_Pthread_Worker *)work;
    Ecore_Pipe *p;
 
    if (!worker->feedback_run || (worker->feedback_run && !worker->no_queue))
      _ecore_thread_count--;
 
    if (PHJ(pth->thread, p) != 0)
-     return ;
+     return;
 
    if (eina_list_count(_ecore_pending_job_threads) > 0
-       && (unsigned int) _ecore_thread_count < eina_list_count(_ecore_pending_job_threads)
+       && (unsigned int)_ecore_thread_count < eina_list_count(_ecore_pending_job_threads)
        && _ecore_thread_count < _ecore_thread_count_max)
      {
         /* One more thread should be created. */
-        INF("spawning threads because of still pending jobs.");
+         INF("spawning threads because of still pending jobs.");
 
-        pth->death_job = _ecore_thread_worker_new();
-        if (!pth->p || !pth->death_job) goto end;
+         pth->death_job = _ecore_thread_worker_new();
+         if (!pth->p || !pth->death_job) goto end;
 
-        eina_threads_init();
+         eina_threads_init();
 
-        if (PHC(pth->thread, _ecore_thread_worker, pth) == 0)
-          {
-             _ecore_thread_count++;
-             return ;
-          }
+         if (PHC(pth->thread, _ecore_thread_worker, pth) == 0)
+           {
+              _ecore_thread_count++;
+              return;
+           }
 
-        eina_threads_shutdown();
+         eina_threads_shutdown();
 
-     end:
-        if (pth->death_job) _ecore_thread_worker_free(pth->death_job);
+end:
+         if (pth->death_job) _ecore_thread_worker_free(pth->death_job);
      }
 
    _ecore_active_job_threads = eina_list_remove(_ecore_active_job_threads, pth);
@@ -504,12 +521,12 @@ _ecore_thread_kill(Ecore_Pthread_Worker *work)
    if (work->cancel)
      {
         if (work->func_cancel)
-          work->func_cancel((void *) work->data, (Ecore_Thread *) work);
+          work->func_cancel((void *)work->data, (Ecore_Thread *)work);
      }
    else
      {
         if (work->func_end)
-          work->func_end((void *) work->data, (Ecore_Thread *) work);
+          work->func_end((void *)work->data, (Ecore_Thread *)work);
      }
 
    if (work->feedback_run)
@@ -529,11 +546,13 @@ _ecore_thread_kill(Ecore_Pthread_Worker *work)
 }
 
 static void
-_ecore_thread_handler(void *data __UNUSED__, void *buffer, unsigned int nbyte)
+_ecore_thread_handler(void        *data __UNUSED__,
+                      void        *buffer,
+                      unsigned int nbyte)
 {
    Ecore_Pthread_Worker *work;
 
-   if (nbyte != sizeof (Ecore_Pthread_Worker *)) return ;
+   if (nbyte != sizeof (Ecore_Pthread_Worker *)) return;
 
    work = *(Ecore_Pthread_Worker **)buffer;
 
@@ -542,7 +561,7 @@ _ecore_thread_handler(void *data __UNUSED__, void *buffer, unsigned int nbyte)
         if (work->u.feedback_run.send != work->u.feedback_run.received)
           {
              work->kill = EINA_TRUE;
-             return ;
+             return;
           }
      }
 
@@ -550,18 +569,20 @@ _ecore_thread_handler(void *data __UNUSED__, void *buffer, unsigned int nbyte)
 }
 
 static void
-_ecore_notify_handler(void *data, void *buffer, unsigned int nbyte)
+_ecore_notify_handler(void        *data,
+                      void        *buffer,
+                      unsigned int nbyte)
 {
    Ecore_Pthread_Worker *work = data;
    void *user_data;
 
-   if (nbyte != sizeof (Ecore_Pthread_Worker *)) return ;
+   if (nbyte != sizeof (Ecore_Pthread_Worker *)) return;
 
    user_data = *(void **)buffer;
    work->u.feedback_run.received++;
 
    if (work->u.feedback_run.func_notify)
-     work->u.feedback_run.func_notify((void *) work->data, (Ecore_Thread *) work, user_data);
+     work->u.feedback_run.func_notify((void *)work->data, (Ecore_Thread *)work, user_data);
 
    /* Force reading all notify event before killing the thread */
    if (work->kill && work->u.feedback_run.send == work->u.feedback_run.received)
@@ -592,7 +613,7 @@ _ecore_short_job(Ecore_Pipe *end_pipe)
         LKU(_ecore_pending_job_threads_mutex);
 
         if (!work->cancel)
-          work->u.short_run.func_blocking((void *) work->data, (Ecore_Thread*) work);
+          work->u.short_run.func_blocking((void *)work->data, (Ecore_Thread *)work);
 
         if (work->reschedule)
           {
@@ -610,7 +631,8 @@ _ecore_short_job(Ecore_Pipe *end_pipe)
 }
 
 static void
-_ecore_feedback_job(Ecore_Pipe *end_pipe, PH(thread))
+_ecore_feedback_job(Ecore_Pipe *end_pipe,
+                    PH(thread))
 {
    Ecore_Pthread_Worker *work;
 
@@ -632,7 +654,7 @@ _ecore_feedback_job(Ecore_Pipe *end_pipe, PH(thread))
 
         work->self = thread;
         if (!work->cancel)
-          work->u.feedback_run.func_heavy((void *) work->data, (Ecore_Thread *) work);
+          work->u.feedback_run.func_heavy((void *)work->data, (Ecore_Thread *)work);
 
         if (work->reschedule)
           {
@@ -673,7 +695,7 @@ _ecore_direct_worker(Ecore_Pthread_Worker *work)
    pth->thread = PHS();
 
    work->self = pth->thread;
-   work->u.feedback_run.func_heavy((void *) work->data, (Ecore_Thread *) work);
+   work->u.feedback_run.func_heavy((void *)work->data, (Ecore_Thread *)work);
 
    ecore_pipe_write(pth->p, &work, sizeof (Ecore_Pthread_Worker *));
 
@@ -686,7 +708,7 @@ _ecore_direct_worker(Ecore_Pthread_Worker *work)
 
    work->data = pth;
    work->u.short_run.func_blocking = NULL;
-   work->func_end = (void *) _ecore_thread_end;
+   work->func_end = (void *)_ecore_thread_end;
    work->func_cancel = NULL;
    work->cancel = EINA_FALSE;
    work->feedback_run = EINA_FALSE;
@@ -712,7 +734,7 @@ _ecore_thread_worker(Ecore_Pthread_Data *pth)
 
    eina_sched_prio_drop();
 
- restart:
+restart:
    if (_ecore_pending_job_threads) _ecore_short_job(pth->p);
    if (_ecore_pending_job_threads_feedback) _ecore_feedback_job(pth->p, pth->thread);
 
@@ -746,7 +768,7 @@ _ecore_thread_worker(Ecore_Pthread_Data *pth)
 
    work->data = pth;
    work->u.short_run.func_blocking = NULL;
-   work->func_end = (void *) _ecore_thread_end;
+   work->func_end = (void *)_ecore_thread_end;
    work->func_cancel = NULL;
    work->cancel = EINA_FALSE;
    work->feedback_run = EINA_FALSE;
@@ -803,59 +825,59 @@ void
 _ecore_thread_shutdown(void)
 {
    /* FIXME: If function are still running in the background, should we kill them ? */
-   Ecore_Pipe *p;
-   Eina_Array_Iterator it;
-   unsigned int i;
+    Ecore_Pipe *p;
+    Eina_Array_Iterator it;
+    unsigned int i;
 
 #ifdef EFL_HAVE_THREADS
-   Ecore_Pthread_Worker *work;
-   Ecore_Pthread_Data *pth;
-
-   LKL(_ecore_pending_job_threads_mutex);
-
-   EINA_LIST_FREE(_ecore_pending_job_threads, work)
-     {
-        if (work->func_cancel)
-          work->func_cancel((void *)work->data, (Ecore_Thread *) work);
-        free(work);
-     }
-
-   EINA_LIST_FREE(_ecore_pending_job_threads_feedback, work)
-     {
-        if (work->func_cancel)
-          work->func_cancel((void *)work->data, (Ecore_Thread *) work);
-        free(work);
-     }
-
-   LKU(_ecore_pending_job_threads_mutex);
-
-   /* Improve emergency shutdown */
-   EINA_LIST_FREE(_ecore_active_job_threads, pth)
-     {
-        Ecore_Pipe *ep;
-
-        PHA(pth->thread);
-        PHJ(pth->thread, ep);
-
-        ecore_pipe_del(pth->p);
-     }
-   if (_ecore_thread_global_hash)
-     eina_hash_free(_ecore_thread_global_hash);
-   _ecore_event_handler_del(del_handler);
-   have_main_loop_thread = 0;
-   del_handler = NULL;
-
-   LKD(_ecore_pending_job_threads_mutex);
-   LRWKD(_ecore_thread_global_hash_lock);
-   LKD(_ecore_thread_global_hash_mutex);
-   CDD(_ecore_thread_global_hash_cond);
+    Ecore_Pthread_Worker *work;
+    Ecore_Pthread_Data *pth;
+
+    LKL(_ecore_pending_job_threads_mutex);
+
+    EINA_LIST_FREE(_ecore_pending_job_threads, work)
+      {
+         if (work->func_cancel)
+           work->func_cancel((void *)work->data, (Ecore_Thread *)work);
+         free(work);
+      }
+
+    EINA_LIST_FREE(_ecore_pending_job_threads_feedback, work)
+      {
+         if (work->func_cancel)
+           work->func_cancel((void *)work->data, (Ecore_Thread *)work);
+         free(work);
+      }
+
+    LKU(_ecore_pending_job_threads_mutex);
+
+    /* Improve emergency shutdown */
+    EINA_LIST_FREE(_ecore_active_job_threads, pth)
+      {
+         Ecore_Pipe *ep;
+
+         PHA(pth->thread);
+         PHJ(pth->thread, ep);
+
+         ecore_pipe_del(pth->p);
+      }
+    if (_ecore_thread_global_hash)
+      eina_hash_free(_ecore_thread_global_hash);
+    _ecore_event_handler_del(del_handler);
+    have_main_loop_thread = 0;
+    del_handler = NULL;
+
+    LKD(_ecore_pending_job_threads_mutex);
+    LRWKD(_ecore_thread_global_hash_lock);
+    LKD(_ecore_thread_global_hash_mutex);
+    CDD(_ecore_thread_global_hash_cond);
 #endif
 
-   EINA_ARRAY_ITER_NEXT(_ecore_thread_pipe, i, p, it)
-     ecore_pipe_del(p);
+    EINA_ARRAY_ITER_NEXT(_ecore_thread_pipe, i, p, it)
+    ecore_pipe_del(p);
 
-   eina_array_free(_ecore_thread_pipe);
-   _ecore_thread_pipe = NULL;
+    eina_array_free(_ecore_thread_pipe);
+    _ecore_thread_pipe = NULL;
 }
 
 void
@@ -880,7 +902,7 @@ EAPI Ecore_Thread *
 ecore_thread_run(Ecore_Thread_Cb func_blocking,
                  Ecore_Thread_Cb func_end,
                  Ecore_Thread_Cb func_cancel,
-                 const void *data)
+                 const void     *data)
 {
    Ecore_Pthread_Worker *work;
 #ifdef EFL_HAVE_THREADS
@@ -893,7 +915,7 @@ ecore_thread_run(Ecore_Thread_Cb func_blocking,
    if (!work)
      {
         if (func_cancel)
-          func_cancel((void *) data, NULL);
+          func_cancel((void *)data, NULL);
         return NULL;
      }
 
@@ -917,7 +939,7 @@ ecore_thread_run(Ecore_Thread_Cb func_blocking,
    if (_ecore_thread_count == _ecore_thread_count_max)
      {
         LKU(_ecore_pending_job_threads_mutex);
-        return (Ecore_Thread *) work;
+        return (Ecore_Thread *)work;
      }
 
    LKU(_ecore_pending_job_threads_mutex);
@@ -935,12 +957,12 @@ ecore_thread_run(Ecore_Thread_Cb func_blocking,
    if (PHC(pth->thread, _ecore_thread_worker, pth) == 0)
      {
         _ecore_thread_count++;
-        return (Ecore_Thread *) work;
+        return (Ecore_Thread *)work;
      }
 
    eina_threads_shutdown();
 
- on_error:
+on_error:
    if (pth)
      {
         if (pth->p) eina_array_push(_ecore_thread_pipe, pth->p);
@@ -955,28 +977,27 @@ ecore_thread_run(Ecore_Thread_Cb func_blocking,
         LKU(_ecore_pending_job_threads_mutex);
 
         if (work->func_cancel)
-          work->func_cancel((void *) work->data, (Ecore_Thread *) work);
+          work->func_cancel((void *)work->data, (Ecore_Thread *)work);
         free(work);
         work = NULL;
      }
-   return (Ecore_Thread *) work;
+   return (Ecore_Thread *)work;
 #else
    /*
-     If no thread and as we don't want to break app that rely on this
-     facility, we will lock the interface until we are done.
+      If no thread and as we don't want to break app that rely on this
+      facility, we will lock the interface until we are done.
     */
    do {
-      /* Handle reschedule by forcing it here. That would mean locking the app,
-       * would be better with an idler, but really to complex for a case where
-       * thread should really exist.
-       */
-      work->reschedule = EINA_FALSE;
-
-      func_blocking((void *)data, (Ecore_Thread *) work);
-      if (work->cancel == EINA_FALSE) func_end((void *)data, (Ecore_Thread *) work);
-      else func_cancel((void *)data, (Ecore_Thread *) work);
+        /* Handle reschedule by forcing it here. That would mean locking the app,
+         * would be better with an idler, but really to complex for a case where
+         * thread should really exist.
+         */
+          work->reschedule = EINA_FALSE;
 
-   } while (work->reschedule == EINA_TRUE);
+          func_blocking((void *)data, (Ecore_Thread *)work);
+          if (work->cancel == EINA_FALSE) func_end((void *)data, (Ecore_Thread *)work);
+          else func_cancel((void *)data, (Ecore_Thread *)work);
+     } while (work->reschedule == EINA_TRUE);
 
    free(work);
 
@@ -1012,14 +1033,14 @@ ecore_thread_cancel(Ecore_Thread *thread)
         if (!work->feedback_run)
           EINA_LIST_FOREACH(_ecore_pending_job_threads, l, work)
             {
-               if ((void *) work == (void *) thread)
+               if ((void *)work == (void *)thread)
                  {
                     _ecore_pending_job_threads = eina_list_remove_list(_ecore_pending_job_threads, l);
 
                     LKU(_ecore_pending_job_threads_mutex);
 
                     if (work->func_cancel)
-                      work->func_cancel((void *) work->data, (Ecore_Thread *) work);
+                      work->func_cancel((void *)work->data, (Ecore_Thread *)work);
                     free(work);
 
                     return EINA_TRUE;
@@ -1028,14 +1049,14 @@ ecore_thread_cancel(Ecore_Thread *thread)
         else
           EINA_LIST_FOREACH(_ecore_pending_job_threads_feedback, l, work)
             {
-               if ((void *) work == (void *) thread)
+               if ((void *)work == (void *)thread)
                  {
                     _ecore_pending_job_threads_feedback = eina_list_remove_list(_ecore_pending_job_threads_feedback, l);
 
                     LKU(_ecore_pending_job_threads_mutex);
 
                     if (work->func_cancel)
-                      work->func_cancel((void *) work->data, (Ecore_Thread *) work);
+                      work->func_cancel((void *)work->data, (Ecore_Thread *)work);
                     free(work);
 
                     return EINA_TRUE;
@@ -1046,7 +1067,7 @@ ecore_thread_cancel(Ecore_Thread *thread)
    LKU(_ecore_pending_job_threads_mutex);
 
    /* Delay the destruction */
- on_exit:
+on_exit:
    ((Ecore_Pthread_Worker *)thread)->cancel = EINA_TRUE;
    return EINA_FALSE;
 #else
@@ -1057,20 +1078,20 @@ ecore_thread_cancel(Ecore_Thread *thread)
 EAPI Eina_Bool
 ecore_thread_check(Ecore_Thread *thread)
 {
-   Ecore_Pthread_Worker *worker = (Ecore_Pthread_Worker *) thread;
+   Ecore_Pthread_Worker *worker = (Ecore_Pthread_Worker *)thread;
 
    if (!worker) return EINA_TRUE;
    return worker->cancel;
 }
 
-EAPI Ecore_Thread *ecore_thread_feedback_run(Ecore_Thread_Cb func_heavy,
-                                             Ecore_Thread_Notify_Cb func_notify,
-                                             Ecore_Thread_Cb func_end,
-                                             Ecore_Thread_Cb func_cancel,
-                                             const void *data,
-                                             Eina_Bool try_no_queue)
+EAPI Ecore_Thread *
+ecore_thread_feedback_run(Ecore_Thread_Cb        func_heavy,
+                          Ecore_Thread_Notify_Cb func_notify,
+                          Ecore_Thread_Cb        func_end,
+                          Ecore_Thread_Cb        func_cancel,
+                          const void            *data,
+                          Eina_Bool              try_no_queue)
 {
-
 #ifdef EFL_HAVE_THREADS
    Ecore_Pthread_Worker *worker;
    Ecore_Pthread_Data *pth = NULL;
@@ -1108,12 +1129,12 @@ EAPI Ecore_Thread *ecore_thread_feedback_run(Ecore_Thread_Cb func_heavy,
         worker->u.feedback_run.direct_worker = _ecore_thread_worker_new();
         worker->no_queue = EINA_TRUE;
 
-       eina_threads_init();
+        eina_threads_init();
 
         if (PHC(t, _ecore_direct_worker, worker) == 0)
-           return (Ecore_Thread *) worker;
+          return (Ecore_Thread *)worker;
 
-       eina_threads_shutdown();
+        eina_threads_shutdown();
      }
 
    worker->no_queue = EINA_FALSE;
@@ -1124,7 +1145,7 @@ EAPI Ecore_Thread *ecore_thread_feedback_run(Ecore_Thread_Cb func_heavy,
    if (_ecore_thread_count == _ecore_thread_count_max)
      {
         LKU(_ecore_pending_job_threads_mutex);
-        return (Ecore_Thread *) worker;
+        return (Ecore_Thread *)worker;
      }
 
    LKU(_ecore_pending_job_threads_mutex);
@@ -1142,12 +1163,12 @@ EAPI Ecore_Thread *ecore_thread_feedback_run(Ecore_Thread_Cb func_heavy,
    if (PHC(pth->thread, _ecore_thread_worker, pth) == 0)
      {
         _ecore_thread_count++;
-        return (Ecore_Thread *) worker;
+        return (Ecore_Thread *)worker;
      }
 
    eina_threads_shutdown();
 
- on_error:
+on_error:
    if (pth)
      {
         if (pth->p) eina_array_push(_ecore_thread_pipe, pth->p);
@@ -1162,7 +1183,7 @@ EAPI Ecore_Thread *ecore_thread_feedback_run(Ecore_Thread_Cb func_heavy,
                                                                worker);
         LKU(_ecore_pending_job_threads_mutex);
 
-        if (func_cancel) func_cancel((void *) data, NULL);
+        if (func_cancel) func_cancel((void *)data, NULL);
 
         if (worker)
           {
@@ -1172,15 +1193,15 @@ EAPI Ecore_Thread *ecore_thread_feedback_run(Ecore_Thread_Cb func_heavy,
           }
      }
 
-   return (Ecore_Thread *) worker;
+   return (Ecore_Thread *)worker;
 #else
    Ecore_Pthread_Worker worker;
 
-   (void) try_no_queue;
+   (void)try_no_queue;
 
    /*
-     If no thread and as we don't want to break app that rely on this
-     facility, we will lock the interface until we are done.
+      If no thread and as we don't want to break app that rely on this
+      facility, we will lock the interface until we are done.
     */
    worker.u.feedback_run.func_heavy = func_heavy;
    worker.u.feedback_run.func_notify = func_notify;
@@ -1195,22 +1216,23 @@ EAPI Ecore_Thread *ecore_thread_feedback_run(Ecore_Thread_Cb func_heavy,
    worker.kill = EINA_FALSE;
 
    do {
-      worker.reschedule = EINA_FALSE;
+        worker.reschedule = EINA_FALSE;
 
-      func_heavy((void *)data, (Ecore_Thread *) &worker);
+        func_heavy((void *)data, (Ecore_Thread *)&worker);
 
-      if (worker.cancel) func_cancel((void *)data, (Ecore_Thread *) &worker);
-      else func_end((void *)data, (Ecore_Thread *) &worker);
-   } while (worker.reschedule == EINA_TRUE);
+        if (worker.cancel) func_cancel((void *)data, (Ecore_Thread *)&worker);
+        else func_end((void *)data, (Ecore_Thread *)&worker);
+     } while (worker.reschedule == EINA_TRUE);
 
    return NULL;
 #endif
 }
 
 EAPI Eina_Bool
-ecore_thread_feedback(Ecore_Thread *thread, const void *data)
+ecore_thread_feedback(Ecore_Thread *thread,
+                      const void   *data)
 {
-   Ecore_Pthread_Worker *worker = (Ecore_Pthread_Worker *) thread;
+   Ecore_Pthread_Worker *worker = (Ecore_Pthread_Worker *)thread;
 
    if (!worker) return EINA_FALSE;
    if (!worker->feedback_run) return EINA_FALSE;
@@ -1223,7 +1245,7 @@ ecore_thread_feedback(Ecore_Thread *thread, const void *data)
 
    return EINA_TRUE;
 #else
-   worker->u.feedback_run.func_notify((void*) worker->data, thread, (void*) data);
+   worker->u.feedback_run.func_notify((void *)worker->data, thread, (void *)data);
 
    return EINA_TRUE;
 #endif
@@ -1232,7 +1254,7 @@ ecore_thread_feedback(Ecore_Thread *thread, const void *data)
 EAPI Eina_Bool
 ecore_thread_reschedule(Ecore_Thread *thread)
 {
-   Ecore_Pthread_Worker *worker = (Ecore_Pthread_Worker *) thread;
+   Ecore_Pthread_Worker *worker = (Ecore_Pthread_Worker *)thread;
 
    if (!worker) return EINA_FALSE;
 
@@ -1333,9 +1355,13 @@ ecore_thread_available_get(void)
 }
 
 EAPI Eina_Bool
-ecore_thread_local_data_add(Ecore_Thread *thread, const char *key, void *value, Eina_Free_Cb cb, Eina_Bool direct)
+ecore_thread_local_data_add(Ecore_Thread *thread,
+                            const char   *key,
+                            void         *value,
+                            Eina_Free_Cb  cb,
+                            Eina_Bool     direct)
 {
-   Ecore_Pthread_Worker *worker = (Ecore_Pthread_Worker *) thread;
+   Ecore_Pthread_Worker *worker = (Ecore_Pthread_Worker *)thread;
    Ecore_Thread_Data *d;
    Eina_Bool ret;
 
@@ -1368,9 +1394,12 @@ ecore_thread_local_data_add(Ecore_Thread *thread, const char *key, void *value,
 }
 
 EAPI void *
-ecore_thread_local_data_set(Ecore_Thread *thread, const char *key, void *value, Eina_Free_Cb cb)
+ecore_thread_local_data_set(Ecore_Thread *thread,
+                            const char   *key,
+                            void         *value,
+                            Eina_Free_Cb  cb)
 {
-   Ecore_Pthread_Worker *worker = (Ecore_Pthread_Worker *) thread;
+   Ecore_Pthread_Worker *worker = (Ecore_Pthread_Worker *)thread;
    Ecore_Thread_Data *d, *r;
    void *ret;
    if ((!thread) || (!key) || (!value))
@@ -1400,11 +1429,11 @@ ecore_thread_local_data_set(Ecore_Thread *thread, const char *key, void *value,
 #endif
 }
 
-
 EAPI void *
-ecore_thread_local_data_find(Ecore_Thread *thread, const char *key)
+ecore_thread_local_data_find(Ecore_Thread *thread,
+                             const char   *key)
 {
-   Ecore_Pthread_Worker *worker = (Ecore_Pthread_Worker *) thread;
+   Ecore_Pthread_Worker *worker = (Ecore_Pthread_Worker *)thread;
    Ecore_Thread_Data *d;
 
    if ((!thread) || (!key))
@@ -1425,9 +1454,10 @@ ecore_thread_local_data_find(Ecore_Thread *thread, const char *key)
 }
 
 EAPI Eina_Bool
-ecore_thread_local_data_del(Ecore_Thread *thread, const char *key)
+ecore_thread_local_data_del(Ecore_Thread *thread,
+                            const char   *key)
 {
-   Ecore_Pthread_Worker *worker = (Ecore_Pthread_Worker *) thread;
+   Ecore_Pthread_Worker *worker = (Ecore_Pthread_Worker *)thread;
    if ((!thread) || (!key))
      return EINA_FALSE;
 #ifdef EFL_HAVE_THREADS
@@ -1442,7 +1472,10 @@ ecore_thread_local_data_del(Ecore_Thread *thread, const char *key)
 }
 
 EAPI Eina_Bool
-ecore_thread_global_data_add(const char *key, void *value, Eina_Free_Cb cb, Eina_Bool direct)
+ecore_thread_global_data_add(const char  *key,
+                             void        *value,
+                             Eina_Free_Cb cb,
+                             Eina_Bool    direct)
 {
    Eina_Bool ret;
    Ecore_Thread_Data *d;
@@ -1477,7 +1510,9 @@ ecore_thread_global_data_add(const char *key, void *value, Eina_Free_Cb cb, Eina
 }
 
 EAPI void *
-ecore_thread_global_data_set(const char *key, void *value, Eina_Free_Cb cb)
+ecore_thread_global_data_set(const char  *key,
+                             void        *value,
+                             Eina_Free_Cb cb)
 {
    Ecore_Thread_Data *d, *r;
    void *ret;
@@ -1512,7 +1547,6 @@ ecore_thread_global_data_set(const char *key, void *value, Eina_Free_Cb cb)
 #endif
 }
 
-
 EAPI void *
 ecore_thread_global_data_find(const char *key)
 {
@@ -1554,7 +1588,8 @@ ecore_thread_global_data_del(const char *key)
 }
 
 EAPI void *
-ecore_thread_global_data_wait(const char *key, double seconds)
+ecore_thread_global_data_wait(const char *key,
+                              double      seconds)
 {
    double tm = 0;
    Ecore_Thread_Data *ret = NULL;
@@ -1595,3 +1630,4 @@ ecore_thread_global_data_wait(const char *key, double seconds)
    return NULL;
 #endif
 }
+
index 1f972ab..b5e3133 100644 (file)
@@ -18,7 +18,7 @@ static int throttle_val = 0;
 
 /**
  * Increase throttle amount
- * 
+ *
  * This will increase or decrease (if @p amount is positive or negative) the
  * amount of "voluntary throttling" ecore will do to its main loop while
  * running. This is intended to be used to limit animations and wakeups when
@@ -26,7 +26,7 @@ static int throttle_val = 0;
  * (which can be retrieved by ecore_throttle_get() ), the more throttling
  * takes place. If the current throttle value is 0, then no throttling takes
  * place at all.
- * 
+ *
  * The value represents how long the ecore main loop will sleep (in seconds)
  * before it goes into a fully idle state waiting for events, input or
  * timing events to wake it up. For example, if the current throttle level
@@ -37,30 +37,30 @@ static int throttle_val = 0;
  * of time. Of course these events, data and timeouts will be buffered,
  * thus not losing anything, simply delaying when they get handled by the
  * throttle value.
- * 
+ *
  * Example:
  * @code
  * void enter_powersave(void) {
  *    ecore_throttle_adjust(0.2);
  *    printf("Now at throttle level: %1.3f\n", ecore_throttle_get());
  * }
- * 
+ *
  * void enter_deep_powersave(void) {
  *    ecore_throttle_adjust(0.5);
  *    printf("Now at throttle level: %1.3f\n", ecore_throttle_get());
  * }
- * 
+ *
  * void exit_powersave(void) {
  *    ecore_throttle_adjust(-0.2);
  *    printf("Now at throttle level: %1.3f\n", ecore_throttle_get());
  * }
- * 
+ *
  * void exit_deep_powersave(void) {
  *    ecore_throttle_adjust(-0.5);
  *    printf("Now at throttle level: %1.3f\n", ecore_throttle_get());
  * }
  * @endcode
- * 
+ *
  * @param   amount Amount (in seconds) to adjust by
  */
 EAPI void
@@ -73,11 +73,11 @@ ecore_throttle_adjust(double amount)
 
 /**
  * Get current throttle level
- * 
- * This gets the current throttling level, which can be adjusted by 
+ *
+ * This gets the current throttling level, which can be adjusted by
  * ecore_throttle_adjust(). The value is in seconds. Please see
  * ecore_throttle_adjust() for more information.
- * 
+ *
  * @return  The current throttle level
  */
 EAPI double
@@ -96,3 +96,4 @@ _ecore_throttle(void)
    if (throttle_val <= 0) return;
    usleep(throttle_val);
 }
+
index fd24446..8e7611b 100644 (file)
@@ -56,7 +56,7 @@ ecore_time_get(void)
    struct timespec t;
 
    if (EINA_UNLIKELY(_ecore_time_clock_id < 0))
-      return ecore_time_unix_get();
+     return ecore_time_unix_get();
 
    if (EINA_UNLIKELY(clock_gettime(_ecore_time_clock_id, &t)))
      {
@@ -69,7 +69,7 @@ ecore_time_get(void)
 #elif defined(HAVE_EVIL)
    return evil_time_get();
 #elif defined(__APPLE__) && defined(__MACH__)
-   return _ecore_time_clock_conversion * (double) mach_absolute_time();
+   return _ecore_time_clock_conversion * (double)mach_absolute_time();
 #else
    return ecore_time_unix_get();
 #endif
@@ -127,7 +127,6 @@ ecore_loop_time_get(void)
  * @}
  */
 
-
 /**********************   Internal methods   ********************************/
 
 /* TODO: Documentation says "All  implementations  support  the  system-wide
@@ -150,8 +149,8 @@ _ecore_time_init(void)
    else if (!clock_gettime(CLOCK_REALTIME, &t))
      {
         /* may go backwards */
-        _ecore_time_clock_id = CLOCK_REALTIME;
-        WRN("CLOCK_MONOTONIC not available. Fallback to CLOCK_REALTIME.");
+         _ecore_time_clock_id = CLOCK_REALTIME;
+         WRN("CLOCK_MONOTONIC not available. Fallback to CLOCK_REALTIME.");
      }
    else
      {
@@ -166,7 +165,7 @@ _ecore_time_init(void)
    kern_return_t err = mach_timebase_info(&info);
    if (err == 0)
      {
-        _ecore_time_clock_conversion = 1e-9 * (double) info.numer / (double) info.denom;
+        _ecore_time_clock_conversion = 1e-9 * (double)info.numer / (double)info.denom;
      }
    else
      {
@@ -182,3 +181,4 @@ _ecore_time_init(void)
 
    _ecore_time_loop_time = ecore_time_get();
 }
+
index 2d398f0..f457a4e 100644 (file)
 # include <string.h>
 # include <execinfo.h>
 # define ECORE_TIMER_DEBUG_BT_NUM 64
-   typedef void (*Ecore_Timer_Bt_Func) ();
+typedef void (*Ecore_Timer_Bt_Func)();
 #endif
 
 struct _Ecore_Timer
 {
    EINA_INLIST;
-   ECORE_MAGIC;
-   double          in;
-   double          at;
-   double          pending;
-   Ecore_Task_Cb   func;
-   void           *data;
+                       ECORE_MAGIC;
+   double              in;
+   double              at;
+   double              pending;
+   Ecore_Task_Cb       func;
+   void               *data;
 
 #ifdef WANT_ECORE_TIMER_DUMP
    Ecore_Timer_Bt_Func timer_bt[ECORE_TIMER_DEBUG_BT_NUM];
    int                 timer_bt_num;
 #endif
 
-   int             references;
-   unsigned char   delete_me : 1;
-   unsigned char   just_added : 1;
-   unsigned char   frozen : 1;
+   int                 references;
+   unsigned char       delete_me : 1;
+   unsigned char       just_added : 1;
+   unsigned char       frozen : 1;
 };
 
+static void _ecore_timer_set(Ecore_Timer  *timer,
+                             double        at,
+                             double        in,
+                             Ecore_Task_Cb func,
+                             void         *data);
+static int _ecore_timer_cmp(const void *d1,
+                            const void *d2);
 
-static void _ecore_timer_set(Ecore_Timer *timer, double at, double in, Ecore_Task_Cb func, void *data);
-static int _ecore_timer_cmp(const void *d1, const void *d2);
-
-static int          timers_added = 0;
-static int          timers_delete_me = 0;
+static int timers_added = 0;
+static int timers_delete_me = 0;
 static Ecore_Timer *timers = NULL;
 static Ecore_Timer *timer_current = NULL;
 static Ecore_Timer *suspended = NULL;
-static double       last_check = 0.0;
-static double       precision = 10.0 / 1000000.0;
-
+static double last_check = 0.0;
+static double precision = 10.0 / 1000000.0;
 
 /**
  * @addtogroup Ecore_Time_Group
@@ -125,7 +128,9 @@ unlock:
  * invalid.
  */
 EAPI Ecore_Timer *
-ecore_timer_add(double in, Ecore_Task_Cb func, const void *data)
+ecore_timer_add(double        in,
+                Ecore_Task_Cb func,
+                const void   *data)
 {
    double now;
    Ecore_Timer *timer = NULL;
@@ -139,7 +144,7 @@ ecore_timer_add(double in, Ecore_Task_Cb func, const void *data)
    now = ecore_time_get();
 
 #ifdef WANT_ECORE_TIMER_DUMP
-   timer->timer_bt_num = backtrace((void**) (timer->timer_bt),
+   timer->timer_bt_num = backtrace((void **)(timer->timer_bt),
                                    ECORE_TIMER_DEBUG_BT_NUM);
 #endif
 
@@ -162,7 +167,9 @@ unlock:
  * ecore_timer_add() for more details.
  */
 EAPI Ecore_Timer *
-ecore_timer_loop_add(double in, Ecore_Task_Cb func, const void *data)
+ecore_timer_loop_add(double        in,
+                     Ecore_Task_Cb func,
+                     const void   *data)
 {
    Ecore_Timer *timer;
 
@@ -211,7 +218,8 @@ unlock:
  * @param   in    The interval in seconds.
  */
 EAPI void
-ecore_timer_interval_set(Ecore_Timer *timer, double in)
+ecore_timer_interval_set(Ecore_Timer *timer,
+                         double       in)
 {
    _ecore_lock();
 
@@ -261,7 +269,8 @@ unlock:
  * @param   add   The dalay to add to the next iteration.
  */
 EAPI void
-ecore_timer_delay(Ecore_Timer *timer, double add)
+ecore_timer_delay(Ecore_Timer *timer,
+                  double       add)
 {
    if (!ECORE_MAGIC_CHECK(timer, ECORE_MAGIC_TIMER))
      {
@@ -284,8 +293,8 @@ ecore_timer_delay(Ecore_Timer *timer, double add)
 EAPI double
 ecore_timer_pending_get(Ecore_Timer *timer)
 {
-   double        now;
-   double        ret = 0.0;
+   double now;
+   double ret = 0.0;
 
    _ecore_lock();
 
@@ -339,8 +348,8 @@ ecore_timer_freeze(Ecore_Timer *timer)
    if (timer->frozen)
      goto unlock;
 
-   timers = (Ecore_Timer *) eina_inlist_remove(EINA_INLIST_GET(timers), EINA_INLIST_GET(timer));
-   suspended = (Ecore_Timer *) eina_inlist_prepend(EINA_INLIST_GET(suspended), EINA_INLIST_GET(timer));
+   timers = (Ecore_Timer *)eina_inlist_remove(EINA_INLIST_GET(timers), EINA_INLIST_GET(timer));
+   suspended = (Ecore_Timer *)eina_inlist_prepend(EINA_INLIST_GET(suspended), EINA_INLIST_GET(timer));
 
    now = ecore_time_get();
 
@@ -382,7 +391,7 @@ ecore_timer_thaw(Ecore_Timer *timer)
    if (!timer->frozen)
      goto unlock;
 
-   suspended = (Ecore_Timer *) eina_inlist_remove(EINA_INLIST_GET(suspended), EINA_INLIST_GET(timer));
+   suspended = (Ecore_Timer *)eina_inlist_remove(EINA_INLIST_GET(suspended), EINA_INLIST_GET(timer));
    now = ecore_time_get();
 
    _ecore_timer_set(timer, timer->pending + now, timer->in, timer->func, timer->data);
@@ -412,15 +421,15 @@ ecore_timer_dump(void)
         char **strings;
         int j;
 
-       if (!tm->frozen && !tm->delete_me)
-         living_timer++;
+        if (!tm->frozen && !tm->delete_me)
+          living_timer++;
 
-        strings = backtrace_symbols((void**) tm->timer_bt, tm->timer_bt_num);
+        strings = backtrace_symbols((void **)tm->timer_bt, tm->timer_bt_num);
         if (tm->timer_bt_num <= 0 || strings == NULL)
-         {
-           unknow_timer++;
-           continue ;
-         }
+          {
+             unknow_timer++;
+             continue;
+          }
 
         eina_strbuf_append_printf(result, "*** timer: %f ***\n", tm->in);
         if (tm->frozen)
@@ -450,7 +459,9 @@ ecore_timer_dump(void)
  */
 
 Ecore_Timer *
-_ecore_timer_loop_add(double in, Ecore_Task_Cb func, const void *data)
+_ecore_timer_loop_add(double        in,
+                      Ecore_Task_Cb func,
+                      const void   *data)
 {
    double now;
    Ecore_Timer *timer = NULL;
@@ -463,7 +474,7 @@ _ecore_timer_loop_add(double in, Ecore_Task_Cb func, const void *data)
    now = ecore_loop_time_get();
 
 #ifdef WANT_ECORE_TIMER_DUMP
-   timer->timer_bt_num = backtrace((void**) (timer->timer_bt),
+   timer->timer_bt_num = backtrace((void **)(timer->timer_bt),
                                    ECORE_TIMER_DEBUG_BT_NUM);
 #endif
    _ecore_timer_set(timer, now + in, in, func, (void *)data);
@@ -471,7 +482,8 @@ _ecore_timer_loop_add(double in, Ecore_Task_Cb func, const void *data)
 }
 
 EAPI void
-_ecore_timer_delay(Ecore_Timer *timer, double add)
+_ecore_timer_delay(Ecore_Timer *timer,
+                   double       add)
 {
    if (timer->frozen)
      {
@@ -479,12 +491,11 @@ _ecore_timer_delay(Ecore_Timer *timer, double add)
      }
    else
      {
-        timers = (Ecore_Timer *) eina_inlist_remove(EINA_INLIST_GET(timers), EINA_INLIST_GET(timer));
+        timers = (Ecore_Timer *)eina_inlist_remove(EINA_INLIST_GET(timers), EINA_INLIST_GET(timer));
         _ecore_timer_set(timer, timer->at + add, timer->in, timer->func, timer->data);
      }
 }
 
-
 void *
 _ecore_timer_del(Ecore_Timer *timer)
 {
@@ -492,7 +503,7 @@ _ecore_timer_del(Ecore_Timer *timer)
      {
         void *data = timer->data;
 
-        suspended = (Ecore_Timer *) eina_inlist_remove(EINA_INLIST_GET(suspended), EINA_INLIST_GET(timer));
+        suspended = (Ecore_Timer *)eina_inlist_remove(EINA_INLIST_GET(suspended), EINA_INLIST_GET(timer));
 
         if (timer->delete_me)
           timers_delete_me--;
@@ -514,14 +525,14 @@ _ecore_timer_shutdown(void)
 
    while ((timer = timers))
      {
-        timers = (Ecore_Timer *) eina_inlist_remove(EINA_INLIST_GET(timers), EINA_INLIST_GET(timers));
+        timers = (Ecore_Timer *)eina_inlist_remove(EINA_INLIST_GET(timers), EINA_INLIST_GET(timers));
         ECORE_MAGIC_SET(timer, ECORE_MAGIC_NONE);
         free(timer);
      }
 
    while ((timer = suspended))
      {
-        suspended = (Ecore_Timer *) eina_inlist_remove(EINA_INLIST_GET(suspended), EINA_INLIST_GET(suspended));
+        suspended = (Ecore_Timer *)eina_inlist_remove(EINA_INLIST_GET(suspended), EINA_INLIST_GET(suspended));
         ECORE_MAGIC_SET(timer, ECORE_MAGIC_NONE);
         free(timer);
      }
@@ -536,11 +547,11 @@ _ecore_timer_cleanup(void)
    int in_use = 0, todo = timers_delete_me, done = 0;
 
    if (!timers_delete_me) return;
-   for (l = timers; l;)
+   for (l = timers; l; )
      {
         Ecore_Timer *timer = l;
 
-        l = (Ecore_Timer *) EINA_INLIST_GET(l)->next;
+        l = (Ecore_Timer *)EINA_INLIST_GET(l)->next;
         if (timer->delete_me)
           {
              if (timer->references)
@@ -548,7 +559,7 @@ _ecore_timer_cleanup(void)
                   in_use++;
                   continue;
                }
-             timers = (Ecore_Timer *) eina_inlist_remove(EINA_INLIST_GET(timers), EINA_INLIST_GET(timer));
+             timers = (Ecore_Timer *)eina_inlist_remove(EINA_INLIST_GET(timers), EINA_INLIST_GET(timer));
              ECORE_MAGIC_SET(timer, ECORE_MAGIC_NONE);
              free(timer);
              timers_delete_me--;
@@ -556,11 +567,11 @@ _ecore_timer_cleanup(void)
              if (timers_delete_me == 0) return;
           }
      }
-   for (l = suspended; l;)
+   for (l = suspended; l; )
      {
         Ecore_Timer *timer = l;
 
-        l = (Ecore_Timer *) EINA_INLIST_GET(l)->next;
+        l = (Ecore_Timer *)EINA_INLIST_GET(l)->next;
         if (timer->delete_me)
           {
              if (timer->references)
@@ -568,7 +579,7 @@ _ecore_timer_cleanup(void)
                   in_use++;
                   continue;
                }
-             suspended = (Ecore_Timer *) eina_inlist_remove(EINA_INLIST_GET(suspended), EINA_INLIST_GET(timer));
+             suspended = (Ecore_Timer *)eina_inlist_remove(EINA_INLIST_GET(suspended), EINA_INLIST_GET(timer));
              ECORE_MAGIC_SET(timer, ECORE_MAGIC_NONE);
              free(timer);
              timers_delete_me--;
@@ -614,7 +625,7 @@ _ecore_timer_first_get(void)
    Ecore_Timer *timer = timers;
 
    while ((timer) && ((timer->delete_me) || (timer->just_added)))
-     timer = (Ecore_Timer *) EINA_INLIST_GET(timer)->next;
+     timer = (Ecore_Timer *)EINA_INLIST_GET(timer)->next;
 
    return timer;
 }
@@ -622,15 +633,15 @@ _ecore_timer_first_get(void)
 static inline Ecore_Timer *
 _ecore_timer_after_get(Ecore_Timer *base)
 {
-   Ecore_Timer *timer = (Ecore_Timer *) EINA_INLIST_GET(base)->next;
+   Ecore_Timer *timer = (Ecore_Timer *)EINA_INLIST_GET(base)->next;
    Ecore_Timer *valid_timer = NULL;
    double maxtime = base->at + precision;
 
    while ((timer) && (timer->at < maxtime))
      {
         if (!((timer->delete_me) || (timer->just_added)))
-           valid_timer = timer;
-        timer = (Ecore_Timer *) EINA_INLIST_GET(timer)->next;
+          valid_timer = timer;
+        timer = (Ecore_Timer *)EINA_INLIST_GET(timer)->next;
      }
 
    return valid_timer;
@@ -656,11 +667,12 @@ _ecore_timer_next_get(void)
 }
 
 static inline void
-_ecore_timer_reschedule(Ecore_Timer *timer, double when)
+_ecore_timer_reschedule(Ecore_Timer *timer,
+                        double       when)
 {
    if ((timer->delete_me) || (timer->frozen)) return;
 
-   timers = (Ecore_Timer *) eina_inlist_remove(EINA_INLIST_GET(timers), EINA_INLIST_GET(timer));
+   timers = (Ecore_Timer *)eina_inlist_remove(EINA_INLIST_GET(timers), EINA_INLIST_GET(timer));
 
    /* if the timer would have gone off more than 15 seconds ago,
     * assume that the system hung and set the timer to go off
@@ -682,7 +694,7 @@ void
 _ecore_timer_expired_timers_call(double when)
 {
    /* call the first expired timer until no expired timers exist */
-   while (_ecore_timer_expired_call(when));
+    while (_ecore_timer_expired_call(when)) ;
 }
 
 /* assume that we hold the ecore lock when entering this function */
@@ -701,14 +713,14 @@ _ecore_timer_expired_call(double when)
    if (!timer_current)
      {
         /* regular main loop, start from head */
-        timer_current = timers;
+         timer_current = timers;
      }
    else
      {
         /* recursive main loop, continue from where we were */
-        Ecore_Timer *timer_old = timer_current;
-        timer_current = (Ecore_Timer *)EINA_INLIST_GET(timer_current)->next;
-        _ecore_timer_reschedule(timer_old, when);
+         Ecore_Timer *timer_old = timer_current;
+         timer_current = (Ecore_Timer *)EINA_INLIST_GET(timer_current)->next;
+         _ecore_timer_reschedule(timer_old, when);
      }
 
    while (timer_current)
@@ -723,7 +735,7 @@ _ecore_timer_expired_call(double when)
 
         if ((timer->just_added) || (timer->delete_me))
           {
-             timer_current = (Ecore_Timer*)EINA_INLIST_GET(timer_current)->next;
+             timer_current = (Ecore_Timer *)EINA_INLIST_GET(timer_current)->next;
              continue;
           }
 
@@ -743,7 +755,11 @@ _ecore_timer_expired_call(double when)
 }
 
 static void
-_ecore_timer_set(Ecore_Timer *timer, double at, double in, Ecore_Task_Cb func, void *data)
+_ecore_timer_set(Ecore_Timer  *timer,
+                 double        at,
+                 double        in,
+                 Ecore_Task_Cb func,
+                 void         *data)
 {
    Ecore_Timer *t2;
 
@@ -761,19 +777,21 @@ _ecore_timer_set(Ecore_Timer *timer, double at, double in, Ecore_Task_Cb func, v
           {
              if (timer->at > t2->at)
                {
-                  timers = (Ecore_Timer *) eina_inlist_append_relative(EINA_INLIST_GET(timers), EINA_INLIST_GET(timer), EINA_INLIST_GET(t2));
+                  timers = (Ecore_Timer *)eina_inlist_append_relative(EINA_INLIST_GET(timers), EINA_INLIST_GET(timer), EINA_INLIST_GET(t2));
                   return;
                }
           }
      }
-   timers = (Ecore_Timer *) eina_inlist_prepend(EINA_INLIST_GET(timers), EINA_INLIST_GET(timer));
+   timers = (Ecore_Timer *)eina_inlist_prepend(EINA_INLIST_GET(timers), EINA_INLIST_GET(timer));
 }
 
 static int
-_ecore_timer_cmp(const void *d1, const void *d2)
+_ecore_timer_cmp(const void *d1,
+                 const void *d2)
 {
    const Ecore_Timer *t1 = d1;
    const Ecore_Timer *t2 = d2;
 
-   return (int) ((t1->in - t2->in) * 100);
+   return (int)((t1->in - t2->in) * 100);
 }
+
index f90db7c..51c8ead 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef _ECORE_COCOA_H
-#define _ECORE_COCOA_H
+#ifndef __ECORE_COCOA_H__
+#define __ECORE_COCOA_H__
 
 /*
  * DO NOT USE THIS HEADER. IT IS WORK IN PROGRESS. IT IS NOT FINAL AND
@@ -46,7 +46,7 @@ struct _Ecore_Cocoa_Event_Video_Resize
 
 /* Core */
 
-EAPI int  ecore_cocoa_init(const char *name);
+EAPI int  ecore_cocoa_init(void);
 EAPI int  ecore_cocoa_shutdown(void);
 EAPI void ecore_cocoa_feed_events(void);
 
@@ -136,6 +136,10 @@ EAPI void ecore_cocoa_window_iconified_set(Ecore_Cocoa_Window *window,
 EAPI void ecore_cocoa_window_borderless_set(Ecore_Cocoa_Window *window,
                                             int                 on);
 
+EAPI void ecore_cocoa_window_view_set(Ecore_Cocoa_Window *window,
+                                     void *view);
+
+
 #ifdef __cplusplus
 }
 #endif
index ad2e767..3f6023a 100644 (file)
@@ -13,6 +13,7 @@
 #include "Ecore_Cocoa.h"
 #include "Ecore_Cocoa_Keys.h"
 
+
 EAPI int ECORE_COCOA_EVENT_GOT_FOCUS = 0;
 EAPI int ECORE_COCOA_EVENT_LOST_FOCUS = 0;
 EAPI int ECORE_COCOA_EVENT_RESIZE = 0;
@@ -23,7 +24,7 @@ static int _ecore_cocoa_init_count = 0;
 static int old_flags;
 
 EAPI int
-ecore_cocoa_init(const char *name __UNUSED__)
+ecore_cocoa_init(void)
 {
    if (++_ecore_cocoa_init_count != 1)
      return _ecore_cocoa_init_count;
@@ -31,6 +32,8 @@ ecore_cocoa_init(const char *name __UNUSED__)
    if (!ecore_event_init())
      return --_ecore_cocoa_init_count;
 
+   NSApplicationLoad();
+
    ECORE_COCOA_EVENT_GOT_FOCUS  = ecore_event_type_new();
    ECORE_COCOA_EVENT_LOST_FOCUS = ecore_event_type_new();
    ECORE_COCOA_EVENT_RESIZE     = ecore_event_type_new();
index 05bdc1f..0b4cf31 100644 (file)
@@ -1,11 +1,9 @@
 #ifndef _ECORE_COCOA_PRIVATE_H\r
 #define _ECORE_COCOA_PRIVATE_H\r
 \r
-\r
 struct _Ecore_Cocoa_Window\r
 {\r
    NSWindow *window;\r
-\r
    unsigned int borderless : 1;\r
 };\r
 \r
index 751bde4..2091a69 100644 (file)
@@ -5,6 +5,7 @@
 #include <Cocoa/Cocoa.h>\r
 \r
 #include "Ecore_Cocoa.h"\r
+#include "ecore_cocoa_private.h"\r
 \r
 Ecore_Cocoa_Window *\r
 ecore_cocoa_window_new(int x,\r
@@ -12,22 +13,29 @@ ecore_cocoa_window_new(int x,
                       int width,\r
                       int height)\r
 {\r
-  NSWindow *window;\r
+  Ecore_Cocoa_Window *w;\r
 \r
-  window = [[NSWindow alloc]\r
-            initWithContentRect:NSMakeRect(x, y, width, height)\r
-            styleMask:(NSTitledWindowMask |\r
+  NSWindow *window = [[NSWindow alloc]\r
+             initWithContentRect:NSMakeRect(x, y, width, height)\r
+             styleMask:(NSTitledWindowMask |\r
                        NSClosableWindowMask |\r
-                       NSResizableWindowMask |\r
-                       NSMiniaturizableWindowMask)\r
-            backing:NSBackingStoreBuffered\r
-            defer:NO\r
-            screen:nil\r
-           ];\r
+                        NSResizableWindowMask |\r
+                        NSMiniaturizableWindowMask)\r
+             backing:NSBackingStoreBuffered\r
+             defer:NO\r
+             screen:nil\r
+            ];\r
+\r
   if (!window)\r
     return NULL;\r
 \r
-  return window;\r
+  [window setBackgroundColor:[NSColor whiteColor]];\r
+\r
+  w = calloc(1, sizeof(Ecore_Cocoa_Window));\r
+  w->window = window;\r
+  w->borderless = 0;\r
+\r
+  return w;\r
 }\r
 \r
 void\r
@@ -36,7 +44,8 @@ ecore_cocoa_window_free(Ecore_Cocoa_Window *window)
   if (!window)\r
     return;\r
 \r
-  [window release];\r
+  [window->window release];\r
+  free(window);\r
 }\r
 \r
 void\r
@@ -44,8 +53,16 @@ ecore_cocoa_window_move(Ecore_Cocoa_Window *window,
                        int                 x,\r
                        int                 y)\r
 {\r
+  NSRect win_frame;\r
+\r
   if (!window)\r
     return;\r
+\r
+  win_frame = [window->window frame];\r
+  win_frame.origin.x = x;\r
+  win_frame.origin.y = y;\r
+\r
+  [window->window setFrame:win_frame display:YES];\r
 }\r
 \r
 void\r
@@ -56,7 +73,16 @@ ecore_cocoa_window_resize(Ecore_Cocoa_Window *window,
   if (!window)\r
     return;\r
 \r
-  [window setContentSize: NSMakeSize(width, height)];\r
+  NSRect win_frame;\r
+\r
+  if (!window)\r
+    return;\r
+\r
+  win_frame = [window->window frame];\r
+  win_frame.size.height = height;\r
+  win_frame.size.width = width;\r
+\r
+  [window->window setFrame:win_frame display:YES];\r
 }\r
 \r
 void\r
@@ -68,6 +94,19 @@ ecore_cocoa_window_move_resize(Ecore_Cocoa_Window *window,
 {\r
   if (!window)\r
     return;\r
+\r
+  NSRect win_frame;\r
+\r
+  if (!window)\r
+    return;\r
+\r
+  win_frame = [window->window frame];\r
+  win_frame.size.height = height;\r
+  win_frame.size.width = width;\r
+  win_frame.origin.x = x;\r
+  win_frame.origin.y = y;\r
+\r
+  [window->window setFrame:win_frame display:YES];\r
 }\r
 \r
 void\r
@@ -76,25 +115,28 @@ ecore_cocoa_window_title_set(Ecore_Cocoa_Window *window, const char *title)
   if (!window || !title)\r
     return;\r
 \r
-  [window setTitle:[NSString stringWithUTF8String:title]];\r
+  [window->window setTitle:[NSString stringWithUTF8String:title]];\r
 }\r
 \r
 void\r
 ecore_cocoa_window_show(Ecore_Cocoa_Window *window)\r
 {\r
-  if (!window || [window isVisible])\r
-    return;\r
+  if (!window || [window->window isVisible])\r
+    {\r
+      printf("Window(%p) is not visible\n", window->window);\r
+      return;\r
+    }\r
 \r
-  [window orderFront:NSApp];\r
+  [window->window makeKeyAndOrderFront:NSApp];\r
 }\r
 \r
 void\r
 ecore_cocoa_window_hide(Ecore_Cocoa_Window *window)\r
 {\r
-  if (!window || ![window isVisible])\r
+  if (!window || ![window->window isVisible])\r
     return;\r
 \r
-  [window orderOut:NSApp];\r
+  [window->window orderOut:NSApp];\r
 }\r
 \r
 void\r
@@ -105,6 +147,17 @@ ecore_cocoa_window_borderless_set(Ecore_Cocoa_Window *window,
     return;\r
 \r
   if (on)\r
-    [window setContentBorderThickness:0.0\r
+    [window->window setContentBorderThickness:0.0\r
            forEdje:NSMinXEdge | NSMinYEdge | NSMaxXEdge | NSMaxYEdge];\r
 }\r
+\r
+void\r
+ecore_cocoa_window_view_set(Ecore_Cocoa_Window *window,\r
+                           void *view)\r
+{\r
+  if (!window || !view)\r
+    return;\r
+\r
+  [[window->window contentView] addSubview:view];\r
+\r
+}\r
index 74cd321..aca8ee5 100644 (file)
@@ -1787,7 +1787,7 @@ _ecore_con_pretty_ip(struct sockaddr *client_addr)
        case AF_INET6:
           src = &(((struct sockaddr_in6 *)client_addr)->sin6_addr);
 
-          if (IN6_IS_ADDR_V4MAPPED(src))
+          if (IN6_IS_ADDR_V4MAPPED((struct in6_addr *)src))
             {
                family = AF_INET;
                src = (char*)src + 12;
index e20f788..62ce6bf 100644 (file)
@@ -289,7 +289,7 @@ ecore_con_info_get(Ecore_Con_Server *svr,
 
         err = write(fd[1], "", 1);
         close(fd[1]);
-#ifdef __USE_ISOC99
+#if defined(__USE_ISOC99) && !defined(__UCLIBC__)
         _Exit(0);
 #else
         _exit(0);
index c2d8242..6e54674 100644 (file)
@@ -358,6 +358,7 @@ ecore_con_url_free(Ecore_Con_Url *url_con)
         // this prevent any further call to the callback.
         curl_easy_setopt(url_con->curl_easy, CURLOPT_NOPROGRESS, EINA_TRUE);
         curl_easy_setopt(url_con->curl_easy, CURLOPT_PROGRESSFUNCTION, NULL);
+        curl_easy_setopt(url_con->curl_easy, CURLOPT_NOPROGRESS, EINA_TRUE);
 
         if (url_con->active)
           {
@@ -693,6 +694,10 @@ _ecore_con_url_send(Ecore_Con_Url *url_con,
              curl_easy_setopt(url_con->curl_easy, CURLOPT_POSTFIELDS, data);
              curl_easy_setopt(url_con->curl_easy, CURLOPT_POSTFIELDSIZE, length);
           }
+        else if (mode == MODE_POST)
+          {
+             curl_easy_setopt(url_con->curl_easy, CURLOPT_POST, 1);
+          }
      }
 
    switch (url_con->time_condition)
@@ -1360,21 +1365,14 @@ _ecore_con_url_perform(Ecore_Con_Url *url_con)
    int fd_max, fd;
    int flags, still_running;
    int completed_immediately = 0;
-   double start;
    CURLMcode ret;
 
    _url_con_list = eina_list_append(_url_con_list, url_con);
 
    url_con->active = EINA_TRUE;
    curl_multi_add_handle(_curlm, url_con->curl_easy);
-
-   start = ecore_time_get();
-   while (curl_multi_perform(_curlm, &still_running) == CURLM_CALL_MULTI_PERFORM)
-     if ((ecore_time_get() - start) > (0.7 * ecore_animator_frametime_get()))
-       {
-          break;
-       }
-
+   curl_multi_perform(_curlm, &still_running);
+   
    completed_immediately = _ecore_con_url_process_completed_jobs(url_con);
 
    if (!completed_immediately)
@@ -1459,17 +1457,9 @@ _ecore_con_url_perform(Ecore_Con_Url *url_con)
 static Eina_Bool
 _ecore_con_url_idler_handler(void *data)
 {
-   double start;
-   int done = 1, still_running;
-
-   start = ecore_time_get();
-   while (curl_multi_perform(_curlm, &still_running) == CURLM_CALL_MULTI_PERFORM)
-     /* make this not more than a frametime to keep interactivity high */
-     if ((ecore_time_get() - start) > (0.7 * ecore_animator_frametime_get()))
-       {
-          done = 0;
-          break;
-       }
+   int done, still_running;
+
+   done = (curl_multi_perform(_curlm, &still_running) != CURLM_CALL_MULTI_PERFORM);
 
    _ecore_con_url_process_completed_jobs(NULL);
 
index c29b20f..acb0db5 100644 (file)
@@ -93,7 +93,7 @@ typedef enum _Ecore_Evas_Engine_Type
    ECORE_EVAS_ENGINE_SOFTWARE_DDRAW,
    ECORE_EVAS_ENGINE_DIRECT3D,
    ECORE_EVAS_ENGINE_OPENGL_GLEW,
-   ECORE_EVAS_ENGINE_COCOA,
+   ECORE_EVAS_ENGINE_OPENGL_COCOA,
    ECORE_EVAS_ENGINE_SOFTWARE_SDL,
    ECORE_EVAS_ENGINE_DIRECTFB,
    ECORE_EVAS_ENGINE_SOFTWARE_FB,
@@ -138,6 +138,10 @@ typedef struct _Ecore_Win32_Window Ecore_Win32_Window;
 typedef struct _Ecore_WinCE_Window Ecore_WinCE_Window;
 #endif
 
+#ifndef __ECORE_COCOA_H__
+typedef struct _Ecore_Cocoa_Window Ecore_Cocoa_Window;
+#endif
+
 #ifndef _ECORE_EVAS_PRIVATE_H
 /* basic data types */
 typedef struct _Ecore_Evas Ecore_Evas;
@@ -289,8 +293,8 @@ EAPI void        ecore_evas_geometry_get(const Ecore_Evas *ee, int *x, int *y, i
  *
  * This function takes four pointers to (already allocated) ints, and places
  * the geometry which @p ee was latest recently requested . If any of the parameters is not desired you
- * may pass NULL on them.
- * This function can represent recently requested geomety.
+ * may pass NULL on them. 
+ * This function can represent recently requested geomety. 
  * ecore_evas_geometry_get function returns the value is updated after engine finished request.
  * By comparison, ecore_evas_request_geometry_get returns recently requested value.
  *
@@ -943,7 +947,11 @@ EAPI Ecore_Evas     *ecore_evas_software_wince_gdi_new(Ecore_WinCE_Window *paren
 
 EAPI Ecore_WinCE_Window *ecore_evas_software_wince_window_get(const Ecore_Evas *ee);
 
-EAPI Ecore_Evas *ecore_evas_cocoa_new(const char* name, int w, int h);
+EAPI Ecore_Evas *ecore_evas_cocoa_new(Ecore_Cocoa_Window *parent,
+                                     int x,
+                                     int y,
+                                     int w,
+                                     int h);
 
 /* generic manipulation calls */
 /**
@@ -1390,6 +1398,28 @@ EAPI Eina_Bool   ecore_evas_sticky_get(const Ecore_Evas *ee);
 EAPI void        ecore_evas_manual_render_set(Ecore_Evas *ee, Eina_Bool manual_render);
 EAPI Eina_Bool   ecore_evas_manual_render_get(const Ecore_Evas *ee);
 
+/**
+ * @brief Registers an @c Ecore_Evas to receive events through ecore_input_evas.
+ *
+ * @param ee The @c Ecore_Evas handle.
+ *
+ * This function calls ecore_event_window_register() with the @p ee as its @c
+ * id argument, @c window argument, and uses its @c Evas too. It is useful when
+ * no @c window information is available on a given @c Ecore_Evas backend.
+ *
+ * @see ecore_evas_input_event_unregister()
+ * @since 1.1
+ */
+EAPI void        ecore_evas_input_event_register(Ecore_Evas *ee);
+/**
+ * @brief Unregisters an @c Ecore_Evas receiving events through ecore_input_evas.
+ *
+ * @param ee The @c Ecore_Evas handle.
+ *
+ * @see ecore_evas_input_event_register()
+ * @since 1.1
+ */
+EAPI void        ecore_evas_input_event_unregister(Ecore_Evas *ee);
 
 /**
  * @brief Force immediate rendering on a given @c Ecore_Evas window
index f0aaea9..c867d98 100644 (file)
@@ -42,6 +42,14 @@ ECORE_SDL_LIB =
 ECORE_SDL_LIBADD =
 endif
 
+if BUILD_ECORE_COCOA
+ECORE_COCOA_INC = -I$(top_srcdir)/src/lib/ecore_cocoa
+ECORE_COCOA_LIB = $(top_builddir)/src/lib/ecore_cocoa/libecore_cocoa.la
+else
+ECORE_COCOA_INC =
+ECORE_COCOA_LIB =
+endif
+
 if BUILD_ECORE_WINCE
 ECORE_WINCE_INC = -I$(top_srcdir)/src/lib/ecore_wince
 ECORE_WINCE_LIB = $(top_builddir)/src/lib/ecore_wince/libecore_wince.la
@@ -65,6 +73,7 @@ $(ECORE_FB_INC) \
 $(ECORE_DIRECTFB_INC) \
 $(ECORE_WIN32_INC) \
 $(ECORE_SDL_INC) \
+$(ECORE_COCOA_INC) \
 $(ECORE_WINCE_INC) \
 @EVAS_CFLAGS@ \
 @EINA_CFLAGS@ \
@@ -85,6 +94,7 @@ ecore_evas_buffer.c \
 ecore_evas_directfb.c \
 ecore_evas_win32.c \
 ecore_evas_sdl.c \
+ecore_evas_cocoa.c \
 ecore_evas_wince.c \
 ecore_evas_ews.c
 
@@ -95,6 +105,7 @@ $(ECORE_DIRECTFB_LIB) \
 $(ECORE_WIN32_LIB) \
 $(ECORE_SDL_LIB) \
 $(ECORE_SDL_LIBADD) \
+$(ECORE_COCOA_LIB) \
 $(ECORE_WINCE_LIB) \
 $(top_builddir)/src/lib/ecore_input/libecore_input.la \
 $(top_builddir)/src/lib/ecore_input_evas/libecore_input_evas.la \
index ccb3f43..3cb656e 100644 (file)
@@ -21,6 +21,7 @@
 #include "ecore_evas_private.h"
 #include "Ecore_Evas.h"
 
+Eina_Bool _ecore_evas_app_comp_sync = 1;
 int _ecore_evas_log_dom = -1;
 static int _ecore_evas_init_count = 0;
 static Ecore_Fd_Handler *_ecore_evas_async_events_fd = NULL;
@@ -175,8 +176,8 @@ ecore_evas_engine_type_supported_get(Ecore_Evas_Engine_Type engine)
 #else
         return EINA_FALSE;
 #endif
-      case ECORE_EVAS_ENGINE_COCOA:
-#ifdef BUILD_ECORE_EVAS_COCOA
+      case ECORE_EVAS_ENGINE_OPENGL_COCOA:
+#ifdef BUILD_ECORE_EVAS_OPENGL_COCOA
         return EINA_TRUE;
 #else
         return EINA_FALSE;
@@ -232,6 +233,8 @@ ecore_evas_init(void)
    _ecore_evas_ews_events_init();
 #endif
 
+   if (getenv("ECORE_EVAS_COMP_NOSYNC"))
+      _ecore_evas_app_comp_sync = 0;
    return _ecore_evas_init_count;
 
  shutdown_ecore:
@@ -286,8 +289,6 @@ ecore_evas_shutdown(void)
    return _ecore_evas_init_count;
 }
 
-Eina_Bool _ecore_evas_app_comp_sync = 1;
-
 EAPI void
 ecore_evas_app_comp_sync_set(Eina_Bool do_sync)
 {
@@ -397,7 +398,7 @@ _ecore_evas_constructor_software_x11(int x, int y, int w, int h, const char *ext
 }
 #endif
 
-#ifdef BUILD_ECORE_EVAS_COCOA
+#ifdef BUILD_ECORE_EVAS_OPENGL_COCOA
 static Ecore_Evas *
 _ecore_evas_constructor_cocoa(int x, int y, int w, int h, const char *extra_options)
 {
@@ -405,7 +406,7 @@ _ecore_evas_constructor_cocoa(int x, int y, int w, int h, const char *extra_opti
    Ecore_Evas *ee;
 
    _ecore_evas_parse_extra_options_str(extra_options, "name=", &name);
-   ee = ecore_evas_cocoa_new(name, w, h);
+   ee = ecore_evas_cocoa_new(NULL, x, y, w, h);
    free(name);
 
    if (ee) ecore_evas_move(ee, x, y);
@@ -683,8 +684,8 @@ static const struct ecore_evas_engine _engines[] = {
 #endif
 
   /* Apple */
-#ifdef BUILD_ECORE_EVAS_COCOA
-  {"cocoa", _ecore_evas_constructor_cocoa},
+#ifdef BUILD_ECORE_EVAS_OPENGL_COCOA
+  {"opengl_cocoa", _ecore_evas_constructor_cocoa},
 #endif
 
   /* Last chance to have a window */
@@ -2543,3 +2544,19 @@ ecore_evas_ecore_evas_list_get(void)
 
    return l;
 }
+
+EAPI void
+ecore_evas_input_event_register(Ecore_Evas *ee)
+{
+   ecore_event_window_register((Ecore_Window)ee, ee, ee->evas,
+                               (Ecore_Event_Mouse_Move_Cb)_ecore_evas_mouse_move_process,
+                               (Ecore_Event_Multi_Move_Cb)_ecore_evas_mouse_multi_move_process,
+                               (Ecore_Event_Multi_Down_Cb)_ecore_evas_mouse_multi_down_process,
+                               (Ecore_Event_Multi_Up_Cb)_ecore_evas_mouse_multi_up_process);
+}
+
+EAPI void
+ecore_evas_input_event_unregister(Ecore_Evas *ee)
+{
+   ecore_event_window_unregister((Ecore_Window)ee);
+}
index 7036e6a..3299f61 100644 (file)
@@ -48,6 +48,8 @@ _ecore_evas_resize(Ecore_Evas *ee, int w, int h)
 
    if (w < 1) w = 1;
    if (h < 1) h = 1;
+   ee->req.w = w;
+   ee->req.h = h;
    if ((w == ee->w) && (h == ee->h)) return;
    ee->w = w;
    ee->h = h;
@@ -86,6 +88,8 @@ _ecore_evas_resize(Ecore_Evas *ee, int w, int h)
              ERR("evas_engine_info_set() for engine '%s' failed.", ee->driver);
           }
      }
+   if (ee->engine.buffer.image)
+      evas_object_image_data_set(ee->engine.buffer.image, ee->engine.buffer.pixels);
    if (ee->func.fn_resize) ee->func.fn_resize(ee);
 }
 
@@ -93,9 +97,6 @@ int
 _ecore_evas_buffer_shutdown(void)
 {
    _ecore_evas_init_count--;
-   if (_ecore_evas_init_count == 0)
-     {
-     }
    if (_ecore_evas_init_count < 0) _ecore_evas_init_count = 0;
    return _ecore_evas_init_count;
 }
@@ -103,7 +104,7 @@ _ecore_evas_buffer_shutdown(void)
 int
 _ecore_evas_buffer_render(Ecore_Evas *ee)
 {
-   Eina_List *updates, *l, *ll;
+   Eina_List *updates = NULL, *l, *ll;
    Ecore_Evas *ee2;
    int rend = 0;
 
@@ -111,7 +112,7 @@ _ecore_evas_buffer_render(Ecore_Evas *ee)
      {
         if (ee2->func.fn_pre_render) ee2->func.fn_pre_render(ee2);
         if (ee2->engine.func->fn_render)
-          rend |= ee2->engine.func->fn_render(ee2);
+           rend |= ee2->engine.func->fn_render(ee2);
         if (ee2->func.fn_post_render) ee2->func.fn_post_render(ee2);
      }
    if (ee->engine.buffer.image)
@@ -120,16 +121,21 @@ _ecore_evas_buffer_render(Ecore_Evas *ee)
 
         evas_object_image_size_get(ee->engine.buffer.image, &w, &h);
         if ((w != ee->w) || (h != ee->h))
-          _ecore_evas_resize(ee, w, h);
+           _ecore_evas_resize(ee, w, h);
+        ee->engine.buffer.pixels = evas_object_image_data_get(ee->engine.buffer.image, 1);
+     }
+   if (ee->engine.buffer.pixels)
+     {
+        updates = evas_render_updates(ee->evas);
      }
-   updates = evas_render_updates(ee->evas);
    if (ee->engine.buffer.image)
      {
         Eina_Rectangle *r;
 
+        evas_object_image_data_set(ee->engine.buffer.image, ee->engine.buffer.pixels);
         EINA_LIST_FOREACH(updates, l, r)
-          evas_object_image_data_update_add(ee->engine.buffer.image,
-                                            r->x, r->y, r->w, r->h);
+           evas_object_image_data_update_add(ee->engine.buffer.image,
+                                             r->x, r->y, r->w, r->h);
      }
    if (updates)
      {
@@ -451,6 +457,8 @@ _ecore_evas_buffer_alpha_set(Ecore_Evas *ee, int alpha)
 {
    if (((ee->alpha) && (alpha)) || ((!ee->alpha) && (!alpha))) return;
    ee->alpha = alpha;
+   if (ee->engine.buffer.image)
+      evas_object_image_alpha_set(ee->engine.buffer.image, ee->alpha);
 }
 
 static Ecore_Evas_Engine_Func _ecore_buffer_engine_func =
@@ -558,6 +566,8 @@ ecore_evas_buffer_allocfunc_new(int w, int h, void *(*alloc_func) (void *data, i
    ee->visible = 1;
    ee->w = w;
    ee->h = h;
+   ee->req.w = ee->w;
+   ee->req.h = ee->h;
 
    ee->prop.max.w = 0;
    ee->prop.max.h = 0;
@@ -662,7 +672,7 @@ ecore_evas_object_image_new(Ecore_Evas *ee_target)
    Evas_Engine_Info_Buffer *einfo;
    Ecore_Evas *ee;
    int rmethod;
-   int w, h;
+   int w = 1, h = 1;
 
    rmethod = evas_render_method_lookup("buffer");
    if (!rmethod) return NULL;
@@ -672,6 +682,8 @@ ecore_evas_object_image_new(Ecore_Evas *ee_target)
    o = evas_object_image_add(ee_target->evas);
    evas_object_image_content_hint_set(o, EVAS_IMAGE_CONTENT_HINT_DYNAMIC);
    evas_object_image_colorspace_set(o, EVAS_COLORSPACE_ARGB8888);
+   evas_object_image_alpha_set(o, 0);
+   evas_object_image_size_set(o, w, h);
 
    ECORE_MAGIC_SET(ee, ECORE_MAGIC_EVAS);
 
@@ -681,12 +693,12 @@ ecore_evas_object_image_new(Ecore_Evas *ee_target)
 
    ee->driver = "buffer";
 
-   w = 1;
-   h = 1;
    ee->rotation = 0;
    ee->visible = 0;
    ee->w = w;
    ee->h = h;
+   ee->req.w = ee->w;
+   ee->req.h = ee->h;
 
    ee->prop.max.w = 0;
    ee->prop.max.h = 0;
@@ -709,10 +721,6 @@ ecore_evas_object_image_new(Ecore_Evas *ee_target)
    ee->engine.buffer.image = o;
    evas_object_data_set(ee->engine.buffer.image, "Ecore_Evas", ee);
    evas_object_data_set(ee->engine.buffer.image, "Ecore_Evas_Parent", ee_target);
-   evas_object_image_size_set(o, ee->w, ee->h);
-   evas_object_image_alpha_set(o, 1);
-   ee->engine.buffer.pixels = evas_object_image_data_get(o, 1);
-   evas_object_image_data_set(o, ee->engine.buffer.pixels);
    evas_object_event_callback_add(ee->engine.buffer.image,
                                   EVAS_CALLBACK_MOUSE_IN,
                                   _ecore_evas_buffer_cb_mouse_in, ee);
@@ -764,6 +772,7 @@ ecore_evas_object_image_new(Ecore_Evas *ee_target)
    einfo = (Evas_Engine_Info_Buffer *)evas_engine_info_get(ee->evas);
    if (einfo)
      {
+        ee->engine.buffer.pixels = evas_object_image_data_get(o, 1);
         einfo->info.depth_type = EVAS_ENGINE_BUFFER_DEPTH_ARGB32;
         einfo->info.dest_buffer = ee->engine.buffer.pixels;
         einfo->info.dest_buffer_row_bytes = evas_object_image_stride_get(o);
@@ -771,6 +780,7 @@ ecore_evas_object_image_new(Ecore_Evas *ee_target)
         einfo->info.alpha_threshold = 0;
         einfo->info.func.new_update_region = NULL;
         einfo->info.func.free_update_region = NULL;
+        evas_object_image_data_set(o, ee->engine.buffer.pixels);
         if (!evas_engine_info_set(ee->evas, (Evas_Engine_Info *)einfo))
           {
              ERR("evas_engine_info_set() for engine '%s' failed.", ee->driver);
diff --git a/src/lib/ecore_evas/ecore_evas_cocoa.c b/src/lib/ecore_evas/ecore_evas_cocoa.c
new file mode 100644 (file)
index 0000000..ab4021d
--- /dev/null
@@ -0,0 +1,567 @@
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include "Ecore.h"
+#include "ecore_private.h"
+#include "Ecore_Input.h"
+#include "Ecore_Input_Evas.h"
+
+#ifdef BUILD_ECORE_EVAS_OPENGL_COCOA
+#include <Ecore_Cocoa.h>
+#include <Evas_Engine_Gl_Cocoa.h>
+#endif
+
+#include "ecore_evas_private.h"
+#include "Ecore_Evas.h"
+
+
+#ifdef BUILD_ECORE_EVAS_OPENGL_COCOA
+
+// FIXME: this engine has lots of problems. only 1 window at a time, drawRect looks wrong, doesnt handle resizes and more
+
+static int                      _ecore_evas_init_count = 0;
+static Ecore_Evas               *ecore_evases = NULL;
+static Ecore_Event_Handler      *ecore_evas_event_handlers[4] = {
+  NULL, NULL, NULL, NULL
+};
+static Ecore_Idle_Enterer       *ecore_evas_idle_enterer = NULL;
+static Ecore_Poller             *ecore_evas_event = NULL;
+
+static const char               *ecore_evas_cocoa_default = "EFL Cocoa";
+
+
+static int
+_ecore_evas_cocoa_render(Ecore_Evas *ee)
+{
+   int rend = 0;
+   Eina_List *updates = NULL;
+   Eina_List *ll;
+   Ecore_Evas *ee2;
+
+   DBG("Render");
+
+   EINA_LIST_FOREACH(ee->sub_ecore_evas, ll, ee2)
+     {
+        if (ee2->func.fn_pre_render) ee2->func.fn_pre_render(ee2);
+        if (ee2->engine.func->fn_render)
+          rend |= ee2->engine.func->fn_render(ee2);
+        if (ee2->func.fn_post_render) ee2->func.fn_post_render(ee2);
+     }
+
+   if (ee->func.fn_pre_render) ee->func.fn_pre_render(ee);
+   updates = evas_render_updates(ee->evas);
+   if (ee->prop.avoid_damage)
+     {
+        updates = evas_render_updates(ee->evas);
+        if (updates) evas_render_updates_free(updates);
+     }
+   else if ((ee->visible) ||
+            ((ee->should_be_visible) && (ee->prop.fullscreen)) ||
+            ((ee->should_be_visible) && (ee->prop.override)))
+     {
+        if (ee->shaped)
+          {
+             updates = evas_render_updates(ee->evas);
+             if (updates) evas_render_updates_free(updates);
+          }
+        else
+          {
+             updates = evas_render_updates(ee->evas);
+             if (updates) evas_render_updates_free(updates);
+          }
+     }
+   else
+     evas_norender(ee->evas);
+   if (updates) rend = 1;
+   if (ee->func.fn_post_render) ee->func.fn_post_render(ee);
+
+   if (rend)
+     {
+        static int frames = 0;
+        static double t0 = 0.0;
+        double t, td;
+
+        t = ecore_time_get();
+        frames++;
+        if ((t - t0) > 1.0)
+          {
+             td = t - t0;
+             printf("FPS: %3.3f\n", (double)frames / td);
+             frames = 0;
+             t0 = t;
+          }
+     }
+
+   return rend;
+}
+
+
+static Ecore_Evas *
+_ecore_evas_cocoa_match(void)
+{
+  DBG("Match");
+  return ecore_evases;
+}
+
+static int
+_ecore_evas_cocoa_event_got_focus(void *data __UNUSED__, int type __UNUSED__, void *event)
+{
+  Ecore_Evas                   *ee;
+
+  DBG("Got Focus");
+
+  ee = _ecore_evas_cocoa_match();
+
+  if (!ee) return 1;
+  ee->prop.focused = 1;
+
+  return 0;
+}
+
+static int
+_ecore_evas_cocoa_event_lost_focus(void *data __UNUSED__, int type __UNUSED__, void *event)
+{
+  Ecore_Evas                   *ee;
+
+  DBG("Lost Focus");
+
+  ee = _ecore_evas_cocoa_match();
+
+  if (!ee) return 1;
+  ee->prop.focused = 0;
+
+  return 0;
+}
+
+static int
+_ecore_evas_cocoa_event_video_resize(void *data __UNUSED__, int type __UNUSED__, void *event)
+{
+  /*Ecore_Cocoa_Event_Video_Resize *e;
+   Ecore_Evas                   *ee;
+
+   e = event;
+   ee = _ecore_evas_cocoa_match();
+
+   if (!ee) return 1; // pass on event
+   evas_output_size_set(ee->evas, e->w, e->h);
+
+   return 0;*/
+
+  DBG("Video Resize");
+
+}
+
+static int
+_ecore_evas_cocoa_event_video_expose(void *data __UNUSED__, int type __UNUSED__, void *event __UNUSED__)
+{
+  Ecore_Evas                   *ee;
+  int                          w;
+  int                          h;
+
+  DBG("Video Expose");
+
+  ee = _ecore_evas_cocoa_match();
+
+  if (!ee) return 1;
+  evas_output_size_get(ee->evas, &w, &h);
+  evas_damage_rectangle_add(ee->evas, 0, 0, w, h);
+
+  return 0;
+}
+
+static int
+_ecore_evas_idle_enter(void *data __UNUSED__)
+{
+  Ecore_Evas  *ee;
+  double       t1 = 0.;
+  double       t2 = 0.;
+
+  DBG("Idle enter");
+
+  EINA_INLIST_FOREACH(ecore_evases, ee)
+    {
+      if (ee->visible)
+       evas_render(ee->evas);
+      else
+       evas_norender(ee->evas);
+    }
+
+  return 1;
+}
+
+static int
+_ecore_evas_cocoa_event(void *data)
+{
+  //  ecore_cocoa_feed_events();
+
+  DBG("Cocoa Event");
+
+  return 1;
+}
+
+static int
+_ecore_evas_cocoa_init(void)
+{
+  DBG("Cocoa Init");
+  _ecore_evas_init_count++;
+  if (_ecore_evas_init_count > 1) 
+    return _ecore_evas_init_count;
+
+  ecore_evas_event_handlers[0] = ecore_event_handler_add(ECORE_COCOA_EVENT_GOT_FOCUS, _ecore_evas_cocoa_event_got_focus, NULL);
+  ecore_evas_event_handlers[1] = ecore_event_handler_add(ECORE_COCOA_EVENT_LOST_FOCUS, _ecore_evas_cocoa_event_lost_focus, NULL);
+  ecore_evas_event_handlers[2] = ecore_event_handler_add(ECORE_COCOA_EVENT_RESIZE, _ecore_evas_cocoa_event_video_resize, NULL);
+  ecore_evas_event_handlers[3] = ecore_event_handler_add(ECORE_COCOA_EVENT_EXPOSE, _ecore_evas_cocoa_event_video_expose, NULL);
+
+  ecore_event_evas_init();  
+  return _ecore_evas_init_count;
+}
+
+static int
+_ecore_evas_cocoa_shutdown(void)
+{
+  DBG("Cocoa SHutodwn");
+  _ecore_evas_init_count--;
+  if (_ecore_evas_init_count == 0)
+    {
+      int i;
+
+      while (ecore_evases) _ecore_evas_free(ecore_evases);
+
+      for (i = 0; i < sizeof (ecore_evas_event_handlers) / sizeof (Ecore_Event_Handler*); i++)
+       ecore_event_handler_del(ecore_evas_event_handlers[i]);
+      ecore_event_evas_shutdown();
+      ecore_idle_enterer_del(ecore_evas_idle_enterer);
+      ecore_evas_idle_enterer = NULL;
+      ecore_poller_del(ecore_evas_event);
+      ecore_evas_event = NULL;
+
+      ecore_event_evas_shutdown();
+    }
+  if (_ecore_evas_init_count < 0) _ecore_evas_init_count = 0;
+  return _ecore_evas_init_count;
+}
+
+static void
+_ecore_evas_cocoa_free(Ecore_Evas *ee)
+{
+  DBG("Cocoa Free");
+  ecore_evases = (Ecore_Evas *) eina_inlist_remove(EINA_INLIST_GET(ecore_evases), EINA_INLIST_GET(ee));
+  ecore_event_window_unregister(0);
+  _ecore_evas_cocoa_shutdown();
+  ecore_cocoa_shutdown();
+}
+
+static void
+_ecore_evas_resize(Ecore_Evas *ee, int w, int h)
+{
+  DBG("Resize");
+  if ((w == ee->w) && (h == ee->h)) return;
+  ee->w = w;
+  ee->h = h;
+
+  printf("Ecore_Evas Resize %d %d\n", w, h);
+
+  ecore_cocoa_window_resize(ee->prop.window, w, h);
+
+  evas_output_size_set(ee->evas, ee->w, ee->h);
+  evas_output_viewport_set(ee->evas, 0, 0, ee->w, ee->h);
+  evas_damage_rectangle_add(ee->evas, 0, 0, ee->w, ee->h);
+
+  if (ee->func.fn_resize) ee->func.fn_resize(ee);
+}
+
+static void
+_ecore_evas_move_resize(Ecore_Evas *ee, int x, int y, int w, int h)
+{
+  DBG("Move Resize");
+  if ((w == ee->w) && (h == ee->h)) return;
+  ee->w = w;
+  ee->h = h;
+
+  ecore_cocoa_window_move_resize(ee->prop.window, x, y, w, h);
+
+  evas_output_size_set(ee->evas, ee->w, ee->h);
+  evas_output_viewport_set(ee->evas, 0, 0, ee->w, ee->h);
+  evas_damage_rectangle_add(ee->evas, 0, 0, ee->w, ee->h);
+
+  if (ee->func.fn_resize) ee->func.fn_resize(ee);
+}
+
+
+static void
+_ecore_evas_show(Ecore_Evas *ee, int x, int y, int w, int h)
+{
+  DBG("Show");
+   ee->should_be_visible = 1;
+   if (ee->prop.avoid_damage)
+     _ecore_evas_cocoa_render(ee);
+
+   ecore_cocoa_window_show(ee->prop.window);
+   evas_damage_rectangle_add(ee->evas, 0, 0, ee->w, ee->h);
+}
+
+
+static void
+_ecore_evas_hide(Ecore_Evas *ee, int x, int y, int w, int h)
+{
+  DBG("Hide");
+
+   ecore_cocoa_window_hide(ee->prop.window);
+   ee->should_be_visible = 0;
+}
+
+static void
+_ecore_evas_title_set(Ecore_Evas *ee, const char *title)
+{
+   INF("ecore evas title set");
+
+   if (ee->prop.title) free(ee->prop.title);
+   ee->prop.title = NULL;
+   if (title) ee->prop.title = strdup(title);
+   ecore_cocoa_window_title_set(ee->prop.window,
+                                ee->prop.title);
+}
+
+static void
+_ecore_evas_object_cursor_del(void *data, Evas *e, Evas_Object *obj, void *event_info)
+{
+  Ecore_Evas *ee;
+
+  DBG("Cursor DEL");
+
+  ee = data;
+  if (ee)
+    ee->prop.cursor.object = NULL;
+}
+
+static void
+_ecore_evas_object_cursor_set(Ecore_Evas *ee, Evas_Object *obj, int layer, int hot_x, int hot_y)
+{
+  int x, y;
+  DBG("Cursor Set");
+  if (ee->prop.cursor.object) evas_object_del(ee->prop.cursor.object);
+
+  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;
+      return;
+    }
+
+  ee->prop.cursor.object = obj;
+  ee->prop.cursor.layer = layer;
+  ee->prop.cursor.hot.x = hot_x;
+  ee->prop.cursor.hot.y = hot_y;
+
+  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);
+
+  evas_object_pass_events_set(ee->prop.cursor.object, 1);
+
+  if (evas_pointer_inside_get(ee->evas))
+    evas_object_show(ee->prop.cursor.object);
+
+  evas_object_event_callback_add(obj, EVAS_CALLBACK_DEL, _ecore_evas_object_cursor_del, ee);
+}
+
+static int
+_ecore_evas_engine_cocoa_init(Ecore_Evas *ee)
+{
+   Evas_Engine_Info_GL_Cocoa *einfo;
+   const char                *driver;
+   int                        rmethod;
+
+   DBG("Cocoa Init");
+
+   driver = "gl_cocoa";
+
+   rmethod = evas_render_method_lookup(driver);
+   if (!rmethod)
+     return 0;
+
+   ee->driver = driver;
+   evas_output_method_set(ee->evas, rmethod);
+
+   einfo = (Evas_Engine_Info_GL_Cocoa *)evas_engine_info_get(ee->evas);
+   if (einfo)
+     {
+        /* FIXME: REDRAW_DEBUG missing for now */
+        einfo->window = ee->prop.window;
+        //einfo->info.depth = ecore_win32_screen_depth_get();
+        //einfo->info.rotation = 0;
+        if (!evas_engine_info_set(ee->evas, (Evas_Engine_Info *)einfo))
+          {
+             ERR("evas_engine_info_set() for engine '%s' failed.", ee->driver);
+             return 0;
+          }
+       ecore_cocoa_window_view_set(einfo->window, einfo->view);
+     }
+   else
+     {
+        ERR("evas_engine_info_set() init engine '%s' failed.", ee->driver);
+        return 0;
+     }
+
+   return 1;
+}
+
+static Ecore_Evas_Engine_Func _ecore_cocoa_engine_func =
+  {
+    _ecore_evas_cocoa_free,
+    NULL,
+    NULL,
+    NULL,
+    NULL,
+    NULL,
+    NULL,
+    NULL,
+    NULL,
+    NULL,
+    NULL,
+    NULL,
+    NULL,
+    NULL,
+    NULL,
+    NULL, //move
+    NULL,
+    _ecore_evas_resize,
+    _ecore_evas_move_resize,
+    NULL, //rotation
+    NULL, //shaped
+    _ecore_evas_show,
+    _ecore_evas_hide,
+    NULL, //raise
+    NULL, //lower
+    NULL, //activate
+    _ecore_evas_title_set,
+    NULL,
+    NULL,
+    NULL,
+    NULL,
+    NULL,
+    _ecore_evas_object_cursor_set,
+    NULL,
+    NULL,
+    NULL,
+    NULL,
+    NULL,
+    NULL,
+    NULL,
+    NULL,
+    NULL,
+    NULL,
+    NULL,
+    NULL,
+    NULL, //transparent    
+    NULL, // render
+    NULL
+  };
+#endif
+
+EAPI Ecore_Evas *
+ecore_evas_cocoa_new(Ecore_Cocoa_Window *parent, int x, int y, int w, int h)
+{
+#ifdef BUILD_ECORE_EVAS_OPENGL_COCOA
+  Evas_Engine_Info_GL_Cocoa *einfo;
+  Ecore_Evas           *ee;
+  int                  rmethod;
+
+  DBG("Cocoa new");
+
+  if (!ecore_cocoa_init())
+    return NULL;
+
+  ee = calloc(1, sizeof(Ecore_Evas));
+  if (!ee)
+    goto shutdown_ecore_cocoa;
+
+  ECORE_MAGIC_SET(ee, ECORE_MAGIC_EVAS);
+
+  _ecore_evas_cocoa_init();
+
+  ee->engine.func = (Ecore_Evas_Engine_Func *)&_ecore_cocoa_engine_func;
+
+  if (w < 1) w = 1;
+  if (h < 1) h = 1;
+  ee->visible = 1;
+  ee->x = x;
+  ee->y = y;
+  ee->w = w;
+  ee->h = h;
+  ee->req.x = ee->x;
+  ee->req.y = ee->y;
+  ee->req.w = ee->w;
+  ee->req.h = ee->h;
+
+  ee->semi_sync = 1;
+
+
+  ee->prop.max.w = 32767;
+  ee->prop.max.h = 32767;
+  ee->prop.layer = 4;
+  ee->prop.request_pos = 0;
+  ee->prop.sticky = 0;
+  ee->prop.window = 0;
+
+  printf("Create New Evas\n");
+
+  ee->evas = evas_new();
+  
+  if (!ee->evas)
+    goto free_name;
+
+  evas_data_attach_set(ee->evas, ee);
+  evas_output_method_set(ee->evas, rmethod);
+  evas_output_size_set(ee->evas, w, h);
+  evas_output_viewport_set(ee->evas, 0, 0, w, h);
+
+  printf("Create New Cocoa Window\n");
+  ee->prop.window = (Ecore_Cocoa_Window*)ecore_cocoa_window_new(x, y, w, h);
+  printf("Window Created %p\n", ee->prop.window);
+  if (!ee->prop.window)
+    {
+      _ecore_evas_cocoa_shutdown();
+      free(ee);
+      return NULL;
+    }
+
+  printf("Init Evas engine cocoa\n");
+  if (!_ecore_evas_engine_cocoa_init(ee))
+    {
+      _ecore_evas_cocoa_shutdown();
+      free(ee);
+      return NULL;
+    }
+  
+  
+  ee->engine.func->fn_render = _ecore_evas_cocoa_render;
+  _ecore_evas_register(ee);
+  ecore_event_window_register(0, ee, ee->evas, NULL, NULL, NULL, NULL);
+  
+  printf("Ecore Evas returned : %p\n", ee);
+  return ee;
+  
+ free_window:
+  /* FIXME: free window here */
+ free_evas:
+  free(ee->evas);
+ free_name:
+  free(ee->name);
+ free_ee:
+  _ecore_evas_cocoa_shutdown();
+  free(ee);
+ shutdown_ecore_cocoa:
+  ecore_cocoa_shutdown();
+  
+  return NULL;
+#else
+  ERR("OUTCH size=%dx%d!", w, h);
+  return NULL;
+#endif
+}
index 112f4a2..457f9e9 100644 (file)
@@ -286,6 +286,8 @@ _ecore_evas_directfb_move(Ecore_Evas *ee, int x, int y)
 static void
 _ecore_evas_directfb_resize(Ecore_Evas *ee, int w, int h)
 {
+   ee->req.w = w;
+   ee->req.h = h;
    if ((w == ee->w) && (h == ee->h)) return;
    ecore_directfb_window_resize(ee->engine.directfb.window, w, h);
    ee->w = w;
@@ -402,6 +404,8 @@ _ecore_evas_directfb_fullscreen_set(Ecore_Evas *ee, int on)
         resized = 1;
         ee->w = w;
         ee->h = h;
+        ee->req.w = ee->w;
+        ee->req.h = ee->h;
         if ((ee->rotation == 90) || (ee->rotation == 270))
           {
              evas_output_size_set(ee->evas, ee->h, ee->w);
index 26081a0..e19fb05 100644 (file)
@@ -232,6 +232,7 @@ _ecore_evas_ews_resize_internal(Ecore_Evas *ee, int w, int h)
    einfo->info.alpha_threshold = 0;
    einfo->info.func.new_update_region = NULL;
    einfo->info.func.free_update_region = NULL;
+   evas_object_image_data_set(ee->engine.ews.image, pixels);
    if (!evas_engine_info_set(ee->evas, (Evas_Engine_Info *)einfo))
      {
         ERR("evas_engine_info_set() for engine '%s' failed.", ee->driver);
@@ -586,11 +587,12 @@ _ecore_evas_ews_transparent_set(Ecore_Evas *ee, int val)
 static int
 _ecore_evas_ews_render(Ecore_Evas *ee)
 {
-   Eina_List *updates, *l, *ll;
+   Eina_List *updates = NULL, *l, *ll;
    Ecore_Evas *ee2;
    Eina_Rectangle *r;
    int w, h, rend = 0;
-
+   void *pixels;
+   
    EINA_LIST_FOREACH(ee->sub_ecore_evas, ll, ee2)
      {
         if (ee2->func.fn_pre_render) ee2->func.fn_pre_render(ee2);
@@ -602,8 +604,13 @@ _ecore_evas_ews_render(Ecore_Evas *ee)
    if ((w != ee->w) || (h != ee->h))
      ecore_evas_resize(ee, w, h);
 
-   updates = evas_render_updates(ee->evas);
-
+   pixels = evas_object_image_data_get(ee->engine.ews.image, 1);
+   if (pixels)
+     {
+        updates = evas_render_updates(ee->evas);
+     }
+   evas_object_image_data_set(ee->engine.ews.image, pixels);
+   
    EINA_LIST_FOREACH(updates, l, r)
      evas_object_image_data_update_add(ee->engine.ews.image,
                                        r->x, r->y, r->w, r->h);
@@ -1089,9 +1096,14 @@ ecore_evas_ews_new(int x, int y, int w, int h)
    ee = calloc(1, sizeof(Ecore_Evas));
    if (!ee) return NULL;
 
+   if (w < 1) w = 1;
+   if (h < 1) h = 1;
+
    o = evas_object_image_add(_ews_ee->evas);
    evas_object_image_content_hint_set(o, EVAS_IMAGE_CONTENT_HINT_DYNAMIC);
    evas_object_image_colorspace_set(o, EVAS_COLORSPACE_ARGB8888);
+   evas_object_image_size_set(o, w, h);
+   evas_object_image_alpha_set(o, 1);
 
    ECORE_MAGIC_SET(ee, ECORE_MAGIC_EVAS);
 
@@ -1099,9 +1111,6 @@ ecore_evas_ews_new(int x, int y, int w, int h)
 
    ee->driver = EWS_ENGINE_NAME;
 
-   if (w < 1) w = 1;
-   if (h < 1) h = 1;
-
    ee->x = 0;
    ee->y = 0;
    ee->w = w;
@@ -1124,8 +1133,6 @@ ecore_evas_ews_new(int x, int y, int w, int h)
 
    ee->engine.ews.image = o;
    evas_object_data_set(ee->engine.ews.image, "Ecore_Evas", ee);
-   evas_object_image_size_set(o, ee->w, ee->h);
-   evas_object_image_alpha_set(o, 1);
    evas_object_event_callback_add(ee->engine.ews.image,
                                   EVAS_CALLBACK_MOUSE_IN,
                                   _ecore_evas_ews_cb_mouse_in, ee);
@@ -1186,6 +1193,7 @@ ecore_evas_ews_new(int x, int y, int w, int h)
         einfo->info.alpha_threshold = 0;
         einfo->info.func.new_update_region = NULL;
         einfo->info.func.free_update_region = NULL;
+        evas_object_image_data_set(o, pixels);
         if (!evas_engine_info_set(ee->evas, (Evas_Engine_Info *)einfo))
           {
              ERR("evas_engine_info_set() for engine '%s' failed.", ee->driver);
index a798ef2..943ef7f 100644 (file)
@@ -20,10 +20,10 @@ static int _ecore_evas_init_count = 0;
 
 static char *ecore_evas_default_display = "0";
 static Eina_List *ecore_evas_input_devices = NULL;
-static Ecore_Event_Handler *ecore_evas_event_handlers[6] = {NULL, NULL, NULL, NULL, NULL, NULL};
+static Ecore_Event_Handler *ecore_evas_event_handlers[4] = {NULL, NULL, NULL, NULL};
 
 static void
-_ecore_evas_mouse_move_process_fb(Ecore_Evas *ee, int x, int y, unsigned int timestamp)
+_ecore_evas_mouse_move_process_fb(Ecore_Evas *ee, int x, int y)
 {
    int fbw, fbh;
 
@@ -50,14 +50,6 @@ _ecore_evas_mouse_move_process_fb(Ecore_Evas *ee, int x, int y, unsigned int tim
                            y - ee->prop.cursor.hot.x,
                            (fbw - ee->w) + ee->w - x - 1 - ee->prop.cursor.hot.y);
      }
-   if (ee->rotation == 0)
-     evas_event_feed_mouse_move(ee->evas, x, y, timestamp, NULL);
-   else if (ee->rotation == 90)
-     evas_event_feed_mouse_move(ee->evas, (fbh - ee->h) + ee->h - y - 1, x, timestamp, NULL);
-   else if (ee->rotation == 180)
-     evas_event_feed_mouse_move(ee->evas, (fbw - ee->w) + ee->w - x - 1, (fbh - ee->h) + ee->h - y - 1, timestamp, NULL);
-   else if (ee->rotation == 270)
-     evas_event_feed_mouse_move(ee->evas, y, (fbw - ee->w) + ee->w - x - 1, timestamp, NULL);
 }
 
 static Ecore_Evas *fb_ee = NULL;
@@ -103,92 +95,57 @@ _ecore_evas_fb_gain(void *data __UNUSED__)
 }
 
 static Eina_Bool
-_ecore_evas_event_key_down(void *data __UNUSED__, int type __UNUSED__, void *event)
-{
-   Ecore_Evas *ee;
-   Ecore_Fb_Event_Key_Down *e;
-
-   e = event;
-   ee = _ecore_evas_fb_match();
-   if (!ee) return EINA_TRUE; /* pass on event */
-   evas_event_feed_key_down(ee->evas, e->keyname, e->keysymbol, e->key_compose, NULL, (unsigned int)((unsigned long long)(ecore_time_get() * 1000.0) & 0xffffffff), NULL);
-   return EINA_FALSE; /* dont pass it on */
-}
-
-static Eina_Bool
-_ecore_evas_event_key_up(void *data __UNUSED__, int type __UNUSED__, void *event)
-{
-   Ecore_Evas *ee;
-   Ecore_Fb_Event_Key_Up *e;
-
-   e = event;
-   ee = _ecore_evas_fb_match();
-   if (!ee) return EINA_TRUE; /* pass on event */
-   evas_event_feed_key_up(ee->evas, e->keyname, e->keysymbol, e->key_compose, NULL, (unsigned int)((unsigned long long)(ecore_time_get() * 1000.0) & 0xffffffff), NULL);
-   return EINA_FALSE; /* dont pass it on */
-}
-
-static Eina_Bool
 _ecore_evas_event_mouse_button_down(void *data __UNUSED__, int type __UNUSED__, void *event)
 {
    Ecore_Evas *ee;
-   Ecore_Fb_Event_Mouse_Button_Down *e;
-   Evas_Button_Flags flags = EVAS_BUTTON_NONE;
+   Ecore_Event_Mouse_Button *e;
 
    e = event;
    ee = _ecore_evas_fb_match();
    if (!ee) return EINA_TRUE; /* pass on event */
-   _ecore_evas_mouse_move_process_fb(ee, e->x, e->y, (unsigned int)((unsigned long long)(ecore_time_get() * 1000.0) & 0xffffffff));
-   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, (unsigned int)((unsigned long long)(ecore_time_get() * 1000.0) & 0xffffffff), NULL);
-   return EINA_FALSE; /* dont pass it on */
+   _ecore_evas_mouse_move_process_fb(ee, e->x, e->y);
+   return EINA_TRUE; /* dont pass it on */
 }
 
 static Eina_Bool
 _ecore_evas_event_mouse_button_up(void *data __UNUSED__, int type __UNUSED__, void *event)
 {
    Ecore_Evas *ee;
-   Ecore_Fb_Event_Mouse_Button_Up *e;
+   Ecore_Event_Mouse_Button *e;
 
    e = event;
    ee = _ecore_evas_fb_match();
    if (!ee) return EINA_TRUE; /* pass on event */
-   _ecore_evas_mouse_move_process_fb(ee, e->x, e->y, (unsigned int)((unsigned long long)(ecore_time_get() * 1000.0) & 0xffffffff));
-   evas_event_feed_mouse_up(ee->evas, e->button, EVAS_BUTTON_NONE, (unsigned int)((unsigned long long)(ecore_time_get() * 1000.0) & 0xffffffff), NULL);
-   return EINA_FALSE; /* dont pass it on */
+   _ecore_evas_mouse_move_process_fb(ee, e->x, e->y);
+   return EINA_TRUE; /* dont pass it on */
 }
 
 static Eina_Bool
 _ecore_evas_event_mouse_move(void *data __UNUSED__, int type __UNUSED__, void *event)
 {
    Ecore_Evas *ee;
-   Ecore_Fb_Event_Mouse_Move *e;
+   Ecore_Event_Mouse_Move *e;
 
    e = event;
    ee = _ecore_evas_fb_match();
    if (!ee) return EINA_TRUE; /* pass on event */
-   _ecore_evas_mouse_move_process_fb(ee, e->x, e->y, (unsigned int)((unsigned long long)(ecore_time_get() * 1000.0) & 0xffffffff));
-   return EINA_FALSE; /* dont pass it on */
+   _ecore_evas_mouse_move_process_fb(ee, e->x, e->y);
+   return EINA_TRUE; /* dont pass it on */
 }
 
 static Eina_Bool
 _ecore_evas_event_mouse_wheel(void *data __UNUSED__, int type __UNUSED__, void *event)
 {
    Ecore_Evas *ee;
-   Ecore_Fb_Event_Mouse_Wheel *e;
-   unsigned long long event_time;
+   Ecore_Event_Mouse_Wheel *e;
 
    e = event;
    ee = _ecore_evas_fb_match();
    if (!ee) return EINA_TRUE; /* pass on event */
-   event_time = (unsigned int)((unsigned long long)(ecore_time_get() * 1000.0) & 0xffffffff);
-   _ecore_evas_mouse_move_process_fb(ee, e->x, e->y, event_time);
-   evas_event_feed_mouse_wheel(ee->evas, e->direction, e->wheel, event_time, NULL);
-   return EINA_FALSE; /* dont pass it on */
+   _ecore_evas_mouse_move_process_fb(ee, e->x, e->y);
+   return EINA_TRUE; /* dont pass it on */
 }
 
-/* XXX: unused
 static int
 _ecore_evas_fb_render(Ecore_Evas *ee)
 {
@@ -223,15 +180,13 @@ _ecore_evas_fb_render(Ecore_Evas *ee)
      evas_norender(ee->evas);
    return rend;
 }
-*/
 
 static int
-_ecore_evas_fb_init(int w, int h)
+_ecore_evas_fb_init(Ecore_Evas *ee, int w, int h)
 {
    Ecore_Fb_Input_Device *device;
    Ecore_Fb_Input_Device_Cap caps;
    int mouse_handled = 0;
-   int keyboard_handled = 0;
 
    DIR *input_dir;
    struct dirent *input_entry;
@@ -239,6 +194,8 @@ _ecore_evas_fb_init(int w, int h)
    _ecore_evas_init_count++;
    if (_ecore_evas_init_count > 1) return _ecore_evas_init_count;
 
+   ecore_event_evas_init();
+
    /* register all input devices */
    input_dir = opendir("/dev/input/");
    if (!input_dir) return _ecore_evas_init_count;
@@ -251,7 +208,7 @@ _ecore_evas_fb_init(int w, int h)
           continue;
 
         snprintf(device_path, 256, "/dev/input/%s", input_entry->d_name);
-        if (!(device = ecore_fb_input_device_open(device_path)))
+        if (!(device = ecore_fb_input_device_open(ee, device_path)))
           continue;
 
         caps = ecore_fb_input_device_cap_get(device);
@@ -268,10 +225,10 @@ _ecore_evas_fb_init(int w, int h)
              ecore_evas_input_devices = eina_list_append(ecore_evas_input_devices, device);
              if (!mouse_handled)
                {
-                  ecore_evas_event_handlers[2]  = ecore_event_handler_add(ECORE_FB_EVENT_MOUSE_BUTTON_DOWN, _ecore_evas_event_mouse_button_down, NULL);
-                  ecore_evas_event_handlers[3]  = ecore_event_handler_add(ECORE_FB_EVENT_MOUSE_BUTTON_UP, _ecore_evas_event_mouse_button_up, NULL);
-                  ecore_evas_event_handlers[4]  = ecore_event_handler_add(ECORE_FB_EVENT_MOUSE_MOVE, _ecore_evas_event_mouse_move, NULL);
-                  ecore_evas_event_handlers[5]  = ecore_event_handler_add(ECORE_FB_EVENT_MOUSE_WHEEL, _ecore_evas_event_mouse_wheel, NULL);
+                  ecore_evas_event_handlers[0]  = ecore_event_handler_add(ECORE_EVENT_MOUSE_BUTTON_DOWN, _ecore_evas_event_mouse_button_down, NULL);
+                  ecore_evas_event_handlers[1]  = ecore_event_handler_add(ECORE_EVENT_MOUSE_BUTTON_UP, _ecore_evas_event_mouse_button_up, NULL);
+                  ecore_evas_event_handlers[2]  = ecore_event_handler_add(ECORE_EVENT_MOUSE_MOVE, _ecore_evas_event_mouse_move, NULL);
+                  ecore_evas_event_handlers[3]  = ecore_event_handler_add(ECORE_EVENT_MOUSE_WHEEL, _ecore_evas_event_mouse_wheel, NULL);
                   mouse_handled = 1;
                }
           }
@@ -280,12 +237,6 @@ _ecore_evas_fb_init(int w, int h)
           {
              ecore_fb_input_device_listen(device,1);
              ecore_evas_input_devices = eina_list_append(ecore_evas_input_devices, device);
-             if (!keyboard_handled)
-               {
-                  ecore_evas_event_handlers[0]  = ecore_event_handler_add(ECORE_FB_EVENT_KEY_DOWN, _ecore_evas_event_key_down, NULL);
-                  ecore_evas_event_handlers[1]  = ecore_event_handler_add(ECORE_FB_EVENT_KEY_UP, _ecore_evas_event_key_up, NULL);
-                  keyboard_handled = 1;
-               }
           }
      }
    closedir(input_dir);
@@ -294,9 +245,9 @@ _ecore_evas_fb_init(int w, int h)
      {
         if (ecore_fb_ts_init())
           {
-             ecore_evas_event_handlers[2]  = ecore_event_handler_add(ECORE_FB_EVENT_MOUSE_BUTTON_DOWN, _ecore_evas_event_mouse_button_down, NULL);
-             ecore_evas_event_handlers[3]  = ecore_event_handler_add(ECORE_FB_EVENT_MOUSE_BUTTON_UP, _ecore_evas_event_mouse_button_up, NULL);
-             ecore_evas_event_handlers[4]  = ecore_event_handler_add(ECORE_FB_EVENT_MOUSE_MOVE, _ecore_evas_event_mouse_move, NULL);
+             ecore_evas_event_handlers[0]  = ecore_event_handler_add(ECORE_EVENT_MOUSE_BUTTON_DOWN, _ecore_evas_event_mouse_button_down, NULL);
+             ecore_evas_event_handlers[1]  = ecore_event_handler_add(ECORE_EVENT_MOUSE_BUTTON_UP, _ecore_evas_event_mouse_button_up, NULL);
+             ecore_evas_event_handlers[2]  = ecore_event_handler_add(ECORE_EVENT_MOUSE_MOVE, _ecore_evas_event_mouse_move, NULL);
              mouse_handled = 1;
           }
      }
@@ -306,6 +257,7 @@ _ecore_evas_fb_init(int w, int h)
 static void
 _ecore_evas_fb_free(Ecore_Evas *ee)
 {
+   ecore_evas_input_event_unregister(ee);
    if (fb_ee == ee) fb_ee = NULL;
    _ecore_evas_fb_shutdown();
    ecore_fb_shutdown();
@@ -314,6 +266,8 @@ _ecore_evas_fb_free(Ecore_Evas *ee)
 static void
 _ecore_evas_resize(Ecore_Evas *ee, int w, int h)
 {
+   ee->req.w = w;
+   ee->req.h = h;
    if ((w == ee->w) && (h == ee->h)) return;
    ee->w = w;
    ee->h = h;
@@ -335,6 +289,8 @@ _ecore_evas_resize(Ecore_Evas *ee, int w, int h)
 static void
 _ecore_evas_move_resize(Ecore_Evas *ee, int x __UNUSED__, int y __UNUSED__, int w, int h)
 {
+   ee->req.w = w;
+   ee->req.h = h;
    if ((w == ee->w) && (h == ee->h)) return;
    ee->w = w;
    ee->h = h;
@@ -379,6 +335,8 @@ _ecore_evas_rotation_set(Ecore_Evas *ee, int rotation, int resize __UNUSED__)
              tmp = ee->w;
              ee->w = ee->h;
              ee->h = tmp;
+             ee->req.w = ee->w;
+             ee->req.h = ee->h;
           }
         else
           {
@@ -408,7 +366,7 @@ _ecore_evas_rotation_set(Ecore_Evas *ee, int rotation, int resize __UNUSED__)
      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);
-   _ecore_evas_mouse_move_process_fb(ee, ee->mouse.x, ee->mouse.y, (unsigned int)((unsigned long long)(ecore_time_get() * 1000.0) & 0xffffffff));
+   _ecore_evas_mouse_move_process_fb(ee, ee->mouse.x, ee->mouse.y);
    if (ee->func.fn_resize) ee->func.fn_resize(ee);
 }
 
@@ -480,6 +438,8 @@ _ecore_evas_fullscreen_set(Ecore_Evas *ee, int on)
         if ((w != ee->w) || (h != ee->h)) resized = 1;
         ee->w = w;
         ee->h = h;
+        ee->req.w = ee->w;
+        ee->req.h = ee->h;
         evas_output_size_set(ee->evas, ee->w, ee->h);
         evas_output_viewport_set(ee->evas, 0, 0, ee->w, ee->h);
         evas_damage_rectangle_add(ee->evas, 0, 0, ee->w, ee->h);
@@ -489,6 +449,8 @@ _ecore_evas_fullscreen_set(Ecore_Evas *ee, int on)
         if ((ee->engine.fb.real_w != ee->w) || (ee->engine.fb.real_h != ee->h)) resized = 1;
         ee->w = ee->engine.fb.real_w;
         ee->h = ee->engine.fb.real_h;
+        ee->req.w = ee->w;
+        ee->req.h = ee->h;
         evas_output_size_set(ee->evas, ee->w, ee->h);
         evas_output_viewport_set(ee->evas, 0, 0, ee->w, ee->h);
         evas_damage_rectangle_add(ee->evas, 0, 0, ee->w, ee->h);
@@ -511,12 +473,13 @@ _ecore_evas_fb_shutdown(void)
      {
         int i;
 
-        for (i = 0; i < 6; i++)
+        for (i = 0; i < 4; i++)
           {
              if (ecore_evas_event_handlers[i])
                ecore_event_handler_del(ecore_evas_event_handlers[i]);
           }
         ecore_fb_ts_shutdown();
+        ecore_event_evas_shutdown();
      }
    if (_ecore_evas_init_count < 0) _ecore_evas_init_count = 0;
    return _ecore_evas_init_count;
@@ -604,7 +567,7 @@ ecore_evas_fb_new(const char *disp_name, int rotation, int w, int h)
 
    ECORE_MAGIC_SET(ee, ECORE_MAGIC_EVAS);
 
-   _ecore_evas_fb_init(w, h);
+   _ecore_evas_fb_init(ee, w, h);
 
    ee->engine.func = (Ecore_Evas_Engine_Func *)&_ecore_fb_engine_func;
 
@@ -617,6 +580,8 @@ ecore_evas_fb_new(const char *disp_name, int rotation, int w, int h)
    ee->visible = 1;
    ee->w = w;
    ee->h = h;
+   ee->req.w = ee->w;
+   ee->req.h = ee->h;
 
    ee->prop.max.w = 0;
    ee->prop.max.h = 0;
@@ -665,17 +630,10 @@ ecore_evas_fb_new(const char *disp_name, int rotation, int w, int h)
         ecore_evas_free(ee);
         return NULL;
      }
-   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");
-
-   ee->engine.func->fn_render = _ecore_evas_buffer_render;
+
+   ecore_evas_input_event_register(ee);
+
+   ee->engine.func->fn_render = _ecore_evas_fb_render;
    _ecore_evas_register(ee);
    fb_ee = ee;
 
index 62f43f3..1666003 100644 (file)
 # include <Evas_Engine_Software_16_WinCE.h>
 #endif
 
+#ifdef BUILD_ECORE_EVAS_GL_COCOA
+# include "Ecore_Cocoa.h"
+# include <Evas_Engine_Gl_Cocoa.h>
+#endif
+
 /**
    Log domain macros and variable
  **/
index 12a0cc5..95b6d22 100644 (file)
@@ -122,7 +122,7 @@ _ecore_evas_obj_callback_resize(void *data, Evas *e __UNUSED__, Evas_Object *obj
 
    evas_object_geometry_get(obj, NULL, NULL, &ow, &oh);
    ecore_evas_geometry_get(ee, NULL, NULL, &w, &h);
-   /*if ((w != ow) || (h != oh)) /* avoid recursion on ecore_evas_resize side */
+   /*if ((w != ow) || (h != oh))*/ /* avoid recursion on ecore_evas_resize side */
      ecore_evas_resize(ee, ow, oh);
 }
 
index 216e85d..4011c8b 100644 (file)
@@ -648,6 +648,8 @@ _ecore_evas_wince_fullscreen_set(Ecore_Evas *ee, int on)
       ecore_wince_window_fullscreen_set((Ecore_WinCE_Window *)ee->prop.window, on);
       ee->w = GetSystemMetrics(SM_CXSCREEN);
       ee->h = GetSystemMetrics(SM_CYSCREEN);
+      ee->req.w = ee->w;
+      ee->req.h = ee->h;
       evas_output_size_set(ee->evas, ee->w, ee->h);
       evas_output_viewport_set(ee->evas, 0, 0, ee->w, ee->h);
    }
@@ -660,6 +662,8 @@ _ecore_evas_wince_fullscreen_set(Ecore_Evas *ee, int on)
       ecore_wince_window_size_get((Ecore_WinCE_Window *)ee->prop.window, &w, &h);
       ee->w = w;
       ee->h = h;
+      ee->req.w = ee->w;
+      ee->req.h = ee->h;
       evas_output_size_set(ee->evas, ee->w, ee->h);
       evas_output_viewport_set(ee->evas, 0, 0, ee->w, ee->h);
 /*       ecore_win32_window_shape_set(window, */
index 01120ff..9b12106 100644 (file)
@@ -918,7 +918,6 @@ _ecore_evas_x_event_window_configure(void *data __UNUSED__, int type __UNUSED__,
    if (ee->engine.x.direct_resize) return ECORE_CALLBACK_PASS_ON;
 
    ee->engine.x.configure_coming = 0;
-
    if ((e->from_wm) || (ee->prop.override))
      {
         if ((ee->x != e->x) || (ee->y != e->y))
@@ -1376,7 +1375,7 @@ _ecore_evas_x_resize(Ecore_Evas *ee, int w, int h)
              if (ee->func.fn_resize) ee->func.fn_resize(ee);
           }
      }
-   else if (((ee->w != w) || (ee->h != h)) ||
+   else if (((ee->w != w) || (ee->h != h)) || 
             (ee->engine.x.configure_coming))
      {
         ee->engine.x.configure_coming = 1;
@@ -1440,7 +1439,7 @@ _ecore_evas_x_move_resize(Ecore_Evas *ee, int x, int y, int w, int h)
                }
           }
      }
-   else if (((ee->w != w) || (ee->h != h) || (ee->x != x) || (ee->y != y)) ||
+   else if (((ee->w != w) || (ee->h != h) || (ee->x != x) || (ee->y != y)) || 
             (ee->engine.x.configure_coming))
      {
         ee->engine.x.configure_coming = 1;
@@ -3228,8 +3227,13 @@ ecore_evas_gl_x11_options_new(const char *disp_name, Ecore_X_Window parent,
    ee->engine.func = (Ecore_Evas_Engine_Func *)&_ecore_x_engine_func;
 
    ee->driver = "opengl_x11";
+#if 1
    ee->semi_sync = 0; // gl engine doesn't need to sync - its whole swaps
+#else
+   if (!getenv("ECORE_EVAS_COMP_NOSEMISYNC"))
+      ee->semi_sync = 1; // gl engine doesn't need to sync - its whole swaps
 //   ee->no_comp_sync = 1; // gl engine doesn't need to sync - its whole swaps
+#endif
    if (disp_name) ee->name = strdup(disp_name);
 
    if (w < 1) w = 1;
index 416ab9d..37b9e1e 100644 (file)
@@ -65,101 +65,12 @@ enum _Ecore_Fb_Input_Device_Cap
  */
 typedef enum   _Ecore_Fb_Input_Device_Cap Ecore_Fb_Input_Device_Cap;
 
-EAPI extern int ECORE_FB_EVENT_KEY_DOWN; /**< FB Key Down event */
-EAPI extern int ECORE_FB_EVENT_KEY_UP; /**< FB Key Up event */
-EAPI extern int ECORE_FB_EVENT_MOUSE_BUTTON_DOWN; /**< FB Mouse Down event */
-EAPI extern int ECORE_FB_EVENT_MOUSE_BUTTON_UP; /**< FB Mouse Up event */
-EAPI extern int ECORE_FB_EVENT_MOUSE_MOVE; /**< FB Mouse Move event */
-EAPI extern int ECORE_FB_EVENT_MOUSE_WHEEL; /**< FB Mouse Wheel event */
-
-typedef struct _Ecore_Fb_Event_Key_Down          Ecore_Fb_Event_Key_Down; /**< FB Key Down event */
-typedef struct _Ecore_Fb_Event_Key_Up            Ecore_Fb_Event_Key_Up; /**< FB Key Up event */
-typedef struct _Ecore_Fb_Event_Mouse_Button_Down Ecore_Fb_Event_Mouse_Button_Down; /**< FB Mouse Down event */
-typedef struct _Ecore_Fb_Event_Mouse_Button_Up   Ecore_Fb_Event_Mouse_Button_Up; /**< FB Mouse Up event */
-typedef struct _Ecore_Fb_Event_Mouse_Move        Ecore_Fb_Event_Mouse_Move; /**< FB Mouse Move event */
-typedef struct _Ecore_Fb_Event_Mouse_Wheel       Ecore_Fb_Event_Mouse_Wheel; /**< FB Mouse Wheel event */
-
-/**
- * @struct _Ecore_Fb_Event_Key_Down
- * Framebuffer Key Down event.
- */
-struct _Ecore_Fb_Event_Key_Down
-{
-   Ecore_Fb_Input_Device *dev; /**< The device associated with the event */
-   char   *keyname; /**< The name of the key that was pressed */
-   char   *keysymbol; /**< The logical symbol of the key that was pressed */
-   char   *key_compose; /**< The UTF-8 string conversion if any */
-};
-
-/**
- * @struct _Ecore_Fb_Event_Key_Up
- * Framebuffer Key Up event.
- */
-struct _Ecore_Fb_Event_Key_Up
-{
-   Ecore_Fb_Input_Device *dev; /**< The device associated with the event */
-   char   *keyname; /**< The name of the key that was released */
-   char   *keysymbol; /**< The logical symbol of the key that was pressed */
-   char   *key_compose; /**< The UTF-8 string conversion if any */
-};
-
-/**
- * @struct _Ecore_Fb_Event_Mouse_Button_Down
- * Framebuffer Mouse Down event.
- */
-struct _Ecore_Fb_Event_Mouse_Button_Down
-{
-   Ecore_Fb_Input_Device *dev; /**< The device associated with the event */
-   int     button; /**< Mouse button that was pressed (1 - 32) */
-   int     x; /**< Mouse co-ordinates when mouse button was pressed */
-   int     y; /**< Mouse co-ordinates when mouse button was pressed */
-   int     double_click : 1; /**< Set if click was a double click */
-   int     triple_click : 1; /**< Set if click was a triple click  */
-};
-
-/**
- * @struct _Ecore_Fb_Event_Mouse_Button_Up
- * Framebuffer Mouse Up event.
- */
-struct _Ecore_Fb_Event_Mouse_Button_Up
-{
-   Ecore_Fb_Input_Device *dev; /**< The device associated with the event */
-   int     button; /**< Mouse button that was released (1 - 32) */
-   int     x; /**< Mouse co-ordinates when mouse button was raised */
-   int     y; /**< Mouse co-ordinates when mouse button was raised */
-   int     double_click : 1; /**< Set if click was a double click */
-   int     triple_click : 1; /**< Set if click was a triple click  */
-};
-
-/**
- * @struct _Ecore_Fb_Event_Mouse_Move
- * Framebuffer Mouse Move event.
- */
-struct _Ecore_Fb_Event_Mouse_Move
-{
-   Ecore_Fb_Input_Device *dev; /**< The device associated with the event */
-   int     x; /**< Mouse co-ordinates where the mouse cursor moved to */
-   int     y; /**< Mouse co-ordinates where the mouse cursor moved to */
-};
-
-/**
- * @struct _Ecore_Fb_Event_Mouse_Wheel
- * Framebuffer Mouse Wheel event.
- */
-struct _Ecore_Fb_Event_Mouse_Wheel
-{
-   Ecore_Fb_Input_Device *dev;
-   int x,y;
-   int direction; /* 0 = vertical, 1 = horizontal */
-   int wheel; /* value 1 (left/up), -1 (right/down) */
-};
-
 /* ecore_fb_vt.c */
 EAPI void                      ecore_fb_callback_gain_set(void (*func) (void *data), void *data);
 EAPI void                      ecore_fb_callback_lose_set(void (*func) (void *data), void *data);
 
 /* ecore_fb_li.c */
-EAPI Ecore_Fb_Input_Device    *ecore_fb_input_device_open(const char *dev);
+EAPI Ecore_Fb_Input_Device    *ecore_fb_input_device_open(void *window, const char *dev);
 EAPI void                      ecore_fb_input_device_close(Ecore_Fb_Input_Device *dev);
 EAPI void                      ecore_fb_input_device_listen(Ecore_Fb_Input_Device *dev, Eina_Bool listen);
 EAPI const char               *ecore_fb_input_device_name_get(Ecore_Fb_Input_Device *dev);
index a9af6c6..9129fec 100644 (file)
@@ -3,6 +3,7 @@ MAINTAINERCLEANFILES = Makefile.in
 AM_CPPFLAGS = \
 -I$(top_srcdir)/src/lib/ecore \
 -I$(top_builddir)/src/lib/ecore \
+-I$(top_srcdir)/src/lib/ecore_input \
 @TSLIB_CFLAGS@ \
 @EINA_CFLAGS@
 
@@ -23,6 +24,7 @@ ecore_fb_ts.c
 libecore_fb_la_LIBADD = \
 @TSLIB_LIBS@ \
 $(top_builddir)/src/lib/ecore/libecore.la \
+$(top_builddir)/src/lib/ecore_input/libecore_input.la \
 @EINA_LIBS@
 
 libecore_fb_la_LDFLAGS = -version-info @version_info@ @release_info@
index 77071e3..ca7d73d 100644 (file)
@@ -7,13 +7,6 @@
 
 static void _ecore_fb_size_get(int *w, int *h);
 
-EAPI int ECORE_FB_EVENT_KEY_DOWN = 0;
-EAPI int ECORE_FB_EVENT_KEY_UP = 0;
-EAPI int ECORE_FB_EVENT_MOUSE_BUTTON_DOWN = 0;
-EAPI int ECORE_FB_EVENT_MOUSE_BUTTON_UP = 0;
-EAPI int ECORE_FB_EVENT_MOUSE_MOVE = 0;
-EAPI int ECORE_FB_EVENT_MOUSE_WHEEL = 0;
-
 static int _ecore_fb_init_count = 0;
 static int _ecore_fb_console_w = 0;
 static int _ecore_fb_console_h = 0;
@@ -46,12 +39,6 @@ ecore_fb_init(const char *name __UNUSED__)
    if (!ecore_fb_vt_init())
       return --_ecore_fb_init_count;
 
-   ECORE_FB_EVENT_KEY_DOWN          = ecore_event_type_new();
-   ECORE_FB_EVENT_KEY_UP            = ecore_event_type_new();
-   ECORE_FB_EVENT_MOUSE_BUTTON_DOWN = ecore_event_type_new();
-   ECORE_FB_EVENT_MOUSE_BUTTON_UP   = ecore_event_type_new();
-   ECORE_FB_EVENT_MOUSE_MOVE        = ecore_event_type_new();
-   ECORE_FB_EVENT_MOUSE_WHEEL       = ecore_event_type_new();
    _ecore_fb_size_get(&_ecore_fb_console_w, &_ecore_fb_console_h);
 
    return _ecore_fb_init_count;
index 65e5f61..b203e6b 100644 (file)
@@ -36,30 +36,6 @@ test_bit(int bit, unsigned long *array)
 }
 
 static void
-_ecore_fb_li_event_free_key_down(void *data __UNUSED__, void *ev)
-{
-   Ecore_Fb_Event_Key_Up *e;
-
-   e = ev;
-   free(e->keyname);
-   if (e->keysymbol) free(e->keysymbol);
-   if (e->key_compose) free(e->key_compose);
-   free(e);
-}
-
-static void
-_ecore_fb_li_event_free_key_up(void *data __UNUSED__, void *ev)
-{
-   Ecore_Fb_Event_Key_Up *e;
-
-   e = ev;
-   free(e->keyname);
-   if (e->keysymbol) free(e->keysymbol);
-   if (e->key_compose) free(e->key_compose);
-   free(e);
-}
-
-static void
 _ecore_fb_li_device_event_key(Ecore_Fb_Input_Device *dev, struct input_event *iev)
 {
    if (!dev->listen) return;
@@ -67,38 +43,28 @@ _ecore_fb_li_device_event_key(Ecore_Fb_Input_Device *dev, struct input_event *ie
    /* check for basic keyboard keys */
    if ((iev->code >= KEY_ESC) && (iev->code <= KEY_COMPOSE))
      {
+        int offset = 0;
+        const char *keyname = _ecore_fb_li_kbd_syms[iev->code * 6];
         /* check the key table */
         if (iev->value)
           {
-             int offset = 0;
-             Ecore_Fb_Event_Key_Down *ev;
-
-             ev = calloc(1, sizeof(Ecore_Fb_Event_Key_Down));
-             if (dev->keyboard.shift) offset = 1;
-             else if (dev->keyboard.lock) offset = 2;
-             ev->keyname = strdup(_ecore_fb_li_kbd_syms[iev->code * 6]);
-
-             ev->keysymbol = strdup(_ecore_fb_li_kbd_syms[(iev->code * 6) + offset]);
-             ev->key_compose = strdup(_ecore_fb_li_kbd_syms[(iev->code * 6) + 3 + offset]);
-             ev->dev = dev;
-             ecore_event_add(ECORE_FB_EVENT_KEY_DOWN, ev, _ecore_fb_li_event_free_key_down, NULL);
              /* its a repeated key, dont increment */
              if (iev->value == 2)
                 return;
-             if (!strcmp(ev->keyname, "Control_L"))
+             if (!strcmp(keyname, "Control_L"))
                 dev->keyboard.ctrl++;
-             else if (!strcmp(ev->keyname, "Control_R"))
+             else if (!strcmp(keyname, "Control_R"))
                 dev->keyboard.ctrl++;
-             else if (!strcmp(ev->keyname, "Alt_L"))
+             else if (!strcmp(keyname, "Alt_L"))
                 dev->keyboard.alt++;
-             else if (!strcmp(ev->keyname, "Alt_R"))
+             else if (!strcmp(keyname, "Alt_R"))
                 dev->keyboard.alt++;
-             else if (!strcmp(ev->keyname, "Shift_L"))
+             else if (!strcmp(keyname, "Shift_L"))
                 dev->keyboard.shift++;
-             else if (!strcmp(ev->keyname, "Shift_R"))
+             else if (!strcmp(keyname, "Shift_R"))
                 dev->keyboard.shift++;
-             else if (!strcmp(ev->keyname, "Caps_Lock"))
-                dev->keyboard.lock++;
+             else if (!strcmp(keyname, "Caps_Lock"))
+               dev->keyboard.lock = !dev->keyboard.lock;
              if (dev->keyboard.ctrl > 2) dev->keyboard.ctrl = 2;
              if (dev->keyboard.alt > 2) dev->keyboard.alt = 2;
              if (dev->keyboard.shift > 2) dev->keyboard.shift = 2;
@@ -106,85 +72,128 @@ _ecore_fb_li_device_event_key(Ecore_Fb_Input_Device *dev, struct input_event *ie
           }
         else
           {
-             int offset = 0;
-             Ecore_Fb_Event_Key_Up *ev;
-
-             ev = calloc(1, sizeof(Ecore_Fb_Event_Key_Up));
-             if (dev->keyboard.shift) offset = 1;
-             else if (dev->keyboard.lock) offset = 2;
-             ev->keyname = strdup(_ecore_fb_li_kbd_syms[iev->code * 6]);
-
-             ev->keysymbol = strdup(_ecore_fb_li_kbd_syms[(iev->code * 6) + offset]);
-             ev->key_compose = strdup(_ecore_fb_li_kbd_syms[(iev->code * 6) + 3 + offset]);
-             ev->dev = dev;
-             ecore_event_add(ECORE_FB_EVENT_KEY_UP, ev, _ecore_fb_li_event_free_key_up, NULL);
-             if (!strcmp(ev->keyname, "Control_L"))
+             if (!strcmp(keyname, "Control_L"))
                 dev->keyboard.ctrl--;
-             else if (!strcmp(ev->keyname, "Control_R"))
+             else if (!strcmp(keyname, "Control_R"))
                 dev->keyboard.ctrl--;
-             else if (!strcmp(ev->keyname, "Alt_L"))
+             else if (!strcmp(keyname, "Alt_L"))
                 dev->keyboard.alt--;
-             else if (!strcmp(ev->keyname, "Alt_R"))
+             else if (!strcmp(keyname, "Alt_R"))
                 dev->keyboard.alt--;
-             else if (!strcmp(ev->keyname, "Shift_L"))
+             else if (!strcmp(keyname, "Shift_L"))
                 dev->keyboard.shift--;
-             else if (!strcmp(ev->keyname, "Shift_R"))
+             else if (!strcmp(keyname, "Shift_R"))
                 dev->keyboard.shift--;
-             else if (!strcmp(ev->keyname, "Caps_Lock"))
-                dev->keyboard.lock--;
              if (dev->keyboard.ctrl < 0) dev->keyboard.ctrl = 0;
              if (dev->keyboard.alt < 0) dev->keyboard.alt = 0;
              if (dev->keyboard.shift < 0) dev->keyboard.shift = 0;
              if (dev->keyboard.lock < 0) dev->keyboard.lock = 0;
           }
+
+        /* sending ecore_input_evas events */
+        Ecore_Event_Key *e;
+
+        if (dev->keyboard.shift) offset = 1;
+        else if (dev->keyboard.lock) offset = 2;
+
+        const char *key = _ecore_fb_li_kbd_syms[(iev->code * 6) + offset];
+        const char *compose = _ecore_fb_li_kbd_syms[(iev->code * 6) + 3 + offset];
+
+        e = calloc(1, sizeof(Ecore_Event_Key) + strlen(key) +
+                   strlen(keyname) + (compose ? strlen(compose) : 0) + 3);
+        e->keyname = (char *)(e + 1);
+        e->key = e->keyname + strlen(keyname) + 1;
+        e->compose = (compose) ? e->key + strlen(key) + 1 : NULL;
+        e->string = e->compose;
+
+        strcpy((char *)e->keyname, keyname);
+        strcpy((char *)e->key, key);
+        if (compose)
+          strcpy((char *)e->compose, compose);
+
+        e->modifiers = 0;
+        if (dev->keyboard.shift)
+          e->modifiers |= ECORE_EVENT_MODIFIER_SHIFT;
+        if (dev->keyboard.ctrl) e->modifiers |= ECORE_EVENT_MODIFIER_CTRL;
+        if (dev->keyboard.alt) e->modifiers |= ECORE_EVENT_MODIFIER_SHIFT;
+        if (dev->keyboard.lock) e->modifiers |= ECORE_EVENT_LOCK_CAPS;
+
+        e->timestamp = ecore_time_get();
+        e->window = (Ecore_Window)dev->window;
+        e->event_window = (Ecore_Window)dev->window;
+        e->root_window = (Ecore_Window)dev->window;
+        e->same_screen = 0;
+
+        if (iev->value)
+          ecore_event_add(ECORE_EVENT_KEY_DOWN, e, NULL, NULL);
+        else
+          ecore_event_add(ECORE_EVENT_KEY_UP, e, NULL, NULL);
      }
    /* check for mouse button events */
    else if ((iev->code >= BTN_MOUSE) && (iev->code < BTN_JOYSTICK))
      {
         int button;
+        Ecore_Event_Mouse_Button *e;
+        double current = ecore_time_get();
 
         button = ((iev->code & 0x00F) + 1);
         if (iev->value)
           {
-             Ecore_Fb_Event_Mouse_Button_Down *ev;
-             double current;
-
-             ev = calloc(1, sizeof(Ecore_Fb_Event_Mouse_Button_Down));
-             ev->dev = dev;
-             ev->button = button;
-             ev->x = dev->mouse.x;
-             ev->y = dev->mouse.y;
-
-             current = ecore_time_get();
-             if ((current - dev->mouse.prev) <= dev->mouse.threshold)
-                ev->double_click = 1;
-             if ((current - dev->mouse.last) <= (2 * dev->mouse.threshold))
-               {
-                  ev->triple_click = 1;
-                  /* reset */
-                  dev->mouse.prev = 0;
-                  dev->mouse.last = 0;
-                  current = 0;
-               }
-             else
+             dev->mouse.did_double = EINA_FALSE;
+             dev->mouse.did_triple = EINA_FALSE;
+
+             if (((current - dev->mouse.prev) <= dev->mouse.threshold) &&
+                 (button == dev->mouse.prev_button))
                {
-                  /* update values */
-                  dev->mouse.last = dev->mouse.prev;
-                  dev->mouse.prev = current;
+                  dev->mouse.did_double = EINA_TRUE;
+                  if (((current - dev->mouse.last) <= (2 * dev->mouse.threshold)) &&
+                      (button == dev->mouse.last_button))
+                    {
+                       dev->mouse.did_triple = EINA_TRUE;
+                       /* reset */
+                       dev->mouse.prev = 0;
+                       dev->mouse.last = 0;
+                       current = 0;
+                    }
                }
-             ecore_event_add(ECORE_FB_EVENT_MOUSE_BUTTON_DOWN, ev, NULL ,NULL);
+             dev->mouse.last = dev->mouse.prev;
+             dev->mouse.prev = current;
+             dev->mouse.last_button = dev->mouse.prev_button;
+             dev->mouse.prev_button = button;
           }
+
+        e = calloc(1, sizeof(Ecore_Event_Mouse_Button));
+        if (!e)
+          return;
+
+        e->timestamp = current;
+        e->window = (Ecore_Window)dev->window;
+        e->event_window = (Ecore_Window)dev->window;
+        e->root_window = (Ecore_Window)dev->window;
+        e->same_screen = 0;
+
+        e->modifiers = 0;
+        if (dev->keyboard.shift)
+          e->modifiers |= ECORE_EVENT_MODIFIER_SHIFT;
+        if (dev->keyboard.ctrl) e->modifiers |= ECORE_EVENT_MODIFIER_CTRL;
+        if (dev->keyboard.alt) e->modifiers |= ECORE_EVENT_MODIFIER_SHIFT;
+        if (dev->keyboard.lock) e->modifiers |= ECORE_EVENT_LOCK_CAPS;
+
+        e->x = dev->mouse.x;
+        e->y = dev->mouse.y;
+        e->root.x = e->x;
+        e->root.y = e->y;
+        e->buttons = button;
+
+        if (dev->mouse.did_double)
+          e->double_click = 1;
+        if (dev->mouse.did_triple)
+          e->triple_click = 1;
+
+        if (iev->value)
+          ecore_event_add(ECORE_EVENT_MOUSE_BUTTON_DOWN, e, NULL, NULL);
         else
-          {
-             Ecore_Fb_Event_Mouse_Button_Up *ev;
-
-             ev = calloc(1,sizeof(Ecore_Fb_Event_Mouse_Button_Up));
-             ev->dev = dev;
-             ev->button = button;
-             ev->x = dev->mouse.x;
-             ev->y = dev->mouse.y;
-             ecore_event_add(ECORE_FB_EVENT_MOUSE_BUTTON_UP, ev, NULL ,NULL);
-          }
+          ecore_event_add(ECORE_EVENT_MOUSE_BUTTON_UP, e, NULL, NULL);
      }
 }
 
@@ -198,7 +207,7 @@ _ecore_fb_li_device_event_rel(Ecore_Fb_Input_Device *dev, struct input_event *ie
      case REL_X:
      case REL_Y:
           {
-             Ecore_Fb_Event_Mouse_Move *ev;
+             Ecore_Event_Mouse_Move *e;
              if(iev->code == REL_X)
                {
                   dev->mouse.x += iev->value;
@@ -215,26 +224,64 @@ _ecore_fb_li_device_event_rel(Ecore_Fb_Input_Device *dev, struct input_event *ie
                   else if(dev->mouse.y < 0)
                      dev->mouse.y = 0;
                }
-             ev = calloc(1,sizeof(Ecore_Fb_Event_Mouse_Move));
-             ev->x = dev->mouse.x;
-             ev->y = dev->mouse.y;
-             ev->dev = dev;
 
-             ecore_event_add(ECORE_FB_EVENT_MOUSE_MOVE,ev,NULL,NULL);
+             e = calloc(1, sizeof(Ecore_Event_Mouse_Move));
+             if (!e)
+               return;
+
+             e->window = (Ecore_Window)dev->window;
+             e->event_window = (Ecore_Window)dev->window;
+             e->root_window = (Ecore_Window)dev->window;
+             e->same_screen = 0;
+
+             e->modifiers = 0;
+             if (dev->keyboard.shift) e->modifiers |= ECORE_EVENT_MODIFIER_SHIFT;
+             if (dev->keyboard.ctrl) e->modifiers |= ECORE_EVENT_MODIFIER_CTRL;
+             if (dev->keyboard.alt) e->modifiers |= ECORE_EVENT_MODIFIER_SHIFT;
+             if (dev->keyboard.lock) e->modifiers |= ECORE_EVENT_LOCK_CAPS;
+
+             e->x = dev->mouse.x;
+             e->y = dev->mouse.y;
+             e->root.x = e->x;
+             e->root.y = e->y;
+
+             e->timestamp = ecore_time_get();
+
+             ecore_event_add(ECORE_EVENT_MOUSE_MOVE, e, NULL, NULL);
+
              break;
           }
      case REL_WHEEL:
      case REL_HWHEEL:
           {
-             Ecore_Fb_Event_Mouse_Wheel *ev;
-             ev = calloc(1, sizeof(Ecore_Fb_Event_Mouse_Wheel));
-
-             ev->x = dev->mouse.x;
-             ev->y = dev->mouse.y;
-             if (iev->code == REL_HWHEEL) ev->direction = 1;
-             ev->wheel = iev->value;
-             ev->dev = dev;
-             ecore_event_add(ECORE_FB_EVENT_MOUSE_WHEEL, ev, NULL, NULL);
+             Ecore_Event_Mouse_Wheel *e;
+
+             e = calloc(1, sizeof(Ecore_Event_Mouse_Wheel));
+             if (!e)
+               return;
+
+             e->x = dev->mouse.x;
+             e->y = dev->mouse.y;
+             if (iev->code == REL_HWHEEL) e->direction = 1;
+             e->z = iev->value;
+             e->root.x = dev->mouse.x;
+             e->root.y = dev->mouse.y;
+
+             e->window = (Ecore_Window)dev->window;
+             e->event_window = (Ecore_Window)dev->window;
+             e->root_window = (Ecore_Window)dev->window;
+             e->same_screen = 0;
+
+             e->modifiers = 0;
+             if (dev->keyboard.shift) e->modifiers |= ECORE_EVENT_MODIFIER_SHIFT;
+             if (dev->keyboard.ctrl) e->modifiers |= ECORE_EVENT_MODIFIER_CTRL;
+             if (dev->keyboard.alt) e->modifiers |= ECORE_EVENT_MODIFIER_SHIFT;
+             if (dev->keyboard.lock) e->modifiers |= ECORE_EVENT_LOCK_CAPS;
+
+             e->timestamp = ecore_time_get();
+
+             ecore_event_add(ECORE_EVENT_MOUSE_WHEEL, e, NULL, NULL);
+
              break;
           }
      default:
@@ -260,7 +307,7 @@ _ecore_fb_li_device_event_abs(Ecore_Fb_Input_Device *dev, struct input_event *ie
              if (tmp < 0) dev->mouse.x = 0;
              else if (tmp > dev->mouse.w) dev->mouse.x = dev->mouse.w;
              else dev->mouse.x = tmp;
-             dev->mouse.event = ECORE_FB_EVENT_MOUSE_MOVE;
+             dev->mouse.event = ECORE_EVENT_MOUSE_MOVE;
           }
         break;
 
@@ -273,7 +320,7 @@ _ecore_fb_li_device_event_abs(Ecore_Fb_Input_Device *dev, struct input_event *ie
              if (tmp < 0) dev->mouse.y = 0;
              else if (tmp > dev->mouse.h) dev->mouse.y = dev->mouse.h;
              else dev->mouse.y = tmp;
-             dev->mouse.event = ECORE_FB_EVENT_MOUSE_MOVE;
+             dev->mouse.event = ECORE_EVENT_MOUSE_MOVE;
           }
         break;
 
@@ -281,13 +328,13 @@ _ecore_fb_li_device_event_abs(Ecore_Fb_Input_Device *dev, struct input_event *ie
         pressure = iev->value;
         if ((pressure) && (!prev_pressure))
           {
-             /* DOWN: mouse is down, but was not now */
-             dev->mouse.event = ECORE_FB_EVENT_MOUSE_BUTTON_DOWN;
+             /* DOWN: mouse is down, but was not before */
+             dev->mouse.event = ECORE_EVENT_MOUSE_BUTTON_DOWN;
           }
         else if ((!pressure) && (prev_pressure))
           {
              /* UP: mouse was down, but is not now */
-             dev->mouse.event = ECORE_FB_EVENT_MOUSE_BUTTON_UP;
+             dev->mouse.event = ECORE_EVENT_MOUSE_BUTTON_UP;
           }
         prev_pressure = pressure;
         break;
@@ -299,32 +346,39 @@ _ecore_fb_li_device_event_syn(Ecore_Fb_Input_Device *dev, struct input_event *ie
 {
    if (!dev->listen) return;
 
-   if (dev->mouse.event == ECORE_FB_EVENT_MOUSE_MOVE)
+   if (dev->mouse.event == ECORE_EVENT_MOUSE_MOVE)
      {
-        Ecore_Fb_Event_Mouse_Move *ev;
-        ev = calloc(1,sizeof(Ecore_Fb_Event_Mouse_Move));
+        Ecore_Event_Mouse_Move *ev;
+        ev = calloc(1,sizeof(Ecore_Event_Mouse_Move));
         ev->x = dev->mouse.x;
         ev->y = dev->mouse.y;
-        ev->dev = dev;
-        ecore_event_add(ECORE_FB_EVENT_MOUSE_MOVE, ev, NULL, NULL);
+        ev->root.x = ev->x;
+        ev->root.y = ev->y;
+        ev->timestamp = ecore_time_get();
      }
-   else if (dev->mouse.event == ECORE_FB_EVENT_MOUSE_BUTTON_DOWN)
+   else if (dev->mouse.event == ECORE_EVENT_MOUSE_BUTTON_DOWN)
      {
-        Ecore_Fb_Event_Mouse_Button_Down *ev;
-        ev = calloc(1, sizeof(Ecore_Fb_Event_Mouse_Button_Down));
+        Ecore_Event_Mouse_Button *ev;
+        ev = calloc(1, sizeof(Ecore_Event_Mouse_Button));
         ev->x = dev->mouse.x;
         ev->y = dev->mouse.y;
-        ev->button = 1;
-        ecore_event_add(ECORE_FB_EVENT_MOUSE_BUTTON_DOWN, ev, NULL, NULL);
+        ev->root.x = ev->x;
+        ev->root.y = ev->y;
+        ev->buttons = 1;
+        ev->timestamp = ecore_time_get();
+        ecore_event_add(ECORE_EVENT_MOUSE_BUTTON_DOWN, ev, NULL, NULL);
      }
-   else if (dev->mouse.event == ECORE_FB_EVENT_MOUSE_BUTTON_UP)
+   else if (dev->mouse.event == ECORE_EVENT_MOUSE_BUTTON_UP)
      {
-        Ecore_Fb_Event_Mouse_Button_Up *ev;
-        ev = calloc(1, sizeof(Ecore_Fb_Event_Mouse_Button_Up));
+        Ecore_Event_Mouse_Button *ev;
+        ev = calloc(1, sizeof(Ecore_Event_Mouse_Button));
         ev->x = dev->mouse.x;
         ev->y = dev->mouse.y;
-        ev->button = 1;
-        ecore_event_add(ECORE_FB_EVENT_MOUSE_BUTTON_UP, ev, NULL, NULL);
+        ev->root.x = ev->x;
+        ev->root.y = ev->y;
+        ev->buttons = 1;
+        ev->timestamp = ecore_time_get();
+        ecore_event_add(ECORE_EVENT_MOUSE_BUTTON_UP, ev, NULL, NULL);
      }
 }
 
@@ -339,7 +393,6 @@ _ecore_fb_li_device_fd_callback(void *data, Ecore_Fd_Handler *fdh __UNUSED__)
    dev = (Ecore_Fb_Input_Device*)data;
    /* read up to 64 events at once */
    len = read(dev->fd, &ev, sizeof(ev));
-   // printf("[ecore_fb_li_device:fd_callback] received %d data\n", len);
    for(i = 0; i < (int)(len / sizeof(ev[0])); i++)
      {
         switch(ev[i].type)
@@ -408,7 +461,7 @@ ecore_fb_input_device_listen(Ecore_Fb_Input_Device *dev, Eina_Bool listen)
  * object for it, or returns @c NULL on failure.
  */
 EAPI Ecore_Fb_Input_Device *
-ecore_fb_input_device_open(const char *dev)
+ecore_fb_input_device_open(void *ee, const char *dev)
 {
    Ecore_Fb_Input_Device *device;
    unsigned long event_type_bitmask[EV_CNT / 32 + 1];
@@ -471,6 +524,8 @@ ecore_fb_input_device_open(const char *dev)
                 break;
           }
      }
+
+   device->window = ee;
    _ecore_fb_li_devices = eina_list_append(_ecore_fb_li_devices, device);
    return device;
 
index 0b51bc7..e954289 100644 (file)
@@ -3,6 +3,7 @@
 
 #include "Ecore.h"
 #include "ecore_private.h"
+#include "Ecore_Input.h"
 
 #include <stdio.h>
 #include <string.h>
@@ -49,10 +50,14 @@ struct _Ecore_Fb_Input_Device
                 double last;
                 double prev;
                 double threshold;
+                Eina_Bool did_double;
+                Eina_Bool did_triple;
                 /* absolute axis */
                 int min_w, min_h;
                 double rel_w, rel_h;
                 int event;
+                int prev_button;
+                int last_button;
         } mouse;
         struct
         {
@@ -61,6 +66,7 @@ struct _Ecore_Fb_Input_Device
                 int alt;
                 int lock;
         } keyboard;
+        void *window;
 };
 
 /* ecore_fb_ts.c */
index 33b2d8c..09c1cc4 100644 (file)
@@ -251,24 +251,26 @@ _ecore_fb_ts_fd_handler(void *data __UNUSED__, Ecore_Fd_Handler *fd_handler __UN
         if ((pressure) || (prev_pressure))
           {
              /* MOVE: mouse is down and was */
-             Ecore_Fb_Event_Mouse_Move *e;
+             Ecore_Event_Mouse_Move *e;
 
-             e = calloc(1, sizeof(Ecore_Fb_Event_Mouse_Move));
+             e = calloc(1, sizeof(Ecore_Event_Mouse_Move));
              if (!e) goto retry;
              e->x = x;
              e->y = y;
-             ecore_event_add(ECORE_FB_EVENT_MOUSE_MOVE, e, NULL, NULL);
+             e->root.x = x;
+             e->root.y = y;
+             ecore_event_add(ECORE_EVENT_MOUSE_MOVE, e, NULL, NULL);
           }
         if ((pressure) && (!prev_pressure))
           {
              /* DOWN: mouse is down, but was not now */
-             Ecore_Fb_Event_Mouse_Button_Down *e;
+             Ecore_Event_Mouse_Button *e;
 
-             e = calloc(1, sizeof(Ecore_Fb_Event_Mouse_Button_Down));
+             e = calloc(1, sizeof(Ecore_Event_Mouse_Button));
              if (!e) goto retry;
              e->x = x;
              e->y = y;
-             e->button = 1;
+             e->buttons = 1;
              if ((t - last_time) <= _ecore_fb_double_click_time)
                {
                   e->double_click = 1;
@@ -288,23 +290,23 @@ _ecore_fb_ts_fd_handler(void *data __UNUSED__, Ecore_Fd_Handler *fd_handler __UN
                {
                   did_triple = 0;
                }
-             ecore_event_add(ECORE_FB_EVENT_MOUSE_BUTTON_DOWN, e, NULL, NULL);
+             ecore_event_add(ECORE_EVENT_MOUSE_BUTTON_DOWN, e, NULL, NULL);
           }
         else if ((!pressure) && (prev_pressure))
           {
              /* UP: mouse was down, but is not now */
-             Ecore_Fb_Event_Mouse_Button_Up *e;
+             Ecore_Event_Mouse_Button *e;
 
-             e = calloc(1, sizeof(Ecore_Fb_Event_Mouse_Button_Up));
+             e = calloc(1, sizeof(Ecore_Event_Mouse_Button));
              if (!e) goto retry;
              e->x = prev_x;
              e->y = prev_y;
-             e->button = 1;
+             e->buttons = 1;
              if (did_double)
                 e->double_click = 1;
              if (did_triple)
                 e->triple_click = 1;
-             ecore_event_add(ECORE_FB_EVENT_MOUSE_BUTTON_UP, e, NULL, NULL);
+             ecore_event_add(ECORE_EVENT_MOUSE_BUTTON_UP, e, NULL, NULL);
           }
         if (did_triple)
           {
index 3d76f14..5fdb21c 100644 (file)
@@ -131,7 +131,9 @@ _ecore_fb_vt_setup(void)
                                                     _ecore_fb_signal_usr_handler,
                                                     NULL);
    /* What does this do? */
+   /*
    _ecore_fb_filter_handler = ecore_event_filter_add(_ecore_fb_event_filter_start, _ecore_fb_event_filter_filter, _ecore_fb_event_filter_end, NULL);
+   */
 
    usleep(40000);
    if (ioctl(_ecore_fb_vt_tty_fd, VT_ACTIVATE, _ecore_fb_vt_current_vt) < 0)
@@ -269,6 +271,12 @@ ecore_fb_callback_lose_set(void (*func) (void *data), void *data)
  * @}
  */
 
+/*
+ * This filter should take into account that the MOUSE_MOVE event can be
+ * triggered by a mouse, not just a touchscreen device, so you can't discard
+ * them (only those generated by a device that sends events with absolute
+ * coordinates).
+
 typedef struct _Ecore_Fb_Filter_Data Ecore_Fb_Filter_Data;
 
 struct _Ecore_Fb_Filter_Data
@@ -292,9 +300,9 @@ _ecore_fb_event_filter_filter(void *data __UNUSED__, void *loop_data,int type, v
 
    filter_data = loop_data;
    if (!filter_data) return EINA_TRUE;
-   if (type == ECORE_FB_EVENT_MOUSE_MOVE)
+   if (type == ECORE_EVENT_MOUSE_MOVE)
      {
-        if ((filter_data->last_event_type) == ECORE_FB_EVENT_MOUSE_MOVE)
+        if ((filter_data->last_event_type) == ECORE_EVENT_MOUSE_MOVE)
           {
              filter_data->last_event_type = type;
              return EINA_FALSE;
@@ -312,3 +320,4 @@ _ecore_fb_event_filter_end(void *data __UNUSED__, void *loop_data)
    filter_data = loop_data;
    if (filter_data) free(filter_data);
 }
+*/
index b6b59ee..946f5bc 100644 (file)
@@ -51,6 +51,7 @@ ecore_imf_module_shutdown(void)
    if (module_list)
      {
         eina_module_list_free(module_list);
+        eina_array_free(module_list);
         module_list = NULL;
      }
 }
index 664bb9f..f9caebd 100644 (file)
  * @li @ref Ecore_X_Flush_Group
  */
 
-typedef unsigned int     Ecore_X_ID;
+typedef unsigned int   Ecore_X_ID;
 #ifndef _ECORE_X_WINDOW_PREDEF
-typedef Ecore_X_ID       Ecore_X_Window;
+typedef Ecore_X_ID     Ecore_X_Window;
 #endif // ifndef _ECORE_X_WINDOW_PREDEF
-typedef void *           Ecore_X_Visual;
-typedef Ecore_X_ID       Ecore_X_Pixmap;
-typedef Ecore_X_ID       Ecore_X_Drawable;
+typedef void          *Ecore_X_Visual;
+typedef Ecore_X_ID     Ecore_X_Pixmap;
+typedef Ecore_X_ID     Ecore_X_Drawable;
 #ifdef HAVE_ECORE_X_XCB
-typedef Ecore_X_ID       Ecore_X_GC;
+typedef Ecore_X_ID     Ecore_X_GC;
 #else // ifdef HAVE_ECORE_X_XCB
-typedef void *           Ecore_X_GC;
+typedef void          *Ecore_X_GC;
 #endif /* HAVE_ECORE_X_XCB */
-typedef Ecore_X_ID       Ecore_X_Atom;
-typedef Ecore_X_ID       Ecore_X_Colormap;
-typedef Ecore_X_ID       Ecore_X_Time;
-typedef Ecore_X_ID       Ecore_X_Cursor;
-typedef void             Ecore_X_Display;
-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;
-typedef int              Ecore_X_Randr_Screen;
-
-typedef Ecore_X_ID       Ecore_X_Device;
+typedef Ecore_X_ID     Ecore_X_Atom;
+typedef Ecore_X_ID     Ecore_X_Colormap;
+typedef Ecore_X_ID     Ecore_X_Time;
+typedef Ecore_X_ID     Ecore_X_Cursor;
+typedef void           Ecore_X_Display;
+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;
+typedef int            Ecore_X_Randr_Screen;
+
+typedef Ecore_X_ID     Ecore_X_Device;
 
 #ifdef __cplusplus
 extern "C" {
@@ -86,7 +86,7 @@ typedef struct _Ecore_X_Icon
    unsigned int *data;
 } Ecore_X_Icon;
 
-typedef enum _Ecore_X_GC_Value_Mask 
+typedef enum _Ecore_X_GC_Value_Mask
 {
    ECORE_X_GC_VALUE_MASK_FUNCTION = (1L << 0),
    ECORE_X_GC_VALUE_MASK_PLANE_MASK = (1L << 1),
@@ -113,54 +113,54 @@ typedef enum _Ecore_X_GC_Value_Mask
    ECORE_X_GC_VALUE_MASK_ARC_MODE = (1L << 22)
 } Ecore_X_GC_Value_Mask;
 
-typedef enum _Ecore_X_Composite_Update_Type 
+typedef enum _Ecore_X_Composite_Update_Type
 {
    ECORE_X_COMPOSITE_UPDATE_AUTOMATIC,
    ECORE_X_COMPOSITE_UPDATE_MANUAL
 } Ecore_X_Composite_Update_Type;
 
-typedef enum _Ecore_X_Window_State 
+typedef enum _Ecore_X_Window_State
 {
    /* Unknown state */
-   ECORE_X_WINDOW_STATE_UNKNOWN = 0,
-   /** The window is iconified. */
-   ECORE_X_WINDOW_STATE_ICONIFIED,
-   /** The window is a modal dialog box. */
-   ECORE_X_WINDOW_STATE_MODAL,
-   /** The window manager should keep the window's position fixed
-    * even if the virtual desktop scrolls. */
-   ECORE_X_WINDOW_STATE_STICKY,
-   /** The window has the maximum vertical size. */
-   ECORE_X_WINDOW_STATE_MAXIMIZED_VERT,
-   /** The window has the maximum horizontal size. */
-   ECORE_X_WINDOW_STATE_MAXIMIZED_HORZ,
-   /** The window is shaded. */
-   ECORE_X_WINDOW_STATE_SHADED,
-   /** The window should not be included in the taskbar. */
-   ECORE_X_WINDOW_STATE_SKIP_TASKBAR,
-   /** The window should not be included in the pager. */
-   ECORE_X_WINDOW_STATE_SKIP_PAGER,
-   /** The window is invisible (i.e. minimized/iconified) */
-   ECORE_X_WINDOW_STATE_HIDDEN,
-   /** The window should fill the entire screen and have no
-    * window border/decorations */
-   ECORE_X_WINDOW_STATE_FULLSCREEN,
-   /* The following are not documented because they are not
-    * intended for use in applications. */
-   ECORE_X_WINDOW_STATE_ABOVE,
-   ECORE_X_WINDOW_STATE_BELOW,
-   /* FIXME: Documentation */
-   ECORE_X_WINDOW_STATE_DEMANDS_ATTENTION
+    ECORE_X_WINDOW_STATE_UNKNOWN = 0,
+    /** The window is iconified. */
+    ECORE_X_WINDOW_STATE_ICONIFIED,
+    /** The window is a modal dialog box. */
+    ECORE_X_WINDOW_STATE_MODAL,
+    /** The window manager should keep the window's position fixed
+     * even if the virtual desktop scrolls. */
+    ECORE_X_WINDOW_STATE_STICKY,
+    /** The window has the maximum vertical size. */
+    ECORE_X_WINDOW_STATE_MAXIMIZED_VERT,
+    /** The window has the maximum horizontal size. */
+    ECORE_X_WINDOW_STATE_MAXIMIZED_HORZ,
+    /** The window is shaded. */
+    ECORE_X_WINDOW_STATE_SHADED,
+    /** The window should not be included in the taskbar. */
+    ECORE_X_WINDOW_STATE_SKIP_TASKBAR,
+    /** The window should not be included in the pager. */
+    ECORE_X_WINDOW_STATE_SKIP_PAGER,
+    /** The window is invisible (i.e. minimized/iconified) */
+    ECORE_X_WINDOW_STATE_HIDDEN,
+    /** The window should fill the entire screen and have no
+     * window border/decorations */
+    ECORE_X_WINDOW_STATE_FULLSCREEN,
+    /* The following are not documented because they are not
+     * intended for use in applications. */
+    ECORE_X_WINDOW_STATE_ABOVE,
+    ECORE_X_WINDOW_STATE_BELOW,
+    /* FIXME: Documentation */
+    ECORE_X_WINDOW_STATE_DEMANDS_ATTENTION
 } Ecore_X_Window_State;
 
-typedef enum _Ecore_X_Window_State_Action 
+typedef enum _Ecore_X_Window_State_Action
 {
    ECORE_X_WINDOW_STATE_ACTION_REMOVE,
    ECORE_X_WINDOW_STATE_ACTION_ADD,
    ECORE_X_WINDOW_STATE_ACTION_TOGGLE
 } Ecore_X_Window_State_Action;
 
-typedef enum _Ecore_X_Window_Stack_Mode 
+typedef enum _Ecore_X_Window_Stack_Mode
 {
    ECORE_X_WINDOW_STACK_ABOVE = 0,
    ECORE_X_WINDOW_STACK_BELOW = 1,
@@ -169,7 +169,7 @@ typedef enum _Ecore_X_Window_Stack_Mode
    ECORE_X_WINDOW_STACK_OPPOSITE = 4
 } Ecore_X_Window_Stack_Mode;
 
-typedef enum _Ecore_X_Randr_Orientation 
+typedef enum _Ecore_X_Randr_Orientation
 {
    ECORE_X_RANDR_ORIENTATION_ROT_0 = (1 << 0),
    ECORE_X_RANDR_ORIENTATION_ROT_90 = (1 << 1),
@@ -179,14 +179,14 @@ typedef enum _Ecore_X_Randr_Orientation
    ECORE_X_RANDR_ORIENTATION_FLIP_Y = (1 << 5)
 } Ecore_X_Randr_Orientation;
 
-typedef enum _Ecore_X_Randr_Connection_Status 
+typedef enum _Ecore_X_Randr_Connection_Status
 {
    ECORE_X_RANDR_CONNECTION_STATUS_CONNECTED = 0,
    ECORE_X_RANDR_CONNECTION_STATUS_DISCONNECTED = 1,
    ECORE_X_RANDR_CONNECTION_STATUS_UNKNOWN = 2
 } Ecore_X_Randr_Connection_Status;
 
-typedef enum _Ecore_X_Randr_Output_Policy 
+typedef enum _Ecore_X_Randr_Output_Policy
 {
    ECORE_X_RANDR_OUTPUT_POLICY_ABOVE = 1,
    ECORE_X_RANDR_OUTPUT_POLICY_RIGHT = 2,
@@ -196,14 +196,14 @@ typedef enum _Ecore_X_Randr_Output_Policy
    ECORE_X_RANDR_OUTPUT_POLICY_NONE = 6
 } Ecore_X_Randr_Output_Policy;
 
-typedef enum _Ecore_X_Randr_Relative_Alignment 
+typedef enum _Ecore_X_Randr_Relative_Alignment
 {
    ECORE_X_RANDR_RELATIVE_ALIGNMENT_NONE = 0,
    ECORE_X_RANDR_RELATIVE_ALIGNMENT_CENTER_REL = 1,
    ECORE_X_RANDR_RELATIVE_ALIGNMENT_CENTER_SCR = 2
 } Ecore_X_Randr_Relative_Alignment;
 
-typedef enum _Ecore_X_Render_Subpixel_Order 
+typedef enum _Ecore_X_Render_Subpixel_Order
 {
    ECORE_X_RENDER_SUBPIXEL_ORDER_UNKNOWN = 0,
    ECORE_X_RENDER_SUBPIXEL_ORDER_HORIZONTAL_RGB = 1,
@@ -213,7 +213,7 @@ typedef enum _Ecore_X_Render_Subpixel_Order
    ECORE_X_RENDER_SUBPIXEL_ORDER_NONE = 5
 } Ecore_X_Render_Subpixel_Order;
 
-typedef enum _Ecore_X_Randr_Edid_Display_Interface_Type 
+typedef enum _Ecore_X_Randr_Edid_Display_Interface_Type
 {
    ECORE_X_RANDR_EDID_DISPLAY_INTERFACE_UNDEFINED,
    ECORE_X_RANDR_EDID_DISPLAY_INTERFACE_DVI,
@@ -222,8 +222,8 @@ typedef enum _Ecore_X_Randr_Edid_Display_Interface_Type
    ECORE_X_RANDR_EDID_DISPLAY_INTERFACE_MDDI,
    ECORE_X_RANDR_EDID_DISPLAY_INTERFACE_DISPLAY_PORT
 } Ecore_X_Randr_Edid_Display_Interface_Type;
-   
-typedef enum _Ecore_X_Randr_Edid_Display_Colorscheme 
+
+typedef enum _Ecore_X_Randr_Edid_Display_Colorscheme
 {
    ECORE_X_RANDR_EDID_DISPLAY_COLORSCHEME_MONOCHROME_GRAYSCALE = 0x00,
    ECORE_X_RANDR_EDID_DISPLAY_COLORSCHEME_COLOR_RGB = 0x08,
@@ -233,8 +233,8 @@ typedef enum _Ecore_X_Randr_Edid_Display_Colorscheme
    ECORE_X_RANDR_EDID_DISPLAY_COLORSCHEME_COLOR_RGB_YCRCB_4_4_4 = 0x444,
    ECORE_X_RANDR_EDID_DISPLAY_COLORSCHEME_COLOR_RGB_YCRCB_4_2_2 = 0x422
 } Ecore_X_Randr_Edid_Display_Colorscheme;
-   
-typedef enum _Ecore_X_Randr_Edid_Aspect_Ratio 
+
+typedef enum _Ecore_X_Randr_Edid_Aspect_Ratio
 {
    ECORE_X_RANDR_EDID_ASPECT_RATIO_4_3 = 0x0,
    ECORE_X_RANDR_EDID_ASPECT_RATIO_16_9 = 0x1,
@@ -242,9 +242,9 @@ typedef enum _Ecore_X_Randr_Edid_Aspect_Ratio
    ECORE_X_RANDR_EDID_ASPECT_RATIO_5_4 = 0x4,
    ECORE_X_RANDR_EDID_ASPECT_RATIO_15_9 = 0x8
 } Ecore_X_Randr_Edid_Aspect_Ratio;
-   
-#define ECORE_X_RANDR_EDID_UNKNOWN_VALUE -1
-   
+
+#define ECORE_X_RANDR_EDID_UNKNOWN_VALUE       -1
+
 #define ECORE_X_SELECTION_TARGET_TARGETS       "TARGETS"
 #define ECORE_X_SELECTION_TARGET_TEXT          "TEXT"
 #define ECORE_X_SELECTION_TARGET_COMPOUND_TEXT "COMPOUND_TEXT"
@@ -254,7 +254,7 @@ typedef enum _Ecore_X_Randr_Edid_Aspect_Ratio
 
 #define ECORE_X_DND_VERSION                    5
 
-typedef enum _Ecore_X_Selection 
+typedef enum _Ecore_X_Selection
 {
    ECORE_X_SELECTION_PRIMARY,
    ECORE_X_SELECTION_SECONDARY,
@@ -344,78 +344,78 @@ typedef enum _Ecore_X_Randr_Property_Change
    ECORE_X_RANDR_PROPERTY_CHANGE_ADD,
    ECORE_X_RANDR_PROPERTY_CHANGE_DEL
 } Ecore_X_Randr_Property_Change;
-  
-typedef struct _Ecore_X_Event_Mouse_In            Ecore_X_Event_Mouse_In;
-typedef struct _Ecore_X_Event_Mouse_Out           Ecore_X_Event_Mouse_Out;
-typedef struct _Ecore_X_Event_Window_Focus_In     Ecore_X_Event_Window_Focus_In;
-typedef struct _Ecore_X_Event_Window_Focus_Out    Ecore_X_Event_Window_Focus_Out;
-typedef struct _Ecore_X_Event_Window_Keymap       Ecore_X_Event_Window_Keymap;
-typedef struct _Ecore_X_Event_Window_Damage       Ecore_X_Event_Window_Damage;
-typedef struct _Ecore_X_Event_Window_Visibility_Change Ecore_X_Event_Window_Visibility_Change;
-typedef struct _Ecore_X_Event_Window_Create       Ecore_X_Event_Window_Create;
-typedef struct _Ecore_X_Event_Window_Destroy      Ecore_X_Event_Window_Destroy;
-typedef struct _Ecore_X_Event_Window_Hide         Ecore_X_Event_Window_Hide;
-typedef struct _Ecore_X_Event_Window_Show         Ecore_X_Event_Window_Show;
-typedef struct _Ecore_X_Event_Window_Show_Request Ecore_X_Event_Window_Show_Request;
-typedef struct _Ecore_X_Event_Window_Reparent     Ecore_X_Event_Window_Reparent;
-typedef struct _Ecore_X_Event_Window_Configure    Ecore_X_Event_Window_Configure;
-typedef struct _Ecore_X_Event_Window_Configure_Request Ecore_X_Event_Window_Configure_Request;
-typedef struct _Ecore_X_Event_Window_Gravity      Ecore_X_Event_Window_Gravity;
-typedef struct _Ecore_X_Event_Window_Resize_Request Ecore_X_Event_Window_Resize_Request;
-typedef struct _Ecore_X_Event_Window_Stack        Ecore_X_Event_Window_Stack;
-typedef struct _Ecore_X_Event_Window_Stack_Request Ecore_X_Event_Window_Stack_Request;
-typedef struct _Ecore_X_Event_Window_Property     Ecore_X_Event_Window_Property;
-typedef struct _Ecore_X_Event_Window_Colormap     Ecore_X_Event_Window_Colormap;
-typedef struct _Ecore_X_Event_Mapping_Change      Ecore_X_Event_Mapping_Change;
-typedef struct _Ecore_X_Event_Window_Mapping      Ecore_X_Event_Window_Mapping;
-typedef struct _Ecore_X_Event_Selection_Clear     Ecore_X_Event_Selection_Clear;
-typedef struct _Ecore_X_Event_Selection_Request   Ecore_X_Event_Selection_Request;
-typedef struct _Ecore_X_Event_Selection_Notify    Ecore_X_Event_Selection_Notify;
-typedef struct _Ecore_X_Event_Fixes_Selection_Notify    Ecore_X_Event_Fixes_Selection_Notify;
-typedef struct _Ecore_X_Selection_Data            Ecore_X_Selection_Data;
-typedef struct _Ecore_X_Selection_Data_Files      Ecore_X_Selection_Data_Files;
-typedef struct _Ecore_X_Selection_Data_Text       Ecore_X_Selection_Data_Text;
-typedef struct _Ecore_X_Selection_Data_Targets    Ecore_X_Selection_Data_Targets;
-typedef struct _Ecore_X_Event_Xdnd_Enter          Ecore_X_Event_Xdnd_Enter;
-typedef struct _Ecore_X_Event_Xdnd_Position       Ecore_X_Event_Xdnd_Position;
-typedef struct _Ecore_X_Event_Xdnd_Status         Ecore_X_Event_Xdnd_Status;
-typedef struct _Ecore_X_Event_Xdnd_Leave          Ecore_X_Event_Xdnd_Leave;
-typedef struct _Ecore_X_Event_Xdnd_Drop           Ecore_X_Event_Xdnd_Drop;
-typedef struct _Ecore_X_Event_Xdnd_Finished       Ecore_X_Event_Xdnd_Finished;
-typedef struct _Ecore_X_Event_Client_Message      Ecore_X_Event_Client_Message;
-typedef struct _Ecore_X_Event_Window_Shape        Ecore_X_Event_Window_Shape;
-typedef struct _Ecore_X_Event_Screensaver_Notify  Ecore_X_Event_Screensaver_Notify;
-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_Mouse_In                     Ecore_X_Event_Mouse_In;
+typedef struct _Ecore_X_Event_Mouse_Out                    Ecore_X_Event_Mouse_Out;
+typedef struct _Ecore_X_Event_Window_Focus_In              Ecore_X_Event_Window_Focus_In;
+typedef struct _Ecore_X_Event_Window_Focus_Out             Ecore_X_Event_Window_Focus_Out;
+typedef struct _Ecore_X_Event_Window_Keymap                Ecore_X_Event_Window_Keymap;
+typedef struct _Ecore_X_Event_Window_Damage                Ecore_X_Event_Window_Damage;
+typedef struct _Ecore_X_Event_Window_Visibility_Change     Ecore_X_Event_Window_Visibility_Change;
+typedef struct _Ecore_X_Event_Window_Create                Ecore_X_Event_Window_Create;
+typedef struct _Ecore_X_Event_Window_Destroy               Ecore_X_Event_Window_Destroy;
+typedef struct _Ecore_X_Event_Window_Hide                  Ecore_X_Event_Window_Hide;
+typedef struct _Ecore_X_Event_Window_Show                  Ecore_X_Event_Window_Show;
+typedef struct _Ecore_X_Event_Window_Show_Request          Ecore_X_Event_Window_Show_Request;
+typedef struct _Ecore_X_Event_Window_Reparent              Ecore_X_Event_Window_Reparent;
+typedef struct _Ecore_X_Event_Window_Configure             Ecore_X_Event_Window_Configure;
+typedef struct _Ecore_X_Event_Window_Configure_Request     Ecore_X_Event_Window_Configure_Request;
+typedef struct _Ecore_X_Event_Window_Gravity               Ecore_X_Event_Window_Gravity;
+typedef struct _Ecore_X_Event_Window_Resize_Request        Ecore_X_Event_Window_Resize_Request;
+typedef struct _Ecore_X_Event_Window_Stack                 Ecore_X_Event_Window_Stack;
+typedef struct _Ecore_X_Event_Window_Stack_Request         Ecore_X_Event_Window_Stack_Request;
+typedef struct _Ecore_X_Event_Window_Property              Ecore_X_Event_Window_Property;
+typedef struct _Ecore_X_Event_Window_Colormap              Ecore_X_Event_Window_Colormap;
+typedef struct _Ecore_X_Event_Mapping_Change               Ecore_X_Event_Mapping_Change;
+typedef struct _Ecore_X_Event_Window_Mapping               Ecore_X_Event_Window_Mapping;
+typedef struct _Ecore_X_Event_Selection_Clear              Ecore_X_Event_Selection_Clear;
+typedef struct _Ecore_X_Event_Selection_Request            Ecore_X_Event_Selection_Request;
+typedef struct _Ecore_X_Event_Selection_Notify             Ecore_X_Event_Selection_Notify;
+typedef struct _Ecore_X_Event_Fixes_Selection_Notify       Ecore_X_Event_Fixes_Selection_Notify;
+typedef struct _Ecore_X_Selection_Data                     Ecore_X_Selection_Data;
+typedef struct _Ecore_X_Selection_Data_Files               Ecore_X_Selection_Data_Files;
+typedef struct _Ecore_X_Selection_Data_Text                Ecore_X_Selection_Data_Text;
+typedef struct _Ecore_X_Selection_Data_Targets             Ecore_X_Selection_Data_Targets;
+typedef struct _Ecore_X_Event_Xdnd_Enter                   Ecore_X_Event_Xdnd_Enter;
+typedef struct _Ecore_X_Event_Xdnd_Position                Ecore_X_Event_Xdnd_Position;
+typedef struct _Ecore_X_Event_Xdnd_Status                  Ecore_X_Event_Xdnd_Status;
+typedef struct _Ecore_X_Event_Xdnd_Leave                   Ecore_X_Event_Xdnd_Leave;
+typedef struct _Ecore_X_Event_Xdnd_Drop                    Ecore_X_Event_Xdnd_Drop;
+typedef struct _Ecore_X_Event_Xdnd_Finished                Ecore_X_Event_Xdnd_Finished;
+typedef struct _Ecore_X_Event_Client_Message               Ecore_X_Event_Client_Message;
+typedef struct _Ecore_X_Event_Window_Shape                 Ecore_X_Event_Window_Shape;
+typedef struct _Ecore_X_Event_Screensaver_Notify           Ecore_X_Event_Screensaver_Notify;
+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_Move_Resize_Request Ecore_X_Event_Window_Move_Resize_Request;
-typedef struct _Ecore_X_Event_Window_State_Request       Ecore_X_Event_Window_State_Request;
-typedef struct _Ecore_X_Event_Frame_Extents_Request      Ecore_X_Event_Frame_Extents_Request;
-typedef struct _Ecore_X_Event_Ping                       Ecore_X_Event_Ping;
-typedef struct _Ecore_X_Event_Desktop_Change             Ecore_X_Event_Desktop_Change;
+typedef struct _Ecore_X_Event_Window_Delete_Request        Ecore_X_Event_Window_Delete_Request;
+typedef struct _Ecore_X_Event_Window_Move_Resize_Request   Ecore_X_Event_Window_Move_Resize_Request;
+typedef struct _Ecore_X_Event_Window_State_Request         Ecore_X_Event_Window_State_Request;
+typedef struct _Ecore_X_Event_Frame_Extents_Request        Ecore_X_Event_Frame_Extents_Request;
+typedef struct _Ecore_X_Event_Ping                         Ecore_X_Event_Ping;
+typedef struct _Ecore_X_Event_Desktop_Change               Ecore_X_Event_Desktop_Change;
 
-typedef struct _Ecore_X_Event_Startup_Sequence   Ecore_X_Event_Startup_Sequence;
+typedef struct _Ecore_X_Event_Startup_Sequence             Ecore_X_Event_Startup_Sequence;
 
-typedef struct _Ecore_X_Event_Generic            Ecore_X_Event_Generic;
+typedef struct _Ecore_X_Event_Generic                      Ecore_X_Event_Generic;
 
-typedef struct _Ecore_X_Randr_Screen_Size        Ecore_X_Randr_Screen_Size;
-typedef struct _Ecore_X_Randr_Screen_Size_MM     Ecore_X_Randr_Screen_Size_MM;
+typedef struct _Ecore_X_Randr_Screen_Size                  Ecore_X_Randr_Screen_Size;
+typedef struct _Ecore_X_Randr_Screen_Size_MM               Ecore_X_Randr_Screen_Size_MM;
 
-typedef struct _Ecore_X_Xdnd_Position            Ecore_X_Xdnd_Position;
+typedef struct _Ecore_X_Xdnd_Position                      Ecore_X_Xdnd_Position;
 
 struct _Ecore_X_Event_Mouse_In
 {
    int                  modifiers;
    int                  x, y;
    Eina_Bool            same_screen : 1;
-   struct 
+   struct
    {
-      int               x, y;
+      int x, y;
    } root;
    Ecore_X_Window       win;
    Ecore_X_Window       event_win;
@@ -430,9 +430,9 @@ struct _Ecore_X_Event_Mouse_Out
    int                  modifiers;
    int                  x, y;
    int                  same_screen;
-   struct 
+   struct
    {
-      int               x, y;
+      int x, y;
    } root;
    Ecore_X_Window       win;
    Ecore_X_Window       event_win;
@@ -627,12 +627,12 @@ typedef enum
 
 struct _Ecore_X_Event_Fixes_Selection_Notify
 {
-   Ecore_X_Window    win;
-   Ecore_X_Window    owner;
-   Ecore_X_Time      time;
-   Ecore_X_Time      selection_time;
-   Ecore_X_Selection selection;
-   Ecore_X_Atom      atom;
+   Ecore_X_Window              win;
+   Ecore_X_Window              owner;
+   Ecore_X_Time                time;
+   Ecore_X_Time                selection_time;
+   Ecore_X_Selection           selection;
+   Ecore_X_Atom                atom;
    Ecore_X_Owner_Change_Reason reason;
 };
 
@@ -648,14 +648,14 @@ struct _Ecore_X_Event_Selection_Notify
 
 struct _Ecore_X_Selection_Data
 {
-   enum 
-     {
-        ECORE_X_SELECTION_CONTENT_NONE,
-        ECORE_X_SELECTION_CONTENT_TEXT,
-        ECORE_X_SELECTION_CONTENT_FILES,
-        ECORE_X_SELECTION_CONTENT_TARGETS,
-        ECORE_X_SELECTION_CONTENT_CUSTOM
-     } content;
+   enum
+   {
+      ECORE_X_SELECTION_CONTENT_NONE,
+      ECORE_X_SELECTION_CONTENT_TEXT,
+      ECORE_X_SELECTION_CONTENT_FILES,
+      ECORE_X_SELECTION_CONTENT_TARGETS,
+      ECORE_X_SELECTION_CONTENT_CUSTOM
+   } content;
    unsigned char *data;
    int            length;
    int            format;
@@ -693,9 +693,9 @@ struct _Ecore_X_Event_Xdnd_Enter
 struct _Ecore_X_Event_Xdnd_Position
 {
    Ecore_X_Window win, source;
-   struct 
+   struct
    {
-     int          x, y;
+      int x, y;
    } position;
    Ecore_X_Atom   action;
 };
@@ -703,9 +703,9 @@ struct _Ecore_X_Event_Xdnd_Position
 struct _Ecore_X_Xdnd_Position
 {
    Ecore_X_Window win, prev;
-   struct 
+   struct
    {
-     int          x, y;
+      int x, y;
    } position;
 };
 
@@ -726,16 +726,16 @@ struct _Ecore_X_Event_Xdnd_Drop
 {
    Ecore_X_Window win, source;
    Ecore_X_Atom   action;
-   struct 
+   struct
    {
-      int         x, y;
+      int x, y;
    } position;
 };
 
 struct _Ecore_X_Event_Xdnd_Finished
 {
    Ecore_X_Window win, target;
-   Eina_Bool           completed : 1;
+   Eina_Bool      completed : 1;
    Ecore_X_Atom   action;
 };
 
@@ -744,11 +744,11 @@ struct _Ecore_X_Event_Client_Message
    Ecore_X_Window win;
    Ecore_X_Atom   message_type;
    int            format;
-   union 
+   union
    {
-      char        b[20];
-      short       s[10];
-      long        l[5];
+      char  b[20];
+      short s[10];
+      long  l[5];
    } data;
    Ecore_X_Time   time;
 };
@@ -1016,54 +1016,54 @@ typedef enum _Ecore_X_WM_Protocol
 {
    /* If enabled the window manager will be asked to send a
     * delete message instead of just closing (destroying) the window. */
-   ECORE_X_WM_PROTOCOL_DELETE_REQUEST,
+     ECORE_X_WM_PROTOCOL_DELETE_REQUEST,
 
-   /* If enabled the window manager will be told that the window
-    * explicitly sets input focus. */
-   ECORE_X_WM_PROTOCOL_TAKE_FOCUS,
+     /* If enabled the window manager will be told that the window
+      * explicitly sets input focus. */
+     ECORE_X_WM_PROTOCOL_TAKE_FOCUS,
 
-   /* If enabled the window manager can ping the window to check
-    * if it is alive. */
-   ECORE_X_NET_WM_PROTOCOL_PING,
+     /* If enabled the window manager can ping the window to check
+      * if it is alive. */
+     ECORE_X_NET_WM_PROTOCOL_PING,
 
-   /* If enabled the window manager can sync updating with the
-    * window (?) */
-   ECORE_X_NET_WM_PROTOCOL_SYNC_REQUEST,
+     /* If enabled the window manager can sync updating with the
+      * window (?) */
+     ECORE_X_NET_WM_PROTOCOL_SYNC_REQUEST,
 
-   /* Number of defined items */
-   ECORE_X_WM_PROTOCOL_NUM
+     /* Number of defined items */
+     ECORE_X_WM_PROTOCOL_NUM
 } Ecore_X_WM_Protocol;
 
 typedef enum _Ecore_X_Window_Input_Mode
 {
    /* The window can never be focused */
-   ECORE_X_WINDOW_INPUT_MODE_NONE,
+    ECORE_X_WINDOW_INPUT_MODE_NONE,
 
-   /* The window can be focused by the WM but doesn't focus itself */
-   ECORE_X_WINDOW_INPUT_MODE_PASSIVE,
+    /* The window can be focused by the WM but doesn't focus itself */
+    ECORE_X_WINDOW_INPUT_MODE_PASSIVE,
 
-   /* The window sets the focus itself if one of its sub-windows
-    * already is focused */
-   ECORE_X_WINDOW_INPUT_MODE_ACTIVE_LOCAL,
+    /* The window sets the focus itself if one of its sub-windows
+     * already is focused */
+    ECORE_X_WINDOW_INPUT_MODE_ACTIVE_LOCAL,
 
-   /* The window sets the focus itself even if another window
-    * is currently focused */
-   ECORE_X_WINDOW_INPUT_MODE_ACTIVE_GLOBAL
+    /* The window sets the focus itself even if another window
+     * is currently focused */
+    ECORE_X_WINDOW_INPUT_MODE_ACTIVE_GLOBAL
 } Ecore_X_Window_Input_Mode;
 
 typedef enum _Ecore_X_Window_State_Hint
 {
    /** Do not provide any state hint to the window manager */
-   ECORE_X_WINDOW_STATE_HINT_NONE = -1,
+    ECORE_X_WINDOW_STATE_HINT_NONE = -1,
 
-   /** The window wants to remain hidden and NOT iconified */
-   ECORE_X_WINDOW_STATE_HINT_WITHDRAWN,
+    /** The window wants to remain hidden and NOT iconified */
+    ECORE_X_WINDOW_STATE_HINT_WITHDRAWN,
 
-   /** The window wants to be mapped normally */
-   ECORE_X_WINDOW_STATE_HINT_NORMAL,
+    /** The window wants to be mapped normally */
+    ECORE_X_WINDOW_STATE_HINT_NORMAL,
 
-   /** The window wants to start in an iconified state */
-   ECORE_X_WINDOW_STATE_HINT_ICONIC
+    /** The window wants to start in an iconified state */
+    ECORE_X_WINDOW_STATE_HINT_ICONIC
 } Ecore_X_Window_State_Hint;
 
 typedef enum _Ecore_X_Window_Type
@@ -1157,704 +1157,862 @@ typedef enum _Ecore_X_Illume_Quickpanel_State
 #define ECORE_X_PROP_LIST_ADD       1
 #define ECORE_X_PROP_LIST_TOGGLE    2
 
-EAPI int                     ecore_x_init(const char *name);
-EAPI int                     ecore_x_shutdown(void);
-EAPI int                     ecore_x_disconnect(void);
-EAPI Ecore_X_Display *       ecore_x_display_get(void);
-EAPI Ecore_X_Connection *    ecore_x_connection_get(void);
-EAPI int                     ecore_x_fd_get(void);
-EAPI Ecore_X_Screen *        ecore_x_default_screen_get(void);
-EAPI void                    ecore_x_screen_size_get(const Ecore_X_Screen *screen, int *w, int *h);
-EAPI int                     ecore_x_screen_count_get(void);
-EAPI int                     ecore_x_screen_index_get(const Ecore_X_Screen *screen);
-EAPI Ecore_X_Screen *        ecore_x_screen_get(int index);
-
-EAPI void                    ecore_x_double_click_time_set(double t);
-EAPI double                  ecore_x_double_click_time_get(void);
-EAPI void                    ecore_x_flush(void);
-EAPI void                    ecore_x_sync(void);
-EAPI void                    ecore_x_killall(Ecore_X_Window root);
-EAPI void                    ecore_x_kill(Ecore_X_Window win);
-EAPI int                     ecore_x_dpi_get(void);
-EAPI Eina_Bool               ecore_x_bell(int percent);
-EAPI unsigned int            ecore_x_visual_id_get(Ecore_X_Visual visual);
-
-EAPI Ecore_X_Visual          ecore_x_default_visual_get(Ecore_X_Display *disp, Ecore_X_Screen *screen);
-EAPI Ecore_X_Colormap        ecore_x_default_colormap_get(Ecore_X_Display *disp, Ecore_X_Screen *screen);
-EAPI int                     ecore_x_default_depth_get(Ecore_X_Display *disp, Ecore_X_Screen *screen);
-
-EAPI Ecore_X_Time            ecore_x_current_time_get(void);
-
-EAPI void                    ecore_x_error_handler_set(void (*func)(void *data), const void *data);
-EAPI void                    ecore_x_io_error_handler_set(void (*func)(
-                                                             void *data), const void *data);
-EAPI int                     ecore_x_error_request_get(void);
-EAPI int                     ecore_x_error_code_get(void);
-
-EAPI void                    ecore_x_event_mask_set(Ecore_X_Window     w,
-                                                    Ecore_X_Event_Mask mask);
-EAPI void                    ecore_x_event_mask_unset(Ecore_X_Window     w,
-                                                      Ecore_X_Event_Mask mask);
-
-EAPI Eina_Bool               ecore_x_selection_notify_send(Ecore_X_Window requestor,
-                                                           Ecore_X_Atom   selection,
-                                                           Ecore_X_Atom   target,
-                                                           Ecore_X_Atom   property,
-                                                           Ecore_X_Time   time);
-EAPI Eina_Bool               ecore_x_selection_primary_set(Ecore_X_Window w,
-                                                           const void    *data,
-                                                           int            size);
-EAPI Eina_Bool               ecore_x_selection_primary_clear(void);
-EAPI Eina_Bool               ecore_x_selection_secondary_set(Ecore_X_Window w,
-                                                             const void    *data,
-                                                             int            size);
-EAPI Eina_Bool               ecore_x_selection_secondary_clear(void);
-EAPI Eina_Bool               ecore_x_selection_xdnd_set(Ecore_X_Window w,
-                                                        const void    *data,
-                                                        int            size);
-EAPI Eina_Bool               ecore_x_selection_xdnd_clear(void);
-EAPI Eina_Bool               ecore_x_selection_clipboard_set(Ecore_X_Window w,
-                                                             const void    *data,
-                                                             int            size);
-EAPI Eina_Bool               ecore_x_selection_clipboard_clear(void);
-EAPI void                    ecore_x_selection_primary_request(Ecore_X_Window w,
-                                                               const char    *target);
-EAPI void                    ecore_x_selection_secondary_request(Ecore_X_Window w,
-                                                                 const char    *target);
-EAPI void                    ecore_x_selection_xdnd_request(Ecore_X_Window w,
-                                                            const char    *target);
-EAPI void                    ecore_x_selection_clipboard_request(Ecore_X_Window w,
-                                                                 const char    *target);
-EAPI Eina_Bool               ecore_x_selection_convert(Ecore_X_Atom  selection,
-                                                       Ecore_X_Atom  target,
-                                                       void        **data_ret,
-                                                       int          *len,
-                                                       Ecore_X_Atom *targprop,
-                                                       int          *targsize);
-EAPI void                    ecore_x_selection_converter_add(char *target, Eina_Bool (*func)(
-                                                                char  *target,
-                                                                void  *data,
-                                                                int    size,
-                                                                void **data_ret,
-                                                                int   *size_ret,
-                                                                Ecore_X_Atom *,
-                                                                int *));
-EAPI void                ecore_x_selection_converter_atom_add(Ecore_X_Atom target, Eina_Bool (*func)(
-                                                       char         *target,
-                                                       void         *data,
-                                                       int           size,
-                                                       void        **data_ret,
-                                                       int          *size_ret,
+EAPI int
+ ecore_x_init(const char *name);
+EAPI int
+ ecore_x_shutdown(void);
+EAPI int
+ ecore_x_disconnect(void);
+EAPI Ecore_X_Display *
+ ecore_x_display_get(void);
+EAPI Ecore_X_Connection *
+ ecore_x_connection_get(void);
+EAPI int
+ ecore_x_fd_get(void);
+EAPI Ecore_X_Screen *
+ ecore_x_default_screen_get(void);
+EAPI void
+ ecore_x_screen_size_get(const Ecore_X_Screen *screen,
+                        int *w,
+                        int *h);
+EAPI int
+ ecore_x_screen_count_get(void);
+EAPI int
+ ecore_x_screen_index_get(const Ecore_X_Screen *screen);
+EAPI Ecore_X_Screen *
+ ecore_x_screen_get(int index);
+
+EAPI void
+ ecore_x_double_click_time_set(double t);
+EAPI double
+ ecore_x_double_click_time_get(void);
+EAPI void
+ ecore_x_flush(void);
+EAPI void
+ ecore_x_sync(void);
+EAPI void
+ ecore_x_killall(Ecore_X_Window root);
+EAPI void
+ ecore_x_kill(Ecore_X_Window win);
+EAPI int
+ ecore_x_dpi_get(void);
+EAPI Eina_Bool
+ ecore_x_bell(int percent);
+EAPI unsigned int
+ ecore_x_visual_id_get(Ecore_X_Visual visual);
+
+EAPI Ecore_X_Visual
+ecore_x_default_visual_get(Ecore_X_Display *disp,
+                           Ecore_X_Screen *screen);
+EAPI Ecore_X_Colormap
+ecore_x_default_colormap_get(Ecore_X_Display *disp,
+                             Ecore_X_Screen *screen);
+EAPI int
+ecore_x_default_depth_get(Ecore_X_Display *disp,
+                          Ecore_X_Screen *screen);
+
+EAPI Ecore_X_Time
+ecore_x_current_time_get(void);
+
+EAPI void
+ecore_x_error_handler_set(void (*func)(void *data),
+                          const void *data);
+EAPI void
+ecore_x_io_error_handler_set(void (*func)(void *data),
+                             const void *data);
+EAPI int
+ ecore_x_error_request_get(void);
+EAPI int
+ ecore_x_error_code_get(void);
+
+EAPI void
+ecore_x_event_mask_set(Ecore_X_Window w,
+                       Ecore_X_Event_Mask mask);
+EAPI void
+ecore_x_event_mask_unset(Ecore_X_Window w,
+                         Ecore_X_Event_Mask mask);
+
+EAPI Eina_Bool
+ecore_x_selection_notify_send(Ecore_X_Window requestor,
+                              Ecore_X_Atom selection,
+                              Ecore_X_Atom target,
+                              Ecore_X_Atom property,
+                              Ecore_X_Time time);
+EAPI Eina_Bool
+ecore_x_selection_primary_set(Ecore_X_Window w,
+                              const void *data,
+                              int size);
+EAPI Eina_Bool
+ ecore_x_selection_primary_clear(void);
+EAPI Eina_Bool
+ ecore_x_selection_secondary_set(Ecore_X_Window w,
+                                const void *data,
+                                int size);
+EAPI Eina_Bool
+ ecore_x_selection_secondary_clear(void);
+EAPI Eina_Bool
+ ecore_x_selection_xdnd_set(Ecore_X_Window w,
+                           const void *data,
+                           int size);
+EAPI Eina_Bool
+ ecore_x_selection_xdnd_clear(void);
+EAPI Eina_Bool
+ ecore_x_selection_clipboard_set(Ecore_X_Window w,
+                                const void *data,
+                                int size);
+EAPI Eina_Bool
+ ecore_x_selection_clipboard_clear(void);
+EAPI void
+ ecore_x_selection_primary_request(Ecore_X_Window w,
+                                  const char *target);
+EAPI void
+ecore_x_selection_secondary_request(Ecore_X_Window w,
+                                    const char *target);
+EAPI void
+ecore_x_selection_xdnd_request(Ecore_X_Window w,
+                               const char *target);
+EAPI void
+ecore_x_selection_clipboard_request(Ecore_X_Window w,
+                                    const char *target);
+EAPI Eina_Bool
+ecore_x_selection_convert(Ecore_X_Atom selection,
+                          Ecore_X_Atom target,
+                          void **data_ret,
+                          int *len,
+                          Ecore_X_Atom *targprop,
+                          int *targsize);
+EAPI void
+ecore_x_selection_converter_add(char *target,
+                                Eina_Bool (*func)(char *target,
+                                                  void *data,
+                                                  int size,
+                                                  void **data_ret,
+                                                  int *size_ret,
+                                                  Ecore_X_Atom *,
+                                                  int *));
+EAPI void
+ecore_x_selection_converter_atom_add(Ecore_X_Atom target,
+                                     Eina_Bool (*func)(char *target,
+                                                       void *data,
+                                                       int size,
+                                                       void **data_ret,
+                                                       int *size_ret,
                                                        Ecore_X_Atom *tprop,
-                                                       int          *tsize));
-EAPI void                ecore_x_selection_converter_del(char *target);
-EAPI void                ecore_x_selection_converter_atom_del(Ecore_X_Atom target);
-EAPI void                ecore_x_selection_parser_add(const char *target,
-                                                      void *(*func)(const char *target,
-                                                                    void *data, int size,
-                                                                    int format));
-EAPI void                ecore_x_selection_parser_del(const char *target);
-EAPI void                ecore_x_selection_owner_set(Ecore_X_Window win, Ecore_X_Atom atom, Ecore_X_Time tm);
-EAPI Ecore_X_Window      ecore_x_selection_owner_get(Ecore_X_Atom atom);
-
-EAPI void                ecore_x_dnd_aware_set(Ecore_X_Window win, Eina_Bool on);
-EAPI int                 ecore_x_dnd_version_get(Ecore_X_Window win);
-EAPI Eina_Bool           ecore_x_dnd_type_isset(Ecore_X_Window win,
-                                                const char    *type);
-EAPI void                ecore_x_dnd_type_set(Ecore_X_Window win,
-                                              const char    *type,
-                                              Eina_Bool      on);
-EAPI void                ecore_x_dnd_types_set(Ecore_X_Window win,
-                                               const char   **types,
-                                               unsigned int   num_types);
-EAPI void                ecore_x_dnd_actions_set(Ecore_X_Window win,
-                                                 Ecore_X_Atom  *actions,
-                                                 unsigned int   num_actions);
-EAPI Eina_Bool           ecore_x_dnd_begin(Ecore_X_Window source,
-                                           unsigned char *data,
-                                           int            size);
-EAPI Eina_Bool           ecore_x_dnd_drop(void);
-EAPI void                ecore_x_dnd_send_status(Eina_Bool         will_accept,
-                                                 Eina_Bool         suppress,
-                                                 Ecore_X_Rectangle rectangle,
-                                                 Ecore_X_Atom      action);
-EAPI void                ecore_x_dnd_send_finished(void);
-EAPI void                ecore_x_dnd_source_action_set(Ecore_X_Atom action);
-EAPI Ecore_X_Atom        ecore_x_dnd_source_action_get(void);
-EAPI void                ecore_x_dnd_callback_pos_update_set(void (*cb)(void *, Ecore_X_Xdnd_Position *data),
-                                                            const void *data);
-
-EAPI Ecore_X_Window      ecore_x_window_new(Ecore_X_Window parent,
-                                            int            x,
-                                            int            y,
-                                            int            w,
-                                            int            h);
-EAPI Ecore_X_Window      ecore_x_window_override_new(Ecore_X_Window parent,
-                                                     int            x,
-                                                     int            y,
-                                                     int            w,
-                                                     int            h);
-EAPI int                 ecore_x_window_argb_get(Ecore_X_Window win);
-EAPI Ecore_X_Window      ecore_x_window_manager_argb_new(Ecore_X_Window parent,
-                                                         int            x,
-                                                         int            y,
-                                                         int            w,
-                                                         int            h);
-EAPI Ecore_X_Window      ecore_x_window_argb_new(Ecore_X_Window parent,
-                                                 int            x,
-                                                 int            y,
-                                                 int            w,
-                                                 int            h);
-EAPI Ecore_X_Window      ecore_x_window_override_argb_new(Ecore_X_Window parent,
-                                                          int            x,
-                                                          int            y,
-                                                          int            w,
-                                                          int            h);
-EAPI Ecore_X_Window      ecore_x_window_input_new(Ecore_X_Window parent,
-                                                  int            x,
-                                                  int            y,
-                                                  int            w,
-                                                  int            h);
-EAPI void                ecore_x_window_configure(
-   Ecore_X_Window win,
-   Ecore_X_Window_Configure_Mask
-   mask,
-   int            x,
-   int            y,
-   int            w,
-   int            h,
-   int            border_width,
-   Ecore_X_Window sibling,
-   int            stack_mode);
-EAPI void                ecore_x_window_cursor_set(Ecore_X_Window win,
-                                                   Ecore_X_Cursor c);
-EAPI void                ecore_x_window_free(Ecore_X_Window win);
-EAPI void                ecore_x_window_ignore_set(Ecore_X_Window win,
-                                                   int            ignore);
-EAPI Ecore_X_Window *    ecore_x_window_ignore_list(int *num);
-
-EAPI void                ecore_x_window_delete_request_send(
-   Ecore_X_Window win);
-EAPI void                ecore_x_window_show(Ecore_X_Window win);
-EAPI void                ecore_x_window_hide(Ecore_X_Window win);
-EAPI void                ecore_x_window_move(Ecore_X_Window win,
-                                             int            x,
-                                             int            y);
-EAPI void                ecore_x_window_resize(Ecore_X_Window win,
-                                               int            w,
-                                               int            h);
-EAPI void                ecore_x_window_move_resize(Ecore_X_Window win,
-                                                    int            x,
-                                                    int            y,
-                                                    int            w,
-                                                    int            h);
-EAPI void                ecore_x_window_focus(Ecore_X_Window win);
-EAPI void                ecore_x_window_focus_at_time(Ecore_X_Window win,
-                                                      Ecore_X_Time   t);
-EAPI Ecore_X_Window      ecore_x_window_focus_get(void);
-EAPI void                ecore_x_window_raise(Ecore_X_Window win);
-EAPI void                ecore_x_window_lower(Ecore_X_Window win);
-EAPI void                ecore_x_window_reparent(Ecore_X_Window win,
-                                                 Ecore_X_Window new_parent,
-                                                 int            x,
-                                                 int            y);
-EAPI void                ecore_x_window_size_get(Ecore_X_Window win,
-                                                 int           *w,
-                                                 int           *h);
-EAPI void                ecore_x_window_geometry_get(Ecore_X_Window win,
-                                                     int           *x,
-                                                     int           *y,
-                                                     int           *w,
-                                                     int           *h);
-EAPI int                 ecore_x_window_border_width_get(
-   Ecore_X_Window win);
-EAPI void                ecore_x_window_border_width_set(
-   Ecore_X_Window win,
-   int            width);
-EAPI int                 ecore_x_window_depth_get(Ecore_X_Window win);
-EAPI void                ecore_x_window_cursor_show(Ecore_X_Window win,
-                                                    Eina_Bool      show);
-EAPI void                ecore_x_window_defaults_set(Ecore_X_Window win);
-EAPI int                 ecore_x_window_visible_get(Ecore_X_Window win);
-EAPI Ecore_X_Window      ecore_x_window_shadow_tree_at_xy_with_skip_get(
-   Ecore_X_Window  base,
-   int             x,
-   int             y,
-   Ecore_X_Window *skip,
-   int             skip_num);
-EAPI Ecore_X_Window      ecore_x_window_shadow_parent_get(
-   Ecore_X_Window root,
-   Ecore_X_Window win);
-EAPI void                ecore_x_window_shadow_tree_flush(void);
-EAPI Ecore_X_Window      ecore_x_window_root_get(Ecore_X_Window win);
-EAPI Ecore_X_Window      ecore_x_window_at_xy_get(int x, int y);
-EAPI Ecore_X_Window      ecore_x_window_at_xy_with_skip_get(int             x,
-                                                            int             y,
-                                                            Ecore_X_Window *skip,
-                                                            int             skip_num);
-EAPI Ecore_X_Window      ecore_x_window_at_xy_begin_get(
-   Ecore_X_Window begin,
-   int            x,
-   int            y);
-EAPI Ecore_X_Window      ecore_x_window_parent_get(Ecore_X_Window win);
-
-EAPI void                ecore_x_window_background_color_set(
-   Ecore_X_Window win,
-   unsigned
-   short          r,
-   unsigned
-   short          g,
-   unsigned
-   short          b);
-EAPI void      ecore_x_window_gravity_set(Ecore_X_Window  win,
-                                          Ecore_X_Gravity grav);
-EAPI void      ecore_x_window_pixel_gravity_set(
-   Ecore_X_Window win,
-   Ecore_X_Gravity
-   grav);
-EAPI void      ecore_x_window_pixmap_set(Ecore_X_Window win,
-                                         Ecore_X_Pixmap pmap);
-EAPI void      ecore_x_window_area_clear(Ecore_X_Window win,
-                                         int            x,
-                                         int            y,
-                                         int            w,
-                                         int            h);
-EAPI void      ecore_x_window_area_expose(Ecore_X_Window win,
-                                          int            x,
-                                          int            y,
-                                          int            w,
-                                          int            h);
-EAPI void      ecore_x_window_override_set(Ecore_X_Window win,
-                                           Eina_Bool      override);
-
-EAPI void      ecore_x_window_prop_card32_set(
-   Ecore_X_Window win,
-   Ecore_X_Atom   atom,
-   unsigned int  *val,
-   unsigned int   num);
-EAPI int       ecore_x_window_prop_card32_get(
-   Ecore_X_Window win,
-   Ecore_X_Atom   atom,
-   unsigned int  *val,
-   unsigned int   len);
-EAPI int       ecore_x_window_prop_card32_list_get(
-   Ecore_X_Window win,
-   Ecore_X_Atom
-   atom,
-   unsigned int
-                **plst);
-
-EAPI void      ecore_x_window_prop_xid_set(Ecore_X_Window win,
-                                           Ecore_X_Atom   atom,
-                                           Ecore_X_Atom   type,
-                                           Ecore_X_ID    *lst,
-                                           unsigned int   num);
-EAPI int       ecore_x_window_prop_xid_get(Ecore_X_Window win,
-                                           Ecore_X_Atom   atom,
-                                           Ecore_X_Atom   type,
-                                           Ecore_X_ID    *lst,
-                                           unsigned int   len);
-EAPI int       ecore_x_window_prop_xid_list_get(
-   Ecore_X_Window win,
-   Ecore_X_Atom
-   atom,
-   Ecore_X_Atom
-   type,
-   Ecore_X_ID **
-   plst);
-EAPI void      ecore_x_window_prop_xid_list_change(
-   Ecore_X_Window win,
-   Ecore_X_Atom
-   atom,
-   Ecore_X_Atom
-   type,
-   Ecore_X_ID
-   item,
-   int            op);
-EAPI void      ecore_x_window_prop_atom_set(Ecore_X_Window win,
-                                            Ecore_X_Atom   atom,
-                                            Ecore_X_Atom  *val,
-                                            unsigned int   num);
-EAPI int       ecore_x_window_prop_atom_get(Ecore_X_Window win,
-                                            Ecore_X_Atom   atom,
-                                            Ecore_X_Atom  *val,
-                                            unsigned int   len);
-EAPI int       ecore_x_window_prop_atom_list_get(
-   Ecore_X_Window win,
-   Ecore_X_Atom
-   atom,
-   Ecore_X_Atom *
-                 *plst);
-EAPI void      ecore_x_window_prop_atom_list_change(
-   Ecore_X_Window win,
-   Ecore_X_Atom
-   atom,
-   Ecore_X_Atom
-   item,
-   int            op);
-EAPI void      ecore_x_window_prop_window_set(
-   Ecore_X_Window win,
-   Ecore_X_Atom   atom,
-   Ecore_X_Window *
-   val,
-   unsigned int   num);
-EAPI int       ecore_x_window_prop_window_get(
-   Ecore_X_Window win,
-   Ecore_X_Atom   atom,
-   Ecore_X_Window *
-   val,
-   unsigned int   len);
-EAPI int       ecore_x_window_prop_window_list_get(
-   Ecore_X_Window win,
-   Ecore_X_Atom
-   atom,
-   Ecore_X_Window
-                **plst);
-
-EAPI Ecore_X_Atom      ecore_x_window_prop_any_type(void);
-EAPI void              ecore_x_window_prop_property_set(
-   Ecore_X_Window win,
-   Ecore_X_Atom   type,
-   Ecore_X_Atom   format,
-   int            size,
-   void          *data,
-   int            number);
-EAPI int       ecore_x_window_prop_property_get(
-   Ecore_X_Window  win,
-   Ecore_X_Atom    property,
-   Ecore_X_Atom    type,
-   int             size,
-   unsigned char **data,
-   int            *num);
-EAPI void                     ecore_x_window_prop_property_del(
-   Ecore_X_Window win,
-   Ecore_X_Atom   property);
-EAPI Ecore_X_Atom *           ecore_x_window_prop_list(Ecore_X_Window win,
-                                                       int           *num_ret);
-EAPI void                     ecore_x_window_prop_string_set(
-   Ecore_X_Window win,
-   Ecore_X_Atom   type,
-   const char    *str);
-EAPI char *                   ecore_x_window_prop_string_get(
-   Ecore_X_Window win,
-   Ecore_X_Atom   type);
-EAPI Eina_Bool                ecore_x_window_prop_protocol_isset(
-   Ecore_X_Window      win,
-   Ecore_X_WM_Protocol protocol);
-EAPI Ecore_X_WM_Protocol *    ecore_x_window_prop_protocol_list_get(
-   Ecore_X_Window win,
-   int           *num_ret);
-
-EAPI void                     ecore_x_window_shape_mask_set(Ecore_X_Window win,
-                                                            Ecore_X_Pixmap mask);
-EAPI void                     ecore_x_window_shape_window_set(
-   Ecore_X_Window win,
-   Ecore_X_Window shape_win);
-EAPI void                     ecore_x_window_shape_window_set_xy(
-   Ecore_X_Window win,
-   Ecore_X_Window shape_win,
-   int            x,
-   int            y);
-EAPI void                     ecore_x_window_shape_window_set_xy(
-   Ecore_X_Window win,
-   Ecore_X_Window shape_win,
-   int            x,
-   int            y);
-EAPI void                     ecore_x_window_shape_rectangle_set(
-   Ecore_X_Window win,
-   int            x,
-   int            y,
-   int            w,
-   int            h);
-EAPI void                     ecore_x_window_shape_rectangles_set(
-   Ecore_X_Window     win,
-   Ecore_X_Rectangle *rects,
-   int                num);
-EAPI void                     ecore_x_window_shape_input_rectangle_set(
-   Ecore_X_Window win,
-   int            x,
-   int            y,
-   int            w,
-   int            h);
-EAPI void                     ecore_x_window_shape_input_rectangles_set(
-   Ecore_X_Window     win,
-   Ecore_X_Rectangle *rects,
-   int                num);
-EAPI void                     ecore_x_window_shape_input_rectangle_add(
-   Ecore_X_Window win,
-   int            x,
-   int            y,
-   int            w,
-   int            h);
-EAPI void                     ecore_x_window_shape_rectangle_subtract(
-   Ecore_X_Window win,
-   int            x,
-   int            y,
-   int            w,
-   int            h);
-EAPI void                     ecore_x_window_shape_input_rectangle_subtract(
-   Ecore_X_Window win,
-   int            x,
-   int            y,
-   int            w,
-   int            h);
-EAPI void                     ecore_x_window_shape_input_window_set_xy(
-   Ecore_X_Window win,
-   Ecore_X_Window shape_win,
-   int            x,
-   int            y);
-EAPI void                     ecore_x_window_shape_input_window_set(
-   Ecore_X_Window win,
-   Ecore_X_Window shape_win);
-EAPI void                     ecore_x_window_shape_window_add(
-   Ecore_X_Window win,
-   Ecore_X_Window shape_win);
-EAPI void                     ecore_x_window_shape_window_add_xy(
-   Ecore_X_Window win,
-   Ecore_X_Window shape_win,
-   int            x,
-   int            y);
-EAPI void                     ecore_x_window_shape_input_window_add_xy(
-   Ecore_X_Window win,
-   Ecore_X_Window shape_win,
-   int            x,
-   int            y);
-EAPI void                     ecore_x_window_shape_rectangle_add(
-   Ecore_X_Window win,
-   int            x,
-   int            y,
-   int            w,
-   int            h);
-EAPI void                     ecore_x_window_shape_rectangle_clip(
-   Ecore_X_Window win,
-   int            x,
-   int            y,
-   int            w,
-   int            h);
-EAPI void                     ecore_x_window_shape_input_rectangle_clip(
-   Ecore_X_Window win,
-   int            x,
-   int            y,
-   int            w,
-   int            h);
-EAPI void                     ecore_x_window_shape_rectangles_add(
-   Ecore_X_Window     win,
-   Ecore_X_Rectangle *rects,
-   int                num);
-EAPI void                     ecore_x_window_shape_input_rectangles_add(
-   Ecore_X_Window     win,
-   Ecore_X_Rectangle *rects,
-   int                num);
-EAPI Ecore_X_Rectangle *      ecore_x_window_shape_rectangles_get(
-   Ecore_X_Window win,
-   int           *num_ret);
-EAPI Ecore_X_Rectangle *      ecore_x_window_shape_input_rectangles_get(
-   Ecore_X_Window win,
-   int           *num_ret);
-EAPI void                     ecore_x_window_shape_events_select(
-   Ecore_X_Window win,
-   Eina_Bool      on);
-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_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_free(Ecore_X_GC gc);
-EAPI void            ecore_x_gc_foreground_set(Ecore_X_GC gc, unsigned long foreground);
-EAPI void            ecore_x_gc_background_set(Ecore_X_GC gc, unsigned long background);
-
-EAPI Eina_Bool       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 Eina_Bool ecore_x_client_message8_send(Ecore_X_Window win,
-                                            Ecore_X_Atom   type,
-                                            const void    *data,
-                                            int            len);
-EAPI Eina_Bool ecore_x_mouse_move_send(Ecore_X_Window win,
-                                       int            x,
-                                       int            y);
-EAPI Eina_Bool ecore_x_mouse_down_send(Ecore_X_Window win,
-                                       int            x,
-                                       int            y,
-                                       int            b);
-EAPI Eina_Bool ecore_x_mouse_up_send(Ecore_X_Window win,
-                                     int            x,
-                                     int            y,
-                                     int            b);
-
-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 Eina_Bool                      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);
-EAPI void                           ecore_x_cursor_free(Ecore_X_Cursor c);
-EAPI Ecore_X_Cursor                 ecore_x_cursor_shape_get(int shape);
-EAPI void                           ecore_x_cursor_size_set(int size);
-EAPI int                            ecore_x_cursor_size_get(void);
+                                                       int *tsize));
+EAPI void
+ ecore_x_selection_converter_del(char *target);
+EAPI void
+ ecore_x_selection_converter_atom_del(Ecore_X_Atom target);
+EAPI void
+ ecore_x_selection_parser_add(const char *target,
+                             void *(*func)(const char *target, void *data, int size, int format));
+EAPI void
+ ecore_x_selection_parser_del(const char *target);
+EAPI void
+ ecore_x_selection_owner_set(Ecore_X_Window win,
+                            Ecore_X_Atom atom,
+                            Ecore_X_Time tm);
+EAPI Ecore_X_Window
+ecore_x_selection_owner_get(Ecore_X_Atom atom);
+
+EAPI void
+ecore_x_dnd_aware_set(Ecore_X_Window win,
+                      Eina_Bool on);
+EAPI int
+ ecore_x_dnd_version_get(Ecore_X_Window win);
+EAPI Eina_Bool
+ ecore_x_dnd_type_isset(Ecore_X_Window win,
+                       const char *type);
+EAPI void
+ecore_x_dnd_type_set(Ecore_X_Window win,
+                     const char *type,
+                     Eina_Bool on);
+EAPI void
+ecore_x_dnd_types_set(Ecore_X_Window win,
+                      const char **types,
+                      unsigned int num_types);
+EAPI void
+ecore_x_dnd_actions_set(Ecore_X_Window win,
+                        Ecore_X_Atom *actions,
+                        unsigned int num_actions);
+EAPI Eina_Bool
+ecore_x_dnd_begin(Ecore_X_Window source,
+                  unsigned char *data,
+                  int size);
+EAPI Eina_Bool
+ ecore_x_dnd_drop(void);
+EAPI void
+ ecore_x_dnd_send_status(Eina_Bool will_accept,
+                        Eina_Bool suppress,
+                        Ecore_X_Rectangle rectangle,
+                        Ecore_X_Atom action);
+EAPI void
+ ecore_x_dnd_send_finished(void);
+EAPI void
+ ecore_x_dnd_source_action_set(Ecore_X_Atom action);
+EAPI Ecore_X_Atom
+ ecore_x_dnd_source_action_get(void);
+EAPI void
+ ecore_x_dnd_callback_pos_update_set(void (*cb)(void *,
+                                               Ecore_X_Xdnd_Position *data),
+                                    const void *data);
+
+EAPI Ecore_X_Window
+ecore_x_window_new(Ecore_X_Window parent,
+                   int x,
+                   int y,
+                   int w,
+                   int h);
+EAPI Ecore_X_Window
+ecore_x_window_override_new(Ecore_X_Window parent,
+                            int x,
+                            int y,
+                            int w,
+                            int h);
+EAPI int
+ ecore_x_window_argb_get(Ecore_X_Window win);
+EAPI Ecore_X_Window
+ ecore_x_window_manager_argb_new(Ecore_X_Window parent,
+                                int x,
+                                int y,
+                                int w,
+                                int h);
+EAPI Ecore_X_Window
+ecore_x_window_argb_new(Ecore_X_Window parent,
+                        int x,
+                        int y,
+                        int w,
+                        int h);
+EAPI Ecore_X_Window
+ecore_x_window_override_argb_new(Ecore_X_Window parent,
+                                 int x,
+                                 int y,
+                                 int w,
+                                 int h);
+EAPI Ecore_X_Window
+ecore_x_window_input_new(Ecore_X_Window parent,
+                         int x,
+                         int y,
+                         int w,
+                         int h);
+EAPI void
+ecore_x_window_configure(Ecore_X_Window win,
+                         Ecore_X_Window_Configure_Mask mask,
+                         int x,
+                         int y,
+                         int w,
+                         int h,
+                         int border_width,
+                         Ecore_X_Window sibling,
+                         int stack_mode);
+EAPI void
+ecore_x_window_cursor_set(Ecore_X_Window win,
+                          Ecore_X_Cursor c);
+EAPI void
+ ecore_x_window_free(Ecore_X_Window win);
+EAPI void
+ ecore_x_window_ignore_set(Ecore_X_Window win,
+                          int ignore);
+EAPI Ecore_X_Window *
+ecore_x_window_ignore_list(int *num);
+
+EAPI void
+ ecore_x_window_delete_request_send(Ecore_X_Window win);
+EAPI void
+ ecore_x_window_show(Ecore_X_Window win);
+EAPI void
+ ecore_x_window_hide(Ecore_X_Window win);
+EAPI void
+ ecore_x_window_move(Ecore_X_Window win,
+                    int x,
+                    int y);
+EAPI void
+ecore_x_window_resize(Ecore_X_Window win,
+                      int w,
+                      int h);
+EAPI void
+ecore_x_window_move_resize(Ecore_X_Window win,
+                           int x,
+                           int y,
+                           int w,
+                           int h);
+EAPI void
+ ecore_x_window_focus(Ecore_X_Window win);
+EAPI void
+ ecore_x_window_focus_at_time(Ecore_X_Window win,
+                             Ecore_X_Time t);
+EAPI Ecore_X_Window
+ ecore_x_window_focus_get(void);
+EAPI void
+ ecore_x_window_raise(Ecore_X_Window win);
+EAPI void
+ ecore_x_window_lower(Ecore_X_Window win);
+EAPI void
+ ecore_x_window_reparent(Ecore_X_Window win,
+                        Ecore_X_Window new_parent,
+                        int x,
+                        int y);
+EAPI void
+ecore_x_window_size_get(Ecore_X_Window win,
+                        int *w,
+                        int *h);
+EAPI void
+ecore_x_window_geometry_get(Ecore_X_Window win,
+                            int *x,
+                            int *y,
+                            int *w,
+                            int *h);
+EAPI int
+ ecore_x_window_border_width_get(Ecore_X_Window win);
+EAPI void
+ ecore_x_window_border_width_set(Ecore_X_Window win,
+                                int width);
+EAPI int
+ ecore_x_window_depth_get(Ecore_X_Window win);
+EAPI void
+ ecore_x_window_cursor_show(Ecore_X_Window win,
+                           Eina_Bool show);
+EAPI void
+ ecore_x_window_defaults_set(Ecore_X_Window win);
+EAPI int
+ ecore_x_window_visible_get(Ecore_X_Window win);
+EAPI Ecore_X_Window
+ ecore_x_window_shadow_tree_at_xy_with_skip_get(Ecore_X_Window base,
+                                               int x,
+                                               int y,
+                                               Ecore_X_Window *skip,
+                                               int skip_num);
+EAPI Ecore_X_Window
+ecore_x_window_shadow_parent_get(Ecore_X_Window root,
+                                 Ecore_X_Window win);
+EAPI void
+ ecore_x_window_shadow_tree_flush(void);
+EAPI Ecore_X_Window
+ ecore_x_window_root_get(Ecore_X_Window win);
+EAPI Ecore_X_Window
+ ecore_x_window_at_xy_get(int x,
+                         int y);
+EAPI Ecore_X_Window
+ecore_x_window_at_xy_with_skip_get(int x,
+                                   int y,
+                                   Ecore_X_Window *skip,
+                                   int skip_num);
+EAPI Ecore_X_Window
+ecore_x_window_at_xy_begin_get(Ecore_X_Window begin,
+                               int x,
+                               int y);
+EAPI Ecore_X_Window
+ecore_x_window_parent_get(Ecore_X_Window win);
+
+EAPI void
+ecore_x_window_background_color_set(Ecore_X_Window win,
+                                    unsigned short r,
+                                    unsigned short g,
+                                    unsigned short b);
+EAPI void
+ecore_x_window_gravity_set(Ecore_X_Window win,
+                           Ecore_X_Gravity grav);
+EAPI void
+ecore_x_window_pixel_gravity_set(Ecore_X_Window win,
+                                 Ecore_X_Gravity grav);
+EAPI void
+ecore_x_window_pixmap_set(Ecore_X_Window win,
+                          Ecore_X_Pixmap pmap);
+EAPI void
+ecore_x_window_area_clear(Ecore_X_Window win,
+                          int x,
+                          int y,
+                          int w,
+                          int h);
+EAPI void
+ecore_x_window_area_expose(Ecore_X_Window win,
+                           int x,
+                           int y,
+                           int w,
+                           int h);
+EAPI void
+ecore_x_window_override_set(Ecore_X_Window win,
+                            Eina_Bool override);
+
+EAPI void
+ecore_x_window_prop_card32_set(Ecore_X_Window win,
+                               Ecore_X_Atom atom,
+                               unsigned int *val,
+                               unsigned int num);
+EAPI int
+ecore_x_window_prop_card32_get(Ecore_X_Window win,
+                               Ecore_X_Atom atom,
+                               unsigned int *val,
+                               unsigned int len);
+EAPI int
+ecore_x_window_prop_card32_list_get(Ecore_X_Window win,
+                                    Ecore_X_Atom atom,
+                                    unsigned int **plst);
+
+EAPI void
+ecore_x_window_prop_xid_set(Ecore_X_Window win,
+                            Ecore_X_Atom atom,
+                            Ecore_X_Atom type,
+                            Ecore_X_ID *lst,
+                            unsigned int num);
+EAPI int
+ecore_x_window_prop_xid_get(Ecore_X_Window win,
+                            Ecore_X_Atom atom,
+                            Ecore_X_Atom type,
+                            Ecore_X_ID *lst,
+                            unsigned int len);
+EAPI int
+ecore_x_window_prop_xid_list_get(Ecore_X_Window win,
+                                 Ecore_X_Atom atom,
+                                 Ecore_X_Atom type,
+                                 Ecore_X_ID **plst);
+EAPI void
+ecore_x_window_prop_xid_list_change(Ecore_X_Window win,
+                                    Ecore_X_Atom atom,
+                                    Ecore_X_Atom type,
+                                    Ecore_X_ID item,
+                                    int op);
+EAPI void
+ecore_x_window_prop_atom_set(Ecore_X_Window win,
+                             Ecore_X_Atom atom,
+                             Ecore_X_Atom *val,
+                             unsigned int num);
+EAPI int
+ecore_x_window_prop_atom_get(Ecore_X_Window win,
+                             Ecore_X_Atom atom,
+                             Ecore_X_Atom *val,
+                             unsigned int len);
+EAPI int
+ecore_x_window_prop_atom_list_get(Ecore_X_Window win,
+                                  Ecore_X_Atom atom,
+                                  Ecore_X_Atom **plst);
+EAPI void
+ecore_x_window_prop_atom_list_change(Ecore_X_Window win,
+                                     Ecore_X_Atom atom,
+                                     Ecore_X_Atom item,
+                                     int op);
+EAPI void
+ecore_x_window_prop_window_set(Ecore_X_Window win,
+                               Ecore_X_Atom atom,
+                               Ecore_X_Window *val,
+                               unsigned int num);
+EAPI int
+ecore_x_window_prop_window_get(Ecore_X_Window win,
+                               Ecore_X_Atom atom,
+                               Ecore_X_Window *val,
+                               unsigned int len);
+EAPI int
+ecore_x_window_prop_window_list_get(Ecore_X_Window win,
+                                    Ecore_X_Atom atom,
+                                    Ecore_X_Window **plst);
+
+EAPI Ecore_X_Atom
+ ecore_x_window_prop_any_type(void);
+EAPI void
+ ecore_x_window_prop_property_set(Ecore_X_Window win,
+                                 Ecore_X_Atom type,
+                                 Ecore_X_Atom format,
+                                 int size,
+                                 void *data,
+                                 int number);
+EAPI int
+ecore_x_window_prop_property_get(Ecore_X_Window win,
+                                 Ecore_X_Atom property,
+                                 Ecore_X_Atom type,
+                                 int size,
+                                 unsigned char **data,
+                                 int *num);
+EAPI void
+ecore_x_window_prop_property_del(Ecore_X_Window win,
+                                 Ecore_X_Atom property);
+EAPI Ecore_X_Atom *
+ecore_x_window_prop_list(Ecore_X_Window win,
+                         int *num_ret);
+EAPI void
+ecore_x_window_prop_string_set(Ecore_X_Window win,
+                               Ecore_X_Atom type,
+                               const char *str);
+EAPI char *
+ecore_x_window_prop_string_get(Ecore_X_Window win,
+                               Ecore_X_Atom type);
+EAPI Eina_Bool
+ecore_x_window_prop_protocol_isset(Ecore_X_Window win,
+                                   Ecore_X_WM_Protocol protocol);
+EAPI Ecore_X_WM_Protocol *
+ecore_x_window_prop_protocol_list_get(Ecore_X_Window win,
+                                      int *num_ret);
+
+EAPI void
+ecore_x_window_shape_mask_set(Ecore_X_Window win,
+                              Ecore_X_Pixmap mask);
+EAPI void
+ecore_x_window_shape_window_set(Ecore_X_Window win,
+                                Ecore_X_Window shape_win);
+EAPI void
+ecore_x_window_shape_window_set_xy(Ecore_X_Window win,
+                                   Ecore_X_Window shape_win,
+                                   int x,
+                                   int y);
+EAPI void
+ecore_x_window_shape_rectangle_set(Ecore_X_Window win,
+                                   int x,
+                                   int y,
+                                   int w,
+                                   int h);
+EAPI void
+ecore_x_window_shape_rectangles_set(Ecore_X_Window win,
+                                    Ecore_X_Rectangle *rects,
+                                    int num);
+EAPI void
+ecore_x_window_shape_input_rectangle_set(Ecore_X_Window win,
+                                         int x,
+                                         int y,
+                                         int w,
+                                         int h);
+EAPI void
+ecore_x_window_shape_input_rectangles_set(Ecore_X_Window win,
+                                          Ecore_X_Rectangle *rects,
+                                          int num);
+EAPI void
+ecore_x_window_shape_input_rectangle_add(Ecore_X_Window win,
+                                         int x,
+                                         int y,
+                                         int w,
+                                         int h);
+EAPI void
+ecore_x_window_shape_rectangle_subtract(Ecore_X_Window win,
+                                        int x,
+                                        int y,
+                                        int w,
+                                        int h);
+EAPI void
+ecore_x_window_shape_input_rectangle_subtract(Ecore_X_Window win,
+                                              int x,
+                                              int y,
+                                              int w,
+                                              int h);
+EAPI void
+ecore_x_window_shape_input_window_set_xy(Ecore_X_Window win,
+                                         Ecore_X_Window shape_win,
+                                         int x,
+                                         int y);
+EAPI void
+ecore_x_window_shape_input_window_set(Ecore_X_Window win,
+                                      Ecore_X_Window shape_win);
+EAPI void
+ecore_x_window_shape_window_add(Ecore_X_Window win,
+                                Ecore_X_Window shape_win);
+EAPI void
+ecore_x_window_shape_window_add_xy(Ecore_X_Window win,
+                                   Ecore_X_Window shape_win,
+                                   int x,
+                                   int y);
+EAPI void
+ecore_x_window_shape_input_window_add_xy(Ecore_X_Window win,
+                                         Ecore_X_Window shape_win,
+                                         int x,
+                                         int y);
+EAPI void
+ecore_x_window_shape_rectangle_add(Ecore_X_Window win,
+                                   int x,
+                                   int y,
+                                   int w,
+                                   int h);
+EAPI void
+ecore_x_window_shape_rectangle_clip(Ecore_X_Window win,
+                                    int x,
+                                    int y,
+                                    int w,
+                                    int h);
+EAPI void
+ecore_x_window_shape_input_rectangle_clip(Ecore_X_Window win,
+                                          int x,
+                                          int y,
+                                          int w,
+                                          int h);
+EAPI void
+ecore_x_window_shape_rectangles_add(Ecore_X_Window win,
+                                    Ecore_X_Rectangle *rects,
+                                    int num);
+EAPI void
+ecore_x_window_shape_input_rectangles_add(Ecore_X_Window win,
+                                          Ecore_X_Rectangle *rects,
+                                          int num);
+EAPI Ecore_X_Rectangle *
+ecore_x_window_shape_rectangles_get(Ecore_X_Window win,
+                                    int *num_ret);
+EAPI Ecore_X_Rectangle *
+ecore_x_window_shape_input_rectangles_get(Ecore_X_Window win,
+                                          int *num_ret);
+EAPI void
+ecore_x_window_shape_events_select(Ecore_X_Window win,
+                                   Eina_Bool on);
+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_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_free(Ecore_X_GC gc);
+EAPI void
+ ecore_x_gc_foreground_set(Ecore_X_GC gc,
+                          unsigned long foreground);
+EAPI void
+ecore_x_gc_background_set(Ecore_X_GC gc,
+                          unsigned long background);
+
+EAPI Eina_Bool
+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 Eina_Bool
+ecore_x_client_message8_send(Ecore_X_Window win,
+                             Ecore_X_Atom type,
+                             const void *data,
+                             int len);
+EAPI Eina_Bool
+ecore_x_mouse_move_send(Ecore_X_Window win,
+                        int x,
+                        int y);
+EAPI Eina_Bool
+ecore_x_mouse_down_send(Ecore_X_Window win,
+                        int x,
+                        int y,
+                        int b);
+EAPI Eina_Bool
+ecore_x_mouse_up_send(Ecore_X_Window win,
+                      int x,
+                      int y,
+                      int b);
+
+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 Eina_Bool
+ 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);
+EAPI void
+ ecore_x_cursor_free(Ecore_X_Cursor c);
+EAPI Ecore_X_Cursor
+ ecore_x_cursor_shape_get(int shape);
+EAPI void
+ ecore_x_cursor_size_set(int size);
+EAPI int
+ ecore_x_cursor_size_get(void);
 
 /* FIXME: these funcs need categorising */
-EAPI Ecore_X_Window *               ecore_x_window_root_list(int *num_ret);
-EAPI Ecore_X_Window                 ecore_x_window_root_first_get(void);
-EAPI Eina_Bool                      ecore_x_window_manage(Ecore_X_Window win);
-EAPI void                           ecore_x_window_container_manage(
-   Ecore_X_Window win);
-EAPI void                           ecore_x_window_client_manage(Ecore_X_Window win);
-EAPI void                           ecore_x_window_sniff(Ecore_X_Window win);
-EAPI void                           ecore_x_window_client_sniff(Ecore_X_Window win);
-
-EAPI Ecore_X_Atom                   ecore_x_atom_get(const char *name);
-EAPI void                           ecore_x_atoms_get(const char  **names,
-                                                      int           num,
-                                                      Ecore_X_Atom *atoms);
-EAPI char *                         ecore_x_atom_name_get(Ecore_X_Atom atom);
-
-EAPI void                           ecore_x_icccm_init(void);
-EAPI void                           ecore_x_icccm_state_set(
-   Ecore_X_Window win,
-   Ecore_X_Window_State_Hint
-   state);
-EAPI Ecore_X_Window_State_Hint      ecore_x_icccm_state_get(Ecore_X_Window win);
-EAPI void                           ecore_x_icccm_delete_window_send(
-   Ecore_X_Window win,
-   Ecore_X_Time   t);
-EAPI void                           ecore_x_icccm_take_focus_send(Ecore_X_Window win,
-                                                                  Ecore_X_Time   t);
-EAPI void                           ecore_x_icccm_save_yourself_send(
-   Ecore_X_Window win,
-   Ecore_X_Time   t);
-EAPI void                           ecore_x_icccm_move_resize_send(
-   Ecore_X_Window win,
-   int            x,
-   int            y,
-   int            w,
-   int            h);
-EAPI void                           ecore_x_icccm_hints_set(
-   Ecore_X_Window win,
-   Eina_Bool      accepts_focus,
-   Ecore_X_Window_State_Hint
-   initial_state,
-   Ecore_X_Pixmap
-   icon_pixmap,
-   Ecore_X_Pixmap icon_mask,
-   Ecore_X_Window
-   icon_window,
-   Ecore_X_Window
-   window_group,
-   Eina_Bool      is_urgent);
-EAPI Eina_Bool ecore_x_icccm_hints_get(Ecore_X_Window             win,
-                                      Eina_Bool                 *accepts_focus,
-                                      Ecore_X_Window_State_Hint *initial_state,
-                                      Ecore_X_Pixmap            *icon_pixmap,
-                                      Ecore_X_Pixmap            *icon_mask,
-                                      Ecore_X_Window            *icon_window,
-                                      Ecore_X_Window            *window_group,
-                                      Eina_Bool                 *is_urgent);
-EAPI void      ecore_x_icccm_size_pos_hints_set(Ecore_X_Window win,
-                                                Eina_Bool request_pos,
-                                                Ecore_X_Gravity gravity,
-                                                int min_w, int min_h,
-                                                int max_w, int max_h,
-                                                int base_w, int base_h,
-                                                int step_x, int step_y,
-                                                double min_aspect,
-                                                double max_aspect);
-EAPI Eina_Bool ecore_x_icccm_size_pos_hints_get(Ecore_X_Window win,
-                                               Eina_Bool *request_pos,
-                                               Ecore_X_Gravity *gravity,
-                                               int *min_w, int *min_h,
-                                               int *max_w, int *max_h,
-                                               int *base_w, int *base_h,
-                                               int *step_x, int *step_y,
-                                               double *min_aspect,
-                                               double *max_aspect);
-EAPI void                ecore_x_icccm_title_set(Ecore_X_Window win, const char *t);
-EAPI char *              ecore_x_icccm_title_get(Ecore_X_Window win);
-EAPI void                ecore_x_icccm_protocol_atoms_set(Ecore_X_Window win,
-                                                          Ecore_X_Atom  *protos,
-                                                          int            num);
-EAPI void                ecore_x_icccm_protocol_set(Ecore_X_Window      win,
-                                                    Ecore_X_WM_Protocol protocol,
-                                                    Eina_Bool           on);
-EAPI Eina_Bool           ecore_x_icccm_protocol_isset(Ecore_X_Window      win,
-                                                      Ecore_X_WM_Protocol protocol);
-EAPI void                ecore_x_icccm_name_class_set(Ecore_X_Window win,
-                                                      const char    *n,
-                                                      const char    *c);
-EAPI void                ecore_x_icccm_name_class_get(Ecore_X_Window win,
-                                                      char         **n,
-                                                      char         **c);
-EAPI char *              ecore_x_icccm_client_machine_get(Ecore_X_Window win);
-EAPI void                ecore_x_icccm_command_set(Ecore_X_Window win,
-                                                   int            argc,
-                                                   char         **argv);
-EAPI void                ecore_x_icccm_command_get(Ecore_X_Window win,
-                                                   int           *argc,
-                                                   char        ***argv);
-EAPI char *              ecore_x_icccm_icon_name_get(Ecore_X_Window win);
-EAPI void                ecore_x_icccm_icon_name_set(Ecore_X_Window win,
-                                                     const char    *t);
-EAPI void                ecore_x_icccm_colormap_window_set(Ecore_X_Window win,
-                                                           Ecore_X_Window subwin);
-EAPI void                ecore_x_icccm_colormap_window_unset(Ecore_X_Window win,
-                                                             Ecore_X_Window subwin);
-EAPI void                ecore_x_icccm_transient_for_set(Ecore_X_Window win,
-                                                         Ecore_X_Window forwin);
-EAPI void                ecore_x_icccm_transient_for_unset(Ecore_X_Window win);
-EAPI Ecore_X_Window      ecore_x_icccm_transient_for_get(Ecore_X_Window win);
-EAPI void                ecore_x_icccm_window_role_set(Ecore_X_Window win,
-                                                       const char    *role);
-EAPI char *              ecore_x_icccm_window_role_get(Ecore_X_Window win);
-EAPI void                ecore_x_icccm_client_leader_set(Ecore_X_Window win,
-                                                         Ecore_X_Window l);
-EAPI Ecore_X_Window      ecore_x_icccm_client_leader_get(Ecore_X_Window win);
-EAPI void                ecore_x_icccm_iconic_request_send(Ecore_X_Window win,
-                                                           Ecore_X_Window root);
+EAPI Ecore_X_Window *
+ ecore_x_window_root_list(int *num_ret);
+EAPI Ecore_X_Window
+ ecore_x_window_root_first_get(void);
+EAPI Eina_Bool
+ ecore_x_window_manage(Ecore_X_Window win);
+EAPI void
+ ecore_x_window_container_manage(Ecore_X_Window win);
+EAPI void
+ ecore_x_window_client_manage(Ecore_X_Window win);
+EAPI void
+ ecore_x_window_sniff(Ecore_X_Window win);
+EAPI void
+ ecore_x_window_client_sniff(Ecore_X_Window win);
+
+EAPI Ecore_X_Atom
+ ecore_x_atom_get(const char *name);
+EAPI void
+ ecore_x_atoms_get(const char **names,
+                  int num,
+                  Ecore_X_Atom *atoms);
+EAPI char *
+ecore_x_atom_name_get(Ecore_X_Atom atom);
+
+EAPI void
+ ecore_x_icccm_init(void);
+EAPI void
+ ecore_x_icccm_state_set(Ecore_X_Window win,
+                        Ecore_X_Window_State_Hint state);
+EAPI Ecore_X_Window_State_Hint
+ ecore_x_icccm_state_get(Ecore_X_Window win);
+EAPI void
+ ecore_x_icccm_delete_window_send(Ecore_X_Window win,
+                                 Ecore_X_Time t);
+EAPI void
+ecore_x_icccm_take_focus_send(Ecore_X_Window win,
+                              Ecore_X_Time t);
+EAPI void
+ecore_x_icccm_save_yourself_send(Ecore_X_Window win,
+                                 Ecore_X_Time t);
+EAPI void
+ecore_x_icccm_move_resize_send(Ecore_X_Window win,
+                               int x,
+                               int y,
+                               int w,
+                               int h);
+EAPI void
+ecore_x_icccm_hints_set(Ecore_X_Window win,
+                        Eina_Bool accepts_focus,
+                        Ecore_X_Window_State_Hint initial_state,
+                        Ecore_X_Pixmap icon_pixmap,
+                        Ecore_X_Pixmap icon_mask,
+                        Ecore_X_Window icon_window,
+                        Ecore_X_Window window_group,
+                        Eina_Bool is_urgent);
+EAPI Eina_Bool
+ecore_x_icccm_hints_get(Ecore_X_Window win,
+                        Eina_Bool *accepts_focus,
+                        Ecore_X_Window_State_Hint *initial_state,
+                        Ecore_X_Pixmap *icon_pixmap,
+                        Ecore_X_Pixmap *icon_mask,
+                        Ecore_X_Window *icon_window,
+                        Ecore_X_Window *window_group,
+                        Eina_Bool *is_urgent);
+EAPI void
+ecore_x_icccm_size_pos_hints_set(Ecore_X_Window win,
+                                 Eina_Bool request_pos,
+                                 Ecore_X_Gravity gravity,
+                                 int min_w,
+                                 int min_h,
+                                 int max_w,
+                                 int max_h,
+                                 int base_w,
+                                 int base_h,
+                                 int step_x,
+                                 int step_y,
+                                 double min_aspect,
+                                 double max_aspect);
+EAPI Eina_Bool
+ecore_x_icccm_size_pos_hints_get(Ecore_X_Window win,
+                                 Eina_Bool *request_pos,
+                                 Ecore_X_Gravity *gravity,
+                                 int *min_w,
+                                 int *min_h,
+                                 int *max_w,
+                                 int *max_h,
+                                 int *base_w,
+                                 int *base_h,
+                                 int *step_x,
+                                 int *step_y,
+                                 double *min_aspect,
+                                 double *max_aspect);
+EAPI void
+ecore_x_icccm_title_set(Ecore_X_Window win,
+                        const char *t);
+EAPI char *
+ ecore_x_icccm_title_get(Ecore_X_Window win);
+EAPI void
+ ecore_x_icccm_protocol_atoms_set(Ecore_X_Window win,
+                                 Ecore_X_Atom *protos,
+                                 int num);
+EAPI void
+ecore_x_icccm_protocol_set(Ecore_X_Window win,
+                           Ecore_X_WM_Protocol protocol,
+                           Eina_Bool on);
+EAPI Eina_Bool
+ecore_x_icccm_protocol_isset(Ecore_X_Window win,
+                             Ecore_X_WM_Protocol protocol);
+EAPI void
+ecore_x_icccm_name_class_set(Ecore_X_Window win,
+                             const char *n,
+                             const char *c);
+EAPI void
+ecore_x_icccm_name_class_get(Ecore_X_Window win,
+                             char **n,
+                             char **c);
+EAPI char *
+ ecore_x_icccm_client_machine_get(Ecore_X_Window win);
+EAPI void
+ ecore_x_icccm_command_set(Ecore_X_Window win,
+                          int argc,
+                          char **argv);
+EAPI void
+ecore_x_icccm_command_get(Ecore_X_Window win,
+                          int *argc,
+                          char ***argv);
+EAPI char *
+ ecore_x_icccm_icon_name_get(Ecore_X_Window win);
+EAPI void
+ ecore_x_icccm_icon_name_set(Ecore_X_Window win,
+                            const char *t);
+EAPI void
+ecore_x_icccm_colormap_window_set(Ecore_X_Window win,
+                                  Ecore_X_Window subwin);
+EAPI void
+ecore_x_icccm_colormap_window_unset(Ecore_X_Window win,
+                                    Ecore_X_Window subwin);
+EAPI void
+ecore_x_icccm_transient_for_set(Ecore_X_Window win,
+                                Ecore_X_Window forwin);
+EAPI void
+ ecore_x_icccm_transient_for_unset(Ecore_X_Window win);
+EAPI Ecore_X_Window
+ ecore_x_icccm_transient_for_get(Ecore_X_Window win);
+EAPI void
+ ecore_x_icccm_window_role_set(Ecore_X_Window win,
+                              const char *role);
+EAPI char *
+ ecore_x_icccm_window_role_get(Ecore_X_Window win);
+EAPI void
+ ecore_x_icccm_client_leader_set(Ecore_X_Window win,
+                                Ecore_X_Window l);
+EAPI Ecore_X_Window
+ ecore_x_icccm_client_leader_get(Ecore_X_Window win);
+EAPI void
+ ecore_x_icccm_iconic_request_send(Ecore_X_Window win,
+                                  Ecore_X_Window root);
 
 typedef enum _Ecore_X_MWM_Hint_Func
 {
@@ -1885,515 +2043,536 @@ typedef enum _Ecore_X_MWM_Hint_Input
    ECORE_X_MWM_HINT_INPUT_FULL_APPLICATION_MODAL = 3
 } Ecore_X_MWM_Hint_Input;
 
-EAPI Eina_Bool ecore_x_mwm_hints_get(
-   Ecore_X_Window win,
-   Ecore_X_MWM_Hint_Func
-                 *fhint,
-   Ecore_X_MWM_Hint_Decor
-                 *dhint,
-   Ecore_X_MWM_Hint_Input
-                 *ihint);
-EAPI void      ecore_x_mwm_borderless_set(
-   Ecore_X_Window win,
-   Eina_Bool      borderless);
+EAPI Eina_Bool
+ecore_x_mwm_hints_get(Ecore_X_Window win,
+                      Ecore_X_MWM_Hint_Func *fhint,
+                      Ecore_X_MWM_Hint_Decor *dhint,
+                      Ecore_X_MWM_Hint_Input *ihint);
+EAPI void
+ecore_x_mwm_borderless_set(Ecore_X_Window win,
+                           Eina_Bool borderless);
 
 /* netwm */
-EAPI void      ecore_x_netwm_init(void);
-EAPI void      ecore_x_netwm_shutdown(void);
-EAPI void      ecore_x_netwm_wm_identify(
-   Ecore_X_Window root,
-   Ecore_X_Window check,
-   const char    *wm_name);
-EAPI void      ecore_x_netwm_supported_set(
-   Ecore_X_Window root,
-   Ecore_X_Atom  *supported,
-   int            num);
-EAPI Eina_Bool ecore_x_netwm_supported_get(
-   Ecore_X_Window root,
-   Ecore_X_Atom **supported,
-   int           *num);
-EAPI void      ecore_x_netwm_desk_count_set(
-   Ecore_X_Window root,
-   unsigned int   n_desks);
-EAPI void      ecore_x_netwm_desk_roots_set(
-   Ecore_X_Window  root,
-   Ecore_X_Window *vroots,
-   unsigned int    n_desks);
-EAPI void      ecore_x_netwm_desk_names_set(
-   Ecore_X_Window root,
-   const char   **names,
-   unsigned int   n_desks);
-EAPI void      ecore_x_netwm_desk_size_set(
-   Ecore_X_Window root,
-   unsigned int   width,
-   unsigned int   height);
-EAPI void      ecore_x_netwm_desk_workareas_set(
-   Ecore_X_Window root,
-   unsigned int  *areas,
-   unsigned int   n_desks);
-EAPI void      ecore_x_netwm_desk_current_set(
-   Ecore_X_Window root,
-   unsigned int   desk);
-EAPI void      ecore_x_netwm_desk_viewports_set(
-   Ecore_X_Window root,
-   unsigned int  *origins,
-   unsigned int   n_desks);
-EAPI void      ecore_x_netwm_desk_layout_set(
-   Ecore_X_Window root,
-   int            orientation,
-   int            columns,
-   int            rows,
-   int            starting_corner);
-EAPI void      ecore_x_netwm_showing_desktop_set(
-   Ecore_X_Window root,
-   Eina_Bool      on);
-EAPI void      ecore_x_netwm_client_list_set(
-   Ecore_X_Window  root,
-   Ecore_X_Window *p_clients,
-   unsigned int    n_clients);
-EAPI void      ecore_x_netwm_client_list_stacking_set(
-   Ecore_X_Window  root,
-   Ecore_X_Window *p_clients,
-   unsigned int    n_clients);
-EAPI void      ecore_x_netwm_client_active_set(
-   Ecore_X_Window root,
-   Ecore_X_Window win);
-EAPI void      ecore_x_netwm_client_active_request(
-   Ecore_X_Window root,
-   Ecore_X_Window win,
-   int            type,
-   Ecore_X_Window current_win);
-EAPI void      ecore_x_netwm_name_set(Ecore_X_Window    win,
-                                            const char *name);
-EAPI int       ecore_x_netwm_name_get(Ecore_X_Window win,
-                                            char   **name);
-EAPI void      ecore_x_netwm_startup_id_set(
-   Ecore_X_Window win,
-   const char    *id);
-EAPI int       ecore_x_netwm_startup_id_get(
-   Ecore_X_Window win,
-   char         **id);
-EAPI void      ecore_x_netwm_visible_name_set(
-   Ecore_X_Window win,
-   const char    *name);
-EAPI int       ecore_x_netwm_visible_name_get(
-   Ecore_X_Window win,
-   char         **name);
-EAPI void      ecore_x_netwm_icon_name_set(
-   Ecore_X_Window win,
-   const char    *name);
-EAPI int       ecore_x_netwm_icon_name_get(
-   Ecore_X_Window win,
-   char         **name);
-EAPI void      ecore_x_netwm_visible_icon_name_set(
-   Ecore_X_Window win,
-   const char    *name);
-EAPI int       ecore_x_netwm_visible_icon_name_get(
-   Ecore_X_Window win,
-   char         **name);
-EAPI void      ecore_x_netwm_desktop_set(
-   Ecore_X_Window win,
-   unsigned int   desk);
-EAPI Eina_Bool ecore_x_netwm_desktop_get(
-   Ecore_X_Window win,
-   unsigned int  *desk);
-EAPI void      ecore_x_netwm_strut_set(Ecore_X_Window win,
-                                             int      left,
-                                             int      right,
-                                             int      top,
-                                             int      bottom);
-EAPI Eina_Bool ecore_x_netwm_strut_get(Ecore_X_Window win,
-                                             int     *left,
-                                             int     *right,
-                                             int     *top,
-                                             int     *bottom);
-EAPI void      ecore_x_netwm_strut_partial_set(
-   Ecore_X_Window win,
-   int            left,
-   int            right,
-   int            top,
-   int            bottom,
-   int            left_start_y,
-   int            left_end_y,
-   int            right_start_y,
-   int            right_end_y,
-   int            top_start_x,
-   int            top_end_x,
-   int            bottom_start_x,
-   int            bottom_end_x);
-EAPI Eina_Bool ecore_x_netwm_strut_partial_get(
-   Ecore_X_Window win,
-   int           *left,
-   int           *right,
-   int           *top,
-   int           *bottom,
-   int           *left_start_y,
-   int           *left_end_y,
-   int           *right_start_y,
-   int           *right_end_y,
-   int           *top_start_x,
-   int           *top_end_x,
-   int           *bottom_start_x,
-   int           *bottom_end_x);
-
-EAPI Eina_Bool                            ecore_x_netwm_icons_get(Ecore_X_Window       win,
-                                                                        Ecore_X_Icon **icon,
-                                                                        int           *num);
-EAPI void                                 ecore_x_netwm_icon_geometry_set(
-   Ecore_X_Window win,
-   int            x,
-   int            y,
-   int            width,
-   int            height);
-EAPI Eina_Bool                            ecore_x_netwm_icon_geometry_get(
-   Ecore_X_Window win,
-   int           *x,
-   int           *y,
-   int           *width,
-   int           *height);
-EAPI void                                 ecore_x_netwm_pid_set(Ecore_X_Window win,
-                                                                      int      pid);
-EAPI Eina_Bool                            ecore_x_netwm_pid_get(Ecore_X_Window win,
-                                                                      int     *pid);
-EAPI void                                 ecore_x_netwm_handled_icons_set(
-   Ecore_X_Window win);
-EAPI Eina_Bool                            ecore_x_netwm_handled_icons_get(
-   Ecore_X_Window win);
-EAPI void                                 ecore_x_netwm_user_time_set(
-   Ecore_X_Window win,
-   unsigned int   time);
-EAPI Eina_Bool                            ecore_x_netwm_user_time_get(
-   Ecore_X_Window win,
-   unsigned int  *time);
-EAPI void                                 ecore_x_netwm_window_state_set(
-   Ecore_X_Window        win,
-   Ecore_X_Window_State *state,
-   unsigned int          num);
-EAPI Eina_Bool                            ecore_x_netwm_window_state_get(
-   Ecore_X_Window         win,
-   Ecore_X_Window_State **state,
-   unsigned int          *num);
-EAPI void                                 ecore_x_netwm_window_type_set(
-   Ecore_X_Window      win,
-   Ecore_X_Window_Type type);
-EAPI Eina_Bool                            ecore_x_netwm_window_type_get(
-   Ecore_X_Window       win,
-   Ecore_X_Window_Type *type);
-EAPI int                                  ecore_x_netwm_window_types_get(
-   Ecore_X_Window        win,
-   Ecore_X_Window_Type **types);
-EAPI Eina_Bool                            ecore_x_netwm_allowed_action_isset(
-   Ecore_X_Window win,
-   Ecore_X_Action action);
-EAPI void                                 ecore_x_netwm_allowed_action_set(
-   Ecore_X_Window  win,
-   Ecore_X_Action *action,
-   unsigned int    num);
-EAPI Eina_Bool                            ecore_x_netwm_allowed_action_get(
-   Ecore_X_Window   win,
-   Ecore_X_Action **action,
-   unsigned int    *num);
-EAPI void                                 ecore_x_netwm_opacity_set(
-   Ecore_X_Window win,
-   unsigned int   opacity);
-EAPI Eina_Bool                            ecore_x_netwm_opacity_get(
-   Ecore_X_Window win,
-   unsigned int  *opacity);
-EAPI void                                 ecore_x_netwm_frame_size_set(
-   Ecore_X_Window win,
-   int            fl,
-   int            fr,
-   int            ft,
-   int            fb);
-EAPI Eina_Bool                            ecore_x_netwm_frame_size_get(
-   Ecore_X_Window win,
-   int           *fl,
-   int           *fr,
-   int           *ft,
-   int           *fb);
-EAPI Eina_Bool                            ecore_x_netwm_sync_counter_get(
-   Ecore_X_Window        win,
-   Ecore_X_Sync_Counter *counter);
-EAPI void                                 ecore_x_netwm_ping_send(Ecore_X_Window win);
-EAPI void                                 ecore_x_netwm_sync_request_send(
-   Ecore_X_Window win,
-   unsigned int   serial);
-EAPI void                                 ecore_x_netwm_state_request_send(
-   Ecore_X_Window       win,
-   Ecore_X_Window       root,
-   Ecore_X_Window_State s1,
-   Ecore_X_Window_State s2,
-   Eina_Bool            set);
-EAPI void                                 ecore_x_netwm_desktop_request_send(
-   Ecore_X_Window win,
-   Ecore_X_Window root,
-   unsigned int   desktop);
-
-EAPI void                                 ecore_x_e_init(void);
-EAPI void                                 ecore_x_e_frame_size_set(
-   Ecore_X_Window win,
-   int            fl,
-   int            fr,
-   int            ft,
-   int            fb);
-EAPI void                                 ecore_x_e_virtual_keyboard_set(
-   Ecore_X_Window win,
-   unsigned int   is_keyboard);
-EAPI Eina_Bool                            ecore_x_e_virtual_keyboard_get(
-   Ecore_X_Window win);
-EAPI void                                 ecore_x_e_virtual_keyboard_state_set(
-   Ecore_X_Window                 win,
-   Ecore_X_Virtual_Keyboard_State state);
-EAPI Ecore_X_Virtual_Keyboard_State       ecore_x_e_virtual_keyboard_state_get(
-   Ecore_X_Window win);
-EAPI void                                 ecore_x_e_virtual_keyboard_state_send(
-   Ecore_X_Window                 win,
-   Ecore_X_Virtual_Keyboard_State state);
-
-/* Illume functions */
-EAPI void                                 ecore_x_e_illume_zone_set(
-   Ecore_X_Window win,
-   Ecore_X_Window zone);
-EAPI Ecore_X_Window                       ecore_x_e_illume_zone_get(
-   Ecore_X_Window win);
-EAPI void                                 ecore_x_e_illume_zone_list_set(
-   Ecore_X_Window  win,
-   Ecore_X_Window *zones,
-   unsigned int    n_zones);
-EAPI void                                 ecore_x_e_illume_conformant_set(
-   Ecore_X_Window win,
-   unsigned int   is_conformant);
-EAPI Eina_Bool                            ecore_x_e_illume_conformant_get(
-   Ecore_X_Window win);
-EAPI void                                 ecore_x_e_illume_mode_set(
-   Ecore_X_Window      win,
-   Ecore_X_Illume_Mode mode);
-EAPI Ecore_X_Illume_Mode                  ecore_x_e_illume_mode_get(
-   Ecore_X_Window win);
-EAPI void                                 ecore_x_e_illume_mode_send(
-   Ecore_X_Window      win,
-   Ecore_X_Illume_Mode mode);
-EAPI void                                 ecore_x_e_illume_focus_back_send(
-   Ecore_X_Window win);
-EAPI void                                 ecore_x_e_illume_focus_forward_send(
-   Ecore_X_Window win);
-EAPI void                                 ecore_x_e_illume_focus_home_send(
-   Ecore_X_Window win);
-EAPI void                                 ecore_x_e_illume_close_send(
-   Ecore_X_Window win);
-EAPI void                                 ecore_x_e_illume_home_new_send(
-   Ecore_X_Window win);
-EAPI void                                 ecore_x_e_illume_home_del_send(
-   Ecore_X_Window win);
-EAPI void                                 ecore_x_e_illume_drag_set(
-   Ecore_X_Window win,
-   unsigned int   drag);
-EAPI Eina_Bool                            ecore_x_e_illume_drag_get(
-   Ecore_X_Window win);
-EAPI void                                 ecore_x_e_illume_drag_locked_set(
-   Ecore_X_Window win,
-   unsigned int   is_locked);
-EAPI Eina_Bool                            ecore_x_e_illume_drag_locked_get(
-   Ecore_X_Window win);
-EAPI void                                 ecore_x_e_illume_drag_start_send(
-   Ecore_X_Window win);
-EAPI void                                 ecore_x_e_illume_drag_end_send(
-   Ecore_X_Window win);
-EAPI void                                 ecore_x_e_illume_indicator_geometry_set(
-   Ecore_X_Window win,
-   int            x,
-   int            y,
-   int            w,
-   int            h);
-EAPI Eina_Bool                            ecore_x_e_illume_indicator_geometry_get(
-   Ecore_X_Window win,
-   int           *x,
-   int           *y,
-   int           *w,
-   int           *h);
-EAPI void                                 ecore_x_e_illume_softkey_geometry_set(
-   Ecore_X_Window win,
-   int            x,
-   int            y,
-   int            w,
-   int            h);
-EAPI Eina_Bool                            ecore_x_e_illume_softkey_geometry_get(
-   Ecore_X_Window win,
-   int           *x,
-   int           *y,
-   int           *w,
-   int           *h);
-EAPI void                                 ecore_x_e_illume_keyboard_geometry_set(
-   Ecore_X_Window win,
-   int            x,
-   int            y,
-   int            w,
-   int            h);
-EAPI Eina_Bool                            ecore_x_e_illume_keyboard_geometry_get(
-   Ecore_X_Window win,
-   int           *x,
-   int           *y,
-   int           *w,
-   int           *h);
-EAPI void                                 ecore_x_e_illume_quickpanel_set(
-   Ecore_X_Window win,
-   unsigned int   is_quickpanel);
-EAPI Eina_Bool                            ecore_x_e_illume_quickpanel_get(
-   Ecore_X_Window win);
-EAPI void                                 ecore_x_e_illume_quickpanel_state_set(
-   Ecore_X_Window                  win,
-   Ecore_X_Illume_Quickpanel_State state);
-EAPI Ecore_X_Illume_Quickpanel_State      ecore_x_e_illume_quickpanel_state_get(
-   Ecore_X_Window win);
-EAPI void                                 ecore_x_e_illume_quickpanel_state_send(
-   Ecore_X_Window                  win,
-   Ecore_X_Illume_Quickpanel_State state);
-EAPI void                                 ecore_x_e_illume_quickpanel_state_toggle(
-   Ecore_X_Window win);
-EAPI void                                 ecore_x_e_illume_quickpanel_priority_major_set(
-   Ecore_X_Window win,
-   unsigned int   priority);
-EAPI int                                  ecore_x_e_illume_quickpanel_priority_major_get(
-   Ecore_X_Window win);
-EAPI void                                 ecore_x_e_illume_quickpanel_priority_minor_set(
-   Ecore_X_Window win,
-   unsigned int   priority);
-EAPI int                                  ecore_x_e_illume_quickpanel_priority_minor_get(
-   Ecore_X_Window win);
-EAPI void                                 ecore_x_e_illume_quickpanel_zone_set(
-   Ecore_X_Window win,
-   unsigned int   zone);
-EAPI int                                  ecore_x_e_illume_quickpanel_zone_get(
-   Ecore_X_Window win);
-EAPI void
-                                          ecore_x_e_illume_quickpanel_zone_request_send(
-   Ecore_X_Window win);
-EAPI void
-                                          ecore_x_e_illume_quickpanel_position_update_send(
-   Ecore_X_Window win);
-
-/* added by doyoun.kang - for sliding window */
-EAPI void                                 ecore_x_e_illume_sliding_win_state_set(
-   Ecore_X_Window win,
-   unsigned int   is_visible);
-EAPI int                                  ecore_x_e_illume_sliding_win_state_get(
-   Ecore_X_Window win);
-EAPI void                                 ecore_x_e_illume_sliding_win_geometry_set(
-   Ecore_X_Window win, 
-   int            x,
-   int            y,
-   int            w,
-   int            h);
-EAPI int                                  ecore_x_e_illume_sliding_win_geometry_get(
-   Ecore_X_Window win,
-   int           *x,
-   int           *y,
-   int           *w,
-   int           *h);
-
-EAPI void                                 ecore_x_e_comp_sync_counter_set(
-   Ecore_X_Window       win,
-   Ecore_X_Sync_Counter counter);
-EAPI Ecore_X_Sync_Counter                 ecore_x_e_comp_sync_counter_get(
-   Ecore_X_Window win);
-EAPI void                                 ecore_x_e_comp_sync_draw_done_send(
-   Ecore_X_Window root,
-   Ecore_X_Window win);
-EAPI void                                 ecore_x_e_comp_sync_draw_size_done_send(
-   Ecore_X_Window root,
-   Ecore_X_Window win,
-   int w,
-   int h);
-EAPI void                                 ecore_x_e_comp_sync_supported_set(
-   Ecore_X_Window root,
-   Eina_Bool      enabled);
-EAPI Eina_Bool                            ecore_x_e_comp_sync_supported_get(
-   Ecore_X_Window root);
-EAPI void                                 ecore_x_e_comp_sync_begin_send(
-   Ecore_X_Window win);
-EAPI void                                 ecore_x_e_comp_sync_end_send(
-   Ecore_X_Window win);
-EAPI void                                 ecore_x_e_comp_sync_cancel_send(
-   Ecore_X_Window win);
-
-EAPI void                                 ecore_x_e_comp_flush_send(
-   Ecore_X_Window win);
-EAPI void                                 ecore_x_e_comp_dump_send(
-   Ecore_X_Window win);
-EAPI void                                 ecore_x_e_comp_pixmap_set(
-   Ecore_X_Window win,
-   Ecore_X_Pixmap pixmap);
-EAPI Ecore_X_Pixmap                       ecore_x_e_comp_pixmap_get(
-   Ecore_X_Window win);
-
-EAPI void                 ecore_x_e_comp_dri_buff_flip_supported_set(Ecore_X_Window root, Eina_Bool enabled);
-EAPI Eina_Bool            ecore_x_e_comp_dri_buff_flip_supported_get(Ecore_X_Window root);
-  
-EAPI Ecore_X_Sync_Alarm                   ecore_x_sync_alarm_new(
-   Ecore_X_Sync_Counter counter);
-EAPI Eina_Bool                            ecore_x_sync_alarm_free(
-   Ecore_X_Sync_Alarm alarm);
-EAPI Eina_Bool                            ecore_x_sync_counter_query(
-   Ecore_X_Sync_Counter counter,
-   unsigned int        *val);
-EAPI Ecore_X_Sync_Counter                 ecore_x_sync_counter_new(int val);
-EAPI void                                 ecore_x_sync_counter_free(
-   Ecore_X_Sync_Counter counter);
-EAPI void                                 ecore_x_sync_counter_inc(
-   Ecore_X_Sync_Counter counter,
-   int                  by);
-EAPI void                                 ecore_x_sync_counter_val_wait(
-   Ecore_X_Sync_Counter counter,
-   int                  val);
-   
-EAPI void ecore_x_sync_counter_set(Ecore_X_Sync_Counter counter, int val);
-EAPI void ecore_x_sync_counter_2_set(Ecore_X_Sync_Counter counter, int val_hi, unsigned int val_lo);
-EAPI Eina_Bool ecore_x_sync_counter_2_query(Ecore_X_Sync_Counter counter, int *val_hi, unsigned int *val_lo);
-
-EAPI int                                  ecore_x_xinerama_screen_count_get(void);
-EAPI Eina_Bool                            ecore_x_xinerama_screen_geometry_get(
-   int  screen,
-   int *x,
-   int *y,
-   int *w,
-   int *h);
-
-EAPI Eina_Bool ecore_x_screensaver_event_available_get(
-   void);
-EAPI int       ecore_x_screensaver_idle_time_get(void);
-EAPI void      ecore_x_screensaver_set(int timeout,
-                                       int interval,
-                                       int prefer_blanking,
-                                       int allow_exposures);
-EAPI void      ecore_x_screensaver_timeout_set(
-   int timeout);
-EAPI int       ecore_x_screensaver_timeout_get(void);
-EAPI void      ecore_x_screensaver_blank_set(int timeout);
-EAPI int       ecore_x_screensaver_blank_get(void);
-EAPI void      ecore_x_screensaver_expose_set(int timeout);
-EAPI int       ecore_x_screensaver_expose_get(void);
-EAPI void      ecore_x_screensaver_interval_set(
-   int timeout);
-EAPI int       ecore_x_screensaver_interval_get(void);
-EAPI void      ecore_x_screensaver_event_listen_set(
-   Eina_Bool on);
-
-/* FIXME: these funcs need categorising */
-
-typedef struct _Ecore_X_Window_Attributes
-{
-   Ecore_X_Window root;
-   int            x, y, w, h;
-   int            border;
-   int            depth;
-   Eina_Bool      visible : 1;
-   Eina_Bool      viewable : 1;
-   Eina_Bool      override : 1;
-   Eina_Bool      input_only : 1;
-   Eina_Bool      save_under : 1;
-   struct
-     {
-        Ecore_X_Event_Mask mine;
+EAPI void
+ ecore_x_netwm_init(void);
+EAPI void
+ ecore_x_netwm_shutdown(void);
+EAPI void
+ ecore_x_netwm_wm_identify(Ecore_X_Window root,
+                          Ecore_X_Window check,
+                          const char *wm_name);
+EAPI void
+ecore_x_netwm_supported_set(Ecore_X_Window root,
+                            Ecore_X_Atom *supported,
+                            int num);
+EAPI Eina_Bool
+ecore_x_netwm_supported_get(Ecore_X_Window root,
+                            Ecore_X_Atom **supported,
+                            int *num);
+EAPI void
+ecore_x_netwm_desk_count_set(Ecore_X_Window root,
+                             unsigned int n_desks);
+EAPI void
+ecore_x_netwm_desk_roots_set(Ecore_X_Window root,
+                             Ecore_X_Window *vroots,
+                             unsigned int n_desks);
+EAPI void
+ecore_x_netwm_desk_names_set(Ecore_X_Window root,
+                             const char **names,
+                             unsigned int n_desks);
+EAPI void
+ecore_x_netwm_desk_size_set(Ecore_X_Window root,
+                            unsigned int width,
+                            unsigned int height);
+EAPI void
+ecore_x_netwm_desk_workareas_set(Ecore_X_Window root,
+                                 unsigned int *areas,
+                                 unsigned int n_desks);
+EAPI void
+ecore_x_netwm_desk_current_set(Ecore_X_Window root,
+                               unsigned int desk);
+EAPI void
+ecore_x_netwm_desk_viewports_set(Ecore_X_Window root,
+                                 unsigned int *origins,
+                                 unsigned int n_desks);
+EAPI void
+ecore_x_netwm_desk_layout_set(Ecore_X_Window root,
+                              int orientation,
+                              int columns,
+                              int rows,
+                              int starting_corner);
+EAPI void
+ecore_x_netwm_showing_desktop_set(Ecore_X_Window root,
+                                  Eina_Bool on);
+EAPI void
+ecore_x_netwm_client_list_set(Ecore_X_Window root,
+                              Ecore_X_Window *p_clients,
+                              unsigned int n_clients);
+EAPI void
+ecore_x_netwm_client_list_stacking_set(Ecore_X_Window root,
+                                       Ecore_X_Window *p_clients,
+                                       unsigned int n_clients);
+EAPI void
+ecore_x_netwm_client_active_set(Ecore_X_Window root,
+                                Ecore_X_Window win);
+EAPI void
+ecore_x_netwm_client_active_request(Ecore_X_Window root,
+                                    Ecore_X_Window win,
+                                    int type,
+                                    Ecore_X_Window current_win);
+EAPI void
+ecore_x_netwm_name_set(Ecore_X_Window win,
+                       const char *name);
+EAPI int
+ecore_x_netwm_name_get(Ecore_X_Window win,
+                       char **name);
+EAPI void
+ecore_x_netwm_startup_id_set(Ecore_X_Window win,
+                             const char *id);
+EAPI int
+ecore_x_netwm_startup_id_get(Ecore_X_Window win,
+                             char **id);
+EAPI void
+ecore_x_netwm_visible_name_set(Ecore_X_Window win,
+                               const char *name);
+EAPI int
+ecore_x_netwm_visible_name_get(Ecore_X_Window win,
+                               char **name);
+EAPI void
+ecore_x_netwm_icon_name_set(Ecore_X_Window win,
+                            const char *name);
+EAPI int
+ecore_x_netwm_icon_name_get(Ecore_X_Window win,
+                            char **name);
+EAPI void
+ecore_x_netwm_visible_icon_name_set(Ecore_X_Window win,
+                                    const char *name);
+EAPI int
+ecore_x_netwm_visible_icon_name_get(Ecore_X_Window win,
+                                    char **name);
+EAPI void
+ecore_x_netwm_desktop_set(Ecore_X_Window win,
+                          unsigned int desk);
+EAPI Eina_Bool
+ecore_x_netwm_desktop_get(Ecore_X_Window win,
+                          unsigned int *desk);
+EAPI void
+ecore_x_netwm_strut_set(Ecore_X_Window win,
+                        int left,
+                        int right,
+                        int top,
+                        int bottom);
+EAPI Eina_Bool
+ecore_x_netwm_strut_get(Ecore_X_Window win,
+                        int *left,
+                        int *right,
+                        int *top,
+                        int *bottom);
+EAPI void
+ecore_x_netwm_strut_partial_set(Ecore_X_Window win,
+                                int left,
+                                int right,
+                                int top,
+                                int bottom,
+                                int left_start_y,
+                                int left_end_y,
+                                int right_start_y,
+                                int right_end_y,
+                                int top_start_x,
+                                int top_end_x,
+                                int bottom_start_x,
+                                int bottom_end_x);
+EAPI Eina_Bool
+ecore_x_netwm_strut_partial_get(Ecore_X_Window win,
+                                int *left,
+                                int *right,
+                                int *top,
+                                int *bottom,
+                                int *left_start_y,
+                                int *left_end_y,
+                                int *right_start_y,
+                                int *right_end_y,
+                                int *top_start_x,
+                                int *top_end_x,
+                                int *bottom_start_x,
+                                int *bottom_end_x);
+
+EAPI Eina_Bool
+ecore_x_netwm_icons_get(Ecore_X_Window win,
+                        Ecore_X_Icon **icon,
+                        int *num);
+EAPI void
+ecore_x_netwm_icon_geometry_set(Ecore_X_Window win,
+                                int x,
+                                int y,
+                                int width,
+                                int height);
+EAPI Eina_Bool
+ecore_x_netwm_icon_geometry_get(Ecore_X_Window win,
+                                int *x,
+                                int *y,
+                                int *width,
+                                int *height);
+EAPI void
+ecore_x_netwm_pid_set(Ecore_X_Window win,
+                      int pid);
+EAPI Eina_Bool
+ecore_x_netwm_pid_get(Ecore_X_Window win,
+                      int *pid);
+EAPI void
+ ecore_x_netwm_handled_icons_set(Ecore_X_Window win);
+EAPI Eina_Bool
+ ecore_x_netwm_handled_icons_get(Ecore_X_Window win);
+EAPI void
+ ecore_x_netwm_user_time_set(Ecore_X_Window win,
+                            unsigned int time);
+EAPI Eina_Bool
+ecore_x_netwm_user_time_get(Ecore_X_Window win,
+                            unsigned int *time);
+EAPI void
+ecore_x_netwm_window_state_set(Ecore_X_Window win,
+                               Ecore_X_Window_State *state,
+                               unsigned int num);
+EAPI Eina_Bool
+ecore_x_netwm_window_state_get(Ecore_X_Window win,
+                               Ecore_X_Window_State **state,
+                               unsigned int *num);
+EAPI void
+ecore_x_netwm_window_type_set(Ecore_X_Window win,
+                              Ecore_X_Window_Type type);
+EAPI Eina_Bool
+ecore_x_netwm_window_type_get(Ecore_X_Window win,
+                              Ecore_X_Window_Type *type);
+EAPI int
+ecore_x_netwm_window_types_get(Ecore_X_Window win,
+                               Ecore_X_Window_Type **types);
+EAPI Eina_Bool
+ecore_x_netwm_allowed_action_isset(Ecore_X_Window win,
+                                   Ecore_X_Action action);
+EAPI void
+ecore_x_netwm_allowed_action_set(Ecore_X_Window win,
+                                 Ecore_X_Action *action,
+                                 unsigned int num);
+EAPI Eina_Bool
+ecore_x_netwm_allowed_action_get(Ecore_X_Window win,
+                                 Ecore_X_Action **action,
+                                 unsigned int *num);
+EAPI void
+ecore_x_netwm_opacity_set(Ecore_X_Window win,
+                          unsigned int opacity);
+EAPI Eina_Bool
+ecore_x_netwm_opacity_get(Ecore_X_Window win,
+                          unsigned int *opacity);
+EAPI void
+ecore_x_netwm_frame_size_set(Ecore_X_Window win,
+                             int fl,
+                             int fr,
+                             int ft,
+                             int fb);
+EAPI Eina_Bool
+ecore_x_netwm_frame_size_get(Ecore_X_Window win,
+                             int *fl,
+                             int *fr,
+                             int *ft,
+                             int *fb);
+EAPI Eina_Bool
+ecore_x_netwm_sync_counter_get(Ecore_X_Window win,
+                               Ecore_X_Sync_Counter *counter);
+EAPI void
+ ecore_x_netwm_ping_send(Ecore_X_Window win);
+EAPI void
+ ecore_x_netwm_sync_request_send(Ecore_X_Window win,
+                                unsigned int serial);
+EAPI void
+ecore_x_netwm_state_request_send(Ecore_X_Window win,
+                                 Ecore_X_Window root,
+                                 Ecore_X_Window_State s1,
+                                 Ecore_X_Window_State s2,
+                                 Eina_Bool set);
+EAPI void
+ecore_x_netwm_desktop_request_send(Ecore_X_Window win,
+                                   Ecore_X_Window root,
+                                   unsigned int desktop);
+
+EAPI void
+ ecore_x_e_init(void);
+EAPI void
+ ecore_x_e_frame_size_set(Ecore_X_Window win,
+                         int fl,
+                         int fr,
+                         int ft,
+                         int fb);
+EAPI void
+ecore_x_e_virtual_keyboard_set(Ecore_X_Window win,
+                               unsigned int is_keyboard);
+EAPI Eina_Bool
+ ecore_x_e_virtual_keyboard_get(Ecore_X_Window win);
+EAPI void
+ ecore_x_e_virtual_keyboard_state_set(Ecore_X_Window win,
+                                     Ecore_X_Virtual_Keyboard_State state);
+EAPI Ecore_X_Virtual_Keyboard_State
+ ecore_x_e_virtual_keyboard_state_get(Ecore_X_Window win);
+EAPI void
+ ecore_x_e_virtual_keyboard_state_send(Ecore_X_Window win,
+                                      Ecore_X_Virtual_Keyboard_State state);
+
+/* Illume functions */
+EAPI void
+ecore_x_e_illume_zone_set(Ecore_X_Window win,
+                          Ecore_X_Window zone);
+EAPI Ecore_X_Window
+ ecore_x_e_illume_zone_get(Ecore_X_Window win);
+EAPI void
+ ecore_x_e_illume_zone_list_set(Ecore_X_Window win,
+                               Ecore_X_Window *zones,
+                               unsigned int n_zones);
+EAPI void
+ecore_x_e_illume_conformant_set(Ecore_X_Window win,
+                                unsigned int is_conformant);
+EAPI Eina_Bool
+ ecore_x_e_illume_conformant_get(Ecore_X_Window win);
+EAPI void
+ ecore_x_e_illume_mode_set(Ecore_X_Window win,
+                          Ecore_X_Illume_Mode mode);
+EAPI Ecore_X_Illume_Mode
+ ecore_x_e_illume_mode_get(Ecore_X_Window win);
+EAPI void
+ ecore_x_e_illume_mode_send(Ecore_X_Window win,
+                           Ecore_X_Illume_Mode mode);
+EAPI void
+ ecore_x_e_illume_focus_back_send(Ecore_X_Window win);
+EAPI void
+ ecore_x_e_illume_focus_forward_send(Ecore_X_Window win);
+EAPI void
+ ecore_x_e_illume_focus_home_send(Ecore_X_Window win);
+EAPI void
+ ecore_x_e_illume_close_send(Ecore_X_Window win);
+EAPI void
+ ecore_x_e_illume_home_new_send(Ecore_X_Window win);
+EAPI void
+ ecore_x_e_illume_home_del_send(Ecore_X_Window win);
+EAPI void
+ ecore_x_e_illume_drag_set(Ecore_X_Window win,
+                          unsigned int drag);
+EAPI Eina_Bool
+ ecore_x_e_illume_drag_get(Ecore_X_Window win);
+EAPI void
+ ecore_x_e_illume_drag_locked_set(Ecore_X_Window win,
+                                 unsigned int is_locked);
+EAPI Eina_Bool
+ ecore_x_e_illume_drag_locked_get(Ecore_X_Window win);
+EAPI void
+ ecore_x_e_illume_drag_start_send(Ecore_X_Window win);
+EAPI void
+ ecore_x_e_illume_drag_end_send(Ecore_X_Window win);
+EAPI void
+ ecore_x_e_illume_indicator_geometry_set(Ecore_X_Window win,
+                                        int x,
+                                        int y,
+                                        int w,
+                                        int h);
+EAPI Eina_Bool
+ecore_x_e_illume_indicator_geometry_get(Ecore_X_Window win,
+                                        int *x,
+                                        int *y,
+                                        int *w,
+                                        int *h);
+EAPI void
+ecore_x_e_illume_softkey_geometry_set(Ecore_X_Window win,
+                                      int x,
+                                      int y,
+                                      int w,
+                                      int h);
+EAPI Eina_Bool
+ecore_x_e_illume_softkey_geometry_get(Ecore_X_Window win,
+                                      int *x,
+                                      int *y,
+                                      int *w,
+                                      int *h);
+EAPI void
+ecore_x_e_illume_keyboard_geometry_set(Ecore_X_Window win,
+                                       int x,
+                                       int y,
+                                       int w,
+                                       int h);
+EAPI Eina_Bool
+ecore_x_e_illume_keyboard_geometry_get(Ecore_X_Window win,
+                                       int *x,
+                                       int *y,
+                                       int *w,
+                                       int *h);
+EAPI void
+ecore_x_e_illume_quickpanel_set(Ecore_X_Window win,
+                                unsigned int is_quickpanel);
+EAPI Eina_Bool
+ ecore_x_e_illume_quickpanel_get(Ecore_X_Window win);
+EAPI void
+ ecore_x_e_illume_quickpanel_state_set(Ecore_X_Window win,
+                                      Ecore_X_Illume_Quickpanel_State state);
+EAPI Ecore_X_Illume_Quickpanel_State
+ ecore_x_e_illume_quickpanel_state_get(Ecore_X_Window win);
+EAPI void
+ ecore_x_e_illume_quickpanel_state_send(Ecore_X_Window win,
+                                       Ecore_X_Illume_Quickpanel_State state);
+EAPI void
+ ecore_x_e_illume_quickpanel_state_toggle(Ecore_X_Window win);
+EAPI void
+ ecore_x_e_illume_quickpanel_priority_major_set(Ecore_X_Window win,
+                                               unsigned int priority);
+EAPI int
+ ecore_x_e_illume_quickpanel_priority_major_get(Ecore_X_Window win);
+EAPI void
+ ecore_x_e_illume_quickpanel_priority_minor_set(Ecore_X_Window win,
+                                               unsigned int priority);
+EAPI int
+ ecore_x_e_illume_quickpanel_priority_minor_get(Ecore_X_Window win);
+EAPI void
+ ecore_x_e_illume_quickpanel_zone_set(Ecore_X_Window win,
+                                     unsigned int zone);
+EAPI int
+ ecore_x_e_illume_quickpanel_zone_get(Ecore_X_Window win);
+EAPI void
+ ecore_x_e_illume_quickpanel_zone_request_send(Ecore_X_Window win);
+EAPI void
+ ecore_x_e_illume_quickpanel_position_update_send(Ecore_X_Window win);
+
+/* added by doyoun.kang - for sliding window */
+EAPI void
+ ecore_x_e_illume_sliding_win_state_set(Ecore_X_Window win,
+                                       unsigned int is_visible);
+EAPI int
+ ecore_x_e_illume_sliding_win_state_get(Ecore_X_Window win);
+EAPI void
+ ecore_x_e_illume_sliding_win_geometry_set(Ecore_X_Window win,
+                                          int x,
+                                          int y,
+                                          int w,
+                                          int h);
+EAPI int
+ ecore_x_e_illume_sliding_win_geometry_get(Ecore_X_Window win,
+                                          int *x,
+                                          int *y,
+                                          int *w,
+                                          int *h);
+
+EAPI void
+ecore_x_e_comp_sync_counter_set(Ecore_X_Window win,
+                                Ecore_X_Sync_Counter counter);
+EAPI Ecore_X_Sync_Counter
+ ecore_x_e_comp_sync_counter_get(Ecore_X_Window win);
+EAPI void
+ ecore_x_e_comp_sync_draw_done_send(Ecore_X_Window root,
+                                   Ecore_X_Window win);
+EAPI void
+ecore_x_e_comp_sync_draw_size_done_send(Ecore_X_Window root,
+                                        Ecore_X_Window win,
+                                        int w,
+                                        int h);
+EAPI void
+ecore_x_e_comp_sync_supported_set(Ecore_X_Window root,
+                                  Eina_Bool enabled);
+EAPI Eina_Bool
+ ecore_x_e_comp_sync_supported_get(Ecore_X_Window root);
+EAPI void
+ ecore_x_e_comp_sync_begin_send(Ecore_X_Window win);
+EAPI void
+ ecore_x_e_comp_sync_end_send(Ecore_X_Window win);
+EAPI void
+ ecore_x_e_comp_sync_cancel_send(Ecore_X_Window win);
+
+EAPI void
+ ecore_x_e_comp_flush_send(Ecore_X_Window win);
+EAPI void
+ ecore_x_e_comp_dump_send(Ecore_X_Window win);
+EAPI void
+ ecore_x_e_comp_pixmap_set(Ecore_X_Window win,
+                          Ecore_X_Pixmap pixmap);
+EAPI Ecore_X_Pixmap
+ecore_x_e_comp_pixmap_get(Ecore_X_Window win);
+
+EAPI Ecore_X_Sync_Alarm
+ ecore_x_sync_alarm_new(Ecore_X_Sync_Counter counter);
+EAPI Eina_Bool
+ ecore_x_sync_alarm_free(Ecore_X_Sync_Alarm alarm);
+EAPI Eina_Bool
+ ecore_x_sync_counter_query(Ecore_X_Sync_Counter counter,
+                           unsigned int *val);
+EAPI Ecore_X_Sync_Counter
+ ecore_x_sync_counter_new(int val);
+EAPI void
+ ecore_x_sync_counter_free(Ecore_X_Sync_Counter counter);
+EAPI void
+ ecore_x_sync_counter_inc(Ecore_X_Sync_Counter counter,
+                         int by);
+EAPI void
+ecore_x_sync_counter_val_wait(Ecore_X_Sync_Counter counter,
+                              int val);
+
+EAPI void
+ecore_x_sync_counter_set(Ecore_X_Sync_Counter counter,
+                         int val);
+EAPI void
+ecore_x_sync_counter_2_set(Ecore_X_Sync_Counter counter,
+                           int val_hi,
+                           unsigned int val_lo);
+EAPI Eina_Bool
+ecore_x_sync_counter_2_query(Ecore_X_Sync_Counter counter,
+                             int *val_hi,
+                             unsigned int *val_lo);
+
+EAPI int
+ ecore_x_xinerama_screen_count_get(void);
+EAPI Eina_Bool
+ ecore_x_xinerama_screen_geometry_get(int screen,
+                                     int *x,
+                                     int *y,
+                                     int *w,
+                                     int *h);
+
+EAPI Eina_Bool
+ ecore_x_screensaver_event_available_get(void);
+EAPI int
+ ecore_x_screensaver_idle_time_get(void);
+EAPI void
+ ecore_x_screensaver_set(int timeout,
+                        int interval,
+                        int prefer_blanking,
+                        int allow_exposures);
+EAPI void
+ ecore_x_screensaver_timeout_set(int timeout);
+EAPI int
+ ecore_x_screensaver_timeout_get(void);
+EAPI void
+ ecore_x_screensaver_blank_set(int timeout);
+EAPI int
+ ecore_x_screensaver_blank_get(void);
+EAPI void
+ ecore_x_screensaver_expose_set(int timeout);
+EAPI int
+ ecore_x_screensaver_expose_get(void);
+EAPI void
+ ecore_x_screensaver_interval_set(int timeout);
+EAPI int
+ ecore_x_screensaver_interval_get(void);
+EAPI void
+ ecore_x_screensaver_event_listen_set(Eina_Bool on);
+
+/* FIXME: these funcs need categorising */
+
+typedef struct _Ecore_X_Window_Attributes
+{
+   Ecore_X_Window root;
+   int            x, y, w, h;
+   int            border;
+   int            depth;
+   Eina_Bool      visible : 1;
+   Eina_Bool      viewable : 1;
+   Eina_Bool      override : 1;
+   Eina_Bool      input_only : 1;
+   Eina_Bool      save_under : 1;
+   struct
+     {
+        Ecore_X_Event_Mask mine;
         Ecore_X_Event_Mask all;
         Ecore_X_Event_Mask no_propagate;
      } event_mask;
@@ -2407,83 +2586,128 @@ typedef struct _Ecore_X_Window_Attributes
     */
 } Ecore_X_Window_Attributes;
 
-EAPI Eina_Bool            ecore_x_window_attributes_get(
-   Ecore_X_Window win,
-   Ecore_X_Window_Attributes *
-   att_ret);
-EAPI void                 ecore_x_window_save_set_add(Ecore_X_Window win);
-EAPI void                 ecore_x_window_save_set_del(Ecore_X_Window win);
-EAPI Ecore_X_Window *     ecore_x_window_children_get(Ecore_X_Window win, int *num);
-
-EAPI Eina_Bool            ecore_x_pointer_control_set(int accel_num,
-                                                      int accel_denom,
-                                                      int threshold);
-EAPI Eina_Bool            ecore_x_pointer_control_get(int *accel_num,
-                                                      int *accel_denom,
-                                                      int *threshold);
-EAPI Eina_Bool            ecore_x_pointer_mapping_set(unsigned char *map, int nmap);
-EAPI Eina_Bool            ecore_x_pointer_mapping_get(unsigned char *map, int nmap);
-EAPI Eina_Bool            ecore_x_pointer_grab(Ecore_X_Window win);
-EAPI Eina_Bool            ecore_x_pointer_confine_grab(Ecore_X_Window win);
-EAPI void                 ecore_x_pointer_ungrab(void);
-EAPI Eina_Bool            ecore_x_pointer_warp(Ecore_X_Window win, int x, int y);
-EAPI Eina_Bool            ecore_x_keyboard_grab(Ecore_X_Window win);
-EAPI void                 ecore_x_keyboard_ungrab(void);
-EAPI void                 ecore_x_grab(void);
-EAPI void                 ecore_x_ungrab(void);
-EAPI void                 ecore_x_passive_grab_replay_func_set(Eina_Bool               (*func)(void *data,
-                                                                                 int   event_type,
-                                                                                 void *event),
-                                                               void                   *data);
-EAPI void                 ecore_x_window_button_grab(Ecore_X_Window win, int button,
-                                                     Ecore_X_Event_Mask event_mask,
-                                                     int mod, int any_mod);
-EAPI void                 ecore_x_window_button_ungrab(Ecore_X_Window win,
-                                                       int            button,
-                                                       int            mod,
-                                                       int            any_mod);
-EAPI void                 ecore_x_window_key_grab(Ecore_X_Window win,
-                                                  const char    *key,
-                                                  int            mod,
-                                                  int            any_mod);
-EAPI void                 ecore_x_window_key_ungrab(Ecore_X_Window win,
-                                                    const char    *key,
-                                                    int            mod,
-                                                    int            any_mod);
-
-EAPI void                 ecore_x_focus_reset(void);
-EAPI void                 ecore_x_events_allow_all(void);
-EAPI void                 ecore_x_pointer_last_xy_get(int *x, int *y);
-EAPI void                 ecore_x_pointer_xy_get(Ecore_X_Window win, int *x, int *y);
+EAPI Eina_Bool
+ecore_x_window_attributes_get(Ecore_X_Window win,
+                              Ecore_X_Window_Attributes *att_ret);
+EAPI void
+ ecore_x_window_save_set_add(Ecore_X_Window win);
+EAPI void
+ ecore_x_window_save_set_del(Ecore_X_Window win);
+EAPI Ecore_X_Window *
+ ecore_x_window_children_get(Ecore_X_Window win,
+                            int *num);
+
+EAPI Eina_Bool
+ecore_x_pointer_control_set(int accel_num,
+                            int accel_denom,
+                            int threshold);
+EAPI Eina_Bool
+ecore_x_pointer_control_get(int *accel_num,
+                            int *accel_denom,
+                            int *threshold);
+EAPI Eina_Bool
+ecore_x_pointer_mapping_set(unsigned char *map,
+                            int nmap);
+EAPI Eina_Bool
+ecore_x_pointer_mapping_get(unsigned char *map,
+                            int nmap);
+EAPI Eina_Bool
+ ecore_x_pointer_grab(Ecore_X_Window win);
+EAPI Eina_Bool
+ ecore_x_pointer_confine_grab(Ecore_X_Window win);
+EAPI void
+ ecore_x_pointer_ungrab(void);
+EAPI Eina_Bool
+ ecore_x_pointer_warp(Ecore_X_Window win,
+                     int x,
+                     int y);
+EAPI Eina_Bool
+ ecore_x_keyboard_grab(Ecore_X_Window win);
+EAPI void
+ ecore_x_keyboard_ungrab(void);
+EAPI void
+ ecore_x_grab(void);
+EAPI void
+ ecore_x_ungrab(void);
+EAPI void
+ ecore_x_passive_grab_replay_func_set(Eina_Bool (*func)(void *data,
+                                                       int event_type,
+                                                       void *event),
+                                     void *data);
+EAPI void
+ecore_x_window_button_grab(Ecore_X_Window win,
+                           int button,
+                           Ecore_X_Event_Mask event_mask,
+                           int mod,
+                           int any_mod);
+EAPI void
+ecore_x_window_button_ungrab(Ecore_X_Window win,
+                             int button,
+                             int mod,
+                             int any_mod);
+EAPI void
+ecore_x_window_key_grab(Ecore_X_Window win,
+                        const char *key,
+                        int mod,
+                        int any_mod);
+EAPI void
+ecore_x_window_key_ungrab(Ecore_X_Window win,
+                          const char *key,
+                          int mod,
+                          int any_mod);
+
+EAPI void
+ ecore_x_focus_reset(void);
+EAPI void
+ ecore_x_events_allow_all(void);
+EAPI void
+ ecore_x_pointer_last_xy_get(int *x,
+                            int *y);
+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(void);
-EAPI void                 ecore_x_xregion_free(Ecore_X_XRegion *region);
-EAPI Eina_Bool            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 Eina_Bool            ecore_x_xregion_intersect(Ecore_X_XRegion *dst,
-                                                    Ecore_X_XRegion *r1,
-                                                    Ecore_X_XRegion *r2);
-EAPI Eina_Bool            ecore_x_xregion_union(Ecore_X_XRegion *dst,
-                                                Ecore_X_XRegion *r1,
-                                                Ecore_X_XRegion *r2);
-EAPI Eina_Bool            ecore_x_xregion_union_rect(Ecore_X_XRegion   *dst,
-                                                     Ecore_X_XRegion   *src,
-                                                     Ecore_X_Rectangle *rect);
-EAPI Eina_Bool            ecore_x_xregion_subtract(Ecore_X_XRegion *dst,
-                                                   Ecore_X_XRegion *r1,
-                                                   Ecore_X_XRegion *r2);
-EAPI Eina_Bool            ecore_x_xregion_is_empty(Ecore_X_XRegion *region);
-EAPI Eina_Bool            ecore_x_xregion_is_equal(Ecore_X_XRegion *r1,
-                                                   Ecore_X_XRegion *r2);
-EAPI Eina_Bool            ecore_x_xregion_point_contain(Ecore_X_XRegion *region,
-                                                        int              x,
-                                                        int              y);
-EAPI Eina_Bool            ecore_x_xregion_rect_contain(Ecore_X_XRegion   *region,
-                                                       Ecore_X_Rectangle *rect);
+EAPI Ecore_X_XRegion *
+ ecore_x_xregion_new(void);
+EAPI void
+ ecore_x_xregion_free(Ecore_X_XRegion *region);
+EAPI Eina_Bool
+ 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 Eina_Bool
+ecore_x_xregion_intersect(Ecore_X_XRegion *dst,
+                          Ecore_X_XRegion *r1,
+                          Ecore_X_XRegion *r2);
+EAPI Eina_Bool
+ecore_x_xregion_union(Ecore_X_XRegion *dst,
+                      Ecore_X_XRegion *r1,
+                      Ecore_X_XRegion *r2);
+EAPI Eina_Bool
+ecore_x_xregion_union_rect(Ecore_X_XRegion *dst,
+                           Ecore_X_XRegion *src,
+                           Ecore_X_Rectangle *rect);
+EAPI Eina_Bool
+ecore_x_xregion_subtract(Ecore_X_XRegion *dst,
+                         Ecore_X_XRegion *r1,
+                         Ecore_X_XRegion *r2);
+EAPI Eina_Bool
+ ecore_x_xregion_is_empty(Ecore_X_XRegion *region);
+EAPI Eina_Bool
+ ecore_x_xregion_is_equal(Ecore_X_XRegion *r1,
+                         Ecore_X_XRegion *r2);
+EAPI Eina_Bool
+ecore_x_xregion_point_contain(Ecore_X_XRegion *region,
+                              int x,
+                              int y);
+EAPI Eina_Bool
+ecore_x_xregion_rect_contain(Ecore_X_XRegion *region,
+                             Ecore_X_Rectangle *rect);
 
 /* ecore_x_randr.c */
 
@@ -2501,66 +2725,58 @@ typedef int   Ecore_X_Randr_Connector_Type;
 
 typedef struct _Ecore_X_Randr_Mode_Info
 {
-   Ecore_X_ID xid;
-   unsigned int width;
-   unsigned int height;
+   Ecore_X_ID    xid;
+   unsigned int  width;
+   unsigned int  height;
    unsigned long dotClock;
-   unsigned int hSyncStart;
-   unsigned int hSyncEnd;
-   unsigned int hTotal;
-   unsigned int hSkew;
-   unsigned int vSyncStart;
-   unsigned int vSyncEnd;
-   unsigned int vTotal;
-   char *name;
-   unsigned int nameLength;
+   unsigned int  hSyncStart;
+   unsigned int  hSyncEnd;
+   unsigned int  hTotal;
+   unsigned int  hSkew;
+   unsigned int  vSyncStart;
+   unsigned int  vSyncEnd;
+   unsigned int  vTotal;
+   char         *name;
+   unsigned int  nameLength;
    unsigned long modeFlags;
 } Ecore_X_Randr_Mode_Info;
 
-EAPI int             ecore_x_randr_version_get(
-   void);
-EAPI Eina_Bool ecore_x_randr_query(void);
+EAPI int
+ ecore_x_randr_version_get(void);
+EAPI Eina_Bool
+ ecore_x_randr_query(void);
 
 /* ecore_x_randr_11.c */
 EAPI Ecore_X_Randr_Orientation
-                     ecore_x_randr_screen_primary_output_orientations_get(
-   Ecore_X_Window root);
+ ecore_x_randr_screen_primary_output_orientations_get(Ecore_X_Window root);
 EAPI Ecore_X_Randr_Orientation
-                     ecore_x_randr_screen_primary_output_orientation_get(
-   Ecore_X_Window root);
+ ecore_x_randr_screen_primary_output_orientation_get(Ecore_X_Window root);
 EAPI Eina_Bool
-                     ecore_x_randr_screen_primary_output_orientation_set(
-   Ecore_X_Window root,
-   Ecore_X_Randr_Orientation
-   orientation);
+ ecore_x_randr_screen_primary_output_orientation_set(Ecore_X_Window root,
+                                                    Ecore_X_Randr_Orientation orientation);
 EAPI Ecore_X_Randr_Screen_Size_MM *
-                     ecore_x_randr_screen_primary_output_sizes_get(
-   Ecore_X_Window root,
-   int *num);
-EAPI void
-                     ecore_x_randr_screen_primary_output_current_size_get(
-   Ecore_X_Window root,
-   int *w,
-   int *h,
-   int *w_mm,
-   int *h_mm,
-   int *size_index);
+ecore_x_randr_screen_primary_output_sizes_get(Ecore_X_Window root,
+                                              int *num);
+EAPI void
+ecore_x_randr_screen_primary_output_current_size_get(Ecore_X_Window root,
+                                                     int *w,
+                                                     int *h,
+                                                     int *w_mm,
+                                                     int *h_mm,
+                                                     int *size_index);
 EAPI Eina_Bool
 ecore_x_randr_screen_primary_output_size_set(Ecore_X_Window root,
                                              int size_index);
 EAPI Ecore_X_Randr_Refresh_Rate
-ecore_x_randr_screen_primary_output_current_refresh_rate_get(
-   Ecore_X_Window root);
+ ecore_x_randr_screen_primary_output_current_refresh_rate_get(Ecore_X_Window root);
 EAPI Ecore_X_Randr_Refresh_Rate *
-ecore_x_randr_screen_primary_output_refresh_rates_get(Ecore_X_Window root,
+ ecore_x_randr_screen_primary_output_refresh_rates_get(Ecore_X_Window root,
                                                       int size_index,
                                                       int *num);
 EAPI Eina_Bool
-ecore_x_randr_screen_primary_output_refresh_rate_set(
-   Ecore_X_Window root,
-   int size_index,
-   Ecore_X_Randr_Refresh_Rate
-   rate);
+ecore_x_randr_screen_primary_output_refresh_rate_set(Ecore_X_Window root,
+                                                     int size_index,
+                                                     Ecore_X_Randr_Refresh_Rate rate);
 
 /* ecore_x_randr_12.c */
 EAPI void
@@ -2574,56 +2790,51 @@ ecore_x_randr_screen_current_size_get(Ecore_X_Window root,
                                       int *w_mm,
                                       int *h_mm);
 EAPI void
-          ecore_x_randr_screen_size_range_get(Ecore_X_Window root,
+ecore_x_randr_screen_size_range_get(Ecore_X_Window root,
                                     int *wmin,
                                     int *hmin,
                                     int *wmax,
                                     int *hmax);
-EAPI void ecore_x_randr_screen_reset(
  Ecore_X_Window root);
+EAPI void
ecore_x_randr_screen_reset(Ecore_X_Window root);
 EAPI Eina_Bool
         ecore_x_randr_screen_current_size_set(Ecore_X_Window root,
+ ecore_x_randr_screen_current_size_set(Ecore_X_Window root,
                                       int w,
                                       int h,
                                       int w_mm,
                                       int h_mm);
 EAPI Ecore_X_Randr_Mode_Info **
-                           ecore_x_randr_modes_info_get(Ecore_X_Window root,
+ecore_x_randr_modes_info_get(Ecore_X_Window root,
                              int *num);
 EAPI Ecore_X_Randr_Mode_Info *
-                           ecore_x_randr_mode_info_get(Ecore_X_Window root,
+ecore_x_randr_mode_info_get(Ecore_X_Window root,
                             Ecore_X_Randr_Mode mode);
 EAPI void
-                           ecore_x_randr_mode_info_free(
-   Ecore_X_Randr_Mode_Info *mode_info);
-EAPI Ecore_X_Randr_Crtc *  ecore_x_randr_crtcs_get(
-   Ecore_X_Window root,
-   int *num);
-EAPI Ecore_X_Randr_Output *ecore_x_randr_outputs_get(
-   Ecore_X_Window root,
-   int *num);
+                           ecore_x_randr_mode_info_free(Ecore_X_Randr_Mode_Info *mode_info);
+EAPI Ecore_X_Randr_Crtc *
+                           ecore_x_randr_crtcs_get(Ecore_X_Window root,
+                        int *num);
+EAPI Ecore_X_Randr_Output *ecore_x_randr_outputs_get(Ecore_X_Window root,
+                                                      int *num);
 EAPI Ecore_X_Randr_Output *
-                           ecore_x_randr_window_outputs_get(
-   Ecore_X_Window window,
-   int *num);
+ecore_x_randr_window_outputs_get(Ecore_X_Window window,
+                                 int *num);
 EINA_DEPRECATED EAPI Ecore_X_Randr_Output *
-                           ecore_x_randr_current_output_get(
-   Ecore_X_Window window,
-   int *num);
+ecore_x_randr_current_output_get(Ecore_X_Window window,
+                                 int *num);
 EAPI Ecore_X_Randr_Crtc *
-                           ecore_x_randr_current_crtc_get(Ecore_X_Window window,
+ecore_x_randr_current_crtc_get(Ecore_X_Window window,
                                int *num);
 EAPI Ecore_X_Randr_Output *
-                           ecore_x_randr_crtc_outputs_get(Ecore_X_Window root,
+ecore_x_randr_crtc_outputs_get(Ecore_X_Window root,
                                Ecore_X_Randr_Crtc crtc,
                                int *num);
 EAPI Ecore_X_Randr_Output *
-                           ecore_x_randr_crtc_possible_outputs_get(
-   Ecore_X_Window root,
-   Ecore_X_Randr_Crtc crtc,
-   int *num);
+ecore_x_randr_crtc_possible_outputs_get(Ecore_X_Window root,
+                                        Ecore_X_Randr_Crtc crtc,
+                                        int *num);
 EAPI void
-                           ecore_x_randr_crtc_geometry_get(Ecore_X_Window root,
+ecore_x_randr_crtc_geometry_get(Ecore_X_Window root,
                                 Ecore_X_Randr_Crtc crtc,
                                 int *x,
                                 int *y,
@@ -2640,7 +2851,8 @@ ecore_x_randr_crtc_pos_set(Ecore_X_Window root,
                            int x,
                            int y);
 EAPI Ecore_X_Randr_Mode
-ecore_x_randr_crtc_mode_get(Ecore_X_Window root, Ecore_X_Randr_Crtc crtc);
+ecore_x_randr_crtc_mode_get(Ecore_X_Window root,
+                            Ecore_X_Randr_Crtc crtc);
 EAPI Eina_Bool
 ecore_x_randr_crtc_mode_set(Ecore_X_Window root,
                             Ecore_X_Randr_Crtc crtc,
@@ -2660,7 +2872,8 @@ EAPI Ecore_X_Randr_Orientation
 ecore_x_randr_crtc_orientations_get(Ecore_X_Window root,
                                     Ecore_X_Randr_Crtc crtc);
 EAPI Ecore_X_Randr_Orientation
-ecore_x_randr_crtc_orientation_get(Ecore_X_Window root, Ecore_X_Randr_Crtc crtc);
+ecore_x_randr_crtc_orientation_get(Ecore_X_Window root,
+                                   Ecore_X_Randr_Crtc crtc);
 EAPI Eina_Bool
 ecore_x_randr_crtc_orientation_set(Ecore_X_Window root,
                                    Ecore_X_Randr_Crtc crtc,
@@ -2685,41 +2898,44 @@ ecore_x_randr_crtc_pos_relative_set(Ecore_X_Window root,
                                     Ecore_X_Randr_Output_Policy policy,
                                     Ecore_X_Randr_Relative_Alignment alignment);
 EAPI Ecore_X_Randr_Mode *
-                     ecore_x_randr_output_modes_get(Ecore_X_Window root,
+ecore_x_randr_output_modes_get(Ecore_X_Window root,
                                Ecore_X_Randr_Output output,
                                int *num,
                                int *npreferred);
-EAPI Ecore_X_Randr_Output *ecore_x_randr_output_clones_get(Ecore_X_Window root, Ecore_X_Randr_Output output, int *num);
-EAPI Ecore_X_Randr_Crtc *ecore_x_randr_output_possible_crtcs_get(Ecore_X_Window root, Ecore_X_Randr_Output output, int *num);
+EAPI Ecore_X_Randr_Output *ecore_x_randr_output_clones_get(Ecore_X_Window root,
+                                                           Ecore_X_Randr_Output output,
+                                                           int *num);
+EAPI Ecore_X_Randr_Crtc *ecore_x_randr_output_possible_crtcs_get(Ecore_X_Window root,
+                                                                 Ecore_X_Randr_Output output,
+                                                                 int *num);
 EAPI Ecore_X_Randr_Crtc
-                     ecore_x_randr_output_crtc_get(Ecore_X_Window root,
+ecore_x_randr_output_crtc_get(Ecore_X_Window root,
                               Ecore_X_Randr_Output output);
 EAPI char *
-                     ecore_x_randr_output_name_get(Ecore_X_Window root,
+ecore_x_randr_output_name_get(Ecore_X_Window root,
                               Ecore_X_Randr_Output output,
                               int *len);
 EAPI int
-                     ecore_x_randr_crtc_gamma_ramp_size_get(
-   Ecore_X_Randr_Crtc crtc);
+ ecore_x_randr_crtc_gamma_ramp_size_get(Ecore_X_Randr_Crtc crtc);
 EAPI Ecore_X_Randr_Crtc_Gamma **
                    ecore_x_randr_crtc_gamma_ramps_get(Ecore_X_Randr_Crtc crtc);
+ ecore_x_randr_crtc_gamma_ramps_get(Ecore_X_Randr_Crtc crtc);
 EAPI Eina_Bool
                    ecore_x_randr_crtc_gamma_ramps_set(Ecore_X_Randr_Crtc crtc,
+ ecore_x_randr_crtc_gamma_ramps_set(Ecore_X_Randr_Crtc crtc,
                                    const Ecore_X_Randr_Crtc_Gamma *red,
                                    const Ecore_X_Randr_Crtc_Gamma *green,
                                    const Ecore_X_Randr_Crtc_Gamma *blue);
 EAPI Eina_Bool
-                     ecore_x_randr_move_all_crtcs_but(Ecore_X_Window root,
+ecore_x_randr_move_all_crtcs_but(Ecore_X_Window root,
                                  const Ecore_X_Randr_Crtc *not_moved,
                                  int nnot_moved,
                                  int dx,
                                  int dy);
-EAPI Eina_Bool ecore_x_randr_move_crtcs(
-   Ecore_X_Window root,
-   const Ecore_X_Randr_Crtc *crtcs,
-   int ncrtc,
-   int dx,
-   int dy);
+EAPI Eina_Bool
+ecore_x_randr_move_crtcs(Ecore_X_Window root,
+                         const Ecore_X_Randr_Crtc *crtcs,
+                         int ncrtc,
+                         int dx,
+                         int dy);
 EAPI void
 ecore_x_randr_mode_size_get(Ecore_X_Window root,
                             Ecore_X_Randr_Mode mode,
@@ -2739,7 +2955,7 @@ ecore_x_randr_output_crtc_set(Ecore_X_Window root,
                               const Ecore_X_Randr_Crtc crtc);
 
 /* ecore_x_randr_12_edid.c */
-   
+
 /*
  * @brief Validates the header from raw EDID data.
  *
@@ -2749,8 +2965,8 @@ ecore_x_randr_output_crtc_set(Ecore_X_Window root,
  */
 EAPI Eina_Bool
 ecore_x_randr_edid_has_valid_header(unsigned char *edid,
-                                unsigned long edid_length);
-   
+                                    unsigned long edid_length);
+
 /*
  * @brief Checks whether a display's EDID has a valid checksum.
  *
@@ -2761,24 +2977,24 @@ ecore_x_randr_edid_has_valid_header(unsigned char *edid,
 EAPI Eina_Bool
 ecore_x_randr_edid_info_has_valid_checksum(unsigned char *edid,
                                            unsigned long edid_length);
-   
+
 /*
  * @brief Get the encoded version from raw EDID data.
  *
  * The return value has the minor version in the lowest 8 bits, and the major
  * version in all the rest of the bits. i.e.
- * 
+ *
  * minor = (version & 0x000000ff);
  * major = (version & 0xffffff00) >> 8;
- * 
+ *
  * @param edid the edid structure
  * @param edid_length length of the edid structure
  * @return The encoded major and minor version encasuplated an int.
  */
 EAPI int
-ecore_x_randr_edid_version_get(unsigned char *edid, 
+ecore_x_randr_edid_version_get(unsigned char *edid,
                                unsigned long edid_length);
-   
+
 /*
  * @brief Get the encoded manufacturer from raw EDID data.
  *
@@ -2789,7 +3005,7 @@ ecore_x_randr_edid_version_get(unsigned char *edid,
 EAPI char *
 ecore_x_randr_edid_manufacturer_name_get(unsigned char *edid,
                                          unsigned long edid_length);
-   
+
 /*
  * @brief Get the encoded name from raw EDID data.
  *
@@ -2800,7 +3016,7 @@ ecore_x_randr_edid_manufacturer_name_get(unsigned char *edid,
 EAPI char *
 ecore_x_randr_edid_display_name_get(unsigned char *edid,
                                     unsigned long edid_length);
-   
+
 /*
  * @brief Get the encoded ASCII from raw EDID data.
  *
@@ -2809,9 +3025,9 @@ ecore_x_randr_edid_display_name_get(unsigned char *edid,
  * @return The encoded ASCII display identifier.
  */
 EAPI char *
-ecore_x_randr_edid_display_ascii_get(unsigned char *edid, 
+ecore_x_randr_edid_display_ascii_get(unsigned char *edid,
                                      unsigned long edid_length);
-   
+
 /*
  * @brief Get the encoded serial identifier from raw EDID data.
  *
@@ -2820,9 +3036,9 @@ ecore_x_randr_edid_display_ascii_get(unsigned char *edid,
  * @return The encoded serial identifier.
  */
 EAPI char *
-ecore_x_randr_edid_display_serial_get(unsigned char *edid, 
+ecore_x_randr_edid_display_serial_get(unsigned char *edid,
                                       unsigned long edid_length);
-   
+
 /*
  * @brief Get the encoded model number from raw EDID data.
  *
@@ -2835,7 +3051,7 @@ ecore_x_randr_edid_display_serial_get(unsigned char *edid,
 EAPI int
 ecore_x_randr_edid_model_get(unsigned char *edid,
                              unsigned long edid_length);
-   
+
 /*
  * @brief Get the manufacturer serial number from raw EDID data.
  *
@@ -2846,7 +3062,7 @@ ecore_x_randr_edid_model_get(unsigned char *edid,
 EAPI int
 ecore_x_randr_edid_manufacturer_serial_number_get(unsigned char *edid,
                                                   unsigned long edid_length);
-   
+
 /*
  * @brief Get the manufacturer model number from raw EDID data.
  *
@@ -2857,7 +3073,7 @@ ecore_x_randr_edid_manufacturer_serial_number_get(unsigned char *edid,
 EAPI int
 ecore_x_randr_edid_manufacturer_model_get(unsigned char *edid,
                                           unsigned long edid_length);
-   
+
 /*
  * @brief Looks up the DPMS support from raw EDID data.
  *
@@ -2868,7 +3084,7 @@ ecore_x_randr_edid_manufacturer_model_get(unsigned char *edid,
 EAPI Eina_Bool
 ecore_x_randr_edid_dpms_available_get(unsigned char *edid,
                                       unsigned long edid_length);
-   
+
 /*
  * @brief Looks up the DPMS Standby support from raw EDID data.
  *
@@ -2879,7 +3095,7 @@ ecore_x_randr_edid_dpms_available_get(unsigned char *edid,
 EAPI Eina_Bool
 ecore_x_randr_edid_dpms_standby_available_get(unsigned char *edid,
                                               unsigned long edid_length);
-   
+
 /*
  * @brief Looks up the DPMS Suspend support from raw EDID data.
  *
@@ -2890,7 +3106,7 @@ ecore_x_randr_edid_dpms_standby_available_get(unsigned char *edid,
 EAPI Eina_Bool
 ecore_x_randr_edid_dpms_suspend_available_get(unsigned char *edid,
                                               unsigned long edid_length);
-   
+
 /*
  * @brief Looks up the DPMS Off support from raw EDID data.
  *
@@ -2901,7 +3117,7 @@ ecore_x_randr_edid_dpms_suspend_available_get(unsigned char *edid,
 EAPI Eina_Bool
 ecore_x_randr_edid_dpms_off_available_get(unsigned char *edid,
                                           unsigned long edid_length);
-   
+
 /*
  * @brief Get the preferred aspect ratio from raw EDID data.
  *
@@ -2912,7 +3128,7 @@ ecore_x_randr_edid_dpms_off_available_get(unsigned char *edid,
 EAPI Ecore_X_Randr_Edid_Aspect_Ratio
 ecore_x_randr_edid_display_aspect_ratio_preferred_get(unsigned char *edid,
                                                       unsigned long edid_length);
-   
+
 /*
  * @brief Get the supported aspect ratios from raw EDID data.
  *
@@ -2923,7 +3139,7 @@ ecore_x_randr_edid_display_aspect_ratio_preferred_get(unsigned char *edid,
 EAPI Ecore_X_Randr_Edid_Aspect_Ratio
 ecore_x_randr_edid_display_aspect_ratios_get(unsigned char *edid,
                                              unsigned long edid_length);
-   
+
 /*
  * @brief Get the supported colorschemes from raw EDID data.
  *
@@ -2934,7 +3150,7 @@ ecore_x_randr_edid_display_aspect_ratios_get(unsigned char *edid,
 EAPI Ecore_X_Randr_Edid_Display_Colorscheme
 ecore_x_randr_edid_display_colorscheme_get(unsigned char *edid,
                                            unsigned long edid_length);
-   
+
 /*
  * @brief Get the display type from raw EDID data.
  *
@@ -2945,7 +3161,7 @@ ecore_x_randr_edid_display_colorscheme_get(unsigned char *edid,
 EAPI Eina_Bool
 ecore_x_randr_edid_display_type_digital_get(unsigned char *edid,
                                             unsigned long edid_length);
-   
+
 /*
  * @brief Get the display interface type from raw EDID data.
  *
@@ -2956,10 +3172,11 @@ ecore_x_randr_edid_display_type_digital_get(unsigned char *edid,
 EAPI Ecore_X_Randr_Edid_Display_Interface_Type
 ecore_x_randr_edid_display_interface_type_get(unsigned char *edid,
                                               unsigned long edid_length);
-   
+
 /* ecore_x_randr_13.c */
 EAPI void
-ecore_x_randr_screen_backlight_level_set(Ecore_X_Window root, double level);
+ecore_x_randr_screen_backlight_level_set(Ecore_X_Window root,
+                                         double level);
 EAPI double
 ecore_x_randr_output_backlight_level_get(Ecore_X_Window root,
                                          Ecore_X_Randr_Output output);
@@ -2968,9 +3185,9 @@ ecore_x_randr_output_backlight_level_set(Ecore_X_Window root,
                                          Ecore_X_Randr_Output output,
                                          double level);
 EAPI Ecore_X_Randr_Output
-ecore_x_randr_primary_output_get(Ecore_X_Window root);
+ ecore_x_randr_primary_output_get(Ecore_X_Window root);
 EAPI void
-ecore_x_randr_primary_output_set(Ecore_X_Window root,
+ ecore_x_randr_primary_output_set(Ecore_X_Window root,
                                  Ecore_X_Randr_Output output);
 EAPI Ecore_X_Render_Subpixel_Order
 ecore_x_randr_output_subpixel_order_get(Ecore_X_Window root,
@@ -3034,7 +3251,8 @@ ecore_x_randr_crtc_tracking_area_set(Ecore_X_Window root,
                                      const int w,
                                      const int h);
 EAPI Eina_Rectangle *
-ecore_x_randr_crtc_border_area_get(Ecore_X_Window root, Ecore_X_Randr_Crtc crtc);
+ecore_x_randr_crtc_border_area_get(Ecore_X_Window root,
+                                   Ecore_X_Randr_Crtc crtc);
 EAPI Eina_Bool
 ecore_x_randr_crtc_border_area_set(Ecore_X_Window root,
                                    Ecore_X_Randr_Crtc crtc,
@@ -3044,67 +3262,88 @@ ecore_x_randr_crtc_border_area_set(Ecore_X_Window root,
                                    const int bottom);
 
 /* XRender Support (horrendously incomplete) */
-typedef Ecore_X_ID   Ecore_X_Picture;
+typedef Ecore_X_ID Ecore_X_Picture;
 
 /* XFixes Extension Support */
-typedef Ecore_X_ID   Ecore_X_Region;
+typedef Ecore_X_ID Ecore_X_Region;
 
-typedef enum _Ecore_X_Region_Type {
+typedef enum _Ecore_X_Region_Type
+{
    ECORE_X_REGION_BOUNDING,
    ECORE_X_REGION_CLIP
 } Ecore_X_Region_Type;
 
-EAPI Ecore_X_Region         ecore_x_region_new(Ecore_X_Rectangle *rects, int num);
-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_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);
-EAPI void                   ecore_x_region_intersect(Ecore_X_Region dest,
-                                                     Ecore_X_Region source1,
-                                                     Ecore_X_Region source2);
-EAPI void                   ecore_x_region_subtract(Ecore_X_Region dest,
-                                                    Ecore_X_Region source1,
-                                                    Ecore_X_Region source2);
-EAPI void                   ecore_x_region_invert(Ecore_X_Region     dest,
-                                                  Ecore_X_Rectangle *bounds,
-                                                  Ecore_X_Region     source);
-EAPI void                   ecore_x_region_translate(Ecore_X_Region region,
-                                                     int            dx,
-                                                     int            dy);
-EAPI void                   ecore_x_region_extents(Ecore_X_Region dest,
-                                                   Ecore_X_Region source);
-EAPI Ecore_X_Rectangle *    ecore_x_region_fetch(Ecore_X_Region     region,
-                                                 int               *num,
-                                                 Ecore_X_Rectangle *bounds);
-EAPI void                   ecore_x_region_expand(Ecore_X_Region dest,
-                                                  Ecore_X_Region source,
-                                                  unsigned int   left,
-                                                  unsigned int   right,
-                                                  unsigned int   top,
-                                                  unsigned int   bottom);
-EAPI void                   ecore_x_region_gc_clip_set(Ecore_X_Region region,
-                                                       Ecore_X_GC     gc,
-                                                       int            x_origin,
-                                                       int            y_origin);
-EAPI void                   ecore_x_region_window_shape_set(Ecore_X_Region     region,
-                                                            Ecore_X_Window     win,
-                                                            Ecore_X_Shape_Type type,
-                                                            int                x_offset,
-                                                            int                y_offset);
-EAPI void                   ecore_x_region_picture_clip_set(Ecore_X_Region  region,
-                                                            Ecore_X_Picture picture,
-                                                            int             x_origin,
-                                                            int             y_origin);
+EAPI Ecore_X_Region
+ecore_x_region_new(Ecore_X_Rectangle *rects,
+                   int num);
+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_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);
+EAPI void
+ecore_x_region_intersect(Ecore_X_Region dest,
+                         Ecore_X_Region source1,
+                         Ecore_X_Region source2);
+EAPI void
+ecore_x_region_subtract(Ecore_X_Region dest,
+                        Ecore_X_Region source1,
+                        Ecore_X_Region source2);
+EAPI void
+ecore_x_region_invert(Ecore_X_Region dest,
+                      Ecore_X_Rectangle *bounds,
+                      Ecore_X_Region source);
+EAPI void
+ecore_x_region_translate(Ecore_X_Region region,
+                         int dx,
+                         int dy);
+EAPI void
+ecore_x_region_extents(Ecore_X_Region dest,
+                       Ecore_X_Region source);
+EAPI Ecore_X_Rectangle *
+ecore_x_region_fetch(Ecore_X_Region region,
+                     int *num,
+                     Ecore_X_Rectangle *bounds);
+EAPI void
+ecore_x_region_expand(Ecore_X_Region dest,
+                      Ecore_X_Region source,
+                      unsigned int left,
+                      unsigned int right,
+                      unsigned int top,
+                      unsigned int bottom);
+EAPI void
+ecore_x_region_gc_clip_set(Ecore_X_Region region,
+                           Ecore_X_GC gc,
+                           int x_origin,
+                           int y_origin);
+EAPI void
+ecore_x_region_window_shape_set(Ecore_X_Region region,
+                                Ecore_X_Window win,
+                                Ecore_X_Shape_Type type,
+                                int x_offset,
+                                int y_offset);
+EAPI void
+ecore_x_region_picture_clip_set(Ecore_X_Region region,
+                                Ecore_X_Picture picture,
+                                int x_origin,
+                                int y_origin);
 
 /**
  * xfixes selection notification request.
@@ -3114,28 +3353,40 @@ EAPI void                   ecore_x_region_picture_clip_set(Ecore_X_Region  regi
  * @return EINA_TRUE on success, EINA_FALSE otherwise.
  * @since 1.1.0
  */
-EAPI Eina_Bool              ecore_x_fixes_selection_notification_request(Ecore_X_Atom selection);
+EAPI Eina_Bool
+ecore_x_fixes_selection_notification_request(Ecore_X_Atom selection);
 
 /* XComposite Extension Support */
-EAPI Eina_Bool              ecore_x_composite_query(void);
-EAPI void                   ecore_x_composite_redirect_window(Ecore_X_Window                win,
-                                                              Ecore_X_Composite_Update_Type type);
-EAPI void                   ecore_x_composite_redirect_subwindows(Ecore_X_Window                win,
-                                                                  Ecore_X_Composite_Update_Type type);
-EAPI void                   ecore_x_composite_unredirect_window(Ecore_X_Window                win,
-                                                                Ecore_X_Composite_Update_Type type);
-EAPI void                   ecore_x_composite_unredirect_subwindows(Ecore_X_Window                win,
-                                                                    Ecore_X_Composite_Update_Type type);
-EAPI Ecore_X_Pixmap         ecore_x_composite_name_window_pixmap_get(Ecore_X_Window win);
-EAPI void                   ecore_x_composite_window_events_disable(Ecore_X_Window win);
-EAPI void                   ecore_x_composite_window_events_enable(Ecore_X_Window win);
-EAPI Ecore_X_Window         ecore_x_composite_render_window_enable(Ecore_X_Window root);
-EAPI void                   ecore_x_composite_render_window_disable(Ecore_X_Window root);
+EAPI Eina_Bool
+ ecore_x_composite_query(void);
+EAPI void
+ ecore_x_composite_redirect_window(Ecore_X_Window win,
+                                  Ecore_X_Composite_Update_Type type);
+EAPI void
+ecore_x_composite_redirect_subwindows(Ecore_X_Window win,
+                                      Ecore_X_Composite_Update_Type type);
+EAPI void
+ecore_x_composite_unredirect_window(Ecore_X_Window win,
+                                    Ecore_X_Composite_Update_Type type);
+EAPI void
+ecore_x_composite_unredirect_subwindows(Ecore_X_Window win,
+                                        Ecore_X_Composite_Update_Type type);
+EAPI Ecore_X_Pixmap
+ ecore_x_composite_name_window_pixmap_get(Ecore_X_Window win);
+EAPI void
+ ecore_x_composite_window_events_disable(Ecore_X_Window win);
+EAPI void
+ ecore_x_composite_window_events_enable(Ecore_X_Window win);
+EAPI Ecore_X_Window
+ ecore_x_composite_render_window_enable(Ecore_X_Window root);
+EAPI void
+ ecore_x_composite_render_window_disable(Ecore_X_Window root);
 
 /* XDamage Extension Support */
-typedef Ecore_X_ID   Ecore_X_Damage;
+typedef Ecore_X_ID Ecore_X_Damage;
 
-typedef enum _Ecore_X_Damage_Report_Level {
+typedef enum _Ecore_X_Damage_Report_Level
+{
    ECORE_X_DAMAGE_REPORT_RAW_RECTANGLES,
    ECORE_X_DAMAGE_REPORT_DELTA_RECTANGLES,
    ECORE_X_DAMAGE_REPORT_BOUNDING_BOX,
@@ -3153,85 +3404,121 @@ struct _Ecore_X_Event_Damage
    Ecore_X_Rectangle           geometry;
 };
 
-typedef struct _Ecore_X_Event_Damage   Ecore_X_Event_Damage;
-
-EAPI Eina_Bool           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_free(Ecore_X_Damage damage);
-EAPI void                ecore_x_damage_subtract(Ecore_X_Damage damage,
-                                                 Ecore_X_Region repair,
-                                                 Ecore_X_Region parts);
-
-EAPI Eina_Bool           ecore_x_screen_is_composited(int screen);
-EAPI void                ecore_x_screen_is_composited_set(int            screen,
-                                                          Ecore_X_Window win);
-
-EAPI Eina_Bool           ecore_x_dpms_query(void);
-EAPI Eina_Bool           ecore_x_dpms_capable_get(void);
-EAPI Eina_Bool           ecore_x_dpms_enabled_get(void);
-EAPI void                ecore_x_dpms_enabled_set(int enabled);
-EAPI void                ecore_x_dpms_timeouts_get(unsigned int *standby,
-                                                   unsigned int *suspend,
-                                                   unsigned int *off);
-EAPI Eina_Bool           ecore_x_dpms_timeouts_set(unsigned int standby,
-                                                   unsigned int suspend,
-                                                   unsigned int off);
-EAPI unsigned int        ecore_x_dpms_timeout_standby_get(void);
-EAPI unsigned int        ecore_x_dpms_timeout_suspend_get(void);
-EAPI unsigned int        ecore_x_dpms_timeout_off_get(void);
-EAPI void                ecore_x_dpms_timeout_standby_set(unsigned int new_timeout);
-EAPI void                ecore_x_dpms_timeout_suspend_set(unsigned int new_timeout);
-EAPI void                ecore_x_dpms_timeout_off_set(unsigned int new_timeout);
-
-EAPI Eina_Bool           ecore_x_test_fake_key_down(const char *key);
-EAPI Eina_Bool           ecore_x_test_fake_key_up(const char *key);
-EAPI Eina_Bool           ecore_x_test_fake_key_press(const char *key);
-EAPI const char *        ecore_x_keysym_string_get(int keysym);
-
-typedef struct _Ecore_X_Image   Ecore_X_Image;
-
-EAPI Ecore_X_Image *     ecore_x_image_new(int            w,
-                                           int            h,
-                                           Ecore_X_Visual vis,
-                                           int            depth);
-EAPI void                ecore_x_image_free(Ecore_X_Image *im);
-EAPI Eina_Bool           ecore_x_image_get(Ecore_X_Image   *im,
-                                           Ecore_X_Drawable draw,
-                                           int              x,
-                                           int              y,
-                                           int              sx,
-                                           int              sy,
-                                           int              w,
-                                           int              h);
-EAPI void      ecore_x_image_put(Ecore_X_Image   *im,
-                                 Ecore_X_Drawable draw,
-                                 Ecore_X_GC       gc,
-                                 int              x,
-                                 int              y,
-                                 int              sx,
-                                 int              sy,
-                                 int              w,
-                                 int              h);
-EAPI void *         ecore_x_image_data_get(Ecore_X_Image *im,
-                                           int           *bpl,
-                                           int           *rows,
-                                           int           *bpp);
-EAPI Eina_Bool      ecore_x_image_is_argb32_get(Ecore_X_Image *im);
-         
-EAPI Eina_Bool      ecore_x_image_to_argb_convert(void *src, int sbpp, 
-                                                  int sbpl,
-                                                  Ecore_X_Colormap c, 
-                                                  Ecore_X_Visual v, 
-                                                  int x, int y, int w, int h, 
-                                                  unsigned int *dst,
-                                                  int dbpl, 
-                                                  int dx, int dy);
-
-EAPI Eina_Bool      ecore_x_input_multi_select(Ecore_X_Window win);
-
-EAPI Eina_Bool      ecore_x_vsync_animator_tick_source_set(Ecore_X_Window win);
-         
+typedef struct _Ecore_X_Event_Damage Ecore_X_Event_Damage;
+
+EAPI Eina_Bool
+ 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_free(Ecore_X_Damage damage);
+EAPI void
+ ecore_x_damage_subtract(Ecore_X_Damage damage,
+                        Ecore_X_Region repair,
+                        Ecore_X_Region parts);
+
+EAPI Eina_Bool
+ ecore_x_screen_is_composited(int screen);
+EAPI void
+ ecore_x_screen_is_composited_set(int screen,
+                                 Ecore_X_Window win);
+
+EAPI Eina_Bool
+ ecore_x_dpms_query(void);
+EAPI Eina_Bool
+ ecore_x_dpms_capable_get(void);
+EAPI Eina_Bool
+ ecore_x_dpms_enabled_get(void);
+EAPI void
+ ecore_x_dpms_enabled_set(int enabled);
+EAPI void
+ ecore_x_dpms_timeouts_get(unsigned int *standby,
+                          unsigned int *suspend,
+                          unsigned int *off);
+EAPI Eina_Bool
+ecore_x_dpms_timeouts_set(unsigned int standby,
+                          unsigned int suspend,
+                          unsigned int off);
+EAPI unsigned int
+ ecore_x_dpms_timeout_standby_get(void);
+EAPI unsigned int
+ ecore_x_dpms_timeout_suspend_get(void);
+EAPI unsigned int
+ ecore_x_dpms_timeout_off_get(void);
+EAPI void
+ ecore_x_dpms_timeout_standby_set(unsigned int new_timeout);
+EAPI void
+ ecore_x_dpms_timeout_suspend_set(unsigned int new_timeout);
+EAPI void
+ ecore_x_dpms_timeout_off_set(unsigned int new_timeout);
+
+EAPI Eina_Bool
+ ecore_x_test_fake_key_down(const char *key);
+EAPI Eina_Bool
+ ecore_x_test_fake_key_up(const char *key);
+EAPI Eina_Bool
+ ecore_x_test_fake_key_press(const char *key);
+EAPI const char *
+ ecore_x_keysym_string_get(int keysym);
+
+typedef struct _Ecore_X_Image Ecore_X_Image;
+
+EAPI Ecore_X_Image *
+ecore_x_image_new(int w,
+                  int h,
+                  Ecore_X_Visual vis,
+                  int depth);
+EAPI void
+ ecore_x_image_free(Ecore_X_Image *im);
+EAPI Eina_Bool
+ ecore_x_image_get(Ecore_X_Image *im,
+                  Ecore_X_Drawable draw,
+                  int x,
+                  int y,
+                  int sx,
+                  int sy,
+                  int w,
+                  int h);
+EAPI void
+ecore_x_image_put(Ecore_X_Image *im,
+                  Ecore_X_Drawable draw,
+                  Ecore_X_GC gc,
+                  int x,
+                  int y,
+                  int sx,
+                  int sy,
+                  int w,
+                  int h);
+EAPI void *
+ecore_x_image_data_get(Ecore_X_Image *im,
+                       int *bpl,
+                       int *rows,
+                       int *bpp);
+EAPI Eina_Bool
+ecore_x_image_is_argb32_get(Ecore_X_Image *im);
+
+EAPI Eina_Bool
+ecore_x_image_to_argb_convert(void *src,
+                              int sbpp,
+                              int sbpl,
+                              Ecore_X_Colormap c,
+                              Ecore_X_Visual v,
+                              int x,
+                              int y,
+                              int w,
+                              int h,
+                              unsigned int *dst,
+                              int dbpl,
+                              int dx,
+                              int dy);
+
+EAPI Eina_Bool
+ecore_x_input_multi_select(Ecore_X_Window win);
+
+EAPI Eina_Bool
+ecore_x_vsync_animator_tick_source_set(Ecore_X_Window win);
+
 #ifdef __cplusplus
 }
 #endif // ifdef __cplusplus
index f7925f9..f1e59d9 100644 (file)
@@ -249,6 +249,9 @@ EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_COMP_FLUSH;
 EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_COMP_DUMP;
 EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_COMP_PIXMAP;
 
+EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_VIDEO_PARENT;
+EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_VIDEO_POSITION;
+
 EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_USER_CREATED_WINDOW;
 EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_PARENT_BORDER_WINDOW;
 EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_COMP_DRI_BUFF_FLIP_SUPPORTED;
index 1c8aec9..48d3d8a 100644 (file)
@@ -285,6 +285,10 @@ EAPI Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_ROTATE_WINDOW_AVAILABLE_ANGLE = 0;
 EAPI Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_ROTATE_OPERATOR = 0;
 EAPI Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_ROTATE_ROOT_ANGLE = 0;
 
+/* currently Emotion and E17 specific extension */
+EAPI Ecore_X_Atom ECORE_X_ATOM_E_VIDEO_PARENT = 0;
+EAPI Ecore_X_Atom ECORE_X_ATOM_E_VIDEO_POSITION = 0;
+
 /* added by doyoun.kang - for user created window */
 EAPI Ecore_X_Atom ECORE_X_ATOM_USER_CREATED_WINDOW = 0;
 
index 156f8d2..7851d3f 100644 (file)
@@ -38,25 +38,25 @@ double _ecore_xcb_double_click_time = 0.25;
  *          being shut down.  0 is returned if an error occurs.
  * @ingroup Ecore_X_Init_Group
  */
-EAPI int 
-ecore_x_init(const char *name) 
+EAPI int
+ecore_x_init(const char *name)
 {
    char *gl = NULL;
    uint32_t mask, list[1];
 
    /* check if we have initialized already */
-   if (++_ecore_xcb_init_count != 1) 
+   if (++_ecore_xcb_init_count != 1)
      return _ecore_xcb_init_count;
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
 
    /* try to initialize eina */
-    if (!eina_init()) return --_ecore_xcb_init_count;
+   if (!eina_init()) return --_ecore_xcb_init_count;
 
    /* setup ecore_xcb log domain */
-   _ecore_xcb_log_dom = 
+   _ecore_xcb_log_dom =
      eina_log_domain_register("ecore_x", ECORE_XCB_DEFAULT_LOG_COLOR);
-   if (_ecore_xcb_log_dom < 0) 
+   if (_ecore_xcb_log_dom < 0)
      {
         EINA_LOG_ERR("Cannot create Ecore Xcb log domain");
         eina_shutdown();
@@ -64,52 +64,52 @@ ecore_x_init(const char *name)
      }
 
    /* try to initialize ecore */
-   if (!ecore_init()) 
+   if (!ecore_init())
      {
         /* unregister log domain */
-        eina_log_domain_unregister(_ecore_xcb_log_dom);
-        _ecore_xcb_log_dom = -1;
-        eina_shutdown();
-        return --_ecore_xcb_init_count;
+         eina_log_domain_unregister(_ecore_xcb_log_dom);
+         _ecore_xcb_log_dom = -1;
+         eina_shutdown();
+         return --_ecore_xcb_init_count;
      }
 
    /* try to initialize ecore_event */
-   if (!ecore_event_init()) 
+   if (!ecore_event_init())
      {
         /* unregister log domain */
-        eina_log_domain_unregister(_ecore_xcb_log_dom);
-        _ecore_xcb_log_dom = -1;
-        ecore_shutdown();
-        eina_shutdown();
-        return --_ecore_xcb_init_count;
+         eina_log_domain_unregister(_ecore_xcb_log_dom);
+         _ecore_xcb_log_dom = -1;
+         ecore_shutdown();
+         eina_shutdown();
+         return --_ecore_xcb_init_count;
      }
 
    /* NB: XLib has XInitThreads */
 
    /* check for env var which says we are not going to use GL @ all
-    * 
-    * NB: This is done because if someone wants a 'pure' xcb implementation 
-    * of ecore_x, all they need do is export this variable in the environment 
-    * and ecore_x will not use xlib stuff at all. 
-    * 
-    * The upside is you can get pure xcb-based ecore_x (w/ all the speed), but 
-    * there is a down-side here in that you cannot get OpenGL without XLib :( 
+    *
+    * NB: This is done because if someone wants a 'pure' xcb implementation
+    * of ecore_x, all they need do is export this variable in the environment
+    * and ecore_x will not use xlib stuff at all.
+    *
+    * The upside is you can get pure xcb-based ecore_x (w/ all the speed), but
+    * there is a down-side here in that you cannot get OpenGL without XLib :(
     */
    if ((gl = getenv("ECORE_X_NO_XLIB")))
      {
-        /* we found the env var that says 'Yes, we are not ever gonna try 
+        /* we found the env var that says 'Yes, we are not ever gonna try
          * OpenGL so it is safe to not use XLib at all' */
 
         /* try to connect to the display server */
-         _ecore_xcb_conn = xcb_connect(name, NULL);
+        _ecore_xcb_conn = xcb_connect(name, NULL);
      }
-   else 
+   else
      {
-        /* env var was not specified, so we will assume that the user 
+        /* env var was not specified, so we will assume that the user
          * may want opengl @ some point. connect this way for opengl to work */
         void *libxcb, *libxlib;
         Display *(*_real_display)(const char *display);
-        xcb_connection_t *(*_real_connection)(Display *dpy);
+        xcb_connection_t *(*_real_connection)(Display * dpy);
         void (*_real_queue)(Display *dpy, enum XEventQueueOwner owner);
         int (*_real_close)(Display *dpy);
 #ifdef EVAS_FRAME_QUEUING
@@ -118,11 +118,11 @@ ecore_x_init(const char *name)
 
         /* want to dlopen here to avoid actual library linkage */
         libxlib = dlopen("libX11.so", (RTLD_LAZY | RTLD_GLOBAL));
-        if (!libxlib) 
+        if (!libxlib)
           libxlib = dlopen("libX11.so.6", (RTLD_LAZY | RTLD_GLOBAL));
-        if (!libxlib) 
+        if (!libxlib)
           libxlib = dlopen("libX11.so.6.3.0", (RTLD_LAZY | RTLD_GLOBAL));
-        if (!libxlib) 
+        if (!libxlib)
           {
              ERR("Could not dlsym to libX11");
              /* unregister log domain */
@@ -135,11 +135,11 @@ ecore_x_init(const char *name)
           }
 
         libxcb = dlopen("libX11-xcb.so", (RTLD_LAZY | RTLD_GLOBAL));
-        if (!libxcb) 
+        if (!libxcb)
           libxcb = dlopen("libX11-xcb.so.1", (RTLD_LAZY | RTLD_GLOBAL));
-        if (!libxcb) 
+        if (!libxcb)
           libxcb = dlopen("libX11-xcb.so.1.0.0", (RTLD_LAZY | RTLD_GLOBAL));
-        if (!libxcb) 
+        if (!libxcb)
           {
              ERR("Could not dlsym to libX11-xcb");
              /* unregister log domain */
@@ -159,13 +159,13 @@ ecore_x_init(const char *name)
         _real_threads = dlsym(libxlib, "XInitThreads");
 #endif
 
-        if (_real_display) 
+        if (_real_display)
           {
 #ifdef EVAS_FRAME_QUEUING
              if (_real_threads) _real_threads();
 #endif
              _ecore_xcb_display = _real_display(name);
-             if (!_ecore_xcb_display) 
+             if (!_ecore_xcb_display)
                {
                   ERR("Could not open Display via XLib");
                   /* unregister log domain */
@@ -176,9 +176,9 @@ ecore_x_init(const char *name)
                   eina_shutdown();
                   return --_ecore_xcb_init_count;
                }
-             if (_real_connection) 
+             if (_real_connection)
                _ecore_xcb_conn = _real_connection(_ecore_xcb_display);
-             if (!_ecore_xcb_conn) 
+             if (!_ecore_xcb_conn)
                {
                   ERR("Could not get XCB Connection from XLib");
 
@@ -192,7 +192,7 @@ ecore_x_init(const char *name)
                   eina_shutdown();
                   return --_ecore_xcb_init_count;
                }
-             if (_real_queue) 
+             if (_real_queue)
                _real_queue(_ecore_xcb_display, XCBOwnsEventQueue);
           }
      }
@@ -209,13 +209,13 @@ ecore_x_init(const char *name)
      }
 
    /* grab the default screen */
-   _ecore_xcb_screen = 
+   _ecore_xcb_screen =
      xcb_setup_roots_iterator(xcb_get_setup(_ecore_xcb_conn)).data;
 
    /* NB: This method of init/finalize extensions first, then atoms
-    * Does end up being 2 round trips to X, BUT if we do extensions init then 
-    * atoms init first, and call the 'finalize' functions later, we end up 
-    * being slower, so it's a trade-off. This current method clocks in 
+    * Does end up being 2 round trips to X, BUT if we do extensions init then
+    * atoms init first, and call the 'finalize' functions later, we end up
+    * being slower, so it's a trade-off. This current method clocks in
     * around 0.003 for fetching atoms VS 0.010 for init both then finalize */
 
    /* prefetch extension data */
@@ -239,13 +239,13 @@ ecore_x_init(const char *name)
    _ecore_xcb_keymap_finalize();
 
    /* setup ecore fd handler */
-   _ecore_xcb_fd_handler = 
-     ecore_main_fd_handler_add(xcb_get_file_descriptor(_ecore_xcb_conn), 
-                               ECORE_FD_READ, _ecore_xcb_fd_handle, 
-                               _ecore_xcb_conn, _ecore_xcb_fd_handle_buff, 
+   _ecore_xcb_fd_handler =
+     ecore_main_fd_handler_add(xcb_get_file_descriptor(_ecore_xcb_conn),
+                               ECORE_FD_READ, _ecore_xcb_fd_handle,
+                               _ecore_xcb_conn, _ecore_xcb_fd_handle_buff,
                                _ecore_xcb_conn);
 
-   if (!_ecore_xcb_fd_handler) 
+   if (!_ecore_xcb_fd_handler)
      return _ecore_xcb_shutdown(EINA_TRUE);
 
    /* prefetch atoms */
@@ -263,13 +263,13 @@ ecore_x_init(const char *name)
    /* old e hints init: dummy function */
    ecore_x_e_init();
 
-   _ecore_xcb_atoms_wm_protocol[ECORE_X_WM_PROTOCOL_DELETE_REQUEST] = 
+   _ecore_xcb_atoms_wm_protocol[ECORE_X_WM_PROTOCOL_DELETE_REQUEST] =
      ECORE_X_ATOM_WM_DELETE_WINDOW;
-   _ecore_xcb_atoms_wm_protocol[ECORE_X_WM_PROTOCOL_TAKE_FOCUS] = 
+   _ecore_xcb_atoms_wm_protocol[ECORE_X_WM_PROTOCOL_TAKE_FOCUS] =
      ECORE_X_ATOM_WM_TAKE_FOCUS;
-   _ecore_xcb_atoms_wm_protocol[ECORE_X_NET_WM_PROTOCOL_PING] = 
+   _ecore_xcb_atoms_wm_protocol[ECORE_X_NET_WM_PROTOCOL_PING] =
      ECORE_X_ATOM_NET_WM_PING;
-   _ecore_xcb_atoms_wm_protocol[ECORE_X_NET_WM_PROTOCOL_SYNC_REQUEST] = 
+   _ecore_xcb_atoms_wm_protocol[ECORE_X_NET_WM_PROTOCOL_SYNC_REQUEST] =
      ECORE_X_ATOM_NET_WM_SYNC_REQUEST;
 
    /* setup selection */
@@ -278,7 +278,7 @@ ecore_x_init(const char *name)
    /* setup dnd */
    _ecore_xcb_dnd_init();
 
-   _ecore_xcb_idle_enterer = 
+   _ecore_xcb_idle_enterer =
      ecore_idle_enterer_add(_ecore_xcb_idle_enter, NULL);
 
    return _ecore_xcb_init_count;
@@ -294,8 +294,8 @@ ecore_x_init(const char *name)
  *          being shut down.
  * @ingroup Ecore_X_Init_Group
  */
-EAPI int 
-ecore_x_shutdown(void) 
+EAPI int
+ecore_x_shutdown(void)
 {
    return _ecore_xcb_shutdown(EINA_TRUE);
 }
@@ -307,8 +307,8 @@ ecore_x_shutdown(void)
  *
  * @ingroup Ecore_X_Init_Group
  */
-EAPI int 
-ecore_x_disconnect(void) 
+EAPI int
+ecore_x_disconnect(void)
 {
    return _ecore_xcb_shutdown(EINA_FALSE);
 }
@@ -324,8 +324,8 @@ ecore_x_disconnect(void)
  * Sends all X commands in the X Display buffer.
  * @ingroup Ecore_X_Flush_Group
  */
-EAPI void 
-ecore_x_flush(void) 
+EAPI void
+ecore_x_flush(void)
 {
 //   LOGFN(__FILE__, __LINE__, __FUNCTION__);
 
@@ -339,7 +339,7 @@ ecore_x_flush(void)
  * @ingroup Ecore_X_Display_Attr_Group
  */
 EAPI Ecore_X_Screen *
-ecore_x_default_screen_get(void) 
+ecore_x_default_screen_get(void)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
 
@@ -347,7 +347,7 @@ ecore_x_default_screen_get(void)
 }
 
 EAPI Ecore_X_Connection *
-ecore_x_connection_get(void) 
+ecore_x_connection_get(void)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
 
@@ -358,8 +358,8 @@ ecore_x_connection_get(void)
 /**
  * Return the last event time
  */
-EAPI Ecore_X_Time 
-ecore_x_current_time_get(void) 
+EAPI Ecore_X_Time
+ecore_x_current_time_get(void)
 {
    return _ecore_xcb_events_last_time_get();
 }
@@ -369,37 +369,37 @@ ecore_x_current_time_get(void)
  * processed by the server.
  * @ingroup Ecore_X_Flush_Group
  */
-EAPI void 
-ecore_x_sync(void) 
+EAPI void
+ecore_x_sync(void)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
 
    CHECK_XCB_CONN;
-   free(xcb_get_input_focus_reply(_ecore_xcb_conn, 
-                                  xcb_get_input_focus_unchecked(_ecore_xcb_conn), 
+   free(xcb_get_input_focus_reply(_ecore_xcb_conn,
+                                  xcb_get_input_focus_unchecked(_ecore_xcb_conn),
                                   NULL));
 }
 
-EAPI void 
-ecore_x_grab(void) 
+EAPI void
+ecore_x_grab(void)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
 
    CHECK_XCB_CONN;
    _ecore_xcb_grab_count++;
-   if (_ecore_xcb_grab_count == 1) 
+   if (_ecore_xcb_grab_count == 1)
      xcb_grab_server(_ecore_xcb_conn);
 }
 
-EAPI void 
-ecore_x_ungrab(void) 
+EAPI void
+ecore_x_ungrab(void)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
 
    CHECK_XCB_CONN;
    _ecore_xcb_grab_count--;
    if (_ecore_xcb_grab_count < 0) _ecore_xcb_grab_count = 0;
-   if (_ecore_xcb_grab_count == 0) 
+   if (_ecore_xcb_grab_count == 0)
      xcb_ungrab_server(_ecore_xcb_conn);
 }
 
@@ -416,8 +416,10 @@ ecore_x_ungrab(void)
  *
  * @return EINA_TRUE on success EINA_FALSE otherwise.
  */
-EAPI Eina_Bool 
-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 Eina_Bool
+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)
 {
    xcb_client_message_event_t ev;
    xcb_void_cookie_t cookie;
@@ -441,7 +443,7 @@ ecore_x_client_message32_send(Ecore_X_Window win, Ecore_X_Atom type, Ecore_X_Eve
    cookie = xcb_send_event(_ecore_xcb_conn, 0, win, mask, (const char *)&ev);
 
    err = xcb_request_check(_ecore_xcb_conn, cookie);
-   if (err) 
+   if (err)
      {
         DBG("Problem Sending Event");
         DBG("\tType: %d", type);
@@ -464,8 +466,9 @@ ecore_x_client_message32_send(Ecore_X_Window win, Ecore_X_Atom type, Ecore_X_Eve
  *
  * @return EINA_TRUE on success EINA_FALSE otherwise.
  */
-EAPI Eina_Bool 
-ecore_x_client_message8_send(Ecore_X_Window win, Ecore_X_Atom type, const void *data, int len) 
+EAPI Eina_Bool
+ecore_x_client_message8_send(Ecore_X_Window win, Ecore_X_Atom type,
+                             const void *data, int len)
 {
    xcb_client_message_event_t ev;
    xcb_void_cookie_t cookie;
@@ -484,11 +487,11 @@ ecore_x_client_message8_send(Ecore_X_Window win, Ecore_X_Atom type, const void *
    memcpy(ev.data.data8, data, len);
    memset(ev.data.data8 + len, 0, 20 - len);
 
-   cookie = xcb_send_event(_ecore_xcb_conn, 0, win, 
+   cookie = xcb_send_event(_ecore_xcb_conn, 0, win,
                            XCB_EVENT_MASK_NO_EVENT, (const char *)&ev);
 
    err = xcb_request_check(_ecore_xcb_conn, cookie);
-   if (err) 
+   if (err)
      {
         DBG("Problem Sending Event");
         DBG("\tType: %d", type);
@@ -501,8 +504,8 @@ ecore_x_client_message8_send(Ecore_X_Window win, Ecore_X_Atom type, const void *
    return EINA_TRUE;
 }
 
-EAPI Eina_Bool 
-ecore_x_mouse_down_send(Ecore_X_Window win, int x, int y, int b) 
+EAPI Eina_Bool
+ecore_x_mouse_down_send(Ecore_X_Window win, int x, int y, int b)
 {
    xcb_translate_coordinates_cookie_t cookie;
    xcb_translate_coordinates_reply_t *reply;
@@ -521,7 +524,7 @@ ecore_x_mouse_down_send(Ecore_X_Window win, int x, int y, int b)
 
    memset(&ev, 0, sizeof(xcb_button_press_event_t));
 
-   ev.response_type = XCB_BUTTON_PRESS; 
+   ev.response_type = XCB_BUTTON_PRESS;
    ev.event = win;
    ev.child = win;
    ev.root = root;
@@ -535,11 +538,11 @@ ecore_x_mouse_down_send(Ecore_X_Window win, int x, int y, int b)
    ev.time = ecore_x_current_time_get();
    free(reply);
 
-   vcookie = xcb_send_event(_ecore_xcb_conn, 1, win, 
+   vcookie = xcb_send_event(_ecore_xcb_conn, 1, win,
                             XCB_EVENT_MASK_BUTTON_PRESS, (const char *)&ev);
 
    err = xcb_request_check(_ecore_xcb_conn, vcookie);
-   if (err) 
+   if (err)
      {
         _ecore_xcb_error_handle(err);
         free(err);
@@ -549,8 +552,8 @@ ecore_x_mouse_down_send(Ecore_X_Window win, int x, int y, int b)
    return EINA_TRUE;
 }
 
-EAPI Eina_Bool 
-ecore_x_mouse_up_send(Ecore_X_Window win, int x, int y, int b) 
+EAPI Eina_Bool
+ecore_x_mouse_up_send(Ecore_X_Window win, int x, int y, int b)
 {
    xcb_translate_coordinates_cookie_t cookie;
    xcb_translate_coordinates_reply_t *reply;
@@ -583,11 +586,11 @@ ecore_x_mouse_up_send(Ecore_X_Window win, int x, int y, int b)
    ev.time = ecore_x_current_time_get();
    free(reply);
 
-   vcookie = xcb_send_event(_ecore_xcb_conn, 1, win, 
+   vcookie = xcb_send_event(_ecore_xcb_conn, 1, win,
                             XCB_EVENT_MASK_BUTTON_RELEASE, (const char *)&ev);
 
    err = xcb_request_check(_ecore_xcb_conn, vcookie);
-   if (err) 
+   if (err)
      {
         _ecore_xcb_error_handle(err);
         free(err);
@@ -597,8 +600,8 @@ ecore_x_mouse_up_send(Ecore_X_Window win, int x, int y, int b)
    return EINA_TRUE;
 }
 
-EAPI Eina_Bool 
-ecore_x_mouse_move_send(Ecore_X_Window win, int x, int y) 
+EAPI Eina_Bool
+ecore_x_mouse_move_send(Ecore_X_Window win, int x, int y)
 {
    xcb_translate_coordinates_cookie_t cookie;
    xcb_translate_coordinates_reply_t *reply;
@@ -631,11 +634,11 @@ ecore_x_mouse_move_send(Ecore_X_Window win, int x, int y)
    ev.time = ecore_x_current_time_get();
    free(reply);
 
-   vcookie = xcb_send_event(_ecore_xcb_conn, 1, win, 
+   vcookie = xcb_send_event(_ecore_xcb_conn, 1, win,
                             XCB_EVENT_MASK_POINTER_MOTION, (const char *)&ev);
 
    err = xcb_request_check(_ecore_xcb_conn, vcookie);
-   if (err) 
+   if (err)
      {
         _ecore_xcb_error_handle(err);
         free(err);
@@ -645,8 +648,8 @@ ecore_x_mouse_move_send(Ecore_X_Window win, int x, int y)
    return EINA_TRUE;
 }
 
-EAPI Eina_Bool 
-ecore_x_keyboard_grab(Ecore_X_Window win) 
+EAPI Eina_Bool
+ecore_x_keyboard_grab(Ecore_X_Window win)
 {
    xcb_grab_keyboard_cookie_t cookie;
    xcb_grab_keyboard_reply_t *reply;
@@ -654,8 +657,8 @@ ecore_x_keyboard_grab(Ecore_X_Window win)
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    CHECK_XCB_CONN;
 
-   cookie = 
-     xcb_grab_keyboard_unchecked(_ecore_xcb_conn, 0, win, XCB_CURRENT_TIME, 
+   cookie =
+     xcb_grab_keyboard_unchecked(_ecore_xcb_conn, 0, win, XCB_CURRENT_TIME,
                                  XCB_GRAB_MODE_ASYNC, XCB_GRAB_MODE_ASYNC);
    reply = xcb_grab_keyboard_reply(_ecore_xcb_conn, cookie, NULL);
    if (!reply) return EINA_FALSE;
@@ -663,8 +666,8 @@ ecore_x_keyboard_grab(Ecore_X_Window win)
    return EINA_TRUE;
 }
 
-EAPI void 
-ecore_x_keyboard_ungrab(void) 
+EAPI void
+ecore_x_keyboard_ungrab(void)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    CHECK_XCB_CONN;
@@ -672,8 +675,8 @@ ecore_x_keyboard_ungrab(void)
    xcb_ungrab_keyboard(_ecore_xcb_conn, XCB_CURRENT_TIME);
 }
 
-EAPI void 
-ecore_x_pointer_xy_get(Ecore_X_Window win, int *x, int *y) 
+EAPI void
+ecore_x_pointer_xy_get(Ecore_X_Window win, int *x, int *y)
 {
    xcb_query_pointer_cookie_t cookie;
    xcb_query_pointer_reply_t *reply;
@@ -694,8 +697,8 @@ ecore_x_pointer_xy_get(Ecore_X_Window win, int *x, int *y)
    free(reply);
 }
 
-EAPI Eina_Bool 
-ecore_x_pointer_control_set(int accel_num, int accel_denom, int threshold) 
+EAPI Eina_Bool
+ecore_x_pointer_control_set(int accel_num, int accel_denom, int threshold)
 {
    xcb_void_cookie_t vcookie;
    xcb_generic_error_t *err;
@@ -703,11 +706,11 @@ ecore_x_pointer_control_set(int accel_num, int accel_denom, int threshold)
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    CHECK_XCB_CONN;
 
-   vcookie = 
-     xcb_change_pointer_control(_ecore_xcb_conn, 
+   vcookie =
+     xcb_change_pointer_control(_ecore_xcb_conn,
                                 accel_num, accel_denom, threshold, 1, 1);
    err = xcb_request_check(_ecore_xcb_conn, vcookie);
-   if (err) 
+   if (err)
      {
         _ecore_xcb_error_handle(err);
         free(err);
@@ -717,8 +720,8 @@ ecore_x_pointer_control_set(int accel_num, int accel_denom, int threshold)
    return EINA_TRUE;
 }
 
-EAPI Eina_Bool 
-ecore_x_pointer_control_get(int *accel_num, int *accel_denom, int *threshold) 
+EAPI Eina_Bool
+ecore_x_pointer_control_get(int *accel_num, int *accel_denom, int *threshold)
 {
    xcb_get_pointer_control_cookie_t cookie;
    xcb_get_pointer_control_reply_t *reply;
@@ -742,8 +745,8 @@ ecore_x_pointer_control_get(int *accel_num, int *accel_denom, int *threshold)
    return EINA_TRUE;
 }
 
-EAPI Eina_Bool 
-ecore_x_pointer_mapping_set(unsigned char *map, int nmap) 
+EAPI Eina_Bool
+ecore_x_pointer_mapping_set(unsigned char *map, int nmap)
 {
    xcb_set_pointer_mapping_cookie_t cookie;
    xcb_set_pointer_mapping_reply_t *reply;
@@ -755,15 +758,15 @@ ecore_x_pointer_mapping_set(unsigned char *map, int nmap)
    cookie = xcb_set_pointer_mapping_unchecked(_ecore_xcb_conn, nmap, map);
    reply = xcb_set_pointer_mapping_reply(_ecore_xcb_conn, cookie, NULL);
    if (!reply) return EINA_FALSE;
-   ret = 
+   ret =
      (reply->status == XCB_MAPPING_STATUS_SUCCESS) ? EINA_TRUE : EINA_FALSE;
 
    free(reply);
    return ret;
 }
 
-EAPI Eina_Bool 
-ecore_x_pointer_mapping_get(unsigned char *map, int nmap) 
+EAPI Eina_Bool
+ecore_x_pointer_mapping_get(unsigned char *map, int nmap)
 {
    xcb_get_pointer_mapping_cookie_t cookie;
    xcb_get_pointer_mapping_reply_t *reply;
@@ -785,7 +788,7 @@ ecore_x_pointer_mapping_get(unsigned char *map, int nmap)
         return EINA_FALSE;
      }
 
-   if (map) 
+   if (map)
      {
         uint8_t *tmp;
         int i = 0;
@@ -799,8 +802,8 @@ ecore_x_pointer_mapping_get(unsigned char *map, int nmap)
    return EINA_TRUE;
 }
 
-EAPI Eina_Bool 
-ecore_x_pointer_grab(Ecore_X_Window win) 
+EAPI Eina_Bool
+ecore_x_pointer_grab(Ecore_X_Window win)
 {
    xcb_grab_pointer_cookie_t cookie;
    xcb_grab_pointer_reply_t *reply;
@@ -810,13 +813,13 @@ ecore_x_pointer_grab(Ecore_X_Window win)
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    CHECK_XCB_CONN;
 
-   mask = (XCB_EVENT_MASK_BUTTON_PRESS | XCB_EVENT_MASK_BUTTON_RELEASE | 
-           XCB_EVENT_MASK_ENTER_WINDOW | XCB_EVENT_MASK_LEAVE_WINDOW | 
+   mask = (XCB_EVENT_MASK_BUTTON_PRESS | XCB_EVENT_MASK_BUTTON_RELEASE |
+           XCB_EVENT_MASK_ENTER_WINDOW | XCB_EVENT_MASK_LEAVE_WINDOW |
            XCB_EVENT_MASK_POINTER_MOTION);
 
-   cookie = xcb_grab_pointer_unchecked(_ecore_xcb_conn, 0, win, mask, 
-                                       XCB_GRAB_MODE_ASYNC, 
-                                       XCB_GRAB_MODE_ASYNC, 
+   cookie = xcb_grab_pointer_unchecked(_ecore_xcb_conn, 0, win, mask,
+                                       XCB_GRAB_MODE_ASYNC,
+                                       XCB_GRAB_MODE_ASYNC,
                                        XCB_NONE, XCB_NONE, XCB_CURRENT_TIME);
    reply = xcb_grab_pointer_reply(_ecore_xcb_conn, cookie, NULL);
    if (!reply) return EINA_FALSE;
@@ -827,8 +830,8 @@ ecore_x_pointer_grab(Ecore_X_Window win)
    return ret;
 }
 
-EAPI Eina_Bool 
-ecore_x_pointer_confine_grab(Ecore_X_Window win) 
+EAPI Eina_Bool
+ecore_x_pointer_confine_grab(Ecore_X_Window win)
 {
    xcb_grab_pointer_cookie_t cookie;
    xcb_grab_pointer_reply_t *reply;
@@ -838,13 +841,13 @@ ecore_x_pointer_confine_grab(Ecore_X_Window win)
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    CHECK_XCB_CONN;
 
-   mask = (XCB_EVENT_MASK_BUTTON_PRESS | XCB_EVENT_MASK_BUTTON_RELEASE | 
-           XCB_EVENT_MASK_ENTER_WINDOW | XCB_EVENT_MASK_LEAVE_WINDOW | 
+   mask = (XCB_EVENT_MASK_BUTTON_PRESS | XCB_EVENT_MASK_BUTTON_RELEASE |
+           XCB_EVENT_MASK_ENTER_WINDOW | XCB_EVENT_MASK_LEAVE_WINDOW |
            XCB_EVENT_MASK_POINTER_MOTION);
 
-   cookie = xcb_grab_pointer_unchecked(_ecore_xcb_conn, 0, win, mask, 
-                                       XCB_GRAB_MODE_ASYNC, 
-                                       XCB_GRAB_MODE_ASYNC, 
+   cookie = xcb_grab_pointer_unchecked(_ecore_xcb_conn, 0, win, mask,
+                                       XCB_GRAB_MODE_ASYNC,
+                                       XCB_GRAB_MODE_ASYNC,
                                        win, XCB_NONE, XCB_CURRENT_TIME);
    reply = xcb_grab_pointer_reply(_ecore_xcb_conn, cookie, NULL);
    if (!reply) return EINA_FALSE;
@@ -855,8 +858,8 @@ ecore_x_pointer_confine_grab(Ecore_X_Window win)
    return ret;
 }
 
-EAPI void 
-ecore_x_pointer_ungrab(void) 
+EAPI void
+ecore_x_pointer_ungrab(void)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    CHECK_XCB_CONN;
@@ -864,8 +867,8 @@ ecore_x_pointer_ungrab(void)
    xcb_ungrab_pointer(_ecore_xcb_conn, XCB_CURRENT_TIME);
 }
 
-EAPI Eina_Bool 
-ecore_x_pointer_warp(Ecore_X_Window win, int x, int y) 
+EAPI Eina_Bool
+ecore_x_pointer_warp(Ecore_X_Window win, int x, int y)
 {
    xcb_void_cookie_t vcookie;
    xcb_generic_error_t *err;
@@ -873,10 +876,10 @@ ecore_x_pointer_warp(Ecore_X_Window win, int x, int y)
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    CHECK_XCB_CONN;
 
-   vcookie = 
+   vcookie =
      xcb_warp_pointer_checked(_ecore_xcb_conn, XCB_NONE, win, 0, 0, 0, 0, x, y);
    err = xcb_request_check(_ecore_xcb_conn, vcookie);
-   if (err) 
+   if (err)
      {
         _ecore_xcb_error_handle(err);
         free(err);
@@ -898,8 +901,8 @@ ecore_x_pointer_warp(Ecore_X_Window win, int x, int y)
  *
  * @returns EINA_TRUE on success, EINA_FALSE otherwise.
  */
-EAPI Eina_Bool 
-ecore_x_bell(int percent) 
+EAPI Eina_Bool
+ecore_x_bell(int percent)
 {
    xcb_void_cookie_t cookie;
    xcb_generic_error_t *err;
@@ -909,7 +912,7 @@ ecore_x_bell(int percent)
    // FIXME: Use unchecked version after development is ironed out
    cookie = xcb_bell_checked(_ecore_xcb_conn, percent);
    err = xcb_request_check(_ecore_xcb_conn, cookie);
-   if (err) 
+   if (err)
      {
         _ecore_xcb_error_handle(err);
         free(err);
@@ -919,8 +922,8 @@ ecore_x_bell(int percent)
    return EINA_TRUE;
 }
 
-EAPI void 
-ecore_x_display_size_get(Ecore_X_Display *dsp __UNUSED__, int *w, int *h) 
+EAPI void
+ecore_x_display_size_get(Ecore_X_Display *dsp __UNUSED__, int *w, int *h)
 {
    xcb_screen_t *screen;
 
@@ -933,8 +936,8 @@ ecore_x_display_size_get(Ecore_X_Display *dsp __UNUSED__, int *w, int *h)
    if (h) *h = screen->height_in_pixels;
 }
 
-EAPI unsigned long 
-ecore_x_display_black_pixel_get(Ecore_X_Display *dsp __UNUSED__) 
+EAPI unsigned long
+ecore_x_display_black_pixel_get(Ecore_X_Display *dsp __UNUSED__)
 {
    xcb_screen_t *screen;
 
@@ -946,8 +949,8 @@ ecore_x_display_black_pixel_get(Ecore_X_Display *dsp __UNUSED__)
    return screen->black_pixel;
 }
 
-EAPI unsigned long 
-ecore_x_display_white_pixel_get(Ecore_X_Display *dsp __UNUSED__) 
+EAPI unsigned long
+ecore_x_display_white_pixel_get(Ecore_X_Display *dsp __UNUSED__)
 {
    xcb_screen_t *screen;
 
@@ -959,8 +962,8 @@ ecore_x_display_white_pixel_get(Ecore_X_Display *dsp __UNUSED__)
    return screen->white_pixel;
 }
 
-EAPI void 
-ecore_x_pointer_last_xy_get(int *x, int *y) 
+EAPI void
+ecore_x_pointer_last_xy_get(int *x, int *y)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
 
@@ -968,20 +971,20 @@ ecore_x_pointer_last_xy_get(int *x, int *y)
    if (y) *y = _ecore_xcb_event_last_root_y;
 }
 
-EAPI void 
-ecore_x_focus_reset(void) 
+EAPI void
+ecore_x_focus_reset(void)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    CHECK_XCB_CONN;
 
-   xcb_set_input_focus(_ecore_xcb_conn, XCB_INPUT_FOCUS_POINTER_ROOT, 
-                       ((xcb_screen_t *)_ecore_xcb_screen)->root, 
+   xcb_set_input_focus(_ecore_xcb_conn, XCB_INPUT_FOCUS_POINTER_ROOT,
+                       ((xcb_screen_t *)_ecore_xcb_screen)->root,
                        XCB_CURRENT_TIME);
 //   ecore_x_flush();
 }
 
-EAPI void 
-ecore_x_events_allow_all(void) 
+EAPI void
+ecore_x_events_allow_all(void)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    CHECK_XCB_CONN;
@@ -997,8 +1000,8 @@ ecore_x_events_allow_all(void)
  *
  * @param win Window of the client to be killed
  */
-EAPI void 
-ecore_x_kill(Ecore_X_Window win) 
+EAPI void
+ecore_x_kill(Ecore_X_Window win)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    CHECK_XCB_CONN;
@@ -1016,8 +1019,8 @@ ecore_x_kill(Ecore_X_Window win)
  *
  * @param root The window whose children will be killed.
  */
-EAPI void 
-ecore_x_killall(Ecore_X_Window root) 
+EAPI void
+ecore_x_killall(Ecore_X_Window root)
 {
    int screens = 0, i = 0;
 
@@ -1063,8 +1066,8 @@ ecore_x_killall(Ecore_X_Window root)
  *
  * @return the general screen DPI (dots/pixels per inch).
  */
-EAPI int 
-ecore_x_dpi_get(void) 
+EAPI int
+ecore_x_dpi_get(void)
 {
    uint16_t mw = 0, w = 0;
 
@@ -1073,7 +1076,7 @@ ecore_x_dpi_get(void)
    mw = ((xcb_screen_t *)_ecore_xcb_screen)->width_in_millimeters;
    if (mw <= 0) return 75;
    w = ((xcb_screen_t *)_ecore_xcb_screen)->width_in_pixels;
-   return ((((w * 254) / mw) + 5) / 10);
+   return (((w * 254) / mw) + 5) / 10;
 }
 
 /**
@@ -1088,19 +1091,19 @@ ecore_x_dpi_get(void)
  * @ingroup Ecore_X_Display_Attr_Group
  */
 EAPI Ecore_X_Display *
-ecore_x_display_get(void) 
+ecore_x_display_get(void)
 {
    char *gl = NULL;
 
    CHECK_XCB_CONN;
 
-   /* if we have the 'dont use xlib' env var, then we are not using 
+   /* if we have the 'dont use xlib' env var, then we are not using
     * XLib and thus cannot return a real XDisplay.
-    * 
+    *
     * NB: This may break EFL in some places and needs lots of testing !!! */
-   if ((gl = getenv("ECORE_X_NO_XLIB"))) 
+   if ((gl = getenv("ECORE_X_NO_XLIB")))
      return (Ecore_X_Display *)_ecore_xcb_conn;
-   else /* we can safely return an XDisplay var */ 
+   else /* we can safely return an XDisplay var */
      return (Ecore_X_Display *)_ecore_xcb_display;
 }
 
@@ -1109,16 +1112,17 @@ ecore_x_display_get(void)
  * @return  The current X display file descriptor.
  * @ingroup Ecore_X_Display_Attr_Group
  */
-EAPI int 
-ecore_x_fd_get(void) 
+EAPI int
+ecore_x_fd_get(void)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    CHECK_XCB_CONN;
    return xcb_get_file_descriptor(_ecore_xcb_conn);
 }
 
-EAPI void 
-ecore_x_passive_grab_replay_func_set(Eina_Bool (*func) (void *data, int type, void *event), void *data) 
+EAPI void
+ecore_x_passive_grab_replay_func_set(Eina_Bool (*func)(void *data, int type, void *event),
+                                     void *data)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
 
@@ -1136,8 +1140,8 @@ ecore_x_passive_grab_replay_func_set(Eina_Bool (*func) (void *data, int type, vo
  *
  * @since 1.1
  */
-EAPI void 
-ecore_x_screen_size_get(const Ecore_X_Screen *screen, int *w, int *h) 
+EAPI void
+ecore_x_screen_size_get(const Ecore_X_Screen *screen, int *w, int *h)
 {
    xcb_screen_t *s;
 
@@ -1152,14 +1156,14 @@ ecore_x_screen_size_get(const Ecore_X_Screen *screen, int *w, int *h)
 
 /**
  * Retrieves the count of screens.
- * 
+ *
  * @return  The count of screens.
  * @ingroup Ecore_X_Display_Attr_Group
  *
  * @since 1.1
  */
-EAPI int 
-ecore_x_screen_count_get(void) 
+EAPI int
+ecore_x_screen_count_get(void)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    CHECK_XCB_CONN;
@@ -1169,25 +1173,25 @@ ecore_x_screen_count_get(void)
 
 /**
  * Retrieves the index number of the given screen.
- * 
+ *
  * @return  The index number of the screen.
  * @ingroup Ecore_X_Display_Attr_Group
  *
  * @since 1.1
  */
-EAPI int 
-ecore_x_screen_index_get(const Ecore_X_Screen *screen) 
+EAPI int
+ecore_x_screen_index_get(const Ecore_X_Screen *screen)
 {
    xcb_screen_iterator_t iter;
    int i = 0;
 
    CHECK_XCB_CONN;
 
-   iter = 
+   iter =
      xcb_setup_roots_iterator(xcb_get_setup(_ecore_xcb_conn));
-   for (; iter.rem; xcb_screen_next(&iter)) 
+   for (; iter.rem; xcb_screen_next(&iter))
      {
-        if (iter.data == (xcb_screen_t *)screen) 
+        if (iter.data == (xcb_screen_t *)screen)
           return i;
         i++;
      }
@@ -1197,29 +1201,29 @@ ecore_x_screen_index_get(const Ecore_X_Screen *screen)
 
 /**
  * Retrieves the screen based on index number.
- * 
+ *
  * @return  The Ecore_X_Screen at this index.
  * @ingroup Ecore_X_Display_Attr_Group
  *
  * @since 1.1
  */
 EAPI Ecore_X_Screen *
-ecore_x_screen_get(int index) 
+ecore_x_screen_get(int index)
 {
    xcb_screen_iterator_t iter;
    int i = 0;
 
    CHECK_XCB_CONN;
 
-   iter = 
+   iter =
      xcb_setup_roots_iterator(xcb_get_setup(_ecore_xcb_conn));
-   for (i = 0; iter.rem; xcb_screen_next(&iter), i++) 
+   for (i = 0; iter.rem; xcb_screen_next(&iter), i++)
      if (i == index) return iter.data;
 
    return NULL;
 }
 
-EAPI unsigned int 
+EAPI unsigned int
 ecore_x_visual_id_get(Ecore_X_Visual visual)
 {
    return ((xcb_visualtype_t *)visual)->visual_id;
@@ -1234,7 +1238,7 @@ ecore_x_visual_id_get(Ecore_X_Visual visual)
  * @return The default visual.
  * @since 1.1.0
  */
-EAPI Ecore_X_Visual 
+EAPI Ecore_X_Visual
 ecore_x_default_visual_get(Ecore_X_Display *disp __UNUSED__, Ecore_X_Screen *screen)
 {
    xcb_screen_t *s;
@@ -1245,10 +1249,10 @@ ecore_x_default_visual_get(Ecore_X_Display *disp __UNUSED__, Ecore_X_Screen *scr
 
    s = (xcb_screen_t *)screen;
    diter = xcb_screen_allowed_depths_iterator(s);
-   for (; diter.rem; xcb_depth_next(&diter)) 
+   for (; diter.rem; xcb_depth_next(&diter))
      {
         viter = xcb_depth_visuals_iterator(diter.data);
-        for (; viter.rem; xcb_visualtype_next(&viter)) 
+        for (; viter.rem; xcb_visualtype_next(&viter))
           {
              if (viter.data->visual_id == s->root_visual)
                return viter.data;
@@ -1266,7 +1270,7 @@ ecore_x_default_visual_get(Ecore_X_Display *disp __UNUSED__, Ecore_X_Screen *scr
  * @return The default colormap.
  * @since 1.1.0
  */
-EAPI Ecore_X_Colormap 
+EAPI Ecore_X_Colormap
 ecore_x_default_colormap_get(Ecore_X_Display *disp __UNUSED__, Ecore_X_Screen *screen)
 {
    xcb_screen_t *s;
@@ -1284,7 +1288,7 @@ ecore_x_default_colormap_get(Ecore_X_Display *disp __UNUSED__, Ecore_X_Screen *s
  * @return The default depth.
  * @since 1.1.0
  */
-EAPI int 
+EAPI int
 ecore_x_default_depth_get(Ecore_X_Display *disp __UNUSED__, Ecore_X_Screen *screen)
 {
    xcb_screen_t *s;
@@ -1303,8 +1307,8 @@ ecore_x_default_depth_get(Ecore_X_Display *disp __UNUSED__, Ecore_X_Screen *scre
  * @param   t The time in seconds
  * @ingroup Ecore_X_Display_Attr_Group
  */
-EAPI void 
-ecore_x_double_click_time_set(double t) 
+EAPI void
+ecore_x_double_click_time_set(double t)
 {
    if (t < 0.0) t = 0.0;
    _ecore_xcb_double_click_time = t;
@@ -1318,20 +1322,20 @@ ecore_x_double_click_time_set(double t)
  * @return  The timeout for double clicks in seconds.
  * @ingroup Ecore_X_Display_Attr_Group
  */
-EAPI double 
-ecore_x_double_click_time_get(void) 
+EAPI double
+ecore_x_double_click_time_get(void)
 {
    return _ecore_xcb_double_click_time;
 }
 
 /* local function prototypes */
-static int 
-_ecore_xcb_shutdown(Eina_Bool close_display) 
+static int
+_ecore_xcb_shutdown(Eina_Bool close_display)
 {
-   if (--_ecore_xcb_init_count != 0) 
+   if (--_ecore_xcb_init_count != 0)
      return _ecore_xcb_init_count;
 
-   if (!_ecore_xcb_conn) 
+   if (!_ecore_xcb_conn)
      return _ecore_xcb_init_count;
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
@@ -1344,9 +1348,9 @@ _ecore_xcb_shutdown(Eina_Bool close_display)
      ecore_main_fd_handler_del(_ecore_xcb_fd_handler);
 
    /* disconnect from display server */
-   if (close_display) 
+   if (close_display)
      xcb_disconnect(_ecore_xcb_conn);
-   else 
+   else
      {
         close(xcb_get_file_descriptor(_ecore_xcb_conn));
         _ecore_xcb_conn = NULL;
@@ -1386,16 +1390,15 @@ _ecore_xcb_shutdown(Eina_Bool close_display)
    return _ecore_xcb_init_count;
 }
 
-static Eina_Bool 
-_ecore_xcb_fd_handle(void *data, Ecore_Fd_Handler *hdlr __UNUSED__) 
+static Eina_Bool
+_ecore_xcb_fd_handle(void *data, Ecore_Fd_Handler *hdlr __UNUSED__)
 {
    xcb_connection_t *conn;
    xcb_generic_event_t *ev = NULL;
-//   xcb_generic_event_t *ev_mouse = NULL;
 
    conn = (xcb_connection_t *)data;
 
-   if (_ecore_xcb_event_buffered) 
+   if (_ecore_xcb_event_buffered)
      {
         _ecore_xcb_events_handle(_ecore_xcb_event_buffered);
         free(_ecore_xcb_event_buffered);
@@ -1404,59 +1407,39 @@ _ecore_xcb_fd_handle(void *data, Ecore_Fd_Handler *hdlr __UNUSED__)
 
 //   xcb_flush(conn);
 
-   while ((ev = xcb_poll_for_event(conn))) 
+   while ((ev = xcb_poll_for_event(conn)))
      {
-        /* NB: Ecore Xlib uses filterevent for xim, but xcb does not support 
+        /* NB: Ecore Xlib uses filterevent for xim, but xcb does not support
          * xim, so no need for it here */
 
-        /* check for errors first */
-        if (xcb_connection_has_error(conn))
-          {
-             xcb_generic_error_t *err;
-
-             err = (xcb_generic_error_t *)ev;
-             _ecore_xcb_io_error_handle(err);
-          }
-        else 
-          {
-             /* trap mouse motion events and filter out all but the last one. 
-              * we do this because handling every one is fairly cpu intensive 
-              * (especially on under-powered devices).
-              * 
-              * NB: I've tested this extensively and have found no ill effects, 
-              * but if someone notices something, please report it */
-             /* if ((ev->response_type & ~0x80) == XCB_MOTION_NOTIFY)  */
-             /*   { */
-             /*      if (ev_mouse) free(ev_mouse); */
-             /*      ev_mouse = ev; */
-             /*   } */
-             /* else  */
-             /*   { */
-                  /* FIXME: Filter event for XIM */
-                  _ecore_xcb_events_handle(ev);
-                  free(ev);
-               /* } */
-          }
+          /* check for errors first */
+           if (xcb_connection_has_error(conn))
+             {
+                xcb_generic_error_t *err;
+
+                err = (xcb_generic_error_t *)ev;
+                _ecore_xcb_io_error_handle(err);
+             }
+           else
+             {
+                /* FIXME: Filter event for XIM */
+                _ecore_xcb_events_handle(ev);
+                free(ev);
+             }
      }
 
-   /* if (ev_mouse)  */
-   /*   { */
-   /*      _ecore_xcb_events_handle(ev_mouse); */
-   /*      free(ev_mouse); */
-   /*   } */
-
    return ECORE_CALLBACK_RENEW;
 }
 
-static Eina_Bool 
-_ecore_xcb_fd_handle_buff(void *data, Ecore_Fd_Handler *hdlr __UNUSED__) 
+static Eina_Bool
+_ecore_xcb_fd_handle_buff(void *data, Ecore_Fd_Handler *hdlr __UNUSED__)
 {
    xcb_connection_t *conn;
    xcb_generic_event_t *ev = NULL;
 
    conn = (xcb_connection_t *)data;
    ev = xcb_poll_for_event(conn);
-   if (ev) 
+   if (ev)
      {
         /* check for errors first */
         if (xcb_connection_has_error(conn))
@@ -1467,28 +1450,14 @@ _ecore_xcb_fd_handle_buff(void *data, Ecore_Fd_Handler *hdlr __UNUSED__)
              _ecore_xcb_io_error_handle(err);
              return ECORE_CALLBACK_CANCEL;
           }
-        /* trap mouse motion events and filter out all but the last one. 
-         * we do this because handling every one is fairly cpu intensive 
-         * (especially on under-powered devices).
-         * 
-         * NB: I've tested this extensively and have found no ill effects, 
-         * but if someone notices something, please report it */
-        /* else if ((ev->response_type & ~0x80) == XCB_MOTION_NOTIFY)  */
-        /*   { */
-        /*      free(ev); */
-        /*      return ECORE_CALLBACK_CANCEL; */
-        /*   } */
-        /* else */ 
-          {
-             _ecore_xcb_event_buffered = ev;
-             return ECORE_CALLBACK_RENEW;
-          }
+        _ecore_xcb_event_buffered = ev;
+        return ECORE_CALLBACK_RENEW;
      }
    return ECORE_CALLBACK_CANCEL;
 }
 
-static Eina_Bool 
-_ecore_xcb_idle_enter(void *data __UNUSED__) 
+static Eina_Bool
+_ecore_xcb_idle_enter(void *data __UNUSED__)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    CHECK_XCB_CONN;
index 26fda8a..769ffac 100644 (file)
@@ -5,9 +5,9 @@
 #define ECORE_X_ATOMS_COUNT 199
 
 typedef struct _Xcb_Atom Xcb_Atom;
-struct _Xcb_Atom 
+struct _Xcb_Atom
 {
-   const char *name;
+   const char   *name;
    Ecore_X_Atom *atom;
 };
 
@@ -15,7 +15,7 @@ struct _Xcb_Atom
 
 /* local variables */
 static xcb_intern_atom_cookie_t cookies[ECORE_X_ATOMS_COUNT];
-static Xcb_Atom atoms[] = 
+static Xcb_Atom atoms[] =
 {
    { "ATOM", &ECORE_X_ATOM_ATOM },
    { "CARDINAL", &ECORE_X_ATOM_CARDINAL },
@@ -124,12 +124,12 @@ static Xcb_Atom atoms[] =
    { "_NET_WM_WINDOW_TYPE_DIALOG", &ECORE_X_ATOM_NET_WM_WINDOW_TYPE_DIALOG },
    { "_NET_WM_WINDOW_TYPE_NORMAL", &ECORE_X_ATOM_NET_WM_WINDOW_TYPE_NORMAL },
    { "_NET_WM_WINDOW_TYPE_DROPDOWN_MENU",
-        &ECORE_X_ATOM_NET_WM_WINDOW_TYPE_DROPDOWN_MENU },
+     &ECORE_X_ATOM_NET_WM_WINDOW_TYPE_DROPDOWN_MENU },
    { "_NET_WM_WINDOW_TYPE_POPUP_MENU",
-        &ECORE_X_ATOM_NET_WM_WINDOW_TYPE_POPUP_MENU },
+     &ECORE_X_ATOM_NET_WM_WINDOW_TYPE_POPUP_MENU },
    { "_NET_WM_WINDOW_TYPE_TOOLTIP", &ECORE_X_ATOM_NET_WM_WINDOW_TYPE_TOOLTIP },
    { "_NET_WM_WINDOW_TYPE_NOTIFICATION",
-        &ECORE_X_ATOM_NET_WM_WINDOW_TYPE_NOTIFICATION },
+     &ECORE_X_ATOM_NET_WM_WINDOW_TYPE_NOTIFICATION },
    { "_NET_WM_WINDOW_TYPE_COMBO", &ECORE_X_ATOM_NET_WM_WINDOW_TYPE_COMBO },
    { "_NET_WM_WINDOW_TYPE_DND", &ECORE_X_ATOM_NET_WM_WINDOW_TYPE_DND },
 
@@ -137,9 +137,9 @@ static Xcb_Atom atoms[] =
    { "_NET_WM_STATE_MODAL", &ECORE_X_ATOM_NET_WM_STATE_MODAL },
    { "_NET_WM_STATE_STICKY", &ECORE_X_ATOM_NET_WM_STATE_STICKY },
    { "_NET_WM_STATE_MAXIMIZED_VERT",
-        &ECORE_X_ATOM_NET_WM_STATE_MAXIMIZED_VERT },
+     &ECORE_X_ATOM_NET_WM_STATE_MAXIMIZED_VERT },
    { "_NET_WM_STATE_MAXIMIZED_HORZ",
-        &ECORE_X_ATOM_NET_WM_STATE_MAXIMIZED_HORZ },
+     &ECORE_X_ATOM_NET_WM_STATE_MAXIMIZED_HORZ },
    { "_NET_WM_STATE_SHADED", &ECORE_X_ATOM_NET_WM_STATE_SHADED },
    { "_NET_WM_STATE_SKIP_TASKBAR", &ECORE_X_ATOM_NET_WM_STATE_SKIP_TASKBAR },
    { "_NET_WM_STATE_SKIP_PAGER", &ECORE_X_ATOM_NET_WM_STATE_SKIP_PAGER },
@@ -148,7 +148,7 @@ static Xcb_Atom atoms[] =
    { "_NET_WM_STATE_ABOVE", &ECORE_X_ATOM_NET_WM_STATE_ABOVE },
    { "_NET_WM_STATE_BELOW", &ECORE_X_ATOM_NET_WM_STATE_BELOW },
    { "_NET_WM_STATE_DEMANDS_ATTENTION",
-        &ECORE_X_ATOM_NET_WM_STATE_DEMANDS_ATTENTION },
+     &ECORE_X_ATOM_NET_WM_STATE_DEMANDS_ATTENTION },
 
    { "_NET_WM_ALLOWED_ACTIONS", &ECORE_X_ATOM_NET_WM_ALLOWED_ACTIONS },
    { "_NET_WM_ACTION_MOVE", &ECORE_X_ATOM_NET_WM_ACTION_MOVE },
@@ -157,12 +157,12 @@ static Xcb_Atom atoms[] =
    { "_NET_WM_ACTION_SHADE", &ECORE_X_ATOM_NET_WM_ACTION_SHADE },
    { "_NET_WM_ACTION_STICK", &ECORE_X_ATOM_NET_WM_ACTION_STICK },
    { "_NET_WM_ACTION_MAXIMIZE_HORZ",
-        &ECORE_X_ATOM_NET_WM_ACTION_MAXIMIZE_HORZ },
+     &ECORE_X_ATOM_NET_WM_ACTION_MAXIMIZE_HORZ },
    { "_NET_WM_ACTION_MAXIMIZE_VERT",
-        &ECORE_X_ATOM_NET_WM_ACTION_MAXIMIZE_VERT },
+     &ECORE_X_ATOM_NET_WM_ACTION_MAXIMIZE_VERT },
    { "_NET_WM_ACTION_FULLSCREEN", &ECORE_X_ATOM_NET_WM_ACTION_FULLSCREEN },
    { "_NET_WM_ACTION_CHANGE_DESKTOP",
-        &ECORE_X_ATOM_NET_WM_ACTION_CHANGE_DESKTOP },
+     &ECORE_X_ATOM_NET_WM_ACTION_CHANGE_DESKTOP },
    { "_NET_WM_ACTION_CLOSE", &ECORE_X_ATOM_NET_WM_ACTION_CLOSE },
    { "_NET_WM_ACTION_ABOVE", &ECORE_X_ATOM_NET_WM_ACTION_ABOVE },
    { "_NET_WM_ACTION_BELOW", &ECORE_X_ATOM_NET_WM_ACTION_BELOW },
@@ -180,7 +180,7 @@ static Xcb_Atom atoms[] =
    { "_NET_WM_PING", &ECORE_X_ATOM_NET_WM_PING },
    { "_NET_WM_SYNC_REQUEST", &ECORE_X_ATOM_NET_WM_SYNC_REQUEST },
    { "_NET_WM_SYNC_REQUEST_COUNTER",
-        &ECORE_X_ATOM_NET_WM_SYNC_REQUEST_COUNTER },
+     &ECORE_X_ATOM_NET_WM_SYNC_REQUEST_COUNTER },
 
    { "_NET_WM_WINDOW_OPACITY", &ECORE_X_ATOM_NET_WM_WINDOW_OPACITY },
    { "_NET_WM_WINDOW_SHADOW", &ECORE_X_ATOM_NET_WM_WINDOW_SHADOW },
@@ -202,12 +202,12 @@ static Xcb_Atom atoms[] =
    { "_E_VIRTUAL_KEYBOARD_NUMERIC", &ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_NUMERIC },
    { "_E_VIRTUAL_KEYBOARD_PIN", &ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_PIN },
    { "_E_VIRTUAL_KEYBOARD_PHONE_NUMBER",
-        &ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_PHONE_NUMBER },
+     &ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_PHONE_NUMBER },
    { "_E_VIRTUAL_KEYBOARD_HEX", &ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_HEX },
    { "_E_VIRTUAL_KEYBOARD_TERMINAL",
-        &ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_TERMINAL },
-   { "_E_VIRTUAL_KEYBOARD_PASSWORD", 
-        &ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_PASSWORD },
+     &ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_TERMINAL },
+   { "_E_VIRTUAL_KEYBOARD_PASSWORD",
+     &ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_PASSWORD },
    { "_E_VIRTUAL_KEYBOARD_IP", &ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_IP },
    { "_E_VIRTUAL_KEYBOARD_HOST", &ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_HOST },
    { "_E_VIRTUAL_KEYBOARD_FILE", &ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_FILE },
@@ -233,22 +233,22 @@ static Xcb_Atom atoms[] =
    { "_E_ILLUME_DRAG_START", &ECORE_X_ATOM_E_ILLUME_DRAG_START },
    { "_E_ILLUME_DRAG_END", &ECORE_X_ATOM_E_ILLUME_DRAG_END },
    { "_E_ILLUME_INDICATOR_GEOMETRY",
-        &ECORE_X_ATOM_E_ILLUME_INDICATOR_GEOMETRY },
+     &ECORE_X_ATOM_E_ILLUME_INDICATOR_GEOMETRY },
    { "_E_ILLUME_SOFTKEY_GEOMETRY", &ECORE_X_ATOM_E_ILLUME_SOFTKEY_GEOMETRY },
    { "_E_ILLUME_KEYBOARD_GEOMETRY", &ECORE_X_ATOM_E_ILLUME_KEYBOARD_GEOMETRY },
    { "_E_ILLUME_QUICKPANEL", &ECORE_X_ATOM_E_ILLUME_QUICKPANEL },
    { "_E_ILLUME_QUICKPANEL_STATE", &ECORE_X_ATOM_E_ILLUME_QUICKPANEL_STATE },
    { "_E_ILLUME_QUICKPANEL_STATE_TOGGLE",
-        &ECORE_X_ATOM_E_ILLUME_QUICKPANEL_STATE_TOGGLE },
+     &ECORE_X_ATOM_E_ILLUME_QUICKPANEL_STATE_TOGGLE },
    { "_E_ILLUME_QUICKPANEL_ON", &ECORE_X_ATOM_E_ILLUME_QUICKPANEL_ON },
    { "_E_ILLUME_QUICKPANEL_OFF", &ECORE_X_ATOM_E_ILLUME_QUICKPANEL_OFF },
    { "_E_ILLUME_QUICKPANEL_PRIORITY_MAJOR",
-        &ECORE_X_ATOM_E_ILLUME_QUICKPANEL_PRIORITY_MAJOR },
+     &ECORE_X_ATOM_E_ILLUME_QUICKPANEL_PRIORITY_MAJOR },
    { "_E_ILLUME_QUICKPANEL_PRIORITY_MINOR",
-        &ECORE_X_ATOM_E_ILLUME_QUICKPANEL_PRIORITY_MINOR },
+     &ECORE_X_ATOM_E_ILLUME_QUICKPANEL_PRIORITY_MINOR },
    { "_E_ILLUME_QUICKPANEL_ZONE", &ECORE_X_ATOM_E_ILLUME_QUICKPANEL_ZONE },
    { "_E_ILLUME_QUICKPANEL_POSITION_UPDATE",
-        &ECORE_X_ATOM_E_ILLUME_QUICKPANEL_POSITION_UPDATE },
+     &ECORE_X_ATOM_E_ILLUME_QUICKPANEL_POSITION_UPDATE },
 
    { "_E_COMP_SYNC_COUNTER", &ECORE_X_ATOM_E_COMP_SYNC_COUNTER },
    { "_E_COMP_SYNC_DRAW_DONE", &ECORE_X_ATOM_E_COMP_SYNC_DRAW_DONE },
@@ -259,11 +259,13 @@ static Xcb_Atom atoms[] =
 
    { "_E_COMP_FLUSH", &ECORE_X_ATOM_E_COMP_FLUSH },
    { "_E_COMP_DUMP", &ECORE_X_ATOM_E_COMP_DUMP },
-   { "_E_COMP_PIXMAP", &ECORE_X_ATOM_E_COMP_PIXMAP }
+   { "_E_COMP_PIXMAP", &ECORE_X_ATOM_E_COMP_PIXMAP },
+   { "_E_VIDEO_PARENT", &ECORE_X_ATOM_E_VIDEO_PARENT },
+   { "_E_VIDEO_POSITION", &ECORE_X_ATOM_E_VIDEO_POSITION }
 };
 
-void 
-_ecore_xcb_atoms_init(void) 
+void
+_ecore_xcb_atoms_init(void)
 {
    int i = 0, num = 0;
 
@@ -271,16 +273,16 @@ _ecore_xcb_atoms_init(void)
    CHECK_XCB_CONN;
 
    num = (sizeof(atoms) / sizeof(Xcb_Atom));
-   for (i = 0; i < num; i++)  
+   for (i = 0; i < num; i++)
      {
-        cookies[i] = 
-          xcb_intern_atom_unchecked(_ecore_xcb_conn, 0, 
+        cookies[i] =
+          xcb_intern_atom_unchecked(_ecore_xcb_conn, 0,
                                     strlen(atoms[i].name), atoms[i].name);
      }
 }
 
-void 
-_ecore_xcb_atoms_finalize(void) 
+void
+_ecore_xcb_atoms_finalize(void)
 {
    int i = 0, num = 0;
 
@@ -288,7 +290,7 @@ _ecore_xcb_atoms_finalize(void)
    CHECK_XCB_CONN;
 
    num = (sizeof(atoms) / sizeof(Xcb_Atom));
-   for (i = 0; i < num; i++) 
+   for (i = 0; i < num; i++)
      {
         xcb_intern_atom_reply_t *reply = NULL;
 
@@ -301,13 +303,13 @@ _ecore_xcb_atoms_finalize(void)
 
 /**
  * @defgroup Ecore_X_Atom_Group XCB Atom Functions
- * 
+ *
  * Functions that operate on atoms
  */
 
 /**
  * Retrieves the atom value associated to a name.
- * 
+ *
  * @param  name Unused.
  * @return      Associated atom value.
  *
@@ -319,11 +321,11 @@ _ecore_xcb_atoms_finalize(void)
  * To use this function, you must call before, and in order,
  * ecore_x_atom_get_prefetch(), which sends the InternAtom request,
  * then ecore_x_atom_get_fetch(), which gets the reply.
- * 
+ *
  * @ingroup Ecore_X_Atom_Group
  */
-EAPI Ecore_X_Atom 
-ecore_x_atom_get(const char *name) 
+EAPI Ecore_X_Atom
+ecore_x_atom_get(const char *name)
 {
    xcb_intern_atom_cookie_t cookie;
    xcb_intern_atom_reply_t *reply;
@@ -342,14 +344,14 @@ ecore_x_atom_get(const char *name)
 
 /**
  * Retrieves the name of the given atom.
- * 
- * @param  atom 
+ *
+ * @param  atom
  * @return      The name of the atom.
  *
  * @ingroup Ecore_X_Atom_Group
  */
 EAPI char *
-ecore_x_atom_name_get(Ecore_X_Atom atom) 
+ecore_x_atom_name_get(Ecore_X_Atom atom)
 {
    xcb_get_atom_name_cookie_t cookie;
    xcb_get_atom_name_reply_t *reply;
@@ -364,7 +366,7 @@ ecore_x_atom_name_get(Ecore_X_Atom atom)
    if (!reply) return NULL;
    len = xcb_get_atom_name_name_length(reply);
    name = (char *)malloc(sizeof(char) * (len + 1));
-   if (!name) 
+   if (!name)
      {
         free(reply);
         return NULL;
@@ -376,8 +378,10 @@ ecore_x_atom_name_get(Ecore_X_Atom atom)
    return name;
 }
 
-EAPI void 
-ecore_x_atoms_get(const char **names, int num, Ecore_X_Atom *atoms) 
+EAPI void
+ecore_x_atoms_get(const char  **names,
+                  int           num,
+                  Ecore_X_Atom *atoms)
 {
    xcb_intern_atom_cookie_t cookies[num];
    int i = 0;
@@ -385,13 +389,13 @@ ecore_x_atoms_get(const char **names, int num, Ecore_X_Atom *atoms)
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    CHECK_XCB_CONN;
 
-   for (i = 0; i < num; i++) 
+   for (i = 0; i < num; i++)
      {
-        cookies[i] = 
-          xcb_intern_atom_unchecked(_ecore_xcb_conn, 0, 
+        cookies[i] =
+          xcb_intern_atom_unchecked(_ecore_xcb_conn, 0,
                                     strlen(names[i]), names[i]);
      }
-   for (i = 0; i < num; i++) 
+   for (i = 0; i < num; i++)
      {
         xcb_intern_atom_reply_t *reply = NULL;
 
@@ -401,3 +405,4 @@ ecore_x_atoms_get(const char **names, int num, Ecore_X_Atom *atoms)
         free(reply);
      }
 }
+
index 0f66b24..f247b34 100644 (file)
@@ -6,8 +6,8 @@
 /* local variables */
 static Eina_Bool _composite_avail = EINA_FALSE;
 
-void 
-_ecore_xcb_composite_init(void) 
+void
+_ecore_xcb_composite_init(void)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
 
@@ -16,8 +16,8 @@ _ecore_xcb_composite_init(void)
 #endif
 }
 
-void 
-_ecore_xcb_composite_finalize(void) 
+void
+_ecore_xcb_composite_finalize(void)
 {
 #ifdef ECORE_XCB_COMPOSITE
    const xcb_query_extension_reply_t *ext_reply;
@@ -27,34 +27,34 @@ _ecore_xcb_composite_finalize(void)
 
 #ifdef ECORE_XCB_COMPOSITE
    ext_reply = xcb_get_extension_data(_ecore_xcb_conn, &xcb_composite_id);
-   if ((ext_reply) && (ext_reply->present)) 
+   if ((ext_reply) && (ext_reply->present))
      {
         xcb_composite_query_version_cookie_t cookie;
         xcb_composite_query_version_reply_t *reply;
 
-        cookie = 
-          xcb_composite_query_version_unchecked(_ecore_xcb_conn, 
-                                                XCB_COMPOSITE_MAJOR_VERSION, 
+        cookie =
+          xcb_composite_query_version_unchecked(_ecore_xcb_conn,
+                                                XCB_COMPOSITE_MAJOR_VERSION,
                                                 XCB_COMPOSITE_MINOR_VERSION);
-        reply = 
+        reply =
           xcb_composite_query_version_reply(_ecore_xcb_conn, cookie, NULL);
-        if (reply) 
+        if (reply)
           {
-//             if ((reply->major_version >= XCB_COMPOSITE_MAJOR_VERSION) && 
-             if (reply->minor_version >= XCB_COMPOSITE_MINOR_VERSION) 
-               {
+//             if ((reply->major_version >= XCB_COMPOSITE_MAJOR_VERSION) &&
+               if (reply->minor_version >= XCB_COMPOSITE_MINOR_VERSION)
+                 {
 # ifdef ECORE_XCB_RENDER
-                  if (_ecore_xcb_render_avail_get()) 
-                    {
+                    if (_ecore_xcb_render_avail_get())
+                      {
 #  ifdef ECORE_XCB_XFIXES
-                       if (_ecore_xcb_xfixes_avail_get())
-                         _composite_avail = EINA_TRUE;
+                         if (_ecore_xcb_xfixes_avail_get())
+                           _composite_avail = EINA_TRUE;
 #  endif
-                    }
+                      }
 # endif
-               }
+                 }
 
-             free(reply);
+               free(reply);
           }
      }
 #endif
@@ -62,26 +62,27 @@ _ecore_xcb_composite_finalize(void)
 
 /**
  * @defgroup Ecore_X_Composite_Group X Composite Extension Functions
- * 
+ *
  * Functions related to the X Composite Extension
  */
 
 /**
  * Return whether the Composite Extension is available
- * 
+ *
  * @return EINA_TRUE is the Composite Extension is available, EINA_FALSE if not
- * 
+ *
  * @ingroup Ecore_X_Composite_Group
  */
-EAPI Eina_Bool 
-ecore_x_composite_query(void) 
+EAPI Eina_Bool
+ecore_x_composite_query(void)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    return _composite_avail;
 }
 
-EAPI void 
-ecore_x_composite_redirect_window(Ecore_X_Window win, Ecore_X_Composite_Update_Type type) 
+EAPI void
+ecore_x_composite_redirect_window(Ecore_X_Window                win,
+                                  Ecore_X_Composite_Update_Type type)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    CHECK_XCB_CONN;
@@ -91,11 +92,12 @@ ecore_x_composite_redirect_window(Ecore_X_Window win, Ecore_X_Composite_Update_T
 #ifdef ECORE_XCB_COMPOSITE
    uint8_t update = XCB_COMPOSITE_REDIRECT_AUTOMATIC;
 
-   switch (type) 
+   switch (type)
      {
       case ECORE_X_COMPOSITE_UPDATE_AUTOMATIC:
         update = XCB_COMPOSITE_REDIRECT_AUTOMATIC;
         break;
+
       case ECORE_X_COMPOSITE_UPDATE_MANUAL:
         update = XCB_COMPOSITE_REDIRECT_MANUAL;
         break;
@@ -105,8 +107,9 @@ ecore_x_composite_redirect_window(Ecore_X_Window win, Ecore_X_Composite_Update_T
 #endif
 }
 
-EAPI void 
-ecore_x_composite_redirect_subwindows(Ecore_X_Window win, Ecore_X_Composite_Update_Type type) 
+EAPI void
+ecore_x_composite_redirect_subwindows(Ecore_X_Window                win,
+                                      Ecore_X_Composite_Update_Type type)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    CHECK_XCB_CONN;
@@ -116,11 +119,12 @@ ecore_x_composite_redirect_subwindows(Ecore_X_Window win, Ecore_X_Composite_Upda
 #ifdef ECORE_XCB_COMPOSITE
    uint8_t update = XCB_COMPOSITE_REDIRECT_AUTOMATIC;
 
-   switch (type) 
+   switch (type)
      {
       case ECORE_X_COMPOSITE_UPDATE_AUTOMATIC:
         update = XCB_COMPOSITE_REDIRECT_AUTOMATIC;
         break;
+
       case ECORE_X_COMPOSITE_UPDATE_MANUAL:
         update = XCB_COMPOSITE_REDIRECT_MANUAL;
         break;
@@ -130,8 +134,9 @@ ecore_x_composite_redirect_subwindows(Ecore_X_Window win, Ecore_X_Composite_Upda
 #endif
 }
 
-EAPI void 
-ecore_x_composite_unredirect_window(Ecore_X_Window win, Ecore_X_Composite_Update_Type type) 
+EAPI void
+ecore_x_composite_unredirect_window(Ecore_X_Window                win,
+                                    Ecore_X_Composite_Update_Type type)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    CHECK_XCB_CONN;
@@ -141,11 +146,12 @@ ecore_x_composite_unredirect_window(Ecore_X_Window win, Ecore_X_Composite_Update
 #ifdef ECORE_XCB_COMPOSITE
    uint8_t update = XCB_COMPOSITE_REDIRECT_AUTOMATIC;
 
-   switch (type) 
+   switch (type)
      {
       case ECORE_X_COMPOSITE_UPDATE_AUTOMATIC:
         update = XCB_COMPOSITE_REDIRECT_AUTOMATIC;
         break;
+
       case ECORE_X_COMPOSITE_UPDATE_MANUAL:
         update = XCB_COMPOSITE_REDIRECT_MANUAL;
         break;
@@ -155,8 +161,9 @@ ecore_x_composite_unredirect_window(Ecore_X_Window win, Ecore_X_Composite_Update
 #endif
 }
 
-EAPI void 
-ecore_x_composite_unredirect_subwindows(Ecore_X_Window win, Ecore_X_Composite_Update_Type type) 
+EAPI void
+ecore_x_composite_unredirect_subwindows(Ecore_X_Window                win,
+                                        Ecore_X_Composite_Update_Type type)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    CHECK_XCB_CONN;
@@ -166,11 +173,12 @@ ecore_x_composite_unredirect_subwindows(Ecore_X_Window win, Ecore_X_Composite_Up
 #ifdef ECORE_XCB_COMPOSITE
    uint8_t update = XCB_COMPOSITE_REDIRECT_AUTOMATIC;
 
-   switch (type) 
+   switch (type)
      {
       case ECORE_X_COMPOSITE_UPDATE_AUTOMATIC:
         update = XCB_COMPOSITE_REDIRECT_AUTOMATIC;
         break;
+
       case ECORE_X_COMPOSITE_UPDATE_MANUAL:
         update = XCB_COMPOSITE_REDIRECT_MANUAL;
         break;
@@ -180,8 +188,8 @@ ecore_x_composite_unredirect_subwindows(Ecore_X_Window win, Ecore_X_Composite_Up
 #endif
 }
 
-EAPI Ecore_X_Pixmap 
-ecore_x_composite_name_window_pixmap_get(Ecore_X_Window win) 
+EAPI Ecore_X_Pixmap
+ecore_x_composite_name_window_pixmap_get(Ecore_X_Window win)
 {
 #ifdef ECORE_XCB_COMPOSITE
    Ecore_X_Pixmap pmap = XCB_NONE;
@@ -201,8 +209,8 @@ ecore_x_composite_name_window_pixmap_get(Ecore_X_Window win)
    return pmap;
 }
 
-EAPI void 
-ecore_x_composite_window_events_disable(Ecore_X_Window win) 
+EAPI void
+ecore_x_composite_window_events_disable(Ecore_X_Window win)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    CHECK_XCB_CONN;
@@ -218,8 +226,8 @@ ecore_x_composite_window_events_disable(Ecore_X_Window win)
 #endif
 }
 
-EAPI void 
-ecore_x_composite_window_events_enable(Ecore_X_Window win) 
+EAPI void
+ecore_x_composite_window_events_enable(Ecore_X_Window win)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    CHECK_XCB_CONN;
@@ -235,8 +243,8 @@ ecore_x_composite_window_events_enable(Ecore_X_Window win)
 #endif
 }
 
-EAPI Ecore_X_Window 
-ecore_x_composite_render_window_enable(Ecore_X_Window root) 
+EAPI Ecore_X_Window
+ecore_x_composite_render_window_enable(Ecore_X_Window root)
 {
    Ecore_X_Window win = 0;
 #ifdef ECORE_XCB_COMPOSITE
@@ -251,7 +259,7 @@ ecore_x_composite_render_window_enable(Ecore_X_Window root)
 
 #ifdef ECORE_XCB_COMPOSITE
    cookie = xcb_composite_get_overlay_window_unchecked(_ecore_xcb_conn, root);
-   reply = 
+   reply =
      xcb_composite_get_overlay_window_reply(_ecore_xcb_conn, cookie, NULL);
    if (!reply) return win;
 
@@ -265,8 +273,8 @@ ecore_x_composite_render_window_enable(Ecore_X_Window root)
    return win;
 }
 
-EAPI void 
-ecore_x_composite_render_window_disable(Ecore_X_Window win) 
+EAPI void
+ecore_x_composite_render_window_disable(Ecore_X_Window win)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    CHECK_XCB_CONN;
@@ -278,3 +286,4 @@ ecore_x_composite_render_window_disable(Ecore_X_Window win)
 //   ecore_x_flush();
 #endif
 }
+
index 06654d7..755df04 100644 (file)
@@ -8,11 +8,13 @@
 #ifdef ECORE_XCB_CURSOR
 static xcb_render_pictforminfo_t *_ecore_xcb_cursor_format_get(void);
 #endif
-static void _ecore_xcb_cursor_default_size_get(void);
-static void _ecore_xcb_cursor_dpi_size_get(void);
-static void _ecore_xcb_cursor_guess_size(void);
+static void                       _ecore_xcb_cursor_default_size_get(void);
+static void                       _ecore_xcb_cursor_dpi_size_get(void);
+static void                       _ecore_xcb_cursor_guess_size(void);
 #ifdef ECORE_XCB_CURSOR
-static Ecore_X_Cursor _ecore_xcb_cursor_image_load_cursor(xcb_image_t *img, int hot_x, int hot_y);
+static Ecore_X_Cursor             _ecore_xcb_cursor_image_load_cursor(xcb_image_t *img,
+                                                                      int          hot_x,
+                                                                      int          hot_y);
 #endif
 static void _ecore_xcb_cursor_image_destroy(xcb_image_t *img);
 
@@ -24,15 +26,15 @@ static uint32_t _ecore_xcb_cursor_format_id = 0;
 //   static xcb_render_pictforminfo_t *_ecore_xcb_cursor_format = NULL;
 #endif
 
-void 
-_ecore_xcb_cursor_init(void) 
+void
+_ecore_xcb_cursor_init(void)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    /* NB: No-op */
 }
 
-void 
-_ecore_xcb_cursor_finalize(void) 
+void
+_ecore_xcb_cursor_finalize(void)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
 
@@ -40,7 +42,7 @@ _ecore_xcb_cursor_finalize(void)
    _ecore_xcb_cursor = _ecore_xcb_render_argb_get();
 
    /* find render pict format */
-   if (_ecore_xcb_cursor_format_id <= 0) 
+   if (_ecore_xcb_cursor_format_id <= 0)
      _ecore_xcb_cursor_format_id = _ecore_xcb_cursor_format_get()->id;
 #endif
 
@@ -55,21 +57,26 @@ _ecore_xcb_cursor_finalize(void)
    if (_ecore_xcb_cursor_size == 0)
      _ecore_xcb_cursor_guess_size();
 
-   /* NB: Would normally add theme stuff here, but E cursor does not support 
-    * xcursor themes. Delay parsing that stuff out until such time if/when the 
+   /* NB: Would normally add theme stuff here, but E cursor does not support
+    * xcursor themes. Delay parsing that stuff out until such time if/when the
     * user selects to use X Cursor, rather than E cursor */
 }
 
-EAPI Eina_Bool 
-ecore_x_cursor_color_supported_get(void) 
+EAPI Eina_Bool
+ecore_x_cursor_color_supported_get(void)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
 
    return _ecore_xcb_cursor;
 }
 
-EAPI Ecore_X_Cursor 
-ecore_x_cursor_new(Ecore_X_Window win, int *pixels, int w, int h, int hot_x, int hot_y) 
+EAPI Ecore_X_Cursor
+ecore_x_cursor_new(Ecore_X_Window win,
+                   int           *pixels,
+                   int            w,
+                   int            h,
+                   int            hot_x,
+                   int            hot_y)
 {
    Ecore_X_Cursor cursor = 0;
    xcb_image_t *img;
@@ -78,10 +85,10 @@ ecore_x_cursor_new(Ecore_X_Window win, int *pixels, int w, int h, int hot_x, int
    CHECK_XCB_CONN;
 
 #ifdef ECORE_XCB_CURSOR
-   if (_ecore_xcb_cursor) 
+   if (_ecore_xcb_cursor)
      {
-        img = _ecore_xcb_image_create_native(w, h, XCB_IMAGE_FORMAT_Z_PIXMAP, 
-                                             32, NULL, (w * h * sizeof(int)), 
+        img = _ecore_xcb_image_create_native(w, h, XCB_IMAGE_FORMAT_Z_PIXMAP,
+                                             32, NULL, (w * h * sizeof(int)),
                                              (uint8_t *)pixels);
         cursor = _ecore_xcb_cursor_image_load_cursor(img, hot_x, hot_y);
         _ecore_xcb_cursor_image_destroy(img);
@@ -89,152 +96,152 @@ ecore_x_cursor_new(Ecore_X_Window win, int *pixels, int w, int h, int hot_x, int
      }
    else
 #endif
-     {
-        Ecore_X_GC gc;
-        xcb_pixmap_t pmap, mask;
-        uint32_t *pix;
-        uint8_t fr = 0x00, fg = 0x00, fb = 0x00;
-        uint8_t br = 0xff, bg = 0xff, bb = 0xff;
-        uint32_t brightest = 0, darkest = 255 * 3;
-        uint16_t x, y;
-        const uint32_t dither[2][2] =
-          {
-             {0, 2},
-             {3, 1}
-          };
-
-        img = _ecore_xcb_image_create_native(w, h, XCB_IMAGE_FORMAT_Z_PIXMAP, 
-                                             1, NULL, ~0, NULL);
-        if (img->data) free(img->data);
-        img->data = malloc(img->size);
-
-        pmap = xcb_generate_id(_ecore_xcb_conn);
-        xcb_create_pixmap(_ecore_xcb_conn, 1, pmap, win, w, h);
-        mask = xcb_generate_id(_ecore_xcb_conn);
-        xcb_create_pixmap(_ecore_xcb_conn, 1, mask, win, w, h);
-
-        pix = (uint32_t *)pixels;
-        for (y = 0; y < h; y++)
-          {
-             for (x = 0; x < w; x++)
-               {
-                  uint8_t r, g, b, a;
-
-                  a = (pix[0] >> 24) & 0xff;
-                  r = (pix[0] >> 16) & 0xff;
-                  g = (pix[0] >> 8) & 0xff;
-                  b = (pix[0]) & 0xff;
-                  if (a > 0)
-                    {
-                       if ((uint32_t)(r + g + b) > brightest)
-                         {
-                            brightest = r + g + b;
-                            br = r;
-                            bg = g;
-                            bb = b;
-                         }
-
-                       if ((uint32_t)(r + g + b) < darkest)
-                         {
-                            darkest = r + g + b;
-                            fr = r;
-                            fg = g;
-                            fb = b;
-                         }
-                    }
-                  pix++;
-               }
-          }
-
-        pix = (uint32_t *)pixels;
-        for (y = 0; y < h; y++)
-          {
-             for (x = 0; x < w; x++)
-               {
-                  uint32_t v;
-                  uint8_t r, g, b;
-                  int32_t d1, d2;
-
-                  r = (pix[0] >> 16) & 0xff;
-                  g = (pix[0] >> 8) & 0xff;
-                  b = (pix[0]) & 0xff;
-                  d1 =
-                    ((r - fr) * (r - fr)) +
-                    ((g - fg) * (g - fg)) +
-                    ((b - fb) * (b - fb));
-                  d2 =
-                    ((r - br) * (r - br)) +
-                    ((g - bg) * (g - bg)) +
-                    ((b - bb) * (b - bb));
-                  if (d1 + d2)
-                    {
-                       v = (((d2 * 255) / (d1 + d2)) * 5) / 256;
-                       if (v > dither[x & 0x1][y & 0x1])
-                         v = 1;
-                       else
-                         v = 0;
-                    }
-                  else
-                    v = 0;
-
-                  xcb_image_put_pixel(img, x, y, v);
-                  pix++;
-               }
-          }
-
-        gc = ecore_x_gc_new(pmap, 0, NULL);
-        xcb_put_image(_ecore_xcb_conn, img->format, pmap, gc, w, h, 
-                      0, 0, 0, img->depth, img->size, img->data);
-        ecore_x_gc_free(gc);
-
-        pix = (uint32_t *)pixels;
-        for (y = 0; y < h; y++)
-          {
-             for (x = 0; x < w; x++)
-               {
-                  uint32_t v;
-
-                  v = (((pix[0] >> 24) & 0xff) * 5) / 256;
-                  if (v > dither[x & 0x1][y & 0x1])
-                    v = 1;
-                  else
-                    v = 0;
-
-                  xcb_image_put_pixel(img, x, y, v);
-                  pix++;
-               }
-          }
-
-        gc = ecore_x_gc_new(mask, 0, NULL);
-        xcb_put_image(_ecore_xcb_conn, img->format, mask, gc, w, h, 
-                      0, 0, 0, img->depth, img->size, img->data);
-        ecore_x_gc_free(gc);
-
-        if (img->data) free(img->data);
-        _ecore_xcb_cursor_image_destroy(img);
-
-        cursor = xcb_generate_id(_ecore_xcb_conn);
-        xcb_create_cursor(_ecore_xcb_conn, cursor, pmap, mask, 
-                          fr << 8 | fr, fg << 8 | fg, fb << 8 | fb,
-                          br << 8 | br, bg << 8 | bg, bb << 8 | bb, 
-                          hot_x, hot_y);
-
-        xcb_free_pixmap(_ecore_xcb_conn, pmap);
-        xcb_free_pixmap(_ecore_xcb_conn, mask);
-
-        return cursor;
-     }
+   {
+      Ecore_X_GC gc;
+      xcb_pixmap_t pmap, mask;
+      uint32_t *pix;
+      uint8_t fr = 0x00, fg = 0x00, fb = 0x00;
+      uint8_t br = 0xff, bg = 0xff, bb = 0xff;
+      uint32_t brightest = 0, darkest = 255 * 3;
+      uint16_t x, y;
+      const uint32_t dither[2][2] =
+      {
+         {0, 2},
+         {3, 1}
+      };
+
+      img = _ecore_xcb_image_create_native(w, h, XCB_IMAGE_FORMAT_Z_PIXMAP,
+                                           1, NULL, ~0, NULL);
+      if (img->data) free(img->data);
+      img->data = malloc(img->size);
+
+      pmap = xcb_generate_id(_ecore_xcb_conn);
+      xcb_create_pixmap(_ecore_xcb_conn, 1, pmap, win, w, h);
+      mask = xcb_generate_id(_ecore_xcb_conn);
+      xcb_create_pixmap(_ecore_xcb_conn, 1, mask, win, w, h);
+
+      pix = (uint32_t *)pixels;
+      for (y = 0; y < h; y++)
+        {
+           for (x = 0; x < w; x++)
+             {
+                uint8_t r, g, b, a;
+
+                a = (pix[0] >> 24) & 0xff;
+                r = (pix[0] >> 16) & 0xff;
+                g = (pix[0] >> 8) & 0xff;
+                b = (pix[0]) & 0xff;
+                if (a > 0)
+                  {
+                     if ((uint32_t)(r + g + b) > brightest)
+                       {
+                          brightest = r + g + b;
+                          br = r;
+                          bg = g;
+                          bb = b;
+                       }
+
+                     if ((uint32_t)(r + g + b) < darkest)
+                       {
+                          darkest = r + g + b;
+                          fr = r;
+                          fg = g;
+                          fb = b;
+                       }
+                  }
+                pix++;
+             }
+        }
+
+      pix = (uint32_t *)pixels;
+      for (y = 0; y < h; y++)
+        {
+           for (x = 0; x < w; x++)
+             {
+                uint32_t v;
+                uint8_t r, g, b;
+                int32_t d1, d2;
+
+                r = (pix[0] >> 16) & 0xff;
+                g = (pix[0] >> 8) & 0xff;
+                b = (pix[0]) & 0xff;
+                d1 =
+                  ((r - fr) * (r - fr)) +
+                  ((g - fg) * (g - fg)) +
+                  ((b - fb) * (b - fb));
+                d2 =
+                  ((r - br) * (r - br)) +
+                  ((g - bg) * (g - bg)) +
+                  ((b - bb) * (b - bb));
+                if (d1 + d2)
+                  {
+                     v = (((d2 * 255) / (d1 + d2)) * 5) / 256;
+                     if (v > dither[x & 0x1][y & 0x1])
+                       v = 1;
+                     else
+                       v = 0;
+                  }
+                else
+                  v = 0;
+
+                xcb_image_put_pixel(img, x, y, v);
+                pix++;
+             }
+        }
+
+      gc = ecore_x_gc_new(pmap, 0, NULL);
+      xcb_put_image(_ecore_xcb_conn, img->format, pmap, gc, w, h,
+                    0, 0, 0, img->depth, img->size, img->data);
+      ecore_x_gc_free(gc);
+
+      pix = (uint32_t *)pixels;
+      for (y = 0; y < h; y++)
+        {
+           for (x = 0; x < w; x++)
+             {
+                uint32_t v;
+
+                v = (((pix[0] >> 24) & 0xff) * 5) / 256;
+                if (v > dither[x & 0x1][y & 0x1])
+                  v = 1;
+                else
+                  v = 0;
+
+                xcb_image_put_pixel(img, x, y, v);
+                pix++;
+             }
+        }
+
+      gc = ecore_x_gc_new(mask, 0, NULL);
+      xcb_put_image(_ecore_xcb_conn, img->format, mask, gc, w, h,
+                    0, 0, 0, img->depth, img->size, img->data);
+      ecore_x_gc_free(gc);
+
+      if (img->data) free(img->data);
+      _ecore_xcb_cursor_image_destroy(img);
+
+      cursor = xcb_generate_id(_ecore_xcb_conn);
+      xcb_create_cursor(_ecore_xcb_conn, cursor, pmap, mask,
+                        fr << 8 | fr, fg << 8 | fg, fb << 8 | fb,
+                        br << 8 | br, bg << 8 | bg, bb << 8 | bb,
+                        hot_x, hot_y);
+
+      xcb_free_pixmap(_ecore_xcb_conn, pmap);
+      xcb_free_pixmap(_ecore_xcb_conn, mask);
+
+      return cursor;
+   }
 
    return 0;
 }
 
-EAPI void 
-ecore_x_cursor_free(Ecore_X_Cursor c) 
+EAPI void
+ecore_x_cursor_free(Ecore_X_Cursor c)
 {
 //   LOGFN(__FILE__, __LINE__, __FUNCTION__);
-   CHECK_XCB_CONN;
+     CHECK_XCB_CONN;
 
-   xcb_free_cursor(_ecore_xcb_conn, c);
+     xcb_free_cursor(_ecore_xcb_conn, c);
 }
 
 /*
@@ -242,8 +249,8 @@ ecore_x_cursor_free(Ecore_X_Cursor c)
  * Note that the return value must not be freed with
  * ecore_x_cursor_free()!
  */
-EAPI Ecore_X_Cursor 
-ecore_x_cursor_shape_get(int shape) 
+EAPI Ecore_X_Cursor
+ecore_x_cursor_shape_get(int shape)
 {
    Ecore_X_Cursor cursor = 0;
    xcb_font_t font;
@@ -256,15 +263,15 @@ ecore_x_cursor_shape_get(int shape)
 
    cursor = xcb_generate_id(_ecore_xcb_conn);
    /* FIXME: Add request check ?? */
-   xcb_create_glyph_cursor(_ecore_xcb_conn, cursor, font, font, 
+   xcb_create_glyph_cursor(_ecore_xcb_conn, cursor, font, font,
                            shape, shape + 1, 0, 0, 0, 65535, 65535, 65535);
 
    xcb_close_font(_ecore_xcb_conn, font);
    return cursor;
 }
 
-EAPI void 
-ecore_x_cursor_size_set(int size) 
+EAPI void
+ecore_x_cursor_size_set(int size)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
 
@@ -272,8 +279,8 @@ ecore_x_cursor_size_set(int size)
    /* NB: May need to adjust size of current cursors here */
 }
 
-EAPI int 
-ecore_x_cursor_size_get(void) 
+EAPI int
+ecore_x_cursor_size_get(void)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
 
@@ -283,7 +290,7 @@ ecore_x_cursor_size_get(void)
 /* local functions */
 #ifdef ECORE_XCB_CURSOR
 static xcb_render_pictforminfo_t *
-_ecore_xcb_cursor_format_get(void) 
+_ecore_xcb_cursor_format_get(void)
 {
    const xcb_render_query_pict_formats_reply_t *reply;
    xcb_render_pictforminfo_t *ret = NULL;
@@ -291,16 +298,17 @@ _ecore_xcb_cursor_format_get(void)
    CHECK_XCB_CONN;
 
    reply = xcb_render_util_query_formats(_ecore_xcb_conn);
-   if (reply) 
-     ret = xcb_render_util_find_standard_format(reply, 
+   if (reply)
+     ret = xcb_render_util_find_standard_format(reply,
                                                 XCB_PICT_STANDARD_ARGB_32);
 
    return ret;
 }
+
 #endif
 
-static void 
-_ecore_xcb_cursor_default_size_get(void) 
+static void
+_ecore_xcb_cursor_default_size_get(void)
 {
    char *s = NULL;
    int v = 0;
@@ -308,7 +316,7 @@ _ecore_xcb_cursor_default_size_get(void)
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
 
    s = getenv("XCURSOR_SIZE");
-   if (!s) 
+   if (!s)
      {
         _ecore_xcb_xdefaults_init();
         v = _ecore_xcb_xdefaults_int_get("Xcursor", "size");
@@ -319,8 +327,8 @@ _ecore_xcb_cursor_default_size_get(void)
    if (v) _ecore_xcb_cursor_size = ((v * 16) / 72);
 }
 
-static void 
-_ecore_xcb_cursor_dpi_size_get(void) 
+static void
+_ecore_xcb_cursor_dpi_size_get(void)
 {
    int v = 0;
 
@@ -332,8 +340,8 @@ _ecore_xcb_cursor_dpi_size_get(void)
    _ecore_xcb_xdefaults_shutdown();
 }
 
-static void 
-_ecore_xcb_cursor_guess_size(void) 
+static void
+_ecore_xcb_cursor_guess_size(void)
 {
    int w = 0, h = 0, s = 0;
 
@@ -346,8 +354,10 @@ _ecore_xcb_cursor_guess_size(void)
 }
 
 #ifdef ECORE_XCB_CURSOR
-static Ecore_X_Cursor 
-_ecore_xcb_cursor_image_load_cursor(xcb_image_t *img, int hot_x, int hot_y) 
+static Ecore_X_Cursor
+_ecore_xcb_cursor_image_load_cursor(xcb_image_t *img,
+                                    int          hot_x,
+                                    int          hot_y)
 {
    Ecore_X_Cursor cursor = 0;
    Ecore_X_GC gc;
@@ -357,18 +367,18 @@ _ecore_xcb_cursor_image_load_cursor(xcb_image_t *img, int hot_x, int hot_y)
    CHECK_XCB_CONN;
 
    pmap = xcb_generate_id(_ecore_xcb_conn);
-   xcb_create_pixmap(_ecore_xcb_conn, img->depth, pmap, 
-                     ((xcb_screen_t *)_ecore_xcb_screen)->root, 
+   xcb_create_pixmap(_ecore_xcb_conn, img->depth, pmap,
+                     ((xcb_screen_t *)_ecore_xcb_screen)->root,
                      img->width, img->height);
 
    gc = ecore_x_gc_new(pmap, 0, NULL);
-   xcb_put_image(_ecore_xcb_conn, img->format, pmap, gc, 
-                 img->width, img->height, 0, 0, 0, img->depth, 
+   xcb_put_image(_ecore_xcb_conn, img->format, pmap, gc,
+                 img->width, img->height, 0, 0, 0, img->depth,
                  img->size, img->data);
    ecore_x_gc_free(gc);
 
    pict = xcb_generate_id(_ecore_xcb_conn);
-   xcb_render_create_picture(_ecore_xcb_conn, pict, pmap, 
+   xcb_render_create_picture(_ecore_xcb_conn, pict, pmap,
                              _ecore_xcb_cursor_format_id, 0, NULL);
    xcb_free_pixmap(_ecore_xcb_conn, pmap);
 
@@ -378,11 +388,13 @@ _ecore_xcb_cursor_image_load_cursor(xcb_image_t *img, int hot_x, int hot_y)
 
    return cursor;
 }
+
 #endif
 
-static void 
-_ecore_xcb_cursor_image_destroy(xcb_image_t *img) 
+static void
+_ecore_xcb_cursor_image_destroy(xcb_image_t *img)
 {
    CHECK_XCB_CONN;
    if (img) xcb_image_destroy(img);
 }
+
index 84870a8..d0ffde1 100644 (file)
@@ -9,8 +9,8 @@ static Eina_Bool _damage_avail = EINA_FALSE;
 /* external variables */
 int _ecore_xcb_event_damage = -1;
 
-void 
-_ecore_xcb_damage_init(void) 
+void
+_ecore_xcb_damage_init(void)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
 
@@ -19,8 +19,8 @@ _ecore_xcb_damage_init(void)
 #endif
 }
 
-void 
-_ecore_xcb_damage_finalize(void) 
+void
+_ecore_xcb_damage_finalize(void)
 {
 #ifdef ECORE_XCB_DAMAGE
    const xcb_query_extension_reply_t *ext_reply;
@@ -30,14 +30,14 @@ _ecore_xcb_damage_finalize(void)
 
 #ifdef ECORE_XCB_DAMAGE
    ext_reply = xcb_get_extension_data(_ecore_xcb_conn, &xcb_damage_id);
-   if ((ext_reply) && (ext_reply->present)) 
+   if ((ext_reply) && (ext_reply->present))
      {
         xcb_damage_query_version_cookie_t cookie;
         xcb_damage_query_version_reply_t *reply;
 
-        cookie = 
-          xcb_damage_query_version_unchecked(_ecore_xcb_conn, 
-                                             XCB_DAMAGE_MAJOR_VERSION, 
+        cookie =
+          xcb_damage_query_version_unchecked(_ecore_xcb_conn,
+                                             XCB_DAMAGE_MAJOR_VERSION,
                                              XCB_DAMAGE_MINOR_VERSION);
         reply = xcb_damage_query_version_reply(_ecore_xcb_conn, cookie, NULL);
         if (reply)
@@ -54,30 +54,31 @@ _ecore_xcb_damage_finalize(void)
 
 /**
  * @defgroup Ecore_X_Damage_Group X Damage Extension Functions
- * 
+ *
  * Functions related to the X Damage Extension.
  */
 
-EAPI Eina_Bool 
-ecore_x_damage_query(void) 
+EAPI Eina_Bool
+ecore_x_damage_query(void)
 {
    return _damage_avail;
 }
 
 /**
  * Create a damage object
- * 
+ *
  * @param drawable The drawable to monitor
  * @param level The level of the damage report
  * @return The damage object
- * 
- * Creates a damage object to monitor changes to @p drawable, 
+ *
+ * Creates a damage object to monitor changes to @p drawable,
  * with the level @p level.
- * 
+ *
  * @ingroup Ecore_X_Damage_Group
  */
-EAPI Ecore_X_Damage 
-ecore_x_damage_new(Ecore_X_Drawable drawable, Ecore_X_Damage_Report_Level level) 
+EAPI Ecore_X_Damage
+ecore_x_damage_new(Ecore_X_Drawable            drawable,
+                   Ecore_X_Damage_Report_Level level)
 {
    Ecore_X_Damage damage = 0;
 
@@ -97,15 +98,15 @@ ecore_x_damage_new(Ecore_X_Drawable drawable, Ecore_X_Damage_Report_Level level)
 
 /**
  * Destroy a damage object
- * 
+ *
  * @param The damage object to destroy
- * 
+ *
  * Destroys the damage object @p damage
- * 
+ *
  * @ingroup Ecore_X_Damage_Group
  */
-EAPI void 
-ecore_x_damage_free(Ecore_X_Damage damage) 
+EAPI void
+ecore_x_damage_free(Ecore_X_Damage damage)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    CHECK_XCB_CONN;
@@ -120,7 +121,7 @@ ecore_x_damage_free(Ecore_X_Damage damage)
 
 /**
  * Synchronously modifies the region
- * 
+ *
  * @param damage The damage object to destroy
  * @param repair The repair region
  * @param parts The parts region
@@ -133,11 +134,13 @@ ecore_x_damage_free(Ecore_X_Damage damage)
  *   1) parts = damage INTERSECT repair
  *   2) damage = damage - parts
  *   3) Generate DamageNotify for remaining damage areas
- * 
+ *
  * @ingroup Ecore_X_Damage_Group
  */
-EAPI void 
-ecore_x_damage_subtract(Ecore_X_Damage damage, Ecore_X_Region repair, Ecore_X_Region parts) 
+EAPI void
+ecore_x_damage_subtract(Ecore_X_Damage damage,
+                        Ecore_X_Region repair,
+                        Ecore_X_Region parts)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    CHECK_XCB_CONN;
@@ -149,3 +152,4 @@ ecore_x_damage_subtract(Ecore_X_Damage damage, Ecore_X_Region repair, Ecore_X_Re
 //   ecore_x_flush();
 #endif
 }
+
index 7b313b8..677de38 100644 (file)
@@ -5,14 +5,20 @@
 #endif
 
 /* local structures */
-typedef struct _Version_Cache_Item 
+typedef struct _Version_Cache_Item
 {
    Ecore_X_Window win;
-   int ver;
+   int            ver;
 } Version_Cache_Item;
 
 /* local function prototypes */
-static Eina_Bool _ecore_xcb_dnd_converter_copy(char *target __UNUSED__, void *data, int size, void **data_ret, int *size_ret, Ecore_X_Atom *tprop __UNUSED__, int *count __UNUSED__);
+static Eina_Bool _ecore_xcb_dnd_converter_copy(char         *target __UNUSED__,
+                                               void         *data,
+                                               int           size,
+                                               void        **data_ret,
+                                               int          *size_ret,
+                                               Ecore_X_Atom *tprop __UNUSED__,
+                                               int          *count __UNUSED__);
 
 /* local variables */
 static int _ecore_xcb_dnd_init_count = 0;
@@ -20,7 +26,8 @@ static Ecore_X_DND_Source *_source = NULL;
 static Ecore_X_DND_Target *_target = NULL;
 static Version_Cache_Item *_version_cache = NULL;
 static int _version_cache_num = 0, _version_cache_alloc = 0;
-static void (*_posupdatecb)(void *, Ecore_X_Xdnd_Position *);
+static void (*_posupdatecb)(void *,
+                            Ecore_X_Xdnd_Position *);
 static void *_posupdatedata;
 
 /* external variables */
@@ -31,12 +38,12 @@ EAPI int ECORE_X_EVENT_XDND_LEAVE = 0;
 EAPI int ECORE_X_EVENT_XDND_DROP = 0;
 EAPI int ECORE_X_EVENT_XDND_FINISHED = 0;
 
-void 
-_ecore_xcb_dnd_init(void) 
+void
+_ecore_xcb_dnd_init(void)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
 
-   if (!_ecore_xcb_dnd_init_count) 
+   if (!_ecore_xcb_dnd_init_count)
      {
         _source = calloc(1, sizeof(Ecore_X_DND_Source));
         if (!_source) return;
@@ -47,7 +54,7 @@ _ecore_xcb_dnd_init(void)
         _source->prev.window = 0;
 
         _target = calloc(1, sizeof(Ecore_X_DND_Target));
-        if (!_target) 
+        if (!_target)
           {
              free(_source);
              _source = NULL;
@@ -67,8 +74,8 @@ _ecore_xcb_dnd_init(void)
    _ecore_xcb_dnd_init_count++;
 }
 
-void 
-_ecore_xcb_dnd_shutdown(void) 
+void
+_ecore_xcb_dnd_shutdown(void)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
 
@@ -81,8 +88,11 @@ _ecore_xcb_dnd_shutdown(void)
    _ecore_xcb_dnd_init_count = 0;
 }
 
-EAPI void 
-ecore_x_dnd_send_status(Eina_Bool will_accept, Eina_Bool suppress, Ecore_X_Rectangle rect, Ecore_X_Atom action) 
+EAPI void
+ecore_x_dnd_send_status(Eina_Bool         will_accept,
+                        Eina_Bool         suppress,
+                        Ecore_X_Rectangle rect,
+                        Ecore_X_Atom      action)
 {
    xcb_client_message_event_t ev;
 
@@ -111,19 +121,19 @@ ecore_x_dnd_send_status(Eina_Bool will_accept, Eina_Bool suppress, Ecore_X_Recta
    ev.data.data32[3] <<= 16;
    ev.data.data32[3] |= rect.height;
 
-   if (will_accept) 
+   if (will_accept)
      ev.data.data32[4] = action;
-   else 
+   else
      ev.data.data32[4] = XCB_NONE;
    _target->accepted_action = action;
 
-   xcb_send_event(_ecore_xcb_conn, 0, _target->source, 
+   xcb_send_event(_ecore_xcb_conn, 0, _target->source,
                   XCB_EVENT_MASK_NO_EVENT, (const char *)&ev);
 //   ecore_x_flush();
 }
 
-EAPI Eina_Bool 
-ecore_x_dnd_drop(void) 
+EAPI Eina_Bool
+ecore_x_dnd_drop(void)
 {
    xcb_client_message_event_t ev;
    Eina_Bool status = EINA_FALSE;
@@ -133,38 +143,38 @@ ecore_x_dnd_drop(void)
 
    memset(&ev, 0, sizeof(xcb_client_message_event_t));
 
-   if (_source->dest) 
+   if (_source->dest)
      {
         ev.response_type = XCB_CLIENT_MESSAGE;
         ev.format = 32;
         ev.window = _source->dest;
 
-        if (_source->will_accept) 
+        if (_source->will_accept)
           {
              ev.type = ECORE_X_ATOM_XDND_DROP;
              ev.data.data32[0] = _source->win;
              ev.data.data32[1] = 0;
              ev.data.data32[2] = _source->time;
 
-             xcb_send_event(_ecore_xcb_conn, 0, _source->dest, 
+             xcb_send_event(_ecore_xcb_conn, 0, _source->dest,
                             XCB_EVENT_MASK_NO_EVENT, (const char *)&ev);
 //             ecore_x_flush();
              _source->state = ECORE_X_DND_SOURCE_DROPPED;
              status = EINA_TRUE;
           }
-        else 
+        else
           {
              ev.type = ECORE_X_ATOM_XDND_LEAVE;
              ev.data.data32[0] = _source->win;
              ev.data.data32[1] = 0;
 
-             xcb_send_event(_ecore_xcb_conn, 0, _source->dest, 
+             xcb_send_event(_ecore_xcb_conn, 0, _source->dest,
                             XCB_EVENT_MASK_NO_EVENT, (const char *)&ev);
 //             ecore_x_flush();
              _source->state = ECORE_X_DND_SOURCE_IDLE;
           }
      }
-   else 
+   else
      {
         ecore_x_selection_xdnd_clear();
         _source->state = ECORE_X_DND_SOURCE_IDLE;
@@ -176,22 +186,23 @@ ecore_x_dnd_drop(void)
    return status;
 }
 
-EAPI void 
-ecore_x_dnd_aware_set(Ecore_X_Window win, Eina_Bool on) 
+EAPI void
+ecore_x_dnd_aware_set(Ecore_X_Window win,
+                      Eina_Bool      on)
 {
    Ecore_X_Atom prop_data = ECORE_X_DND_VERSION;
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
 
    if (on)
-     ecore_x_window_prop_property_set(win, ECORE_X_ATOM_XDND_AWARE, 
+     ecore_x_window_prop_property_set(win, ECORE_X_ATOM_XDND_AWARE,
                                       ECORE_X_ATOM_ATOM, 32, &prop_data, 1);
    else
      ecore_x_window_prop_property_del(win, ECORE_X_ATOM_XDND_AWARE);
 }
 
-EAPI int 
-ecore_x_dnd_version_get(Ecore_X_Window win) 
+EAPI int
+ecore_x_dnd_version_get(Ecore_X_Window win)
 {
    unsigned char *data;
    int num = 0;
@@ -199,13 +210,13 @@ ecore_x_dnd_version_get(Ecore_X_Window win)
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
 
-   if (_source->state == ECORE_X_DND_SOURCE_DRAGGING) 
+   if (_source->state == ECORE_X_DND_SOURCE_DRAGGING)
      {
-        if (_version_cache) 
+        if (_version_cache)
           {
              int i = 0;
 
-             for (i = 0; i < _version_cache_num; i++) 
+             for (i = 0; i < _version_cache_num; i++)
                {
                   if (_version_cache[i].win == win)
                     return _version_cache[i].ver;
@@ -213,19 +224,19 @@ ecore_x_dnd_version_get(Ecore_X_Window win)
           }
      }
 
-   if (ecore_x_window_prop_property_get(win, ECORE_X_ATOM_XDND_AWARE, 
-                                        ECORE_X_ATOM_ATOM, 32, &data, &num)) 
+   if (ecore_x_window_prop_property_get(win, ECORE_X_ATOM_XDND_AWARE,
+                                        ECORE_X_ATOM_ATOM, 32, &data, &num))
      {
         int version = 0;
 
         version = (int)*data;
         free(data);
-        if (_source->state == ECORE_X_DND_SOURCE_DRAGGING) 
+        if (_source->state == ECORE_X_DND_SOURCE_DRAGGING)
           {
              _version_cache_num++;
              if (_version_cache_num > _version_cache_alloc)
                _version_cache_alloc += 16;
-             t = realloc(_version_cache, 
+             t = realloc(_version_cache,
                          _version_cache_alloc * sizeof(Version_Cache_Item));
              if (!t) return 0;
              _version_cache = t;
@@ -235,12 +246,12 @@ ecore_x_dnd_version_get(Ecore_X_Window win)
         return version;
      }
 
-   if (_source->state == ECORE_X_DND_SOURCE_DRAGGING) 
+   if (_source->state == ECORE_X_DND_SOURCE_DRAGGING)
      {
         _version_cache_num++;
         if (_version_cache_num > _version_cache_alloc)
           _version_cache_alloc += 16;
-        t = realloc(_version_cache, 
+        t = realloc(_version_cache,
                     _version_cache_alloc * sizeof(Version_Cache_Item));
         if (!t) return 0;
         _version_cache = t;
@@ -251,8 +262,9 @@ ecore_x_dnd_version_get(Ecore_X_Window win)
    return 0;
 }
 
-EAPI Eina_Bool 
-ecore_x_dnd_type_isset(Ecore_X_Window win, const char *type) 
+EAPI Eina_Bool
+ecore_x_dnd_type_isset(Ecore_X_Window win,
+                       const char    *type)
 {
    int num = 0, i = 0;
    Eina_Bool ret = EINA_FALSE;
@@ -262,15 +274,15 @@ ecore_x_dnd_type_isset(Ecore_X_Window win, const char *type)
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    CHECK_XCB_CONN;
 
-   if (!ecore_x_window_prop_property_get(win, ECORE_X_ATOM_XDND_TYPE_LIST, 
+   if (!ecore_x_window_prop_property_get(win, ECORE_X_ATOM_XDND_TYPE_LIST,
                                          ECORE_X_ATOM_ATOM, 32, &data, &num))
      return ret;
 
    atom = ecore_x_atom_get(type);
    atoms = (Ecore_X_Atom *)data;
-   for (i = 0; i < num; ++i) 
+   for (i = 0; i < num; ++i)
      {
-        if (atom == atoms[i]) 
+        if (atom == atoms[i])
           {
              ret = EINA_TRUE;
              break;
@@ -281,8 +293,10 @@ ecore_x_dnd_type_isset(Ecore_X_Window win, const char *type)
    return ret;
 }
 
-EAPI void 
-ecore_x_dnd_type_set(Ecore_X_Window win, const char *type, Eina_Bool on) 
+EAPI void
+ecore_x_dnd_type_set(Ecore_X_Window win,
+                     const char    *type,
+                     Eina_Bool      on)
 {
    Ecore_X_Atom atom, *oldset = NULL, *newset = NULL;
    int i = 0, j = 0, num = 0;
@@ -292,12 +306,12 @@ ecore_x_dnd_type_set(Ecore_X_Window win, const char *type, Eina_Bool on)
    CHECK_XCB_CONN;
 
    atom = ecore_x_atom_get(type);
-   ecore_x_window_prop_property_get(win, ECORE_X_ATOM_XDND_TYPE_LIST, 
+   ecore_x_window_prop_property_get(win, ECORE_X_ATOM_XDND_TYPE_LIST,
                                     ECORE_X_ATOM_ATOM, 32, &old_data, &num);
    oldset = (Ecore_X_Atom *)old_data;
-   if (on) 
+   if (on)
      {
-        if (ecore_x_dnd_type_isset(win, type)) 
+        if (ecore_x_dnd_type_isset(win, type))
           {
              free(old_data);
              return;
@@ -308,27 +322,27 @@ ecore_x_dnd_type_set(Ecore_X_Window win, const char *type, Eina_Bool on)
         for (i = 0; i < num; i++)
           newset[i + 1] = oldset[i];
         newset[0] = atom;
-        ecore_x_window_prop_property_set(win, ECORE_X_ATOM_XDND_TYPE_LIST, 
+        ecore_x_window_prop_property_set(win, ECORE_X_ATOM_XDND_TYPE_LIST,
                                          ECORE_X_ATOM_ATOM, 32, data, num + 1);
      }
-   else 
+   else
      {
-        if (!ecore_x_dnd_type_isset(win, type)) 
+        if (!ecore_x_dnd_type_isset(win, type))
           {
              free(old_data);
              return;
           }
         newset = calloc(num - 1, sizeof(Ecore_X_Atom));
-        if (!newset) 
+        if (!newset)
           {
              free(old_data);
              return;
           }
         data = (unsigned char *)newset;
         for (i = 0; i < num; i++)
-          if (oldset[i] != atom) 
+          if (oldset[i] != atom)
             newset[j++] = oldset[i];
-        ecore_x_window_prop_property_set(win, ECORE_X_ATOM_XDND_TYPE_LIST, 
+        ecore_x_window_prop_property_set(win, ECORE_X_ATOM_XDND_TYPE_LIST,
                                          ECORE_X_ATOM_ATOM, 32, data, num - 1);
      }
    free(oldset);
@@ -336,7 +350,9 @@ ecore_x_dnd_type_set(Ecore_X_Window win, const char *type, Eina_Bool on)
 }
 
 EAPI void
-ecore_x_dnd_types_set(Ecore_X_Window win, const char **types, unsigned int num_types)
+ecore_x_dnd_types_set(Ecore_X_Window win,
+                      const char   **types,
+                      unsigned int   num_types)
 {
    Ecore_X_Atom *newset = NULL;
    unsigned int i;
@@ -346,7 +362,7 @@ ecore_x_dnd_types_set(Ecore_X_Window win, const char **types, unsigned int num_t
    CHECK_XCB_CONN;
 
    if (!num_types)
-      ecore_x_window_prop_property_del(win, ECORE_X_ATOM_XDND_TYPE_LIST);
+     ecore_x_window_prop_property_del(win, ECORE_X_ATOM_XDND_TYPE_LIST);
    else
      {
         newset = calloc(num_types, sizeof(Ecore_X_Atom));
@@ -360,14 +376,16 @@ ecore_x_dnd_types_set(Ecore_X_Window win, const char **types, unsigned int num_t
                                                   _ecore_xcb_dnd_converter_copy);
           }
         ecore_x_window_prop_property_set(win, ECORE_X_ATOM_XDND_TYPE_LIST,
-                                         ECORE_X_ATOM_ATOM, 32, data, 
+                                         ECORE_X_ATOM_ATOM, 32, data,
                                          num_types);
         free(newset);
      }
 }
 
 EAPI void
-ecore_x_dnd_actions_set(Ecore_X_Window win, Ecore_X_Atom *actions, unsigned int num_actions)
+ecore_x_dnd_actions_set(Ecore_X_Window win,
+                        Ecore_X_Atom  *actions,
+                        unsigned int   num_actions)
 {
    unsigned int i;
    unsigned char *data = NULL;
@@ -376,7 +394,7 @@ ecore_x_dnd_actions_set(Ecore_X_Window win, Ecore_X_Atom *actions, unsigned int
    CHECK_XCB_CONN;
 
    if (!num_actions)
-      ecore_x_window_prop_property_del(win, ECORE_X_ATOM_XDND_ACTION_LIST);
+     ecore_x_window_prop_property_del(win, ECORE_X_ATOM_XDND_ACTION_LIST);
    else
      {
         data = (unsigned char *)actions;
@@ -384,7 +402,7 @@ ecore_x_dnd_actions_set(Ecore_X_Window win, Ecore_X_Atom *actions, unsigned int
           ecore_x_selection_converter_atom_add(actions[i],
                                                _ecore_xcb_dnd_converter_copy);
         ecore_x_window_prop_property_set(win, ECORE_X_ATOM_XDND_ACTION_LIST,
-                                         ECORE_X_ATOM_ATOM, 32, data, 
+                                         ECORE_X_ATOM_ATOM, 32, data,
                                          num_actions);
      }
 }
@@ -404,14 +422,18 @@ ecore_x_dnd_actions_set(Ecore_X_Window win, Ecore_X_Atom *actions, unsigned int
  * @param data User data.
  */
 EAPI void
-ecore_x_dnd_callback_pos_update_set(void (*cb)(void *, Ecore_X_Xdnd_Position *data), const void *data)
+ecore_x_dnd_callback_pos_update_set(void                                                           (*cb)(void *,
+                                                                            Ecore_X_Xdnd_Position *data),
+                                    const void                                                    *data)
 {
    _posupdatecb = cb;
    _posupdatedata = (void *)data;
 }
 
-EAPI Eina_Bool 
-ecore_x_dnd_begin(Ecore_X_Window source, unsigned char *data, int size) 
+EAPI Eina_Bool
+ecore_x_dnd_begin(Ecore_X_Window source,
+                  unsigned char *data,
+                  int            size)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
 
@@ -444,8 +466,8 @@ ecore_x_dnd_begin(Ecore_X_Window source, unsigned char *data, int size)
    return EINA_TRUE;
 }
 
-EAPI void 
-ecore_x_dnd_send_finished(void) 
+EAPI void
+ecore_x_dnd_send_finished(void)
 {
    xcb_client_message_event_t ev;
 
@@ -463,43 +485,45 @@ ecore_x_dnd_send_finished(void)
    ev.data.data32[0] = _target->win;
    ev.data.data32[1] = 0;
    ev.data.data32[2] = 0;
-   if (_target->will_accept) 
+   if (_target->will_accept)
      {
         ev.data.data32[1] |= 0x1UL;
         ev.data.data32[2] = _target->accepted_action;
      }
 
-   xcb_send_event(_ecore_xcb_conn, 0, _target->source, 
+   xcb_send_event(_ecore_xcb_conn, 0, _target->source,
                   XCB_EVENT_MASK_NO_EVENT, (const char *)&ev);
 //   ecore_x_flush();
    _target->state = ECORE_X_DND_TARGET_IDLE;
 }
 
-EAPI void 
-ecore_x_dnd_source_action_set(Ecore_X_Atom action) 
+EAPI void
+ecore_x_dnd_source_action_set(Ecore_X_Atom action)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
 
    _source->action = action;
    if (_source->prev.window)
-     _ecore_xcb_dnd_drag(_source->prev.window, 
+     _ecore_xcb_dnd_drag(_source->prev.window,
                          _source->prev.x, _source->prev.y);
 }
 
 Ecore_X_DND_Source *
-_ecore_xcb_dnd_source_get(void) 
+_ecore_xcb_dnd_source_get(void)
 {
    return _source;
 }
 
 Ecore_X_DND_Target *
-_ecore_xcb_dnd_target_get(void) 
+_ecore_xcb_dnd_target_get(void)
 {
    return _target;
 }
 
-void 
-_ecore_xcb_dnd_drag(Ecore_X_Window root, int x, int y) 
+void
+_ecore_xcb_dnd_drag(Ecore_X_Window root,
+                    int            x,
+                    int            y)
 {
    xcb_client_message_event_t ev;
    Ecore_X_Window win, *skip;
@@ -521,34 +545,34 @@ _ecore_xcb_dnd_drag(Ecore_X_Window root, int x, int y)
    while ((win) && !(ecore_x_dnd_version_get(win)))
      win = ecore_x_window_shadow_parent_get(root, win);
 
-   if ((_source->dest) && (win != _source->dest)) 
+   if ((_source->dest) && (win != _source->dest))
      {
         ev.window = _source->dest;
         ev.type = ECORE_X_ATOM_XDND_LEAVE;
         ev.data.data32[0] = _source->win;
         ev.data.data32[1] = 0;
 
-        xcb_send_event(_ecore_xcb_conn, 0, _source->dest, 
+        xcb_send_event(_ecore_xcb_conn, 0, _source->dest,
                        XCB_EVENT_MASK_NO_EVENT, (const char *)&ev);
 //        ecore_x_flush();
         _source->suppress = 0;
      }
 
-   if (win) 
+   if (win)
      {
         int x1, x2, y1, y2;
 
-        _source->version = MIN(ECORE_X_DND_VERSION, 
+        _source->version = MIN(ECORE_X_DND_VERSION,
                                ecore_x_dnd_version_get(win));
-        if (win != _source->dest) 
+        if (win != _source->dest)
           {
              int i = 0;
              unsigned char *data;
              Ecore_X_Atom *types;
 
-             ecore_x_window_prop_property_get(_source->win, 
-                                              ECORE_X_ATOM_XDND_TYPE_LIST, 
-                                              ECORE_X_ATOM_ATOM, 32, 
+             ecore_x_window_prop_property_get(_source->win,
+                                              ECORE_X_ATOM_XDND_TYPE_LIST,
+                                              ECORE_X_ATOM_ATOM, 32,
                                               &data, &num);
              types = (Ecore_X_Atom *)data;
              ev.window = win;
@@ -567,7 +591,7 @@ _ecore_xcb_dnd_drag(Ecore_X_Window root, int x, int y)
                ev.data.data32[i + 2] = types[i];
              free(data);
 
-             xcb_send_event(_ecore_xcb_conn, 0, win, 
+             xcb_send_event(_ecore_xcb_conn, 0, win,
                             XCB_EVENT_MASK_NO_EVENT, (const char *)&ev);
 //             ecore_x_flush();
              _source->await_status = 0;
@@ -579,8 +603,8 @@ _ecore_xcb_dnd_drag(Ecore_X_Window root, int x, int y)
         y1 = _source->rectangle.y;
         y2 = _source->rectangle.y + _source->rectangle.height;
 
-        if ((!_source->await_status) || (!_source->suppress) || 
-            ((x < x1) || (x > x2) || (y < y1) || (y > y2))) 
+        if ((!_source->await_status) || (!_source->suppress) ||
+            ((x < x1) || (x > x2) || (y < y1) || (y > y2)))
           {
              ev.window = win;
              ev.type = ECORE_X_ATOM_XDND_POSITION;
@@ -590,14 +614,14 @@ _ecore_xcb_dnd_drag(Ecore_X_Window root, int x, int y)
              ev.data.data32[3] = _source->time;
              ev.data.data32[4] = _source->action;
 
-             xcb_send_event(_ecore_xcb_conn, 0, win, 
+             xcb_send_event(_ecore_xcb_conn, 0, win,
                             XCB_EVENT_MASK_NO_EVENT, (const char *)&ev);
 //             ecore_x_flush();
              _source->await_status = 1;
           }
      }
 
-   if (_posupdatecb) 
+   if (_posupdatecb)
      {
         pos.position.x = x;
         pos.position.y = y;
@@ -612,15 +636,21 @@ _ecore_xcb_dnd_drag(Ecore_X_Window root, int x, int y)
    _source->dest = win;
 }
 
-EAPI Ecore_X_Atom 
-ecore_x_dnd_source_action_get(void) 
+EAPI Ecore_X_Atom
+ecore_x_dnd_source_action_get(void)
 {
    return _source->action;
 }
 
 /* local functions */
-static Eina_Bool 
-_ecore_xcb_dnd_converter_copy(char *target __UNUSED__, void *data, int size, void **data_ret, int *size_ret, Ecore_X_Atom *tprop __UNUSED__, int *count __UNUSED__) 
+static Eina_Bool
+_ecore_xcb_dnd_converter_copy(char         *target __UNUSED__,
+                              void         *data,
+                              int           size,
+                              void        **data_ret,
+                              int          *size_ret,
+                              Ecore_X_Atom *tprop __UNUSED__,
+                              int          *count __UNUSED__)
 {
    Ecore_Xcb_Textproperty text_prop;
    Ecore_Xcb_Encoding_Style style = XcbTextStyle;
@@ -634,12 +664,12 @@ _ecore_xcb_dnd_converter_copy(char *target __UNUSED__, void *data, int size, voi
    if (!mystr) return EINA_FALSE;
 
    memcpy(mystr, data, size);
-   if (_ecore_xcb_mb_textlist_to_textproperty(&mystr, 1, style, &text_prop)) 
+   if (_ecore_xcb_mb_textlist_to_textproperty(&mystr, 1, style, &text_prop))
      {
         int len;
 
         len = strlen((char *)text_prop.value) + 1;
-        if (!(*data_ret = malloc(len))) 
+        if (!(*data_ret = malloc(len)))
           {
              free(mystr);
              return EINA_FALSE;
@@ -650,9 +680,10 @@ _ecore_xcb_dnd_converter_copy(char *target __UNUSED__, void *data, int size, voi
         free(mystr);
         return EINA_TRUE;
      }
-   else 
+   else
      {
         free(mystr);
         return EINA_FALSE;
      }
 }
+
index fb5a330..63b7f1e 100644 (file)
@@ -6,8 +6,8 @@
 /* local variables */
 static Eina_Bool _dpms_avail = EINA_FALSE;
 
-void 
-_ecore_xcb_dpms_init(void) 
+void
+_ecore_xcb_dpms_init(void)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
 
@@ -16,8 +16,8 @@ _ecore_xcb_dpms_init(void)
 #endif
 }
 
-void 
-_ecore_xcb_dpms_finalize(void) 
+void
+_ecore_xcb_dpms_finalize(void)
 {
 #ifdef ECORE_XCB_DPMS
    const xcb_query_extension_reply_t *ext_reply;
@@ -25,21 +25,21 @@ _ecore_xcb_dpms_finalize(void)
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
 
-#ifdef ECORE_XCB_DPMS 
+#ifdef ECORE_XCB_DPMS
    ext_reply = xcb_get_extension_data(_ecore_xcb_conn, &xcb_dpms_id);
-   if ((ext_reply) && (ext_reply->present)) 
+   if ((ext_reply) && (ext_reply->present))
      {
         xcb_dpms_get_version_cookie_t cookie;
         xcb_dpms_get_version_reply_t *reply;
 
-        cookie = 
-          xcb_dpms_get_version_unchecked(_ecore_xcb_conn, 
-                                         XCB_DPMS_MAJOR_VERSION, 
+        cookie =
+          xcb_dpms_get_version_unchecked(_ecore_xcb_conn,
+                                         XCB_DPMS_MAJOR_VERSION,
                                          XCB_DPMS_MINOR_VERSION);
         reply = xcb_dpms_get_version_reply(_ecore_xcb_conn, cookie, NULL);
-        if (reply) 
+        if (reply)
           {
-             if (reply->server_major_version >= 1) 
+             if (reply->server_major_version >= 1)
                _dpms_avail = EINA_TRUE;
              free(reply);
           }
@@ -49,27 +49,27 @@ _ecore_xcb_dpms_finalize(void)
 
 /**
  * @defgroup Ecore_X_DPMS_Group X DPMS Extension Functions
- * 
+ *
  * Functions related to the X DPMS Extension
  */
 
 /**
  * Checks if the DPMS extension is available or not.
- * 
- * @return @c EINA_TRUE if the DPMS extension is available, 
+ *
+ * @return @c EINA_TRUE if the DPMS extension is available,
  * @c EINA_FALSE otherwise.
  *
  * Return EINA_TRUE if the X server supports the DPMS Extension version 1.0,
  * EINA_FALSE otherwise.
- * 
+ *
  * @ingroup Ecore_X_DPMS_Group
  */
-EAPI Eina_Bool 
-ecore_x_dpms_query(void) 
+EAPI Eina_Bool
+ecore_x_dpms_query(void)
 {
 //   LOGFN(__FILE__, __LINE__, __FUNCTION__);
 
-   return _dpms_avail;
+     return _dpms_avail;
 }
 
 /**
@@ -77,8 +77,8 @@ ecore_x_dpms_query(void)
  * @return @c 1 if the X server is capable of DPMS, @c 0 otherwise.
  * @ingroup Ecore_X_DPMS_Group
  */
-EAPI Eina_Bool 
-ecore_x_dpms_capable_get(void) 
+EAPI Eina_Bool
+ecore_x_dpms_capable_get(void)
 {
    Eina_Bool ret = EINA_FALSE;
 #ifdef ECORE_XCB_DPMS
@@ -94,7 +94,7 @@ ecore_x_dpms_capable_get(void)
 #ifdef ECORE_XCB_DPMS
    cookie = xcb_dpms_capable_unchecked(_ecore_xcb_conn);
    reply = xcb_dpms_capable_reply(_ecore_xcb_conn, cookie, NULL);
-   if (reply) 
+   if (reply)
      {
         ret = reply->capable;
         free(reply);
@@ -109,8 +109,8 @@ ecore_x_dpms_capable_get(void)
  * @return @c EINA_TRUE if DPMS is enabled, @c EINA_FALSE otherwise.
  * @ingroup Ecore_X_DPMS_Group
  */
-EAPI Eina_Bool 
-ecore_x_dpms_enabled_get(void) 
+EAPI Eina_Bool
+ecore_x_dpms_enabled_get(void)
 {
    Eina_Bool ret = EINA_FALSE;
 #ifdef ECORE_XCB_DPMS
@@ -139,8 +139,8 @@ ecore_x_dpms_enabled_get(void)
  * @param enabled @c 0 to disable DPMS characteristics of the server, enable it otherwise.
  * @ingroup Ecore_X_DPMS_Group
  */
-EAPI void 
-ecore_x_dpms_enabled_set(int enabled) 
+EAPI void
+ecore_x_dpms_enabled_set(int enabled)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    CHECK_XCB_CONN;
@@ -148,9 +148,9 @@ ecore_x_dpms_enabled_set(int enabled)
    if (!_dpms_avail) return;
 
 #ifdef ECORE_XCB_DPMS
-   if (enabled) 
+   if (enabled)
      xcb_dpms_enable(_ecore_xcb_conn);
-   else 
+   else
      xcb_dpms_disable(_ecore_xcb_conn);
 #endif
 }
@@ -162,8 +162,10 @@ ecore_x_dpms_enabled_set(int enabled)
  * @param off     Amount of time of inactivity before the monitor is shut off.
  * @ingroup Ecore_X_DPMS_Group
  */
-EAPI void 
-ecore_x_dpms_timeouts_get(unsigned int *standby, unsigned int *suspend, unsigned int *off) 
+EAPI void
+ecore_x_dpms_timeouts_get(unsigned int *standby,
+                          unsigned int *suspend,
+                          unsigned int *off)
 {
 #ifdef ECORE_XCB_DPMS
    xcb_dpms_get_timeouts_cookie_t cookie;
@@ -197,8 +199,10 @@ ecore_x_dpms_timeouts_get(unsigned int *standby, unsigned int *suspend, unsigned
  * @param off     Amount of time of inactivity before the monitor is shut off.
  * @ingroup Ecore_X_DPMS_Group
  */
-EAPI Eina_Bool 
-ecore_x_dpms_timeouts_set(unsigned int standby, unsigned int suspend, unsigned int off) 
+EAPI Eina_Bool
+ecore_x_dpms_timeouts_set(unsigned int standby,
+                          unsigned int suspend,
+                          unsigned int off)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    CHECK_XCB_CONN;
@@ -219,8 +223,8 @@ ecore_x_dpms_timeouts_set(unsigned int standby, unsigned int suspend, unsigned i
  * @return The standby timeout value.
  * @ingroup Ecore_X_DPMS_Group
  */
-EAPI unsigned int 
-ecore_x_dpms_timeout_standby_get(void) 
+EAPI unsigned int
+ecore_x_dpms_timeout_standby_get(void)
 {
    unsigned int standby = 0;
 
@@ -236,8 +240,8 @@ ecore_x_dpms_timeout_standby_get(void)
  * @return The suspend timeout value.
  * @ingroup Ecore_X_DPMS_Group
  */
-EAPI unsigned int 
-ecore_x_dpms_timeout_suspend_get(void) 
+EAPI unsigned int
+ecore_x_dpms_timeout_suspend_get(void)
 {
    unsigned int suspend = 0;
 
@@ -253,8 +257,8 @@ ecore_x_dpms_timeout_suspend_get(void)
  * @return The off timeout value.
  * @ingroup Ecore_X_DPMS_Group
  */
-EAPI unsigned int 
-ecore_x_dpms_timeout_off_get(void) 
+EAPI unsigned int
+ecore_x_dpms_timeout_off_get(void)
 {
    unsigned int off = 0;
 
@@ -269,8 +273,8 @@ ecore_x_dpms_timeout_off_get(void)
  * @param new_standby Amount of time of inactivity before standby mode will be invoked.
  * @ingroup Ecore_X_DPMS_Group
  */
-EAPI void 
-ecore_x_dpms_timeout_standby_set(unsigned int new_timeout) 
+EAPI void
+ecore_x_dpms_timeout_standby_set(unsigned int new_timeout)
 {
    unsigned int standby = 0, suspend = 0, off = 0;
 
@@ -285,8 +289,8 @@ ecore_x_dpms_timeout_standby_set(unsigned int new_timeout)
  * @param suspend Amount of time of inactivity before the screen is placed into suspend mode.
  * @ingroup Ecore_X_DPMS_Group
  */
-EAPI void 
-ecore_x_dpms_timeout_suspend_set(unsigned int new_timeout) 
+EAPI void
+ecore_x_dpms_timeout_suspend_set(unsigned int new_timeout)
 {
    unsigned int standby = 0, suspend = 0, off = 0;
 
@@ -301,8 +305,8 @@ ecore_x_dpms_timeout_suspend_set(unsigned int new_timeout)
  * @param off     Amount of time of inactivity before the monitor is shut off.
  * @ingroup Ecore_X_DPMS_Group
  */
-EAPI void 
-ecore_x_dpms_timeout_off_set(unsigned int new_timeout) 
+EAPI void
+ecore_x_dpms_timeout_off_set(unsigned int new_timeout)
 {
    unsigned int standby = 0, suspend = 0, off = 0;
 
@@ -311,3 +315,4 @@ ecore_x_dpms_timeout_off_set(unsigned int new_timeout)
    ecore_x_dpms_timeouts_get(&standby, &suspend, &off);
    ecore_x_dpms_timeouts_set(standby, suspend, new_timeout);
 }
+
index 6ea235b..4e9a356 100644 (file)
  * @param width The width of the rectangle.
  * @param height The height of the rectangle.
  */
-EAPI void 
-ecore_x_drawable_rectangle_fill(Ecore_X_Drawable draw, Ecore_X_GC gc, int x, int y, int w, int h) 
+EAPI void
+ecore_x_drawable_rectangle_fill(Ecore_X_Drawable draw,
+                                Ecore_X_GC       gc,
+                                int              x,
+                                int              y,
+                                int              w,
+                                int              h)
 {
    xcb_rectangle_t rect;
 
@@ -27,7 +32,7 @@ ecore_x_drawable_rectangle_fill(Ecore_X_Drawable draw, Ecore_X_GC gc, int x, int
    rect.y = y;
    rect.width = w;
    rect.height = h;
-   xcb_poly_fill_rectangle(_ecore_xcb_conn, draw, gc, 1, 
+   xcb_poly_fill_rectangle(_ecore_xcb_conn, draw, gc, 1,
                            (const xcb_rectangle_t *)&rect);
 //   ecore_x_flush();
 }
@@ -41,8 +46,12 @@ ecore_x_drawable_rectangle_fill(Ecore_X_Drawable draw, Ecore_X_GC gc, int x, int
  * @param h Pointer to an integer into which the height is to be stored.
  * @ingroup Ecore_X_Drawable_Group
  */
-EAPI void 
-ecore_x_drawable_geometry_get(Ecore_X_Drawable draw, int *x, int *y, int *w, int *h) 
+EAPI void
+ecore_x_drawable_geometry_get(Ecore_X_Drawable draw,
+                              int             *x,
+                              int             *y,
+                              int             *w,
+                              int             *h)
 {
    xcb_get_geometry_cookie_t cookie;
    xcb_get_geometry_reply_t *reply;
@@ -70,8 +79,8 @@ ecore_x_drawable_geometry_get(Ecore_X_Drawable draw, int *x, int *y, int *w, int
  * @return The border width of the given drawable.
  * @ingroup Ecore_X_Drawable_Group
  */
-EAPI int 
-ecore_x_drawable_border_width_get(Ecore_X_Drawable d) 
+EAPI int
+ecore_x_drawable_border_width_get(Ecore_X_Drawable d)
 {
    xcb_get_geometry_cookie_t cookie;
    xcb_get_geometry_reply_t *reply;
@@ -94,8 +103,8 @@ ecore_x_drawable_border_width_get(Ecore_X_Drawable d)
  * @return The depth of the given drawable.
  * @ingroup Ecore_X_Drawable_Group
  */
-EAPI int 
-ecore_x_drawable_depth_get(Ecore_X_Drawable d) 
+EAPI int
+ecore_x_drawable_depth_get(Ecore_X_Drawable d)
 {
    xcb_get_geometry_cookie_t cookie;
    xcb_get_geometry_reply_t *reply;
@@ -111,3 +120,4 @@ ecore_x_drawable_depth_get(Ecore_X_Drawable d)
    free(reply);
    return ret;
 }
+
index 5b9162d..c868f5e 100644 (file)
@@ -1,21 +1,21 @@
 #include "ecore_xcb_private.h"
 
 /* local function prototypes */
-static Ecore_X_Atom _ecore_xcb_e_vkbd_atom_get(Ecore_X_Virtual_Keyboard_State state);
-static Ecore_X_Virtual_Keyboard_State _ecore_xcb_e_vkbd_state_get(Ecore_X_Atom atom);
-static Ecore_X_Atom _ecore_xcb_e_quickpanel_atom_get(Ecore_X_Illume_Quickpanel_State state);
+static Ecore_X_Atom                    _ecore_xcb_e_vkbd_atom_get(Ecore_X_Virtual_Keyboard_State state);
+static Ecore_X_Virtual_Keyboard_State  _ecore_xcb_e_vkbd_state_get(Ecore_X_Atom atom);
+static Ecore_X_Atom                    _ecore_xcb_e_quickpanel_atom_get(Ecore_X_Illume_Quickpanel_State state);
 static Ecore_X_Illume_Quickpanel_State _ecore_xcb_e_quickpanel_state_get(Ecore_X_Atom atom);
-static Ecore_X_Atom _ecore_xcb_e_illume_atom_get(Ecore_X_Illume_Mode mode);
-static Ecore_X_Illume_Mode _ecore_xcb_e_illume_mode_get(Ecore_X_Atom atom);
+static Ecore_X_Atom                    _ecore_xcb_e_illume_atom_get(Ecore_X_Illume_Mode mode);
+static Ecore_X_Illume_Mode             _ecore_xcb_e_illume_mode_get(Ecore_X_Atom atom);
 
-EAPI void 
-ecore_x_e_init(void) 
+EAPI void
+ecore_x_e_init(void)
 {
-
 }
 
-EAPI void 
-ecore_x_e_comp_sync_draw_done_send(Ecore_X_Window root, Ecore_X_Window win) 
+EAPI void
+ecore_x_e_comp_sync_draw_done_send(Ecore_X_Window root,
+                                   Ecore_X_Window win)
 {
    xcb_client_message_event_t ev;
 
@@ -36,14 +36,17 @@ ecore_x_e_comp_sync_draw_done_send(Ecore_X_Window root, Ecore_X_Window win)
    ev.data.data32[3] = 0;
    ev.data.data32[4] = 0;
 
-   xcb_send_event(_ecore_xcb_conn, 0, root, 
-                  (XCB_EVENT_MASK_SUBSTRUCTURE_REDIRECT | 
-                      XCB_EVENT_MASK_SUBSTRUCTURE_NOTIFY), (const char *)&ev);
+   xcb_send_event(_ecore_xcb_conn, 0, root,
+                  (XCB_EVENT_MASK_SUBSTRUCTURE_REDIRECT |
+                   XCB_EVENT_MASK_SUBSTRUCTURE_NOTIFY), (const char *)&ev);
 //   ecore_x_flush();
 }
 
-EAPI void 
-ecore_x_e_comp_sync_draw_size_done_send(Ecore_X_Window root, Ecore_X_Window win, int w, int h) 
+EAPI void
+ecore_x_e_comp_sync_draw_size_done_send(Ecore_X_Window root,
+                                        Ecore_X_Window win,
+                                        int            w,
+                                        int            h)
 {
    xcb_client_message_event_t ev;
 
@@ -64,40 +67,41 @@ ecore_x_e_comp_sync_draw_size_done_send(Ecore_X_Window root, Ecore_X_Window win,
    ev.data.data32[3] = h;
    ev.data.data32[4] = 0;
 
-   xcb_send_event(_ecore_xcb_conn, 0, root, 
-                  (XCB_EVENT_MASK_SUBSTRUCTURE_REDIRECT | 
-                      XCB_EVENT_MASK_SUBSTRUCTURE_NOTIFY), (const char *)&ev);
+   xcb_send_event(_ecore_xcb_conn, 0, root,
+                  (XCB_EVENT_MASK_SUBSTRUCTURE_REDIRECT |
+                   XCB_EVENT_MASK_SUBSTRUCTURE_NOTIFY), (const char *)&ev);
 //   ecore_x_flush();
 }
 
-EAPI void 
-ecore_x_e_comp_sync_counter_set(Ecore_X_Window win, Ecore_X_Sync_Counter counter) 
+EAPI void
+ecore_x_e_comp_sync_counter_set(Ecore_X_Window       win,
+                                Ecore_X_Sync_Counter counter)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
 
    if (counter)
-     ecore_x_window_prop_xid_set(win, ECORE_X_ATOM_E_COMP_SYNC_COUNTER, 
+     ecore_x_window_prop_xid_set(win, ECORE_X_ATOM_E_COMP_SYNC_COUNTER,
                                  ECORE_X_ATOM_CARDINAL, &counter, 1);
    else
      ecore_x_window_prop_property_del(win, ECORE_X_ATOM_E_COMP_SYNC_COUNTER);
 }
 
-EAPI Ecore_X_Sync_Counter 
-ecore_x_e_comp_sync_counter_get(Ecore_X_Window win) 
+EAPI Ecore_X_Sync_Counter
+ecore_x_e_comp_sync_counter_get(Ecore_X_Window win)
 {
    Ecore_X_Sync_Counter counter = 0;
    int ret = 0;
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
 
-   ret = ecore_x_window_prop_xid_get(win, ECORE_X_ATOM_E_COMP_SYNC_COUNTER, 
+   ret = ecore_x_window_prop_xid_get(win, ECORE_X_ATOM_E_COMP_SYNC_COUNTER,
                                      ECORE_X_ATOM_CARDINAL, &counter, 1);
    if (ret != 1) return 0;
    return counter;
 }
 
-EAPI Eina_Bool 
-ecore_x_e_comp_sync_supported_get(Ecore_X_Window root) 
+EAPI Eina_Bool
+ecore_x_e_comp_sync_supported_get(Ecore_X_Window root)
 {
    Ecore_X_Window win, win2;
    int ret = 0;
@@ -105,54 +109,55 @@ ecore_x_e_comp_sync_supported_get(Ecore_X_Window root)
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
 
    if (!root) root = ((xcb_screen_t *)_ecore_xcb_screen)->root;
-   ret = 
-     ecore_x_window_prop_xid_get(root, ECORE_X_ATOM_E_COMP_SYNC_SUPPORTED, 
+   ret =
+     ecore_x_window_prop_xid_get(root, ECORE_X_ATOM_E_COMP_SYNC_SUPPORTED,
                                  ECORE_X_ATOM_WINDOW, &win, 1);
-   if ((ret == 1) && (win)) 
+   if ((ret == 1) && (win))
      {
-        ret = 
-          ecore_x_window_prop_xid_get(win, ECORE_X_ATOM_E_COMP_SYNC_SUPPORTED, 
+        ret =
+          ecore_x_window_prop_xid_get(win, ECORE_X_ATOM_E_COMP_SYNC_SUPPORTED,
                                       ECORE_X_ATOM_WINDOW, &win2, 1);
-        if ((ret == 1) && (win2 == win)) 
+        if ((ret == 1) && (win2 == win))
           return EINA_TRUE;
      }
    return EINA_FALSE;
 }
 
-EAPI void 
-ecore_x_e_comp_sync_supported_set(Ecore_X_Window root, Eina_Bool enabled) 
+EAPI void
+ecore_x_e_comp_sync_supported_set(Ecore_X_Window root,
+                                  Eina_Bool      enabled)
 {
    Ecore_X_Window win;
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
 
    if (!root) root = ((xcb_screen_t *)_ecore_xcb_screen)->root;
-   if (enabled) 
+   if (enabled)
      {
         win = ecore_x_window_new(root, 1, 2, 3, 4);
-        ecore_x_window_prop_xid_set(win, ECORE_X_ATOM_E_COMP_SYNC_SUPPORTED, 
+        ecore_x_window_prop_xid_set(win, ECORE_X_ATOM_E_COMP_SYNC_SUPPORTED,
                                     ECORE_X_ATOM_WINDOW, &win, 1);
-        ecore_x_window_prop_xid_set(root, ECORE_X_ATOM_E_COMP_SYNC_SUPPORTED, 
+        ecore_x_window_prop_xid_set(root, ECORE_X_ATOM_E_COMP_SYNC_SUPPORTED,
                                     ECORE_X_ATOM_WINDOW, &win, 1);
      }
-   else 
+   else
      {
         int ret = 0;
 
-        ret = ecore_x_window_prop_xid_get(root, 
-                                          ECORE_X_ATOM_E_COMP_SYNC_SUPPORTED, 
+        ret = ecore_x_window_prop_xid_get(root,
+                                          ECORE_X_ATOM_E_COMP_SYNC_SUPPORTED,
                                           ECORE_X_ATOM_WINDOW, &win, 1);
-        if ((ret == 1) && (win)) 
+        if ((ret == 1) && (win))
           {
-             ecore_x_window_prop_property_del(root, 
+             ecore_x_window_prop_property_del(root,
                                               ECORE_X_ATOM_E_COMP_SYNC_SUPPORTED);
              ecore_x_window_free(win);
           }
      }
 }
 
-EAPI void 
-ecore_x_e_comp_sync_begin_send(Ecore_X_Window win) 
+EAPI void
+ecore_x_e_comp_sync_begin_send(Ecore_X_Window win)
 {
    xcb_client_message_event_t ev;
 
@@ -171,13 +176,13 @@ ecore_x_e_comp_sync_begin_send(Ecore_X_Window win)
    ev.data.data32[3] = 0;
    ev.data.data32[4] = 0;
 
-   xcb_send_event(_ecore_xcb_conn, 0, win, 
+   xcb_send_event(_ecore_xcb_conn, 0, win,
                   XCB_EVENT_MASK_NO_EVENT, (const char *)&ev);
 //   ecore_x_flush();
 }
 
-EAPI void 
-ecore_x_e_comp_sync_end_send(Ecore_X_Window win) 
+EAPI void
+ecore_x_e_comp_sync_end_send(Ecore_X_Window win)
 {
    xcb_client_message_event_t ev;
 
@@ -196,13 +201,13 @@ ecore_x_e_comp_sync_end_send(Ecore_X_Window win)
    ev.data.data32[3] = 0;
    ev.data.data32[4] = 0;
 
-   xcb_send_event(_ecore_xcb_conn, 0, win, 
+   xcb_send_event(_ecore_xcb_conn, 0, win,
                   XCB_EVENT_MASK_NO_EVENT, (const char *)&ev);
 //   ecore_x_flush();
 }
 
-EAPI void 
-ecore_x_e_comp_sync_cancel_send(Ecore_X_Window win) 
+EAPI void
+ecore_x_e_comp_sync_cancel_send(Ecore_X_Window win)
 {
    xcb_client_message_event_t ev;
 
@@ -221,13 +226,13 @@ ecore_x_e_comp_sync_cancel_send(Ecore_X_Window win)
    ev.data.data32[3] = 0;
    ev.data.data32[4] = 0;
 
-   xcb_send_event(_ecore_xcb_conn, 0, win, 
+   xcb_send_event(_ecore_xcb_conn, 0, win,
                   XCB_EVENT_MASK_NO_EVENT, (const char *)&ev);
 //   ecore_x_flush();
 }
 
-EAPI void 
-ecore_x_e_comp_flush_send(Ecore_X_Window win) 
+EAPI void
+ecore_x_e_comp_flush_send(Ecore_X_Window win)
 {
    xcb_client_message_event_t ev;
 
@@ -246,13 +251,13 @@ ecore_x_e_comp_flush_send(Ecore_X_Window win)
    ev.data.data32[3] = 0;
    ev.data.data32[4] = 0;
 
-   xcb_send_event(_ecore_xcb_conn, 0, win, 
+   xcb_send_event(_ecore_xcb_conn, 0, win,
                   XCB_EVENT_MASK_NO_EVENT, (const char *)&ev);
 //   ecore_x_flush();
 }
 
-EAPI void 
-ecore_x_e_comp_dump_send(Ecore_X_Window win) 
+EAPI void
+ecore_x_e_comp_dump_send(Ecore_X_Window win)
 {
    xcb_client_message_event_t ev;
 
@@ -271,39 +276,44 @@ ecore_x_e_comp_dump_send(Ecore_X_Window win)
    ev.data.data32[3] = 0;
    ev.data.data32[4] = 0;
 
-   xcb_send_event(_ecore_xcb_conn, 0, win, 
+   xcb_send_event(_ecore_xcb_conn, 0, win,
                   XCB_EVENT_MASK_NO_EVENT, (const char *)&ev);
 //   ecore_x_flush();
 }
 
-EAPI void 
-ecore_x_e_comp_pixmap_set(Ecore_X_Window win, Ecore_X_Pixmap pixmap) 
+EAPI void
+ecore_x_e_comp_pixmap_set(Ecore_X_Window win,
+                          Ecore_X_Pixmap pixmap)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
 
    if (pixmap)
-     ecore_x_window_prop_xid_set(win, ECORE_X_ATOM_E_COMP_PIXMAP, 
+     ecore_x_window_prop_xid_set(win, ECORE_X_ATOM_E_COMP_PIXMAP,
                                  ECORE_X_ATOM_PIXMAP, &pixmap, 1);
    else
      ecore_x_window_prop_property_del(win, pixmap);
 }
 
-EAPI Ecore_X_Pixmap 
-ecore_x_e_comp_pixmap_get(Ecore_X_Window win) 
+EAPI Ecore_X_Pixmap
+ecore_x_e_comp_pixmap_get(Ecore_X_Window win)
 {
    Ecore_X_Pixmap pixmap = 0;
    int ret = 0;
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
 
-   ret = ecore_x_window_prop_xid_get(win, ECORE_X_ATOM_E_COMP_PIXMAP, 
+   ret = ecore_x_window_prop_xid_get(win, ECORE_X_ATOM_E_COMP_PIXMAP,
                                      ECORE_X_ATOM_PIXMAP, &pixmap, 1);
    if (ret != 1) return 0;
    return pixmap;
 }
 
-EAPI void 
-ecore_x_e_frame_size_set(Ecore_X_Window win, int fl, int fr, int ft, int fb) 
+EAPI void
+ecore_x_e_frame_size_set(Ecore_X_Window win,
+                         int            fl,
+                         int            fr,
+                         int            ft,
+                         int            fb)
 {
    uint32_t frames[4];
 
@@ -316,176 +326,187 @@ ecore_x_e_frame_size_set(Ecore_X_Window win, int fl, int fr, int ft, int fb)
    ecore_x_window_prop_card32_set(win, ECORE_X_ATOM_E_FRAME_SIZE, frames, 4);
 }
 
-EAPI Ecore_X_Virtual_Keyboard_State 
-ecore_x_e_virtual_keyboard_state_get(Ecore_X_Window win) 
+EAPI Ecore_X_Virtual_Keyboard_State
+ecore_x_e_virtual_keyboard_state_get(Ecore_X_Window win)
 {
    Ecore_X_Atom atom = 0;
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
 
-   if (!ecore_x_window_prop_atom_get(win, ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_STATE, 
+   if (!ecore_x_window_prop_atom_get(win, ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_STATE,
                                      &atom, 1))
      return ECORE_X_VIRTUAL_KEYBOARD_STATE_UNKNOWN;
 
    return _ecore_xcb_e_vkbd_state_get(atom);
 }
 
-EAPI void 
-ecore_x_e_virtual_keyboard_state_set(Ecore_X_Window win, Ecore_X_Virtual_Keyboard_State state) 
+EAPI void
+ecore_x_e_virtual_keyboard_state_set(Ecore_X_Window                 win,
+                                     Ecore_X_Virtual_Keyboard_State state)
 {
    Ecore_X_Atom atom = 0;
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
 
    atom = _ecore_xcb_e_vkbd_atom_get(state);
-   ecore_x_window_prop_atom_set(win, ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_STATE, 
+   ecore_x_window_prop_atom_set(win, ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_STATE,
                                 &atom, 1);
 }
 
-EAPI void 
-ecore_x_e_virtual_keyboard_state_send(Ecore_X_Window win, Ecore_X_Virtual_Keyboard_State state) 
+EAPI void
+ecore_x_e_virtual_keyboard_state_send(Ecore_X_Window                 win,
+                                      Ecore_X_Virtual_Keyboard_State state)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
 
-   ecore_x_client_message32_send(win, ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_STATE, 
-                                 ECORE_X_EVENT_MASK_WINDOW_CONFIGURE, 
-                                 _ecore_xcb_e_vkbd_atom_get(state), 
+   ecore_x_client_message32_send(win, ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_STATE,
+                                 ECORE_X_EVENT_MASK_WINDOW_CONFIGURE,
+                                 _ecore_xcb_e_vkbd_atom_get(state),
                                  0, 0, 0, 0);
 }
 
-EAPI void 
-ecore_x_e_virtual_keyboard_set(Ecore_X_Window win, unsigned int is_keyboard) 
+EAPI void
+ecore_x_e_virtual_keyboard_set(Ecore_X_Window win,
+                               unsigned int   is_keyboard)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
 
-   ecore_x_window_prop_card32_set(win, ECORE_X_ATOM_E_VIRTUAL_KEYBOARD, 
+   ecore_x_window_prop_card32_set(win, ECORE_X_ATOM_E_VIRTUAL_KEYBOARD,
                                   &is_keyboard, 1);
 }
 
-EAPI Eina_Bool 
-ecore_x_e_virtual_keyboard_get(Ecore_X_Window win) 
+EAPI Eina_Bool
+ecore_x_e_virtual_keyboard_get(Ecore_X_Window win)
 {
    unsigned int val = 0;
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
 
-   if (!ecore_x_window_prop_card32_get(win, ECORE_X_ATOM_E_VIRTUAL_KEYBOARD, 
+   if (!ecore_x_window_prop_card32_get(win, ECORE_X_ATOM_E_VIRTUAL_KEYBOARD,
                                        &val, 1))
      return EINA_FALSE;
 
    return val ? EINA_TRUE : EINA_FALSE;
 }
 
-EAPI int 
-ecore_x_e_illume_quickpanel_priority_major_get(Ecore_X_Window win) 
+EAPI int
+ecore_x_e_illume_quickpanel_priority_major_get(Ecore_X_Window win)
 {
    unsigned int val = 0;
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
 
-   if (!ecore_x_window_prop_card32_get(win, 
-                                       ECORE_X_ATOM_E_ILLUME_QUICKPANEL_PRIORITY_MAJOR, 
+   if (!ecore_x_window_prop_card32_get(win,
+                                       ECORE_X_ATOM_E_ILLUME_QUICKPANEL_PRIORITY_MAJOR,
                                        &val, 1))
      return 0;
 
    return val;
 }
 
-EAPI void 
-ecore_x_e_illume_quickpanel_priority_major_set(Ecore_X_Window win, unsigned int priority) 
+EAPI void
+ecore_x_e_illume_quickpanel_priority_major_set(Ecore_X_Window win,
+                                               unsigned int   priority)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
 
-   ecore_x_window_prop_card32_set(win, 
-                                  ECORE_X_ATOM_E_ILLUME_QUICKPANEL_PRIORITY_MAJOR, 
+   ecore_x_window_prop_card32_set(win,
+                                  ECORE_X_ATOM_E_ILLUME_QUICKPANEL_PRIORITY_MAJOR,
                                   &priority, 1);
 }
 
-EAPI int 
-ecore_x_e_illume_quickpanel_priority_minor_get(Ecore_X_Window win) 
+EAPI int
+ecore_x_e_illume_quickpanel_priority_minor_get(Ecore_X_Window win)
 {
    unsigned int val = 0;
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
 
-   if (!ecore_x_window_prop_card32_get(win, 
-                                       ECORE_X_ATOM_E_ILLUME_QUICKPANEL_PRIORITY_MINOR, 
+   if (!ecore_x_window_prop_card32_get(win,
+                                       ECORE_X_ATOM_E_ILLUME_QUICKPANEL_PRIORITY_MINOR,
                                        &val, 1))
      return 0;
 
    return val;
 }
 
-EAPI void 
-ecore_x_e_illume_quickpanel_priority_minor_set(Ecore_X_Window win, unsigned int priority) 
+EAPI void
+ecore_x_e_illume_quickpanel_priority_minor_set(Ecore_X_Window win,
+                                               unsigned int   priority)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
 
-   ecore_x_window_prop_card32_set(win, 
-                                  ECORE_X_ATOM_E_ILLUME_QUICKPANEL_PRIORITY_MINOR, 
+   ecore_x_window_prop_card32_set(win,
+                                  ECORE_X_ATOM_E_ILLUME_QUICKPANEL_PRIORITY_MINOR,
                                   &priority, 1);
 }
 
-EAPI void 
-ecore_x_e_illume_quickpanel_zone_set(Ecore_X_Window win, unsigned int zone) 
+EAPI void
+ecore_x_e_illume_quickpanel_zone_set(Ecore_X_Window win,
+                                     unsigned int   zone)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
 
-   ecore_x_window_prop_card32_set(win, ECORE_X_ATOM_E_ILLUME_QUICKPANEL_ZONE, 
+   ecore_x_window_prop_card32_set(win, ECORE_X_ATOM_E_ILLUME_QUICKPANEL_ZONE,
                                   &zone, 1);
 }
 
-EAPI int 
-ecore_x_e_illume_quickpanel_zone_get(Ecore_X_Window win) 
+EAPI int
+ecore_x_e_illume_quickpanel_zone_get(Ecore_X_Window win)
 {
    unsigned int val = 0;
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
 
-   if (!ecore_x_window_prop_card32_get(win, 
-                                       ECORE_X_ATOM_E_ILLUME_QUICKPANEL_ZONE, 
+   if (!ecore_x_window_prop_card32_get(win,
+                                       ECORE_X_ATOM_E_ILLUME_QUICKPANEL_ZONE,
                                        &val, 1))
      return 0;
 
    return val;
 }
 
-EAPI void 
-ecore_x_e_illume_quickpanel_position_update_send(Ecore_X_Window win) 
+EAPI void
+ecore_x_e_illume_quickpanel_position_update_send(Ecore_X_Window win)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
 
-   ecore_x_client_message32_send(win, 
-                                 ECORE_X_ATOM_E_ILLUME_QUICKPANEL_POSITION_UPDATE, 
-                                 ECORE_X_EVENT_MASK_WINDOW_CONFIGURE, 
+   ecore_x_client_message32_send(win,
+                                 ECORE_X_ATOM_E_ILLUME_QUICKPANEL_POSITION_UPDATE,
+                                 ECORE_X_EVENT_MASK_WINDOW_CONFIGURE,
                                  1, 0, 0, 0, 0);
 }
 
-EAPI Eina_Bool 
-ecore_x_e_illume_conformant_get(Ecore_X_Window win) 
+EAPI Eina_Bool
+ecore_x_e_illume_conformant_get(Ecore_X_Window win)
 {
    unsigned int val = 0;
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
 
-   if (!ecore_x_window_prop_card32_get(win, ECORE_X_ATOM_E_ILLUME_CONFORMANT, 
+   if (!ecore_x_window_prop_card32_get(win, ECORE_X_ATOM_E_ILLUME_CONFORMANT,
                                        &val, 1))
      return EINA_FALSE;
 
    return val ? EINA_TRUE : EINA_FALSE;
 }
 
-EAPI void 
-ecore_x_e_illume_conformant_set(Ecore_X_Window win, unsigned int is_conformant) 
+EAPI void
+ecore_x_e_illume_conformant_set(Ecore_X_Window win,
+                                unsigned int   is_conformant)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
 
-   ecore_x_window_prop_card32_set(win, ECORE_X_ATOM_E_ILLUME_CONFORMANT, 
+   ecore_x_window_prop_card32_set(win, ECORE_X_ATOM_E_ILLUME_CONFORMANT,
                                   &is_conformant, 1);
 }
 
-EAPI void 
-ecore_x_e_illume_softkey_geometry_set(Ecore_X_Window win, int x, int y, int w, int h) 
+EAPI void
+ecore_x_e_illume_softkey_geometry_set(Ecore_X_Window win,
+                                      int            x,
+                                      int            y,
+                                      int            w,
+                                      int            h)
 {
    unsigned int geom[4];
 
@@ -495,12 +516,16 @@ ecore_x_e_illume_softkey_geometry_set(Ecore_X_Window win, int x, int y, int w, i
    geom[1] = y;
    geom[2] = w;
    geom[3] = h;
-   ecore_x_window_prop_card32_set(win, ECORE_X_ATOM_E_ILLUME_SOFTKEY_GEOMETRY, 
+   ecore_x_window_prop_card32_set(win, ECORE_X_ATOM_E_ILLUME_SOFTKEY_GEOMETRY,
                                   geom, 4);
 }
 
-EAPI Eina_Bool 
-ecore_x_e_illume_softkey_geometry_get(Ecore_X_Window win, int *x, int *y, int *w, int *h) 
+EAPI Eina_Bool
+ecore_x_e_illume_softkey_geometry_get(Ecore_X_Window win,
+                                      int           *x,
+                                      int           *y,
+                                      int           *w,
+                                      int           *h)
 {
    unsigned int geom[4];
 
@@ -511,8 +536,8 @@ ecore_x_e_illume_softkey_geometry_get(Ecore_X_Window win, int *x, int *y, int *w
    if (w) *w = 0;
    if (h) *h = 0;
 
-   if (ecore_x_window_prop_card32_get(win, 
-                                      ECORE_X_ATOM_E_ILLUME_SOFTKEY_GEOMETRY, 
+   if (ecore_x_window_prop_card32_get(win,
+                                      ECORE_X_ATOM_E_ILLUME_SOFTKEY_GEOMETRY,
                                       geom, 4) != 4)
      return EINA_FALSE;
 
@@ -524,8 +549,12 @@ ecore_x_e_illume_softkey_geometry_get(Ecore_X_Window win, int *x, int *y, int *w
    return EINA_TRUE;
 }
 
-EAPI void 
-ecore_x_e_illume_indicator_geometry_set(Ecore_X_Window win, int x, int y, int w, int h) 
+EAPI void
+ecore_x_e_illume_indicator_geometry_set(Ecore_X_Window win,
+                                        int            x,
+                                        int            y,
+                                        int            w,
+                                        int            h)
 {
    unsigned int geom[4];
 
@@ -535,13 +564,17 @@ ecore_x_e_illume_indicator_geometry_set(Ecore_X_Window win, int x, int y, int w,
    geom[1] = y;
    geom[2] = w;
    geom[3] = h;
-   ecore_x_window_prop_card32_set(win, 
-                                  ECORE_X_ATOM_E_ILLUME_INDICATOR_GEOMETRY, 
+   ecore_x_window_prop_card32_set(win,
+                                  ECORE_X_ATOM_E_ILLUME_INDICATOR_GEOMETRY,
                                   geom, 4);
 }
 
-EAPI Eina_Bool 
-ecore_x_e_illume_indicator_geometry_get(Ecore_X_Window win, int *x, int *y, int *w, int *h) 
+EAPI Eina_Bool
+ecore_x_e_illume_indicator_geometry_get(Ecore_X_Window win,
+                                        int           *x,
+                                        int           *y,
+                                        int           *w,
+                                        int           *h)
 {
    unsigned int geom[4];
 
@@ -552,8 +585,8 @@ ecore_x_e_illume_indicator_geometry_get(Ecore_X_Window win, int *x, int *y, int
    if (w) *w = 0;
    if (h) *h = 0;
 
-   if (ecore_x_window_prop_card32_get(win, 
-                                      ECORE_X_ATOM_E_ILLUME_INDICATOR_GEOMETRY, 
+   if (ecore_x_window_prop_card32_get(win,
+                                      ECORE_X_ATOM_E_ILLUME_INDICATOR_GEOMETRY,
                                       geom, 4) != 4)
      return EINA_FALSE;
 
@@ -565,8 +598,12 @@ ecore_x_e_illume_indicator_geometry_get(Ecore_X_Window win, int *x, int *y, int
    return EINA_TRUE;
 }
 
-EAPI void 
-ecore_x_e_illume_keyboard_geometry_set(Ecore_X_Window win, int x, int y, int w, int h) 
+EAPI void
+ecore_x_e_illume_keyboard_geometry_set(Ecore_X_Window win,
+                                       int            x,
+                                       int            y,
+                                       int            w,
+                                       int            h)
 {
    unsigned int geom[4];
 
@@ -576,12 +613,16 @@ ecore_x_e_illume_keyboard_geometry_set(Ecore_X_Window win, int x, int y, int w,
    geom[1] = y;
    geom[2] = w;
    geom[3] = h;
-   ecore_x_window_prop_card32_set(win, ECORE_X_ATOM_E_ILLUME_KEYBOARD_GEOMETRY, 
+   ecore_x_window_prop_card32_set(win, ECORE_X_ATOM_E_ILLUME_KEYBOARD_GEOMETRY,
                                   geom, 4);
 }
 
-EAPI Eina_Bool 
-ecore_x_e_illume_keyboard_geometry_get(Ecore_X_Window win, int *x, int *y, int *w, int *h) 
+EAPI Eina_Bool
+ecore_x_e_illume_keyboard_geometry_get(Ecore_X_Window win,
+                                       int           *x,
+                                       int           *y,
+                                       int           *w,
+                                       int           *h)
 {
    unsigned int geom[4];
 
@@ -592,8 +633,8 @@ ecore_x_e_illume_keyboard_geometry_get(Ecore_X_Window win, int *x, int *y, int *
    if (w) *w = 0;
    if (h) *h = 0;
 
-   if (ecore_x_window_prop_card32_get(win, 
-                                      ECORE_X_ATOM_E_ILLUME_KEYBOARD_GEOMETRY, 
+   if (ecore_x_window_prop_card32_get(win,
+                                      ECORE_X_ATOM_E_ILLUME_KEYBOARD_GEOMETRY,
                                       geom, 4) != 4)
      return EINA_FALSE;
 
@@ -605,78 +646,82 @@ ecore_x_e_illume_keyboard_geometry_get(Ecore_X_Window win, int *x, int *y, int *
    return EINA_TRUE;
 }
 
-EAPI void 
-ecore_x_e_illume_quickpanel_set(Ecore_X_Window win, unsigned int is_quickpanel) 
+EAPI void
+ecore_x_e_illume_quickpanel_set(Ecore_X_Window win,
+                                unsigned int   is_quickpanel)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
 
-   ecore_x_window_prop_card32_set(win, ECORE_X_ATOM_E_ILLUME_QUICKPANEL, 
+   ecore_x_window_prop_card32_set(win, ECORE_X_ATOM_E_ILLUME_QUICKPANEL,
                                   &is_quickpanel, 1);
 }
 
-EAPI Eina_Bool 
-ecore_x_e_illume_quickpanel_get(Ecore_X_Window win) 
+EAPI Eina_Bool
+ecore_x_e_illume_quickpanel_get(Ecore_X_Window win)
 {
    unsigned int val = 0;
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
 
-   if (!ecore_x_window_prop_card32_get(win, ECORE_X_ATOM_E_ILLUME_QUICKPANEL, 
+   if (!ecore_x_window_prop_card32_get(win, ECORE_X_ATOM_E_ILLUME_QUICKPANEL,
                                        &val, 1))
      return EINA_FALSE;
 
    return val ? EINA_TRUE : EINA_FALSE;
 }
 
-EAPI void 
-ecore_x_e_illume_quickpanel_state_set(Ecore_X_Window win, Ecore_X_Illume_Quickpanel_State state) 
+EAPI void
+ecore_x_e_illume_quickpanel_state_set(Ecore_X_Window                  win,
+                                      Ecore_X_Illume_Quickpanel_State state)
 {
    Ecore_X_Atom atom = 0;
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
 
    atom = _ecore_xcb_e_quickpanel_atom_get(state);
-   ecore_x_window_prop_atom_set(win, ECORE_X_ATOM_E_ILLUME_QUICKPANEL_STATE, 
+   ecore_x_window_prop_atom_set(win, ECORE_X_ATOM_E_ILLUME_QUICKPANEL_STATE,
                                 &atom, 1);
 }
 
-EAPI Ecore_X_Illume_Quickpanel_State 
-ecore_x_e_illume_quickpanel_state_get(Ecore_X_Window win) 
+EAPI Ecore_X_Illume_Quickpanel_State
+ecore_x_e_illume_quickpanel_state_get(Ecore_X_Window win)
 {
    Ecore_X_Atom atom = 0;
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
 
-   if (!ecore_x_window_prop_atom_get(win, 
-                                     ECORE_X_ATOM_E_ILLUME_QUICKPANEL_STATE, 
+   if (!ecore_x_window_prop_atom_get(win,
+                                     ECORE_X_ATOM_E_ILLUME_QUICKPANEL_STATE,
                                      &atom, 1))
      return ECORE_X_ILLUME_QUICKPANEL_STATE_UNKNOWN;
 
    return _ecore_xcb_e_quickpanel_state_get(atom);
 }
 
-EAPI void 
-ecore_x_e_illume_quickpanel_state_send(Ecore_X_Window win, Ecore_X_Illume_Quickpanel_State state) 
+EAPI void
+ecore_x_e_illume_quickpanel_state_send(Ecore_X_Window                  win,
+                                       Ecore_X_Illume_Quickpanel_State state)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
-   ecore_x_client_message32_send(win, ECORE_X_ATOM_E_ILLUME_QUICKPANEL_STATE, 
-                                 ECORE_X_EVENT_MASK_WINDOW_CONFIGURE, 
-                                 _ecore_xcb_e_quickpanel_atom_get(state), 
+   ecore_x_client_message32_send(win, ECORE_X_ATOM_E_ILLUME_QUICKPANEL_STATE,
+                                 ECORE_X_EVENT_MASK_WINDOW_CONFIGURE,
+                                 _ecore_xcb_e_quickpanel_atom_get(state),
                                  0, 0, 0, 0);
 }
 
-EAPI void 
-ecore_x_e_illume_quickpanel_state_toggle(Ecore_X_Window win) 
+EAPI void
+ecore_x_e_illume_quickpanel_state_toggle(Ecore_X_Window win)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
-   ecore_x_client_message32_send(win, 
-                                 ECORE_X_ATOM_E_ILLUME_QUICKPANEL_STATE_TOGGLE, 
-                                 ECORE_X_EVENT_MASK_WINDOW_CONFIGURE, 
+   ecore_x_client_message32_send(win,
+                                 ECORE_X_ATOM_E_ILLUME_QUICKPANEL_STATE_TOGGLE,
+                                 ECORE_X_EVENT_MASK_WINDOW_CONFIGURE,
                                  0, 0, 0, 0, 0);
 }
 
-EAPI void 
-ecore_x_e_illume_mode_set(Ecore_X_Window win, Ecore_X_Illume_Mode mode) 
+EAPI void
+ecore_x_e_illume_mode_set(Ecore_X_Window      win,
+                          Ecore_X_Illume_Mode mode)
 {
    Ecore_X_Atom atom = 0;
 
@@ -686,8 +731,8 @@ ecore_x_e_illume_mode_set(Ecore_X_Window win, Ecore_X_Illume_Mode mode)
    ecore_x_window_prop_atom_set(win, ECORE_X_ATOM_E_ILLUME_MODE, &atom, 1);
 }
 
-EAPI Ecore_X_Illume_Mode 
-ecore_x_e_illume_mode_get(Ecore_X_Window win) 
+EAPI Ecore_X_Illume_Mode
+ecore_x_e_illume_mode_get(Ecore_X_Window win)
 {
    Ecore_X_Atom atom = 0;
 
@@ -699,110 +744,113 @@ ecore_x_e_illume_mode_get(Ecore_X_Window win)
    return _ecore_xcb_e_illume_mode_get(atom);
 }
 
-EAPI void 
-ecore_x_e_illume_mode_send(Ecore_X_Window win, Ecore_X_Illume_Mode mode) 
+EAPI void
+ecore_x_e_illume_mode_send(Ecore_X_Window      win,
+                           Ecore_X_Illume_Mode mode)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
 
-   ecore_x_client_message32_send(win, ECORE_X_ATOM_E_ILLUME_MODE, 
-                                 ECORE_X_EVENT_MASK_WINDOW_CONFIGURE, 
-                                 _ecore_xcb_e_illume_atom_get(mode), 
+   ecore_x_client_message32_send(win, ECORE_X_ATOM_E_ILLUME_MODE,
+                                 ECORE_X_EVENT_MASK_WINDOW_CONFIGURE,
+                                 _ecore_xcb_e_illume_atom_get(mode),
                                  0, 0, 0, 0);
 }
 
-EAPI void 
-ecore_x_e_illume_focus_back_send(Ecore_X_Window win) 
+EAPI void
+ecore_x_e_illume_focus_back_send(Ecore_X_Window win)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
 
-   ecore_x_client_message32_send(win, ECORE_X_ATOM_E_ILLUME_FOCUS_BACK, 
-                                 ECORE_X_EVENT_MASK_WINDOW_CONFIGURE, 
+   ecore_x_client_message32_send(win, ECORE_X_ATOM_E_ILLUME_FOCUS_BACK,
+                                 ECORE_X_EVENT_MASK_WINDOW_CONFIGURE,
                                  1, 0, 0, 0, 0);
 }
 
-EAPI void 
-ecore_x_e_illume_focus_forward_send(Ecore_X_Window win) 
+EAPI void
+ecore_x_e_illume_focus_forward_send(Ecore_X_Window win)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
 
-   ecore_x_client_message32_send(win, ECORE_X_ATOM_E_ILLUME_FOCUS_FORWARD, 
-                                 ECORE_X_EVENT_MASK_WINDOW_CONFIGURE, 
+   ecore_x_client_message32_send(win, ECORE_X_ATOM_E_ILLUME_FOCUS_FORWARD,
+                                 ECORE_X_EVENT_MASK_WINDOW_CONFIGURE,
                                  1, 0, 0, 0, 0);
 }
 
-EAPI void 
-ecore_x_e_illume_focus_home_send(Ecore_X_Window win) 
+EAPI void
+ecore_x_e_illume_focus_home_send(Ecore_X_Window win)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
 
-   ecore_x_client_message32_send(win, ECORE_X_ATOM_E_ILLUME_FOCUS_HOME, 
-                                 ECORE_X_EVENT_MASK_WINDOW_CONFIGURE, 
+   ecore_x_client_message32_send(win, ECORE_X_ATOM_E_ILLUME_FOCUS_HOME,
+                                 ECORE_X_EVENT_MASK_WINDOW_CONFIGURE,
                                  1, 0, 0, 0, 0);
 }
 
-EAPI void 
-ecore_x_e_illume_close_send(Ecore_X_Window win) 
+EAPI void
+ecore_x_e_illume_close_send(Ecore_X_Window win)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
 
-   ecore_x_client_message32_send(win, ECORE_X_ATOM_E_ILLUME_CLOSE, 
-                                 ECORE_X_EVENT_MASK_WINDOW_CONFIGURE, 
+   ecore_x_client_message32_send(win, ECORE_X_ATOM_E_ILLUME_CLOSE,
+                                 ECORE_X_EVENT_MASK_WINDOW_CONFIGURE,
                                  1, 0, 0, 0, 0);
 }
 
-EAPI void 
-ecore_x_e_illume_home_new_send(Ecore_X_Window win) 
+EAPI void
+ecore_x_e_illume_home_new_send(Ecore_X_Window win)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
 
-   ecore_x_client_message32_send(win, ECORE_X_ATOM_E_ILLUME_HOME_NEW, 
-                                 ECORE_X_EVENT_MASK_WINDOW_CONFIGURE, 
+   ecore_x_client_message32_send(win, ECORE_X_ATOM_E_ILLUME_HOME_NEW,
+                                 ECORE_X_EVENT_MASK_WINDOW_CONFIGURE,
                                  1, 0, 0, 0, 0);
 }
 
-EAPI void 
-ecore_x_e_illume_home_del_send(Ecore_X_Window win) 
+EAPI void
+ecore_x_e_illume_home_del_send(Ecore_X_Window win)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
 
-   ecore_x_client_message32_send(win, ECORE_X_ATOM_E_ILLUME_HOME_DEL, 
-                                 ECORE_X_EVENT_MASK_WINDOW_CONFIGURE, 
+   ecore_x_client_message32_send(win, ECORE_X_ATOM_E_ILLUME_HOME_DEL,
+                                 ECORE_X_EVENT_MASK_WINDOW_CONFIGURE,
                                  1, 0, 0, 0, 0);
 }
 
-EAPI void 
-ecore_x_e_illume_drag_set(Ecore_X_Window win, unsigned int drag) 
+EAPI void
+ecore_x_e_illume_drag_set(Ecore_X_Window win,
+                          unsigned int   drag)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
 
    ecore_x_window_prop_card32_set(win, ECORE_X_ATOM_E_ILLUME_DRAG, &drag, 1);
 }
 
-EAPI void 
-ecore_x_e_illume_drag_locked_set(Ecore_X_Window win, unsigned int is_locked) 
+EAPI void
+ecore_x_e_illume_drag_locked_set(Ecore_X_Window win,
+                                 unsigned int   is_locked)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
 
-   ecore_x_window_prop_card32_set(win, ECORE_X_ATOM_E_ILLUME_DRAG_LOCKED, 
+   ecore_x_window_prop_card32_set(win, ECORE_X_ATOM_E_ILLUME_DRAG_LOCKED,
                                   &is_locked, 1);
 }
 
-EAPI Eina_Bool 
-ecore_x_e_illume_drag_locked_get(Ecore_X_Window win) 
+EAPI Eina_Bool
+ecore_x_e_illume_drag_locked_get(Ecore_X_Window win)
 {
    unsigned int val = 0;
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
 
-   if (!ecore_x_window_prop_card32_get(win, ECORE_X_ATOM_E_ILLUME_DRAG_LOCKED, 
+   if (!ecore_x_window_prop_card32_get(win, ECORE_X_ATOM_E_ILLUME_DRAG_LOCKED,
                                        &val, 1))
      return EINA_FALSE;
 
    return val ? EINA_TRUE : EINA_FALSE;
 }
 
-EAPI Eina_Bool 
-ecore_x_e_illume_drag_get(Ecore_X_Window win) 
+EAPI Eina_Bool
+ecore_x_e_illume_drag_get(Ecore_X_Window win)
 {
    unsigned int val = 0;
 
@@ -814,52 +862,55 @@ ecore_x_e_illume_drag_get(Ecore_X_Window win)
    return val ? EINA_TRUE : EINA_FALSE;
 }
 
-EAPI void 
-ecore_x_e_illume_drag_start_send(Ecore_X_Window win) 
+EAPI void
+ecore_x_e_illume_drag_start_send(Ecore_X_Window win)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
-   ecore_x_client_message32_send(win, ECORE_X_ATOM_E_ILLUME_DRAG_START, 
-                                 ECORE_X_EVENT_MASK_WINDOW_CONFIGURE, 
+   ecore_x_client_message32_send(win, ECORE_X_ATOM_E_ILLUME_DRAG_START,
+                                 ECORE_X_EVENT_MASK_WINDOW_CONFIGURE,
                                  1, 0, 0, 0, 0);
 }
 
-EAPI void 
-ecore_x_e_illume_drag_end_send(Ecore_X_Window win) 
+EAPI void
+ecore_x_e_illume_drag_end_send(Ecore_X_Window win)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
-   ecore_x_client_message32_send(win, ECORE_X_ATOM_E_ILLUME_DRAG_END, 
-                                 ECORE_X_EVENT_MASK_WINDOW_CONFIGURE, 
+   ecore_x_client_message32_send(win, ECORE_X_ATOM_E_ILLUME_DRAG_END,
+                                 ECORE_X_EVENT_MASK_WINDOW_CONFIGURE,
                                  1, 0, 0, 0, 0);
 }
 
-EAPI void 
-ecore_x_e_illume_zone_set(Ecore_X_Window win, Ecore_X_Window zone) 
+EAPI void
+ecore_x_e_illume_zone_set(Ecore_X_Window win,
+                          Ecore_X_Window zone)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
 
    ecore_x_window_prop_window_set(win, ECORE_X_ATOM_E_ILLUME_ZONE, &zone, 1);
 }
 
-EAPI Ecore_X_Window 
-ecore_x_e_illume_zone_get(Ecore_X_Window win) 
+EAPI Ecore_X_Window
+ecore_x_e_illume_zone_get(Ecore_X_Window win)
 {
    Ecore_X_Window zone;
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
 
-   if (!ecore_x_window_prop_window_get(win, ECORE_X_ATOM_E_ILLUME_ZONE, 
+   if (!ecore_x_window_prop_window_get(win, ECORE_X_ATOM_E_ILLUME_ZONE,
                                        &zone, 1))
      return 0;
 
    return zone;
 }
 
-EAPI void 
-ecore_x_e_illume_zone_list_set(Ecore_X_Window win, Ecore_X_Window *zones, unsigned int num) 
+EAPI void
+ecore_x_e_illume_zone_list_set(Ecore_X_Window  win,
+                               Ecore_X_Window *zones,
+                               unsigned int    num)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
 
-   ecore_x_window_prop_window_set(win, ECORE_X_ATOM_E_ILLUME_ZONE_LIST, 
+   ecore_x_window_prop_window_set(win, ECORE_X_ATOM_E_ILLUME_ZONE_LIST,
                                   zones, num);
 }
 
@@ -871,35 +922,50 @@ _ecore_xcb_e_vkbd_atom_get(Ecore_X_Virtual_Keyboard_State state)
      {
       case ECORE_X_VIRTUAL_KEYBOARD_STATE_OFF:
         return ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_OFF;
+
       case ECORE_X_VIRTUAL_KEYBOARD_STATE_ON:
         return ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_ON;
+
       case ECORE_X_VIRTUAL_KEYBOARD_STATE_ALPHA:
         return ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_ALPHA;
+
       case ECORE_X_VIRTUAL_KEYBOARD_STATE_NUMERIC:
         return ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_NUMERIC;
+
       case ECORE_X_VIRTUAL_KEYBOARD_STATE_PIN:
         return ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_PIN;
+
       case ECORE_X_VIRTUAL_KEYBOARD_STATE_PHONE_NUMBER:
         return ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_PHONE_NUMBER;
+
       case ECORE_X_VIRTUAL_KEYBOARD_STATE_HEX:
         return ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_HEX;
+
       case ECORE_X_VIRTUAL_KEYBOARD_STATE_TERMINAL:
         return ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_TERMINAL;
+
       case ECORE_X_VIRTUAL_KEYBOARD_STATE_PASSWORD:
         return ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_PASSWORD;
+
       case ECORE_X_VIRTUAL_KEYBOARD_STATE_IP:
         return ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_IP;
+
       case ECORE_X_VIRTUAL_KEYBOARD_STATE_HOST:
         return ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_HOST;
+
       case ECORE_X_VIRTUAL_KEYBOARD_STATE_FILE:
         return ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_FILE;
+
       case ECORE_X_VIRTUAL_KEYBOARD_STATE_URL:
         return ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_URL;
+
       case ECORE_X_VIRTUAL_KEYBOARD_STATE_KEYPAD:
         return ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_KEYPAD;
+
       case ECORE_X_VIRTUAL_KEYBOARD_STATE_J2ME:
         return ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_J2ME;
-      default: 
+
+      default:
         break;
      }
    return 0;
@@ -949,8 +1015,10 @@ _ecore_xcb_e_quickpanel_atom_get(Ecore_X_Illume_Quickpanel_State state)
      {
       case ECORE_X_ILLUME_QUICKPANEL_STATE_ON:
         return ECORE_X_ATOM_E_ILLUME_QUICKPANEL_ON;
+
       case ECORE_X_ILLUME_QUICKPANEL_STATE_OFF:
         return ECORE_X_ATOM_E_ILLUME_QUICKPANEL_OFF;
+
       default:
         break;
      }
@@ -975,10 +1043,13 @@ _ecore_xcb_e_illume_atom_get(Ecore_X_Illume_Mode mode)
      {
       case ECORE_X_ILLUME_MODE_SINGLE:
         return ECORE_X_ATOM_E_ILLUME_MODE_SINGLE;
+
       case ECORE_X_ILLUME_MODE_DUAL_TOP:
         return ECORE_X_ATOM_E_ILLUME_MODE_DUAL_TOP;
+
       case ECORE_X_ILLUME_MODE_DUAL_LEFT:
         return ECORE_X_ATOM_E_ILLUME_MODE_DUAL_LEFT;
+
       default:
         break;
      }
@@ -997,3 +1068,4 @@ _ecore_xcb_e_illume_mode_get(Ecore_X_Atom atom)
 
    return ECORE_X_ILLUME_MODE_UNKNOWN;
 }
+
index 0afd8b2..bbd9c2a 100644 (file)
@@ -16,8 +16,9 @@ static int _error_code = 0;
  *
  * Set the X error handler function
  */
-EAPI void 
-ecore_x_error_handler_set(void (*func)(void *data), const void *data) 
+EAPI void
+ecore_x_error_handler_set(void        (*func)(void *data),
+                          const void *data)
 {
    _error_func = func;
    _error_data = (void *)data;
@@ -30,8 +31,9 @@ ecore_x_error_handler_set(void (*func)(void *data), const void *data)
  *
  * Set the X I/O error handler function
  */
-EAPI void 
-ecore_x_io_error_handler_set(void (*func)(void *data), const void *data) 
+EAPI void
+ecore_x_io_error_handler_set(void        (*func)(void *data),
+                             const void *data)
 {
    _io_error_func = func;
    _io_error_data = (void *)data;
@@ -43,8 +45,8 @@ ecore_x_io_error_handler_set(void (*func)(void *data), const void *data)
  *
  * Return the X request code that caused the last X error
  */
-EAPI int 
-ecore_x_error_request_get(void) 
+EAPI int
+ecore_x_error_request_get(void)
 {
    return _error_request_code;
 }
@@ -55,14 +57,14 @@ ecore_x_error_request_get(void)
  *
  * Return the error code from the last X error
  */
-EAPI int 
-ecore_x_error_code_get(void) 
+EAPI int
+ecore_x_error_code_get(void)
 {
    return _error_code;
 }
 
-int 
-_ecore_xcb_error_handle(xcb_generic_error_t *err) 
+int
+_ecore_xcb_error_handle(xcb_generic_error_t *err)
 {
    WRN("Got Error:");
    WRN("\tEvent: %s", xcb_event_get_request_label(err->major_code));
@@ -71,12 +73,12 @@ _ecore_xcb_error_handle(xcb_generic_error_t *err)
 #ifdef OLD_XCB_VERSION
    if (err->error_code == XCB_EVENT_ERROR_BAD_VALUE)
      WRN("\tBad Value: %d", ((xcb_value_error_t *)err)->bad_value);
-   else if (err->error_code == XCB_EVENT_ERROR_BAD_WINDOW) 
+   else if (err->error_code == XCB_EVENT_ERROR_BAD_WINDOW)
      WRN("\tBad Window: %d", ((xcb_window_error_t *)err)->bad_value);
 #else
    if (err->error_code == XCB_VALUE)
      WRN("\tBad Value: %d", ((xcb_value_error_t *)err)->bad_value);
-   else if (err->error_code == XCB_WINDOW) 
+   else if (err->error_code == XCB_WINDOW)
      WRN("\tBad Window: %d", ((xcb_window_error_t *)err)->bad_value);
 #endif
 
@@ -88,11 +90,11 @@ _ecore_xcb_error_handle(xcb_generic_error_t *err)
    return 0;
 }
 
-int 
-_ecore_xcb_io_error_handle(xcb_generic_error_t *err) 
+int
+_ecore_xcb_io_error_handle(xcb_generic_error_t *err)
 {
    CRIT("IO Error:");
-   if (err) 
+   if (err)
      {
         CRIT("\tRequest: %d", err->sequence);
         CRIT("\tCode: %d", err->error_code);
@@ -104,3 +106,4 @@ _ecore_xcb_io_error_handle(xcb_generic_error_t *err)
 
    return 0;
 }
+
index 819be1b..b1edca1 100644 (file)
 # define CODESET "INVALID"
 #endif
 
-typedef struct _Ecore_X_Mouse_Down_Info 
+typedef struct _Ecore_X_Mouse_Down_Info
 {
    EINA_INLIST;
-   int dev;
-   Ecore_X_Time last_time;
-   Ecore_X_Time last_last_time;
+   int            dev;
+   Ecore_X_Time   last_time;
+   Ecore_X_Time   last_last_time;
    Ecore_X_Window last_win;
    Ecore_X_Window last_last_win;
    Ecore_X_Window last_event_win;
    Ecore_X_Window last_last_event_win;
-   Eina_Bool did_double : 1;
-   Eina_Bool did_triple : 1;
+   Eina_Bool      did_double : 1;
+   Eina_Bool      did_triple : 1;
 } Ecore_X_Mouse_Down_Info;
 
 /* local function prototypes */
-static void _ecore_xcb_event_handle_any_event(xcb_generic_event_t *event);
-static void _ecore_xcb_event_handle_key_press(xcb_generic_event_t *event);
-static void _ecore_xcb_event_handle_key_release(xcb_generic_event_t *event);
-static void _ecore_xcb_event_handle_button_press(xcb_generic_event_t *event);
-static void _ecore_xcb_event_handle_button_release(xcb_generic_event_t *event);
-static void _ecore_xcb_event_handle_motion_notify(xcb_generic_event_t *event);
-static void _ecore_xcb_event_handle_enter_notify(xcb_generic_event_t *event);
-static void _ecore_xcb_event_handle_leave_notify(xcb_generic_event_t *event);
-static void _ecore_xcb_event_handle_keymap_notify(xcb_generic_event_t *event);
-static void _ecore_xcb_event_handle_focus_in(xcb_generic_event_t *event);
-static void _ecore_xcb_event_handle_focus_out(xcb_generic_event_t *event);
-static void _ecore_xcb_event_handle_expose(xcb_generic_event_t *event);
-static void _ecore_xcb_event_handle_graphics_exposure(xcb_generic_event_t *event);
-static void _ecore_xcb_event_handle_visibility_notify(xcb_generic_event_t *event);
-static void _ecore_xcb_event_handle_create_notify(xcb_generic_event_t *event);
-static void _ecore_xcb_event_handle_destroy_notify(xcb_generic_event_t *event);
-static void _ecore_xcb_event_handle_map_notify(xcb_generic_event_t *event);
-static void _ecore_xcb_event_handle_unmap_notify(xcb_generic_event_t *event);
-static void _ecore_xcb_event_handle_map_request(xcb_generic_event_t *event);
-static void _ecore_xcb_event_handle_reparent_notify(xcb_generic_event_t *event);
-static void _ecore_xcb_event_handle_configure_notify(xcb_generic_event_t *event);
-static void _ecore_xcb_event_handle_configure_request(xcb_generic_event_t *event);
-static void _ecore_xcb_event_handle_gravity_notify(xcb_generic_event_t *event);
-static void _ecore_xcb_event_handle_resize_request(xcb_generic_event_t *event);
-static void _ecore_xcb_event_handle_circulate_notify(xcb_generic_event_t *event);
-static void _ecore_xcb_event_handle_circulate_request(xcb_generic_event_t *event);
-static void _ecore_xcb_event_handle_property_notify(xcb_generic_event_t *event);
-static void _ecore_xcb_event_handle_selection_clear(xcb_generic_event_t *event);
-static void _ecore_xcb_event_handle_selection_request(xcb_generic_event_t *event);
-static void _ecore_xcb_event_handle_selection_notify(xcb_generic_event_t *event);
-static void _ecore_xcb_event_handle_colormap_notify(xcb_generic_event_t *event);
-static void _ecore_xcb_event_handle_client_message(xcb_generic_event_t *event);
-static void _ecore_xcb_event_handle_mapping_notify(xcb_generic_event_t *event);
-static void _ecore_xcb_event_handle_damage_notify(xcb_generic_event_t *event);
-static void _ecore_xcb_event_handle_randr_change(xcb_generic_event_t *event);
-static void _ecore_xcb_event_handle_randr_notify(xcb_generic_event_t *event);
-static void _ecore_xcb_event_handle_randr_crtc_change(xcb_generic_event_t *event);
-static void _ecore_xcb_event_handle_randr_output_change(xcb_generic_event_t *event);
-static void _ecore_xcb_event_handle_randr_output_property_change(xcb_generic_event_t *event);
-static void _ecore_xcb_event_handle_screensaver_notify(xcb_generic_event_t *event);
+static void                     _ecore_xcb_event_handle_any_event(xcb_generic_event_t *event);
+static void                     _ecore_xcb_event_handle_key_press(xcb_generic_event_t *event);
+static void                     _ecore_xcb_event_handle_key_release(xcb_generic_event_t *event);
+static void                     _ecore_xcb_event_handle_button_press(xcb_generic_event_t *event);
+static void                     _ecore_xcb_event_handle_button_release(xcb_generic_event_t *event);
+static void                     _ecore_xcb_event_handle_motion_notify(xcb_generic_event_t *event);
+static void                     _ecore_xcb_event_handle_enter_notify(xcb_generic_event_t *event);
+static void                     _ecore_xcb_event_handle_leave_notify(xcb_generic_event_t *event);
+static void                     _ecore_xcb_event_handle_keymap_notify(xcb_generic_event_t *event);
+static void                     _ecore_xcb_event_handle_focus_in(xcb_generic_event_t *event);
+static void                     _ecore_xcb_event_handle_focus_out(xcb_generic_event_t *event);
+static void                     _ecore_xcb_event_handle_expose(xcb_generic_event_t *event);
+static void                     _ecore_xcb_event_handle_graphics_exposure(xcb_generic_event_t *event);
+static void                     _ecore_xcb_event_handle_visibility_notify(xcb_generic_event_t *event);
+static void                     _ecore_xcb_event_handle_create_notify(xcb_generic_event_t *event);
+static void                     _ecore_xcb_event_handle_destroy_notify(xcb_generic_event_t *event);
+static void                     _ecore_xcb_event_handle_map_notify(xcb_generic_event_t *event);
+static void                     _ecore_xcb_event_handle_unmap_notify(xcb_generic_event_t *event);
+static void                     _ecore_xcb_event_handle_map_request(xcb_generic_event_t *event);
+static void                     _ecore_xcb_event_handle_reparent_notify(xcb_generic_event_t *event);
+static void                     _ecore_xcb_event_handle_configure_notify(xcb_generic_event_t *event);
+static void                     _ecore_xcb_event_handle_configure_request(xcb_generic_event_t *event);
+static void                     _ecore_xcb_event_handle_gravity_notify(xcb_generic_event_t *event);
+static void                     _ecore_xcb_event_handle_resize_request(xcb_generic_event_t *event);
+static void                     _ecore_xcb_event_handle_circulate_notify(xcb_generic_event_t *event);
+static void                     _ecore_xcb_event_handle_circulate_request(xcb_generic_event_t *event);
+static void                     _ecore_xcb_event_handle_property_notify(xcb_generic_event_t *event);
+static void                     _ecore_xcb_event_handle_selection_clear(xcb_generic_event_t *event);
+static void                     _ecore_xcb_event_handle_selection_request(xcb_generic_event_t *event);
+static void                     _ecore_xcb_event_handle_selection_notify(xcb_generic_event_t *event);
+static void                     _ecore_xcb_event_handle_colormap_notify(xcb_generic_event_t *event);
+static void                     _ecore_xcb_event_handle_client_message(xcb_generic_event_t *event);
+static void                     _ecore_xcb_event_handle_mapping_notify(xcb_generic_event_t *event);
+static void                     _ecore_xcb_event_handle_damage_notify(xcb_generic_event_t *event);
+static void                     _ecore_xcb_event_handle_randr_change(xcb_generic_event_t *event);
+static void                     _ecore_xcb_event_handle_randr_notify(xcb_generic_event_t *event);
+static void                     _ecore_xcb_event_handle_randr_crtc_change(xcb_generic_event_t *event);
+static void                     _ecore_xcb_event_handle_randr_output_change(xcb_generic_event_t *event);
+static void                     _ecore_xcb_event_handle_randr_output_property_change(xcb_generic_event_t *event);
+static void                     _ecore_xcb_event_handle_screensaver_notify(xcb_generic_event_t *event);
 #ifdef ECORE_XCB_SHAPE
-static void _ecore_xcb_event_handle_shape_change(xcb_generic_event_t *event);
+static void                     _ecore_xcb_event_handle_shape_change(xcb_generic_event_t *event);
 #endif
-static void _ecore_xcb_event_handle_sync_counter(xcb_generic_event_t *event);
-static void _ecore_xcb_event_handle_sync_alarm(xcb_generic_event_t *event);
-static void _ecore_xcb_event_handle_xfixes_selection_notify(xcb_generic_event_t *event __UNUSED__);
-static void _ecore_xcb_event_handle_xfixes_cursor_notify(xcb_generic_event_t *event);
-static void _ecore_xcb_event_handle_generic_event(xcb_generic_event_t *event);
-static void _ecore_xcb_event_handle_input_event(xcb_generic_event_t *event);
-
-static void _ecore_xcb_event_key_press(xcb_generic_event_t *event);
-static void _ecore_xcb_event_key_release(xcb_generic_event_t *event);
-static void _ecore_xcb_event_mouse_move_free(void *data __UNUSED__, void *event);
-static Ecore_X_Event_Mode _ecore_xcb_event_mode_get(uint8_t mode);
-static Ecore_X_Event_Detail _ecore_xcb_event_detail_get(uint8_t detail);
-static void _ecore_xcb_event_xdnd_enter_free(void *data __UNUSED__, void *event);
-static void _ecore_xcb_event_selection_notify_free(void *data __UNUSED__, void *event);
-static void _ecore_xcb_event_generic_event_free(void *data, void *event);
-static void _ecore_xcb_event_mouse_down_info_clear(void);
+static void                     _ecore_xcb_event_handle_sync_counter(xcb_generic_event_t *event);
+static void                     _ecore_xcb_event_handle_sync_alarm(xcb_generic_event_t *event);
+static void                     _ecore_xcb_event_handle_xfixes_selection_notify(xcb_generic_event_t *event __UNUSED__);
+static void                     _ecore_xcb_event_handle_xfixes_cursor_notify(xcb_generic_event_t *event);
+static void                     _ecore_xcb_event_handle_generic_event(xcb_generic_event_t *event);
+static void                     _ecore_xcb_event_handle_input_event(xcb_generic_event_t *event);
+
+static void                     _ecore_xcb_event_key_press(xcb_generic_event_t *event);
+static void                     _ecore_xcb_event_key_release(xcb_generic_event_t *event);
+static void                     _ecore_xcb_event_mouse_move_free(void *data __UNUSED__,
+                                                                 void *event);
+static Ecore_X_Event_Mode       _ecore_xcb_event_mode_get(uint8_t mode);
+static Ecore_X_Event_Detail     _ecore_xcb_event_detail_get(uint8_t detail);
+static void                     _ecore_xcb_event_xdnd_enter_free(void *data __UNUSED__,
+                                                                 void *event);
+static void                     _ecore_xcb_event_selection_notify_free(void *data __UNUSED__,
+                                                                       void *event);
+static void                     _ecore_xcb_event_generic_event_free(void *data,
+                                                                    void *event);
+static void                     _ecore_xcb_event_mouse_down_info_clear(void);
 static Ecore_X_Mouse_Down_Info *_ecore_xcb_event_mouse_down_info_get(int dev);
 
 /* local variables */
@@ -159,8 +163,8 @@ EAPI int ECORE_X_EVENT_STARTUP_SEQUENCE_CHANGE = 0;
 EAPI int ECORE_X_EVENT_STARTUP_SEQUENCE_REMOVE = 0;
 EAPI int ECORE_X_EVENT_GENERIC = 0;
 
-void 
-_ecore_xcb_events_init(void) 
+void
+_ecore_xcb_events_init(void)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
 
@@ -217,23 +221,23 @@ _ecore_xcb_events_init(void)
      }
 }
 
-void 
-_ecore_xcb_events_shutdown(void) 
+void
+_ecore_xcb_events_shutdown(void)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
 
    _ecore_xcb_event_mouse_down_info_clear();
 
    _ecore_xcb_event_last_mouse_move = EINA_FALSE;
-//   if (_ecore_xcb_event_last_mouse_move_event) 
+//   if (_ecore_xcb_event_last_mouse_move_event)
 //     {
 //        ecore_event_del(_ecore_xcb_event_last_mouse_move_event);
 //        _ecore_xcb_event_last_mouse_move_event = NULL;
 //     }
 }
 
-void 
-_ecore_xcb_events_handle(xcb_generic_event_t *ev) 
+void
+_ecore_xcb_events_handle(xcb_generic_event_t *ev)
 {
    uint8_t response = 0;
 
@@ -242,43 +246,43 @@ _ecore_xcb_events_handle(xcb_generic_event_t *ev)
 
    /* strip highest bit (set if event is generated) */
    response = (ev->response_type & ~0x80);
-   if (response == 0) 
+   if (response == 0)
      {
         xcb_generic_error_t *err;
 
         err = (xcb_generic_error_t *)ev;
 
-        /* NB: There is no way to check access of destroyed windows, 
-         * so trap those cases and ignore. We also ignore BadValue from 
-         * xcb_grab/ungrab_button (happens when we are using any_mod) 
+        /* NB: There is no way to check access of destroyed windows,
+         * so trap those cases and ignore. We also ignore BadValue from
+         * xcb_grab/ungrab_button (happens when we are using any_mod)
          * and a few others */
 #ifdef OLD_XCB_VERSION
         if (err->error_code == XCB_EVENT_ERROR_BAD_WINDOW) return;
-        else if (err->error_code == XCB_EVENT_ERROR_BAD_MATCH) 
+        else if (err->error_code == XCB_EVENT_ERROR_BAD_MATCH)
           {
-             if ((err->major_code == XCB_SET_INPUT_FOCUS) || 
+             if ((err->major_code == XCB_SET_INPUT_FOCUS) ||
                  (err->major_code == XCB_CONFIGURE_WINDOW))
                return;
           }
-        else if (err->error_code == XCB_EVENT_ERROR_BAD_VALUE) 
+        else if (err->error_code == XCB_EVENT_ERROR_BAD_VALUE)
           {
-             if ((err->major_code == XCB_KILL_CLIENT) || 
-                 (err->major_code == XCB_GRAB_BUTTON) || 
+             if ((err->major_code == XCB_KILL_CLIENT) ||
+                 (err->major_code == XCB_GRAB_BUTTON) ||
                  (err->major_code == XCB_UNGRAB_BUTTON))
                return;
           }
 #else
         if (err->error_code == XCB_WINDOW) return;
-        else if (err->error_code == XCB_MATCH) 
+        else if (err->error_code == XCB_MATCH)
           {
-             if ((err->major_code == XCB_SET_INPUT_FOCUS) || 
+             if ((err->major_code == XCB_SET_INPUT_FOCUS) ||
                  (err->major_code == XCB_CONFIGURE_WINDOW))
                return;
           }
-        else if (err->error_code == XCB_VALUE) 
+        else if (err->error_code == XCB_VALUE)
           {
-             if ((err->major_code == XCB_KILL_CLIENT) || 
-                 (err->major_code == XCB_GRAB_BUTTON) || 
+             if ((err->major_code == XCB_KILL_CLIENT) ||
+                 (err->major_code == XCB_GRAB_BUTTON) ||
                  (err->major_code == XCB_UNGRAB_BUTTON))
                return;
           }
@@ -293,7 +297,7 @@ _ecore_xcb_events_handle(xcb_generic_event_t *ev)
         else if (err->error_code == 8) // bad match
           WRN("\tMatch: %d", ((xcb_match_error_t *)err)->bad_value);
 
-        if (err->major_code == XCB_SEND_EVENT) 
+        if (err->major_code == XCB_SEND_EVENT)
           {
              WRN("\tSend Event Error");
              WRN("\t\tSeq: %d", ev->sequence);
@@ -315,21 +319,21 @@ _ecore_xcb_events_handle(xcb_generic_event_t *ev)
      _ecore_xcb_event_handle_key_press(ev);
    else if (response == XCB_KEY_RELEASE)
      _ecore_xcb_event_handle_key_release(ev);
-   else if (response == XCB_BUTTON_PRESS) 
+   else if (response == XCB_BUTTON_PRESS)
      _ecore_xcb_event_handle_button_press(ev);
    else if (response == XCB_BUTTON_RELEASE)
      _ecore_xcb_event_handle_button_release(ev);
    else if (response == XCB_MOTION_NOTIFY)
      _ecore_xcb_event_handle_motion_notify(ev);
-   else if (response == XCB_ENTER_NOTIFY) 
+   else if (response == XCB_ENTER_NOTIFY)
      _ecore_xcb_event_handle_enter_notify(ev);
-   else if (response == XCB_LEAVE_NOTIFY) 
+   else if (response == XCB_LEAVE_NOTIFY)
      _ecore_xcb_event_handle_leave_notify(ev);
    else if (response == XCB_KEYMAP_NOTIFY)
      _ecore_xcb_event_handle_keymap_notify(ev);
-   else if (response == XCB_FOCUS_IN) 
+   else if (response == XCB_FOCUS_IN)
      _ecore_xcb_event_handle_focus_in(ev);
-   else if (response == XCB_FOCUS_OUT) 
+   else if (response == XCB_FOCUS_OUT)
      _ecore_xcb_event_handle_focus_out(ev);
    else if (response == XCB_EXPOSE)
      _ecore_xcb_event_handle_expose(ev);
@@ -341,17 +345,17 @@ _ecore_xcb_events_handle(xcb_generic_event_t *ev)
      _ecore_xcb_event_handle_create_notify(ev);
    else if (response == XCB_DESTROY_NOTIFY)
      _ecore_xcb_event_handle_destroy_notify(ev);
-   else if (response == XCB_MAP_NOTIFY) 
+   else if (response == XCB_MAP_NOTIFY)
      _ecore_xcb_event_handle_map_notify(ev);
-   else if (response == XCB_UNMAP_NOTIFY) 
+   else if (response == XCB_UNMAP_NOTIFY)
      _ecore_xcb_event_handle_unmap_notify(ev);
    else if (response == XCB_MAP_REQUEST)
      _ecore_xcb_event_handle_map_request(ev);
    else if (response == XCB_REPARENT_NOTIFY)
      _ecore_xcb_event_handle_reparent_notify(ev);
-   else if (response == XCB_CONFIGURE_NOTIFY) 
+   else if (response == XCB_CONFIGURE_NOTIFY)
      _ecore_xcb_event_handle_configure_notify(ev);
-   else if (response == XCB_CONFIGURE_REQUEST) 
+   else if (response == XCB_CONFIGURE_REQUEST)
      _ecore_xcb_event_handle_configure_request(ev);
    else if (response == XCB_GRAVITY_NOTIFY)
      _ecore_xcb_event_handle_gravity_notify(ev);
@@ -371,66 +375,67 @@ _ecore_xcb_events_handle(xcb_generic_event_t *ev)
      _ecore_xcb_event_handle_selection_notify(ev);
    else if (response == XCB_COLORMAP_NOTIFY)
      _ecore_xcb_event_handle_colormap_notify(ev);
-   else if (response == XCB_CLIENT_MESSAGE) 
+   else if (response == XCB_CLIENT_MESSAGE)
      _ecore_xcb_event_handle_client_message(ev);
-   else if (response == XCB_MAPPING_NOTIFY) 
+   else if (response == XCB_MAPPING_NOTIFY)
      _ecore_xcb_event_handle_mapping_notify(ev);
    else if (response == 35) /* GenericEvent == 35 */
      _ecore_xcb_event_handle_generic_event(ev);
 #ifdef ECORE_XCB_DAMAGE
-   else if ((_ecore_xcb_event_damage >= 0) && 
+   else if ((_ecore_xcb_event_damage >= 0) &&
             (response == (_ecore_xcb_event_damage + XCB_DAMAGE_NOTIFY)))
      _ecore_xcb_event_handle_damage_notify(ev);
 #endif
 #ifdef ECORE_XCB_RANDR
-   else if ((_ecore_xcb_event_randr >= 0) && 
-            (response == 
-                _ecore_xcb_event_randr + XCB_RANDR_SCREEN_CHANGE_NOTIFY))
+   else if ((_ecore_xcb_event_randr >= 0) &&
+            (response ==
+             _ecore_xcb_event_randr + XCB_RANDR_SCREEN_CHANGE_NOTIFY))
      _ecore_xcb_event_handle_randr_change(ev);
-   else if ((_ecore_xcb_event_randr >= 0) && 
+   else if ((_ecore_xcb_event_randr >= 0) &&
             (response == (_ecore_xcb_event_randr + XCB_RANDR_NOTIFY)))
      _ecore_xcb_event_handle_randr_notify(ev);
 #endif
 #ifdef ECORE_XCB_SCREENSAVER
-   else if ((_ecore_xcb_event_screensaver >= 0) && 
-            (response == 
-                _ecore_xcb_event_screensaver + XCB_SCREENSAVER_NOTIFY))
+   else if ((_ecore_xcb_event_screensaver >= 0) &&
+            (response ==
+             _ecore_xcb_event_screensaver + XCB_SCREENSAVER_NOTIFY))
      _ecore_xcb_event_handle_screensaver_notify(ev);
 #endif
 #ifdef ECORE_XCB_SHAPE
-   else if ((_ecore_xcb_event_shape >= 0) && 
+   else if ((_ecore_xcb_event_shape >= 0) &&
             (response == (_ecore_xcb_event_shape + XCB_SHAPE_NOTIFY)))
      _ecore_xcb_event_handle_shape_change(ev);
 #endif
 #ifdef ECORE_XCB_SYNC
-   else if ((_ecore_xcb_event_sync >= 0) && 
+   else if ((_ecore_xcb_event_sync >= 0) &&
             (response == (_ecore_xcb_event_sync + XCB_SYNC_COUNTER_NOTIFY)))
      _ecore_xcb_event_handle_sync_counter(ev);
-   else if ((_ecore_xcb_event_sync >= 0) && 
+   else if ((_ecore_xcb_event_sync >= 0) &&
             (response == (_ecore_xcb_event_sync + XCB_SYNC_ALARM_NOTIFY)))
      _ecore_xcb_event_handle_sync_alarm(ev);
 #endif
 #ifdef ECORE_XCB_XFIXES
-   else if ((_ecore_xcb_event_xfixes >= 0) && 
-            (response == 
-                _ecore_xcb_event_xfixes + XCB_XFIXES_SELECTION_NOTIFY))
+   else if ((_ecore_xcb_event_xfixes >= 0) &&
+            (response ==
+             _ecore_xcb_event_xfixes + XCB_XFIXES_SELECTION_NOTIFY))
      _ecore_xcb_event_handle_xfixes_selection_notify(ev);
-   else if ((_ecore_xcb_event_xfixes >= 0) && 
+   else if ((_ecore_xcb_event_xfixes >= 0) &&
             (response == (_ecore_xcb_event_xfixes + XCB_XFIXES_CURSOR_NOTIFY)))
      _ecore_xcb_event_handle_xfixes_cursor_notify(ev);
 #endif
 }
 
-Ecore_X_Time 
-_ecore_xcb_events_last_time_get(void) 
+Ecore_X_Time
+_ecore_xcb_events_last_time_get(void)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
 
    return _ecore_xcb_event_last_time;
 }
 
-EAPI void 
-ecore_x_event_mask_set(Ecore_X_Window win, Ecore_X_Event_Mask mask) 
+EAPI void
+ecore_x_event_mask_set(Ecore_X_Window     win,
+                       Ecore_X_Event_Mask mask)
 {
    xcb_get_window_attributes_cookie_t cookie;
    xcb_get_window_attributes_reply_t *reply;
@@ -446,13 +451,14 @@ ecore_x_event_mask_set(Ecore_X_Window win, Ecore_X_Event_Mask mask)
 
    list = (mask | reply->your_event_mask);
    free(reply);
-   xcb_change_window_attributes(_ecore_xcb_conn, win, 
+   xcb_change_window_attributes(_ecore_xcb_conn, win,
                                 XCB_CW_EVENT_MASK, &list);
 //   ecore_x_flush();
 }
 
-EAPI void 
-ecore_x_event_mask_unset(Ecore_X_Window win, Ecore_X_Event_Mask mask) 
+EAPI void
+ecore_x_event_mask_unset(Ecore_X_Window     win,
+                         Ecore_X_Event_Mask mask)
 {
    xcb_get_window_attributes_cookie_t cookie;
    xcb_get_window_attributes_reply_t *reply;
@@ -468,13 +474,13 @@ ecore_x_event_mask_unset(Ecore_X_Window win, Ecore_X_Event_Mask mask)
 
    list = (reply->your_event_mask & ~mask);
    free(reply);
-   xcb_change_window_attributes(_ecore_xcb_conn, win, 
+   xcb_change_window_attributes(_ecore_xcb_conn, win,
                                 XCB_CW_EVENT_MASK, &list);
 //   ecore_x_flush();
 }
 
-unsigned int 
-_ecore_xcb_events_modifiers_get(unsigned int state) 
+unsigned int
+_ecore_xcb_events_modifiers_get(unsigned int state)
 {
    unsigned int modifiers = 0;
 
@@ -501,8 +507,8 @@ _ecore_xcb_events_modifiers_get(unsigned int state)
 }
 
 /* local functions */
-static void 
-_ecore_xcb_event_handle_any_event(xcb_generic_event_t *event) 
+static void
+_ecore_xcb_event_handle_any_event(xcb_generic_event_t *event)
 {
    xcb_generic_event_t *ev;
 
@@ -515,27 +521,27 @@ _ecore_xcb_event_handle_any_event(xcb_generic_event_t *event)
    ecore_event_add(ECORE_X_EVENT_ANY, ev, NULL, NULL);
 }
 
-static void 
-_ecore_xcb_event_handle_key_press(xcb_generic_event_t *event) 
+static void
+_ecore_xcb_event_handle_key_press(xcb_generic_event_t *event)
 {
    _ecore_xcb_event_key_press(event);
 }
 
-static void 
-_ecore_xcb_event_handle_key_release(xcb_generic_event_t *event) 
+static void
+_ecore_xcb_event_handle_key_release(xcb_generic_event_t *event)
 {
    _ecore_xcb_event_key_release(event);
 }
 
-static void 
-_ecore_xcb_event_handle_button_press(xcb_generic_event_t *event) 
+static void
+_ecore_xcb_event_handle_button_press(xcb_generic_event_t *event)
 {
    xcb_button_press_event_t *ev;
 
    _ecore_xcb_event_last_mouse_move = EINA_FALSE;
 
    ev = (xcb_button_press_event_t *)event;
-   if ((ev->detail > 3) && (ev->detail < 8)) 
+   if ((ev->detail > 3) && (ev->detail < 8))
      {
         Ecore_Event_Mouse_Wheel *e;
 
@@ -543,24 +549,28 @@ _ecore_xcb_event_handle_button_press(xcb_generic_event_t *event)
 
         e->timestamp = ev->time;
         e->modifiers = _ecore_xcb_events_modifiers_get(ev->state);
-        switch (ev->detail) 
+        switch (ev->detail)
           {
            case 4:
              e->direction = 0;
              e->z = -1;
              break;
+
            case 5:
              e->direction = 0;
              e->z = 1;
              break;
+
            case 6:
              e->direction = 1;
              e->z = -1;
              break;
+
            case 7:
              e->direction = 1;
              e->z = 1;
              break;
+
            default:
              e->direction = 0;
              e->z = 0;
@@ -586,76 +596,76 @@ _ecore_xcb_event_handle_button_press(xcb_generic_event_t *event)
 
         ecore_event_add(ECORE_EVENT_MOUSE_WHEEL, e, NULL, NULL);
 
-        _ecore_xcb_window_grab_allow_events(ev->event, ev->child, 
-                                            ECORE_EVENT_MOUSE_WHEEL, 
+        _ecore_xcb_window_grab_allow_events(ev->event, ev->child,
+                                            ECORE_EVENT_MOUSE_WHEEL,
                                             e, ev->time);
      }
-   else 
+   else
      {
         Ecore_Event_Mouse_Button *e;
         unsigned int child_win = 0;
 
         child_win = (ev->child ? ev->child : ev->event);
 
-        _ecore_xcb_event_mouse_move(ev->time, ev->state, 
-                                    ev->event_x, ev->event_y, 
-                                    ev->root_x, ev->root_y, 
-                                    ev->event, child_win, 
-                                    ev->root, ev->same_screen, 
-                                    0, 1, 1, 1.0, 0.0, 
-                                    ev->event_x, ev->event_y, 
+        _ecore_xcb_event_mouse_move(ev->time, ev->state,
+                                    ev->event_x, ev->event_y,
+                                    ev->root_x, ev->root_y,
+                                    ev->event, child_win,
+                                    ev->root, ev->same_screen,
+                                    0, 1, 1, 1.0, 0.0,
+                                    ev->event_x, ev->event_y,
                                     ev->root_x, ev->root_y);
 
-        e = _ecore_xcb_event_mouse_button(ECORE_EVENT_MOUSE_BUTTON_DOWN, 
-                                          ev->time, 
-                                          ev->state, ev->detail, 
-                                          ev->event_x, ev->event_y, 
-                                          ev->root_x, ev->root_y, ev->event, 
-                                          child_win, 
-                                          ev->root, ev->same_screen, 
-                                          0, 1, 1, 1.0, 0.0, 
-                                          ev->event_x, ev->event_y, 
+        e = _ecore_xcb_event_mouse_button(ECORE_EVENT_MOUSE_BUTTON_DOWN,
+                                          ev->time,
+                                          ev->state, ev->detail,
+                                          ev->event_x, ev->event_y,
+                                          ev->root_x, ev->root_y, ev->event,
+                                          child_win,
+                                          ev->root, ev->same_screen,
+                                          0, 1, 1, 1.0, 0.0,
+                                          ev->event_x, ev->event_y,
                                           ev->root_x, ev->root_y);
         if (e)
-          _ecore_xcb_window_grab_allow_events(ev->event, ev->child, 
-                                              ECORE_EVENT_MOUSE_BUTTON_DOWN, 
+          _ecore_xcb_window_grab_allow_events(ev->event, ev->child,
+                                              ECORE_EVENT_MOUSE_BUTTON_DOWN,
                                               e, ev->time);
      }
 }
 
-static void 
-_ecore_xcb_event_handle_button_release(xcb_generic_event_t *event) 
+static void
+_ecore_xcb_event_handle_button_release(xcb_generic_event_t *event)
 {
    xcb_button_release_event_t *ev;
 
    _ecore_xcb_event_last_mouse_move = EINA_FALSE;
    ev = (xcb_button_release_event_t *)event;
-   if ((ev->detail <= 3) || (ev->detail > 7)) 
+   if ((ev->detail <= 3) || (ev->detail > 7))
      {
-        _ecore_xcb_event_mouse_move(ev->time, ev->state, 
-                                    ev->event_x, ev->event_y, 
-                                    ev->root_x, ev->root_y, 
-                                    ev->event, 
-                                    (ev->child ? ev->child : ev->event), 
-                                    ev->root, ev->same_screen, 
-                                    0, 1, 1, 1.0, 0.0, 
-                                    ev->event_x, ev->event_y, 
+        _ecore_xcb_event_mouse_move(ev->time, ev->state,
+                                    ev->event_x, ev->event_y,
+                                    ev->root_x, ev->root_y,
+                                    ev->event,
+                                    (ev->child ? ev->child : ev->event),
+                                    ev->root, ev->same_screen,
+                                    0, 1, 1, 1.0, 0.0,
+                                    ev->event_x, ev->event_y,
                                     ev->root_x, ev->root_y);
 
-        _ecore_xcb_event_mouse_button(ECORE_EVENT_MOUSE_BUTTON_UP, ev->time, 
-                                      ev->state, ev->detail, 
-                                      ev->event_x, ev->event_y, ev->root_x, 
-                                      ev->root_y, ev->event, 
-                                      (ev->child ? ev->child : ev->event), 
-                                      ev->root, ev->same_screen, 
-                                      0, 1, 1, 1.0, 0.0, 
-                                      ev->event_x, ev->event_y, 
+        _ecore_xcb_event_mouse_button(ECORE_EVENT_MOUSE_BUTTON_UP, ev->time,
+                                      ev->state, ev->detail,
+                                      ev->event_x, ev->event_y, ev->root_x,
+                                      ev->root_y, ev->event,
+                                      (ev->child ? ev->child : ev->event),
+                                      ev->root, ev->same_screen,
+                                      0, 1, 1, 1.0, 0.0,
+                                      ev->event_x, ev->event_y,
                                       ev->root_x, ev->root_y);
      }
 }
 
-static void 
-_ecore_xcb_event_handle_motion_notify(xcb_generic_event_t *event) 
+static void
+_ecore_xcb_event_handle_motion_notify(xcb_generic_event_t *event)
 {
    xcb_motion_notify_event_t *ev;
 
@@ -668,22 +678,22 @@ _ecore_xcb_event_handle_motion_notify(xcb_generic_event_t *event)
    /*      _ecore_xcb_event_last_mouse_move_event = NULL; */
    /*   } */
 
-   _ecore_xcb_event_mouse_move(ev->time, ev->state, 
-                               ev->event_x, ev->event_y, 
-                               ev->root_x, ev->root_y, 
-                               ev->event, 
-                               (ev->child ? ev->child : ev->event), 
-                               ev->root, ev->same_screen, 
-                               0, 1, 1, 1.0, 0.0, 
-                               ev->event_x, ev->event_y, 
+   _ecore_xcb_event_mouse_move(ev->time, ev->state,
+                               ev->event_x, ev->event_y,
+                               ev->root_x, ev->root_y,
+                               ev->event,
+                               (ev->child ? ev->child : ev->event),
+                               ev->root, ev->same_screen,
+                               0, 1, 1, 1.0, 0.0,
+                               ev->event_x, ev->event_y,
                                ev->root_x, ev->root_y);
    _ecore_xcb_event_last_mouse_move = EINA_TRUE;
 
    _ecore_xcb_dnd_drag(ev->root, ev->root_x, ev->root_y);
 }
 
-static void 
-_ecore_xcb_event_handle_enter_notify(xcb_generic_event_t *event) 
+static void
+_ecore_xcb_event_handle_enter_notify(xcb_generic_event_t *event)
 {
    xcb_enter_notify_event_t *ev;
    Ecore_X_Event_Mouse_In *e;
@@ -691,14 +701,14 @@ _ecore_xcb_event_handle_enter_notify(xcb_generic_event_t *event)
    _ecore_xcb_event_last_mouse_move = EINA_FALSE;
    ev = (xcb_enter_notify_event_t *)event;
 
-   _ecore_xcb_event_mouse_move(ev->time, ev->state, 
-                               ev->event_x, ev->event_y, 
-                               ev->root_x, ev->root_y, 
-                               ev->event, 
-                               (ev->child ? ev->child : ev->event), 
-                               ev->root, ev->same_screen_focus, 
-                               0, 1, 1, 1.0, 0.0, 
-                               ev->event_x, ev->event_y, 
+   _ecore_xcb_event_mouse_move(ev->time, ev->state,
+                               ev->event_x, ev->event_y,
+                               ev->root_x, ev->root_y,
+                               ev->event,
+                               (ev->child ? ev->child : ev->event),
+                               ev->root, ev->same_screen_focus,
+                               0, 1, 1, 1.0, 0.0,
+                               ev->event_x, ev->event_y,
                                ev->root_x, ev->root_y);
 
    if (!(e = calloc(1, sizeof(Ecore_X_Event_Mouse_In)))) return;
@@ -723,8 +733,8 @@ _ecore_xcb_event_handle_enter_notify(xcb_generic_event_t *event)
    ecore_event_add(ECORE_X_EVENT_MOUSE_IN, e, NULL, NULL);
 }
 
-static void 
-_ecore_xcb_event_handle_leave_notify(xcb_generic_event_t *event) 
+static void
+_ecore_xcb_event_handle_leave_notify(xcb_generic_event_t *event)
 {
    xcb_leave_notify_event_t *ev;
    Ecore_X_Event_Mouse_Out *e;
@@ -732,14 +742,14 @@ _ecore_xcb_event_handle_leave_notify(xcb_generic_event_t *event)
    _ecore_xcb_event_last_mouse_move = EINA_FALSE;
    ev = (xcb_enter_notify_event_t *)event;
 
-   _ecore_xcb_event_mouse_move(ev->time, ev->state, 
-                               ev->event_x, ev->event_y, 
-                               ev->root_x, ev->root_y, 
-                               ev->event, 
-                               (ev->child ? ev->child : ev->event), 
-                               ev->root, ev->same_screen_focus, 
-                               0, 1, 1, 1.0, 0.0, 
-                               ev->event_x, ev->event_y, 
+   _ecore_xcb_event_mouse_move(ev->time, ev->state,
+                               ev->event_x, ev->event_y,
+                               ev->root_x, ev->root_y,
+                               ev->event,
+                               (ev->child ? ev->child : ev->event),
+                               ev->root, ev->same_screen_focus,
+                               0, 1, 1, 1.0, 0.0,
+                               ev->event_x, ev->event_y,
                                ev->root_x, ev->root_y);
 
    if (!(e = calloc(1, sizeof(Ecore_X_Event_Mouse_Out)))) return;
@@ -768,17 +778,17 @@ _ecore_xcb_event_handle_leave_notify(xcb_generic_event_t *event)
    ecore_event_add(ECORE_X_EVENT_MOUSE_OUT, e, NULL, NULL);
 }
 
-static void 
-_ecore_xcb_event_handle_keymap_notify(xcb_generic_event_t *event __UNUSED__) 
+static void
+_ecore_xcb_event_handle_keymap_notify(xcb_generic_event_t *event __UNUSED__)
 {
 //   LOGFN(__FILE__, __LINE__, __FUNCTION__);
 
-   // FIXME: handle this event type
-   _ecore_xcb_event_last_mouse_move = EINA_FALSE;
+     // FIXME: handle this event type
+       _ecore_xcb_event_last_mouse_move = EINA_FALSE;
 }
 
-static void 
-_ecore_xcb_event_handle_focus_in(xcb_generic_event_t *event) 
+static void
+_ecore_xcb_event_handle_focus_in(xcb_generic_event_t *event)
 {
    xcb_focus_in_event_t *ev;
    Ecore_X_Event_Window_Focus_In *e;
@@ -797,8 +807,8 @@ _ecore_xcb_event_handle_focus_in(xcb_generic_event_t *event)
    ecore_event_add(ECORE_X_EVENT_WINDOW_FOCUS_IN, e, NULL, NULL);
 }
 
-static void 
-_ecore_xcb_event_handle_focus_out(xcb_generic_event_t *event) 
+static void
+_ecore_xcb_event_handle_focus_out(xcb_generic_event_t *event)
 {
    xcb_focus_out_event_t *ev;
    Ecore_X_Event_Window_Focus_Out *e;
@@ -817,8 +827,8 @@ _ecore_xcb_event_handle_focus_out(xcb_generic_event_t *event)
    ecore_event_add(ECORE_X_EVENT_WINDOW_FOCUS_OUT, e, NULL, NULL);
 }
 
-static void 
-_ecore_xcb_event_handle_expose(xcb_generic_event_t *event) 
+static void
+_ecore_xcb_event_handle_expose(xcb_generic_event_t *event)
 {
    xcb_expose_event_t *ev;
    Ecore_X_Event_Window_Damage *e;
@@ -838,8 +848,8 @@ _ecore_xcb_event_handle_expose(xcb_generic_event_t *event)
    ecore_event_add(ECORE_X_EVENT_WINDOW_DAMAGE, e, NULL, NULL);
 }
 
-static void 
-_ecore_xcb_event_handle_graphics_exposure(xcb_generic_event_t *event) 
+static void
+_ecore_xcb_event_handle_graphics_exposure(xcb_generic_event_t *event)
 {
    xcb_graphics_exposure_event_t *ev;
    Ecore_X_Event_Window_Damage *e;
@@ -859,8 +869,8 @@ _ecore_xcb_event_handle_graphics_exposure(xcb_generic_event_t *event)
    ecore_event_add(ECORE_X_EVENT_WINDOW_DAMAGE, e, NULL, NULL);
 }
 
-static void 
-_ecore_xcb_event_handle_visibility_notify(xcb_generic_event_t *event) 
+static void
+_ecore_xcb_event_handle_visibility_notify(xcb_generic_event_t *event)
 {
    xcb_visibility_notify_event_t *ev;
    Ecore_X_Event_Window_Visibility_Change *e;
@@ -880,8 +890,8 @@ _ecore_xcb_event_handle_visibility_notify(xcb_generic_event_t *event)
    ecore_event_add(ECORE_X_EVENT_WINDOW_VISIBILITY_CHANGE, e, NULL, NULL);
 }
 
-static void 
-_ecore_xcb_event_handle_create_notify(xcb_generic_event_t *event) 
+static void
+_ecore_xcb_event_handle_create_notify(xcb_generic_event_t *event)
 {
    xcb_create_notify_event_t *ev;
    Ecore_X_Event_Window_Create *e;
@@ -906,8 +916,8 @@ _ecore_xcb_event_handle_create_notify(xcb_generic_event_t *event)
    ecore_event_add(ECORE_X_EVENT_WINDOW_CREATE, e, NULL, NULL);
 }
 
-static void 
-_ecore_xcb_event_handle_destroy_notify(xcb_generic_event_t *event) 
+static void
+_ecore_xcb_event_handle_destroy_notify(xcb_generic_event_t *event)
 {
    xcb_destroy_notify_event_t *ev;
    Ecore_X_Event_Window_Destroy *e;
@@ -925,8 +935,8 @@ _ecore_xcb_event_handle_destroy_notify(xcb_generic_event_t *event)
    ecore_event_add(ECORE_X_EVENT_WINDOW_DESTROY, e, NULL, NULL);
 }
 
-static void 
-_ecore_xcb_event_handle_map_notify(xcb_generic_event_t *event) 
+static void
+_ecore_xcb_event_handle_map_notify(xcb_generic_event_t *event)
 {
    xcb_map_notify_event_t *ev;
    Ecore_X_Event_Window_Show *e;
@@ -942,8 +952,8 @@ _ecore_xcb_event_handle_map_notify(xcb_generic_event_t *event)
    ecore_event_add(ECORE_X_EVENT_WINDOW_SHOW, e, NULL, NULL);
 }
 
-static void 
-_ecore_xcb_event_handle_unmap_notify(xcb_generic_event_t *event) 
+static void
+_ecore_xcb_event_handle_unmap_notify(xcb_generic_event_t *event)
 {
    xcb_unmap_notify_event_t *ev;
    Ecore_X_Event_Window_Hide *e;
@@ -959,8 +969,8 @@ _ecore_xcb_event_handle_unmap_notify(xcb_generic_event_t *event)
    ecore_event_add(ECORE_X_EVENT_WINDOW_HIDE, e, NULL, NULL);
 }
 
-static void 
-_ecore_xcb_event_handle_map_request(xcb_generic_event_t *event) 
+static void
+_ecore_xcb_event_handle_map_request(xcb_generic_event_t *event)
 {
    xcb_map_request_event_t *ev;
    Ecore_X_Event_Window_Show_Request *e;
@@ -976,8 +986,8 @@ _ecore_xcb_event_handle_map_request(xcb_generic_event_t *event)
    ecore_event_add(ECORE_X_EVENT_WINDOW_SHOW_REQUEST, e, NULL, NULL);
 }
 
-static void 
-_ecore_xcb_event_handle_reparent_notify(xcb_generic_event_t *event) 
+static void
+_ecore_xcb_event_handle_reparent_notify(xcb_generic_event_t *event)
 {
    xcb_reparent_notify_event_t *ev;
    Ecore_X_Event_Window_Reparent *e;
@@ -994,8 +1004,8 @@ _ecore_xcb_event_handle_reparent_notify(xcb_generic_event_t *event)
    ecore_event_add(ECORE_X_EVENT_WINDOW_REPARENT, e, NULL, NULL);
 }
 
-static void 
-_ecore_xcb_event_handle_configure_notify(xcb_generic_event_t *event) 
+static void
+_ecore_xcb_event_handle_configure_notify(xcb_generic_event_t *event)
 {
    xcb_configure_notify_event_t *ev;
    Ecore_X_Event_Window_Configure *e;
@@ -1020,15 +1030,15 @@ _ecore_xcb_event_handle_configure_notify(xcb_generic_event_t *event)
    ecore_event_add(ECORE_X_EVENT_WINDOW_CONFIGURE, e, NULL, NULL);
 }
 
-static void 
-_ecore_xcb_event_handle_configure_request(xcb_generic_event_t *event) 
+static void
+_ecore_xcb_event_handle_configure_request(xcb_generic_event_t *event)
 {
    xcb_configure_request_event_t *ev;
    Ecore_X_Event_Window_Configure_Request *e;
 
    _ecore_xcb_event_last_mouse_move = EINA_FALSE;
    ev = (xcb_configure_request_event_t *)event;
-   if (!(e = calloc(1, sizeof(Ecore_X_Event_Window_Configure_Request)))) 
+   if (!(e = calloc(1, sizeof(Ecore_X_Event_Window_Configure_Request))))
      return;
 
    e->win = ev->window;
@@ -1040,20 +1050,24 @@ _ecore_xcb_event_handle_configure_request(xcb_generic_event_t *event)
    e->h = ev->height;
    e->border = ev->border_width;
    e->value_mask = ev->value_mask;
-   switch (ev->stack_mode) 
+   switch (ev->stack_mode)
      {
       case XCB_STACK_MODE_ABOVE:
         e->detail = ECORE_X_WINDOW_STACK_ABOVE;
         break;
+
       case XCB_STACK_MODE_BELOW:
         e->detail = ECORE_X_WINDOW_STACK_BELOW;
         break;
+
       case XCB_STACK_MODE_TOP_IF:
         e->detail = ECORE_X_WINDOW_STACK_TOP_IF;
         break;
+
       case XCB_STACK_MODE_BOTTOM_IF:
         e->detail = ECORE_X_WINDOW_STACK_BOTTOM_IF;
         break;
+
       case XCB_STACK_MODE_OPPOSITE:
         e->detail = ECORE_X_WINDOW_STACK_OPPOSITE;
         break;
@@ -1063,8 +1077,8 @@ _ecore_xcb_event_handle_configure_request(xcb_generic_event_t *event)
    ecore_event_add(ECORE_X_EVENT_WINDOW_CONFIGURE_REQUEST, e, NULL, NULL);
 }
 
-static void 
-_ecore_xcb_event_handle_gravity_notify(xcb_generic_event_t *event __UNUSED__) 
+static void
+_ecore_xcb_event_handle_gravity_notify(xcb_generic_event_t *event __UNUSED__)
 {
 /*
    xcb_gravity_notify_event_t *ev;
@@ -1079,11 +1093,11 @@ _ecore_xcb_event_handle_gravity_notify(xcb_generic_event_t *event __UNUSED__)
    e->time = _ecore_xcb_event_last_time;
 
    ecore_event_add(ECORE_X_EVENT_WINDOW_GRAVITY, e, NULL, NULL);
-*/
+ */
 }
 
-static void 
-_ecore_xcb_event_handle_resize_request(xcb_generic_event_t *event) 
+static void
+_ecore_xcb_event_handle_resize_request(xcb_generic_event_t *event)
 {
    xcb_resize_request_event_t *ev;
    Ecore_X_Event_Window_Resize_Request *e;
@@ -1100,8 +1114,8 @@ _ecore_xcb_event_handle_resize_request(xcb_generic_event_t *event)
    ecore_event_add(ECORE_X_EVENT_WINDOW_RESIZE_REQUEST, e, NULL, NULL);
 }
 
-static void 
-_ecore_xcb_event_handle_circulate_notify(xcb_generic_event_t *event) 
+static void
+_ecore_xcb_event_handle_circulate_notify(xcb_generic_event_t *event)
 {
    xcb_circulate_notify_event_t *ev;
    Ecore_X_Event_Window_Stack *e;
@@ -1121,8 +1135,8 @@ _ecore_xcb_event_handle_circulate_notify(xcb_generic_event_t *event)
    ecore_event_add(ECORE_X_EVENT_WINDOW_STACK, e, NULL, NULL);
 }
 
-static void 
-_ecore_xcb_event_handle_circulate_request(xcb_generic_event_t *event) 
+static void
+_ecore_xcb_event_handle_circulate_request(xcb_generic_event_t *event)
 {
    xcb_circulate_request_event_t *ev;
    Ecore_X_Event_Window_Stack_Request *e;
@@ -1142,8 +1156,8 @@ _ecore_xcb_event_handle_circulate_request(xcb_generic_event_t *event)
    ecore_event_add(ECORE_X_EVENT_WINDOW_STACK_REQUEST, e, NULL, NULL);
 }
 
-static void 
-_ecore_xcb_event_handle_property_notify(xcb_generic_event_t *event) 
+static void
+_ecore_xcb_event_handle_property_notify(xcb_generic_event_t *event)
 {
    xcb_property_notify_event_t *ev;
    Ecore_X_Event_Window_Property *e;
@@ -1160,8 +1174,8 @@ _ecore_xcb_event_handle_property_notify(xcb_generic_event_t *event)
    ecore_event_add(ECORE_X_EVENT_WINDOW_PROPERTY, e, NULL, NULL);
 }
 
-static void 
-_ecore_xcb_event_handle_selection_clear(xcb_generic_event_t *event) 
+static void
+_ecore_xcb_event_handle_selection_clear(xcb_generic_event_t *event)
 {
    xcb_selection_clear_event_t *ev;
    Ecore_X_Event_Selection_Clear *e;
@@ -1188,8 +1202,8 @@ _ecore_xcb_event_handle_selection_clear(xcb_generic_event_t *event)
    ecore_event_add(ECORE_X_EVENT_SELECTION_CLEAR, e, NULL, NULL);
 }
 
-static void 
-_ecore_xcb_event_handle_selection_request(xcb_generic_event_t *event) 
+static void
+_ecore_xcb_event_handle_selection_request(xcb_generic_event_t *event)
 {
    xcb_selection_request_event_t *ev;
    Ecore_X_Event_Selection_Request *e;
@@ -1210,13 +1224,13 @@ _ecore_xcb_event_handle_selection_request(xcb_generic_event_t *event)
 
    ecore_event_add(ECORE_X_EVENT_SELECTION_REQUEST, e, NULL, NULL);
 
-   if ((sd = _ecore_xcb_selection_get(ev->selection)) && 
-       (sd->win == ev->owner)) 
+   if ((sd = _ecore_xcb_selection_get(ev->selection)) &&
+       (sd->win == ev->owner))
      {
         Ecore_X_Selection_Intern *si;
 
         si = _ecore_xcb_selection_get(ev->selection);
-        if (si->data) 
+        if (si->data)
           {
              Ecore_X_Atom property = XCB_NONE, type;
              void *data = NULL;
@@ -1226,24 +1240,24 @@ _ecore_xcb_event_handle_selection_request(xcb_generic_event_t *event)
              typesize = 8;
              len = sd->length;
 
-             if (!ecore_x_selection_convert(ev->selection, ev->target, 
+             if (!ecore_x_selection_convert(ev->selection, ev->target,
                                             &data, &len, &type, &typesize))
                property = XCB_NONE;
              else if (data)
                {
-                  ecore_x_window_prop_property_set(ev->requestor, ev->property, 
+                  ecore_x_window_prop_property_set(ev->requestor, ev->property,
                                                    type, typesize, data, len);
                   property = ev->property;
                   free(data);
                }
-             ecore_x_selection_notify_send(ev->requestor, ev->selection, 
+             ecore_x_selection_notify_send(ev->requestor, ev->selection,
                                            ev->target, property, ev->time);
           }
      }
 }
 
-static void 
-_ecore_xcb_event_handle_selection_notify(xcb_generic_event_t *event) 
+static void
+_ecore_xcb_event_handle_selection_notify(xcb_generic_event_t *event)
 {
    xcb_selection_notify_event_t *ev;
    Ecore_X_Event_Selection_Notify *e;
@@ -1256,18 +1270,18 @@ _ecore_xcb_event_handle_selection_notify(xcb_generic_event_t *event)
    _ecore_xcb_event_last_mouse_move = EINA_FALSE;
    ev = (xcb_selection_notify_event_t *)event;
    selection = ev->selection;
-   if (ev->target == ECORE_X_ATOM_SELECTION_TARGETS) 
+   if (ev->target == ECORE_X_ATOM_SELECTION_TARGETS)
      {
-        format = 
-          ecore_x_window_prop_property_get(ev->requestor, ev->property, 
+        format =
+          ecore_x_window_prop_property_get(ev->requestor, ev->property,
                                            XCB_ATOM_ATOM, 32, &data, &num);
         if (!format) return;
      }
-   else 
+   else
      {
-        format = 
-          ecore_x_window_prop_property_get(ev->requestor, ev->property, 
-                                           XCB_GET_PROPERTY_TYPE_ANY, 8, 
+        format =
+          ecore_x_window_prop_property_get(ev->requestor, ev->property,
+                                           XCB_GET_PROPERTY_TYPE_ANY, 8,
                                            &data, &num);
         if (!format) return;
      }
@@ -1292,12 +1306,12 @@ _ecore_xcb_event_handle_selection_notify(xcb_generic_event_t *event)
 
    e->data = _ecore_xcb_selection_parse(e->target, data, num, format);
 
-   ecore_event_add(ECORE_X_EVENT_SELECTION_NOTIFY, e, 
+   ecore_event_add(ECORE_X_EVENT_SELECTION_NOTIFY, e,
                    _ecore_xcb_event_selection_notify_free, NULL);
 }
 
-static void 
-_ecore_xcb_event_handle_colormap_notify(xcb_generic_event_t *event) 
+static void
+_ecore_xcb_event_handle_colormap_notify(xcb_generic_event_t *event)
 {
    xcb_colormap_notify_event_t *ev;
    Ecore_X_Event_Window_Colormap *e;
@@ -1317,8 +1331,8 @@ _ecore_xcb_event_handle_colormap_notify(xcb_generic_event_t *event)
    ecore_event_add(ECORE_X_EVENT_WINDOW_COLORMAP, e, NULL, NULL);
 }
 
-static void 
-_ecore_xcb_event_handle_client_message(xcb_generic_event_t *event) 
+static void
+_ecore_xcb_event_handle_client_message(xcb_generic_event_t *event)
 {
    xcb_client_message_event_t *ev;
 
@@ -1330,8 +1344,8 @@ _ecore_xcb_event_handle_client_message(xcb_generic_event_t *event)
    /* otherwise generate generic client message event. this would handle*/
    /* netwm, ICCCM, gnomewm, old kde and mwm hint client message protocols */
 
-   if ((ev->type == ECORE_X_ATOM_WM_PROTOCOLS) && (ev->format == 32) && 
-       (ev->data.data32[0] == ECORE_X_ATOM_WM_DELETE_WINDOW)) 
+   if ((ev->type == ECORE_X_ATOM_WM_PROTOCOLS) && (ev->format == 32) &&
+       (ev->data.data32[0] == ECORE_X_ATOM_WM_DELETE_WINDOW))
      {
         Ecore_X_Event_Window_Delete_Request *e;
 
@@ -1341,8 +1355,8 @@ _ecore_xcb_event_handle_client_message(xcb_generic_event_t *event)
         e->time = _ecore_xcb_event_last_time;
         ecore_event_add(ECORE_X_EVENT_WINDOW_DELETE_REQUEST, e, NULL, NULL);
      }
-   else if ((ev->type == ECORE_X_ATOM_NET_WM_MOVERESIZE) && 
-            (ev->format == 32) && (ev->data.data32[2] < 9)) 
+   else if ((ev->type == ECORE_X_ATOM_NET_WM_MOVERESIZE) &&
+            (ev->format == 32) && (ev->data.data32[2] < 9))
      {
         Ecore_X_Event_Window_Move_Resize_Request *e;
 
@@ -1356,7 +1370,7 @@ _ecore_xcb_event_handle_client_message(xcb_generic_event_t *event)
         e->source = ev->data.data32[4];
         ecore_event_add(ECORE_X_EVENT_WINDOW_MOVE_RESIZE_REQUEST, e, NULL, NULL);
      }
-   else if (ev->type == ECORE_X_ATOM_XDND_ENTER) 
+   else if (ev->type == ECORE_X_ATOM_XDND_ENTER)
      {
         Ecore_X_Event_Xdnd_Enter *e;
         Ecore_X_DND_Target *target;
@@ -1368,23 +1382,23 @@ _ecore_xcb_event_handle_client_message(xcb_generic_event_t *event)
         target->source = ev->data.data32[0];
         target->win = ev->window;
         target->version = (int)(ev->data.data32[1] >> 24);
-        if (target->version > ECORE_X_DND_VERSION) 
+        if (target->version > ECORE_X_DND_VERSION)
           {
-             WRN("DND: Requested version %d but we only support up to %d", 
+             WRN("DND: Requested version %d but we only support up to %d",
                  target->version, ECORE_X_DND_VERSION);
              free(e);
              return;
           }
-        if (ev->data.data32[1] & 0x1UL) 
+        if (ev->data.data32[1] & 0x1UL)
           {
              unsigned char *data;
              Ecore_X_Atom *types;
              int num_ret = 0;
 
-             if (!ecore_x_window_prop_property_get(target->source, 
-                                                   ECORE_X_ATOM_XDND_TYPE_LIST, 
-                                                   ECORE_X_ATOM_ATOM, 32, 
-                                                   &data, &num_ret)) 
+             if (!ecore_x_window_prop_property_get(target->source,
+                                                   ECORE_X_ATOM_XDND_TYPE_LIST,
+                                                   ECORE_X_ATOM_ATOM, 32,
+                                                   &data, &num_ret))
                {
                   WRN("DND: Could not fetch data type list from source window");
                   free(e);
@@ -1392,7 +1406,7 @@ _ecore_xcb_event_handle_client_message(xcb_generic_event_t *event)
                }
              types = (Ecore_X_Atom *)data;
              e->types = calloc(num_ret, sizeof(char *));
-             if (e->types) 
+             if (e->types)
                {
                   int i = 0;
 
@@ -1401,16 +1415,16 @@ _ecore_xcb_event_handle_client_message(xcb_generic_event_t *event)
                }
              e->num_types = num_ret;
           }
-        else 
+        else
           {
              int i = 0;
 
              e->types = calloc(3, sizeof(char *));
-             if (e->types) 
+             if (e->types)
                {
-                  while ((i < 3) && (ev->data.data32[i + 2])) 
+                  while ((i < 3) && (ev->data.data32[i + 2]))
                     {
-                       e->types[i] = 
+                       e->types[i] =
                          ecore_x_atom_name_get(ev->data.data32[i + 2]);
                        i++;
                     }
@@ -1420,22 +1434,22 @@ _ecore_xcb_event_handle_client_message(xcb_generic_event_t *event)
 
         e->win = target->win;
         e->source = target->source;
-        ecore_event_add(ECORE_X_EVENT_XDND_ENTER, e, 
+        ecore_event_add(ECORE_X_EVENT_XDND_ENTER, e,
                         _ecore_xcb_event_xdnd_enter_free, NULL);
      }
-   else if (ev->type == ECORE_X_ATOM_XDND_POSITION) 
+   else if (ev->type == ECORE_X_ATOM_XDND_POSITION)
      {
         Ecore_X_Event_Xdnd_Position *e;
         Ecore_X_DND_Target *target;
 
         DBG("Got Xdnd Position Event");
         target = _ecore_xcb_dnd_target_get();
-        if ((target->source != (Ecore_X_Window)ev->data.data32[0]) || 
+        if ((target->source != (Ecore_X_Window)ev->data.data32[0]) ||
             (target->win != ev->window)) return;
         target->pos.x = ev->data.data32[2] >> 16;
         target->pos.y = ev->data.data32[2] & 0xFFFFUL;
         target->action = ev->data.data32[4];
-        target->time = (target->version >= 1) ? 
+        target->time = (target->version >= 1) ?
           (Ecore_X_Time)ev->data.data32[3] : XCB_CURRENT_TIME;
 
         e = calloc(1, sizeof(Ecore_X_Event_Xdnd_Position));
@@ -1447,14 +1461,14 @@ _ecore_xcb_event_handle_client_message(xcb_generic_event_t *event)
         e->action = target->action;
         ecore_event_add(ECORE_X_EVENT_XDND_POSITION, e, NULL, NULL);
      }
-   else if (ev->type == ECORE_X_ATOM_XDND_STATUS) 
+   else if (ev->type == ECORE_X_ATOM_XDND_STATUS)
      {
         Ecore_X_Event_Xdnd_Status *e;
         Ecore_X_DND_Source *source;
 
         DBG("Got Xdnd Status Event");
         source = _ecore_xcb_dnd_source_get();
-        if ((source->win != ev->window) || 
+        if ((source->win != ev->window) ||
             (source->dest != (Ecore_X_Window)ev->data.data32[0]))
           return;
 
@@ -1480,15 +1494,15 @@ _ecore_xcb_event_handle_client_message(xcb_generic_event_t *event)
 
         ecore_event_add(ECORE_X_EVENT_XDND_STATUS, e, NULL, NULL);
      }
-   else if (ev->type == ECORE_X_ATOM_XDND_LEAVE) 
+   else if (ev->type == ECORE_X_ATOM_XDND_LEAVE)
      {
         Ecore_X_Event_Xdnd_Leave *e;
         Ecore_X_DND_Target *target;
 
         DBG("Got Xdnd Leave Event");
         target = _ecore_xcb_dnd_target_get();
-        if ((target->source != (Ecore_X_Window)ev->data.data32[0]) || 
-            (target->win != ev->window)) 
+        if ((target->source != (Ecore_X_Window)ev->data.data32[0]) ||
+            (target->win != ev->window))
           return;
         target->state = ECORE_X_DND_TARGET_IDLE;
         e = calloc(1, sizeof(Ecore_X_Event_Xdnd_Leave));
@@ -1497,17 +1511,17 @@ _ecore_xcb_event_handle_client_message(xcb_generic_event_t *event)
         e->source = (Ecore_X_Window)ev->data.data32[0];
         ecore_event_add(ECORE_X_EVENT_XDND_LEAVE, e, NULL, NULL);
      }
-   else if (ev->type == ECORE_X_ATOM_XDND_DROP) 
+   else if (ev->type == ECORE_X_ATOM_XDND_DROP)
      {
         Ecore_X_Event_Xdnd_Drop *e;
         Ecore_X_DND_Target *target;
 
         DBG("Got Xdnd Drop Event");
         target = _ecore_xcb_dnd_target_get();
-        if ((target->source != (Ecore_X_Window)ev->data.data32[0]) || 
+        if ((target->source != (Ecore_X_Window)ev->data.data32[0]) ||
             (target->win != ev->window))
           return;
-        target->time = (target->version >= 1) ? 
+        target->time = (target->version >= 1) ?
           (Ecore_X_Time)ev->data.data32[2] : _ecore_xcb_event_last_time;
 
         e = calloc(1, sizeof(Ecore_X_Event_Xdnd_Drop));
@@ -1519,7 +1533,7 @@ _ecore_xcb_event_handle_client_message(xcb_generic_event_t *event)
         e->position.y = target->pos.y;
         ecore_event_add(ECORE_X_EVENT_XDND_DROP, e, NULL, NULL);
      }
-   else if (ev->type == ECORE_X_ATOM_XDND_FINISHED) 
+   else if (ev->type == ECORE_X_ATOM_XDND_FINISHED)
      {
         Ecore_X_Event_Xdnd_Finished *e;
         Ecore_X_DND_Source *source;
@@ -1527,19 +1541,19 @@ _ecore_xcb_event_handle_client_message(xcb_generic_event_t *event)
 
         DBG("Got Xdnd Finished Event");
         source = _ecore_xcb_dnd_source_get();
-        if ((source->win != ev->window) || 
+        if ((source->win != ev->window) ||
             (source->dest != (Ecore_X_Window)ev->data.data32[0]))
           return;
-        if ((source->version < 5) || (ev->data.data32[1] & 0x1UL)) 
+        if ((source->version < 5) || (ev->data.data32[1] & 0x1UL))
           {
              ecore_x_selection_xdnd_clear();
              source->state = ECORE_X_DND_SOURCE_IDLE;
           }
-        else if (source->version >= 5) 
+        else if (source->version >= 5)
           {
              completed = EINA_FALSE;
              source->state = ECORE_X_DND_SOURCE_CONVERTING;
-             /* FIXME: Probably need to add a timer to switch back to idle 
+             /* FIXME: Probably need to add a timer to switch back to idle
               * and discard the selection data */
           }
 
@@ -1548,19 +1562,19 @@ _ecore_xcb_event_handle_client_message(xcb_generic_event_t *event)
         e->win = source->win;
         e->target = source->dest;
         e->completed = completed;
-        if (source->version >= 5) 
+        if (source->version >= 5)
           {
              source->accepted_action = ev->data.data32[2];
              e->action = source->accepted_action;
           }
-        else 
+        else
           {
              source->accepted_action = 0;
              e->action = source->action;
           }
         ecore_event_add(ECORE_X_EVENT_XDND_FINISHED, e, NULL, NULL);
      }
-   else if (ev->type == ECORE_X_ATOM_NET_WM_STATE) 
+   else if (ev->type == ECORE_X_ATOM_NET_WM_STATE)
      {
         Ecore_X_Event_Window_State_Request *e;
 
@@ -1573,18 +1587,18 @@ _ecore_xcb_event_handle_client_message(xcb_generic_event_t *event)
           e->action = ECORE_X_WINDOW_STATE_ACTION_ADD;
         else if (ev->data.data32[0] == 2)
           e->action = ECORE_X_WINDOW_STATE_ACTION_TOGGLE;
-        else 
+        else
           {
              free(e);
              return;
           }
         e->state[0] = _ecore_xcb_netwm_window_state_get(ev->data.data32[1]);
-        if (e->state[0] == ECORE_X_WINDOW_STATE_UNKNOWN) 
+        if (e->state[0] == ECORE_X_WINDOW_STATE_UNKNOWN)
           {
              /* FIXME */
           }
         e->state[1] = _ecore_xcb_netwm_window_state_get(ev->data.data32[2]);
-        if (e->state[1] == ECORE_X_WINDOW_STATE_UNKNOWN) 
+        if (e->state[1] == ECORE_X_WINDOW_STATE_UNKNOWN)
           {
              /* FIXME */
           }
@@ -1592,11 +1606,11 @@ _ecore_xcb_event_handle_client_message(xcb_generic_event_t *event)
         ecore_event_add(ECORE_X_EVENT_WINDOW_STATE_REQUEST, e, NULL, NULL);
      }
 #ifdef OLD_XCB_VERSION
-   else if ((ev->type == ECORE_X_ATOM_WM_CHANGE_STATE) && 
-            (ev->format == 32) && (ev->data.data32[0] == XCB_WM_STATE_ICONIC)) 
+   else if ((ev->type == ECORE_X_ATOM_WM_CHANGE_STATE) &&
+            (ev->format == 32) && (ev->data.data32[0] == XCB_WM_STATE_ICONIC))
 #else
-   else if ((ev->type == ECORE_X_ATOM_WM_CHANGE_STATE) && (ev->format == 32) && 
-            (ev->data.data32[0] == XCB_ICCCM_WM_STATE_ICONIC)) 
+   else if ((ev->type == ECORE_X_ATOM_WM_CHANGE_STATE) && (ev->format == 32) &&
+            (ev->data.data32[0] == XCB_ICCCM_WM_STATE_ICONIC))
 #endif
      {
         Ecore_X_Event_Window_State_Request *e;
@@ -1608,7 +1622,7 @@ _ecore_xcb_event_handle_client_message(xcb_generic_event_t *event)
         e->state[0] = ECORE_X_WINDOW_STATE_ICONIFIED;
         ecore_event_add(ECORE_X_EVENT_WINDOW_STATE_REQUEST, e, NULL, NULL);
      }
-   else if ((ev->type == ECORE_X_ATOM_NET_WM_DESKTOP) && (ev->format == 32)) 
+   else if ((ev->type == ECORE_X_ATOM_NET_WM_DESKTOP) && (ev->format == 32))
      {
         Ecore_X_Event_Desktop_Change *e;
 
@@ -1619,7 +1633,7 @@ _ecore_xcb_event_handle_client_message(xcb_generic_event_t *event)
         e->source = ev->data.data32[1];
         ecore_event_add(ECORE_X_EVENT_DESKTOP_CHANGE, e, NULL, NULL);
      }
-   else if (ev->type == ECORE_X_ATOM_NET_REQUEST_FRAME_EXTENTS) 
+   else if (ev->type == ECORE_X_ATOM_NET_REQUEST_FRAME_EXTENTS)
      {
         Ecore_X_Event_Frame_Extents_Request *e;
 
@@ -1628,9 +1642,9 @@ _ecore_xcb_event_handle_client_message(xcb_generic_event_t *event)
         e->win = ev->window;
         ecore_event_add(ECORE_X_EVENT_FRAME_EXTENTS_REQUEST, e, NULL, NULL);
      }
-   else if ((ev->type == ECORE_X_ATOM_WM_PROTOCOLS) && 
-            ((Ecore_X_Atom)ev->data.data32[0] == ECORE_X_ATOM_NET_WM_PING) && 
-            (ev->format == 32)) 
+   else if ((ev->type == ECORE_X_ATOM_WM_PROTOCOLS) &&
+            ((Ecore_X_Atom)ev->data.data32[0] == ECORE_X_ATOM_NET_WM_PING) &&
+            (ev->format == 32))
      {
         Ecore_X_Event_Ping *e;
         Ecore_X_Window root = 0;
@@ -1645,39 +1659,39 @@ _ecore_xcb_event_handle_client_message(xcb_generic_event_t *event)
         CHECK_XCB_CONN;
 
         count = xcb_setup_roots_length(xcb_get_setup(_ecore_xcb_conn));
-        if (count > 1) 
+        if (count > 1)
           root = ecore_x_window_root_get(e->win);
-        else 
+        else
           root = ((xcb_screen_t *)_ecore_xcb_screen)->root;
 
-        if (ev->window != root) 
+        if (ev->window != root)
           {
              ev->window = root;
-             xcb_send_event(_ecore_xcb_conn, 0, root, 
-                            (XCB_EVENT_MASK_SUBSTRUCTURE_REDIRECT | 
-                                XCB_EVENT_MASK_SUBSTRUCTURE_NOTIFY), 
+             xcb_send_event(_ecore_xcb_conn, 0, root,
+                            (XCB_EVENT_MASK_SUBSTRUCTURE_REDIRECT |
+                             XCB_EVENT_MASK_SUBSTRUCTURE_NOTIFY),
                             (const char *)&ev);
 //             ecore_x_flush();
           }
      }
-   else if ((ev->type == ECORE_X_ATOM_NET_STARTUP_INFO_BEGIN) && 
-            (ev->format == 8)) 
+   else if ((ev->type == ECORE_X_ATOM_NET_STARTUP_INFO_BEGIN) &&
+            (ev->format == 8))
      {
         _ecore_xcb_netwm_startup_info_begin(ev->window, ev->data.data8[0]);
      }
-   else if ((ev->type == ECORE_X_ATOM_NET_STARTUP_INFO) && (ev->format == 8)) 
+   else if ((ev->type == ECORE_X_ATOM_NET_STARTUP_INFO) && (ev->format == 8))
      {
         _ecore_xcb_netwm_startup_info(ev->window, ev->data.data8[0]);
      }
-   else if ((ev->type == 27777) && (ev->data.data32[0] == 0x7162534) && 
-            (ev->format == 32)) // && (ev->window = _private_window)) 
+   else if ((ev->type == 27777) && (ev->data.data32[0] == 0x7162534) &&
+            (ev->format == 32)) // && (ev->window = _private_window))
      {
         if (ev->data.data32[1] == 0x10000001)
           _ecore_xcb_window_button_grab_remove(ev->data.data32[2]);
-        else if (ev->data.data32[1] == 0x10000002) 
+        else if (ev->data.data32[1] == 0x10000002)
           _ecore_xcb_window_key_grab_remove(ev->data.data32[2]);
      }
-   else 
+   else
      {
         Ecore_X_Event_Client_Message *e;
         int i = 0;
@@ -1694,8 +1708,8 @@ _ecore_xcb_event_handle_client_message(xcb_generic_event_t *event)
      }
 }
 
-static void 
-_ecore_xcb_event_handle_mapping_notify(xcb_generic_event_t *event) 
+static void
+_ecore_xcb_event_handle_mapping_notify(xcb_generic_event_t *event)
 {
    xcb_mapping_notify_event_t *ev;
    Ecore_X_Event_Mapping_Change *e;
@@ -1707,15 +1721,17 @@ _ecore_xcb_event_handle_mapping_notify(xcb_generic_event_t *event)
 
    _ecore_xcb_keymap_refresh(ev);
    _ecore_xcb_modifiers_get();
-   
-   switch (ev->request) 
+
+   switch (ev->request)
      {
       case XCB_MAPPING_MODIFIER:
         e->type = ECORE_X_MAPPING_MODIFIER;
         break;
+
       case XCB_MAPPING_KEYBOARD:
         e->type = ECORE_X_MAPPING_KEYBOARD;
         break;
+
       case XCB_MAPPING_POINTER:
       default:
         e->type = ECORE_X_MAPPING_MOUSE;
@@ -1727,8 +1743,8 @@ _ecore_xcb_event_handle_mapping_notify(xcb_generic_event_t *event)
    ecore_event_add(ECORE_X_EVENT_MAPPING_CHANGE, e, NULL, NULL);
 }
 
-static void 
-_ecore_xcb_event_handle_damage_notify(xcb_generic_event_t *event) 
+static void
+_ecore_xcb_event_handle_damage_notify(xcb_generic_event_t *event)
 {
 #ifdef ECORE_XCB_DAMAGE
    xcb_damage_notify_event_t *ev;
@@ -1759,8 +1775,8 @@ _ecore_xcb_event_handle_damage_notify(xcb_generic_event_t *event)
 #endif
 }
 
-static void 
-_ecore_xcb_event_handle_randr_change(xcb_generic_event_t *event) 
+static void
+_ecore_xcb_event_handle_randr_change(xcb_generic_event_t *event)
 {
 #ifdef ECORE_XCB_RANDR
    xcb_randr_screen_change_notify_event_t *ev;
@@ -1787,8 +1803,8 @@ _ecore_xcb_event_handle_randr_change(xcb_generic_event_t *event)
 #endif
 }
 
-static void 
-_ecore_xcb_event_handle_randr_notify(xcb_generic_event_t *event) 
+static void
+_ecore_xcb_event_handle_randr_notify(xcb_generic_event_t *event)
 {
 #ifdef ECORE_XCB_RANDR
    xcb_randr_notify_event_t *ev;
@@ -1797,25 +1813,28 @@ _ecore_xcb_event_handle_randr_notify(xcb_generic_event_t *event)
    _ecore_xcb_event_last_mouse_move = EINA_FALSE;
 #ifdef ECORE_XCB_RANDR
    ev = (xcb_randr_notify_event_t *)event;
-   switch (ev->subCode) 
+   switch (ev->subCode)
      {
       case XCB_RANDR_NOTIFY_CRTC_CHANGE:
         _ecore_xcb_event_handle_randr_crtc_change(event);
         break;
+
       case XCB_RANDR_NOTIFY_OUTPUT_CHANGE:
         _ecore_xcb_event_handle_randr_output_change(event);
         break;
+
       case XCB_RANDR_NOTIFY_OUTPUT_PROPERTY:
         _ecore_xcb_event_handle_randr_output_property_change(event);
         break;
+
       default:
         break;
      }
 #endif
 }
 
-static void 
-_ecore_xcb_event_handle_randr_crtc_change(xcb_generic_event_t *event) 
+static void
+_ecore_xcb_event_handle_randr_crtc_change(xcb_generic_event_t *event)
 {
 #ifdef ECORE_XCB_RANDR
    xcb_randr_notify_event_t *ev;
@@ -1840,8 +1859,8 @@ _ecore_xcb_event_handle_randr_crtc_change(xcb_generic_event_t *event)
 #endif
 }
 
-static void 
-_ecore_xcb_event_handle_randr_output_change(xcb_generic_event_t *event) 
+static void
+_ecore_xcb_event_handle_randr_output_change(xcb_generic_event_t *event)
 {
 #ifdef ECORE_XCB_RANDR
    xcb_randr_notify_event_t *ev;
@@ -1865,8 +1884,8 @@ _ecore_xcb_event_handle_randr_output_change(xcb_generic_event_t *event)
 #endif
 }
 
-static void 
-_ecore_xcb_event_handle_randr_output_property_change(xcb_generic_event_t *event) 
+static void
+_ecore_xcb_event_handle_randr_output_property_change(xcb_generic_event_t *event)
 {
 #ifdef ECORE_XCB_RANDR
    xcb_randr_notify_event_t *ev;
@@ -1891,8 +1910,8 @@ _ecore_xcb_event_handle_randr_output_property_change(xcb_generic_event_t *event)
 #endif
 }
 
-static void 
-_ecore_xcb_event_handle_screensaver_notify(xcb_generic_event_t *event) 
+static void
+_ecore_xcb_event_handle_screensaver_notify(xcb_generic_event_t *event)
 {
 #ifdef ECORE_XCB_SCREENSAVER
    xcb_screensaver_notify_event_t *ev;
@@ -1914,8 +1933,8 @@ _ecore_xcb_event_handle_screensaver_notify(xcb_generic_event_t *event)
 }
 
 #ifdef ECORE_XCB_SHAPE
-static void 
-_ecore_xcb_event_handle_shape_change(xcb_generic_event_t *event) 
+static void
+_ecore_xcb_event_handle_shape_change(xcb_generic_event_t *event)
 {
    xcb_shape_notify_event_t *ev;
    Ecore_X_Event_Window_Shape *e;
@@ -1926,17 +1945,20 @@ _ecore_xcb_event_handle_shape_change(xcb_generic_event_t *event)
 
    e->win = ev->affected_window;
    e->time = ev->server_time;
-   switch (ev->shape_kind) 
+   switch (ev->shape_kind)
      {
       case XCB_SHAPE_SK_BOUNDING:
         e->type = ECORE_X_SHAPE_BOUNDING;
         break;
+
       case XCB_SHAPE_SK_CLIP:
         e->type = ECORE_X_SHAPE_CLIP;
         break;
+
       case XCB_SHAPE_SK_INPUT:
         e->type = ECORE_X_SHAPE_INPUT;
         break;
+
       default:
         break;
      }
@@ -1948,10 +1970,11 @@ _ecore_xcb_event_handle_shape_change(xcb_generic_event_t *event)
 
    ecore_event_add(ECORE_X_EVENT_WINDOW_SHAPE, e, NULL, NULL);
 }
+
 #endif
 
-static void 
-_ecore_xcb_event_handle_sync_counter(xcb_generic_event_t *event) 
+static void
+_ecore_xcb_event_handle_sync_counter(xcb_generic_event_t *event)
 {
 #ifdef ECORE_XCB_SYNC
    xcb_sync_counter_notify_event_t *ev;
@@ -1970,8 +1993,8 @@ _ecore_xcb_event_handle_sync_counter(xcb_generic_event_t *event)
 #endif
 }
 
-static void 
-_ecore_xcb_event_handle_sync_alarm(xcb_generic_event_t *event) 
+static void
+_ecore_xcb_event_handle_sync_alarm(xcb_generic_event_t *event)
 {
 #ifdef ECORE_XCB_SYNC
    xcb_sync_alarm_notify_event_t *ev;
@@ -1990,8 +2013,8 @@ _ecore_xcb_event_handle_sync_alarm(xcb_generic_event_t *event)
 #endif
 }
 
-static void 
-_ecore_xcb_event_handle_xfixes_selection_notify(xcb_generic_event_t *event) 
+static void
+_ecore_xcb_event_handle_xfixes_selection_notify(xcb_generic_event_t *event)
 {
 #ifdef ECORE_XCB_XFIXES
    Ecore_X_Event_Fixes_Selection_Notify *e;
@@ -2024,15 +2047,15 @@ _ecore_xcb_event_handle_xfixes_selection_notify(xcb_generic_event_t *event)
 #endif
 }
 
-static void 
-_ecore_xcb_event_handle_xfixes_cursor_notify(xcb_generic_event_t *event __UNUSED__) 
+static void
+_ecore_xcb_event_handle_xfixes_cursor_notify(xcb_generic_event_t *event __UNUSED__)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
 //  FIXME: TBD
 }
 
-static void 
-_ecore_xcb_event_handle_generic_event(xcb_generic_event_t *event) 
+static void
+_ecore_xcb_event_handle_generic_event(xcb_generic_event_t *event)
 {
    xcb_ge_event_t *ev;
    Ecore_X_Event_Generic *e;
@@ -2043,7 +2066,7 @@ _ecore_xcb_event_handle_generic_event(xcb_generic_event_t *event)
    if (ev->pad0 == _ecore_xcb_event_input)
      {
         _ecore_xcb_event_handle_input_event(event);
-// FIXME: should we generate generic events as WELL as input events?        
+// FIXME: should we generate generic events as WELL as input events?
 //        return;
      }
 
@@ -2053,9 +2076,9 @@ _ecore_xcb_event_handle_generic_event(xcb_generic_event_t *event)
    DBG("Handle Generic Event: %d", ev->event_type);
 
    e->cookie = ev->sequence;
-   /* NB: These are bugs in xcb ge_event structure. The struct should have a 
-    * field for extension & data, but does not. 
-    * 
+   /* NB: These are bugs in xcb ge_event structure. The struct should have a
+    * field for extension & data, but does not.
+    *
     * XCB people have been notified of this issue */
    e->extension = ev->pad0;
    /* e->data = ev->pad1; */
@@ -2068,20 +2091,20 @@ _ecore_xcb_event_handle_generic_event(xcb_generic_event_t *event)
 
    e->evtype = ev->event_type;
 
-   ecore_event_add(ECORE_X_EVENT_GENERIC, e, 
+   ecore_event_add(ECORE_X_EVENT_GENERIC, e,
                    _ecore_xcb_event_generic_event_free, e->data);
 }
 
-static void 
-_ecore_xcb_event_handle_input_event(xcb_generic_event_t *event) 
+static void
+_ecore_xcb_event_handle_input_event(xcb_generic_event_t *event)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
 
    _ecore_xcb_input_handle_event(event);
 }
 
-static void 
-_ecore_xcb_event_key_press(xcb_generic_event_t *event) 
+static void
+_ecore_xcb_event_key_press(xcb_generic_event_t *event)
 {
    Ecore_Event_Key *e;
    xcb_keysym_t sym = XCB_NO_SYMBOL;
@@ -2099,7 +2122,7 @@ _ecore_xcb_event_key_press(xcb_generic_event_t *event)
 
    sym = _ecore_xcb_keymap_keycode_to_keysym(keycode, xevent->state);
    keyname = _ecore_xcb_keymap_keysym_to_string(sym);
-   if (!keyname) 
+   if (!keyname)
      {
         char buff[256];
 
@@ -2107,13 +2130,13 @@ _ecore_xcb_event_key_press(xcb_generic_event_t *event)
         keyname = buff;
      }
 
-   val = 
-     _ecore_xcb_keymap_lookup_string(keycode, xevent->state, compose_buffer, 
+   val =
+     _ecore_xcb_keymap_lookup_string(keycode, xevent->state, compose_buffer,
                                      sizeof(compose_buffer), &sym);
-   if (val > 0) 
+   if (val > 0)
      {
         compose_buffer[val] = 0;
-        compose = 
+        compose =
           eina_str_convert(nl_langinfo(CODESET), "UTF-8", compose_buffer);
 //        tmp = compose;
      }
@@ -2121,9 +2144,9 @@ _ecore_xcb_event_key_press(xcb_generic_event_t *event)
    key = _ecore_xcb_keymap_keysym_to_string(sym);
    if (!key) key = keyname;
 
-   e = malloc(sizeof(Ecore_Event_Key) + strlen(key) + strlen(keyname) + 
+   e = malloc(sizeof(Ecore_Event_Key) + strlen(key) + strlen(keyname) +
               (compose ? strlen(compose) : 0) + 3);
-   if (e) 
+   if (e)
      {
         e->keyname = (char *)(e + 1);
         e->key = e->keyname + strlen(keyname) + 1;
@@ -2149,8 +2172,8 @@ _ecore_xcb_event_key_press(xcb_generic_event_t *event)
    _ecore_xcb_event_last_time = xevent->time;
 }
 
-static void 
-_ecore_xcb_event_key_release(xcb_generic_event_t *event) 
+static void
+_ecore_xcb_event_key_release(xcb_generic_event_t *event)
 {
    Ecore_Event_Key *e;
    xcb_keysym_t sym = XCB_NO_SYMBOL;
@@ -2168,7 +2191,7 @@ _ecore_xcb_event_key_release(xcb_generic_event_t *event)
 
    sym = _ecore_xcb_keymap_keycode_to_keysym(keycode, xevent->state);
    keyname = _ecore_xcb_keymap_keysym_to_string(sym);
-   if (!keyname) 
+   if (!keyname)
      {
         char buff[256];
 
@@ -2176,13 +2199,13 @@ _ecore_xcb_event_key_release(xcb_generic_event_t *event)
         keyname = buff;
      }
 
-   val = 
-     _ecore_xcb_keymap_lookup_string(keycode, xevent->state, compose_buffer, 
+   val =
+     _ecore_xcb_keymap_lookup_string(keycode, xevent->state, compose_buffer,
                                      sizeof(compose_buffer), &sym);
-   if (val > 0) 
+   if (val > 0)
      {
         compose_buffer[val] = 0;
-        compose = 
+        compose =
           eina_str_convert(nl_langinfo(CODESET), "UTF-8", compose_buffer);
 //        tmp = compose;
      }
@@ -2190,9 +2213,9 @@ _ecore_xcb_event_key_release(xcb_generic_event_t *event)
    key = _ecore_xcb_keymap_keysym_to_string(sym);
    if (!key) key = keyname;
 
-   e = malloc(sizeof(Ecore_Event_Key) + strlen(key) + strlen(keyname) + 
+   e = malloc(sizeof(Ecore_Event_Key) + strlen(key) + strlen(keyname) +
               (compose ? strlen(compose) : 0) + 3);
-   if (e) 
+   if (e)
      {
         e->keyname = (char *)(e + 1);
         e->key = e->keyname + strlen(keyname) + 1;
@@ -2217,8 +2240,26 @@ _ecore_xcb_event_key_release(xcb_generic_event_t *event)
    _ecore_xcb_event_last_time = xevent->time;
 }
 
-void 
-_ecore_xcb_event_mouse_move(uint16_t timestamp, uint16_t modifiers, int16_t x, int16_t y, int16_t root_x, int16_t root_y, xcb_window_t event_win, xcb_window_t win, xcb_window_t root_win, uint8_t same_screen, int dev, double radx, double rady, double pressure, double angle, int16_t mx, int16_t my, int16_t mrx, int16_t mry) 
+void
+_ecore_xcb_event_mouse_move(uint16_t     timestamp,
+                            uint16_t     modifiers,
+                            int16_t      x,
+                            int16_t      y,
+                            int16_t      root_x,
+                            int16_t      root_y,
+                            xcb_window_t event_win,
+                            xcb_window_t win,
+                            xcb_window_t root_win,
+                            uint8_t      same_screen,
+                            int          dev,
+                            double       radx,
+                            double       rady,
+                            double       pressure,
+                            double       angle,
+                            int16_t      mx,
+                            int16_t      my,
+                            int16_t      mrx,
+                            int16_t      mry)
 {
    Ecore_Event_Mouse_Move *e;
    Ecore_Event *event;
@@ -2246,7 +2287,7 @@ _ecore_xcb_event_mouse_move(uint16_t timestamp, uint16_t modifiers, int16_t x, i
    e->multi.root.x = mrx;
    e->multi.root.y = mry;
 
-   event = ecore_event_add(ECORE_EVENT_MOUSE_MOVE, e, 
+   event = ecore_event_add(ECORE_EVENT_MOUSE_MOVE, e,
                            _ecore_xcb_event_mouse_move_free, NULL);
 
    _ecore_xcb_event_last_time = e->timestamp;
@@ -2256,13 +2297,14 @@ _ecore_xcb_event_mouse_move(uint16_t timestamp, uint16_t modifiers, int16_t x, i
 //   _ecore_xcb_event_last_mouse_move_event = event;
 }
 
-static void 
-_ecore_xcb_event_mouse_move_free(void *data __UNUSED__, void *event) 
+static void
+_ecore_xcb_event_mouse_move_free(void *data __UNUSED__,
+                                 void *event)
 {
    Ecore_Event_Mouse_Move *ev;
 
    ev = event;
-//   if (_ecore_xcb_event_last_mouse_move_event) 
+//   if (_ecore_xcb_event_last_mouse_move_event)
 //     {
 //        _ecore_xcb_event_last_mouse_move = EINA_FALSE;
 //        _ecore_xcb_event_last_mouse_move_event = NULL;
@@ -2271,7 +2313,27 @@ _ecore_xcb_event_mouse_move_free(void *data __UNUSED__, void *event)
 }
 
 Ecore_Event_Mouse_Button *
-_ecore_xcb_event_mouse_button(int event, uint16_t timestamp, uint16_t modifiers, xcb_button_t buttons, int16_t x, int16_t y, int16_t root_x, int16_t root_y, xcb_window_t event_win, xcb_window_t win, xcb_window_t root_win, uint8_t same_screen, int dev, double radx, double rady, double pressure, double angle, int16_t mx, int16_t my, int16_t mrx, int16_t mry) 
+_ecore_xcb_event_mouse_button(int          event,
+                              uint16_t     timestamp,
+                              uint16_t     modifiers,
+                              xcb_button_t buttons,
+                              int16_t      x,
+                              int16_t      y,
+                              int16_t      root_x,
+                              int16_t      root_y,
+                              xcb_window_t event_win,
+                              xcb_window_t win,
+                              xcb_window_t root_win,
+                              uint8_t      same_screen,
+                              int          dev,
+                              double       radx,
+                              double       rady,
+                              double       pressure,
+                              double       angle,
+                              int16_t      mx,
+                              int16_t      my,
+                              int16_t      mrx,
+                              int16_t      mry)
 {
    Ecore_Event_Mouse_Button *e;
    Ecore_X_Mouse_Down_Info *info = NULL;
@@ -2292,9 +2354,9 @@ _ecore_xcb_event_mouse_button(int event, uint16_t timestamp, uint16_t modifiers,
    e->root.x = root_x;
    e->root.y = root_y;
 
-   if ((info = _ecore_xcb_event_mouse_down_info_get(dev))) 
+   if ((info = _ecore_xcb_event_mouse_down_info_get(dev)))
      {
-        if ((event == ECORE_EVENT_MOUSE_BUTTON_DOWN) && 
+        if ((event == ECORE_EVENT_MOUSE_BUTTON_DOWN) &&
             (info->did_triple))
           {
              info->last_win = 0;
@@ -2303,37 +2365,37 @@ _ecore_xcb_event_mouse_button(int event, uint16_t timestamp, uint16_t modifiers,
              info->last_time = 0;
              info->last_last_time = 0;
           }
-        if (event_win == win) 
+        if (event_win == win)
           {
-             if (event == ECORE_EVENT_MOUSE_BUTTON_DOWN) 
+             if (event == ECORE_EVENT_MOUSE_BUTTON_DOWN)
                {
-                  if (((int)(timestamp - info->last_time) <= 
-                       (int)(1000 * _ecore_xcb_double_click_time)) && 
-                      (win == info->last_win) && 
-                      (event_win == info->last_event_win)) 
+                  if (((int)(timestamp - info->last_time) <=
+                       (int)(1000 * _ecore_xcb_double_click_time)) &&
+                      (win == info->last_win) &&
+                      (event_win == info->last_event_win))
                     {
                        e->double_click = 1;
                        info->did_double = EINA_TRUE;
                     }
-                  else 
+                  else
                     {
                        info->did_double = EINA_FALSE;
                        info->did_triple = EINA_FALSE;
                     }
-                  if (((int)(timestamp - info->last_last_time) <= 
-                       (int)(2 * 1000 * _ecore_xcb_double_click_time)) && 
-                      (win == info->last_win) && 
-                      (win == info->last_last_win) && 
-                      (event_win == info->last_event_win) && 
+                  if (((int)(timestamp - info->last_last_time) <=
+                       (int)(2 * 1000 * _ecore_xcb_double_click_time)) &&
+                      (win == info->last_win) &&
+                      (win == info->last_last_win) &&
+                      (event_win == info->last_event_win) &&
                       (event_win == info->last_last_event_win))
                     {
                        e->triple_click = 1;
                        info->did_triple = EINA_TRUE;
                     }
-                  else 
+                  else
                     info->did_triple = EINA_FALSE;
                }
-             else 
+             else
                {
                   if (info->did_double) e->double_click = 1;
                   if (info->did_triple) e->triple_click = 1;
@@ -2366,8 +2428,8 @@ _ecore_xcb_event_mouse_button(int event, uint16_t timestamp, uint16_t modifiers,
 
    ecore_event_add(event, e, NULL, NULL);
 
-   if ((info) && (event == ECORE_EVENT_MOUSE_BUTTON_DOWN) && 
-       (win == event_win) && (!info->did_triple)) 
+   if ((info) && (event == ECORE_EVENT_MOUSE_BUTTON_DOWN) &&
+       (win == event_win) && (!info->did_triple))
      {
         info->last_last_win = info->last_win;
         info->last_win = win;
@@ -2380,51 +2442,63 @@ _ecore_xcb_event_mouse_button(int event, uint16_t timestamp, uint16_t modifiers,
    return e;
 }
 
-static Ecore_X_Event_Mode 
-_ecore_xcb_event_mode_get(uint8_t mode) 
+static Ecore_X_Event_Mode
+_ecore_xcb_event_mode_get(uint8_t mode)
 {
-   switch (mode) 
+   switch (mode)
      {
       case XCB_NOTIFY_MODE_NORMAL:
         return ECORE_X_EVENT_MODE_NORMAL;
+
       case XCB_NOTIFY_MODE_WHILE_GRABBED:
         return ECORE_X_EVENT_MODE_WHILE_GRABBED;
+
       case XCB_NOTIFY_MODE_GRAB:
         return ECORE_X_EVENT_MODE_GRAB;
+
       case XCB_NOTIFY_MODE_UNGRAB:
         return ECORE_X_EVENT_MODE_UNGRAB;
+
       default:
         return ECORE_X_EVENT_MODE_NORMAL;
      }
 }
 
-static Ecore_X_Event_Detail 
-_ecore_xcb_event_detail_get(uint8_t detail) 
+static Ecore_X_Event_Detail
+_ecore_xcb_event_detail_get(uint8_t detail)
 {
-   switch (detail) 
+   switch (detail)
      {
       case XCB_NOTIFY_DETAIL_ANCESTOR:
         return ECORE_X_EVENT_DETAIL_ANCESTOR;
+
       case XCB_NOTIFY_DETAIL_VIRTUAL:
         return ECORE_X_EVENT_DETAIL_VIRTUAL;
+
       case XCB_NOTIFY_DETAIL_INFERIOR:
         return ECORE_X_EVENT_DETAIL_INFERIOR;
+
       case XCB_NOTIFY_DETAIL_NONLINEAR:
         return ECORE_X_EVENT_DETAIL_NON_LINEAR;
+
       case XCB_NOTIFY_DETAIL_NONLINEAR_VIRTUAL:
         return ECORE_X_EVENT_DETAIL_NON_LINEAR_VIRTUAL;
+
       case XCB_NOTIFY_DETAIL_POINTER:
         return ECORE_X_EVENT_DETAIL_POINTER;
+
       case XCB_NOTIFY_DETAIL_POINTER_ROOT:
         return ECORE_X_EVENT_DETAIL_POINTER_ROOT;
+
       case XCB_NOTIFY_DETAIL_NONE:
       default:
         return ECORE_X_EVENT_DETAIL_ANCESTOR;
      }
 }
 
-static void 
-_ecore_xcb_event_xdnd_enter_free(void *data __UNUSED__, void *event) 
+static void
+_ecore_xcb_event_xdnd_enter_free(void *data __UNUSED__,
+                                 void *event)
 {
    Ecore_X_Event_Xdnd_Enter *e;
    int i = 0;
@@ -2436,8 +2510,9 @@ _ecore_xcb_event_xdnd_enter_free(void *data __UNUSED__, void *event)
    free(e);
 }
 
-static void 
-_ecore_xcb_event_selection_notify_free(void *data __UNUSED__, void *event) 
+static void
+_ecore_xcb_event_selection_notify_free(void *data __UNUSED__,
+                                       void *event)
 {
    Ecore_X_Event_Selection_Notify *e;
    Ecore_X_Selection_Data *sel;
@@ -2449,8 +2524,9 @@ _ecore_xcb_event_selection_notify_free(void *data __UNUSED__, void *event)
    free(e);
 }
 
-static void 
-_ecore_xcb_event_generic_event_free(void *data, void *event) 
+static void
+_ecore_xcb_event_generic_event_free(void *data,
+                                    void *event)
 {
    Ecore_X_Event_Generic *e;
 
@@ -2459,14 +2535,14 @@ _ecore_xcb_event_generic_event_free(void *data, void *event)
    free(e);
 }
 
-static void 
-_ecore_xcb_event_mouse_down_info_clear(void) 
+static void
+_ecore_xcb_event_mouse_down_info_clear(void)
 {
    Eina_Inlist *l;
    Ecore_X_Mouse_Down_Info *info = NULL;
 
    l = _ecore_xcb_mouse_down_info_list;
-   while (l) 
+   while (l)
      {
         info = EINA_INLIST_CONTAINER_GET(l, Ecore_X_Mouse_Down_Info);
         l = eina_inlist_remove(l, l);
@@ -2476,7 +2552,7 @@ _ecore_xcb_event_mouse_down_info_clear(void)
 }
 
 static Ecore_X_Mouse_Down_Info *
-_ecore_xcb_event_mouse_down_info_get(int dev) 
+_ecore_xcb_event_mouse_down_info_get(int dev)
 {
    Eina_Inlist *l;
    Ecore_X_Mouse_Down_Info *info = NULL;
@@ -2493,3 +2569,4 @@ _ecore_xcb_event_mouse_down_info_get(int dev)
 
    return info;
 }
+
index 7a73f2b..511a591 100644 (file)
@@ -1,7 +1,7 @@
 #include "ecore_xcb_private.h"
 
-void 
-_ecore_xcb_extensions_init(void) 
+void
+_ecore_xcb_extensions_init(void)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
 
@@ -71,8 +71,8 @@ _ecore_xcb_extensions_init(void)
    xcb_prefetch_maximum_request_length(_ecore_xcb_conn);
 }
 
-void 
-_ecore_xcb_extensions_finalize(void) 
+void
+_ecore_xcb_extensions_finalize(void)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
 
@@ -137,3 +137,4 @@ _ecore_xcb_extensions_finalize(void)
 
    xcb_get_maximum_request_length(_ecore_xcb_conn);
 }
+
index ae52e6f..d811b54 100644 (file)
  *                   same than the corresponding bitmaks.
  * @return The new default graphics context.
  */
-EAPI Ecore_X_GC 
-ecore_x_gc_new(Ecore_X_Drawable drawable, Ecore_X_GC_Value_Mask value_mask, const unsigned int *value_list) 
+EAPI Ecore_X_GC
+ecore_x_gc_new(Ecore_X_Drawable      drawable,
+               Ecore_X_GC_Value_Mask value_mask,
+               const unsigned int   *value_list)
 {
    xcb_gcontext_t gc;
    uint32_t vmask = 0;
@@ -22,76 +24,98 @@ ecore_x_gc_new(Ecore_X_Drawable drawable, Ecore_X_GC_Value_Mask value_mask, cons
 
    if (!drawable) drawable = ((xcb_screen_t *)_ecore_xcb_screen)->root;
 
-   for (i = 0, mask = 1; i <= 22; i++, mask <<= 1) 
+   for (i = 0, mask = 1; i <= 22; i++, mask <<= 1)
      {
-        switch (mask & value_mask) 
+        switch (mask & value_mask)
           {
            case ECORE_X_GC_VALUE_MASK_FUNCTION:
              vmask |= XCB_GC_FUNCTION;
              break;
+
            case ECORE_X_GC_VALUE_MASK_PLANE_MASK:
              vmask |= XCB_GC_PLANE_MASK;
              break;
+
            case ECORE_X_GC_VALUE_MASK_FOREGROUND:
              vmask |= XCB_GC_FOREGROUND;
              break;
+
            case ECORE_X_GC_VALUE_MASK_BACKGROUND:
              vmask |= XCB_GC_BACKGROUND;
              break;
+
            case ECORE_X_GC_VALUE_MASK_LINE_WIDTH:
              vmask |= XCB_GC_LINE_WIDTH;
              break;
+
            case ECORE_X_GC_VALUE_MASK_LINE_STYLE:
              vmask |= XCB_GC_LINE_STYLE;
              break;
+
            case ECORE_X_GC_VALUE_MASK_CAP_STYLE:
              vmask |= XCB_GC_CAP_STYLE;
              break;
+
            case ECORE_X_GC_VALUE_MASK_JOIN_STYLE:
              vmask |= XCB_GC_JOIN_STYLE;
              break;
+
            case ECORE_X_GC_VALUE_MASK_FILL_STYLE:
              vmask |= XCB_GC_FILL_STYLE;
              break;
+
            case ECORE_X_GC_VALUE_MASK_FILL_RULE:
              vmask |= XCB_GC_FILL_RULE;
              break;
+
            case ECORE_X_GC_VALUE_MASK_TILE:
              vmask |= XCB_GC_TILE;
              break;
+
            case ECORE_X_GC_VALUE_MASK_STIPPLE:
              vmask |= XCB_GC_STIPPLE;
              break;
+
            case ECORE_X_GC_VALUE_MASK_TILE_STIPPLE_ORIGIN_X:
              vmask |= XCB_GC_TILE_STIPPLE_ORIGIN_X;
              break;
+
            case ECORE_X_GC_VALUE_MASK_TILE_STIPPLE_ORIGIN_Y:
              vmask |= XCB_GC_TILE_STIPPLE_ORIGIN_Y;
              break;
+
            case ECORE_X_GC_VALUE_MASK_FONT:
              vmask |= XCB_GC_FONT;
              break;
+
            case ECORE_X_GC_VALUE_MASK_SUBWINDOW_MODE:
              vmask |= XCB_GC_SUBWINDOW_MODE;
              break;
+
            case ECORE_X_GC_VALUE_MASK_GRAPHICS_EXPOSURES:
              vmask |= XCB_GC_GRAPHICS_EXPOSURES;
              break;
+
            case ECORE_X_GC_VALUE_MASK_CLIP_ORIGIN_X:
              vmask |= XCB_GC_CLIP_ORIGIN_X;
              break;
+
            case ECORE_X_GC_VALUE_MASK_CLIP_ORIGIN_Y:
              vmask |= XCB_GC_CLIP_ORIGIN_Y;
              break;
+
            case ECORE_X_GC_VALUE_MASK_CLIP_MASK:
              vmask |= XCB_GC_CLIP_MASK;
              break;
+
            case ECORE_X_GC_VALUE_MASK_DASH_OFFSET:
              vmask |= XCB_GC_DASH_OFFSET;
              break;
+
            case ECORE_X_GC_VALUE_MASK_DASH_LIST:
              vmask |= XCB_GC_DASH_LIST;
              break;
+
            case ECORE_X_GC_VALUE_MASK_ARC_MODE:
              vmask |= XCB_GC_ARC_MODE;
              break;
@@ -109,8 +133,8 @@ ecore_x_gc_new(Ecore_X_Drawable drawable, Ecore_X_GC_Value_Mask value_mask, cons
  * Deletes and frees the given graphics context.
  * @param gc The given graphics context.
  */
-EAPI void 
-ecore_x_gc_free(Ecore_X_GC gc) 
+EAPI void
+ecore_x_gc_free(Ecore_X_GC gc)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    CHECK_XCB_CONN;
@@ -119,8 +143,9 @@ ecore_x_gc_free(Ecore_X_GC gc)
 //   ecore_x_flush();
 }
 
-EAPI void 
-ecore_x_gc_foreground_set(Ecore_X_GC gc, unsigned long foreground) 
+EAPI void
+ecore_x_gc_foreground_set(Ecore_X_GC    gc,
+                          unsigned long foreground)
 {
    uint32_t list;
 
@@ -132,8 +157,9 @@ ecore_x_gc_foreground_set(Ecore_X_GC gc, unsigned long foreground)
 //   ecore_x_flush();
 }
 
-EAPI void 
-ecore_x_gc_background_set(Ecore_X_GC gc, unsigned long background) 
+EAPI void
+ecore_x_gc_background_set(Ecore_X_GC    gc,
+                          unsigned long background)
 {
    uint32_t list;
 
@@ -144,3 +170,4 @@ ecore_x_gc_background_set(Ecore_X_GC gc, unsigned long background)
    xcb_change_gc(_ecore_xcb_conn, gc, XCB_GC_BACKGROUND, &list);
 //   ecore_x_flush();
 }
+
index d61e91c..425ebb1 100644 (file)
@@ -1,10 +1,9 @@
 #include "ecore_xcb_private.h"
 #include <xcb/xcb_icccm.h>
 
-EAPI void 
-ecore_x_icccm_init(void) 
+EAPI void
+ecore_x_icccm_init(void)
 {
-
 }
 
 /**
@@ -14,8 +13,10 @@ ecore_x_icccm_init(void)
  * @param argc Number of arguments.
  * @param argv Arguments.
  */
-EAPI void 
-ecore_x_icccm_command_set(Ecore_X_Window win, int argc, char **argv) 
+EAPI void
+ecore_x_icccm_command_set(Ecore_X_Window win,
+                          int            argc,
+                          char         **argv)
 {
    void *buf;
    char *b;
@@ -24,8 +25,8 @@ ecore_x_icccm_command_set(Ecore_X_Window win, int argc, char **argv)
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    CHECK_XCB_CONN;
 
-   for (i = 0, nbytes = 0; i < argc; i++)
-     nbytes += strlen(argv[i]) + 1;
+   for (i = 0, nbytes = 0; i < argc; i++) 
+     if (argv[i]) nbytes += strlen(argv[i]) + 1;
 
    buf = malloc(sizeof(char) * nbytes);
    if (!buf) return;
@@ -41,8 +42,8 @@ ecore_x_icccm_command_set(Ecore_X_Window win, int argc, char **argv)
         else
           *b++ = '\0';
      }
-   xcb_change_property(_ecore_xcb_conn, XCB_PROP_MODE_REPLACE, win, 
-                       ECORE_X_ATOM_WM_COMMAND, ECORE_X_ATOM_STRING, 8, 
+   xcb_change_property(_ecore_xcb_conn, XCB_PROP_MODE_REPLACE, win,
+                       ECORE_X_ATOM_WM_COMMAND, ECORE_X_ATOM_STRING, 8,
                        nbytes, buf);
    free(buf);
 }
@@ -56,8 +57,10 @@ ecore_x_icccm_command_set(Ecore_X_Window win, int argc, char **argv)
  * @param argc Number of arguments.
  * @param argv Arguments.
  */
-EAPI void 
-ecore_x_icccm_command_get(Ecore_X_Window win, int *argc, char ***argv) 
+EAPI void
+ecore_x_icccm_command_get(Ecore_X_Window win,
+                          int           *argc,
+                          char        ***argv)
 {
    xcb_get_property_cookie_t cookie;
    xcb_get_property_reply_t *reply;
@@ -78,14 +81,14 @@ ecore_x_icccm_command_get(Ecore_X_Window win, int *argc, char ***argv)
    reply = xcb_get_property_reply(_ecore_xcb_conn, cookie, NULL);
    if (!reply) return;
 
-   if ((reply->type != ECORE_X_ATOM_STRING) || (reply->format != 8)) 
+   if ((reply->type != ECORE_X_ATOM_STRING) || (reply->format != 8))
      {
         free(reply);
         return;
      }
 
    len = reply->value_len;
-   if (len < 1) 
+   if (len < 1)
      {
         free(reply);
         return;
@@ -100,7 +103,7 @@ ecore_x_icccm_command_get(Ecore_X_Window win, int *argc, char ***argv)
      if (*cp == '\0') c++;
 
    v = (char **)malloc((c + 1) * sizeof(char *));
-   if (!v) 
+   if (!v)
      {
         free(reply);
         return;
@@ -116,7 +119,7 @@ ecore_x_icccm_command_get(Ecore_X_Window win, int *argc, char ***argv)
 
    memcpy(start, (char *)data, len);
    start[len] = '\0';
-   for (cp = start, i = len + 1, j = 0; i > 0; cp++, i--) 
+   for (cp = start, i = len + 1, j = 0; i > 0; cp++, i--)
      {
         if (*cp == '\0')
           {
@@ -160,7 +163,7 @@ ecore_x_icccm_command_get(Ecore_X_Window win, int *argc, char ***argv)
 }
 
 EAPI char *
-ecore_x_icccm_title_get(Ecore_X_Window win) 
+ecore_x_icccm_title_get(Ecore_X_Window win)
 {
    xcb_get_property_cookie_t cookie;
 #ifdef OLD_XCB_VERSION
@@ -183,7 +186,7 @@ ecore_x_icccm_title_get(Ecore_X_Window win)
    ret = xcb_icccm_get_wm_name_reply(_ecore_xcb_conn, cookie, &prop, NULL);
 #endif
    if (ret == 0) return NULL;
-   if (prop.name_len < 1) 
+   if (prop.name_len < 1)
      {
 #ifdef OLD_XCB_VERSION
         xcb_get_text_property_reply_wipe(&prop);
@@ -194,7 +197,7 @@ ecore_x_icccm_title_get(Ecore_X_Window win)
      }
 
    if (!(title = malloc((prop.name_len + 1) * sizeof(char *))))
-     { 
+     {
 #ifdef OLD_XCB_VERSION
         xcb_get_text_property_reply_wipe(&prop);
 #else
@@ -205,7 +208,7 @@ ecore_x_icccm_title_get(Ecore_X_Window win)
    memcpy(title, prop.name, sizeof(char *) * prop.name_len);
    title[prop.name_len] = '\0';
 
-   if (prop.encoding != ECORE_X_ATOM_UTF8_STRING) 
+   if (prop.encoding != ECORE_X_ATOM_UTF8_STRING)
      {
         Ecore_Xcb_Textproperty tp;
         int count = 0;
@@ -237,8 +240,9 @@ ecore_x_icccm_title_get(Ecore_X_Window win)
    return title;
 }
 
-EAPI void 
-ecore_x_icccm_title_set(Ecore_X_Window win, const char *title) 
+EAPI void
+ecore_x_icccm_title_set(Ecore_X_Window win,
+                        const char    *title)
 {
    Ecore_Xcb_Textproperty prop;
    char *list[1];
@@ -253,31 +257,31 @@ ecore_x_icccm_title_set(Ecore_X_Window win, const char *title)
    list[0] = strdup(title);
 
 #ifdef HAVE_ICONV
-   ret = _ecore_xcb_utf8_textlist_to_textproperty(list, 1, XcbUTF8StringStyle, 
+   ret = _ecore_xcb_utf8_textlist_to_textproperty(list, 1, XcbUTF8StringStyle,
                                                   &prop);
 #else
-   ret = _ecore_xcb_mb_textlist_to_textproperty(list, 1, XcbStdICCTextStyle, 
+   ret = _ecore_xcb_mb_textlist_to_textproperty(list, 1, XcbStdICCTextStyle,
                                                 &prop);
 #endif
 
-   if (ret) 
+   if (ret)
      {
 #ifdef OLD_XCB_VERSION
-        xcb_set_wm_name(_ecore_xcb_conn, win, ECORE_X_ATOM_STRING, 
+        xcb_set_wm_name(_ecore_xcb_conn, win, ECORE_X_ATOM_STRING,
                         strlen(prop.value), prop.value);
 #else
-        xcb_icccm_set_wm_name(_ecore_xcb_conn, win, ECORE_X_ATOM_STRING, 8, 
+        xcb_icccm_set_wm_name(_ecore_xcb_conn, win, ECORE_X_ATOM_STRING, 8,
                               strlen(prop.value), prop.value);
 #endif
         if (prop.value) free(prop.value);
      }
-   else 
+   else
 #ifdef OLD_XCB_VERSION
-        xcb_set_wm_name(_ecore_xcb_conn, win, ECORE_X_ATOM_STRING, 
-                        strlen(title), title);
+     xcb_set_wm_name(_ecore_xcb_conn, win, ECORE_X_ATOM_STRING,
+                     strlen(title), title);
 #else
-        xcb_icccm_set_wm_name(_ecore_xcb_conn, win, ECORE_X_ATOM_STRING, 8, 
-                              strlen(title), title);
+     xcb_icccm_set_wm_name(_ecore_xcb_conn, win, ECORE_X_ATOM_STRING, 8,
+                           strlen(title), title);
 #endif
    free(list[0]);
 }
@@ -290,8 +294,10 @@ ecore_x_icccm_title_set(Ecore_X_Window win, const char *title)
  *
  * Get a window name * class
  */
-EAPI void 
-ecore_x_icccm_name_class_get(Ecore_X_Window win, char **name, char **class) 
+EAPI void
+ecore_x_icccm_name_class_get(Ecore_X_Window win,
+                             char         **name,
+                             char         **class)
 {
    xcb_get_property_cookie_t cookie;
 #ifdef OLD_XCB_VERSION
@@ -334,8 +340,10 @@ ecore_x_icccm_name_class_get(Ecore_X_Window win, char **name, char **class)
  *
  * Set a window name * class
  */
-EAPI void 
-ecore_x_icccm_name_class_set(Ecore_X_Window win, const char *name, const char *class) 
+EAPI void
+ecore_x_icccm_name_class_set(Ecore_X_Window win,
+                             const char    *name,
+                             const char    *class)
 {
    char *class_string, *s;
    int length_name, length_class;
@@ -345,7 +353,7 @@ ecore_x_icccm_name_class_set(Ecore_X_Window win, const char *name, const char *c
 
    length_name = strlen(name);
    length_class = strlen(class);
-   class_string = 
+   class_string =
      (char *)malloc(sizeof(char) * (length_name + length_class + 2));
    if (!class_string) return;
 
@@ -356,7 +364,7 @@ ecore_x_icccm_name_class_set(Ecore_X_Window win, const char *name, const char *c
         s += length_name + 1;
      }
    else
-      *s++ = '\0';
+     *s++ = '\0';
 
    if (length_class)
      strcpy(s, class);
@@ -374,14 +382,15 @@ ecore_x_icccm_name_class_set(Ecore_X_Window win, const char *name, const char *c
  * @param win the transient window
  * @param forwin the toplevel window
  */
-EAPI void 
-ecore_x_icccm_transient_for_set(Ecore_X_Window win, Ecore_X_Window forwindow) 
+EAPI void
+ecore_x_icccm_transient_for_set(Ecore_X_Window win,
+                                Ecore_X_Window forwindow)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    CHECK_XCB_CONN;
 
-   xcb_change_property(_ecore_xcb_conn, XCB_PROP_MODE_REPLACE, win, 
-                       ECORE_X_ATOM_WM_TRANSIENT_FOR, ECORE_X_ATOM_WINDOW, 32, 
+   xcb_change_property(_ecore_xcb_conn, XCB_PROP_MODE_REPLACE, win,
+                       ECORE_X_ATOM_WM_TRANSIENT_FOR, ECORE_X_ATOM_WINDOW, 32,
                        1, (void *)&forwindow);
 }
 
@@ -389,8 +398,8 @@ ecore_x_icccm_transient_for_set(Ecore_X_Window win, Ecore_X_Window forwindow)
  * Remove the transient_for setting from a window.
  * @param The window
  */
-EAPI void 
-ecore_x_icccm_transient_for_unset(Ecore_X_Window win) 
+EAPI void
+ecore_x_icccm_transient_for_unset(Ecore_X_Window win)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
 
@@ -402,8 +411,8 @@ ecore_x_icccm_transient_for_unset(Ecore_X_Window win)
  * @param win The window to check
  * @return The window ID of the top-level window, or 0 if the property does not exist.
  */
-EAPI Ecore_X_Window 
-ecore_x_icccm_transient_for_get(Ecore_X_Window win) 
+EAPI Ecore_X_Window
+ecore_x_icccm_transient_for_get(Ecore_X_Window win)
 {
    Ecore_X_Window forwin = 0;
    xcb_get_property_cookie_t cookie;
@@ -428,7 +437,7 @@ ecore_x_icccm_transient_for_get(Ecore_X_Window win)
  * @return The window's role string.
  */
 EAPI char *
-ecore_x_icccm_window_role_get(Ecore_X_Window win) 
+ecore_x_icccm_window_role_get(Ecore_X_Window win)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
 
@@ -440,8 +449,9 @@ ecore_x_icccm_window_role_get(Ecore_X_Window win)
  * @param win The window
  * @param role The role string
  */
-EAPI void 
-ecore_x_icccm_window_role_set(Ecore_X_Window win, const char *role) 
+EAPI void
+ecore_x_icccm_window_role_set(Ecore_X_Window win,
+                              const char    *role)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
 
@@ -453,14 +463,14 @@ ecore_x_icccm_window_role_set(Ecore_X_Window win, const char *role)
  * @param win The window
  * @return The window's client leader window, or 0 if unset
  */
-EAPI Ecore_X_Window 
-ecore_x_icccm_client_leader_get(Ecore_X_Window win) 
+EAPI Ecore_X_Window
+ecore_x_icccm_client_leader_get(Ecore_X_Window win)
 {
    Ecore_X_Window leader;
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
 
-   if (ecore_x_window_prop_window_get(win, ECORE_X_ATOM_WM_CLIENT_LEADER, 
+   if (ecore_x_window_prop_window_get(win, ECORE_X_ATOM_WM_CLIENT_LEADER,
                                       &leader, 1) > 0)
      return leader;
 
@@ -475,17 +485,18 @@ ecore_x_icccm_client_leader_get(Ecore_X_Window win)
  * All non-transient top-level windows created by an app other than
  * the main window must have this property set to the app's main window.
  */
-EAPI void 
-ecore_x_icccm_client_leader_set(Ecore_X_Window win, Ecore_X_Window leader) 
+EAPI void
+ecore_x_icccm_client_leader_set(Ecore_X_Window win,
+                                Ecore_X_Window leader)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
 
-   ecore_x_window_prop_window_set(win, ECORE_X_ATOM_WM_CLIENT_LEADER, 
+   ecore_x_window_prop_window_set(win, ECORE_X_ATOM_WM_CLIENT_LEADER,
                                   &leader, 1);
 }
 
-EAPI Ecore_X_Window_State_Hint 
-ecore_x_icccm_state_get(Ecore_X_Window win) 
+EAPI Ecore_X_Window_State_Hint
+ecore_x_icccm_state_get(Ecore_X_Window win)
 {
    xcb_get_property_cookie_t cookie;
    xcb_get_property_reply_t *reply;
@@ -495,13 +506,13 @@ ecore_x_icccm_state_get(Ecore_X_Window win)
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    CHECK_XCB_CONN;
 
-   cookie = 
-     xcb_get_property_unchecked(_ecore_xcb_conn, 0, win, 
-                                ECORE_X_ATOM_WM_STATE, ECORE_X_ATOM_WM_STATE, 
+   cookie =
+     xcb_get_property_unchecked(_ecore_xcb_conn, 0, win,
+                                ECORE_X_ATOM_WM_STATE, ECORE_X_ATOM_WM_STATE,
                                 0L, 0x7fffffff);
    reply = xcb_get_property_reply(_ecore_xcb_conn, cookie, NULL);
    if (!reply) return hint;
-   if ((reply->type == 0) || (reply->format != 8) || (reply->value_len != 2)) 
+   if ((reply->type == 0) || (reply->format != 8) || (reply->value_len != 2))
      {
         free(reply);
         return hint;
@@ -509,32 +520,38 @@ ecore_x_icccm_state_get(Ecore_X_Window win)
 
    prop = (uint8_t *)xcb_get_property_value(reply);
 #ifdef OLD_XCB_VERSION
-   switch (prop[0]) 
+   switch (prop[0])
      {
       case XCB_WM_STATE_WITHDRAWN:
         hint = ECORE_X_WINDOW_STATE_HINT_WITHDRAWN;
         break;
+
       case XCB_WM_STATE_NORMAL:
         hint = ECORE_X_WINDOW_STATE_HINT_NORMAL;
         break;
+
       case XCB_WM_STATE_ICONIC:
         hint = ECORE_X_WINDOW_STATE_HINT_ICONIC;
         break;
+
       default:
         break;
      }
 #else
-   switch (prop[0]) 
+   switch (prop[0])
      {
       case XCB_ICCCM_WM_STATE_WITHDRAWN:
         hint = ECORE_X_WINDOW_STATE_HINT_WITHDRAWN;
         break;
+
       case XCB_ICCCM_WM_STATE_NORMAL:
         hint = ECORE_X_WINDOW_STATE_HINT_NORMAL;
         break;
+
       case XCB_ICCCM_WM_STATE_ICONIC:
         hint = ECORE_X_WINDOW_STATE_HINT_ICONIC;
         break;
+
       default:
         break;
      }
@@ -544,8 +561,9 @@ ecore_x_icccm_state_get(Ecore_X_Window win)
    return hint;
 }
 
-EAPI void 
-ecore_x_icccm_state_set(Ecore_X_Window win, Ecore_X_Window_State_Hint state) 
+EAPI void
+ecore_x_icccm_state_set(Ecore_X_Window            win,
+                        Ecore_X_Window_State_Hint state)
 {
 #ifdef OLD_XCB_VERSION
    xcb_wm_hints_t hints;
@@ -583,20 +601,27 @@ ecore_x_icccm_state_set(Ecore_X_Window win, Ecore_X_Window_State_Hint state)
 
    xcb_icccm_set_wm_hints(_ecore_xcb_conn, win, &hints);
 #endif
-
 }
 
-EAPI void 
-ecore_x_icccm_delete_window_send(Ecore_X_Window win, Ecore_X_Time t) 
+EAPI void
+ecore_x_icccm_delete_window_send(Ecore_X_Window win,
+                                 Ecore_X_Time   t)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
-   ecore_x_client_message32_send(win, ECORE_X_ATOM_WM_PROTOCOLS, 
-                                 ECORE_X_EVENT_MASK_NONE, 
+   ecore_x_client_message32_send(win, ECORE_X_ATOM_WM_PROTOCOLS,
+                                 ECORE_X_EVENT_MASK_NONE,
                                  ECORE_X_ATOM_WM_DELETE_WINDOW, t, 0, 0, 0);
 }
 
-EAPI void 
-ecore_x_icccm_hints_set(Ecore_X_Window win, Eina_Bool accepts_focus, Ecore_X_Window_State_Hint initial_state, Ecore_X_Pixmap icon_pixmap, Ecore_X_Pixmap icon_mask, Ecore_X_Window icon_window, Ecore_X_Window window_group, Eina_Bool is_urgent) 
+EAPI void
+ecore_x_icccm_hints_set(Ecore_X_Window            win,
+                        Eina_Bool                 accepts_focus,
+                        Ecore_X_Window_State_Hint initial_state,
+                        Ecore_X_Pixmap            icon_pixmap,
+                        Ecore_X_Pixmap            icon_mask,
+                        Ecore_X_Window            icon_window,
+                        Ecore_X_Window            window_group,
+                        Eina_Bool                 is_urgent)
 {
 #ifdef OLD_XCB_VERSION
    xcb_wm_hints_t hints;
@@ -636,23 +661,30 @@ ecore_x_icccm_hints_set(Ecore_X_Window win, Eina_Bool accepts_focus, Ecore_X_Win
    else if (initial_state == ECORE_X_WINDOW_STATE_HINT_ICONIC)
      xcb_icccm_wm_hints_set_iconic(&hints);
 
-   if (icon_pixmap != 0) 
+   if (icon_pixmap != 0)
      xcb_icccm_wm_hints_set_icon_pixmap(&hints, icon_pixmap);
-   if (icon_mask != 0) 
+   if (icon_mask != 0)
      xcb_icccm_wm_hints_set_icon_mask(&hints, icon_mask);
-   if (icon_window != 0) 
+   if (icon_window != 0)
      xcb_icccm_wm_hints_set_icon_window(&hints, icon_window);
-   if (window_group != 0) 
+   if (window_group != 0)
      xcb_icccm_wm_hints_set_window_group(&hints, window_group);
-   if (is_urgent) 
+   if (is_urgent)
      xcb_icccm_wm_hints_set_urgency(&hints);
 
    xcb_icccm_set_wm_hints(_ecore_xcb_conn, win, &hints);
 #endif
 }
 
-EAPI Eina_Bool 
-ecore_x_icccm_hints_get(Ecore_X_Window win, Eina_Bool *accepts_focus, Ecore_X_Window_State_Hint *initial_state, Ecore_X_Pixmap *icon_pixmap, Ecore_X_Pixmap *icon_mask, Ecore_X_Window *icon_window, Ecore_X_Window *window_group, Eina_Bool *is_urgent) 
+EAPI Eina_Bool
+ecore_x_icccm_hints_get(Ecore_X_Window             win,
+                        Eina_Bool                 *accepts_focus,
+                        Ecore_X_Window_State_Hint *initial_state,
+                        Ecore_X_Pixmap            *icon_pixmap,
+                        Ecore_X_Pixmap            *icon_mask,
+                        Ecore_X_Window            *icon_window,
+                        Ecore_X_Window            *window_group,
+                        Eina_Bool                 *is_urgent)
 {
    xcb_get_property_cookie_t cookie;
 #ifdef OLD_XCB_VERSION
@@ -759,7 +791,7 @@ ecore_x_icccm_hints_get(Ecore_X_Window win, Eina_Bool *accepts_focus, Ecore_X_Wi
  * Return the icon name of a window. String must be free'd when done with.
  */
 EAPI char *
-ecore_x_icccm_icon_name_get(Ecore_X_Window win) 
+ecore_x_icccm_icon_name_get(Ecore_X_Window win)
 {
    xcb_get_property_cookie_t cookie;
 #ifdef OLD_XCB_VERSION
@@ -784,7 +816,7 @@ ecore_x_icccm_icon_name_get(Ecore_X_Window win)
 #endif
    if (ret == 0) return NULL;
 
-   if (prop.name_len < 1) 
+   if (prop.name_len < 1)
      {
 #ifdef OLD_XCB_VERSION
         xcb_get_text_property_reply_wipe(&prop);
@@ -795,7 +827,7 @@ ecore_x_icccm_icon_name_get(Ecore_X_Window win)
      }
 
    if (!(tmp = malloc((prop.name_len + 1) * sizeof(char *))))
-     { 
+     {
 #ifdef OLD_XCB_VERSION
         xcb_get_text_property_reply_wipe(&prop);
 #else
@@ -806,7 +838,7 @@ ecore_x_icccm_icon_name_get(Ecore_X_Window win)
    memcpy(tmp, prop.name, sizeof(char *) * prop.name_len);
    tmp[prop.name_len] = '\0';
 
-   if (prop.encoding != ECORE_X_ATOM_UTF8_STRING) 
+   if (prop.encoding != ECORE_X_ATOM_UTF8_STRING)
      {
         Ecore_Xcb_Textproperty tp;
         int count = 0;
@@ -845,8 +877,9 @@ ecore_x_icccm_icon_name_get(Ecore_X_Window win)
  *
  * Set a window icon name
  */
-EAPI void 
-ecore_x_icccm_icon_name_set(Ecore_X_Window win, const char *name) 
+EAPI void
+ecore_x_icccm_icon_name_set(Ecore_X_Window win,
+                            const char    *name)
 {
    Ecore_Xcb_Textproperty prop;
    char *list[1];
@@ -861,38 +894,39 @@ ecore_x_icccm_icon_name_set(Ecore_X_Window win, const char *name)
    list[0] = strdup(name);
 
 #ifdef HAVE_ICONV
-   ret = _ecore_xcb_utf8_textlist_to_textproperty(list, 1, XcbUTF8StringStyle, 
+   ret = _ecore_xcb_utf8_textlist_to_textproperty(list, 1, XcbUTF8StringStyle,
                                                   &prop);
 #else
-   ret = _ecore_xcb_mb_textlist_to_textproperty(list, 1, XcbStdICCTextStyle, 
+   ret = _ecore_xcb_mb_textlist_to_textproperty(list, 1, XcbStdICCTextStyle,
                                                 &prop);
 #endif
 
-   if (ret) 
+   if (ret)
      {
 #ifdef OLD_XCB_VERSION
-        xcb_set_wm_icon_name(_ecore_xcb_conn, win, ECORE_X_ATOM_STRING, 
+        xcb_set_wm_icon_name(_ecore_xcb_conn, win, ECORE_X_ATOM_STRING,
                              strlen(prop.value), prop.value);
 #else
-        xcb_icccm_set_wm_icon_name(_ecore_xcb_conn, win, ECORE_X_ATOM_STRING, 
+        xcb_icccm_set_wm_icon_name(_ecore_xcb_conn, win, ECORE_X_ATOM_STRING,
                                    8, strlen(prop.value), prop.value);
 #endif
         if (prop.value) free(prop.value);
      }
-   else 
+   else
 #ifdef OLD_XCB_VERSION
-     xcb_set_wm_icon_name(_ecore_xcb_conn, win, ECORE_X_ATOM_STRING, 
+     xcb_set_wm_icon_name(_ecore_xcb_conn, win, ECORE_X_ATOM_STRING,
                           strlen(name), name);
 #else
-     xcb_icccm_set_wm_icon_name(_ecore_xcb_conn, win, ECORE_X_ATOM_STRING, 
+     xcb_icccm_set_wm_icon_name(_ecore_xcb_conn, win, ECORE_X_ATOM_STRING,
                                 8, strlen(name), name);
 #endif
 
    free(list[0]);
 }
 
-EAPI void 
-ecore_x_icccm_iconic_request_send(Ecore_X_Window win, Ecore_X_Window root) 
+EAPI void
+ecore_x_icccm_iconic_request_send(Ecore_X_Window win,
+                                  Ecore_X_Window root)
 {
    xcb_client_message_event_t ev;
 
@@ -914,9 +948,9 @@ ecore_x_icccm_iconic_request_send(Ecore_X_Window win, Ecore_X_Window root)
    ev.data.data32[0] = XCB_ICCCM_WM_STATE_ICONIC;
 #endif
 
-   xcb_send_event(_ecore_xcb_conn, 0, root, 
-                  (XCB_EVENT_MASK_SUBSTRUCTURE_NOTIFY | 
-                      XCB_EVENT_MASK_SUBSTRUCTURE_REDIRECT), 
+   xcb_send_event(_ecore_xcb_conn, 0, root,
+                  (XCB_EVENT_MASK_SUBSTRUCTURE_NOTIFY |
+                   XCB_EVENT_MASK_SUBSTRUCTURE_REDIRECT),
                   (const char *)&ev);
 //   ecore_x_flush();
 }
@@ -927,8 +961,10 @@ ecore_x_icccm_iconic_request_send(Ecore_X_Window win, Ecore_X_Window root)
  * @param protocol The protocol to enable/disable
  * @param on On/Off
  */
-EAPI void 
-ecore_x_icccm_protocol_set(Ecore_X_Window win, Ecore_X_WM_Protocol protocol, Eina_Bool on) 
+EAPI void
+ecore_x_icccm_protocol_set(Ecore_X_Window      win,
+                           Ecore_X_WM_Protocol protocol,
+                           Eina_Bool           on)
 {
    Ecore_X_Atom proto;
    xcb_get_property_cookie_t cookie;
@@ -955,65 +991,65 @@ ecore_x_icccm_protocol_set(Ecore_X_Window win, Ecore_X_WM_Protocol protocol, Ein
    else
      count = protos.atoms_len;
 
-   for (i = 0; i < count; i++) 
+   for (i = 0; i < count; i++)
      {
-        if (protos.atoms[i] == proto) 
+        if (protos.atoms[i] == proto)
           {
              set = 1;
              break;
           }
      }
 
-   if (on) 
+   if (on)
      {
-        if (!set) 
+        if (!set)
           {
              Ecore_X_Atom *atoms = NULL;
 
              atoms = malloc((count + 1) * sizeof(Ecore_X_Atom));
-             if (atoms) 
+             if (atoms)
                {
                   for (i = 0; i < count; i++)
                     atoms[i] = protos.atoms[i];
                   atoms[count] = proto;
 #ifdef OLD_XCB_VERSION
-                  xcb_set_wm_protocols(_ecore_xcb_conn, 
-                                       ECORE_X_ATOM_WM_PROTOCOLS, 
+                  xcb_set_wm_protocols(_ecore_xcb_conn,
+                                       ECORE_X_ATOM_WM_PROTOCOLS,
                                        win, count, atoms);
 #else
-                  xcb_icccm_set_wm_protocols(_ecore_xcb_conn, 
-                                             ECORE_X_ATOM_WM_PROTOCOLS, 
+                  xcb_icccm_set_wm_protocols(_ecore_xcb_conn,
+                                             ECORE_X_ATOM_WM_PROTOCOLS,
                                              win, count, atoms);
 #endif
                   free(atoms);
                }
           }
      }
-   else 
+   else
      {
-        if (set) 
+        if (set)
           {
-             for (i = 0; i < count; i++) 
+             for (i = 0; i < count; i++)
                {
-                  if (protos.atoms[i] == proto) 
+                  if (protos.atoms[i] == proto)
                     {
                        int j = 0;
 
                        for (j = (i + 1); j < count; j++)
                          protos.atoms[j - 1] = protos.atoms[j];
-                       if (count > 1) 
+                       if (count > 1)
 #ifdef OLD_XCB_VERSION
-                         xcb_set_wm_protocols(_ecore_xcb_conn, 
-                                              ECORE_X_ATOM_WM_PROTOCOLS, 
+                         xcb_set_wm_protocols(_ecore_xcb_conn,
+                                              ECORE_X_ATOM_WM_PROTOCOLS,
                                               win, count - 1, protos.atoms);
 #else
-                         xcb_icccm_set_wm_protocols(_ecore_xcb_conn, 
-                                                    ECORE_X_ATOM_WM_PROTOCOLS, 
-                                                    win, count - 1, 
+                         xcb_icccm_set_wm_protocols(_ecore_xcb_conn,
+                                                    ECORE_X_ATOM_WM_PROTOCOLS,
+                                                    win, count - 1,
                                                     protos.atoms);
 #endif
                        else
-                         ecore_x_window_prop_property_del(win, 
+                         ecore_x_window_prop_property_del(win,
                                                           ECORE_X_ATOM_WM_PROTOCOLS);
                        break;
                     }
@@ -1034,8 +1070,9 @@ ecore_x_icccm_protocol_set(Ecore_X_Window win, Ecore_X_WM_Protocol protocol, Ein
  * @param protocol The protocol to query
  * @return 1 if the protocol is set, else 0.
  */
-EAPI Eina_Bool 
-ecore_x_icccm_protocol_isset(Ecore_X_Window win, Ecore_X_WM_Protocol protocol) 
+EAPI Eina_Bool
+ecore_x_icccm_protocol_isset(Ecore_X_Window      win,
+                             Ecore_X_WM_Protocol protocol)
 {
    Ecore_X_Atom proto;
    Eina_Bool ret = EINA_FALSE;
@@ -1064,7 +1101,7 @@ ecore_x_icccm_protocol_isset(Ecore_X_Window win, Ecore_X_WM_Protocol protocol)
    if (!val) return EINA_FALSE;
 
    for (i = 0; i < reply.atoms_len; i++)
-     if (reply.atoms[i] == proto) 
+     if (reply.atoms[i] == proto)
        {
           ret = EINA_TRUE;
           break;
@@ -1085,27 +1122,40 @@ ecore_x_icccm_protocol_isset(Ecore_X_Window win, Ecore_X_WM_Protocol protocol)
  * @param protos An array of protocol atoms
  * @param num the number of members of the array
  */
-EAPI void 
-ecore_x_icccm_protocol_atoms_set(Ecore_X_Window win, Ecore_X_Atom *protos, int num) 
+EAPI void
+ecore_x_icccm_protocol_atoms_set(Ecore_X_Window win,
+                                 Ecore_X_Atom  *protos,
+                                 int            num)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    CHECK_XCB_CONN;
 
-   if (num > 0) 
+   if (num > 0)
 #ifdef OLD_XCB_VERSION
-     xcb_set_wm_protocols(_ecore_xcb_conn, ECORE_X_ATOM_WM_PROTOCOLS, 
+     xcb_set_wm_protocols(_ecore_xcb_conn, ECORE_X_ATOM_WM_PROTOCOLS,
                           win, num, protos);
 #else
-     xcb_icccm_set_wm_protocols(_ecore_xcb_conn, ECORE_X_ATOM_WM_PROTOCOLS, 
+     xcb_icccm_set_wm_protocols(_ecore_xcb_conn, ECORE_X_ATOM_WM_PROTOCOLS,
                                 win, num, protos);
 #endif
-   else 
+   else
      ecore_x_window_prop_property_del(win, ECORE_X_ATOM_WM_PROTOCOLS);
-
 }
 
-EAPI Eina_Bool 
-ecore_x_icccm_size_pos_hints_get(Ecore_X_Window win, Eina_Bool *request_pos, Ecore_X_Gravity *gravity, int *min_w, int *min_h, int *max_w, int *max_h, int *base_w, int *base_h, int *step_x, int *step_y, double *min_aspect, double *max_aspect) 
+EAPI Eina_Bool
+ecore_x_icccm_size_pos_hints_get(Ecore_X_Window   win,
+                                 Eina_Bool       *request_pos,
+                                 Ecore_X_Gravity *gravity,
+                                 int             *min_w,
+                                 int             *min_h,
+                                 int             *max_w,
+                                 int             *max_h,
+                                 int             *base_w,
+                                 int             *base_h,
+                                 int             *step_x,
+                                 int             *step_y,
+                                 double          *min_aspect,
+                                 double          *max_aspect)
 {
    xcb_size_hints_t hints;
    xcb_get_property_cookie_t cookie;
@@ -1137,17 +1187,17 @@ ecore_x_icccm_size_pos_hints_get(Ecore_X_Window win, Eina_Bool *request_pos, Eco
    ret = xcb_get_wm_normal_hints_reply(_ecore_xcb_conn, cookie, &hints, NULL);
 #else
    cookie = xcb_icccm_get_wm_normal_hints_unchecked(_ecore_xcb_conn, win);
-   ret = xcb_icccm_get_wm_normal_hints_reply(_ecore_xcb_conn, cookie, 
+   ret = xcb_icccm_get_wm_normal_hints_reply(_ecore_xcb_conn, cookie,
                                              &hints, NULL);
 #endif
    if (!ret) return EINA_FALSE;
 
 #ifdef OLD_XCB_VERSION
-   if ((hints.flags & XCB_SIZE_HINT_US_POSITION) || 
-       (hints.flags & XCB_SIZE_HINT_P_POSITION)) 
+   if ((hints.flags & XCB_SIZE_HINT_US_POSITION) ||
+       (hints.flags & XCB_SIZE_HINT_P_POSITION))
 #else
-   if ((hints.flags & XCB_ICCCM_SIZE_HINT_US_POSITION) || 
-       (hints.flags & XCB_ICCCM_SIZE_HINT_P_POSITION)) 
+   if ((hints.flags & XCB_ICCCM_SIZE_HINT_US_POSITION) ||
+       (hints.flags & XCB_ICCCM_SIZE_HINT_P_POSITION))
 #endif
      {
         if (request_pos) *request_pos = EINA_TRUE;
@@ -1236,7 +1286,19 @@ ecore_x_icccm_size_pos_hints_get(Ecore_X_Window win, Eina_Bool *request_pos, Eco
 }
 
 EAPI void
-ecore_x_icccm_size_pos_hints_set(Ecore_X_Window win, Eina_Bool request_pos, Ecore_X_Gravity gravity, int min_w, int min_h, int max_w, int max_h, int base_w, int base_h, int step_x, int step_y, double min_aspect, double max_aspect)
+ecore_x_icccm_size_pos_hints_set(Ecore_X_Window  win,
+                                 Eina_Bool       request_pos,
+                                 Ecore_X_Gravity gravity,
+                                 int             min_w,
+                                 int             min_h,
+                                 int             max_w,
+                                 int             max_h,
+                                 int             base_w,
+                                 int             base_h,
+                                 int             step_x,
+                                 int             step_y,
+                                 double          min_aspect,
+                                 double          max_aspect)
 {
    xcb_get_property_cookie_t cookie;
    xcb_size_hints_t hints;
@@ -1250,7 +1312,7 @@ ecore_x_icccm_size_pos_hints_set(Ecore_X_Window win, Eina_Bool request_pos, Ecor
    ret = xcb_get_wm_normal_hints_reply(_ecore_xcb_conn, cookie, &hints, NULL);
 #else
    cookie = xcb_icccm_get_wm_normal_hints_unchecked(_ecore_xcb_conn, win);
-   ret = xcb_icccm_get_wm_normal_hints_reply(_ecore_xcb_conn, cookie, 
+   ret = xcb_icccm_get_wm_normal_hints_reply(_ecore_xcb_conn, cookie,
                                              &hints, NULL);
 #endif
    if (!ret) memset(&hints, 0, sizeof(xcb_size_hints_t));
@@ -1258,50 +1320,54 @@ ecore_x_icccm_size_pos_hints_set(Ecore_X_Window win, Eina_Bool request_pos, Ecor
    hints.flags = 0;
 
 #ifdef OLD_XCB_VERSION
-   if (request_pos) 
+   if (request_pos)
      hints.flags |= XCB_SIZE_HINT_US_POSITION;
 
    if (gravity != ECORE_X_GRAVITY_NW)
      xcb_size_hints_set_win_gravity(&hints, gravity);
-   if ((min_w > 0) || (min_h > 0)) 
+   if ((min_w > 0) || (min_h > 0))
      xcb_size_hints_set_min_size(&hints, min_w, min_h);
    if ((max_w > 0) || (max_h > 0))
      xcb_size_hints_set_max_size(&hints, max_w, max_h);
-   if ((base_w > 0) || (base_h > 0)) 
+   if ((base_w > 0) || (base_h > 0))
      xcb_size_hints_set_base_size(&hints, base_w, base_h);
-   if ((step_x > 1) || (step_y > 1)) 
+   if ((step_x > 1) || (step_y > 1))
      xcb_size_hints_set_resize_inc(&hints, step_x, step_y);
-   if ((min_aspect > 0.0) || (max_aspect > 0.0)) 
-     xcb_size_hints_set_aspect(&hints, 
-                               (int32_t)(min_aspect * 10000), 10000, 
+   if ((min_aspect > 0.0) || (max_aspect > 0.0))
+     xcb_size_hints_set_aspect(&hints,
+                               (int32_t)(min_aspect * 10000), 10000,
                                (int32_t)(max_aspect * 10000), 10000);
 
    xcb_set_wm_normal_hints(_ecore_xcb_conn, win, &hints);
 #else
-   if (request_pos) 
+   if (request_pos)
      hints.flags |= XCB_ICCCM_SIZE_HINT_US_POSITION;
 
    if (gravity != ECORE_X_GRAVITY_NW)
      xcb_icccm_size_hints_set_win_gravity(&hints, gravity);
-   if ((min_w > 0) || (min_h > 0)) 
+   if ((min_w > 0) || (min_h > 0))
      xcb_icccm_size_hints_set_min_size(&hints, min_w, min_h);
    if ((max_w > 0) || (max_h > 0))
      xcb_icccm_size_hints_set_max_size(&hints, max_w, max_h);
-   if ((base_w > 0) || (base_h > 0)) 
+   if ((base_w > 0) || (base_h > 0))
      xcb_icccm_size_hints_set_base_size(&hints, base_w, base_h);
-   if ((step_x > 1) || (step_y > 1)) 
+   if ((step_x > 1) || (step_y > 1))
      xcb_icccm_size_hints_set_resize_inc(&hints, step_x, step_y);
-   if ((min_aspect > 0.0) || (max_aspect > 0.0)) 
-     xcb_icccm_size_hints_set_aspect(&hints, 
-                                     (int32_t)(min_aspect * 10000), 10000, 
+   if ((min_aspect > 0.0) || (max_aspect > 0.0))
+     xcb_icccm_size_hints_set_aspect(&hints,
+                                     (int32_t)(min_aspect * 10000), 10000,
                                      (int32_t)(max_aspect * 10000), 10000);
 
    xcb_icccm_set_wm_normal_hints(_ecore_xcb_conn, win, &hints);
 #endif
 }
 
-EAPI void 
-ecore_x_icccm_move_resize_send(Ecore_X_Window win, int x, int y, int w, int h) 
+EAPI void
+ecore_x_icccm_move_resize_send(Ecore_X_Window win,
+                               int            x,
+                               int            y,
+                               int            w,
+                               int            h)
 {
    xcb_configure_notify_event_t ev;
 
@@ -1323,7 +1389,7 @@ ecore_x_icccm_move_resize_send(Ecore_X_Window win, int x, int y, int w, int h)
    ev.border_width = 0;
    ev.override_redirect = 0;
 
-   xcb_send_event(_ecore_xcb_conn, 0, win, 
+   xcb_send_event(_ecore_xcb_conn, 0, win,
                   XCB_EVENT_MASK_STRUCTURE_NOTIFY, (const char *)&ev);
 //   ecore_x_flush();
 }
@@ -1336,7 +1402,7 @@ ecore_x_icccm_move_resize_send(Ecore_X_Window win, int x, int y, int w, int h)
  * Return the client machine of a window. String must be free'd when done with.
  */
 EAPI char *
-ecore_x_icccm_client_machine_get(Ecore_X_Window win) 
+ecore_x_icccm_client_machine_get(Ecore_X_Window win)
 {
    xcb_get_property_cookie_t cookie;
 #ifdef OLD_XCB_VERSION
@@ -1355,14 +1421,14 @@ ecore_x_icccm_client_machine_get(Ecore_X_Window win)
    ret = xcb_get_wm_client_machine_reply(_ecore_xcb_conn, cookie, &prop, NULL);
 #else
    cookie = xcb_icccm_get_wm_client_machine_unchecked(_ecore_xcb_conn, win);
-   ret = xcb_icccm_get_wm_client_machine_reply(_ecore_xcb_conn, cookie, 
+   ret = xcb_icccm_get_wm_client_machine_reply(_ecore_xcb_conn, cookie,
                                                &prop, NULL);
 #endif
    if (ret == 0) return NULL;
 
    tmp = malloc((prop.name_len + 1) * sizeof(char *));
-   if (!tmp) 
-     { 
+   if (!tmp)
+     {
 #ifdef OLD_XCB_VERSION
         xcb_get_text_property_reply_wipe(&prop);
 #else
@@ -1382,22 +1448,24 @@ ecore_x_icccm_client_machine_get(Ecore_X_Window win)
    return tmp;
 }
 
-EAPI void 
-ecore_x_icccm_take_focus_send(Ecore_X_Window win, Ecore_X_Time t) 
+EAPI void
+ecore_x_icccm_take_focus_send(Ecore_X_Window win,
+                              Ecore_X_Time   t)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
 
-   ecore_x_client_message32_send(win, ECORE_X_ATOM_WM_PROTOCOLS, 
-                                 XCB_EVENT_MASK_NO_EVENT, 
+   ecore_x_client_message32_send(win, ECORE_X_ATOM_WM_PROTOCOLS,
+                                 XCB_EVENT_MASK_NO_EVENT,
                                  ECORE_X_ATOM_WM_TAKE_FOCUS, t, 0, 0, 0);
 }
 
-EAPI void 
-ecore_x_icccm_save_yourself_send(Ecore_X_Window win, Ecore_X_Time t) 
+EAPI void
+ecore_x_icccm_save_yourself_send(Ecore_X_Window win,
+                                 Ecore_X_Time   t)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
-   ecore_x_client_message32_send(win, ECORE_X_ATOM_WM_PROTOCOLS, 
-                                 XCB_EVENT_MASK_NO_EVENT, 
+   ecore_x_client_message32_send(win, ECORE_X_ATOM_WM_PROTOCOLS,
+                                 XCB_EVENT_MASK_NO_EVENT,
                                  ECORE_X_ATOM_WM_SAVE_YOURSELF, t, 0, 0, 0);
 }
 
@@ -1406,8 +1474,9 @@ ecore_x_icccm_save_yourself_send(Ecore_X_Window win, Ecore_X_Time t)
  * @param win The toplevel window
  * @param subwin The subwindow to be added to the colormap windows list
  */
-EAPI void 
-ecore_x_icccm_colormap_window_set(Ecore_X_Window win, Ecore_X_Window subwin) 
+EAPI void
+ecore_x_icccm_colormap_window_set(Ecore_X_Window win,
+                                  Ecore_X_Window subwin)
 {
    int num = 0, i = 0;
    unsigned char *odata = NULL, *data = NULL;
@@ -1415,21 +1484,21 @@ ecore_x_icccm_colormap_window_set(Ecore_X_Window win, Ecore_X_Window subwin)
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
 
-   if (!ecore_x_window_prop_property_get(win, ECORE_X_ATOM_WM_COLORMAP_WINDOWS, 
-                                         ECORE_X_ATOM_WINDOW, 32, &odata, &num)) 
+   if (!ecore_x_window_prop_property_get(win, ECORE_X_ATOM_WM_COLORMAP_WINDOWS,
+                                         ECORE_X_ATOM_WINDOW, 32, &odata, &num))
      {
         if (!(newset = calloc(1, sizeof(Ecore_X_Window)))) return;
         newset[0] = subwin;
         num = 1;
         data = (unsigned char *)newset;
      }
-   else 
+   else
      {
         if (!(newset = calloc(num + 1, sizeof(Ecore_X_Window)))) return;
         oldset = (Ecore_X_Window *)odata;
-        for (i = 0; i < num; i++) 
+        for (i = 0; i < num; i++)
           {
-             if (oldset[i] == subwin) 
+             if (oldset[i] == subwin)
                {
                   if (odata) free(odata);
                   odata = NULL;
@@ -1442,7 +1511,7 @@ ecore_x_icccm_colormap_window_set(Ecore_X_Window win, Ecore_X_Window subwin)
         if (odata) free(odata);
         data = (unsigned char *)newset;
      }
-   ecore_x_window_prop_property_set(win, ECORE_X_ATOM_WM_COLORMAP_WINDOWS, 
+   ecore_x_window_prop_property_set(win, ECORE_X_ATOM_WM_COLORMAP_WINDOWS,
                                     ECORE_X_ATOM_WINDOW, 32, data, num);
    free(newset);
 }
@@ -1452,8 +1521,9 @@ ecore_x_icccm_colormap_window_set(Ecore_X_Window win, Ecore_X_Window subwin)
  * @param win The toplevel window
  * @param subwin The window to be removed from the colormap window list.
  */
-EAPI void 
-ecore_x_icccm_colormap_window_unset(Ecore_X_Window win, Ecore_X_Window subwin) 
+EAPI void
+ecore_x_icccm_colormap_window_unset(Ecore_X_Window win,
+                                    Ecore_X_Window subwin)
 {
    int num = 0, i = 0, j = 0, k = 0;
    unsigned char *odata = NULL, *data = NULL;
@@ -1461,23 +1531,23 @@ ecore_x_icccm_colormap_window_unset(Ecore_X_Window win, Ecore_X_Window subwin)
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
 
-   if (!ecore_x_window_prop_property_get(win, ECORE_X_ATOM_WM_COLORMAP_WINDOWS, 
-                                         ECORE_X_ATOM_WINDOW, 32, &odata, &num)) 
+   if (!ecore_x_window_prop_property_get(win, ECORE_X_ATOM_WM_COLORMAP_WINDOWS,
+                                         ECORE_X_ATOM_WINDOW, 32, &odata, &num))
      return;
 
    oldset = (Ecore_X_Window *)odata;
-   for (i = 0; i < num; i++) 
+   for (i = 0; i < num; i++)
      {
-        if (oldset[i] == subwin) 
+        if (oldset[i] == subwin)
           {
-             if (num == 1) 
+             if (num == 1)
                {
                   ecore_x_window_prop_property_del(win, ECORE_X_ATOM_WM_COLORMAP_WINDOWS);
                   if (odata) free(odata);
                   odata = NULL;
                   return;
                }
-             else 
+             else
                {
                   newset = calloc(num - 1, sizeof(Ecore_X_Window));
                   data = (unsigned char *)newset;
@@ -1485,7 +1555,7 @@ ecore_x_icccm_colormap_window_unset(Ecore_X_Window win, Ecore_X_Window subwin)
                     if (oldset[j] != subwin)
                       newset[k++] = oldset[j];
 
-                  ecore_x_window_prop_property_set(win, ECORE_X_ATOM_WM_COLORMAP_WINDOWS, 
+                  ecore_x_window_prop_property_set(win, ECORE_X_ATOM_WM_COLORMAP_WINDOWS,
                                                    ECORE_X_ATOM_WINDOW, 32, data, k);
                   if (odata) free(odata);
                   odata = NULL;
@@ -1496,3 +1566,4 @@ ecore_x_icccm_colormap_window_unset(Ecore_X_Window win, Ecore_X_Window subwin)
      }
    if (odata) free(odata);
 }
+
index afec5f1..6789b94 100644 (file)
@@ -4,27 +4,31 @@
 #include <xcb/xcb_event.h>
 #include <xcb/shm.h>
 
-struct _Ecore_X_Image 
+struct _Ecore_X_Image
 {
    xcb_shm_segment_info_t shminfo;
-   xcb_image_t *xim;
-   Ecore_X_Visual vis;
-   int depth, w, h;
-   int bpl, bpp, rows;
-   unsigned char *data;
-   Eina_Bool shm : 1;
+   xcb_image_t           *xim;
+   Ecore_X_Visual         vis;
+   int                    depth, w, h;
+   int                    bpl, bpp, rows;
+   unsigned char         *data;
+   Eina_Bool              shm : 1;
 };
 
 /* local function prototypes */
-static void _ecore_xcb_image_shm_check(void);
-static void _ecore_xcb_image_shm_create(Ecore_X_Image *im);
-static xcb_format_t *_ecore_xcb_image_find_format(const xcb_setup_t *setup, uint8_t depth);
+static void          _ecore_xcb_image_shm_check(void);
+static void          _ecore_xcb_image_shm_create(Ecore_X_Image *im);
+static xcb_format_t *_ecore_xcb_image_find_format(const xcb_setup_t *setup,
+                                                  uint8_t            depth);
 
 /* local variables */
 static int _ecore_xcb_image_shm_can = -1;
 
 EAPI Ecore_X_Image *
-ecore_x_image_new(int w, int h, Ecore_X_Visual vis, int depth) 
+ecore_x_image_new(int            w,
+                  int            h,
+                  Ecore_X_Visual vis,
+                  int            depth)
 {
    Ecore_X_Image *im;
 
@@ -40,16 +44,16 @@ ecore_x_image_new(int w, int h, Ecore_X_Visual vis, int depth)
    return im;
 }
 
-EAPI void 
-ecore_x_image_free(Ecore_X_Image *im) 
+EAPI void
+ecore_x_image_free(Ecore_X_Image *im)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    CHECK_XCB_CONN;
 
    if (!im) return;
-   if (im->shm) 
+   if (im->shm)
      {
-        if (im->xim) 
+        if (im->xim)
           {
              xcb_shm_detach(_ecore_xcb_conn, im->shminfo.shmseg);
              xcb_image_destroy(im->xim);
@@ -57,7 +61,7 @@ ecore_x_image_free(Ecore_X_Image *im)
              shmctl(im->shminfo.shmid, IPC_RMID, 0);
           }
      }
-   else if (im->xim) 
+   else if (im->xim)
      {
         if (im->xim->data) free(im->xim->data);
         im->xim->data = NULL;
@@ -68,29 +72,36 @@ ecore_x_image_free(Ecore_X_Image *im)
 //   ecore_x_flush();
 }
 
-EAPI Eina_Bool 
-ecore_x_image_get(Ecore_X_Image *im, Ecore_X_Drawable draw, int x, int y, int sx, int sy, int w, int h) 
+EAPI Eina_Bool
+ecore_x_image_get(Ecore_X_Image   *im,
+                  Ecore_X_Drawable draw,
+                  int              x,
+                  int              y,
+                  int              sx,
+                  int              sy,
+                  int              w,
+                  int              h)
 {
    Eina_Bool ret = EINA_TRUE;
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    CHECK_XCB_CONN;
 
-   if (im->shm) 
+   if (im->shm)
      {
         if (!im->xim) _ecore_xcb_image_shm_create(im);
         if (!im->xim) return EINA_FALSE;
 
-        if ((sx == 0) && (w == im->w)) 
+        if ((sx == 0) && (w == im->w))
           {
-             im->xim->data = (uint8_t *)im->data + (im->xim->stride * sy) + 
+             im->xim->data = (uint8_t *)im->data + (im->xim->stride * sy) +
                (sx * im->bpp);
              im->xim->width = w;
              im->xim->height = h;
 
              ecore_x_grab();
-             if (!xcb_image_shm_get(_ecore_xcb_conn, draw, im->xim, 
-                                    im->shminfo, x, y, 0xffffffff)) 
+             if (!xcb_image_shm_get(_ecore_xcb_conn, draw, im->xim,
+                                    im->shminfo, x, y, 0xffffffff))
                {
                   DBG("\tImage Shm Get Failed");
                   ret = EINA_FALSE;
@@ -98,31 +109,31 @@ ecore_x_image_get(Ecore_X_Image *im, Ecore_X_Drawable draw, int x, int y, int sx
              ecore_x_ungrab();
              ecore_x_sync(); // needed
           }
-        else 
+        else
           {
              Ecore_X_Image *tim;
 
              tim = ecore_x_image_new(w, h, im->vis, im->depth);
-             if (tim) 
+             if (tim)
                {
                   ret = ecore_x_image_get(tim, draw, x, y, 0, 0, w, h);
-                  if (ret) 
+                  if (ret)
                     {
                        unsigned char *spixels, *pixels;
                        int sbpp = 0, sbpl = 0, srows = 0;
                        int bpp = 0, bpl = 0, rows = 0;
 
-                       spixels = 
+                       spixels =
                          ecore_x_image_data_get(tim, &sbpl, &srows, &sbpp);
                        pixels = ecore_x_image_data_get(im, &bpl, &rows, &bpp);
-                       if ((spixels) && (pixels)) 
+                       if ((spixels) && (pixels))
                          {
                             unsigned char *p, *sp;
                             int r = 0;
 
                             p = (pixels + (sy * bpl) + (sx * bpp));
                             sp = spixels;
-                            for (r = srows; r > 0; r--) 
+                            for (r = srows; r > 0; r--)
                               {
                                  memcpy(p, sp, sbpl);
                                  p += bpl;
@@ -134,18 +145,18 @@ ecore_x_image_get(Ecore_X_Image *im, Ecore_X_Drawable draw, int x, int y, int sx
                }
           }
      }
-   else 
+   else
      {
         ret = EINA_FALSE;
         ecore_x_grab();
-        im->xim = 
-          xcb_image_get(_ecore_xcb_conn, draw, x, y, w, h, 
+        im->xim =
+          xcb_image_get(_ecore_xcb_conn, draw, x, y, w, h,
                         0xffffffff, XCB_IMAGE_FORMAT_Z_PIXMAP);
         if (!im->xim) ret = EINA_FALSE;
         ecore_x_ungrab();
         ecore_x_sync(); // needed
 
-        if (im->xim) 
+        if (im->xim)
           {
              im->data = (unsigned char *)im->xim->data;
              im->bpl = im->xim->stride;
@@ -163,7 +174,10 @@ ecore_x_image_get(Ecore_X_Image *im, Ecore_X_Drawable draw, int x, int y, int sx
 }
 
 EAPI void *
-ecore_x_image_data_get(Ecore_X_Image *im, int *bpl, int *rows, int *bpp) 
+ecore_x_image_data_get(Ecore_X_Image *im,
+                       int           *bpl,
+                       int           *rows,
+                       int           *bpp)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
 
@@ -178,15 +192,23 @@ ecore_x_image_data_get(Ecore_X_Image *im, int *bpl, int *rows, int *bpp)
    return im->data;
 }
 
-EAPI void 
-ecore_x_image_put(Ecore_X_Image *im, Ecore_X_Drawable draw, Ecore_X_GC gc, int x, int y, int sx, int sy, int w, int h) 
+EAPI void
+ecore_x_image_put(Ecore_X_Image   *im,
+                  Ecore_X_Drawable draw,
+                  Ecore_X_GC       gc,
+                  int              x,
+                  int              y,
+                  int              sx,
+                  int              sy,
+                  int              w,
+                  int              h)
 {
    Ecore_X_GC tgc = 0;
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    CHECK_XCB_CONN;
 
-   if (!gc) 
+   if (!gc)
      {
         uint32_t mask, values[1];
 
@@ -197,26 +219,25 @@ ecore_x_image_put(Ecore_X_Image *im, Ecore_X_Drawable draw, Ecore_X_GC gc, int x
         gc = tgc;
      }
    if (!im->xim) _ecore_xcb_image_shm_create(im);
-   if (im->xim) 
+   if (im->xim)
      {
-        if (im->shm) 
-          xcb_shm_put_image(_ecore_xcb_conn, draw, gc, im->xim->width, 
-                            im->xim->height, sx, sy, w, h, x, y, 
-                            im->xim->depth, im->xim->format, 0, 
-                            im->shminfo.shmseg, 
+        if (im->shm)
+          xcb_shm_put_image(_ecore_xcb_conn, draw, gc, im->xim->width,
+                            im->xim->height, sx, sy, w, h, x, y,
+                            im->xim->depth, im->xim->format, 0,
+                            im->shminfo.shmseg,
                             im->xim->data - im->shminfo.shmaddr);
-//          xcb_image_shm_put(_ecore_xcb_conn, draw, gc, im->xim, 
+//          xcb_image_shm_put(_ecore_xcb_conn, draw, gc, im->xim,
 //                            im->shminfo, sx, sy, x, y, w, h, 0);
-        else 
+        else
           xcb_image_put(_ecore_xcb_conn, draw, gc, im->xim, sx, sy, 0);
-
      }
    if (tgc) ecore_x_gc_free(tgc);
    ecore_x_sync();
 }
 
-EAPI Eina_Bool 
-ecore_x_image_is_argb32_get(Ecore_X_Image *im) 
+EAPI Eina_Bool
+ecore_x_image_is_argb32_get(Ecore_X_Image *im)
 {
    xcb_visualtype_t *vis;
 
@@ -226,16 +247,16 @@ ecore_x_image_is_argb32_get(Ecore_X_Image *im)
    vis = (xcb_visualtype_t *)im->vis;
    if (!im->xim) _ecore_xcb_image_shm_create(im);
 
-   if (((vis->_class == XCB_VISUAL_CLASS_TRUE_COLOR) || 
-        (vis->_class == XCB_VISUAL_CLASS_DIRECT_COLOR)) && 
-       (im->depth >= 24) && (vis->red_mask == 0xff0000) && 
+   if (((vis->_class == XCB_VISUAL_CLASS_TRUE_COLOR) ||
+        (vis->_class == XCB_VISUAL_CLASS_DIRECT_COLOR)) &&
+       (im->depth >= 24) && (vis->red_mask == 0xff0000) &&
        (vis->green_mask == 0x00ff00) && (vis->blue_mask == 0x0000ff))
      {
 #ifdef WORDS_BIGENDIAN
-        if (im->xim->byte_order == XCB_IMAGE_ORDER_LSB_FIRST) 
+        if (im->xim->byte_order == XCB_IMAGE_ORDER_LSB_FIRST)
           return EINA_TRUE;
 #else
-        if (im->xim->byte_order == XCB_IMAGE_ORDER_MSB_FIRST) 
+        if (im->xim->byte_order == XCB_IMAGE_ORDER_MSB_FIRST)
           return EINA_TRUE;
 #endif
      }
@@ -243,25 +264,37 @@ ecore_x_image_is_argb32_get(Ecore_X_Image *im)
    return EINA_FALSE;
 }
 
-EAPI Eina_Bool 
-ecore_x_image_to_argb_convert(void *src, int sbpp, int sbpl, Ecore_X_Colormap c, Ecore_X_Visual v, int x, int y, int w, int h, unsigned int *dst, int dbpl, int dx, int dy) 
+EAPI Eina_Bool
+ecore_x_image_to_argb_convert(void            *src,
+                              int              sbpp,
+                              int              sbpl,
+                              Ecore_X_Colormap c,
+                              Ecore_X_Visual   v,
+                              int              x,
+                              int              y,
+                              int              w,
+                              int              h,
+                              unsigned int    *dst,
+                              int              dbpl,
+                              int              dx,
+                              int              dy)
 {
    xcb_visualtype_t *vis;
    uint32_t *cols;
    int n = 0, nret = 0, i, row, mode = 0;
    unsigned int pal[256], r, g, b;
    enum
-     {
-        rgbnone = 0,
-        rgb565,
-        bgr565,
-        rgbx555,
-        argbx888,
-        abgrx888,
-        rgba888x,
-        bgra888x,
-        argbx666
-     };
+   {
+      rgbnone = 0,
+      rgb565,
+      bgr565,
+      rgbx555,
+      argbx888,
+      abgrx888,
+      rgba888x,
+      bgra888x,
+      argbx666
+   };
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    CHECK_XCB_CONN;
@@ -272,14 +305,14 @@ ecore_x_image_to_argb_convert(void *src, int sbpp, int sbpl, Ecore_X_Colormap c,
    n = vis->colormap_entries;
    if ((n <= 256) &&
        ((vis->_class == XCB_VISUAL_CLASS_PSEUDO_COLOR) ||
-           (vis->_class == XCB_VISUAL_CLASS_STATIC_COLOR) ||
-           (vis->_class == XCB_VISUAL_CLASS_GRAY_SCALE) ||
-           (vis->_class == XCB_VISUAL_CLASS_STATIC_GRAY)))
+        (vis->_class == XCB_VISUAL_CLASS_STATIC_COLOR) ||
+        (vis->_class == XCB_VISUAL_CLASS_GRAY_SCALE) ||
+        (vis->_class == XCB_VISUAL_CLASS_STATIC_GRAY)))
      {
         xcb_query_colors_cookie_t cookie;
         xcb_query_colors_reply_t *reply;
 
-        if (!c) 
+        if (!c)
           {
              c = (xcb_colormap_t)((xcb_screen_t *)
                                   _ecore_xcb_screen)->default_colormap;
@@ -291,61 +324,61 @@ ecore_x_image_to_argb_convert(void *src, int sbpp, int sbpl, Ecore_X_Colormap c,
 
         cookie = xcb_query_colors_unchecked(_ecore_xcb_conn, c, n, cols);
         reply = xcb_query_colors_reply(_ecore_xcb_conn, cookie, NULL);
-        if (reply) 
+        if (reply)
           {
              xcb_rgb_iterator_t iter;
              xcb_rgb_t *ret;
 
              iter = xcb_query_colors_colors_iterator(reply);
              ret = xcb_query_colors_colors(reply);
-             if (ret) 
+             if (ret)
                {
-                  for (i = 0; iter.rem; xcb_rgb_next(&iter), i++) 
+                  for (i = 0; iter.rem; xcb_rgb_next(&iter), i++)
                     {
-                       pal[i] = 0xff000000 | 
-                         ((iter.data->red   >> 8) << 16) |
+                       pal[i] = 0xff000000 |
+                         ((iter.data->red >> 8) << 16) |
                          ((iter.data->green >> 8) << 8) |
-                         ((iter.data->blue  >> 8));
+                         ((iter.data->blue >> 8));
                     }
                   nret = n;
                }
              free(reply);
           }
      }
-   else if ((vis->_class == XCB_VISUAL_CLASS_TRUE_COLOR) || 
+   else if ((vis->_class == XCB_VISUAL_CLASS_TRUE_COLOR) ||
             (vis->_class == XCB_VISUAL_CLASS_DIRECT_COLOR))
      {
-        if ((vis->red_mask   == 0x00ff0000) &&
+        if ((vis->red_mask == 0x00ff0000) &&
             (vis->green_mask == 0x0000ff00) &&
-            (vis->blue_mask  == 0x000000ff))
+            (vis->blue_mask == 0x000000ff))
           mode = argbx888;
-        else if ((vis->red_mask   == 0x000000ff) &&
+        else if ((vis->red_mask == 0x000000ff) &&
                  (vis->green_mask == 0x0000ff00) &&
-                 (vis->blue_mask  == 0x00ff0000))
+                 (vis->blue_mask == 0x00ff0000))
           mode = abgrx888;
-        else if ((vis->red_mask   == 0xff000000) &&
+        else if ((vis->red_mask == 0xff000000) &&
                  (vis->green_mask == 0x00ff0000) &&
-                 (vis->blue_mask  == 0x0000ff00))
+                 (vis->blue_mask == 0x0000ff00))
           mode = rgba888x;
-        else if ((vis->red_mask   == 0x0000ff00) &&
+        else if ((vis->red_mask == 0x0000ff00) &&
                  (vis->green_mask == 0x00ff0000) &&
-                 (vis->blue_mask  == 0xff000000))
+                 (vis->blue_mask == 0xff000000))
           mode = bgra888x;
-        else if ((vis->red_mask   == 0x0003f000) &&
+        else if ((vis->red_mask == 0x0003f000) &&
                  (vis->green_mask == 0x00000fc0) &&
-                 (vis->blue_mask  == 0x0000003f))
+                 (vis->blue_mask == 0x0000003f))
           mode = argbx666;
-        else if ((vis->red_mask   == 0x0000f800) &&
+        else if ((vis->red_mask == 0x0000f800) &&
                  (vis->green_mask == 0x000007e0) &&
-                 (vis->blue_mask  == 0x0000001f))
+                 (vis->blue_mask == 0x0000001f))
           mode = rgb565;
-        else if ((vis->red_mask   == 0x0000001f) &&
+        else if ((vis->red_mask == 0x0000001f) &&
                  (vis->green_mask == 0x000007e0) &&
-                 (vis->blue_mask  == 0x0000f800))
+                 (vis->blue_mask == 0x0000f800))
           mode = bgr565;
-        else if ((vis->red_mask   == 0x00007c00) &&
+        else if ((vis->red_mask == 0x00007c00) &&
                  (vis->green_mask == 0x000003e0) &&
-                 (vis->blue_mask  == 0x0000001f))
+                 (vis->blue_mask == 0x0000001f))
           mode = rgbx555;
         else
           return EINA_FALSE;
@@ -356,13 +389,13 @@ ecore_x_image_to_argb_convert(void *src, int sbpp, int sbpl, Ecore_X_Colormap c,
         unsigned short *s16;
         unsigned int *s32, *dp, *de;
 
-        dp = ((unsigned int *)(((unsigned char *)dst) + 
+        dp = ((unsigned int *)(((unsigned char *)dst) +
                                ((dy + row) * dbpl))) + dx;
         de = dp + w;
         switch (sbpp)
           {
            case 8:
-             s8 = ((unsigned char *)(((unsigned char *)src) + 
+             s8 = ((unsigned char *)(((unsigned char *)src) +
                                      ((y + row) * sbpl))) + x;
              if (nret > 0)
                {
@@ -375,8 +408,9 @@ ecore_x_image_to_argb_convert(void *src, int sbpp, int sbpl, Ecore_X_Colormap c,
              else
                return EINA_FALSE;
              break;
+
            case 16:
-             s16 = ((unsigned short *)(((unsigned char *)src) + 
+             s16 = ((unsigned short *)(((unsigned char *)src) +
                                        ((y + row) * sbpl))) + x;
              switch (mode)
                {
@@ -393,6 +427,7 @@ ecore_x_image_to_argb_convert(void *src, int sbpp, int sbpl, Ecore_X_Colormap c,
                        s16++; dp++;
                     }
                   break;
+
                 case bgr565:
                   while (dp < de)
                     {
@@ -406,6 +441,7 @@ ecore_x_image_to_argb_convert(void *src, int sbpp, int sbpl, Ecore_X_Colormap c,
                        s16++; dp++;
                     }
                   break;
+
                 case rgbx555:
                   while (dp < de)
                     {
@@ -419,14 +455,16 @@ ecore_x_image_to_argb_convert(void *src, int sbpp, int sbpl, Ecore_X_Colormap c,
                        s16++; dp++;
                     }
                   break;
+
                 default:
                   return EINA_FALSE;
                   break;
                }
              break;
+
            case 24:
            case 32:
-             s32 = ((unsigned int *)(((unsigned char *)src) + 
+             s32 = ((unsigned int *)(((unsigned char *)src) +
                                      ((y + row) * sbpl))) + x;
              switch (mode)
                {
@@ -437,6 +475,7 @@ ecore_x_image_to_argb_convert(void *src, int sbpp, int sbpl, Ecore_X_Colormap c,
                        s32++; dp++;
                     }
                   break;
+
                 case abgrx888:
                   while (dp < de)
                     {
@@ -447,6 +486,7 @@ ecore_x_image_to_argb_convert(void *src, int sbpp, int sbpl, Ecore_X_Colormap c,
                        s32++; dp++;
                     }
                   break;
+
                 case rgba888x:
                   while (dp < de)
                     {
@@ -454,6 +494,7 @@ ecore_x_image_to_argb_convert(void *src, int sbpp, int sbpl, Ecore_X_Colormap c,
                        s32++; dp++;
                     }
                   break;
+
                 case bgra888x:
                   while (dp < de)
                     {
@@ -464,6 +505,7 @@ ecore_x_image_to_argb_convert(void *src, int sbpp, int sbpl, Ecore_X_Colormap c,
                        s32++; dp++;
                     }
                   break;
+
                 case argbx666:
                   while (dp < de)
                     {
@@ -477,12 +519,14 @@ ecore_x_image_to_argb_convert(void *src, int sbpp, int sbpl, Ecore_X_Colormap c,
                        s32++; dp++;
                     }
                   break;
+
                 default:
                   return EINA_FALSE;
                   break;
                }
              break;
              break;
+
            default:
              return EINA_FALSE;
              break;
@@ -492,107 +536,107 @@ ecore_x_image_to_argb_convert(void *src, int sbpp, int sbpl, Ecore_X_Colormap c,
 }
 
 /* local functions */
-static void 
-_ecore_xcb_image_shm_check(void) 
+static void
+_ecore_xcb_image_shm_check(void)
 {
 //   xcb_shm_query_version_reply_t *reply;
-   xcb_shm_segment_info_t shminfo;
-   xcb_shm_get_image_cookie_t cookie;
-   xcb_shm_get_image_reply_t *ireply;
-   xcb_image_t *img = 0;
-   uint8_t depth = 0;
-
-   if (_ecore_xcb_image_shm_can != -1) return;
-   CHECK_XCB_CONN;
-
-   /* reply =  */
-   /*   xcb_shm_query_version_reply(_ecore_xcb_conn,  */
-   /*                               xcb_shm_query_version(_ecore_xcb_conn), NULL); */
-   /* if (!reply)  */
-   /*   { */
-   /*      _ecore_xcb_image_shm_can = 0; */
-   /*      return; */
-   /*   } */
-
-   /* if ((reply->major_version < 1) ||  */
-   /*     ((reply->major_version == 1) && (reply->minor_version == 0)))  */
-   /*   { */
-   /*      _ecore_xcb_image_shm_can = 0; */
-   /*      free(reply); */
-   /*      return; */
-   /*   } */
-
-   /* free(reply); */
-
-   depth = ((xcb_screen_t *)_ecore_xcb_screen)->root_depth;
-
-   ecore_x_sync(); // needed
-
-   img = _ecore_xcb_image_create_native(1, 1, XCB_IMAGE_FORMAT_Z_PIXMAP, 
-                                        depth, NULL, ~0, NULL);
-   if (!img) 
-     {
-        _ecore_xcb_image_shm_can = 0;
-        return;
-     }
-
-   shminfo.shmid = 
-     shmget(IPC_PRIVATE, img->stride * img->height, (IPC_CREAT | 0666));
-   if (shminfo.shmid == (uint32_t)-1) 
-     {
-        xcb_image_destroy(img);
-        _ecore_xcb_image_shm_can = 0;
-        return;
-     }
-
-   shminfo.shmaddr = shmat(shminfo.shmid, 0, 0);
-   img->data = shminfo.shmaddr;
-   if (img->data == (uint8_t *)-1) 
-     {
-        xcb_image_destroy(img);
-        _ecore_xcb_image_shm_can = 0;
-        return;
-     }
-
-   shminfo.shmseg = xcb_generate_id(_ecore_xcb_conn);
-   xcb_shm_attach(_ecore_xcb_conn, shminfo.shmseg, shminfo.shmid, 0);
-
-   cookie = 
-     xcb_shm_get_image(_ecore_xcb_conn, 
-                       ((xcb_screen_t *)_ecore_xcb_screen)->root, 
-                       0, 0, img->width, img->height, 
-                       0xffffffff, img->format, 
-                       shminfo.shmseg, img->data - shminfo.shmaddr);
-
-   ecore_x_sync(); // needed
-
-   ireply = xcb_shm_get_image_reply(_ecore_xcb_conn, cookie, NULL);
-   if (ireply) 
-     {
-        _ecore_xcb_image_shm_can = 1;
-        free(ireply);
-     }
-   else
-     _ecore_xcb_image_shm_can = 0;
-
-   xcb_shm_detach(_ecore_xcb_conn, shminfo.shmseg);
-   xcb_image_destroy(img);
-   shmdt(shminfo.shmaddr);
-   shmctl(shminfo.shmid, IPC_RMID, 0);
+     xcb_shm_segment_info_t shminfo;
+     xcb_shm_get_image_cookie_t cookie;
+     xcb_shm_get_image_reply_t *ireply;
+     xcb_image_t *img = 0;
+     uint8_t depth = 0;
+
+     if (_ecore_xcb_image_shm_can != -1) return;
+     CHECK_XCB_CONN;
+
+     /* reply =  */
+     /*   xcb_shm_query_version_reply(_ecore_xcb_conn,  */
+     /*                               xcb_shm_query_version(_ecore_xcb_conn), NULL); */
+     /* if (!reply)  */
+     /*   { */
+     /*      _ecore_xcb_image_shm_can = 0; */
+     /*      return; */
+     /*   } */
+
+     /* if ((reply->major_version < 1) ||  */
+     /*     ((reply->major_version == 1) && (reply->minor_version == 0)))  */
+     /*   { */
+     /*      _ecore_xcb_image_shm_can = 0; */
+     /*      free(reply); */
+     /*      return; */
+     /*   } */
+
+     /* free(reply); */
+
+     depth = ((xcb_screen_t *)_ecore_xcb_screen)->root_depth;
+
+     ecore_x_sync(); // needed
+
+     img = _ecore_xcb_image_create_native(1, 1, XCB_IMAGE_FORMAT_Z_PIXMAP,
+                                          depth, NULL, ~0, NULL);
+     if (!img)
+       {
+          _ecore_xcb_image_shm_can = 0;
+          return;
+       }
+
+     shminfo.shmid =
+       shmget(IPC_PRIVATE, img->stride * img->height, (IPC_CREAT | 0666));
+     if (shminfo.shmid == (uint32_t)-1)
+       {
+          xcb_image_destroy(img);
+          _ecore_xcb_image_shm_can = 0;
+          return;
+       }
+
+     shminfo.shmaddr = shmat(shminfo.shmid, 0, 0);
+     img->data = shminfo.shmaddr;
+     if (img->data == (uint8_t *)-1)
+       {
+          xcb_image_destroy(img);
+          _ecore_xcb_image_shm_can = 0;
+          return;
+       }
+
+     shminfo.shmseg = xcb_generate_id(_ecore_xcb_conn);
+     xcb_shm_attach(_ecore_xcb_conn, shminfo.shmseg, shminfo.shmid, 0);
+
+     cookie =
+       xcb_shm_get_image(_ecore_xcb_conn,
+                         ((xcb_screen_t *)_ecore_xcb_screen)->root,
+                         0, 0, img->width, img->height,
+                         0xffffffff, img->format,
+                         shminfo.shmseg, img->data - shminfo.shmaddr);
+
+     ecore_x_sync(); // needed
+
+     ireply = xcb_shm_get_image_reply(_ecore_xcb_conn, cookie, NULL);
+     if (ireply)
+       {
+          _ecore_xcb_image_shm_can = 1;
+          free(ireply);
+       }
+     else
+       _ecore_xcb_image_shm_can = 0;
+
+     xcb_shm_detach(_ecore_xcb_conn, shminfo.shmseg);
+     xcb_image_destroy(img);
+     shmdt(shminfo.shmaddr);
+     shmctl(shminfo.shmid, IPC_RMID, 0);
 }
 
-static void 
-_ecore_xcb_image_shm_create(Ecore_X_Image *im) 
+static void
+_ecore_xcb_image_shm_create(Ecore_X_Image *im)
 {
    CHECK_XCB_CONN;
 
-   im->xim = 
-     _ecore_xcb_image_create_native(im->w, im->h, XCB_IMAGE_FORMAT_Z_PIXMAP, 
+   im->xim =
+     _ecore_xcb_image_create_native(im->w, im->h, XCB_IMAGE_FORMAT_Z_PIXMAP,
                                     im->depth, NULL, ~0, NULL);
    if (!im->xim) return;
 
    im->shminfo.shmid = shmget(IPC_PRIVATE, im->xim->size, (IPC_CREAT | 0666));
-   if (im->shminfo.shmid == (uint32_t)-1) 
+   if (im->shminfo.shmid == (uint32_t)-1)
      {
         xcb_image_destroy(im->xim);
         return;
@@ -624,7 +668,13 @@ _ecore_xcb_image_shm_create(Ecore_X_Image *im)
 }
 
 xcb_image_t *
-_ecore_xcb_image_create_native(int w, int h, xcb_image_format_t format, uint8_t depth, void *base, uint32_t bytes, uint8_t *data) 
+_ecore_xcb_image_create_native(int                w,
+                               int                h,
+                               xcb_image_format_t format,
+                               uint8_t            depth,
+                               void              *base,
+                               uint32_t           bytes,
+                               uint8_t           *data)
 {
    static uint8_t dpth = 0;
    static xcb_format_t *fmt = NULL;
@@ -633,8 +683,8 @@ _ecore_xcb_image_create_native(int w, int h, xcb_image_format_t format, uint8_t
 
    CHECK_XCB_CONN;
 
-   /* NB: We cannot use xcb_image_create_native as it only creates images 
-    * using MSB_FIRST, so this routine recreates that function and uses 
+   /* NB: We cannot use xcb_image_create_native as it only creates images
+    * using MSB_FIRST, so this routine recreates that function and uses
     * the endian-ness of the server setup */
    setup = xcb_get_setup(_ecore_xcb_conn);
    xif = format;
@@ -642,26 +692,28 @@ _ecore_xcb_image_create_native(int w, int h, xcb_image_format_t format, uint8_t
    if ((xif == XCB_IMAGE_FORMAT_Z_PIXMAP) && (depth == 1))
      xif = XCB_IMAGE_FORMAT_XY_PIXMAP;
 
-   if (dpth != depth) 
+   if (dpth != depth)
      {
         dpth = depth;
         fmt = _ecore_xcb_image_find_format(setup, depth);
         if (!fmt) return 0;
      }
 
-   switch (xif) 
+   switch (xif)
      {
       case XCB_IMAGE_FORMAT_XY_BITMAP:
         if (depth != 1) return 0;
+
       case XCB_IMAGE_FORMAT_XY_PIXMAP:
       case XCB_IMAGE_FORMAT_Z_PIXMAP:
-        return xcb_image_create(w, h, xif, 
-                                fmt->scanline_pad, 
-                                fmt->depth, fmt->bits_per_pixel, 
-                                setup->bitmap_format_scanline_unit, 
-                                setup->image_byte_order, 
-                                setup->bitmap_format_bit_order, 
+        return xcb_image_create(w, h, xif,
+                                fmt->scanline_pad,
+                                fmt->depth, fmt->bits_per_pixel,
+                                setup->bitmap_format_scanline_unit,
+                                setup->image_byte_order,
+                                setup->bitmap_format_bit_order,
                                 base, bytes, data);
+
       default:
         break;
      }
@@ -670,7 +722,8 @@ _ecore_xcb_image_create_native(int w, int h, xcb_image_format_t format, uint8_t
 }
 
 static xcb_format_t *
-_ecore_xcb_image_find_format(const xcb_setup_t *setup, uint8_t depth) 
+_ecore_xcb_image_find_format(const xcb_setup_t *setup,
+                             uint8_t            depth)
 {
    xcb_format_t *fmt, *fmtend;
 
@@ -679,8 +732,9 @@ _ecore_xcb_image_find_format(const xcb_setup_t *setup, uint8_t depth)
    fmt = xcb_setup_pixmap_formats(setup);
    fmtend = fmt + xcb_setup_pixmap_formats_length(setup);
    for (; fmt != fmtend; ++fmt)
-     if (fmt->depth == depth) 
+     if (fmt->depth == depth)
        return fmt;
 
    return 0;
 }
+
index b0fa27c..c0338c2 100644 (file)
@@ -4,14 +4,31 @@
 # include <xcb/xcb_event.h>
 #endif
 
+/* FIXME: this is a guess. can't find defines for touch events in xcb libs
+ * online */
+/* these are not yet defined in xcb support for xi2 - so manually create */
+#ifndef XCB_INPUT_DEVICE_TOUCH_BEGIN
+#define XCB_INPUT_DEVICE_TOUCH_BEGIN    18
+#endif
+#ifndef XCB_INPUT_DEVICE_TOUCH_END
+#define XCB_INPUT_DEVICE_TOUCH_END      19
+#endif
+#ifndef XCB_INPUT_DEVICE_TOUCH_UPDATE
+#define XCB_INPUT_DEVICE_TOUCH_UPDATE   21
+#endif
+
+#ifndef XCB_INPUT_POINTER_EMULATED_MASK
+#define XCB_INPUT_POINTER_EMULATED_MASK (1 << 16)
+#endif
+
 /* local variables */
 static Eina_Bool _input_avail = EINA_FALSE;
 
 /* external variables */
 int _ecore_xcb_event_input = 0;
 
-void 
-_ecore_xcb_input_init(void) 
+void
+_ecore_xcb_input_init(void)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
 
@@ -20,8 +37,8 @@ _ecore_xcb_input_init(void)
 #endif
 }
 
-void 
-_ecore_xcb_input_finalize(void) 
+void
+_ecore_xcb_input_finalize(void)
 {
 #ifdef ECORE_XCB_XINPUT
    xcb_input_get_extension_version_cookie_t cookie;
@@ -32,38 +49,38 @@ _ecore_xcb_input_finalize(void)
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
 
 #ifdef ECORE_XCB_XINPUT
-   cookie = 
+   cookie =
      xcb_input_get_extension_version_unchecked(_ecore_xcb_conn, 127, buff);
-   reply = 
+   reply =
      xcb_input_get_extension_version_reply(_ecore_xcb_conn, cookie, NULL);
-   if (reply) 
+   if (reply)
      {
         _input_avail = EINA_TRUE;
         free(reply);
      }
 
-   if (_input_avail) 
+   if (_input_avail)
      {
         const xcb_query_extension_reply_t *ext_reply;
 
         ext_reply = xcb_get_extension_data(_ecore_xcb_conn, &xcb_input_id);
-        if (ext_reply) 
+        if (ext_reply)
           _ecore_xcb_event_input = ext_reply->first_event;
      }
 #endif
 }
 
-void 
-_ecore_xcb_input_shutdown(void) 
+void
+_ecore_xcb_input_shutdown(void)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
 }
 
-void 
+void
 #ifdef ECORE_XCB_XINPUT
-_ecore_xcb_input_handle_event(xcb_generic_event_t *event) 
+_ecore_xcb_input_handle_event(xcb_generic_event_t *event)
 #else
-_ecore_xcb_input_handle_event(xcb_generic_event_t *event __UNUSED__) 
+_ecore_xcb_input_handle_event(xcb_generic_event_t * event __UNUSED__)
 #endif
 {
 #ifdef ECORE_XCB_XINPUT
@@ -73,70 +90,130 @@ _ecore_xcb_input_handle_event(xcb_generic_event_t *event __UNUSED__)
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    CHECK_XCB_CONN;
 
+   /* FIXME: look at xlib ecore_x_xi2.c to copy logic in when i can find an
+    * xcb-input lib to test with */
 #ifdef ECORE_XCB_XINPUT
    ev = (xcb_ge_event_t *)event;
-   switch (ev->event_type) 
+   switch (ev->event_type)
      {
-      case XCB_INPUT_DEVICE_MOTION_NOTIFY: 
-          {
-             xcb_input_device_motion_notify_event_t *de;
-             unsigned int child_win = 0;
-
-             de = (xcb_input_device_motion_notify_event_t *)ev->pad1;
-             child_win = (de->child ? de->child : de->event);
-             _ecore_xcb_event_mouse_move(de->time, de->state, de->event_x, 
-                                         de->event_y, de->root_x, de->root_y, 
-                                         de->event, child_win, de->root, 
-                                         de->same_screen, de->device_id, 
-                                         1, 1, 1.0, 0.0, 
-                                         de->event_x, de->event_y, 
-                                         de->root_x, de->root_y);
-          }
-        break;
-      case XCB_INPUT_DEVICE_BUTTON_PRESS: 
-          {
-             xcb_input_device_button_press_event_t *de;
-             unsigned int child_win = 0;
-
-             de = (xcb_input_device_button_press_event_t *)ev->pad1;
-             child_win = (de->child ? de->child : de->event);
-             _ecore_xcb_event_mouse_button(ECORE_EVENT_MOUSE_BUTTON_DOWN, 
-                                           de->time, de->state, de->detail, 
-                                           de->event_x, de->event_y, 
-                                           de->root_x, de->root_y, de->event, 
-                                           child_win, de->root, 
-                                           de->same_screen, de->device_id, 
-                                           1, 1, 1.0, 0.0, 
-                                           de->event_x, de->event_y, 
-                                           de->root_x, de->root_y);
-          }
-        break;
-      case XCB_INPUT_DEVICE_BUTTON_RELEASE: 
-          {
-             xcb_input_device_button_release_event_t *de;
-             unsigned int child_win = 0;
-
-             de = (xcb_input_device_button_release_event_t *)ev->pad1;
-             child_win = (de->child ? de->child : de->event);
-             _ecore_xcb_event_mouse_button(ECORE_EVENT_MOUSE_BUTTON_UP, 
-                                           de->time, de->state, de->detail, 
-                                           de->event_x, de->event_y, 
-                                           de->root_x, de->root_y, de->event, 
-                                           child_win, de->root, 
-                                           de->same_screen, de->device_id, 
-                                           1, 1, 1.0, 0.0, 
-                                           de->event_x, de->event_y, 
-                                           de->root_x, de->root_y);
-          }
-        break;
+      case XCB_INPUT_DEVICE_MOTION_NOTIFY:
+      {
+         xcb_input_device_motion_notify_event_t *de;
+         unsigned int child_win = 0;
+
+         de = (xcb_input_device_motion_notify_event_t *)ev->pad1;
+         child_win = (de->child ? de->child : de->event);
+         _ecore_xcb_event_mouse_move(de->time, de->state, de->event_x,
+                                     de->event_y, de->root_x, de->root_y,
+                                     de->event, child_win, de->root,
+                                     de->same_screen, de->device_id,
+                                     1, 1, 1.0, 0.0,
+                                     de->event_x, de->event_y,
+                                     de->root_x, de->root_y);
+      }
+      break;
+
+      case XCB_INPUT_DEVICE_BUTTON_PRESS:
+      {
+         xcb_input_device_button_press_event_t *de;
+         unsigned int child_win = 0;
+
+         de = (xcb_input_device_button_press_event_t *)ev->pad1;
+         child_win = (de->child ? de->child : de->event);
+         _ecore_xcb_event_mouse_button(ECORE_EVENT_MOUSE_BUTTON_DOWN,
+                                       de->time, de->state, de->detail,
+                                       de->event_x, de->event_y,
+                                       de->root_x, de->root_y, de->event,
+                                       child_win, de->root,
+                                       de->same_screen, de->device_id,
+                                       1, 1, 1.0, 0.0,
+                                       de->event_x, de->event_y,
+                                       de->root_x, de->root_y);
+      }
+      break;
+
+      case XCB_INPUT_DEVICE_BUTTON_RELEASE:
+      {
+         xcb_input_device_button_release_event_t *de;
+         unsigned int child_win = 0;
+
+         de = (xcb_input_device_button_release_event_t *)ev->pad1;
+         child_win = (de->child ? de->child : de->event);
+         _ecore_xcb_event_mouse_button(ECORE_EVENT_MOUSE_BUTTON_UP,
+                                       de->time, de->state, de->detail,
+                                       de->event_x, de->event_y,
+                                       de->root_x, de->root_y, de->event,
+                                       child_win, de->root,
+                                       de->same_screen, de->device_id,
+                                       1, 1, 1.0, 0.0,
+                                       de->event_x, de->event_y,
+                                       de->root_x, de->root_y);
+      }
+      break;
+
+      case XCB_INPUT_DEVICE_TOUCH_UPDATE:
+      {
+         xcb_input_device_motion_notify_event_t *de;
+         unsigned int child_win = 0;
+
+         de = (xcb_input_device_motion_notify_event_t *)ev->pad1;
+         child_win = (de->child ? de->child : de->event);
+         _ecore_xcb_event_mouse_move(de->time, de->state, de->event_x,
+                                     de->event_y, de->root_x, de->root_y,
+                                     de->event, child_win, de->root,
+                                     de->same_screen, de->device_id,
+                                     1, 1, 1.0, 0.0,
+                                     de->event_x, de->event_y,
+                                     de->root_x, de->root_y);
+      }
+      break;
+
+      case XCB_INPUT_DEVICE_TOUCH_BEGIN:
+      {
+         xcb_input_device_button_press_event_t *de;
+         unsigned int child_win = 0;
+
+         de = (xcb_input_device_button_press_event_t *)ev->pad1;
+         child_win = (de->child ? de->child : de->event);
+         _ecore_xcb_event_mouse_button(ECORE_EVENT_MOUSE_BUTTON_DOWN,
+                                       de->time, de->state, de->detail,
+                                       de->event_x, de->event_y,
+                                       de->root_x, de->root_y, de->event,
+                                       child_win, de->root,
+                                       de->same_screen, de->device_id,
+                                       1, 1, 1.0, 0.0,
+                                       de->event_x, de->event_y,
+                                       de->root_x, de->root_y);
+      }
+      break;
+
+      case XCB_INPUT_DEVICE_TOUCH_END:
+      {
+         xcb_input_device_button_release_event_t *de;
+         unsigned int child_win = 0;
+
+         de = (xcb_input_device_button_release_event_t *)ev->pad1;
+         child_win = (de->child ? de->child : de->event);
+         _ecore_xcb_event_mouse_button(ECORE_EVENT_MOUSE_BUTTON_UP,
+                                       de->time, de->state, de->detail,
+                                       de->event_x, de->event_y,
+                                       de->root_x, de->root_y, de->event,
+                                       child_win, de->root,
+                                       de->same_screen, de->device_id,
+                                       1, 1, 1.0, 0.0,
+                                       de->event_x, de->event_y,
+                                       de->root_x, de->root_y);
+      }
+      break;
+
       default:
         break;
      }
 #endif
 }
 
-EAPI Eina_Bool 
-ecore_x_input_multi_select(Ecore_X_Window win) 
+EAPI Eina_Bool
+ecore_x_input_multi_select(Ecore_X_Window win)
 {
    Eina_Bool find = EINA_FALSE;
 #ifdef ECORE_XCB_XINPUT
@@ -150,34 +227,40 @@ ecore_x_input_multi_select(Ecore_X_Window win)
 
    if (!_input_avail) return EINA_FALSE;
 
+   /* FIXME: i can't seemingly test this! no xcb input lib so can't look and
+    * test and look at types etc. - look at xlib code and copy logic over
+    * when we can */
 #ifdef ECORE_XCB_XINPUT
    dcookie = xcb_input_list_input_devices_unchecked(_ecore_xcb_conn);
-   dreply = 
+   dreply =
      xcb_input_list_input_devices_reply(_ecore_xcb_conn, dcookie, NULL);
    if (!dreply) return EINA_FALSE;
 
    diter = xcb_input_list_input_devices_devices_iterator(dreply);
-   while (diter.rem) 
+   while (diter.rem)
      {
         xcb_input_device_info_t *dev;
-        const xcb_input_event_class_t iclass = 
-          {
-             XCB_INPUT_DEVICE_BUTTON_PRESS | 
-             XCB_INPUT_DEVICE_BUTTON_RELEASE | 
-             XCB_INPUT_DEVICE_MOTION_NOTIFY
-          };
+        const xcb_input_event_class_t iclass[] =
+        {
+           XCB_INPUT_DEVICE_BUTTON_PRESS,
+           XCB_INPUT_DEVICE_BUTTON_RELEASE,
+           XCB_INPUT_DEVICE_MOTION_NOTIFY,
+           XCB_INPUT_DEVICE_TOUCH_BEGIN,
+           XCB_INPUT_DEVICE_TOUCH_END,
+           XCB_INPUT_DEVICE_TOUCH_UPDATE
+        };
 
         dev = diter.data;
-        if (dev->device_use == XCB_INPUT_DEVICE_USE_IS_X_EXTENSION_DEVICE) 
+        if (dev->device_use == XCB_INPUT_DEVICE_USE_IS_X_EXTENSION_DEVICE)
           {
              DBG("Device %d", dev->device_id);
              DBG("\tType: %d", dev->device_type);
              DBG("\tNum Classes: %d", dev->num_class_info);
              DBG("\tUse: %d", dev->device_use);
 
-             /* FIXME: This may not be correct !!
-              * I have no extra Input Devices to test with */
-             xcb_input_select_extension_event(_ecore_xcb_conn, win, 1, &iclass);
+             xcb_input_select_extension_event(_ecore_xcb_conn, win,
+                                              sizeof(iclass) / sizeof(xcb_input_event_class_t),
+                                              iclass);
              find = EINA_TRUE;
           }
         xcb_input_device_info_next(&diter);
@@ -188,3 +271,4 @@ ecore_x_input_multi_select(Ecore_X_Window win)
    return find;
    win = 0;
 }
+
index 83f51c3..40304df 100644 (file)
@@ -6,10 +6,17 @@
 #include <X11/keysym.h>
 
 /* local function prototypes */
-static int _ecore_xcb_keymap_mask_get(void *reply, xcb_keysym_t sym);
+static int          _ecore_xcb_keymap_mask_get(void        *reply,
+                                               xcb_keysym_t sym);
 static xcb_keysym_t _ecore_xcb_keymap_string_to_keysym(const char *str);
-static int _ecore_xcb_keymap_translate_key(xcb_keycode_t keycode, unsigned int modifiers, unsigned int *modifiers_return, xcb_keysym_t *keysym_return);
-static int _ecore_xcb_keymap_translate_keysym(xcb_keysym_t keysym, unsigned int modifiers, char *buffer, int bytes);
+static int          _ecore_xcb_keymap_translate_key(xcb_keycode_t keycode,
+                                                    unsigned int  modifiers,
+                                                    unsigned int *modifiers_return,
+                                                    xcb_keysym_t *keysym_return);
+static int _ecore_xcb_keymap_translate_keysym(xcb_keysym_t keysym,
+                                              unsigned int modifiers,
+                                              char        *buffer,
+                                              int          bytes);
 
 /* local variables */
 static xcb_key_symbols_t *_ecore_xcb_keysyms;
@@ -25,16 +32,16 @@ EAPI int ECORE_X_LOCK_NUM = 0;
 EAPI int ECORE_X_LOCK_CAPS = 0;
 EAPI int ECORE_X_LOCK_SHIFT = 0;
 
-void 
-_ecore_xcb_keymap_init(void) 
+void
+_ecore_xcb_keymap_init(void)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
 
    _ecore_xcb_keysyms = xcb_key_symbols_alloc(_ecore_xcb_conn);
 }
 
-void 
-_ecore_xcb_keymap_finalize(void) 
+void
+_ecore_xcb_keymap_finalize(void)
 {
    xcb_get_modifier_mapping_cookie_t cookie;
    xcb_get_modifier_mapping_reply_t *reply;
@@ -84,33 +91,34 @@ _ecore_xcb_modifiers_get(void)
    _ecore_xcb_keymap_finalize();
 }
 
-void 
-_ecore_xcb_keymap_shutdown(void) 
+void
+_ecore_xcb_keymap_shutdown(void)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
 
    if (_ecore_xcb_keysyms) xcb_key_symbols_free(_ecore_xcb_keysyms);
 }
 
-void 
-_ecore_xcb_keymap_refresh(xcb_mapping_notify_event_t *event) 
+void
+_ecore_xcb_keymap_refresh(xcb_mapping_notify_event_t *event)
 {
    CHECK_XCB_CONN;
    xcb_refresh_keyboard_mapping(_ecore_xcb_keysyms, event);
 }
 
-xcb_keysym_t 
-_ecore_xcb_keymap_keycode_to_keysym(xcb_keycode_t keycode, int col) 
+xcb_keysym_t
+_ecore_xcb_keymap_keycode_to_keysym(xcb_keycode_t keycode,
+                                    int           col)
 {
    xcb_keysym_t key0, key1;
 
    CHECK_XCB_CONN;
-   if (col & _ecore_xcb_mode_switch) 
+   if (col & _ecore_xcb_mode_switch)
      {
         key0 = xcb_key_symbols_get_keysym(_ecore_xcb_keysyms, keycode, 4);
         key1 = xcb_key_symbols_get_keysym(_ecore_xcb_keysyms, keycode, 5);
      }
-   else 
+   else
      {
         key0 = xcb_key_symbols_get_keysym(_ecore_xcb_keysyms, keycode, 0);
         key1 = xcb_key_symbols_get_keysym(_ecore_xcb_keysyms, keycode, 1);
@@ -119,24 +127,24 @@ _ecore_xcb_keymap_keycode_to_keysym(xcb_keycode_t keycode, int col)
    if (key1 == XCB_NO_SYMBOL)
      key1 = key0;
 
-   if ((col & ECORE_X_LOCK_NUM) && 
+   if ((col & ECORE_X_LOCK_NUM) &&
        ((xcb_is_keypad_key(key1)) || (xcb_is_private_keypad_key(key1))))
      {
-        if ((col & XCB_MOD_MASK_SHIFT) || 
+        if ((col & XCB_MOD_MASK_SHIFT) ||
             ((col & XCB_MOD_MASK_LOCK) && (col & ECORE_X_LOCK_SHIFT)))
           return key0;
         else
           return key1;
      }
-   else if (!(col & XCB_MOD_MASK_SHIFT) && !(col & XCB_MOD_MASK_LOCK)) 
+   else if (!(col & XCB_MOD_MASK_SHIFT) && !(col & XCB_MOD_MASK_LOCK))
      return key0;
-   else if (!(col & XCB_MOD_MASK_SHIFT) && 
+   else if (!(col & XCB_MOD_MASK_SHIFT) &&
             (col & XCB_MOD_MASK_LOCK && (col & ECORE_X_LOCK_CAPS)))
      return key1;
-   else if ((col & XCB_MOD_MASK_SHIFT) && 
+   else if ((col & XCB_MOD_MASK_SHIFT) &&
             (col & XCB_MOD_MASK_LOCK) && (col & ECORE_X_LOCK_CAPS))
      return key0;
-   else if ((col & XCB_MOD_MASK_SHIFT) || 
+   else if ((col & XCB_MOD_MASK_SHIFT) ||
             (col & XCB_MOD_MASK_LOCK && (col & ECORE_X_LOCK_SHIFT)))
      return key1;
 
@@ -144,14 +152,14 @@ _ecore_xcb_keymap_keycode_to_keysym(xcb_keycode_t keycode, int col)
 }
 
 xcb_keycode_t *
-_ecore_xcb_keymap_keysym_to_keycode(xcb_keysym_t keysym) 
+_ecore_xcb_keymap_keysym_to_keycode(xcb_keysym_t keysym)
 {
    CHECK_XCB_CONN;
    return xcb_key_symbols_get_keycode(_ecore_xcb_keysyms, keysym);
 }
 
 char *
-_ecore_xcb_keymap_keysym_to_string(xcb_keysym_t keysym) 
+_ecore_xcb_keymap_keysym_to_string(xcb_keysym_t keysym)
 {
    int i = 0, n = 0, h = 0, idx = 0;
    const unsigned char *entry;
@@ -160,7 +168,7 @@ _ecore_xcb_keymap_keysym_to_string(xcb_keysym_t keysym)
    CHECK_XCB_CONN;
    if (!keysym) return NULL;
    if (keysym == XK_VoidSymbol) keysym = 0;
-   if (keysym <= 0x1fffffff) 
+   if (keysym <= 0x1fffffff)
      {
         val1 = (keysym >> 24);
         val2 = ((keysym >> 16) & 0xff);
@@ -169,26 +177,26 @@ _ecore_xcb_keymap_keysym_to_string(xcb_keysym_t keysym)
         i = keysym % VTABLESIZE;
         h = i + 1;
         n = VMAXHASH;
-        while ((idx = hashKeysym[i])) 
+        while ((idx = hashKeysym[i]))
           {
              entry = &_ecore_xcb_keytable[idx];
-             if ((entry[0] == val1) && (entry[1] == val2) && 
+             if ((entry[0] == val1) && (entry[1] == val2) &&
                  (entry[2] == val3) && (entry[3] == val4))
-               return ((char *)entry + 4);
+               return (char *)entry + 4;
              if (!--n) break;
              i += h;
              if (i >= VTABLESIZE) i -= VTABLESIZE;
           }
      }
 
-   if ((keysym >= 0x01000100) && (keysym <= 0x0110ffff)) 
+   if ((keysym >= 0x01000100) && (keysym <= 0x0110ffff))
      {
         xcb_keysym_t val;
         char *s = NULL;
         int i = 0;
 
         val = (keysym & 0xffffff);
-        if (val & 0xff0000) 
+        if (val & 0xff0000)
           i = 10;
         else
           i = 6;
@@ -196,7 +204,7 @@ _ecore_xcb_keymap_keysym_to_string(xcb_keysym_t keysym)
         if (!(s = malloc(i))) return NULL;
         i--;
         s[i--] = '\0';
-        for (; i; i--) 
+        for (; i; i--)
           {
              val1 = (val & 0xf);
              val >>= 4;
@@ -212,12 +220,12 @@ _ecore_xcb_keymap_keysym_to_string(xcb_keysym_t keysym)
    return NULL;
 }
 
-xcb_keycode_t 
-_ecore_xcb_keymap_string_to_keycode(const char *key) 
+xcb_keycode_t
+_ecore_xcb_keymap_string_to_keycode(const char *key)
 {
    if (!strncmp(key, "Keycode-", 8))
      return atoi(key + 8);
-   else 
+   else
      {
         xcb_keysym_t keysym = XCB_NO_SYMBOL;
         xcb_keycode_t *keycodes, keycode = 0;
@@ -231,9 +239,9 @@ _ecore_xcb_keymap_string_to_keycode(const char *key)
         keycodes = _ecore_xcb_keymap_keysym_to_keycode(keysym);
         if (!keycodes) return XCB_NO_SYMBOL;
 
-        while (keycodes[i] != XCB_NO_SYMBOL) 
+        while (keycodes[i] != XCB_NO_SYMBOL)
           {
-             if (keycodes[i] != 0) 
+             if (keycodes[i] != 0)
                {
                   keycode = keycodes[i];
                   break;
@@ -244,8 +252,12 @@ _ecore_xcb_keymap_string_to_keycode(const char *key)
      }
 }
 
-int 
-_ecore_xcb_keymap_lookup_string(xcb_keycode_t keycode, int state, char *buffer, int bytes, xcb_keysym_t *sym) 
+int
+_ecore_xcb_keymap_lookup_string(xcb_keycode_t keycode,
+                                int           state,
+                                char         *buffer,
+                                int           bytes,
+                                xcb_keysym_t *sym)
 {
    unsigned int modifiers = 0;
    xcb_keysym_t keysym;
@@ -260,7 +272,7 @@ _ecore_xcb_keymap_lookup_string(xcb_keycode_t keycode, int state, char *buffer,
 }
 
 EAPI const char *
-ecore_x_keysym_string_get(int keysym) 
+ecore_x_keysym_string_get(int keysym)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
 
@@ -268,18 +280,19 @@ ecore_x_keysym_string_get(int keysym)
 }
 
 /* local functions */
-static int 
-_ecore_xcb_keymap_mask_get(void *reply, xcb_keysym_t sym) 
+static int
+_ecore_xcb_keymap_mask_get(void        *reply,
+                           xcb_keysym_t sym)
 {
    xcb_get_modifier_mapping_reply_t *rep;
    xcb_keysym_t sym2;
    int mask = 0;
-   const int masks[8] = 
-     {
-        XCB_MOD_MASK_SHIFT, XCB_MOD_MASK_LOCK, XCB_MOD_MASK_CONTROL, 
-        XCB_MOD_MASK_1, XCB_MOD_MASK_2, XCB_MOD_MASK_3, XCB_MOD_MASK_4, 
-        XCB_MOD_MASK_5
-     };
+   const int masks[8] =
+   {
+      XCB_MOD_MASK_SHIFT, XCB_MOD_MASK_LOCK, XCB_MOD_MASK_CONTROL,
+      XCB_MOD_MASK_1, XCB_MOD_MASK_2, XCB_MOD_MASK_3, XCB_MOD_MASK_4,
+      XCB_MOD_MASK_5
+   };
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    CHECK_XCB_CONN;
@@ -291,18 +304,18 @@ _ecore_xcb_keymap_mask_get(void *reply, xcb_keysym_t sym)
         xcb_keycode_t *modmap;
 
         modmap = xcb_get_modifier_mapping_keycodes(rep);
-        for (i = 0; i < (8 * rep->keycodes_per_modifier); i++) 
+        for (i = 0; i < (8 * rep->keycodes_per_modifier); i++)
           {
              int j = 0;
 
-             for (j = 0; j < 8; j++) 
+             for (j = 0; j < 8; j++)
                {
-                  sym2 = 
-                    xcb_key_symbols_get_keysym(_ecore_xcb_keysyms, 
+                  sym2 =
+                    xcb_key_symbols_get_keysym(_ecore_xcb_keysyms,
                                                modmap[i], j);
                   if (sym2 != 0) break;
                }
-             if (sym2 == sym) 
+             if (sym2 == sym)
                {
                   mask = masks[i / rep->keycodes_per_modifier];
                   break;
@@ -313,8 +326,8 @@ _ecore_xcb_keymap_mask_get(void *reply, xcb_keysym_t sym)
    return mask;
 }
 
-static xcb_keysym_t 
-_ecore_xcb_keymap_string_to_keysym(const char *str) 
+static xcb_keysym_t
+_ecore_xcb_keymap_string_to_keysym(const char *str)
 {
    int i = 0, n = 0, h = 0;
    unsigned long sig = 0;
@@ -334,26 +347,26 @@ _ecore_xcb_keymap_string_to_keysym(const char *str)
    sig2 = sig & 0xff;
    n = KMAXHASH;
 
-   while ((idx = hashString[i])) 
+   while ((idx = hashString[i]))
      {
         entry = &_ecore_xcb_keytable[idx];
-        if ((entry[0] == sig1) && (entry[1] == sig2) && 
+        if ((entry[0] == sig1) && (entry[1] == sig2) &&
             !strcmp(str, (char *)entry + 6))
           {
-             val = ((entry[2] << 24) | (entry[3] << 16) | 
+             val = ((entry[2] << 24) | (entry[3] << 16) |
                     (entry[4] << 8) | (entry[5]));
              if (!val) val = 0xffffff;
              return val;
           }
         if (!--n) break;
         i += h;
-        if (i >= KTABLESIZE) i-= KTABLESIZE;
+        if (i >= KTABLESIZE) i -= KTABLESIZE;
      }
 
-   if (*str == 'U') 
+   if (*str == 'U')
      {
         val = 0;
-        for (p = &str[1]; *p; p++) 
+        for (p = &str[1]; *p; p++)
           {
              c = *p;
              if (('0' <= c) && (c <= '9'))
@@ -369,10 +382,10 @@ _ecore_xcb_keymap_string_to_keysym(const char *str)
         if ((val < 0x20) || ((val > 0x7e) && (val < 0xa0)))
           return XCB_NO_SYMBOL;
         if (val < 0x100) return val;
-        return (val | 0x01000000);
+        return val | 0x01000000;
      }
 
-   if ((strlen(str) > 2) && (str[0] == '0') && (str[1] == 'x')) 
+   if ((strlen(str) > 2) && (str[0] == '0') && (str[1] == 'x'))
      {
         char *tmp = NULL;
 
@@ -383,7 +396,7 @@ _ecore_xcb_keymap_string_to_keysym(const char *str)
           return val;
      }
 
-   if (!strncmp(str, "XF86_", 5)) 
+   if (!strncmp(str, "XF86_", 5))
      {
         long unsigned int ret;
         char *tmp;
@@ -399,8 +412,11 @@ _ecore_xcb_keymap_string_to_keysym(const char *str)
    return XCB_NO_SYMBOL;
 }
 
-static int 
-_ecore_xcb_keymap_translate_key(xcb_keycode_t keycode, unsigned int modifiers, unsigned int *modifiers_return, xcb_keysym_t *keysym_return) 
+static int
+_ecore_xcb_keymap_translate_key(xcb_keycode_t keycode,
+                                unsigned int  modifiers,
+                                unsigned int *modifiers_return,
+                                xcb_keysym_t *keysym_return)
 {
    xcb_keysym_t sym;
 
@@ -409,7 +425,7 @@ _ecore_xcb_keymap_translate_key(xcb_keycode_t keycode, unsigned int modifiers, u
    sym = _ecore_xcb_keymap_keycode_to_keysym(keycode, modifiers);
 
    if (modifiers_return)
-     *modifiers_return = ((XCB_MOD_MASK_SHIFT | XCB_MOD_MASK_LOCK) | 
+     *modifiers_return = ((XCB_MOD_MASK_SHIFT | XCB_MOD_MASK_LOCK) |
                           _ecore_xcb_mode_switch | ECORE_X_LOCK_NUM);
    if (keysym_return)
      *keysym_return = sym;
@@ -417,8 +433,11 @@ _ecore_xcb_keymap_translate_key(xcb_keycode_t keycode, unsigned int modifiers, u
    return 1;
 }
 
-static int 
-_ecore_xcb_keymap_translate_keysym(xcb_keysym_t keysym, unsigned int modifiers, char *buffer, int bytes) 
+static int
+_ecore_xcb_keymap_translate_keysym(xcb_keysym_t keysym,
+                                   unsigned int modifiers,
+                                   char        *buffer,
+                                   int          bytes)
 {
    unsigned long hbytes = 0;
    unsigned char c;
@@ -427,14 +446,14 @@ _ecore_xcb_keymap_translate_keysym(xcb_keysym_t keysym, unsigned int modifiers,
    hbytes = (keysym >> 8);
 
    if (!(bytes &&
-         ((hbytes == 0) || 
-             ((hbytes == 0xFF) && 
-                 (((keysym >= XK_BackSpace) && (keysym <= XK_Clear)) || 
-                     (keysym == XK_Return) || (keysym == XK_Escape) || 
-                     (keysym == XK_KP_Space) || (keysym == XK_KP_Tab) || 
-                     (keysym == XK_KP_Enter) || 
-                     ((keysym >= XK_KP_Multiply) && (keysym <= XK_KP_9)) || 
-                     (keysym == XK_KP_Equal) || (keysym == XK_Delete))))))
+         ((hbytes == 0) ||
+          ((hbytes == 0xFF) &&
+           (((keysym >= XK_BackSpace) && (keysym <= XK_Clear)) ||
+            (keysym == XK_Return) || (keysym == XK_Escape) ||
+            (keysym == XK_KP_Space) || (keysym == XK_KP_Tab) ||
+            (keysym == XK_KP_Enter) ||
+            ((keysym >= XK_KP_Multiply) && (keysym <= XK_KP_9)) ||
+            (keysym == XK_KP_Equal) || (keysym == XK_Delete))))))
      return 0;
 
    if (keysym == XK_KP_Space)
@@ -444,19 +463,20 @@ _ecore_xcb_keymap_translate_keysym(xcb_keysym_t keysym, unsigned int modifiers,
    else
      c = (keysym & 0xFF);
 
-   if (modifiers & ECORE_X_MODIFIER_CTRL) 
+   if (modifiers & ECORE_X_MODIFIER_CTRL)
      {
         if (((c >= '@') && (c < '\177')) || c == ' ')
           c &= 0x1F;
-        else if (c == '2') 
+        else if (c == '2')
           c = '\000';
         else if ((c >= '3') && (c <= '7'))
           c -= ('3' - '\033');
-        else if (c == '8') 
+        else if (c == '8')
           c = '\177';
-        else if (c == '/') 
+        else if (c == '/')
           c = '_' & 0x1F;
      }
    buffer[0] = c;
    return 1;
 }
+
index cd89fd7..5111db4 100644 (file)
@@ -1,17 +1,17 @@
 #include "ecore_xcb_private.h"
 //#include "Ecore_X_Atoms.h"
 
-#define ECORE_X_MWM_HINTS_FUNCTIONS (1 << 0)
+#define ECORE_X_MWM_HINTS_FUNCTIONS   (1 << 0)
 #define ECORE_X_MWM_HINTS_DECORATIONS (1 << 1)
-#define ECORE_X_MWM_HINTS_INPUT_MODE (1 << 2)
-#define ECORE_X_MWM_HINTS_STATUS (1 << 3)
+#define ECORE_X_MWM_HINTS_INPUT_MODE  (1 << 2)
+#define ECORE_X_MWM_HINTS_STATUS      (1 << 3)
 
 typedef struct _mwmhints
 {
    uint32_t flags;
    uint32_t functions;
    uint32_t decorations;
-   int32_t inputmode;
+   int32_t  inputmode;
    uint32_t status;
 } MWMHints;
 
@@ -23,14 +23,15 @@ typedef struct _mwmhints
 
 /**
  * Sets the borderless flag of a window using MWM.
- * 
+ *
  * @param win The window.
  * @param borderless The borderless flag.
- * 
+ *
  * @ingroup Ecore_X_MWM_Group
  */
-EAPI void 
-ecore_x_mwm_borderless_set(Ecore_X_Window win, Eina_Bool borderless) 
+EAPI void
+ecore_x_mwm_borderless_set(Ecore_X_Window win,
+                           Eina_Bool      borderless)
 {
    uint32_t data[5] = { 0, 0, 0, 0, 0 };
 
@@ -39,14 +40,17 @@ ecore_x_mwm_borderless_set(Ecore_X_Window win, Eina_Bool borderless)
    data[0] = 2;
    data[2] = !borderless;
 
-   ecore_x_window_prop_property_set(win, 
-                                    ECORE_X_ATOM_MOTIF_WM_HINTS, 
-                                    ECORE_X_ATOM_MOTIF_WM_HINTS, 32, 
+   ecore_x_window_prop_property_set(win,
+                                    ECORE_X_ATOM_MOTIF_WM_HINTS,
+                                    ECORE_X_ATOM_MOTIF_WM_HINTS, 32,
                                     (void *)data, 5);
 }
 
-EAPI Eina_Bool 
-ecore_x_mwm_hints_get(Ecore_X_Window win, Ecore_X_MWM_Hint_Func *fhint, Ecore_X_MWM_Hint_Decor *dhint, Ecore_X_MWM_Hint_Input *ihint) 
+EAPI Eina_Bool
+ecore_x_mwm_hints_get(Ecore_X_Window          win,
+                      Ecore_X_MWM_Hint_Func  *fhint,
+                      Ecore_X_MWM_Hint_Decor *dhint,
+                      Ecore_X_MWM_Hint_Input *ihint)
 {
    xcb_get_property_cookie_t cookie;
    xcb_get_property_reply_t *reply;
@@ -56,36 +60,36 @@ ecore_x_mwm_hints_get(Ecore_X_Window win, Ecore_X_MWM_Hint_Func *fhint, Ecore_X_
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    CHECK_XCB_CONN;
 
-   cookie = 
-     xcb_get_property_unchecked(_ecore_xcb_conn, 0, win, 
-                                ECORE_X_ATOM_MOTIF_WM_HINTS, 
+   cookie =
+     xcb_get_property_unchecked(_ecore_xcb_conn, 0, win,
+                                ECORE_X_ATOM_MOTIF_WM_HINTS,
                                 ECORE_X_ATOM_MOTIF_WM_HINTS, 0, LONG_MAX);
    reply = xcb_get_property_reply(_ecore_xcb_conn, cookie, NULL);
    if (!reply) return EINA_FALSE;
-   if ((reply->format != 32) || (reply->value_len == 0)) 
+   if ((reply->format != 32) || (reply->value_len == 0))
      {
         free(reply);
         return EINA_FALSE;
      }
 
    mwmhints = xcb_get_property_value(reply);
-   if (reply->value_len >= 4) 
+   if (reply->value_len >= 4)
      {
-        if (dhint) 
+        if (dhint)
           {
              if (mwmhints->flags & ECORE_X_MWM_HINTS_DECORATIONS)
                *dhint = mwmhints->decorations;
              else
                *dhint = ECORE_X_MWM_HINT_DECOR_ALL;
           }
-        if (fhint) 
+        if (fhint)
           {
              if (mwmhints->flags & ECORE_X_MWM_HINTS_FUNCTIONS)
                *fhint = mwmhints->functions;
              else
                *fhint = ECORE_X_MWM_HINT_FUNC_ALL;
           }
-        if (ihint) 
+        if (ihint)
           {
              if (mwmhints->flags & ECORE_X_MWM_HINTS_INPUT_MODE)
                *ihint = mwmhints->inputmode;
@@ -97,3 +101,4 @@ ecore_x_mwm_hints_get(Ecore_X_Window win, Ecore_X_MWM_Hint_Func *fhint, Ecore_X_
    free(reply);
    return ret;
 }
+
index 6ac8805..1d041d3 100644 (file)
@@ -2,43 +2,43 @@
 
 /* local function prototypes */
 /* static void _ecore_xcb_netwm_startup_info_free(void *data); */
-static Ecore_X_Atom _ecore_xcb_netwm_window_type_atom_get(Ecore_X_Window_Type type);
+static Ecore_X_Atom        _ecore_xcb_netwm_window_type_atom_get(Ecore_X_Window_Type type);
 static Ecore_X_Window_Type _ecore_xcb_netwm_window_type_type_get(Ecore_X_Atom atom);
-static Ecore_X_Atom _ecore_xcb_netwm_window_state_atom_get(Ecore_X_Window_State state);
-static Ecore_X_Atom _ecore_xcb_netwm_action_atom_get(Ecore_X_Action action);
+static Ecore_X_Atom        _ecore_xcb_netwm_window_state_atom_get(Ecore_X_Window_State state);
+static Ecore_X_Atom        _ecore_xcb_netwm_action_atom_get(Ecore_X_Action action);
 
 /* local variables */
 //static Eina_Hash *_startup_info = NULL;
 
 /* local structures */
 typedef struct _Ecore_Xcb_Startup_Info Ecore_Xcb_Startup_Info;
-struct _Ecore_Xcb_Startup_Info 
+struct _Ecore_Xcb_Startup_Info
 {
    Ecore_X_Window win;
-   int init, size;
-   char *buffer;
-   int length;
+   int            init, size;
+   char          *buffer;
+   int            length;
 
    /* sequence info fields */
-   char *id, *name;
-   int screen;
-   char *bin, *icon;
-   int desktop, timestamp;
-   char *description, *wmclass;
-   int silent;
+   char          *id, *name;
+   int            screen;
+   char          *bin, *icon;
+   int            desktop, timestamp;
+   char          *description, *wmclass;
+   int            silent;
 };
 
-EAPI void 
-ecore_x_netwm_init(void) 
+EAPI void
+ecore_x_netwm_init(void)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
 
-//   _startup_info = 
+//   _startup_info =
 //     eina_hash_string_superfast_new(_ecore_xcb_netwm_startup_info_free);
 }
 
-EAPI void 
-ecore_x_netwm_shutdown(void) 
+EAPI void
+ecore_x_netwm_shutdown(void)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
 
@@ -46,8 +46,9 @@ ecore_x_netwm_shutdown(void)
 //   _startup_info = NULL;
 }
 
-EAPI Eina_Bool 
-ecore_x_netwm_pid_get(Ecore_X_Window win, int *pid) 
+EAPI Eina_Bool
+ecore_x_netwm_pid_get(Ecore_X_Window win,
+                      int           *pid)
 {
    uint32_t tmp;
 
@@ -61,8 +62,9 @@ ecore_x_netwm_pid_get(Ecore_X_Window win, int *pid)
    return EINA_TRUE;
 }
 
-EAPI void 
-ecore_x_netwm_pid_set(Ecore_X_Window win, int pid) 
+EAPI void
+ecore_x_netwm_pid_set(Ecore_X_Window win,
+                      int            pid)
 {
    unsigned int tmp;
 
@@ -72,8 +74,9 @@ ecore_x_netwm_pid_set(Ecore_X_Window win, int pid)
    ecore_x_window_prop_card32_set(win, ECORE_X_ATOM_NET_WM_PID, &tmp, 1);
 }
 
-EAPI Eina_Bool 
-ecore_x_netwm_window_type_get(Ecore_X_Window win, Ecore_X_Window_Type *type) 
+EAPI Eina_Bool
+ecore_x_netwm_window_type_get(Ecore_X_Window       win,
+                              Ecore_X_Window_Type *type)
 {
    Ecore_X_Atom *atoms;
    int num = 0;
@@ -82,8 +85,8 @@ ecore_x_netwm_window_type_get(Ecore_X_Window win, Ecore_X_Window_Type *type)
 
    if (type) *type = ECORE_X_WINDOW_TYPE_NORMAL;
 
-   num = 
-     ecore_x_window_prop_atom_list_get(win, 
+   num =
+     ecore_x_window_prop_atom_list_get(win,
                                        ECORE_X_ATOM_NET_WM_WINDOW_TYPE, &atoms);
    if ((type) && (num >= 1) && (atoms))
      *type = _ecore_xcb_netwm_window_type_type_get(atoms[0]);
@@ -94,8 +97,9 @@ ecore_x_netwm_window_type_get(Ecore_X_Window win, Ecore_X_Window_Type *type)
    return EINA_FALSE;
 }
 
-EAPI void 
-ecore_x_netwm_window_type_set(Ecore_X_Window win, Ecore_X_Window_Type type) 
+EAPI void
+ecore_x_netwm_window_type_set(Ecore_X_Window      win,
+                              Ecore_X_Window_Type type)
 {
    Ecore_X_Atom atom;
 
@@ -105,8 +109,9 @@ ecore_x_netwm_window_type_set(Ecore_X_Window win, Ecore_X_Window_Type type)
    ecore_x_window_prop_atom_set(win, ECORE_X_ATOM_NET_WM_WINDOW_TYPE, &atom, 1);
 }
 
-EAPI int 
-ecore_x_netwm_window_types_get(Ecore_X_Window win, Ecore_X_Window_Type **types) 
+EAPI int
+ecore_x_netwm_window_types_get(Ecore_X_Window        win,
+                               Ecore_X_Window_Type **types)
 {
    int num = 0, i = 0;
    Ecore_X_Atom *atoms = NULL;
@@ -115,17 +120,17 @@ ecore_x_netwm_window_types_get(Ecore_X_Window win, Ecore_X_Window_Type **types)
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
 
    if (types) *types = NULL;
-   num = 
-     ecore_x_window_prop_atom_list_get(win, ECORE_X_ATOM_NET_WM_WINDOW_TYPE, 
+   num =
+     ecore_x_window_prop_atom_list_get(win, ECORE_X_ATOM_NET_WM_WINDOW_TYPE,
                                        &atoms);
-   if ((num <= 0) || (!atoms)) 
+   if ((num <= 0) || (!atoms))
      {
         if (atoms) free(atoms);
         return 0;
      }
 
    atoms2 = malloc(num * sizeof(Ecore_X_Window_Type));
-   if (!atoms2) 
+   if (!atoms2)
      {
         if (atoms) free(atoms);
         return 0;
@@ -135,7 +140,7 @@ ecore_x_netwm_window_types_get(Ecore_X_Window win, Ecore_X_Window_Type **types)
      atoms2[i] = _ecore_xcb_netwm_window_type_type_get(atoms[i]);
    if (atoms) free(atoms);
 
-   if (types) 
+   if (types)
      *types = atoms2;
    else
      free(atoms2);
@@ -143,41 +148,45 @@ ecore_x_netwm_window_types_get(Ecore_X_Window win, Ecore_X_Window_Type **types)
    return num;
 }
 
-EAPI int 
-ecore_x_netwm_name_get(Ecore_X_Window win, char **name) 
+EAPI int
+ecore_x_netwm_name_get(Ecore_X_Window win,
+                       char         **name)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
 
-   if (name) 
+   if (name)
      *name = ecore_x_window_prop_string_get(win, ECORE_X_ATOM_NET_WM_NAME);
    return 1;
 }
 
-EAPI void 
-ecore_x_netwm_name_set(Ecore_X_Window win, const char *name) 
+EAPI void
+ecore_x_netwm_name_set(Ecore_X_Window win,
+                       const char    *name)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
 
    ecore_x_window_prop_string_set(win, ECORE_X_ATOM_NET_WM_NAME, name);
 }
 
-EAPI void 
-ecore_x_netwm_opacity_set(Ecore_X_Window win, unsigned int opacity) 
+EAPI void
+ecore_x_netwm_opacity_set(Ecore_X_Window win,
+                          unsigned int   opacity)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
 
-   ecore_x_window_prop_card32_set(win, ECORE_X_ATOM_NET_WM_WINDOW_OPACITY, 
+   ecore_x_window_prop_card32_set(win, ECORE_X_ATOM_NET_WM_WINDOW_OPACITY,
                                   &opacity, 1);
 }
 
-EAPI Eina_Bool 
-ecore_x_netwm_opacity_get(Ecore_X_Window win, unsigned int *opacity) 
+EAPI Eina_Bool
+ecore_x_netwm_opacity_get(Ecore_X_Window win,
+                          unsigned int  *opacity)
 {
    unsigned int tmp = 0;
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
 
-   if (!ecore_x_window_prop_card32_get(win, ECORE_X_ATOM_NET_WM_WINDOW_OPACITY, 
+   if (!ecore_x_window_prop_card32_get(win, ECORE_X_ATOM_NET_WM_WINDOW_OPACITY,
                                        &tmp, 1))
      return EINA_FALSE;
 
@@ -186,30 +195,36 @@ ecore_x_netwm_opacity_get(Ecore_X_Window win, unsigned int *opacity)
    return EINA_TRUE;
 }
 
-EAPI void 
-ecore_x_netwm_wm_identify(Ecore_X_Window root, Ecore_X_Window check, const char *wm_name) 
+EAPI void
+ecore_x_netwm_wm_identify(Ecore_X_Window root,
+                          Ecore_X_Window check,
+                          const char    *wm_name)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
 
-   ecore_x_window_prop_window_set(root, ECORE_X_ATOM_NET_SUPPORTING_WM_CHECK, 
+   ecore_x_window_prop_window_set(root, ECORE_X_ATOM_NET_SUPPORTING_WM_CHECK,
                                   &check, 1);
-   ecore_x_window_prop_window_set(check, ECORE_X_ATOM_NET_SUPPORTING_WM_CHECK, 
+   ecore_x_window_prop_window_set(check, ECORE_X_ATOM_NET_SUPPORTING_WM_CHECK,
                                   &check, 1);
    ecore_x_window_prop_string_set(check, ECORE_X_ATOM_NET_WM_NAME, wm_name);
    ecore_x_window_prop_string_set(root, ECORE_X_ATOM_NET_WM_NAME, wm_name);
 }
 
-EAPI void 
-ecore_x_netwm_supported_set(Ecore_X_Window root, Ecore_X_Atom *supported, int num) 
+EAPI void
+ecore_x_netwm_supported_set(Ecore_X_Window root,
+                            Ecore_X_Atom  *supported,
+                            int            num)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
 
-   ecore_x_window_prop_atom_set(root, ECORE_X_ATOM_NET_SUPPORTED, 
+   ecore_x_window_prop_atom_set(root, ECORE_X_ATOM_NET_SUPPORTED,
                                 supported, num);
 }
 
-EAPI Eina_Bool 
-ecore_x_netwm_supported_get(Ecore_X_Window root, Ecore_X_Atom **supported, int *num) 
+EAPI Eina_Bool
+ecore_x_netwm_supported_get(Ecore_X_Window root,
+                            Ecore_X_Atom **supported,
+                            int           *num)
 {
    int num_ret = 0;
 
@@ -218,8 +233,8 @@ ecore_x_netwm_supported_get(Ecore_X_Window root, Ecore_X_Atom **supported, int *
    if (num) *num = 0;
    if (supported) *supported = NULL;
 
-   num_ret = 
-     ecore_x_window_prop_atom_list_get(root, ECORE_X_ATOM_NET_SUPPORTED, 
+   num_ret =
+     ecore_x_window_prop_atom_list_get(root, ECORE_X_ATOM_NET_SUPPORTED,
                                        supported);
    if (num_ret <= 0) return EINA_FALSE;
    if (num) *num = num_ret;
@@ -227,26 +242,31 @@ ecore_x_netwm_supported_get(Ecore_X_Window root, Ecore_X_Atom **supported, int *
    return EINA_TRUE;
 }
 
-EAPI void 
-ecore_x_netwm_desk_count_set(Ecore_X_Window root, unsigned int n_desks) 
+EAPI void
+ecore_x_netwm_desk_count_set(Ecore_X_Window root,
+                             unsigned int   n_desks)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
 
-   ecore_x_window_prop_card32_set(root, ECORE_X_ATOM_NET_NUMBER_OF_DESKTOPS, 
+   ecore_x_window_prop_card32_set(root, ECORE_X_ATOM_NET_NUMBER_OF_DESKTOPS,
                                   &n_desks, 1);
 }
 
-EAPI void 
-ecore_x_netwm_desk_roots_set(Ecore_X_Window root, Ecore_X_Window *vroots, unsigned int n_desks) 
+EAPI void
+ecore_x_netwm_desk_roots_set(Ecore_X_Window  root,
+                             Ecore_X_Window *vroots,
+                             unsigned int    n_desks)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
 
-   ecore_x_window_prop_window_set(root, ECORE_X_ATOM_NET_VIRTUAL_ROOTS, 
+   ecore_x_window_prop_window_set(root, ECORE_X_ATOM_NET_VIRTUAL_ROOTS,
                                   vroots, n_desks);
 }
 
-EAPI void 
-ecore_x_netwm_desk_names_set(Ecore_X_Window root, const char **names, unsigned int n_desks) 
+EAPI void
+ecore_x_netwm_desk_names_set(Ecore_X_Window root,
+                             const char   **names,
+                             unsigned int   n_desks)
 {
    char ss[32], *buf = NULL, *t = NULL;
    const char *s;
@@ -261,13 +281,13 @@ ecore_x_netwm_desk_names_set(Ecore_X_Window root, const char **names, unsigned i
         if (!s)
           {
              /* Default to "Desk-<number>" */
-             sprintf(ss, "Desk-%d", i);
-             s = ss;
+              sprintf(ss, "Desk-%d", i);
+              s = ss;
           }
 
         l = strlen(s) + 1;
         t = realloc(buf, len + 1);
-        if (t) 
+        if (t)
           {
              buf = t;
              memcpy(buf + len, s, l);
@@ -276,14 +296,16 @@ ecore_x_netwm_desk_names_set(Ecore_X_Window root, const char **names, unsigned i
      }
 
    xcb_change_property(_ecore_xcb_conn, XCB_PROP_MODE_REPLACE, root,
-                       ECORE_X_ATOM_NET_DESKTOP_NAMES, 
+                       ECORE_X_ATOM_NET_DESKTOP_NAMES,
                        ECORE_X_ATOM_UTF8_STRING, 8, len, (const void *)buf);
 //   ecore_x_flush();
    free(buf);
 }
 
-EAPI void 
-ecore_x_netwm_desk_size_set(Ecore_X_Window root, unsigned int width, unsigned int height) 
+EAPI void
+ecore_x_netwm_desk_size_set(Ecore_X_Window root,
+                            unsigned int   width,
+                            unsigned int   height)
 {
    uint32_t size[2];
 
@@ -291,21 +313,27 @@ ecore_x_netwm_desk_size_set(Ecore_X_Window root, unsigned int width, unsigned in
 
    size[0] = width;
    size[1] = height;
-   ecore_x_window_prop_card32_set(root, ECORE_X_ATOM_NET_DESKTOP_GEOMETRY, 
+   ecore_x_window_prop_card32_set(root, ECORE_X_ATOM_NET_DESKTOP_GEOMETRY,
                                   size, 2);
 }
 
-EAPI void 
-ecore_x_netwm_desk_viewports_set(Ecore_X_Window root, unsigned int *origins, unsigned int n_desks) 
+EAPI void
+ecore_x_netwm_desk_viewports_set(Ecore_X_Window root,
+                                 unsigned int  *origins,
+                                 unsigned int   n_desks)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
 
-   ecore_x_window_prop_card32_set(root, ECORE_X_ATOM_NET_DESKTOP_VIEWPORT, 
+   ecore_x_window_prop_card32_set(root, ECORE_X_ATOM_NET_DESKTOP_VIEWPORT,
                                   origins, (2 * n_desks));
 }
 
-EAPI void 
-ecore_x_netwm_desk_layout_set(Ecore_X_Window root, int orientation, int columns, int rows, int starting_corner) 
+EAPI void
+ecore_x_netwm_desk_layout_set(Ecore_X_Window root,
+                              int            orientation,
+                              int            columns,
+                              int            rows,
+                              int            starting_corner)
 {
    unsigned int layout[4];
 
@@ -315,64 +343,74 @@ ecore_x_netwm_desk_layout_set(Ecore_X_Window root, int orientation, int columns,
    layout[1] = columns;
    layout[2] = rows;
    layout[3] = starting_corner;
-   ecore_x_window_prop_card32_set(root, ECORE_X_ATOM_NET_DESKTOP_LAYOUT, 
+   ecore_x_window_prop_card32_set(root, ECORE_X_ATOM_NET_DESKTOP_LAYOUT,
                                   layout, 4);
 }
 
-EAPI void 
-ecore_x_netwm_desk_workareas_set(Ecore_X_Window root, unsigned int *areas, unsigned int n_desks) 
+EAPI void
+ecore_x_netwm_desk_workareas_set(Ecore_X_Window root,
+                                 unsigned int  *areas,
+                                 unsigned int   n_desks)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
 
-   ecore_x_window_prop_card32_set(root, ECORE_X_ATOM_NET_WORKAREA, areas, 
+   ecore_x_window_prop_card32_set(root, ECORE_X_ATOM_NET_WORKAREA, areas,
                                   4 * n_desks);
 }
 
-EAPI void 
-ecore_x_netwm_desk_current_set(Ecore_X_Window root, unsigned int desk) 
+EAPI void
+ecore_x_netwm_desk_current_set(Ecore_X_Window root,
+                               unsigned int   desk)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
 
-   ecore_x_window_prop_card32_set(root, ECORE_X_ATOM_NET_CURRENT_DESKTOP, 
+   ecore_x_window_prop_card32_set(root, ECORE_X_ATOM_NET_CURRENT_DESKTOP,
                                   &desk, 1);
 }
 
-EAPI void 
-ecore_x_netwm_showing_desktop_set(Ecore_X_Window root, Eina_Bool on) 
+EAPI void
+ecore_x_netwm_showing_desktop_set(Ecore_X_Window root,
+                                  Eina_Bool      on)
 {
    unsigned int val = 0;
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
 
    val = ((on) ? 1 : 0);
-   ecore_x_window_prop_card32_set(root, ECORE_X_ATOM_NET_SHOWING_DESKTOP, 
+   ecore_x_window_prop_card32_set(root, ECORE_X_ATOM_NET_SHOWING_DESKTOP,
                                   &val, 1);
 }
 
-EAPI int 
-ecore_x_netwm_startup_id_get(Ecore_X_Window win, char **id) 
+EAPI int
+ecore_x_netwm_startup_id_get(Ecore_X_Window win,
+                             char         **id)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
 
-   if (id) 
+   if (id)
      {
-        *id = 
+        *id =
           ecore_x_window_prop_string_get(win, ECORE_X_ATOM_NET_STARTUP_ID);
      }
 
    return 1;
 }
 
-EAPI void 
-ecore_x_netwm_startup_id_set(Ecore_X_Window win, const char *id) 
+EAPI void
+ecore_x_netwm_startup_id_set(Ecore_X_Window win,
+                             const char    *id)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
 
    ecore_x_window_prop_string_set(win, ECORE_X_ATOM_NET_STARTUP_ID, id);
 }
 
-EAPI void 
-ecore_x_netwm_state_request_send(Ecore_X_Window win, Ecore_X_Window root, Ecore_X_Window_State s1, Ecore_X_Window_State s2, Eina_Bool set) 
+EAPI void
+ecore_x_netwm_state_request_send(Ecore_X_Window       win,
+                                 Ecore_X_Window       root,
+                                 Ecore_X_Window_State s1,
+                                 Ecore_X_Window_State s2,
+                                 Eina_Bool            set)
 {
    xcb_client_message_event_t ev;
 
@@ -393,21 +431,23 @@ ecore_x_netwm_state_request_send(Ecore_X_Window win, Ecore_X_Window root, Ecore_
    ev.data.data32[3] = 1;
    ev.data.data32[4] = 0;
 
-   xcb_send_event(_ecore_xcb_conn, 0, root, 
-                  (XCB_EVENT_MASK_SUBSTRUCTURE_REDIRECT | 
-                      XCB_EVENT_MASK_SUBSTRUCTURE_NOTIFY), (const char *)&ev);
+   xcb_send_event(_ecore_xcb_conn, 0, root,
+                  (XCB_EVENT_MASK_SUBSTRUCTURE_REDIRECT |
+                   XCB_EVENT_MASK_SUBSTRUCTURE_NOTIFY), (const char *)&ev);
 //   ecore_x_flush();
 }
 
-EAPI void 
-ecore_x_netwm_window_state_set(Ecore_X_Window win, Ecore_X_Window_State *state, unsigned int num) 
+EAPI void
+ecore_x_netwm_window_state_set(Ecore_X_Window        win,
+                               Ecore_X_Window_State *state,
+                               unsigned int          num)
 {
    Ecore_X_Atom *set;
    unsigned int i = 0;
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
 
-   if (!num) 
+   if (!num)
      {
         ecore_x_window_prop_property_del(win, ECORE_X_ATOM_NET_WM_STATE);
         return;
@@ -416,15 +456,17 @@ ecore_x_netwm_window_state_set(Ecore_X_Window win, Ecore_X_Window_State *state,
    set = malloc(num * sizeof(Ecore_X_Atom));
    if (!set) return;
 
-   for (i = 0; i < num; i++) 
+   for (i = 0; i < num; i++)
      set[i] = _ecore_xcb_netwm_window_state_atom_get(state[i]);
 
    ecore_x_window_prop_atom_set(win, ECORE_X_ATOM_NET_WM_STATE, set, num);
    free(set);
 }
 
-EAPI Eina_Bool 
-ecore_x_netwm_window_state_get(Ecore_X_Window win, Ecore_X_Window_State **state, unsigned int *num) 
+EAPI Eina_Bool
+ecore_x_netwm_window_state_get(Ecore_X_Window         win,
+                               Ecore_X_Window_State **state,
+                               unsigned int          *num)
 {
    Ecore_X_Atom *atoms;
    int ret = 0;
@@ -434,15 +476,15 @@ ecore_x_netwm_window_state_get(Ecore_X_Window win, Ecore_X_Window_State **state,
    if (num) *num = 0;
    if (state) *state = NULL;
 
-   ret = 
+   ret =
      ecore_x_window_prop_atom_list_get(win, ECORE_X_ATOM_NET_WM_STATE, &atoms);
 
    if (ret <= 0) return EINA_FALSE;
 
-   if (state) 
+   if (state)
      {
         *state = malloc(ret * sizeof(Ecore_X_Window_State));
-        if (*state) 
+        if (*state)
           {
              int i = 0;
 
@@ -457,17 +499,21 @@ ecore_x_netwm_window_state_get(Ecore_X_Window win, Ecore_X_Window_State **state,
    return EINA_TRUE;
 }
 
-EAPI void 
-ecore_x_netwm_client_active_set(Ecore_X_Window root, Ecore_X_Window win) 
+EAPI void
+ecore_x_netwm_client_active_set(Ecore_X_Window root,
+                                Ecore_X_Window win)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
 
-   ecore_x_window_prop_window_set(root, 
+   ecore_x_window_prop_window_set(root,
                                   ECORE_X_ATOM_NET_ACTIVE_WINDOW, &win, 1);
 }
 
-EAPI void 
-ecore_x_netwm_client_active_request(Ecore_X_Window root, Ecore_X_Window win, int type, Ecore_X_Window current_win) 
+EAPI void
+ecore_x_netwm_client_active_request(Ecore_X_Window root,
+                                    Ecore_X_Window win,
+                                    int            type,
+                                    Ecore_X_Window current_win)
 {
    xcb_client_message_event_t ev;
 
@@ -486,32 +532,36 @@ ecore_x_netwm_client_active_request(Ecore_X_Window root, Ecore_X_Window win, int
    ev.data.data32[3] = 0;
    ev.data.data32[4] = 0;
 
-   xcb_send_event(_ecore_xcb_conn, 0, root, 
-                  (XCB_EVENT_MASK_SUBSTRUCTURE_REDIRECT | 
-                      XCB_EVENT_MASK_SUBSTRUCTURE_NOTIFY), (const char *)&ev);
+   xcb_send_event(_ecore_xcb_conn, 0, root,
+                  (XCB_EVENT_MASK_SUBSTRUCTURE_REDIRECT |
+                   XCB_EVENT_MASK_SUBSTRUCTURE_NOTIFY), (const char *)&ev);
 //   ecore_x_flush();
 }
 
-EAPI void 
-ecore_x_netwm_client_list_set(Ecore_X_Window root, Ecore_X_Window *p_clients, unsigned int n_clients) 
+EAPI void
+ecore_x_netwm_client_list_set(Ecore_X_Window  root,
+                              Ecore_X_Window *p_clients,
+                              unsigned int    n_clients)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
 
-   ecore_x_window_prop_window_set(root, ECORE_X_ATOM_NET_CLIENT_LIST, 
+   ecore_x_window_prop_window_set(root, ECORE_X_ATOM_NET_CLIENT_LIST,
                                   p_clients, n_clients);
 }
 
-EAPI void 
-ecore_x_netwm_client_list_stacking_set(Ecore_X_Window root, Ecore_X_Window *p_clients, unsigned int n_clients) 
+EAPI void
+ecore_x_netwm_client_list_stacking_set(Ecore_X_Window  root,
+                                       Ecore_X_Window *p_clients,
+                                       unsigned int    n_clients)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
 
-   ecore_x_window_prop_window_set(root, ECORE_X_ATOM_NET_CLIENT_LIST_STACKING, 
+   ecore_x_window_prop_window_set(root, ECORE_X_ATOM_NET_CLIENT_LIST_STACKING,
                                   p_clients, n_clients);
 }
 
-EAPI Eina_Bool 
-ecore_x_screen_is_composited(int screen) 
+EAPI Eina_Bool
+ecore_x_screen_is_composited(int screen)
 {
    char buff[32];
    xcb_get_selection_owner_cookie_t ocookie;
@@ -524,12 +574,12 @@ ecore_x_screen_is_composited(int screen)
 
    snprintf(buff, sizeof(buff), "_NET_WM_CM_S%i", screen);
 
-   if (atom == XCB_NONE) 
+   if (atom == XCB_NONE)
      {
         xcb_intern_atom_cookie_t acookie;
         xcb_intern_atom_reply_t *areply;
 
-        acookie = 
+        acookie =
           xcb_intern_atom_unchecked(_ecore_xcb_conn, 0, strlen(buff), buff);
         areply = xcb_intern_atom_reply(_ecore_xcb_conn, acookie, NULL);
         if (!areply) return EINA_FALSE;
@@ -547,8 +597,9 @@ ecore_x_screen_is_composited(int screen)
    return (win != XCB_NONE) ? EINA_TRUE : EINA_FALSE;
 }
 
-EAPI void 
-ecore_x_screen_is_composited_set(int screen, Ecore_X_Window win) 
+EAPI void
+ecore_x_screen_is_composited_set(int            screen,
+                                 Ecore_X_Window win)
 {
    static Ecore_X_Atom atom = XCB_NONE;
    char buff[32];
@@ -557,12 +608,12 @@ ecore_x_screen_is_composited_set(int screen, Ecore_X_Window win)
    CHECK_XCB_CONN;
 
    snprintf(buff, sizeof(buff), "_NET_WM_CM_S%i", screen);
-   if (atom == XCB_NONE) 
+   if (atom == XCB_NONE)
      {
         xcb_intern_atom_cookie_t acookie;
         xcb_intern_atom_reply_t *areply;
 
-        acookie = 
+        acookie =
           xcb_intern_atom_unchecked(_ecore_xcb_conn, 0, strlen(buff), buff);
         areply = xcb_intern_atom_reply(_ecore_xcb_conn, acookie, NULL);
         if (!areply) return;
@@ -570,12 +621,12 @@ ecore_x_screen_is_composited_set(int screen, Ecore_X_Window win)
         free(areply);
      }
    if (atom == XCB_NONE) return;
-   xcb_set_selection_owner(_ecore_xcb_conn, win, atom, 
+   xcb_set_selection_owner(_ecore_xcb_conn, win, atom,
                            _ecore_xcb_events_last_time_get());
 }
 
-EAPI void 
-ecore_x_netwm_ping_send(Ecore_X_Window win) 
+EAPI void
+ecore_x_netwm_ping_send(Ecore_X_Window win)
 {
    xcb_client_message_event_t ev;
 
@@ -594,13 +645,17 @@ ecore_x_netwm_ping_send(Ecore_X_Window win)
    ev.data.data32[3] = 0;
    ev.data.data32[4] = 0;
 
-   xcb_send_event(_ecore_xcb_conn, 0, win, 
+   xcb_send_event(_ecore_xcb_conn, 0, win,
                   XCB_EVENT_MASK_NO_EVENT, (const char *)&ev);
 //   ecore_x_flush();
 }
 
-EAPI void 
-ecore_x_netwm_frame_size_set(Ecore_X_Window win, int fl, int fr, int ft, int fb) 
+EAPI void
+ecore_x_netwm_frame_size_set(Ecore_X_Window win,
+                             int            fl,
+                             int            fr,
+                             int            ft,
+                             int            fb)
 {
    uint32_t frames[4];
 
@@ -610,19 +665,23 @@ ecore_x_netwm_frame_size_set(Ecore_X_Window win, int fl, int fr, int ft, int fb)
    frames[1] = fr;
    frames[2] = ft;
    frames[3] = fb;
-   ecore_x_window_prop_card32_set(win, ECORE_X_ATOM_NET_FRAME_EXTENTS, 
+   ecore_x_window_prop_card32_set(win, ECORE_X_ATOM_NET_FRAME_EXTENTS,
                                   frames, 4);
 }
 
-EAPI Eina_Bool 
-ecore_x_netwm_frame_size_get(Ecore_X_Window win, int *fl, int *fr, int *ft, int *fb) 
+EAPI Eina_Bool
+ecore_x_netwm_frame_size_get(Ecore_X_Window win,
+                             int           *fl,
+                             int           *fr,
+                             int           *ft,
+                             int           *fb)
 {
    int ret = 0;
    unsigned int frames[4];
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
 
-   ret = ecore_x_window_prop_card32_get(win, ECORE_X_ATOM_NET_FRAME_EXTENTS, 
+   ret = ecore_x_window_prop_card32_get(win, ECORE_X_ATOM_NET_FRAME_EXTENTS,
                                         frames, 4);
    if (ret != 4) return EINA_FALSE;
 
@@ -634,8 +693,9 @@ ecore_x_netwm_frame_size_get(Ecore_X_Window win, int *fl, int *fr, int *ft, int
    return EINA_TRUE;
 }
 
-EAPI void 
-ecore_x_netwm_sync_request_send(Ecore_X_Window win, unsigned int serial) 
+EAPI void
+ecore_x_netwm_sync_request_send(Ecore_X_Window win,
+                                unsigned int   serial)
 {
    xcb_client_message_event_t ev;
 
@@ -657,27 +717,29 @@ ecore_x_netwm_sync_request_send(Ecore_X_Window win, unsigned int serial)
    ev.data.data32[3] = 0;
    ev.data.data32[4] = 0;
 
-   xcb_send_event(_ecore_xcb_conn, 0, win, 
+   xcb_send_event(_ecore_xcb_conn, 0, win,
                   XCB_EVENT_MASK_NO_EVENT, (const char *)&ev);
 //   ecore_x_flush();
 }
 
-EAPI void 
-ecore_x_netwm_desktop_set(Ecore_X_Window win, unsigned int desk) 
+EAPI void
+ecore_x_netwm_desktop_set(Ecore_X_Window win,
+                          unsigned int   desk)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
 
    ecore_x_window_prop_card32_set(win, ECORE_X_ATOM_NET_WM_DESKTOP, &desk, 1);
 }
 
-EAPI Eina_Bool 
-ecore_x_netwm_desktop_get(Ecore_X_Window win, unsigned int *desk) 
+EAPI Eina_Bool
+ecore_x_netwm_desktop_get(Ecore_X_Window win,
+                          unsigned int  *desk)
 {
    unsigned int tmp = 0;
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
 
-   if (!ecore_x_window_prop_card32_get(win, ECORE_X_ATOM_NET_WM_DESKTOP, 
+   if (!ecore_x_window_prop_card32_get(win, ECORE_X_ATOM_NET_WM_DESKTOP,
                                        &tmp, 1))
      return EINA_FALSE;
 
@@ -686,8 +748,10 @@ ecore_x_netwm_desktop_get(Ecore_X_Window win, unsigned int *desk)
    return EINA_TRUE;
 }
 
-EAPI void 
-ecore_x_netwm_desktop_request_send(Ecore_X_Window win, Ecore_X_Window root, unsigned int desktop) 
+EAPI void
+ecore_x_netwm_desktop_request_send(Ecore_X_Window win,
+                                   Ecore_X_Window root,
+                                   unsigned int   desktop)
 {
    xcb_client_message_event_t ev;
 
@@ -704,57 +768,61 @@ ecore_x_netwm_desktop_request_send(Ecore_X_Window win, Ecore_X_Window root, unsi
    ev.type = ECORE_X_ATOM_NET_WM_DESKTOP;
    ev.data.data32[0] = desktop;
 
-   xcb_send_event(_ecore_xcb_conn, 0, root, 
-                  (XCB_EVENT_MASK_SUBSTRUCTURE_REDIRECT | 
-                      XCB_EVENT_MASK_SUBSTRUCTURE_NOTIFY), (const char *)&ev);
+   xcb_send_event(_ecore_xcb_conn, 0, root,
+                  (XCB_EVENT_MASK_SUBSTRUCTURE_REDIRECT |
+                   XCB_EVENT_MASK_SUBSTRUCTURE_NOTIFY), (const char *)&ev);
 //   ecore_x_flush();
 }
 
-EAPI void 
-ecore_x_netwm_handled_icons_set(Ecore_X_Window win) 
+EAPI void
+ecore_x_netwm_handled_icons_set(Ecore_X_Window win)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
 
-   ecore_x_window_prop_card32_set(win, ECORE_X_ATOM_NET_WM_HANDLED_ICONS, 
+   ecore_x_window_prop_card32_set(win, ECORE_X_ATOM_NET_WM_HANDLED_ICONS,
                                   NULL, 0);
 }
 
-EAPI Eina_Bool 
-ecore_x_netwm_handled_icons_get(Ecore_X_Window win) 
+EAPI Eina_Bool
+ecore_x_netwm_handled_icons_get(Ecore_X_Window win)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
 
-   if (!ecore_x_window_prop_card32_get(win, ECORE_X_ATOM_NET_WM_HANDLED_ICONS, 
+   if (!ecore_x_window_prop_card32_get(win, ECORE_X_ATOM_NET_WM_HANDLED_ICONS,
                                        NULL, 0))
      return EINA_FALSE;
 
    return EINA_TRUE;
 }
 
-EAPI int 
-ecore_x_netwm_icon_name_get(Ecore_X_Window win, char **name) 
+EAPI int
+ecore_x_netwm_icon_name_get(Ecore_X_Window win,
+                            char         **name)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
 
-   if (name) 
+   if (name)
      {
-        *name = 
+        *name =
           ecore_x_window_prop_string_get(win, ECORE_X_ATOM_NET_WM_ICON_NAME);
      }
 
    return 1;
 }
 
-EAPI void 
-ecore_x_netwm_icon_name_set(Ecore_X_Window win, const char *name) 
+EAPI void
+ecore_x_netwm_icon_name_set(Ecore_X_Window win,
+                            const char    *name)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
 
    ecore_x_window_prop_string_set(win, ECORE_X_ATOM_NET_WM_ICON_NAME, name);
 }
 
-EAPI Eina_Bool 
-ecore_x_netwm_icons_get(Ecore_X_Window win, Ecore_X_Icon **icon, int *num) 
+EAPI Eina_Bool
+ecore_x_netwm_icons_get(Ecore_X_Window win,
+                        Ecore_X_Icon **icon,
+                        int           *num)
 {
    int num_ret = 0;
    unsigned int i = 0, len = 0, icons = 0;
@@ -765,15 +833,15 @@ ecore_x_netwm_icons_get(Ecore_X_Window win, Ecore_X_Icon **icon, int *num)
    if (num) *num = 0;
    if (icon) *icon = NULL;
 
-   num_ret = 
+   num_ret =
      ecore_x_window_prop_card32_list_get(win, ECORE_X_ATOM_NET_WM_ICON, &data);
 
-   if ((num_ret <= 0) || (!data)) 
+   if ((num_ret <= 0) || (!data))
      {
         if (data) free(data);
         return EINA_FALSE;
      }
-   if (num_ret < 2) 
+   if (num_ret < 2)
      {
         if (data) free(data);
         return EINA_FALSE;
@@ -781,11 +849,11 @@ ecore_x_netwm_icons_get(Ecore_X_Window win, Ecore_X_Icon **icon, int *num)
 
    icons = 0;
    p = data;
-   while (p) 
+   while (p)
      {
         len = (p[0] * p[1]);
         p += (len + 2);
-        if ((p - data) > num_ret) 
+        if ((p - data) > num_ret)
           {
              if (data) free(data);
              return EINA_FALSE;
@@ -794,14 +862,14 @@ ecore_x_netwm_icons_get(Ecore_X_Window win, Ecore_X_Icon **icon, int *num)
         if ((p - data) == num_ret) p = NULL;
      }
    if (num) *num = icons;
-   if (!icon) 
+   if (!icon)
      {
         if (data) free(data);
         return EINA_TRUE;
      }
 
    *icon = malloc(icons * sizeof(Ecore_X_Icon));
-   if (!(*icon)) 
+   if (!(*icon))
      {
         if (data) free(data);
         return EINA_FALSE;
@@ -809,7 +877,7 @@ ecore_x_netwm_icons_get(Ecore_X_Window win, Ecore_X_Icon **icon, int *num)
 
    /* Fetch the icons */
    p = data;
-   for (i = 0; i < icons; i++) 
+   for (i = 0; i < icons; i++)
      {
         unsigned int *ps, *pd, *pe;
 
@@ -848,8 +916,12 @@ ecore_x_netwm_icons_get(Ecore_X_Window win, Ecore_X_Icon **icon, int *num)
    return EINA_TRUE;
 }
 
-EAPI void 
-ecore_x_netwm_icon_geometry_set(Ecore_X_Window win, int x, int y, int w, int h) 
+EAPI void
+ecore_x_netwm_icon_geometry_set(Ecore_X_Window win,
+                                int            x,
+                                int            y,
+                                int            w,
+                                int            h)
 {
    unsigned int geom[4];
 
@@ -859,20 +931,24 @@ ecore_x_netwm_icon_geometry_set(Ecore_X_Window win, int x, int y, int w, int h)
    geom[1] = y;
    geom[2] = w;
    geom[3] = h;
-   ecore_x_window_prop_card32_set(win, ECORE_X_ATOM_NET_WM_ICON_GEOMETRY, 
+   ecore_x_window_prop_card32_set(win, ECORE_X_ATOM_NET_WM_ICON_GEOMETRY,
                                   geom, 4);
 }
 
-EAPI Eina_Bool 
-ecore_x_netwm_icon_geometry_get(Ecore_X_Window win, int *x, int *y, int *w, int *h) 
+EAPI Eina_Bool
+ecore_x_netwm_icon_geometry_get(Ecore_X_Window win,
+                                int           *x,
+                                int           *y,
+                                int           *w,
+                                int           *h)
 {
    int ret = 0;
    unsigned int geom[4];
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
 
-   ret = 
-     ecore_x_window_prop_card32_get(win, ECORE_X_ATOM_NET_WM_ICON_GEOMETRY, 
+   ret =
+     ecore_x_window_prop_card32_get(win, ECORE_X_ATOM_NET_WM_ICON_GEOMETRY,
                                     geom, 4);
    if (ret != 4) return EINA_FALSE;
    if (x) *x = geom[0];
@@ -883,8 +959,12 @@ ecore_x_netwm_icon_geometry_get(Ecore_X_Window win, int *x, int *y, int *w, int
    return EINA_TRUE;
 }
 
-EAPI void 
-ecore_x_netwm_strut_set(Ecore_X_Window win, int l, int r, int t, int b) 
+EAPI void
+ecore_x_netwm_strut_set(Ecore_X_Window win,
+                        int            l,
+                        int            r,
+                        int            t,
+                        int            b)
 {
    unsigned int strut[4];
 
@@ -897,15 +977,19 @@ ecore_x_netwm_strut_set(Ecore_X_Window win, int l, int r, int t, int b)
    ecore_x_window_prop_card32_set(win, ECORE_X_ATOM_NET_WM_STRUT, strut, 4);
 }
 
-EAPI Eina_Bool 
-ecore_x_netwm_strut_get(Ecore_X_Window win, int *l, int *r, int *t, int *b) 
+EAPI Eina_Bool
+ecore_x_netwm_strut_get(Ecore_X_Window win,
+                        int           *l,
+                        int           *r,
+                        int           *t,
+                        int           *b)
 {
    unsigned int strut[4];
    int ret = 0;
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
 
-   ret = 
+   ret =
      ecore_x_window_prop_card32_get(win, ECORE_X_ATOM_NET_WM_STRUT, strut, 4);
    if (ret != 4) return EINA_FALSE;
 
@@ -917,8 +1001,20 @@ ecore_x_netwm_strut_get(Ecore_X_Window win, int *l, int *r, int *t, int *b)
    return EINA_TRUE;
 }
 
-EAPI void 
-ecore_x_netwm_strut_partial_set(Ecore_X_Window win, int left, int right, int top, int bottom, int left_start_y, int left_end_y, int right_start_y, int right_end_y, int top_start_x, int top_end_x, int bottom_start_x, int bottom_end_x)
+EAPI void
+ecore_x_netwm_strut_partial_set(Ecore_X_Window win,
+                                int            left,
+                                int            right,
+                                int            top,
+                                int            bottom,
+                                int            left_start_y,
+                                int            left_end_y,
+                                int            right_start_y,
+                                int            right_end_y,
+                                int            top_start_x,
+                                int            top_end_x,
+                                int            bottom_start_x,
+                                int            bottom_end_x)
 {
    unsigned int strut[12];
 
@@ -940,16 +1036,28 @@ ecore_x_netwm_strut_partial_set(Ecore_X_Window win, int left, int right, int top
                                   strut, 12);
 }
 
-EAPI Eina_Bool 
-ecore_x_netwm_strut_partial_get(Ecore_X_Window win, int *left, int *right, int *top, int *bottom, int *left_start_y, int *left_end_y, int *right_start_y, int *right_end_y, int *top_start_x, int *top_end_x, int *bottom_start_x, int *bottom_end_x) 
+EAPI Eina_Bool
+ecore_x_netwm_strut_partial_get(Ecore_X_Window win,
+                                int           *left,
+                                int           *right,
+                                int           *top,
+                                int           *bottom,
+                                int           *left_start_y,
+                                int           *left_end_y,
+                                int           *right_start_y,
+                                int           *right_end_y,
+                                int           *top_start_x,
+                                int           *top_end_x,
+                                int           *bottom_start_x,
+                                int           *bottom_end_x)
 {
    unsigned int strut[12];
    int ret = 0;
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
 
-   ret = 
-     ecore_x_window_prop_card32_get(win, ECORE_X_ATOM_NET_WM_STRUT_PARTIAL, 
+   ret =
+     ecore_x_window_prop_card32_get(win, ECORE_X_ATOM_NET_WM_STRUT_PARTIAL,
                                     strut, 12);
    if (ret != 12) return EINA_FALSE;
 
@@ -969,23 +1077,25 @@ ecore_x_netwm_strut_partial_get(Ecore_X_Window win, int *left, int *right, int *
    return EINA_TRUE;
 }
 
-EAPI void 
-ecore_x_netwm_user_time_set(Ecore_X_Window win, unsigned int t) 
+EAPI void
+ecore_x_netwm_user_time_set(Ecore_X_Window win,
+                            unsigned int   t)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
 
    ecore_x_window_prop_card32_set(win, ECORE_X_ATOM_NET_WM_USER_TIME, &t, 1);
 }
 
-EAPI Eina_Bool 
-ecore_x_netwm_user_time_get(Ecore_X_Window win, unsigned int *t) 
+EAPI Eina_Bool
+ecore_x_netwm_user_time_get(Ecore_X_Window win,
+                            unsigned int  *t)
 {
    unsigned int tmp;
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
 
-   if (!ecore_x_window_prop_card32_get(win, ECORE_X_ATOM_NET_WM_USER_TIME, 
-                                        &tmp, 1))
+   if (!ecore_x_window_prop_card32_get(win, ECORE_X_ATOM_NET_WM_USER_TIME,
+                                       &tmp, 1))
      return EINA_FALSE;
 
    if (t) *t = tmp;
@@ -993,60 +1103,65 @@ ecore_x_netwm_user_time_get(Ecore_X_Window win, unsigned int *t)
    return EINA_TRUE;
 }
 
-EAPI void 
-ecore_x_netwm_visible_name_set(Ecore_X_Window win, const char *name) 
+EAPI void
+ecore_x_netwm_visible_name_set(Ecore_X_Window win,
+                               const char    *name)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
 
-   ecore_x_window_prop_string_set(win, ECORE_X_ATOM_NET_WM_VISIBLE_NAME, 
+   ecore_x_window_prop_string_set(win, ECORE_X_ATOM_NET_WM_VISIBLE_NAME,
                                   name);
 }
 
-EAPI int 
-ecore_x_netwm_visible_name_get(Ecore_X_Window win, char **name) 
+EAPI int
+ecore_x_netwm_visible_name_get(Ecore_X_Window win,
+                               char         **name)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
 
-   if (name) 
-     *name = ecore_x_window_prop_string_get(win, 
+   if (name)
+     *name = ecore_x_window_prop_string_get(win,
                                             ECORE_X_ATOM_NET_WM_VISIBLE_NAME);
    return 1;
 }
 
-EAPI void 
-ecore_x_netwm_visible_icon_name_set(Ecore_X_Window win, const char *name) 
+EAPI void
+ecore_x_netwm_visible_icon_name_set(Ecore_X_Window win,
+                                    const char    *name)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
 
-   ecore_x_window_prop_string_set(win, ECORE_X_ATOM_NET_WM_VISIBLE_ICON_NAME, 
+   ecore_x_window_prop_string_set(win, ECORE_X_ATOM_NET_WM_VISIBLE_ICON_NAME,
                                   name);
 }
 
-EAPI int 
-ecore_x_netwm_visible_icon_name_get(Ecore_X_Window win, char **name) 
+EAPI int
+ecore_x_netwm_visible_icon_name_get(Ecore_X_Window win,
+                                    char         **name)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
 
-   if (name) 
+   if (name)
      {
-        *name = 
-          ecore_x_window_prop_string_get(win, 
+        *name =
+          ecore_x_window_prop_string_get(win,
                                          ECORE_X_ATOM_NET_WM_VISIBLE_ICON_NAME);
      }
 
    return 1;
 }
 
-EAPI Eina_Bool 
-ecore_x_netwm_sync_counter_get(Ecore_X_Window win, Ecore_X_Sync_Counter *counter) 
+EAPI Eina_Bool
+ecore_x_netwm_sync_counter_get(Ecore_X_Window        win,
+                               Ecore_X_Sync_Counter *counter)
 {
    unsigned int tmp;
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
 
-   if (!ecore_x_window_prop_card32_get(win, 
-                                    ECORE_X_ATOM_NET_WM_SYNC_REQUEST_COUNTER, 
-                                    &tmp, 1))
+   if (!ecore_x_window_prop_card32_get(win,
+                                       ECORE_X_ATOM_NET_WM_SYNC_REQUEST_COUNTER,
+                                       &tmp, 1))
      return EINA_FALSE;
 
    if (counter) *counter = tmp;
@@ -1054,8 +1169,9 @@ ecore_x_netwm_sync_counter_get(Ecore_X_Window win, Ecore_X_Sync_Counter *counter
    return EINA_TRUE;
 }
 
-EAPI Eina_Bool 
-ecore_x_netwm_allowed_action_isset(Ecore_X_Window win, Ecore_X_Action action) 
+EAPI Eina_Bool
+ecore_x_netwm_allowed_action_isset(Ecore_X_Window win,
+                                   Ecore_X_Action action)
 {
    int num = 0, i = 0;
    Ecore_X_Atom *atoms, atom;
@@ -1063,15 +1179,15 @@ ecore_x_netwm_allowed_action_isset(Ecore_X_Window win, Ecore_X_Action action)
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
 
-   num = 
-     ecore_x_window_prop_atom_list_get(win, ECORE_X_ATOM_NET_WM_WINDOW_TYPE, 
+   num =
+     ecore_x_window_prop_atom_list_get(win, ECORE_X_ATOM_NET_WM_WINDOW_TYPE,
                                        &atoms);
    if (num <= 0) return EINA_FALSE;
 
    atom = _ecore_xcb_netwm_action_atom_get(action);
-   for (i = 0; i < num; i++) 
+   for (i = 0; i < num; i++)
      {
-        if (atoms[i] == atom) 
+        if (atoms[i] == atom)
           {
              ret = EINA_TRUE;
              break;
@@ -1082,8 +1198,10 @@ ecore_x_netwm_allowed_action_isset(Ecore_X_Window win, Ecore_X_Action action)
    return ret;
 }
 
-EAPI Eina_Bool 
-ecore_x_netwm_allowed_action_get(Ecore_X_Window win, Ecore_X_Action **action, unsigned int *num) 
+EAPI Eina_Bool
+ecore_x_netwm_allowed_action_get(Ecore_X_Window   win,
+                                 Ecore_X_Action **action,
+                                 unsigned int    *num)
 {
    Ecore_X_Atom *atoms;
    int num_ret = 0;
@@ -1093,14 +1211,14 @@ ecore_x_netwm_allowed_action_get(Ecore_X_Window win, Ecore_X_Action **action, un
    if (num) *num = 0;
    if (action) *action = NULL;
 
-   num_ret = 
-     ecore_x_window_prop_atom_list_get(win, ECORE_X_ATOM_NET_WM_ALLOWED_ACTIONS, 
+   num_ret =
+     ecore_x_window_prop_atom_list_get(win, ECORE_X_ATOM_NET_WM_ALLOWED_ACTIONS,
                                        &atoms);
    if (num_ret <= 0) return EINA_FALSE;
-   if (action) 
+   if (action)
      {
         *action = malloc(num_ret * sizeof(Ecore_X_Action));
-        if (*action) 
+        if (*action)
           {
              int i = 0;
 
@@ -1113,17 +1231,19 @@ ecore_x_netwm_allowed_action_get(Ecore_X_Window win, Ecore_X_Action **action, un
    return EINA_TRUE;
 }
 
-EAPI void 
-ecore_x_netwm_allowed_action_set(Ecore_X_Window win, Ecore_X_Action *action, unsigned int num) 
+EAPI void
+ecore_x_netwm_allowed_action_set(Ecore_X_Window  win,
+                                 Ecore_X_Action *action,
+                                 unsigned int    num)
 {
    Ecore_X_Atom *set;
    unsigned int i = 0;
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
 
-   if (!num) 
+   if (!num)
      {
-        ecore_x_window_prop_property_del(win, 
+        ecore_x_window_prop_property_del(win,
                                          ECORE_X_ATOM_NET_WM_ALLOWED_ACTIONS);
         return;
      }
@@ -1134,24 +1254,26 @@ ecore_x_netwm_allowed_action_set(Ecore_X_Window win, Ecore_X_Action *action, uns
    for (i = 0; i < num; i++)
      set[i] = _ecore_xcb_netwm_action_atom_get(action[i]);
 
-   ecore_x_window_prop_atom_set(win, ECORE_X_ATOM_NET_WM_ALLOWED_ACTIONS, 
+   ecore_x_window_prop_atom_set(win, ECORE_X_ATOM_NET_WM_ALLOWED_ACTIONS,
                                 set, num);
    free(set);
 }
 
 /* local functions */
-int 
-_ecore_xcb_netwm_startup_info_begin(Ecore_X_Window win __UNUSED__, uint8_t data __UNUSED__) 
+int
+_ecore_xcb_netwm_startup_info_begin(Ecore_X_Window win __UNUSED__,
+                                    uint8_t        data __UNUSED__)
 {
    // TODO: TBD
-   return 1;
+     return 1;
 }
 
-int 
-_ecore_xcb_netwm_startup_info(Ecore_X_Window win __UNUSED__, uint8_t data __UNUSED__) 
+int
+_ecore_xcb_netwm_startup_info(Ecore_X_Window win __UNUSED__,
+                              uint8_t        data __UNUSED__)
 {
    // TODO: TBD
-   return 1;
+     return 1;
 }
 
 /* static void  */
@@ -1172,46 +1294,60 @@ _ecore_xcb_netwm_startup_info(Ecore_X_Window win __UNUSED__, uint8_t data __UNUS
 /*    free(info); */
 /* } */
 
-static Ecore_X_Atom 
-_ecore_xcb_netwm_window_type_atom_get(Ecore_X_Window_Type type) 
+static Ecore_X_Atom
+_ecore_xcb_netwm_window_type_atom_get(Ecore_X_Window_Type type)
 {
-   switch (type) 
+   switch (type)
      {
       case ECORE_X_WINDOW_TYPE_DESKTOP:
         return ECORE_X_ATOM_NET_WM_WINDOW_TYPE_DESKTOP;
+
       case ECORE_X_WINDOW_TYPE_DOCK:
         return ECORE_X_ATOM_NET_WM_WINDOW_TYPE_DOCK;
+
       case ECORE_X_WINDOW_TYPE_TOOLBAR:
         return ECORE_X_ATOM_NET_WM_WINDOW_TYPE_TOOLBAR;
+
       case ECORE_X_WINDOW_TYPE_MENU:
         return ECORE_X_ATOM_NET_WM_WINDOW_TYPE_MENU;
+
       case ECORE_X_WINDOW_TYPE_UTILITY:
         return ECORE_X_ATOM_NET_WM_WINDOW_TYPE_UTILITY;
+
       case ECORE_X_WINDOW_TYPE_SPLASH:
         return ECORE_X_ATOM_NET_WM_WINDOW_TYPE_SPLASH;
+
       case ECORE_X_WINDOW_TYPE_DIALOG:
         return ECORE_X_ATOM_NET_WM_WINDOW_TYPE_DIALOG;
+
       case ECORE_X_WINDOW_TYPE_NORMAL:
         return ECORE_X_ATOM_NET_WM_WINDOW_TYPE_NORMAL;
+
       case ECORE_X_WINDOW_TYPE_DROPDOWN_MENU:
         return ECORE_X_ATOM_NET_WM_WINDOW_TYPE_DROPDOWN_MENU;
+
       case ECORE_X_WINDOW_TYPE_POPUP_MENU:
         return ECORE_X_ATOM_NET_WM_WINDOW_TYPE_POPUP_MENU;
+
       case ECORE_X_WINDOW_TYPE_TOOLTIP:
         return ECORE_X_ATOM_NET_WM_WINDOW_TYPE_TOOLTIP;
+
       case ECORE_X_WINDOW_TYPE_NOTIFICATION:
         return ECORE_X_ATOM_NET_WM_WINDOW_TYPE_NOTIFICATION;
+
       case ECORE_X_WINDOW_TYPE_COMBO:
         return ECORE_X_ATOM_NET_WM_WINDOW_TYPE_COMBO;
+
       case ECORE_X_WINDOW_TYPE_DND:
         return ECORE_X_ATOM_NET_WM_WINDOW_TYPE_DND;
+
       default:
         return 0;
      }
 }
 
-static Ecore_X_Window_Type 
-_ecore_xcb_netwm_window_type_type_get(Ecore_X_Atom atom) 
+static Ecore_X_Window_Type
+_ecore_xcb_netwm_window_type_type_get(Ecore_X_Atom atom)
 {
    if (atom == ECORE_X_ATOM_NET_WM_WINDOW_TYPE_DESKTOP)
      return ECORE_X_WINDOW_TYPE_DESKTOP;
@@ -1230,116 +1366,141 @@ _ecore_xcb_netwm_window_type_type_get(Ecore_X_Atom atom)
    else if (atom == ECORE_X_ATOM_NET_WM_WINDOW_TYPE_NORMAL)
      return ECORE_X_WINDOW_TYPE_NORMAL;
    else if (atom == ECORE_X_ATOM_NET_WM_WINDOW_TYPE_DROPDOWN_MENU)
-      return ECORE_X_WINDOW_TYPE_DROPDOWN_MENU;
+     return ECORE_X_WINDOW_TYPE_DROPDOWN_MENU;
    else if (atom == ECORE_X_ATOM_NET_WM_WINDOW_TYPE_POPUP_MENU)
-      return ECORE_X_WINDOW_TYPE_POPUP_MENU;
+     return ECORE_X_WINDOW_TYPE_POPUP_MENU;
    else if (atom == ECORE_X_ATOM_NET_WM_WINDOW_TYPE_TOOLTIP)
-      return ECORE_X_WINDOW_TYPE_TOOLTIP;
+     return ECORE_X_WINDOW_TYPE_TOOLTIP;
    else if (atom == ECORE_X_ATOM_NET_WM_WINDOW_TYPE_NOTIFICATION)
-      return ECORE_X_WINDOW_TYPE_NOTIFICATION;
+     return ECORE_X_WINDOW_TYPE_NOTIFICATION;
    else if (atom == ECORE_X_ATOM_NET_WM_WINDOW_TYPE_COMBO)
-      return ECORE_X_WINDOW_TYPE_COMBO;
+     return ECORE_X_WINDOW_TYPE_COMBO;
    else if (atom == ECORE_X_ATOM_NET_WM_WINDOW_TYPE_DND)
-      return ECORE_X_WINDOW_TYPE_DND;
+     return ECORE_X_WINDOW_TYPE_DND;
    else
      return ECORE_X_WINDOW_TYPE_UNKNOWN;
 }
 
-static Ecore_X_Atom 
-_ecore_xcb_netwm_window_state_atom_get(Ecore_X_Window_State state) 
+static Ecore_X_Atom
+_ecore_xcb_netwm_window_state_atom_get(Ecore_X_Window_State state)
 {
-   switch (state) 
+   switch (state)
      {
       case ECORE_X_WINDOW_STATE_MODAL:
         return ECORE_X_ATOM_NET_WM_STATE_MODAL;
+
       case ECORE_X_WINDOW_STATE_STICKY:
         return ECORE_X_ATOM_NET_WM_STATE_STICKY;
+
       case ECORE_X_WINDOW_STATE_MAXIMIZED_VERT:
         return ECORE_X_ATOM_NET_WM_STATE_MAXIMIZED_VERT;
+
       case ECORE_X_WINDOW_STATE_MAXIMIZED_HORZ:
         return ECORE_X_ATOM_NET_WM_STATE_MAXIMIZED_HORZ;
+
       case ECORE_X_WINDOW_STATE_SHADED:
         return ECORE_X_ATOM_NET_WM_STATE_SHADED;
+
       case ECORE_X_WINDOW_STATE_SKIP_TASKBAR:
         return ECORE_X_ATOM_NET_WM_STATE_SKIP_TASKBAR;
+
       case ECORE_X_WINDOW_STATE_SKIP_PAGER:
         return ECORE_X_ATOM_NET_WM_STATE_SKIP_PAGER;
+
       case ECORE_X_WINDOW_STATE_HIDDEN:
         return ECORE_X_ATOM_NET_WM_STATE_HIDDEN;
+
       case ECORE_X_WINDOW_STATE_FULLSCREEN:
         return ECORE_X_ATOM_NET_WM_STATE_FULLSCREEN;
+
       case ECORE_X_WINDOW_STATE_ABOVE:
         return ECORE_X_ATOM_NET_WM_STATE_ABOVE;
+
       case ECORE_X_WINDOW_STATE_BELOW:
         return ECORE_X_ATOM_NET_WM_STATE_BELOW;
+
       case ECORE_X_WINDOW_STATE_DEMANDS_ATTENTION:
         return ECORE_X_ATOM_NET_WM_STATE_DEMANDS_ATTENTION;
+
       default:
-        return 0;        
+        return 0;
      }
 }
 
-Ecore_X_Window_State 
-_ecore_xcb_netwm_window_state_get(Ecore_X_Atom atom) 
+Ecore_X_Window_State
+_ecore_xcb_netwm_window_state_get(Ecore_X_Atom atom)
 {
    if (atom == ECORE_X_ATOM_NET_WM_STATE_MODAL)
-      return ECORE_X_WINDOW_STATE_MODAL;
+     return ECORE_X_WINDOW_STATE_MODAL;
    else if (atom == ECORE_X_ATOM_NET_WM_STATE_STICKY)
-      return ECORE_X_WINDOW_STATE_STICKY;
+     return ECORE_X_WINDOW_STATE_STICKY;
    else if (atom == ECORE_X_ATOM_NET_WM_STATE_MAXIMIZED_VERT)
-      return ECORE_X_WINDOW_STATE_MAXIMIZED_VERT;
+     return ECORE_X_WINDOW_STATE_MAXIMIZED_VERT;
    else if (atom == ECORE_X_ATOM_NET_WM_STATE_MAXIMIZED_HORZ)
-      return ECORE_X_WINDOW_STATE_MAXIMIZED_HORZ;
+     return ECORE_X_WINDOW_STATE_MAXIMIZED_HORZ;
    else if (atom == ECORE_X_ATOM_NET_WM_STATE_SHADED)
-      return ECORE_X_WINDOW_STATE_SHADED;
+     return ECORE_X_WINDOW_STATE_SHADED;
    else if (atom == ECORE_X_ATOM_NET_WM_STATE_SKIP_TASKBAR)
-      return ECORE_X_WINDOW_STATE_SKIP_TASKBAR;
+     return ECORE_X_WINDOW_STATE_SKIP_TASKBAR;
    else if (atom == ECORE_X_ATOM_NET_WM_STATE_SKIP_PAGER)
-      return ECORE_X_WINDOW_STATE_SKIP_PAGER;
+     return ECORE_X_WINDOW_STATE_SKIP_PAGER;
    else if (atom == ECORE_X_ATOM_NET_WM_STATE_HIDDEN)
-      return ECORE_X_WINDOW_STATE_HIDDEN;
+     return ECORE_X_WINDOW_STATE_HIDDEN;
    else if (atom == ECORE_X_ATOM_NET_WM_STATE_FULLSCREEN)
-      return ECORE_X_WINDOW_STATE_FULLSCREEN;
+     return ECORE_X_WINDOW_STATE_FULLSCREEN;
    else if (atom == ECORE_X_ATOM_NET_WM_STATE_ABOVE)
-      return ECORE_X_WINDOW_STATE_ABOVE;
+     return ECORE_X_WINDOW_STATE_ABOVE;
    else if (atom == ECORE_X_ATOM_NET_WM_STATE_BELOW)
-      return ECORE_X_WINDOW_STATE_BELOW;
+     return ECORE_X_WINDOW_STATE_BELOW;
    else if (atom == ECORE_X_ATOM_NET_WM_STATE_DEMANDS_ATTENTION)
-      return ECORE_X_WINDOW_STATE_DEMANDS_ATTENTION;
+     return ECORE_X_WINDOW_STATE_DEMANDS_ATTENTION;
    else
-      return ECORE_X_WINDOW_STATE_UNKNOWN;
+     return ECORE_X_WINDOW_STATE_UNKNOWN;
 }
 
-static Ecore_X_Atom 
-_ecore_xcb_netwm_action_atom_get(Ecore_X_Action action) 
+static Ecore_X_Atom
+_ecore_xcb_netwm_action_atom_get(Ecore_X_Action action)
 {
    switch (action)
      {
       case ECORE_X_ACTION_MOVE:
         return ECORE_X_ATOM_NET_WM_ACTION_MOVE;
+
       case ECORE_X_ACTION_RESIZE:
         return ECORE_X_ATOM_NET_WM_ACTION_RESIZE;
+
       case ECORE_X_ACTION_MINIMIZE:
         return ECORE_X_ATOM_NET_WM_ACTION_MINIMIZE;
+
       case ECORE_X_ACTION_SHADE:
         return ECORE_X_ATOM_NET_WM_ACTION_SHADE;
+
       case ECORE_X_ACTION_STICK:
         return ECORE_X_ATOM_NET_WM_ACTION_STICK;
+
       case ECORE_X_ACTION_MAXIMIZE_HORZ:
         return ECORE_X_ATOM_NET_WM_ACTION_MAXIMIZE_HORZ;
+
       case ECORE_X_ACTION_MAXIMIZE_VERT:
         return ECORE_X_ATOM_NET_WM_ACTION_MAXIMIZE_VERT;
+
       case ECORE_X_ACTION_FULLSCREEN:
         return ECORE_X_ATOM_NET_WM_ACTION_FULLSCREEN;
+
       case ECORE_X_ACTION_CHANGE_DESKTOP:
         return ECORE_X_ATOM_NET_WM_ACTION_CHANGE_DESKTOP;
+
       case ECORE_X_ACTION_CLOSE:
         return ECORE_X_ATOM_NET_WM_ACTION_CLOSE;
+
       case ECORE_X_ACTION_ABOVE:
         return ECORE_X_ATOM_NET_WM_ACTION_ABOVE;
+
       case ECORE_X_ACTION_BELOW:
         return ECORE_X_ATOM_NET_WM_ACTION_BELOW;
+
       default:
         return 0;
      }
 }
+
index 64ebdd0..f9bf525 100644 (file)
  * @return  New pixmap.
  * @ingroup Ecore_X_Pixmap_Group
  */
-EAPI Ecore_X_Pixmap 
-ecore_x_pixmap_new(Ecore_X_Window win, int w, int h, int dep) 
+EAPI Ecore_X_Pixmap
+ecore_x_pixmap_new(Ecore_X_Window win,
+                   int            w,
+                   int            h,
+                   int            dep)
 {
    Ecore_X_Pixmap pmap;
 
@@ -45,8 +48,8 @@ ecore_x_pixmap_new(Ecore_X_Window win, int w, int h, int dep)
  * @param   pmap The given pixmap.
  * @ingroup Ecore_X_Pixmap_Group
  */
-EAPI void 
-ecore_x_pixmap_free(Ecore_X_Pixmap pmap) 
+EAPI void
+ecore_x_pixmap_free(Ecore_X_Pixmap pmap)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    CHECK_XCB_CONN;
@@ -69,8 +72,16 @@ ecore_x_pixmap_free(Ecore_X_Pixmap pmap)
  * @param   dy   The Y position at which to paste the area on @p dest.
  * @ingroup Ecore_X_Pixmap_Group
  */
-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_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)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    CHECK_XCB_CONN;
@@ -88,8 +99,12 @@ ecore_x_pixmap_paste(Ecore_X_Pixmap pmap, Ecore_X_Drawable dest, Ecore_X_GC gc,
  * @param   h    Pointer to an integer in which to store the height.
  * @ingroup Ecore_X_Pixmap_Group
  */
-EAPI void 
-ecore_x_pixmap_geometry_get(Ecore_X_Pixmap pmap, int *x, int *y, int *w, int *h) 
+EAPI void
+ecore_x_pixmap_geometry_get(Ecore_X_Pixmap pmap,
+                            int           *x,
+                            int           *y,
+                            int           *w,
+                            int           *h)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
 
@@ -103,10 +118,11 @@ ecore_x_pixmap_geometry_get(Ecore_X_Pixmap pmap, int *x, int *y, int *w, int *h)
  * @return  The depth of the pixmap.
  * @ingroup Ecore_X_Pixmap_Group
  */
-EAPI int 
-ecore_x_pixmap_depth_get(Ecore_X_Pixmap pmap) 
+EAPI int
+ecore_x_pixmap_depth_get(Ecore_X_Pixmap pmap)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
 
    return ecore_x_drawable_depth_get(pmap);
 }
+
index c143d9d..9d8c26b 100644 (file)
@@ -51,7 +51,7 @@ extern int _ecore_xcb_log_dom;
 # ifdef CRIT
 #  undef CRIT
 # endif
-# define CRIT(...) EINA_LOG_DOM_CRIT(_ecore_xcb_log_dom, __VA_ARGS__)
+# define CRIT(...)          EINA_LOG_DOM_CRIT(_ecore_xcb_log_dom, __VA_ARGS__)
 
 # ifdef LOGFNS
 #  include <stdio.h>
@@ -72,117 +72,122 @@ extern int _ecore_xcb_log_dom;
 #  define MAX(a, b) ((a < b) ? b : a)
 # endif
 
-#define CHECK_XCB_CONN \
-   { \
-      if (xcb_connection_has_error(_ecore_xcb_conn)) \
-        { \
-           DBG("XCB Connection Has Error !!"); \
-           _ecore_xcb_io_error_handle(NULL); \
-        } \
-   }
+#define CHECK_XCB_CONN                              \
+  {                                                 \
+     if (xcb_connection_has_error(_ecore_xcb_conn)) \
+       {                                            \
+          DBG("XCB Connection Has Error !!");       \
+          _ecore_xcb_io_error_handle(NULL);         \
+       }                                            \
+  }
 
 /* enums */
 typedef enum _Ecore_Xcb_Encoding_Style Ecore_Xcb_Encoding_Style;
 
-enum _Ecore_Xcb_Encoding_Style 
+enum _Ecore_Xcb_Encoding_Style
 {
-   XcbStringStyle, 
-   XcbCompoundTextStyle, 
+   XcbStringStyle,
+   XcbCompoundTextStyle,
    XcbTextStyle,
-   XcbStdICCTextStyle, 
+   XcbStdICCTextStyle,
    XcbUTF8StringStyle
 };
 
 /* structures */
-typedef struct _Ecore_X_DND_Source Ecore_X_DND_Source;
-typedef struct _Ecore_X_DND_Target Ecore_X_DND_Target;
-typedef struct _Ecore_X_Selection_Intern Ecore_X_Selection_Intern;
+typedef struct _Ecore_X_DND_Source          Ecore_X_DND_Source;
+typedef struct _Ecore_X_DND_Target          Ecore_X_DND_Target;
+typedef struct _Ecore_X_Selection_Intern    Ecore_X_Selection_Intern;
 typedef struct _Ecore_X_Selection_Converter Ecore_X_Selection_Converter;
-typedef struct _Ecore_X_Selection_Parser Ecore_X_Selection_Parser;
-typedef struct _Ecore_Xcb_Textproperty Ecore_Xcb_Textproperty;
+typedef struct _Ecore_X_Selection_Parser    Ecore_X_Selection_Parser;
+typedef struct _Ecore_Xcb_Textproperty      Ecore_Xcb_Textproperty;
 
-struct _Ecore_X_DND_Source 
+struct _Ecore_X_DND_Source
 {
-   int version;
+   int            version;
    Ecore_X_Window win, dest;
 
-   enum 
-     {
-        ECORE_X_DND_SOURCE_IDLE, 
-        ECORE_X_DND_SOURCE_DRAGGING, 
-        ECORE_X_DND_SOURCE_DROPPED, 
-        ECORE_X_DND_SOURCE_CONVERTING
-     } state;
-
-   struct 
-     {
-        short x, y;
-        unsigned short width, height;
-     } rectangle;
-
-   struct 
-     {
-        Ecore_X_Window window;
-        int x, y;
-     } prev;
+   enum
+   {
+      ECORE_X_DND_SOURCE_IDLE,
+      ECORE_X_DND_SOURCE_DRAGGING,
+      ECORE_X_DND_SOURCE_DROPPED,
+      ECORE_X_DND_SOURCE_CONVERTING
+   } state;
+
+   struct
+   {
+      short          x, y;
+      unsigned short width, height;
+   } rectangle;
+
+   struct
+   {
+      Ecore_X_Window window;
+      int            x, y;
+   } prev;
 
    Ecore_X_Time time;
 
    Ecore_X_Atom action, accepted_action;
 
-   int will_accept, suppress;
-   int await_status;
+   int          will_accept, suppress;
+   int          await_status;
 };
 
-struct _Ecore_X_DND_Target 
+struct _Ecore_X_DND_Target
 {
-   int version;
+   int            version;
    Ecore_X_Window win, source;
 
-   enum 
-     {
-        ECORE_X_DND_TARGET_IDLE, 
-        ECORE_X_DND_TARGET_ENTERED
-     } state;
+   enum
+   {
+      ECORE_X_DND_TARGET_IDLE,
+      ECORE_X_DND_TARGET_ENTERED
+   } state;
 
-   struct 
-     {
-        int x, y;
-     } pos;
+   struct
+   {
+      int x, y;
+   } pos;
 
    Ecore_X_Time time;
 
    Ecore_X_Atom action, accepted_action;
-   int will_accept;
+   int          will_accept;
 };
 
-struct _Ecore_X_Selection_Intern 
+struct _Ecore_X_Selection_Intern
 {
    Ecore_X_Window win;
-   Ecore_X_Atom selection;
+   Ecore_X_Atom   selection;
    unsigned char *data;
-   int length;
-   Ecore_X_Time time;
+   int            length;
+   Ecore_X_Time   time;
 };
 
-struct _Ecore_X_Selection_Converter 
+struct _Ecore_X_Selection_Converter
 {
-   Ecore_X_Atom target;
-   Eina_Bool (*convert) (char *target, void *data, int size, void **data_ret, 
-                         int *size_ret, Ecore_X_Atom *type, int *size_type);
+   Ecore_X_Atom                 target;
+   Eina_Bool                    (*convert)(char *target,
+                                           void *data,
+                                           int size,
+                                           void **data_ret,
+                                           int *size_ret,
+                                           Ecore_X_Atom *type,
+                                           int *size_type);
    Ecore_X_Selection_Converter *next;
 };
 
-struct _Ecore_X_Selection_Parser 
+struct _Ecore_X_Selection_Parser
 {
-   char *target;
-   void *(*parse) (const char *target, void *data, int size, int format);
+   char                     *target;
+   void                     *(*parse)(const char *target, void *data, int size, int format);
    Ecore_X_Selection_Parser *next;
 };
 
-struct _Ecore_Xcb_Textproperty 
+struct _Ecore_Xcb_Textproperty
 {
-   char *value;
+   char        *value;
    Ecore_X_Atom encoding;
    unsigned int format, nitems;
 };
@@ -218,7 +223,9 @@ extern int _ecore_xcb_button_grabs_num;
 extern int _ecore_xcb_key_grabs_num;
 extern Ecore_X_Window *_ecore_xcb_button_grabs;
 extern Ecore_X_Window *_ecore_xcb_key_grabs;
-extern Eina_Bool (*_ecore_xcb_window_grab_replay_func)(void *data, int type, void *event);
+extern Eina_Bool (*_ecore_xcb_window_grab_replay_func)(void *data,
+                                                       int type,
+                                                       void *event);
 extern void *_ecore_xcb_window_grab_replay_data;
 
 /* private function prototypes */
@@ -239,81 +246,148 @@ void _ecore_xcb_screensaver_finalize(void);
 
 void _ecore_xcb_sync_init(void);
 void _ecore_xcb_sync_finalize(void);
-void _ecore_xcb_sync_magic_send(int val, Ecore_X_Window win);
+void _ecore_xcb_sync_magic_send(int val,
+                                Ecore_X_Window win);
 
-void _ecore_xcb_render_init(void);
-void _ecore_xcb_render_finalize(void);
-Eina_Bool _ecore_xcb_render_argb_get(void);
-Eina_Bool _ecore_xcb_render_anim_get(void);
-Eina_Bool _ecore_xcb_render_avail_get(void);
+void                _ecore_xcb_render_init(void);
+void                _ecore_xcb_render_finalize(void);
+Eina_Bool           _ecore_xcb_render_argb_get(void);
+Eina_Bool           _ecore_xcb_render_anim_get(void);
+Eina_Bool           _ecore_xcb_render_avail_get(void);
 
-Eina_Bool _ecore_xcb_render_visual_supports_alpha(Ecore_X_Visual visual);
-uint32_t _ecore_xcb_render_find_visual_id(int type, Eina_Bool check_alpha);
-Ecore_X_Visual *_ecore_xcb_render_visual_get(int visual_id);
+Eina_Bool           _ecore_xcb_render_visual_supports_alpha(Ecore_X_Visual visual);
+uint32_t            _ecore_xcb_render_find_visual_id(int type,
+                                                     Eina_Bool check_alpha);
+Ecore_X_Visual     *_ecore_xcb_render_visual_get(int visual_id);
 
-void _ecore_xcb_randr_init(void);
-void _ecore_xcb_randr_finalize(void);
+void                _ecore_xcb_randr_init(void);
+void                _ecore_xcb_randr_finalize(void);
 
-void _ecore_xcb_xfixes_init(void);
-void _ecore_xcb_xfixes_finalize(void);
-Eina_Bool _ecore_xcb_xfixes_avail_get(void);
+void                _ecore_xcb_xfixes_init(void);
+void                _ecore_xcb_xfixes_finalize(void);
+Eina_Bool           _ecore_xcb_xfixes_avail_get(void);
 
-void _ecore_xcb_damage_init(void);
-void _ecore_xcb_damage_finalize(void);
+void                _ecore_xcb_damage_init(void);
+void                _ecore_xcb_damage_finalize(void);
 
-void _ecore_xcb_composite_init(void);
-void _ecore_xcb_composite_finalize(void);
+void                _ecore_xcb_composite_init(void);
+void                _ecore_xcb_composite_finalize(void);
 
-void _ecore_xcb_dpms_init(void);
-void _ecore_xcb_dpms_finalize(void);
+void                _ecore_xcb_dpms_init(void);
+void                _ecore_xcb_dpms_finalize(void);
 
-void _ecore_xcb_cursor_init(void);
-void _ecore_xcb_cursor_finalize(void);
+void                _ecore_xcb_cursor_init(void);
+void                _ecore_xcb_cursor_finalize(void);
 
-void _ecore_xcb_xinerama_init(void);
-void _ecore_xcb_xinerama_finalize(void);
+void                _ecore_xcb_xinerama_init(void);
+void                _ecore_xcb_xinerama_finalize(void);
 
-void _ecore_xcb_dnd_init(void);
-void _ecore_xcb_dnd_shutdown(void);
+void                _ecore_xcb_dnd_init(void);
+void                _ecore_xcb_dnd_shutdown(void);
 Ecore_X_DND_Source *_ecore_xcb_dnd_source_get(void);
 Ecore_X_DND_Target *_ecore_xcb_dnd_target_get(void);
-void _ecore_xcb_dnd_drag(Ecore_X_Window root, int x, int y);
-
-void _ecore_xcb_selection_init(void);
-void _ecore_xcb_selection_shutdown(void);
-void *_ecore_xcb_selection_parse(const char *target, void *data, int size, int format);
-char *_ecore_xcb_selection_target_get(Ecore_X_Atom target);
+void                _ecore_xcb_dnd_drag(Ecore_X_Window root,
+                                        int x,
+                                        int y);
+
+void  _ecore_xcb_selection_init(void);
+void  _ecore_xcb_selection_shutdown(void);
+void *_ecore_xcb_selection_parse(const char *target,
+                                 void *data,
+                                 int size,
+                                 int format);
+char                     *_ecore_xcb_selection_target_get(Ecore_X_Atom target);
 Ecore_X_Selection_Intern *_ecore_xcb_selection_get(Ecore_X_Atom selection);
 
 # ifdef HAVE_ICONV
-Eina_Bool _ecore_xcb_utf8_textlist_to_textproperty(char **list, int count, Ecore_Xcb_Encoding_Style style, Ecore_Xcb_Textproperty *ret);
+Eina_Bool _ecore_xcb_utf8_textlist_to_textproperty(char **list,
+                                                   int count,
+                                                   Ecore_Xcb_Encoding_Style style,
+                                                   Ecore_Xcb_Textproperty *ret);
 # endif
-Eina_Bool _ecore_xcb_mb_textlist_to_textproperty(char **list, int count, Ecore_Xcb_Encoding_Style style, Ecore_Xcb_Textproperty *ret);
-Eina_Bool _ecore_xcb_textlist_to_textproperty(const char *type, char **list, int count, Ecore_Xcb_Encoding_Style style, Ecore_Xcb_Textproperty *ret);
+Eina_Bool _ecore_xcb_mb_textlist_to_textproperty(char **list,
+                                                 int count,
+                                                 Ecore_Xcb_Encoding_Style style,
+                                                 Ecore_Xcb_Textproperty *ret);
+Eina_Bool _ecore_xcb_textlist_to_textproperty(const char *type,
+                                              char **list,
+                                              int count,
+                                              Ecore_Xcb_Encoding_Style style,
+                                              Ecore_Xcb_Textproperty *ret);
 
 # ifdef HAVE_ICONV
-Eina_Bool _ecore_xcb_utf8_textproperty_to_textlist(const Ecore_Xcb_Textproperty *text_prop, char ***list_ret, int *count_ret);
+Eina_Bool _ecore_xcb_utf8_textproperty_to_textlist(const Ecore_Xcb_Textproperty *text_prop,
+                                                   char ***list_ret,
+                                                   int *count_ret);
 # endif
-Eina_Bool _ecore_xcb_mb_textproperty_to_textlist(const Ecore_Xcb_Textproperty *text_prop, char ***list_ret, int *count_ret);
-Eina_Bool _ecore_xcb_textproperty_to_textlist(const Ecore_Xcb_Textproperty *text_prop, const char *type, char ***list_ret, int *count_ret);
-
-void _ecore_xcb_events_init(void);
-void _ecore_xcb_events_shutdown(void);
-void _ecore_xcb_events_handle(xcb_generic_event_t *ev);
+Eina_Bool _ecore_xcb_mb_textproperty_to_textlist(const Ecore_Xcb_Textproperty *text_prop,
+                                                 char ***list_ret,
+                                                 int *count_ret);
+Eina_Bool _ecore_xcb_textproperty_to_textlist(const Ecore_Xcb_Textproperty *text_prop,
+                                              const char *type,
+                                              char ***list_ret,
+                                              int *count_ret);
+
+void         _ecore_xcb_events_init(void);
+void         _ecore_xcb_events_shutdown(void);
+void         _ecore_xcb_events_handle(xcb_generic_event_t *ev);
 Ecore_X_Time _ecore_xcb_events_last_time_get(void);
 unsigned int _ecore_xcb_events_modifiers_get(unsigned int state);
-void _ecore_xcb_event_mouse_move(uint16_t timestamp, uint16_t modifiers, int16_t x, int16_t y, int16_t root_x, int16_t root_y, xcb_window_t event_win, xcb_window_t win, xcb_window_t root_win, uint8_t same_screen, int dev, double radx, double rady, double pressure, double angle, int16_t mx, int16_t my, int16_t mrx, int16_t mry);
-Ecore_Event_Mouse_Button *_ecore_xcb_event_mouse_button(int event, uint16_t timestamp, uint16_t modifiers, xcb_button_t buttons, int16_t x, int16_t y, int16_t root_x, int16_t root_y, xcb_window_t event_win, xcb_window_t win, xcb_window_t root_win, uint8_t same_screen, int dev, double radx, double rady, double pressure, double angle, int16_t mx, int16_t my, int16_t mrx, int16_t mry);
-
-void _ecore_xcb_keymap_init(void);
-void _ecore_xcb_keymap_finalize(void);
-void _ecore_xcb_keymap_shutdown(void);
-void _ecore_xcb_keymap_refresh(xcb_mapping_notify_event_t *event);
-xcb_keysym_t _ecore_xcb_keymap_keycode_to_keysym(xcb_keycode_t keycode, int col);
+void         _ecore_xcb_event_mouse_move(uint16_t timestamp,
+                                         uint16_t modifiers,
+                                         int16_t x,
+                                         int16_t y,
+                                         int16_t root_x,
+                                         int16_t root_y,
+                                         xcb_window_t event_win,
+                                         xcb_window_t win,
+                                         xcb_window_t root_win,
+                                         uint8_t same_screen,
+                                         int dev,
+                                         double radx,
+                                         double rady,
+                                         double pressure,
+                                         double angle,
+                                         int16_t mx,
+                                         int16_t my,
+                                         int16_t mrx,
+                                         int16_t mry);
+Ecore_Event_Mouse_Button *_ecore_xcb_event_mouse_button(int event,
+                                                        uint16_t timestamp,
+                                                        uint16_t modifiers,
+                                                        xcb_button_t buttons,
+                                                        int16_t x,
+                                                        int16_t y,
+                                                        int16_t root_x,
+                                                        int16_t root_y,
+                                                        xcb_window_t event_win,
+                                                        xcb_window_t win,
+                                                        xcb_window_t root_win,
+                                                        uint8_t same_screen,
+                                                        int dev,
+                                                        double radx,
+                                                        double rady,
+                                                        double pressure,
+                                                        double angle,
+                                                        int16_t mx,
+                                                        int16_t my,
+                                                        int16_t mrx,
+                                                        int16_t mry);
+
+void           _ecore_xcb_keymap_init(void);
+void           _ecore_xcb_keymap_finalize(void);
+void           _ecore_xcb_keymap_shutdown(void);
+void           _ecore_xcb_keymap_refresh(xcb_mapping_notify_event_t *event);
+xcb_keysym_t   _ecore_xcb_keymap_keycode_to_keysym(xcb_keycode_t keycode,
+                                                   int col);
 xcb_keycode_t *_ecore_xcb_keymap_keysym_to_keycode(xcb_keysym_t keysym);
-char *_ecore_xcb_keymap_keysym_to_string(xcb_keysym_t keysym);
-xcb_keycode_t _ecore_xcb_keymap_string_to_keycode(const char *key);
-int _ecore_xcb_keymap_lookup_string(xcb_keycode_t keycode, int state, char *buffer, int bytes, xcb_keysym_t *sym);
+char          *_ecore_xcb_keymap_keysym_to_string(xcb_keysym_t keysym);
+xcb_keycode_t  _ecore_xcb_keymap_string_to_keycode(const char *key);
+int            _ecore_xcb_keymap_lookup_string(xcb_keycode_t keycode,
+                                               int state,
+                                               char *buffer,
+                                               int bytes,
+                                               xcb_keysym_t *sym);
 
 void _ecore_xcb_input_init(void);
 void _ecore_xcb_input_finalize(void);
@@ -324,32 +398,48 @@ void _ecore_xcb_input_handle_event(xcb_generic_event_t *event);
 void _ecore_xcb_input_handle_event(xcb_generic_event_t *event __UNUSED__);
 # endif
 
-void _ecore_xcb_dri_init(void);
-void _ecore_xcb_dri_finalize(void);
+void           _ecore_xcb_dri_init(void);
+void           _ecore_xcb_dri_finalize(void);
 
-void _ecore_xcb_xtest_init(void);
-void _ecore_xcb_xtest_finalize(void);
+void           _ecore_xcb_xtest_init(void);
+void           _ecore_xcb_xtest_finalize(void);
 
 Ecore_X_Window _ecore_xcb_window_root_of_screen_get(int screen);
-void _ecore_xcb_window_prop_string_utf8_set(Ecore_X_Window win, Ecore_X_Atom atom, const char *str);
+void           _ecore_xcb_window_prop_string_utf8_set(Ecore_X_Window win,
+                                                      Ecore_X_Atom atom,
+                                                      const char *str);
 Ecore_X_Visual _ecore_xcb_window_visual_get(Ecore_X_Window win);
-void _ecore_xcb_window_button_grab_remove(Ecore_X_Window win);
-void _ecore_xcb_window_key_grab_remove(Ecore_X_Window win);
-void _ecore_xcb_window_grab_allow_events(Ecore_X_Window event_win, Ecore_X_Window child_win, int type, void *event, Ecore_X_Time timestamp);
-
-int _ecore_xcb_netwm_startup_info_begin(Ecore_X_Window win __UNUSED__, uint8_t data __UNUSED__);
-int _ecore_xcb_netwm_startup_info(Ecore_X_Window win __UNUSED__, uint8_t data __UNUSED__);
+void           _ecore_xcb_window_button_grab_remove(Ecore_X_Window win);
+void           _ecore_xcb_window_key_grab_remove(Ecore_X_Window win);
+void           _ecore_xcb_window_grab_allow_events(Ecore_X_Window event_win,
+                                                   Ecore_X_Window child_win,
+                                                   int type,
+                                                   void *event,
+                                                   Ecore_X_Time timestamp);
+
+int                  _ecore_xcb_netwm_startup_info_begin(Ecore_X_Window win __UNUSED__,
+                                                         uint8_t data __UNUSED__);
+int                  _ecore_xcb_netwm_startup_info(Ecore_X_Window win __UNUSED__,
+                                                   uint8_t data __UNUSED__);
 Ecore_X_Window_State _ecore_xcb_netwm_window_state_get(Ecore_X_Atom atom);
 
-int _ecore_xcb_error_handle(xcb_generic_error_t *err);
-int _ecore_xcb_io_error_handle(xcb_generic_error_t *err);
-
-xcb_image_t *_ecore_xcb_image_create_native(int w, int h, xcb_image_format_t format, uint8_t depth, void *base, uint32_t bytes, uint8_t *data);
-
-void _ecore_xcb_xdefaults_init(void);
-void _ecore_xcb_xdefaults_shutdown(void);
-char *_ecore_xcb_xdefaults_string_get(const char *prog, const char *param);
-int _ecore_xcb_xdefaults_int_get(const char *prog, const char *param);
+int                  _ecore_xcb_error_handle(xcb_generic_error_t *err);
+int                  _ecore_xcb_io_error_handle(xcb_generic_error_t *err);
+
+xcb_image_t         *_ecore_xcb_image_create_native(int w,
+                                                    int h,
+                                                    xcb_image_format_t format,
+                                                    uint8_t depth,
+                                                    void *base,
+                                                    uint32_t bytes,
+                                                    uint8_t *data);
+
+void  _ecore_xcb_xdefaults_init(void);
+void  _ecore_xcb_xdefaults_shutdown(void);
+char *_ecore_xcb_xdefaults_string_get(const char *prog,
+                                      const char *param);
+int   _ecore_xcb_xdefaults_int_get(const char *prog,
+                                   const char *param);
 
 void _ecore_xcb_modifiers_get(void);
 
index 55afb61..e767a5a 100644 (file)
@@ -1,5 +1,5 @@
 /* TODO: List of missing functions
- * 
+ *
  * ecore_x_randr_crtc_clone_set
  * ecore_x_randr_output_size_mm_get
  * ecore_x_randr_output_crtc_set
 #  include <xcb/randr.h>
 # endif
 
-#define Ecore_X_Randr_None 0
+#define Ecore_X_Randr_None  0
 #define Ecore_X_Randr_Unset -1
 
-#define RANDR_1_1 ((1 << 16) | 1)
-#define RANDR_1_2 ((1 << 16) | 2)
-#define RANDR_1_3 ((1 << 16) | 3)
+#define RANDR_1_1           ((1 << 16) | 1)
+#define RANDR_1_2           ((1 << 16) | 2)
+#define RANDR_1_3           ((1 << 16) | 3)
 
 #define RANDR_CHECK_1_1_RET(ret) if (_randr_version < RANDR_1_1) return ret
 #define RANDR_CHECK_1_2_RET(ret) if (_randr_version < RANDR_1_2) return ret
 #define RANDR_CHECK_1_3_RET(ret) if (_randr_version < RANDR_1_3) return ret
 
 /* local function prototypes */
-static Eina_Bool _ecore_xcb_randr_output_validate(Ecore_X_Window root, Ecore_X_Randr_Output output);
-static Eina_Bool _ecore_xcb_randr_crtc_validate(Ecore_X_Window root, Ecore_X_Randr_Crtc crtc);
-static Eina_Bool _ecore_xcb_randr_root_validate(Ecore_X_Window root);
-static int _ecore_xcb_randr_root_to_screen(Ecore_X_Window root);
-static xcb_randr_get_screen_resources_reply_t *_ecore_xcb_randr_12_get_resources(Ecore_X_Window win);
+static Eina_Bool                                       _ecore_xcb_randr_output_validate(Ecore_X_Window       root,
+                                                                                        Ecore_X_Randr_Output output);
+static Eina_Bool                                       _ecore_xcb_randr_crtc_validate(Ecore_X_Window     root,
+                                                                                      Ecore_X_Randr_Crtc crtc);
+static Eina_Bool                                       _ecore_xcb_randr_root_validate(Ecore_X_Window root);
+static int                                             _ecore_xcb_randr_root_to_screen(Ecore_X_Window root);
+static xcb_randr_get_screen_resources_reply_t         *_ecore_xcb_randr_12_get_resources(Ecore_X_Window win);
 static xcb_randr_get_screen_resources_current_reply_t *_ecore_xcb_randr_13_get_resources(Ecore_X_Window win);
-static xcb_timestamp_t _ecore_xcb_randr_12_get_resource_timestamp(Ecore_X_Window win);
-static xcb_timestamp_t _ecore_xcb_randr_13_get_resource_timestamp(Ecore_X_Window win);
-
-static Ecore_X_Randr_Mode *_ecore_xcb_randr_12_output_modes_get(Ecore_X_Window root, Ecore_X_Randr_Output output, int *num, int *npreferred);
-static Ecore_X_Randr_Mode *_ecore_xcb_randr_13_output_modes_get(Ecore_X_Window root, Ecore_X_Randr_Output output, int *num, int *npreferred);
-static Ecore_X_Randr_Mode_Info *_ecore_xcb_randr_12_mode_info_get(Ecore_X_Window root, Ecore_X_Randr_Mode mode);
-static Ecore_X_Randr_Mode_Info *_ecore_xcb_randr_13_mode_info_get(Ecore_X_Window root, Ecore_X_Randr_Mode mode);
-static Ecore_X_Randr_Mode_Info **_ecore_xcb_randr_12_modes_info_get(Ecore_X_Window root, int *num);
-static Ecore_X_Randr_Mode_Info **_ecore_xcb_randr_13_modes_info_get(Ecore_X_Window root, int *num);
-static void _ecore_xcb_randr_12_mode_size_get(Ecore_X_Window root, Ecore_X_Randr_Mode mode, int *w, int *h);
-static void _ecore_xcb_randr_13_mode_size_get(Ecore_X_Window root, Ecore_X_Randr_Mode mode, int *w, int *h);
-static Ecore_X_Randr_Output *_ecore_xcb_randr_12_output_clones_get(Ecore_X_Window root, Ecore_X_Randr_Output output, int *num);
-static Ecore_X_Randr_Output *_ecore_xcb_randr_13_output_clones_get(Ecore_X_Window root, Ecore_X_Randr_Output output, int *num);
-static Ecore_X_Randr_Crtc *_ecore_xcb_randr_12_output_possible_crtcs_get(Ecore_X_Window root, Ecore_X_Randr_Output output, int *num);
-static Ecore_X_Randr_Crtc *_ecore_xcb_randr_13_output_possible_crtcs_get(Ecore_X_Window root, Ecore_X_Randr_Output output, int *num);
-static char *_ecore_xcb_randr_12_output_name_get(Ecore_X_Window root, Ecore_X_Randr_Output output, int *len);
-static char *_ecore_xcb_randr_13_output_name_get(Ecore_X_Window root, Ecore_X_Randr_Output output, int *len);
-static Ecore_X_Randr_Connection_Status _ecore_xcb_randr_12_output_connection_status_get(Ecore_X_Window root, Ecore_X_Randr_Output output);
-static Ecore_X_Randr_Connection_Status _ecore_xcb_randr_13_output_connection_status_get(Ecore_X_Window root, Ecore_X_Randr_Output output);
-static Ecore_X_Randr_Output *_ecore_xcb_randr_12_outputs_get(Ecore_X_Window root, int *num);
-static Ecore_X_Randr_Output *_ecore_xcb_randr_13_outputs_get(Ecore_X_Window root, int *num);
-static Ecore_X_Randr_Crtc _ecore_xcb_randr_12_output_crtc_get(Ecore_X_Window root, Ecore_X_Randr_Output output);
-static Ecore_X_Randr_Crtc _ecore_xcb_randr_13_output_crtc_get(Ecore_X_Window root, Ecore_X_Randr_Output output);
+static xcb_timestamp_t                                 _ecore_xcb_randr_12_get_resource_timestamp(Ecore_X_Window win);
+static xcb_timestamp_t                                 _ecore_xcb_randr_13_get_resource_timestamp(Ecore_X_Window win);
+
+static Ecore_X_Randr_Mode                             *_ecore_xcb_randr_12_output_modes_get(Ecore_X_Window       root,
+                                                                                            Ecore_X_Randr_Output output,
+                                                                                            int                 *num,
+                                                                                            int                 *npreferred);
+static Ecore_X_Randr_Mode *_ecore_xcb_randr_13_output_modes_get(Ecore_X_Window       root,
+                                                                Ecore_X_Randr_Output output,
+                                                                int                 *num,
+                                                                int                 *npreferred);
+static Ecore_X_Randr_Mode_Info  *_ecore_xcb_randr_12_mode_info_get(Ecore_X_Window     root,
+                                                                   Ecore_X_Randr_Mode mode);
+static Ecore_X_Randr_Mode_Info  *_ecore_xcb_randr_13_mode_info_get(Ecore_X_Window     root,
+                                                                   Ecore_X_Randr_Mode mode);
+static Ecore_X_Randr_Mode_Info **_ecore_xcb_randr_12_modes_info_get(Ecore_X_Window root,
+                                                                    int           *num);
+static Ecore_X_Randr_Mode_Info **_ecore_xcb_randr_13_modes_info_get(Ecore_X_Window root,
+                                                                    int           *num);
+static void                      _ecore_xcb_randr_12_mode_size_get(Ecore_X_Window     root,
+                                                                   Ecore_X_Randr_Mode mode,
+                                                                   int               *w,
+                                                                   int               *h);
+static void _ecore_xcb_randr_13_mode_size_get(Ecore_X_Window     root,
+                                              Ecore_X_Randr_Mode mode,
+                                              int               *w,
+                                              int               *h);
+static Ecore_X_Randr_Output *_ecore_xcb_randr_12_output_clones_get(Ecore_X_Window       root,
+                                                                   Ecore_X_Randr_Output output,
+                                                                   int                 *num);
+static Ecore_X_Randr_Output *_ecore_xcb_randr_13_output_clones_get(Ecore_X_Window       root,
+                                                                   Ecore_X_Randr_Output output,
+                                                                   int                 *num);
+static Ecore_X_Randr_Crtc *_ecore_xcb_randr_12_output_possible_crtcs_get(Ecore_X_Window       root,
+                                                                         Ecore_X_Randr_Output output,
+                                                                         int                 *num);
+static Ecore_X_Randr_Crtc *_ecore_xcb_randr_13_output_possible_crtcs_get(Ecore_X_Window       root,
+                                                                         Ecore_X_Randr_Output output,
+                                                                         int                 *num);
+static char *_ecore_xcb_randr_12_output_name_get(Ecore_X_Window       root,
+                                                 Ecore_X_Randr_Output output,
+                                                 int                 *len);
+static char *_ecore_xcb_randr_13_output_name_get(Ecore_X_Window       root,
+                                                 Ecore_X_Randr_Output output,
+                                                 int                 *len);
+static Ecore_X_Randr_Connection_Status _ecore_xcb_randr_12_output_connection_status_get(Ecore_X_Window       root,
+                                                                                        Ecore_X_Randr_Output output);
+static Ecore_X_Randr_Connection_Status _ecore_xcb_randr_13_output_connection_status_get(Ecore_X_Window       root,
+                                                                                        Ecore_X_Randr_Output output);
+static Ecore_X_Randr_Output           *_ecore_xcb_randr_12_outputs_get(Ecore_X_Window root,
+                                                                       int           *num);
+static Ecore_X_Randr_Output           *_ecore_xcb_randr_13_outputs_get(Ecore_X_Window root,
+                                                                       int           *num);
+static Ecore_X_Randr_Crtc              _ecore_xcb_randr_12_output_crtc_get(Ecore_X_Window       root,
+                                                                           Ecore_X_Randr_Output output);
+static Ecore_X_Randr_Crtc              _ecore_xcb_randr_13_output_crtc_get(Ecore_X_Window       root,
+                                                                           Ecore_X_Randr_Output output);
 
 /* local variables */
 static Eina_Bool _randr_avail = EINA_FALSE;
@@ -93,8 +129,8 @@ static int _randr_version = -1;
 /* external variables */
 int _ecore_xcb_event_randr = -1;
 
-void 
-_ecore_xcb_randr_init(void) 
+void
+_ecore_xcb_randr_init(void)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
 
@@ -103,8 +139,8 @@ _ecore_xcb_randr_init(void)
 #endif
 }
 
-void 
-_ecore_xcb_randr_finalize(void) 
+void
+_ecore_xcb_randr_finalize(void)
 {
 #ifdef ECORE_XCB_RANDR
    const xcb_query_extension_reply_t *ext_reply;
@@ -114,23 +150,23 @@ _ecore_xcb_randr_finalize(void)
 
 #ifdef ECORE_XCB_RANDR
    ext_reply = xcb_get_extension_data(_ecore_xcb_conn, &xcb_randr_id);
-   if ((ext_reply) && (ext_reply->present)) 
+   if ((ext_reply) && (ext_reply->present))
      {
         xcb_randr_query_version_cookie_t cookie;
         xcb_randr_query_version_reply_t *reply;
 
-        cookie = 
-          xcb_randr_query_version_unchecked(_ecore_xcb_conn, 
-                                            XCB_RANDR_MAJOR_VERSION, 
+        cookie =
+          xcb_randr_query_version_unchecked(_ecore_xcb_conn,
+                                            XCB_RANDR_MAJOR_VERSION,
                                             XCB_RANDR_MINOR_VERSION);
         reply = xcb_randr_query_version_reply(_ecore_xcb_conn, cookie, NULL);
-        if (reply) 
+        if (reply)
           {
-             if ((reply->major_version >= XCB_RANDR_MAJOR_VERSION) && 
+             if ((reply->major_version >= XCB_RANDR_MAJOR_VERSION) &&
                  (reply->minor_version >= XCB_RANDR_MINOR_VERSION))
                _randr_avail = EINA_TRUE;
 
-             _randr_version = 
+             _randr_version =
                ((reply->major_version << 16) | reply->minor_version);
 
              free(reply);
@@ -142,13 +178,13 @@ _ecore_xcb_randr_finalize(void)
 #endif
 }
 
-static Eina_Bool 
-_ecore_xcb_randr_root_validate(Ecore_X_Window root) 
+static Eina_Bool
+_ecore_xcb_randr_root_validate(Ecore_X_Window root)
 {
 #ifdef ECORE_XCB_RANDR
    Ecore_X_Randr_Screen scr = -1;
 # define RANDR_VALIDATE_ROOT(screen, root) \
-   ((screen == _ecore_xcb_randr_root_to_screen(root)) != -1)
+  ((screen == _ecore_xcb_randr_root_to_screen(root)) != -1)
 #endif
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
@@ -161,8 +197,8 @@ _ecore_xcb_randr_root_validate(Ecore_X_Window root)
    return EINA_FALSE;
 }
 
-static int 
-_ecore_xcb_randr_root_to_screen(Ecore_X_Window root) 
+static int
+_ecore_xcb_randr_root_to_screen(Ecore_X_Window root)
 {
    int count = 0, num = 0;
 
@@ -170,7 +206,7 @@ _ecore_xcb_randr_root_to_screen(Ecore_X_Window root)
 
    count = xcb_setup_roots_length(xcb_get_setup(_ecore_xcb_conn));
    for (num = 0; num < count; num++)
-     if (_ecore_xcb_window_root_of_screen_get(num) == root) 
+     if (_ecore_xcb_window_root_of_screen_get(num) == root)
        return num;
 
    return -1;
@@ -182,8 +218,8 @@ _ecore_xcb_randr_root_to_screen(Ecore_X_Window root)
  * @brief query whether randr is available or not
  * @return EINA_TRUE, if extension is available, else EINA_FALSE
  */
-EAPI Eina_Bool 
-ecore_x_randr_query(void) 
+EAPI Eina_Bool
+ecore_x_randr_query(void)
 {
    return _randr_avail;
 }
@@ -193,8 +229,8 @@ ecore_x_randr_query(void)
  * in case RandRR extension is not available, Ecore_X_Randr_Unset (=-1).
  * bit version information: 31   MAJOR   16 | 15   MINOR   0
  */
-EAPI int 
-ecore_x_randr_version_get(void) 
+EAPI int
+ecore_x_randr_version_get(void)
 {
    return _randr_version;
 }
@@ -202,8 +238,8 @@ ecore_x_randr_version_get(void)
 /*
  * @param root window which's primary output will be queried
  */
-EAPI Ecore_X_Randr_Orientation 
-ecore_x_randr_screen_primary_output_orientations_get(Ecore_X_Window root) 
+EAPI Ecore_X_Randr_Orientation
+ecore_x_randr_screen_primary_output_orientations_get(Ecore_X_Window root)
 {
    int ret = Ecore_X_Randr_None;
 #ifdef ECORE_XCB_RANDR
@@ -217,7 +253,7 @@ ecore_x_randr_screen_primary_output_orientations_get(Ecore_X_Window root)
 #ifdef ECORE_XCB_RANDR
    cookie = xcb_randr_get_screen_info_unchecked(_ecore_xcb_conn, root);
    reply = xcb_randr_get_screen_info_reply(_ecore_xcb_conn, cookie, NULL);
-   if (reply) 
+   if (reply)
      {
         ret = reply->rotations;
         free(reply);
@@ -231,8 +267,8 @@ ecore_x_randr_screen_primary_output_orientations_get(Ecore_X_Window root)
  * @param root window which's primary output will be queried
  * @return the current orientation of the root window's screen primary output
  */
-EAPI Ecore_X_Randr_Orientation 
-ecore_x_randr_screen_primary_output_orientation_get(Ecore_X_Window root) 
+EAPI Ecore_X_Randr_Orientation
+ecore_x_randr_screen_primary_output_orientation_get(Ecore_X_Window root)
 {
    int ret = Ecore_X_Randr_None;
 #ifdef ECORE_XCB_RANDR
@@ -246,7 +282,7 @@ ecore_x_randr_screen_primary_output_orientation_get(Ecore_X_Window root)
 #ifdef ECORE_XCB_RANDR
    cookie = xcb_randr_get_screen_info_unchecked(_ecore_xcb_conn, root);
    reply = xcb_randr_get_screen_info_reply(_ecore_xcb_conn, cookie, NULL);
-   if (reply) 
+   if (reply)
      {
         ret = reply->rotation;
         free(reply);
@@ -262,8 +298,9 @@ ecore_x_randr_screen_primary_output_orientation_get(Ecore_X_Window root)
  * @param orientation orientation which should be set for the root window's screen primary output
  * @return EINA_TRUE if the primary output's orientation could be successfully altered
  */
-EAPI Eina_Bool 
-ecore_x_randr_screen_primary_output_orientation_set(Ecore_X_Window root, Ecore_X_Randr_Orientation orientation) 
+EAPI Eina_Bool
+ecore_x_randr_screen_primary_output_orientation_set(Ecore_X_Window            root,
+                                                    Ecore_X_Randr_Orientation orientation)
 {
    int ret = EINA_FALSE;
 #ifdef ECORE_XCB_RANDR
@@ -277,24 +314,24 @@ ecore_x_randr_screen_primary_output_orientation_set(Ecore_X_Window root, Ecore_X
 #ifdef ECORE_XCB_RANDR
    cookie = xcb_randr_get_screen_info_unchecked(_ecore_xcb_conn, root);
    reply = xcb_randr_get_screen_info_reply(_ecore_xcb_conn, cookie, NULL);
-   if (reply) 
+   if (reply)
      {
         xcb_randr_set_screen_config_cookie_t scookie;
         xcb_randr_set_screen_config_reply_t *sreply;
 
-        scookie = 
-          xcb_randr_set_screen_config_unchecked(_ecore_xcb_conn, root, 
-                                                XCB_CURRENT_TIME, 
-                                                reply->config_timestamp, 
-                                                reply->sizeID, orientation, 
+        scookie =
+          xcb_randr_set_screen_config_unchecked(_ecore_xcb_conn, root,
+                                                XCB_CURRENT_TIME,
+                                                reply->config_timestamp,
+                                                reply->sizeID, orientation,
                                                 reply->rate);
-        sreply = 
+        sreply =
           xcb_randr_set_screen_config_reply(_ecore_xcb_conn, scookie, NULL);
-        if (!sreply) 
+        if (!sreply)
           ret = EINA_FALSE;
-        else 
+        else
           {
-             ret = (sreply->status == XCB_RANDR_SET_CONFIG_SUCCESS) ? 
+             ret = (sreply->status == XCB_RANDR_SET_CONFIG_SUCCESS) ?
                EINA_TRUE : EINA_FALSE;
              free(sreply);
           }
@@ -312,7 +349,8 @@ ecore_x_randr_screen_primary_output_orientation_set(Ecore_X_Window root, Ecore_X
  * @return an array of sizes reported as supported by the screen's primary output or - if query failed - NULL
  */
 EAPI Ecore_X_Randr_Screen_Size_MM *
-ecore_x_randr_screen_primary_output_sizes_get(Ecore_X_Window root, int *num) 
+ecore_x_randr_screen_primary_output_sizes_get(Ecore_X_Window root,
+                                              int           *num)
 {
 #ifdef ECORE_XCB_RANDR
    xcb_randr_get_screen_info_cookie_t cookie;
@@ -326,26 +364,26 @@ ecore_x_randr_screen_primary_output_sizes_get(Ecore_X_Window root, int *num)
 #ifdef ECORE_XCB_RANDR
    cookie = xcb_randr_get_screen_info_unchecked(_ecore_xcb_conn, root);
    reply = xcb_randr_get_screen_info_reply(_ecore_xcb_conn, cookie, NULL);
-   if (reply) 
+   if (reply)
      {
         int len = 0, i = 0;
         xcb_randr_screen_size_t *sizes;
 
         len = xcb_randr_get_screen_info_sizes_length(reply);
         sizes = xcb_randr_get_screen_info_sizes(reply);
-        if ((!sizes) || (len <= 0)) 
+        if ((!sizes) || (len <= 0))
           {
              free(reply);
              return NULL;
           }
         if (num) *num = len;
         ret = calloc(len, sizeof(Ecore_X_Randr_Screen_Size_MM));
-        if (!ret) 
+        if (!ret)
           {
              free(reply);
              return NULL;
           }
-        for (i = 0; i < len; i++) 
+        for (i = 0; i < len; i++)
           {
              ret[i].width = sizes[i].width;
              ret[i].height = sizes[i].height;
@@ -371,8 +409,13 @@ ecore_x_randr_screen_primary_output_sizes_get(Ecore_X_Window root, int *num)
  * @param h_mm the current size's height in mm
  * @param size_index of current set size to be used with ecore_x_randr_primary_output_size_set()
  */
-EAPI void 
-ecore_x_randr_screen_primary_output_current_size_get(Ecore_X_Window root, int *w, int *h, int *w_mm, int *h_mm, int *size_index) 
+EAPI void
+ecore_x_randr_screen_primary_output_current_size_get(Ecore_X_Window root,
+                                                     int           *w,
+                                                     int           *h,
+                                                     int           *w_mm,
+                                                     int           *h_mm,
+                                                     int           *size_index)
 {
 #ifdef ECORE_XCB_RANDR
    xcb_randr_get_screen_info_cookie_t cookie;
@@ -385,20 +428,20 @@ ecore_x_randr_screen_primary_output_current_size_get(Ecore_X_Window root, int *w
 #ifdef ECORE_XCB_RANDR
    cookie = xcb_randr_get_screen_info_unchecked(_ecore_xcb_conn, root);
    reply = xcb_randr_get_screen_info_reply(_ecore_xcb_conn, cookie, NULL);
-   if (reply) 
+   if (reply)
      {
         int len = 0, idx = 0;
         xcb_randr_screen_size_t *sizes;
 
         len = xcb_randr_get_screen_info_sizes_length(reply);
         sizes = xcb_randr_get_screen_info_sizes(reply);
-        if ((!sizes) || (len <= 0)) 
+        if ((!sizes) || (len <= 0))
           {
              free(reply);
              return;
           }
         idx = reply->sizeID;
-        if ((idx < len) && (idx >= 0)) 
+        if ((idx < len) && (idx >= 0))
           {
              if (w) *w = sizes[idx].width;
              if (h) *h = sizes[idx].height;
@@ -418,8 +461,9 @@ ecore_x_randr_screen_primary_output_current_size_get(Ecore_X_Window root, int *w
  * @param size_index within the list of sizes reported as supported by the root window's screen primary output
  * @return EINA_TRUE on success, EINA_FALSE on failure due to e.g. invalid times
  */
-EAPI Eina_Bool 
-ecore_x_randr_screen_primary_output_size_set(Ecore_X_Window root, int size_index) 
+EAPI Eina_Bool
+ecore_x_randr_screen_primary_output_size_set(Ecore_X_Window root,
+                                             int            size_index)
 {
    Eina_Bool ret = EINA_FALSE;
 #ifdef ECORE_XCB_RANDR
@@ -436,36 +480,36 @@ ecore_x_randr_screen_primary_output_size_set(Ecore_X_Window root, int size_index
 
    cookie = xcb_randr_get_screen_info_unchecked(_ecore_xcb_conn, root);
    reply = xcb_randr_get_screen_info_reply(_ecore_xcb_conn, cookie, NULL);
-   if (reply) 
+   if (reply)
      {
         int len = 0;
 
         len = xcb_randr_get_screen_info_sizes_length(reply);
-        if (len <= 0) 
+        if (len <= 0)
           {
              free(reply);
              return EINA_FALSE;
           }
-        if ((size_index < len) && (size_index >= 0)) 
+        if ((size_index < len) && (size_index >= 0))
           {
              xcb_randr_set_screen_config_cookie_t scookie;
              xcb_randr_set_screen_config_reply_t *sreply;
 
-             scookie = 
-               xcb_randr_set_screen_config_unchecked(_ecore_xcb_conn, root, 
-                                                     XCB_CURRENT_TIME, 
-                                                     reply->config_timestamp, 
-                                                     size_index, 
-                                                     reply->rotation, 
+             scookie =
+               xcb_randr_set_screen_config_unchecked(_ecore_xcb_conn, root,
+                                                     XCB_CURRENT_TIME,
+                                                     reply->config_timestamp,
+                                                     size_index,
+                                                     reply->rotation,
                                                      reply->rate);
-             sreply = 
-               xcb_randr_set_screen_config_reply(_ecore_xcb_conn, 
+             sreply =
+               xcb_randr_set_screen_config_reply(_ecore_xcb_conn,
                                                  scookie, NULL);
-             if (!sreply) 
+             if (!sreply)
                ret = EINA_FALSE;
-             else 
+             else
                {
-                  ret = (sreply->status == XCB_RANDR_SET_CONFIG_SUCCESS) ? 
+                  ret = (sreply->status == XCB_RANDR_SET_CONFIG_SUCCESS) ?
                     EINA_TRUE : EINA_FALSE;
                   free(sreply);
                }
@@ -481,8 +525,8 @@ ecore_x_randr_screen_primary_output_size_set(Ecore_X_Window root, int size_index
  * @param root window which's primary output will be queried
  * @return currently used refresh rate or - if request failed or RandRR is not available - 0.0
  */
-EAPI Ecore_X_Randr_Refresh_Rate 
-ecore_x_randr_screen_primary_output_current_refresh_rate_get(Ecore_X_Window root) 
+EAPI Ecore_X_Randr_Refresh_Rate
+ecore_x_randr_screen_primary_output_current_refresh_rate_get(Ecore_X_Window root)
 {
 #ifdef ECORE_XCB_RANDR
    xcb_randr_get_screen_info_cookie_t cookie;
@@ -498,7 +542,7 @@ ecore_x_randr_screen_primary_output_current_refresh_rate_get(Ecore_X_Window root
 
    cookie = xcb_randr_get_screen_info_unchecked(_ecore_xcb_conn, root);
    reply = xcb_randr_get_screen_info_reply(_ecore_xcb_conn, cookie, NULL);
-   if (reply) 
+   if (reply)
      {
         ret = reply->rate;
         free(reply);
@@ -516,7 +560,9 @@ ecore_x_randr_screen_primary_output_current_refresh_rate_get(Ecore_X_Window root
  * @return currently used refresh rate or - if request failed or RandRR is not available - NULL
  */
 EAPI Ecore_X_Randr_Refresh_Rate *
-ecore_x_randr_screen_primary_output_refresh_rates_get(Ecore_X_Window root, int size_index, int *num) 
+ecore_x_randr_screen_primary_output_refresh_rates_get(Ecore_X_Window root,
+                                                      int            size_index,
+                                                      int           *num)
 {
 #ifdef ECORE_XCB_RANDR
    xcb_randr_get_screen_info_cookie_t cookie;
@@ -532,7 +578,7 @@ ecore_x_randr_screen_primary_output_refresh_rates_get(Ecore_X_Window root, int s
 
    cookie = xcb_randr_get_screen_info_unchecked(_ecore_xcb_conn, root);
    reply = xcb_randr_get_screen_info_reply(_ecore_xcb_conn, cookie, NULL);
-   if (reply) 
+   if (reply)
      {
         int len = 0;
 
@@ -540,7 +586,7 @@ ecore_x_randr_screen_primary_output_refresh_rates_get(Ecore_X_Window root, int s
         if (num) *num = len;
 
         ret = malloc(sizeof(Ecore_X_Randr_Refresh_Rate) * len);
-        if (ret) 
+        if (ret)
           {
              xcb_randr_refresh_rates_iterator_t iter;
              int i = 0;
@@ -549,7 +595,7 @@ ecore_x_randr_screen_primary_output_refresh_rates_get(Ecore_X_Window root, int s
              while (i++ < size_index)
                xcb_randr_refresh_rates_next(&iter);
 
-             memcpy(ret, xcb_randr_refresh_rates_rates(iter.data), 
+             memcpy(ret, xcb_randr_refresh_rates_rates(iter.data),
                     sizeof(Ecore_X_Randr_Refresh_Rate) * len);
           }
         free(reply);
@@ -568,8 +614,10 @@ ecore_x_randr_screen_primary_output_refresh_rates_get(Ecore_X_Window root, int s
  * @param rate the refresh rate to be set
  * @return EINA_TRUE on success else EINA_FALSE
  */
-EAPI Eina_Bool 
-ecore_x_randr_screen_primary_output_refresh_rate_set(Ecore_X_Window root, int size_index, Ecore_X_Randr_Refresh_Rate rate) 
+EAPI Eina_Bool
+ecore_x_randr_screen_primary_output_refresh_rate_set(Ecore_X_Window             root,
+                                                     int                        size_index,
+                                                     Ecore_X_Randr_Refresh_Rate rate)
 {
    Eina_Bool ret = EINA_FALSE;
 #ifdef ECORE_XCB_RANDR
@@ -585,25 +633,25 @@ ecore_x_randr_screen_primary_output_refresh_rate_set(Ecore_X_Window root, int si
 
    cookie = xcb_randr_get_screen_info_unchecked(_ecore_xcb_conn, root);
    reply = xcb_randr_get_screen_info_reply(_ecore_xcb_conn, cookie, NULL);
-   if (reply) 
+   if (reply)
      {
         xcb_randr_set_screen_config_cookie_t scookie;
         xcb_randr_set_screen_config_reply_t *sreply;
 
-        scookie = 
-          xcb_randr_set_screen_config_unchecked(_ecore_xcb_conn, root, 
-                                                XCB_CURRENT_TIME, 
-                                                reply->config_timestamp, 
-                                                size_index, 
+        scookie =
+          xcb_randr_set_screen_config_unchecked(_ecore_xcb_conn, root,
+                                                XCB_CURRENT_TIME,
+                                                reply->config_timestamp,
+                                                size_index,
                                                 reply->rotation, rate);
-        sreply = 
-          xcb_randr_set_screen_config_reply(_ecore_xcb_conn, 
+        sreply =
+          xcb_randr_set_screen_config_reply(_ecore_xcb_conn,
                                             scookie, NULL);
-        if (!sreply) 
+        if (!sreply)
           ret = EINA_FALSE;
-        else 
+        else
           {
-             ret = (sreply->status == XCB_RANDR_SET_CONFIG_SUCCESS) ? 
+             ret = (sreply->status == XCB_RANDR_SET_CONFIG_SUCCESS) ?
                EINA_TRUE : EINA_FALSE;
              free(sreply);
           }
@@ -619,8 +667,8 @@ ecore_x_randr_screen_primary_output_refresh_rate_set(Ecore_X_Window root, int si
  * NULL after freeing the memory.
  * @param mode_info the mode information that should be freed
  */
-EAPI void 
-ecore_x_randr_mode_info_free(Ecore_X_Randr_Mode_Info *mode_info) 
+EAPI void
+ecore_x_randr_mode_info_free(Ecore_X_Randr_Mode_Info *mode_info)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    CHECK_XCB_CONN;
@@ -638,8 +686,8 @@ ecore_x_randr_mode_info_free(Ecore_X_Randr_Mode_Info *mode_info)
  * @param root window which's screen should be queried
  * @return Ecore_X_Randr_Ouptut_Id or - if query failed or none is set - Ecore_X_Randr_None
  */
-EAPI Ecore_X_Randr_Output 
-ecore_x_randr_primary_output_get(Ecore_X_Window root) 
+EAPI Ecore_X_Randr_Output
+ecore_x_randr_primary_output_get(Ecore_X_Window root)
 {
    Ecore_X_Randr_Output ret = Ecore_X_Randr_None;
 #ifdef ECORE_XCB_RANDR
@@ -658,7 +706,7 @@ ecore_x_randr_primary_output_get(Ecore_X_Window root)
 
    cookie = xcb_randr_get_output_primary_unchecked(_ecore_xcb_conn, root);
    reply = xcb_randr_get_output_primary_reply(_ecore_xcb_conn, cookie, NULL);
-   if (reply) 
+   if (reply)
      {
         ret = reply->output;
         free(reply);
@@ -671,8 +719,9 @@ ecore_x_randr_primary_output_get(Ecore_X_Window root)
  * @param root window which's screen should be queried
  * @param output that should be set as given root window's screen primary output
  */
-EAPI void 
-ecore_x_randr_primary_output_set(Ecore_X_Window root, Ecore_X_Randr_Output output) 
+EAPI void
+ecore_x_randr_primary_output_set(Ecore_X_Window       root,
+                                 Ecore_X_Randr_Output output)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    CHECK_XCB_CONN;
@@ -680,13 +729,16 @@ ecore_x_randr_primary_output_set(Ecore_X_Window root, Ecore_X_Randr_Output outpu
 #ifdef ECORE_XCB_RANDR
    RANDR_CHECK_1_3_RET();
 
-   if ((output) && (_ecore_xcb_randr_root_validate(root))) 
+   if ((output) && (_ecore_xcb_randr_root_validate(root)))
      xcb_randr_set_output_primary(_ecore_xcb_conn, root, output);
 #endif
 }
 
 EAPI Ecore_X_Randr_Mode *
-ecore_x_randr_output_modes_get(Ecore_X_Window root, Ecore_X_Randr_Output output, int *num, int *npreferred) 
+ecore_x_randr_output_modes_get(Ecore_X_Window       root,
+                               Ecore_X_Randr_Output output,
+                               int                 *num,
+                               int                 *npreferred)
 {
    Ecore_X_Randr_Mode *modes = NULL;
 
@@ -696,14 +748,14 @@ ecore_x_randr_output_modes_get(Ecore_X_Window root, Ecore_X_Randr_Output output,
 #ifdef ECORE_XCB_RANDR
    RANDR_CHECK_1_2_RET(NULL);
 
-   if (_randr_version >= RANDR_1_3) 
+   if (_randr_version >= RANDR_1_3)
      {
-        modes = 
+        modes =
           _ecore_xcb_randr_13_output_modes_get(root, output, num, npreferred);
      }
-   else if (_randr_version == RANDR_1_2) 
+   else if (_randr_version == RANDR_1_2)
      {
-        modes = 
+        modes =
           _ecore_xcb_randr_12_output_modes_get(root, output, num, npreferred);
      }
 #endif
@@ -718,7 +770,8 @@ ecore_x_randr_output_modes_get(Ecore_X_Window root, Ecore_X_Randr_Output output,
  * @return mode's detailed information
  */
 EAPI Ecore_X_Randr_Mode_Info *
-ecore_x_randr_mode_info_get(Ecore_X_Window root, Ecore_X_Randr_Mode mode) 
+ecore_x_randr_mode_info_get(Ecore_X_Window     root,
+                            Ecore_X_Randr_Mode mode)
 {
    Ecore_X_Randr_Mode_Info *ret = NULL;
 
@@ -730,9 +783,9 @@ ecore_x_randr_mode_info_get(Ecore_X_Window root, Ecore_X_Randr_Mode mode)
 
    if (!_ecore_xcb_randr_root_validate(root)) return NULL;
 
-   if (_randr_version >= RANDR_1_3) 
+   if (_randr_version >= RANDR_1_3)
      ret = _ecore_xcb_randr_13_mode_info_get(root, mode);
-   else if (_randr_version == RANDR_1_2) 
+   else if (_randr_version == RANDR_1_2)
      ret = _ecore_xcb_randr_12_mode_info_get(root, mode);
 #endif
    return ret;
@@ -745,7 +798,8 @@ ecore_x_randr_mode_info_get(Ecore_X_Window root, Ecore_X_Randr_Mode mode)
  * @return modes' information
  */
 EAPI Ecore_X_Randr_Mode_Info **
-ecore_x_randr_modes_info_get(Ecore_X_Window root, int *num) 
+ecore_x_randr_modes_info_get(Ecore_X_Window root,
+                             int           *num)
 {
    Ecore_X_Randr_Mode_Info **ret = NULL;
 
@@ -759,9 +813,9 @@ ecore_x_randr_modes_info_get(Ecore_X_Window root, int *num)
 
    if (!_ecore_xcb_randr_root_validate(root)) return NULL;
 
-   if (_randr_version >= RANDR_1_3) 
+   if (_randr_version >= RANDR_1_3)
      ret = _ecore_xcb_randr_13_modes_info_get(root, num);
-   else if (_randr_version == RANDR_1_2) 
+   else if (_randr_version == RANDR_1_2)
      ret = _ecore_xcb_randr_12_modes_info_get(root, num);
 #endif
    return ret;
@@ -773,8 +827,11 @@ ecore_x_randr_modes_info_get(Ecore_X_Window root, int *num)
  * @param w width of given mode in px
  * @param h height of given mode in px
  */
-EAPI void 
-ecore_x_randr_mode_size_get(Ecore_X_Window root, Ecore_X_Randr_Mode mode, int *w, int *h) 
+EAPI void
+ecore_x_randr_mode_size_get(Ecore_X_Window     root,
+                            Ecore_X_Randr_Mode mode,
+                            int               *w,
+                            int               *h)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    CHECK_XCB_CONN;
@@ -784,9 +841,9 @@ ecore_x_randr_mode_size_get(Ecore_X_Window root, Ecore_X_Randr_Mode mode, int *w
 
    if (mode == Ecore_X_Randr_None) return;
 
-   if (_randr_version >= RANDR_1_3) 
+   if (_randr_version >= RANDR_1_3)
      _ecore_xcb_randr_13_mode_size_get(root, mode, w, h);
-   else if (_randr_version == RANDR_1_2) 
+   else if (_randr_version == RANDR_1_2)
      _ecore_xcb_randr_12_mode_size_get(root, mode, w, h);
 #endif
 }
@@ -800,7 +857,9 @@ ecore_x_randr_mode_size_get(Ecore_X_Window root, Ecore_X_Randr_Mode mode, int *w
  * @param length length of the byte-array. If NULL, request will fail.
  */
 EAPI unsigned char *
-ecore_x_randr_output_edid_get(Ecore_X_Window root, Ecore_X_Randr_Output output, unsigned long *length) 
+ecore_x_randr_output_edid_get(Ecore_X_Window       root,
+                              Ecore_X_Randr_Output output,
+                              unsigned long       *length)
 {
    unsigned char *ret = NULL;
 #ifdef ECORE_XCB_RANDR
@@ -819,20 +878,20 @@ ecore_x_randr_output_edid_get(Ecore_X_Window root, Ecore_X_Randr_Output output,
      return NULL;
 
    atom = ecore_x_atom_get("EDID");
-   cookie = 
-     xcb_randr_get_output_property_unchecked(_ecore_xcb_conn, output, atom, 
-                                             XCB_GET_PROPERTY_TYPE_ANY, 
+   cookie =
+     xcb_randr_get_output_property_unchecked(_ecore_xcb_conn, output, atom,
+                                             XCB_GET_PROPERTY_TYPE_ANY,
                                              0, 100, 0, 0);
-   reply = 
+   reply =
      xcb_randr_get_output_property_reply(_ecore_xcb_conn, cookie, NULL);
-   if (reply) 
+   if (reply)
      {
-        if ((reply->type == XCB_ATOM_INTEGER) && (reply->format == 8)) 
+        if ((reply->type == XCB_ATOM_INTEGER) && (reply->format == 8))
           {
              if (length) *length = reply->num_items;
-             if ((ret = malloc(reply->num_items * sizeof(unsigned char)))) 
+             if ((ret = malloc(reply->num_items * sizeof(unsigned char))))
                {
-                  memcpy(ret, xcb_randr_get_output_property_data(reply), 
+                  memcpy(ret, xcb_randr_get_output_property_data(reply),
                          (reply->num_items * sizeof(unsigned char)));
                }
           }
@@ -850,7 +909,9 @@ ecore_x_randr_output_edid_get(Ecore_X_Window root, Ecore_X_Randr_Output output,
  * @param num number of possible clones
  */
 EAPI Ecore_X_Randr_Output *
-ecore_x_randr_output_clones_get(Ecore_X_Window root, Ecore_X_Randr_Output output, int *num) 
+ecore_x_randr_output_clones_get(Ecore_X_Window       root,
+                                Ecore_X_Randr_Output output,
+                                int                 *num)
 {
    Ecore_X_Randr_Output *outputs = NULL;
 
@@ -862,16 +923,18 @@ ecore_x_randr_output_clones_get(Ecore_X_Window root, Ecore_X_Randr_Output output
 
    if (output == Ecore_X_Randr_None) return NULL;
 
-   if (_randr_version >= RANDR_1_3) 
+   if (_randr_version >= RANDR_1_3)
      outputs = _ecore_xcb_randr_13_output_clones_get(root, output, num);
-   else if (_randr_version == RANDR_1_2) 
+   else if (_randr_version == RANDR_1_2)
      outputs = _ecore_xcb_randr_12_output_clones_get(root, output, num);
 #endif
    return outputs;
 }
 
 EAPI Ecore_X_Randr_Crtc *
-ecore_x_randr_output_possible_crtcs_get(Ecore_X_Window root, Ecore_X_Randr_Output output, int *num) 
+ecore_x_randr_output_possible_crtcs_get(Ecore_X_Window       root,
+                                        Ecore_X_Randr_Output output,
+                                        int                 *num)
 {
    Ecore_X_Randr_Crtc *crtcs = NULL;
 
@@ -883,9 +946,9 @@ ecore_x_randr_output_possible_crtcs_get(Ecore_X_Window root, Ecore_X_Randr_Outpu
 
    if (output == Ecore_X_Randr_None) return NULL;
 
-   if (_randr_version >= RANDR_1_3) 
+   if (_randr_version >= RANDR_1_3)
      crtcs = _ecore_xcb_randr_13_output_possible_crtcs_get(root, output, num);
-   else if (_randr_version == RANDR_1_2) 
+   else if (_randr_version == RANDR_1_2)
      crtcs = _ecore_xcb_randr_12_output_possible_crtcs_get(root, output, num);
 #endif
    return crtcs;
@@ -898,7 +961,9 @@ ecore_x_randr_output_possible_crtcs_get(Ecore_X_Window root, Ecore_X_Randr_Outpu
  * @return name of the output as reported by X
  */
 EAPI char *
-ecore_x_randr_output_name_get(Ecore_X_Window root, Ecore_X_Randr_Output output, int *len) 
+ecore_x_randr_output_name_get(Ecore_X_Window       root,
+                              Ecore_X_Randr_Output output,
+                              int                 *len)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    CHECK_XCB_CONN;
@@ -908,17 +973,18 @@ ecore_x_randr_output_name_get(Ecore_X_Window root, Ecore_X_Randr_Output output,
 
    if (output == Ecore_X_Randr_None) return NULL;
 
-   if (_randr_version >= RANDR_1_3) 
+   if (_randr_version >= RANDR_1_3)
      return _ecore_xcb_randr_13_output_name_get(root, output, len);
-   else if (_randr_version == RANDR_1_2) 
+   else if (_randr_version == RANDR_1_2)
      return _ecore_xcb_randr_12_output_name_get(root, output, len);
 #endif
 
    return NULL;
 }
 
-EAPI Ecore_X_Randr_Connection_Status 
-ecore_x_randr_output_connection_status_get(Ecore_X_Window root, Ecore_X_Randr_Output output) 
+EAPI Ecore_X_Randr_Connection_Status
+ecore_x_randr_output_connection_status_get(Ecore_X_Window       root,
+                                           Ecore_X_Randr_Output output)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    CHECK_XCB_CONN;
@@ -926,12 +992,12 @@ ecore_x_randr_output_connection_status_get(Ecore_X_Window root, Ecore_X_Randr_Ou
 #ifdef ECORE_XCB_RANDR
    RANDR_CHECK_1_2_RET(ECORE_X_RANDR_CONNECTION_STATUS_UNKNOWN);
 
-   if (output == Ecore_X_Randr_None) 
+   if (output == Ecore_X_Randr_None)
      return ECORE_X_RANDR_CONNECTION_STATUS_UNKNOWN;
 
-   if (_randr_version >= RANDR_1_3) 
+   if (_randr_version >= RANDR_1_3)
      return _ecore_xcb_randr_13_output_connection_status_get(root, output);
-   else if (_randr_version == RANDR_1_2) 
+   else if (_randr_version == RANDR_1_2)
      return _ecore_xcb_randr_12_output_connection_status_get(root, output);
 #endif
 
@@ -939,7 +1005,8 @@ ecore_x_randr_output_connection_status_get(Ecore_X_Window root, Ecore_X_Randr_Ou
 }
 
 EAPI Ecore_X_Randr_Output *
-ecore_x_randr_outputs_get(Ecore_X_Window root, int *num) 
+ecore_x_randr_outputs_get(Ecore_X_Window root,
+                          int           *num)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    CHECK_XCB_CONN;
@@ -947,17 +1014,18 @@ ecore_x_randr_outputs_get(Ecore_X_Window root, int *num)
 #ifdef ECORE_XCB_RANDR
    RANDR_CHECK_1_2_RET(NULL);
 
-   if (_randr_version >= RANDR_1_3) 
+   if (_randr_version >= RANDR_1_3)
      return _ecore_xcb_randr_13_outputs_get(root, num);
-   else if (_randr_version == RANDR_1_2) 
+   else if (_randr_version == RANDR_1_2)
      return _ecore_xcb_randr_12_outputs_get(root, num);
 #endif
 
    return NULL;
 }
 
-EAPI Ecore_X_Randr_Crtc 
-ecore_x_randr_output_crtc_get(Ecore_X_Window root, Ecore_X_Randr_Output output) 
+EAPI Ecore_X_Randr_Crtc
+ecore_x_randr_output_crtc_get(Ecore_X_Window       root,
+                              Ecore_X_Randr_Output output)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    CHECK_XCB_CONN;
@@ -967,9 +1035,9 @@ ecore_x_randr_output_crtc_get(Ecore_X_Window root, Ecore_X_Randr_Output output)
 
    if (output == Ecore_X_Randr_None) return Ecore_X_Randr_None;
 
-   if (_randr_version >= RANDR_1_3) 
+   if (_randr_version >= RANDR_1_3)
      return _ecore_xcb_randr_13_output_crtc_get(root, output);
-   else if (_randr_version == RANDR_1_2) 
+   else if (_randr_version == RANDR_1_2)
      return _ecore_xcb_randr_12_output_crtc_get(root, output);
 #endif
 
@@ -996,8 +1064,15 @@ ecore_x_randr_output_crtc_get(Ecore_X_Window root, Ecore_X_Randr_Output output)
  * @return EINA_TRUE if the configuration alteration was successful, else
  * EINA_FALSE
  */
-EAPI Eina_Bool 
-ecore_x_randr_crtc_settings_set(Ecore_X_Window root, Ecore_X_Randr_Crtc crtc, Ecore_X_Randr_Output *outputs, int num, int x, int y, Ecore_X_Randr_Mode mode, Ecore_X_Randr_Orientation orientation) 
+EAPI Eina_Bool
+ecore_x_randr_crtc_settings_set(Ecore_X_Window            root,
+                                Ecore_X_Randr_Crtc        crtc,
+                                Ecore_X_Randr_Output     *outputs,
+                                int                       num,
+                                int                       x,
+                                int                       y,
+                                Ecore_X_Randr_Mode        mode,
+                                Ecore_X_Randr_Orientation orientation)
 {
    Eina_Bool ret = EINA_FALSE;
 #ifdef ECORE_XCB_RANDR
@@ -1014,27 +1089,27 @@ ecore_x_randr_crtc_settings_set(Ecore_X_Window root, Ecore_X_Randr_Crtc crtc, Ec
 
    if (!_ecore_xcb_randr_crtc_validate(root, crtc)) return ret;
 
-   if (_randr_version >= RANDR_1_3) 
+   if (_randr_version >= RANDR_1_3)
      stamp = _ecore_xcb_randr_13_get_resource_timestamp(root);
-   else if (_randr_version == RANDR_1_2) 
+   else if (_randr_version == RANDR_1_2)
      stamp = _ecore_xcb_randr_12_get_resource_timestamp(root);
 
-   ccookie = 
+   ccookie =
      xcb_randr_get_crtc_info_unchecked(_ecore_xcb_conn, crtc, stamp);
-   creply = 
+   creply =
      xcb_randr_get_crtc_info_reply(_ecore_xcb_conn, ccookie, NULL);
-   if (creply) 
+   if (creply)
      {
         xcb_randr_set_crtc_config_cookie_t scookie;
         xcb_randr_set_crtc_config_reply_t *sreply;
 
-        if ((mode == Ecore_X_Randr_None) || 
-            (num == Ecore_X_Randr_None)) 
+        if ((mode == Ecore_X_Randr_None) ||
+            (num == Ecore_X_Randr_None))
           {
              outputs = NULL;
              num = 0;
           }
-        else if (num == (int)Ecore_X_Randr_Unset) 
+        else if (num == (int)Ecore_X_Randr_Unset)
           {
              outputs = xcb_randr_get_crtc_info_outputs(creply);
              num = creply->num_outputs;
@@ -1045,16 +1120,16 @@ ecore_x_randr_crtc_settings_set(Ecore_X_Window root, Ecore_X_Randr_Crtc crtc, Ec
         if ((int)orientation == Ecore_X_Randr_Unset)
           orientation = creply->rotation;
 
-        scookie = 
-          xcb_randr_set_crtc_config_unchecked(_ecore_xcb_conn, 
-                                              crtc, XCB_CURRENT_TIME, stamp, 
-                                              x, y, mode, orientation, 
+        scookie =
+          xcb_randr_set_crtc_config_unchecked(_ecore_xcb_conn,
+                                              crtc, XCB_CURRENT_TIME, stamp,
+                                              x, y, mode, orientation,
                                               num, outputs);
-        sreply = 
+        sreply =
           xcb_randr_set_crtc_config_reply(_ecore_xcb_conn, scookie, NULL);
-        if (sreply) 
+        if (sreply)
           {
-             ret = (sreply->status == XCB_RANDR_SET_CONFIG_SUCCESS) ? 
+             ret = (sreply->status == XCB_RANDR_SET_CONFIG_SUCCESS) ?
                EINA_TRUE : EINA_FALSE;
              free(sreply);
           }
@@ -1077,8 +1152,12 @@ ecore_x_randr_crtc_settings_set(Ecore_X_Window root, Ecore_X_Randr_Crtc crtc, Ec
  * If set to -1 the call will fail.
  * @return EINA_TRUE if mode setting was successful. Else EINA_FALSE
  */
-EAPI Eina_Bool 
-ecore_x_randr_crtc_mode_set(Ecore_X_Window root, Ecore_X_Randr_Crtc crtc, Ecore_X_Randr_Output *outputs, int num, Ecore_X_Randr_Mode mode) 
+EAPI Eina_Bool
+ecore_x_randr_crtc_mode_set(Ecore_X_Window        root,
+                            Ecore_X_Randr_Crtc    crtc,
+                            Ecore_X_Randr_Output *outputs,
+                            int                   num,
+                            Ecore_X_Randr_Mode    mode)
 {
    Eina_Bool ret = EINA_FALSE;
 
@@ -1089,9 +1168,9 @@ ecore_x_randr_crtc_mode_set(Ecore_X_Window root, Ecore_X_Randr_Crtc crtc, Ecore_
    RANDR_CHECK_1_2_RET(EINA_FALSE);
 
    if ((int)mode == Ecore_X_Randr_Unset) return ret;
-   ret = 
-     ecore_x_randr_crtc_settings_set(root, crtc, outputs, num, 
-                                     Ecore_X_Randr_Unset, Ecore_X_Randr_Unset, 
+   ret =
+     ecore_x_randr_crtc_settings_set(root, crtc, outputs, num,
+                                     Ecore_X_Randr_Unset, Ecore_X_Randr_Unset,
                                      mode, Ecore_X_Randr_Unset);
 #endif
 
@@ -1105,8 +1184,9 @@ ecore_x_randr_crtc_mode_set(Ecore_X_Window root, Ecore_X_Randr_Crtc crtc, Ecore_
  * @return currently set mode or - in case parameters are invalid -
  * Ecore_X_Randr_Unset
  */
-EAPI Ecore_X_Randr_Mode 
-ecore_x_randr_crtc_mode_get(Ecore_X_Window root, Ecore_X_Randr_Crtc crtc) 
+EAPI Ecore_X_Randr_Mode
+ecore_x_randr_crtc_mode_get(Ecore_X_Window     root,
+                            Ecore_X_Randr_Crtc crtc)
 {
    Ecore_X_Randr_Mode ret = Ecore_X_Randr_Unset;
 #ifdef ECORE_XCB_RANDR
@@ -1123,15 +1203,15 @@ ecore_x_randr_crtc_mode_get(Ecore_X_Window root, Ecore_X_Randr_Crtc crtc)
 
    if (!_ecore_xcb_randr_crtc_validate(root, crtc)) return ret;
 
-   if (_randr_version >= RANDR_1_3) 
+   if (_randr_version >= RANDR_1_3)
      stamp = _ecore_xcb_randr_13_get_resource_timestamp(root);
-   else if (_randr_version == RANDR_1_2) 
+   else if (_randr_version == RANDR_1_2)
      stamp = _ecore_xcb_randr_12_get_resource_timestamp(root);
 
-   ocookie = 
+   ocookie =
      xcb_randr_get_crtc_info_unchecked(_ecore_xcb_conn, crtc, stamp);
    oreply = xcb_randr_get_crtc_info_reply(_ecore_xcb_conn, ocookie, NULL);
-   if (oreply) 
+   if (oreply)
      {
         ret = oreply->mode;
         free(oreply);
@@ -1141,8 +1221,9 @@ ecore_x_randr_crtc_mode_get(Ecore_X_Window root, Ecore_X_Randr_Crtc crtc)
    return ret;
 }
 
-EAPI Ecore_X_Randr_Orientation 
-ecore_x_randr_crtc_orientation_get(Ecore_X_Window root, Ecore_X_Randr_Crtc crtc) 
+EAPI Ecore_X_Randr_Orientation
+ecore_x_randr_crtc_orientation_get(Ecore_X_Window     root,
+                                   Ecore_X_Randr_Crtc crtc)
 {
    Ecore_X_Randr_Orientation ret = Ecore_X_Randr_None;
 #ifdef ECORE_XCB_RANDR
@@ -1159,15 +1240,15 @@ ecore_x_randr_crtc_orientation_get(Ecore_X_Window root, Ecore_X_Randr_Crtc crtc)
 
    if (!_ecore_xcb_randr_crtc_validate(root, crtc)) return ret;
 
-   if (_randr_version >= RANDR_1_3) 
+   if (_randr_version >= RANDR_1_3)
      stamp = _ecore_xcb_randr_13_get_resource_timestamp(root);
-   else if (_randr_version == RANDR_1_2) 
+   else if (_randr_version == RANDR_1_2)
      stamp = _ecore_xcb_randr_12_get_resource_timestamp(root);
 
-   ocookie = 
+   ocookie =
      xcb_randr_get_crtc_info_unchecked(_ecore_xcb_conn, crtc, stamp);
    oreply = xcb_randr_get_crtc_info_reply(_ecore_xcb_conn, ocookie, NULL);
-   if (oreply) 
+   if (oreply)
      {
         ret = oreply->rotation;
         free(oreply);
@@ -1177,8 +1258,10 @@ ecore_x_randr_crtc_orientation_get(Ecore_X_Window root, Ecore_X_Randr_Crtc crtc)
    return ret;
 }
 
-EAPI Eina_Bool 
-ecore_x_randr_crtc_orientation_set(Ecore_X_Window root, Ecore_X_Randr_Crtc crtc, Ecore_X_Randr_Orientation orientation) 
+EAPI Eina_Bool
+ecore_x_randr_crtc_orientation_set(Ecore_X_Window            root,
+                                   Ecore_X_Randr_Crtc        crtc,
+                                   Ecore_X_Randr_Orientation orientation)
 {
    Eina_Bool ret = EINA_FALSE;
 
@@ -1188,20 +1271,21 @@ ecore_x_randr_crtc_orientation_set(Ecore_X_Window root, Ecore_X_Randr_Crtc crtc,
 #ifdef ECORE_XCB_RANDR
    RANDR_CHECK_1_2_RET(EINA_FALSE);
 
-   if (orientation != Ecore_X_Randr_None) 
+   if (orientation != Ecore_X_Randr_None)
      {
-        ret = 
-          ecore_x_randr_crtc_settings_set(root, crtc, NULL, 
-                                          Ecore_X_Randr_Unset, Ecore_X_Randr_Unset, 
-                                          Ecore_X_Randr_Unset, Ecore_X_Randr_Unset, 
+        ret =
+          ecore_x_randr_crtc_settings_set(root, crtc, NULL,
+                                          Ecore_X_Randr_Unset, Ecore_X_Randr_Unset,
+                                          Ecore_X_Randr_Unset, Ecore_X_Randr_Unset,
                                           orientation);
      }
 #endif
    return ret;
 }
 
-EAPI Ecore_X_Randr_Orientation 
-ecore_x_randr_crtc_orientations_get(Ecore_X_Window root, Ecore_X_Randr_Crtc crtc) 
+EAPI Ecore_X_Randr_Orientation
+ecore_x_randr_crtc_orientations_get(Ecore_X_Window     root,
+                                    Ecore_X_Randr_Crtc crtc)
 {
    Ecore_X_Randr_Orientation ret = Ecore_X_Randr_None;
 #ifdef ECORE_XCB_RANDR
@@ -1218,16 +1302,16 @@ ecore_x_randr_crtc_orientations_get(Ecore_X_Window root, Ecore_X_Randr_Crtc crtc
 
    if (!_ecore_xcb_randr_crtc_validate(root, crtc)) return ret;
 
-   if (_randr_version >= RANDR_1_3) 
+   if (_randr_version >= RANDR_1_3)
      stamp = _ecore_xcb_randr_13_get_resource_timestamp(root);
-   else if (_randr_version == RANDR_1_2) 
+   else if (_randr_version == RANDR_1_2)
      stamp = _ecore_xcb_randr_12_get_resource_timestamp(root);
 
-   ocookie = 
+   ocookie =
      xcb_randr_get_crtc_info_unchecked(_ecore_xcb_conn, crtc, stamp);
-   oreply = 
+   oreply =
      xcb_randr_get_crtc_info_reply(_ecore_xcb_conn, ocookie, NULL);
-   if (oreply) 
+   if (oreply)
      {
         ret = oreply->rotations;
         free(oreply);
@@ -1243,7 +1327,9 @@ ecore_x_randr_crtc_orientations_get(Ecore_X_Window root, Ecore_X_Randr_Crtc crtc
  * @param num number of possible outputs referenced by given CRTC
  */
 EAPI Ecore_X_Randr_Output *
-ecore_x_randr_crtc_possible_outputs_get(Ecore_X_Window root, Ecore_X_Randr_Crtc crtc, int *num) 
+ecore_x_randr_crtc_possible_outputs_get(Ecore_X_Window     root,
+                                        Ecore_X_Randr_Crtc crtc,
+                                        int               *num)
 {
    Ecore_X_Randr_Output *ret = NULL;
 #ifdef ECORE_XCB_RANDR
@@ -1260,23 +1346,23 @@ ecore_x_randr_crtc_possible_outputs_get(Ecore_X_Window root, Ecore_X_Randr_Crtc
 
    if (!_ecore_xcb_randr_crtc_validate(root, crtc)) return ret;
 
-   if (_randr_version >= RANDR_1_3) 
+   if (_randr_version >= RANDR_1_3)
      stamp = _ecore_xcb_randr_13_get_resource_timestamp(root);
-   else if (_randr_version == RANDR_1_2) 
+   else if (_randr_version == RANDR_1_2)
      stamp = _ecore_xcb_randr_12_get_resource_timestamp(root);
 
-   ocookie = 
+   ocookie =
      xcb_randr_get_crtc_info_unchecked(_ecore_xcb_conn, crtc, stamp);
    oreply = xcb_randr_get_crtc_info_reply(_ecore_xcb_conn, ocookie, NULL);
-   if (oreply) 
+   if (oreply)
      {
         if (num) *num = oreply->num_possible_outputs;
-        ret = malloc(sizeof(Ecore_X_Randr_Output) * 
+        ret = malloc(sizeof(Ecore_X_Randr_Output) *
                      oreply->num_possible_outputs);
-        if (ret) 
+        if (ret)
           {
-             memcpy(ret, xcb_randr_get_crtc_info_possible(oreply), 
-                    sizeof(Ecore_X_Randr_Output) * 
+             memcpy(ret, xcb_randr_get_crtc_info_possible(oreply),
+                    sizeof(Ecore_X_Randr_Output) *
                     oreply->num_possible_outputs);
           }
         free(oreply);
@@ -1293,7 +1379,8 @@ ecore_x_randr_crtc_possible_outputs_get(Ecore_X_Window root, Ecore_X_Randr_Crtc
  * @return CRTC IDs
  */
 EAPI Ecore_X_Randr_Crtc *
-ecore_x_randr_crtcs_get(Ecore_X_Window root, int *num) 
+ecore_x_randr_crtcs_get(Ecore_X_Window root,
+                        int           *num)
 {
    Ecore_X_Randr_Crtc *ret = NULL;
 
@@ -1303,32 +1390,32 @@ ecore_x_randr_crtcs_get(Ecore_X_Window root, int *num)
 #ifdef ECORE_XCB_RANDR
    RANDR_CHECK_1_2_RET(NULL);
 
-   if (_randr_version >= RANDR_1_3) 
+   if (_randr_version >= RANDR_1_3)
      {
         xcb_randr_get_screen_resources_current_reply_t *reply;
 
         reply = _ecore_xcb_randr_13_get_resources(root);
-        if (reply) 
+        if (reply)
           {
              if (num) *num = reply->num_crtcs;
              ret = malloc(sizeof(Ecore_X_Randr_Crtc) * reply->num_crtcs);
-             if (ret) 
-               memcpy(ret, xcb_randr_get_screen_resources_current_crtcs(reply), 
+             if (ret)
+               memcpy(ret, xcb_randr_get_screen_resources_current_crtcs(reply),
                       sizeof(Ecore_X_Randr_Crtc) * reply->num_crtcs);
              free(reply);
           }
      }
-   else if (_randr_version == RANDR_1_2) 
+   else if (_randr_version == RANDR_1_2)
      {
         xcb_randr_get_screen_resources_reply_t *reply;
 
         reply = _ecore_xcb_randr_12_get_resources(root);
-        if (reply) 
+        if (reply)
           {
              if (num) *num = reply->num_crtcs;
              ret = malloc(sizeof(Ecore_X_Randr_Crtc) * reply->num_crtcs);
-             if (ret) 
-               memcpy(ret, xcb_randr_get_screen_resources_crtcs(reply), 
+             if (ret)
+               memcpy(ret, xcb_randr_get_screen_resources_crtcs(reply),
                       sizeof(Ecore_X_Randr_Crtc) * reply->num_crtcs);
              free(reply);
           }
@@ -1344,7 +1431,9 @@ ecore_x_randr_crtcs_get(Ecore_X_Window root, int *num)
  * @param num number of outputs referenced by given CRTC
  */
 EAPI Ecore_X_Randr_Output *
-ecore_x_randr_crtc_outputs_get(Ecore_X_Window root, Ecore_X_Randr_Crtc crtc, int *num) 
+ecore_x_randr_crtc_outputs_get(Ecore_X_Window     root,
+                               Ecore_X_Randr_Crtc crtc,
+                               int               *num)
 {
    Ecore_X_Randr_Output *ret = NULL;
 #ifdef ECORE_XCB_RANDR
@@ -1361,20 +1450,20 @@ ecore_x_randr_crtc_outputs_get(Ecore_X_Window root, Ecore_X_Randr_Crtc crtc, int
 
    if (!_ecore_xcb_randr_crtc_validate(root, crtc)) return ret;
 
-   if (_randr_version >= RANDR_1_3) 
+   if (_randr_version >= RANDR_1_3)
      stamp = _ecore_xcb_randr_13_get_resource_timestamp(root);
-   else if (_randr_version == RANDR_1_2) 
+   else if (_randr_version == RANDR_1_2)
      stamp = _ecore_xcb_randr_12_get_resource_timestamp(root);
 
-   ocookie = 
+   ocookie =
      xcb_randr_get_crtc_info_unchecked(_ecore_xcb_conn, crtc, stamp);
    oreply = xcb_randr_get_crtc_info_reply(_ecore_xcb_conn, ocookie, NULL);
-   if (oreply) 
+   if (oreply)
      {
         if (num) *num = oreply->num_outputs;
         ret = malloc(sizeof(Ecore_X_Randr_Output) * oreply->num_outputs);
         if (ret)
-          memcpy(ret, xcb_randr_get_crtc_info_outputs(oreply), 
+          memcpy(ret, xcb_randr_get_crtc_info_outputs(oreply),
                  sizeof(Ecore_X_Randr_Output) * oreply->num_outputs);
         free(oreply);
      }
@@ -1383,8 +1472,13 @@ ecore_x_randr_crtc_outputs_get(Ecore_X_Window root, Ecore_X_Randr_Crtc crtc, int
    return ret;
 }
 
-EAPI void 
-ecore_x_randr_crtc_geometry_get(Ecore_X_Window root, Ecore_X_Randr_Crtc crtc, int *x, int *y, int *w, int *h) 
+EAPI void
+ecore_x_randr_crtc_geometry_get(Ecore_X_Window     root,
+                                Ecore_X_Randr_Crtc crtc,
+                                int               *x,
+                                int               *y,
+                                int               *w,
+                                int               *h)
 {
 #ifdef ECORE_XCB_RANDR
    xcb_timestamp_t stamp = 0;
@@ -1400,15 +1494,15 @@ ecore_x_randr_crtc_geometry_get(Ecore_X_Window root, Ecore_X_Randr_Crtc crtc, in
 
    if (!_ecore_xcb_randr_crtc_validate(root, crtc)) return;
 
-   if (_randr_version >= RANDR_1_3) 
+   if (_randr_version >= RANDR_1_3)
      stamp = _ecore_xcb_randr_13_get_resource_timestamp(root);
-   else if (_randr_version == RANDR_1_2) 
+   else if (_randr_version == RANDR_1_2)
      stamp = _ecore_xcb_randr_12_get_resource_timestamp(root);
 
-   ocookie = 
+   ocookie =
      xcb_randr_get_crtc_info_unchecked(_ecore_xcb_conn, crtc, stamp);
    oreply = xcb_randr_get_crtc_info_reply(_ecore_xcb_conn, ocookie, NULL);
-   if (oreply) 
+   if (oreply)
      {
         if (x) *x = oreply->x;
         if (y) *y = oreply->y;
@@ -1429,8 +1523,12 @@ ecore_x_randr_crtc_geometry_get(Ecore_X_Window root, Ecore_X_Randr_Crtc crtc, in
  * @return EINA_TRUE if crtc could be successfully positioned. EINA_FALSE if
  * repositioning failed or if position of new crtc would be out of given screen's min/max bounds.
  */
-EAPI Eina_Bool 
-ecore_x_randr_crtc_pos_relative_set(Ecore_X_Window root, Ecore_X_Randr_Crtc crtc1, Ecore_X_Randr_Crtc crtc2, Ecore_X_Randr_Output_Policy policy, Ecore_X_Randr_Relative_Alignment alignment) 
+EAPI Eina_Bool
+ecore_x_randr_crtc_pos_relative_set(Ecore_X_Window                   root,
+                                    Ecore_X_Randr_Crtc               crtc1,
+                                    Ecore_X_Randr_Crtc               crtc2,
+                                    Ecore_X_Randr_Output_Policy      policy,
+                                    Ecore_X_Randr_Relative_Alignment alignment)
 {
 #ifdef ECORE_XCB_RANDR
    Eina_Rectangle r1, r2;
@@ -1443,11 +1541,11 @@ ecore_x_randr_crtc_pos_relative_set(Ecore_X_Window root, Ecore_X_Randr_Crtc crtc
 #ifdef ECORE_XCB_RANDR
    RANDR_CHECK_1_2_RET(EINA_FALSE);
 
-   if ((ecore_x_randr_crtc_mode_get(root, crtc1) == 0) || 
+   if ((ecore_x_randr_crtc_mode_get(root, crtc1) == 0) ||
        (ecore_x_randr_crtc_mode_get(root, crtc2) == 0))
      return EINA_FALSE;
 
-   if ((!_ecore_xcb_randr_crtc_validate(root, crtc1) || 
+   if ((!_ecore_xcb_randr_crtc_validate(root, crtc1) ||
         (!(crtc1 != crtc2) && (!_ecore_xcb_randr_crtc_validate(root, crtc2)))))
      return EINA_FALSE;
 
@@ -1456,7 +1554,7 @@ ecore_x_randr_crtc_pos_relative_set(Ecore_X_Window root, Ecore_X_Randr_Crtc crtc
    ecore_x_randr_screen_size_range_get(root, NULL, NULL, &w_max, &h_max);
    ecore_x_randr_screen_current_size_get(root, &cw, &ch, NULL, NULL);
 
-   switch (policy) 
+   switch (policy)
      {
       case ECORE_X_RANDR_OUTPUT_POLICY_RIGHT:
         xn = (r2.x + r2.w);
@@ -1467,6 +1565,7 @@ ecore_x_randr_crtc_pos_relative_set(Ecore_X_Window root, Ecore_X_Randr_Crtc crtc
         else if (alignment == ECORE_X_RANDR_RELATIVE_ALIGNMENT_CENTER_SCR)
           yn = ((int)((double)ch / 2.0) - ((double)r1.h / 2.0));
         break;
+
       case ECORE_X_RANDR_OUTPUT_POLICY_LEFT:
         xn = (r2.x - r1.w);
         if (alignment == ECORE_X_RANDR_RELATIVE_ALIGNMENT_NONE)
@@ -1476,6 +1575,7 @@ ecore_x_randr_crtc_pos_relative_set(Ecore_X_Window root, Ecore_X_Randr_Crtc crtc
         else if (alignment == ECORE_X_RANDR_RELATIVE_ALIGNMENT_CENTER_SCR)
           yn = ((int)((double)ch / 2.0) - ((double)r1.h / 2.0));
         break;
+
       case ECORE_X_RANDR_OUTPUT_POLICY_BELOW:
         yn = (r2.y + r2.h);
         if (alignment == ECORE_X_RANDR_RELATIVE_ALIGNMENT_NONE)
@@ -1485,6 +1585,7 @@ ecore_x_randr_crtc_pos_relative_set(Ecore_X_Window root, Ecore_X_Randr_Crtc crtc
         else if (alignment == ECORE_X_RANDR_RELATIVE_ALIGNMENT_CENTER_SCR)
           xn = ((int)((double)cw / 2.0));
         break;
+
       case ECORE_X_RANDR_OUTPUT_POLICY_ABOVE:
         yn = (r2.y - r1.h);
         if (alignment == ECORE_X_RANDR_RELATIVE_ALIGNMENT_NONE)
@@ -1494,9 +1595,11 @@ ecore_x_randr_crtc_pos_relative_set(Ecore_X_Window root, Ecore_X_Randr_Crtc crtc
         else if (alignment == ECORE_X_RANDR_RELATIVE_ALIGNMENT_CENTER_SCR)
           xn = ((int)((double)cw / 2.0));
         break;
+
       case ECORE_X_RANDR_OUTPUT_POLICY_CLONE:
         return ecore_x_randr_crtc_pos_set(root, crtc1, r2.x, r2.y);
         break;
+
       case ECORE_X_RANDR_OUTPUT_POLICY_NONE:
         break;
      }
@@ -1511,8 +1614,12 @@ ecore_x_randr_crtc_pos_relative_set(Ecore_X_Window root, Ecore_X_Randr_Crtc crtc
    return EINA_FALSE;
 }
 
-EAPI Eina_Bool 
-ecore_x_randr_move_all_crtcs_but(Ecore_X_Window root, const Ecore_X_Randr_Crtc *not_moved, int num, int dx, int dy) 
+EAPI Eina_Bool
+ecore_x_randr_move_all_crtcs_but(Ecore_X_Window            root,
+                                 const Ecore_X_Randr_Crtc *not_moved,
+                                 int                       num,
+                                 int                       dx,
+                                 int                       dy)
 {
    Eina_Bool ret = EINA_FALSE;
 #ifdef ECORE_XCB_RANDR
@@ -1530,13 +1637,13 @@ ecore_x_randr_move_all_crtcs_but(Ecore_X_Window root, const Ecore_X_Randr_Crtc *
    crtcs = ecore_x_randr_crtcs_get(root, &total);
    n = (total - num);
    move = malloc(sizeof(Ecore_X_Randr_Crtc) * n);
-   if (move) 
+   if (move)
      {
-        for (i = 0, k = 0; (i < total) && (k < n); i++) 
+        for (i = 0, k = 0; (i < total) && (k < n); i++)
           {
-             for (j = 0; j < num; j++) 
+             for (j = 0; j < num; j++)
                if (crtcs[i] == not_moved[j]) break;
-             if (j == num) 
+             if (j == num)
                move[k++] = crtcs[i];
           }
         ret = ecore_x_randr_move_crtcs(root, move, n, dx, dy);
@@ -1548,8 +1655,11 @@ ecore_x_randr_move_all_crtcs_but(Ecore_X_Window root, const Ecore_X_Randr_Crtc *
    return ret;
 }
 
-EAPI void 
-ecore_x_randr_crtc_pos_get(Ecore_X_Window root, Ecore_X_Randr_Crtc crtc, int *x, int *y) 
+EAPI void
+ecore_x_randr_crtc_pos_get(Ecore_X_Window     root,
+                           Ecore_X_Randr_Crtc crtc,
+                           int               *x,
+                           int               *y)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    CHECK_XCB_CONN;
@@ -1569,8 +1679,11 @@ ecore_x_randr_crtc_pos_get(Ecore_X_Window root, Ecore_X_Randr_Crtc crtc, int *x,
  * @param y position on the y-ayis (0 == top) of the screen. if y < 0, current value will be kept.
  * @return EINA_TRUE if position could be successfully be altered.
  */
-EAPI Eina_Bool 
-ecore_x_randr_crtc_pos_set(Ecore_X_Window root, Ecore_X_Randr_Crtc crtc, int x, int y) 
+EAPI Eina_Bool
+ecore_x_randr_crtc_pos_set(Ecore_X_Window     root,
+                           Ecore_X_Randr_Crtc crtc,
+                           int                x,
+                           int                y)
 {
    Eina_Bool ret = EINA_FALSE;
 #ifdef ECORE_XCB_RANDR
@@ -1584,7 +1697,7 @@ ecore_x_randr_crtc_pos_set(Ecore_X_Window root, Ecore_X_Randr_Crtc crtc, int x,
 #ifdef ECORE_XCB_RANDR
    RANDR_CHECK_1_2_RET(EINA_FALSE);
 
-   ecore_x_randr_crtc_geometry_get(root, crtc, 
+   ecore_x_randr_crtc_geometry_get(root, crtc,
                                    &rect.x, &rect.y, &rect.w, &rect.h);
    ecore_x_randr_screen_current_size_get(root, &w, &h, NULL, NULL);
    if (x < 0) x = rect.x;
@@ -1594,7 +1707,7 @@ ecore_x_randr_crtc_pos_set(Ecore_X_Window root, Ecore_X_Randr_Crtc crtc, int x,
    if ((y + rect.h) > h)
      nh = (y + rect.h);
 
-   if ((nw != 0) || (nh != 0)) 
+   if ((nw != 0) || (nh != 0))
      {
         if (!ecore_x_randr_screen_current_size_set(root, nw, nh, 0, 0))
           return EINA_FALSE;
@@ -1606,8 +1719,11 @@ ecore_x_randr_crtc_pos_set(Ecore_X_Window root, Ecore_X_Randr_Crtc crtc, int x,
    return ret;
 }
 
-EAPI void 
-ecore_x_randr_crtc_size_get(Ecore_X_Window root, Ecore_X_Randr_Crtc crtc, int *w, int *h) 
+EAPI void
+ecore_x_randr_crtc_size_get(Ecore_X_Window     root,
+                            Ecore_X_Randr_Crtc crtc,
+                            int               *w,
+                            int               *h)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    CHECK_XCB_CONN;
@@ -1618,8 +1734,10 @@ ecore_x_randr_crtc_size_get(Ecore_X_Window root, Ecore_X_Randr_Crtc crtc, int *w
 #endif
 }
 
-EAPI Ecore_X_Randr_Refresh_Rate 
-ecore_x_randr_crtc_refresh_rate_get(Ecore_X_Window root, Ecore_X_Randr_Crtc crtc, Ecore_X_Randr_Mode mode) 
+EAPI Ecore_X_Randr_Refresh_Rate
+ecore_x_randr_crtc_refresh_rate_get(Ecore_X_Window     root,
+                                    Ecore_X_Randr_Crtc crtc,
+                                    Ecore_X_Randr_Mode mode)
 {
    Ecore_X_Randr_Refresh_Rate ret = 0.0;
 
@@ -1631,29 +1749,29 @@ ecore_x_randr_crtc_refresh_rate_get(Ecore_X_Window root, Ecore_X_Randr_Crtc crtc
 
    if (!_ecore_xcb_randr_crtc_validate(root, crtc)) return 0.0;
 
-   if (_randr_version >= RANDR_1_3) 
+   if (_randr_version >= RANDR_1_3)
      {
         xcb_randr_get_screen_resources_current_reply_t *reply;
 
         reply = _ecore_xcb_randr_13_get_resources(root);
-        if (reply) 
+        if (reply)
           {
              xcb_randr_mode_info_iterator_t miter;
 
-             miter = 
+             miter =
                xcb_randr_get_screen_resources_current_modes_iterator(reply);
-             while (miter.rem) 
+             while (miter.rem)
                {
                   xcb_randr_mode_info_t *minfo;
 
                   minfo = miter.data;
-                  if (minfo->id == mode) 
+                  if (minfo->id == mode)
                     {
-                       if ((minfo->htotal) && (minfo->vtotal)) 
+                       if ((minfo->htotal) && (minfo->vtotal))
                          {
-                            ret = ((double)minfo->dot_clock / 
-                                   ((double)minfo->htotal * 
-                                       (double)minfo->vtotal));
+                            ret = ((double)minfo->dot_clock /
+                                   ((double)minfo->htotal *
+                                    (double)minfo->vtotal));
                          }
                        break;
                     }
@@ -1662,28 +1780,28 @@ ecore_x_randr_crtc_refresh_rate_get(Ecore_X_Window root, Ecore_X_Randr_Crtc crtc
              free(reply);
           }
      }
-   else if (_randr_version == RANDR_1_2) 
+   else if (_randr_version == RANDR_1_2)
      {
         xcb_randr_get_screen_resources_reply_t *reply;
 
         reply = _ecore_xcb_randr_12_get_resources(root);
-        if (reply) 
+        if (reply)
           {
              xcb_randr_mode_info_iterator_t miter;
 
              miter = xcb_randr_get_screen_resources_modes_iterator(reply);
-             while (miter.rem) 
+             while (miter.rem)
                {
                   xcb_randr_mode_info_t *minfo;
 
                   minfo = miter.data;
-                  if (minfo->id == mode) 
+                  if (minfo->id == mode)
                     {
-                       if ((minfo->htotal) && (minfo->vtotal)) 
+                       if ((minfo->htotal) && (minfo->vtotal))
                          {
-                            ret = ((double)minfo->dot_clock / 
-                                   ((double)minfo->htotal * 
-                                       (double)minfo->vtotal));
+                            ret = ((double)minfo->dot_clock /
+                                   ((double)minfo->htotal *
+                                    (double)minfo->vtotal));
                          }
                        break;
                     }
@@ -1705,8 +1823,12 @@ ecore_x_randr_crtc_refresh_rate_get(Ecore_X_Window root, Ecore_X_Randr_Crtc crtc
  * @param dy amount of pixels the CRTCs should be moved in y direction
  * @return EINA_TRUE if all crtcs could be moved successfully.
  */
-EAPI Eina_Bool 
-ecore_x_randr_move_crtcs(Ecore_X_Window root, const Ecore_X_Randr_Crtc *crtcs, int num, int dx, int dy) 
+EAPI Eina_Bool
+ecore_x_randr_move_crtcs(Ecore_X_Window            root,
+                         const Ecore_X_Randr_Crtc *crtcs,
+                         int                       num,
+                         int                       dx,
+                         int                       dy)
 {
    Eina_Bool ret = EINA_TRUE;
 #ifdef ECORE_XCB_RANDR
@@ -1724,9 +1846,9 @@ ecore_x_randr_move_crtcs(Ecore_X_Window root, const Ecore_X_Randr_Crtc *crtcs, i
 
    if (!_ecore_xcb_randr_root_validate(root)) return EINA_FALSE;
 
-   if (_randr_version >= RANDR_1_3) 
+   if (_randr_version >= RANDR_1_3)
      stamp = _ecore_xcb_randr_13_get_resource_timestamp(root);
-   else if (_randr_version == RANDR_1_2) 
+   else if (_randr_version == RANDR_1_2)
      stamp = _ecore_xcb_randr_12_get_resource_timestamp(root);
 
    ecore_x_randr_screen_size_range_get(root, NULL, NULL, &mw, &mh);
@@ -1734,21 +1856,21 @@ ecore_x_randr_move_crtcs(Ecore_X_Window root, const Ecore_X_Randr_Crtc *crtcs, i
    nw = cw;
    nh = ch;
 
-   for (i = 0; i < num; i++) 
+   for (i = 0; i < num; i++)
      {
         xcb_randr_get_crtc_info_cookie_t ocookie;
 
-        ocookie = 
-          xcb_randr_get_crtc_info_unchecked(_ecore_xcb_conn, crtcs[i], 
+        ocookie =
+          xcb_randr_get_crtc_info_unchecked(_ecore_xcb_conn, crtcs[i],
                                             stamp);
-        oreply[i] = xcb_randr_get_crtc_info_reply(_ecore_xcb_conn, 
+        oreply[i] = xcb_randr_get_crtc_info_reply(_ecore_xcb_conn,
                                                   ocookie, NULL);
-        if (oreply[i]) 
+        if (oreply[i])
           {
-             if (((oreply[i]->x + dx) < 0) || 
-                 ((oreply[i]->y + dy) < 0) || 
-                 ((oreply[i]->x + oreply[i]->width + dx) > mw) || 
-                 ((oreply[i]->y + oreply[i]->height + dy) > mh)) 
+             if (((oreply[i]->x + dx) < 0) ||
+                 ((oreply[i]->y + dy) < 0) ||
+                 ((oreply[i]->x + oreply[i]->width + dx) > mw) ||
+                 ((oreply[i]->y + oreply[i]->height + dy) > mh))
                {
                   continue;
                }
@@ -1757,9 +1879,9 @@ ecore_x_randr_move_crtcs(Ecore_X_Window root, const Ecore_X_Randr_Crtc *crtcs, i
           }
      }
 
-   if ((nw > cw) || (nh > ch)) 
+   if ((nw > cw) || (nh > ch))
      {
-        if (!ecore_x_randr_screen_current_size_set(root, nw, nh, -1, -1)) 
+        if (!ecore_x_randr_screen_current_size_set(root, nw, nh, -1, -1))
           {
              for (i = 0; i < num; i++)
                if (oreply[i]) free(oreply[i]);
@@ -1768,29 +1890,29 @@ ecore_x_randr_move_crtcs(Ecore_X_Window root, const Ecore_X_Randr_Crtc *crtcs, i
           }
      }
 
-   for (i = 0; ((i < num) && (oreply[i])); i++) 
+   for (i = 0; ((i < num) && (oreply[i])); i++)
      {
         if (!oreply[i]) continue;
-        if (!ecore_x_randr_crtc_settings_set(root, crtcs[i], NULL, -1, 
-                                             (oreply[i]->x + dx), 
-                                             (oreply[i]->y + dy), 
-                                             oreply[i]->mode, 
-                                             oreply[i]->rotation)) 
+        if (!ecore_x_randr_crtc_settings_set(root, crtcs[i], NULL, -1,
+                                             (oreply[i]->x + dx),
+                                             (oreply[i]->y + dy),
+                                             oreply[i]->mode,
+                                             oreply[i]->rotation))
           {
              ret = EINA_FALSE;
              break;
           }
      }
 
-   if (i < num) 
+   if (i < num)
      {
-        while (i-- >= 0) 
+        while (i-- >= 0)
           {
              if (oreply[i])
-               ecore_x_randr_crtc_settings_set(root, crtcs[i], NULL, -1, 
-                                               (oreply[i]->x - dx), 
-                                               (oreply[i]->y - dy), 
-                                               oreply[i]->mode, 
+               ecore_x_randr_crtc_settings_set(root, crtcs[i], NULL, -1,
+                                               (oreply[i]->x - dx),
+                                               (oreply[i]->y - dy),
+                                               oreply[i]->mode,
                                                oreply[i]->rotation);
           }
      }
@@ -1808,8 +1930,9 @@ ecore_x_randr_move_crtcs(Ecore_X_Window root, const Ecore_X_Randr_Crtc *crtcs, i
  * @param win select this window's properties for RandRR events
  * @param on enable/disable selecting
  */
-EAPI void 
-ecore_x_randr_events_select(Ecore_X_Window win, Eina_Bool on) 
+EAPI void
+ecore_x_randr_events_select(Ecore_X_Window win,
+                            Eina_Bool      on)
 {
 #ifdef ECORE_XCB_RANDR
    uint16_t mask = 0;
@@ -1819,13 +1942,13 @@ ecore_x_randr_events_select(Ecore_X_Window win, Eina_Bool on)
    CHECK_XCB_CONN;
 
 #ifdef ECORE_XCB_RANDR
-   if (on) 
+   if (on)
      {
         mask = XCB_RANDR_NOTIFY_MASK_SCREEN_CHANGE;
-        if (_randr_version >= ((1 << 16) | 2)) 
+        if (_randr_version >= ((1 << 16) | 2))
           {
-             mask |= (XCB_RANDR_NOTIFY_MASK_CRTC_CHANGE | 
-                      XCB_RANDR_NOTIFY_MASK_OUTPUT_CHANGE | 
+             mask |= (XCB_RANDR_NOTIFY_MASK_CRTC_CHANGE |
+                      XCB_RANDR_NOTIFY_MASK_OUTPUT_CHANGE |
                       XCB_RANDR_NOTIFY_MASK_OUTPUT_PROPERTY);
           }
      }
@@ -1839,8 +1962,8 @@ ecore_x_randr_events_select(Ecore_X_Window win, Eina_Bool on)
  * and all other CRTCs dx,dy respectively.
  * @param root the window's screen which will be reset.
  */
-EAPI void 
-ecore_x_randr_screen_reset(Ecore_X_Window root) 
+EAPI void
+ecore_x_randr_screen_reset(Ecore_X_Window root)
 {
 #ifdef ECORE_XCB_RANDR
    xcb_timestamp_t stamp = 0;
@@ -1856,23 +1979,23 @@ ecore_x_randr_screen_reset(Ecore_X_Window root)
    if (!_ecore_xcb_randr_root_validate(root)) return;
    crtcs = ecore_x_randr_crtcs_get(root, &total);
 
-   if (_randr_version >= RANDR_1_3) 
+   if (_randr_version >= RANDR_1_3)
      stamp = _ecore_xcb_randr_13_get_resource_timestamp(root);
-   else if (_randr_version == RANDR_1_2) 
+   else if (_randr_version == RANDR_1_2)
      stamp = _ecore_xcb_randr_12_get_resource_timestamp(root);
 
-   /* I hate declaring variables inside code like this, but we need the 
+   /* I hate declaring variables inside code like this, but we need the
     * value of 'total' before we can */
    Ecore_X_Randr_Crtc enabled[total];
 
-   for (i = 0; i < total; i++) 
+   for (i = 0; i < total; i++)
      {
         xcb_randr_get_crtc_info_cookie_t ocookie;
         xcb_randr_get_crtc_info_reply_t *oreply;
 
-        ocookie = 
+        ocookie =
           xcb_randr_get_crtc_info_unchecked(_ecore_xcb_conn, crtcs[i], stamp);
-        oreply = xcb_randr_get_crtc_info_reply(_ecore_xcb_conn, 
+        oreply = xcb_randr_get_crtc_info_reply(_ecore_xcb_conn,
                                                ocookie, NULL);
         if (!oreply) continue;
         if ((oreply->mode <= 0) || (oreply->num_outputs == 0))
@@ -1894,9 +2017,9 @@ ecore_x_randr_screen_reset(Ecore_X_Window root)
      }
    free(crtcs);
 
-   if ((dx > 0) || (dy > 0)) 
+   if ((dx > 0) || (dy > 0))
      {
-        if (ecore_x_randr_move_crtcs(root, enabled, num, -dx, -dy)) 
+        if (ecore_x_randr_move_crtcs(root, enabled, num, -dx, -dy))
           {
              w -= dx;
              h -= dy;
@@ -1914,8 +2037,12 @@ ecore_x_randr_screen_reset(Ecore_X_Window root)
  * @param wmax maximum width the screen can be set to
  * @param hmax maximum height the screen can be set to
  */
-EAPI void 
-ecore_x_randr_screen_size_range_get(Ecore_X_Window root, int *minw, int *minh, int *maxw, int *maxh) 
+EAPI void
+ecore_x_randr_screen_size_range_get(Ecore_X_Window root,
+                                    int           *minw,
+                                    int           *minh,
+                                    int           *maxw,
+                                    int           *maxh)
 {
 #ifdef ECORE_XCB_RANDR
    xcb_randr_get_screen_size_range_cookie_t cookie;
@@ -1930,7 +2057,7 @@ ecore_x_randr_screen_size_range_get(Ecore_X_Window root, int *minw, int *minh, i
 
    cookie = xcb_randr_get_screen_size_range_unchecked(_ecore_xcb_conn, root);
    reply = xcb_randr_get_screen_size_range_reply(_ecore_xcb_conn, cookie, NULL);
-   if (reply) 
+   if (reply)
      {
         if (minw) *minw = reply->min_width;
         if (minh) *minh = reply->min_height;
@@ -1945,14 +2072,18 @@ ecore_x_randr_screen_size_range_get(Ecore_X_Window root, int *minw, int *minh, i
  * @param w width of screen in px
  * @param h height of screen in px
  */
-EAPI void 
-ecore_x_randr_screen_current_size_get(Ecore_X_Window root, int *w, int *h, int *w_mm, int *h_mm) 
+EAPI void
+ecore_x_randr_screen_current_size_get(Ecore_X_Window root,
+                                      int           *w,
+                                      int           *h,
+                                      int           *w_mm,
+                                      int           *h_mm)
 {
 #ifdef ECORE_XCB_RANDR
    Ecore_X_Randr_Screen scr = 0;
    xcb_screen_t *s;
 # define RANDR_VALIDATE_ROOT(screen, root) \
-   ((screen == _ecore_xcb_randr_root_to_screen(root)) != -1)
+  ((screen == _ecore_xcb_randr_root_to_screen(root)) != -1)
 #endif
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
@@ -1980,8 +2111,12 @@ ecore_x_randr_screen_current_size_get(Ecore_X_Window root, int *w, int *h, int *
  * @return EINA_TRUE if request was successfully sent or screen is already in
  * requested size, EINA_FALSE if parameters are invalid
  */
-EAPI Eina_Bool 
-ecore_x_randr_screen_current_size_set(Ecore_X_Window root, int w, int h, int w_mm, int h_mm) 
+EAPI Eina_Bool
+ecore_x_randr_screen_current_size_set(Ecore_X_Window root,
+                                      int            w,
+                                      int            h,
+                                      int            w_mm,
+                                      int            h_mm)
 {
    Eina_Bool ret = EINA_TRUE;
 #ifdef ECORE_XCB_RANDR
@@ -1989,7 +2124,7 @@ ecore_x_randr_screen_current_size_set(Ecore_X_Window root, int w, int h, int w_m
    int wc = 0, hc = 0, w_mm_c = 0, h_mm_c = 0;
    int mw = 0, mh = 0, xw = 0, xh = 0;
 # define RANDR_VALIDATE_ROOT(screen, root) \
-   ((screen == _ecore_xcb_randr_root_to_screen(root)) != -1)
+  ((screen == _ecore_xcb_randr_root_to_screen(root)) != -1)
 #endif
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
@@ -2003,7 +2138,7 @@ ecore_x_randr_screen_current_size_set(Ecore_X_Window root, int w, int h, int w_m
    if ((w == wc) && (h == hc) && (w_mm == w_mm_c) && (h_mm == h_mm_c))
      return EINA_TRUE;
    ecore_x_randr_screen_size_range_get(root, &mw, &mh, &xw, &xh);
-   if (((w != 1) && ((w < mw) || (w > xw))) || 
+   if (((w != 1) && ((w < mw) || (w > xw))) ||
        ((h != -1) && ((h < mh) || (h > xh)))) return EINA_FALSE;
 
    if (w <= 0)
@@ -2031,7 +2166,8 @@ ecore_x_randr_screen_current_size_set(Ecore_X_Window root, int w, int h, int w_m
  * was found that displays the specified window.
  */
 EAPI Ecore_X_Randr_Output *
-ecore_x_randr_window_outputs_get(Ecore_X_Window window, int *num)
+ecore_x_randr_window_outputs_get(Ecore_X_Window window,
+                                 int           *num)
 {
 #ifdef ECORE_XCB_RANDR
    Ecore_X_Window root;
@@ -2068,40 +2204,40 @@ ecore_x_randr_window_outputs_get(Ecore_X_Window window, int *num)
    for (i = 0; i < ncrtcs; i++)
      {
         /* if crtc is not enabled, don't bother about it any further */
-        mode = ecore_x_randr_crtc_mode_get(root, crtcs[i]);
-        if (mode == Ecore_X_Randr_None) continue;
-
-        ecore_x_randr_crtc_geometry_get(root, crtcs[i], &c_geo.x, &c_geo.y,
-                                        &c_geo.w, &c_geo.h);
-        if (eina_rectangles_intersect(&w_geo, &c_geo))
-          {
-             outputs = 
-               ecore_x_randr_crtc_outputs_get(root, crtcs[i], &noutputs);
-             /* The case below should be impossible, but for safety reasons
-              * remains */
-             if (!outputs)
-               {
-                  if (num) *num = 0;
-                  free(ret);
-                  free(crtcs);
-                  return NULL;
-               }
-             tret = realloc(ret, ((nret + noutputs) * 
-                                  sizeof(Ecore_X_Randr_Output)));
-             if (!tret)
-               {
-                  if (num) *num = 0;
-                  free(outputs);
-                  free(ret);
-                  free(crtcs);
-                  return NULL;
-               }
-             ret = tret;
-             memcpy(&ret[nret], outputs, 
-                    (noutputs * sizeof(Ecore_X_Randr_Output)));
-             nret += noutputs;
-             free(outputs);
-          }
+         mode = ecore_x_randr_crtc_mode_get(root, crtcs[i]);
+         if (mode == Ecore_X_Randr_None) continue;
+
+         ecore_x_randr_crtc_geometry_get(root, crtcs[i], &c_geo.x, &c_geo.y,
+                                         &c_geo.w, &c_geo.h);
+         if (eina_rectangles_intersect(&w_geo, &c_geo))
+           {
+              outputs =
+                ecore_x_randr_crtc_outputs_get(root, crtcs[i], &noutputs);
+     /* The case below should be impossible, but for safety reasons
+      * remains */
+              if (!outputs)
+                {
+                   if (num) *num = 0;
+                   free(ret);
+                   free(crtcs);
+                   return NULL;
+                }
+              tret = realloc(ret, ((nret + noutputs) *
+                                   sizeof(Ecore_X_Randr_Output)));
+              if (!tret)
+                {
+                   if (num) *num = 0;
+                   free(outputs);
+                   free(ret);
+                   free(crtcs);
+                   return NULL;
+                }
+              ret = tret;
+              memcpy(&ret[nret], outputs,
+                     (noutputs * sizeof(Ecore_X_Randr_Output)));
+              nret += noutputs;
+              free(outputs);
+           }
      }
    free(crtcs);
 
@@ -2120,7 +2256,8 @@ ecore_x_randr_window_outputs_get(Ecore_X_Window window, int *num)
  * @return the backlight level
  */
 EAPI double
-ecore_x_randr_output_backlight_level_get(Ecore_X_Window root, Ecore_X_Randr_Output output)
+ecore_x_randr_output_backlight_level_get(Ecore_X_Window       root,
+                                         Ecore_X_Randr_Output output)
 {
 #ifdef ECORE_XCB_RANDR
    Ecore_X_Atom _backlight;
@@ -2140,8 +2277,8 @@ ecore_x_randr_output_backlight_level_get(Ecore_X_Window root, Ecore_X_Randr_Outp
 #ifdef ECORE_XCB_RANDR
    RANDR_CHECK_1_2_RET(-1);
 
-   acookie = 
-     xcb_intern_atom_unchecked(_ecore_xcb_conn, 1, 
+   acookie =
+     xcb_intern_atom_unchecked(_ecore_xcb_conn, 1,
                                strlen("Backlight"), "Backlight");
    areply = xcb_intern_atom_reply(_ecore_xcb_conn, acookie, NULL);
 
@@ -2150,7 +2287,7 @@ ecore_x_randr_output_backlight_level_get(Ecore_X_Window root, Ecore_X_Randr_Outp
         ERR("Backlight property is not suppported on this server or driver");
         return -1;
      }
-   else 
+   else
      {
         _backlight = areply->atom;
         free(areply);
@@ -2162,19 +2299,19 @@ ecore_x_randr_output_backlight_level_get(Ecore_X_Window root, Ecore_X_Randr_Outp
         return -1;
      }
 
-   cookie = 
-     xcb_randr_get_output_property_unchecked(_ecore_xcb_conn, 
-                                             output, _backlight, 
+   cookie =
+     xcb_randr_get_output_property_unchecked(_ecore_xcb_conn,
+                                             output, _backlight,
                                              XCB_ATOM_NONE, 0, 4, 0, 0);
-   reply = 
+   reply =
      xcb_randr_get_output_property_reply(_ecore_xcb_conn, cookie, NULL);
-   if (!reply) 
+   if (!reply)
      {
         WRN("Backlight not supported on this output");
         return -1;
      }
 
-   if ((reply->format != 32) || (reply->num_items != 1) || 
+   if ((reply->format != 32) || (reply->num_items != 1) ||
        (reply->type != XCB_ATOM_INTEGER))
      {
         free(reply);
@@ -2186,24 +2323,24 @@ ecore_x_randr_output_backlight_level_get(Ecore_X_Window root, Ecore_X_Randr_Outp
 
    /* I have the current value of the backlight */
    /* Now retrieve the min and max intensities of the output */
-   qcookie = 
-     xcb_randr_query_output_property_unchecked(_ecore_xcb_conn, 
+   qcookie =
+     xcb_randr_query_output_property_unchecked(_ecore_xcb_conn,
                                                output, _backlight);
-   qreply = 
+   qreply =
      xcb_randr_query_output_property_reply(_ecore_xcb_conn, qcookie, NULL);
-   if (qreply) 
+   if (qreply)
      {
         dvalue = -1;
-        if ((qreply->range) && 
+        if ((qreply->range) &&
             (xcb_randr_query_output_property_valid_values_length(qreply) == 2))
           {
              int32_t *vals;
 
              vals = xcb_randr_query_output_property_valid_values(qreply);
              /* finally convert the current value in the interval [0..1] */
-              min = vals[0];
-              max = vals[1];
-              dvalue = ((double)(value - min)) / ((double)(max - min));
+             min = vals[0];
+             max = vals[1];
+             dvalue = ((double)(value - min)) / ((double)(max - min));
           }
         free(qreply);
         return dvalue;
@@ -2220,7 +2357,9 @@ ecore_x_randr_output_backlight_level_get(Ecore_X_Window root, Ecore_X_Randr_Outp
  * @return EINA_TRUE in case of success
  */
 EAPI Eina_Bool
-ecore_x_randr_output_backlight_level_set(Ecore_X_Window root, Ecore_X_Randr_Output output, double level)
+ecore_x_randr_output_backlight_level_set(Ecore_X_Window       root,
+                                         Ecore_X_Randr_Output output,
+                                         double               level)
 {
 #ifdef ECORE_XCB_RANDR
    Ecore_X_Atom _backlight;
@@ -2248,8 +2387,8 @@ ecore_x_randr_output_backlight_level_set(Ecore_X_Window root, Ecore_X_Randr_Outp
         return EINA_FALSE;
      }
 
-   acookie = 
-     xcb_intern_atom_unchecked(_ecore_xcb_conn, 1, 
+   acookie =
+     xcb_intern_atom_unchecked(_ecore_xcb_conn, 1,
                                strlen("Backlight"), "Backlight");
    areply = xcb_intern_atom_reply(_ecore_xcb_conn, acookie, NULL);
    if (!areply)
@@ -2257,18 +2396,18 @@ ecore_x_randr_output_backlight_level_set(Ecore_X_Window root, Ecore_X_Randr_Outp
         WRN("Backlight property is not suppported on this server or driver");
         return EINA_FALSE;
      }
-   else 
+   else
      {
         _backlight = areply->atom;
         free(areply);
      }
 
-   qcookie = 
-     xcb_randr_query_output_property_unchecked(_ecore_xcb_conn, 
+   qcookie =
+     xcb_randr_query_output_property_unchecked(_ecore_xcb_conn,
                                                output, _backlight);
-   qreply = 
+   qreply =
      xcb_randr_query_output_property_reply(_ecore_xcb_conn, qcookie, NULL);
-   if (qreply) 
+   if (qreply)
      {
         if ((qreply->range) && (qreply->length == 2))
           {
@@ -2283,9 +2422,9 @@ ecore_x_randr_output_backlight_level_set(Ecore_X_Window root, Ecore_X_Randr_Outp
              n = tmp;
              if (n > max) n = max;
              if (n < min) n = min;
-             xcb_randr_change_output_property(_ecore_xcb_conn, output, 
-                                              _backlight, XCB_ATOM_INTEGER, 
-                                              32, XCB_PROP_MODE_REPLACE, 
+             xcb_randr_change_output_property(_ecore_xcb_conn, output,
+                                              _backlight, XCB_ATOM_INTEGER,
+                                              32, XCB_PROP_MODE_REPLACE,
                                               1, (unsigned char *)&n);
              ecore_x_flush(); // needed
           }
@@ -2298,8 +2437,9 @@ ecore_x_randr_output_backlight_level_set(Ecore_X_Window root, Ecore_X_Randr_Outp
 }
 
 /* local functions */
-static Eina_Bool 
-_ecore_xcb_randr_output_validate(Ecore_X_Window root, Ecore_X_Randr_Output output) 
+static Eina_Bool
+_ecore_xcb_randr_output_validate(Ecore_X_Window       root,
+                                 Ecore_X_Randr_Output output)
 {
    Eina_Bool ret = EINA_FALSE;
 
@@ -2309,25 +2449,25 @@ _ecore_xcb_randr_output_validate(Ecore_X_Window root, Ecore_X_Randr_Output outpu
 #ifdef ECORE_XCB_RANDR
    RANDR_CHECK_1_2_RET(EINA_FALSE);
 
-   if ((output) && (_ecore_xcb_randr_root_validate(root))) 
+   if ((output) && (_ecore_xcb_randr_root_validate(root)))
      {
-        if (_randr_version >= RANDR_1_3) 
+        if (_randr_version >= RANDR_1_3)
           {
              xcb_randr_get_screen_resources_current_reply_t *reply;
 
              reply = _ecore_xcb_randr_13_get_resources(root);
-             if (reply) 
+             if (reply)
                {
                   int len = 0, i = 0;
                   xcb_randr_output_t *outputs;
 
-                  len = 
+                  len =
                     xcb_randr_get_screen_resources_current_outputs_length(reply);
-                  outputs = 
+                  outputs =
                     xcb_randr_get_screen_resources_current_outputs(reply);
-                  for (i = 0; i < len; i++) 
+                  for (i = 0; i < len; i++)
                     {
-                       if (outputs[i] == output) 
+                       if (outputs[i] == output)
                          {
                             ret = EINA_TRUE;
                             break;
@@ -2336,21 +2476,21 @@ _ecore_xcb_randr_output_validate(Ecore_X_Window root, Ecore_X_Randr_Output outpu
                   free(reply);
                }
           }
-        else if (_randr_version == RANDR_1_2) 
+        else if (_randr_version == RANDR_1_2)
           {
              xcb_randr_get_screen_resources_reply_t *reply;
 
              reply = _ecore_xcb_randr_12_get_resources(root);
-             if (reply) 
+             if (reply)
                {
                   int len = 0, i = 0;
                   xcb_randr_output_t *outputs;
 
                   len = xcb_randr_get_screen_resources_outputs_length(reply);
                   outputs = xcb_randr_get_screen_resources_outputs(reply);
-                  for (i = 0; i < len; i++) 
+                  for (i = 0; i < len; i++)
                     {
-                       if (outputs[i] == output) 
+                       if (outputs[i] == output)
                          {
                             ret = EINA_TRUE;
                             break;
@@ -2370,8 +2510,9 @@ _ecore_xcb_randr_output_validate(Ecore_X_Window root, Ecore_X_Randr_Output outpu
  * @param crtc the CRTC to be validated.
  * @return in case it is found EINA_TRUE will be returned. Else EINA_FALSE is returned.
  */
-static Eina_Bool 
-_ecore_xcb_randr_crtc_validate(Ecore_X_Window root, Ecore_X_Randr_Crtc crtc) 
+static Eina_Bool
+_ecore_xcb_randr_crtc_validate(Ecore_X_Window     root,
+                               Ecore_X_Randr_Crtc crtc)
 {
    Eina_Bool ret = EINA_FALSE;
 
@@ -2384,22 +2525,22 @@ _ecore_xcb_randr_crtc_validate(Ecore_X_Window root, Ecore_X_Randr_Crtc crtc)
    if (((int)crtc == Ecore_X_Randr_None) || ((int)crtc == Ecore_X_Randr_Unset))
      return ret;
 
-   if ((crtc) && (_ecore_xcb_randr_root_validate(root))) 
+   if ((crtc) && (_ecore_xcb_randr_root_validate(root)))
      {
-        if (_randr_version >= RANDR_1_3) 
+        if (_randr_version >= RANDR_1_3)
           {
              xcb_randr_get_screen_resources_current_reply_t *reply;
 
              reply = _ecore_xcb_randr_13_get_resources(root);
-             if (reply) 
+             if (reply)
                {
                   int i = 0;
                   xcb_randr_crtc_t *crtcs;
 
                   crtcs = xcb_randr_get_screen_resources_current_crtcs(reply);
-                  for (i = 0; i < reply->num_crtcs; i++) 
+                  for (i = 0; i < reply->num_crtcs; i++)
                     {
-                       if (crtcs[i] == crtc) 
+                       if (crtcs[i] == crtc)
                          {
                             ret = EINA_TRUE;
                             break;
@@ -2408,20 +2549,20 @@ _ecore_xcb_randr_crtc_validate(Ecore_X_Window root, Ecore_X_Randr_Crtc crtc)
                   free(reply);
                }
           }
-        else if (_randr_version == RANDR_1_2) 
+        else if (_randr_version == RANDR_1_2)
           {
              xcb_randr_get_screen_resources_reply_t *reply;
 
              reply = _ecore_xcb_randr_12_get_resources(root);
-             if (reply) 
+             if (reply)
                {
                   int i = 0;
                   xcb_randr_crtc_t *crtcs;
 
                   crtcs = xcb_randr_get_screen_resources_crtcs(reply);
-                  for (i = 0; i < reply->num_crtcs; i++) 
+                  for (i = 0; i < reply->num_crtcs; i++)
                     {
-                       if (crtcs[i] == crtc) 
+                       if (crtcs[i] == crtc)
                          {
                             ret = EINA_TRUE;
                             break;
@@ -2437,30 +2578,33 @@ _ecore_xcb_randr_crtc_validate(Ecore_X_Window root, Ecore_X_Randr_Crtc crtc)
 }
 
 static Ecore_X_Randr_Mode *
-_ecore_xcb_randr_12_output_modes_get(Ecore_X_Window root, Ecore_X_Randr_Output output, int *num, int *npreferred) 
+_ecore_xcb_randr_12_output_modes_get(Ecore_X_Window       root,
+                                     Ecore_X_Randr_Output output,
+                                     int                 *num,
+                                     int                 *npreferred)
 {
    Ecore_X_Randr_Mode *modes = NULL;
    xcb_randr_get_screen_resources_reply_t *reply;
 
    reply = _ecore_xcb_randr_12_get_resources(root);
-   if (reply) 
+   if (reply)
      {
         xcb_randr_get_output_info_cookie_t ocookie;
         xcb_randr_get_output_info_reply_t *oreply;
 
-        ocookie = 
-          xcb_randr_get_output_info_unchecked(_ecore_xcb_conn, output, 
+        ocookie =
+          xcb_randr_get_output_info_unchecked(_ecore_xcb_conn, output,
                                               reply->config_timestamp);
-        oreply = xcb_randr_get_output_info_reply(_ecore_xcb_conn, 
+        oreply = xcb_randr_get_output_info_reply(_ecore_xcb_conn,
                                                  ocookie, NULL);
-        if (oreply) 
+        if (oreply)
           {
              if (num) *num = oreply->num_modes;
              if (npreferred) *npreferred = oreply->num_preferred;
 
-             modes = malloc(sizeof(Ecore_X_Randr_Mode) * 
+             modes = malloc(sizeof(Ecore_X_Randr_Mode) *
                             oreply->num_modes);
-             if (modes) 
+             if (modes)
                {
                   xcb_randr_mode_t *rmodes;
                   int len = 0;
@@ -2478,7 +2622,10 @@ _ecore_xcb_randr_12_output_modes_get(Ecore_X_Window root, Ecore_X_Randr_Output o
 }
 
 static Ecore_X_Randr_Mode *
-_ecore_xcb_randr_13_output_modes_get(Ecore_X_Window root, Ecore_X_Randr_Output output, int *num, int *npreferred) 
+_ecore_xcb_randr_13_output_modes_get(Ecore_X_Window       root,
+                                     Ecore_X_Randr_Output output,
+                                     int                 *num,
+                                     int                 *npreferred)
 {
    Ecore_X_Randr_Mode *modes = NULL;
    xcb_timestamp_t stamp = 0;
@@ -2487,16 +2634,16 @@ _ecore_xcb_randr_13_output_modes_get(Ecore_X_Window root, Ecore_X_Randr_Output o
 
    stamp = _ecore_xcb_randr_13_get_resource_timestamp(root);
 
-   ocookie = 
+   ocookie =
      xcb_randr_get_output_info_unchecked(_ecore_xcb_conn, output, stamp);
    oreply = xcb_randr_get_output_info_reply(_ecore_xcb_conn, ocookie, NULL);
-   if (oreply) 
+   if (oreply)
      {
         if (num) *num = oreply->num_modes;
         if (npreferred) *npreferred = oreply->num_preferred;
 
         modes = malloc(sizeof(Ecore_X_Randr_Mode) * oreply->num_modes);
-        if (modes) 
+        if (modes)
           {
              xcb_randr_mode_t *rmodes;
              int len = 0;
@@ -2512,13 +2659,14 @@ _ecore_xcb_randr_13_output_modes_get(Ecore_X_Window root, Ecore_X_Randr_Output o
 }
 
 static Ecore_X_Randr_Mode_Info *
-_ecore_xcb_randr_12_mode_info_get(Ecore_X_Window root, Ecore_X_Randr_Mode mode) 
+_ecore_xcb_randr_12_mode_info_get(Ecore_X_Window     root,
+                                  Ecore_X_Randr_Mode mode)
 {
    Ecore_X_Randr_Mode_Info *ret = NULL;
    xcb_randr_get_screen_resources_reply_t *reply;
 
    reply = _ecore_xcb_randr_12_get_resources(root);
-   if (reply) 
+   if (reply)
      {
         if ((ret = malloc(sizeof(Ecore_X_Randr_Mode_Info))))
           {
@@ -2527,14 +2675,14 @@ _ecore_xcb_randr_12_mode_info_get(Ecore_X_Window root, Ecore_X_Randr_Mode mode)
 
              nbuf = xcb_randr_get_screen_resources_names(reply);
              miter = xcb_randr_get_screen_resources_modes_iterator(reply);
-             while (miter.rem) 
+             while (miter.rem)
                {
                   xcb_randr_mode_info_t *minfo;
 
                   minfo = miter.data;
                   nbuf += minfo->name_len;
 
-                  if (minfo->id == mode) 
+                  if (minfo->id == mode)
                     {
                        ret->xid = minfo->id;
                        ret->width = minfo->width;
@@ -2550,10 +2698,10 @@ _ecore_xcb_randr_12_mode_info_get(Ecore_X_Window root, Ecore_X_Randr_Mode mode)
 
                        ret->name = NULL;
                        ret->nameLength = minfo->name_len;
-                       if (ret->nameLength > 0) 
+                       if (ret->nameLength > 0)
                          {
                             ret->name = malloc(ret->nameLength + 1);
-                            if (ret->name) 
+                            if (ret->name)
                               memcpy(ret->name, nbuf, ret->nameLength + 1);
                          }
 
@@ -2569,13 +2717,14 @@ _ecore_xcb_randr_12_mode_info_get(Ecore_X_Window root, Ecore_X_Randr_Mode mode)
 }
 
 static Ecore_X_Randr_Mode_Info *
-_ecore_xcb_randr_13_mode_info_get(Ecore_X_Window root, Ecore_X_Randr_Mode mode) 
+_ecore_xcb_randr_13_mode_info_get(Ecore_X_Window     root,
+                                  Ecore_X_Randr_Mode mode)
 {
    Ecore_X_Randr_Mode_Info *ret = NULL;
    xcb_randr_get_screen_resources_current_reply_t *reply;
 
    reply = _ecore_xcb_randr_13_get_resources(root);
-   if (reply) 
+   if (reply)
      {
         if ((ret = malloc(sizeof(Ecore_X_Randr_Mode_Info))))
           {
@@ -2583,16 +2732,16 @@ _ecore_xcb_randr_13_mode_info_get(Ecore_X_Window root, Ecore_X_Randr_Mode mode)
              xcb_randr_mode_info_iterator_t miter;
 
              nbuf = xcb_randr_get_screen_resources_current_names(reply);
-             miter = 
+             miter =
                xcb_randr_get_screen_resources_current_modes_iterator(reply);
-             while (miter.rem) 
+             while (miter.rem)
                {
                   xcb_randr_mode_info_t *minfo;
 
                   minfo = miter.data;
                   nbuf += minfo->name_len;
 
-                  if (minfo->id == mode) 
+                  if (minfo->id == mode)
                     {
                        ret->xid = minfo->id;
                        ret->width = minfo->width;
@@ -2608,10 +2757,10 @@ _ecore_xcb_randr_13_mode_info_get(Ecore_X_Window root, Ecore_X_Randr_Mode mode)
 
                        ret->name = NULL;
                        ret->nameLength = minfo->name_len;
-                       if (ret->nameLength > 0) 
+                       if (ret->nameLength > 0)
                          {
                             ret->name = malloc(ret->nameLength + 1);
-                            if (ret->name) 
+                            if (ret->name)
                               memcpy(ret->name, nbuf, ret->nameLength + 1);
                          }
 
@@ -2627,17 +2776,18 @@ _ecore_xcb_randr_13_mode_info_get(Ecore_X_Window root, Ecore_X_Randr_Mode mode)
 }
 
 static Ecore_X_Randr_Mode_Info **
-_ecore_xcb_randr_12_modes_info_get(Ecore_X_Window root, int *num) 
+_ecore_xcb_randr_12_modes_info_get(Ecore_X_Window root,
+                                   int           *num)
 {
    Ecore_X_Randr_Mode_Info **ret = NULL;
    xcb_randr_get_screen_resources_reply_t *reply;
 
    reply = _ecore_xcb_randr_12_get_resources(root);
-   if (reply) 
+   if (reply)
      {
         if (num) *num = reply->num_modes;
         ret = malloc(sizeof(Ecore_X_Randr_Mode_Info *) * reply->num_modes);
-        if (ret) 
+        if (ret)
           {
              xcb_randr_mode_info_iterator_t miter;
              int i = 0;
@@ -2645,13 +2795,13 @@ _ecore_xcb_randr_12_modes_info_get(Ecore_X_Window root, int *num)
 
              nbuf = xcb_randr_get_screen_resources_names(reply);
              miter = xcb_randr_get_screen_resources_modes_iterator(reply);
-             while (miter.rem) 
+             while (miter.rem)
                {
                   xcb_randr_mode_info_t *minfo;
 
                   minfo = miter.data;
                   nbuf += minfo->name_len;
-                  if ((ret[i] = malloc(sizeof(Ecore_X_Randr_Mode_Info)))) 
+                  if ((ret[i] = malloc(sizeof(Ecore_X_Randr_Mode_Info))))
                     {
                        ret[i]->xid = minfo->id;
                        ret[i]->width = minfo->width;
@@ -2667,17 +2817,17 @@ _ecore_xcb_randr_12_modes_info_get(Ecore_X_Window root, int *num)
 
                        ret[i]->name = NULL;
                        ret[i]->nameLength = minfo->name_len;
-                       if (ret[i]->nameLength > 0) 
+                       if (ret[i]->nameLength > 0)
                          {
                             ret[i]->name = malloc(ret[i]->nameLength + 1);
-                            if (ret[i]->name) 
-                              memcpy(ret[i]->name, nbuf, 
+                            if (ret[i]->name)
+                              memcpy(ret[i]->name, nbuf,
                                      ret[i]->nameLength + 1);
                          }
                     }
-                  else 
+                  else
                     {
-                       while (i > 0) 
+                       while (i > 0)
                          free(ret[--i]);
                        free(ret);
                        ret = NULL;
@@ -2693,32 +2843,33 @@ _ecore_xcb_randr_12_modes_info_get(Ecore_X_Window root, int *num)
 }
 
 static Ecore_X_Randr_Mode_Info **
-_ecore_xcb_randr_13_modes_info_get(Ecore_X_Window root, int *num) 
+_ecore_xcb_randr_13_modes_info_get(Ecore_X_Window root,
+                                   int           *num)
 {
    Ecore_X_Randr_Mode_Info **ret = NULL;
    xcb_randr_get_screen_resources_current_reply_t *reply;
 
    reply = _ecore_xcb_randr_13_get_resources(root);
-   if (reply) 
+   if (reply)
      {
         if (num) *num = reply->num_modes;
         ret = malloc(sizeof(Ecore_X_Randr_Mode_Info *) * reply->num_modes);
-        if (ret) 
+        if (ret)
           {
              xcb_randr_mode_info_iterator_t miter;
              int i = 0;
              uint8_t *nbuf;
 
              nbuf = xcb_randr_get_screen_resources_current_names(reply);
-             miter = 
+             miter =
                xcb_randr_get_screen_resources_current_modes_iterator(reply);
-             while (miter.rem) 
+             while (miter.rem)
                {
                   xcb_randr_mode_info_t *minfo;
 
                   minfo = miter.data;
                   nbuf += minfo->name_len;
-                  if ((ret[i] = malloc(sizeof(Ecore_X_Randr_Mode_Info)))) 
+                  if ((ret[i] = malloc(sizeof(Ecore_X_Randr_Mode_Info))))
                     {
                        ret[i]->xid = minfo->id;
                        ret[i]->width = minfo->width;
@@ -2734,17 +2885,17 @@ _ecore_xcb_randr_13_modes_info_get(Ecore_X_Window root, int *num)
 
                        ret[i]->name = NULL;
                        ret[i]->nameLength = minfo->name_len;
-                       if (ret[i]->nameLength > 0) 
+                       if (ret[i]->nameLength > 0)
                          {
                             ret[i]->name = malloc(ret[i]->nameLength + 1);
-                            if (ret[i]->name) 
-                              memcpy(ret[i]->name, nbuf, 
+                            if (ret[i]->name)
+                              memcpy(ret[i]->name, nbuf,
                                      ret[i]->nameLength + 1);
                          }
                     }
-                  else 
+                  else
                     {
-                       while (i > 0) 
+                       while (i > 0)
                          free(ret[--i]);
                        free(ret);
                        ret = NULL;
@@ -2759,23 +2910,26 @@ _ecore_xcb_randr_13_modes_info_get(Ecore_X_Window root, int *num)
    return ret;
 }
 
-static void 
-_ecore_xcb_randr_12_mode_size_get(Ecore_X_Window root, Ecore_X_Randr_Mode mode, int *w, int *h) 
+static void
+_ecore_xcb_randr_12_mode_size_get(Ecore_X_Window     root,
+                                  Ecore_X_Randr_Mode mode,
+                                  int               *w,
+                                  int               *h)
 {
    xcb_randr_get_screen_resources_reply_t *reply;
 
    reply = _ecore_xcb_randr_12_get_resources(root);
-   if (reply) 
+   if (reply)
      {
         xcb_randr_mode_info_iterator_t miter;
 
         miter = xcb_randr_get_screen_resources_modes_iterator(reply);
-        while (miter.rem) 
+        while (miter.rem)
           {
              xcb_randr_mode_info_t *minfo;
 
              minfo = miter.data;
-             if (minfo->id == mode) 
+             if (minfo->id == mode)
                {
                   if (w) *w = minfo->width;
                   if (h) *h = minfo->height;
@@ -2787,23 +2941,26 @@ _ecore_xcb_randr_12_mode_size_get(Ecore_X_Window root, Ecore_X_Randr_Mode mode,
      }
 }
 
-static void 
-_ecore_xcb_randr_13_mode_size_get(Ecore_X_Window root, Ecore_X_Randr_Mode mode, int *w, int *h) 
+static void
+_ecore_xcb_randr_13_mode_size_get(Ecore_X_Window     root,
+                                  Ecore_X_Randr_Mode mode,
+                                  int               *w,
+                                  int               *h)
 {
    xcb_randr_get_screen_resources_current_reply_t *reply;
 
    reply = _ecore_xcb_randr_13_get_resources(root);
-   if (reply) 
+   if (reply)
      {
         xcb_randr_mode_info_iterator_t miter;
 
         miter = xcb_randr_get_screen_resources_current_modes_iterator(reply);
-        while (miter.rem) 
+        while (miter.rem)
           {
              xcb_randr_mode_info_t *minfo;
 
              minfo = miter.data;
-             if (minfo->id == mode) 
+             if (minfo->id == mode)
                {
                   if (w) *w = minfo->width;
                   if (h) *h = minfo->height;
@@ -2816,31 +2973,33 @@ _ecore_xcb_randr_13_mode_size_get(Ecore_X_Window root, Ecore_X_Randr_Mode mode,
 }
 
 static Ecore_X_Randr_Output *
-_ecore_xcb_randr_12_output_clones_get(Ecore_X_Window root, Ecore_X_Randr_Output output, int *num) 
+_ecore_xcb_randr_12_output_clones_get(Ecore_X_Window       root,
+                                      Ecore_X_Randr_Output output,
+                                      int                 *num)
 {
    Ecore_X_Randr_Output *outputs = NULL;
    xcb_randr_get_screen_resources_reply_t *reply;
 
    reply = _ecore_xcb_randr_12_get_resources(root);
-   if (reply) 
+   if (reply)
      {
         xcb_randr_get_output_info_cookie_t ocookie;
         xcb_randr_get_output_info_reply_t *oreply;
 
-        ocookie = 
-          xcb_randr_get_output_info_unchecked(_ecore_xcb_conn, output, 
+        ocookie =
+          xcb_randr_get_output_info_unchecked(_ecore_xcb_conn, output,
                                               reply->config_timestamp);
-        oreply = xcb_randr_get_output_info_reply(_ecore_xcb_conn, 
+        oreply = xcb_randr_get_output_info_reply(_ecore_xcb_conn,
                                                  ocookie, NULL);
-        if (oreply) 
+        if (oreply)
           {
              if (num) *num = oreply->num_clones;
 
-             outputs = 
+             outputs =
                malloc(sizeof(Ecore_X_Randr_Output) * oreply->num_clones);
-             if (outputs) 
+             if (outputs)
                {
-                  memcpy(outputs, xcb_randr_get_output_info_clones(oreply), 
+                  memcpy(outputs, xcb_randr_get_output_info_clones(oreply),
                          sizeof(Ecore_X_Randr_Output) * oreply->num_clones);
                }
              free(oreply);
@@ -2851,31 +3010,33 @@ _ecore_xcb_randr_12_output_clones_get(Ecore_X_Window root, Ecore_X_Randr_Output
 }
 
 static Ecore_X_Randr_Output *
-_ecore_xcb_randr_13_output_clones_get(Ecore_X_Window root, Ecore_X_Randr_Output output, int *num) 
+_ecore_xcb_randr_13_output_clones_get(Ecore_X_Window       root,
+                                      Ecore_X_Randr_Output output,
+                                      int                 *num)
 {
    Ecore_X_Randr_Output *outputs = NULL;
    xcb_randr_get_screen_resources_current_reply_t *reply;
 
    reply = _ecore_xcb_randr_13_get_resources(root);
-   if (reply) 
+   if (reply)
      {
         xcb_randr_get_output_info_cookie_t ocookie;
         xcb_randr_get_output_info_reply_t *oreply;
 
-        ocookie = 
-          xcb_randr_get_output_info_unchecked(_ecore_xcb_conn, output, 
+        ocookie =
+          xcb_randr_get_output_info_unchecked(_ecore_xcb_conn, output,
                                               reply->config_timestamp);
-        oreply = xcb_randr_get_output_info_reply(_ecore_xcb_conn, 
+        oreply = xcb_randr_get_output_info_reply(_ecore_xcb_conn,
                                                  ocookie, NULL);
-        if (oreply) 
+        if (oreply)
           {
              if (num) *num = oreply->num_clones;
 
-             outputs = 
+             outputs =
                malloc(sizeof(Ecore_X_Randr_Output) * oreply->num_clones);
-             if (outputs) 
+             if (outputs)
                {
-                  memcpy(outputs, xcb_randr_get_output_info_clones(oreply), 
+                  memcpy(outputs, xcb_randr_get_output_info_clones(oreply),
                          sizeof(Ecore_X_Randr_Output) * oreply->num_clones);
                }
              free(oreply);
@@ -2886,30 +3047,32 @@ _ecore_xcb_randr_13_output_clones_get(Ecore_X_Window root, Ecore_X_Randr_Output
 }
 
 static Ecore_X_Randr_Crtc *
-_ecore_xcb_randr_12_output_possible_crtcs_get(Ecore_X_Window root, Ecore_X_Randr_Output output, int *num) 
+_ecore_xcb_randr_12_output_possible_crtcs_get(Ecore_X_Window       root,
+                                              Ecore_X_Randr_Output output,
+                                              int                 *num)
 {
    Ecore_X_Randr_Crtc *crtcs = NULL;
    xcb_randr_get_screen_resources_reply_t *reply;
 
    reply = _ecore_xcb_randr_12_get_resources(root);
-   if (reply) 
+   if (reply)
      {
         xcb_randr_get_output_info_cookie_t ocookie;
         xcb_randr_get_output_info_reply_t *oreply;
 
-        ocookie = 
-          xcb_randr_get_output_info_unchecked(_ecore_xcb_conn, output, 
+        ocookie =
+          xcb_randr_get_output_info_unchecked(_ecore_xcb_conn, output,
                                               reply->config_timestamp);
-        oreply = xcb_randr_get_output_info_reply(_ecore_xcb_conn, 
+        oreply = xcb_randr_get_output_info_reply(_ecore_xcb_conn,
                                                  ocookie, NULL);
-        if (oreply) 
+        if (oreply)
           {
              if (num) *num = oreply->num_crtcs;
 
              crtcs = malloc(sizeof(Ecore_X_Randr_Crtc) * oreply->num_crtcs);
-             if (crtcs) 
+             if (crtcs)
                {
-                  memcpy(crtcs, xcb_randr_get_output_info_crtcs(oreply), 
+                  memcpy(crtcs, xcb_randr_get_output_info_crtcs(oreply),
                          sizeof(Ecore_X_Randr_Crtc) * oreply->num_crtcs);
                }
              free(oreply);
@@ -2920,7 +3083,9 @@ _ecore_xcb_randr_12_output_possible_crtcs_get(Ecore_X_Window root, Ecore_X_Randr
 }
 
 static Ecore_X_Randr_Crtc *
-_ecore_xcb_randr_13_output_possible_crtcs_get(Ecore_X_Window root, Ecore_X_Randr_Output output, int *num) 
+_ecore_xcb_randr_13_output_possible_crtcs_get(Ecore_X_Window       root,
+                                              Ecore_X_Randr_Output output,
+                                              int                 *num)
 {
    Ecore_X_Randr_Crtc *crtcs = NULL;
    xcb_randr_get_screen_resources_current_reply_t *reply;
@@ -2931,19 +3096,19 @@ _ecore_xcb_randr_13_output_possible_crtcs_get(Ecore_X_Window root, Ecore_X_Randr
         xcb_randr_get_output_info_cookie_t ocookie;
         xcb_randr_get_output_info_reply_t *oreply;
 
-        ocookie = 
-          xcb_randr_get_output_info_unchecked(_ecore_xcb_conn, output, 
+        ocookie =
+          xcb_randr_get_output_info_unchecked(_ecore_xcb_conn, output,
                                               reply->config_timestamp);
-        oreply = xcb_randr_get_output_info_reply(_ecore_xcb_conn, 
+        oreply = xcb_randr_get_output_info_reply(_ecore_xcb_conn,
                                                  ocookie, NULL);
-        if (oreply) 
+        if (oreply)
           {
              if (num) *num = oreply->num_crtcs;
 
              crtcs = malloc(sizeof(Ecore_X_Randr_Crtc) * oreply->num_crtcs);
-             if (crtcs) 
+             if (crtcs)
                {
-                  memcpy(crtcs, xcb_randr_get_output_info_crtcs(oreply), 
+                  memcpy(crtcs, xcb_randr_get_output_info_crtcs(oreply),
                          sizeof(Ecore_X_Randr_Crtc) * oreply->num_crtcs);
                }
              free(oreply);
@@ -2954,23 +3119,25 @@ _ecore_xcb_randr_13_output_possible_crtcs_get(Ecore_X_Window root, Ecore_X_Randr
 }
 
 static char *
-_ecore_xcb_randr_12_output_name_get(Ecore_X_Window root, Ecore_X_Randr_Output output, int *len) 
+_ecore_xcb_randr_12_output_name_get(Ecore_X_Window       root,
+                                    Ecore_X_Randr_Output output,
+                                    int                 *len)
 {
    char *ret = NULL;
    xcb_randr_get_screen_resources_reply_t *reply;
 
    reply = _ecore_xcb_randr_12_get_resources(root);
-   if (reply) 
+   if (reply)
      {
         xcb_randr_get_output_info_cookie_t ocookie;
         xcb_randr_get_output_info_reply_t *oreply;
 
-        ocookie = 
-          xcb_randr_get_output_info_unchecked(_ecore_xcb_conn, output, 
+        ocookie =
+          xcb_randr_get_output_info_unchecked(_ecore_xcb_conn, output,
                                               reply->config_timestamp);
-        oreply = xcb_randr_get_output_info_reply(_ecore_xcb_conn, 
+        oreply = xcb_randr_get_output_info_reply(_ecore_xcb_conn,
                                                  ocookie, NULL);
-        if (oreply) 
+        if (oreply)
           {
              uint8_t *nbuf;
 
@@ -2978,7 +3145,7 @@ _ecore_xcb_randr_12_output_name_get(Ecore_X_Window root, Ecore_X_Randr_Output ou
              nbuf += oreply->name_len;
 
              if (len) *len = oreply->name_len;
-             if (oreply->name_len > 0) 
+             if (oreply->name_len > 0)
                {
                   ret = malloc(oreply->name_len + 1);
                   if (ret)
@@ -2993,23 +3160,25 @@ _ecore_xcb_randr_12_output_name_get(Ecore_X_Window root, Ecore_X_Randr_Output ou
 }
 
 static char *
-_ecore_xcb_randr_13_output_name_get(Ecore_X_Window root, Ecore_X_Randr_Output output, int *len) 
+_ecore_xcb_randr_13_output_name_get(Ecore_X_Window       root,
+                                    Ecore_X_Randr_Output output,
+                                    int                 *len)
 {
    char *ret = NULL;
    xcb_randr_get_screen_resources_current_reply_t *reply;
 
    reply = _ecore_xcb_randr_13_get_resources(root);
-   if (reply) 
+   if (reply)
      {
         xcb_randr_get_output_info_cookie_t ocookie;
         xcb_randr_get_output_info_reply_t *oreply;
 
-        ocookie = 
-          xcb_randr_get_output_info_unchecked(_ecore_xcb_conn, output, 
+        ocookie =
+          xcb_randr_get_output_info_unchecked(_ecore_xcb_conn, output,
                                               reply->config_timestamp);
-        oreply = xcb_randr_get_output_info_reply(_ecore_xcb_conn, 
+        oreply = xcb_randr_get_output_info_reply(_ecore_xcb_conn,
                                                  ocookie, NULL);
-        if (oreply) 
+        if (oreply)
           {
              uint8_t *nbuf;
 
@@ -3017,7 +3186,7 @@ _ecore_xcb_randr_13_output_name_get(Ecore_X_Window root, Ecore_X_Randr_Output ou
              nbuf += oreply->name_len;
 
              if (len) *len = oreply->name_len;
-             if (oreply->name_len > 0) 
+             if (oreply->name_len > 0)
                {
                   ret = malloc(oreply->name_len + 1);
                   if (ret)
@@ -3031,24 +3200,25 @@ _ecore_xcb_randr_13_output_name_get(Ecore_X_Window root, Ecore_X_Randr_Output ou
    return ret;
 }
 
-static Ecore_X_Randr_Connection_Status 
-_ecore_xcb_randr_12_output_connection_status_get(Ecore_X_Window root, Ecore_X_Randr_Output output) 
+static Ecore_X_Randr_Connection_Status
+_ecore_xcb_randr_12_output_connection_status_get(Ecore_X_Window       root,
+                                                 Ecore_X_Randr_Output output)
 {
    Ecore_X_Randr_Connection_Status ret = ECORE_X_RANDR_CONNECTION_STATUS_UNKNOWN;
    xcb_randr_get_screen_resources_reply_t *reply;
 
    reply = _ecore_xcb_randr_12_get_resources(root);
-   if (reply) 
+   if (reply)
      {
         xcb_randr_get_output_info_cookie_t ocookie;
         xcb_randr_get_output_info_reply_t *oreply;
 
-        ocookie = 
-          xcb_randr_get_output_info_unchecked(_ecore_xcb_conn, output, 
+        ocookie =
+          xcb_randr_get_output_info_unchecked(_ecore_xcb_conn, output,
                                               reply->config_timestamp);
-        oreply = xcb_randr_get_output_info_reply(_ecore_xcb_conn, 
+        oreply = xcb_randr_get_output_info_reply(_ecore_xcb_conn,
                                                  ocookie, NULL);
-        if (oreply) 
+        if (oreply)
           {
              ret = oreply->connection;
              free(oreply);
@@ -3058,24 +3228,25 @@ _ecore_xcb_randr_12_output_connection_status_get(Ecore_X_Window root, Ecore_X_Ra
    return ret;
 }
 
-static Ecore_X_Randr_Connection_Status 
-_ecore_xcb_randr_13_output_connection_status_get(Ecore_X_Window root, Ecore_X_Randr_Output output) 
+static Ecore_X_Randr_Connection_Status
+_ecore_xcb_randr_13_output_connection_status_get(Ecore_X_Window       root,
+                                                 Ecore_X_Randr_Output output)
 {
    Ecore_X_Randr_Connection_Status ret = ECORE_X_RANDR_CONNECTION_STATUS_UNKNOWN;
    xcb_randr_get_screen_resources_current_reply_t *reply;
 
    reply = _ecore_xcb_randr_13_get_resources(root);
-   if (reply) 
+   if (reply)
      {
         xcb_randr_get_output_info_cookie_t ocookie;
         xcb_randr_get_output_info_reply_t *oreply;
 
-        ocookie = 
-          xcb_randr_get_output_info_unchecked(_ecore_xcb_conn, output, 
+        ocookie =
+          xcb_randr_get_output_info_unchecked(_ecore_xcb_conn, output,
                                               reply->config_timestamp);
-        oreply = xcb_randr_get_output_info_reply(_ecore_xcb_conn, 
+        oreply = xcb_randr_get_output_info_reply(_ecore_xcb_conn,
                                                  ocookie, NULL);
-        if (oreply) 
+        if (oreply)
           {
              ret = oreply->connection;
              free(oreply);
@@ -3086,18 +3257,19 @@ _ecore_xcb_randr_13_output_connection_status_get(Ecore_X_Window root, Ecore_X_Ra
 }
 
 static Ecore_X_Randr_Output *
-_ecore_xcb_randr_12_outputs_get(Ecore_X_Window root, int *num) 
+_ecore_xcb_randr_12_outputs_get(Ecore_X_Window root,
+                                int           *num)
 {
    Ecore_X_Randr_Output *ret = NULL;
    xcb_randr_get_screen_resources_reply_t *reply;
 
    reply = _ecore_xcb_randr_12_get_resources(root);
-   if (reply) 
+   if (reply)
      {
         if (num) *num = reply->num_outputs;
         ret = malloc(sizeof(Ecore_X_Randr_Output) * reply->num_outputs);
-        if (ret) 
-          memcpy(ret, xcb_randr_get_screen_resources_outputs(reply), 
+        if (ret)
+          memcpy(ret, xcb_randr_get_screen_resources_outputs(reply),
                  sizeof(Ecore_X_Randr_Output) * reply->num_outputs);
         free(reply);
      }
@@ -3105,42 +3277,44 @@ _ecore_xcb_randr_12_outputs_get(Ecore_X_Window root, int *num)
 }
 
 static Ecore_X_Randr_Output *
-_ecore_xcb_randr_13_outputs_get(Ecore_X_Window root, int *num) 
+_ecore_xcb_randr_13_outputs_get(Ecore_X_Window root,
+                                int           *num)
 {
    Ecore_X_Randr_Output *ret = NULL;
    xcb_randr_get_screen_resources_current_reply_t *reply;
 
    reply = _ecore_xcb_randr_13_get_resources(root);
-   if (reply) 
+   if (reply)
      {
         if (num) *num = reply->num_outputs;
         ret = malloc(sizeof(Ecore_X_Randr_Output) * reply->num_outputs);
-        if (ret) 
-          memcpy(ret, xcb_randr_get_screen_resources_current_outputs(reply), 
+        if (ret)
+          memcpy(ret, xcb_randr_get_screen_resources_current_outputs(reply),
                  sizeof(Ecore_X_Randr_Output) * reply->num_outputs);
         free(reply);
      }
    return ret;
 }
 
-static Ecore_X_Randr_Crtc 
-_ecore_xcb_randr_12_output_crtc_get(Ecore_X_Window root, Ecore_X_Randr_Output output) 
+static Ecore_X_Randr_Crtc
+_ecore_xcb_randr_12_output_crtc_get(Ecore_X_Window       root,
+                                    Ecore_X_Randr_Output output)
 {
    Ecore_X_Randr_Crtc ret = Ecore_X_Randr_None;
    xcb_randr_get_screen_resources_reply_t *reply;
 
    reply = _ecore_xcb_randr_12_get_resources(root);
-   if (reply) 
+   if (reply)
      {
         xcb_randr_get_output_info_cookie_t ocookie;
         xcb_randr_get_output_info_reply_t *oreply;
 
-        ocookie = 
-          xcb_randr_get_output_info_unchecked(_ecore_xcb_conn, output, 
+        ocookie =
+          xcb_randr_get_output_info_unchecked(_ecore_xcb_conn, output,
                                               reply->config_timestamp);
-        oreply = xcb_randr_get_output_info_reply(_ecore_xcb_conn, 
+        oreply = xcb_randr_get_output_info_reply(_ecore_xcb_conn,
                                                  ocookie, NULL);
-        if (oreply) 
+        if (oreply)
           {
              ret = oreply->crtc;
              free(oreply);
@@ -3150,24 +3324,25 @@ _ecore_xcb_randr_12_output_crtc_get(Ecore_X_Window root, Ecore_X_Randr_Output ou
    return ret;
 }
 
-static Ecore_X_Randr_Crtc 
-_ecore_xcb_randr_13_output_crtc_get(Ecore_X_Window root, Ecore_X_Randr_Output output) 
+static Ecore_X_Randr_Crtc
+_ecore_xcb_randr_13_output_crtc_get(Ecore_X_Window       root,
+                                    Ecore_X_Randr_Output output)
 {
    Ecore_X_Randr_Crtc ret = Ecore_X_Randr_None;
    xcb_randr_get_screen_resources_current_reply_t *reply;
 
    reply = _ecore_xcb_randr_13_get_resources(root);
-   if (reply) 
+   if (reply)
      {
         xcb_randr_get_output_info_cookie_t ocookie;
         xcb_randr_get_output_info_reply_t *oreply;
 
-        ocookie = 
-          xcb_randr_get_output_info_unchecked(_ecore_xcb_conn, output, 
+        ocookie =
+          xcb_randr_get_output_info_unchecked(_ecore_xcb_conn, output,
                                               reply->config_timestamp);
-        oreply = xcb_randr_get_output_info_reply(_ecore_xcb_conn, 
+        oreply = xcb_randr_get_output_info_reply(_ecore_xcb_conn,
                                                  ocookie, NULL);
-        if (oreply) 
+        if (oreply)
           {
              ret = oreply->crtc;
              free(oreply);
@@ -3194,16 +3369,16 @@ _ecore_xcb_randr_13_get_resources(Ecore_X_Window win)
    xcb_randr_get_screen_resources_current_cookie_t cookie;
    xcb_randr_get_screen_resources_current_reply_t *reply;
 
-   cookie = 
+   cookie =
      xcb_randr_get_screen_resources_current_unchecked(_ecore_xcb_conn, win);
-   reply = 
-     xcb_randr_get_screen_resources_current_reply(_ecore_xcb_conn, 
+   reply =
+     xcb_randr_get_screen_resources_current_reply(_ecore_xcb_conn,
                                                   cookie, NULL);
    return reply;
 }
 
-static xcb_timestamp_t 
-_ecore_xcb_randr_12_get_resource_timestamp(Ecore_X_Window win) 
+static xcb_timestamp_t
+_ecore_xcb_randr_12_get_resource_timestamp(Ecore_X_Window win)
 {
    xcb_timestamp_t stamp = 0;
    xcb_randr_get_screen_resources_reply_t *reply;
@@ -3214,8 +3389,8 @@ _ecore_xcb_randr_12_get_resource_timestamp(Ecore_X_Window win)
    return stamp;
 }
 
-static xcb_timestamp_t 
-_ecore_xcb_randr_13_get_resource_timestamp(Ecore_X_Window win) 
+static xcb_timestamp_t
+_ecore_xcb_randr_13_get_resource_timestamp(Ecore_X_Window win)
 {
    xcb_timestamp_t stamp = 0;
    xcb_randr_get_screen_resources_current_reply_t *reply;
@@ -3225,3 +3400,4 @@ _ecore_xcb_randr_13_get_resource_timestamp(Ecore_X_Window win)
    free(reply);
    return stamp;
 }
+
index 0b6ff46..a221d8f 100644 (file)
@@ -31,7 +31,8 @@ ecore_x_xregion_free(Ecore_X_XRegion *region)
 }
 
 EAPI Eina_Bool
-ecore_x_xregion_set(Ecore_X_XRegion *region, Ecore_X_GC gc)
+ecore_x_xregion_set(Ecore_X_XRegion *region,
+                    Ecore_X_GC       gc)
 {
    xcb_rectangle_t *rects;
    pixman_box16_t *boxes;
@@ -63,7 +64,9 @@ 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)
+ecore_x_xregion_translate(Ecore_X_XRegion *region,
+                          int              x,
+                          int              y)
 {
    if (!region) return;
 
@@ -71,34 +74,42 @@ ecore_x_xregion_translate(Ecore_X_XRegion *region, int x, int y)
 }
 
 EAPI Eina_Bool
-ecore_x_xregion_intersect(Ecore_X_XRegion *dst, Ecore_X_XRegion *r1, Ecore_X_XRegion *r2)
+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, 
+   return pixman_region_intersect((pixman_region16_t *)dst,
+                                  (pixman_region16_t *)r1,
                                   (pixman_region16_t *)r2);
 }
 
 EAPI Eina_Bool
-ecore_x_xregion_union(Ecore_X_XRegion *dst, Ecore_X_XRegion *r1, Ecore_X_XRegion *r2)
+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, 
+   return pixman_region_union((pixman_region16_t *)dst,
+                              (pixman_region16_t *)r1,
                               (pixman_region16_t *)r2);
 }
 
 EAPI Eina_Bool
-ecore_x_xregion_union_rect(Ecore_X_XRegion *dst, Ecore_X_XRegion *src, Ecore_X_Rectangle *rect)
+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, 
+   return pixman_region_union_rect((pixman_region16_t *)dst,
                                    (pixman_region16_t *)src,
                                    rect->x, rect->y, rect->width, rect->height);
 }
 
 EAPI Eina_Bool
-ecore_x_xregion_subtract(Ecore_X_XRegion *dst, Ecore_X_XRegion *rm, Ecore_X_XRegion *rs)
+ecore_x_xregion_subtract(Ecore_X_XRegion *dst,
+                         Ecore_X_XRegion *rm,
+                         Ecore_X_XRegion *rs)
 {
-   return pixman_region_subtract((pixman_region16_t *)dst, 
-                                 (pixman_region16_t *)rm, 
+   return pixman_region_subtract((pixman_region16_t *)dst,
+                                 (pixman_region16_t *)rm,
                                  (pixman_region16_t *)rs);
 }
 
@@ -111,16 +122,19 @@ ecore_x_xregion_is_empty(Ecore_X_XRegion *region)
 }
 
 EAPI Eina_Bool
-ecore_x_xregion_is_equal(Ecore_X_XRegion *r1, Ecore_X_XRegion *r2)
+ecore_x_xregion_is_equal(Ecore_X_XRegion *r1,
+                         Ecore_X_XRegion *r2)
 {
    if ((!r1) || (!r2)) return EINA_FALSE;
 
-   return pixman_region_equal((pixman_region16_t *)r1, 
+   return pixman_region_equal((pixman_region16_t *)r1,
                               (pixman_region16_t *)r2);
 }
 
 EAPI Eina_Bool
-ecore_x_xregion_point_contain(Ecore_X_XRegion *region, int x, int y)
+ecore_x_xregion_point_contain(Ecore_X_XRegion *region,
+                              int              x,
+                              int              y)
 {
    if (!region) return EINA_FALSE;
 
@@ -128,7 +142,8 @@ ecore_x_xregion_point_contain(Ecore_X_XRegion *region, int x, int y)
 }
 
 EAPI Eina_Bool
-ecore_x_xregion_rect_contain(Ecore_X_XRegion *region, Ecore_X_Rectangle *rect)
+ecore_x_xregion_rect_contain(Ecore_X_XRegion   *region,
+                             Ecore_X_Rectangle *rect)
 {
    pixman_box16_t box;
 
@@ -141,3 +156,4 @@ ecore_x_xregion_rect_contain(Ecore_X_XRegion *region, Ecore_X_Rectangle *rect)
 
    return pixman_region_contains_rectangle((pixman_region16_t *)region, &box);
 }
+
index 2301f7e..f36b4d2 100644 (file)
@@ -13,8 +13,8 @@ static Eina_Bool _render_avail = EINA_FALSE;
 static Eina_Bool _render_argb = EINA_FALSE;
 static Eina_Bool _render_anim = EINA_FALSE;
 
-void 
-_ecore_xcb_render_init(void) 
+void
+_ecore_xcb_render_init(void)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
 
@@ -23,8 +23,8 @@ _ecore_xcb_render_init(void)
 #endif
 }
 
-void 
-_ecore_xcb_render_finalize(void) 
+void
+_ecore_xcb_render_finalize(void)
 {
 #ifdef ECORE_XCB_RENDER
    const xcb_query_extension_reply_t *ext_reply;
@@ -34,72 +34,72 @@ _ecore_xcb_render_finalize(void)
 
 #ifdef ECORE_XCB_RENDER
    ext_reply = xcb_get_extension_data(_ecore_xcb_conn, &xcb_render_id);
-   if ((ext_reply) && (ext_reply->present)) 
+   if ((ext_reply) && (ext_reply->present))
      {
         xcb_render_query_version_cookie_t cookie;
         xcb_render_query_version_reply_t *reply;
 
-        cookie = 
-          xcb_render_query_version_unchecked(_ecore_xcb_conn, 
-                                             XCB_RENDER_MAJOR_VERSION, 
+        cookie =
+          xcb_render_query_version_unchecked(_ecore_xcb_conn,
+                                             XCB_RENDER_MAJOR_VERSION,
                                              XCB_RENDER_MINOR_VERSION);
         reply = xcb_render_query_version_reply(_ecore_xcb_conn, cookie, NULL);
-        if (reply) 
+        if (reply)
           {
-//        if ((reply->major_version >= XCB_RENDER_MAJOR_VERSION) && 
-             if (reply->minor_version >= XCB_RENDER_MINOR_VERSION) 
-               {
-                  char *v = NULL;
-
-                  _render_avail = EINA_TRUE;
-                  _ecore_xcb_xdefaults_init();
-                  if ((reply->major_version > 0) || (reply->minor_version >= 5)) 
-                    {
-                       _render_argb = EINA_TRUE;
-                       v = getenv("XCURSOR_CORE");
-                       if (!v) 
-                         v = _ecore_xcb_xdefaults_string_get("Xcursor", "core");
-                       if ((v) && (_ecore_xcb_render_parse_boolean(v)))
-                         _render_argb = EINA_FALSE;
-                    }
-                  if ((_render_argb) && 
-                      ((reply->major_version > 0) || (reply->minor_version >= 8)))
-                    {
-                       _render_anim = EINA_TRUE;
-                       v = getenv("XCURSOR_ANIM");
-                       if (!v) 
-                         v = _ecore_xcb_xdefaults_string_get("Xcursor", "anim");
-                       if ((v) && (_ecore_xcb_render_parse_boolean(v)))
-                         _render_anim = EINA_FALSE;
-                    }
-                  _ecore_xcb_xdefaults_shutdown();
-               }
+//        if ((reply->major_version >= XCB_RENDER_MAJOR_VERSION) &&
+               if (reply->minor_version >= XCB_RENDER_MINOR_VERSION)
+                 {
+                    char *v = NULL;
+
+                    _render_avail = EINA_TRUE;
+                    _ecore_xcb_xdefaults_init();
+                    if ((reply->major_version > 0) || (reply->minor_version >= 5))
+                      {
+                         _render_argb = EINA_TRUE;
+                         v = getenv("XCURSOR_CORE");
+                         if (!v)
+                           v = _ecore_xcb_xdefaults_string_get("Xcursor", "core");
+                         if ((v) && (_ecore_xcb_render_parse_boolean(v)))
+                           _render_argb = EINA_FALSE;
+                      }
+                    if ((_render_argb) &&
+                        ((reply->major_version > 0) || (reply->minor_version >= 8)))
+                      {
+                         _render_anim = EINA_TRUE;
+                         v = getenv("XCURSOR_ANIM");
+                         if (!v)
+                           v = _ecore_xcb_xdefaults_string_get("Xcursor", "anim");
+                         if ((v) && (_ecore_xcb_render_parse_boolean(v)))
+                           _render_anim = EINA_FALSE;
+                      }
+                    _ecore_xcb_xdefaults_shutdown();
+                 }
           }
         free(reply);
      }
 #endif
 }
 
-Eina_Bool 
-_ecore_xcb_render_avail_get(void) 
+Eina_Bool
+_ecore_xcb_render_avail_get(void)
 {
    return _render_avail;
 }
 
-Eina_Bool 
-_ecore_xcb_render_argb_get(void) 
+Eina_Bool
+_ecore_xcb_render_argb_get(void)
 {
    return _render_argb;
 }
 
-Eina_Bool 
-_ecore_xcb_render_anim_get(void) 
+Eina_Bool
+_ecore_xcb_render_anim_get(void)
 {
    return _render_anim;
 }
 
-Eina_Bool 
-_ecore_xcb_render_visual_supports_alpha(Ecore_X_Visual visual) 
+Eina_Bool
+_ecore_xcb_render_visual_supports_alpha(Ecore_X_Visual visual)
 {
    Eina_Bool ret = EINA_FALSE;
 #ifdef ECORE_XCB_RENDER
@@ -117,19 +117,19 @@ _ecore_xcb_render_visual_supports_alpha(Ecore_X_Visual visual)
    reply = xcb_render_util_query_formats(_ecore_xcb_conn);
    if (!reply) return EINA_FALSE;
 
-   vis = 
-     xcb_render_util_find_visual_format(reply, 
+   vis =
+     xcb_render_util_find_visual_format(reply,
                                         ((xcb_visualtype_t *)visual)->visual_id);
-   if (vis) 
+   if (vis)
      {
         xcb_render_pictforminfo_t temp;
         xcb_render_pictforminfo_t *format;
 
         temp.id = vis->format;
-        format = 
+        format =
           xcb_render_util_find_format(reply, XCB_PICT_FORMAT_ID, &temp, 0);
 
-        if ((format->type == XCB_RENDER_PICT_TYPE_DIRECT) && 
+        if ((format->type == XCB_RENDER_PICT_TYPE_DIRECT) &&
             (format->direct.alpha_mask))
           ret = EINA_TRUE;
      }
@@ -139,8 +139,9 @@ _ecore_xcb_render_visual_supports_alpha(Ecore_X_Visual visual)
    return ret;
 }
 
-uint32_t 
-_ecore_xcb_render_find_visual_id(int type, Eina_Bool check_alpha) 
+uint32_t
+_ecore_xcb_render_find_visual_id(int       type,
+                                 Eina_Bool check_alpha)
 {
 #ifdef ECORE_XCB_RENDER
    const xcb_render_query_pict_formats_reply_t *reply;
@@ -160,13 +161,13 @@ _ecore_xcb_render_find_visual_id(int type, Eina_Bool check_alpha)
    if (!reply) return 0;
 
    for (screens = xcb_render_query_pict_formats_screens_iterator(reply);
-        screens.rem; xcb_render_pictscreen_next(&screens)) 
+        screens.rem; xcb_render_pictscreen_next(&screens))
      {
-        for (depths = xcb_render_pictscreen_depths_iterator(screens.data); 
-             depths.rem; xcb_render_pictdepth_next(&depths)) 
+        for (depths = xcb_render_pictscreen_depths_iterator(screens.data);
+             depths.rem; xcb_render_pictdepth_next(&depths))
           {
              for (visuals = xcb_render_pictdepth_visuals_iterator(depths.data);
-                  visuals.rem; xcb_render_pictvisual_next(&visuals)) 
+                  visuals.rem; xcb_render_pictvisual_next(&visuals))
                {
                   xcb_render_pictforminfo_t temp;
                   xcb_render_pictforminfo_t *format;
@@ -174,13 +175,13 @@ _ecore_xcb_render_find_visual_id(int type, Eina_Bool check_alpha)
                   visual = visuals.data;
                   temp.id = visual->format;
 
-                  format = 
-                    xcb_render_util_find_format(reply, XCB_PICT_FORMAT_ID, 
+                  format =
+                    xcb_render_util_find_format(reply, XCB_PICT_FORMAT_ID,
                                                 &temp, 0);
                   if (!format) continue;
-                  if (format->type == type) 
+                  if (format->type == type)
                     {
-                       if (check_alpha) 
+                       if (check_alpha)
                          {
                             if (format->direct.alpha_mask)
                               return visual->visual;
@@ -197,8 +198,8 @@ _ecore_xcb_render_find_visual_id(int type, Eina_Bool check_alpha)
 }
 
 /* local function prototypes */
-static Eina_Bool 
-_ecore_xcb_render_parse_boolean(char *v) 
+static Eina_Bool
+_ecore_xcb_render_parse_boolean(char *v)
 {
    char c;
 
@@ -209,7 +210,7 @@ _ecore_xcb_render_parse_boolean(char *v)
      return EINA_TRUE;
    if ((c == 'f') || (c == 'n') || (c == '0'))
      return EINA_FALSE;
-   if (c == 'o') 
+   if (c == 'o')
      {
         char d;
 
@@ -221,3 +222,4 @@ _ecore_xcb_render_parse_boolean(char *v)
      }
    return EINA_FALSE;
 }
+
index 03641e0..cb7249f 100644 (file)
@@ -9,8 +9,8 @@ static Eina_Bool _screensaver_avail = EINA_FALSE;
 /* external variables */
 int _ecore_xcb_event_screensaver = -1;
 
-void 
-_ecore_xcb_screensaver_init(void) 
+void
+_ecore_xcb_screensaver_init(void)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
 
@@ -19,8 +19,8 @@ _ecore_xcb_screensaver_init(void)
 #endif
 }
 
-void 
-_ecore_xcb_screensaver_finalize(void) 
+void
+_ecore_xcb_screensaver_finalize(void)
 {
 #ifdef ECORE_XCB_SCREENSAVER
    const xcb_query_extension_reply_t *ext_reply;
@@ -30,21 +30,21 @@ _ecore_xcb_screensaver_finalize(void)
 
 #ifdef ECORE_XCB_SCREENSAVER
    ext_reply = xcb_get_extension_data(_ecore_xcb_conn, &xcb_screensaver_id);
-   if ((ext_reply) && (ext_reply->present)) 
+   if ((ext_reply) && (ext_reply->present))
      {
         xcb_screensaver_query_version_cookie_t cookie;
         xcb_screensaver_query_version_reply_t *reply;
 
-        cookie = 
-          xcb_screensaver_query_version_unchecked(_ecore_xcb_conn, 
-                                                  XCB_SCREENSAVER_MAJOR_VERSION, 
+        cookie =
+          xcb_screensaver_query_version_unchecked(_ecore_xcb_conn,
+                                                  XCB_SCREENSAVER_MAJOR_VERSION,
                                                   XCB_SCREENSAVER_MINOR_VERSION);
-        reply = 
+        reply =
           xcb_screensaver_query_version_reply(_ecore_xcb_conn, cookie, NULL);
-        if (reply) 
+        if (reply)
           {
-             if ((reply->server_major_version >= XCB_SCREENSAVER_MAJOR_VERSION) && 
-                 (reply->server_minor_version >= XCB_SCREENSAVER_MINOR_VERSION)) 
+             if ((reply->server_major_version >= XCB_SCREENSAVER_MAJOR_VERSION) &&
+                 (reply->server_minor_version >= XCB_SCREENSAVER_MINOR_VERSION))
                _screensaver_avail = EINA_TRUE;
 
              free(reply);
@@ -56,8 +56,8 @@ _ecore_xcb_screensaver_finalize(void)
 #endif
 }
 
-EAPI int 
-ecore_x_screensaver_idle_time_get(void) 
+EAPI int
+ecore_x_screensaver_idle_time_get(void)
 {
    int ret = 0;
 #ifdef ECORE_XCB_SCREENSAVER
@@ -83,8 +83,11 @@ ecore_x_screensaver_idle_time_get(void)
    return ret;
 }
 
-EAPI void 
-ecore_x_screensaver_set(int timeout, int interval, int prefer_blanking, int allow_exposures) 
+EAPI void
+ecore_x_screensaver_set(int timeout,
+                        int interval,
+                        int prefer_blanking,
+                        int allow_exposures)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    CHECK_XCB_CONN;
@@ -92,13 +95,13 @@ ecore_x_screensaver_set(int timeout, int interval, int prefer_blanking, int allo
    if (!_screensaver_avail) return;
 
 #ifdef ECORE_XCB_SCREENSAVER
-   xcb_set_screen_saver(_ecore_xcb_conn, 
+   xcb_set_screen_saver(_ecore_xcb_conn,
                         timeout, interval, prefer_blanking, allow_exposures);
 #endif
 }
 
-EAPI void 
-ecore_x_screensaver_timeout_set(int timeout) 
+EAPI void
+ecore_x_screensaver_timeout_set(int timeout)
 {
 #ifdef ECORE_XCB_SCREENSAVER
    xcb_get_screen_saver_cookie_t cookie;
@@ -124,8 +127,8 @@ ecore_x_screensaver_timeout_set(int timeout)
 #endif
 }
 
-EAPI int 
-ecore_x_screensaver_timeout_get(void) 
+EAPI int
+ecore_x_screensaver_timeout_get(void)
 {
    int timeout = 0;
 #ifdef ECORE_XCB_SCREENSAVER
@@ -149,8 +152,8 @@ ecore_x_screensaver_timeout_get(void)
    return timeout;
 }
 
-EAPI void 
-ecore_x_screensaver_blank_set(int blank) 
+EAPI void
+ecore_x_screensaver_blank_set(int blank)
 {
 #ifdef ECORE_XCB_SCREENSAVER
    xcb_get_screen_saver_cookie_t cookie;
@@ -176,8 +179,8 @@ ecore_x_screensaver_blank_set(int blank)
 #endif
 }
 
-EAPI int 
-ecore_x_screensaver_blank_get(void) 
+EAPI int
+ecore_x_screensaver_blank_get(void)
 {
    int blank = 0;
 #ifdef ECORE_XCB_SCREENSAVER
@@ -201,8 +204,8 @@ ecore_x_screensaver_blank_get(void)
    return blank;
 }
 
-EAPI void 
-ecore_x_screensaver_expose_set(int expose) 
+EAPI void
+ecore_x_screensaver_expose_set(int expose)
 {
 #ifdef ECORE_XCB_SCREENSAVER
    xcb_get_screen_saver_cookie_t cookie;
@@ -228,8 +231,8 @@ ecore_x_screensaver_expose_set(int expose)
 #endif
 }
 
-EAPI int 
-ecore_x_screensaver_expose_get(void) 
+EAPI int
+ecore_x_screensaver_expose_get(void)
 {
    int expose = 0;
 #ifdef ECORE_XCB_SCREENSAVER
@@ -253,8 +256,8 @@ ecore_x_screensaver_expose_get(void)
    return expose;
 }
 
-EAPI void 
-ecore_x_screensaver_interval_set(int interval) 
+EAPI void
+ecore_x_screensaver_interval_set(int interval)
 {
 #ifdef ECORE_XCB_SCREENSAVER
    xcb_get_screen_saver_cookie_t cookie;
@@ -280,8 +283,8 @@ ecore_x_screensaver_interval_set(int interval)
 #endif
 }
 
-EAPI int 
-ecore_x_screensaver_interval_get(void) 
+EAPI int
+ecore_x_screensaver_interval_get(void)
 {
    int interval = 0;
 #ifdef ECORE_XCB_SCREENSAVER
@@ -305,8 +308,8 @@ ecore_x_screensaver_interval_get(void)
    return interval;
 }
 
-EAPI void 
-ecore_x_screensaver_event_listen_set(Eina_Bool on) 
+EAPI void
+ecore_x_screensaver_event_listen_set(Eina_Bool on)
 {
 #ifdef ECORE_XCB_SCREENSAVER
    Ecore_X_Window root;
@@ -320,15 +323,16 @@ ecore_x_screensaver_event_listen_set(Eina_Bool on)
 #ifdef ECORE_XCB_SCREENSAVER
    root = ((xcb_screen_t *)_ecore_xcb_screen)->root;
    if (on)
-     xcb_screensaver_select_input(_ecore_xcb_conn, root, 
-                                 XCB_SCREENSAVER_EVENT_NOTIFY_MASK);
+     xcb_screensaver_select_input(_ecore_xcb_conn, root,
+                                  XCB_SCREENSAVER_EVENT_NOTIFY_MASK);
    else
      xcb_screensaver_select_input(_ecore_xcb_conn, root, 0);
 #endif
 }
 
-EAPI Eina_Bool 
-ecore_x_screensaver_event_available_get(void) 
+EAPI Eina_Bool
+ecore_x_screensaver_event_available_get(void)
 {
    return _screensaver_avail;
 }
+
index a6d589c..7b994bd 100644 (file)
@@ -4,18 +4,38 @@
 #define ECORE_XCB_SELECTION_DATA(x) ((Ecore_X_Selection_Data *)(x))
 
 /* local function prototypes */
-static Eina_Bool _ecore_xcb_selection_converter_text(char *target, void *data, int size, void **data_ret, int *size_ret, Ecore_X_Atom *type, int *size_type);
-static void *_ecore_xcb_selection_parser_text(const char *target __UNUSED__, void *data, int size, int format __UNUSED__);
-static void *_ecore_xcb_selection_parser_files(const char *target, void *data, int size, int format __UNUSED__);
-static void *_ecore_xcb_selection_parser_targets(const char *target __UNUSED__, void *data, int size, int format __UNUSED__);
+static Eina_Bool _ecore_xcb_selection_converter_text(char         *target,
+                                                     void         *data,
+                                                     int           size,
+                                                     void        **data_ret,
+                                                     int          *size_ret,
+                                                     Ecore_X_Atom *type,
+                                                     int          *size_type);
+static void *_ecore_xcb_selection_parser_text(const char *target __UNUSED__,
+                                              void       *data,
+                                              int         size,
+                                              int         format __UNUSED__);
+static void *_ecore_xcb_selection_parser_files(const char *target,
+                                               void       *data,
+                                               int         size,
+                                               int         format __UNUSED__);
+static void *_ecore_xcb_selection_parser_targets(const char *target __UNUSED__,
+                                                 void       *data,
+                                                 int         size,
+                                                 int         format __UNUSED__);
 
 //static int _ecore_xcb_selection_data_free(void *data);
-static int _ecore_xcb_selection_data_text_free(void *data);
-static int _ecore_xcb_selection_data_targets_free(void *data);
-static int _ecore_xcb_selection_data_files_free(void *data);
-static int _ecore_xcb_selection_data_default_free(void *data);
-static Eina_Bool _ecore_xcb_selection_set(Ecore_X_Window win, const void *data, int size, Ecore_X_Atom selection);
-static void _ecore_xcb_selection_request(Ecore_X_Window win, Ecore_X_Atom selection, const char *target);
+static int       _ecore_xcb_selection_data_text_free(void *data);
+static int       _ecore_xcb_selection_data_targets_free(void *data);
+static int       _ecore_xcb_selection_data_files_free(void *data);
+static int       _ecore_xcb_selection_data_default_free(void *data);
+static Eina_Bool _ecore_xcb_selection_set(Ecore_X_Window win,
+                                          const void    *data,
+                                          int            size,
+                                          Ecore_X_Atom   selection);
+static void _ecore_xcb_selection_request(Ecore_X_Window win,
+                                         Ecore_X_Atom   selection,
+                                         const char    *target);
 static Ecore_X_Atom _ecore_xcb_selection_target_atom_get(const char *target);
 
 /* local variables */
@@ -24,38 +44,38 @@ static Ecore_X_Selection_Converter *_converters = NULL;
 static Ecore_X_Selection_Parser *_parsers = NULL;
 
 /* local functions */
-void 
-_ecore_xcb_selection_init(void) 
+void
+_ecore_xcb_selection_init(void)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
 
    memset(_selections, 0, sizeof(_selections));
 
    /* init converters */
-   ecore_x_selection_converter_atom_add(ECORE_X_ATOM_TEXT, 
-                                       _ecore_xcb_selection_converter_text);
-   ecore_x_selection_converter_atom_add(ECORE_X_ATOM_UTF8_STRING, 
-                                       _ecore_xcb_selection_converter_text);
-   ecore_x_selection_converter_atom_add(ECORE_X_ATOM_COMPOUND_TEXT, 
-                                       _ecore_xcb_selection_converter_text);
-   ecore_x_selection_converter_atom_add(ECORE_X_ATOM_STRING, 
-                                       _ecore_xcb_selection_converter_text);
+   ecore_x_selection_converter_atom_add(ECORE_X_ATOM_TEXT,
+                                        _ecore_xcb_selection_converter_text);
+   ecore_x_selection_converter_atom_add(ECORE_X_ATOM_UTF8_STRING,
+                                        _ecore_xcb_selection_converter_text);
+   ecore_x_selection_converter_atom_add(ECORE_X_ATOM_COMPOUND_TEXT,
+                                        _ecore_xcb_selection_converter_text);
+   ecore_x_selection_converter_atom_add(ECORE_X_ATOM_STRING,
+                                        _ecore_xcb_selection_converter_text);
 
    /* init parsers */
-   ecore_x_selection_parser_add("text/plain", 
+   ecore_x_selection_parser_add("text/plain",
                                 _ecore_xcb_selection_parser_text);
-   ecore_x_selection_parser_add(ECORE_X_SELECTION_TARGET_UTF8_STRING, 
+   ecore_x_selection_parser_add(ECORE_X_SELECTION_TARGET_UTF8_STRING,
                                 _ecore_xcb_selection_parser_text);
-   ecore_x_selection_parser_add("text/uri-list", 
+   ecore_x_selection_parser_add("text/uri-list",
                                 _ecore_xcb_selection_parser_files);
-   ecore_x_selection_parser_add("_NETSCAPE_URL", 
+   ecore_x_selection_parser_add("_NETSCAPE_URL",
                                 _ecore_xcb_selection_parser_files);
-   ecore_x_selection_parser_add(ECORE_X_SELECTION_TARGET_TARGETS, 
+   ecore_x_selection_parser_add(ECORE_X_SELECTION_TARGET_TARGETS,
                                 _ecore_xcb_selection_parser_targets);
 }
 
-void 
-_ecore_xcb_selection_shutdown(void) 
+void
+_ecore_xcb_selection_shutdown(void)
 {
    Ecore_X_Selection_Converter *cnv;
    Ecore_X_Selection_Parser *prs;
@@ -64,7 +84,7 @@ _ecore_xcb_selection_shutdown(void)
 
    /* free selection converters */
    cnv = _converters;
-   while (cnv) 
+   while (cnv)
      {
         Ecore_X_Selection_Converter *tmp;
 
@@ -76,7 +96,7 @@ _ecore_xcb_selection_shutdown(void)
 
    /* free parsers */
    prs = _parsers;
-   while (prs) 
+   while (prs)
      {
         Ecore_X_Selection_Parser *tmp;
 
@@ -89,34 +109,40 @@ _ecore_xcb_selection_shutdown(void)
 }
 
 /* public functions */
-EAPI void 
-ecore_x_selection_converter_atom_add(Ecore_X_Atom target, 
-                                     Eina_Bool (*func) (char *target, void *data, int size, void **data_ret, int *size_ret, Ecore_X_Atom *type, int *size_type)) 
+EAPI void
+ecore_x_selection_converter_atom_add(Ecore_X_Atom                                          target,
+                                     Eina_Bool                                             (*func)(char *target,
+                                                                             void         *data,
+                                                                             int           size,
+                                                                             void        **data_ret,
+                                                                             int          *size_ret,
+                                                                             Ecore_X_Atom *type,
+                                                                             int          *size_type))
 {
    Ecore_X_Selection_Converter *cnv;
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
 
    cnv = _converters;
-   if (_converters) 
+   if (_converters)
      {
-        while (1) 
+        while (1)
           {
-             if (cnv->target == target) 
+             if (cnv->target == target)
                {
                   cnv->convert = func;
                   return;
                }
              if (cnv->next)
                cnv = cnv->next;
-             else 
+             else
                break;
           }
         cnv->next = calloc(1, sizeof(Ecore_X_Selection_Converter));
         if (!cnv->next) return;
         cnv = cnv->next;
      }
-   else 
+   else
      {
         _converters = calloc(1, sizeof(Ecore_X_Selection_Converter));
         if (!_converters) return;
@@ -126,9 +152,15 @@ ecore_x_selection_converter_atom_add(Ecore_X_Atom target,
    cnv->convert = func;
 }
 
-EAPI void 
-ecore_x_selection_converter_add(char *target, 
-                                Eina_Bool (*func)(char *target, void *data, int size, void **date_ret, int *size_ret, Ecore_X_Atom *atom_ret, int *ret)) 
+EAPI void
+ecore_x_selection_converter_add(char                                                 *target,
+                                Eina_Bool                                             (*func)(char *target,
+                                                                        void         *data,
+                                                                        int           size,
+                                                                        void        **date_ret,
+                                                                        int          *size_ret,
+                                                                        Ecore_X_Atom *atom_ret,
+                                                                        int          *ret))
 {
    Ecore_X_Atom atarget;
 
@@ -139,8 +171,8 @@ ecore_x_selection_converter_add(char *target,
    ecore_x_selection_converter_atom_add(atarget, func);
 }
 
-EAPI void 
-ecore_x_selection_converter_del(char *target) 
+EAPI void
+ecore_x_selection_converter_del(char *target)
 {
    Ecore_X_Atom atarget;
 
@@ -151,19 +183,19 @@ ecore_x_selection_converter_del(char *target)
    ecore_x_selection_converter_atom_del(atarget);
 }
 
-EAPI void 
-ecore_x_selection_converter_atom_del(Ecore_X_Atom target) 
+EAPI void
+ecore_x_selection_converter_atom_del(Ecore_X_Atom target)
 {
    Ecore_X_Selection_Converter *conv, *pconv = NULL;
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
 
    conv = _converters;
-   while (conv) 
+   while (conv)
      {
-        if (conv->target == target) 
+        if (conv->target == target)
           {
-             if (pconv) 
+             if (pconv)
                pconv->next = conv->next;
              else
                _converters = conv->next;
@@ -175,9 +207,9 @@ ecore_x_selection_converter_atom_del(Ecore_X_Atom target)
      }
 }
 
-EAPI void 
-ecore_x_selection_parser_add(const char *target, 
-                             void *(*func) (const char *target, void *data, int size, int format)) 
+EAPI void
+ecore_x_selection_parser_add(const char *target,
+                             void *(*func)(const char *target, void *data, int size, int format))
 {
    Ecore_X_Selection_Parser *prs;
 
@@ -185,11 +217,11 @@ ecore_x_selection_parser_add(const char *target,
 
    if (!target) return;
    prs = _parsers;
-   if (prs) 
+   if (prs)
      {
-        while (prs->next) 
+        while (prs->next)
           {
-             if (!strcmp(prs->target, target)) 
+             if (!strcmp(prs->target, target))
                {
                   prs->parse = func;
                   return;
@@ -199,7 +231,7 @@ ecore_x_selection_parser_add(const char *target,
         prs->next = calloc(1, sizeof(Ecore_X_Selection_Parser));
         prs = prs->next;
      }
-   else 
+   else
      {
         _parsers = calloc(1, sizeof(Ecore_X_Selection_Parser));
         prs = _parsers;
@@ -208,8 +240,8 @@ ecore_x_selection_parser_add(const char *target,
    prs->parse = func;
 }
 
-EAPI void 
-ecore_x_selection_parser_del(const char *target) 
+EAPI void
+ecore_x_selection_parser_del(const char *target)
 {
    Ecore_X_Selection_Parser *prs, *pprs = NULL;
 
@@ -218,9 +250,9 @@ ecore_x_selection_parser_del(const char *target)
    if (!target) return;
 
    prs = _parsers;
-   while (prs) 
+   while (prs)
      {
-        if (!strcmp(prs->target, target)) 
+        if (!strcmp(prs->target, target))
           {
              if (pprs)
                pprs->next = prs->next;
@@ -243,12 +275,14 @@ ecore_x_selection_parser_del(const char *target)
  * @return     Returns 1 if the ownership of the selection was successfully
  *             claimed, or 0 if unsuccessful.
  */
-EAPI Eina_Bool 
-ecore_x_selection_primary_set(Ecore_X_Window win, const void *data, int size) 
+EAPI Eina_Bool
+ecore_x_selection_primary_set(Ecore_X_Window win,
+                              const void    *data,
+                              int            size)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
 
-   return _ecore_xcb_selection_set(win, data, size, 
+   return _ecore_xcb_selection_set(win, data, size,
                                    ECORE_X_ATOM_SELECTION_PRIMARY);
 }
 
@@ -257,17 +291,18 @@ ecore_x_selection_primary_set(Ecore_X_Window win, const void *data, int size)
  * @return     Returns 1 if the selection was successfully cleared,
  *             or 0 if unsuccessful.
  */
-EAPI Eina_Bool 
-ecore_x_selection_primary_clear(void) 
+EAPI Eina_Bool
+ecore_x_selection_primary_clear(void)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
 
-   return _ecore_xcb_selection_set(XCB_NONE, NULL, 0, 
+   return _ecore_xcb_selection_set(XCB_NONE, NULL, 0,
                                    ECORE_X_ATOM_SELECTION_PRIMARY);
 }
 
-EAPI void 
-ecore_x_selection_primary_request(Ecore_X_Window win, const char *target) 
+EAPI void
+ecore_x_selection_primary_request(Ecore_X_Window win,
+                                  const char    *target)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
 
@@ -282,12 +317,14 @@ ecore_x_selection_primary_request(Ecore_X_Window win, const char *target)
  * @return     Returns 1 if the ownership of the selection was successfully
  *             claimed, or 0 if unsuccessful.
  */
-EAPI Eina_Bool 
-ecore_x_selection_secondary_set(Ecore_X_Window win, const void *data, int size) 
+EAPI Eina_Bool
+ecore_x_selection_secondary_set(Ecore_X_Window win,
+                                const void    *data,
+                                int            size)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
 
-   return _ecore_xcb_selection_set(win, data, size, 
+   return _ecore_xcb_selection_set(win, data, size,
                                    ECORE_X_ATOM_SELECTION_SECONDARY);
 }
 
@@ -296,17 +333,18 @@ ecore_x_selection_secondary_set(Ecore_X_Window win, const void *data, int size)
  * @return     Returns 1 if the selection was successfully cleared,
  *             or 0 if unsuccessful.
  */
-EAPI Eina_Bool 
-ecore_x_selection_secondary_clear(void) 
+EAPI Eina_Bool
+ecore_x_selection_secondary_clear(void)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
 
-   return _ecore_xcb_selection_set(XCB_NONE, NULL, 0, 
+   return _ecore_xcb_selection_set(XCB_NONE, NULL, 0,
                                    ECORE_X_ATOM_SELECTION_SECONDARY);
 }
 
-EAPI void 
-ecore_x_selection_secondary_request(Ecore_X_Window win, const char *target) 
+EAPI void
+ecore_x_selection_secondary_request(Ecore_X_Window win,
+                                    const char    *target)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
 
@@ -321,12 +359,14 @@ ecore_x_selection_secondary_request(Ecore_X_Window win, const char *target)
  * @return     Returns 1 if the ownership of the selection was successfully
  *             claimed, or 0 if unsuccessful.
  */
-EAPI Eina_Bool 
-ecore_x_selection_xdnd_set(Ecore_X_Window win, const void *data, int size) 
+EAPI Eina_Bool
+ecore_x_selection_xdnd_set(Ecore_X_Window win,
+                           const void    *data,
+                           int            size)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
 
-   return _ecore_xcb_selection_set(win, data, size, 
+   return _ecore_xcb_selection_set(win, data, size,
                                    ECORE_X_ATOM_SELECTION_XDND);
 }
 
@@ -335,17 +375,18 @@ ecore_x_selection_xdnd_set(Ecore_X_Window win, const void *data, int size)
  * @return     Returns 1 if the selection was successfully cleared,
  *             or 0 if unsuccessful.
  */
-EAPI Eina_Bool 
-ecore_x_selection_xdnd_clear(void) 
+EAPI Eina_Bool
+ecore_x_selection_xdnd_clear(void)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
 
-   return _ecore_xcb_selection_set(XCB_NONE, NULL, 0, 
+   return _ecore_xcb_selection_set(XCB_NONE, NULL, 0,
                                    ECORE_X_ATOM_SELECTION_XDND);
 }
 
-EAPI void 
-ecore_x_selection_xdnd_request(Ecore_X_Window win, const char *target) 
+EAPI void
+ecore_x_selection_xdnd_request(Ecore_X_Window win,
+                               const char    *target)
 {
    Ecore_X_Atom atom;
    Ecore_X_DND_Target *_target;
@@ -356,7 +397,7 @@ ecore_x_selection_xdnd_request(Ecore_X_Window win, const char *target)
    _target = _ecore_xcb_dnd_target_get();
    atom = _ecore_xcb_selection_target_atom_get(target);
 
-   xcb_convert_selection(_ecore_xcb_conn, win, ECORE_X_ATOM_SELECTION_XDND, 
+   xcb_convert_selection(_ecore_xcb_conn, win, ECORE_X_ATOM_SELECTION_XDND,
                          atom, ECORE_X_ATOM_SELECTION_PROP_XDND, _target->time);
 }
 
@@ -371,12 +412,14 @@ ecore_x_selection_xdnd_request(Ecore_X_Window win, const char *target)
  * Get the converted data from a previous CLIPBOARD selection
  * request. The buffer must be freed when done with.
  */
-EAPI Eina_Bool 
-ecore_x_selection_clipboard_set(Ecore_X_Window win, const void *data, int size) 
+EAPI Eina_Bool
+ecore_x_selection_clipboard_set(Ecore_X_Window win,
+                                const void    *data,
+                                int            size)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
 
-   return _ecore_xcb_selection_set(win, data, size, 
+   return _ecore_xcb_selection_set(win, data, size,
                                    ECORE_X_ATOM_SELECTION_CLIPBOARD);
 }
 
@@ -385,25 +428,31 @@ ecore_x_selection_clipboard_set(Ecore_X_Window win, const void *data, int size)
  * @return     Returns 1 if the selection was successfully cleared,
  *             or 0 if unsuccessful.
  */
-EAPI Eina_Bool 
-ecore_x_selection_clipboard_clear(void) 
+EAPI Eina_Bool
+ecore_x_selection_clipboard_clear(void)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
 
-   return _ecore_xcb_selection_set(XCB_NONE, NULL, 0, 
+   return _ecore_xcb_selection_set(XCB_NONE, NULL, 0,
                                    ECORE_X_ATOM_SELECTION_CLIPBOARD);
 }
 
-EAPI void 
-ecore_x_selection_clipboard_request(Ecore_X_Window win, const char *target) 
+EAPI void
+ecore_x_selection_clipboard_request(Ecore_X_Window win,
+                                    const char    *target)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
 
    _ecore_xcb_selection_request(win, ECORE_X_ATOM_SELECTION_CLIPBOARD, target);
 }
 
-EAPI Eina_Bool 
-ecore_x_selection_convert(Ecore_X_Atom selection, Ecore_X_Atom target, void **data_ret, int *size, Ecore_X_Atom *targtype, int *typesize) 
+EAPI Eina_Bool
+ecore_x_selection_convert(Ecore_X_Atom  selection,
+                          Ecore_X_Atom  target,
+                          void        **data_ret,
+                          int          *size,
+                          Ecore_X_Atom *targtype,
+                          int          *typesize)
 {
    Ecore_X_Selection_Intern *sel;
    Ecore_X_Selection_Converter *cnv;
@@ -415,16 +464,16 @@ ecore_x_selection_convert(Ecore_X_Atom selection, Ecore_X_Atom target, void **da
    sel = _ecore_xcb_selection_get(selection);
    tgt_str = _ecore_xcb_selection_target_get(target);
 
-   for (cnv = _converters; cnv; cnv = cnv->next) 
+   for (cnv = _converters; cnv; cnv = cnv->next)
      {
-        if (cnv->target == target) 
+        if (cnv->target == target)
           {
              int r = 0;
 
-             r = cnv->convert(tgt_str, sel->data, sel->length, &data, size, 
+             r = cnv->convert(tgt_str, sel->data, sel->length, &data, size,
                               targtype, typesize);
              free(tgt_str);
-             if (r) 
+             if (r)
                {
                   if (data_ret) *data_ret = data;
                   return r;
@@ -437,8 +486,12 @@ ecore_x_selection_convert(Ecore_X_Atom selection, Ecore_X_Atom target, void **da
    return EINA_FALSE;
 }
 
-EAPI Eina_Bool 
-ecore_x_selection_notify_send(Ecore_X_Window requestor, Ecore_X_Atom selection, Ecore_X_Atom target, Ecore_X_Atom property, Ecore_X_Time tim) 
+EAPI Eina_Bool
+ecore_x_selection_notify_send(Ecore_X_Window requestor,
+                              Ecore_X_Atom   selection,
+                              Ecore_X_Atom   target,
+                              Ecore_X_Atom   property,
+                              Ecore_X_Time   tim)
 {
    xcb_selection_notify_event_t ev;
 
@@ -454,15 +507,17 @@ ecore_x_selection_notify_send(Ecore_X_Window requestor, Ecore_X_Atom selection,
    ev.property = property;
    ev.time = tim;
 
-   xcb_send_event(_ecore_xcb_conn, 0, requestor, 
+   xcb_send_event(_ecore_xcb_conn, 0, requestor,
                   XCB_EVENT_MASK_NO_EVENT, (const char *)&ev);
 //   ecore_x_flush();
 
    return EINA_TRUE;
 }
 
-EAPI void 
-ecore_x_selection_owner_set(Ecore_X_Window win, Ecore_X_Atom atom, Ecore_X_Time tim) 
+EAPI void
+ecore_x_selection_owner_set(Ecore_X_Window win,
+                            Ecore_X_Atom   atom,
+                            Ecore_X_Time   tim)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    CHECK_XCB_CONN;
@@ -470,8 +525,8 @@ ecore_x_selection_owner_set(Ecore_X_Window win, Ecore_X_Atom atom, Ecore_X_Time
    xcb_set_selection_owner(_ecore_xcb_conn, win, atom, tim);
 }
 
-EAPI Ecore_X_Window 
-ecore_x_selection_owner_get(Ecore_X_Atom atom) 
+EAPI Ecore_X_Window
+ecore_x_selection_owner_get(Ecore_X_Atom atom)
 {
    xcb_get_selection_owner_cookie_t cookie;
    xcb_get_selection_owner_reply_t *reply;
@@ -489,14 +544,17 @@ ecore_x_selection_owner_get(Ecore_X_Atom atom)
 }
 
 void *
-_ecore_xcb_selection_parse(const char *target, void *data, int size, int format) 
+_ecore_xcb_selection_parse(const char *target,
+                           void       *data,
+                           int         size,
+                           int         format)
 {
    Ecore_X_Selection_Parser *prs;
    Ecore_X_Selection_Data *sel;
 
-   for (prs = _parsers; prs; prs = prs->next) 
+   for (prs = _parsers; prs; prs = prs->next)
      {
-        if (!strcmp(prs->target, target)) 
+        if (!strcmp(prs->target, target))
           {
              sel = prs->parse(target, data, size, format);
              if (sel) return sel;
@@ -514,7 +572,7 @@ _ecore_xcb_selection_parse(const char *target, void *data, int size, int format)
 }
 
 Ecore_X_Selection_Intern *
-_ecore_xcb_selection_get(Ecore_X_Atom selection) 
+_ecore_xcb_selection_get(Ecore_X_Atom selection)
 {
    if (selection == ECORE_X_ATOM_SELECTION_PRIMARY)
      return &_selections[0];
@@ -524,13 +582,16 @@ _ecore_xcb_selection_get(Ecore_X_Atom selection)
      return &_selections[2];
    else if (selection == ECORE_X_ATOM_SELECTION_CLIPBOARD)
      return &_selections[3];
-   else 
+   else
      return NULL;
 }
 
 /* local functions */
-static Eina_Bool 
-_ecore_xcb_selection_set(Ecore_X_Window win, const void *data, int size, Ecore_X_Atom selection) 
+static Eina_Bool
+_ecore_xcb_selection_set(Ecore_X_Window win,
+                         const void    *data,
+                         int            size,
+                         Ecore_X_Atom   selection)
 {
    xcb_get_selection_owner_cookie_t cookie;
    xcb_get_selection_owner_reply_t *reply;
@@ -545,7 +606,7 @@ _ecore_xcb_selection_set(Ecore_X_Window win, const void *data, int size, Ecore_X
    reply = xcb_get_selection_owner_reply(_ecore_xcb_conn, cookie, NULL);
    if (!reply) return EINA_FALSE;
 
-   if (reply->owner != win) 
+   if (reply->owner != win)
      {
         free(reply);
         return EINA_FALSE;
@@ -560,10 +621,10 @@ _ecore_xcb_selection_set(Ecore_X_Window win, const void *data, int size, Ecore_X
      in = 2;
    else if (selection == ECORE_X_ATOM_SELECTION_CLIPBOARD)
      in = 3;
-   else 
+   else
      return EINA_FALSE;
 
-   if (data) 
+   if (data)
      {
         unsigned char *buff = NULL;
 
@@ -577,7 +638,7 @@ _ecore_xcb_selection_set(Ecore_X_Window win, const void *data, int size, Ecore_X
         memcpy(buff, data, size);
         _selections[in].data = buff;
      }
-   else if (_selections[in].data) 
+   else if (_selections[in].data)
      {
         free(_selections[in].data);
         memset(&_selections[in], 0, sizeof(Ecore_X_Selection_Data));
@@ -586,8 +647,10 @@ _ecore_xcb_selection_set(Ecore_X_Window win, const void *data, int size, Ecore_X
    return EINA_TRUE;
 }
 
-static void 
-_ecore_xcb_selection_request(Ecore_X_Window win, Ecore_X_Atom selection, const char *target) 
+static void
+_ecore_xcb_selection_request(Ecore_X_Window win,
+                             Ecore_X_Atom   selection,
+                             const char    *target)
 {
    Ecore_X_Atom atarget, prop;
 
@@ -605,12 +668,18 @@ _ecore_xcb_selection_request(Ecore_X_Window win, Ecore_X_Atom selection, const c
 
    atarget = _ecore_xcb_selection_target_atom_get(target);
 
-   xcb_convert_selection(_ecore_xcb_conn, win, selection, atarget, prop, 
+   xcb_convert_selection(_ecore_xcb_conn, win, selection, atarget, prop,
                          XCB_CURRENT_TIME);
 }
 
-static Eina_Bool 
-_ecore_xcb_selection_converter_text(char *target, void *data, int size, void **data_ret, int *size_ret, Ecore_X_Atom *type __UNUSED__, int *size_type __UNUSED__) 
+static Eina_Bool
+_ecore_xcb_selection_converter_text(char         *target,
+                                    void         *data,
+                                    int           size,
+                                    void        **data_ret,
+                                    int          *size_ret,
+                                    Ecore_X_Atom *type __UNUSED__,
+                                    int          *size_type __UNUSED__)
 {
    Ecore_Xcb_Encoding_Style style;
    Ecore_Xcb_Textproperty ret;
@@ -629,7 +698,7 @@ _ecore_xcb_selection_converter_text(char *target, void *data, int size, void **d
      style = XcbStringStyle;
    else if (!strcmp(target, ECORE_X_SELECTION_TARGET_UTF8_STRING))
      style = XcbUTF8StringStyle;
-   else 
+   else
      return EINA_FALSE;
 
    str = alloca(size + 1);
@@ -637,7 +706,7 @@ _ecore_xcb_selection_converter_text(char *target, void *data, int size, void **d
    str[size] = '\0';
 
 #ifdef HAVE_ICONV
-   if (_ecore_xcb_utf8_textlist_to_textproperty(&str, 1, style, &ret)) 
+   if (_ecore_xcb_utf8_textlist_to_textproperty(&str, 1, style, &ret))
      {
         int size = 0;
 
@@ -650,7 +719,7 @@ _ecore_xcb_selection_converter_text(char *target, void *data, int size, void **d
         return EINA_TRUE;
      }
 #else
-   if (_ecore_xcb_mb_textlist_to_textproperty(&str, 1, style, &ret)) 
+   if (_ecore_xcb_mb_textlist_to_textproperty(&str, 1, style, &ret))
      {
         int size = 0;
 
@@ -663,14 +732,17 @@ _ecore_xcb_selection_converter_text(char *target, void *data, int size, void **d
         return EINA_TRUE;
      }
 #endif
-   else 
+   else
      return EINA_TRUE;
 
    return EINA_FALSE;
 }
 
 static void *
-_ecore_xcb_selection_parser_text(const char *target __UNUSED__, void *data, int size, int format __UNUSED__) 
+_ecore_xcb_selection_parser_text(const char *target __UNUSED__,
+                                 void       *data,
+                                 int         size,
+                                 int         format __UNUSED__)
 {
    Ecore_X_Selection_Data_Text *sel;
    unsigned char *_data;
@@ -683,11 +755,11 @@ _ecore_xcb_selection_parser_text(const char *target __UNUSED__, void *data, int
    sel = calloc(1, sizeof(Ecore_X_Selection_Data_Text));
    if (!sel) return NULL;
 
-   if (_data[size - 1]) 
+   if (_data[size - 1])
      {
         size++;
         t = realloc(_data, size);
-        if (!t) 
+        if (!t)
           {
              free(sel);
              return NULL;
@@ -704,7 +776,10 @@ _ecore_xcb_selection_parser_text(const char *target __UNUSED__, void *data, int
 }
 
 static void *
-_ecore_xcb_selection_parser_files(const char *target, void *data, int size, int format __UNUSED__) 
+_ecore_xcb_selection_parser_files(const char *target,
+                                  void       *data,
+                                  int         size,
+                                  int         format __UNUSED__)
 {
    Ecore_X_Selection_Data_Files *sel;
    char *_data, *tmp, *t, **t2;
@@ -712,7 +787,7 @@ _ecore_xcb_selection_parser_files(const char *target, void *data, int size, int
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
 
-   if ((strcmp(target, "text/uri-list")) && 
+   if ((strcmp(target, "text/uri-list")) &&
        (strcmp(target, "_NETSCAPE_URL"))) return NULL;
 
    if (!(_data = data)) return NULL;
@@ -722,11 +797,11 @@ _ecore_xcb_selection_parser_files(const char *target, void *data, int size, int
 
    ECORE_XCB_SELECTION_DATA(sel)->free = _ecore_xcb_selection_data_files_free;
 
-   if (_data[size - 1]) 
+   if (_data[size - 1])
      {
         size++;
         t = realloc(_data, size);
-        if (!t) 
+        if (!t)
           {
              free(sel);
              return NULL;
@@ -736,30 +811,30 @@ _ecore_xcb_selection_parser_files(const char *target, void *data, int size, int
      }
 
    tmp = malloc(size);
-   if (!tmp) 
+   if (!tmp)
      {
         free(sel);
         return NULL;
      }
 
-   while ((is < size) && (_data[is])) 
+   while ((is < size) && (_data[is]))
      {
-        if ((i == 0) && (_data[is] == '#')) 
+        if ((i == 0) && (_data[is] == '#'))
           {
              for (; ((_data[is]) && (_data[is] != '\n')); is++) ;
           }
-        else 
+        else
           {
              if ((_data[is] != '\r') && (_data[is] != '\n'))
                tmp[i++] = _data[is++];
-             else 
+             else
                {
                   while ((_data[is] == '\r') || (_data[is] == '\n'))
                     is++;
                   tmp[i] = 0;
                   sel->num_files++;
                   t2 = realloc(sel->files, sel->num_files * sizeof(char *));
-                  if (t2) 
+                  if (t2)
                     {
                        sel->files = t2;
                        sel->files[sel->num_files - 1] = strdup(tmp);
@@ -769,12 +844,12 @@ _ecore_xcb_selection_parser_files(const char *target, void *data, int size, int
                }
           }
      }
-   if (i > 0) 
+   if (i > 0)
      {
         tmp[i] = 0;
         sel->num_files++;
         t2 = realloc(sel->files, sel->num_files * sizeof(char *));
-        if (t2) 
+        if (t2)
           {
              sel->files = t2;
              sel->files[sel->num_files - 1] = strdup(tmp);
@@ -790,7 +865,10 @@ _ecore_xcb_selection_parser_files(const char *target, void *data, int size, int
 }
 
 static void *
-_ecore_xcb_selection_parser_targets(const char *target __UNUSED__, void *data, int size, int format __UNUSED__) 
+_ecore_xcb_selection_parser_targets(const char *target __UNUSED__,
+                                    void       *data,
+                                    int         size,
+                                    int         format __UNUSED__)
 {
    Ecore_X_Selection_Data_Targets *sel;
    unsigned long *targets;
@@ -806,7 +884,7 @@ _ecore_xcb_selection_parser_targets(const char *target __UNUSED__, void *data, i
 
    sel->num_targets = (size - 2);
    sel->targets = malloc((size - 2) * sizeof(char *));
-   if (!sel->targets) 
+   if (!sel->targets)
      {
         free(sel);
         return NULL;
@@ -821,11 +899,11 @@ _ecore_xcb_selection_parser_targets(const char *target __UNUSED__, void *data, i
 
         cookie = xcb_get_atom_name_unchecked(_ecore_xcb_conn, targets[i]);
         reply = xcb_get_atom_name_reply(_ecore_xcb_conn, cookie, NULL);
-        if (reply) 
+        if (reply)
           {
              len = xcb_get_atom_name_name_length(reply);
              name = (char *)malloc(sizeof(char) * (len + 1));
-             if (name) 
+             if (name)
                {
                   memcpy(name, xcb_get_atom_name_name(reply), len);
                   name[len] = '\0';
@@ -835,7 +913,7 @@ _ecore_xcb_selection_parser_targets(const char *target __UNUSED__, void *data, i
           }
      }
 
-   ECORE_XCB_SELECTION_DATA(sel)->free = 
+   ECORE_XCB_SELECTION_DATA(sel)->free =
      _ecore_xcb_selection_data_targets_free;
    ECORE_XCB_SELECTION_DATA(sel)->content = ECORE_X_SELECTION_CONTENT_TARGETS;
    ECORE_XCB_SELECTION_DATA(sel)->length = size;
@@ -845,9 +923,9 @@ _ecore_xcb_selection_parser_targets(const char *target __UNUSED__, void *data, i
 }
 
 /*
-static int 
-_ecore_xcb_selection_data_free(void *data) 
-{
+   static int
+   _ecore_xcb_selection_data_free(void *data)
+   {
    Ecore_X_Selection_Data *sel;
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
@@ -856,11 +934,11 @@ _ecore_xcb_selection_data_free(void *data)
    if (sel->data) free(sel->data);
    free(sel);
    return 1;
-}
-*/
+   }
+ */
 
-static int 
-_ecore_xcb_selection_data_text_free(void *data) 
+static int
+_ecore_xcb_selection_data_text_free(void *data)
 {
    Ecore_X_Selection_Data_Text *sel;
 
@@ -872,15 +950,15 @@ _ecore_xcb_selection_data_text_free(void *data)
    return 1;
 }
 
-static int 
-_ecore_xcb_selection_data_targets_free(void *data) 
+static int
+_ecore_xcb_selection_data_targets_free(void *data)
 {
    Ecore_X_Selection_Data_Targets *sel;
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
 
    if (!(sel = data)) return 0;
-   if (sel->targets) 
+   if (sel->targets)
      {
         int i = 0;
 
@@ -892,15 +970,15 @@ _ecore_xcb_selection_data_targets_free(void *data)
    return 1;
 }
 
-static int 
-_ecore_xcb_selection_data_files_free(void *data) 
+static int
+_ecore_xcb_selection_data_files_free(void *data)
 {
    Ecore_X_Selection_Data_Files *sel;
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
 
    if (!(sel = data)) return 0;
-   if (sel->files) 
+   if (sel->files)
      {
         int i = 0;
 
@@ -912,8 +990,8 @@ _ecore_xcb_selection_data_files_free(void *data)
    return 0;
 }
 
-static int 
-_ecore_xcb_selection_data_default_free(void *data) 
+static int
+_ecore_xcb_selection_data_default_free(void *data)
 {
    Ecore_X_Selection_Data *sel;
 
@@ -923,8 +1001,8 @@ _ecore_xcb_selection_data_default_free(void *data)
    return 1;
 }
 
-static Ecore_X_Atom 
-_ecore_xcb_selection_target_atom_get(const char *target) 
+static Ecore_X_Atom
+_ecore_xcb_selection_target_atom_get(const char *target)
 {
    Ecore_X_Atom x_target;
 
@@ -945,7 +1023,7 @@ _ecore_xcb_selection_target_atom_get(const char *target)
 }
 
 char *
-_ecore_xcb_selection_target_get(Ecore_X_Atom target) 
+_ecore_xcb_selection_target_get(Ecore_X_Atom target)
 {
    if (target == ECORE_X_ATOM_FILE_NAME)
      return strdup(ECORE_X_SELECTION_TARGET_FILENAME);
@@ -958,3 +1036,4 @@ _ecore_xcb_selection_target_get(Ecore_X_Atom target)
    else
      return ecore_x_atom_name_get(target);
 }
+
index 2a05230..913f199 100644 (file)
@@ -6,8 +6,8 @@
 /* external variables */
 int _ecore_xcb_event_shape = -1;
 
-void 
-_ecore_xcb_shape_init(void) 
+void
+_ecore_xcb_shape_init(void)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
 
@@ -16,8 +16,8 @@ _ecore_xcb_shape_init(void)
 #endif
 }
 
-void 
-_ecore_xcb_shape_finalize(void) 
+void
+_ecore_xcb_shape_finalize(void)
 {
 #ifdef ECORE_XCB_SHAPE
    const xcb_query_extension_reply_t *ext_reply;
@@ -27,7 +27,7 @@ _ecore_xcb_shape_finalize(void)
 
 #ifdef ECORE_XCB_SHAPE
    ext_reply = xcb_get_extension_data(_ecore_xcb_conn, &xcb_shape_id);
-   if ((ext_reply) && (ext_reply->present)) 
+   if ((ext_reply) && (ext_reply->present))
      {
         xcb_shape_query_version_cookie_t cookie;
         xcb_shape_query_version_reply_t *reply;
@@ -36,7 +36,7 @@ _ecore_xcb_shape_finalize(void)
         _shape_avail = EINA_FALSE;
         cookie = xcb_shape_query_version_unchecked(_ecore_xcb_conn);
         reply = xcb_shape_query_version_reply(_ecore_xcb_conn, cookie, NULL);
-        if (reply) 
+        if (reply)
           {
              _shape_avail = EINA_TRUE;
              free(reply);
@@ -47,3 +47,4 @@ _ecore_xcb_shape_finalize(void)
      }
 #endif
 }
+
index 633f1bd..75f4e4f 100644 (file)
@@ -9,8 +9,8 @@ static Eina_Bool _sync_avail = EINA_FALSE;
 /* external variables */
 int _ecore_xcb_event_sync = -1;
 
-void 
-_ecore_xcb_sync_init(void) 
+void
+_ecore_xcb_sync_init(void)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
 
@@ -19,8 +19,8 @@ _ecore_xcb_sync_init(void)
 #endif
 }
 
-void 
-_ecore_xcb_sync_finalize(void) 
+void
+_ecore_xcb_sync_finalize(void)
 {
 #ifdef ECORE_XCB_SYNC
    const xcb_query_extension_reply_t *ext_reply;
@@ -30,17 +30,17 @@ _ecore_xcb_sync_finalize(void)
 
 #ifdef ECORE_XCB_SYNC
    ext_reply = xcb_get_extension_data(_ecore_xcb_conn, &xcb_sync_id);
-   if ((ext_reply) && (ext_reply->present)) 
+   if ((ext_reply) && (ext_reply->present))
      {
         xcb_sync_initialize_cookie_t cookie;
         xcb_sync_initialize_reply_t *reply;
 
-        cookie = 
-          xcb_sync_initialize_unchecked(_ecore_xcb_conn, 
-                                        XCB_SYNC_MAJOR_VERSION, 
+        cookie =
+          xcb_sync_initialize_unchecked(_ecore_xcb_conn,
+                                        XCB_SYNC_MAJOR_VERSION,
                                         XCB_SYNC_MINOR_VERSION);
         reply = xcb_sync_initialize_reply(_ecore_xcb_conn, cookie, NULL);
-        if (reply) 
+        if (reply)
           {
              if (reply->major_version >= 3) _sync_avail = EINA_TRUE;
              free(reply);
@@ -52,8 +52,9 @@ _ecore_xcb_sync_finalize(void)
 #endif
 }
 
-void 
-_ecore_xcb_sync_magic_send(int val, Ecore_X_Window win) 
+void
+_ecore_xcb_sync_magic_send(int            val,
+                           Ecore_X_Window win)
 {
    xcb_client_message_event_t ev;
 
@@ -68,14 +69,14 @@ _ecore_xcb_sync_magic_send(int val, Ecore_X_Window win)
    ev.data.data32[1] = (0x10000000 + val);
    ev.data.data32[2] = win;
 
-   xcb_send_event(_ecore_xcb_conn, 0, win, XCB_EVENT_MASK_NO_EVENT, 
+   xcb_send_event(_ecore_xcb_conn, 0, win, XCB_EVENT_MASK_NO_EVENT,
                   (const char *)&ev);
 //   ecore_x_flush();
 }
 
 /* public functions */
-EAPI Ecore_X_Sync_Alarm 
-ecore_x_sync_alarm_new(Ecore_X_Sync_Counter counter) 
+EAPI Ecore_X_Sync_Alarm
+ecore_x_sync_alarm_new(Ecore_X_Sync_Counter counter)
 {
 #ifdef ECORE_XCB_SYNC
    uint32_t list[6], mask;
@@ -93,8 +94,8 @@ ecore_x_sync_alarm_new(Ecore_X_Sync_Counter counter)
    init.hi = 0;
    xcb_sync_set_counter(_ecore_xcb_conn, counter, init);
 
-   mask = (XCB_SYNC_CA_COUNTER | XCB_SYNC_CA_VALUE_TYPE | 
-           XCB_SYNC_CA_VALUE | XCB_SYNC_CA_TEST_TYPE | 
+   mask = (XCB_SYNC_CA_COUNTER | XCB_SYNC_CA_VALUE_TYPE |
+           XCB_SYNC_CA_VALUE | XCB_SYNC_CA_TEST_TYPE |
            XCB_SYNC_CA_DELTA | XCB_SYNC_CA_EVENTS);
    list[0] = counter;
    list[1] = XCB_SYNC_VALUETYPE_ABSOLUTE;
@@ -112,8 +113,8 @@ ecore_x_sync_alarm_new(Ecore_X_Sync_Counter counter)
    return 0;
 }
 
-EAPI Eina_Bool 
-ecore_x_sync_alarm_free(Ecore_X_Sync_Alarm alarm) 
+EAPI Eina_Bool
+ecore_x_sync_alarm_free(Ecore_X_Sync_Alarm alarm)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    CHECK_XCB_CONN;
@@ -129,8 +130,9 @@ ecore_x_sync_alarm_free(Ecore_X_Sync_Alarm alarm)
    return EINA_FALSE;
 }
 
-EAPI Eina_Bool 
-ecore_x_sync_counter_query(Ecore_X_Sync_Counter counter, unsigned int *val) 
+EAPI Eina_Bool
+ecore_x_sync_counter_query(Ecore_X_Sync_Counter counter,
+                           unsigned int        *val)
 {
 #ifdef ECORE_XCB_SYNC
    xcb_sync_query_counter_cookie_t cookie;
@@ -145,7 +147,7 @@ ecore_x_sync_counter_query(Ecore_X_Sync_Counter counter, unsigned int *val)
 #ifdef ECORE_XCB_SYNC
    cookie = xcb_sync_query_counter_unchecked(_ecore_xcb_conn, counter);
    reply = xcb_sync_query_counter_reply(_ecore_xcb_conn, cookie, NULL);
-   if (reply) 
+   if (reply)
      {
         if (val) *val = (unsigned int)reply->counter_value.lo;
         free(reply);
@@ -155,8 +157,9 @@ ecore_x_sync_counter_query(Ecore_X_Sync_Counter counter, unsigned int *val)
    return EINA_FALSE;
 }
 
-EAPI void 
-ecore_x_sync_counter_inc(Ecore_X_Sync_Counter counter, int by) 
+EAPI void
+ecore_x_sync_counter_inc(Ecore_X_Sync_Counter counter,
+                         int                  by)
 {
 #ifdef ECORE_XCB_SYNC
    xcb_sync_int64_t v;
@@ -176,8 +179,9 @@ ecore_x_sync_counter_inc(Ecore_X_Sync_Counter counter, int by)
 #endif
 }
 
-EAPI void 
-ecore_x_sync_counter_val_wait(Ecore_X_Sync_Counter counter, int val) 
+EAPI void
+ecore_x_sync_counter_val_wait(Ecore_X_Sync_Counter counter,
+                              int                  val)
 {
 #ifdef ECORE_XCB_SYNC
    xcb_sync_query_counter_cookie_t cookie;
@@ -214,8 +218,8 @@ ecore_x_sync_counter_val_wait(Ecore_X_Sync_Counter counter, int val)
 #endif
 }
 
-EAPI Ecore_X_Sync_Counter 
-ecore_x_sync_counter_new(int val) 
+EAPI Ecore_X_Sync_Counter
+ecore_x_sync_counter_new(int val)
 {
 #ifdef ECORE_XCB_SYNC
    xcb_sync_counter_t counter;
@@ -241,8 +245,8 @@ ecore_x_sync_counter_new(int val)
    return 0;
 }
 
-EAPI void 
-ecore_x_sync_counter_free(Ecore_X_Sync_Counter counter) 
+EAPI void
+ecore_x_sync_counter_free(Ecore_X_Sync_Counter counter)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    CHECK_XCB_CONN;
@@ -255,8 +259,9 @@ ecore_x_sync_counter_free(Ecore_X_Sync_Counter counter)
 #endif
 }
 
-EAPI void 
-ecore_x_sync_counter_set(Ecore_X_Sync_Counter counter, int val) 
+EAPI void
+ecore_x_sync_counter_set(Ecore_X_Sync_Counter counter,
+                         int                  val)
 {
 #ifdef ECORE_XCB_SYNC
    xcb_sync_int64_t v;
@@ -276,8 +281,10 @@ ecore_x_sync_counter_set(Ecore_X_Sync_Counter counter, int val)
 #endif
 }
 
-EAPI void 
-ecore_x_sync_counter_2_set(Ecore_X_Sync_Counter counter, int val_hi, unsigned int val_lo) 
+EAPI void
+ecore_x_sync_counter_2_set(Ecore_X_Sync_Counter counter,
+                           int                  val_hi,
+                           unsigned int         val_lo)
 {
 #ifdef ECORE_XCB_SYNC
    xcb_sync_int64_t v;
@@ -297,8 +304,10 @@ ecore_x_sync_counter_2_set(Ecore_X_Sync_Counter counter, int val_hi, unsigned in
 #endif
 }
 
-EAPI Eina_Bool 
-ecore_x_sync_counter_2_query(Ecore_X_Sync_Counter counter, int *val_hi, unsigned int *val_lo) 
+EAPI Eina_Bool
+ecore_x_sync_counter_2_query(Ecore_X_Sync_Counter counter,
+                             int                 *val_hi,
+                             unsigned int        *val_lo)
 {
 #ifdef ECORE_XCB_SYNC
    xcb_sync_query_counter_cookie_t cookie;
@@ -312,8 +321,8 @@ ecore_x_sync_counter_2_query(Ecore_X_Sync_Counter counter, int *val_hi, unsigned
    if ((!_sync_avail) || (!counter)) return EINA_FALSE;
 
 #ifdef ECORE_XCB_SYNC
-   cookie = 
-     xcb_sync_query_counter_unchecked(_ecore_xcb_conn, 
+   cookie =
+     xcb_sync_query_counter_unchecked(_ecore_xcb_conn,
                                       (xcb_sync_counter_t)counter);
    reply = xcb_sync_query_counter_reply(_ecore_xcb_conn, cookie, NULL);
    if (!reply) return EINA_FALSE;
@@ -326,3 +335,4 @@ ecore_x_sync_counter_2_query(Ecore_X_Sync_Counter counter, int *val_hi, unsigned
 
    return EINA_FALSE;
 }
+
index 942719d..2a5c854 100644 (file)
@@ -8,40 +8,59 @@
 # define CODESET "INVALID"
 #endif
 
-static int _ecore_xcb_textlist_get_buffer_size(Eina_Bool is_wide, void *list, int count);
-static int _ecore_xcb_textlist_get_wc_len(wchar_t *wstr);
-static void *_ecore_xcb_textlist_alloc_list(Eina_Bool is_wide, int count, int nitems);
-static void _ecore_xcb_textlist_copy_list(Eina_Bool is_wide, void *text, char **list, int count);
-static wchar_t *_ecore_xcb_textlist_copy_wchar(wchar_t *str1, wchar_t *str2);
-static int _ecore_xcb_textlist_len_wchar(wchar_t *str);
+static int _ecore_xcb_textlist_get_buffer_size(Eina_Bool is_wide,
+                                               void     *list,
+                                               int       count);
+static int   _ecore_xcb_textlist_get_wc_len(wchar_t *wstr);
+static void *_ecore_xcb_textlist_alloc_list(Eina_Bool is_wide,
+                                            int       count,
+                                            int       nitems);
+static void _ecore_xcb_textlist_copy_list(Eina_Bool is_wide,
+                                          void     *text,
+                                          char    **list,
+                                          int       count);
+static wchar_t *_ecore_xcb_textlist_copy_wchar(wchar_t *str1,
+                                               wchar_t *str2);
+static int      _ecore_xcb_textlist_len_wchar(wchar_t *str);
 
 #ifdef HAVE_ICONV
-Eina_Bool 
-_ecore_xcb_utf8_textlist_to_textproperty(char **list, int count, Ecore_Xcb_Encoding_Style style, Ecore_Xcb_Textproperty *ret) 
+Eina_Bool
+_ecore_xcb_utf8_textlist_to_textproperty(char                   **list,
+                                         int                      count,
+                                         Ecore_Xcb_Encoding_Style style,
+                                         Ecore_Xcb_Textproperty  *ret)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
 
-   return _ecore_xcb_textlist_to_textproperty("utf8string", list, count, 
+   return _ecore_xcb_textlist_to_textproperty("utf8string", list, count,
                                               style, ret);
 }
+
 #endif
 
-Eina_Bool 
-_ecore_xcb_mb_textlist_to_textproperty(char **list, int count, Ecore_Xcb_Encoding_Style style, Ecore_Xcb_Textproperty *ret) 
+Eina_Bool
+_ecore_xcb_mb_textlist_to_textproperty(char                   **list,
+                                       int                      count,
+                                       Ecore_Xcb_Encoding_Style style,
+                                       Ecore_Xcb_Textproperty  *ret)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
 
-   return _ecore_xcb_textlist_to_textproperty("multiByte", list, count, 
+   return _ecore_xcb_textlist_to_textproperty("multiByte", list, count,
                                               style, ret);
 }
 
-/* NB: This Function May Not Be Correct !!! 
+/* NB: This Function May Not Be Correct !!!
  * (as I do not know text conversion, locales, etc, etc very well)
- * 
+ *
  * Portions were ripped from libX11 XTextListToTextProperty
  */
-Eina_Bool 
-_ecore_xcb_textlist_to_textproperty(const char *type, char **list, int count, Ecore_Xcb_Encoding_Style style, Ecore_Xcb_Textproperty *ret) 
+Eina_Bool
+_ecore_xcb_textlist_to_textproperty(const char              *type,
+                                    char                   **list,
+                                    int                      count,
+                                    Ecore_Xcb_Encoding_Style style,
+                                    Ecore_Xcb_Textproperty  *ret)
 {
    Eina_Bool is_wide = EINA_FALSE;
    Ecore_X_Atom encoding;
@@ -62,7 +81,7 @@ _ecore_xcb_textlist_to_textproperty(const char *type, char **list, int count, Ec
    len = _ecore_xcb_textlist_get_buffer_size(is_wide, list, count);
    if (!(buff = (char *)malloc(len * sizeof(char)))) return EINA_FALSE;
    from_type = nl_langinfo(CODESET);
-   switch (style) 
+   switch (style)
      {
       case XcbStringStyle:
       case XcbStdICCTextStyle:
@@ -70,25 +89,28 @@ _ecore_xcb_textlist_to_textproperty(const char *type, char **list, int count, Ec
         to_type = nl_langinfo(CODESET);
 //        to_type = "string";
         break;
+
       case XcbUTF8StringStyle:
         encoding = ECORE_X_ATOM_UTF8_STRING;
         to_type = "UTF-8";
         break;
+
       case XcbCompoundTextStyle:
         encoding = ECORE_X_ATOM_COMPOUND_TEXT;
         to_type = nl_langinfo(CODESET);
 //        to_type = "compoundText";
         break;
+
       case XcbTextStyle:
         encoding = ECORE_X_ATOM_TEXT;
         to_type = nl_langinfo(CODESET);
 //        to_type = "multiByte";
-        if (!is_wide) 
+        if (!is_wide)
           {
              nitems = 0;
              mb = (char **)list;
              to = buff;
-             for (i = 0; ((i < count) && (len > 0)); i++) 
+             for (i = 0; ((i < count) && (len > 0)); i++)
                {
                   if (*mb) strcpy(to, *mb);
                   else *to = '\0';
@@ -101,13 +123,14 @@ _ecore_xcb_textlist_to_textproperty(const char *type, char **list, int count, Ec
              goto done;
           }
         break;
+
       default:
         free(buff);
         return EINA_FALSE;
         break;
      }
 
-   if (count < 1) 
+   if (count < 1)
      {
         nitems = 0;
         goto done;
@@ -126,15 +149,15 @@ retry:
    to = buff;
    to_left = len;
    unconv_num = 0;
-   for (i = 1; to_left > 0; i++) 
+   for (i = 1; to_left > 0; i++)
      {
-        if (is_wide) 
+        if (is_wide)
           {
              from = (char *)*wc;
              from_left = _ecore_xcb_textlist_get_wc_len(*wc);
              wc++;
           }
-        else 
+        else
           {
              from = *mb;
              from_left = (*mb ? strlen(*mb) : 0);
@@ -145,8 +168,8 @@ retry:
         val = iconv(conv, &from, &from_left, &to, &to_left);
 #endif
         if (val < 0) continue;
-        if ((val > 0) && (style == XcbStdICCTextStyle) && 
-            (encoding == ECORE_X_ATOM_STRING)) 
+        if ((val > 0) && (style == XcbStdICCTextStyle) &&
+            (encoding == ECORE_X_ATOM_STRING))
           {
 #ifdef HAVE_ICONV
              iconv_close(conv);
@@ -157,7 +180,7 @@ retry:
 
         unconv_num += val;
         *to++ = '\0';
-        to_left --;
+        to_left--;
         if (i >= count) break;
      }
 
@@ -168,12 +191,12 @@ retry:
 
 done:
    if (nitems <= 0) nitems = 1;
-   if (!(value = (char *)malloc(nitems * sizeof(char)))) 
+   if (!(value = (char *)malloc(nitems * sizeof(char))))
      {
         free(buff);
         return EINA_FALSE;
      }
-   if (nitems == 1) 
+   if (nitems == 1)
      *value = 0;
    else
      memcpy(value, buff, nitems);
@@ -189,27 +212,35 @@ done:
 }
 
 #ifdef HAVE_ICONV
-Eina_Bool 
-_ecore_xcb_utf8_textproperty_to_textlist(const Ecore_Xcb_Textproperty *text_prop, char ***list_ret, int *count_ret) 
+Eina_Bool
+_ecore_xcb_utf8_textproperty_to_textlist(const Ecore_Xcb_Textproperty *text_prop,
+                                         char                       ***list_ret,
+                                         int                          *count_ret)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
 
-   return _ecore_xcb_textproperty_to_textlist(text_prop, "utf8String", 
+   return _ecore_xcb_textproperty_to_textlist(text_prop, "utf8String",
                                               list_ret, count_ret);
 }
+
 #endif
 
-Eina_Bool 
-_ecore_xcb_mb_textproperty_to_textlist(const Ecore_Xcb_Textproperty *text_prop, char ***list_ret, int *count_ret) 
+Eina_Bool
+_ecore_xcb_mb_textproperty_to_textlist(const Ecore_Xcb_Textproperty *text_prop,
+                                       char                       ***list_ret,
+                                       int                          *count_ret)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
 
-   return _ecore_xcb_textproperty_to_textlist(text_prop, "multiByte", 
+   return _ecore_xcb_textproperty_to_textlist(text_prop, "multiByte",
                                               list_ret, count_ret);
 }
 
-Eina_Bool 
-_ecore_xcb_textproperty_to_textlist(const Ecore_Xcb_Textproperty *text_prop, const char *type, char ***list_ret, int *count_ret) 
+Eina_Bool
+_ecore_xcb_textproperty_to_textlist(const Ecore_Xcb_Textproperty *text_prop,
+                                    const char                   *type,
+                                    char                       ***list_ret,
+                                    int                          *count_ret)
 {
    Eina_Bool is_wide = EINA_FALSE;
    Eina_Bool do_strcpy = EINA_FALSE;
@@ -237,7 +268,7 @@ _ecore_xcb_textproperty_to_textlist(const Ecore_Xcb_Textproperty *text_prop, con
 
    if (is_wide)
      len = (text_prop->nitems + 1) * sizeof(wchar_t);
-   else 
+   else
      {
         if (!strcmp(type, "utf8String"))
           len = text_prop->nitems * 6 + 1;
@@ -253,12 +284,12 @@ _ecore_xcb_textproperty_to_textlist(const Ecore_Xcb_Textproperty *text_prop, con
 
    if (!strcmp(from_type, type))
      do_strcpy = EINA_TRUE;
-   else 
+   else
      {
 #ifdef HAVE_ICONV
         conv = iconv_open(type, from_type);
 #endif
-        if (!conv) 
+        if (!conv)
           {
              free(buff);
              return EINA_FALSE;
@@ -267,14 +298,14 @@ _ecore_xcb_textproperty_to_textlist(const Ecore_Xcb_Textproperty *text_prop, con
 
    lptr = sptr = text_prop->value;
    num = *count_ret = 0;
-   while (1) 
+   while (1)
      {
-        if ((nitems == 0) || (*sptr == 0)) 
+        if ((nitems == 0) || (*sptr == 0))
           {
              from = lptr;
              from_left = sptr - lptr;
              lptr = sptr;
-             if (do_strcpy) 
+             if (do_strcpy)
                {
                   int l = 0;
 
@@ -294,13 +325,13 @@ _ecore_xcb_textproperty_to_textlist(const Ecore_Xcb_Textproperty *text_prop, con
              (*count_ret)++;
              if (nitems == 0) break;
              lptr = ++sptr;
-             if (is_wide) 
+             if (is_wide)
                {
                   *((wchar_t *)to) = (wchar_t)0;
                   to += sizeof(wchar_t);
                   to_left -= sizeof(wchar_t);
                }
-             else 
+             else
                {
                   *((char *)to) = '\0';
                   to++;
@@ -317,20 +348,20 @@ _ecore_xcb_textproperty_to_textlist(const Ecore_Xcb_Textproperty *text_prop, con
    if (!do_strcpy) iconv_close(conv);
 #endif
 
-   if (is_wide) 
+   if (is_wide)
      {
         *((wchar_t *)to) = (wchar_t)0;
         to_left -= sizeof(wchar_t);
      }
-   else 
+   else
      {
         *((char *)to) = '\0';
         to_left--;
      }
 
-   *list_ret = 
+   *list_ret =
      _ecore_xcb_textlist_alloc_list(is_wide, *count_ret, (len - to_left));
-   if (*list_ret) 
+   if (*list_ret)
      _ecore_xcb_textlist_copy_list(is_wide, buff, *list_ret, *count_ret);
 
    free(buff);
@@ -338,22 +369,24 @@ _ecore_xcb_textproperty_to_textlist(const Ecore_Xcb_Textproperty *text_prop, con
    return EINA_TRUE;
 }
 
-static int 
-_ecore_xcb_textlist_get_buffer_size(Eina_Bool is_wide, void *list, int count) 
+static int
+_ecore_xcb_textlist_get_buffer_size(Eina_Bool is_wide,
+                                    void     *list,
+                                    int       count)
 {
    int len = 0;
    char **mb;
    wchar_t **wc;
 
    if (!list) return 0;
-   if (is_wide) 
+   if (is_wide)
      {
         wc = (wchar_t **)list;
-        for (; count-- > 0; wc++) 
-          if (*wc) len  += _ecore_xcb_textlist_get_wc_len(*wc) + 1;
+        for (; count-- > 0; wc++)
+          if (*wc) len += _ecore_xcb_textlist_get_wc_len(*wc) + 1;
         len *= 5;
      }
-   else 
+   else
      {
         mb = (char **)list;
         for (; count-- > 0; mb++)
@@ -364,8 +397,8 @@ _ecore_xcb_textlist_get_buffer_size(Eina_Bool is_wide, void *list, int count)
    return len;
 }
 
-static int 
-_ecore_xcb_textlist_get_wc_len(wchar_t *wstr) 
+static int
+_ecore_xcb_textlist_get_wc_len(wchar_t *wstr)
 {
    wchar_t *ptr;
 
@@ -373,34 +406,36 @@ _ecore_xcb_textlist_get_wc_len(wchar_t *wstr)
    while (*ptr)
      ptr++;
 
-   return (ptr - wstr);
+   return ptr - wstr;
 }
 
 static void *
-_ecore_xcb_textlist_alloc_list(Eina_Bool is_wide, int count, int nitems) 
+_ecore_xcb_textlist_alloc_list(Eina_Bool is_wide,
+                               int       count,
+                               int       nitems)
 {
-   if (is_wide) 
+   if (is_wide)
      {
         wchar_t **list;
 
         list = (wchar_t **)malloc(count * sizeof(wchar_t *));
         if (!list) return NULL;
         *list = (wchar_t *)malloc(nitems * sizeof(wchar_t));
-        if (!*list) 
+        if (!*list)
           {
              free(list);
              return NULL;
           }
         return *list;
      }
-   else 
+   else
      {
         char **list;
 
         list = (char **)malloc(count * sizeof(char *));
         if (!list) return NULL;
         *list = (char *)malloc(nitems * sizeof(char));
-        if (!*list) 
+        if (!*list)
           {
              free(list);
              return NULL;
@@ -409,18 +444,21 @@ _ecore_xcb_textlist_alloc_list(Eina_Bool is_wide, int count, int nitems)
      }
 }
 
-static void 
-_ecore_xcb_textlist_copy_list(Eina_Bool is_wide, void *text, char **list, int count) 
+static void
+_ecore_xcb_textlist_copy_list(Eina_Bool is_wide,
+                              void     *text,
+                              char    **list,
+                              int       count)
 {
    int len = 0;
 
-   if (is_wide) 
+   if (is_wide)
      {
         wchar_t *txt, *str, **wlist;
 
         txt = (wchar_t *)text;
         wlist = (wchar_t **)list;
-        for (str = *wlist; count > 0; count--, wlist++) 
+        for (str = *wlist; count > 0; count--, wlist++)
           {
              _ecore_xcb_textlist_copy_wchar(str, txt);
              *wlist = str;
@@ -429,13 +467,13 @@ _ecore_xcb_textlist_copy_list(Eina_Bool is_wide, void *text, char **list, int co
              txt += len;
           }
      }
-   else 
+   else
      {
         char *txt, *str, **slist;
 
         txt = (char *)text;
         slist = (char **)list;
-        for (str = *slist; count > 0; count--, slist++) 
+        for (str = *slist; count > 0; count--, slist++)
           {
              strcpy(str, txt);
              *slist = str;
@@ -447,7 +485,8 @@ _ecore_xcb_textlist_copy_list(Eina_Bool is_wide, void *text, char **list, int co
 }
 
 static wchar_t *
-_ecore_xcb_textlist_copy_wchar(wchar_t *str1, wchar_t *str2) 
+_ecore_xcb_textlist_copy_wchar(wchar_t *str1,
+                               wchar_t *str2)
 {
    wchar_t *tmp;
 
@@ -457,13 +496,14 @@ _ecore_xcb_textlist_copy_wchar(wchar_t *str1, wchar_t *str2)
    return tmp;
 }
 
-static int 
-_ecore_xcb_textlist_len_wchar(wchar_t *str) 
+static int
+_ecore_xcb_textlist_len_wchar(wchar_t *str)
 {
    wchar_t *ptr;
 
    ptr = str;
-   while (*ptr) 
+   while (*ptr)
      ptr++;
-   return (ptr - str);
+   return ptr - str;
 }
+
index 22a4444..47efefc 100644 (file)
@@ -3,7 +3,7 @@
 # include <dlfcn.h>
 # include <X11/Xlib-xcb.h>
 
-#define ECORE_XCB_VSYNC_DRI2 1
+#define ECORE_XCB_VSYNC_DRI2      1
 #define DRM_EVENT_CONTEXT_VERSION 2
 
 #ifdef ECORE_XCB_VSYNC_DRI2
@@ -26,51 +26,76 @@ typedef enum
 typedef struct _drmVBlankReq
 {
    drmVBlankSeqType type;
-   unsigned int sequence;
-   unsigned long signal;
+   unsigned int     sequence;
+   unsigned long    signal;
 } drmVBlankReq;
 
 typedef struct _drmVBlankReply
 {
    drmVBlankSeqType type;
-   unsigned int sequence;
-   long tval_sec, tval_usec;
+   unsigned int     sequence;
+   long             tval_sec, tval_usec;
 } drmVBlankReply;
 
 typedef union _drmVBlank
 {
-   drmVBlankReq request;
+   drmVBlankReq   request;
    drmVBlankReply reply;
 } drmVBlank;
 
 typedef struct _drmEventContext
 {
    int version;
-   void (*vblank_handler)(int fd, unsigned int sequence, unsigned int tv_sec, unsigned int tv_usec, void *user_data);
-   void (*page_flip_handler)(int fd, unsigned int sequence, unsigned int tv_sec, unsigned int tv_usec, void *user_data);
+   void (*vblank_handler)(int          fd,
+                          unsigned int sequence,
+                          unsigned int tv_sec,
+                          unsigned int tv_usec,
+                          void        *user_data);
+   void (*page_flip_handler)(int          fd,
+                             unsigned int sequence,
+                             unsigned int tv_sec,
+                             unsigned int tv_usec,
+                             void        *user_data);
 } drmEventContext;
 
-static int (*sym_drmClose) (int fd) = NULL;
-static int (*sym_drmGetMagic) (int fd, drm_magic_t * magic) = NULL;
-static int (*sym_drmWaitVBlank) (int fd, drmVBlank *vbl) = NULL;
-static int (*sym_drmHandleEvent) (int fd, drmEventContext *evctx) = NULL;
+static int (*sym_drmClose)(int fd) = NULL;
+static int (*sym_drmGetMagic)(int          fd,
+                              drm_magic_t *magic) = NULL;
+static int (*sym_drmWaitVBlank)(int        fd,
+                                drmVBlank *vbl) = NULL;
+static int (*sym_drmHandleEvent)(int              fd,
+                                 drmEventContext *evctx) = NULL;
 
 /* dri */
-static Bool (*sym_DRI2QueryExtension) (Display *display, int *eventBase, int *errorBase) = NULL;
-static Bool (*sym_DRI2QueryVersion) (Display *display, int *major, int *minor) = NULL;
-static Bool (*sym_DRI2Connect) (Display *display, XID window, char **driverName, char **deviceName) = NULL;
-static Bool (*sym_DRI2Authenticate) (Display *display, XID window, drm_magic_t magic) = NULL;
+static Bool (*sym_DRI2QueryExtension)(Display *display,
+                                      int     *eventBase,
+                                      int     *errorBase) = NULL;
+static Bool (*sym_DRI2QueryVersion)(Display *display,
+                                    int     *major,
+                                    int     *minor) = NULL;
+static Bool (*sym_DRI2Connect)(Display *display,
+                               XID      window,
+                               char   **driverName,
+                               char   **deviceName) = NULL;
+static Bool (*sym_DRI2Authenticate)(Display    *display,
+                                    XID         window,
+                                    drm_magic_t magic) = NULL;
 
 /* local function prototypes */
 static Eina_Bool _ecore_xcb_dri_link(void);
 static Eina_Bool _ecore_xcb_dri_start(void);
-static void _ecore_xcb_dri_shutdown(void);
-
-static Eina_Bool _ecore_xcb_dri_cb(void *data __UNUSED__, Ecore_Fd_Handler *fdh __UNUSED__);
-static void _ecore_xcb_dri_tick_begin(void *data __UNUSED__);
-static void _ecore_xcb_dri_tick_end(void *data __UNUSED__);
-static void _ecore_xcb_dri_tick_schedule(void);
-static void _ecore_xcb_dri_vblank_handler(int fd __UNUSED__, unsigned int frame __UNUSED__, unsigned int sec __UNUSED__, unsigned int usec __UNUSED__, void *data __UNUSED__);
+static void      _ecore_xcb_dri_shutdown(void);
+
+static Eina_Bool _ecore_xcb_dri_cb(void             *data __UNUSED__,
+                                   Ecore_Fd_Handler *fdh __UNUSED__);
+static void      _ecore_xcb_dri_tick_begin(void *data __UNUSED__);
+static void      _ecore_xcb_dri_tick_end(void *data __UNUSED__);
+static void      _ecore_xcb_dri_tick_schedule(void);
+static void      _ecore_xcb_dri_vblank_handler(int          fd __UNUSED__,
+                                               unsigned int frame __UNUSED__,
+                                               unsigned int sec __UNUSED__,
+                                               unsigned int usec __UNUSED__,
+                                               void        *data __UNUSED__);
 
 /* local variables */
 static Ecore_X_Window _vsync_root = 0;
@@ -83,20 +108,20 @@ static void *_dri_lib = NULL;
 static drmEventContext _drm_evctx;
 #endif
 
-void 
-_ecore_xcb_dri_init(void) 
+void
+_ecore_xcb_dri_init(void)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
 }
 
-void 
-_ecore_xcb_dri_finalize(void) 
+void
+_ecore_xcb_dri_finalize(void)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
 }
 
-EAPI Eina_Bool 
-ecore_x_vsync_animator_tick_source_set(Ecore_X_Window win) 
+EAPI Eina_Bool
+ecore_x_vsync_animator_tick_source_set(Ecore_X_Window win)
 {
 #ifdef ECORE_XCB_VSYNC_DRI2
    Ecore_X_Window root;
@@ -107,18 +132,18 @@ ecore_x_vsync_animator_tick_source_set(Ecore_X_Window win)
 
 #ifdef ECORE_XCB_VSYNC_DRI2
    root = ecore_x_window_root_get(win);
-   if (root != _vsync_root) 
+   if (root != _vsync_root)
      {
         _vsync_root = root;
-        if (_vsync_root) 
+        if (_vsync_root)
           {
-             if (!_ecore_xcb_dri_link()) 
+             if (!_ecore_xcb_dri_link())
                {
                   ecore_animator_source_set(ECORE_ANIMATOR_SOURCE_TIMER);
                   return EINA_FALSE;
                }
              _ecore_xcb_dri_shutdown();
-             if (!_ecore_xcb_dri_start()) 
+             if (!_ecore_xcb_dri_start())
                {
                   _vsync_root = 0;
                   ecore_animator_source_set(ECORE_ANIMATOR_SOURCE_TIMER);
@@ -130,9 +155,9 @@ ecore_x_vsync_animator_tick_source_set(Ecore_X_Window win)
                (_ecore_xcb_dri_tick_end, NULL);
              ecore_animator_source_set(ECORE_ANIMATOR_SOURCE_CUSTOM);
           }
-        else 
+        else
           {
-             if (_drm_fd >= 0) 
+             if (_drm_fd >= 0)
                {
                   _ecore_xcb_dri_shutdown();
                   ecore_animator_custom_source_tick_begin_callback_set
@@ -152,57 +177,57 @@ ecore_x_vsync_animator_tick_source_set(Ecore_X_Window win)
 
 /* local functions */
 #ifdef ECORE_XCB_VSYNC_DRI2
-static Eina_Bool 
-_ecore_xcb_dri_link(void) 
+static Eina_Bool
+_ecore_xcb_dri_link(void)
 {
-   const char *_drm_libs[] = 
-     {
-        "libdrm.so.2", 
-        "libdrm.so.1", 
-        "libdrm.so.0", 
-        "libdrm.so", 
-        NULL,
-     };
-   const char *_dri_libs[] = 
-     {
-        "libdri2.so.2",
-        "libdri2.so.1",
-        "libdri2.so.0",
-        "libdri2.so",
-        "libGL.so.4",
-        "libGL.so.3",
-        "libGL.so.2",
-        "libGL.so.1",
-        "libGL.so.0",
-        "libGL.so",
-        NULL,
-     };
+   const char *_drm_libs[] =
+   {
+      "libdrm.so.2",
+      "libdrm.so.1",
+      "libdrm.so.0",
+      "libdrm.so",
+      NULL,
+   };
+   const char *_dri_libs[] =
+   {
+      "libdri2.so.2",
+      "libdri2.so.1",
+      "libdri2.so.0",
+      "libdri2.so",
+      "libGL.so.4",
+      "libGL.so.3",
+      "libGL.so.2",
+      "libGL.so.1",
+      "libGL.so.0",
+      "libGL.so",
+      NULL,
+   };
    int i = 0, fail = 0;
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
 
-# define SYM(lib, xx) \
-   do { \
-      sym_## xx = dlsym(lib, #xx); \
-      if (!(sym_## xx)) { \
-         fprintf(stderr, "%s\n", dlerror()); \
-         fail = 1; \
-      } \
-   } while (0);
+# define SYM(lib, xx)                           \
+  do {                                          \
+       sym_## xx = dlsym(lib, #xx);             \
+       if (!(sym_## xx)) {                      \
+            fprintf(stderr, "%s\n", dlerror()); \
+            fail = 1;                           \
+         }                                      \
+    } while (0);
 
    if (_drm_lib) return EINA_TRUE;
 
-   for (i = 0; _drm_libs[i]; i++) 
+   for (i = 0; _drm_libs[i]; i++)
      {
         _drm_lib = dlopen(_drm_libs[i], (RTLD_LOCAL | RTLD_LAZY));
-        if (_drm_lib) 
+        if (_drm_lib)
           {
              fail = 0;
              SYM(_drm_lib, drmClose);
              SYM(_drm_lib, drmGetMagic);
              SYM(_drm_lib, drmWaitVBlank);
              SYM(_drm_lib, drmHandleEvent);
-             if (fail) 
+             if (fail)
                {
                   dlclose(_drm_lib);
                   _drm_lib = NULL;
@@ -212,16 +237,16 @@ _ecore_xcb_dri_link(void)
           }
      }
    if (!_drm_lib) return EINA_FALSE;
-   for (i = 0; _dri_libs[i]; i++) 
+   for (i = 0; _dri_libs[i]; i++)
      {
-        if ((_dri_lib = dlopen(_dri_libs[i], (RTLD_LOCAL | RTLD_LAZY)))) 
+        if ((_dri_lib = dlopen(_dri_libs[i], (RTLD_LOCAL | RTLD_LAZY))))
           {
              fail = 0;
              SYM(_dri_lib, DRI2QueryExtension);
              SYM(_dri_lib, DRI2QueryVersion);
              SYM(_dri_lib, DRI2Connect);
              SYM(_dri_lib, DRI2Authenticate);
-             if (fail) 
+             if (fail)
                {
                   dlclose(_dri_lib);
                   _dri_lib = NULL;
@@ -230,7 +255,7 @@ _ecore_xcb_dri_link(void)
                break;
           }
      }
-   if (!_dri_lib) 
+   if (!_dri_lib)
      {
         dlclose(_drm_lib);
         _drm_lib = NULL;
@@ -240,8 +265,8 @@ _ecore_xcb_dri_link(void)
    return EINA_TRUE;
 }
 
-static Eina_Bool 
-_ecore_xcb_dri_start(void) 
+static Eina_Bool
+_ecore_xcb_dri_start(void)
 {
    Ecore_X_Display *disp;
    int _dri2_event = 0, _dri2_error = 0;
@@ -273,9 +298,9 @@ _ecore_xcb_dri_start(void)
    _drm_evctx.vblank_handler = _ecore_xcb_dri_vblank_handler;
    _drm_evctx.page_flip_handler = NULL;
 
-   _drm_fdh = ecore_main_fd_handler_add(_drm_fd, ECORE_FD_READ, 
+   _drm_fdh = ecore_main_fd_handler_add(_drm_fd, ECORE_FD_READ,
                                         _ecore_xcb_dri_cb, NULL, NULL, NULL);
-   if (!_drm_fdh) 
+   if (!_drm_fdh)
      {
         close(_drm_fd);
         _drm_fd = -1;
@@ -285,43 +310,44 @@ _ecore_xcb_dri_start(void)
    return EINA_TRUE;
 }
 
-static void 
-_ecore_xcb_dri_shutdown(void) 
+static void
+_ecore_xcb_dri_shutdown(void)
 {
-   if (_drm_fd >= 0) 
+   if (_drm_fd >= 0)
      {
         close(_drm_fd);
         _drm_fd = -1;
      }
-   if (_drm_fdh) 
+   if (_drm_fdh)
      {
         ecore_main_fd_handler_del(_drm_fdh);
         _drm_fdh = NULL;
      }
 }
 
-static Eina_Bool 
-_ecore_xcb_dri_cb(void *data __UNUSED__, Ecore_Fd_Handler *fdh __UNUSED__) 
+static Eina_Bool
+_ecore_xcb_dri_cb(void             *data __UNUSED__,
+                  Ecore_Fd_Handler *fdh __UNUSED__)
 {
    sym_drmHandleEvent(_drm_fd, &_drm_evctx);
    return ECORE_CALLBACK_RENEW;
 }
 
-static void 
-_ecore_xcb_dri_tick_begin(void *data __UNUSED__) 
+static void
+_ecore_xcb_dri_tick_begin(void *data __UNUSED__)
 {
    _drm_event_busy = EINA_TRUE;
    _ecore_xcb_dri_tick_schedule();
 }
 
-static void 
-_ecore_xcb_dri_tick_end(void *data __UNUSED__) 
+static void
+_ecore_xcb_dri_tick_end(void *data __UNUSED__)
 {
    _drm_event_busy = EINA_FALSE;
 }
 
-static void 
-_ecore_xcb_dri_tick_schedule(void) 
+static void
+_ecore_xcb_dri_tick_schedule(void)
 {
    drmVBlank vbl;
 
@@ -335,10 +361,15 @@ _ecore_xcb_dri_tick_schedule(void)
    sym_drmWaitVBlank(_drm_fd, &vbl);
 }
 
-static void 
-_ecore_xcb_dri_vblank_handler(int fd __UNUSED__, unsigned int frame __UNUSED__, unsigned int sec __UNUSED__, unsigned int usec __UNUSED__, void *data __UNUSED__) 
+static void
+_ecore_xcb_dri_vblank_handler(int          fd __UNUSED__,
+                              unsigned int frame __UNUSED__,
+                              unsigned int sec __UNUSED__,
+                              unsigned int usec __UNUSED__,
+                              void        *data __UNUSED__)
 {
    ecore_animator_custom_tick();
    if (_drm_event_busy) _ecore_xcb_dri_tick_schedule();
 }
+
 #endif
index 4f2605b..bf2e040 100644 (file)
 #endif
 
 /* local function prototypes */
-static Ecore_X_Window _ecore_xcb_window_argb_internal_new(Ecore_X_Window parent, int x, int y, int w, int h, uint8_t override_redirect, uint8_t save_under);
-static Ecore_X_Window _ecore_xcb_window_at_xy_get(Ecore_X_Window base, int bx, int by, int x, int y, Ecore_X_Window *skip, int skip_num);
-static int _ecore_xcb_window_modifiers_get(unsigned int state);
+static Ecore_X_Window _ecore_xcb_window_argb_internal_new(Ecore_X_Window parent,
+                                                          int            x,
+                                                          int            y,
+                                                          int            w,
+                                                          int            h,
+                                                          uint8_t        override_redirect,
+                                                          uint8_t        save_under);
+static Ecore_X_Window _ecore_xcb_window_at_xy_get(Ecore_X_Window  base,
+                                                  int             bx,
+                                                  int             by,
+                                                  int             x,
+                                                  int             y,
+                                                  Ecore_X_Window *skip,
+                                                  int             skip_num);
+static int               _ecore_xcb_window_modifiers_get(unsigned int state);
 static xcb_visualtype_t *_ecore_xcb_window_find_visual_by_id(xcb_visualid_t id);
 #ifdef ECORE_XCB_XPRINT
-static xcb_screen_t *_ecore_xcb_window_screen_of_display(int screen);
+static xcb_screen_t     *_ecore_xcb_window_screen_of_display(int screen);
 #endif
 
 /* local variables */
@@ -27,7 +39,9 @@ int _ecore_xcb_button_grabs_num = 0;
 int _ecore_xcb_key_grabs_num = 0;
 Ecore_X_Window *_ecore_xcb_button_grabs = NULL;
 Ecore_X_Window *_ecore_xcb_key_grabs = NULL;
-Eina_Bool (*_ecore_xcb_window_grab_replay_func)(void *data, int type, void *event);
+Eina_Bool (*_ecore_xcb_window_grab_replay_func)(void *data,
+                                                int   type,
+                                                void *event);
 void *_ecore_xcb_window_grab_replay_data;
 
 /**
@@ -47,8 +61,12 @@ void *_ecore_xcb_window_grab_replay_data;
  * @return  The new window handle.
  * @ingroup Ecore_X_Window_Create_Group
  */
-EAPI Ecore_X_Window 
-ecore_x_window_new(Ecore_X_Window parent, int x, int y, int w, int h) 
+EAPI Ecore_X_Window
+ecore_x_window_new(Ecore_X_Window parent,
+                   int            x,
+                   int            y,
+                   int            w,
+                   int            h)
 {
    Ecore_X_Window win;
    uint32_t mask, mask_list[9];
@@ -60,9 +78,9 @@ ecore_x_window_new(Ecore_X_Window parent, int x, int y, int w, int h)
      parent = ((xcb_screen_t *)_ecore_xcb_screen)->root;
 
    /* NB: Order here is very important due to xcb_cw_t enum */
-   mask = (XCB_CW_BACK_PIXMAP | XCB_CW_BORDER_PIXEL | XCB_CW_BIT_GRAVITY | 
-           XCB_CW_WIN_GRAVITY | XCB_CW_BACKING_STORE | 
-           XCB_CW_OVERRIDE_REDIRECT | XCB_CW_SAVE_UNDER | XCB_CW_EVENT_MASK | 
+   mask = (XCB_CW_BACK_PIXMAP | XCB_CW_BORDER_PIXEL | XCB_CW_BIT_GRAVITY |
+           XCB_CW_WIN_GRAVITY | XCB_CW_BACKING_STORE |
+           XCB_CW_OVERRIDE_REDIRECT | XCB_CW_SAVE_UNDER | XCB_CW_EVENT_MASK |
            XCB_CW_DONT_PROPAGATE);
 
    mask_list[0] = XCB_BACK_PIXMAP_NONE;
@@ -72,25 +90,25 @@ ecore_x_window_new(Ecore_X_Window parent, int x, int y, int w, int h)
    mask_list[4] = XCB_BACKING_STORE_NOT_USEFUL;
    mask_list[5] = 0;
    mask_list[6] = 0;
-   mask_list[7] = (XCB_EVENT_MASK_KEY_PRESS | XCB_EVENT_MASK_KEY_RELEASE | 
-                   XCB_EVENT_MASK_BUTTON_PRESS | 
-                   XCB_EVENT_MASK_BUTTON_RELEASE | 
-                   XCB_EVENT_MASK_ENTER_WINDOW | XCB_EVENT_MASK_LEAVE_WINDOW | 
-                   XCB_EVENT_MASK_POINTER_MOTION | XCB_EVENT_MASK_EXPOSURE | 
-                   XCB_EVENT_MASK_VISIBILITY_CHANGE | 
-                   XCB_EVENT_MASK_STRUCTURE_NOTIFY | 
-                   XCB_EVENT_MASK_FOCUS_CHANGE | 
-                   XCB_EVENT_MASK_PROPERTY_CHANGE | 
+   mask_list[7] = (XCB_EVENT_MASK_KEY_PRESS | XCB_EVENT_MASK_KEY_RELEASE |
+                   XCB_EVENT_MASK_BUTTON_PRESS |
+                   XCB_EVENT_MASK_BUTTON_RELEASE |
+                   XCB_EVENT_MASK_ENTER_WINDOW | XCB_EVENT_MASK_LEAVE_WINDOW |
+                   XCB_EVENT_MASK_POINTER_MOTION | XCB_EVENT_MASK_EXPOSURE |
+                   XCB_EVENT_MASK_VISIBILITY_CHANGE |
+                   XCB_EVENT_MASK_STRUCTURE_NOTIFY |
+                   XCB_EVENT_MASK_FOCUS_CHANGE |
+                   XCB_EVENT_MASK_PROPERTY_CHANGE |
                    XCB_EVENT_MASK_COLOR_MAP_CHANGE);
    mask_list[8] = XCB_EVENT_MASK_NO_EVENT;
 
    win = xcb_generate_id(_ecore_xcb_conn);
-   xcb_create_window(_ecore_xcb_conn, XCB_COPY_FROM_PARENT, 
-                     win, parent, x, y, w, h, 0, 
-                     XCB_WINDOW_CLASS_INPUT_OUTPUT, 
+   xcb_create_window(_ecore_xcb_conn, XCB_COPY_FROM_PARENT,
+                     win, parent, x, y, w, h, 0,
+                     XCB_WINDOW_CLASS_INPUT_OUTPUT,
                      XCB_COPY_FROM_PARENT, mask, mask_list);
 
-   if (parent == ((xcb_screen_t *)_ecore_xcb_screen)->root) 
+   if (parent == ((xcb_screen_t *)_ecore_xcb_screen)->root)
      ecore_x_window_defaults_set(win);
 
    return win;
@@ -107,8 +125,12 @@ ecore_x_window_new(Ecore_X_Window parent, int x, int y, int w, int h)
  * @return  The new window handle.
  * @ingroup Ecore_X_Window_Create_Group
  */
-EAPI Ecore_X_Window 
-ecore_x_window_override_new(Ecore_X_Window parent, int x, int y, int w, int h) 
+EAPI Ecore_X_Window
+ecore_x_window_override_new(Ecore_X_Window parent,
+                            int            x,
+                            int            y,
+                            int            w,
+                            int            h)
 {
    Ecore_X_Window win;
    uint32_t mask, mask_list[9];
@@ -120,9 +142,9 @@ ecore_x_window_override_new(Ecore_X_Window parent, int x, int y, int w, int h)
      parent = ((xcb_screen_t *)_ecore_xcb_screen)->root;
 
    /* NB: Order here is very important due to xcb_cw_t enum */
-   mask = (XCB_CW_BACK_PIXMAP | XCB_CW_BORDER_PIXEL | XCB_CW_BIT_GRAVITY | 
-           XCB_CW_WIN_GRAVITY | XCB_CW_BACKING_STORE | 
-           XCB_CW_OVERRIDE_REDIRECT | XCB_CW_SAVE_UNDER | XCB_CW_EVENT_MASK | 
+   mask = (XCB_CW_BACK_PIXMAP | XCB_CW_BORDER_PIXEL | XCB_CW_BIT_GRAVITY |
+           XCB_CW_WIN_GRAVITY | XCB_CW_BACKING_STORE |
+           XCB_CW_OVERRIDE_REDIRECT | XCB_CW_SAVE_UNDER | XCB_CW_EVENT_MASK |
            XCB_CW_DONT_PROPAGATE);
 
    mask_list[0] = XCB_BACK_PIXMAP_NONE;
@@ -132,22 +154,22 @@ ecore_x_window_override_new(Ecore_X_Window parent, int x, int y, int w, int h)
    mask_list[4] = XCB_BACKING_STORE_NOT_USEFUL;
    mask_list[5] = 1;
    mask_list[6] = 0;
-   mask_list[7] = (XCB_EVENT_MASK_KEY_PRESS | XCB_EVENT_MASK_KEY_RELEASE | 
-                   XCB_EVENT_MASK_BUTTON_PRESS | 
-                   XCB_EVENT_MASK_BUTTON_RELEASE | 
-                   XCB_EVENT_MASK_ENTER_WINDOW | XCB_EVENT_MASK_LEAVE_WINDOW | 
-                   XCB_EVENT_MASK_POINTER_MOTION | XCB_EVENT_MASK_EXPOSURE | 
-                   XCB_EVENT_MASK_VISIBILITY_CHANGE | 
-                   XCB_EVENT_MASK_STRUCTURE_NOTIFY | 
-                   XCB_EVENT_MASK_FOCUS_CHANGE | 
-                   XCB_EVENT_MASK_PROPERTY_CHANGE | 
+   mask_list[7] = (XCB_EVENT_MASK_KEY_PRESS | XCB_EVENT_MASK_KEY_RELEASE |
+                   XCB_EVENT_MASK_BUTTON_PRESS |
+                   XCB_EVENT_MASK_BUTTON_RELEASE |
+                   XCB_EVENT_MASK_ENTER_WINDOW | XCB_EVENT_MASK_LEAVE_WINDOW |
+                   XCB_EVENT_MASK_POINTER_MOTION | XCB_EVENT_MASK_EXPOSURE |
+                   XCB_EVENT_MASK_VISIBILITY_CHANGE |
+                   XCB_EVENT_MASK_STRUCTURE_NOTIFY |
+                   XCB_EVENT_MASK_FOCUS_CHANGE |
+                   XCB_EVENT_MASK_PROPERTY_CHANGE |
                    XCB_EVENT_MASK_COLOR_MAP_CHANGE);
    mask_list[8] = XCB_EVENT_MASK_NO_EVENT;
 
    win = xcb_generate_id(_ecore_xcb_conn);
-   xcb_create_window(_ecore_xcb_conn, XCB_COPY_FROM_PARENT, 
-                     win, parent, x, y, w, h, 0, 
-                     XCB_WINDOW_CLASS_INPUT_OUTPUT, 
+   xcb_create_window(_ecore_xcb_conn, XCB_COPY_FROM_PARENT,
+                     win, parent, x, y, w, h, 0,
+                     XCB_WINDOW_CLASS_INPUT_OUTPUT,
                      XCB_COPY_FROM_PARENT, mask, mask_list);
 
    return win;
@@ -164,8 +186,12 @@ ecore_x_window_override_new(Ecore_X_Window parent, int x, int y, int w, int h)
  * @return  The new window.
  * @ingroup Ecore_X_Window_Create_Group
  */
-EAPI Ecore_X_Window 
-ecore_x_window_input_new(Ecore_X_Window parent, int x, int y, int w, int h) 
+EAPI Ecore_X_Window
+ecore_x_window_input_new(Ecore_X_Window parent,
+                         int            x,
+                         int            y,
+                         int            w,
+                         int            h)
 {
    Ecore_X_Window win;
    uint32_t mask, mask_list[3];
@@ -177,26 +203,26 @@ ecore_x_window_input_new(Ecore_X_Window parent, int x, int y, int w, int h)
      parent = ((xcb_screen_t *)_ecore_xcb_screen)->root;
 
    /* NB: Order here is very important due to xcb_cw_t enum */
-   mask = (XCB_CW_OVERRIDE_REDIRECT | XCB_CW_EVENT_MASK | 
+   mask = (XCB_CW_OVERRIDE_REDIRECT | XCB_CW_EVENT_MASK |
            XCB_CW_DONT_PROPAGATE);
 
    mask_list[0] = 1;
-   mask_list[1] = (XCB_EVENT_MASK_KEY_PRESS | XCB_EVENT_MASK_KEY_RELEASE | 
-                   XCB_EVENT_MASK_BUTTON_PRESS | 
-                   XCB_EVENT_MASK_BUTTON_RELEASE | 
-                   XCB_EVENT_MASK_ENTER_WINDOW | XCB_EVENT_MASK_LEAVE_WINDOW | 
-                   XCB_EVENT_MASK_POINTER_MOTION | XCB_EVENT_MASK_EXPOSURE | 
-                   XCB_EVENT_MASK_VISIBILITY_CHANGE | 
-                   XCB_EVENT_MASK_STRUCTURE_NOTIFY | 
-                   XCB_EVENT_MASK_FOCUS_CHANGE | 
-                   XCB_EVENT_MASK_PROPERTY_CHANGE | 
+   mask_list[1] = (XCB_EVENT_MASK_KEY_PRESS | XCB_EVENT_MASK_KEY_RELEASE |
+                   XCB_EVENT_MASK_BUTTON_PRESS |
+                   XCB_EVENT_MASK_BUTTON_RELEASE |
+                   XCB_EVENT_MASK_ENTER_WINDOW | XCB_EVENT_MASK_LEAVE_WINDOW |
+                   XCB_EVENT_MASK_POINTER_MOTION | XCB_EVENT_MASK_EXPOSURE |
+                   XCB_EVENT_MASK_VISIBILITY_CHANGE |
+                   XCB_EVENT_MASK_STRUCTURE_NOTIFY |
+                   XCB_EVENT_MASK_FOCUS_CHANGE |
+                   XCB_EVENT_MASK_PROPERTY_CHANGE |
                    XCB_EVENT_MASK_COLOR_MAP_CHANGE);
    mask_list[2] = XCB_EVENT_MASK_NO_EVENT;
 
    win = xcb_generate_id(_ecore_xcb_conn);
-   xcb_create_window(_ecore_xcb_conn, XCB_COPY_FROM_PARENT, 
-                     win, parent, x, y, w, h, 0, 
-                     XCB_WINDOW_CLASS_INPUT_ONLY, 
+   xcb_create_window(_ecore_xcb_conn, XCB_COPY_FROM_PARENT,
+                     win, parent, x, y, w, h, 0,
+                     XCB_WINDOW_CLASS_INPUT_ONLY,
                      XCB_COPY_FROM_PARENT, mask, mask_list);
 
    return win;
@@ -213,8 +239,12 @@ ecore_x_window_input_new(Ecore_X_Window parent, int x, int y, int w, int h)
  * @return  The new window handle.
  * @ingroup Ecore_X_Window_Create_Group
  */
-EAPI Ecore_X_Window 
-ecore_x_window_manager_argb_new(Ecore_X_Window parent, int x, int y, int w, int h) 
+EAPI Ecore_X_Window
+ecore_x_window_manager_argb_new(Ecore_X_Window parent,
+                                int            x,
+                                int            y,
+                                int            w,
+                                int            h)
 {
    Ecore_X_Window win = 0;
 
@@ -236,8 +266,12 @@ ecore_x_window_manager_argb_new(Ecore_X_Window parent, int x, int y, int w, int
  * @return  The new window handle.
  * @ingroup Ecore_X_Window_Create_Group
  */
-EAPI Ecore_X_Window 
-ecore_x_window_argb_new(Ecore_X_Window parent, int x, int y, int w, int h) 
+EAPI Ecore_X_Window
+ecore_x_window_argb_new(Ecore_X_Window parent,
+                        int            x,
+                        int            y,
+                        int            w,
+                        int            h)
 {
    Ecore_X_Window win = 0;
 
@@ -259,8 +293,12 @@ ecore_x_window_argb_new(Ecore_X_Window parent, int x, int y, int w, int h)
  * @return  The new window handle.
  * @ingroup Ecore_X_Window_Create_Group
  */
-EAPI Ecore_X_Window 
-ecore_x_window_override_argb_new(Ecore_X_Window parent, int x, int y, int w, int h) 
+EAPI Ecore_X_Window
+ecore_x_window_override_argb_new(Ecore_X_Window parent,
+                                 int            x,
+                                 int            y,
+                                 int            w,
+                                 int            h)
 {
    Ecore_X_Window win = 0;
 
@@ -282,43 +320,43 @@ ecore_x_window_override_argb_new(Ecore_X_Window parent, int x, int y, int w, int
  * @param   win The given window.
  * @ingroup Ecore_X_Window_Destroy_Group
  */
-EAPI void 
-ecore_x_window_free(Ecore_X_Window win) 
+EAPI void
+ecore_x_window_free(Ecore_X_Window win)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    CHECK_XCB_CONN;
 
-   if (win) 
+   if (win)
      {
         /* xcb_destroy_notify_event_t ev; */
         /* Ecore_X_Window root; */
 
-        /* if (xcb_setup_roots_iterator(xcb_get_setup(_ecore_xcb_conn)).rem == 1) */
-        /*   root = ((xcb_screen_t *)_ecore_xcb_screen)->root; */
-        /* else  */
-        /*   { */
-        /*      xcb_get_geometry_cookie_t cookie; */
-        /*      xcb_get_geometry_reply_t *reply; */
+          /* if (xcb_setup_roots_iterator(xcb_get_setup(_ecore_xcb_conn)).rem == 1) */
+          /*   root = ((xcb_screen_t *)_ecore_xcb_screen)->root; */
+          /* else  */
+          /*   { */
+          /*      xcb_get_geometry_cookie_t cookie; */
+          /*      xcb_get_geometry_reply_t *reply; */
 
-        /*      cookie = xcb_get_geometry_unchecked(_ecore_xcb_conn, win); */
-        /*      reply = xcb_get_geometry_reply(_ecore_xcb_conn, cookie, NULL); */
-        /*      if (!reply) return; */
-        /*      root = reply->root; */
-        /*      free(reply); */
-        /*   } */
+     /*      cookie = xcb_get_geometry_unchecked(_ecore_xcb_conn, win); */
+                 /*      reply = xcb_get_geometry_reply(_ecore_xcb_conn, cookie, NULL); */
+     /*      if (!reply) return; */
+                   /*      root = reply->root; */
+     /*      free(reply); */
+                     /*   } */
 
-        /* memset(&ev, 0, sizeof(xcb_destroy_notify_event_t)); */
+     /* memset(&ev, 0, sizeof(xcb_destroy_notify_event_t)); */
 
-        /* ev.response_type = XCB_DESTROY_NOTIFY; */
-        /* ev.window = win; */
-        /* ev.event = root; */
+                       /* ev.response_type = XCB_DESTROY_NOTIFY; */
+     /* ev.window = win; */
+                         /* ev.event = root; */
 
-        /* xcb_send_event(_ecore_xcb_conn, 0, root,  */
-        /*                XCB_EVENT_MASK_SUBSTRUCTURE_NOTIFY |  */
-        /*                XCB_EVENT_MASK_SUBSTRUCTURE_REDIRECT,  */
-        /*                (const char *)&ev); */
+     /* xcb_send_event(_ecore_xcb_conn, 0, root,  */
+                           /*                XCB_EVENT_MASK_SUBSTRUCTURE_NOTIFY |  */
+     /*                XCB_EVENT_MASK_SUBSTRUCTURE_REDIRECT,  */
+                             /*                (const char *)&ev); */
 
-        xcb_destroy_window(_ecore_xcb_conn, win);
+                              xcb_destroy_window(_ecore_xcb_conn, win);
 //        ecore_x_flush();
      }
 }
@@ -328,20 +366,28 @@ ecore_x_window_free(Ecore_X_Window win)
  * @param   win The given window.
  * @ingroup Ecore_X_Window_Destroy_Group
  */
-EAPI void 
-ecore_x_window_delete_request_send(Ecore_X_Window win) 
+EAPI void
+ecore_x_window_delete_request_send(Ecore_X_Window win)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
 
    if (!win) return;
-   ecore_x_client_message32_send(win, ECORE_X_ATOM_WM_PROTOCOLS, 
-                                 XCB_EVENT_MASK_NO_EVENT, 
-                                 ECORE_X_ATOM_WM_DELETE_WINDOW, 
+   ecore_x_client_message32_send(win, ECORE_X_ATOM_WM_PROTOCOLS,
+                                 XCB_EVENT_MASK_NO_EVENT,
+                                 ECORE_X_ATOM_WM_DELETE_WINDOW,
                                  XCB_CURRENT_TIME, 0, 0, 0);
 }
 
-EAPI void 
-ecore_x_window_configure(Ecore_X_Window win, Ecore_X_Window_Configure_Mask mask, int x, int y, int w, int h, int border_width, Ecore_X_Window sibling, int stack_mode) 
+EAPI void
+ecore_x_window_configure(Ecore_X_Window                win,
+                         Ecore_X_Window_Configure_Mask mask,
+                         int                           x,
+                         int                           y,
+                         int                           w,
+                         int                           h,
+                         int                           border_width,
+                         Ecore_X_Window                sibling,
+                         int                           stack_mode)
 {
    uint16_t vmask = 0;
    uint32_t vlist[7];
@@ -352,43 +398,43 @@ ecore_x_window_configure(Ecore_X_Window win, Ecore_X_Window_Configure_Mask mask,
 
    if (!win) return;
 
-   if (mask & XCB_CONFIG_WINDOW_X) 
+   if (mask & XCB_CONFIG_WINDOW_X)
      {
         vmask |= XCB_CONFIG_WINDOW_X;
         vlist[i++] = x;
      }
-   if (mask & XCB_CONFIG_WINDOW_Y) 
+   if (mask & XCB_CONFIG_WINDOW_Y)
      {
         vmask |= XCB_CONFIG_WINDOW_Y;
         vlist[i++] = y;
      }
-   if (mask & XCB_CONFIG_WINDOW_WIDTH) 
+   if (mask & XCB_CONFIG_WINDOW_WIDTH)
      {
         vmask |= XCB_CONFIG_WINDOW_WIDTH;
         vlist[i++] = w;
      }
-   if (mask & XCB_CONFIG_WINDOW_HEIGHT) 
+   if (mask & XCB_CONFIG_WINDOW_HEIGHT)
      {
         vmask |= XCB_CONFIG_WINDOW_HEIGHT;
         vlist[i++] = h;
      }
-   if (mask & XCB_CONFIG_WINDOW_BORDER_WIDTH) 
+   if (mask & XCB_CONFIG_WINDOW_BORDER_WIDTH)
      {
         vmask |= XCB_CONFIG_WINDOW_BORDER_WIDTH;
         vlist[i++] = border_width;
      }
-   if (mask & XCB_CONFIG_WINDOW_SIBLING) 
+   if (mask & XCB_CONFIG_WINDOW_SIBLING)
      {
         vmask |= XCB_CONFIG_WINDOW_SIBLING;
         vlist[i++] = sibling;
      }
-   if (mask & XCB_CONFIG_WINDOW_STACK_MODE) 
+   if (mask & XCB_CONFIG_WINDOW_STACK_MODE)
      {
         vmask |= XCB_CONFIG_WINDOW_STACK_MODE;
         vlist[i++] = stack_mode;
      }
 
-   xcb_configure_window(_ecore_xcb_conn, win, vmask, 
+   xcb_configure_window(_ecore_xcb_conn, win, vmask,
                         (const uint32_t *)&vlist);
 //   ecore_x_flush();
 }
@@ -410,8 +456,10 @@ ecore_x_window_configure(Ecore_X_Window win, Ecore_X_Window_Configure_Mask mask,
  * @param   y   Y position.
  * @ingroup Ecore_X_Window_Geometry_Group
  */
-EAPI void 
-ecore_x_window_move(Ecore_X_Window win, int x, int y) 
+EAPI void
+ecore_x_window_move(Ecore_X_Window win,
+                    int            x,
+                    int            y)
 {
    uint32_t list[2], mask;
 
@@ -424,7 +472,7 @@ ecore_x_window_move(Ecore_X_Window win, int x, int y)
    list[0] = x;
    list[1] = y;
 
-   xcb_configure_window(_ecore_xcb_conn, win, mask, 
+   xcb_configure_window(_ecore_xcb_conn, win, mask,
                         (const uint32_t *)&list);
 //   ecore_x_flush();
 }
@@ -436,8 +484,10 @@ ecore_x_window_move(Ecore_X_Window win, int x, int y)
  * @param   h   New height of the window.
  * @ingroup Ecore_X_Window_Geometry_Group
  */
-EAPI void 
-ecore_x_window_resize(Ecore_X_Window win, int w, int h) 
+EAPI void
+ecore_x_window_resize(Ecore_X_Window win,
+                      int            w,
+                      int            h)
 {
    uint32_t list[2], mask;
 
@@ -452,7 +502,7 @@ ecore_x_window_resize(Ecore_X_Window win, int w, int h)
    list[0] = w;
    list[1] = h;
 
-   xcb_configure_window(_ecore_xcb_conn, win, mask, 
+   xcb_configure_window(_ecore_xcb_conn, win, mask,
                         (const uint32_t *)&list);
 //   ecore_x_flush();
 }
@@ -466,8 +516,12 @@ ecore_x_window_resize(Ecore_X_Window win, int w, int h)
  * @param   h   New height of the window.
  * @ingroup Ecore_X_Window_Geometry_Group
  */
-EAPI void 
-ecore_x_window_move_resize(Ecore_X_Window win, int x, int y, int w, int h) 
+EAPI void
+ecore_x_window_move_resize(Ecore_X_Window win,
+                           int            x,
+                           int            y,
+                           int            w,
+                           int            h)
 {
    uint32_t list[4], mask;
 
@@ -478,14 +532,14 @@ ecore_x_window_move_resize(Ecore_X_Window win, int x, int y, int w, int h)
    if (w < 1) w = 1;
    if (h < 1) h = 1;
 
-   mask = (XCB_CONFIG_WINDOW_X | XCB_CONFIG_WINDOW_Y | 
+   mask = (XCB_CONFIG_WINDOW_X | XCB_CONFIG_WINDOW_Y |
            XCB_CONFIG_WINDOW_WIDTH | XCB_CONFIG_WINDOW_HEIGHT);
    list[0] = x;
    list[1] = y;
    list[2] = w;
    list[3] = h;
 
-   xcb_configure_window(_ecore_xcb_conn, win, mask, 
+   xcb_configure_window(_ecore_xcb_conn, win, mask,
                         (const uint32_t *)&list);
 //   ecore_x_flush();
 }
@@ -496,8 +550,8 @@ ecore_x_window_move_resize(Ecore_X_Window win, int x, int y, int w, int h)
  * @return  Width of the border of @p win.
  * @ingroup Ecore_X_Window_Geometry_Group
  */
-EAPI int 
-ecore_x_window_border_width_get(Ecore_X_Window win) 
+EAPI int
+ecore_x_window_border_width_get(Ecore_X_Window win)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
 
@@ -511,8 +565,9 @@ ecore_x_window_border_width_get(Ecore_X_Window win)
  * @param   width The new border width.
  * @ingroup Ecore_X_Window_Geometry_Group
  */
-EAPI void 
-ecore_x_window_border_width_set(Ecore_X_Window win, int border_width) 
+EAPI void
+ecore_x_window_border_width_set(Ecore_X_Window win,
+                                int            border_width)
 {
    uint32_t list;
 
@@ -523,7 +578,7 @@ ecore_x_window_border_width_set(Ecore_X_Window win, int border_width)
 
    list = border_width;
 
-   xcb_configure_window(_ecore_xcb_conn, win, 
+   xcb_configure_window(_ecore_xcb_conn, win,
                         XCB_CONFIG_WINDOW_BORDER_WIDTH, &list);
 //   ecore_x_flush();
 }
@@ -539,15 +594,15 @@ ecore_x_window_border_width_set(Ecore_X_Window win, int border_width)
  * @param   win The window to raise.
  * @ingroup Ecore_X_Window_Z_Order_Group
  */
-EAPI void 
-ecore_x_window_raise(Ecore_X_Window win) 
+EAPI void
+ecore_x_window_raise(Ecore_X_Window win)
 {
    uint32_t list[] = { XCB_STACK_MODE_ABOVE };
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    CHECK_XCB_CONN;
 
-   xcb_configure_window(_ecore_xcb_conn, win, 
+   xcb_configure_window(_ecore_xcb_conn, win,
                         XCB_CONFIG_WINDOW_STACK_MODE, list);
 //   ecore_x_flush();
 }
@@ -557,15 +612,15 @@ ecore_x_window_raise(Ecore_X_Window win)
  * @param   win The window to lower.
  * @ingroup Ecore_X_Window_Z_Order_Group
  */
-EAPI void 
-ecore_x_window_lower(Ecore_X_Window win) 
+EAPI void
+ecore_x_window_lower(Ecore_X_Window win)
 {
    uint32_t list[] = { XCB_STACK_MODE_BELOW };
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    CHECK_XCB_CONN;
 
-   xcb_configure_window(_ecore_xcb_conn, win, 
+   xcb_configure_window(_ecore_xcb_conn, win,
                         XCB_CONFIG_WINDOW_STACK_MODE, list);
 //   ecore_x_flush();
 }
@@ -575,8 +630,8 @@ ecore_x_window_lower(Ecore_X_Window win)
  * @param  win The given window.
  * @return Depth of the window.
  */
-EAPI int 
-ecore_x_window_depth_get(Ecore_X_Window win) 
+EAPI int
+ecore_x_window_depth_get(Ecore_X_Window win)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
 
@@ -598,8 +653,8 @@ ecore_x_window_depth_get(Ecore_X_Window win)
  * @param   win The given window.
  * @ingroup Ecore_X_Window_Properties_Groups
  */
-EAPI void 
-ecore_x_window_defaults_set(Ecore_X_Window win) 
+EAPI void
+ecore_x_window_defaults_set(Ecore_X_Window win)
 {
    char buff[MAXHOSTNAMELEN], **argv;
    int argc;
@@ -611,8 +666,8 @@ ecore_x_window_defaults_set(Ecore_X_Window win)
    gethostname(buff, MAXHOSTNAMELEN);
    buff[MAXHOSTNAMELEN - 1] = '\0';
 
-   xcb_change_property(_ecore_xcb_conn, XCB_PROP_MODE_REPLACE, win, 
-                       ECORE_X_ATOM_WM_CLIENT_MACHINE, ECORE_X_ATOM_STRING, 
+   xcb_change_property(_ecore_xcb_conn, XCB_PROP_MODE_REPLACE, win,
+                       ECORE_X_ATOM_WM_CLIENT_MACHINE, ECORE_X_ATOM_STRING,
                        8, strlen(buff), buff);
 
    pid = getpid();
@@ -636,13 +691,13 @@ ecore_x_window_defaults_set(Ecore_X_Window win)
  * @param   win The window to show.
  * @ingroup Ecore_X_Window_Visibility
  */
-EAPI void 
-ecore_x_window_show(Ecore_X_Window win) 
+EAPI void
+ecore_x_window_show(Ecore_X_Window win)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    CHECK_XCB_CONN;
 
-   if (win) 
+   if (win)
      xcb_map_window(_ecore_xcb_conn, win);
 }
 
@@ -654,20 +709,20 @@ ecore_x_window_show(Ecore_X_Window win)
  * @param   win The window to hide.
  * @ingroup Ecore_X_Window_Visibility
  */
-EAPI void 
-ecore_x_window_hide(Ecore_X_Window win) 
+EAPI void
+ecore_x_window_hide(Ecore_X_Window win)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    CHECK_XCB_CONN;
 
-   if (win) 
+   if (win)
      {
         xcb_unmap_notify_event_t ev;
         Ecore_X_Window root;
 
         if (xcb_setup_roots_iterator(xcb_get_setup(_ecore_xcb_conn)).rem == 1)
           root = ((xcb_screen_t *)_ecore_xcb_screen)->root;
-        else 
+        else
           {
              xcb_get_geometry_cookie_t cookie;
              xcb_get_geometry_reply_t *reply;
@@ -686,9 +741,9 @@ ecore_x_window_hide(Ecore_X_Window win)
         ev.event = root;
         ev.from_configure = 0;
 
-        xcb_send_event(_ecore_xcb_conn, 0, root, 
-                       (XCB_EVENT_MASK_SUBSTRUCTURE_NOTIFY | 
-                           XCB_EVENT_MASK_SUBSTRUCTURE_REDIRECT), 
+        xcb_send_event(_ecore_xcb_conn, 0, root,
+                       (XCB_EVENT_MASK_SUBSTRUCTURE_NOTIFY |
+                        XCB_EVENT_MASK_SUBSTRUCTURE_REDIRECT),
                        (const char *)&ev);
 
         xcb_unmap_window(_ecore_xcb_conn, win);
@@ -707,15 +762,15 @@ ecore_x_window_hide(Ecore_X_Window win)
  * @param   win The window to focus.
  * @ingroup Ecore_X_Window_Focus_Functions
  */
-EAPI void 
-ecore_x_window_focus(Ecore_X_Window win) 
+EAPI void
+ecore_x_window_focus(Ecore_X_Window win)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    CHECK_XCB_CONN;
 
    if (!win) win = ((xcb_screen_t *)_ecore_xcb_screen)->root;
 
-   xcb_set_input_focus(_ecore_xcb_conn, 
+   xcb_set_input_focus(_ecore_xcb_conn,
                        XCB_INPUT_FOCUS_PARENT, win, XCB_CURRENT_TIME);
 //   ecore_x_flush();
 }
@@ -726,8 +781,9 @@ ecore_x_window_focus(Ecore_X_Window win)
  * @param   t   When to set the focus to the window.
  * @ingroup Ecore_X_Window_Focus_Functions
  */
-EAPI void 
-ecore_x_window_focus_at_time(Ecore_X_Window win, Ecore_X_Time time) 
+EAPI void
+ecore_x_window_focus_at_time(Ecore_X_Window win,
+                             Ecore_X_Time   time)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    CHECK_XCB_CONN;
@@ -751,21 +807,25 @@ ecore_x_window_focus_at_time(Ecore_X_Window win, Ecore_X_Time time)
  * @param   y          Y position within new parent window.
  * @ingroup Ecore_X_Window_Parent_Group
  */
-EAPI void 
-ecore_x_window_reparent(Ecore_X_Window win, Ecore_X_Window parent, int x, int y) 
+EAPI void
+ecore_x_window_reparent(Ecore_X_Window win,
+                        Ecore_X_Window parent,
+                        int            x,
+                        int            y)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    CHECK_XCB_CONN;
 
-   if (parent == 0) 
+   if (parent == 0)
      parent = ((xcb_screen_t *)_ecore_xcb_screen)->root;
 
    xcb_reparent_window(_ecore_xcb_conn, win, parent, x, y);
 //   ecore_x_flush();
 }
 
-EAPI void 
-ecore_x_window_pixmap_set(Ecore_X_Window win, Ecore_X_Pixmap pixmap) 
+EAPI void
+ecore_x_window_pixmap_set(Ecore_X_Window win,
+                          Ecore_X_Pixmap pixmap)
 {
    uint32_t list;
 
@@ -774,7 +834,7 @@ ecore_x_window_pixmap_set(Ecore_X_Window win, Ecore_X_Pixmap pixmap)
 
    list = pixmap;
 
-   xcb_change_window_attributes(_ecore_xcb_conn, win, 
+   xcb_change_window_attributes(_ecore_xcb_conn, win,
                                 XCB_CW_BACK_PIXMAP, &list);
 //   ecore_x_flush();
 }
@@ -786,8 +846,11 @@ ecore_x_window_pixmap_set(Ecore_X_Window win, Ecore_X_Pixmap pixmap)
  * @param g     green value (0...65536, 16 bits)
  * @param b     blue value (0...65536, 16 bits)
  */
-EAPI void 
-ecore_x_window_background_color_set(Ecore_X_Window win, unsigned short red, unsigned short green, unsigned short blue) 
+EAPI void
+ecore_x_window_background_color_set(Ecore_X_Window win,
+                                    unsigned short red,
+                                    unsigned short green,
+                                    unsigned short blue)
 {
    xcb_alloc_color_cookie_t cookie;
    xcb_alloc_color_reply_t *reply;
@@ -796,22 +859,23 @@ ecore_x_window_background_color_set(Ecore_X_Window win, unsigned short red, unsi
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    CHECK_XCB_CONN;
 
-   cookie = 
-     xcb_alloc_color_unchecked(_ecore_xcb_conn, 
-                               ((xcb_screen_t *)_ecore_xcb_screen)->default_colormap, 
+   cookie =
+     xcb_alloc_color_unchecked(_ecore_xcb_conn,
+                               ((xcb_screen_t *)_ecore_xcb_screen)->default_colormap,
                                red, green, blue);
    reply = xcb_alloc_color_reply(_ecore_xcb_conn, cookie, NULL);
    if (!reply) return;
    list = reply->pixel;
    free(reply);
 
-   xcb_change_window_attributes(_ecore_xcb_conn, win, 
+   xcb_change_window_attributes(_ecore_xcb_conn, win,
                                 XCB_CW_BACK_PIXEL, &list);
 //   ecore_x_flush();
 }
 
-EAPI void 
-ecore_x_window_pixel_gravity_set(Ecore_X_Window win, Ecore_X_Gravity gravity) 
+EAPI void
+ecore_x_window_pixel_gravity_set(Ecore_X_Window  win,
+                                 Ecore_X_Gravity gravity)
 {
    uint32_t list;
 
@@ -820,13 +884,14 @@ ecore_x_window_pixel_gravity_set(Ecore_X_Window win, Ecore_X_Gravity gravity)
 
    list = gravity;
 
-   xcb_change_window_attributes(_ecore_xcb_conn, win, 
+   xcb_change_window_attributes(_ecore_xcb_conn, win,
                                 XCB_CW_BIT_GRAVITY, &list);
 //   ecore_x_flush();
 }
 
-EAPI void 
-ecore_x_window_gravity_set(Ecore_X_Window win, Ecore_X_Gravity gravity) 
+EAPI void
+ecore_x_window_gravity_set(Ecore_X_Window  win,
+                           Ecore_X_Gravity gravity)
 {
    uint32_t list;
 
@@ -835,13 +900,14 @@ ecore_x_window_gravity_set(Ecore_X_Window win, Ecore_X_Gravity gravity)
 
    list = gravity;
 
-   xcb_change_window_attributes(_ecore_xcb_conn, win, 
+   xcb_change_window_attributes(_ecore_xcb_conn, win,
                                 XCB_CW_WIN_GRAVITY, &list);
 //   ecore_x_flush();
 }
 
-EAPI void 
-ecore_x_window_override_set(Ecore_X_Window win, Eina_Bool override) 
+EAPI void
+ecore_x_window_override_set(Ecore_X_Window win,
+                            Eina_Bool      override)
 {
    uint32_t list;
 
@@ -850,7 +916,7 @@ ecore_x_window_override_set(Ecore_X_Window win, Eina_Bool override)
 
    list = override;
 
-   xcb_change_window_attributes(_ecore_xcb_conn, win, 
+   xcb_change_window_attributes(_ecore_xcb_conn, win,
                                 XCB_CW_OVERRIDE_REDIRECT, &list);
 //   ecore_x_flush();
 }
@@ -860,8 +926,9 @@ ecore_x_window_override_set(Ecore_X_Window win, Eina_Bool override)
  *
  * FIXME: To be fixed.
  */
-EAPI void 
-ecore_x_window_cursor_show(Ecore_X_Window win, Eina_Bool show) 
+EAPI void
+ecore_x_window_cursor_show(Ecore_X_Window win,
+                           Eina_Bool      show)
 {
    uint32_t list = 0;
 
@@ -870,7 +937,7 @@ ecore_x_window_cursor_show(Ecore_X_Window win, Eina_Bool show)
 
    if (!win) win = ((xcb_screen_t *)_ecore_xcb_screen)->root;
 
-   if (!show) 
+   if (!show)
      {
         Ecore_X_Cursor cursor;
         Ecore_X_Pixmap p, m;
@@ -886,32 +953,33 @@ ecore_x_window_cursor_show(Ecore_X_Window win, Eina_Bool show)
         xcb_change_gc(_ecore_xcb_conn, gc, XCB_GC_FOREGROUND, &list);
         point.x = 0;
         point.y = 0;
-        xcb_poly_point(_ecore_xcb_conn, XCB_COORD_MODE_ORIGIN, 
+        xcb_poly_point(_ecore_xcb_conn, XCB_COORD_MODE_ORIGIN,
                        win, gc, 1, &point);
         xcb_free_gc(_ecore_xcb_conn, gc);
 
         cursor = xcb_generate_id(_ecore_xcb_conn);
-        xcb_create_cursor(_ecore_xcb_conn, cursor, 
+        xcb_create_cursor(_ecore_xcb_conn, cursor,
                           p, m, 0, 0, 0, 0, 0, 0, 0, 0);
         list = cursor;
 
-        xcb_change_window_attributes(_ecore_xcb_conn, win, 
+        xcb_change_window_attributes(_ecore_xcb_conn, win,
                                      XCB_CW_CURSOR, &list);
 
         xcb_free_cursor(_ecore_xcb_conn, cursor);
         xcb_free_pixmap(_ecore_xcb_conn, m);
         xcb_free_pixmap(_ecore_xcb_conn, p);
      }
-   else 
+   else
      {
-        xcb_change_window_attributes(_ecore_xcb_conn, win, 
+        xcb_change_window_attributes(_ecore_xcb_conn, win,
                                      XCB_CW_CURSOR, &list);
      }
 //   ecore_x_flush();
 }
 
-EAPI void 
-ecore_x_window_cursor_set(Ecore_X_Window win, Ecore_X_Cursor cursor) 
+EAPI void
+ecore_x_window_cursor_set(Ecore_X_Window win,
+                          Ecore_X_Cursor cursor)
 {
    uint32_t list;
 
@@ -924,38 +992,38 @@ ecore_x_window_cursor_set(Ecore_X_Window win, Ecore_X_Cursor cursor)
 //   ecore_x_flush();
 }
 
-EAPI void 
-ecore_x_window_container_manage(Ecore_X_Window win) 
+EAPI void
+ecore_x_window_container_manage(Ecore_X_Window win)
 {
    uint32_t list;
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    CHECK_XCB_CONN;
 
-   list = (XCB_EVENT_MASK_SUBSTRUCTURE_REDIRECT | 
+   list = (XCB_EVENT_MASK_SUBSTRUCTURE_REDIRECT |
            XCB_EVENT_MASK_SUBSTRUCTURE_NOTIFY);
 
-   xcb_change_window_attributes(_ecore_xcb_conn, win, 
+   xcb_change_window_attributes(_ecore_xcb_conn, win,
                                 XCB_CW_EVENT_MASK, &list);
 //   ecore_x_flush();
 }
 
-EAPI void 
-ecore_x_window_client_manage(Ecore_X_Window win) 
+EAPI void
+ecore_x_window_client_manage(Ecore_X_Window win)
 {
    uint32_t list;
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    CHECK_XCB_CONN;
 
-   list = (XCB_EVENT_MASK_VISIBILITY_CHANGE | 
-           XCB_EVENT_MASK_FOCUS_CHANGE | 
-           XCB_EVENT_MASK_PROPERTY_CHANGE | 
-           XCB_EVENT_MASK_COLOR_MAP_CHANGE | 
-           XCB_EVENT_MASK_STRUCTURE_NOTIFY | 
+   list = (XCB_EVENT_MASK_VISIBILITY_CHANGE |
+           XCB_EVENT_MASK_FOCUS_CHANGE |
+           XCB_EVENT_MASK_PROPERTY_CHANGE |
+           XCB_EVENT_MASK_COLOR_MAP_CHANGE |
+           XCB_EVENT_MASK_STRUCTURE_NOTIFY |
            XCB_EVENT_MASK_SUBSTRUCTURE_NOTIFY);
 
-   xcb_change_window_attributes(_ecore_xcb_conn, win, 
+   xcb_change_window_attributes(_ecore_xcb_conn, win,
                                 XCB_CW_EVENT_MASK, &list);
 
 #ifdef ECORE_XCB_SHAPE
@@ -964,38 +1032,38 @@ ecore_x_window_client_manage(Ecore_X_Window win)
 //   ecore_x_flush();
 }
 
-EAPI void 
-ecore_x_window_sniff(Ecore_X_Window win) 
+EAPI void
+ecore_x_window_sniff(Ecore_X_Window win)
 {
    uint32_t list;
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    CHECK_XCB_CONN;
 
-   list = (XCB_EVENT_MASK_SUBSTRUCTURE_NOTIFY | 
+   list = (XCB_EVENT_MASK_SUBSTRUCTURE_NOTIFY |
            XCB_EVENT_MASK_PROPERTY_CHANGE);
 
-   xcb_change_window_attributes(_ecore_xcb_conn, win, 
+   xcb_change_window_attributes(_ecore_xcb_conn, win,
                                 XCB_CW_EVENT_MASK, &list);
 //   ecore_x_flush();
 }
 
-EAPI void 
-ecore_x_window_client_sniff(Ecore_X_Window win) 
+EAPI void
+ecore_x_window_client_sniff(Ecore_X_Window win)
 {
    uint32_t list;
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    CHECK_XCB_CONN;
 
-   list = (XCB_EVENT_MASK_VISIBILITY_CHANGE | 
-           XCB_EVENT_MASK_STRUCTURE_NOTIFY | 
-           XCB_EVENT_MASK_SUBSTRUCTURE_NOTIFY | 
-           XCB_EVENT_MASK_FOCUS_CHANGE | 
-           XCB_EVENT_MASK_PROPERTY_CHANGE | 
+   list = (XCB_EVENT_MASK_VISIBILITY_CHANGE |
+           XCB_EVENT_MASK_STRUCTURE_NOTIFY |
+           XCB_EVENT_MASK_SUBSTRUCTURE_NOTIFY |
+           XCB_EVENT_MASK_FOCUS_CHANGE |
+           XCB_EVENT_MASK_PROPERTY_CHANGE |
            XCB_EVENT_MASK_COLOR_MAP_CHANGE);
 
-   xcb_change_window_attributes(_ecore_xcb_conn, win, 
+   xcb_change_window_attributes(_ecore_xcb_conn, win,
                                 XCB_CW_EVENT_MASK, &list);
 #ifdef ECORE_XCB_SHAPE
    xcb_shape_select_input(_ecore_xcb_conn, win, EINA_TRUE);
@@ -1003,8 +1071,12 @@ ecore_x_window_client_sniff(Ecore_X_Window win)
 //   ecore_x_flush();
 }
 
-EAPI void 
-ecore_x_window_area_clear(Ecore_X_Window win, int x, int y, int w, int h) 
+EAPI void
+ecore_x_window_area_clear(Ecore_X_Window win,
+                          int            x,
+                          int            y,
+                          int            w,
+                          int            h)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    CHECK_XCB_CONN;
@@ -1013,8 +1085,12 @@ ecore_x_window_area_clear(Ecore_X_Window win, int x, int y, int w, int h)
 //   ecore_x_flush();
 }
 
-EAPI void 
-ecore_x_window_area_expose(Ecore_X_Window win, int x, int y, int w, int h) 
+EAPI void
+ecore_x_window_area_expose(Ecore_X_Window win,
+                           int            x,
+                           int            y,
+                           int            w,
+                           int            h)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    CHECK_XCB_CONN;
@@ -1023,8 +1099,8 @@ ecore_x_window_area_expose(Ecore_X_Window win, int x, int y, int w, int h)
 //   ecore_x_flush();
 }
 
-EAPI void 
-ecore_x_window_save_set_add(Ecore_X_Window win) 
+EAPI void
+ecore_x_window_save_set_add(Ecore_X_Window win)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    CHECK_XCB_CONN;
@@ -1032,8 +1108,8 @@ ecore_x_window_save_set_add(Ecore_X_Window win)
    xcb_change_save_set(_ecore_xcb_conn, XCB_SET_MODE_INSERT, win);
 }
 
-EAPI void 
-ecore_x_window_save_set_del(Ecore_X_Window win) 
+EAPI void
+ecore_x_window_save_set_del(Ecore_X_Window win)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    CHECK_XCB_CONN;
@@ -1046,8 +1122,8 @@ ecore_x_window_save_set_del(Ecore_X_Window win)
  * @return  The window that has focus.
  * @ingroup Ecore_X_Window_Focus_Functions
  */
-EAPI Ecore_X_Window 
-ecore_x_window_focus_get(void) 
+EAPI Ecore_X_Window
+ecore_x_window_focus_get(void)
 {
    xcb_get_input_focus_cookie_t cookie;
    xcb_get_input_focus_reply_t *reply;
@@ -1064,8 +1140,8 @@ ecore_x_window_focus_get(void)
    return focus;
 }
 
-EAPI int 
-ecore_x_window_argb_get(Ecore_X_Window win) 
+EAPI int
+ecore_x_window_argb_get(Ecore_X_Window win)
 {
    uint8_t ret = 0;
 #ifdef ECORE_XCB_RENDER
@@ -1088,8 +1164,8 @@ ecore_x_window_argb_get(Ecore_X_Window win)
    return ret;
 }
 
-EAPI Eina_Bool 
-ecore_x_window_manage(Ecore_X_Window win) 
+EAPI Eina_Bool
+ecore_x_window_manage(Ecore_X_Window win)
 {
    xcb_get_window_attributes_cookie_t cookie;
    xcb_get_window_attributes_reply_t *reply;
@@ -1106,22 +1182,22 @@ ecore_x_window_manage(Ecore_X_Window win)
 
    ecore_x_sync(); // needed
 
-   list = (XCB_EVENT_MASK_ENTER_WINDOW | XCB_EVENT_MASK_LEAVE_WINDOW | 
-           XCB_EVENT_MASK_PROPERTY_CHANGE | XCB_EVENT_MASK_RESIZE_REDIRECT | 
-           XCB_EVENT_MASK_SUBSTRUCTURE_REDIRECT | 
-           XCB_EVENT_MASK_SUBSTRUCTURE_NOTIFY | 
-           XCB_EVENT_MASK_STRUCTURE_NOTIFY | 
-           XCB_EVENT_MASK_KEY_PRESS | XCB_EVENT_MASK_KEY_RELEASE | 
+   list = (XCB_EVENT_MASK_ENTER_WINDOW | XCB_EVENT_MASK_LEAVE_WINDOW |
+           XCB_EVENT_MASK_PROPERTY_CHANGE | XCB_EVENT_MASK_RESIZE_REDIRECT |
+           XCB_EVENT_MASK_SUBSTRUCTURE_REDIRECT |
+           XCB_EVENT_MASK_SUBSTRUCTURE_NOTIFY |
+           XCB_EVENT_MASK_STRUCTURE_NOTIFY |
+           XCB_EVENT_MASK_KEY_PRESS | XCB_EVENT_MASK_KEY_RELEASE |
            reply->your_event_mask);
    free(reply);
 
-   change_cookie = xcb_change_window_attributes(_ecore_xcb_conn, win, 
+   change_cookie = xcb_change_window_attributes(_ecore_xcb_conn, win,
                                                 XCB_CW_EVENT_MASK, &list);
 
    ecore_x_sync(); // needed
 
    err = xcb_request_check(_ecore_xcb_conn, change_cookie);
-   if (err) 
+   if (err)
      {
         _ecore_xcb_error_handle(err);
         free(err);
@@ -1131,8 +1207,9 @@ ecore_x_window_manage(Ecore_X_Window win)
    return EINA_TRUE;
 }
 
-EAPI Eina_Bool 
-ecore_x_window_attributes_get(Ecore_X_Window win, Ecore_X_Window_Attributes *att_ret) 
+EAPI Eina_Bool
+ecore_x_window_attributes_get(Ecore_X_Window             win,
+                              Ecore_X_Window_Attributes *att_ret)
 {
    xcb_get_window_attributes_cookie_t cookie;
    xcb_get_window_attributes_reply_t *reply;
@@ -1154,13 +1231,13 @@ ecore_x_window_attributes_get(Ecore_X_Window win, Ecore_X_Window_Attributes *att
    if (reply->map_state == XCB_MAP_STATE_VIEWABLE)
      att_ret->viewable = EINA_TRUE;
 
-   if (reply->override_redirect) 
+   if (reply->override_redirect)
      att_ret->override = EINA_TRUE;
 
    if (reply->_class == XCB_WINDOW_CLASS_INPUT_ONLY)
      att_ret->input_only = EINA_TRUE;
 
-   if (reply->save_under) 
+   if (reply->save_under)
      att_ret->save_under = EINA_TRUE;
 
    att_ret->event_mask.mine = reply->your_event_mask;
@@ -1213,8 +1290,10 @@ ecore_x_window_attributes_get(Ecore_X_Window win, Ecore_X_Window_Attributes *att
  * @param   h   Pointer to an integer into which the height is to be stored.
  * @ingroup Ecore_X_Window_Geometry_Group
  */
-EAPI void 
-ecore_x_window_size_get(Ecore_X_Window win, int *width, int *height) 
+EAPI void
+ecore_x_window_size_get(Ecore_X_Window win,
+                        int           *width,
+                        int           *height)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    CHECK_XCB_CONN;
@@ -1228,28 +1307,29 @@ ecore_x_window_size_get(Ecore_X_Window win, int *width, int *height)
  * @param   win The given window.
  * @param   ignore if to ignore
  */
-EAPI void 
-ecore_x_window_ignore_set(Ecore_X_Window win, int ignore) 
+EAPI void
+ecore_x_window_ignore_set(Ecore_X_Window win,
+                          int            ignore)
 {
    int i = 0, j = 0, count = 0;
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    CHECK_XCB_CONN;
 
-   if (ignore) 
+   if (ignore)
      {
-        if (ignore_list) 
+        if (ignore_list)
           {
-             for (i = 0; i < ignore_num; i++) 
+             for (i = 0; i < ignore_num; i++)
                if (win == ignore_list[i]) return;
 
-             ignore_list = 
+             ignore_list =
                realloc(ignore_list, (ignore_num + 1) * sizeof(Ecore_X_Window));
              if (!ignore_list) return;
 
              ignore_list[ignore_num++] = win;
           }
-        else 
+        else
           {
              ignore_num = 0;
              ignore_list = malloc(sizeof(Ecore_X_Window));
@@ -1257,24 +1337,24 @@ ecore_x_window_ignore_set(Ecore_X_Window win, int ignore)
              ignore_list[ignore_num++] = win;
           }
      }
-   else 
+   else
      {
         if (!ignore_list) return;
-        for (count = ignore_num, i = 0, j = 0; i < count; i++) 
+        for (count = ignore_num, i = 0, j = 0; i < count; i++)
           {
              if (win != ignore_list[i])
                ignore_list[j++] = ignore_list[i];
              else
                ignore_num--;
           }
-        if (ignore_num <= 0) 
+        if (ignore_num <= 0)
           {
              free(ignore_list);
              ignore_list = NULL;
              return;
           }
 
-        ignore_list = 
+        ignore_list =
           realloc(ignore_list, ignore_num * sizeof(Ecore_X_Window));
      }
 }
@@ -1285,7 +1365,7 @@ ecore_x_window_ignore_set(Ecore_X_Window win, int ignore)
  * @return  list of windows to ignore
  */
 EAPI Ecore_X_Window *
-ecore_x_window_ignore_list(int *num) 
+ecore_x_window_ignore_list(int *num)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
 
@@ -1302,7 +1382,7 @@ ecore_x_window_ignore_list(int *num)
  *         could not be allocated for the list, or if @p num_ret is @c NULL.
  */
 EAPI Ecore_X_Window *
-ecore_x_window_root_list(int *num_ret) 
+ecore_x_window_root_list(int *num_ret)
 {
    xcb_screen_iterator_t iter;
    uint8_t i, num;
@@ -1327,54 +1407,54 @@ ecore_x_window_root_list(int *num_ret)
 
 #ifdef ECORE_XCB_XPRINT
    ext_reply = xcb_get_extension_data(_ecore_xcb_conn, &xcb_x_print_id);
-   if ((ext_reply) && (ext_reply->present)) 
+   if ((ext_reply) && (ext_reply->present))
      {
         xcb_x_print_print_query_screens_cookie_t cookie;
         xcb_x_print_print_query_screens_reply_t *reply;
 
         cookie = xcb_x_print_print_query_screens_unchecked(_ecore_xcb_conn);
-        reply = 
+        reply =
           xcb_x_print_print_query_screens_reply(_ecore_xcb_conn, cookie, NULL);
-        if (reply) 
+        if (reply)
           {
              xcb_window_t *screens;
              int psnum = 0, overlap = 0, j = 0, k = 0;
 
              psnum = xcb_x_print_print_query_screens_roots_length(reply);
              screens = xcb_x_print_print_query_screens_roots(reply);
-             for (i = 0; i < num; i++) 
+             for (i = 0; i < num; i++)
                {
-                  for (j = 0; j < psnum; j++) 
+                  for (j = 0; j < psnum; j++)
                     {
                        xcb_screen_t *s;
 
-                       if ((s = _ecore_xcb_window_screen_of_display(i))) 
+                       if ((s = _ecore_xcb_window_screen_of_display(i)))
                          {
-                            if (s->root == screens[j]) 
+                            if (s->root == screens[j])
                               overlap++;
                          }
                     }
                }
-             if (!(roots = malloc((num - overlap) 
+             if (!(roots = malloc((num - overlap)
                                   * sizeof(Ecore_X_Window)))) return NULL;
-             for (i = 0; i < num; i++) 
+             for (i = 0; i < num; i++)
                {
                   Eina_Bool is_print = EINA_FALSE;
 
-                  for (j = 0; j < psnum; j++) 
+                  for (j = 0; j < psnum; j++)
                     {
                        xcb_screen_t *s;
 
-                       if ((s = _ecore_xcb_window_screen_of_display(i))) 
+                       if ((s = _ecore_xcb_window_screen_of_display(i)))
                          {
-                            if (s->root == screens[j]) 
+                            if (s->root == screens[j])
                               {
                                  is_print = EINA_TRUE;
                                  break;
                               }
                          }
                     }
-                  if (!is_print) 
+                  if (!is_print)
                     {
                        xcb_screen_t *s;
 
@@ -1388,29 +1468,29 @@ ecore_x_window_root_list(int *num_ret)
              if (num_ret) *num_ret = k;
              free(reply);
           }
-        else 
+        else
           {
              /* Fallback to default method */
-             iter = 
-               xcb_setup_roots_iterator(xcb_get_setup(_ecore_xcb_conn));
-             if (!(roots = malloc(num * sizeof(Ecore_X_Window)))) return NULL;
-             if (num_ret) *num_ret = num;
-             for (i = 0; iter.rem; xcb_screen_next(&iter), i++)
-               roots[i] = iter.data->root;
+              iter =
+                xcb_setup_roots_iterator(xcb_get_setup(_ecore_xcb_conn));
+              if (!(roots = malloc(num * sizeof(Ecore_X_Window)))) return NULL;
+              if (num_ret) *num_ret = num;
+              for (i = 0; iter.rem; xcb_screen_next(&iter), i++)
+                roots[i] = iter.data->root;
           }
      }
-   else 
+   else
      {
         /* Fallback to default method */
-        iter = 
-          xcb_setup_roots_iterator(xcb_get_setup(_ecore_xcb_conn));
-        if (!(roots = malloc(num * sizeof(Ecore_X_Window)))) return NULL;
-        if (num_ret) *num_ret = num;
-        for (i = 0; iter.rem; xcb_screen_next(&iter), i++)
-          roots[i] = iter.data->root;
+         iter =
+           xcb_setup_roots_iterator(xcb_get_setup(_ecore_xcb_conn));
+         if (!(roots = malloc(num * sizeof(Ecore_X_Window)))) return NULL;
+         if (num_ret) *num_ret = num;
+         for (i = 0; iter.rem; xcb_screen_next(&iter), i++)
+           roots[i] = iter.data->root;
      }
 #else
-   iter = 
+   iter =
      xcb_setup_roots_iterator(xcb_get_setup(_ecore_xcb_conn));
    if (!(roots = malloc(num * sizeof(Ecore_X_Window)))) return NULL;
    if (num_ret) *num_ret = num;
@@ -1422,7 +1502,8 @@ ecore_x_window_root_list(int *num_ret)
 }
 
 EAPI Ecore_X_Window *
-ecore_x_window_children_get(Ecore_X_Window win, int *num) 
+ecore_x_window_children_get(Ecore_X_Window win,
+                            int           *num)
 {
    xcb_query_tree_cookie_t cookie;
    xcb_query_tree_reply_t *reply;
@@ -1437,16 +1518,16 @@ ecore_x_window_children_get(Ecore_X_Window win, int *num)
    if (!reply) return NULL;
 
    if (num) *num = reply->children_len;
-   if (reply->children_len > 0) 
+   if (reply->children_len > 0)
      {
         windows = malloc(sizeof(Ecore_X_Window) * reply->children_len);
-        if (windows) 
+        if (windows)
           {
              unsigned int i = 0;
              xcb_window_t *w;
 
              w = xcb_query_tree_children(reply);
-             for (i = 0; i < reply->children_len; i++) 
+             for (i = 0; i < reply->children_len; i++)
                windows[i] = w[i];
           }
      }
@@ -1461,8 +1542,8 @@ ecore_x_window_children_get(Ecore_X_Window win, int *num)
  * @return  The root window of @p win
  * @ingroup Ecore_X_Window_Geometry_Group
  */
-EAPI Ecore_X_Window 
-ecore_x_window_root_get(Ecore_X_Window win) 
+EAPI Ecore_X_Window
+ecore_x_window_root_get(Ecore_X_Window win)
 {
    xcb_get_geometry_cookie_t gcookie;
    xcb_get_geometry_reply_t *greply;
@@ -1480,8 +1561,8 @@ ecore_x_window_root_get(Ecore_X_Window win)
    return window;
 }
 
-EAPI Ecore_X_Window 
-ecore_x_window_root_first_get(void) 
+EAPI Ecore_X_Window
+ecore_x_window_root_first_get(void)
 {
    return ((xcb_screen_t *)_ecore_xcb_screen)->root;
 }
@@ -1502,8 +1583,12 @@ ecore_x_window_root_first_get(void)
  * @param   h   Pointer to an integer in which the height is to be stored.
  * @ingroup Ecore_X_Window_Geometry_Group
  */
-EAPI void 
-ecore_x_window_geometry_get(Ecore_X_Window win, int *x, int *y, int *w, int *h) 
+EAPI void
+ecore_x_window_geometry_get(Ecore_X_Window win,
+                            int           *x,
+                            int           *y,
+                            int           *w,
+                            int           *h)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    CHECK_XCB_CONN;
@@ -1519,8 +1604,9 @@ ecore_x_window_geometry_get(Ecore_X_Window win, int *x, int *y, int *w, int *h)
  * @return  The window at that position.
  * @ingroup Ecore_X_Window_Geometry_Group
  */
-EAPI Ecore_X_Window 
-ecore_x_window_at_xy_get(int x, int y) 
+EAPI Ecore_X_Window
+ecore_x_window_at_xy_get(int x,
+                         int y)
 {
    Ecore_X_Window root, win = 0;
 
@@ -1544,8 +1630,11 @@ ecore_x_window_at_xy_get(int x, int y)
  * @return  The window at that position.
  * @ingroup Ecore_X_Window_Geometry_Group
  */
-EAPI Ecore_X_Window 
-ecore_x_window_at_xy_with_skip_get(int x, int y, Ecore_X_Window *skip, int skip_num) 
+EAPI Ecore_X_Window
+ecore_x_window_at_xy_with_skip_get(int             x,
+                                   int             y,
+                                   Ecore_X_Window *skip,
+                                   int             skip_num)
 {
    Ecore_X_Window root, win = 0;
 
@@ -1561,8 +1650,10 @@ ecore_x_window_at_xy_with_skip_get(int x, int y, Ecore_X_Window *skip, int skip_
    return win ? win : root;
 }
 
-EAPI Ecore_X_Window 
-ecore_x_window_at_xy_begin_get(Ecore_X_Window begin, int x, int y) 
+EAPI Ecore_X_Window
+ecore_x_window_at_xy_begin_get(Ecore_X_Window begin,
+                               int            x,
+                               int            y)
 {
    Ecore_X_Window win = 0;
 
@@ -1582,8 +1673,8 @@ ecore_x_window_at_xy_begin_get(Ecore_X_Window begin, int x, int y)
  * @return  The parent window of @p win.
  * @ingroup Ecore_X_Window_Parent_Group
  */
-EAPI Ecore_X_Window 
-ecore_x_window_parent_get(Ecore_X_Window win) 
+EAPI Ecore_X_Window
+ecore_x_window_parent_get(Ecore_X_Window win)
 {
    xcb_query_tree_cookie_t cookie;
    xcb_query_tree_reply_t *reply;
@@ -1608,8 +1699,8 @@ ecore_x_window_parent_get(Ecore_X_Window win)
  * @return  1 if the window is visible, otherwise 0.
  * @ingroup Ecore_X_Window_Visibility_Group
  */
-EAPI int 
-ecore_x_window_visible_get(Ecore_X_Window win) 
+EAPI int
+ecore_x_window_visible_get(Ecore_X_Window win)
 {
    xcb_get_window_attributes_cookie_t cookie;
    xcb_get_window_attributes_reply_t *reply;
@@ -1622,15 +1713,19 @@ ecore_x_window_visible_get(Ecore_X_Window win)
    reply = xcb_get_window_attributes_reply(_ecore_xcb_conn, cookie, NULL);
    if (!reply) return EINA_FALSE;
 
-   if (reply->map_state == XCB_MAP_STATE_VIEWABLE) 
+   if (reply->map_state == XCB_MAP_STATE_VIEWABLE)
      ret = EINA_TRUE;
 
    free(reply);
    return ret;
 }
 
-EAPI void 
-ecore_x_window_button_grab(Ecore_X_Window win, int button, Ecore_X_Event_Mask mask, int mod, int any_mod) 
+EAPI void
+ecore_x_window_button_grab(Ecore_X_Window     win,
+                           int                button,
+                           Ecore_X_Event_Mask mask,
+                           int                mod,
+                           int                any_mod)
 {
    int i = 0;
    uint16_t m, locks[8], ev;
@@ -1657,13 +1752,13 @@ ecore_x_window_button_grab(Ecore_X_Window win, int button, Ecore_X_Event_Mask ma
    locks[7] = ECORE_X_LOCK_CAPS | ECORE_X_LOCK_NUM | ECORE_X_LOCK_SCROLL;
 
    ev = mask;
-   for (i = 0; i < 8; i++) 
-     xcb_grab_button(_ecore_xcb_conn, 0, win, ev, 
-                     XCB_GRAB_MODE_SYNC, XCB_GRAB_MODE_ASYNC, 
+   for (i = 0; i < 8; i++)
+     xcb_grab_button(_ecore_xcb_conn, 0, win, ev,
+                     XCB_GRAB_MODE_SYNC, XCB_GRAB_MODE_ASYNC,
                      XCB_NONE, XCB_NONE, b, m | locks[i]);
 
    _ecore_xcb_button_grabs_num++;
-   t = realloc(_ecore_xcb_button_grabs, 
+   t = realloc(_ecore_xcb_button_grabs,
                _ecore_xcb_button_grabs_num * sizeof(Ecore_X_Window));
    if (!t) return;
 
@@ -1671,8 +1766,11 @@ ecore_x_window_button_grab(Ecore_X_Window win, int button, Ecore_X_Event_Mask ma
    _ecore_xcb_button_grabs[_ecore_xcb_button_grabs_num - 1] = win;
 }
 
-EAPI void 
-ecore_x_window_button_ungrab(Ecore_X_Window win, int button, int mod, int any_mod) 
+EAPI void
+ecore_x_window_button_ungrab(Ecore_X_Window win,
+                             int            button,
+                             int            mod,
+                             int            any_mod)
 {
    int i = 0;
    uint16_t m = 0, locks[8];
@@ -1702,8 +1800,11 @@ ecore_x_window_button_ungrab(Ecore_X_Window win, int button, int mod, int any_mo
    _ecore_xcb_sync_magic_send(1, win);
 }
 
-EAPI void 
-ecore_x_window_key_grab(Ecore_X_Window win, const char *key, int mod, int any_mod) 
+EAPI void
+ecore_x_window_key_grab(Ecore_X_Window win,
+                        const char    *key,
+                        int            mod,
+                        int            any_mod)
 {
    xcb_keycode_t keycode = XCB_NO_SYMBOL;
    uint16_t m = 0, locks[8];
@@ -1729,18 +1830,21 @@ ecore_x_window_key_grab(Ecore_X_Window win, const char *key, int mod, int any_mo
    locks[7] = ECORE_X_LOCK_CAPS | ECORE_X_LOCK_NUM | ECORE_X_LOCK_SCROLL;
 
    for (i = 0; i < 8; i++)
-     xcb_grab_key(_ecore_xcb_conn, 0, win, m | locks[i], 
-                 keycode, XCB_GRAB_MODE_SYNC, XCB_GRAB_MODE_ASYNC);
+     xcb_grab_key(_ecore_xcb_conn, 0, win, m | locks[i],
+                  keycode, XCB_GRAB_MODE_SYNC, XCB_GRAB_MODE_ASYNC);
    _ecore_xcb_key_grabs_num++;
-   t = realloc(_ecore_xcb_key_grabs, 
+   t = realloc(_ecore_xcb_key_grabs,
                _ecore_xcb_key_grabs_num * sizeof(Ecore_X_Window));
    if (!t) return;
    _ecore_xcb_key_grabs = t;
    _ecore_xcb_key_grabs[_ecore_xcb_key_grabs_num - 1] = win;
 }
 
-EAPI void 
-ecore_x_window_key_ungrab(Ecore_X_Window win, const char *key, int mod, int any_mod) 
+EAPI void
+ecore_x_window_key_ungrab(Ecore_X_Window win,
+                          const char    *key,
+                          int            mod,
+                          int            any_mod)
 {
    xcb_keycode_t keycode = XCB_NO_SYMBOL;
    uint16_t m = 0, locks[8];
@@ -1771,15 +1875,15 @@ ecore_x_window_key_ungrab(Ecore_X_Window win, const char *key, int mod, int any_
 }
 
 /* local functions */
-Ecore_X_Window 
-_ecore_xcb_window_root_of_screen_get(int screen) 
+Ecore_X_Window
+_ecore_xcb_window_root_of_screen_get(int screen)
 {
    xcb_screen_iterator_t iter;
 
    CHECK_XCB_CONN;
    iter = xcb_setup_roots_iterator(xcb_get_setup(_ecore_xcb_conn));
    for (; iter.rem; --screen, xcb_screen_next(&iter))
-     if (screen == 0) 
+     if (screen == 0)
        {
           xcb_screen_t *s;
 
@@ -1789,8 +1893,14 @@ _ecore_xcb_window_root_of_screen_get(int screen)
    return 0;
 }
 
-static Ecore_X_Window 
-_ecore_xcb_window_argb_internal_new(Ecore_X_Window parent, int x, int y, int w, int h, uint8_t override_redirect, uint8_t save_under) 
+static Ecore_X_Window
+_ecore_xcb_window_argb_internal_new(Ecore_X_Window parent,
+                                    int            x,
+                                    int            y,
+                                    int            w,
+                                    int            h,
+                                    uint8_t        override_redirect,
+                                    uint8_t        save_under)
 {
    Ecore_X_Window win = 0;
 #ifdef ECORE_XCB_RENDER
@@ -1807,16 +1917,16 @@ _ecore_xcb_window_argb_internal_new(Ecore_X_Window parent, int x, int y, int w,
    if (parent == 0)
      parent = ((xcb_screen_t *)_ecore_xcb_screen)->root;
 
-   vis = 
+   vis =
      _ecore_xcb_render_find_visual_id(XCB_RENDER_PICT_TYPE_DIRECT, EINA_TRUE);
 
    colormap = xcb_generate_id(_ecore_xcb_conn);
-   xcb_create_colormap(_ecore_xcb_conn, XCB_COLORMAP_ALLOC_NONE, 
+   xcb_create_colormap(_ecore_xcb_conn, XCB_COLORMAP_ALLOC_NONE,
                        colormap, parent, vis);
 
    value_mask = (XCB_CW_BACK_PIXMAP | XCB_CW_BORDER_PIXEL | XCB_CW_BIT_GRAVITY |
-                 XCB_CW_WIN_GRAVITY | XCB_CW_BACKING_STORE | 
-                 XCB_CW_OVERRIDE_REDIRECT | XCB_CW_SAVE_UNDER | 
+                 XCB_CW_WIN_GRAVITY | XCB_CW_BACKING_STORE |
+                 XCB_CW_OVERRIDE_REDIRECT | XCB_CW_SAVE_UNDER |
                  XCB_CW_EVENT_MASK | XCB_CW_DONT_PROPAGATE | XCB_CW_COLORMAP);
 
    value_list[0] = XCB_BACK_PIXMAP_NONE;
@@ -1827,13 +1937,13 @@ _ecore_xcb_window_argb_internal_new(Ecore_X_Window parent, int x, int y, int w,
    value_list[5] = override_redirect;
    value_list[6] = save_under;
    value_list[7] = (XCB_EVENT_MASK_KEY_PRESS | XCB_EVENT_MASK_KEY_RELEASE |
-                    XCB_EVENT_MASK_BUTTON_PRESS | 
+                    XCB_EVENT_MASK_BUTTON_PRESS |
                     XCB_EVENT_MASK_BUTTON_RELEASE |
                     XCB_EVENT_MASK_ENTER_WINDOW | XCB_EVENT_MASK_LEAVE_WINDOW |
                     XCB_EVENT_MASK_POINTER_MOTION | XCB_EVENT_MASK_EXPOSURE |
-                    XCB_EVENT_MASK_VISIBILITY_CHANGE | 
+                    XCB_EVENT_MASK_VISIBILITY_CHANGE |
                     XCB_EVENT_MASK_STRUCTURE_NOTIFY |
-                    XCB_EVENT_MASK_FOCUS_CHANGE | 
+                    XCB_EVENT_MASK_FOCUS_CHANGE |
                     XCB_EVENT_MASK_PROPERTY_CHANGE |
                     XCB_EVENT_MASK_COLOR_MAP_CHANGE);
    value_list[8] = XCB_EVENT_MASK_NO_EVENT;
@@ -1841,7 +1951,7 @@ _ecore_xcb_window_argb_internal_new(Ecore_X_Window parent, int x, int y, int w,
 
    win = xcb_generate_id(_ecore_xcb_conn);
    xcb_create_window(_ecore_xcb_conn, 32, win, parent, x, y, w, h, 0,
-                     XCB_WINDOW_CLASS_INPUT_OUTPUT, vis, value_mask, 
+                     XCB_WINDOW_CLASS_INPUT_OUTPUT, vis, value_mask,
                      value_list);
 
    xcb_free_colormap(_ecore_xcb_conn, colormap);
@@ -1853,8 +1963,14 @@ _ecore_xcb_window_argb_internal_new(Ecore_X_Window parent, int x, int y, int w,
    return win;
 }
 
-static Ecore_X_Window 
-_ecore_xcb_window_at_xy_get(Ecore_X_Window base, int bx, int by, int x, int y, Ecore_X_Window *skip, int skip_num) 
+static Ecore_X_Window
+_ecore_xcb_window_at_xy_get(Ecore_X_Window  base,
+                            int             bx,
+                            int             by,
+                            int             x,
+                            int             y,
+                            Ecore_X_Window *skip,
+                            int             skip_num)
 {
    xcb_query_tree_cookie_t cookie;
    xcb_query_tree_reply_t *reply;
@@ -1881,17 +1997,17 @@ _ecore_xcb_window_at_xy_get(Ecore_X_Window base, int bx, int by, int x, int y, E
    num = reply->children_len;
    windows = xcb_query_tree_children(reply);
 
-   for (i = (num - 1); i >= 0; --i) 
+   for (i = (num - 1); i >= 0; --i)
      {
         skipit = EINA_FALSE;
 
-        if (skip) 
+        if (skip)
           {
              int j = 0;
 
-             for (j = 0; j < skip_num; j++) 
+             for (j = 0; j < skip_num; j++)
                {
-                  if (windows[i] == skip[j]) 
+                  if (windows[i] == skip[j])
                     {
                        skipit = EINA_TRUE;
                        goto onward;
@@ -1899,14 +2015,14 @@ _ecore_xcb_window_at_xy_get(Ecore_X_Window base, int bx, int by, int x, int y, E
                }
           }
 onward:
-        if (!skipit) 
+        if (!skipit)
           {
              Ecore_X_Window child = 0;
 
-             child = 
-               _ecore_xcb_window_at_xy_get(windows[i], 
+             child =
+               _ecore_xcb_window_at_xy_get(windows[i],
                                            wx, wy, x, y, skip, skip_num);
-             if (child) 
+             if (child)
                {
                   if (reply) free(reply);
                   return child;
@@ -1918,8 +2034,8 @@ onward:
    return base;
 }
 
-Ecore_X_Visual 
-_ecore_xcb_window_visual_get(Ecore_X_Window win) 
+Ecore_X_Visual
+_ecore_xcb_window_visual_get(Ecore_X_Window win)
 {
    xcb_get_window_attributes_cookie_t cookie;
    xcb_get_window_attributes_reply_t *reply;
@@ -1936,17 +2052,17 @@ _ecore_xcb_window_visual_get(Ecore_X_Window win)
    return visual;
 }
 
-void 
-_ecore_xcb_window_button_grab_remove(Ecore_X_Window win) 
+void
+_ecore_xcb_window_button_grab_remove(Ecore_X_Window win)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    CHECK_XCB_CONN;
 
-   if (_ecore_xcb_button_grabs_num > 0) 
+   if (_ecore_xcb_button_grabs_num > 0)
      {
         int i = 0, shuffle = 0;
 
-        for (i = 0; i < _ecore_xcb_button_grabs_num; i++) 
+        for (i = 0; i < _ecore_xcb_button_grabs_num; i++)
           {
              if (shuffle)
                _ecore_xcb_button_grabs[i - 1] = _ecore_xcb_button_grabs[i];
@@ -1955,19 +2071,19 @@ _ecore_xcb_window_button_grab_remove(Ecore_X_Window win)
                shuffle = 1;
           }
 
-        if (shuffle) 
+        if (shuffle)
           {
              Ecore_X_Window *t;
 
              _ecore_xcb_button_grabs_num--;
-             if (_ecore_xcb_button_grabs_num <= 0) 
+             if (_ecore_xcb_button_grabs_num <= 0)
                {
                   free(_ecore_xcb_button_grabs);
                   _ecore_xcb_button_grabs = NULL;
                   return;
                }
 
-             t = realloc(_ecore_xcb_button_grabs, 
+             t = realloc(_ecore_xcb_button_grabs,
                          _ecore_xcb_button_grabs_num * sizeof(Ecore_X_Window));
              if (!t) return;
              _ecore_xcb_button_grabs = t;
@@ -1975,17 +2091,17 @@ _ecore_xcb_window_button_grab_remove(Ecore_X_Window win)
      }
 }
 
-void 
-_ecore_xcb_window_key_grab_remove(Ecore_X_Window win) 
+void
+_ecore_xcb_window_key_grab_remove(Ecore_X_Window win)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    CHECK_XCB_CONN;
 
-   if (_ecore_xcb_key_grabs_num > 0) 
+   if (_ecore_xcb_key_grabs_num > 0)
      {
         int i = 0, shuffle = 0;
 
-        for (i = 0; i < _ecore_xcb_key_grabs_num; i++) 
+        for (i = 0; i < _ecore_xcb_key_grabs_num; i++)
           {
              if (shuffle)
                _ecore_xcb_key_grabs[i - 1] = _ecore_xcb_key_grabs[i];
@@ -1994,19 +2110,19 @@ _ecore_xcb_window_key_grab_remove(Ecore_X_Window win)
                shuffle = 1;
           }
 
-        if (shuffle) 
+        if (shuffle)
           {
              Ecore_X_Window *t;
 
              _ecore_xcb_key_grabs_num--;
-             if (_ecore_xcb_key_grabs_num <= 0) 
+             if (_ecore_xcb_key_grabs_num <= 0)
                {
                   free(_ecore_xcb_key_grabs);
                   _ecore_xcb_key_grabs = NULL;
                   return;
                }
 
-             t = realloc(_ecore_xcb_key_grabs, 
+             t = realloc(_ecore_xcb_key_grabs,
                          _ecore_xcb_key_grabs_num * sizeof(Ecore_X_Window));
              if (!t) return;
              _ecore_xcb_key_grabs = t;
@@ -2014,35 +2130,39 @@ _ecore_xcb_window_key_grab_remove(Ecore_X_Window win)
      }
 }
 
-void 
-_ecore_xcb_window_grab_allow_events(Ecore_X_Window event_win, Ecore_X_Window child_win, int type, void *event, Ecore_X_Time timestamp) 
+void
+_ecore_xcb_window_grab_allow_events(Ecore_X_Window event_win,
+                                    Ecore_X_Window child_win,
+                                    int            type,
+                                    void          *event,
+                                    Ecore_X_Time   timestamp)
 {
    int i = 0;
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    CHECK_XCB_CONN;
 
-   for (i = 0; i < _ecore_xcb_button_grabs_num; i++) 
+   for (i = 0; i < _ecore_xcb_button_grabs_num; i++)
      {
-        if ((_ecore_xcb_button_grabs[i] == event_win) || 
-            (_ecore_xcb_button_grabs[i] == child_win)) 
+        if ((_ecore_xcb_button_grabs[i] == event_win) ||
+            (_ecore_xcb_button_grabs[i] == child_win))
           {
              Eina_Bool replay = EINA_FALSE;
 
-             if (_ecore_xcb_window_grab_replay_func) 
+             if (_ecore_xcb_window_grab_replay_func)
                {
-                  replay = 
-                    _ecore_xcb_window_grab_replay_func(_ecore_xcb_window_grab_replay_data, 
+                  replay =
+                    _ecore_xcb_window_grab_replay_func(_ecore_xcb_window_grab_replay_data,
                                                        type, event);
                }
-             if (replay) 
+             if (replay)
                {
-                  xcb_allow_events(_ecore_xcb_conn, 
+                  xcb_allow_events(_ecore_xcb_conn,
                                    XCB_ALLOW_REPLAY_POINTER, timestamp);
                }
-             else 
+             else
                {
-                  xcb_allow_events(_ecore_xcb_conn, 
+                  xcb_allow_events(_ecore_xcb_conn,
                                    XCB_ALLOW_ASYNC_POINTER, timestamp);
                }
              break;
@@ -2050,43 +2170,43 @@ _ecore_xcb_window_grab_allow_events(Ecore_X_Window event_win, Ecore_X_Window chi
      }
 }
 
-static int 
-_ecore_xcb_window_modifiers_get(unsigned int state) 
+static int
+_ecore_xcb_window_modifiers_get(unsigned int state)
 {
    int xmodifiers = 0;
 
    if (state & ECORE_EVENT_MODIFIER_SHIFT)
-      xmodifiers |= ECORE_X_MODIFIER_SHIFT;
+     xmodifiers |= ECORE_X_MODIFIER_SHIFT;
    if (state & ECORE_EVENT_MODIFIER_CTRL)
-      xmodifiers |= ECORE_X_MODIFIER_CTRL;
+     xmodifiers |= ECORE_X_MODIFIER_CTRL;
    if (state & ECORE_EVENT_MODIFIER_ALT)
-      xmodifiers |= ECORE_X_MODIFIER_ALT;
+     xmodifiers |= ECORE_X_MODIFIER_ALT;
    if (state & ECORE_EVENT_MODIFIER_WIN)
-      xmodifiers |= ECORE_X_MODIFIER_WIN;
+     xmodifiers |= ECORE_X_MODIFIER_WIN;
    if (state & ECORE_EVENT_LOCK_SCROLL)
-      xmodifiers |= ECORE_X_LOCK_SCROLL;
+     xmodifiers |= ECORE_X_LOCK_SCROLL;
    if (state & ECORE_EVENT_LOCK_NUM)
-      xmodifiers |= ECORE_X_LOCK_NUM;
+     xmodifiers |= ECORE_X_LOCK_NUM;
    if (state & ECORE_EVENT_LOCK_CAPS)
-      xmodifiers |= ECORE_X_LOCK_CAPS;
+     xmodifiers |= ECORE_X_LOCK_CAPS;
    if (state & ECORE_EVENT_LOCK_SHIFT)
-      xmodifiers |= ECORE_X_LOCK_SHIFT;
+     xmodifiers |= ECORE_X_LOCK_SHIFT;
 
    return xmodifiers;
 }
 
 static xcb_visualtype_t *
-_ecore_xcb_window_find_visual_by_id(xcb_visualid_t id) 
+_ecore_xcb_window_find_visual_by_id(xcb_visualid_t id)
 {
    xcb_depth_iterator_t diter;
    xcb_visualtype_iterator_t viter;
 
    CHECK_XCB_CONN;
    diter = xcb_screen_allowed_depths_iterator(_ecore_xcb_screen);
-   for (; diter.rem; xcb_depth_next(&diter)) 
+   for (; diter.rem; xcb_depth_next(&diter))
      {
         viter = xcb_depth_visuals_iterator(diter.data);
-        for (; viter.rem; xcb_visualtype_next(&viter)) 
+        for (; viter.rem; xcb_visualtype_next(&viter))
           {
              if (viter.data->visual_id == id)
                return viter.data;
@@ -2097,7 +2217,7 @@ _ecore_xcb_window_find_visual_by_id(xcb_visualid_t id)
 
 #ifdef ECORE_XCB_XPRINT
 static xcb_screen_t *
-_ecore_xcb_window_screen_of_display(int screen) 
+_ecore_xcb_window_screen_of_display(int screen)
 {
    xcb_screen_iterator_t iter;
 
@@ -2109,4 +2229,5 @@ _ecore_xcb_window_screen_of_display(int screen)
 
    return NULL;
 }
+
 #endif
index be94a2b..7fcf455 100644 (file)
@@ -1,8 +1,11 @@
 #include "ecore_xcb_private.h"
 #include <xcb/xcb_icccm.h>
 
-EAPI int 
-ecore_x_window_prop_card32_get(Ecore_X_Window win, Ecore_X_Atom atom, unsigned int *val, unsigned int len) 
+EAPI int
+ecore_x_window_prop_card32_get(Ecore_X_Window win,
+                               Ecore_X_Atom   atom,
+                               unsigned int  *val,
+                               unsigned int   len)
 {
    xcb_get_property_cookie_t cookie;
    xcb_get_property_reply_t *reply;
@@ -11,27 +14,27 @@ ecore_x_window_prop_card32_get(Ecore_X_Window win, Ecore_X_Atom atom, unsigned i
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    CHECK_XCB_CONN;
 
-   cookie = xcb_get_property_unchecked(_ecore_xcb_conn, 0, win, atom, 
+   cookie = xcb_get_property_unchecked(_ecore_xcb_conn, 0, win, atom,
                                        ECORE_X_ATOM_CARDINAL, 0, 0x7fffffff);
    reply = xcb_get_property_reply(_ecore_xcb_conn, cookie, NULL);
    if (!reply) return -1;
 
-   if ((reply->type != ECORE_X_ATOM_CARDINAL) || (reply->format != 32)) 
+   if ((reply->type != ECORE_X_ATOM_CARDINAL) || (reply->format != 32))
      num = -1;
-   else if (reply->value_len == 0) 
+   else if (reply->value_len == 0)
      num = 0;
-   else 
+   else
      {
-        if (reply->value_len < len) 
+        if (reply->value_len < len)
           len = reply->value_len;
 
-        if (val) 
+        if (val)
           {
              unsigned int i = 0;
              unsigned char *v;
 
              v = xcb_get_property_value(reply);
-             for (i = 0; i < len; i++) 
+             for (i = 0; i < len; i++)
                val[i] = ((unsigned long *)v)[i];
              num = len;
           }
@@ -41,14 +44,17 @@ ecore_x_window_prop_card32_get(Ecore_X_Window win, Ecore_X_Atom atom, unsigned i
    return num;
 }
 
-EAPI void 
-ecore_x_window_prop_card32_set(Ecore_X_Window win, Ecore_X_Atom atom, unsigned int *val, unsigned int num) 
+EAPI void
+ecore_x_window_prop_card32_set(Ecore_X_Window win,
+                               Ecore_X_Atom   atom,
+                               unsigned int  *val,
+                               unsigned int   num)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    CHECK_XCB_CONN;
 
 #if SIZEOF_INT == SIZEOF_LONG
-   xcb_change_property(_ecore_xcb_conn, XCB_PROP_MODE_REPLACE, win, atom, 
+   xcb_change_property(_ecore_xcb_conn, XCB_PROP_MODE_REPLACE, win, atom,
                        ECORE_X_ATOM_CARDINAL, 32, num, (unsigned char *)val);
 //   ecore_x_flush();
 #else
@@ -60,15 +66,17 @@ ecore_x_window_prop_card32_set(Ecore_X_Window win, Ecore_X_Atom atom, unsigned i
    for (i = 0; i < num; i++)
      v2[i] = val[i];
 
-   xcb_change_property(_ecore_xcb_conn, XCB_PROP_MODE_REPLACE, win, atom, 
+   xcb_change_property(_ecore_xcb_conn, XCB_PROP_MODE_REPLACE, win, atom,
                        ECORE_X_ATOM_CARDINAL, 32, num, (unsigned char *)v2);
    free(v2);
 //   ecore_x_flush();
 #endif
 }
 
-EAPI int 
-ecore_x_window_prop_card32_list_get(Ecore_X_Window win, Ecore_X_Atom atom, unsigned int **list) 
+EAPI int
+ecore_x_window_prop_card32_list_get(Ecore_X_Window win,
+                                    Ecore_X_Atom   atom,
+                                    unsigned int **list)
 {
    xcb_get_property_cookie_t cookie;
    xcb_get_property_reply_t *reply;
@@ -79,7 +87,7 @@ ecore_x_window_prop_card32_list_get(Ecore_X_Window win, Ecore_X_Atom atom, unsig
 
    if (list) *list = NULL;
 
-   cookie = xcb_get_property_unchecked(_ecore_xcb_conn, 0, win, atom, 
+   cookie = xcb_get_property_unchecked(_ecore_xcb_conn, 0, win, atom,
                                        XCB_ATOM_CARDINAL, 0, 0x7fffffff);
    reply = xcb_get_property_reply(_ecore_xcb_conn, cookie, NULL);
    if (!reply) return -1;
@@ -88,17 +96,17 @@ ecore_x_window_prop_card32_list_get(Ecore_X_Window win, Ecore_X_Atom atom, unsig
      num = -1;
    else if ((reply->value_len == 0) || (!xcb_get_property_value(reply)))
      num = 0;
-   else 
+   else
      {
         num = reply->value_len;
-        if (list) 
+        if (list)
           {
              unsigned int *val;
              void *data;
              int i = 0;
 
              val = malloc(num * sizeof(unsigned int));
-             if (!val) 
+             if (!val)
                {
                   free(reply);
                   return num;
@@ -114,16 +122,22 @@ ecore_x_window_prop_card32_list_get(Ecore_X_Window win, Ecore_X_Atom atom, unsig
    return num;
 }
 
-EAPI int 
-ecore_x_window_prop_atom_get(Ecore_X_Window win, Ecore_X_Atom atom, Ecore_X_Atom *list, unsigned int len) 
+EAPI int
+ecore_x_window_prop_atom_get(Ecore_X_Window win,
+                             Ecore_X_Atom   atom,
+                             Ecore_X_Atom  *list,
+                             unsigned int   len)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
 
    return ecore_x_window_prop_xid_get(win, atom, ECORE_X_ATOM_ATOM, list, len);
 }
 
-EAPI void 
-ecore_x_window_prop_atom_set(Ecore_X_Window win, Ecore_X_Atom atom, Ecore_X_Atom *list, unsigned int num) 
+EAPI void
+ecore_x_window_prop_atom_set(Ecore_X_Window win,
+                             Ecore_X_Atom   atom,
+                             Ecore_X_Atom  *list,
+                             unsigned int   num)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
 
@@ -132,14 +146,18 @@ ecore_x_window_prop_atom_set(Ecore_X_Window win, Ecore_X_Atom atom, Ecore_X_Atom
    ecore_x_window_prop_xid_set(win, atom, ECORE_X_ATOM_ATOM, list, num);
 }
 
-EAPI void 
-ecore_x_window_prop_xid_set(Ecore_X_Window win, Ecore_X_Atom atom, Ecore_X_Atom type, Ecore_X_ID *xids, unsigned int num) 
+EAPI void
+ecore_x_window_prop_xid_set(Ecore_X_Window win,
+                            Ecore_X_Atom   atom,
+                            Ecore_X_Atom   type,
+                            Ecore_X_ID    *xids,
+                            unsigned int   num)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    CHECK_XCB_CONN;
 
 #if SIZEOF_INT == SIZEOF_LONG
-   xcb_change_property(_ecore_xcb_conn, XCB_PROP_MODE_REPLACE, win, atom, 
+   xcb_change_property(_ecore_xcb_conn, XCB_PROP_MODE_REPLACE, win, atom,
                        type, 32, num, (unsigned char *)xids);
 //   ecore_x_flush();
 #else
@@ -151,15 +169,19 @@ ecore_x_window_prop_xid_set(Ecore_X_Window win, Ecore_X_Atom atom, Ecore_X_Atom
    for (i = 0; i < num; i++)
      v2[i] = xids[i];
 
-   xcb_change_property(_ecore_xcb_conn, XCB_PROP_MODE_REPLACE, win, atom, 
+   xcb_change_property(_ecore_xcb_conn, XCB_PROP_MODE_REPLACE, win, atom,
                        type, 32, num, (unsigned char *)v2);
    free(v2);
 //   ecore_x_flush();
 #endif
 }
 
-EAPI int 
-ecore_x_window_prop_xid_get(Ecore_X_Window win, Ecore_X_Atom atom, Ecore_X_Atom type, Ecore_X_ID *xids, unsigned int len) 
+EAPI int
+ecore_x_window_prop_xid_get(Ecore_X_Window win,
+                            Ecore_X_Atom   atom,
+                            Ecore_X_Atom   type,
+                            Ecore_X_ID    *xids,
+                            unsigned int   len)
 {
    xcb_get_property_cookie_t cookie;
    xcb_get_property_reply_t *reply;
@@ -169,16 +191,16 @@ ecore_x_window_prop_xid_get(Ecore_X_Window win, Ecore_X_Atom atom, Ecore_X_Atom
    CHECK_XCB_CONN;
 
    num = len;
-   cookie = xcb_get_property_unchecked(_ecore_xcb_conn, 0, win, atom, type, 
+   cookie = xcb_get_property_unchecked(_ecore_xcb_conn, 0, win, atom, type,
                                        0, 0x7fffffff);
    reply = xcb_get_property_reply(_ecore_xcb_conn, cookie, NULL);
    if (!reply) return -1;
 
-   if ((reply->type != type) || (reply->format != 32)) 
+   if ((reply->type != type) || (reply->format != 32))
      num = -1;
    else if (reply->value_len == 0)
      num = 0;
-   else 
+   else
      {
         unsigned int i = 0;
         unsigned char *v;
@@ -197,19 +219,22 @@ ecore_x_window_prop_xid_get(Ecore_X_Window win, Ecore_X_Atom atom, Ecore_X_Atom
    return num;
 }
 
-EAPI void 
-ecore_x_window_prop_string_set(Ecore_X_Window win, Ecore_X_Atom type, const char *str) 
+EAPI void
+ecore_x_window_prop_string_set(Ecore_X_Window win,
+                               Ecore_X_Atom   type,
+                               const char    *str)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    CHECK_XCB_CONN;
 
-   xcb_change_property(_ecore_xcb_conn, XCB_PROP_MODE_REPLACE, win, type, 
+   xcb_change_property(_ecore_xcb_conn, XCB_PROP_MODE_REPLACE, win, type,
                        ECORE_X_ATOM_UTF8_STRING, 8, strlen(str), str);
 //   ecore_x_flush();
 }
 
 EAPI char *
-ecore_x_window_prop_string_get(Ecore_X_Window win, Ecore_X_Atom type) 
+ecore_x_window_prop_string_get(Ecore_X_Window win,
+                               Ecore_X_Atom   type)
 {
    xcb_get_property_cookie_t cookie;
    xcb_get_property_reply_t *reply;
@@ -219,9 +244,9 @@ ecore_x_window_prop_string_get(Ecore_X_Window win, Ecore_X_Atom type)
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    CHECK_XCB_CONN;
 
-   cookie = 
-     xcb_get_property_unchecked(_ecore_xcb_conn, 0, 
-                                win ? win : ((xcb_screen_t *)_ecore_xcb_screen)->root, 
+   cookie =
+     xcb_get_property_unchecked(_ecore_xcb_conn, 0,
+                                win ? win : ((xcb_screen_t *)_ecore_xcb_screen)->root,
                                 type, XCB_GET_PROPERTY_TYPE_ANY, 0, 1000000L);
    reply = xcb_get_property_reply(_ecore_xcb_conn, cookie, NULL);
    if (!reply) return NULL;
@@ -231,7 +256,7 @@ ecore_x_window_prop_string_get(Ecore_X_Window win, Ecore_X_Atom type)
    memcpy(str, xcb_get_property_value(reply), len);
    str[len] = '\0';
 
-   if (reply->type != ECORE_X_ATOM_UTF8_STRING) 
+   if (reply->type != ECORE_X_ATOM_UTF8_STRING)
      {
         Ecore_Xcb_Textproperty prop;
         int count = 0;
@@ -245,9 +270,9 @@ ecore_x_window_prop_string_get(Ecore_X_Window win, Ecore_X_Atom type)
 #ifdef HAVE_ICONV
         ret = _ecore_xcb_utf8_textproperty_to_textlist(&prop, &list, &count);
 #else
-        ret = _ecore_xcb_mb_textproperty_to_textlist(&prop,  &list, &count);
+        ret = _ecore_xcb_mb_textproperty_to_textlist(&prop, &list, &count);
 #endif
-        if (ret) 
+        if (ret)
           {
              if (count > 0)
                str = strdup(list[0]);
@@ -264,38 +289,47 @@ ecore_x_window_prop_string_get(Ecore_X_Window win, Ecore_X_Atom type)
    return str;
 }
 
-EAPI int 
-ecore_x_window_prop_window_get(Ecore_X_Window win, Ecore_X_Atom atom, Ecore_X_Window *list, unsigned int len) 
+EAPI int
+ecore_x_window_prop_window_get(Ecore_X_Window  win,
+                               Ecore_X_Atom    atom,
+                               Ecore_X_Window *list,
+                               unsigned int    len)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
 
    return ecore_x_window_prop_xid_get(win, atom, ECORE_X_ATOM_WINDOW, list, len);
 }
 
-EAPI void 
-ecore_x_window_prop_window_set(Ecore_X_Window win, Ecore_X_Atom atom, Ecore_X_Window *list, unsigned int num) 
+EAPI void
+ecore_x_window_prop_window_set(Ecore_X_Window  win,
+                               Ecore_X_Atom    atom,
+                               Ecore_X_Window *list,
+                               unsigned int    num)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
 
    ecore_x_window_prop_xid_set(win, atom, ECORE_X_ATOM_WINDOW, list, num);
 }
 
-EAPI int 
-ecore_x_window_prop_window_list_get(Ecore_X_Window win, Ecore_X_Atom atom, Ecore_X_Window **plst) 
+EAPI int
+ecore_x_window_prop_window_list_get(Ecore_X_Window   win,
+                                    Ecore_X_Atom     atom,
+                                    Ecore_X_Window **plst)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
 
    return ecore_x_window_prop_xid_list_get(win, atom, ECORE_X_ATOM_WINDOW, plst);
 }
 
-EAPI Ecore_X_Atom 
-ecore_x_window_prop_any_type(void) 
+EAPI Ecore_X_Atom
+ecore_x_window_prop_any_type(void)
 {
    return XCB_ATOM_ANY;
 }
 
-EAPI void 
-ecore_x_window_prop_property_del(Ecore_X_Window win, Ecore_X_Atom property) 
+EAPI void
+ecore_x_window_prop_property_del(Ecore_X_Window win,
+                                 Ecore_X_Atom   property)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    CHECK_XCB_CONN;
@@ -303,8 +337,13 @@ ecore_x_window_prop_property_del(Ecore_X_Window win, Ecore_X_Atom property)
    xcb_delete_property(_ecore_xcb_conn, win, property);
 }
 
-EAPI void 
-ecore_x_window_prop_property_set(Ecore_X_Window win, Ecore_X_Atom property, Ecore_X_Atom type, int size, void *data, int num) 
+EAPI void
+ecore_x_window_prop_property_set(Ecore_X_Window win,
+                                 Ecore_X_Atom   property,
+                                 Ecore_X_Atom   type,
+                                 int            size,
+                                 void          *data,
+                                 int            num)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    CHECK_XCB_CONN;
@@ -312,24 +351,24 @@ ecore_x_window_prop_property_set(Ecore_X_Window win, Ecore_X_Atom property, Ecor
    if (win == 0)
      win = ((xcb_screen_t *)_ecore_xcb_screen)->root;
 
-   if (size != 32) 
+   if (size != 32)
      {
-        xcb_change_property(_ecore_xcb_conn, XCB_PROP_MODE_REPLACE, win, 
+        xcb_change_property(_ecore_xcb_conn, XCB_PROP_MODE_REPLACE, win,
                             property, type, size, num, (unsigned char *)data);
 //        ecore_x_flush();
      }
-   else 
+   else
      {
         unsigned long *dat;
         int i = 0, *ptr;
 
         dat = malloc(sizeof(unsigned long) * num);
-        if (dat) 
+        if (dat)
           {
              for (ptr = (int *)data, i = 0; i < num; i++)
                dat[i] = ptr[i];
-             xcb_change_property(_ecore_xcb_conn, XCB_PROP_MODE_REPLACE, win, 
-                                 property, type, size, num, 
+             xcb_change_property(_ecore_xcb_conn, XCB_PROP_MODE_REPLACE, win,
+                                 property, type, size, num,
                                  (unsigned char *)dat);
              free(dat);
 //             ecore_x_flush();
@@ -337,8 +376,13 @@ ecore_x_window_prop_property_set(Ecore_X_Window win, Ecore_X_Atom property, Ecor
      }
 }
 
-EAPI int 
-ecore_x_window_prop_property_get(Ecore_X_Window win, Ecore_X_Atom property, Ecore_X_Atom type, int size, unsigned char **data, int *num) 
+EAPI int
+ecore_x_window_prop_property_get(Ecore_X_Window  win,
+                                 Ecore_X_Atom    property,
+                                 Ecore_X_Atom    type,
+                                 int             size,
+                                 unsigned char **data,
+                                 int            *num)
 {
    xcb_get_property_cookie_t cookie;
    xcb_get_property_reply_t *reply;
@@ -351,7 +395,7 @@ ecore_x_window_prop_property_get(Ecore_X_Window win, Ecore_X_Atom property, Ecor
 
    if (num) *num = 0;
 
-   if (data) 
+   if (data)
      *data = NULL;
    else
      return 0;
@@ -359,12 +403,12 @@ ecore_x_window_prop_property_get(Ecore_X_Window win, Ecore_X_Atom property, Ecor
    if (win == 0)
      win = ((xcb_screen_t *)_ecore_xcb_screen)->root;
 
-   cookie = 
-     xcb_get_property_unchecked(_ecore_xcb_conn, 0, win, 
+   cookie =
+     xcb_get_property_unchecked(_ecore_xcb_conn, 0, win,
                                 property, type, 0, LONG_MAX);
    reply = xcb_get_property_reply(_ecore_xcb_conn, cookie, NULL);
    if (!reply) return 0;
-   if ((reply->format != size) || (reply->value_len == 0)) 
+   if ((reply->format != size) || (reply->value_len == 0))
      {
         free(reply);
         return 0;
@@ -377,16 +421,18 @@ ecore_x_window_prop_property_get(Ecore_X_Window win, Ecore_X_Atom property, Ecor
      }
 
    value = xcb_get_property_value(reply);
-   switch (reply->format) 
+   switch (reply->format)
      {
       case 8:
         for (i = 0; i < reply->value_len; i++)
           (*data)[i] = ((unsigned char *)value)[i];
         break;
+
       case 16:
         for (i = 0; i < reply->value_len; i++)
           ((unsigned short *)*data)[i] = ((unsigned short *)value)[i];
         break;
+
       case 32:
         for (i = 0; i < reply->value_len; i++)
           ((unsigned int *)*data)[i] = ((unsigned long *)value)[i];
@@ -399,23 +445,31 @@ ecore_x_window_prop_property_get(Ecore_X_Window win, Ecore_X_Atom property, Ecor
    return format;
 }
 
-EAPI int 
-ecore_x_window_prop_atom_list_get(Ecore_X_Window win, Ecore_X_Atom atom, Ecore_X_Atom **list) 
+EAPI int
+ecore_x_window_prop_atom_list_get(Ecore_X_Window win,
+                                  Ecore_X_Atom   atom,
+                                  Ecore_X_Atom **list)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
 
    return ecore_x_window_prop_xid_list_get(win, atom, ECORE_X_ATOM_ATOM, list);
 }
 
-EAPI void 
-ecore_x_window_prop_atom_list_change(Ecore_X_Window win, Ecore_X_Atom atom, Ecore_X_Atom item, int op) 
+EAPI void
+ecore_x_window_prop_atom_list_change(Ecore_X_Window win,
+                                     Ecore_X_Atom   atom,
+                                     Ecore_X_Atom   item,
+                                     int            op)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    ecore_x_window_prop_xid_list_change(win, atom, ECORE_X_ATOM_ATOM, item, op);
 }
 
-EAPI int 
-ecore_x_window_prop_xid_list_get(Ecore_X_Window win, Ecore_X_Atom atom, Ecore_X_Atom type, Ecore_X_ID **xids) 
+EAPI int
+ecore_x_window_prop_xid_list_get(Ecore_X_Window win,
+                                 Ecore_X_Atom   atom,
+                                 Ecore_X_Atom   type,
+                                 Ecore_X_ID   **xids)
 {
    xcb_get_property_cookie_t cookie;
    xcb_get_property_reply_t *reply;
@@ -426,7 +480,7 @@ ecore_x_window_prop_xid_list_get(Ecore_X_Window win, Ecore_X_Atom atom, Ecore_X_
 
    if (xids) *xids = NULL;
 
-   cookie = xcb_get_property_unchecked(_ecore_xcb_conn, 0, win, atom, type, 
+   cookie = xcb_get_property_unchecked(_ecore_xcb_conn, 0, win, atom, type,
                                        0, 0x7fffffff);
    reply = xcb_get_property_reply(_ecore_xcb_conn, cookie, NULL);
    if (!reply) return -1;
@@ -435,15 +489,15 @@ ecore_x_window_prop_xid_list_get(Ecore_X_Window win, Ecore_X_Atom atom, Ecore_X_
      num = -1;
    else if ((reply->value_len == 0) || (!xcb_get_property_value(reply)))
      num = 0;
-   else 
+   else
      {
         Ecore_X_Atom *alst;
         void *val;
-  
+
         num = xcb_get_property_value_length(reply);
         val = xcb_get_property_value(reply);
         alst = malloc(num * sizeof(Ecore_X_ID));
-        if (alst) 
+        if (alst)
           {
              int i = 0;
 
@@ -457,8 +511,12 @@ ecore_x_window_prop_xid_list_get(Ecore_X_Window win, Ecore_X_Atom atom, Ecore_X_
    return num;
 }
 
-EAPI void 
-ecore_x_window_prop_xid_list_change(Ecore_X_Window win, Ecore_X_Atom atom, Ecore_X_Atom type, Ecore_X_ID item, int op) 
+EAPI void
+ecore_x_window_prop_xid_list_change(Ecore_X_Window win,
+                                    Ecore_X_Atom   atom,
+                                    Ecore_X_Atom   type,
+                                    Ecore_X_ID     item,
+                                    int            op)
 {
    Ecore_X_ID *lst;
    int i = 0, num = 0;
@@ -469,12 +527,12 @@ ecore_x_window_prop_xid_list_change(Ecore_X_Window win, Ecore_X_Atom atom, Ecore
    num = ecore_x_window_prop_xid_list_get(win, atom, type, &lst);
    if (num < 0) return;
 
-   for (i = 0; i < num; i++) 
+   for (i = 0; i < num; i++)
      {
         if (lst[i] == item) break;
      }
 
-   if (i < num) 
+   if (i < num)
      {
         if (op == ECORE_X_PROP_LIST_ADD)
           goto done;
@@ -482,7 +540,7 @@ ecore_x_window_prop_xid_list_change(Ecore_X_Window win, Ecore_X_Atom atom, Ecore
         for (; i < num; i++)
           lst[i] = lst[i + 1];
      }
-   else 
+   else
      {
         if (op == ECORE_X_PROP_LIST_REMOVE)
           goto done;
@@ -496,8 +554,9 @@ done:
    if (lst) free(lst);
 }
 
-EAPI Eina_Bool 
-ecore_x_window_prop_protocol_isset(Ecore_X_Window win, Ecore_X_WM_Protocol protocol) 
+EAPI Eina_Bool
+ecore_x_window_prop_protocol_isset(Ecore_X_Window      win,
+                                   Ecore_X_WM_Protocol protocol)
 {
    Eina_Bool ret = EINA_FALSE;
    Ecore_X_Atom proto;
@@ -517,21 +576,21 @@ ecore_x_window_prop_protocol_isset(Ecore_X_Window win, Ecore_X_WM_Protocol proto
 
    proto = _ecore_xcb_atoms_wm_protocol[protocol];
 #ifdef OLD_XCB_VERSION
-   cookie = xcb_get_wm_protocols_unchecked(_ecore_xcb_conn, win, 
+   cookie = xcb_get_wm_protocols_unchecked(_ecore_xcb_conn, win,
                                            ECORE_X_ATOM_WM_PROTOCOLS);
    reply = xcb_get_wm_protocols_reply(_ecore_xcb_conn, cookie, &protos, NULL);
 #else
-   cookie = xcb_icccm_get_wm_protocols_unchecked(_ecore_xcb_conn, win, 
+   cookie = xcb_icccm_get_wm_protocols_unchecked(_ecore_xcb_conn, win,
                                                  ECORE_X_ATOM_WM_PROTOCOLS);
-   reply = xcb_icccm_get_wm_protocols_reply(_ecore_xcb_conn, cookie, 
+   reply = xcb_icccm_get_wm_protocols_reply(_ecore_xcb_conn, cookie,
                                             &protos, NULL);
 #endif
    if (!reply) return EINA_FALSE;
 
    count = protos.atoms_len;
-   for (i = 0; i < count; i++) 
+   for (i = 0; i < count; i++)
      {
-        if (protos.atoms[i] == proto) 
+        if (protos.atoms[i] == proto)
           {
              ret = EINA_TRUE;
              break;
@@ -547,7 +606,8 @@ ecore_x_window_prop_protocol_isset(Ecore_X_Window win, Ecore_X_WM_Protocol proto
 }
 
 EAPI Ecore_X_WM_Protocol *
-ecore_x_window_prop_protocol_list_get(Ecore_X_Window win, int *num_ret) 
+ecore_x_window_prop_protocol_list_get(Ecore_X_Window win,
+                                      int           *num_ret)
 {
 #ifdef OLD_XCB_VERSION
    xcb_get_wm_protocols_reply_t protos;
@@ -567,19 +627,19 @@ ecore_x_window_prop_protocol_list_get(Ecore_X_Window win, int *num_ret)
    *num_ret = 0;
 
 #ifdef OLD_XCB_VERSION
-   cookie = xcb_get_wm_protocols_unchecked(_ecore_xcb_conn, win, 
+   cookie = xcb_get_wm_protocols_unchecked(_ecore_xcb_conn, win,
                                            ECORE_X_ATOM_WM_PROTOCOLS);
    reply = xcb_get_wm_protocols_reply(_ecore_xcb_conn, cookie, &protos, NULL);
 #else
-   cookie = xcb_icccm_get_wm_protocols_unchecked(_ecore_xcb_conn, win, 
+   cookie = xcb_icccm_get_wm_protocols_unchecked(_ecore_xcb_conn, win,
                                                  ECORE_X_ATOM_WM_PROTOCOLS);
-   reply = xcb_icccm_get_wm_protocols_reply(_ecore_xcb_conn, cookie, 
+   reply = xcb_icccm_get_wm_protocols_reply(_ecore_xcb_conn, cookie,
                                             &protos, NULL);
 #endif
    if (!reply) return NULL;
 
    count = protos.atoms_len;
-   if (count <= 0) 
+   if (count <= 0)
      {
 #ifdef OLD_XCB_VERSION
         xcb_get_wm_protocols_reply_wipe(&protos);
@@ -590,7 +650,7 @@ ecore_x_window_prop_protocol_list_get(Ecore_X_Window win, int *num_ret)
      }
 
    prot_ret = calloc(1, count * sizeof(Ecore_X_WM_Protocol));
-   if (!prot_ret) 
+   if (!prot_ret)
      {
 #ifdef OLD_XCB_VERSION
         xcb_get_wm_protocols_reply_wipe(&protos);
@@ -600,12 +660,12 @@ ecore_x_window_prop_protocol_list_get(Ecore_X_Window win, int *num_ret)
         return NULL;
      }
 
-   for (i = 0; i < count; i++) 
+   for (i = 0; i < count; i++)
      {
         Ecore_X_WM_Protocol j;
 
         prot_ret[i] = -1;
-        for (j = 0; j < ECORE_X_WM_PROTOCOL_NUM; j++) 
+        for (j = 0; j < ECORE_X_WM_PROTOCOL_NUM; j++)
           {
              if (_ecore_xcb_atoms_wm_protocol[j] == protos.atoms[i])
                prot_ret[i] = j;
@@ -623,7 +683,8 @@ ecore_x_window_prop_protocol_list_get(Ecore_X_Window win, int *num_ret)
 }
 
 EAPI Ecore_X_Atom *
-ecore_x_window_prop_list(Ecore_X_Window win, int *num) 
+ecore_x_window_prop_list(Ecore_X_Window win,
+                         int           *num)
 {
    xcb_list_properties_cookie_t cookie;
    xcb_list_properties_reply_t *reply;
@@ -641,7 +702,7 @@ ecore_x_window_prop_list(Ecore_X_Window win, int *num)
    if (!reply) return NULL;
 
    atoms = (Ecore_X_Atom *)malloc(reply->atoms_len * sizeof(Ecore_X_Atom));
-   if (!atoms) 
+   if (!atoms)
      {
         free(reply);
         return NULL;
@@ -656,3 +717,4 @@ ecore_x_window_prop_list(Ecore_X_Window win, int *num)
 
    return atoms;
 }
+
index 7893a06..4f24d62 100644 (file)
@@ -3,14 +3,20 @@
 typedef struct _Shadow Shadow;
 struct _Shadow
 {
-   Shadow *parent, **children;
+   Shadow        *parent, **children;
    Ecore_X_Window win;
-   int children_num;
-   short x, y;
+   int            children_num;
+   short          x, y;
    unsigned short w, h;
 };
 
-static Eina_Bool _inside_rects(Shadow *s, int x, int y, int bx, int by, Ecore_X_Rectangle *rects, int num);
+static Eina_Bool _inside_rects(Shadow            *s,
+                               int                x,
+                               int                y,
+                               int                bx,
+                               int                by,
+                               Ecore_X_Rectangle *rects,
+                               int                num);
 
 //static int shadow_count = 0;
 static Shadow **shadow_base = NULL;
@@ -167,25 +173,26 @@ _ecore_x_window_tree_shadow_populate(void)
 }
 
 /*
-static void
-_ecore_x_window_tree_shadow_start(void)
-{
+   static void
+   _ecore_x_window_tree_shadow_start(void)
+   {
    shadow_count++;
    if (shadow_count > 1) return;
    _ecore_x_window_tree_shadow_populate();
-}
+   }
 
-static void
-_ecore_x_window_tree_shadow_stop(void)
-{
+   static void
+   _ecore_x_window_tree_shadow_stop(void)
+   {
    shadow_count--;
    if (shadow_count != 0) return;
    _ecore_x_window_tree_shadow_free();
-}
-*/
+   }
+ */
 
 Shadow *
-_ecore_x_window_shadow_tree_find_shadow(Shadow *s, Ecore_X_Window win)
+_ecore_x_window_shadow_tree_find_shadow(Shadow        *s,
+                                        Ecore_X_Window win)
 {
    Shadow *ss;
    int i = 0;
@@ -198,8 +205,8 @@ _ecore_x_window_shadow_tree_find_shadow(Shadow *s, Ecore_X_Window win)
           {
              if (!s->children[i]) continue;
 
-             if ((ss = 
-                  _ecore_x_window_shadow_tree_find_shadow(s->children[i], win)))
+             if ((ss =
+                    _ecore_x_window_shadow_tree_find_shadow(s->children[i], win)))
                return ss;
           }
      }
@@ -217,15 +224,21 @@ _ecore_x_window_shadow_tree_find(Ecore_X_Window base)
      {
         if (!shadow_base[i]) continue;
 
-        if ((s = 
-             _ecore_x_window_shadow_tree_find_shadow(shadow_base[i], base)))
+        if ((s =
+               _ecore_x_window_shadow_tree_find_shadow(shadow_base[i], base)))
           return s;
      }
    return NULL;
 }
 
 static Ecore_X_Window
-_ecore_x_window_shadow_tree_at_xy_get_shadow(Shadow *s, int bx, int by, int x, int y, Ecore_X_Window *skip, int skip_num)
+_ecore_x_window_shadow_tree_at_xy_get_shadow(Shadow         *s,
+                                             int             bx,
+                                             int             by,
+                                             int             x,
+                                             int             y,
+                                             Ecore_X_Window *skip,
+                                             int             skip_num)
 {
    Ecore_X_Window child;
    Ecore_X_Rectangle *rects;
@@ -265,8 +278,8 @@ _ecore_x_window_shadow_tree_at_xy_get_shadow(Shadow *s, int bx, int by, int x, i
 onward:
              if (!skipit)
                {
-                  if ((child = 
-                       _ecore_x_window_shadow_tree_at_xy_get_shadow(s->children[i], wx, wy, x, y, skip, skip_num)))
+                  if ((child =
+                         _ecore_x_window_shadow_tree_at_xy_get_shadow(s->children[i], wx, wy, x, y, skip, skip_num)))
                     return child;
                }
           }
@@ -276,7 +289,13 @@ onward:
 }
 
 static Ecore_X_Window
-_ecore_x_window_shadow_tree_at_xy_get(Ecore_X_Window base, int bx, int by, int x, int y, Ecore_X_Window *skip, int skip_num)
+_ecore_x_window_shadow_tree_at_xy_get(Ecore_X_Window  base,
+                                      int             bx,
+                                      int             by,
+                                      int             x,
+                                      int             y,
+                                      Ecore_X_Window *skip,
+                                      int             skip_num)
 {
    Shadow *s;
 
@@ -292,18 +311,24 @@ _ecore_x_window_shadow_tree_at_xy_get(Ecore_X_Window base, int bx, int by, int x
    return _ecore_x_window_shadow_tree_at_xy_get_shadow(s, bx, by, x, y, skip, skip_num);
 }
 
-static Eina_Bool 
-_inside_rects(Shadow *s, int x, int y, int bx, int by, Ecore_X_Rectangle *rects, int num) 
+static Eina_Bool
+_inside_rects(Shadow            *s,
+              int                x,
+              int                y,
+              int                bx,
+              int                by,
+              Ecore_X_Rectangle *rects,
+              int                num)
 {
    Eina_Bool inside = EINA_FALSE;
    int i = 0;
 
    if (!rects) return EINA_FALSE;
-   for (i = 0; i < num; i++) 
+   for (i = 0; i < num; i++)
      {
-        if ((x >= s->x + bx + rects[i].x) && 
-            (y >= s->y + by + rects[i].y) && 
-            (x < (int)(s->x + bx + rects[i].x + rects[i].width)) && 
+        if ((x >= s->x + bx + rects[i].x) &&
+            (y >= s->y + by + rects[i].y) &&
+            (x < (int)(s->x + bx + rects[i].x + rects[i].width)) &&
             (y < (int)(s->y + by + rects[i].y + rects[i].height)))
           {
              inside = EINA_TRUE;
@@ -327,7 +352,11 @@ _inside_rects(Shadow *s, int x, int y, int bx, int by, Ecore_X_Rectangle *rects,
  * @ingroup Ecore_X_Window_Geometry_Group
  */
 EAPI Ecore_X_Window
-ecore_x_window_shadow_tree_at_xy_with_skip_get(Ecore_X_Window base, int x, int y, Ecore_X_Window *skip, int skip_num)
+ecore_x_window_shadow_tree_at_xy_with_skip_get(Ecore_X_Window  base,
+                                               int             x,
+                                               int             y,
+                                               Ecore_X_Window *skip,
+                                               int             skip_num)
 {
    return _ecore_x_window_shadow_tree_at_xy_get(base, 0, 0, x, y, skip, skip_num);
 }
@@ -341,7 +370,8 @@ ecore_x_window_shadow_tree_at_xy_with_skip_get(Ecore_X_Window base, int x, int y
  * @ingroup Ecore_X_Window_Geometry_Group
  */
 EAPI Ecore_X_Window
-ecore_x_window_shadow_parent_get(Ecore_X_Window root __UNUSED__, Ecore_X_Window win)
+ecore_x_window_shadow_parent_get(Ecore_X_Window root __UNUSED__,
+                                 Ecore_X_Window win)
 {
    Shadow *s;
    int i = 0;
@@ -375,3 +405,4 @@ ecore_x_window_shadow_tree_flush(void)
 {
    _ecore_x_window_tree_shadow_free();
 }
+
index a778f9a..6206a51 100644 (file)
  *               window.
  * @ingroup Ecore_X_Window_Shape
  */
-EAPI void 
-ecore_x_window_shape_input_mask_set(Ecore_X_Window win, Ecore_X_Pixmap mask) 
+EAPI void
+ecore_x_window_shape_input_mask_set(Ecore_X_Window win,
+                                    Ecore_X_Pixmap mask)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    CHECK_XCB_CONN;
 
 #ifdef ECORE_XCB_SHAPE
-   xcb_shape_mask(_ecore_xcb_conn, XCB_SHAPE_SO_SET, XCB_SHAPE_SK_INPUT, 
+   xcb_shape_mask(_ecore_xcb_conn, XCB_SHAPE_SO_SET, XCB_SHAPE_SK_INPUT,
                   win, 0, 0, mask);
 //   ecore_x_flush();
 #else
@@ -41,14 +42,15 @@ ecore_x_window_shape_input_mask_set(Ecore_X_Window win, Ecore_X_Pixmap mask)
  *               window.
  * @ingroup Ecore_X_Window_Shape
  */
-EAPI void 
-ecore_x_window_shape_mask_set(Ecore_X_Window win, Ecore_X_Pixmap mask) 
+EAPI void
+ecore_x_window_shape_mask_set(Ecore_X_Window win,
+                              Ecore_X_Pixmap mask)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    CHECK_XCB_CONN;
 
 #ifdef ECORE_XCB_SHAPE
-   xcb_shape_mask(_ecore_xcb_conn, XCB_SHAPE_SO_SET, XCB_SHAPE_SK_BOUNDING, 
+   xcb_shape_mask(_ecore_xcb_conn, XCB_SHAPE_SO_SET, XCB_SHAPE_SK_BOUNDING,
                   win, 0, 0, mask);
 //   ecore_x_flush();
 #else
@@ -58,14 +60,15 @@ ecore_x_window_shape_mask_set(Ecore_X_Window win, Ecore_X_Pixmap mask)
 #endif
 }
 
-EAPI void 
-ecore_x_window_shape_window_set(Ecore_X_Window win, Ecore_X_Window shape_win) 
+EAPI void
+ecore_x_window_shape_window_set(Ecore_X_Window win,
+                                Ecore_X_Window shape_win)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    CHECK_XCB_CONN;
 
 #ifdef ECORE_XCB_SHAPE
-   xcb_shape_combine(_ecore_xcb_conn, XCB_SHAPE_SO_SET, XCB_SHAPE_SK_BOUNDING, 
+   xcb_shape_combine(_ecore_xcb_conn, XCB_SHAPE_SO_SET, XCB_SHAPE_SK_BOUNDING,
                      XCB_SHAPE_SK_BOUNDING, win, 0, 0, shape_win);
 //   ecore_x_flush();
 #else
@@ -75,14 +78,17 @@ ecore_x_window_shape_window_set(Ecore_X_Window win, Ecore_X_Window shape_win)
 #endif
 }
 
-EAPI void 
-ecore_x_window_shape_window_set_xy(Ecore_X_Window win, Ecore_X_Window shape_win, int x, int y) 
+EAPI void
+ecore_x_window_shape_window_set_xy(Ecore_X_Window win,
+                                   Ecore_X_Window shape_win,
+                                   int            x,
+                                   int            y)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    CHECK_XCB_CONN;
 
 #ifdef ECORE_XCB_SHAPE
-   xcb_shape_combine(_ecore_xcb_conn, XCB_SHAPE_SO_SET, XCB_SHAPE_SK_BOUNDING, 
+   xcb_shape_combine(_ecore_xcb_conn, XCB_SHAPE_SO_SET, XCB_SHAPE_SK_BOUNDING,
                      XCB_SHAPE_SK_BOUNDING, win, x, y, shape_win);
 //   ecore_x_flush();
 #else
@@ -94,8 +100,12 @@ ecore_x_window_shape_window_set_xy(Ecore_X_Window win, Ecore_X_Window shape_win,
 #endif
 }
 
-EAPI void 
-ecore_x_window_shape_rectangle_set(Ecore_X_Window win, int x, int y, int w, int h) 
+EAPI void
+ecore_x_window_shape_rectangle_set(Ecore_X_Window win,
+                                   int            x,
+                                   int            y,
+                                   int            w,
+                                   int            h)
 {
 #ifdef ECORE_XCB_SHAPE
    xcb_rectangle_t rect;
@@ -109,8 +119,8 @@ ecore_x_window_shape_rectangle_set(Ecore_X_Window win, int x, int y, int w, int
    rect.y = y;
    rect.width = w;
    rect.height = h;
-   xcb_shape_rectangles(_ecore_xcb_conn, XCB_SHAPE_SO_SET, 
-                        XCB_SHAPE_SK_BOUNDING, XCB_CLIP_ORDERING_UNSORTED, 
+   xcb_shape_rectangles(_ecore_xcb_conn, XCB_SHAPE_SO_SET,
+                        XCB_SHAPE_SK_BOUNDING, XCB_CLIP_ORDERING_UNSORTED,
                         win, 0, 0, 1, &rect);
 //   ecore_x_flush();
 #else
@@ -123,8 +133,10 @@ ecore_x_window_shape_rectangle_set(Ecore_X_Window win, int x, int y, int w, int
 #endif
 }
 
-EAPI void 
-ecore_x_window_shape_rectangles_set(Ecore_X_Window win, Ecore_X_Rectangle *rects, int num) 
+EAPI void
+ecore_x_window_shape_rectangles_set(Ecore_X_Window     win,
+                                    Ecore_X_Rectangle *rects,
+                                    int                num)
 {
 #ifdef ECORE_XCB_SHAPE
    xcb_rectangle_t *rect = NULL;
@@ -136,14 +148,14 @@ ecore_x_window_shape_rectangles_set(Ecore_X_Window win, Ecore_X_Rectangle *rects
    if (!rects) return;
 
 #ifdef ECORE_XCB_SHAPE
-   if (num > 0) 
+   if (num > 0)
      {
         int i = 0;
 
         if (!(rect = malloc(sizeof(xcb_rectangle_t) * num)))
           return;
 
-        for (i = 0; i < num; i++) 
+        for (i = 0; i < num; i++)
           {
              rect[i].x = rects[i].x;
              rect[i].y = rects[i].y;
@@ -151,8 +163,8 @@ ecore_x_window_shape_rectangles_set(Ecore_X_Window win, Ecore_X_Rectangle *rects
              rect[i].height = rects[i].height;
           }
      }
-   xcb_shape_rectangles(_ecore_xcb_conn, XCB_SHAPE_SO_SET, 
-                        XCB_SHAPE_SK_BOUNDING, XCB_CLIP_ORDERING_UNSORTED, 
+   xcb_shape_rectangles(_ecore_xcb_conn, XCB_SHAPE_SO_SET,
+                        XCB_SHAPE_SK_BOUNDING, XCB_CLIP_ORDERING_UNSORTED,
                         win, 0, 0, num, (xcb_rectangle_t *)rect);
 
    if (rect) free(rect);
@@ -165,15 +177,16 @@ ecore_x_window_shape_rectangles_set(Ecore_X_Window win, Ecore_X_Rectangle *rects
 #endif
 }
 
-EAPI void 
-ecore_x_window_shape_window_add(Ecore_X_Window win, Ecore_X_Window shape_win) 
+EAPI void
+ecore_x_window_shape_window_add(Ecore_X_Window win,
+                                Ecore_X_Window shape_win)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    CHECK_XCB_CONN;
 
 #ifdef ECORE_XCB_SHAPE
-   xcb_shape_combine(_ecore_xcb_conn, XCB_SHAPE_SO_UNION, 
-                     XCB_SHAPE_SK_BOUNDING, XCB_SHAPE_SK_BOUNDING, 
+   xcb_shape_combine(_ecore_xcb_conn, XCB_SHAPE_SO_UNION,
+                     XCB_SHAPE_SK_BOUNDING, XCB_SHAPE_SK_BOUNDING,
                      win, 0, 0, shape_win);
 //   ecore_x_flush();
 #else
@@ -183,15 +196,18 @@ ecore_x_window_shape_window_add(Ecore_X_Window win, Ecore_X_Window shape_win)
 #endif
 }
 
-EAPI void 
-ecore_x_window_shape_window_add_xy(Ecore_X_Window win, Ecore_X_Window shape_win, int x, int y) 
+EAPI void
+ecore_x_window_shape_window_add_xy(Ecore_X_Window win,
+                                   Ecore_X_Window shape_win,
+                                   int            x,
+                                   int            y)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    CHECK_XCB_CONN;
 
 #ifdef ECORE_XCB_SHAPE
-   xcb_shape_combine(_ecore_xcb_conn, XCB_SHAPE_SO_UNION, 
-                     XCB_SHAPE_SK_BOUNDING, XCB_SHAPE_SK_BOUNDING, 
+   xcb_shape_combine(_ecore_xcb_conn, XCB_SHAPE_SO_UNION,
+                     XCB_SHAPE_SK_BOUNDING, XCB_SHAPE_SK_BOUNDING,
                      win, x, y, shape_win);
 //   ecore_x_flush();
 #else
@@ -203,8 +219,12 @@ ecore_x_window_shape_window_add_xy(Ecore_X_Window win, Ecore_X_Window shape_win,
 #endif
 }
 
-EAPI void 
-ecore_x_window_shape_rectangle_add(Ecore_X_Window win, int x, int y, int w, int h) 
+EAPI void
+ecore_x_window_shape_rectangle_add(Ecore_X_Window win,
+                                   int            x,
+                                   int            y,
+                                   int            w,
+                                   int            h)
 {
 #ifdef ECORE_XCB_SHAPE
    xcb_rectangle_t rect;
@@ -218,8 +238,8 @@ ecore_x_window_shape_rectangle_add(Ecore_X_Window win, int x, int y, int w, int
    rect.y = y;
    rect.width = w;
    rect.height = h;
-   xcb_shape_rectangles(_ecore_xcb_conn, XCB_SHAPE_SO_UNION, 
-                        XCB_SHAPE_SK_BOUNDING, XCB_CLIP_ORDERING_UNSORTED, 
+   xcb_shape_rectangles(_ecore_xcb_conn, XCB_SHAPE_SO_UNION,
+                        XCB_SHAPE_SK_BOUNDING, XCB_CLIP_ORDERING_UNSORTED,
                         win, 0, 0, 1, &rect);
 //   ecore_x_flush();
 #else
@@ -232,8 +252,12 @@ ecore_x_window_shape_rectangle_add(Ecore_X_Window win, int x, int y, int w, int
 #endif
 }
 
-EAPI void 
-ecore_x_window_shape_rectangle_subtract(Ecore_X_Window win, int x, int y, int w, int h) 
+EAPI void
+ecore_x_window_shape_rectangle_subtract(Ecore_X_Window win,
+                                        int            x,
+                                        int            y,
+                                        int            w,
+                                        int            h)
 {
 #ifdef ECORE_XCB_SHAPE
    xcb_rectangle_t rect;
@@ -247,8 +271,8 @@ ecore_x_window_shape_rectangle_subtract(Ecore_X_Window win, int x, int y, int w,
    rect.y = y;
    rect.width = w;
    rect.height = h;
-   xcb_shape_rectangles(_ecore_xcb_conn, XCB_SHAPE_SO_SUBTRACT, 
-                        XCB_SHAPE_SK_BOUNDING, XCB_CLIP_ORDERING_UNSORTED, 
+   xcb_shape_rectangles(_ecore_xcb_conn, XCB_SHAPE_SO_SUBTRACT,
+                        XCB_SHAPE_SK_BOUNDING, XCB_CLIP_ORDERING_UNSORTED,
                         win, 0, 0, 1, &rect);
 //   ecore_x_flush();
 #else
@@ -261,8 +285,12 @@ ecore_x_window_shape_rectangle_subtract(Ecore_X_Window win, int x, int y, int w,
 #endif
 }
 
-EAPI void 
-ecore_x_window_shape_rectangle_clip(Ecore_X_Window win, int x, int y, int w, int h) 
+EAPI void
+ecore_x_window_shape_rectangle_clip(Ecore_X_Window win,
+                                    int            x,
+                                    int            y,
+                                    int            w,
+                                    int            h)
 {
 #ifdef ECORE_XCB_SHAPE
    xcb_rectangle_t rect;
@@ -276,8 +304,8 @@ ecore_x_window_shape_rectangle_clip(Ecore_X_Window win, int x, int y, int w, int
    rect.y = y;
    rect.width = w;
    rect.height = h;
-   xcb_shape_rectangles(_ecore_xcb_conn, XCB_SHAPE_SO_INTERSECT, 
-                        XCB_SHAPE_SK_BOUNDING, XCB_CLIP_ORDERING_UNSORTED, 
+   xcb_shape_rectangles(_ecore_xcb_conn, XCB_SHAPE_SO_INTERSECT,
+                        XCB_SHAPE_SK_BOUNDING, XCB_CLIP_ORDERING_UNSORTED,
                         win, 0, 0, 1, &rect);
 //   ecore_x_flush();
 #else
@@ -290,8 +318,10 @@ ecore_x_window_shape_rectangle_clip(Ecore_X_Window win, int x, int y, int w, int
 #endif
 }
 
-EAPI void 
-ecore_x_window_shape_rectangles_add(Ecore_X_Window win, Ecore_X_Rectangle *rects, int num) 
+EAPI void
+ecore_x_window_shape_rectangles_add(Ecore_X_Window     win,
+                                    Ecore_X_Rectangle *rects,
+                                    int                num)
 {
 #ifdef ECORE_XCB_SHAPE
    xcb_rectangle_t *rect = NULL;
@@ -301,14 +331,14 @@ ecore_x_window_shape_rectangles_add(Ecore_X_Window win, Ecore_X_Rectangle *rects
    CHECK_XCB_CONN;
 
 #ifdef ECORE_XCB_SHAPE
-   if (num > 0) 
+   if (num > 0)
      {
         int i = 0;
 
         if (!(rect = malloc(sizeof(xcb_rectangle_t) * num)))
           return;
 
-        for (i = 0; i < num; i++) 
+        for (i = 0; i < num; i++)
           {
              rect[i].x = rects[i].x;
              rect[i].y = rects[i].y;
@@ -317,8 +347,8 @@ ecore_x_window_shape_rectangles_add(Ecore_X_Window win, Ecore_X_Rectangle *rects
           }
      }
 
-   xcb_shape_rectangles(_ecore_xcb_conn, XCB_SHAPE_SO_UNION, 
-                        XCB_SHAPE_SK_BOUNDING, XCB_CLIP_ORDERING_UNSORTED, 
+   xcb_shape_rectangles(_ecore_xcb_conn, XCB_SHAPE_SO_UNION,
+                        XCB_SHAPE_SK_BOUNDING, XCB_CLIP_ORDERING_UNSORTED,
                         win, 0, 0, num, (xcb_rectangle_t *)&rect);
 
    if (rect) free(rect);
@@ -332,7 +362,8 @@ ecore_x_window_shape_rectangles_add(Ecore_X_Window win, Ecore_X_Rectangle *rects
 }
 
 EAPI Ecore_X_Rectangle *
-ecore_x_window_shape_rectangles_get(Ecore_X_Window win, int *num_ret) 
+ecore_x_window_shape_rectangles_get(Ecore_X_Window win,
+                                    int           *num_ret)
 {
    Ecore_X_Rectangle *rects = NULL;
 #ifdef ECORE_XCB_SHAPE
@@ -348,13 +379,13 @@ ecore_x_window_shape_rectangles_get(Ecore_X_Window win, int *num_ret)
    if (num_ret) *num_ret = 0;
 
 #ifdef ECORE_XCB_SHAPE
-   cookie = 
+   cookie =
      xcb_shape_get_rectangles(_ecore_xcb_conn, win, XCB_SHAPE_SK_BOUNDING);
    reply = xcb_shape_get_rectangles_reply(_ecore_xcb_conn, cookie, NULL);
    if (!reply) return NULL;
    if (num_ret) *num_ret = reply->rectangles_len;
 
-   if (reply->rectangles_len < 1) 
+   if (reply->rectangles_len < 1)
      {
         free(reply);
         if (num_ret) *num_ret = 0;
@@ -362,14 +393,14 @@ ecore_x_window_shape_rectangles_get(Ecore_X_Window win, int *num_ret)
      }
 
    rects = malloc(sizeof(Ecore_X_Rectangle) * reply->rectangles_len);
-   if (!rects) 
+   if (!rects)
      {
         free(reply);
         if (num_ret) *num_ret = 0;
         return NULL;
      }
    r = xcb_shape_get_rectangles_rectangles(reply);
-   for (i = 0; i < reply->rectangles_len; i++) 
+   for (i = 0; i < reply->rectangles_len; i++)
      {
         rects[i].x = r[i].x;
         rects[i].y = r[i].y;
@@ -386,8 +417,9 @@ ecore_x_window_shape_rectangles_get(Ecore_X_Window win, int *num_ret)
 #endif
 }
 
-EAPI void 
-ecore_x_window_shape_events_select(Ecore_X_Window win, Eina_Bool on) 
+EAPI void
+ecore_x_window_shape_events_select(Ecore_X_Window win,
+                                   Eina_Bool      on)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    CHECK_XCB_CONN;
@@ -403,7 +435,8 @@ ecore_x_window_shape_events_select(Ecore_X_Window win, Eina_Bool on)
 }
 
 EAPI Ecore_X_Rectangle *
-ecore_x_window_shape_input_rectangles_get(Ecore_X_Window win, int *num_ret) 
+ecore_x_window_shape_input_rectangles_get(Ecore_X_Window win,
+                                          int           *num_ret)
 {
    Ecore_X_Rectangle *rects = NULL;
 #ifdef ECORE_XCB_SHAPE
@@ -419,13 +452,13 @@ ecore_x_window_shape_input_rectangles_get(Ecore_X_Window win, int *num_ret)
    if (num_ret) *num_ret = 0;
 
 #ifdef ECORE_XCB_SHAPE
-   cookie = 
+   cookie =
      xcb_shape_get_rectangles(_ecore_xcb_conn, win, XCB_SHAPE_SK_INPUT);
    reply = xcb_shape_get_rectangles_reply(_ecore_xcb_conn, cookie, NULL);
    if (!reply) return NULL;
    if (num_ret) *num_ret = reply->rectangles_len;
 
-   if (reply->rectangles_len < 1) 
+   if (reply->rectangles_len < 1)
      {
         free(reply);
         if (num_ret) *num_ret = 0;
@@ -433,14 +466,14 @@ ecore_x_window_shape_input_rectangles_get(Ecore_X_Window win, int *num_ret)
      }
 
    rects = malloc(sizeof(Ecore_X_Rectangle) * reply->rectangles_len);
-   if (!rects) 
+   if (!rects)
      {
         free(reply);
         if (num_ret) *num_ret = 0;
         return NULL;
      }
    r = xcb_shape_get_rectangles_rectangles(reply);
-   for (i = 0; i < reply->rectangles_len; i++) 
+   for (i = 0; i < reply->rectangles_len; i++)
      {
         rects[i].x = r[i].x;
         rects[i].y = r[i].y;
@@ -461,7 +494,7 @@ ecore_x_window_shape_input_rectangles_get(Ecore_X_Window win, int *num_ret)
    /* get geometry */
    cookie = xcb_get_geometry_unchecked(_ecore_xcb_conn, win);
    reply = xcb_get_geometry_reply(_ecore_xcb_conn, cookie, NULL);
-   if (reply) 
+   if (reply)
      {
         rects[0].x = reply->x;
         rects[0].y = reply->y;
@@ -474,8 +507,10 @@ ecore_x_window_shape_input_rectangles_get(Ecore_X_Window win, int *num_ret)
 #endif
 }
 
-EAPI void 
-ecore_x_window_shape_input_rectangles_set(Ecore_X_Window win, Ecore_X_Rectangle *rects, int num) 
+EAPI void
+ecore_x_window_shape_input_rectangles_set(Ecore_X_Window     win,
+                                          Ecore_X_Rectangle *rects,
+                                          int                num)
 {
 #ifdef ECORE_XCB_SHAPE
    xcb_rectangle_t *rect = NULL;
@@ -487,14 +522,14 @@ ecore_x_window_shape_input_rectangles_set(Ecore_X_Window win, Ecore_X_Rectangle
    if (!rects) return;
 
 #ifdef ECORE_XCB_SHAPE
-   if (num > 0) 
+   if (num > 0)
      {
         int i = 0;
 
         if (!(rect = malloc(sizeof(xcb_rectangle_t) * num)))
           return;
 
-        for (i = 0; i < num; i++) 
+        for (i = 0; i < num; i++)
           {
              rect[i].x = rects[i].x;
              rect[i].y = rects[i].y;
@@ -502,8 +537,8 @@ ecore_x_window_shape_input_rectangles_set(Ecore_X_Window win, Ecore_X_Rectangle
              rect[i].height = rects[i].height;
           }
      }
-   xcb_shape_rectangles(_ecore_xcb_conn, XCB_SHAPE_SO_SET, 
-                        XCB_SHAPE_SK_INPUT, XCB_CLIP_ORDERING_UNSORTED, 
+   xcb_shape_rectangles(_ecore_xcb_conn, XCB_SHAPE_SO_SET,
+                        XCB_SHAPE_SK_INPUT, XCB_CLIP_ORDERING_UNSORTED,
                         win, 0, 0, num, (xcb_rectangle_t *)rect);
 
    if (rect) free(rect);
@@ -516,8 +551,12 @@ ecore_x_window_shape_input_rectangles_set(Ecore_X_Window win, Ecore_X_Rectangle
 #endif
 }
 
-EAPI void 
-ecore_x_window_shape_input_rectangle_subtract(Ecore_X_Window win, int x, int y, int w, int h) 
+EAPI void
+ecore_x_window_shape_input_rectangle_subtract(Ecore_X_Window win,
+                                              int            x,
+                                              int            y,
+                                              int            w,
+                                              int            h)
 {
 #ifdef ECORE_XCB_SHAPE
    xcb_rectangle_t rect;
@@ -531,8 +570,8 @@ ecore_x_window_shape_input_rectangle_subtract(Ecore_X_Window win, int x, int y,
    rect.y = y;
    rect.width = w;
    rect.height = h;
-   xcb_shape_rectangles(_ecore_xcb_conn, XCB_SHAPE_SO_SUBTRACT, 
-                        XCB_SHAPE_SK_INPUT, XCB_CLIP_ORDERING_UNSORTED, 
+   xcb_shape_rectangles(_ecore_xcb_conn, XCB_SHAPE_SO_SUBTRACT,
+                        XCB_SHAPE_SK_INPUT, XCB_CLIP_ORDERING_UNSORTED,
                         win, 0, 0, 1, &rect);
 //   ecore_x_flush();
 #else
@@ -545,8 +584,12 @@ ecore_x_window_shape_input_rectangle_subtract(Ecore_X_Window win, int x, int y,
 #endif
 }
 
-EAPI void 
-ecore_x_window_shape_input_rectangle_add(Ecore_X_Window win, int x, int y, int w, int h) 
+EAPI void
+ecore_x_window_shape_input_rectangle_add(Ecore_X_Window win,
+                                         int            x,
+                                         int            y,
+                                         int            w,
+                                         int            h)
 {
 #ifdef ECORE_XCB_SHAPE
    xcb_rectangle_t rect;
@@ -560,8 +603,8 @@ ecore_x_window_shape_input_rectangle_add(Ecore_X_Window win, int x, int y, int w
    rect.y = y;
    rect.width = w;
    rect.height = h;
-   xcb_shape_rectangles(_ecore_xcb_conn, XCB_SHAPE_SO_UNION, 
-                        XCB_SHAPE_SK_INPUT, XCB_CLIP_ORDERING_UNSORTED, 
+   xcb_shape_rectangles(_ecore_xcb_conn, XCB_SHAPE_SO_UNION,
+                        XCB_SHAPE_SK_INPUT, XCB_CLIP_ORDERING_UNSORTED,
                         win, 0, 0, 1, &rect);
 //   ecore_x_flush();
 #else
@@ -574,8 +617,12 @@ ecore_x_window_shape_input_rectangle_add(Ecore_X_Window win, int x, int y, int w
 #endif
 }
 
-EAPI void 
-ecore_x_window_shape_input_rectangle_set(Ecore_X_Window win, int x, int y, int w, int h) 
+EAPI void
+ecore_x_window_shape_input_rectangle_set(Ecore_X_Window win,
+                                         int            x,
+                                         int            y,
+                                         int            w,
+                                         int            h)
 {
 #ifdef ECORE_XCB_SHAPE
    xcb_rectangle_t rect;
@@ -589,8 +636,8 @@ ecore_x_window_shape_input_rectangle_set(Ecore_X_Window win, int x, int y, int w
    rect.y = y;
    rect.width = w;
    rect.height = h;
-   xcb_shape_rectangles(_ecore_xcb_conn, XCB_SHAPE_SO_SET, 
-                        XCB_SHAPE_SK_INPUT, XCB_CLIP_ORDERING_UNSORTED, 
+   xcb_shape_rectangles(_ecore_xcb_conn, XCB_SHAPE_SO_SET,
+                        XCB_SHAPE_SK_INPUT, XCB_CLIP_ORDERING_UNSORTED,
                         win, 0, 0, 1, &rect);
 //   ecore_x_flush();
 #else
@@ -603,14 +650,17 @@ ecore_x_window_shape_input_rectangle_set(Ecore_X_Window win, int x, int y, int w
 #endif
 }
 
-EAPI void 
-ecore_x_window_shape_input_window_set_xy(Ecore_X_Window win, Ecore_X_Window shape_win, int x, int y) 
+EAPI void
+ecore_x_window_shape_input_window_set_xy(Ecore_X_Window win,
+                                         Ecore_X_Window shape_win,
+                                         int            x,
+                                         int            y)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    CHECK_XCB_CONN;
 
 #ifdef ECORE_XCB_SHAPE
-   xcb_shape_combine(_ecore_xcb_conn, XCB_SHAPE_SO_SET, XCB_SHAPE_SK_INPUT, 
+   xcb_shape_combine(_ecore_xcb_conn, XCB_SHAPE_SO_SET, XCB_SHAPE_SK_INPUT,
                      XCB_SHAPE_SK_INPUT, win, x, y, shape_win);
 //   ecore_x_flush();
 #else
@@ -622,14 +672,17 @@ ecore_x_window_shape_input_window_set_xy(Ecore_X_Window win, Ecore_X_Window shap
 #endif
 }
 
-EAPI void 
-ecore_x_window_shape_input_window_add_xy(Ecore_X_Window win, Ecore_X_Window shape_win, int x, int y) 
+EAPI void
+ecore_x_window_shape_input_window_add_xy(Ecore_X_Window win,
+                                         Ecore_X_Window shape_win,
+                                         int            x,
+                                         int            y)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    CHECK_XCB_CONN;
 
 #ifdef ECORE_XCB_SHAPE
-   xcb_shape_combine(_ecore_xcb_conn, XCB_SHAPE_SO_UNION, XCB_SHAPE_SK_INPUT, 
+   xcb_shape_combine(_ecore_xcb_conn, XCB_SHAPE_SO_UNION, XCB_SHAPE_SK_INPUT,
                      XCB_SHAPE_SK_INPUT, win, x, y, shape_win);
 //   ecore_x_flush();
 #else
@@ -641,14 +694,15 @@ ecore_x_window_shape_input_window_add_xy(Ecore_X_Window win, Ecore_X_Window shap
 #endif
 }
 
-EAPI void 
-ecore_x_window_shape_input_window_set(Ecore_X_Window win, Ecore_X_Window shape_win) 
+EAPI void
+ecore_x_window_shape_input_window_set(Ecore_X_Window win,
+                                      Ecore_X_Window shape_win)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    CHECK_XCB_CONN;
 
 #ifdef ECORE_XCB_SHAPE
-   xcb_shape_combine(_ecore_xcb_conn, XCB_SHAPE_SO_SET, XCB_SHAPE_SK_INPUT, 
+   xcb_shape_combine(_ecore_xcb_conn, XCB_SHAPE_SO_SET, XCB_SHAPE_SK_INPUT,
                      XCB_SHAPE_SK_INPUT, win, 0, 0, shape_win);
 //   ecore_x_flush();
 #else
@@ -658,8 +712,12 @@ ecore_x_window_shape_input_window_set(Ecore_X_Window win, Ecore_X_Window shape_w
 #endif
 }
 
-EAPI void 
-ecore_x_window_shape_input_rectangle_clip(Ecore_X_Window win, int x, int y, int w, int h) 
+EAPI void
+ecore_x_window_shape_input_rectangle_clip(Ecore_X_Window win,
+                                          int            x,
+                                          int            y,
+                                          int            w,
+                                          int            h)
 {
 #ifdef ECORE_XCB_SHAPE
    xcb_rectangle_t rect;
@@ -673,8 +731,8 @@ ecore_x_window_shape_input_rectangle_clip(Ecore_X_Window win, int x, int y, int
    rect.y = y;
    rect.width = w;
    rect.height = h;
-   xcb_shape_rectangles(_ecore_xcb_conn, XCB_SHAPE_SO_INTERSECT, 
-                        XCB_SHAPE_SK_INPUT, XCB_CLIP_ORDERING_UNSORTED, 
+   xcb_shape_rectangles(_ecore_xcb_conn, XCB_SHAPE_SO_INTERSECT,
+                        XCB_SHAPE_SK_INPUT, XCB_CLIP_ORDERING_UNSORTED,
                         win, 0, 0, 1, &rect);
 //   ecore_x_flush();
 #else
@@ -687,8 +745,10 @@ ecore_x_window_shape_input_rectangle_clip(Ecore_X_Window win, int x, int y, int
 #endif
 }
 
-EAPI void 
-ecore_x_window_shape_input_rectangles_add(Ecore_X_Window win, Ecore_X_Rectangle *rects, int num) 
+EAPI void
+ecore_x_window_shape_input_rectangles_add(Ecore_X_Window     win,
+                                          Ecore_X_Rectangle *rects,
+                                          int                num)
 {
 #ifdef ECORE_XCB_SHAPE
    xcb_rectangle_t *rect = NULL;
@@ -698,14 +758,14 @@ ecore_x_window_shape_input_rectangles_add(Ecore_X_Window win, Ecore_X_Rectangle
    CHECK_XCB_CONN;
 
 #ifdef ECORE_XCB_SHAPE
-   if (num > 0) 
+   if (num > 0)
      {
         int i = 0;
 
         if (!(rect = malloc(sizeof(xcb_rectangle_t) * num)))
           return;
 
-        for (i = 0; i < num; i++) 
+        for (i = 0; i < num; i++)
           {
              rect[i].x = rects[i].x;
              rect[i].y = rects[i].y;
@@ -714,8 +774,8 @@ ecore_x_window_shape_input_rectangles_add(Ecore_X_Window win, Ecore_X_Rectangle
           }
      }
 
-   xcb_shape_rectangles(_ecore_xcb_conn, XCB_SHAPE_SO_UNION, 
-                        XCB_SHAPE_SK_INPUT, XCB_CLIP_ORDERING_UNSORTED, 
+   xcb_shape_rectangles(_ecore_xcb_conn, XCB_SHAPE_SO_UNION,
+                        XCB_SHAPE_SK_INPUT, XCB_CLIP_ORDERING_UNSORTED,
                         win, 0, 0, num, (xcb_rectangle_t *)&rect);
 
    if (rect) free(rect);
@@ -727,3 +787,4 @@ ecore_x_window_shape_input_rectangles_add(Ecore_X_Window win, Ecore_X_Rectangle
    rects = NULL;
 #endif
 }
+
index ba41e91..e0e5610 100644 (file)
@@ -2,14 +2,15 @@
 #include <fnmatch.h>
 
 /* local function prototypes */
-static Eina_Bool _ecore_xcb_xdefaults_glob_match(const char *str, const char *glob);
+static Eina_Bool _ecore_xcb_xdefaults_glob_match(const char *str,
+                                                 const char *glob);
 
 /* local variables */
 static Eina_File *_ecore_xcb_xdefaults_file = NULL;
 static char *_ecore_xcb_xdefaults_data = NULL;
 
-void 
-_ecore_xcb_xdefaults_init(void) 
+void
+_ecore_xcb_xdefaults_init(void)
 {
    char buff[PATH_MAX];
 
@@ -20,24 +21,25 @@ _ecore_xcb_xdefaults_init(void)
      {
         eina_mmap_safety_enabled_set(EINA_TRUE);
 
-        _ecore_xcb_xdefaults_data = 
+        _ecore_xcb_xdefaults_data =
           eina_file_map_all(_ecore_xcb_xdefaults_file, EINA_FILE_SEQUENTIAL);
      }
 }
 
-void 
-_ecore_xcb_xdefaults_shutdown(void) 
+void
+_ecore_xcb_xdefaults_shutdown(void)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
 
    if (!_ecore_xcb_xdefaults_file) return;
-   if (_ecore_xcb_xdefaults_data) 
+   if (_ecore_xcb_xdefaults_data)
      eina_file_map_free(_ecore_xcb_xdefaults_file, _ecore_xcb_xdefaults_data);
    if (_ecore_xcb_xdefaults_file) eina_file_close(_ecore_xcb_xdefaults_file);
 }
 
 char *
-_ecore_xcb_xdefaults_string_get(const char *prog, const char *param) 
+_ecore_xcb_xdefaults_string_get(const char *prog,
+                                const char *param)
 {
    char buff[1024], ret[1024];
    char *str = NULL;
@@ -51,9 +53,9 @@ _ecore_xcb_xdefaults_string_get(const char *prog, const char *param)
 
    str = _ecore_xcb_xdefaults_data;
    ea = eina_str_split_full(str, "\n", -1, &count);
-   for (i = 0; i < count; i++) 
+   for (i = 0; i < count; i++)
      {
-        if (_ecore_xcb_xdefaults_glob_match(ea[i], buff)) 
+        if (_ecore_xcb_xdefaults_glob_match(ea[i], buff))
           sscanf(ea[i], "%*[^:]:%*[ ]%s", ret);
      }
    if ((ea) && (ea[0]))
@@ -65,8 +67,9 @@ _ecore_xcb_xdefaults_string_get(const char *prog, const char *param)
    return strdup(ret);
 }
 
-int 
-_ecore_xcb_xdefaults_int_get(const char *prog, const char *param) 
+int
+_ecore_xcb_xdefaults_int_get(const char *prog,
+                             const char *param)
 {
    char buff[1024];
    char *str = NULL;
@@ -81,9 +84,9 @@ _ecore_xcb_xdefaults_int_get(const char *prog, const char *param)
 
    str = _ecore_xcb_xdefaults_data;
    ea = eina_str_split_full(str, "\n", -1, &count);
-   for (i = 0; i < count; i++) 
+   for (i = 0; i < count; i++)
      {
-        if (_ecore_xcb_xdefaults_glob_match(ea[i], buff)) 
+        if (_ecore_xcb_xdefaults_glob_match(ea[i], buff))
           sscanf(ea[i], "%*[^:]:%*[ ]%d", &ret);
      }
    if ((ea) && (ea[0]))
@@ -96,11 +99,12 @@ _ecore_xcb_xdefaults_int_get(const char *prog, const char *param)
 }
 
 /* local functions */
-static Eina_Bool 
-_ecore_xcb_xdefaults_glob_match(const char *str, const char *glob) 
+static Eina_Bool
+_ecore_xcb_xdefaults_glob_match(const char *str,
+                                const char *glob)
 {
    if ((!str) || (!glob)) return EINA_FALSE;
-   if (glob[0] == 0) 
+   if (glob[0] == 0)
      {
         if (str[0] == 0) return EINA_TRUE;
         return EINA_FALSE;
@@ -109,3 +113,4 @@ _ecore_xcb_xdefaults_glob_match(const char *str, const char *glob)
    if (!fnmatch(glob, str, 0)) return EINA_TRUE;
    return EINA_FALSE;
 }
+
index 8a6da74..bf9d5ee 100644 (file)
@@ -4,8 +4,10 @@
 # endif
 
 /* local function prototypes */
-static xcb_rectangle_t *_ecore_xcb_rect_to_xcb(Ecore_X_Rectangle *rects, int num);
-static Ecore_X_Rectangle *_ecore_xcb_rect_to_ecore(xcb_rectangle_t *rects, int num);
+static xcb_rectangle_t   *_ecore_xcb_rect_to_xcb(Ecore_X_Rectangle *rects,
+                                                 int                num);
+static Ecore_X_Rectangle *_ecore_xcb_rect_to_ecore(xcb_rectangle_t *rects,
+                                                   int              num);
 
 /* local variables */
 static Eina_Bool _xfixes_avail = EINA_FALSE;
@@ -13,8 +15,8 @@ static Eina_Bool _xfixes_avail = EINA_FALSE;
 /* external variables */
 int _ecore_xcb_event_xfixes = -1;
 
-void 
-_ecore_xcb_xfixes_init(void) 
+void
+_ecore_xcb_xfixes_init(void)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
 
@@ -23,8 +25,8 @@ _ecore_xcb_xfixes_init(void)
 #endif
 }
 
-void 
-_ecore_xcb_xfixes_finalize(void) 
+void
+_ecore_xcb_xfixes_finalize(void)
 {
 #ifdef ECORE_XCB_XFIXES
    const xcb_query_extension_reply_t *ext_reply;
@@ -34,29 +36,29 @@ _ecore_xcb_xfixes_finalize(void)
 
 #ifdef ECORE_XCB_XFIXES
    ext_reply = xcb_get_extension_data(_ecore_xcb_conn, &xcb_xfixes_id);
-   if ((ext_reply) && (ext_reply->present)) 
+   if ((ext_reply) && (ext_reply->present))
      {
         xcb_xfixes_query_version_cookie_t cookie;
         xcb_xfixes_query_version_reply_t *reply;
 
-        cookie = 
-          xcb_xfixes_query_version_unchecked(_ecore_xcb_conn, 
-                                             XCB_XFIXES_MAJOR_VERSION, 
+        cookie =
+          xcb_xfixes_query_version_unchecked(_ecore_xcb_conn,
+                                             XCB_XFIXES_MAJOR_VERSION,
                                              XCB_XFIXES_MINOR_VERSION);
         reply = xcb_xfixes_query_version_reply(_ecore_xcb_conn, cookie, NULL);
-        if (reply) 
+        if (reply)
           {
              /* NB: XFixes Extension >= 3 needed for shape stuff.
-              * for now, I am removing this check so that it matches the 
-              * xlib code closer. If the extension version ends up being 
+              * for now, I am removing this check so that it matches the
+              * xlib code closer. If the extension version ends up being
               * that important, then re-enable this */
 
-             /* if (reply->major_version >= 3) */
-             _xfixes_avail = EINA_TRUE;
-             free(reply);
+     /* if (reply->major_version >= 3) */
+                _xfixes_avail = EINA_TRUE;
+                free(reply);
           }
 
-        if (_xfixes_avail) 
+        if (_xfixes_avail)
           _ecore_xcb_event_xfixes = ext_reply->first_event;
      }
 #endif
@@ -83,11 +85,11 @@ ecore_x_fixes_selection_notification_request(Ecore_X_Atom selection)
            XCB_XFIXES_SELECTION_EVENT_MASK_SELECTION_WINDOW_DESTROY |
            XCB_XFIXES_SELECTION_EVENT_MASK_SELECTION_CLIENT_CLOSE);
 
-   cookie = 
-     xcb_xfixes_select_selection_input_checked(_ecore_xcb_conn, root, 
+   cookie =
+     xcb_xfixes_select_selection_input_checked(_ecore_xcb_conn, root,
                                                selection, mask);
    err = xcb_request_check(_ecore_xcb_conn, cookie);
-   if (err) 
+   if (err)
      {
         free(err);
         return EINA_FALSE;
@@ -98,8 +100,8 @@ ecore_x_fixes_selection_notification_request(Ecore_X_Atom selection)
    return EINA_FALSE;
 }
 
-Eina_Bool 
-_ecore_xcb_xfixes_avail_get(void) 
+Eina_Bool
+_ecore_xcb_xfixes_avail_get(void)
 {
    return _xfixes_avail;
 }
@@ -121,8 +123,9 @@ _ecore_xcb_xfixes_avail_get(void)
  * becomes the region.
  * @ingroup Ecore_X_Fixes_Group
  */
-EAPI Ecore_X_Region 
-ecore_x_region_new(Ecore_X_Rectangle *rects, int num) 
+EAPI Ecore_X_Region
+ecore_x_region_new(Ecore_X_Rectangle *rects,
+                   int                num)
 {
    Ecore_X_Region region = 0;
 #ifdef ECORE_XCB_XFIXES
@@ -154,8 +157,8 @@ ecore_x_region_new(Ecore_X_Rectangle *rects, int num)
  * (which must be of depth 1, else Match error).
  * @ingroup Ecore_X_Fixes_Group
  */
-EAPI Ecore_X_Region 
-ecore_x_region_new_from_bitmap(Ecore_X_Pixmap bitmap) 
+EAPI Ecore_X_Region
+ecore_x_region_new_from_bitmap(Ecore_X_Pixmap bitmap)
 {
    Ecore_X_Region region = 0;
 
@@ -184,8 +187,9 @@ ecore_x_region_new_from_bitmap(Ecore_X_Pixmap bitmap)
  * regions.
  * @ingroup Ecore_X_Fixes_Group
  */
-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_window(Ecore_X_Window      win,
+                               Ecore_X_Region_Type type)
 {
    Ecore_X_Region region = 0;
 
@@ -211,8 +215,8 @@ ecore_x_region_new_from_window(Ecore_X_Window win, Ecore_X_Region_Type type)
  * Creates a region initialized from the clip list of @p gc.
  * @ingroup Ecore_X_Fixes_Group
  */
-EAPI Ecore_X_Region 
-ecore_x_region_new_from_gc(Ecore_X_GC gc) 
+EAPI Ecore_X_Region
+ecore_x_region_new_from_gc(Ecore_X_GC gc)
 {
    Ecore_X_Region region = 0;
 
@@ -238,8 +242,8 @@ ecore_x_region_new_from_gc(Ecore_X_GC gc)
  * Creates a region initialized from the clip list of @p picture.
  * @ingroup Ecore_X_Fixes_Group
  */
-EAPI Ecore_X_Region 
-ecore_x_region_new_from_picture(Ecore_X_Picture picture) 
+EAPI Ecore_X_Region
+ecore_x_region_new_from_picture(Ecore_X_Picture picture)
 {
    Ecore_X_Region region = 0;
 
@@ -264,8 +268,8 @@ ecore_x_region_new_from_picture(Ecore_X_Picture picture)
  * Destroy the specified @p region.
  * @ingroup Ecore_X_Fixes_Group
  */
-EAPI void 
-ecore_x_region_free(Ecore_X_Region region) 
+EAPI void
+ecore_x_region_free(Ecore_X_Region region)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    CHECK_XCB_CONN;
@@ -288,8 +292,10 @@ ecore_x_region_free(Ecore_X_Region region)
  * by the union of the rectangles @p rects.
  * @ingroup Ecore_X_Fixes_Group
  */
-EAPI void 
-ecore_x_region_set(Ecore_X_Region region, Ecore_X_Rectangle *rects, int num) 
+EAPI void
+ecore_x_region_set(Ecore_X_Region     region,
+                   Ecore_X_Rectangle *rects,
+                   int                num)
 {
 #ifdef ECORE_XCB_XFIXES
    xcb_rectangle_t *xrects;
@@ -316,8 +322,9 @@ ecore_x_region_set(Ecore_X_Region region, Ecore_X_Rectangle *rects, int num)
  * Replace the contents of @p dest with the contents of @p source.
  * @ingroup Ecore_X_Fixes_Group
  */
-EAPI void 
-ecore_x_region_copy(Ecore_X_Region dest, Ecore_X_Region source) 
+EAPI void
+ecore_x_region_copy(Ecore_X_Region dest,
+                    Ecore_X_Region source)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    CHECK_XCB_CONN;
@@ -341,8 +348,10 @@ ecore_x_region_copy(Ecore_X_Region dest, Ecore_X_Region source)
  * @p source2.
  * @ingroup Ecore_X_Fixes_Group
  */
-EAPI void 
-ecore_x_region_combine(Ecore_X_Region dest, Ecore_X_Region source1, Ecore_X_Region source2) 
+EAPI void
+ecore_x_region_combine(Ecore_X_Region dest,
+                       Ecore_X_Region source1,
+                       Ecore_X_Region source2)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    CHECK_XCB_CONN;
@@ -365,8 +374,10 @@ ecore_x_region_combine(Ecore_X_Region dest, Ecore_X_Region source1, Ecore_X_Regi
  * @p source2.
  * @ingroup Ecore_X_Fixes_Group
  */
-EAPI void 
-ecore_x_region_intersect(Ecore_X_Region dest, Ecore_X_Region source1, Ecore_X_Region source2) 
+EAPI void
+ecore_x_region_intersect(Ecore_X_Region dest,
+                         Ecore_X_Region source1,
+                         Ecore_X_Region source2)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    CHECK_XCB_CONN;
@@ -389,8 +400,10 @@ ecore_x_region_intersect(Ecore_X_Region dest, Ecore_X_Region source1, Ecore_X_Re
  * @p source2.
  * @ingroup Ecore_X_Fixes_Group
  */
-EAPI void 
-ecore_x_region_subtract(Ecore_X_Region dest, Ecore_X_Region source1, Ecore_X_Region source2) 
+EAPI void
+ecore_x_region_subtract(Ecore_X_Region dest,
+                        Ecore_X_Region source1,
+                        Ecore_X_Region source2)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    CHECK_XCB_CONN;
@@ -414,8 +427,10 @@ ecore_x_region_subtract(Ecore_X_Region dest, Ecore_X_Region source1, Ecore_X_Reg
  * contents.
  * @ingroup Ecore_X_Fixes_Group
  */
-EAPI void 
-ecore_x_region_invert(Ecore_X_Region dest, Ecore_X_Rectangle *bounds, Ecore_X_Region source) 
+EAPI void
+ecore_x_region_invert(Ecore_X_Region     dest,
+                      Ecore_X_Rectangle *bounds,
+                      Ecore_X_Region     source)
 {
 #ifdef ECORE_XCB_XFIXES
    xcb_rectangle_t xrects;
@@ -446,8 +461,10 @@ ecore_x_region_invert(Ecore_X_Region dest, Ecore_X_Rectangle *bounds, Ecore_X_Re
  * The @p region is translated by @p dx and @p dy in place.
  * @ingroup Ecore_X_Fixes_Group
  */
-EAPI void 
-ecore_x_region_translate(Ecore_X_Region region, int dx, int dy) 
+EAPI void
+ecore_x_region_translate(Ecore_X_Region region,
+                         int            dx,
+                         int            dy)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    CHECK_XCB_CONN;
@@ -468,8 +485,9 @@ ecore_x_region_translate(Ecore_X_Region region, int dx, int dy)
  * The extents of the @p source region are placed in @p dest.
  * @ingroup Ecore_X_Fixes_Group
  */
-EAPI void 
-ecore_x_region_extents(Ecore_X_Region dest, Ecore_X_Region source) 
+EAPI void
+ecore_x_region_extents(Ecore_X_Region dest,
+                       Ecore_X_Region source)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    CHECK_XCB_CONN;
@@ -498,7 +516,9 @@ ecore_x_region_extents(Ecore_X_Region dest, Ecore_X_Region source)
  * @ingroup Ecore_X_Fixes_Group
  */
 EAPI Ecore_X_Rectangle *
-ecore_x_region_fetch(Ecore_X_Region region, int *num, Ecore_X_Rectangle *bounds) 
+ecore_x_region_fetch(Ecore_X_Region     region,
+                     int               *num,
+                     Ecore_X_Rectangle *bounds)
 {
    Ecore_X_Rectangle extents = { 0, 0, 0, 0 };
    Ecore_X_Rectangle *rects = NULL;
@@ -566,8 +586,13 @@ ecore_x_region_fetch(Ecore_X_Region region, int *num, Ecore_X_Rectangle *bounds)
  * @p left, @p right, @p top and @p bottom.
  * @ingroup Ecore_X_Fixes_Group
  */
-EAPI void 
-ecore_x_region_expand(Ecore_X_Region dest, Ecore_X_Region source, unsigned int left, unsigned int right, unsigned int top, unsigned int bottom) 
+EAPI void
+ecore_x_region_expand(Ecore_X_Region dest,
+                      Ecore_X_Region source,
+                      unsigned int   left,
+                      unsigned int   right,
+                      unsigned int   top,
+                      unsigned int   bottom)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    CHECK_XCB_CONN;
@@ -596,8 +621,11 @@ ecore_x_region_expand(Ecore_X_Region dest, Ecore_X_Region source, unsigned int l
  * to region have no effect on the gc clip-mask.
  * @ingroup Ecore_X_Fixes_Group
  */
-EAPI void 
-ecore_x_region_gc_clip_set(Ecore_X_Region region, Ecore_X_GC gc, int x, int y) 
+EAPI void
+ecore_x_region_gc_clip_set(Ecore_X_Region region,
+                           Ecore_X_GC     gc,
+                           int            x,
+                           int            y)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    CHECK_XCB_CONN;
@@ -623,8 +651,12 @@ ecore_x_region_gc_clip_set(Ecore_X_Region region, Ecore_X_GC gc, int x, int y)
  * have no effect on the window shape.
  * @ingroup Ecore_X_Fixes_Group
  */
-EAPI void 
-ecore_x_region_window_shape_set(Ecore_X_Region region, Ecore_X_Window dest, Ecore_X_Shape_Type type, int x, int y) 
+EAPI void
+ecore_x_region_window_shape_set(Ecore_X_Region     region,
+                                Ecore_X_Window     dest,
+                                Ecore_X_Shape_Type type,
+                                int                x,
+                                int                y)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    CHECK_XCB_CONN;
@@ -652,8 +684,11 @@ ecore_x_region_window_shape_set(Ecore_X_Region region, Ecore_X_Window dest, Ecor
  * to region have no effect on the picture clip-mask.
  * @ingroup Ecore_X_Fixes_Group
  */
-EAPI void 
-ecore_x_region_picture_clip_set(Ecore_X_Region region, Ecore_X_Picture picture, int x, int y) 
+EAPI void
+ecore_x_region_picture_clip_set(Ecore_X_Region  region,
+                                Ecore_X_Picture picture,
+                                int             x,
+                                int             y)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    CHECK_XCB_CONN;
@@ -668,7 +703,8 @@ ecore_x_region_picture_clip_set(Ecore_X_Region region, Ecore_X_Picture picture,
 
 /* local function prototypes */
 static xcb_rectangle_t *
-_ecore_xcb_rect_to_xcb(Ecore_X_Rectangle *rects, int num) 
+_ecore_xcb_rect_to_xcb(Ecore_X_Rectangle *rects,
+                       int                num)
 {
    xcb_rectangle_t *xrect;
    int i = 0;
@@ -678,7 +714,7 @@ _ecore_xcb_rect_to_xcb(Ecore_X_Rectangle *rects, int num)
    xrect = malloc(sizeof(xcb_rectangle_t) * num);
    if (!xrect) return NULL;
 
-   for (i = 0; i < num; i++) 
+   for (i = 0; i < num; i++)
      {
         xrect[i].x = rects[i].x;
         xrect[i].y = rects[i].y;
@@ -690,7 +726,8 @@ _ecore_xcb_rect_to_xcb(Ecore_X_Rectangle *rects, int num)
 }
 
 static Ecore_X_Rectangle *
-_ecore_xcb_rect_to_ecore(xcb_rectangle_t *rects, int num) 
+_ecore_xcb_rect_to_ecore(xcb_rectangle_t *rects,
+                         int              num)
 {
    Ecore_X_Rectangle *erect;
    int i = 0;
@@ -700,7 +737,7 @@ _ecore_xcb_rect_to_ecore(xcb_rectangle_t *rects, int num)
    erect = malloc(sizeof(Ecore_X_Rectangle) * num);
    if (!erect) return NULL;
 
-   for (i = 0; i < num; i++) 
+   for (i = 0; i < num; i++)
      {
         erect[i].x = rects[i].x;
         erect[i].y = rects[i].y;
@@ -710,3 +747,4 @@ _ecore_xcb_rect_to_ecore(xcb_rectangle_t *rects, int num)
 
    return erect;
 }
+
index c58ffce..37a2339 100644 (file)
@@ -7,8 +7,8 @@
 static Eina_Bool _xinerama_avail = EINA_FALSE;
 static Eina_Bool _xinerama_active = EINA_FALSE;
 
-void 
-_ecore_xcb_xinerama_init(void) 
+void
+_ecore_xcb_xinerama_init(void)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
 
@@ -17,8 +17,8 @@ _ecore_xcb_xinerama_init(void)
 #endif
 }
 
-void 
-_ecore_xcb_xinerama_finalize(void) 
+void
+_ecore_xcb_xinerama_finalize(void)
 {
 #ifdef ECORE_XCB_XINERAMA
    const xcb_query_extension_reply_t *ext_reply;
@@ -28,33 +28,33 @@ _ecore_xcb_xinerama_finalize(void)
 
 #ifdef ECORE_XCB_XINERAMA
    ext_reply = xcb_get_extension_data(_ecore_xcb_conn, &xcb_xinerama_id);
-   if ((ext_reply) && (ext_reply->present)) 
+   if ((ext_reply) && (ext_reply->present))
      {
         xcb_xinerama_query_version_cookie_t cookie;
         xcb_xinerama_query_version_reply_t *reply;
 
-        cookie = 
-          xcb_xinerama_query_version_unchecked(_ecore_xcb_conn, 
-                                               XCB_XINERAMA_MAJOR_VERSION, 
+        cookie =
+          xcb_xinerama_query_version_unchecked(_ecore_xcb_conn,
+                                               XCB_XINERAMA_MAJOR_VERSION,
                                                XCB_XINERAMA_MINOR_VERSION);
-        reply = 
+        reply =
           xcb_xinerama_query_version_reply(_ecore_xcb_conn, cookie, NULL);
-        if (reply) 
+        if (reply)
           {
              _xinerama_avail = EINA_TRUE;
              // NB: Do we need to compare version numbers here ?
              free(reply);
           }
 
-        if (_xinerama_avail) 
+        if (_xinerama_avail)
           {
              xcb_xinerama_is_active_cookie_t acookie;
              xcb_xinerama_is_active_reply_t *areply;
 
              acookie = xcb_xinerama_is_active_unchecked(_ecore_xcb_conn);
-             areply = 
+             areply =
                xcb_xinerama_is_active_reply(_ecore_xcb_conn, acookie, NULL);
-             if (areply) 
+             if (areply)
                {
                   _xinerama_active = areply->state;
                   free(areply);
@@ -64,8 +64,8 @@ _ecore_xcb_xinerama_finalize(void)
 #endif
 }
 
-EAPI int 
-ecore_x_xinerama_screen_count_get(void) 
+EAPI int
+ecore_x_xinerama_screen_count_get(void)
 {
    int count = 0;
 #ifdef ECORE_XCB_XINERAMA
@@ -80,7 +80,7 @@ ecore_x_xinerama_screen_count_get(void)
 
 #ifdef ECORE_XCB_XINERAMA
    cookie = xcb_xinerama_query_screens_unchecked(_ecore_xcb_conn);
-   reply = 
+   reply =
      xcb_xinerama_query_screens_reply(_ecore_xcb_conn, cookie, NULL);
    if (!reply) return 0;
    count = reply->number;
@@ -89,8 +89,12 @@ ecore_x_xinerama_screen_count_get(void)
    return count;
 }
 
-EAPI Eina_Bool 
-ecore_x_xinerama_screen_geometry_get(int screen, int *x, int *y, int *w, int *h) 
+EAPI Eina_Bool
+ecore_x_xinerama_screen_geometry_get(int  screen,
+                                     int *x,
+                                     int *y,
+                                     int *w,
+                                     int *h)
 {
 #ifdef ECORE_XCB_XINERAMA
    xcb_xinerama_query_screens_cookie_t cookie;
@@ -110,12 +114,12 @@ ecore_x_xinerama_screen_geometry_get(int screen, int *x, int *y, int *w, int *h)
 
 #ifdef ECORE_XCB_XINERAMA
    cookie = xcb_xinerama_query_screens_unchecked(_ecore_xcb_conn);
-   reply = 
+   reply =
      xcb_xinerama_query_screens_reply(_ecore_xcb_conn, cookie, NULL);
    if (!reply) return EINA_FALSE;
 
    info = xcb_xinerama_query_screens_screen_info(reply);
-   if (!info) 
+   if (!info)
      {
         free(reply);
         return EINA_FALSE;
@@ -132,3 +136,4 @@ ecore_x_xinerama_screen_geometry_get(int screen, int *x, int *y, int *w, int *h)
 
    return EINA_FALSE;
 }
+
index 16acabb..b664dc9 100644 (file)
@@ -7,8 +7,8 @@
 /* local variables */
 static Eina_Bool _test_avail = EINA_FALSE;
 
-void 
-_ecore_xcb_xtest_init(void) 
+void
+_ecore_xcb_xtest_init(void)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
 
@@ -17,8 +17,8 @@ _ecore_xcb_xtest_init(void)
 #endif
 }
 
-void 
-_ecore_xcb_xtest_finalize(void) 
+void
+_ecore_xcb_xtest_finalize(void)
 {
 #ifdef ECORE_XCB_XTEST
    const xcb_query_extension_reply_t *ext_reply;
@@ -28,16 +28,16 @@ _ecore_xcb_xtest_finalize(void)
 
 #ifdef ECORE_XCB_XTEST
    ext_reply = xcb_get_extension_data(_ecore_xcb_conn, &xcb_test_id);
-   if ((ext_reply) && (ext_reply->present)) 
+   if ((ext_reply) && (ext_reply->present))
      _test_avail = EINA_TRUE;
 #endif
 }
 
-EAPI Eina_Bool 
+EAPI Eina_Bool
 #ifdef ECORE_XCB_XTEST
-ecore_x_test_fake_key_down(const char *key) 
+ecore_x_test_fake_key_down(const char *key)
 #else
-ecore_x_test_fake_key_down(const char *key __UNUSED__) 
+ecore_x_test_fake_key_down(const char *key __UNUSED__)
 #endif
 {
 #ifdef ECORE_XCB_XTEST
@@ -55,12 +55,12 @@ ecore_x_test_fake_key_down(const char *key __UNUSED__)
    keycode = _ecore_xcb_keymap_string_to_keycode(key);
    if (keycode == XCB_NO_SYMBOL) return EINA_FALSE;
 
-   cookie = 
-     xcb_test_fake_input(_ecore_xcb_conn, XCB_KEY_PRESS, 
-                         keycode, XCB_CURRENT_TIME, 
+   cookie =
+     xcb_test_fake_input(_ecore_xcb_conn, XCB_KEY_PRESS,
+                         keycode, XCB_CURRENT_TIME,
                          ((xcb_screen_t *)_ecore_xcb_screen)->root, 0, 0, 0);
    err = xcb_request_check(_ecore_xcb_conn, cookie);
-   if (err) 
+   if (err)
      {
         free(err);
         return EINA_FALSE;
@@ -71,11 +71,11 @@ ecore_x_test_fake_key_down(const char *key __UNUSED__)
    return EINA_FALSE;
 }
 
-EAPI Eina_Bool 
+EAPI Eina_Bool
 #ifdef ECORE_XCB_XTEST
-ecore_x_test_fake_key_up(const char *key) 
+ecore_x_test_fake_key_up(const char *key)
 #else
-ecore_x_test_fake_key_up(const char *key __UNUSED__) 
+ecore_x_test_fake_key_up(const char *key __UNUSED__)
 #endif
 {
 #ifdef ECORE_XCB_XTEST
@@ -93,12 +93,12 @@ ecore_x_test_fake_key_up(const char *key __UNUSED__)
    keycode = _ecore_xcb_keymap_string_to_keycode(key);
    if (keycode == XCB_NO_SYMBOL) return EINA_FALSE;
 
-   cookie = 
-     xcb_test_fake_input(_ecore_xcb_conn, XCB_KEY_RELEASE, 
-                         keycode, XCB_CURRENT_TIME, 
+   cookie =
+     xcb_test_fake_input(_ecore_xcb_conn, XCB_KEY_RELEASE,
+                         keycode, XCB_CURRENT_TIME,
                          ((xcb_screen_t *)_ecore_xcb_screen)->root, 0, 0, 0);
    err = xcb_request_check(_ecore_xcb_conn, cookie);
-   if (err) 
+   if (err)
      {
         free(err);
         return EINA_FALSE;
@@ -109,11 +109,11 @@ ecore_x_test_fake_key_up(const char *key __UNUSED__)
    return EINA_FALSE;
 }
 
-EAPI Eina_Bool 
+EAPI Eina_Bool
 #ifdef ECORE_XCB_XTEST
-ecore_x_test_fake_key_press(const char *key) 
+ecore_x_test_fake_key_press(const char *key)
 #else
-ecore_x_test_fake_key_press(const char *key __UNUSED__) 
+ecore_x_test_fake_key_press(const char *key __UNUSED__)
 #endif
 {
 #ifdef ECORE_XCB_XTEST
@@ -133,22 +133,22 @@ ecore_x_test_fake_key_press(const char *key __UNUSED__)
 #ifdef ECORE_XCB_XTEST
    keycode = _ecore_xcb_keymap_string_to_keycode(key);
    keysym = _ecore_xcb_keymap_keycode_to_keysym(keycode, 0);
-   if (keysym == XCB_NO_SYMBOL) 
+   if (keysym == XCB_NO_SYMBOL)
      {
         keysym = _ecore_xcb_keymap_keycode_to_keysym(keycode, 1);
         if (keysym != XCB_NO_SYMBOL)
           shift = EINA_TRUE;
      }
 
-   if (shift) 
+   if (shift)
      {
         xcb_keycode_t *keycodes;
         int i = 0;
 
         keycodes = _ecore_xcb_keymap_keysym_to_keycode(XK_Shift_L);
-        while (keycodes[i] != XCB_NO_SYMBOL) 
+        while (keycodes[i] != XCB_NO_SYMBOL)
           {
-             if (keycodes[i] != 0) 
+             if (keycodes[i] != 0)
                {
                   shift_code = keycodes[i];
                   break;
@@ -157,51 +157,51 @@ ecore_x_test_fake_key_press(const char *key __UNUSED__)
           }
      }
 
-   if (shift) 
+   if (shift)
      {
-        cookie = 
-          xcb_test_fake_input(_ecore_xcb_conn, XCB_KEY_PRESS, 
-                              shift_code, XCB_CURRENT_TIME, 
-                              ((xcb_screen_t *)_ecore_xcb_screen)->root, 
+        cookie =
+          xcb_test_fake_input(_ecore_xcb_conn, XCB_KEY_PRESS,
+                              shift_code, XCB_CURRENT_TIME,
+                              ((xcb_screen_t *)_ecore_xcb_screen)->root,
                               0, 0, 0);
         err = xcb_request_check(_ecore_xcb_conn, cookie);
-        if (err) 
+        if (err)
           {
              free(err);
              return EINA_FALSE;
           }
      }
 
-   cookie = 
-     xcb_test_fake_input(_ecore_xcb_conn, XCB_KEY_PRESS, 
-                         keycode, XCB_CURRENT_TIME, 
+   cookie =
+     xcb_test_fake_input(_ecore_xcb_conn, XCB_KEY_PRESS,
+                         keycode, XCB_CURRENT_TIME,
                          ((xcb_screen_t *)_ecore_xcb_screen)->root, 0, 0, 0);
    err = xcb_request_check(_ecore_xcb_conn, cookie);
-   if (err) 
+   if (err)
      {
         free(err);
         return EINA_FALSE;
      }
-   cookie = 
-     xcb_test_fake_input(_ecore_xcb_conn, XCB_KEY_RELEASE, 
-                         keycode, XCB_CURRENT_TIME, 
+   cookie =
+     xcb_test_fake_input(_ecore_xcb_conn, XCB_KEY_RELEASE,
+                         keycode, XCB_CURRENT_TIME,
                          ((xcb_screen_t *)_ecore_xcb_screen)->root, 0, 0, 0);
    err = xcb_request_check(_ecore_xcb_conn, cookie);
-   if (err) 
+   if (err)
      {
         free(err);
         return EINA_FALSE;
      }
 
-   if (shift) 
+   if (shift)
      {
-        cookie = 
-          xcb_test_fake_input(_ecore_xcb_conn, XCB_KEY_RELEASE, 
-                              shift_code, XCB_CURRENT_TIME, 
-                              ((xcb_screen_t *)_ecore_xcb_screen)->root, 
+        cookie =
+          xcb_test_fake_input(_ecore_xcb_conn, XCB_KEY_RELEASE,
+                              shift_code, XCB_CURRENT_TIME,
+                              ((xcb_screen_t *)_ecore_xcb_screen)->root,
                               0, 0, 0);
         err = xcb_request_check(_ecore_xcb_conn, cookie);
-        if (err) 
+        if (err)
           {
              free(err);
              return EINA_FALSE;
index 29ba751..36606b9 100644 (file)
 #include "Ecore_X_Atoms.h"
 #include "Ecore_Input.h"
 
-static Eina_Bool      _ecore_x_fd_handler(void *data, Ecore_Fd_Handler *fd_handler);
-static Eina_Bool      _ecore_x_fd_handler_buf(void             *data,
-                                              Ecore_Fd_Handler *fd_handler);
-static int            _ecore_x_key_mask_get(KeySym sym);
-static int            _ecore_x_event_modifier(unsigned int state);
+static Eina_Bool _ecore_x_fd_handler(void             *data,
+                                     Ecore_Fd_Handler *fd_handler);
+static Eina_Bool _ecore_x_fd_handler_buf(void             *data,
+                                         Ecore_Fd_Handler *fd_handler);
+static int       _ecore_x_key_mask_get(KeySym sym);
+static int       _ecore_x_event_modifier(unsigned int state);
 
 static Ecore_Fd_Handler *_ecore_x_fd_handler_handle = NULL;
 
@@ -127,8 +128,10 @@ EAPI int ECORE_X_LOCK_SHIFT = 0;
 
 #ifdef LOGRT
 static double t0 = 0.0;
-static Status (*_logrt_real_reply)(Display *disp, void *rep, int extra,
-                                   Bool discard) = NULL;
+static Status (*_logrt_real_reply)(Display *disp,
+                                   void    *rep,
+                                   int      extra,
+                                   Bool     discard) = NULL;
 static void
 _logrt_init(void)
 {
@@ -136,20 +139,23 @@ _logrt_init(void)
 
    lib = dlopen("libX11.so", RTLD_GLOBAL | RTLD_LAZY);
    if (!lib)
-      lib = dlopen("libX11.so.6", RTLD_GLOBAL | RTLD_LAZY);
+     lib = dlopen("libX11.so.6", RTLD_GLOBAL | RTLD_LAZY);
 
    if (!lib)
-      lib = dlopen("libX11.so.6.3", RTLD_GLOBAL | RTLD_LAZY);
+     lib = dlopen("libX11.so.6.3", RTLD_GLOBAL | RTLD_LAZY);
 
    if (!lib)
-      lib = dlopen("libX11.so.6.3.0", RTLD_GLOBAL | RTLD_LAZY);
+     lib = dlopen("libX11.so.6.3.0", RTLD_GLOBAL | RTLD_LAZY);
 
    _logrt_real_reply = dlsym(lib, "_XReply");
    t0 = ecore_time_get();
 } /* _logrt_init */
 
 Status
-_XReply(Display *disp, void *rep, int extra, Bool discard)
+_XReply(Display *disp,
+        void    *rep,
+        int      extra,
+        Bool     discard)
 {
    void *bt[128];
    int i, n;
@@ -177,13 +183,13 @@ _XReply(Display *disp, void *rep, int extra, Bool discard)
                             printf("%s", tsym);
                          }
                        else
-                          printf("???");
+                         printf("???");
                     }
                   else
-                     printf("???");
+                    printf("???");
 
                   if (i > 1)
-                     printf(" > ");
+                    printf(" > ");
                }
              printf("\n");
           }
@@ -199,35 +205,35 @@ void
 _ecore_x_modifiers_get(void)
 {
    /* everything has these... unless its like a pda... :) */
-   ECORE_X_MODIFIER_SHIFT = _ecore_x_key_mask_get(XK_Shift_L);
-   ECORE_X_MODIFIER_CTRL = _ecore_x_key_mask_get(XK_Control_L);
+    ECORE_X_MODIFIER_SHIFT = _ecore_x_key_mask_get(XK_Shift_L);
+    ECORE_X_MODIFIER_CTRL = _ecore_x_key_mask_get(XK_Control_L);
 
-   /* apple's xdarwin has no alt!!!! */
-   ECORE_X_MODIFIER_ALT = _ecore_x_key_mask_get(XK_Alt_L);
-   if (!ECORE_X_MODIFIER_ALT)
+    /* apple's xdarwin has no alt!!!! */
+    ECORE_X_MODIFIER_ALT = _ecore_x_key_mask_get(XK_Alt_L);
+    if (!ECORE_X_MODIFIER_ALT)
       ECORE_X_MODIFIER_ALT = _ecore_x_key_mask_get(XK_Meta_L);
-   
-   if (!ECORE_X_MODIFIER_ALT)
+
+    if (!ECORE_X_MODIFIER_ALT)
       ECORE_X_MODIFIER_ALT = _ecore_x_key_mask_get(XK_Super_L);
-   
-   /* the windows key... a valid modifier :) */
-   ECORE_X_MODIFIER_WIN = _ecore_x_key_mask_get(XK_Super_L);
-   if (!ECORE_X_MODIFIER_WIN)
+
+    /* the windows key... a valid modifier :) */
+    ECORE_X_MODIFIER_WIN = _ecore_x_key_mask_get(XK_Super_L);
+    if (!ECORE_X_MODIFIER_WIN)
       ECORE_X_MODIFIER_WIN = _ecore_x_key_mask_get(XK_Mode_switch);
 
-   if (!ECORE_X_MODIFIER_WIN)
+    if (!ECORE_X_MODIFIER_WIN)
       ECORE_X_MODIFIER_WIN = _ecore_x_key_mask_get(XK_Meta_L);
 
-   if (ECORE_X_MODIFIER_WIN == ECORE_X_MODIFIER_ALT)
+    if (ECORE_X_MODIFIER_WIN == ECORE_X_MODIFIER_ALT)
       ECORE_X_MODIFIER_WIN = 0;
 
-   if (ECORE_X_MODIFIER_ALT == ECORE_X_MODIFIER_CTRL)
+    if (ECORE_X_MODIFIER_ALT == ECORE_X_MODIFIER_CTRL)
       ECORE_X_MODIFIER_ALT = 0;
 
-   ECORE_X_LOCK_SCROLL = _ecore_x_key_mask_get(XK_Scroll_Lock);
-   ECORE_X_LOCK_NUM = _ecore_x_key_mask_get(XK_Num_Lock);
-   ECORE_X_LOCK_CAPS = _ecore_x_key_mask_get(XK_Caps_Lock);
-   ECORE_X_LOCK_SHIFT = _ecore_x_key_mask_get(XK_Shift_Lock);
+    ECORE_X_LOCK_SCROLL = _ecore_x_key_mask_get(XK_Scroll_Lock);
+    ECORE_X_LOCK_NUM = _ecore_x_key_mask_get(XK_Num_Lock);
+    ECORE_X_LOCK_CAPS = _ecore_x_key_mask_get(XK_Caps_Lock);
+    ECORE_X_LOCK_SHIFT = _ecore_x_key_mask_get(XK_Shift_Lock);
 }
 
 /**
@@ -270,7 +276,7 @@ ecore_x_init(const char *name)
 #endif /* ifdef ECORE_XDAMAGE */
 
    if (++_ecore_x_init_count != 1)
-      return _ecore_x_init_count;
+     return _ecore_x_init_count;
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
 #ifdef LOGRT
@@ -279,44 +285,44 @@ ecore_x_init(const char *name)
 
    eina_init();
    _ecore_xlib_log_dom = eina_log_domain_register
-     ("ecore_x", ECORE_XLIB_DEFAULT_LOG_COLOR);
+       ("ecore_x", ECORE_XLIB_DEFAULT_LOG_COLOR);
    if(_ecore_xlib_log_dom < 0)
      {
         EINA_LOG_ERR(
-           "Impossible to create a log domain for the Ecore Xlib module.");
+          "Impossible to create a log domain for the Ecore Xlib module.");
         return --_ecore_x_init_count;
      }
 
    if (!ecore_init())
-      goto shutdown_eina;
+     goto shutdown_eina;
    if (!ecore_event_init())
-      goto shutdown_ecore;
+     goto shutdown_ecore;
 
 #ifdef EVAS_FRAME_QUEUING
    XInitThreads();
 #endif /* ifdef EVAS_FRAME_QUEUING */
    _ecore_x_disp = XOpenDisplay((char *)name);
    if (!_ecore_x_disp)
-      goto shutdown_ecore_event;
+     goto shutdown_ecore_event;
 
    _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)
+#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;
+     _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;
+     _ecore_x_event_screensaver_id = screensaver_base;
 
    ECORE_X_EVENT_HANDLERS_GROW(screensaver_base, ScreenSaverNumberEvents);
 #endif /* ifdef ECORE_XSS */
@@ -327,35 +333,35 @@ ecore_x_init(const char *name)
 
         _ecore_x_event_sync_id = sync_base;
         if (!XSyncInitialize(_ecore_x_disp, &major, &minor))
-           _ecore_x_event_sync_id = 0;
+          _ecore_x_event_sync_id = 0;
      }
 
    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;
+     _ecore_x_event_randr_id = randr_base;
 
    ECORE_X_EVENT_HANDLERS_GROW(randr_base, RRNumberEvents);
 #endif /* ifdef ECORE_XRANDR */
 
 #ifdef ECORE_XFIXES
    if (XFixesQueryExtension(_ecore_x_disp, &fixes_base, &fixes_err_base))
-      _ecore_x_event_fixes_selection_id = fixes_base;
+     _ecore_x_event_fixes_selection_id = fixes_base;
 
    ECORE_X_EVENT_HANDLERS_GROW(fixes_base, XFixesNumberEvents);
 #endif /* ifdef ECORE_XFIXES */
 
 #ifdef ECORE_XDAMAGE
    if (XDamageQueryExtension(_ecore_x_disp, &damage_base, &damage_err_base))
-      _ecore_x_event_damage_id = damage_base;
+     _ecore_x_event_damage_id = damage_base;
 
    ECORE_X_EVENT_HANDLERS_GROW(damage_base, XDamageNumberEvents);
 #endif /* ifdef ECORE_XDAMAGE */
 
    _ecore_x_event_handlers = calloc(_ecore_x_event_handlers_num, sizeof(void *));
    if (!_ecore_x_event_handlers)
-      goto close_display;
+     goto close_display;
 
 #ifdef ECORE_XCURSOR
    _ecore_x_xcursor = XcursorSupportsARGB(_ecore_x_disp) ? EINA_TRUE : EINA_FALSE;
@@ -365,7 +371,7 @@ ecore_x_init(const char *name)
    _ecore_x_event_handlers[KeyRelease] = _ecore_x_event_handle_key_release;
    _ecore_x_event_handlers[ButtonPress] = _ecore_x_event_handle_button_press;
    _ecore_x_event_handlers[ButtonRelease] =
-      _ecore_x_event_handle_button_release;
+     _ecore_x_event_handle_button_release;
    _ecore_x_event_handlers[MotionNotify] = _ecore_x_event_handle_motion_notify;
    _ecore_x_event_handlers[EnterNotify] = _ecore_x_event_handle_enter_notify;
    _ecore_x_event_handlers[LeaveNotify] = _ecore_x_event_handle_leave_notify;
@@ -374,61 +380,61 @@ ecore_x_init(const char *name)
    _ecore_x_event_handlers[KeymapNotify] = _ecore_x_event_handle_keymap_notify;
    _ecore_x_event_handlers[Expose] = _ecore_x_event_handle_expose;
    _ecore_x_event_handlers[GraphicsExpose] =
-      _ecore_x_event_handle_graphics_expose;
+     _ecore_x_event_handle_graphics_expose;
    _ecore_x_event_handlers[VisibilityNotify] =
-      _ecore_x_event_handle_visibility_notify;
+     _ecore_x_event_handle_visibility_notify;
    _ecore_x_event_handlers[CreateNotify] = _ecore_x_event_handle_create_notify;
    _ecore_x_event_handlers[DestroyNotify] =
-      _ecore_x_event_handle_destroy_notify;
+     _ecore_x_event_handle_destroy_notify;
    _ecore_x_event_handlers[UnmapNotify] = _ecore_x_event_handle_unmap_notify;
    _ecore_x_event_handlers[MapNotify] = _ecore_x_event_handle_map_notify;
    _ecore_x_event_handlers[MapRequest] = _ecore_x_event_handle_map_request;
    _ecore_x_event_handlers[ReparentNotify] =
-      _ecore_x_event_handle_reparent_notify;
+     _ecore_x_event_handle_reparent_notify;
    _ecore_x_event_handlers[ConfigureNotify] =
-      _ecore_x_event_handle_configure_notify;
+     _ecore_x_event_handle_configure_notify;
    _ecore_x_event_handlers[ConfigureRequest] =
-      _ecore_x_event_handle_configure_request;
+     _ecore_x_event_handle_configure_request;
    _ecore_x_event_handlers[GravityNotify] =
-      _ecore_x_event_handle_gravity_notify;
+     _ecore_x_event_handle_gravity_notify;
    _ecore_x_event_handlers[ResizeRequest] =
-      _ecore_x_event_handle_resize_request;
+     _ecore_x_event_handle_resize_request;
    _ecore_x_event_handlers[CirculateNotify] =
-      _ecore_x_event_handle_circulate_notify;
+     _ecore_x_event_handle_circulate_notify;
    _ecore_x_event_handlers[CirculateRequest] =
-      _ecore_x_event_handle_circulate_request;
+     _ecore_x_event_handle_circulate_request;
    _ecore_x_event_handlers[PropertyNotify] =
-      _ecore_x_event_handle_property_notify;
+     _ecore_x_event_handle_property_notify;
    _ecore_x_event_handlers[SelectionClear] =
-      _ecore_x_event_handle_selection_clear;
+     _ecore_x_event_handle_selection_clear;
    _ecore_x_event_handlers[SelectionRequest] =
-      _ecore_x_event_handle_selection_request;
+     _ecore_x_event_handle_selection_request;
    _ecore_x_event_handlers[SelectionNotify] =
-      _ecore_x_event_handle_selection_notify;
+     _ecore_x_event_handle_selection_notify;
    _ecore_x_event_handlers[ColormapNotify] =
-      _ecore_x_event_handle_colormap_notify;
+     _ecore_x_event_handle_colormap_notify;
    _ecore_x_event_handlers[ClientMessage] =
-      _ecore_x_event_handle_client_message;
+     _ecore_x_event_handle_client_message;
    _ecore_x_event_handlers[MappingNotify] =
-      _ecore_x_event_handle_mapping_notify;
+     _ecore_x_event_handle_mapping_notify;
 #ifdef GenericEvent
    _ecore_x_event_handlers[GenericEvent] = _ecore_x_event_handle_generic_event;
 #endif /* ifdef GenericEvent */
 
    if (_ecore_x_event_shape_id)
-      _ecore_x_event_handlers[_ecore_x_event_shape_id] =
-         _ecore_x_event_handle_shape_change;
+     _ecore_x_event_handlers[_ecore_x_event_shape_id] =
+       _ecore_x_event_handle_shape_change;
 
    if (_ecore_x_event_screensaver_id)
-      _ecore_x_event_handlers[_ecore_x_event_screensaver_id] =
-         _ecore_x_event_handle_screensaver_notify;
+     _ecore_x_event_handlers[_ecore_x_event_screensaver_id] =
+       _ecore_x_event_handle_screensaver_notify;
 
    if (_ecore_x_event_sync_id)
      {
         _ecore_x_event_handlers[_ecore_x_event_sync_id + XSyncCounterNotify] =
-           _ecore_x_event_handle_sync_counter;
+          _ecore_x_event_handle_sync_counter;
         _ecore_x_event_handlers[_ecore_x_event_sync_id + XSyncAlarmNotify] =
-           _ecore_x_event_handle_sync_alarm;
+          _ecore_x_event_handle_sync_alarm;
      }
 
 #ifdef ECORE_XRANDR
@@ -436,7 +442,7 @@ ecore_x_init(const char *name)
      {
         _ecore_x_event_handlers[_ecore_x_event_randr_id +
                                 RRScreenChangeNotify] =
-           _ecore_x_event_handle_randr_change;
+          _ecore_x_event_handle_randr_change;
         _ecore_x_event_handlers[_ecore_x_event_randr_id +
                                 RRNotify] = _ecore_x_event_handle_randr_notify;
      }
@@ -444,14 +450,14 @@ ecore_x_init(const char *name)
 #endif /* ifdef ECORE_XRANDR */
 #ifdef ECORE_XFIXES
    if (_ecore_x_event_fixes_selection_id)
-      _ecore_x_event_handlers[_ecore_x_event_fixes_selection_id] =
-         _ecore_x_event_handle_fixes_selection_notify;
+     _ecore_x_event_handlers[_ecore_x_event_fixes_selection_id] =
+       _ecore_x_event_handle_fixes_selection_notify;
 
 #endif /* ifdef ECORE_XFIXES */
 #ifdef ECORE_XDAMAGE
    if (_ecore_x_event_damage_id)
-      _ecore_x_event_handlers[_ecore_x_event_damage_id] =
-         _ecore_x_event_handle_damage_notify;
+     _ecore_x_event_handlers[_ecore_x_event_damage_id] =
+       _ecore_x_event_handle_damage_notify;
 
 #endif /* ifdef ECORE_XDAMAGE */
 #ifdef ECORE_XKB
@@ -525,12 +531,12 @@ ecore_x_init(const char *name)
    _ecore_x_modifiers_get();
 
    _ecore_x_fd_handler_handle =
-      ecore_main_fd_handler_add(ConnectionNumber(_ecore_x_disp),
-                                ECORE_FD_READ,
-                                _ecore_x_fd_handler, _ecore_x_disp,
-                                _ecore_x_fd_handler_buf, _ecore_x_disp);
+     ecore_main_fd_handler_add(ConnectionNumber(_ecore_x_disp),
+                               ECORE_FD_READ,
+                               _ecore_x_fd_handler, _ecore_x_disp,
+                               _ecore_x_fd_handler_buf, _ecore_x_disp);
    if (!_ecore_x_fd_handler_handle)
-      goto free_event_handlers;
+     goto free_event_handlers;
 
    _ecore_x_atoms_init();
 
@@ -546,13 +552,13 @@ ecore_x_init(const char *name)
    /* This is just to be anal about naming conventions */
 
    _ecore_x_atoms_wm_protocols[ECORE_X_WM_PROTOCOL_DELETE_REQUEST] =
-      ECORE_X_ATOM_WM_DELETE_WINDOW;
+     ECORE_X_ATOM_WM_DELETE_WINDOW;
    _ecore_x_atoms_wm_protocols[ECORE_X_WM_PROTOCOL_TAKE_FOCUS] =
-      ECORE_X_ATOM_WM_TAKE_FOCUS;
+     ECORE_X_ATOM_WM_TAKE_FOCUS;
    _ecore_x_atoms_wm_protocols[ECORE_X_NET_WM_PROTOCOL_PING] =
-      ECORE_X_ATOM_NET_WM_PING;
+     ECORE_X_ATOM_NET_WM_PING;
    _ecore_x_atoms_wm_protocols[ECORE_X_NET_WM_PROTOCOL_SYNC_REQUEST] =
-      ECORE_X_ATOM_NET_WM_SYNC_REQUEST;
+     ECORE_X_ATOM_NET_WM_SYNC_REQUEST;
 
    _ecore_x_selection_data_init();
    _ecore_x_dnd_init();
@@ -591,21 +597,22 @@ static int
 _ecore_x_shutdown(int close_display)
 {
    if (--_ecore_x_init_count != 0)
-      return _ecore_x_init_count;
+     return _ecore_x_init_count;
 
    if (!_ecore_x_disp)
-      return _ecore_x_init_count;
+     return _ecore_x_init_count;
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
 
    ecore_main_fd_handler_del(_ecore_x_fd_handler_handle);
    if (close_display)
-      XCloseDisplay(_ecore_x_disp);
+     XCloseDisplay(_ecore_x_disp);
    else
      {
         close(ConnectionNumber(_ecore_x_disp));
         // FIXME: may have to clean up x display internal here
-        XFree(_ecore_x_disp);
+// getting segv here? hmmm. odd. disable
+//        XFree(_ecore_x_disp);
      }
 
    free(_ecore_x_event_handlers);
@@ -709,7 +716,9 @@ ecore_x_default_screen_get(void)
  * @since 1.1
  */
 EAPI void
-ecore_x_screen_size_get(const Ecore_X_Screen *screen, int *w, int *h)
+ecore_x_screen_size_get(const Ecore_X_Screen *screen,
+                        int                  *w,
+                        int                  *h)
 {
    Screen *s = (Screen *)screen;
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
@@ -722,14 +731,14 @@ ecore_x_screen_size_get(const Ecore_X_Screen *screen, int *w, int *h)
 
 /**
  * Retrieves the number of screens.
- * 
+ *
  * @return  The count of the number of screens.
  * @ingroup Ecore_X_Display_Attr_Group
  *
  * @since 1.1
  */
-EAPI int 
-ecore_x_screen_count_get(void) 
+EAPI int
+ecore_x_screen_count_get(void)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
 
@@ -738,28 +747,28 @@ ecore_x_screen_count_get(void)
 
 /**
  * Retrieves the index number of the given screen.
- * 
+ *
  * @return  The index number of the screen.
  * @ingroup Ecore_X_Display_Attr_Group
  *
  * @since 1.1
  */
-EAPI int 
-ecore_x_screen_index_get(const Ecore_X_Screen *screen) 
+EAPI int
+ecore_x_screen_index_get(const Ecore_X_Screen *screen)
 {
    return XScreenNumberOfScreen((Screen *)screen);
 }
 
 /**
  * Retrieves the screen based on index number.
- * 
+ *
  * @return  The Ecore_X_Screen at this index.
  * @ingroup Ecore_X_Display_Attr_Group
  *
  * @since 1.1
  */
 EAPI Ecore_X_Screen *
-ecore_x_screen_get(int idx) 
+ecore_x_screen_get(int idx)
 {
    return XScreenOfDisplay(_ecore_x_disp, idx);
 }
@@ -778,7 +787,7 @@ EAPI void
 ecore_x_double_click_time_set(double t)
 {
    if (t < 0.0)
-      t = 0.0;
+     t = 0.0;
 
    _ecore_x_double_click_time = t;
 } /* ecore_x_double_click_time_set */
@@ -903,7 +912,7 @@ ecore_x_dpi_get(void)
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    s = DefaultScreenOfDisplay(_ecore_x_disp);
    if (s->mwidth <= 0)
-      return 75;
+     return 75;
 
    return (((s->width * 254) / s->mwidth) + 5) / 10;
 } /* ecore_x_dpi_get */
@@ -927,13 +936,14 @@ ecore_x_bell(int percent)
 
    ret = XBell(_ecore_x_disp, percent);
    if (ret == BadValue)
-      return EINA_FALSE;
+     return EINA_FALSE;
 
    return EINA_TRUE;
 } /* ecore_x_bell */
 
 static Eina_Bool
-_ecore_x_fd_handler(void *data, Ecore_Fd_Handler *fd_handler __UNUSED__)
+_ecore_x_fd_handler(void             *data,
+                    Ecore_Fd_Handler *fd_handler __UNUSED__)
 {
    Display *d;
 
@@ -947,30 +957,31 @@ _ecore_x_fd_handler(void *data, Ecore_Fd_Handler *fd_handler __UNUSED__)
 #ifdef ENABLE_XIM
         /* Filter event for XIM */
         if (XFilterEvent(&ev, ev.xkey.window))
-           continue;
+          continue;
 
 #endif /* ifdef ENABLE_XIM */
 
         if ((ev.type >= 0) && (ev.type < _ecore_x_event_handlers_num))
           {
              if (_ecore_x_event_handlers[AnyXEvent])
-                _ecore_x_event_handlers[AnyXEvent] (&ev);
+               _ecore_x_event_handlers[AnyXEvent] (&ev);
 
              if (_ecore_x_event_handlers[ev.type])
-                _ecore_x_event_handlers[ev.type] (&ev);
+               _ecore_x_event_handlers[ev.type] (&ev);
           }
      }
    return ECORE_CALLBACK_RENEW;
 } /* _ecore_x_fd_handler */
 
 static Eina_Bool
-_ecore_x_fd_handler_buf(void *data, Ecore_Fd_Handler *fd_handler __UNUSED__)
+_ecore_x_fd_handler_buf(void             *data,
+                        Ecore_Fd_Handler *fd_handler __UNUSED__)
 {
    Display *d;
 
    d = data;
    if (XPending(d))
-      return ECORE_CALLBACK_RENEW;
+     return ECORE_CALLBACK_RENEW;
 
    return ECORE_CALLBACK_CANCEL;
 } /* _ecore_x_fd_handler_buf */
@@ -989,31 +1000,31 @@ _ecore_x_key_mask_get(KeySym sym)
 
    mod = XGetModifierMapping(_ecore_x_disp);
    if ((mod) && (mod->max_keypermod > 0))
-      for (i = 0; i < (8 * mod->max_keypermod); i++)
-        {
-           for (j = 0; j < 8; j++)
-             {
-                sym2 = XKeycodeToKeysym(_ecore_x_disp, mod->modifiermap[i], j);
-                if (sym2 != 0)
-                   break;
-             }
-           if (sym2 == sym)
-             {
-                int mask;
-
-                mask = masks[i / mod->max_keypermod];
-                if (mod->modifiermap)
-                   XFree(mod->modifiermap);
-
-                XFree(mod);
-                return mask;
-             }
-        }
+     for (i = 0; i < (8 * mod->max_keypermod); i++)
+       {
+          for (j = 0; j < 8; j++)
+            {
+               sym2 = XKeycodeToKeysym(_ecore_x_disp, mod->modifiermap[i], j);
+               if (sym2 != 0)
+                 break;
+            }
+          if (sym2 == sym)
+            {
+               int mask;
+
+               mask = masks[i / mod->max_keypermod];
+               if (mod->modifiermap)
+                 XFree(mod->modifiermap);
+
+               XFree(mod);
+               return mask;
+            }
+       }
 
    if (mod)
      {
         if (mod->modifiermap)
-           XFree(mod->modifiermap);
+          XFree(mod->modifiermap);
 
         XFree(mod);
      }
@@ -1045,7 +1056,7 @@ ecore_x_window_root_list(int *num_ret)
 #endif /* ifdef ECORE_XPRINT */
 
    if (!num_ret)
-      return NULL;
+     return NULL;
 
    *num_ret = 0;
 
@@ -1068,7 +1079,7 @@ ecore_x_window_root_list(int *num_ret)
                   for (j = 0; j < psnum; j++)
                     {
                        if (ScreenOfDisplay(_ecore_x_disp, i) == ps[j])
-                          overlap++;
+                         overlap++;
                     }
                }
              roots = malloc((num - overlap) * sizeof(Window));
@@ -1105,33 +1116,33 @@ ecore_x_window_root_list(int *num_ret)
           {
              roots = malloc(num * sizeof(Window));
              if (!roots)
-                return NULL;
+               return NULL;
 
              *num_ret = num;
              for (i = 0; i < num; i++)
-                roots[i] = RootWindow(_ecore_x_disp, i);
+               roots[i] = RootWindow(_ecore_x_disp, i);
           }
      }
    else
      {
         roots = malloc(num * sizeof(Window));
         if (!roots)
-           return NULL;
+          return NULL;
 
         *num_ret = num;
         for (i = 0; i < num; i++)
-           roots[i] = RootWindow(_ecore_x_disp, i);
+          roots[i] = RootWindow(_ecore_x_disp, i);
      }
 
 #else /* ifdef ECORE_XPRINT */
    num = ScreenCount(_ecore_x_disp);
    roots = malloc(num * sizeof(Window));
    if (!roots)
-      return NULL;
+     return NULL;
 
    *num_ret = num;
    for (i = 0; i < num; i++)
-      roots[i] = RootWindow(_ecore_x_disp, i);
+     roots[i] = RootWindow(_ecore_x_disp, i);
 #endif /* ifdef ECORE_XPRINT */
    return roots;
 } /* ecore_x_window_root_list */
@@ -1158,7 +1169,7 @@ ecore_x_window_root_first_get(void)
  */
 } /* ecore_x_window_root_first_get */
 
-static void      _ecore_x_window_manage_error(void *data);
+static void _ecore_x_window_manage_error(void *data);
 
 static int _ecore_x_window_manage_failed = 0;
 static void
@@ -1166,7 +1177,7 @@ _ecore_x_window_manage_error(void *data __UNUSED__)
 {
    if ((ecore_x_error_request_get() == X_ChangeWindowAttributes) &&
        (ecore_x_error_code_get() == BadAccess))
-      _ecore_x_window_manage_failed = 1;
+     _ecore_x_window_manage_failed = 1;
 } /* _ecore_x_window_manage_error */
 
 EAPI Eina_Bool
@@ -1176,7 +1187,7 @@ ecore_x_window_manage(Ecore_X_Window win)
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    if (XGetWindowAttributes(_ecore_x_disp, win, &att) != True)
-      return EINA_FALSE;
+     return EINA_FALSE;
 
    ecore_x_sync();
    _ecore_x_window_manage_failed = 0;
@@ -1259,7 +1270,7 @@ ecore_x_window_attributes_get(Ecore_X_Window             win,
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    if (!XGetWindowAttributes(_ecore_x_disp, win, &att))
-      return EINA_FALSE;
+     return EINA_FALSE;
 
    memset(att_ret, 0, sizeof(Ecore_X_Window_Attributes));
    att_ret->root = att.root;
@@ -1270,19 +1281,19 @@ ecore_x_window_attributes_get(Ecore_X_Window             win,
    att_ret->border = att.border_width;
    att_ret->depth = att.depth;
    if (att.map_state != IsUnmapped)
-      att_ret->visible = 1;
+     att_ret->visible = 1;
 
    if (att.map_state == IsViewable)
-      att_ret->viewable = 1;
+     att_ret->viewable = 1;
 
    if (att.override_redirect)
-      att_ret->override = 1;
+     att_ret->override = 1;
 
    if (att.class == InputOnly)
-      att_ret->input_only = 1;
+     att_ret->input_only = 1;
 
    if (att.save_under)
-      att_ret->save_under = 1;
+     att_ret->save_under = 1;
 
    att_ret->event_mask.mine = att.your_event_mask;
    att_ret->event_mask.all = att.all_event_masks;
@@ -1309,7 +1320,8 @@ ecore_x_window_save_set_del(Ecore_X_Window win)
 } /* ecore_x_window_save_set_del */
 
 EAPI Ecore_X_Window *
-ecore_x_window_children_get(Ecore_X_Window win, int *num)
+ecore_x_window_children_get(Ecore_X_Window win,
+                            int           *num)
 {
    Ecore_X_Window *windows = NULL;
    Window root_ret = 0, parent_ret = 0, *children_ret = NULL;
@@ -1318,7 +1330,7 @@ ecore_x_window_children_get(Ecore_X_Window win, int *num)
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    if (!XQueryTree(_ecore_x_disp, win, &root_ret, &parent_ret, &children_ret,
                    &children_ret_num))
-      return NULL;
+     return NULL;
 
    if (children_ret)
      {
@@ -1328,7 +1340,7 @@ ecore_x_window_children_get(Ecore_X_Window win, int *num)
              unsigned int i;
 
              for (i = 0; i < children_ret_num; i++)
-                windows[i] = children_ret[i];
+               windows[i] = children_ret[i];
              *num = children_ret_num;
           }
 
@@ -1339,7 +1351,9 @@ ecore_x_window_children_get(Ecore_X_Window win, int *num)
 } /* ecore_x_window_children_get */
 
 EAPI Eina_Bool
-ecore_x_pointer_control_set(int accel_num, int accel_denom, int threshold)
+ecore_x_pointer_control_set(int accel_num,
+                            int accel_denom,
+                            int threshold)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    return XChangePointerControl(_ecore_x_disp, 1, 1,
@@ -1347,7 +1361,9 @@ ecore_x_pointer_control_set(int accel_num, int accel_denom, int threshold)
 } /* ecore_x_pointer_control_set */
 
 EAPI Eina_Bool
-ecore_x_pointer_control_get(int *accel_num, int *accel_denom, int *threshold)
+ecore_x_pointer_control_get(int *accel_num,
+                            int *accel_denom,
+                            int *threshold)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    return XGetPointerControl(_ecore_x_disp,
@@ -1355,14 +1371,16 @@ ecore_x_pointer_control_get(int *accel_num, int *accel_denom, int *threshold)
 } /* ecore_x_pointer_control_get */
 
 EAPI Eina_Bool
-ecore_x_pointer_mapping_set(unsigned char *map, int nmap)
+ecore_x_pointer_mapping_set(unsigned char *map,
+                            int            nmap)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    return XSetPointerMapping(_ecore_x_disp, map, nmap) ? EINA_TRUE : EINA_FALSE;
 } /* ecore_x_pointer_mapping_set */
 
 EAPI Eina_Bool
-ecore_x_pointer_mapping_get(unsigned char *map, int nmap)
+ecore_x_pointer_mapping_get(unsigned char *map,
+                            int            nmap)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    return XGetPointerMapping(_ecore_x_disp, map, nmap) ? EINA_TRUE : EINA_FALSE;
@@ -1377,7 +1395,7 @@ ecore_x_pointer_grab(Ecore_X_Window win)
                     EnterWindowMask | LeaveWindowMask | PointerMotionMask,
                     GrabModeAsync, GrabModeAsync,
                     None, None, CurrentTime) == GrabSuccess)
-      return EINA_TRUE;
+     return EINA_TRUE;
 
    return EINA_FALSE;
 } /* ecore_x_pointer_grab */
@@ -1391,7 +1409,7 @@ ecore_x_pointer_confine_grab(Ecore_X_Window win)
                     EnterWindowMask | LeaveWindowMask | PointerMotionMask,
                     GrabModeAsync, GrabModeAsync,
                     win, None, CurrentTime) == GrabSuccess)
-      return EINA_TRUE;
+     return EINA_TRUE;
 
    return EINA_FALSE;
 } /* ecore_x_pointer_confine_grab */
@@ -1404,7 +1422,9 @@ ecore_x_pointer_ungrab(void)
 } /* ecore_x_pointer_ungrab */
 
 EAPI Eina_Bool
-ecore_x_pointer_warp(Ecore_X_Window win, int x, int y)
+ecore_x_pointer_warp(Ecore_X_Window win,
+                     int            x,
+                     int            y)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    return XWarpPointer(_ecore_x_disp, None, win, 0, 0, 0, 0, x, y) ? EINA_TRUE : EINA_FALSE;
@@ -1417,7 +1437,7 @@ ecore_x_keyboard_grab(Ecore_X_Window win)
    if (XGrabKeyboard(_ecore_x_disp, win, False,
                      GrabModeAsync, GrabModeAsync,
                      CurrentTime) == GrabSuccess)
-      return EINA_TRUE;
+     return EINA_TRUE;
 
    return EINA_FALSE;
 } /* ecore_x_keyboard_grab */
@@ -1435,7 +1455,7 @@ ecore_x_grab(void)
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    _ecore_x_grab_count++;
    if (_ecore_x_grab_count == 1)
-      XGrabServer(_ecore_x_disp);
+     XGrabServer(_ecore_x_disp);
 } /* ecore_x_grab */
 
 EAPI void
@@ -1444,22 +1464,24 @@ ecore_x_ungrab(void)
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    _ecore_x_grab_count--;
    if (_ecore_x_grab_count < 0)
-      _ecore_x_grab_count = 0;
+     _ecore_x_grab_count = 0;
 
    if (_ecore_x_grab_count == 0)
-      XUngrabServer(_ecore_x_disp);
+     XUngrabServer(_ecore_x_disp);
 } /* ecore_x_ungrab */
 
 int _ecore_window_grabs_num = 0;
 Window *_ecore_window_grabs = NULL;
-Eina_Bool (*_ecore_window_grab_replay_func)(void *data, int event_type,
+Eina_Bool (*_ecore_window_grab_replay_func)(void *data,
+                                            int   event_type,
                                             void *event);
 void *_ecore_window_grab_replay_data;
 
 EAPI void
-ecore_x_passive_grab_replay_func_set(Eina_Bool (*func)(void *data,
-                                                       int event_type,
-                                                       void *event), void *data)
+ecore_x_passive_grab_replay_func_set(Eina_Bool                             (*func)(void *data,
+                                                                     int   event_type,
+                                                                     void *event),
+                                     void                                 *data)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    _ecore_window_grab_replay_func = func;
@@ -1467,9 +1489,11 @@ ecore_x_passive_grab_replay_func_set(Eina_Bool (*func)(void *data,
 } /* ecore_x_passive_grab_replay_func_set */
 
 EAPI void
-ecore_x_window_button_grab(Ecore_X_Window win, int button,
+ecore_x_window_button_grab(Ecore_X_Window     win,
+                           int                button,
                            Ecore_X_Event_Mask event_mask,
-                           int mod, int any_mod)
+                           int                mod,
+                           int                any_mod)
 {
    unsigned int b;
    unsigned int m;
@@ -1480,11 +1504,11 @@ ecore_x_window_button_grab(Ecore_X_Window win, int button,
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    b = button;
    if (b == 0)
-      b = AnyButton;
+     b = AnyButton;
 
    m = _ecore_x_event_modifier(mod);
    if (any_mod)
-      m = AnyModifier;
+     m = AnyModifier;
 
    locks[0] = 0;
    locks[1] = ECORE_X_LOCK_CAPS;
@@ -1496,8 +1520,8 @@ ecore_x_window_button_grab(Ecore_X_Window win, int button,
    locks[7] = ECORE_X_LOCK_CAPS | ECORE_X_LOCK_NUM | ECORE_X_LOCK_SCROLL;
    ev = event_mask;
    for (i = 0; i < 8; i++)
-      XGrabButton(_ecore_x_disp, b, m | locks[i],
-                  win, False, ev, GrabModeSync, GrabModeAsync, None, None);
+     XGrabButton(_ecore_x_disp, b, m | locks[i],
+                 win, False, ev, GrabModeSync, GrabModeAsync, None, None);
    _ecore_window_grabs_num++;
    t = realloc(_ecore_window_grabs,
                _ecore_window_grabs_num * sizeof(Window));
@@ -1507,7 +1531,8 @@ ecore_x_window_button_grab(Ecore_X_Window win, int button,
 } /* ecore_x_window_button_grab */
 
 void
-_ecore_x_sync_magic_send(int val, Ecore_X_Window swin)
+_ecore_x_sync_magic_send(int            val,
+                         Ecore_X_Window swin)
 {
    XEvent xev;
 
@@ -1535,10 +1560,10 @@ _ecore_x_window_grab_remove(Ecore_X_Window win)
         for (i = 0; i < _ecore_window_grabs_num; i++)
           {
              if (shuffle)
-                _ecore_window_grabs[i - 1] = _ecore_window_grabs[i];
+               _ecore_window_grabs[i - 1] = _ecore_window_grabs[i];
 
              if ((!shuffle) && (_ecore_window_grabs[i] == win))
-                shuffle = 1;
+               shuffle = 1;
           }
         if (shuffle)
           {
@@ -1559,8 +1584,10 @@ _ecore_x_window_grab_remove(Ecore_X_Window win)
 } /* _ecore_x_window_grab_remove */
 
 EAPI void
-ecore_x_window_button_ungrab(Ecore_X_Window win, int button,
-                             int mod, int any_mod)
+ecore_x_window_button_ungrab(Ecore_X_Window win,
+                             int            button,
+                             int            mod,
+                             int            any_mod)
 {
    unsigned int b;
    unsigned int m;
@@ -1570,11 +1597,11 @@ ecore_x_window_button_ungrab(Ecore_X_Window win, int button,
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    b = button;
    if (b == 0)
-      b = AnyButton;
+     b = AnyButton;
 
    m = _ecore_x_event_modifier(mod);
    if (any_mod)
-      m = AnyModifier;
+     m = AnyModifier;
 
    locks[0] = 0;
    locks[1] = ECORE_X_LOCK_CAPS;
@@ -1585,7 +1612,7 @@ ecore_x_window_button_ungrab(Ecore_X_Window win, int button,
    locks[6] = ECORE_X_LOCK_NUM | ECORE_X_LOCK_SCROLL;
    locks[7] = ECORE_X_LOCK_CAPS | ECORE_X_LOCK_NUM | ECORE_X_LOCK_SCROLL;
    for (i = 0; i < 8; i++)
-      XUngrabButton(_ecore_x_disp, b, m | locks[i], win);
+     XUngrabButton(_ecore_x_disp, b, m | locks[i], win);
    _ecore_x_sync_magic_send(1, win);
 } /* ecore_x_window_button_ungrab */
 
@@ -1593,8 +1620,10 @@ int _ecore_key_grabs_num = 0;
 Window *_ecore_key_grabs = NULL;
 
 EAPI void
-ecore_x_window_key_grab(Ecore_X_Window win, const char *key,
-                        int mod, int any_mod)
+ecore_x_window_key_grab(Ecore_X_Window win,
+                        const char    *key,
+                        int            mod,
+                        int            any_mod)
 {
    KeyCode keycode = 0;
    KeySym keysym;
@@ -1605,22 +1634,22 @@ ecore_x_window_key_grab(Ecore_X_Window win, const char *key,
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    if (!strncmp(key, "Keycode-", 8))
-      keycode = atoi(key + 8);
+     keycode = atoi(key + 8);
    else
      {
         keysym = XStringToKeysym(key);
         if (keysym == NoSymbol)
-           return;
+          return;
 
         keycode = XKeysymToKeycode(_ecore_x_disp, XStringToKeysym(key));
      }
 
    if (keycode == 0)
-      return;
+     return;
 
    m = _ecore_x_event_modifier(mod);
    if (any_mod)
-      m = AnyModifier;
+     m = AnyModifier;
 
    locks[0] = 0;
    locks[1] = ECORE_X_LOCK_CAPS;
@@ -1631,8 +1660,8 @@ ecore_x_window_key_grab(Ecore_X_Window win, const char *key,
    locks[6] = ECORE_X_LOCK_NUM | ECORE_X_LOCK_SCROLL;
    locks[7] = ECORE_X_LOCK_CAPS | ECORE_X_LOCK_NUM | ECORE_X_LOCK_SCROLL;
    for (i = 0; i < 8; i++)
-      XGrabKey(_ecore_x_disp, keycode, m | locks[i],
-               win, False, GrabModeSync, GrabModeAsync);
+     XGrabKey(_ecore_x_disp, keycode, m | locks[i],
+              win, False, GrabModeSync, GrabModeAsync);
    _ecore_key_grabs_num++;
    t = realloc(_ecore_key_grabs,
                _ecore_key_grabs_num * sizeof(Window));
@@ -1652,10 +1681,10 @@ _ecore_x_key_grab_remove(Ecore_X_Window win)
         for (i = 0; i < _ecore_key_grabs_num; i++)
           {
              if (shuffle)
-                _ecore_key_grabs[i - 1] = _ecore_key_grabs[i];
+               _ecore_key_grabs[i - 1] = _ecore_key_grabs[i];
 
              if ((!shuffle) && (_ecore_key_grabs[i] == win))
-                shuffle = 1;
+               shuffle = 1;
           }
         if (shuffle)
           {
@@ -1675,8 +1704,10 @@ _ecore_x_key_grab_remove(Ecore_X_Window win)
 } /* _ecore_x_key_grab_remove */
 
 EAPI void
-ecore_x_window_key_ungrab(Ecore_X_Window win, const char *key,
-                          int mod, int any_mod)
+ecore_x_window_key_ungrab(Ecore_X_Window win,
+                          const char    *key,
+                          int            mod,
+                          int            any_mod)
 {
    KeyCode keycode = 0;
    KeySym keysym;
@@ -1686,22 +1717,22 @@ ecore_x_window_key_ungrab(Ecore_X_Window win, const char *key,
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    if (!strncmp(key, "Keycode-", 8))
-      keycode = atoi(key + 8);
+     keycode = atoi(key + 8);
    else
      {
         keysym = XStringToKeysym(key);
         if (keysym == NoSymbol)
-           return;
+          return;
 
         keycode = XKeysymToKeycode(_ecore_x_disp, XStringToKeysym(key));
      }
 
    if (keycode == 0)
-      return;
+     return;
 
    m = _ecore_x_event_modifier(mod);
    if (any_mod)
-      m = AnyModifier;
+     m = AnyModifier;
 
    locks[0] = 0;
    locks[1] = ECORE_X_LOCK_CAPS;
@@ -1712,7 +1743,7 @@ ecore_x_window_key_ungrab(Ecore_X_Window win, const char *key,
    locks[6] = ECORE_X_LOCK_NUM | ECORE_X_LOCK_SCROLL;
    locks[7] = ECORE_X_LOCK_CAPS | ECORE_X_LOCK_NUM | ECORE_X_LOCK_SCROLL;
    for (i = 0; i < 8; i++)
-      XUngrabKey(_ecore_x_disp, keycode, m | locks[i], win);
+     XUngrabKey(_ecore_x_disp, keycode, m | locks[i], win);
    _ecore_x_sync_magic_send(2, win);
 } /* ecore_x_window_key_ungrab */
 
@@ -1730,9 +1761,14 @@ ecore_x_window_key_ungrab(Ecore_X_Window win, const char *key,
  * @return EINA_TRUE on success EINA_FALSE otherwise.
  */
 EAPI Eina_Bool
-ecore_x_client_message32_send(Ecore_X_Window win, Ecore_X_Atom type,
+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)
+                              long               d0,
+                              long               d1,
+                              long               d2,
+                              long               d3,
+                              long               d4)
 {
    XEvent xev;
 
@@ -1761,8 +1797,10 @@ ecore_x_client_message32_send(Ecore_X_Window win, Ecore_X_Atom type,
  * @return EINA_TRUE on success EINA_FALSE otherwise.
  */
 EAPI Eina_Bool
-ecore_x_client_message8_send(Ecore_X_Window win, Ecore_X_Atom type,
-                             const void *data, int len)
+ecore_x_client_message8_send(Ecore_X_Window win,
+                             Ecore_X_Atom   type,
+                             const void    *data,
+                             int            len)
 {
    XEvent xev;
 
@@ -1772,7 +1810,7 @@ ecore_x_client_message8_send(Ecore_X_Window win, Ecore_X_Atom type,
    xev.xclient.message_type = type;
    xev.xclient.format = 8;
    if (len > 20)
-      len = 20;
+     len = 20;
 
    memcpy(xev.xclient.data.b, data, len);
    memset(xev.xclient.data.b + len, 0, 20 - len);
@@ -1781,7 +1819,9 @@ ecore_x_client_message8_send(Ecore_X_Window win, Ecore_X_Atom type,
 } /* ecore_x_client_message8_send */
 
 EAPI Eina_Bool
-ecore_x_mouse_move_send(Ecore_X_Window win, int x, int y)
+ecore_x_mouse_move_send(Ecore_X_Window win,
+                        int            x,
+                        int            y)
 {
    XEvent xev;
    XWindowAttributes att;
@@ -1807,7 +1847,10 @@ ecore_x_mouse_move_send(Ecore_X_Window win, int x, int y)
 } /* ecore_x_mouse_move_send */
 
 EAPI Eina_Bool
-ecore_x_mouse_down_send(Ecore_X_Window win, int x, int y, int b)
+ecore_x_mouse_down_send(Ecore_X_Window win,
+                        int            x,
+                        int            y,
+                        int            b)
 {
    XEvent xev;
    XWindowAttributes att;
@@ -1833,7 +1876,10 @@ ecore_x_mouse_down_send(Ecore_X_Window win, int x, int y, int b)
 } /* ecore_x_mouse_down_send */
 
 EAPI Eina_Bool
-ecore_x_mouse_up_send(Ecore_X_Window win, int x, int y, int b)
+ecore_x_mouse_up_send(Ecore_X_Window win,
+                      int            x,
+                      int            y,
+                      int            b)
 {
    XEvent xev;
    XWindowAttributes att;
@@ -1873,7 +1919,8 @@ ecore_x_events_allow_all(void)
 } /* ecore_x_events_allow_all */
 
 EAPI void
-ecore_x_pointer_last_xy_get(int *x, int *y)
+ecore_x_pointer_last_xy_get(int *x,
+                            int *y)
 {
    if (x)
      *x = _ecore_x_event_last_root_x;
@@ -1883,14 +1930,16 @@ ecore_x_pointer_last_xy_get(int *x, int *y)
 } /* ecore_x_pointer_last_xy_get */
 
 EAPI void
-ecore_x_pointer_xy_get(Ecore_X_Window win, int *x, int *y)
+ecore_x_pointer_xy_get(Ecore_X_Window win,
+                       int           *x,
+                       int           *y)
 {
    Window rwin, cwin;
    int rx, ry, wx, wy, ret;
    unsigned int mask;
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
-   ret = XQueryPointer(_ecore_x_disp, win, &rwin, &cwin, 
+   ret = XQueryPointer(_ecore_x_disp, win, &rwin, &cwin,
                        &rx, &ry, &wx, &wy, &mask);
    if (!ret)
      wx = wy = -1;
@@ -1907,8 +1956,8 @@ ecore_x_pointer_xy_get(Ecore_X_Window win, int *x, int *y)
  * @return The visual id.
  * @since 1.1.0
  */
-EAPI unsigned int 
-ecore_x_visual_id_get(Ecore_X_Visual visual) 
+EAPI unsigned int
+ecore_x_visual_id_get(Ecore_X_Visual visual)
 {
    return XVisualIDFromVisual(visual);
 }
@@ -1922,8 +1971,9 @@ ecore_x_visual_id_get(Ecore_X_Visual visual)
  * @return The default visual.
  * @since 1.1.0
  */
-EAPI Ecore_X_Visual 
-ecore_x_default_visual_get(Ecore_X_Display *disp, Ecore_X_Screen *screen) 
+EAPI Ecore_X_Visual
+ecore_x_default_visual_get(Ecore_X_Display *disp,
+                           Ecore_X_Screen  *screen)
 {
    return DefaultVisual(disp, ecore_x_screen_index_get(screen));
 }
@@ -1937,8 +1987,9 @@ ecore_x_default_visual_get(Ecore_X_Display *disp, Ecore_X_Screen *screen)
  * @return The default colormap.
  * @since 1.1.0
  */
-EAPI Ecore_X_Colormap 
-ecore_x_default_colormap_get(Ecore_X_Display *disp, Ecore_X_Screen *screen) 
+EAPI Ecore_X_Colormap
+ecore_x_default_colormap_get(Ecore_X_Display *disp,
+                             Ecore_X_Screen  *screen)
 {
    return DefaultColormap(disp, ecore_x_screen_index_get(screen));
 }
@@ -1952,8 +2003,9 @@ ecore_x_default_colormap_get(Ecore_X_Display *disp, Ecore_X_Screen *screen)
  * @return The default depth.
  * @since 1.1.0
  */
-EAPI int 
-ecore_x_default_depth_get(Ecore_X_Display *disp, Ecore_X_Screen *screen) 
+EAPI int
+ecore_x_default_depth_get(Ecore_X_Display *disp,
+                          Ecore_X_Screen  *screen)
 {
    return DefaultDepth(disp, ecore_x_screen_index_get(screen));
 }
@@ -1968,28 +2020,28 @@ _ecore_x_event_modifier(unsigned int state)
    int xmodifiers = 0;
 
    if (state & ECORE_EVENT_MODIFIER_SHIFT)
-      xmodifiers |= ECORE_X_MODIFIER_SHIFT;
+     xmodifiers |= ECORE_X_MODIFIER_SHIFT;
 
    if (state & ECORE_EVENT_MODIFIER_CTRL)
-      xmodifiers |= ECORE_X_MODIFIER_CTRL;
+     xmodifiers |= ECORE_X_MODIFIER_CTRL;
 
    if (state & ECORE_EVENT_MODIFIER_ALT)
-      xmodifiers |= ECORE_X_MODIFIER_ALT;
+     xmodifiers |= ECORE_X_MODIFIER_ALT;
 
    if (state & ECORE_EVENT_MODIFIER_WIN)
-      xmodifiers |= ECORE_X_MODIFIER_WIN;
+     xmodifiers |= ECORE_X_MODIFIER_WIN;
 
    if (state & ECORE_EVENT_LOCK_SCROLL)
-      xmodifiers |= ECORE_X_LOCK_SCROLL;
+     xmodifiers |= ECORE_X_LOCK_SCROLL;
 
    if (state & ECORE_EVENT_LOCK_NUM)
-      xmodifiers |= ECORE_X_LOCK_NUM;
+     xmodifiers |= ECORE_X_LOCK_NUM;
 
    if (state & ECORE_EVENT_LOCK_CAPS)
-      xmodifiers |= ECORE_X_LOCK_CAPS;
+     xmodifiers |= ECORE_X_LOCK_CAPS;
 
    if (state & ECORE_EVENT_LOCK_SHIFT)
-      xmodifiers |= ECORE_X_LOCK_SHIFT;
+     xmodifiers |= ECORE_X_LOCK_SHIFT;
 
    return xmodifiers;
 } /* _ecore_x_event_modifier */
index 281d706..9c504e3 100644 (file)
@@ -16,7 +16,7 @@
 # ifdef  __cplusplus
 extern "C"
 # endif /* ifdef  __cplusplus */
-void *    alloca (size_t);
+void *alloca(size_t);
 #endif /* ifdef HAVE_ALLOCA_H */
 
 #include <string.h>
@@ -281,7 +281,10 @@ _ecore_x_atoms_init(void)
       { "_E_COMP_FLUSH", &ECORE_X_ATOM_E_COMP_FLUSH },
       { "_E_COMP_DUMP", &ECORE_X_ATOM_E_COMP_DUMP },
       { "_E_COMP_PIXMAP", &ECORE_X_ATOM_E_COMP_PIXMAP },
-     
+      { "_E_VIDEO_PARENT", &ECORE_X_ATOM_E_VIDEO_PARENT },
+      { "_E_VIDEO_POSITION", &ECORE_X_ATOM_E_VIDEO_POSITION }
+
+      /* SLP additions after the comma */ ,
       { "_E_USER_CREATED_WINDOW", &ECORE_X_ATOM_E_USER_CREATED_WINDOW },
       { "_E_PARENT_BORDER_WINDOW", &ECORE_X_ATOM_E_PARENT_BORDER_WINDOW },
       { "_E_COMP_DRI_BUFF_FLIP_SUPPORTED", &ECORE_X_ATOM_E_COMP_DRI_BUFF_FLIP_SUPPORTED },
@@ -292,7 +295,7 @@ _ecore_x_atoms_init(void)
       { "_E_ILLUME_ROTATE_OPERATOR", & ECORE_X_ATOM_E_ILLUME_ROTATE_OPERATOR },
       { "_E_ILLUME_ROTATE_ROOT_ANGLE", & ECORE_X_ATOM_E_ILLUME_ROTATE_ROOT_ANGLE },
 
-      /* added by doyoun.kang - for user created window */ 
+      /* added by doyoun.kang - for user created window */
       { "_ECORE_X_USER_CREATED_WINDOW", & ECORE_X_ATOM_USER_CREATED_WINDOW },
 
       /* added by gl77.lee - XID that points to the parent border window */
@@ -330,26 +333,28 @@ EAPI Ecore_X_Atom
 ecore_x_atom_get(const char *name)
 {
    if (!_ecore_x_disp)
-      return 0;
+     return 0;
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    return XInternAtom(_ecore_x_disp, name, False);
 } /* ecore_x_atom_get */
 
 EAPI void
-ecore_x_atoms_get(const char **names, int num, Ecore_X_Atom *atoms)
+ecore_x_atoms_get(const char  **names,
+                  int           num,
+                  Ecore_X_Atom *atoms)
 {
    Atom *atoms_int;
    int i;
 
    if (!_ecore_x_disp)
-      return;
+     return;
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    atoms_int = alloca(num * sizeof(Atom));
    XInternAtoms(_ecore_x_disp, (char **)names, num, False, atoms_int);
    for (i = 0; i < num; i++)
-      atoms[i] = atoms_int[i];
+     atoms[i] = atoms_int[i];
 } /* ecore_x_atoms_get */
 
 EAPI char *
@@ -359,13 +364,13 @@ ecore_x_atom_name_get(Ecore_X_Atom atom)
    char *xname;
 
    if (!_ecore_x_disp)
-      return NULL;
+     return NULL;
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
 
    xname = XGetAtomName(_ecore_x_disp, atom);
    if (!xname)
-      return NULL;
+     return NULL;
 
    name = strdup(xname);
    XFree(xname);
index 3e3d951..43153ff 100644 (file)
@@ -50,12 +50,12 @@ ecore_x_composite_redirect_window(Ecore_X_Window                win,
    switch(type)
      {
       case ECORE_X_COMPOSITE_UPDATE_AUTOMATIC:
-         update = CompositeRedirectAutomatic;
-         break;
+        update = CompositeRedirectAutomatic;
+        break;
 
       case ECORE_X_COMPOSITE_UPDATE_MANUAL:
-         update = CompositeRedirectManual;
-         break;
+        update = CompositeRedirectManual;
+        break;
      } /* switch */
    XCompositeRedirectWindow(_ecore_x_disp, win, update);
 #endif /* ifdef ECORE_XCOMPOSITE */
@@ -72,12 +72,12 @@ ecore_x_composite_redirect_subwindows(Ecore_X_Window                win,
    switch(type)
      {
       case ECORE_X_COMPOSITE_UPDATE_AUTOMATIC:
-         update = CompositeRedirectAutomatic;
-         break;
+        update = CompositeRedirectAutomatic;
+        break;
 
       case ECORE_X_COMPOSITE_UPDATE_MANUAL:
-         update = CompositeRedirectManual;
-         break;
+        update = CompositeRedirectManual;
+        break;
      } /* switch */
    XCompositeRedirectSubwindows(_ecore_x_disp, win, update);
 #endif /* ifdef ECORE_XCOMPOSITE */
@@ -94,12 +94,12 @@ ecore_x_composite_unredirect_window(Ecore_X_Window                win,
    switch(type)
      {
       case ECORE_X_COMPOSITE_UPDATE_AUTOMATIC:
-         update = CompositeRedirectAutomatic;
-         break;
+        update = CompositeRedirectAutomatic;
+        break;
 
       case ECORE_X_COMPOSITE_UPDATE_MANUAL:
-         update = CompositeRedirectManual;
-         break;
+        update = CompositeRedirectManual;
+        break;
      } /* switch */
    XCompositeUnredirectWindow(_ecore_x_disp, win, update);
 #endif /* ifdef ECORE_XCOMPOSITE */
@@ -116,12 +116,12 @@ ecore_x_composite_unredirect_subwindows(Ecore_X_Window                win,
    switch(type)
      {
       case ECORE_X_COMPOSITE_UPDATE_AUTOMATIC:
-         update = CompositeRedirectAutomatic;
-         break;
+        update = CompositeRedirectAutomatic;
+        break;
 
       case ECORE_X_COMPOSITE_UPDATE_MANUAL:
-         update = CompositeRedirectManual;
-         break;
+        update = CompositeRedirectManual;
+        break;
      } /* switch */
    XCompositeUnredirectSubwindows(_ecore_x_disp, win, update);
 #endif /* ifdef ECORE_XCOMPOSITE */
index d97b2f7..434505c 100644 (file)
@@ -43,7 +43,7 @@ ecore_x_cursor_new(Ecore_X_Window win,
 //               r = (((pixels[i] >> 16) & 0xff) * a) / 0xff;
 //               g = (((pixels[i] >> 8 ) & 0xff) * a) / 0xff;
 //               b = (((pixels[i]      ) & 0xff) * a) / 0xff;
-                  xci->pixels[i] = pixels[i];
+                              xci->pixels[i] = pixels[i];
 //                 (a << 24) | (r << 16) | (g << 8) | (b);
                }
              c = XcursorImageLoadCursor(_ecore_x_disp, xci);
@@ -127,23 +127,23 @@ ecore_x_cursor_new(Ecore_X_Window win,
                 g = (pix[0] >> 8) & 0xff;
                 b = (pix[0]) & 0xff;
                 d1 =
-                   ((r - fr) * (r - fr)) +
-                   ((g - fg) * (g - fg)) +
-                   ((b - fb) * (b - fb));
+                  ((r - fr) * (r - fr)) +
+                  ((g - fg) * (g - fg)) +
+                  ((b - fb) * (b - fb));
                 d2 =
-                   ((r - br) * (r - br)) +
-                   ((g - bg) * (g - bg)) +
-                   ((b - bb) * (b - bb));
+                  ((r - br) * (r - br)) +
+                  ((g - bg) * (g - bg)) +
+                  ((b - bb) * (b - bb));
                 if (d1 + d2)
                   {
                      v = (((d2 * 255) / (d1 + d2)) * 5) / 256;
                      if (v > dither[x & 0x1][y & 0x1])
-                        v = 1;
+                       v = 1;
                      else
-                        v = 0;
+                       v = 0;
                   }
                 else
-                   v = 0;
+                  v = 0;
 
                 XPutPixel(xim, x, y, v);
                 pix++;
@@ -162,9 +162,9 @@ ecore_x_cursor_new(Ecore_X_Window win,
 
                 v = (((pix[0] >> 24) & 0xff) * 5) / 256;
                 if (v > dither[x & 0x1][y & 0x1])
-                   v = 1;
+                  v = 1;
                 else
-                   v = 0;
+                  v = 0;
 
                 XPutPixel(xim, x, y, v);
                 pix++;
index 88d5f7d..5e44d07 100644 (file)
@@ -19,9 +19,9 @@ _ecore_x_damage_init(void)
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    if (XDamageQueryVersion(_ecore_x_disp, &_damage_major, &_damage_minor))
-      _damage_available = EINA_TRUE;
+     _damage_available = EINA_TRUE;
    else
-      _damage_available = EINA_FALSE;
+     _damage_available = EINA_FALSE;
 
 #else /* ifdef ECORE_XDAMAGE */
    _damage_available = EINA_FALSE;
@@ -35,7 +35,8 @@ ecore_x_damage_query(void)
 } /* ecore_x_damage_query */
 
 EAPI Ecore_X_Damage
-ecore_x_damage_new(Ecore_X_Drawable d, Ecore_X_Damage_Report_Level level)
+ecore_x_damage_new(Ecore_X_Drawable            d,
+                   Ecore_X_Damage_Report_Level level)
 {
 #ifdef ECORE_XDAMAGE
    Ecore_X_Damage damage;
index 67008cf..7908584 100644 (file)
@@ -28,7 +28,8 @@ typedef struct _Version_Cache_Item
 } Version_Cache_Item;
 static Version_Cache_Item *_version_cache = NULL;
 static int _version_cache_num = 0, _version_cache_alloc = 0;
-static void (*_posupdatecb)(void *, Ecore_X_Xdnd_Position *);
+static void (*_posupdatecb)(void *,
+                            Ecore_X_Xdnd_Position *);
 static void *_posupdatedata;
 
 void
@@ -71,15 +72,15 @@ _ecore_x_dnd_shutdown(void)
 {
    _ecore_x_dnd_init_count--;
    if (_ecore_x_dnd_init_count > 0)
-      return;
+     return;
 
    if (_source)
-      free(_source);
+     free(_source);
 
    _source = NULL;
 
    if (_target)
-      free(_target);
+     free(_target);
 
    _target = NULL;
 
@@ -87,7 +88,7 @@ _ecore_x_dnd_shutdown(void)
 } /* _ecore_x_dnd_shutdown */
 
 static Eina_Bool
-_ecore_x_dnd_converter_copy(char *target  __UNUSED__,
+_ecore_x_dnd_converter_copy(char         *target __UNUSED__,
                             void         *data,
                             int           size,
                             void        **data_ret,
@@ -100,11 +101,11 @@ _ecore_x_dnd_converter_copy(char *target  __UNUSED__,
    XICCEncodingStyle style = XTextStyle;
 
    if (!data || !size)
-      return EINA_FALSE;
+     return EINA_FALSE;
 
    mystr = calloc(1, size + 1);
    if (!mystr)
-      return EINA_FALSE;
+     return EINA_FALSE;
 
    memcpy(mystr, data, size);
 
@@ -132,16 +133,17 @@ _ecore_x_dnd_converter_copy(char *target  __UNUSED__,
 } /* _ecore_x_dnd_converter_copy */
 
 EAPI void
-ecore_x_dnd_aware_set(Ecore_X_Window win, Eina_Bool on)
+ecore_x_dnd_aware_set(Ecore_X_Window win,
+                      Eina_Bool      on)
 {
    Ecore_X_Atom prop_data = ECORE_X_DND_VERSION;
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    if (on)
-      ecore_x_window_prop_property_set(win, ECORE_X_ATOM_XDND_AWARE,
-                                       XA_ATOM, 32, &prop_data, 1);
+     ecore_x_window_prop_property_set(win, ECORE_X_ATOM_XDND_AWARE,
+                                      XA_ATOM, 32, &prop_data, 1);
    else
-      ecore_x_window_prop_property_del(win, ECORE_X_ATOM_XDND_AWARE);
+     ecore_x_window_prop_property_del(win, ECORE_X_ATOM_XDND_AWARE);
 } /* ecore_x_dnd_aware_set */
 
 EAPI int
@@ -157,16 +159,16 @@ ecore_x_dnd_version_get(Ecore_X_Window win)
    // move and going to and from x multiple times per move is EXPENSIVE
    // and slows things down, puts lots of load on x etc.
    if (_source->state == ECORE_X_DND_SOURCE_DRAGGING)
-      if (_version_cache)
-        {
-           int i;
+     if (_version_cache)
+       {
+          int i;
 
-           for (i = 0; i < _version_cache_num; i++)
-             {
-                if (_version_cache[i].win == win)
-                   return _version_cache[i].ver;
-             }
-        }
+          for (i = 0; i < _version_cache_num; i++)
+            {
+               if (_version_cache[i].win == win)
+                 return _version_cache[i].ver;
+            }
+       }
 
    if (ecore_x_window_prop_property_get(win, ECORE_X_ATOM_XDND_AWARE,
                                         XA_ATOM, 32, &prop_data, &num))
@@ -177,7 +179,7 @@ ecore_x_dnd_version_get(Ecore_X_Window win)
           {
              _version_cache_num++;
              if (_version_cache_num > _version_cache_alloc)
-                _version_cache_alloc += 16;
+               _version_cache_alloc += 16;
 
              t = realloc(_version_cache,
                          _version_cache_alloc *
@@ -195,7 +197,7 @@ ecore_x_dnd_version_get(Ecore_X_Window win)
      {
         _version_cache_num++;
         if (_version_cache_num > _version_cache_alloc)
-           _version_cache_alloc += 16;
+          _version_cache_alloc += 16;
 
         t = realloc(_version_cache, _version_cache_alloc *
                     sizeof(Version_Cache_Item));
@@ -209,7 +211,8 @@ ecore_x_dnd_version_get(Ecore_X_Window win)
 } /* ecore_x_dnd_version_get */
 
 EAPI Eina_Bool
-ecore_x_dnd_type_isset(Ecore_X_Window win, const char *type)
+ecore_x_dnd_type_isset(Ecore_X_Window win,
+                       const char    *type)
 {
    int num, i, ret = EINA_FALSE;
    unsigned char *data;
@@ -218,7 +221,7 @@ ecore_x_dnd_type_isset(Ecore_X_Window win, const char *type)
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    if (!ecore_x_window_prop_property_get(win, ECORE_X_ATOM_XDND_TYPE_LIST,
                                          XA_ATOM, 32, &data, &num))
-      return ret;
+     return ret;
 
    atom = ecore_x_atom_get(type);
    atoms = (Ecore_X_Atom *)data;
@@ -237,7 +240,9 @@ ecore_x_dnd_type_isset(Ecore_X_Window win, const char *type)
 } /* ecore_x_dnd_type_isset */
 
 EAPI void
-ecore_x_dnd_type_set(Ecore_X_Window win, const char *type, Eina_Bool on)
+ecore_x_dnd_type_set(Ecore_X_Window win,
+                     const char    *type,
+                     Eina_Bool      on)
 {
    Ecore_X_Atom atom;
    Ecore_X_Atom *oldset = NULL, *newset = NULL;
@@ -262,12 +267,12 @@ ecore_x_dnd_type_set(Ecore_X_Window win, const char *type, Eina_Bool on)
 
         newset = calloc(num + 1, sizeof(Ecore_X_Atom));
         if (!newset)
-           return;
+          return;
 
         data = (unsigned char *)newset;
 
         for (i = 0; i < num; i++)
-           newset[i + 1] = oldset[i];
+          newset[i + 1] = oldset[i];
         /* prepend the new type */
         newset[0] = atom;
 
@@ -291,8 +296,8 @@ ecore_x_dnd_type_set(Ecore_X_Window win, const char *type, Eina_Bool on)
 
         data = (unsigned char *)newset;
         for (i = 0; i < num; i++)
-           if (oldset[i] != atom)
-              newset[j++] = oldset[i];
+          if (oldset[i] != atom)
+            newset[j++] = oldset[i];
 
         ecore_x_window_prop_property_set(win, ECORE_X_ATOM_XDND_TYPE_LIST,
                                          XA_ATOM, 32, data, num - 1);
@@ -313,12 +318,12 @@ ecore_x_dnd_types_set(Ecore_X_Window win,
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    if (!num_types)
-      ecore_x_window_prop_property_del(win, ECORE_X_ATOM_XDND_TYPE_LIST);
+     ecore_x_window_prop_property_del(win, ECORE_X_ATOM_XDND_TYPE_LIST);
    else
      {
         newset = calloc(num_types, sizeof(Ecore_X_Atom));
         if (!newset)
-           return;
+          return;
 
         data = (unsigned char *)newset;
         for (i = 0; i < num_types; i++)
@@ -343,7 +348,7 @@ ecore_x_dnd_actions_set(Ecore_X_Window win,
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    if (!num_actions)
-      ecore_x_window_prop_property_del(win, ECORE_X_ATOM_XDND_ACTION_LIST);
+     ecore_x_window_prop_property_del(win, ECORE_X_ATOM_XDND_ACTION_LIST);
    else
      {
         data = (unsigned char *)actions;
@@ -373,8 +378,9 @@ ecore_x_dnd_actions_set(Ecore_X_Window win,
  */
 EAPI void
 ecore_x_dnd_callback_pos_update_set(
-                           void (*cb)(void *, Ecore_X_Xdnd_Position *data),
-                          const void *data)
+  void                                                           (*cb)(void *,
+                                          Ecore_X_Xdnd_Position *data),
+  const void                                                    *data)
 {
    _posupdatecb = cb;
    _posupdatedata = (void *)data; /* Discard the const early */
@@ -393,15 +399,17 @@ _ecore_x_dnd_target_get(void)
 } /* _ecore_x_dnd_target_get */
 
 EAPI Eina_Bool
-ecore_x_dnd_begin(Ecore_X_Window source, unsigned char *data, int size)
+ecore_x_dnd_begin(Ecore_X_Window source,
+                  unsigned char *data,
+                  int            size)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    if (!ecore_x_dnd_version_get(source))
-      return EINA_FALSE;
+     return EINA_FALSE;
 
    /* Take ownership of XdndSelection */
    if (!ecore_x_selection_xdnd_set(source, data, size))
-      return EINA_FALSE;
+     return EINA_FALSE;
 
    if (_version_cache)
      {
@@ -463,8 +471,8 @@ ecore_x_dnd_drop(void)
    else
      {
         /* Dropping on nothing */
-        ecore_x_selection_xdnd_clear();
-        _source->state = ECORE_X_DND_SOURCE_IDLE;
+         ecore_x_selection_xdnd_clear();
+         _source->state = ECORE_X_DND_SOURCE_IDLE;
      }
 
    ecore_x_window_ignore_set(_source->win, 0);
@@ -483,7 +491,7 @@ ecore_x_dnd_send_status(Eina_Bool         will_accept,
    XEvent xev;
 
    if (_target->state == ECORE_X_DND_TARGET_IDLE)
-      return;
+     return;
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    memset(&xev, 0, sizeof(XEvent));
@@ -499,10 +507,10 @@ ecore_x_dnd_send_status(Eina_Bool         will_accept,
    xev.xclient.data.l[0] = _target->win;
    xev.xclient.data.l[1] = 0;
    if (will_accept)
-      xev.xclient.data.l[1] |= 0x1UL;
+     xev.xclient.data.l[1] |= 0x1UL;
 
    if (!suppress)
-      xev.xclient.data.l[1] |= 0x2UL;
+     xev.xclient.data.l[1] |= 0x2UL;
 
    /* Set rectangle information */
    xev.xclient.data.l[2] = rectangle.x;
@@ -532,7 +540,7 @@ ecore_x_dnd_send_finished(void)
    XEvent xev;
 
    if (_target->state == ECORE_X_DND_TARGET_IDLE)
-      return;
+     return;
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    xev.xany.type = ClientMessage;
@@ -560,7 +568,7 @@ ecore_x_dnd_source_action_set(Ecore_X_Atom action)
 {
    _source->action = action;
    if (_source->prev.window)
-      _ecore_x_dnd_drag(_source->prev.window, _source->prev.x, _source->prev.y);
+     _ecore_x_dnd_drag(_source->prev.window, _source->prev.x, _source->prev.y);
 } /* ecore_x_dnd_source_action_set */
 
 EAPI Ecore_X_Atom
@@ -570,7 +578,9 @@ ecore_x_dnd_source_action_get(void)
 } /* ecore_x_dnd_source_action_get */
 
 void
-_ecore_x_dnd_drag(Ecore_X_Window root, int x, int y)
+_ecore_x_dnd_drag(Ecore_X_Window root,
+                  int            x,
+                  int            y)
 {
    XEvent xev;
    Ecore_X_Window win;
@@ -579,7 +589,7 @@ _ecore_x_dnd_drag(Ecore_X_Window root, int x, int y)
    int num;
 
    if (_source->state != ECORE_X_DND_SOURCE_DRAGGING)
-      return;
+     return;
 
    /* Preinitialize XEvent struct */
    memset(&xev, 0, sizeof(XEvent));
@@ -599,7 +609,7 @@ _ecore_x_dnd_drag(Ecore_X_Window root, int x, int y)
 //   while ((win) && !(ecore_x_dnd_version_get(win)))
 //     win = ecore_x_window_parent_get(win);
    while ((win) && !(ecore_x_dnd_version_get(win)))
-      win = ecore_x_window_shadow_parent_get(root, win);
+     win = ecore_x_window_shadow_parent_get(root, win);
 
    /* Send XdndLeave to current destination window if we have left it */
    if ((_source->dest) && (win != _source->dest))
@@ -639,16 +649,16 @@ _ecore_x_dnd_drag(Ecore_X_Window root, int x, int y)
              xev.xclient.data.l[0] = _source->win;
              xev.xclient.data.l[1] = 0;
              if (num > 3)
-                xev.xclient.data.l[1] |= 0x1UL;
+               xev.xclient.data.l[1] |= 0x1UL;
              else
-                xev.xclient.data.l[1] &= 0xfffffffeUL;
+               xev.xclient.data.l[1] &= 0xfffffffeUL;
 
              xev.xclient.data.l[1] |= ((unsigned long)_source->version) << 24;
 
              for (i = 2; i < 5; i++)
-                xev.xclient.data.l[i] = 0;
+               xev.xclient.data.l[i] = 0;
              for (i = 0; i < MIN(num, 3); ++i)
-                xev.xclient.data.l[i + 2] = types[i];
+               xev.xclient.data.l[i + 2] = types[i];
              XFree(data);
              XSendEvent(_ecore_x_disp, win, False, 0, &xev);
              _source->await_status = 0;
@@ -691,10 +701,6 @@ _ecore_x_dnd_drag(Ecore_X_Window root, int x, int y)
    _source->prev.y = y;
    _source->prev.window = root;
    _source->dest = win;
-
-
 } /* _ecore_x_dnd_drag */
 
-
-
 /* vim:set ts=8 sw=3 sts=3 expandtab cino=>5n-2f0^-2{2(0W1st0 :*/
index 75046b7..74d5344 100644 (file)
@@ -16,9 +16,9 @@ _ecore_x_dpms_init(void)
    _dpms_minor = 0;
 
    if (DPMSGetVersion(_ecore_x_disp, &_dpms_major, &_dpms_minor))
-      _dpms_available = EINA_TRUE;
+     _dpms_available = EINA_TRUE;
    else
-      _dpms_available = EINA_FALSE;
+     _dpms_available = EINA_FALSE;
 
 #else /* ifdef ECORE_XDPMS */
    _dpms_available = EINA_FALSE;
@@ -89,9 +89,9 @@ ecore_x_dpms_enabled_set(int enabled)
 #ifdef ECORE_XDPMS
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    if (enabled)
-      DPMSEnable(_ecore_x_disp);
+     DPMSEnable(_ecore_x_disp);
    else
-      DPMSDisable(_ecore_x_disp);
+     DPMSDisable(_ecore_x_disp);
 
 #endif /* ifdef ECORE_XDPMS */
 } /* ecore_x_dpms_enabled_set */
index 90bda18..a64060b 100644 (file)
@@ -12,7 +12,7 @@
 
 /**
  * Retrieves the geometry of the given drawable.
-* @param d The given drawable.
+ * @param d The given drawable.
  * @param x Pointer to an integer into which the X position is to be stored.
  * @param y Pointer to an integer into which the Y position is to be stored.
  * @param w Pointer to an integer into which the width is to be stored.
@@ -41,16 +41,16 @@ ecore_x_drawable_geometry_get(Ecore_X_Drawable d,
      }
 
    if (x)
-      *x = ret_x;
+     *x = ret_x;
 
    if (y)
-      *y = ret_y;
+     *y = ret_y;
 
    if (w)
-      *w = (int)ret_w;
+     *w = (int)ret_w;
 
    if (h)
-      *h = (int)ret_h;
+     *h = (int)ret_h;
 } /* ecore_x_drawable_geometry_get */
 
 /**
@@ -69,7 +69,7 @@ ecore_x_drawable_border_width_get(Ecore_X_Drawable d)
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    if (!XGetGeometry(_ecore_x_disp, d, &dummy_win, &dummy_x, &dummy_y,
                      &dummy_w, &dummy_h, &border_ret, &dummy_depth))
-      border_ret = 0;
+     border_ret = 0;
 
    return (int)border_ret;
 } /* ecore_x_drawable_border_width_get */
@@ -90,7 +90,7 @@ ecore_x_drawable_depth_get(Ecore_X_Drawable d)
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    if (!XGetGeometry(_ecore_x_disp, d, &dummy_win, &dummy_x, &dummy_y,
                      &dummy_w, &dummy_h, &dummy_border, &depth_ret))
-      depth_ret = 0;
+     depth_ret = 0;
 
    return (int)depth_ret;
 } /* ecore_x_drawable_depth_get */
index ceb4b52..3e3e3f4 100644 (file)
@@ -17,7 +17,11 @@ ecore_x_e_init(void)
 } /* ecore_x_e_init */
 
 EAPI void
-ecore_x_e_frame_size_set(Ecore_X_Window win, int fl, int fr, int ft, int fb)
+ecore_x_e_frame_size_set(Ecore_X_Window win,
+                         int            fl,
+                         int            fr,
+                         int            ft,
+                         int            fb)
 {
    unsigned int frames[4];
 
@@ -30,7 +34,8 @@ ecore_x_e_frame_size_set(Ecore_X_Window win, int fl, int fr, int ft, int fb)
 } /* ecore_x_e_frame_size_set */
 
 EAPI void
-ecore_x_e_virtual_keyboard_set(Ecore_X_Window win, unsigned int is_keyboard)
+ecore_x_e_virtual_keyboard_set(Ecore_X_Window win,
+                               unsigned int   is_keyboard)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    ecore_x_window_prop_card32_set(win, ECORE_X_ATOM_E_VIRTUAL_KEYBOARD,
@@ -45,7 +50,7 @@ ecore_x_e_virtual_keyboard_get(Ecore_X_Window win)
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    if (!ecore_x_window_prop_card32_get(win, ECORE_X_ATOM_E_VIRTUAL_KEYBOARD,
                                        &val, 1))
-      return EINA_FALSE;
+     return EINA_FALSE;
 
    return val ? EINA_TRUE : EINA_FALSE;
 } /* ecore_x_e_virtual_keyboard_get */
@@ -54,49 +59,49 @@ static Ecore_X_Virtual_Keyboard_State
 _ecore_x_e_vkbd_state_get(Ecore_X_Atom atom)
 {
    if (atom == ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_ON)
-      return ECORE_X_VIRTUAL_KEYBOARD_STATE_ON;
+     return ECORE_X_VIRTUAL_KEYBOARD_STATE_ON;
 
    if (atom == ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_OFF)
-      return ECORE_X_VIRTUAL_KEYBOARD_STATE_OFF;
+     return ECORE_X_VIRTUAL_KEYBOARD_STATE_OFF;
 
    if (atom == ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_ALPHA)
-      return ECORE_X_VIRTUAL_KEYBOARD_STATE_ALPHA;
+     return ECORE_X_VIRTUAL_KEYBOARD_STATE_ALPHA;
 
    if (atom == ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_NUMERIC)
-      return ECORE_X_VIRTUAL_KEYBOARD_STATE_NUMERIC;
+     return ECORE_X_VIRTUAL_KEYBOARD_STATE_NUMERIC;
 
    if (atom == ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_PIN)
-      return ECORE_X_VIRTUAL_KEYBOARD_STATE_PIN;
+     return ECORE_X_VIRTUAL_KEYBOARD_STATE_PIN;
 
    if (atom == ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_PHONE_NUMBER)
-      return ECORE_X_VIRTUAL_KEYBOARD_STATE_PHONE_NUMBER;
+     return ECORE_X_VIRTUAL_KEYBOARD_STATE_PHONE_NUMBER;
 
    if (atom == ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_HEX)
-      return ECORE_X_VIRTUAL_KEYBOARD_STATE_HEX;
+     return ECORE_X_VIRTUAL_KEYBOARD_STATE_HEX;
 
    if (atom == ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_TERMINAL)
-      return ECORE_X_VIRTUAL_KEYBOARD_STATE_TERMINAL;
+     return ECORE_X_VIRTUAL_KEYBOARD_STATE_TERMINAL;
 
    if (atom == ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_PASSWORD)
-      return ECORE_X_VIRTUAL_KEYBOARD_STATE_PASSWORD;
+     return ECORE_X_VIRTUAL_KEYBOARD_STATE_PASSWORD;
 
    if (atom == ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_IP)
-      return ECORE_X_VIRTUAL_KEYBOARD_STATE_IP;
+     return ECORE_X_VIRTUAL_KEYBOARD_STATE_IP;
 
    if (atom == ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_HOST)
-      return ECORE_X_VIRTUAL_KEYBOARD_STATE_HOST;
+     return ECORE_X_VIRTUAL_KEYBOARD_STATE_HOST;
 
    if (atom == ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_FILE)
-      return ECORE_X_VIRTUAL_KEYBOARD_STATE_FILE;
+     return ECORE_X_VIRTUAL_KEYBOARD_STATE_FILE;
 
    if (atom == ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_URL)
-      return ECORE_X_VIRTUAL_KEYBOARD_STATE_URL;
+     return ECORE_X_VIRTUAL_KEYBOARD_STATE_URL;
 
    if (atom == ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_KEYPAD)
-      return ECORE_X_VIRTUAL_KEYBOARD_STATE_KEYPAD;
+     return ECORE_X_VIRTUAL_KEYBOARD_STATE_KEYPAD;
 
    if (atom == ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_J2ME)
-      return ECORE_X_VIRTUAL_KEYBOARD_STATE_J2ME;
+     return ECORE_X_VIRTUAL_KEYBOARD_STATE_J2ME;
 
    return ECORE_X_VIRTUAL_KEYBOARD_STATE_UNKNOWN;
 } /* _ecore_x_e_vkbd_state_get */
@@ -107,49 +112,49 @@ _ecore_x_e_vkbd_atom_get(Ecore_X_Virtual_Keyboard_State state)
    switch (state)
      {
       case ECORE_X_VIRTUAL_KEYBOARD_STATE_OFF:
-         return ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_OFF;
+        return ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_OFF;
 
       case ECORE_X_VIRTUAL_KEYBOARD_STATE_ON:
-         return ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_ON;
+        return ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_ON;
 
       case ECORE_X_VIRTUAL_KEYBOARD_STATE_ALPHA:
-         return ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_ALPHA;
+        return ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_ALPHA;
 
       case ECORE_X_VIRTUAL_KEYBOARD_STATE_NUMERIC:
-         return ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_NUMERIC;
+        return ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_NUMERIC;
 
       case ECORE_X_VIRTUAL_KEYBOARD_STATE_PIN:
-         return ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_PIN;
+        return ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_PIN;
 
       case ECORE_X_VIRTUAL_KEYBOARD_STATE_PHONE_NUMBER:
-         return ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_PHONE_NUMBER;
+        return ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_PHONE_NUMBER;
 
       case ECORE_X_VIRTUAL_KEYBOARD_STATE_HEX:
-         return ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_HEX;
+        return ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_HEX;
 
       case ECORE_X_VIRTUAL_KEYBOARD_STATE_TERMINAL:
-         return ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_TERMINAL;
+        return ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_TERMINAL;
 
       case ECORE_X_VIRTUAL_KEYBOARD_STATE_PASSWORD:
-         return ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_PASSWORD;
+        return ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_PASSWORD;
 
       case ECORE_X_VIRTUAL_KEYBOARD_STATE_IP:
-         return ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_IP;
+        return ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_IP;
 
       case ECORE_X_VIRTUAL_KEYBOARD_STATE_HOST:
-         return ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_HOST;
+        return ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_HOST;
 
       case ECORE_X_VIRTUAL_KEYBOARD_STATE_FILE:
-         return ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_FILE;
+        return ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_FILE;
 
       case ECORE_X_VIRTUAL_KEYBOARD_STATE_URL:
-         return ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_URL;
+        return ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_URL;
 
       case ECORE_X_VIRTUAL_KEYBOARD_STATE_KEYPAD:
-         return ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_KEYPAD;
+        return ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_KEYPAD;
 
       case ECORE_X_VIRTUAL_KEYBOARD_STATE_J2ME:
-         return ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_J2ME;
+        return ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_J2ME;
 
       default: break;
      } /* switch */
@@ -176,7 +181,7 @@ ecore_x_e_virtual_keyboard_state_get(Ecore_X_Window win)
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    if (!ecore_x_window_prop_atom_get(win, ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_STATE,
                                      &atom, 1))
-      return ECORE_X_VIRTUAL_KEYBOARD_STATE_UNKNOWN;
+     return ECORE_X_VIRTUAL_KEYBOARD_STATE_UNKNOWN;
 
    return _ecore_x_e_vkbd_state_get(atom);
 } /* ecore_x_e_virtual_keyboard_state_get */
@@ -198,16 +203,16 @@ _ecore_x_e_illume_atom_get(Ecore_X_Illume_Mode mode)
    switch (mode)
      {
       case ECORE_X_ILLUME_MODE_SINGLE:
-         return ECORE_X_ATOM_E_ILLUME_MODE_SINGLE;
+        return ECORE_X_ATOM_E_ILLUME_MODE_SINGLE;
 
       case ECORE_X_ILLUME_MODE_DUAL_TOP:
-         return ECORE_X_ATOM_E_ILLUME_MODE_DUAL_TOP;
+        return ECORE_X_ATOM_E_ILLUME_MODE_DUAL_TOP;
 
       case ECORE_X_ILLUME_MODE_DUAL_LEFT:
-         return ECORE_X_ATOM_E_ILLUME_MODE_DUAL_LEFT;
+        return ECORE_X_ATOM_E_ILLUME_MODE_DUAL_LEFT;
 
       default:
-         break;
+        break;
      } /* switch */
    return ECORE_X_ILLUME_MODE_UNKNOWN;
 } /* _ecore_x_e_illume_atom_get */
@@ -216,19 +221,20 @@ static Ecore_X_Illume_Mode
 _ecore_x_e_illume_mode_get(Ecore_X_Atom atom)
 {
    if (atom == ECORE_X_ATOM_E_ILLUME_MODE_SINGLE)
-      return ECORE_X_ILLUME_MODE_SINGLE;
+     return ECORE_X_ILLUME_MODE_SINGLE;
 
    if (atom == ECORE_X_ATOM_E_ILLUME_MODE_DUAL_TOP)
-      return ECORE_X_ILLUME_MODE_DUAL_TOP;
+     return ECORE_X_ILLUME_MODE_DUAL_TOP;
 
    if (atom == ECORE_X_ATOM_E_ILLUME_MODE_DUAL_LEFT)
-      return ECORE_X_ILLUME_MODE_DUAL_LEFT;
+     return ECORE_X_ILLUME_MODE_DUAL_LEFT;
 
    return ECORE_X_ILLUME_MODE_UNKNOWN;
 } /* _ecore_x_e_illume_mode_get */
 
 EAPI void
-ecore_x_e_illume_zone_set(Ecore_X_Window win, Ecore_X_Window zone)
+ecore_x_e_illume_zone_set(Ecore_X_Window win,
+                          Ecore_X_Window zone)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    ecore_x_window_prop_window_set(win, ECORE_X_ATOM_E_ILLUME_ZONE,
@@ -243,7 +249,7 @@ ecore_x_e_illume_zone_get(Ecore_X_Window win)
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    if (!ecore_x_window_prop_window_get(win, ECORE_X_ATOM_E_ILLUME_ZONE,
                                        &zone, 1))
-      return 0;
+     return 0;
 
    return zone;
 } /* ecore_x_e_illume_zone_get */
@@ -259,7 +265,8 @@ ecore_x_e_illume_zone_list_set(Ecore_X_Window  win,
 } /* ecore_x_e_illume_zone_list_set */
 
 EAPI void
-ecore_x_e_illume_conformant_set(Ecore_X_Window win, unsigned int is_conformant)
+ecore_x_e_illume_conformant_set(Ecore_X_Window win,
+                                unsigned int   is_conformant)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    ecore_x_window_prop_card32_set(win, ECORE_X_ATOM_E_ILLUME_CONFORMANT,
@@ -274,13 +281,14 @@ ecore_x_e_illume_conformant_get(Ecore_X_Window win)
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    if (!ecore_x_window_prop_card32_get(win, ECORE_X_ATOM_E_ILLUME_CONFORMANT,
                                        &val, 1))
-      return EINA_FALSE;
+     return EINA_FALSE;
 
    return val ? EINA_TRUE : EINA_FALSE;
 } /* ecore_x_e_illume_conformant_get */
 
 EAPI void
-ecore_x_e_illume_mode_set(Ecore_X_Window win, Ecore_X_Illume_Mode mode)
+ecore_x_e_illume_mode_set(Ecore_X_Window      win,
+                          Ecore_X_Illume_Mode mode)
 {
    Ecore_X_Atom atom = 0;
 
@@ -297,13 +305,14 @@ ecore_x_e_illume_mode_get(Ecore_X_Window win)
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    if (!ecore_x_window_prop_atom_get(win, ECORE_X_ATOM_E_ILLUME_MODE, &atom, 1))
-      return ECORE_X_ILLUME_MODE_UNKNOWN;
+     return ECORE_X_ILLUME_MODE_UNKNOWN;
 
    return _ecore_x_e_illume_mode_get(atom);
 } /* ecore_x_e_illume_mode_get */
 
 EAPI void
-ecore_x_e_illume_mode_send(Ecore_X_Window win, Ecore_X_Illume_Mode mode)
+ecore_x_e_illume_mode_send(Ecore_X_Window      win,
+                           Ecore_X_Illume_Mode mode)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    ecore_x_client_message32_send(win, ECORE_X_ATOM_E_ILLUME_MODE,
@@ -367,7 +376,8 @@ ecore_x_e_illume_home_del_send(Ecore_X_Window win)
 } /* ecore_x_e_illume_home_del_send */
 
 EAPI void
-ecore_x_e_illume_drag_set(Ecore_X_Window win, unsigned int drag)
+ecore_x_e_illume_drag_set(Ecore_X_Window win,
+                          unsigned int   drag)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    ecore_x_window_prop_card32_set(win, ECORE_X_ATOM_E_ILLUME_DRAG, &drag, 1);
@@ -380,13 +390,14 @@ ecore_x_e_illume_drag_get(Ecore_X_Window win)
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    if (!ecore_x_window_prop_card32_get(win, ECORE_X_ATOM_E_ILLUME_DRAG, &val, 1))
-      return EINA_FALSE;
+     return EINA_FALSE;
 
    return val ? EINA_TRUE : EINA_FALSE;
 } /* ecore_x_e_illume_drag_get */
 
 EAPI void
-ecore_x_e_illume_drag_locked_set(Ecore_X_Window win, unsigned int is_locked)
+ecore_x_e_illume_drag_locked_set(Ecore_X_Window win,
+                                 unsigned int   is_locked)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    ecore_x_window_prop_card32_set(win, ECORE_X_ATOM_E_ILLUME_DRAG_LOCKED,
@@ -401,7 +412,7 @@ ecore_x_e_illume_drag_locked_get(Ecore_X_Window win)
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    if (!ecore_x_window_prop_card32_get(win, ECORE_X_ATOM_E_ILLUME_DRAG_LOCKED,
                                        &val, 1))
-      return EINA_FALSE;
+     return EINA_FALSE;
 
    return val ? EINA_TRUE : EINA_FALSE;
 } /* ecore_x_e_illume_drag_locked_get */
@@ -454,23 +465,23 @@ ecore_x_e_illume_indicator_geometry_get(Ecore_X_Window win,
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    ret =
-      ecore_x_window_prop_card32_get(win,
-                                     ECORE_X_ATOM_E_ILLUME_INDICATOR_GEOMETRY,
-                                     geom, 4);
+     ecore_x_window_prop_card32_get(win,
+                                    ECORE_X_ATOM_E_ILLUME_INDICATOR_GEOMETRY,
+                                    geom, 4);
    if (ret != 4)
-      return EINA_FALSE;
+     return EINA_FALSE;
 
    if (x)
-      *x = geom[0];
+     *x = geom[0];
 
    if (y)
-      *y = geom[1];
+     *y = geom[1];
 
    if (w)
-      *w = geom[2];
+     *w = geom[2];
 
    if (h)
-      *h = geom[3];
+     *h = geom[3];
 
    return EINA_TRUE;
 } /* ecore_x_e_illume_indicator_geometry_get */
@@ -505,23 +516,23 @@ ecore_x_e_illume_softkey_geometry_get(Ecore_X_Window win,
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    ret =
-      ecore_x_window_prop_card32_get(win,
-                                     ECORE_X_ATOM_E_ILLUME_SOFTKEY_GEOMETRY,
-                                     geom, 4);
+     ecore_x_window_prop_card32_get(win,
+                                    ECORE_X_ATOM_E_ILLUME_SOFTKEY_GEOMETRY,
+                                    geom, 4);
    if (ret != 4)
-      return EINA_FALSE;
+     return EINA_FALSE;
 
    if (x)
-      *x = geom[0];
+     *x = geom[0];
 
    if (y)
-      *y = geom[1];
+     *y = geom[1];
 
    if (w)
-      *w = geom[2];
+     *w = geom[2];
 
    if (h)
-      *h = geom[3];
+     *h = geom[3];
 
    return EINA_TRUE;
 } /* ecore_x_e_illume_softkey_geometry_get */
@@ -556,23 +567,23 @@ ecore_x_e_illume_keyboard_geometry_get(Ecore_X_Window win,
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    ret =
-      ecore_x_window_prop_card32_get(win,
-                                     ECORE_X_ATOM_E_ILLUME_KEYBOARD_GEOMETRY,
-                                     geom, 4);
+     ecore_x_window_prop_card32_get(win,
+                                    ECORE_X_ATOM_E_ILLUME_KEYBOARD_GEOMETRY,
+                                    geom, 4);
    if (ret != 4)
-      return EINA_FALSE;
+     return EINA_FALSE;
 
    if (x)
-      *x = geom[0];
+     *x = geom[0];
 
    if (y)
-      *y = geom[1];
+     *y = geom[1];
 
    if (w)
-      *w = geom[2];
+     *w = geom[2];
 
    if (h)
-      *h = geom[3];
+     *h = geom[3];
 
    return EINA_TRUE;
 } /* ecore_x_e_illume_keyboard_geometry_get */
@@ -583,13 +594,13 @@ _ecore_x_e_quickpanel_atom_get(Ecore_X_Illume_Quickpanel_State state)
    switch (state)
      {
       case ECORE_X_ILLUME_QUICKPANEL_STATE_ON:
-         return ECORE_X_ATOM_E_ILLUME_QUICKPANEL_ON;
+        return ECORE_X_ATOM_E_ILLUME_QUICKPANEL_ON;
 
       case ECORE_X_ILLUME_QUICKPANEL_STATE_OFF:
-         return ECORE_X_ATOM_E_ILLUME_QUICKPANEL_OFF;
+        return ECORE_X_ATOM_E_ILLUME_QUICKPANEL_OFF;
 
       default:
-         break;
+        break;
      } /* switch */
    return 0;
 } /* _ecore_x_e_quickpanel_atom_get */
@@ -598,16 +609,17 @@ static Ecore_X_Illume_Quickpanel_State
 _ecore_x_e_quickpanel_state_get(Ecore_X_Atom atom)
 {
    if (atom == ECORE_X_ATOM_E_ILLUME_QUICKPANEL_ON)
-      return ECORE_X_ILLUME_QUICKPANEL_STATE_ON;
+     return ECORE_X_ILLUME_QUICKPANEL_STATE_ON;
 
    if (atom == ECORE_X_ATOM_E_ILLUME_QUICKPANEL_OFF)
-      return ECORE_X_ILLUME_QUICKPANEL_STATE_OFF;
+     return ECORE_X_ILLUME_QUICKPANEL_STATE_OFF;
 
    return ECORE_X_ILLUME_QUICKPANEL_STATE_UNKNOWN;
 } /* _ecore_x_e_quickpanel_state_get */
 
 EAPI void
-ecore_x_e_illume_quickpanel_set(Ecore_X_Window win, unsigned int is_quickpanel)
+ecore_x_e_illume_quickpanel_set(Ecore_X_Window win,
+                                unsigned int   is_quickpanel)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    ecore_x_window_prop_card32_set(win, ECORE_X_ATOM_E_ILLUME_QUICKPANEL,
@@ -622,7 +634,7 @@ ecore_x_e_illume_quickpanel_get(Ecore_X_Window win)
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    if (!ecore_x_window_prop_card32_get(win, ECORE_X_ATOM_E_ILLUME_QUICKPANEL,
                                        &val, 1))
-      return EINA_FALSE;
+     return EINA_FALSE;
 
    return val ? EINA_TRUE : EINA_FALSE;
 } /* ecore_x_e_illume_quickpanel_get */
@@ -648,7 +660,7 @@ ecore_x_e_illume_quickpanel_state_get(Ecore_X_Window win)
    if (!ecore_x_window_prop_atom_get(win,
                                      ECORE_X_ATOM_E_ILLUME_QUICKPANEL_STATE,
                                      &atom, 1))
-      return ECORE_X_ILLUME_QUICKPANEL_STATE_UNKNOWN;
+     return ECORE_X_ILLUME_QUICKPANEL_STATE_UNKNOWN;
 
    return _ecore_x_e_quickpanel_state_get(atom);
 } /* ecore_x_e_illume_quickpanel_state_get */
@@ -693,7 +705,7 @@ ecore_x_e_illume_quickpanel_priority_major_get(Ecore_X_Window win)
    if (!ecore_x_window_prop_card32_get(win,
                                        ECORE_X_ATOM_E_ILLUME_QUICKPANEL_PRIORITY_MAJOR,
                                        &val, 1))
-      return 0;
+     return 0;
 
    return val;
 } /* ecore_x_e_illume_quickpanel_priority_major_get */
@@ -717,13 +729,14 @@ ecore_x_e_illume_quickpanel_priority_minor_get(Ecore_X_Window win)
    if (!ecore_x_window_prop_card32_get(win,
                                        ECORE_X_ATOM_E_ILLUME_QUICKPANEL_PRIORITY_MINOR,
                                        &val, 1))
-      return 0;
+     return 0;
 
    return val;
 } /* ecore_x_e_illume_quickpanel_priority_minor_get */
 
 EAPI void
-ecore_x_e_illume_quickpanel_zone_set(Ecore_X_Window win, unsigned int zone)
+ecore_x_e_illume_quickpanel_zone_set(Ecore_X_Window win,
+                                     unsigned int   zone)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    ecore_x_window_prop_card32_set(win,
@@ -740,7 +753,7 @@ ecore_x_e_illume_quickpanel_zone_get(Ecore_X_Window win)
    if (!ecore_x_window_prop_card32_get(win,
                                        ECORE_X_ATOM_E_ILLUME_QUICKPANEL_ZONE,
                                        &val, 1))
-      return 0;
+     return 0;
 
    return val;
 } /* ecore_x_e_illume_quickpanel_zone_get */
@@ -838,10 +851,10 @@ ecore_x_e_comp_sync_counter_set(Ecore_X_Window       win,
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    if (counter)
-      ecore_x_window_prop_xid_set(win, ECORE_X_ATOM_E_COMP_SYNC_COUNTER,
-                                  ECORE_X_ATOM_CARDINAL, &counter, 1);
+     ecore_x_window_prop_xid_set(win, ECORE_X_ATOM_E_COMP_SYNC_COUNTER,
+                                 ECORE_X_ATOM_CARDINAL, &counter, 1);
    else
-      ecore_x_window_prop_property_del(win, ECORE_X_ATOM_E_COMP_SYNC_COUNTER);
+     ecore_x_window_prop_property_del(win, ECORE_X_ATOM_E_COMP_SYNC_COUNTER);
 } /* ecore_x_e_comp_sync_counter_set */
 
 EAPI Ecore_X_Sync_Counter
@@ -852,24 +865,25 @@ ecore_x_e_comp_sync_counter_get(Ecore_X_Window win)
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    ret =
-      ecore_x_window_prop_xid_get(win,
-                                  ECORE_X_ATOM_E_COMP_SYNC_COUNTER,
-                                  ECORE_X_ATOM_CARDINAL,
-                                  &counter, 1);
+     ecore_x_window_prop_xid_get(win,
+                                 ECORE_X_ATOM_E_COMP_SYNC_COUNTER,
+                                 ECORE_X_ATOM_CARDINAL,
+                                 &counter, 1);
    if (ret != 1)
-      return 0;
+     return 0;
 
    return counter;
 } /* ecore_x_e_comp_sync_counter_get */
 
 EAPI void
-ecore_x_e_comp_sync_draw_done_send(Ecore_X_Window root, Ecore_X_Window win)
+ecore_x_e_comp_sync_draw_done_send(Ecore_X_Window root,
+                                   Ecore_X_Window win)
 {
    XEvent xev;
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    if (!root)
-      root = DefaultRootWindow(_ecore_x_disp);
+     root = DefaultRootWindow(_ecore_x_disp);
 
    xev.xclient.type = ClientMessage;
    xev.xclient.display = _ecore_x_disp;
@@ -888,13 +902,16 @@ ecore_x_e_comp_sync_draw_done_send(Ecore_X_Window root, Ecore_X_Window win)
 } /* ecore_x_e_comp_sync_draw_done_send */
 
 EAPI void
-ecore_x_e_comp_sync_draw_size_done_send(Ecore_X_Window root, Ecore_X_Window win, int w, int h)
+ecore_x_e_comp_sync_draw_size_done_send(Ecore_X_Window root,
+                                        Ecore_X_Window win,
+                                        int            w,
+                                        int            h)
 {
    XEvent xev;
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    if (!root)
-      root = DefaultRootWindow(_ecore_x_disp);
+     root = DefaultRootWindow(_ecore_x_disp);
 
    xev.xclient.type = ClientMessage;
    xev.xclient.display = _ecore_x_disp;
@@ -913,18 +930,19 @@ ecore_x_e_comp_sync_draw_size_done_send(Ecore_X_Window root, Ecore_X_Window win,
 } /* ecore_x_e_comp_sync_draw_done_send */
 
 EAPI void
-ecore_x_e_comp_sync_supported_set(Ecore_X_Window root, Eina_Bool enabled)
+ecore_x_e_comp_sync_supported_set(Ecore_X_Window root,
+                                  Eina_Bool      enabled)
 {
    Ecore_X_Window win;
 
    if (!root)
-      root = DefaultRootWindow(_ecore_x_disp);
+     root = DefaultRootWindow(_ecore_x_disp);
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    if (enabled)
      {
         win = ecore_x_window_new(root, 1, 2, 3, 4);
-        ecore_x_window_prop_xid_set(win,  ECORE_X_ATOM_E_COMP_SYNC_SUPPORTED,
+        ecore_x_window_prop_xid_set(win, ECORE_X_ATOM_E_COMP_SYNC_SUPPORTED,
                                     ECORE_X_ATOM_WINDOW, &win, 1);
         ecore_x_window_prop_xid_set(root, ECORE_X_ATOM_E_COMP_SYNC_SUPPORTED,
                                     ECORE_X_ATOM_WINDOW, &win, 1);
@@ -934,15 +952,15 @@ ecore_x_e_comp_sync_supported_set(Ecore_X_Window root, Eina_Bool enabled)
         int ret;
 
         ret =
-           ecore_x_window_prop_xid_get(root,
-                                       ECORE_X_ATOM_E_COMP_SYNC_SUPPORTED,
-                                       ECORE_X_ATOM_WINDOW,
-                                       &win, 1);
+          ecore_x_window_prop_xid_get(root,
+                                      ECORE_X_ATOM_E_COMP_SYNC_SUPPORTED,
+                                      ECORE_X_ATOM_WINDOW,
+                                      &win, 1);
         if ((ret == 1) && (win))
           {
              ecore_x_window_prop_property_del(
-                root,
-                ECORE_X_ATOM_E_COMP_SYNC_SUPPORTED);
+               root,
+               ECORE_X_ATOM_E_COMP_SYNC_SUPPORTED);
              ecore_x_window_free(win);
           }
      }
@@ -956,22 +974,22 @@ ecore_x_e_comp_sync_supported_get(Ecore_X_Window root)
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    if (!root)
-      root = DefaultRootWindow(_ecore_x_disp);
+     root = DefaultRootWindow(_ecore_x_disp);
 
    ret =
-      ecore_x_window_prop_xid_get(root,
-                                  ECORE_X_ATOM_E_COMP_SYNC_SUPPORTED,
-                                  ECORE_X_ATOM_WINDOW,
-                                  &win, 1);
+     ecore_x_window_prop_xid_get(root,
+                                 ECORE_X_ATOM_E_COMP_SYNC_SUPPORTED,
+                                 ECORE_X_ATOM_WINDOW,
+                                 &win, 1);
    if ((ret == 1) && (win))
      {
         ret =
-           ecore_x_window_prop_xid_get(win,
-                                       ECORE_X_ATOM_E_COMP_SYNC_SUPPORTED,
-                                       ECORE_X_ATOM_WINDOW,
-                                       &win2, 1);
+          ecore_x_window_prop_xid_get(win,
+                                      ECORE_X_ATOM_E_COMP_SYNC_SUPPORTED,
+                                      ECORE_X_ATOM_WINDOW,
+                                      &win2, 1);
         if ((ret == 1) && (win2 == win))
-           return EINA_TRUE;
+          return EINA_TRUE;
      }
 
    return EINA_FALSE;
@@ -1088,14 +1106,15 @@ ecore_x_e_comp_dump_send(Ecore_X_Window win)
 } /* ecore_x_e_comp_dump_send */
 
 EAPI void
-ecore_x_e_comp_pixmap_set(Ecore_X_Window win, Ecore_X_Pixmap pixmap)
+ecore_x_e_comp_pixmap_set(Ecore_X_Window win,
+                          Ecore_X_Pixmap pixmap)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    if (pixmap)
-      ecore_x_window_prop_xid_set(win, ECORE_X_ATOM_E_COMP_PIXMAP,
-                                  ECORE_X_ATOM_PIXMAP, &pixmap, 1);
+     ecore_x_window_prop_xid_set(win, ECORE_X_ATOM_E_COMP_PIXMAP,
+                                 ECORE_X_ATOM_PIXMAP, &pixmap, 1);
    else
-      ecore_x_window_prop_property_del(win, pixmap);
+     ecore_x_window_prop_property_del(win, pixmap);
 } /* ecore_x_e_comp_pixmap_set */
 
 EAPI Ecore_X_Pixmap
@@ -1106,12 +1125,12 @@ ecore_x_e_comp_pixmap_get(Ecore_X_Window win)
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    ret =
-      ecore_x_window_prop_xid_get(win,
-                                  ECORE_X_ATOM_E_COMP_PIXMAP,
-                                  ECORE_X_ATOM_PIXMAP,
-                                  &pixmap, 1);
+     ecore_x_window_prop_xid_get(win,
+                                 ECORE_X_ATOM_E_COMP_PIXMAP,
+                                 ECORE_X_ATOM_PIXMAP,
+                                 &pixmap, 1);
    if (ret != 1)
-      return 0;
+     return 0;
 
    return pixmap;
 } /* ecore_x_e_comp_pixmap_get */
index 1d27937..837ff53 100644 (file)
@@ -9,8 +9,9 @@
 #include "ecore_x_private.h"
 #include "Ecore_X.h"
 
-static int       _ecore_x_error_handle(Display *d, XErrorEvent *ev);
-static int       _ecore_x_io_error_handle(Display *d);
+static int _ecore_x_error_handle(Display     *d,
+                                 XErrorEvent *ev);
+static int _ecore_x_io_error_handle(Display *d);
 
 static void (*_error_func)(void *data) = NULL;
 static void *_error_data = NULL;
@@ -27,7 +28,8 @@ static int _error_code = 0;
  * Set the X error handler function
  */
 EAPI void
-ecore_x_error_handler_set(void (*func)(void *data), const void *data)
+ecore_x_error_handler_set(void        (*func)(void *data),
+                          const void *data)
 {
    _error_func = func;
    _error_data = (void *)data;
@@ -41,7 +43,8 @@ ecore_x_error_handler_set(void (*func)(void *data), const void *data)
  * Set the X I/O error handler function
  */
 EAPI void
-ecore_x_io_error_handler_set(void (*func)(void *data), const void *data)
+ecore_x_io_error_handler_set(void        (*func)(void *data),
+                             const void *data)
 {
    _io_error_func = func;
    _io_error_data = (void *)data;
@@ -79,14 +82,15 @@ _ecore_x_error_handler_init(void)
 } /* _ecore_x_error_handler_init */
 
 static int
-_ecore_x_error_handle(Display *d, XErrorEvent *ev)
+_ecore_x_error_handle(Display     *d,
+                      XErrorEvent *ev)
 {
    if (d == _ecore_x_disp)
      {
         _error_request_code = ev->request_code;
         _error_code = ev->error_code;
         if (_error_func)
-           _error_func(_error_data);
+          _error_func(_error_data);
      }
    return 0;
 } /* _ecore_x_error_handle */
@@ -97,9 +101,9 @@ _ecore_x_io_error_handle(Display *d)
    if (d == _ecore_x_disp)
      {
         if (_io_error_func)
-           _io_error_func(_io_error_data);
+          _io_error_func(_io_error_data);
         else
-           exit(-1);
+          exit(-1);
      }
 
    return 0;
index cbfb02d..a0e22d3 100644 (file)
 typedef struct _Ecore_X_Mouse_Down_Info
 {
    EINA_INLIST;
-   int dev;
-   Window last_win;
-   Window last_last_win;
-   Window last_event_win;
-   Window last_last_event_win;
-   Time last_time;
-   Time last_last_time;
+   int       dev;
+   Window    last_win;
+   Window    last_last_win;
+   Window    last_event_win;
+   Window    last_last_event_win;
+   Time      last_time;
+   Time      last_last_time;
    Eina_Bool did_double : 1;
    Eina_Bool did_triple : 1;
 } Ecore_X_Mouse_Down_Info;
@@ -57,7 +57,7 @@ _ecore_x_mouse_down_info_clear(void)
 void
 _ecore_x_events_init(void)
 {
-   //Actually, Nothing to do. 
+   //Actually, Nothing to do.
 }
 
 void
@@ -76,18 +76,19 @@ _ecore_x_mouse_down_info_get(int dev)
    EINA_INLIST_FOREACH(l, info)
      if (info->dev == dev) return info;
 
-   //New Device. Add it. 
+   //New Device. Add it.
    info = calloc(1, sizeof(Ecore_X_Mouse_Down_Info));
    if (!info) return NULL;
 
    info->dev = dev;
-   l = eina_inlist_append(l, (Eina_Inlist*) info);
+   l = eina_inlist_append(l, (Eina_Inlist *)info);
    _ecore_x_mouse_down_info_list = l;
    return info;
 }
 
 static void
-_ecore_x_event_free_mouse_move(void *data __UNUSED__, void *ev)
+_ecore_x_event_free_mouse_move(void *data __UNUSED__,
+                               void *ev)
 {
    Ecore_Event_Mouse_Move *e;
 
@@ -102,14 +103,15 @@ _ecore_x_event_free_mouse_move(void *data __UNUSED__, void *ev)
 } /* _ecore_x_event_free_mouse_move */
 
 EAPI void
-ecore_x_event_mask_set(Ecore_X_Window w, Ecore_X_Event_Mask mask)
+ecore_x_event_mask_set(Ecore_X_Window     w,
+                       Ecore_X_Event_Mask mask)
 {
    XWindowAttributes attr;
    XSetWindowAttributes s_attr;
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    if (!w)
-      w = DefaultRootWindow(_ecore_x_disp);
+     w = DefaultRootWindow(_ecore_x_disp);
 
    memset(&attr, 0, sizeof(XWindowAttributes));
    XGetWindowAttributes(_ecore_x_disp, w, &attr);
@@ -118,14 +120,15 @@ ecore_x_event_mask_set(Ecore_X_Window w, Ecore_X_Event_Mask mask)
 } /* ecore_x_event_mask_set */
 
 EAPI void
-ecore_x_event_mask_unset(Ecore_X_Window w, Ecore_X_Event_Mask mask)
+ecore_x_event_mask_unset(Ecore_X_Window     w,
+                         Ecore_X_Event_Mask mask)
 {
    XWindowAttributes attr;
    XSetWindowAttributes s_attr;
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    if (!w)
-      w = DefaultRootWindow(_ecore_x_disp);
+     w = DefaultRootWindow(_ecore_x_disp);
 
    memset(&attr, 0, sizeof(XWindowAttributes));
    XGetWindowAttributes(_ecore_x_disp, w, &attr);
@@ -134,20 +137,22 @@ ecore_x_event_mask_unset(Ecore_X_Window w, Ecore_X_Event_Mask mask)
 } /* ecore_x_event_mask_unset */
 
 static void
-_ecore_x_event_free_xdnd_enter(void *data __UNUSED__, void *ev)
+_ecore_x_event_free_xdnd_enter(void *data __UNUSED__,
+                               void *ev)
 {
    Ecore_X_Event_Xdnd_Enter *e;
    int i;
 
    e = ev;
    for (i = 0; i < e->num_types; i++)
-      XFree(e->types[i]);
+     XFree(e->types[i]);
    free(e->types);
    free(e);
 } /* _ecore_x_event_free_xdnd_enter */
 
 static void
-_ecore_x_event_free_selection_notify(void *data __UNUSED__, void *ev)
+_ecore_x_event_free_selection_notify(void *data __UNUSED__,
+                                     void *ev)
 {
    Ecore_X_Event_Selection_Notify *e;
    Ecore_X_Selection_Data *sel;
@@ -155,7 +160,7 @@ _ecore_x_event_free_selection_notify(void *data __UNUSED__, void *ev)
    e = ev;
    sel = e->data;
    if (sel->free)
-      sel->free(sel);
+     sel->free(sel);
 
    free(e->target);
    free(e);
@@ -167,28 +172,28 @@ _ecore_x_event_modifiers(unsigned int state)
    unsigned int modifiers = 0;
 
    if (state & ECORE_X_MODIFIER_SHIFT)
-      modifiers |= ECORE_EVENT_MODIFIER_SHIFT;
+     modifiers |= ECORE_EVENT_MODIFIER_SHIFT;
 
    if (state & ECORE_X_MODIFIER_CTRL)
-      modifiers |= ECORE_EVENT_MODIFIER_CTRL;
+     modifiers |= ECORE_EVENT_MODIFIER_CTRL;
 
    if (state & ECORE_X_MODIFIER_ALT)
-      modifiers |= ECORE_EVENT_MODIFIER_ALT;
+     modifiers |= ECORE_EVENT_MODIFIER_ALT;
 
    if (state & ECORE_X_MODIFIER_WIN)
-      modifiers |= ECORE_EVENT_MODIFIER_WIN;
+     modifiers |= ECORE_EVENT_MODIFIER_WIN;
 
    if (state & ECORE_X_LOCK_SCROLL)
-      modifiers |= ECORE_EVENT_LOCK_SCROLL;
+     modifiers |= ECORE_EVENT_LOCK_SCROLL;
 
    if (state & ECORE_X_LOCK_NUM)
-      modifiers |= ECORE_EVENT_LOCK_NUM;
+     modifiers |= ECORE_EVENT_LOCK_NUM;
 
    if (state & ECORE_X_LOCK_CAPS)
-      modifiers |= ECORE_EVENT_LOCK_CAPS;
+     modifiers |= ECORE_EVENT_LOCK_CAPS;
 
    if (state & ECORE_X_LOCK_SHIFT)
-      modifiers |= ECORE_EVENT_LOCK_SHIFT;
+     modifiers |= ECORE_EVENT_LOCK_SHIFT;
 
    return modifiers;
 } /* _ecore_x_event_modifiers */
@@ -219,7 +224,7 @@ _ecore_mouse_move(unsigned int timestamp,
 
    e = malloc(sizeof(Ecore_Event_Mouse_Move));
    if (!e)
-      return;
+     return;
 
    e->window = window;
    e->root_window = root_win;
@@ -258,7 +263,8 @@ _ecore_mouse_move(unsigned int timestamp,
 } /* _ecore_mouse_move */
 
 static void
-_ecore_key_press(int event, XKeyEvent *xevent)
+_ecore_key_press(int        event,
+                 XKeyEvent *xevent)
 {
    Ecore_Event_Key *e;
    char *compose = NULL;
@@ -292,22 +298,22 @@ _ecore_key_press(int event, XKeyEvent *xevent)
                        &sym,
                        &status);
    if (val > 0)
-       {
-          compose_buffer[val] = 0;
-          compose = eina_str_convert(nl_langinfo(CODESET), "UTF-8",
-                                     compose_buffer);
-          tmp = compose;
-       }
+     {
+        compose_buffer[val] = 0;
+        compose = eina_str_convert(nl_langinfo(CODESET), "UTF-8",
+                                   compose_buffer);
+        tmp = compose;
+     }
 
    key = XKeysymToString(sym);
    if (!key)
-      key = keyname;
+     key = keyname;
 
    e =
-      malloc(sizeof(Ecore_Event_Key) + strlen(key) + strlen(keyname) +
-             (compose ? strlen(compose) : 0) + 3);
+     malloc(sizeof(Ecore_Event_Key) + strlen(key) + strlen(keyname) +
+            (compose ? strlen(compose) : 0) + 3);
    if (!e)
-      goto on_error;
+     goto on_error;
 
    e->keyname = (char *)(e + 1);
    e->key = e->keyname + strlen(keyname) + 1;
@@ -315,9 +321,9 @@ _ecore_key_press(int event, XKeyEvent *xevent)
    e->string = e->compose;
 
    strcpy((char *)e->keyname, keyname);
-   strcpy((char *)e->key,     key);
+   strcpy((char *)e->key, key);
    if (compose)
-      strcpy((char *)e->compose, compose);
+     strcpy((char *)e->compose, compose);
 
    e->modifiers = _ecore_x_event_modifiers(xevent->state);
 
@@ -333,7 +339,7 @@ _ecore_key_press(int event, XKeyEvent *xevent)
 
 on_error:
    if (tmp)
-      free(tmp);
+     free(tmp);
 } /* _ecore_key_press */
 
 Ecore_Event_Mouse_Button *
@@ -363,7 +369,7 @@ _ecore_mouse_button(int          event,
 
    e = malloc(sizeof(Ecore_Event_Mouse_Button));
    if (!e)
-      return NULL;
+     return NULL;
 
    e->window = window;
    e->root_window = root_win;
@@ -398,37 +404,37 @@ _ecore_mouse_button(int          event,
           {
              if (event == ECORE_EVENT_MOUSE_BUTTON_DOWN)
                {
-                  //Check Double Clicked
-                  if (((int)(timestamp - down_info->last_time) <=
-                       (int)(1000 * _ecore_x_double_click_time)) &&
-                      (window == down_info->last_win) &&
-                      (event_window == down_info->last_event_win))
-                    {
-                       e->double_click = 1;
-                       down_info->did_double = EINA_TRUE;
-                    }
-                  else
-                    {
-                       down_info->did_double = EINA_FALSE;
-                       down_info->did_triple = EINA_FALSE;
-                    }
-
-                  //Check Triple Clicked
-                  if (((int)(timestamp - down_info->last_last_time) <=
-                       (int)(2 * 1000 * _ecore_x_double_click_time)) &&
-                      (window == down_info->last_win) &&
-                      (window == down_info->last_last_win) &&
-                      (event_window == down_info->last_event_win) &&
-                      (event_window == down_info->last_last_event_win)
-                     )
-                    {
-                       e->triple_click = 1;
-                       down_info->did_triple = EINA_TRUE;
-                    }
-                  else
-                    {
-                       down_info->did_triple = EINA_FALSE;
-                    }
+     //Check Double Clicked
+                    if (((int)(timestamp - down_info->last_time) <=
+                         (int)(1000 * _ecore_x_double_click_time)) &&
+                        (window == down_info->last_win) &&
+                        (event_window == down_info->last_event_win))
+                      {
+                         e->double_click = 1;
+                         down_info->did_double = EINA_TRUE;
+                      }
+                    else
+                      {
+                         down_info->did_double = EINA_FALSE;
+                         down_info->did_triple = EINA_FALSE;
+                      }
+
+     //Check Triple Clicked
+                    if (((int)(timestamp - down_info->last_last_time) <=
+                         (int)(2 * 1000 * _ecore_x_double_click_time)) &&
+                        (window == down_info->last_win) &&
+                        (window == down_info->last_last_win) &&
+                        (event_window == down_info->last_event_win) &&
+                        (event_window == down_info->last_last_event_win)
+                        )
+                      {
+                         e->triple_click = 1;
+                         down_info->did_triple = EINA_TRUE;
+                      }
+                    else
+                      {
+                         down_info->did_triple = EINA_FALSE;
+                      }
                }
              else
                {
@@ -444,7 +450,7 @@ _ecore_mouse_button(int          event,
     * no use. The variable is also commented out above. This code block is
     * the only place that this variable is used, and appears to serve no
     * purpose. - dh
-   if (event == ECORE_EVENT_MOUSE_BUTTON_DOWN
+      if (event == ECORE_EVENT_MOUSE_BUTTON_DOWN
        && !e->double_click
        && !e->triple_click)
       _ecore_x_mouse_up_count = 0;
@@ -517,7 +523,7 @@ _ecore_x_event_handle_button_press(XEvent *xevent)
 
         e = malloc(sizeof(Ecore_Event_Mouse_Wheel));
         if (!e)
-           return;
+          return;
 
         e->timestamp = xevent->xbutton.time;
         e->modifiers = _ecore_x_event_modifiers(xevent->xbutton.state);
@@ -540,9 +546,9 @@ _ecore_x_event_handle_button_press(XEvent *xevent)
         e->root.y = xevent->xbutton.y_root;
 
         if (xevent->xbutton.subwindow)
-           e->window = xevent->xbutton.subwindow;
+          e->window = xevent->xbutton.subwindow;
         else
-           e->window = xevent->xbutton.window;
+          e->window = xevent->xbutton.window;
 
         e->event_window = xevent->xbutton.window;
         e->same_screen = xevent->xbutton.same_screen;
@@ -562,17 +568,17 @@ _ecore_x_event_handle_button_press(XEvent *xevent)
                   Eina_Bool replay = EINA_FALSE;
 
                   if (_ecore_window_grab_replay_func)
-                     replay = _ecore_window_grab_replay_func(
-                           _ecore_window_grab_replay_data,
-                           ECORE_EVENT_MOUSE_WHEEL,
-                           e);
+                    replay = _ecore_window_grab_replay_func(
+                        _ecore_window_grab_replay_data,
+                        ECORE_EVENT_MOUSE_WHEEL,
+                        e);
 
                   if (replay)
-                     XAllowEvents(xevent->xbutton.display,
-                                  ReplayPointer, xevent->xbutton.time);
+                    XAllowEvents(xevent->xbutton.display,
+                                 ReplayPointer, xevent->xbutton.time);
                   else
-                     XAllowEvents(xevent->xbutton.display,
-                                  AsyncPointer, xevent->xbutton.time);
+                    XAllowEvents(xevent->xbutton.display,
+                                 AsyncPointer, xevent->xbutton.time);
 
                   break;
                }
@@ -601,8 +607,8 @@ _ecore_x_event_handle_button_press(XEvent *xevent)
            int window;
 
            window =
-              (xevent->xbutton.subwindow ? xevent->xbutton.subwindow : xevent->
-               xbutton.window);
+             (xevent->xbutton.subwindow ? xevent->xbutton.subwindow : xevent->
+              xbutton.window);
            event_window = xevent->xbutton.window;
 
            e = _ecore_mouse_button(ECORE_EVENT_MOUSE_BUTTON_DOWN,
@@ -629,29 +635,29 @@ _ecore_x_event_handle_button_press(XEvent *xevent)
                                    xevent->xbutton.x_root,
                                    xevent->xbutton.y_root);
            if (e)
-              for (i = 0; i < _ecore_window_grabs_num; i++)
-                {
-                   if ((_ecore_window_grabs[i] == xevent->xbutton.window) ||
-                       (_ecore_window_grabs[i] == xevent->xbutton.subwindow))
-                     {
-                        Eina_Bool replay = EINA_FALSE;
-
-                        if (_ecore_window_grab_replay_func)
-                           replay = _ecore_window_grab_replay_func(
-                                 _ecore_window_grab_replay_data,
-                                 ECORE_EVENT_MOUSE_BUTTON_DOWN,
-                                 e);
-
-                        if (replay)
-                           XAllowEvents(xevent->xbutton.display,
-                                        ReplayPointer, xevent->xbutton.time);
-                        else
-                           XAllowEvents(xevent->xbutton.display,
-                                        AsyncPointer, xevent->xbutton.time);
-
-                        break;
-                     }
-                }
+             for (i = 0; i < _ecore_window_grabs_num; i++)
+               {
+                  if ((_ecore_window_grabs[i] == xevent->xbutton.window) ||
+                      (_ecore_window_grabs[i] == xevent->xbutton.subwindow))
+                    {
+                       Eina_Bool replay = EINA_FALSE;
+
+                       if (_ecore_window_grab_replay_func)
+                         replay = _ecore_window_grab_replay_func(
+                             _ecore_window_grab_replay_data,
+                             ECORE_EVENT_MOUSE_BUTTON_DOWN,
+                             e);
+
+                       if (replay)
+                         XAllowEvents(xevent->xbutton.display,
+                                      ReplayPointer, xevent->xbutton.time);
+                       else
+                         XAllowEvents(xevent->xbutton.display,
+                                      AsyncPointer, xevent->xbutton.time);
+
+                       break;
+                    }
+               }
         }
      }
 } /* _ecore_x_event_handle_button_press */
@@ -706,26 +712,26 @@ _ecore_x_event_handle_motion_notify(XEvent *xevent)
         _ecore_x_last_event_mouse_move_event = NULL;
      }
  */
-   _ecore_mouse_move(xevent->xmotion.time, xevent->xmotion.state,
-                     xevent->xmotion.x, xevent->xmotion.y,
-                     xevent->xmotion.x_root, xevent->xmotion.y_root,
-                     xevent->xmotion.window,
-                     (xevent->xmotion.subwindow ? xevent->xmotion.subwindow :
-                      xevent->xmotion.window),
-                     xevent->xmotion.root,
-                     xevent->xmotion.same_screen,
-                     0, 1, 1,
-                     1.0, // pressure
-                     0.0, // angle
-                     xevent->xmotion.x, xevent->xmotion.y,
-                     xevent->xmotion.x_root, xevent->xmotion.y_root);
-
-   _ecore_x_last_event_mouse_move = 1;
-
-   /* Xdnd handling */
-   _ecore_x_dnd_drag(xevent->xmotion.root,
-                     xevent->xmotion.x_root,
-                     xevent->xmotion.y_root);
+     _ecore_mouse_move(xevent->xmotion.time, xevent->xmotion.state,
+                       xevent->xmotion.x, xevent->xmotion.y,
+                       xevent->xmotion.x_root, xevent->xmotion.y_root,
+                       xevent->xmotion.window,
+                       (xevent->xmotion.subwindow ? xevent->xmotion.subwindow :
+                        xevent->xmotion.window),
+                       xevent->xmotion.root,
+                       xevent->xmotion.same_screen,
+                       0, 1, 1,
+                       1.0, // pressure
+                       0.0, // angle
+                       xevent->xmotion.x, xevent->xmotion.y,
+                       xevent->xmotion.x_root, xevent->xmotion.y_root);
+
+     _ecore_x_last_event_mouse_move = 1;
+
+     /* Xdnd handling */
+     _ecore_x_dnd_drag(xevent->xmotion.root,
+                       xevent->xmotion.x_root,
+                       xevent->xmotion.y_root);
 } /* _ecore_x_event_handle_motion_notify */
 
 void
@@ -752,7 +758,7 @@ _ecore_x_event_handle_enter_notify(XEvent *xevent)
 
       e = calloc(1, sizeof(Ecore_X_Event_Mouse_In));
       if (!e)
-         return;
+        return;
 
       e->modifiers = _ecore_x_event_modifiers(xevent->xcrossing.state);
       e->x = xevent->xcrossing.x;
@@ -760,31 +766,31 @@ _ecore_x_event_handle_enter_notify(XEvent *xevent)
       e->root.x = xevent->xcrossing.x_root;
       e->root.y = xevent->xcrossing.y_root;
       if (xevent->xcrossing.subwindow)
-         e->win = xevent->xcrossing.subwindow;
+        e->win = xevent->xcrossing.subwindow;
       else
-         e->win = xevent->xcrossing.window;
+        e->win = xevent->xcrossing.window;
 
       e->same_screen = xevent->xcrossing.same_screen;
       e->root_win = xevent->xcrossing.root;
       e->event_win = xevent->xcrossing.window;
 
       if (xevent->xcrossing.mode == NotifyNormal)
-         e->mode = ECORE_X_EVENT_MODE_NORMAL;
+        e->mode = ECORE_X_EVENT_MODE_NORMAL;
       else if (xevent->xcrossing.mode == NotifyGrab)
-         e->mode = ECORE_X_EVENT_MODE_GRAB;
+        e->mode = ECORE_X_EVENT_MODE_GRAB;
       else if (xevent->xcrossing.mode == NotifyUngrab)
-         e->mode = ECORE_X_EVENT_MODE_UNGRAB;
+        e->mode = ECORE_X_EVENT_MODE_UNGRAB;
 
       if (xevent->xcrossing.detail == NotifyAncestor)
-         e->detail = ECORE_X_EVENT_DETAIL_ANCESTOR;
+        e->detail = ECORE_X_EVENT_DETAIL_ANCESTOR;
       else if (xevent->xcrossing.detail == NotifyVirtual)
-         e->detail = ECORE_X_EVENT_DETAIL_VIRTUAL;
+        e->detail = ECORE_X_EVENT_DETAIL_VIRTUAL;
       else if (xevent->xcrossing.detail == NotifyInferior)
-         e->detail = ECORE_X_EVENT_DETAIL_INFERIOR;
+        e->detail = ECORE_X_EVENT_DETAIL_INFERIOR;
       else if (xevent->xcrossing.detail == NotifyNonlinear)
-         e->detail = ECORE_X_EVENT_DETAIL_NON_LINEAR;
+        e->detail = ECORE_X_EVENT_DETAIL_NON_LINEAR;
       else if (xevent->xcrossing.detail == NotifyNonlinearVirtual)
-         e->detail = ECORE_X_EVENT_DETAIL_NON_LINEAR_VIRTUAL;
+        e->detail = ECORE_X_EVENT_DETAIL_NON_LINEAR_VIRTUAL;
 
       e->time = xevent->xcrossing.time;
       _ecore_x_event_last_time = e->time;
@@ -816,7 +822,7 @@ _ecore_x_event_handle_leave_notify(XEvent *xevent)
 
       e = calloc(1, sizeof(Ecore_X_Event_Mouse_Out));
       if (!e)
-         return;
+        return;
 
       e->modifiers = _ecore_x_event_modifiers(xevent->xcrossing.state);
       e->x = xevent->xcrossing.x;
@@ -824,31 +830,31 @@ _ecore_x_event_handle_leave_notify(XEvent *xevent)
       e->root.x = xevent->xcrossing.x_root;
       e->root.y = xevent->xcrossing.y_root;
       if (xevent->xcrossing.subwindow)
-         e->win = xevent->xcrossing.subwindow;
+        e->win = xevent->xcrossing.subwindow;
       else
-         e->win = xevent->xcrossing.window;
+        e->win = xevent->xcrossing.window;
 
       e->same_screen = xevent->xcrossing.same_screen;
       e->root_win = xevent->xcrossing.root;
       e->event_win = xevent->xcrossing.window;
 
       if (xevent->xcrossing.mode == NotifyNormal)
-         e->mode = ECORE_X_EVENT_MODE_NORMAL;
+        e->mode = ECORE_X_EVENT_MODE_NORMAL;
       else if (xevent->xcrossing.mode == NotifyGrab)
-         e->mode = ECORE_X_EVENT_MODE_GRAB;
+        e->mode = ECORE_X_EVENT_MODE_GRAB;
       else if (xevent->xcrossing.mode == NotifyUngrab)
-         e->mode = ECORE_X_EVENT_MODE_UNGRAB;
+        e->mode = ECORE_X_EVENT_MODE_UNGRAB;
 
       if (xevent->xcrossing.detail == NotifyAncestor)
-         e->detail = ECORE_X_EVENT_DETAIL_ANCESTOR;
+        e->detail = ECORE_X_EVENT_DETAIL_ANCESTOR;
       else if (xevent->xcrossing.detail == NotifyVirtual)
-         e->detail = ECORE_X_EVENT_DETAIL_VIRTUAL;
+        e->detail = ECORE_X_EVENT_DETAIL_VIRTUAL;
       else if (xevent->xcrossing.detail == NotifyInferior)
-         e->detail = ECORE_X_EVENT_DETAIL_INFERIOR;
+        e->detail = ECORE_X_EVENT_DETAIL_INFERIOR;
       else if (xevent->xcrossing.detail == NotifyNonlinear)
-         e->detail = ECORE_X_EVENT_DETAIL_NON_LINEAR;
+        e->detail = ECORE_X_EVENT_DETAIL_NON_LINEAR;
       else if (xevent->xcrossing.detail == NotifyNonlinearVirtual)
-         e->detail = ECORE_X_EVENT_DETAIL_NON_LINEAR_VIRTUAL;
+        e->detail = ECORE_X_EVENT_DETAIL_NON_LINEAR_VIRTUAL;
 
       e->time = xevent->xcrossing.time;
       _ecore_x_event_last_time = e->time;
@@ -868,35 +874,35 @@ _ecore_x_event_handle_focus_in(XEvent *xevent)
 
    e = calloc(1, sizeof(Ecore_X_Event_Window_Focus_In));
    if (!e)
-      return;
+     return;
 
    e->win = xevent->xfocus.window;
 
    if (xevent->xfocus.mode == NotifyNormal)
-      e->mode = ECORE_X_EVENT_MODE_NORMAL;
+     e->mode = ECORE_X_EVENT_MODE_NORMAL;
    else if (xevent->xfocus.mode == NotifyWhileGrabbed)
-      e->mode = ECORE_X_EVENT_MODE_WHILE_GRABBED;
+     e->mode = ECORE_X_EVENT_MODE_WHILE_GRABBED;
    else if (xevent->xfocus.mode == NotifyGrab)
-      e->mode = ECORE_X_EVENT_MODE_GRAB;
+     e->mode = ECORE_X_EVENT_MODE_GRAB;
    else if (xevent->xfocus.mode == NotifyUngrab)
-      e->mode = ECORE_X_EVENT_MODE_UNGRAB;
+     e->mode = ECORE_X_EVENT_MODE_UNGRAB;
 
    if (xevent->xfocus.detail == NotifyAncestor)
-      e->detail = ECORE_X_EVENT_DETAIL_ANCESTOR;
+     e->detail = ECORE_X_EVENT_DETAIL_ANCESTOR;
    else if (xevent->xfocus.detail == NotifyVirtual)
-      e->detail = ECORE_X_EVENT_DETAIL_VIRTUAL;
+     e->detail = ECORE_X_EVENT_DETAIL_VIRTUAL;
    else if (xevent->xfocus.detail == NotifyInferior)
-      e->detail = ECORE_X_EVENT_DETAIL_INFERIOR;
+     e->detail = ECORE_X_EVENT_DETAIL_INFERIOR;
    else if (xevent->xfocus.detail == NotifyNonlinear)
-      e->detail = ECORE_X_EVENT_DETAIL_NON_LINEAR;
+     e->detail = ECORE_X_EVENT_DETAIL_NON_LINEAR;
    else if (xevent->xfocus.detail == NotifyNonlinearVirtual)
-      e->detail = ECORE_X_EVENT_DETAIL_NON_LINEAR_VIRTUAL;
+     e->detail = ECORE_X_EVENT_DETAIL_NON_LINEAR_VIRTUAL;
    else if (xevent->xfocus.detail == NotifyPointer)
-      e->detail = ECORE_X_EVENT_DETAIL_POINTER;
+     e->detail = ECORE_X_EVENT_DETAIL_POINTER;
    else if (xevent->xfocus.detail == NotifyPointerRoot)
-      e->detail = ECORE_X_EVENT_DETAIL_POINTER_ROOT;
+     e->detail = ECORE_X_EVENT_DETAIL_POINTER_ROOT;
    else if (xevent->xfocus.detail == NotifyDetailNone)
-      e->detail = ECORE_X_EVENT_DETAIL_DETAIL_NONE;
+     e->detail = ECORE_X_EVENT_DETAIL_DETAIL_NONE;
 
    e->time = _ecore_x_event_last_time;
    _ecore_x_event_last_time = e->time;
@@ -912,35 +918,35 @@ _ecore_x_event_handle_focus_out(XEvent *xevent)
 
    e = calloc(1, sizeof(Ecore_X_Event_Window_Focus_Out));
    if (!e)
-      return;
+     return;
 
    e->win = xevent->xfocus.window;
 
    if (xevent->xfocus.mode == NotifyNormal)
-      e->mode = ECORE_X_EVENT_MODE_NORMAL;
+     e->mode = ECORE_X_EVENT_MODE_NORMAL;
    else if (xevent->xfocus.mode == NotifyWhileGrabbed)
-      e->mode = ECORE_X_EVENT_MODE_WHILE_GRABBED;
+     e->mode = ECORE_X_EVENT_MODE_WHILE_GRABBED;
    else if (xevent->xfocus.mode == NotifyGrab)
-      e->mode = ECORE_X_EVENT_MODE_GRAB;
+     e->mode = ECORE_X_EVENT_MODE_GRAB;
    else if (xevent->xfocus.mode == NotifyUngrab)
-      e->mode = ECORE_X_EVENT_MODE_UNGRAB;
+     e->mode = ECORE_X_EVENT_MODE_UNGRAB;
 
    if (xevent->xfocus.detail == NotifyAncestor)
-      e->detail = ECORE_X_EVENT_DETAIL_ANCESTOR;
+     e->detail = ECORE_X_EVENT_DETAIL_ANCESTOR;
    else if (xevent->xfocus.detail == NotifyVirtual)
-      e->detail = ECORE_X_EVENT_DETAIL_VIRTUAL;
+     e->detail = ECORE_X_EVENT_DETAIL_VIRTUAL;
    else if (xevent->xfocus.detail == NotifyInferior)
-      e->detail = ECORE_X_EVENT_DETAIL_INFERIOR;
+     e->detail = ECORE_X_EVENT_DETAIL_INFERIOR;
    else if (xevent->xfocus.detail == NotifyNonlinear)
-      e->detail = ECORE_X_EVENT_DETAIL_NON_LINEAR;
+     e->detail = ECORE_X_EVENT_DETAIL_NON_LINEAR;
    else if (xevent->xfocus.detail == NotifyNonlinearVirtual)
-      e->detail = ECORE_X_EVENT_DETAIL_NON_LINEAR_VIRTUAL;
+     e->detail = ECORE_X_EVENT_DETAIL_NON_LINEAR_VIRTUAL;
    else if (xevent->xfocus.detail == NotifyPointer)
-      e->detail = ECORE_X_EVENT_DETAIL_POINTER;
+     e->detail = ECORE_X_EVENT_DETAIL_POINTER;
    else if (xevent->xfocus.detail == NotifyPointerRoot)
-      e->detail = ECORE_X_EVENT_DETAIL_POINTER_ROOT;
+     e->detail = ECORE_X_EVENT_DETAIL_POINTER_ROOT;
    else if (xevent->xfocus.detail == NotifyDetailNone)
-      e->detail = ECORE_X_EVENT_DETAIL_DETAIL_NONE;
+     e->detail = ECORE_X_EVENT_DETAIL_DETAIL_NONE;
 
    e->time = _ecore_x_event_last_time;
    _ecore_x_event_last_time = e->time;
@@ -962,7 +968,7 @@ _ecore_x_event_handle_expose(XEvent *xevent)
    _ecore_x_last_event_mouse_move = 0;
    e = calloc(1, sizeof(Ecore_X_Event_Window_Damage));
    if (!e)
-      return;
+     return;
 
    e->win = xevent->xexpose.window;
    e->time = _ecore_x_event_last_time;
@@ -982,7 +988,7 @@ _ecore_x_event_handle_graphics_expose(XEvent *xevent)
    _ecore_x_last_event_mouse_move = 0;
    e = calloc(1, sizeof(Ecore_X_Event_Window_Damage));
    if (!e)
-      return;
+     return;
 
    e->win = xevent->xgraphicsexpose.drawable;
    e->time = _ecore_x_event_last_time;
@@ -1004,14 +1010,14 @@ _ecore_x_event_handle_visibility_notify(XEvent *xevent)
 
       e = calloc(1, sizeof(Ecore_X_Event_Window_Visibility_Change));
       if (!e)
-         return;
+        return;
 
       e->win = xevent->xvisibility.window;
       e->time = _ecore_x_event_last_time;
       if (xevent->xvisibility.state == VisibilityFullyObscured)
-         e->fully_obscured = 1;
+        e->fully_obscured = 1;
       else
-         e->fully_obscured = 0;
+        e->fully_obscured = 0;
 
       ecore_event_add(ECORE_X_EVENT_WINDOW_VISIBILITY_CHANGE, e, NULL, NULL);
    }
@@ -1025,14 +1031,14 @@ _ecore_x_event_handle_create_notify(XEvent *xevent)
    _ecore_x_last_event_mouse_move = 0;
    e = calloc(1, sizeof(Ecore_X_Event_Window_Create));
    if (!e)
-      return;
+     return;
 
    e->win = xevent->xcreatewindow.window;
    e->parent = xevent->xcreatewindow.parent;
    if (xevent->xcreatewindow.override_redirect)
-      e->override = 1;
+     e->override = 1;
    else
-      e->override = 0;
+     e->override = 0;
 
    e->x = xevent->xcreatewindow.x;
    e->y = xevent->xcreatewindow.y;
@@ -1051,13 +1057,13 @@ _ecore_x_event_handle_destroy_notify(XEvent *xevent)
    _ecore_x_last_event_mouse_move = 0;
    e = calloc(1, sizeof(Ecore_X_Event_Window_Destroy));
    if (!e)
-      return;
+     return;
 
    e->win = xevent->xdestroywindow.window;
    e->event_win = xevent->xdestroywindow.event;
    e->time = _ecore_x_event_last_time;
    if (e->win == _ecore_x_event_last_win)
-      _ecore_x_event_last_win = 0;
+     _ecore_x_event_last_win = 0;
 
    ecore_event_add(ECORE_X_EVENT_WINDOW_DESTROY, e, NULL, NULL);
 } /* _ecore_x_event_handle_destroy_notify */
@@ -1070,7 +1076,7 @@ _ecore_x_event_handle_unmap_notify(XEvent *xevent)
    _ecore_x_last_event_mouse_move = 0;
    e = calloc(1, sizeof(Ecore_X_Event_Window_Hide));
    if (!e)
-      return;
+     return;
 
    e->win = xevent->xunmap.window;
    e->event_win = xevent->xunmap.event;
@@ -1086,7 +1092,7 @@ _ecore_x_event_handle_map_notify(XEvent *xevent)
    _ecore_x_last_event_mouse_move = 0;
    e = calloc(1, sizeof(Ecore_X_Event_Window_Show));
    if (!e)
-      return;
+     return;
 
    e->win = xevent->xmap.window;
    e->event_win = xevent->xmap.event;
@@ -1102,7 +1108,7 @@ _ecore_x_event_handle_map_request(XEvent *xevent)
    _ecore_x_last_event_mouse_move = 0;
    e = calloc(1, sizeof(Ecore_X_Event_Window_Show_Request));
    if (!e)
-      return;
+     return;
 
    e->win = xevent->xmaprequest.window;
    e->time = _ecore_x_event_last_time;
@@ -1118,7 +1124,7 @@ _ecore_x_event_handle_reparent_notify(XEvent *xevent)
    _ecore_x_last_event_mouse_move = 0;
    e = calloc(1, sizeof(Ecore_X_Event_Window_Reparent));
    if (!e)
-      return;
+     return;
 
    e->win = xevent->xreparent.window;
    e->event_win = xevent->xreparent.event;
@@ -1135,7 +1141,7 @@ _ecore_x_event_handle_configure_notify(XEvent *xevent)
    _ecore_x_last_event_mouse_move = 0;
    e = calloc(1, sizeof(Ecore_X_Event_Window_Configure));
    if (!e)
-      return;
+     return;
 
    e->win = xevent->xconfigure.window;
    e->event_win = xevent->xconfigure.event;
@@ -1159,7 +1165,7 @@ _ecore_x_event_handle_configure_request(XEvent *xevent)
    _ecore_x_last_event_mouse_move = 0;
    e = calloc(1, sizeof(Ecore_X_Event_Window_Configure_Request));
    if (!e)
-      return;
+     return;
 
    e->win = xevent->xconfigurerequest.window;
    e->parent_win = xevent->xconfigurerequest.parent;
@@ -1173,15 +1179,15 @@ _ecore_x_event_handle_configure_request(XEvent *xevent)
    e->time = _ecore_x_event_last_time;
 
    if (xevent->xconfigurerequest.detail == Above)
-      e->detail = ECORE_X_WINDOW_STACK_ABOVE;
+     e->detail = ECORE_X_WINDOW_STACK_ABOVE;
    else if (xevent->xconfigurerequest.detail == Below)
-      e->detail = ECORE_X_WINDOW_STACK_BELOW;
+     e->detail = ECORE_X_WINDOW_STACK_BELOW;
    else if (xevent->xconfigurerequest.detail == TopIf)
-      e->detail = ECORE_X_WINDOW_STACK_TOP_IF;
+     e->detail = ECORE_X_WINDOW_STACK_TOP_IF;
    else if (xevent->xconfigurerequest.detail == BottomIf)
-      e->detail = ECORE_X_WINDOW_STACK_BOTTOM_IF;
+     e->detail = ECORE_X_WINDOW_STACK_BOTTOM_IF;
    else if (xevent->xconfigurerequest.detail == Opposite)
-      e->detail = ECORE_X_WINDOW_STACK_OPPOSITE;
+     e->detail = ECORE_X_WINDOW_STACK_OPPOSITE;
 
    ecore_event_add(ECORE_X_EVENT_WINDOW_CONFIGURE_REQUEST, e, NULL, NULL);
 } /* _ecore_x_event_handle_configure_request */
@@ -1201,7 +1207,7 @@ _ecore_x_event_handle_resize_request(XEvent *xevent)
    _ecore_x_last_event_mouse_move = 0;
    e = calloc(1, sizeof(Ecore_X_Event_Window_Resize_Request));
    if (!e)
-      return;
+     return;
 
    e->win = xevent->xresizerequest.window;
    e->w = xevent->xresizerequest.width;
@@ -1218,14 +1224,14 @@ _ecore_x_event_handle_circulate_notify(XEvent *xevent)
    _ecore_x_last_event_mouse_move = 0;
    e = calloc(1, sizeof(Ecore_X_Event_Window_Stack));
    if (!e)
-      return;
+     return;
 
    e->win = xevent->xcirculate.window;
    e->event_win = xevent->xcirculate.event;
    if (xevent->xcirculate.place == PlaceOnTop)
-      e->detail = ECORE_X_WINDOW_STACK_ABOVE;
+     e->detail = ECORE_X_WINDOW_STACK_ABOVE;
    else
-      e->detail = ECORE_X_WINDOW_STACK_BELOW;
+     e->detail = ECORE_X_WINDOW_STACK_BELOW;
 
    e->time = _ecore_x_event_last_time;
    ecore_event_add(ECORE_X_EVENT_WINDOW_STACK, e, NULL, NULL);
@@ -1239,14 +1245,14 @@ _ecore_x_event_handle_circulate_request(XEvent *xevent)
    _ecore_x_last_event_mouse_move = 0;
    e = calloc(1, sizeof(Ecore_X_Event_Window_Stack_Request));
    if (!e)
-      return;
+     return;
 
    e->win = xevent->xcirculaterequest.window;
    e->parent = xevent->xcirculaterequest.parent;
    if (xevent->xcirculaterequest.place == PlaceOnTop)
-      e->detail = ECORE_X_WINDOW_STACK_ABOVE;
+     e->detail = ECORE_X_WINDOW_STACK_ABOVE;
    else
-      e->detail = ECORE_X_WINDOW_STACK_BELOW;
+     e->detail = ECORE_X_WINDOW_STACK_BELOW;
 
    e->time = _ecore_x_event_last_time;
    ecore_event_add(ECORE_X_EVENT_WINDOW_STACK_REQUEST, e, NULL, NULL);
@@ -1261,7 +1267,7 @@ _ecore_x_event_handle_property_notify(XEvent *xevent)
 
       e = calloc(1, sizeof(Ecore_X_Event_Window_Property));
       if (!e)
-         return;
+        return;
 
       e->win = xevent->xproperty.window;
       e->atom = xevent->xproperty.atom;
@@ -1275,11 +1281,11 @@ void
 _ecore_x_event_handle_selection_clear(XEvent *xevent)
 {
 //   Ecore_X_Selection_Intern *d;
-   Ecore_X_Event_Selection_Clear *e;
-   Ecore_X_Atom sel;
+     Ecore_X_Event_Selection_Clear *e;
+     Ecore_X_Atom sel;
 
-   LOGFN(__FILE__, __LINE__, __FUNCTION__);
-   _ecore_x_last_event_mouse_move = 0;
+     LOGFN(__FILE__, __LINE__, __FUNCTION__);
+     _ecore_x_last_event_mouse_move = 0;
 /* errr..... why? paranoia.
    d = _ecore_x_selection_get(xevent->xselectionclear.selection);
    if (d && (xevent->xselectionclear.time > d->time))
@@ -1289,20 +1295,20 @@ _ecore_x_event_handle_selection_clear(XEvent *xevent)
      }
  */
 /* Generate event for app cleanup */
-   e = malloc(sizeof(Ecore_X_Event_Selection_Clear));
-   e->win = xevent->xselectionclear.window;
-   e->time = xevent->xselectionclear.time;
-   e->atom = sel = xevent->xselectionclear.selection;
-   if (sel == ECORE_X_ATOM_SELECTION_PRIMARY)
-      e->selection = ECORE_X_SELECTION_PRIMARY;
-   else if (sel == ECORE_X_ATOM_SELECTION_SECONDARY)
-      e->selection = ECORE_X_SELECTION_SECONDARY;
-   else if (sel == ECORE_X_ATOM_SELECTION_CLIPBOARD)
-      e->selection = ECORE_X_SELECTION_CLIPBOARD;
-   else
-      e->selection = ECORE_X_SELECTION_OTHER;
-
-   ecore_event_add(ECORE_X_EVENT_SELECTION_CLEAR, e, NULL, NULL);
+     e = malloc(sizeof(Ecore_X_Event_Selection_Clear));
+     e->win = xevent->xselectionclear.window;
+     e->time = xevent->xselectionclear.time;
+     e->atom = sel = xevent->xselectionclear.selection;
+     if (sel == ECORE_X_ATOM_SELECTION_PRIMARY)
+       e->selection = ECORE_X_SELECTION_PRIMARY;
+     else if (sel == ECORE_X_ATOM_SELECTION_SECONDARY)
+       e->selection = ECORE_X_SELECTION_SECONDARY;
+     else if (sel == ECORE_X_ATOM_SELECTION_CLIPBOARD)
+       e->selection = ECORE_X_SELECTION_CLIPBOARD;
+     else
+       e->selection = ECORE_X_SELECTION_OTHER;
+
+     ecore_event_add(ECORE_X_EVENT_SELECTION_CLEAR, e, NULL, NULL);
 } /* _ecore_x_event_handle_selection_clear */
 
 void
@@ -1347,12 +1353,12 @@ _ecore_x_event_handle_selection_request(XEvent *xevent)
              if (!ecore_x_selection_convert(xevent->xselectionrequest.selection,
                                             xevent->xselectionrequest.target,
                                             &data, &len, &type, &typesize))
-                /* Refuse selection, conversion to requested target failed */
-                property = None;
+               /* Refuse selection, conversion to requested target failed */
+               property = None;
              else if (data)
                {
-                  /* FIXME: This does not properly handle large data transfers */
-                  ecore_x_window_prop_property_set(
+     /* FIXME: This does not properly handle large data transfers */
+                   ecore_x_window_prop_property_set(
                      xevent->xselectionrequest.requestor,
                      xevent->xselectionrequest.
                      property,
@@ -1360,8 +1366,8 @@ _ecore_x_event_handle_selection_request(XEvent *xevent)
                      typesize,
                      data,
                      len);
-                  property = xevent->xselectionrequest.property;
-                  free(data);
+                   property = xevent->xselectionrequest.property;
+                   free(data);
                }
 
              ecore_x_selection_notify_send(xevent->xselectionrequest.requestor,
@@ -1391,7 +1397,7 @@ _ecore_x_event_handle_selection_notify(XEvent *xevent)
                                                   xevent->xselection.property,
                                                   XA_ATOM, 32, &data, &num_ret);
         if (!format)
-           return;
+          return;
      }
    else
      {
@@ -1400,12 +1406,12 @@ _ecore_x_event_handle_selection_notify(XEvent *xevent)
                                                   AnyPropertyType, 8, &data,
                                                   &num_ret);
         if (!format)
-           return;
+          return;
      }
 
    e = calloc(1, sizeof(Ecore_X_Event_Selection_Notify));
    if (!e)
-      return;
+     return;
 
    e->win = xevent->xselection.requestor;
    e->time = xevent->xselection.time;
@@ -1413,15 +1419,15 @@ _ecore_x_event_handle_selection_notify(XEvent *xevent)
    e->target = _ecore_x_selection_target_get(xevent->xselection.target);
 
    if (selection == ECORE_X_ATOM_SELECTION_PRIMARY)
-      e->selection = ECORE_X_SELECTION_PRIMARY;
+     e->selection = ECORE_X_SELECTION_PRIMARY;
    else if (selection == ECORE_X_ATOM_SELECTION_SECONDARY)
-      e->selection = ECORE_X_SELECTION_SECONDARY;
+     e->selection = ECORE_X_SELECTION_SECONDARY;
    else if (selection == ECORE_X_ATOM_SELECTION_XDND)
-      e->selection = ECORE_X_SELECTION_XDND;
+     e->selection = ECORE_X_SELECTION_XDND;
    else if (selection == ECORE_X_ATOM_SELECTION_CLIPBOARD)
-      e->selection = ECORE_X_SELECTION_CLIPBOARD;
+     e->selection = ECORE_X_SELECTION_CLIPBOARD;
    else
-      e->selection = ECORE_X_SELECTION_OTHER;
+     e->selection = ECORE_X_SELECTION_OTHER;
 
    e->data = _ecore_x_selection_parse(e->target, data, num_ret, format);
 
@@ -1435,17 +1441,17 @@ _ecore_x_event_handle_colormap_notify(XEvent *xevent)
    Ecore_X_Event_Window_Colormap *e;
 
    _ecore_x_last_event_mouse_move = 0;
-   e = calloc(1,sizeof(Ecore_X_Event_Window_Colormap));
+   e = calloc(1, sizeof(Ecore_X_Event_Window_Colormap));
    if (!e)
-      return;
+     return;
 
    e->win = xevent->xcolormap.window;
    e->cmap = xevent->xcolormap.colormap;
    e->time = _ecore_x_event_last_time;
    if (xevent->xcolormap.state == ColormapInstalled)
-      e->installed = EINA_TRUE;
+     e->installed = EINA_TRUE;
    else
-      e->installed = EINA_FALSE;
+     e->installed = EINA_FALSE;
 
    ecore_event_add(ECORE_X_EVENT_WINDOW_COLORMAP, e, NULL, NULL);
 } /* _ecore_x_event_handle_colormap_notify */
@@ -1466,7 +1472,7 @@ _ecore_x_event_handle_client_message(XEvent *xevent)
 
         e = calloc(1, sizeof(Ecore_X_Event_Window_Delete_Request));
         if (!e)
-           return;
+          return;
 
         e->win = xevent->xclient.window;
         e->time = _ecore_x_event_last_time;
@@ -1481,7 +1487,7 @@ _ecore_x_event_handle_client_message(XEvent *xevent)
 
         e = calloc(1, sizeof(Ecore_X_Event_Window_Move_Resize_Request));
         if (!e)
-           return;
+          return;
 
         e->win = xevent->xclient.window;
         e->x = xevent->xclient.data.l[0];
@@ -1519,32 +1525,32 @@ _ecore_x_event_handle_client_message(XEvent *xevent)
         if (xevent->xclient.data.l[1] & 0x1UL)
           {
              /* source supports more than 3 types, fetch property */
-             unsigned char *data;
-             Ecore_X_Atom *types;
-             int i, num_ret;
-
-             LOGFN(__FILE__, __LINE__, __FUNCTION__);
-             if (!(ecore_x_window_prop_property_get(target->source,
-                                                    ECORE_X_ATOM_XDND_TYPE_LIST,
-                                                    XA_ATOM,
-                                                    32, &data, &num_ret)))
-               {
-                  WRN(
+              unsigned char *data;
+              Ecore_X_Atom *types;
+              int i, num_ret;
+
+              LOGFN(__FILE__, __LINE__, __FUNCTION__);
+              if (!(ecore_x_window_prop_property_get(target->source,
+                                                     ECORE_X_ATOM_XDND_TYPE_LIST,
+                                                     XA_ATOM,
+                                                     32, &data, &num_ret)))
+                {
+                   WRN(
                      "DND: Could not fetch data type list from source window, aborting.");
-                  free(e);
-                  return;
-               }
+                   free(e);
+                   return;
+                }
 
-             types = (Ecore_X_Atom *)data;
-             e->types = calloc(num_ret, sizeof(char *));
-             if (e->types)
-               {
-                  LOGFN(__FILE__, __LINE__, __FUNCTION__);
-                  for (i = 0; i < num_ret; i++)
+              types = (Ecore_X_Atom *)data;
+              e->types = calloc(num_ret, sizeof(char *));
+              if (e->types)
+                {
+                   LOGFN(__FILE__, __LINE__, __FUNCTION__);
+                   for (i = 0; i < num_ret; i++)
                      e->types[i] = XGetAtomName(_ecore_x_disp, types[i]);
-               }
+                }
 
-             e->num_types = num_ret;
+              e->num_types = num_ret;
           }
         else
           {
@@ -1678,7 +1684,7 @@ _ecore_x_event_handle_client_message(XEvent *xevent)
           return;
 
         target->time = (target->version >= 1) ?
-           (Time)xevent->xclient.data.l[2] : _ecore_x_event_last_time;
+          (Time)xevent->xclient.data.l[2] : _ecore_x_event_last_time;
 
         e = calloc(1, sizeof(Ecore_X_Event_Xdnd_Drop));
         if (!e) return;
@@ -1749,11 +1755,11 @@ _ecore_x_event_handle_client_message(XEvent *xevent)
 
         e->win = xevent->xclient.window;
         if (xevent->xclient.data.l[0] == 0)
-           e->action = ECORE_X_WINDOW_STATE_ACTION_REMOVE;
+          e->action = ECORE_X_WINDOW_STATE_ACTION_REMOVE;
         else if (xevent->xclient.data.l[0] == 1)
-           e->action = ECORE_X_WINDOW_STATE_ACTION_ADD;
+          e->action = ECORE_X_WINDOW_STATE_ACTION_ADD;
         else if (xevent->xclient.data.l[0] == 2)
-           e->action = ECORE_X_WINDOW_STATE_ACTION_TOGGLE;
+          e->action = ECORE_X_WINDOW_STATE_ACTION_TOGGLE;
         else
           {
              free(e);
@@ -1765,7 +1771,7 @@ _ecore_x_event_handle_client_message(XEvent *xevent)
         if (e->state[0] == ECORE_X_WINDOW_STATE_UNKNOWN)
           {
 //          char *name;
-           LOGFN(__FILE__, __LINE__, __FUNCTION__);
+               LOGFN(__FILE__, __LINE__, __FUNCTION__);
 
 //          name = XGetAtomName(_ecore_x_disp, xevent->xclient.data.l[1]);
 //          if (name) ERR("Unknown state: %s", name);
@@ -1775,7 +1781,7 @@ _ecore_x_event_handle_client_message(XEvent *xevent)
         if (e->state[1] == ECORE_X_WINDOW_STATE_UNKNOWN)
           {
 //          char *name;
-           LOGFN(__FILE__, __LINE__, __FUNCTION__);
+               LOGFN(__FILE__, __LINE__, __FUNCTION__);
 
 //          name = XGetAtomName(_ecore_x_disp, xevent->xclient.data.l[2]);
 //          if (name) ERR("Unknown state: %s", name);
@@ -1794,7 +1800,7 @@ _ecore_x_event_handle_client_message(XEvent *xevent)
 
         e = calloc(1, sizeof(Ecore_X_Event_Window_State_Request));
         if (!e)
-           return;
+          return;
 
         e->win = xevent->xclient.window;
         e->action = ECORE_X_WINDOW_STATE_ACTION_ADD;
@@ -1809,7 +1815,7 @@ _ecore_x_event_handle_client_message(XEvent *xevent)
 
         e = calloc(1, sizeof(Ecore_X_Event_Desktop_Change));
         if (!e)
-           return;
+          return;
 
         e->win = xevent->xclient.window;
         e->desk = xevent->xclient.data.l[0];
@@ -1824,7 +1830,7 @@ _ecore_x_event_handle_client_message(XEvent *xevent)
 
         e = calloc(1, sizeof(Ecore_X_Event_Frame_Extents_Request));
         if (!e)
-           return;
+          return;
 
         e->win = xevent->xclient.window;
 
@@ -1840,7 +1846,7 @@ _ecore_x_event_handle_client_message(XEvent *xevent)
 
         e = calloc(1, sizeof(Ecore_X_Event_Ping));
         if (!e)
-           return;
+          return;
 
         e->win = xevent->xclient.window;
         e->time = xevent->xclient.data.l[1];
@@ -1854,7 +1860,7 @@ _ecore_x_event_handle_client_message(XEvent *xevent)
              root = ecore_x_window_root_get(e->win);
           }
         else
-           root = DefaultRootWindow(_ecore_x_disp);
+          root = DefaultRootWindow(_ecore_x_disp);
 
         if (xevent->xclient.window != root)
           {
@@ -1867,21 +1873,21 @@ _ecore_x_event_handle_client_message(XEvent *xevent)
    else if ((xevent->xclient.message_type ==
              ECORE_X_ATOM_NET_STARTUP_INFO_BEGIN) &&
             (xevent->xclient.format == 8))
-      _ecore_x_netwm_startup_info_begin(xevent->xclient.window,
-                                        xevent->xclient.data.b);
+     _ecore_x_netwm_startup_info_begin(xevent->xclient.window,
+                                       xevent->xclient.data.b);
    else if ((xevent->xclient.message_type == ECORE_X_ATOM_NET_STARTUP_INFO) &&
             (xevent->xclient.format == 8))
-      _ecore_x_netwm_startup_info(xevent->xclient.window,
-                                  xevent->xclient.data.b);
+     _ecore_x_netwm_startup_info(xevent->xclient.window,
+                                 xevent->xclient.data.b);
    else if ((xevent->xclient.message_type == 27777)
             && (xevent->xclient.data.l[0] == 0x7162534)
             && (xevent->xclient.format == 32)
             && (xevent->xclient.window == _ecore_x_private_win))
      {
         /* a grab sync marker */
-        if (xevent->xclient.data.l[1] == 0x10000001)
+         if (xevent->xclient.data.l[1] == 0x10000001)
            _ecore_x_window_grab_remove(xevent->xclient.data.l[2]);
-        else if (xevent->xclient.data.l[1] == 0x10000002)
+         else if (xevent->xclient.data.l[1] == 0x10000002)
            _ecore_x_key_grab_remove(xevent->xclient.data.l[2]);
      }
    else
@@ -1891,13 +1897,13 @@ _ecore_x_event_handle_client_message(XEvent *xevent)
 
         e = calloc(1, sizeof(Ecore_X_Event_Client_Message));
         if (!e)
-           return;
+          return;
 
         e->win = xevent->xclient.window;
         e->message_type = xevent->xclient.message_type;
         e->format = xevent->xclient.format;
         for (i = 0; i < 5; i++)
-           e->data.l[i] = xevent->xclient.data.l[i];
+          e->data.l[i] = xevent->xclient.data.l[i];
 
         ecore_event_add(ECORE_X_EVENT_CLIENT_MESSAGE, e, NULL, NULL);
      }
@@ -1914,18 +1920,20 @@ _ecore_x_event_handle_mapping_notify(XEvent *xevent)
    e = calloc(1, sizeof(Ecore_X_Event_Mapping_Change));
    if (!e) return;
    switch (xevent->xmapping.request)
-      {
+     {
       case MappingModifier:
-         e->type = ECORE_X_MAPPING_MODIFIER;
-         break;
+        e->type = ECORE_X_MAPPING_MODIFIER;
+        break;
+
       case MappingKeyboard:
-         e->type = ECORE_X_MAPPING_KEYBOARD;
-         break;
+        e->type = ECORE_X_MAPPING_KEYBOARD;
+        break;
+
       case MappingPointer:
       default:
-         e->type = ECORE_X_MAPPING_MOUSE;
-         break;
-      }
+        e->type = ECORE_X_MAPPING_MOUSE;
+        break;
+     }
    e->keycode = xevent->xmapping.first_keycode;
    e->num = xevent->xmapping.count;
    ecore_event_add(ECORE_X_EVENT_MAPPING_CHANGE, e, NULL, NULL);
@@ -1941,22 +1949,25 @@ _ecore_x_event_handle_shape_change(XEvent *xevent)
    shape_event = (XShapeEvent *)xevent;
    e = calloc(1, sizeof(Ecore_X_Event_Window_Shape));
    if (!e)
-      return;
+     return;
 
    e->win = shape_event->window;
    e->time = shape_event->time;
    switch (shape_event->kind)
      {
-     case ShapeBounding:
+      case ShapeBounding:
         e->type = ECORE_X_SHAPE_BOUNDING;
         break;
-     case ShapeClip:
+
+      case ShapeClip:
         e->type = ECORE_X_SHAPE_CLIP;
         break;
-     case ShapeInput:
+
+      case ShapeInput:
         e->type = ECORE_X_SHAPE_INPUT;
         break;
-     default:
+
+      default:
         break;
      }
    e->x = shape_event->x;
@@ -1978,13 +1989,13 @@ _ecore_x_event_handle_screensaver_notify(XEvent *xevent)
    screensaver_event = (XScreenSaverNotifyEvent *)xevent;
    e = calloc(1, sizeof(Ecore_X_Event_Screensaver_Notify));
    if (!e)
-      return;
+     return;
 
    e->win = screensaver_event->window;
    if (screensaver_event->state == ScreenSaverOn)
-      e->on = EINA_TRUE;
+     e->on = EINA_TRUE;
    else
-      e->on = EINA_FALSE;
+     e->on = EINA_FALSE;
 
    e->time = screensaver_event->time;
    ecore_event_add(ECORE_X_EVENT_SCREENSAVER_NOTIFY, e, NULL, NULL);
@@ -2003,7 +2014,7 @@ _ecore_x_event_handle_sync_counter(XEvent *xevent)
    sync_counter_event = (XSyncCounterNotifyEvent *)xevent;
    e = calloc(1, sizeof(Ecore_X_Event_Sync_Counter));
    if (!e)
-      return;
+     return;
 
    e->time = sync_counter_event->time;
    ecore_event_add(ECORE_X_EVENT_SYNC_COUNTER, e, NULL, NULL);
@@ -2020,7 +2031,7 @@ _ecore_x_event_handle_sync_alarm(XEvent *xevent)
 
    e = calloc(1, sizeof(Ecore_X_Event_Sync_Alarm));
    if (!e)
-      return;
+     return;
 
    e->time = sync_alarm_event->time;
    e->alarm = sync_alarm_event->alarm;
@@ -2037,11 +2048,11 @@ _ecore_x_event_handle_randr_change(XEvent *xevent)
    _ecore_x_last_event_mouse_move = 0;
    randr_event = (XRRScreenChangeNotifyEvent *)xevent;
    if (!XRRUpdateConfiguration(xevent))
-      ERR("Can't update RR config!");
+     ERR("Can't update RR config!");
 
    e = calloc(1, sizeof(Ecore_X_Event_Screen_Change));
    if (!e)
-      return;
+     return;
 
    e->win = randr_event->window;
    e->root = randr_event->root;
@@ -2066,7 +2077,7 @@ _ecore_x_event_handle_randr_notify_crtc_change(const XRRNotifyEvent *xevent)
 
    e = calloc(1, sizeof(Ecore_X_Event_Randr_Crtc_Change));
    if (!e)
-      return;
+     return;
 
    e->win = randr_event->window;
    e->crtc = randr_event->crtc;
@@ -2089,7 +2100,7 @@ _ecore_x_event_handle_randr_notify_output_change(const XRRNotifyEvent *xevent)
 
    e = calloc(1, sizeof(Ecore_X_Event_Randr_Output_Change));
    if (!e)
-      return;
+     return;
 
    e->win = randr_event->window;
    e->output = randr_event->output;
@@ -2111,16 +2122,16 @@ _ecore_x_event_handle_randr_notify_output_property(const XRRNotifyEvent *xevent)
 
    e = calloc(1, sizeof(Ecore_X_Event_Randr_Output_Property_Notify));
    if (!e)
-      return;
+     return;
 
    e->win = randr_event->window;
    e->output = randr_event->output;
    e->property = randr_event->property;
    e->time = randr_event->timestamp;
    if (randr_event->state == PropertyNewValue)
-      e->state = ECORE_X_RANDR_PROPERTY_CHANGE_ADD;
+     e->state = ECORE_X_RANDR_PROPERTY_CHANGE_ADD;
    else
-      e->state = ECORE_X_RANDR_PROPERTY_CHANGE_DEL;
+     e->state = ECORE_X_RANDR_PROPERTY_CHANGE_DEL;
    ecore_event_add(ECORE_X_EVENT_RANDR_OUTPUT_PROPERTY_NOTIFY, e, NULL, NULL);
 } /* _ecore_x_event_handle_randr_notify_output_property */
 
@@ -2135,21 +2146,21 @@ _ecore_x_event_handle_randr_notify(XEvent *xevent)
    switch (randr_event->subtype)
      {
       case RRNotify_CrtcChange:
-         _ecore_x_event_handle_randr_notify_crtc_change(randr_event);
-         break;
+        _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;
+        _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;
+        _ecore_x_event_handle_randr_notify_output_property(randr_event);
+        break;
 
       default:
-         ERR("Unknown XRandR RRNotify subtype: %d.",
-             randr_event->subtype);
-         break;
+        ERR("Unknown XRandR RRNotify subtype: %d.",
+            randr_event->subtype);
+        break;
      } /* switch */
 } /* _ecore_x_event_handle_randr_notify */
 
@@ -2160,7 +2171,7 @@ void
 _ecore_x_event_handle_fixes_selection_notify(XEvent *event)
 {
    XFixesSelectionNotifyEvent *notify_event =
-      (XFixesSelectionNotifyEvent *) event;
+     (XFixesSelectionNotifyEvent *)event;
    Ecore_X_Event_Fixes_Selection_Notify *e;
    Ecore_X_Atom sel;
 
@@ -2169,7 +2180,7 @@ _ecore_x_event_handle_fixes_selection_notify(XEvent *event)
 
    e = calloc(1, sizeof(*e));
    if (!e)
-      return;
+     return;
 
    e->win = notify_event->window;
    e->owner = notify_event->owner;
@@ -2177,13 +2188,13 @@ _ecore_x_event_handle_fixes_selection_notify(XEvent *event)
    e->selection_time = notify_event->selection_timestamp;
    e->atom = sel = notify_event->selection;
    if (sel == ECORE_X_ATOM_SELECTION_PRIMARY)
-      e->selection = ECORE_X_SELECTION_PRIMARY;
+     e->selection = ECORE_X_SELECTION_PRIMARY;
    else if (sel == ECORE_X_ATOM_SELECTION_SECONDARY)
-      e->selection = ECORE_X_SELECTION_SECONDARY;
+     e->selection = ECORE_X_SELECTION_SECONDARY;
    else if (sel == ECORE_X_ATOM_SELECTION_CLIPBOARD)
-      e->selection = ECORE_X_SELECTION_CLIPBOARD;
+     e->selection = ECORE_X_SELECTION_CLIPBOARD;
    else
-      e->selection = ECORE_X_SELECTION_OTHER;
+     e->selection = ECORE_X_SELECTION_OTHER;
    e->reason = notify_event->subtype;
 
    ecore_event_add(ECORE_X_EVENT_FIXES_SELECTION_NOTIFY, e, NULL, NULL);
@@ -2203,7 +2214,7 @@ _ecore_x_event_handle_damage_notify(XEvent *event)
 
    e = calloc(1, sizeof(Ecore_X_Event_Damage));
    if (!e)
-      return;
+     return;
 
    e->level = damage_event->level;
    e->drawable = damage_event->drawable;
@@ -2225,7 +2236,8 @@ _ecore_x_event_handle_damage_notify(XEvent *event)
 #endif /* ifdef ECORE_XDAMAGE */
 
 static void
-_ecore_x_event_free_generic_event(void *data, void *ev)
+_ecore_x_event_free_generic_event(void *data,
+                                  void *ev)
 {
 #ifdef ECORE_XI2
    Ecore_X_Event_Generic *e = (Ecore_X_Event_Generic *)ev;
@@ -2233,11 +2245,11 @@ _ecore_x_event_free_generic_event(void *data, void *ev)
    if (data)
      {
         if (e->data)
-           XFreeEventData(_ecore_x_disp, (XGenericEventCookie *)data);
+          XFreeEventData(_ecore_x_disp, (XGenericEventCookie *)data);
         free(data);
      }
    free(e);
-#else   
+#else
    return;
    data = NULL; ev = NULL;
 #endif /* ifdef ECORE_XI2 */
@@ -2250,13 +2262,13 @@ _ecore_x_event_handle_generic_event(XEvent *event)
    XGenericEvent *generic_event;
    Ecore_X_Event_Generic *e;
    XGenericEventCookie *data;
-   
+
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    generic_event = (XGenericEvent *)event;
 
    e = calloc(1, sizeof(Ecore_X_Event_Generic));
    if (!e)
-      return;
+     return;
 
    if (XGetEventData(_ecore_x_disp, &(event->xcookie)))
      {
@@ -2273,8 +2285,8 @@ _ecore_x_event_handle_generic_event(XEvent *event)
    e->evtype = generic_event->evtype;
 
    if (e->extension == _ecore_x_xi2_opcode)
-      _ecore_x_input_handler(event);
-   
+     _ecore_x_input_handler(event);
+
    data = malloc(sizeof(XGenericEventCookie));
    if (data) memcpy(data, &(event->xcookie), sizeof(XGenericEventCookie));
    ecore_event_add(ECORE_X_EVENT_GENERIC,
index 7bed783..e81af13 100644 (file)
@@ -27,7 +27,7 @@ _ecore_x_fixes_init(void)
         ECORE_X_EVENT_FIXES_SELECTION_NOTIFY = ecore_event_type_new();
      }
    else
-      _fixes_available = 0;
+     _fixes_available = 0;
 
 #else /* ifdef ECORE_XFIXES */
    _fixes_available = 0;
@@ -37,17 +37,18 @@ _ecore_x_fixes_init(void)
 #ifdef ECORE_XFIXES
 /* I don't know what to call this function. */
 static XRectangle *
-_ecore_x_rectangle_ecore_to_x(Ecore_X_Rectangle *rects, int num)
+_ecore_x_rectangle_ecore_to_x(Ecore_X_Rectangle *rects,
+                              int                num)
 {
    XRectangle *xrect;
    int i;
 
    if (num == 0)
-      return NULL;
+     return NULL;
 
    xrect = malloc(sizeof(XRectangle) * num);
    if (!xrect)
-      return NULL;
+     return NULL;
 
    for (i = 0; i < num; i++)
      {
@@ -60,17 +61,18 @@ _ecore_x_rectangle_ecore_to_x(Ecore_X_Rectangle *rects, int num)
 } /* _ecore_x_rectangle_ecore_to_x */
 
 static Ecore_X_Rectangle *
-_ecore_x_rectangle_x_to_ecore(XRectangle *xrect, int num)
+_ecore_x_rectangle_x_to_ecore(XRectangle *xrect,
+                              int         num)
 {
    Ecore_X_Rectangle *rects;
    int i;
 
    if (num == 0)
-      return NULL;
+     return NULL;
 
    rects = malloc(sizeof(Ecore_X_Rectangle) * num);
    if (!rects)
-      return NULL;
+     return NULL;
 
    for (i = 0; i < num; i++)
      {
@@ -91,11 +93,11 @@ ecore_x_fixes_selection_notification_request(Ecore_X_Atom selection)
    if (_fixes_available)
      {
         XFixesSelectSelectionInput (_ecore_x_disp,
-              DefaultRootWindow(_ecore_x_disp),
-              selection,
-              XFixesSetSelectionOwnerNotifyMask |
-              XFixesSelectionWindowDestroyNotifyMask |
-              XFixesSelectionClientCloseNotifyMask);
+                                    DefaultRootWindow(_ecore_x_disp),
+                                    selection,
+                                    XFixesSetSelectionOwnerNotifyMask |
+                                    XFixesSelectionWindowDestroyNotifyMask |
+                                    XFixesSelectionClientCloseNotifyMask);
         return EINA_TRUE;
      }
 #endif
@@ -103,7 +105,8 @@ ecore_x_fixes_selection_notification_request(Ecore_X_Atom selection)
 }
 
 EAPI Ecore_X_Region
-ecore_x_region_new(Ecore_X_Rectangle *rects, int num)
+ecore_x_region_new(Ecore_X_Rectangle *rects,
+                   int                num)
 {
 #ifdef ECORE_XFIXES
    Ecore_X_Region region;
@@ -134,7 +137,8 @@ ecore_x_region_new_from_bitmap(Ecore_X_Pixmap bitmap)
 } /* ecore_x_region_new_from_bitmap */
 
 EAPI Ecore_X_Region
-ecore_x_region_new_from_window(Ecore_X_Window win, Ecore_X_Region_Type type)
+ecore_x_region_new_from_window(Ecore_X_Window      win,
+                               Ecore_X_Region_Type type)
 {
 #ifdef ECORE_XFIXES
    Ecore_X_Region region;
@@ -185,7 +189,9 @@ ecore_x_region_free(Ecore_X_Region region)
 } /* ecore_x_region_free */
 
 EAPI void
-ecore_x_region_set(Ecore_X_Region region, Ecore_X_Rectangle *rects, int num)
+ecore_x_region_set(Ecore_X_Region     region,
+                   Ecore_X_Rectangle *rects,
+                   int                num)
 {
 #ifdef ECORE_XFIXES
    XRectangle *xrect = _ecore_x_rectangle_ecore_to_x(rects, num);
@@ -195,7 +201,8 @@ ecore_x_region_set(Ecore_X_Region region, Ecore_X_Rectangle *rects, int num)
 } /* ecore_x_region_set */
 
 EAPI void
-ecore_x_region_copy(Ecore_X_Region dest, Ecore_X_Region source)
+ecore_x_region_copy(Ecore_X_Region dest,
+                    Ecore_X_Region source)
 {
 #ifdef ECORE_XFIXES
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
@@ -254,7 +261,9 @@ ecore_x_region_invert(Ecore_X_Region     dest,
 } /* ecore_x_region_invert */
 
 EAPI void
-ecore_x_region_translate(Ecore_X_Region region, int dx, int dy)
+ecore_x_region_translate(Ecore_X_Region region,
+                         int            dx,
+                         int            dy)
 {
 #ifdef ECORE_XFIXES
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
@@ -263,7 +272,8 @@ ecore_x_region_translate(Ecore_X_Region region, int dx, int dy)
 } /* ecore_x_region_translate */
 
 EAPI void
-ecore_x_region_extents(Ecore_X_Region dest, Ecore_X_Region source)
+ecore_x_region_extents(Ecore_X_Region dest,
+                       Ecore_X_Region source)
 {
 #ifdef ECORE_XFIXES
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
@@ -272,7 +282,8 @@ ecore_x_region_extents(Ecore_X_Region dest, Ecore_X_Region source)
 } /* ecore_x_region_extents */
 
 EAPI Ecore_X_Rectangle *
-ecore_x_region_fetch(Ecore_X_Region region, int *num,
+ecore_x_region_fetch(Ecore_X_Region     region,
+                     int               *num,
                      Ecore_X_Rectangle *bounds){
 #ifdef ECORE_XFIXES
    Ecore_X_Rectangle *rects;
index 3867da8..10b807b 100644 (file)
@@ -30,7 +30,7 @@ ecore_x_gc_new(Ecore_X_Drawable      draw,
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    if (!draw)
-      draw = DefaultRootWindow(_ecore_x_disp);
+     draw = DefaultRootWindow(_ecore_x_disp);
 
    memset(&gcv, 0, sizeof (gcv));
 
@@ -39,119 +39,119 @@ ecore_x_gc_new(Ecore_X_Drawable      draw,
         switch (mask & value_mask)
           {
            case ECORE_X_GC_VALUE_MASK_FUNCTION:
-              gcv.function = value_list[idx];
-              idx++;
-              break;
+             gcv.function = value_list[idx];
+             idx++;
+             break;
 
            case ECORE_X_GC_VALUE_MASK_PLANE_MASK:
-              gcv.plane_mask = value_list[idx];
-              idx++;
-              break;
+             gcv.plane_mask = value_list[idx];
+             idx++;
+             break;
 
            case ECORE_X_GC_VALUE_MASK_FOREGROUND:
-              gcv.foreground = value_list[idx];
-              idx++;
-              break;
+             gcv.foreground = value_list[idx];
+             idx++;
+             break;
 
            case ECORE_X_GC_VALUE_MASK_BACKGROUND:
-              gcv.background = value_list[idx];
-              idx++;
-              break;
+             gcv.background = value_list[idx];
+             idx++;
+             break;
 
            case ECORE_X_GC_VALUE_MASK_LINE_WIDTH:
-              gcv.line_width = value_list[idx];
-              idx++;
-              break;
+             gcv.line_width = value_list[idx];
+             idx++;
+             break;
 
            case ECORE_X_GC_VALUE_MASK_LINE_STYLE:
-              gcv.line_style = value_list[idx];
-              idx++;
-              break;
+             gcv.line_style = value_list[idx];
+             idx++;
+             break;
 
            case ECORE_X_GC_VALUE_MASK_CAP_STYLE:
-              gcv.cap_style = value_list[idx];
-              idx++;
-              break;
+             gcv.cap_style = value_list[idx];
+             idx++;
+             break;
 
            case ECORE_X_GC_VALUE_MASK_JOIN_STYLE:
-              gcv.join_style = value_list[idx];
-              idx++;
-              break;
+             gcv.join_style = value_list[idx];
+             idx++;
+             break;
 
            case ECORE_X_GC_VALUE_MASK_FILL_STYLE:
-              gcv.fill_style = value_list[idx];
-              idx++;
-              break;
+             gcv.fill_style = value_list[idx];
+             idx++;
+             break;
 
            case ECORE_X_GC_VALUE_MASK_FILL_RULE:
-              gcv.fill_rule = value_list[idx];
-              idx++;
-              break;
+             gcv.fill_rule = value_list[idx];
+             idx++;
+             break;
 
            case ECORE_X_GC_VALUE_MASK_TILE:
-              gcv.tile = value_list[idx];
-              idx++;
-              break;
+             gcv.tile = value_list[idx];
+             idx++;
+             break;
 
            case ECORE_X_GC_VALUE_MASK_STIPPLE:
-              gcv.stipple = value_list[idx];
-              idx++;
-              break;
+             gcv.stipple = value_list[idx];
+             idx++;
+             break;
 
            case ECORE_X_GC_VALUE_MASK_TILE_STIPPLE_ORIGIN_X:
-              gcv.ts_x_origin = value_list[idx];
-              idx++;
-              break;
+             gcv.ts_x_origin = value_list[idx];
+             idx++;
+             break;
 
            case ECORE_X_GC_VALUE_MASK_TILE_STIPPLE_ORIGIN_Y:
-              gcv.ts_y_origin = value_list[idx];
-              idx++;
-              break;
+             gcv.ts_y_origin = value_list[idx];
+             idx++;
+             break;
 
            case ECORE_X_GC_VALUE_MASK_FONT:
-              gcv.font = value_list[idx];
-              idx++;
-              break;
+             gcv.font = value_list[idx];
+             idx++;
+             break;
 
            case ECORE_X_GC_VALUE_MASK_SUBWINDOW_MODE:
-              gcv.subwindow_mode = value_list[idx];
-              idx++;
-              break;
+             gcv.subwindow_mode = value_list[idx];
+             idx++;
+             break;
 
            case ECORE_X_GC_VALUE_MASK_GRAPHICS_EXPOSURES:
-              gcv.graphics_exposures = value_list[idx];
-              idx++;
-              break;
+             gcv.graphics_exposures = value_list[idx];
+             idx++;
+             break;
 
            case ECORE_X_GC_VALUE_MASK_CLIP_ORIGIN_X:
-              gcv.clip_x_origin = value_list[idx];
-              idx++;
-              break;
+             gcv.clip_x_origin = value_list[idx];
+             idx++;
+             break;
 
            case ECORE_X_GC_VALUE_MASK_CLIP_ORIGIN_Y:
-              gcv.clip_y_origin = value_list[idx];
-              idx++;
-              break;
+             gcv.clip_y_origin = value_list[idx];
+             idx++;
+             break;
 
            case ECORE_X_GC_VALUE_MASK_CLIP_MASK:
-              gcv.clip_mask = value_list[idx];
-              idx++;
-              break;
+             gcv.clip_mask = value_list[idx];
+             idx++;
+             break;
 
            case ECORE_X_GC_VALUE_MASK_DASH_OFFSET:
-              gcv.dash_offset = value_list[idx];
-              idx++;
-              break;
+             gcv.dash_offset = value_list[idx];
+             idx++;
+             break;
 
            case ECORE_X_GC_VALUE_MASK_DASH_LIST:
-              gcv.dashes = value_list[idx];
-              idx++;
-              break;
+             gcv.dashes = value_list[idx];
+             idx++;
+             break;
 
            case ECORE_X_GC_VALUE_MASK_ARC_MODE:
-              gcv.arc_mode = value_list[idx];
-              idx++;
-              break;
+             gcv.arc_mode = value_list[idx];
+             idx++;
+             break;
           } /* switch */
      }
 
index 12fbf45..3899651 100644 (file)
@@ -24,17 +24,18 @@ ecore_x_icccm_init(void)
 } /* ecore_x_icccm_init */
 
 EAPI void
-ecore_x_icccm_state_set(Ecore_X_Window win, Ecore_X_Window_State_Hint state)
+ecore_x_icccm_state_set(Ecore_X_Window            win,
+                        Ecore_X_Window_State_Hint state)
 {
    unsigned long c[2];
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    if (state == ECORE_X_WINDOW_STATE_HINT_WITHDRAWN)
-      c[0] = WithdrawnState;
+     c[0] = WithdrawnState;
    else if (state == ECORE_X_WINDOW_STATE_HINT_NORMAL)
-      c[0] = NormalState;
+     c[0] = NormalState;
    else if (state == ECORE_X_WINDOW_STATE_HINT_ICONIC)
-      c[0] = IconicState;
+     c[0] = IconicState;
 
    c[1] = None;
    XChangeProperty(_ecore_x_disp, win, ECORE_X_ATOM_WM_STATE,
@@ -60,21 +61,22 @@ ecore_x_icccm_state_get(Ecore_X_Window win)
    if ((prop_ret) && (num_ret == 2))
      {
         if (prop_ret[0] == WithdrawnState)
-           hint = ECORE_X_WINDOW_STATE_HINT_WITHDRAWN;
+          hint = ECORE_X_WINDOW_STATE_HINT_WITHDRAWN;
         else if (prop_ret[0] == NormalState)
-           hint = ECORE_X_WINDOW_STATE_HINT_NORMAL;
+          hint = ECORE_X_WINDOW_STATE_HINT_NORMAL;
         else if (prop_ret[0] == IconicState)
-           hint = ECORE_X_WINDOW_STATE_HINT_ICONIC;
+          hint = ECORE_X_WINDOW_STATE_HINT_ICONIC;
      }
 
    if (prop_ret)
-      XFree(prop_ret);
+     XFree(prop_ret);
 
    return hint;
 } /* ecore_x_icccm_state_get */
 
 EAPI void
-ecore_x_icccm_delete_window_send(Ecore_X_Window win, Ecore_X_Time t)
+ecore_x_icccm_delete_window_send(Ecore_X_Window win,
+                                 Ecore_X_Time   t)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    ecore_x_client_message32_send(win, ECORE_X_ATOM_WM_PROTOCOLS,
@@ -84,7 +86,8 @@ ecore_x_icccm_delete_window_send(Ecore_X_Window win, Ecore_X_Time t)
 } /* ecore_x_icccm_delete_window_send */
 
 EAPI void
-ecore_x_icccm_take_focus_send(Ecore_X_Window win, Ecore_X_Time t)
+ecore_x_icccm_take_focus_send(Ecore_X_Window win,
+                              Ecore_X_Time   t)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    ecore_x_client_message32_send(win, ECORE_X_ATOM_WM_PROTOCOLS,
@@ -94,7 +97,8 @@ ecore_x_icccm_take_focus_send(Ecore_X_Window win, Ecore_X_Time t)
 } /* ecore_x_icccm_take_focus_send */
 
 EAPI void
-ecore_x_icccm_save_yourself_send(Ecore_X_Window win, Ecore_X_Time t)
+ecore_x_icccm_save_yourself_send(Ecore_X_Window win,
+                                 Ecore_X_Time   t)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    ecore_x_client_message32_send(win, ECORE_X_ATOM_WM_PROTOCOLS,
@@ -104,7 +108,11 @@ ecore_x_icccm_save_yourself_send(Ecore_X_Window win, Ecore_X_Time t)
 } /* ecore_x_icccm_save_yourself_send */
 
 EAPI void
-ecore_x_icccm_move_resize_send(Ecore_X_Window win, int x, int y, int w, int h)
+ecore_x_icccm_move_resize_send(Ecore_X_Window win,
+                               int            x,
+                               int            y,
+                               int            w,
+                               int            h)
 {
    XEvent ev;
 
@@ -124,30 +132,30 @@ ecore_x_icccm_move_resize_send(Ecore_X_Window win, int x, int y, int w, int h)
 } /* ecore_x_icccm_move_resize_send */
 
 EAPI void
-ecore_x_icccm_hints_set(Ecore_X_Window win,
-                        Eina_Bool accepts_focus,
+ecore_x_icccm_hints_set(Ecore_X_Window            win,
+                        Eina_Bool                 accepts_focus,
                         Ecore_X_Window_State_Hint initial_state,
-                        Ecore_X_Pixmap icon_pixmap,
-                        Ecore_X_Pixmap icon_mask,
-                        Ecore_X_Window icon_window,
-                        Ecore_X_Window window_group,
-                        Eina_Bool is_urgent)
+                        Ecore_X_Pixmap            icon_pixmap,
+                        Ecore_X_Pixmap            icon_mask,
+                        Ecore_X_Window            icon_window,
+                        Ecore_X_Window            window_group,
+                        Eina_Bool                 is_urgent)
 {
    XWMHints *hints;
 
    hints = XAllocWMHints();
    if (!hints)
-      return;
+     return;
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    hints->flags = InputHint | StateHint;
    hints->input = accepts_focus;
    if (initial_state == ECORE_X_WINDOW_STATE_HINT_WITHDRAWN)
-      hints->initial_state = WithdrawnState;
+     hints->initial_state = WithdrawnState;
    else if (initial_state == ECORE_X_WINDOW_STATE_HINT_NORMAL)
-      hints->initial_state = NormalState;
+     hints->initial_state = NormalState;
    else if (initial_state == ECORE_X_WINDOW_STATE_HINT_ICONIC)
-      hints->initial_state = IconicState;
+     hints->initial_state = IconicState;
 
    if (icon_pixmap != 0)
      {
@@ -174,45 +182,45 @@ ecore_x_icccm_hints_set(Ecore_X_Window win,
      }
 
    if (is_urgent)
-      hints->flags |= XUrgencyHint;
+     hints->flags |= XUrgencyHint;
 
    XSetWMHints(_ecore_x_disp, win, hints);
    XFree(hints);
 } /* ecore_x_icccm_hints_set */
 
 EAPI Eina_Bool
-ecore_x_icccm_hints_get(Ecore_X_Window win,
-                        Eina_Bool *accepts_focus,
+ecore_x_icccm_hints_get(Ecore_X_Window             win,
+                        Eina_Bool                 *accepts_focus,
                         Ecore_X_Window_State_Hint *initial_state,
-                        Ecore_X_Pixmap *icon_pixmap,
-                        Ecore_X_Pixmap *icon_mask,
-                        Ecore_X_Window *icon_window,
-                        Ecore_X_Window *window_group,
-                        Eina_Bool *is_urgent)
+                        Ecore_X_Pixmap            *icon_pixmap,
+                        Ecore_X_Pixmap            *icon_mask,
+                        Ecore_X_Window            *icon_window,
+                        Ecore_X_Window            *window_group,
+                        Eina_Bool                 *is_urgent)
 {
    XWMHints *hints;
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    if (accepts_focus)
-      *accepts_focus = EINA_TRUE;
+     *accepts_focus = EINA_TRUE;
 
    if (initial_state)
-      *initial_state = ECORE_X_WINDOW_STATE_HINT_NORMAL;
+     *initial_state = ECORE_X_WINDOW_STATE_HINT_NORMAL;
 
    if (icon_pixmap)
-      *icon_pixmap = 0;
+     *icon_pixmap = 0;
 
    if (icon_mask)
-      *icon_mask = 0;
+     *icon_mask = 0;
 
    if (icon_window)
-      *icon_window = 0;
+     *icon_window = 0;
 
    if (window_group)
-      *window_group = 0;
+     *window_group = 0;
 
    if (is_urgent)
-      *is_urgent = EINA_FALSE;
+     *is_urgent = EINA_FALSE;
 
    hints = XGetWMHints(_ecore_x_disp, win);
    if (hints)
@@ -220,35 +228,35 @@ ecore_x_icccm_hints_get(Ecore_X_Window win,
         if ((hints->flags & InputHint) && (accepts_focus))
           {
              if (hints->input)
-                *accepts_focus = EINA_TRUE;
+               *accepts_focus = EINA_TRUE;
              else
-                *accepts_focus = EINA_FALSE;
+               *accepts_focus = EINA_FALSE;
           }
 
         if ((hints->flags & StateHint) && (initial_state))
           {
              if (hints->initial_state == WithdrawnState)
-                *initial_state = ECORE_X_WINDOW_STATE_HINT_WITHDRAWN;
+               *initial_state = ECORE_X_WINDOW_STATE_HINT_WITHDRAWN;
              else if (hints->initial_state == NormalState)
-                *initial_state = ECORE_X_WINDOW_STATE_HINT_NORMAL;
+               *initial_state = ECORE_X_WINDOW_STATE_HINT_NORMAL;
              else if (hints->initial_state == IconicState)
-                *initial_state = ECORE_X_WINDOW_STATE_HINT_ICONIC;
+               *initial_state = ECORE_X_WINDOW_STATE_HINT_ICONIC;
           }
 
         if ((hints->flags & IconPixmapHint) && (icon_pixmap))
-           *icon_pixmap = hints->icon_pixmap;
+          *icon_pixmap = hints->icon_pixmap;
 
         if ((hints->flags & IconMaskHint) && (icon_mask))
-           *icon_mask = hints->icon_mask;
+          *icon_mask = hints->icon_mask;
 
         if ((hints->flags & IconWindowHint) && (icon_window))
-           *icon_window = hints->icon_window;
+          *icon_window = hints->icon_window;
 
         if ((hints->flags & WindowGroupHint) && (window_group))
-           *window_group = hints->window_group;
+          *window_group = hints->window_group;
 
         if ((hints->flags & XUrgencyHint) && (is_urgent))
-           *is_urgent = EINA_TRUE;
+          *is_urgent = EINA_TRUE;
 
         XFree(hints);
         return EINA_TRUE;
@@ -258,25 +266,30 @@ ecore_x_icccm_hints_get(Ecore_X_Window win,
 } /* ecore_x_icccm_hints_get */
 
 EAPI void
-ecore_x_icccm_size_pos_hints_set(Ecore_X_Window win,
-                                 Eina_Bool request_pos,
+ecore_x_icccm_size_pos_hints_set(Ecore_X_Window  win,
+                                 Eina_Bool       request_pos,
                                  Ecore_X_Gravity gravity,
-                                 int min_w, int min_h,
-                                 int max_w, int max_h,
-                                 int base_w, int base_h,
-                                 int step_x, int step_y,
-                                 double min_aspect, double max_aspect)
+                                 int             min_w,
+                                 int             min_h,
+                                 int             max_w,
+                                 int             max_h,
+                                 int             base_w,
+                                 int             base_h,
+                                 int             step_x,
+                                 int             step_y,
+                                 double          min_aspect,
+                                 double          max_aspect)
 {
    XSizeHints hint;
    long mask;
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    if (!XGetWMNormalHints(_ecore_x_disp, win, &hint, &mask))
-      memset(&hint, 0, sizeof(XSizeHints));
+     memset(&hint, 0, sizeof(XSizeHints));
 
    hint.flags = 0;
    if (request_pos)
-      hint.flags |= USPosition;
+     hint.flags |= USPosition;
 
    if (gravity != ECORE_X_GRAVITY_NW)
      {
@@ -325,14 +338,19 @@ ecore_x_icccm_size_pos_hints_set(Ecore_X_Window win,
 } /* ecore_x_icccm_size_pos_hints_set */
 
 EAPI Eina_Bool
-ecore_x_icccm_size_pos_hints_get(Ecore_X_Window win,
-                                 Eina_Bool *request_pos,
+ecore_x_icccm_size_pos_hints_get(Ecore_X_Window   win,
+                                 Eina_Bool       *request_pos,
                                  Ecore_X_Gravity *gravity,
-                                 int *min_w, int *min_h,
-                                 int *max_w, int *max_h,
-                                 int *base_w, int *base_h,
-                                 int *step_x, int *step_y,
-                                 double *min_aspect, double *max_aspect)
+                                 int             *min_w,
+                                 int             *min_h,
+                                 int             *max_w,
+                                 int             *max_h,
+                                 int             *base_w,
+                                 int             *base_h,
+                                 int             *step_x,
+                                 int             *step_y,
+                                 double          *min_aspect,
+                                 double          *max_aspect)
 {
    XSizeHints hint;
    long mask;
@@ -345,23 +363,23 @@ ecore_x_icccm_size_pos_hints_get(Ecore_X_Window win,
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    if (!XGetWMNormalHints(_ecore_x_disp, win, &hint, &mask))
-      return EINA_FALSE;
+     return EINA_FALSE;
 
    if ((hint.flags & USPosition) || ((hint.flags & PPosition)))
      {
         if (request_pos)
-           *request_pos = EINA_TRUE;
+          *request_pos = EINA_TRUE;
      }
    else if (request_pos)
-      *request_pos = EINA_FALSE;
+     *request_pos = EINA_FALSE;
 
    if (hint.flags & PWinGravity)
      {
         if (gravity)
-           *gravity = hint.win_gravity;
+          *gravity = hint.win_gravity;
      }
    else if (gravity)
-      *gravity = ECORE_X_GRAVITY_NW;
+     *gravity = ECORE_X_GRAVITY_NW;
 
    if (hint.flags & PMinSize)
      {
@@ -374,10 +392,10 @@ ecore_x_icccm_size_pos_hints_get(Ecore_X_Window win,
         maxw = hint.max_width;
         maxh = hint.max_height;
         if (maxw < minw)
-           maxw = minw;
+          maxw = minw;
 
         if (maxh < minh)
-           maxh = minh;
+          maxh = minh;
      }
 
    if (hint.flags & PBaseSize)
@@ -385,10 +403,10 @@ ecore_x_icccm_size_pos_hints_get(Ecore_X_Window win,
         basew = hint.base_width;
         baseh = hint.base_height;
         if (basew > minw)
-           minw = basew;
+          minw = basew;
 
         if (baseh > minh)
-           minh = baseh;
+          minh = baseh;
      }
 
    if (hint.flags & PResizeInc)
@@ -396,88 +414,89 @@ ecore_x_icccm_size_pos_hints_get(Ecore_X_Window win,
         stepx = hint.width_inc;
         stepy = hint.height_inc;
         if (stepx < 1)
-           stepx = 1;
+          stepx = 1;
 
         if (stepy < 1)
-           stepy = 1;
+          stepy = 1;
      }
 
    if (hint.flags & PAspect)
      {
         if (hint.min_aspect.y > 0)
-           mina = ((double)hint.min_aspect.x) / ((double)hint.min_aspect.y);
+          mina = ((double)hint.min_aspect.x) / ((double)hint.min_aspect.y);
 
         if (hint.max_aspect.y > 0)
-           maxa = ((double)hint.max_aspect.x) / ((double)hint.max_aspect.y);
+          maxa = ((double)hint.max_aspect.x) / ((double)hint.max_aspect.y);
      }
 
    if (min_w)
-      *min_w = minw;
+     *min_w = minw;
 
    if (min_h)
-      *min_h = minh;
+     *min_h = minh;
 
    if (max_w)
-      *max_w = maxw;
+     *max_w = maxw;
 
    if (max_h)
-      *max_h = maxh;
+     *max_h = maxh;
 
    if (base_w)
-      *base_w = basew;
+     *base_w = basew;
 
    if (base_h)
-      *base_h = baseh;
+     *base_h = baseh;
 
    if (step_x)
-      *step_x = stepx;
+     *step_x = stepx;
 
    if (step_y)
-      *step_y = stepy;
+     *step_y = stepy;
 
    if (min_aspect)
-      *min_aspect = mina;
+     *min_aspect = mina;
 
    if (max_aspect)
-      *max_aspect = maxa;
+     *max_aspect = maxa;
 
    return EINA_TRUE;
 } /* ecore_x_icccm_size_pos_hints_get */
 
 EAPI void
-ecore_x_icccm_title_set(Ecore_X_Window win, const char *t)
+ecore_x_icccm_title_set(Ecore_X_Window win,
+                        const char    *t)
 {
    char *list[1];
    XTextProperty xprop;
    int ret;
 
    if (!t)
-      return;
+     return;
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    xprop.value = NULL;
 #ifdef X_HAVE_UTF8_STRING
    list[0] = strdup(t);
    ret =
-      Xutf8TextListToTextProperty(_ecore_x_disp, list, 1, XUTF8StringStyle,
-                                  &xprop);
+     Xutf8TextListToTextProperty(_ecore_x_disp, list, 1, XUTF8StringStyle,
+                                 &xprop);
 #else /* ifdef X_HAVE_UTF8_STRING */
    list[0] = strdup(t);
    ret =
-      XmbTextListToTextProperty(_ecore_x_disp, list, 1, XStdICCTextStyle,
-                                &xprop);
+     XmbTextListToTextProperty(_ecore_x_disp, list, 1, XStdICCTextStyle,
+                               &xprop);
 #endif /* ifdef X_HAVE_UTF8_STRING */
    if (ret >= Success)
      {
         XSetWMName(_ecore_x_disp, win, &xprop);
         if (xprop.value)
-           XFree(xprop.value);
+          XFree(xprop.value);
      }
    else if (XStringListToTextProperty(list, 1, &xprop) >= Success)
      {
         XSetWMName(_ecore_x_disp, win, &xprop);
         if (xprop.value)
-           XFree(xprop.value);
+          XFree(xprop.value);
      }
 
    free(list[0]);
@@ -500,30 +519,30 @@ ecore_x_icccm_title_get(Ecore_X_Window win)
              int ret;
 
              if (xprop.encoding == ECORE_X_ATOM_UTF8_STRING)
-                t = strdup((char *)xprop.value);
+               t = strdup((char *)xprop.value);
              else
                {
-                  /* convert to utf8 */
+     /* convert to utf8 */
 #ifdef X_HAVE_UTF8_STRING
-                  ret = Xutf8TextPropertyToTextList(_ecore_x_disp, &xprop,
-                                                    &list, &num);
+                   ret = Xutf8TextPropertyToTextList(_ecore_x_disp, &xprop,
+                                                     &list, &num);
 #else /* ifdef X_HAVE_UTF8_STRING */
-                  ret = XmbTextPropertyToTextList(_ecore_x_disp, &xprop,
-                                                  &list, &num);
+                   ret = XmbTextPropertyToTextList(_ecore_x_disp, &xprop,
+                                                   &list, &num);
 #endif /* ifdef X_HAVE_UTF8_STRING */
 
-                  if ((ret == XLocaleNotSupported) ||
-                      (ret == XNoMemory) || (ret == XConverterNotFound))
+                   if ((ret == XLocaleNotSupported) ||
+                       (ret == XNoMemory) || (ret == XConverterNotFound))
                      t = strdup((char *)xprop.value);
-                  else if ((ret >= Success) && (num > 0))
+                   else if ((ret >= Success) && (num > 0))
                      t = strdup(list[0]);
 
-                  if (list)
+                   if (list)
                      XFreeStringList(list);
                }
 
              if (xprop.value)
-                XFree(xprop.value);
+               XFree(xprop.value);
 
              return t;
           }
@@ -545,9 +564,9 @@ ecore_x_icccm_protocol_atoms_set(Ecore_X_Window win,
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    if (num > 0)
-      XSetWMProtocols(_ecore_x_disp, win, (Atom *)(protos), num);
+     XSetWMProtocols(_ecore_x_disp, win, (Atom *)(protos), num);
    else
-      XDeleteProperty(_ecore_x_disp, win, ECORE_X_ATOM_WM_PROTOCOLS);
+     XDeleteProperty(_ecore_x_disp, win, ECORE_X_ATOM_WM_PROTOCOLS);
 } /* ecore_x_icccm_protocol_atoms_set */
 
 /**
@@ -557,9 +576,9 @@ ecore_x_icccm_protocol_atoms_set(Ecore_X_Window win,
  * @param on On/Off
  */
 EAPI void
-ecore_x_icccm_protocol_set(Ecore_X_Window win,
+ecore_x_icccm_protocol_set(Ecore_X_Window      win,
                            Ecore_X_WM_Protocol protocol,
-                           Eina_Bool on)
+                           Eina_Bool           on)
 {
    Atom *protos = NULL;
    Atom proto;
@@ -569,7 +588,7 @@ ecore_x_icccm_protocol_set(Ecore_X_Window win,
 
    /* Check for invalid values */
    if (protocol >= ECORE_X_WM_PROTOCOL_NUM)
-      return;
+     return;
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    proto = _ecore_x_atoms_wm_protocols[protocol];
@@ -594,14 +613,14 @@ ecore_x_icccm_protocol_set(Ecore_X_Window win,
         Atom *new_protos = NULL;
 
         if (already_set)
-           goto leave;
+          goto leave;
 
         new_protos = malloc((protos_count + 1) * sizeof(Atom));
         if (!new_protos)
-           goto leave;
+          goto leave;
 
         for (i = 0; i < protos_count; i++)
-           new_protos[i] = protos[i];
+          new_protos[i] = protos[i];
         new_protos[protos_count] = proto;
         XSetWMProtocols(_ecore_x_disp, win, new_protos, protos_count + 1);
         free(new_protos);
@@ -609,7 +628,7 @@ ecore_x_icccm_protocol_set(Ecore_X_Window win,
    else
      {
         if (!already_set)
-           goto leave;
+          goto leave;
 
         for (i = 0; i < protos_count; i++)
           {
@@ -618,13 +637,13 @@ ecore_x_icccm_protocol_set(Ecore_X_Window win,
                   int j;
 
                   for (j = i + 1; j < protos_count; j++)
-                     protos[j - 1] = protos[j];
+                    protos[j - 1] = protos[j];
                   if (protos_count > 1)
-                     XSetWMProtocols(_ecore_x_disp, win, protos,
-                                     protos_count - 1);
+                    XSetWMProtocols(_ecore_x_disp, win, protos,
+                                    protos_count - 1);
                   else
-                     XDeleteProperty(_ecore_x_disp, win,
-                                     ECORE_X_ATOM_WM_PROTOCOLS);
+                    XDeleteProperty(_ecore_x_disp, win,
+                                    ECORE_X_ATOM_WM_PROTOCOLS);
 
                   goto leave;
                }
@@ -633,7 +652,7 @@ ecore_x_icccm_protocol_set(Ecore_X_Window win,
 
 leave:
    if (protos)
-      XFree(protos);
+     XFree(protos);
 } /* ecore_x_icccm_protocol_set */
 
 /**
@@ -643,7 +662,8 @@ leave:
  * @return 1 if the protocol is set, else 0.
  */
 EAPI Eina_Bool
-ecore_x_icccm_protocol_isset(Ecore_X_Window win, Ecore_X_WM_Protocol protocol)
+ecore_x_icccm_protocol_isset(Ecore_X_Window      win,
+                             Ecore_X_WM_Protocol protocol)
 {
    Atom proto, *protos = NULL;
    int i, protos_count = 0;
@@ -651,23 +671,23 @@ ecore_x_icccm_protocol_isset(Ecore_X_Window win, Ecore_X_WM_Protocol protocol)
 
    /* check for invalid values */
    if (protocol >= ECORE_X_WM_PROTOCOL_NUM)
-      return EINA_FALSE;
+     return EINA_FALSE;
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    proto = _ecore_x_atoms_wm_protocols[protocol];
 
    if (!XGetWMProtocols(_ecore_x_disp, win, &protos, &protos_count))
-      return EINA_FALSE;
+     return EINA_FALSE;
 
    for (i = 0; i < protos_count; i++)
-      if (protos[i] == proto)
-        {
-           ret = EINA_TRUE;
-           break;
-        }
+     if (protos[i] == proto)
+       {
+          ret = EINA_TRUE;
+          break;
+       }
 
    if (protos)
-      XFree(protos);
+     XFree(protos);
 
    return ret;
 } /* ecore_x_icccm_protocol_isset */
@@ -681,13 +701,15 @@ ecore_x_icccm_protocol_isset(Ecore_X_Window win, Ecore_X_WM_Protocol protocol)
  * Set a window name * class
  */
 EAPI void
-ecore_x_icccm_name_class_set(Ecore_X_Window win, const char *n, const char *c)
+ecore_x_icccm_name_class_set(Ecore_X_Window win,
+                             const char    *n,
+                             const char    *c)
 {
    XClassHint *xch;
 
    xch = XAllocClassHint();
    if (!xch)
-      return;
+     return;
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    xch->res_name = (char *)n;
@@ -705,28 +727,30 @@ ecore_x_icccm_name_class_set(Ecore_X_Window win, const char *n, const char *c)
  * Get a window name * class
  */
 EAPI void
-ecore_x_icccm_name_class_get(Ecore_X_Window win, char **n, char **c)
+ecore_x_icccm_name_class_get(Ecore_X_Window win,
+                             char         **n,
+                             char         **c)
 {
    XClassHint xch;
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    if (n)
-      *n = NULL;
+     *n = NULL;
 
    if (c)
-      *c = NULL;
+     *c = NULL;
 
    xch.res_name = NULL;
    xch.res_class = NULL;
    if (XGetClassHint(_ecore_x_disp, win, &xch))
      {
         if (n)
-           if (xch.res_name)
-              *n = strdup(xch.res_name);
+          if (xch.res_name)
+            *n = strdup(xch.res_name);
 
         if (c)
-           if (xch.res_class)
-              *c = strdup(xch.res_class);
+          if (xch.res_class)
+            *c = strdup(xch.res_class);
 
         XFree(xch.res_name);
         XFree(xch.res_class);
@@ -758,7 +782,9 @@ ecore_x_icccm_client_machine_get(Ecore_X_Window win)
  * @param argv Arguments.
  */
 EAPI void
-ecore_x_icccm_command_set(Ecore_X_Window win, int argc, char **argv)
+ecore_x_icccm_command_set(Ecore_X_Window win,
+                          int            argc,
+                          char         **argv)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    XSetCommand(_ecore_x_disp, win, argv, argc);
@@ -774,31 +800,33 @@ ecore_x_icccm_command_set(Ecore_X_Window win, int argc, char **argv)
  * @param argv Arguments.
  */
 EAPI void
-ecore_x_icccm_command_get(Ecore_X_Window win, int *argc, char ***argv)
+ecore_x_icccm_command_get(Ecore_X_Window win,
+                          int           *argc,
+                          char        ***argv)
 {
    int i, c;
    char **v;
 
    if (argc)
-      *argc = 0;
+     *argc = 0;
 
    if (argv)
-      *argv = NULL;
+     *argv = NULL;
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    if (!XGetCommand(_ecore_x_disp, win, &v, &c))
-      return;
+     return;
 
    if (c < 1)
      {
         if (v)
-           XFreeStringList(v);
+          XFreeStringList(v);
 
         return;
      }
 
    if (argc)
-      *argc = c;
+     *argc = c;
 
    if (argv)
      {
@@ -807,7 +835,7 @@ ecore_x_icccm_command_get(Ecore_X_Window win, int *argc, char ***argv)
           {
              XFreeStringList(v);
              if (argc)
-                *argc = 0;
+               *argc = 0;
 
              return;
           }
@@ -815,9 +843,9 @@ ecore_x_icccm_command_get(Ecore_X_Window win, int *argc, char ***argv)
         for (i = 0; i < c; i++)
           {
              if (v[i])
-                (*argv)[i] = strdup(v[i]);
+               (*argv)[i] = strdup(v[i]);
              else
-                (*argv)[i] = strdup("");
+               (*argv)[i] = strdup("");
           }
      }
 
@@ -832,7 +860,8 @@ ecore_x_icccm_command_get(Ecore_X_Window win, int *argc, char ***argv)
  * Set a window icon name
  */
 EAPI void
-ecore_x_icccm_icon_name_set(Ecore_X_Window win, const char *t)
+ecore_x_icccm_icon_name_set(Ecore_X_Window win,
+                            const char    *t)
 {
    char *list[1];
    XTextProperty xprop;
@@ -853,13 +882,13 @@ ecore_x_icccm_icon_name_set(Ecore_X_Window win, const char *t)
      {
         XSetWMIconName(_ecore_x_disp, win, &xprop);
         if (xprop.value)
-           XFree(xprop.value);
+          XFree(xprop.value);
      }
    else if (XStringListToTextProperty(list, 1, &xprop) >= Success)
      {
         XSetWMIconName(_ecore_x_disp, win, &xprop);
         if (xprop.value)
-           XFree(xprop.value);
+          XFree(xprop.value);
      }
 
    free(list[0]);
@@ -889,33 +918,33 @@ ecore_x_icccm_icon_name_get(Ecore_X_Window win)
              int ret;
 
              if (xprop.encoding == ECORE_X_ATOM_UTF8_STRING)
-                t = strdup((char *)xprop.value);
+               t = strdup((char *)xprop.value);
              else
                {
-                  /* convert to utf8 */
+     /* convert to utf8 */
 #ifdef X_HAVE_UTF8_STRING
-                  ret = Xutf8TextPropertyToTextList(_ecore_x_disp, &xprop,
-                                                    &list, &num);
+                   ret = Xutf8TextPropertyToTextList(_ecore_x_disp, &xprop,
+                                                     &list, &num);
 #else /* ifdef X_HAVE_UTF8_STRING */
-                  ret = XmbTextPropertyToTextList(_ecore_x_disp, &xprop,
-                                                  &list, &num);
+                   ret = XmbTextPropertyToTextList(_ecore_x_disp, &xprop,
+                                                   &list, &num);
 #endif /* ifdef X_HAVE_UTF8_STRING */
 
-                  if ((ret == XLocaleNotSupported) ||
-                      (ret == XNoMemory) || (ret == XConverterNotFound))
+                   if ((ret == XLocaleNotSupported) ||
+                       (ret == XNoMemory) || (ret == XConverterNotFound))
                      t = strdup((char *)xprop.value);
-                  else if (ret >= Success)
-                    {
-                       if ((num >= 1) && (list))
+                   else if (ret >= Success)
+                     {
+                        if ((num >= 1) && (list))
                           t = strdup(list[0]);
 
-                       if (list)
+                        if (list)
                           XFreeStringList(list);
-                    }
+                     }
                }
 
              if (xprop.value)
-                XFree(xprop.value);
+               XFree(xprop.value);
 
              return t;
           }
@@ -930,7 +959,8 @@ ecore_x_icccm_icon_name_get(Ecore_X_Window win)
  * @param subwin The subwindow to be added to the colormap windows list
  */
 EAPI void
-ecore_x_icccm_colormap_window_set(Ecore_X_Window win, Ecore_X_Window subwin)
+ecore_x_icccm_colormap_window_set(Ecore_X_Window win,
+                                  Ecore_X_Window subwin)
 {
    int num = 0, i;
    unsigned char *old_data = NULL;
@@ -945,7 +975,7 @@ ecore_x_icccm_colormap_window_set(Ecore_X_Window win, Ecore_X_Window subwin)
      {
         newset = calloc(1, sizeof(Window));
         if (!newset)
-           return;
+          return;
 
         newset[0] = subwin;
         num = 1;
@@ -956,14 +986,14 @@ ecore_x_icccm_colormap_window_set(Ecore_X_Window win, Ecore_X_Window subwin)
         newset = calloc(num + 1, sizeof(Window));
         oldset = (Window *)old_data;
         if (!newset)
-           return;
+          return;
 
         for (i = 0; i < num; ++i)
           {
              if (oldset[i] == subwin)
                {
                   if (old_data)
-                     XFree(old_data);
+                    XFree(old_data);
 
                   old_data = NULL;
                   free(newset);
@@ -975,7 +1005,7 @@ ecore_x_icccm_colormap_window_set(Ecore_X_Window win, Ecore_X_Window subwin)
 
         newset[num++] = subwin;
         if (old_data)
-           XFree(old_data);
+          XFree(old_data);
 
         data = (unsigned char *)newset;
      }
@@ -992,7 +1022,8 @@ ecore_x_icccm_colormap_window_set(Ecore_X_Window win, Ecore_X_Window subwin)
  * @param subwin The window to be removed from the colormap window list.
  */
 EAPI void
-ecore_x_icccm_colormap_window_unset(Ecore_X_Window win, Ecore_X_Window subwin)
+ecore_x_icccm_colormap_window_unset(Ecore_X_Window win,
+                                    Ecore_X_Window subwin)
 {
    int num = 0, i, j, k = 0;
    unsigned char *old_data = NULL;
@@ -1004,7 +1035,7 @@ ecore_x_icccm_colormap_window_unset(Ecore_X_Window win, Ecore_X_Window subwin)
    if (!ecore_x_window_prop_property_get(win,
                                          ECORE_X_ATOM_WM_COLORMAP_WINDOWS,
                                          XA_WINDOW, 32, &old_data, &num))
-      return;
+     return;
 
    oldset = (Window *)old_data;
    for (i = 0; i < num; i++)
@@ -1016,7 +1047,7 @@ ecore_x_icccm_colormap_window_unset(Ecore_X_Window win, Ecore_X_Window subwin)
                   XDeleteProperty(_ecore_x_disp,
                                   win, ECORE_X_ATOM_WM_COLORMAP_WINDOWS);
                   if (old_data)
-                     XFree(old_data);
+                    XFree(old_data);
 
                   old_data = NULL;
                   return;
@@ -1026,18 +1057,18 @@ ecore_x_icccm_colormap_window_unset(Ecore_X_Window win, Ecore_X_Window subwin)
                   newset = calloc(num - 1, sizeof(Window));
                   data = (unsigned char *)newset;
                   for (j = 0; j < num; ++j)
-                     if (oldset[j] != subwin)
-                        newset[k++] = oldset[j];
+                    if (oldset[j] != subwin)
+                      newset[k++] = oldset[j];
 
                   ecore_x_window_prop_property_set(
-                     win,
-                     ECORE_X_ATOM_WM_COLORMAP_WINDOWS,
-                     XA_WINDOW,
-                     32,
-                     data,
-                     k);
+                    win,
+                    ECORE_X_ATOM_WM_COLORMAP_WINDOWS,
+                    XA_WINDOW,
+                    32,
+                    data,
+                    k);
                   if (old_data)
-                     XFree(old_data);
+                    XFree(old_data);
 
                   old_data = NULL;
                   free(newset);
@@ -1047,7 +1078,7 @@ ecore_x_icccm_colormap_window_unset(Ecore_X_Window win, Ecore_X_Window subwin)
      }
 
    if (old_data)
-      XFree(old_data);
+     XFree(old_data);
 } /* ecore_x_icccm_colormap_window_unset */
 
 /**
@@ -1056,7 +1087,8 @@ ecore_x_icccm_colormap_window_unset(Ecore_X_Window win, Ecore_X_Window subwin)
  * @param forwin the toplevel window
  */
 EAPI void
-ecore_x_icccm_transient_for_set(Ecore_X_Window win, Ecore_X_Window forwin)
+ecore_x_icccm_transient_for_set(Ecore_X_Window win,
+                                Ecore_X_Window forwin)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    XSetTransientForHint(_ecore_x_disp, win, forwin);
@@ -1085,9 +1117,9 @@ ecore_x_icccm_transient_for_get(Ecore_X_Window win)
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    if (XGetTransientForHint(_ecore_x_disp, win, &forwin))
-      return (Ecore_X_Window)forwin;
+     return (Ecore_X_Window)forwin;
    else
-      return 0;
+     return 0;
 } /* ecore_x_icccm_transient_for_get */
 
 /**
@@ -1096,7 +1128,8 @@ ecore_x_icccm_transient_for_get(Ecore_X_Window win)
  * @param role The role string
  */
 EAPI void
-ecore_x_icccm_window_role_set(Ecore_X_Window win, const char *role)
+ecore_x_icccm_window_role_set(Ecore_X_Window win,
+                              const char    *role)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    ecore_x_window_prop_string_set(win, ECORE_X_ATOM_WM_WINDOW_ROLE,
@@ -1124,7 +1157,8 @@ ecore_x_icccm_window_role_get(Ecore_X_Window win)
  * the main window must have this property set to the app's main window.
  */
 EAPI void
-ecore_x_icccm_client_leader_set(Ecore_X_Window win, Ecore_X_Window l)
+ecore_x_icccm_client_leader_set(Ecore_X_Window win,
+                                Ecore_X_Window l)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    ecore_x_window_prop_window_set(win, ECORE_X_ATOM_WM_CLIENT_LEADER,
@@ -1143,22 +1177,23 @@ ecore_x_icccm_client_leader_get(Ecore_X_Window win)
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    if (ecore_x_window_prop_window_get(win, ECORE_X_ATOM_WM_CLIENT_LEADER,
                                       &l, 1) > 0)
-      return l;
+     return l;
 
    return 0;
 } /* ecore_x_icccm_client_leader_get */
 
 EAPI void
-ecore_x_icccm_iconic_request_send(Ecore_X_Window win, Ecore_X_Window root)
+ecore_x_icccm_iconic_request_send(Ecore_X_Window win,
+                                  Ecore_X_Window root)
 {
    XEvent xev;
 
    if (!win)
-      return;
+     return;
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    if (!root)
-      root = DefaultRootWindow(_ecore_x_disp);
+     root = DefaultRootWindow(_ecore_x_disp);
 
    xev.xclient.type = ClientMessage;
    xev.xclient.serial = 0;
index a81941f..2de5319 100644 (file)
@@ -15,7 +15,8 @@ static int _ecore_x_image_shm_can = -1;
 static int _ecore_x_image_err = 0;
 
 static int
-_ecore_x_image_error_handler(Display *d __UNUSED__, XErrorEvent *ev __UNUSED__)
+_ecore_x_image_error_handler(Display     *d __UNUSED__,
+                             XErrorEvent *ev __UNUSED__)
 {
    _ecore_x_image_err = 1;
    return 0;
@@ -29,7 +30,7 @@ _ecore_x_image_shm_check(void)
    XImage *xim;
 
    if (_ecore_x_image_shm_can != -1)
-      return;
+     return;
 
    XSync(_ecore_x_disp, False);
    _ecore_x_image_err = 0;
@@ -104,13 +105,16 @@ struct _Ecore_X_Image
 };
 
 EAPI Ecore_X_Image *
-ecore_x_image_new(int w, int h, Ecore_X_Visual vis, int depth)
+ecore_x_image_new(int            w,
+                  int            h,
+                  Ecore_X_Visual vis,
+                  int            depth)
 {
    Ecore_X_Image *im;
 
    im = calloc(1, sizeof(Ecore_X_Image));
    if (!im)
-      return NULL;
+     return NULL;
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    im->w = w;
@@ -153,7 +157,7 @@ _ecore_x_image_shm_create(Ecore_X_Image *im)
                              ZPixmap, NULL, &(im->shminfo),
                              im->w, im->h);
    if (!im->xim)
-      return;
+     return;
 
    im->shminfo.shmid = shmget(IPC_PRIVATE,
                               im->xim->bytes_per_line * im->xim->height,
@@ -183,16 +187,22 @@ _ecore_x_image_shm_create(Ecore_X_Image *im)
    im->bpl = im->xim->bytes_per_line;
    im->rows = im->xim->height;
    if (im->xim->bits_per_pixel <= 8)
-      im->bpp = 1;
+     im->bpp = 1;
    else if (im->xim->bits_per_pixel <= 16)
-      im->bpp = 2;
+     im->bpp = 2;
    else
-      im->bpp = 4;
+     im->bpp = 4;
 } /* _ecore_x_image_shm_create */
 
 EAPI Eina_Bool
-ecore_x_image_get(Ecore_X_Image *im, Ecore_X_Drawable draw,
-                  int x, int y, int sx, int sy, int w, int h)
+ecore_x_image_get(Ecore_X_Image   *im,
+                  Ecore_X_Drawable draw,
+                  int              x,
+                  int              y,
+                  int              sx,
+                  int              sy,
+                  int              w,
+                  int              h)
 {
    Eina_Bool ret = EINA_TRUE;
    XErrorHandler ph;
@@ -201,10 +211,10 @@ ecore_x_image_get(Ecore_X_Image *im, Ecore_X_Drawable draw,
    if (im->shm)
      {
         if (!im->xim)
-           _ecore_x_image_shm_create(im);
+          _ecore_x_image_shm_create(im);
 
         if (!im->xim)
-           return 0;
+          return 0;
 
         _ecore_x_image_err = 0;
         // optimised path
@@ -212,12 +222,12 @@ ecore_x_image_get(Ecore_X_Image *im, Ecore_X_Drawable draw,
         if ((sx == 0) && (w == im->w))
           {
              im->xim->data = (char *)
-                im->data + (im->xim->bytes_per_line * sy) + (sx * im->bpp);
+               im->data + (im->xim->bytes_per_line * sy) + (sx * im->bpp);
              im->xim->width = w;
              im->xim->height = h;
              XGrabServer(_ecore_x_disp);
              if (!XShmGetImage(_ecore_x_disp, draw, im->xim, x, y, 0xffffffff))
-                ret = EINA_FALSE;
+               ret = EINA_FALSE;
              XUngrabServer(_ecore_x_disp);
              ecore_x_sync();
           }
@@ -259,7 +269,7 @@ ecore_x_image_get(Ecore_X_Image *im, Ecore_X_Drawable draw,
 
         XSetErrorHandler((XErrorHandler)ph);
         if (_ecore_x_image_err)
-           ret = EINA_FALSE;
+          ret = EINA_FALSE;
      }
    else
      {
@@ -271,15 +281,15 @@ ecore_x_image_get(Ecore_X_Image *im, Ecore_X_Drawable draw,
 } /* ecore_x_image_get */
 
 EAPI void
-ecore_x_image_put(Ecore_X_Image *im,
+ecore_x_image_put(Ecore_X_Image   *im,
                   Ecore_X_Drawable draw,
-                  Ecore_X_GC gc,
-                  int x,
-                  int y,
-                  int sx,
-                  int sy,
-                  int w,
-                  int h)
+                  Ecore_X_GC       gc,
+                  int              x,
+                  int              y,
+                  int              sx,
+                  int              sy,
+                  int              w,
+                  int              h)
 {
    Ecore_X_GC tgc = 0;
 
@@ -299,7 +309,10 @@ ecore_x_image_put(Ecore_X_Image *im,
 } /* ecore_x_image_put */
 
 EAPI void *
-ecore_x_image_data_get(Ecore_X_Image *im, int *bpl, int *rows, int *bpp)
+ecore_x_image_data_get(Ecore_X_Image *im,
+                       int           *bpl,
+                       int           *rows,
+                       int           *bpp)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    if (!im->xim) _ecore_x_image_shm_create(im);
@@ -317,10 +330,10 @@ ecore_x_image_is_argb32_get(Ecore_X_Image *im)
    if (!im->xim) _ecore_x_image_shm_create(im);
    if (((vis->class == TrueColor) ||
         (vis->class == DirectColor)) &&
-       (im->depth       >= 24) &&
-       (vis->red_mask   == 0xff0000) &&
+       (im->depth >= 24) &&
+       (vis->red_mask == 0xff0000) &&
        (vis->green_mask == 0x00ff00) &&
-       (vis->blue_mask  == 0x0000ff))
+       (vis->blue_mask == 0x0000ff))
      {
 #ifdef WORDS_BIGENDIAN
         if (im->xim->bitmap_bit_order == LSBFirst) return EINA_TRUE;
@@ -332,31 +345,36 @@ ecore_x_image_is_argb32_get(Ecore_X_Image *im)
 }
 
 EAPI Eina_Bool
-ecore_x_image_to_argb_convert(void *src, int sbpp,
-                              int sbpl,
+ecore_x_image_to_argb_convert(void            *src,
+                              int              sbpp,
+                              int              sbpl,
                               Ecore_X_Colormap c,
-                              Ecore_X_Visual v,
-                              int x, int y, int w, int h,
-                              unsigned int *dst,
-                              int dbpl,
-                              int dx, int dy)
+                              Ecore_X_Visual   v,
+                              int              x,
+                              int              y,
+                              int              w,
+                              int              h,
+                              unsigned int    *dst,
+                              int              dbpl,
+                              int              dx,
+                              int              dy)
 {
    Visual *vis = v;
    XColor *cols = NULL;
    int n = 0, nret = 0, i, row;
    unsigned int pal[256], r, g, b;
    enum
-     {
-        rgbnone = 0,
-        rgb565,
-        bgr565,
-        rgbx555,
-        argbx888,
-        abgrx888,
-        rgba888x,
-        bgra888x,
-        argbx666
-     };
+   {
+      rgbnone = 0,
+      rgb565,
+      bgr565,
+      rgbx555,
+      argbx888,
+      abgrx888,
+      rgba888x,
+      bgra888x,
+      argbx666
+   };
    int mode = 0;
 
    sbpp *= 8;
@@ -367,65 +385,66 @@ ecore_x_image_to_argb_convert(void *src, int sbpp,
         (vis->class == StaticColor) ||
         (vis->class == GrayScale) ||
         (vis->class == StaticGray)))
-      {
-         if (!c) c = DefaultColormap(_ecore_x_disp,
-                                     DefaultScreen(_ecore_x_disp));
-         cols = alloca(n * sizeof(XColor));
-         for (i = 0; i < n; i++)
-           {
-              cols[i].pixel = i;
-              cols[i].flags = DoRed | DoGreen | DoBlue;
-              cols[i].red = 0;
-              cols[i].green = 0;
-              cols[i].blue = 0;
-           }
-          XQueryColors(_ecore_x_disp, c, cols, n);
-         for (i = 0; i < n; i++)
-           {
-              pal[i] = 0xff000000 |
-                 ((cols[i].red   >> 8) << 16) |
-                 ((cols[i].green >> 8) << 8 ) |
-                 ((cols[i].blue  >> 8)      );
-           }
-         nret = n;
-      }
+     {
+        if (!c)
+          c = DefaultColormap(_ecore_x_disp,
+                              DefaultScreen(_ecore_x_disp));
+        cols = alloca(n * sizeof(XColor));
+        for (i = 0; i < n; i++)
+          {
+             cols[i].pixel = i;
+             cols[i].flags = DoRed | DoGreen | DoBlue;
+             cols[i].red = 0;
+             cols[i].green = 0;
+             cols[i].blue = 0;
+          }
+        XQueryColors(_ecore_x_disp, c, cols, n);
+        for (i = 0; i < n; i++)
+          {
+             pal[i] = 0xff000000 |
+               ((cols[i].red >> 8) << 16) |
+               ((cols[i].green >> 8) << 8) |
+               ((cols[i].blue >> 8));
+          }
+        nret = n;
+     }
    else if ((vis->class == TrueColor) ||
             (vis->class == DirectColor))
      {
-        if      ((vis->red_mask   == 0x00ff0000) &&
+        if      ((vis->red_mask == 0x00ff0000) &&
                  (vis->green_mask == 0x0000ff00) &&
-                 (vis->blue_mask  == 0x000000ff))
-           mode = argbx888;
-        else if ((vis->red_mask   == 0x000000ff) &&
+                 (vis->blue_mask == 0x000000ff))
+          mode = argbx888;
+        else if ((vis->red_mask == 0x000000ff) &&
                  (vis->green_mask == 0x0000ff00) &&
-                 (vis->blue_mask  == 0x00ff0000))
-           mode = abgrx888;
-        else if ((vis->red_mask   == 0xff000000) &&
+                 (vis->blue_mask == 0x00ff0000))
+          mode = abgrx888;
+        else if ((vis->red_mask == 0xff000000) &&
                  (vis->green_mask == 0x00ff0000) &&
-                 (vis->blue_mask  == 0x0000ff00))
-           mode = rgba888x;
-        else if ((vis->red_mask   == 0x0000ff00) &&
+                 (vis->blue_mask == 0x0000ff00))
+          mode = rgba888x;
+        else if ((vis->red_mask == 0x0000ff00) &&
                  (vis->green_mask == 0x00ff0000) &&
-                 (vis->blue_mask  == 0xff000000))
-           mode = bgra888x;
-        else if ((vis->red_mask   == 0x0003f000) &&
+                 (vis->blue_mask == 0xff000000))
+          mode = bgra888x;
+        else if ((vis->red_mask == 0x0003f000) &&
                  (vis->green_mask == 0x00000fc0) &&
-                 (vis->blue_mask  == 0x0000003f))
-           mode = argbx666;
-        else if ((vis->red_mask   == 0x0000f800) &&
+                 (vis->blue_mask == 0x0000003f))
+          mode = argbx666;
+        else if ((vis->red_mask == 0x0000f800) &&
                  (vis->green_mask == 0x000007e0) &&
-                 (vis->blue_mask  == 0x0000001f))
-           mode = rgb565;
-        else if ((vis->red_mask   == 0x0000001f) &&
+                 (vis->blue_mask == 0x0000001f))
+          mode = rgb565;
+        else if ((vis->red_mask == 0x0000001f) &&
                  (vis->green_mask == 0x000007e0) &&
-                 (vis->blue_mask  == 0x0000f800))
-           mode = bgr565;
-        else if ((vis->red_mask   == 0x00007c00) &&
+                 (vis->blue_mask == 0x0000f800))
+          mode = bgr565;
+        else if ((vis->red_mask == 0x00007c00) &&
                  (vis->green_mask == 0x000003e0) &&
-                 (vis->blue_mask  == 0x0000001f))
-           mode = rgbx555;
+                 (vis->blue_mask == 0x0000001f))
+          mode = rgbx555;
         else
-           return EINA_FALSE;
+          return EINA_FALSE;
      }
    for (row = 0; row < h; row++)
      {
@@ -439,7 +458,7 @@ ecore_x_image_to_argb_convert(void *src, int sbpp,
         de = dp + w;
         switch (sbpp)
           {
-          case 8:
+           case 8:
              s8 = ((unsigned char *)(((unsigned char *)src) + ((y + row) * sbpl))) + x;
              if (nret > 0)
                {
@@ -450,13 +469,14 @@ ecore_x_image_to_argb_convert(void *src, int sbpp,
                     }
                }
              else
-                return EINA_FALSE;
+               return EINA_FALSE;
              break;
-          case 16:
+
+           case 16:
              s16 = ((unsigned short *)(((unsigned char *)src) + ((y + row) * sbpl))) + x;
              switch (mode)
                {
-               case rgb565:
+                case rgb565:
                   while (dp < de)
                     {
                        r = (*s16 & 0xf800) << 8;
@@ -469,7 +489,8 @@ ecore_x_image_to_argb_convert(void *src, int sbpp,
                        s16++; dp++;
                     }
                   break;
-               case bgr565:
+
+                case bgr565:
                   while (dp < de)
                     {
                        r = (*s16 & 0x001f) << 19;
@@ -482,7 +503,8 @@ ecore_x_image_to_argb_convert(void *src, int sbpp,
                        s16++; dp++;
                     }
                   break;
-               case rgbx555:
+
+                case rgbx555:
                   while (dp < de)
                     {
                        r = (*s16 & 0x7c00) << 9;
@@ -495,24 +517,27 @@ ecore_x_image_to_argb_convert(void *src, int sbpp,
                        s16++; dp++;
                     }
                   break;
-               default:
+
+                default:
                   return EINA_FALSE;
                   break;
                }
              break;
-          case 24:
-          case 32:
+
+           case 24:
+           case 32:
              s32 = ((unsigned int *)(((unsigned char *)src) + ((y + row) * sbpl))) + x;
              switch (mode)
                {
-               case argbx888:
+                case argbx888:
                   while (dp < de)
                     {
                        *dp = 0xff000000 | *s32;
                        s32++; dp++;
                     }
                   break;
-               case abgrx888:
+
+                case abgrx888:
                   while (dp < de)
                     {
                        r = *s32 & 0x000000ff;
@@ -522,14 +547,16 @@ ecore_x_image_to_argb_convert(void *src, int sbpp,
                        s32++; dp++;
                     }
                   break;
-               case rgba888x:
+
+                case rgba888x:
                   while (dp < de)
                     {
                        *dp = 0xff000000 | (*s32 >> 8);
                        s32++; dp++;
                     }
                   break;
-               case bgra888x:
+
+                case bgra888x:
                   while (dp < de)
                     {
                        r = *s32 & 0x0000ff00;
@@ -539,7 +566,8 @@ ecore_x_image_to_argb_convert(void *src, int sbpp,
                        s32++; dp++;
                     }
                   break;
-               case argbx666:
+
+                case argbx666:
                   while (dp < de)
                     {
                        r = (*s32 & 0x3f000) << 6;
@@ -552,16 +580,19 @@ ecore_x_image_to_argb_convert(void *src, int sbpp,
                        s32++; dp++;
                     }
                   break;
-               default:
+
+                default:
                   return EINA_FALSE;
                   break;
                }
              break;
              break;
-          default:
+
+           default:
              return EINA_FALSE;
              break;
           }
      }
    return EINA_TRUE;
 }
+
index 6de53dd..7459a8b 100644 (file)
@@ -48,7 +48,7 @@ ecore_x_mwm_hints_get(Ecore_X_Window          win,
                                          ECORE_X_ATOM_MOTIF_WM_HINTS,
                                          ECORE_X_ATOM_MOTIF_WM_HINTS,
                                          32, &p, &num))
-      return EINA_FALSE;
+     return EINA_FALSE;
 
    mwmhints = (MWMHints *)p;
    if (mwmhints)
@@ -58,25 +58,25 @@ ecore_x_mwm_hints_get(Ecore_X_Window          win,
              if (dhint)
                {
                   if (mwmhints->flags & ECORE_X_MWM_HINTS_DECORATIONS)
-                     *dhint = mwmhints->decorations;
+                    *dhint = mwmhints->decorations;
                   else
-                     *dhint = ECORE_X_MWM_HINT_DECOR_ALL;
+                    *dhint = ECORE_X_MWM_HINT_DECOR_ALL;
                }
 
              if (fhint)
                {
                   if (mwmhints->flags & ECORE_X_MWM_HINTS_FUNCTIONS)
-                     *fhint = mwmhints->functions;
+                    *fhint = mwmhints->functions;
                   else
-                     *fhint = ECORE_X_MWM_HINT_FUNC_ALL;
+                    *fhint = ECORE_X_MWM_HINT_FUNC_ALL;
                }
 
              if (ihint)
                {
                   if (mwmhints->flags & ECORE_X_MWM_HINTS_INPUT_MODE)
-                     *ihint = mwmhints->inputmode;
+                    *ihint = mwmhints->inputmode;
                   else
-                     *ihint = ECORE_X_MWM_HINT_INPUT_MODELESS;
+                    *ihint = ECORE_X_MWM_HINT_INPUT_MODELESS;
                }
 
              ret = EINA_TRUE;
@@ -89,7 +89,8 @@ ecore_x_mwm_hints_get(Ecore_X_Window          win,
 } /* ecore_x_mwm_hints_get */
 
 EAPI void
-ecore_x_mwm_borderless_set(Ecore_X_Window win, Eina_Bool borderless)
+ecore_x_mwm_borderless_set(Ecore_X_Window win,
+                           Eina_Bool      borderless)
 {
    unsigned int data[5] = {0, 0, 0, 0, 0};
 
index e663413..36b028d 100644 (file)
@@ -13,7 +13,7 @@
 #include "ecore_x_private.h"
 #include "Ecore_X.h"
 
-typedef struct _Ecore_X_Startup_Info   Ecore_X_Startup_Info;
+typedef struct _Ecore_X_Startup_Info Ecore_X_Startup_Info;
 
 struct _Ecore_X_Startup_Info
 {
@@ -39,30 +39,30 @@ struct _Ecore_X_Startup_Info
    int            silent;
 };
 
-static void      _ecore_x_window_prop_string_utf8_set(Ecore_X_Window win,
-                                                      Ecore_X_Atom   atom,
-                                                      const char    *str);
-static char *    _ecore_x_window_prop_string_utf8_get(Ecore_X_Window win,
-                                                      Ecore_X_Atom   atom);
+static void _ecore_x_window_prop_string_utf8_set(Ecore_X_Window win,
+                                                 Ecore_X_Atom   atom,
+                                                 const char    *str);
+static char *_ecore_x_window_prop_string_utf8_get(Ecore_X_Window win,
+                                                  Ecore_X_Atom   atom);
 #if 0 /* Unused */
-static int       _ecore_x_netwm_startup_info_process(Ecore_X_Startup_Info *info);
-static int       _ecore_x_netwm_startup_info_parse(Ecore_X_Startup_Info *info,
-                                                   char                 *data);
+static int _ecore_x_netwm_startup_info_process(Ecore_X_Startup_Info *info);
+static int _ecore_x_netwm_startup_info_parse(Ecore_X_Startup_Info *info,
+                                             char                 *data);
 #endif /* if 0 */
-static void      _ecore_x_netwm_startup_info_free(void *data);
+static void _ecore_x_netwm_startup_info_free(void *data);
 
 /*
  * Convenience macros
  */
-#define _ATOM_SET_UTF8_STRING_LIST(win, atom, string, cnt)\
-   XChangeProperty(_ecore_x_disp,\
-                   win,\
-                   atom,\
-                   ECORE_X_ATOM_UTF8_STRING,\
-                   8,\
-                   PropModeReplace,\
-                   (unsigned char *)string,\
-                   cnt)
+#define _ATOM_SET_UTF8_STRING_LIST(win, atom, string, cnt) \
+  XChangeProperty(_ecore_x_disp,                           \
+                  win,                                     \
+                  atom,                                    \
+                  ECORE_X_ATOM_UTF8_STRING,                \
+                  8,                                       \
+                  PropModeReplace,                         \
+                  (unsigned char *)string,                 \
+                  cnt)
 
 /*
  * Local variables
@@ -75,7 +75,7 @@ ecore_x_netwm_init(void)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    startup_info = eina_hash_string_superfast_new(
-         _ecore_x_netwm_startup_info_free);
+       _ecore_x_netwm_startup_info_free);
 } /* ecore_x_netwm_init */
 
 EAPI void
@@ -83,7 +83,7 @@ ecore_x_netwm_shutdown(void)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    if (startup_info)
-      eina_hash_free(startup_info);
+     eina_hash_free(startup_info);
 
    startup_info = NULL;
 } /* ecore_x_netwm_shutdown */
@@ -92,8 +92,9 @@ ecore_x_netwm_shutdown(void)
  * WM identification
  */
 EAPI void
-ecore_x_netwm_wm_identify(Ecore_X_Window root, Ecore_X_Window check,
-                          const char *wm_name)
+ecore_x_netwm_wm_identify(Ecore_X_Window root,
+                          Ecore_X_Window check,
+                          const char    *wm_name)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    ecore_x_window_prop_window_set(root,
@@ -136,19 +137,19 @@ ecore_x_netwm_supported_get(Ecore_X_Window root,
    int num_ret;
 
    if (num)
-      *num = 0;
+     *num = 0;
 
    if (supported)
-      *supported = NULL;
+     *supported = NULL;
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    num_ret = ecore_x_window_prop_atom_list_get(root, ECORE_X_ATOM_NET_SUPPORTED,
                                                supported);
    if (num_ret <= 0)
-      return EINA_FALSE;
+     return EINA_FALSE;
 
    if (num)
-      *num = num_ret;
+     *num = num_ret;
 
    return EINA_TRUE;
 } /* ecore_x_netwm_supported_get */
@@ -157,7 +158,8 @@ ecore_x_netwm_supported_get(Ecore_X_Window root,
  * Desktop configuration and status
  */
 EAPI void
-ecore_x_netwm_desk_count_set(Ecore_X_Window root, unsigned int n_desks)
+ecore_x_netwm_desk_count_set(Ecore_X_Window root,
+                             unsigned int   n_desks)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    ecore_x_window_prop_card32_set(root, ECORE_X_ATOM_NET_NUMBER_OF_DESKTOPS,
@@ -165,8 +167,9 @@ ecore_x_netwm_desk_count_set(Ecore_X_Window root, unsigned int n_desks)
 } /* ecore_x_netwm_desk_count_set */
 
 EAPI void
-ecore_x_netwm_desk_roots_set(Ecore_X_Window root,
-                             Ecore_X_Window *vroots, unsigned int n_desks)
+ecore_x_netwm_desk_roots_set(Ecore_X_Window  root,
+                             Ecore_X_Window *vroots,
+                             unsigned int    n_desks)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    ecore_x_window_prop_window_set(root,
@@ -177,7 +180,8 @@ ecore_x_netwm_desk_roots_set(Ecore_X_Window root,
 
 EAPI void
 ecore_x_netwm_desk_names_set(Ecore_X_Window root,
-                             const char **names, unsigned int n_desks)
+                             const char   **names,
+                             unsigned int   n_desks)
 {
    char ss[32], *buf, *t;
    const char *s;
@@ -194,8 +198,8 @@ ecore_x_netwm_desk_names_set(Ecore_X_Window root,
         if (!s)
           {
              /* Default to "Desk-<number>" */
-             sprintf(ss, "Desk-%d", i);
-             s = ss;
+              sprintf(ss, "Desk-%d", i);
+              s = ss;
           }
 
         l = strlen(s) + 1;
@@ -214,8 +218,9 @@ ecore_x_netwm_desk_names_set(Ecore_X_Window root,
 } /* ecore_x_netwm_desk_names_set */
 
 EAPI void
-ecore_x_netwm_desk_size_set(Ecore_X_Window root, unsigned int width,
-                            unsigned int height)
+ecore_x_netwm_desk_size_set(Ecore_X_Window root,
+                            unsigned int   width,
+                            unsigned int   height)
 {
    unsigned int size[2];
 
@@ -228,7 +233,8 @@ ecore_x_netwm_desk_size_set(Ecore_X_Window root, unsigned int width,
 
 EAPI void
 ecore_x_netwm_desk_viewports_set(Ecore_X_Window root,
-                                 unsigned int *origins, unsigned int n_desks)
+                                 unsigned int  *origins,
+                                 unsigned int   n_desks)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    ecore_x_window_prop_card32_set(root, ECORE_X_ATOM_NET_DESKTOP_VIEWPORT,
@@ -236,9 +242,11 @@ ecore_x_netwm_desk_viewports_set(Ecore_X_Window root,
 } /* ecore_x_netwm_desk_viewports_set */
 
 EAPI void
-ecore_x_netwm_desk_layout_set(Ecore_X_Window root, int orientation,
-                              int columns, int rows,
-                              int starting_corner)
+ecore_x_netwm_desk_layout_set(Ecore_X_Window root,
+                              int            orientation,
+                              int            columns,
+                              int            rows,
+                              int            starting_corner)
 {
    unsigned int layout[4];
 
@@ -253,7 +261,8 @@ ecore_x_netwm_desk_layout_set(Ecore_X_Window root, int orientation,
 
 EAPI void
 ecore_x_netwm_desk_workareas_set(Ecore_X_Window root,
-                                 unsigned int *areas, unsigned int n_desks)
+                                 unsigned int  *areas,
+                                 unsigned int   n_desks)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    ecore_x_window_prop_card32_set(root, ECORE_X_ATOM_NET_WORKAREA, areas,
@@ -261,7 +270,8 @@ ecore_x_netwm_desk_workareas_set(Ecore_X_Window root,
 } /* ecore_x_netwm_desk_workareas_set */
 
 EAPI void
-ecore_x_netwm_desk_current_set(Ecore_X_Window root, unsigned int desk)
+ecore_x_netwm_desk_current_set(Ecore_X_Window root,
+                               unsigned int   desk)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    ecore_x_window_prop_card32_set(root, ECORE_X_ATOM_NET_CURRENT_DESKTOP, &desk,
@@ -269,7 +279,8 @@ ecore_x_netwm_desk_current_set(Ecore_X_Window root, unsigned int desk)
 } /* ecore_x_netwm_desk_current_set */
 
 EAPI void
-ecore_x_netwm_showing_desktop_set(Ecore_X_Window root, Eina_Bool on)
+ecore_x_netwm_showing_desktop_set(Ecore_X_Window root,
+                                  Eina_Bool      on)
 {
    unsigned int val;
 
@@ -285,8 +296,9 @@ ecore_x_netwm_showing_desktop_set(Ecore_X_Window root, Eina_Bool on)
 
 /* Mapping order */
 EAPI void
-ecore_x_netwm_client_list_set(Ecore_X_Window root,
-                              Ecore_X_Window *p_clients, unsigned int n_clients)
+ecore_x_netwm_client_list_set(Ecore_X_Window  root,
+                              Ecore_X_Window *p_clients,
+                              unsigned int    n_clients)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    ecore_x_window_prop_window_set(root, ECORE_X_ATOM_NET_CLIENT_LIST,
@@ -305,7 +317,8 @@ ecore_x_netwm_client_list_stacking_set(Ecore_X_Window  root,
 } /* ecore_x_netwm_client_list_stacking_set */
 
 EAPI void
-ecore_x_netwm_client_active_set(Ecore_X_Window root, Ecore_X_Window win)
+ecore_x_netwm_client_active_set(Ecore_X_Window root,
+                                Ecore_X_Window win)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    ecore_x_window_prop_window_set(root, ECORE_X_ATOM_NET_ACTIVE_WINDOW,
@@ -322,7 +335,7 @@ ecore_x_netwm_client_active_request(Ecore_X_Window root,
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    if (!root)
-      root = DefaultRootWindow(_ecore_x_disp);
+     root = DefaultRootWindow(_ecore_x_disp);
 
    xev.xclient.type = ClientMessage;
    xev.xclient.display = _ecore_x_disp;
@@ -340,43 +353,48 @@ ecore_x_netwm_client_active_request(Ecore_X_Window root,
 } /* ecore_x_netwm_client_active_request */
 
 EAPI void
-ecore_x_netwm_name_set(Ecore_X_Window win, const char *name)
+ecore_x_netwm_name_set(Ecore_X_Window win,
+                       const char    *name)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    _ecore_x_window_prop_string_utf8_set(win, ECORE_X_ATOM_NET_WM_NAME, name);
 } /* ecore_x_netwm_name_set */
 
 EAPI int
-ecore_x_netwm_name_get(Ecore_X_Window win, char **name)
+ecore_x_netwm_name_get(Ecore_X_Window win,
+                       char         **name)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    if (name)
-      *name = _ecore_x_window_prop_string_utf8_get(win,
-                                                   ECORE_X_ATOM_NET_WM_NAME);
+     *name = _ecore_x_window_prop_string_utf8_get(win,
+                                                  ECORE_X_ATOM_NET_WM_NAME);
 
    return 1;
 } /* ecore_x_netwm_name_get */
 
 EAPI void
-ecore_x_netwm_startup_id_set(Ecore_X_Window win, const char *id)
+ecore_x_netwm_startup_id_set(Ecore_X_Window win,
+                             const char    *id)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    _ecore_x_window_prop_string_utf8_set(win, ECORE_X_ATOM_NET_STARTUP_ID, id);
 } /* ecore_x_netwm_startup_id_set */
 
 EAPI int
-ecore_x_netwm_startup_id_get(Ecore_X_Window win, char **id)
+ecore_x_netwm_startup_id_get(Ecore_X_Window win,
+                             char         **id)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    if (id)
-      *id = _ecore_x_window_prop_string_utf8_get(win,
-                                                 ECORE_X_ATOM_NET_STARTUP_ID);
+     *id = _ecore_x_window_prop_string_utf8_get(win,
+                                                ECORE_X_ATOM_NET_STARTUP_ID);
 
    return 1;
 } /* ecore_x_netwm_startup_id_get */
 
 EAPI void
-ecore_x_netwm_visible_name_set(Ecore_X_Window win, const char *name)
+ecore_x_netwm_visible_name_set(Ecore_X_Window win,
+                               const char    *name)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    _ecore_x_window_prop_string_utf8_set(win, ECORE_X_ATOM_NET_WM_VISIBLE_NAME,
@@ -384,19 +402,21 @@ ecore_x_netwm_visible_name_set(Ecore_X_Window win, const char *name)
 } /* ecore_x_netwm_visible_name_set */
 
 EAPI int
-ecore_x_netwm_visible_name_get(Ecore_X_Window win, char **name)
+ecore_x_netwm_visible_name_get(Ecore_X_Window win,
+                               char         **name)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    if (name)
-      *name = _ecore_x_window_prop_string_utf8_get(
-            win,
-            ECORE_X_ATOM_NET_WM_VISIBLE_NAME);
+     *name = _ecore_x_window_prop_string_utf8_get(
+         win,
+         ECORE_X_ATOM_NET_WM_VISIBLE_NAME);
 
    return 1;
 } /* ecore_x_netwm_visible_name_get */
 
 EAPI void
-ecore_x_netwm_icon_name_set(Ecore_X_Window win, const char *name)
+ecore_x_netwm_icon_name_set(Ecore_X_Window win,
+                            const char    *name)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    _ecore_x_window_prop_string_utf8_set(win, ECORE_X_ATOM_NET_WM_ICON_NAME,
@@ -404,19 +424,21 @@ ecore_x_netwm_icon_name_set(Ecore_X_Window win, const char *name)
 } /* ecore_x_netwm_icon_name_set */
 
 EAPI int
-ecore_x_netwm_icon_name_get(Ecore_X_Window win, char **name)
+ecore_x_netwm_icon_name_get(Ecore_X_Window win,
+                            char         **name)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    if (name)
-      *name = _ecore_x_window_prop_string_utf8_get(
-            win,
-            ECORE_X_ATOM_NET_WM_ICON_NAME);
+     *name = _ecore_x_window_prop_string_utf8_get(
+         win,
+         ECORE_X_ATOM_NET_WM_ICON_NAME);
 
    return 1;
 } /* ecore_x_netwm_icon_name_get */
 
 EAPI void
-ecore_x_netwm_visible_icon_name_set(Ecore_X_Window win, const char *name)
+ecore_x_netwm_visible_icon_name_set(Ecore_X_Window win,
+                                    const char    *name)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    _ecore_x_window_prop_string_utf8_set(win,
@@ -425,26 +447,29 @@ ecore_x_netwm_visible_icon_name_set(Ecore_X_Window win, const char *name)
 } /* ecore_x_netwm_visible_icon_name_set */
 
 EAPI int
-ecore_x_netwm_visible_icon_name_get(Ecore_X_Window win, char **name)
+ecore_x_netwm_visible_icon_name_get(Ecore_X_Window win,
+                                    char         **name)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    if (name)
-      *name = _ecore_x_window_prop_string_utf8_get(
-            win,
-            ECORE_X_ATOM_NET_WM_VISIBLE_ICON_NAME);
+     *name = _ecore_x_window_prop_string_utf8_get(
+         win,
+         ECORE_X_ATOM_NET_WM_VISIBLE_ICON_NAME);
 
    return 1;
 } /* ecore_x_netwm_visible_icon_name_get */
 
 EAPI void
-ecore_x_netwm_desktop_set(Ecore_X_Window win, unsigned int desk)
+ecore_x_netwm_desktop_set(Ecore_X_Window win,
+                          unsigned int   desk)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    ecore_x_window_prop_card32_set(win, ECORE_X_ATOM_NET_WM_DESKTOP, &desk, 1);
 } /* ecore_x_netwm_desktop_set */
 
 EAPI Eina_Bool
-ecore_x_netwm_desktop_get(Ecore_X_Window win, unsigned int *desk)
+ecore_x_netwm_desktop_get(Ecore_X_Window win,
+                          unsigned int  *desk)
 {
    int ret;
    unsigned int tmp;
@@ -454,7 +479,7 @@ ecore_x_netwm_desktop_get(Ecore_X_Window win, unsigned int *desk)
                                         &tmp, 1);
 
    if (desk)
-      *desk = tmp;
+     *desk = tmp;
 
    return ret == 1 ? EINA_TRUE : EINA_FALSE;
 } /* ecore_x_netwm_desktop_get */
@@ -463,8 +488,11 @@ ecore_x_netwm_desktop_get(Ecore_X_Window win, unsigned int *desk)
  * _NET_WM_STRUT is deprecated
  */
 EAPI void
-ecore_x_netwm_strut_set(Ecore_X_Window win, int left, int right,
-                        int top, int bottom)
+ecore_x_netwm_strut_set(Ecore_X_Window win,
+                        int            left,
+                        int            right,
+                        int            top,
+                        int            bottom)
 {
    unsigned int strut[4];
 
@@ -480,8 +508,11 @@ ecore_x_netwm_strut_set(Ecore_X_Window win, int left, int right,
  * _NET_WM_STRUT is deprecated
  */
 EAPI Eina_Bool
-ecore_x_netwm_strut_get(Ecore_X_Window win, int *left, int *right,
-                        int *top, int *bottom)
+ecore_x_netwm_strut_get(Ecore_X_Window win,
+                        int           *left,
+                        int           *right,
+                        int           *top,
+                        int           *bottom)
 {
    int ret = 0;
    unsigned int strut[4];
@@ -492,19 +523,19 @@ ecore_x_netwm_strut_get(Ecore_X_Window win, int *left, int *right,
                                         strut,
                                         4);
    if (ret != 4)
-      return EINA_FALSE;
+     return EINA_FALSE;
 
    if (left)
-      *left = strut[0];
+     *left = strut[0];
 
    if (right)
-      *right = strut[1];
+     *right = strut[1];
 
    if (top)
-      *top = strut[2];
+     *top = strut[2];
 
    if (bottom)
-      *bottom = strut[3];
+     *bottom = strut[3];
 
    return EINA_TRUE;
 } /* ecore_x_netwm_strut_get */
@@ -569,49 +600,51 @@ ecore_x_netwm_strut_partial_get(Ecore_X_Window win,
                                         strut,
                                         12);
    if (ret != 12)
-      return EINA_FALSE;
+     return EINA_FALSE;
 
    if (left)
-      *left = strut[0];
+     *left = strut[0];
 
    if (right)
-      *right = strut[1];
+     *right = strut[1];
 
    if (top)
-      *top = strut[2];
+     *top = strut[2];
 
    if (bottom)
-      *bottom = strut[3];
+     *bottom = strut[3];
 
    if (left_start_y)
-      *left_start_y = strut[4];
+     *left_start_y = strut[4];
 
    if (left_end_y)
-      *left_end_y = strut[5];
+     *left_end_y = strut[5];
 
    if (right_start_y)
-      *right_start_y = strut[6];
+     *right_start_y = strut[6];
 
    if (right_end_y)
-      *right_end_y = strut[7];
+     *right_end_y = strut[7];
 
    if (top_start_x)
-      *top_start_x = strut[8];
+     *top_start_x = strut[8];
 
    if (top_end_x)
-      *top_end_x = strut[9];
+     *top_end_x = strut[9];
 
    if (bottom_start_x)
-      *bottom_start_x = strut[10];
+     *bottom_start_x = strut[10];
 
    if (bottom_end_x)
-      *bottom_end_x = strut[11];
+     *bottom_end_x = strut[11];
 
    return EINA_TRUE;
 } /* ecore_x_netwm_strut_partial_get */
 
 EAPI Eina_Bool
-ecore_x_netwm_icons_get(Ecore_X_Window win, Ecore_X_Icon **icon, int *num)
+ecore_x_netwm_icons_get(Ecore_X_Window win,
+                        Ecore_X_Icon **icon,
+                        int           *num)
 {
    unsigned int *data, *p;
    unsigned int *src;
@@ -620,18 +653,18 @@ ecore_x_netwm_icons_get(Ecore_X_Window win, Ecore_X_Icon **icon, int *num)
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    if (num)
-      *num = 0;
+     *num = 0;
 
    if (icon)
-      *icon = NULL;
+     *icon = NULL;
 
    num_ret = ecore_x_window_prop_card32_list_get(win, ECORE_X_ATOM_NET_WM_ICON,
                                                  &data);
    if (num_ret <= 0)
-      return EINA_FALSE;
+     return EINA_FALSE;
 
    if (!data)
-      return EINA_FALSE;
+     return EINA_FALSE;
 
    if (num_ret < 2)
      {
@@ -655,10 +688,10 @@ ecore_x_netwm_icons_get(Ecore_X_Window win, Ecore_X_Icon **icon, int *num)
         icons++;
 
         if ((p - data) == num_ret)
-           p = NULL;
+          p = NULL;
      }
    if (num)
-      *num = icons;
+     *num = icons;
 
    /* If the user doesn't want the icons, return */
    if (!icon)
@@ -689,7 +722,7 @@ ecore_x_netwm_icons_get(Ecore_X_Window win, Ecore_X_Icon **icon, int *num)
         if (!((*icon)[i]).data)
           {
              while (i)
-                free(((*icon)[--i]).data);
+               free(((*icon)[--i]).data);
              free(*icon);
              free(data);
              return EINA_FALSE;
@@ -753,25 +786,26 @@ ecore_x_netwm_icon_geometry_get(Ecore_X_Window win,
                                         geometry,
                                         4);
    if (ret != 4)
-      return EINA_FALSE;
+     return EINA_FALSE;
 
    if (x)
-      *x = geometry[0];
+     *x = geometry[0];
 
    if (y)
-      *y = geometry[1];
+     *y = geometry[1];
 
    if (width)
-      *width = geometry[2];
+     *width = geometry[2];
 
    if (height)
-      *height = geometry[3];
+     *height = geometry[3];
 
    return EINA_TRUE;
 } /* ecore_x_netwm_icon_geometry_get */
 
 EAPI void
-ecore_x_netwm_pid_set(Ecore_X_Window win, int pid)
+ecore_x_netwm_pid_set(Ecore_X_Window win,
+                      int            pid)
 {
    unsigned int tmp;
 
@@ -782,7 +816,8 @@ ecore_x_netwm_pid_set(Ecore_X_Window win, int pid)
 } /* ecore_x_netwm_pid_set */
 
 EAPI Eina_Bool
-ecore_x_netwm_pid_get(Ecore_X_Window win, int *pid)
+ecore_x_netwm_pid_get(Ecore_X_Window win,
+                      int           *pid)
 {
    int ret;
    unsigned int tmp;
@@ -791,7 +826,7 @@ ecore_x_netwm_pid_get(Ecore_X_Window win, int *pid)
    ret = ecore_x_window_prop_card32_get(win, ECORE_X_ATOM_NET_WM_PID,
                                         &tmp, 1);
    if (pid)
-      *pid = tmp;
+     *pid = tmp;
 
    return ret == 1 ? EINA_TRUE : EINA_FALSE;
 } /* ecore_x_netwm_pid_get */
@@ -815,7 +850,8 @@ ecore_x_netwm_handled_icons_get(Ecore_X_Window win)
 } /* ecore_x_netwm_handled_icons_get */
 
 EAPI void
-ecore_x_netwm_user_time_set(Ecore_X_Window win, unsigned int tim)
+ecore_x_netwm_user_time_set(Ecore_X_Window win,
+                            unsigned int   tim)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    ecore_x_window_prop_card32_set(win, ECORE_X_ATOM_NET_WM_USER_TIME,
@@ -823,7 +859,8 @@ ecore_x_netwm_user_time_set(Ecore_X_Window win, unsigned int tim)
 } /* ecore_x_netwm_user_time_set */
 
 EAPI Eina_Bool
-ecore_x_netwm_user_time_get(Ecore_X_Window win, unsigned int *tim)
+ecore_x_netwm_user_time_get(Ecore_X_Window win,
+                            unsigned int  *tim)
 {
    int ret;
    unsigned int tmp;
@@ -832,7 +869,7 @@ ecore_x_netwm_user_time_get(Ecore_X_Window win, unsigned int *tim)
    ret = ecore_x_window_prop_card32_get(win, ECORE_X_ATOM_NET_WM_USER_TIME,
                                         &tmp, 1);
    if (tim)
-      *tim = tmp;
+     *tim = tmp;
 
    return ret == 1 ? EINA_TRUE : EINA_FALSE;
 } /* ecore_x_netwm_user_time_get */
@@ -841,31 +878,31 @@ Ecore_X_Window_State
 _ecore_x_netwm_state_get(Ecore_X_Atom a)
 {
    if (a == ECORE_X_ATOM_NET_WM_STATE_MODAL)
-      return ECORE_X_WINDOW_STATE_MODAL;
+     return ECORE_X_WINDOW_STATE_MODAL;
    else if (a == ECORE_X_ATOM_NET_WM_STATE_STICKY)
-      return ECORE_X_WINDOW_STATE_STICKY;
+     return ECORE_X_WINDOW_STATE_STICKY;
    else if (a == ECORE_X_ATOM_NET_WM_STATE_MAXIMIZED_VERT)
-      return ECORE_X_WINDOW_STATE_MAXIMIZED_VERT;
+     return ECORE_X_WINDOW_STATE_MAXIMIZED_VERT;
    else if (a == ECORE_X_ATOM_NET_WM_STATE_MAXIMIZED_HORZ)
-      return ECORE_X_WINDOW_STATE_MAXIMIZED_HORZ;
+     return ECORE_X_WINDOW_STATE_MAXIMIZED_HORZ;
    else if (a == ECORE_X_ATOM_NET_WM_STATE_SHADED)
-      return ECORE_X_WINDOW_STATE_SHADED;
+     return ECORE_X_WINDOW_STATE_SHADED;
    else if (a == ECORE_X_ATOM_NET_WM_STATE_SKIP_TASKBAR)
-      return ECORE_X_WINDOW_STATE_SKIP_TASKBAR;
+     return ECORE_X_WINDOW_STATE_SKIP_TASKBAR;
    else if (a == ECORE_X_ATOM_NET_WM_STATE_SKIP_PAGER)
-      return ECORE_X_WINDOW_STATE_SKIP_PAGER;
+     return ECORE_X_WINDOW_STATE_SKIP_PAGER;
    else if (a == ECORE_X_ATOM_NET_WM_STATE_HIDDEN)
-      return ECORE_X_WINDOW_STATE_HIDDEN;
+     return ECORE_X_WINDOW_STATE_HIDDEN;
    else if (a == ECORE_X_ATOM_NET_WM_STATE_FULLSCREEN)
-      return ECORE_X_WINDOW_STATE_FULLSCREEN;
+     return ECORE_X_WINDOW_STATE_FULLSCREEN;
    else if (a == ECORE_X_ATOM_NET_WM_STATE_ABOVE)
-      return ECORE_X_WINDOW_STATE_ABOVE;
+     return ECORE_X_WINDOW_STATE_ABOVE;
    else if (a == ECORE_X_ATOM_NET_WM_STATE_BELOW)
-      return ECORE_X_WINDOW_STATE_BELOW;
+     return ECORE_X_WINDOW_STATE_BELOW;
    else if (a == ECORE_X_ATOM_NET_WM_STATE_DEMANDS_ATTENTION)
-      return ECORE_X_WINDOW_STATE_DEMANDS_ATTENTION;
+     return ECORE_X_WINDOW_STATE_DEMANDS_ATTENTION;
    else
-      return ECORE_X_WINDOW_STATE_UNKNOWN;
+     return ECORE_X_WINDOW_STATE_UNKNOWN;
 } /* _ecore_x_netwm_state_get */
 
 static Ecore_X_Atom
@@ -874,43 +911,43 @@ _ecore_x_netwm_state_atom_get(Ecore_X_Window_State s)
    switch(s)
      {
       case ECORE_X_WINDOW_STATE_MODAL:
-         return ECORE_X_ATOM_NET_WM_STATE_MODAL;
+        return ECORE_X_ATOM_NET_WM_STATE_MODAL;
 
       case ECORE_X_WINDOW_STATE_STICKY:
-         return ECORE_X_ATOM_NET_WM_STATE_STICKY;
+        return ECORE_X_ATOM_NET_WM_STATE_STICKY;
 
       case ECORE_X_WINDOW_STATE_MAXIMIZED_VERT:
-         return ECORE_X_ATOM_NET_WM_STATE_MAXIMIZED_VERT;
+        return ECORE_X_ATOM_NET_WM_STATE_MAXIMIZED_VERT;
 
       case ECORE_X_WINDOW_STATE_MAXIMIZED_HORZ:
-         return ECORE_X_ATOM_NET_WM_STATE_MAXIMIZED_HORZ;
+        return ECORE_X_ATOM_NET_WM_STATE_MAXIMIZED_HORZ;
 
       case ECORE_X_WINDOW_STATE_SHADED:
-         return ECORE_X_ATOM_NET_WM_STATE_SHADED;
+        return ECORE_X_ATOM_NET_WM_STATE_SHADED;
 
       case ECORE_X_WINDOW_STATE_SKIP_TASKBAR:
-         return ECORE_X_ATOM_NET_WM_STATE_SKIP_TASKBAR;
+        return ECORE_X_ATOM_NET_WM_STATE_SKIP_TASKBAR;
 
       case ECORE_X_WINDOW_STATE_SKIP_PAGER:
-         return ECORE_X_ATOM_NET_WM_STATE_SKIP_PAGER;
+        return ECORE_X_ATOM_NET_WM_STATE_SKIP_PAGER;
 
       case ECORE_X_WINDOW_STATE_HIDDEN:
-         return ECORE_X_ATOM_NET_WM_STATE_HIDDEN;
+        return ECORE_X_ATOM_NET_WM_STATE_HIDDEN;
 
       case ECORE_X_WINDOW_STATE_FULLSCREEN:
-         return ECORE_X_ATOM_NET_WM_STATE_FULLSCREEN;
+        return ECORE_X_ATOM_NET_WM_STATE_FULLSCREEN;
 
       case ECORE_X_WINDOW_STATE_ABOVE:
-         return ECORE_X_ATOM_NET_WM_STATE_ABOVE;
+        return ECORE_X_ATOM_NET_WM_STATE_ABOVE;
 
       case ECORE_X_WINDOW_STATE_BELOW:
-         return ECORE_X_ATOM_NET_WM_STATE_BELOW;
+        return ECORE_X_ATOM_NET_WM_STATE_BELOW;
 
       case ECORE_X_WINDOW_STATE_DEMANDS_ATTENTION:
-         return ECORE_X_ATOM_NET_WM_STATE_DEMANDS_ATTENTION;
+        return ECORE_X_ATOM_NET_WM_STATE_DEMANDS_ATTENTION;
 
       default:
-         return 0;
+        return 0;
      } /* switch */
 } /* _ecore_x_netwm_state_atom_get */
 
@@ -931,10 +968,10 @@ ecore_x_netwm_window_state_set(Ecore_X_Window        win,
 
    set = malloc(num * sizeof(Ecore_X_Atom));
    if (!set)
-      return;
+     return;
 
    for (i = 0; i < num; i++)
-      set[i] = _ecore_x_netwm_state_atom_get(state[i]);
+     set[i] = _ecore_x_netwm_state_atom_get(state[i]);
 
    ecore_x_window_prop_atom_set(win, ECORE_X_ATOM_NET_WM_STATE, set, num);
 
@@ -951,25 +988,25 @@ ecore_x_netwm_window_state_get(Ecore_X_Window         win,
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    if (num)
-      *num = 0;
+     *num = 0;
 
    if (state)
-      *state = NULL;
+     *state = NULL;
 
    num_ret = ecore_x_window_prop_atom_list_get(win, ECORE_X_ATOM_NET_WM_STATE,
                                                &atoms);
    if (num_ret <= 0)
-      return EINA_FALSE;
+     return EINA_FALSE;
 
    if (state)
      {
         *state = malloc(num_ret * sizeof(Ecore_X_Window_State));
         if (*state)
-           for (i = 0; i < num_ret; ++i)
-              (*state)[i] = _ecore_x_netwm_state_get(atoms[i]);
+          for (i = 0; i < num_ret; ++i)
+            (*state)[i] = _ecore_x_netwm_state_get(atoms[i]);
 
         if (num)
-           *num = num_ret;
+          *num = num_ret;
      }
 
    free(atoms);
@@ -980,35 +1017,35 @@ static Ecore_X_Window_Type
 _ecore_x_netwm_window_type_type_get(Ecore_X_Atom atom)
 {
    if (atom == ECORE_X_ATOM_NET_WM_WINDOW_TYPE_DESKTOP)
-      return ECORE_X_WINDOW_TYPE_DESKTOP;
+     return ECORE_X_WINDOW_TYPE_DESKTOP;
    else if (atom == ECORE_X_ATOM_NET_WM_WINDOW_TYPE_DOCK)
-      return ECORE_X_WINDOW_TYPE_DOCK;
+     return ECORE_X_WINDOW_TYPE_DOCK;
    else if (atom == ECORE_X_ATOM_NET_WM_WINDOW_TYPE_TOOLBAR)
-      return ECORE_X_WINDOW_TYPE_TOOLBAR;
+     return ECORE_X_WINDOW_TYPE_TOOLBAR;
    else if (atom == ECORE_X_ATOM_NET_WM_WINDOW_TYPE_MENU)
-      return ECORE_X_WINDOW_TYPE_MENU;
+     return ECORE_X_WINDOW_TYPE_MENU;
    else if (atom == ECORE_X_ATOM_NET_WM_WINDOW_TYPE_UTILITY)
-      return ECORE_X_WINDOW_TYPE_UTILITY;
+     return ECORE_X_WINDOW_TYPE_UTILITY;
    else if (atom == ECORE_X_ATOM_NET_WM_WINDOW_TYPE_SPLASH)
-      return ECORE_X_WINDOW_TYPE_SPLASH;
+     return ECORE_X_WINDOW_TYPE_SPLASH;
    else if (atom == ECORE_X_ATOM_NET_WM_WINDOW_TYPE_DIALOG)
-      return ECORE_X_WINDOW_TYPE_DIALOG;
+     return ECORE_X_WINDOW_TYPE_DIALOG;
    else if (atom == ECORE_X_ATOM_NET_WM_WINDOW_TYPE_NORMAL)
-      return ECORE_X_WINDOW_TYPE_NORMAL;
+     return ECORE_X_WINDOW_TYPE_NORMAL;
    else if (atom == ECORE_X_ATOM_NET_WM_WINDOW_TYPE_DROPDOWN_MENU)
-      return ECORE_X_WINDOW_TYPE_DROPDOWN_MENU;
+     return ECORE_X_WINDOW_TYPE_DROPDOWN_MENU;
    else if (atom == ECORE_X_ATOM_NET_WM_WINDOW_TYPE_POPUP_MENU)
-      return ECORE_X_WINDOW_TYPE_POPUP_MENU;
+     return ECORE_X_WINDOW_TYPE_POPUP_MENU;
    else if (atom == ECORE_X_ATOM_NET_WM_WINDOW_TYPE_TOOLTIP)
-      return ECORE_X_WINDOW_TYPE_TOOLTIP;
+     return ECORE_X_WINDOW_TYPE_TOOLTIP;
    else if (atom == ECORE_X_ATOM_NET_WM_WINDOW_TYPE_NOTIFICATION)
-      return ECORE_X_WINDOW_TYPE_NOTIFICATION;
+     return ECORE_X_WINDOW_TYPE_NOTIFICATION;
    else if (atom == ECORE_X_ATOM_NET_WM_WINDOW_TYPE_COMBO)
-      return ECORE_X_WINDOW_TYPE_COMBO;
+     return ECORE_X_WINDOW_TYPE_COMBO;
    else if (atom == ECORE_X_ATOM_NET_WM_WINDOW_TYPE_DND)
-      return ECORE_X_WINDOW_TYPE_DND;
+     return ECORE_X_WINDOW_TYPE_DND;
    else
-      return ECORE_X_WINDOW_TYPE_UNKNOWN;
+     return ECORE_X_WINDOW_TYPE_UNKNOWN;
 } /* _ecore_x_netwm_window_type_type_get */
 
 static Ecore_X_Atom
@@ -1017,49 +1054,49 @@ _ecore_x_netwm_window_type_atom_get(Ecore_X_Window_Type type)
    switch (type)
      {
       case ECORE_X_WINDOW_TYPE_DESKTOP:
-         return ECORE_X_ATOM_NET_WM_WINDOW_TYPE_DESKTOP;
+        return ECORE_X_ATOM_NET_WM_WINDOW_TYPE_DESKTOP;
 
       case ECORE_X_WINDOW_TYPE_DOCK:
-         return ECORE_X_ATOM_NET_WM_WINDOW_TYPE_DOCK;
+        return ECORE_X_ATOM_NET_WM_WINDOW_TYPE_DOCK;
 
       case ECORE_X_WINDOW_TYPE_TOOLBAR:
-         return ECORE_X_ATOM_NET_WM_WINDOW_TYPE_TOOLBAR;
+        return ECORE_X_ATOM_NET_WM_WINDOW_TYPE_TOOLBAR;
 
       case ECORE_X_WINDOW_TYPE_MENU:
-         return ECORE_X_ATOM_NET_WM_WINDOW_TYPE_MENU;
+        return ECORE_X_ATOM_NET_WM_WINDOW_TYPE_MENU;
 
       case ECORE_X_WINDOW_TYPE_UTILITY:
-         return ECORE_X_ATOM_NET_WM_WINDOW_TYPE_UTILITY;
+        return ECORE_X_ATOM_NET_WM_WINDOW_TYPE_UTILITY;
 
       case ECORE_X_WINDOW_TYPE_SPLASH:
-         return ECORE_X_ATOM_NET_WM_WINDOW_TYPE_SPLASH;
+        return ECORE_X_ATOM_NET_WM_WINDOW_TYPE_SPLASH;
 
       case ECORE_X_WINDOW_TYPE_DIALOG:
-         return ECORE_X_ATOM_NET_WM_WINDOW_TYPE_DIALOG;
+        return ECORE_X_ATOM_NET_WM_WINDOW_TYPE_DIALOG;
 
       case ECORE_X_WINDOW_TYPE_NORMAL:
-         return ECORE_X_ATOM_NET_WM_WINDOW_TYPE_NORMAL;
+        return ECORE_X_ATOM_NET_WM_WINDOW_TYPE_NORMAL;
 
       case ECORE_X_WINDOW_TYPE_DROPDOWN_MENU:
-         return ECORE_X_ATOM_NET_WM_WINDOW_TYPE_DROPDOWN_MENU;
+        return ECORE_X_ATOM_NET_WM_WINDOW_TYPE_DROPDOWN_MENU;
 
       case ECORE_X_WINDOW_TYPE_POPUP_MENU:
-         return ECORE_X_ATOM_NET_WM_WINDOW_TYPE_POPUP_MENU;
+        return ECORE_X_ATOM_NET_WM_WINDOW_TYPE_POPUP_MENU;
 
       case ECORE_X_WINDOW_TYPE_TOOLTIP:
-         return ECORE_X_ATOM_NET_WM_WINDOW_TYPE_TOOLTIP;
+        return ECORE_X_ATOM_NET_WM_WINDOW_TYPE_TOOLTIP;
 
       case ECORE_X_WINDOW_TYPE_NOTIFICATION:
-         return ECORE_X_ATOM_NET_WM_WINDOW_TYPE_NOTIFICATION;
+        return ECORE_X_ATOM_NET_WM_WINDOW_TYPE_NOTIFICATION;
 
       case ECORE_X_WINDOW_TYPE_COMBO:
-         return ECORE_X_ATOM_NET_WM_WINDOW_TYPE_COMBO;
+        return ECORE_X_ATOM_NET_WM_WINDOW_TYPE_COMBO;
 
       case ECORE_X_WINDOW_TYPE_DND:
-         return ECORE_X_ATOM_NET_WM_WINDOW_TYPE_DND;
+        return ECORE_X_ATOM_NET_WM_WINDOW_TYPE_DND;
 
       default:
-         return 0;
+        return 0;
      } /* switch */
 } /* _ecore_x_netwm_window_type_atom_get */
 
@@ -1068,7 +1105,8 @@ _ecore_x_netwm_window_type_atom_get(Ecore_X_Window_Type type)
  * , ECORE_X_WINDOW_TYPE_MENU or ECORE_X_WINDOW_TYPE_DIALOG
  */
 EAPI void
-ecore_x_netwm_window_type_set(Ecore_X_Window win, Ecore_X_Window_Type type)
+ecore_x_netwm_window_type_set(Ecore_X_Window      win,
+                              Ecore_X_Window_Type type)
 {
    Ecore_X_Atom atom;
 
@@ -1080,30 +1118,32 @@ ecore_x_netwm_window_type_set(Ecore_X_Window win, Ecore_X_Window_Type type)
 
 /* FIXME: Maybe return 0 on some conditions? */
 EAPI Eina_Bool
-ecore_x_netwm_window_type_get(Ecore_X_Window win, Ecore_X_Window_Type *type)
+ecore_x_netwm_window_type_get(Ecore_X_Window       win,
+                              Ecore_X_Window_Type *type)
 {
    int num;
    Ecore_X_Atom *atoms = NULL;
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    if (type)
-      *type = ECORE_X_WINDOW_TYPE_NORMAL;
+     *type = ECORE_X_WINDOW_TYPE_NORMAL;
 
    num = ecore_x_window_prop_atom_list_get(win,
                                            ECORE_X_ATOM_NET_WM_WINDOW_TYPE,
                                            &atoms);
    if ((type) && (num >= 1) && (atoms))
-      *type = _ecore_x_netwm_window_type_type_get(atoms[0]);
+     *type = _ecore_x_netwm_window_type_type_get(atoms[0]);
 
    free(atoms);
    if (num >= 1)
-      return EINA_TRUE;
+     return EINA_TRUE;
 
    return EINA_FALSE;
 } /* ecore_x_netwm_window_type_get */
 
 EAPI int
-ecore_x_netwm_window_types_get(Ecore_X_Window win, Ecore_X_Window_Type **types)
+ecore_x_netwm_window_types_get(Ecore_X_Window        win,
+                               Ecore_X_Window_Type **types)
 {
    int num, i;
    Ecore_X_Atom *atoms = NULL;
@@ -1111,7 +1151,7 @@ ecore_x_netwm_window_types_get(Ecore_X_Window win, Ecore_X_Window_Type **types)
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    if (types)
-      *types = NULL;
+     *types = NULL;
 
    num = ecore_x_window_prop_atom_list_get(win,
                                            ECORE_X_ATOM_NET_WM_WINDOW_TYPE,
@@ -1119,22 +1159,22 @@ ecore_x_netwm_window_types_get(Ecore_X_Window win, Ecore_X_Window_Type **types)
    if ((num <= 0) || (!atoms))
      {
         if (atoms)
-           free(atoms);
+          free(atoms);
 
         return 0;
      }
 
    atoms2 = malloc(num * sizeof(Ecore_X_Window_Type));
    if (!atoms2)
-      return 0;
+     return 0;
 
    for (i = 0; i < num; i++)
-      atoms2[i] = _ecore_x_netwm_window_type_type_get(atoms[i]);
+     atoms2[i] = _ecore_x_netwm_window_type_type_get(atoms[i]);
    free(atoms);
    if (types)
-      *types = atoms2;
+     *types = atoms2;
    else
-      free(atoms2);
+     free(atoms2);
 
    return num;
 } /* ecore_x_netwm_window_types_get */
@@ -1145,51 +1185,52 @@ _ecore_x_netwm_action_atom_get(Ecore_X_Action action)
    switch (action)
      {
       case ECORE_X_ACTION_MOVE:
-         return ECORE_X_ATOM_NET_WM_ACTION_MOVE;
+        return ECORE_X_ATOM_NET_WM_ACTION_MOVE;
 
       case ECORE_X_ACTION_RESIZE:
-         return ECORE_X_ATOM_NET_WM_ACTION_RESIZE;
+        return ECORE_X_ATOM_NET_WM_ACTION_RESIZE;
 
       case ECORE_X_ACTION_MINIMIZE:
-         return ECORE_X_ATOM_NET_WM_ACTION_MINIMIZE;
+        return ECORE_X_ATOM_NET_WM_ACTION_MINIMIZE;
 
       case ECORE_X_ACTION_SHADE:
-         return ECORE_X_ATOM_NET_WM_ACTION_SHADE;
+        return ECORE_X_ATOM_NET_WM_ACTION_SHADE;
 
       case ECORE_X_ACTION_STICK:
-         return ECORE_X_ATOM_NET_WM_ACTION_STICK;
+        return ECORE_X_ATOM_NET_WM_ACTION_STICK;
 
       case ECORE_X_ACTION_MAXIMIZE_HORZ:
-         return ECORE_X_ATOM_NET_WM_ACTION_MAXIMIZE_HORZ;
+        return ECORE_X_ATOM_NET_WM_ACTION_MAXIMIZE_HORZ;
 
       case ECORE_X_ACTION_MAXIMIZE_VERT:
-         return ECORE_X_ATOM_NET_WM_ACTION_MAXIMIZE_VERT;
+        return ECORE_X_ATOM_NET_WM_ACTION_MAXIMIZE_VERT;
 
       case ECORE_X_ACTION_FULLSCREEN:
-         return ECORE_X_ATOM_NET_WM_ACTION_FULLSCREEN;
+        return ECORE_X_ATOM_NET_WM_ACTION_FULLSCREEN;
 
       case ECORE_X_ACTION_CHANGE_DESKTOP:
-         return ECORE_X_ATOM_NET_WM_ACTION_CHANGE_DESKTOP;
+        return ECORE_X_ATOM_NET_WM_ACTION_CHANGE_DESKTOP;
 
       case ECORE_X_ACTION_CLOSE:
-         return ECORE_X_ATOM_NET_WM_ACTION_CLOSE;
+        return ECORE_X_ATOM_NET_WM_ACTION_CLOSE;
 
       case ECORE_X_ACTION_ABOVE:
-         return ECORE_X_ATOM_NET_WM_ACTION_ABOVE;
+        return ECORE_X_ATOM_NET_WM_ACTION_ABOVE;
 
       case ECORE_X_ACTION_BELOW:
-         return ECORE_X_ATOM_NET_WM_ACTION_BELOW;
+        return ECORE_X_ATOM_NET_WM_ACTION_BELOW;
 
       default:
-         return 0;
+        return 0;
      } /* switch */
 } /* _ecore_x_netwm_action_atom_get */
 
 /* FIXME: Get complete list */
 EAPI Eina_Bool
-ecore_x_netwm_allowed_action_isset(Ecore_X_Window win, Ecore_X_Action action)
+ecore_x_netwm_allowed_action_isset(Ecore_X_Window win,
+                                   Ecore_X_Action action)
 {
-  int num, i;
+   int num, i;
    Ecore_X_Atom *atoms, atom;
    Eina_Bool ret = EINA_FALSE;
 
@@ -1197,7 +1238,7 @@ ecore_x_netwm_allowed_action_isset(Ecore_X_Window win, Ecore_X_Action action)
    num = ecore_x_window_prop_atom_list_get(win, ECORE_X_ATOM_NET_WM_WINDOW_TYPE,
                                            &atoms);
    if (num <= 0)
-      return ret;
+     return ret;
 
    atom = _ecore_x_netwm_action_atom_get(action);
 
@@ -1233,10 +1274,10 @@ ecore_x_netwm_allowed_action_set(Ecore_X_Window  win,
 
    set = malloc(num * sizeof(Ecore_X_Atom));
    if (!set)
-      return;
+     return;
 
    for (i = 0; i < num; i++)
-      set[i] = _ecore_x_netwm_action_atom_get(action[i]);
+     set[i] = _ecore_x_netwm_action_atom_get(action[i]);
 
    ecore_x_window_prop_atom_set(win,
                                 ECORE_X_ATOM_NET_WM_ALLOWED_ACTIONS,
@@ -1256,27 +1297,27 @@ ecore_x_netwm_allowed_action_get(Ecore_X_Window   win,
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    if (num)
-      *num = 0;
+     *num = 0;
 
    if (action)
-      *action = NULL;
+     *action = NULL;
 
    num_ret = ecore_x_window_prop_atom_list_get(
-         win,
-         ECORE_X_ATOM_NET_WM_ALLOWED_ACTIONS,
-         &atoms);
+       win,
+       ECORE_X_ATOM_NET_WM_ALLOWED_ACTIONS,
+       &atoms);
    if (num_ret <= 0)
-      return EINA_FALSE;
+     return EINA_FALSE;
 
    if (action)
      {
         *action = malloc(num_ret * sizeof(Ecore_X_Action));
         if (*action)
-           for (i = 0; i < num_ret; ++i)
-              (*action)[i] = _ecore_x_netwm_action_atom_get(atoms[i]);
+          for (i = 0; i < num_ret; ++i)
+            (*action)[i] = _ecore_x_netwm_action_atom_get(atoms[i]);
 
         if (num)
-           *num = num_ret;
+          *num = num_ret;
      }
 
    free(atoms);
@@ -1284,7 +1325,8 @@ ecore_x_netwm_allowed_action_get(Ecore_X_Window   win,
 } /* ecore_x_netwm_allowed_action_get */
 
 EAPI void
-ecore_x_netwm_opacity_set(Ecore_X_Window win, unsigned int opacity)
+ecore_x_netwm_opacity_set(Ecore_X_Window win,
+                          unsigned int   opacity)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    ecore_x_window_prop_card32_set(win, ECORE_X_ATOM_NET_WM_WINDOW_OPACITY,
@@ -1292,7 +1334,8 @@ ecore_x_netwm_opacity_set(Ecore_X_Window win, unsigned int opacity)
 } /* ecore_x_netwm_opacity_set */
 
 EAPI Eina_Bool
-ecore_x_netwm_opacity_get(Ecore_X_Window win, unsigned int *opacity)
+ecore_x_netwm_opacity_get(Ecore_X_Window win,
+                          unsigned int  *opacity)
 {
    int ret;
    unsigned int tmp;
@@ -1301,13 +1344,17 @@ ecore_x_netwm_opacity_get(Ecore_X_Window win, unsigned int *opacity)
    ret = ecore_x_window_prop_card32_get(win, ECORE_X_ATOM_NET_WM_WINDOW_OPACITY,
                                         &tmp, 1);
    if (opacity)
-      *opacity = tmp;
+     *opacity = tmp;
 
    return ret == 1 ? EINA_TRUE : EINA_FALSE;
 } /* ecore_x_netwm_opacity_get */
 
 EAPI void
-ecore_x_netwm_frame_size_set(Ecore_X_Window win, int fl, int fr, int ft, int fb)
+ecore_x_netwm_frame_size_set(Ecore_X_Window win,
+                             int            fl,
+                             int            fr,
+                             int            ft,
+                             int            fb)
 {
    unsigned int frames[4];
 
@@ -1338,19 +1385,19 @@ ecore_x_netwm_frame_size_get(Ecore_X_Window win,
                                         frames,
                                         4);
    if (ret != 4)
-      return EINA_FALSE;
+     return EINA_FALSE;
 
    if (fl)
-      *fl = frames[0];
+     *fl = frames[0];
 
    if (fr)
-      *fr = frames[1];
+     *fr = frames[1];
 
    if (ft)
-      *ft = frames[2];
+     *ft = frames[2];
 
    if (fb)
-      *fb = frames[3];
+     *fb = frames[3];
 
    return EINA_TRUE;
 } /* ecore_x_netwm_frame_size_get */
@@ -1364,13 +1411,13 @@ ecore_x_netwm_sync_counter_get(Ecore_X_Window        win,
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    ret = ecore_x_window_prop_card32_get(
-         win,
-         ECORE_X_ATOM_NET_WM_SYNC_REQUEST_COUNTER,
-         &tmp,
-         1);
+       win,
+       ECORE_X_ATOM_NET_WM_SYNC_REQUEST_COUNTER,
+       &tmp,
+       1);
 
    if (counter)
-      *counter = tmp;
+     *counter = tmp;
 
    return ret == 1 ? EINA_TRUE : EINA_FALSE;
 } /* ecore_x_netwm_sync_counter_get */
@@ -1381,7 +1428,7 @@ ecore_x_netwm_ping_send(Ecore_X_Window win)
    XEvent xev;
 
    if (!win)
-      return;
+     return;
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    xev.xclient.type = ClientMessage;
@@ -1399,13 +1446,14 @@ ecore_x_netwm_ping_send(Ecore_X_Window win)
 } /* ecore_x_netwm_ping_send */
 
 EAPI void
-ecore_x_netwm_sync_request_send(Ecore_X_Window win, unsigned int serial)
+ecore_x_netwm_sync_request_send(Ecore_X_Window win,
+                                unsigned int   serial)
 {
    XSyncValue value;
    XEvent xev;
 
    if (!win)
-      return;
+     return;
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    XSyncIntToValue(&value, (int)serial);
@@ -1434,11 +1482,11 @@ ecore_x_netwm_state_request_send(Ecore_X_Window       win,
    XEvent xev;
 
    if (!win)
-      return;
+     return;
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    if (!root)
-      root = DefaultRootWindow(_ecore_x_disp);
+     root = DefaultRootWindow(_ecore_x_disp);
 
    xev.xclient.type = ClientMessage;
    xev.xclient.serial = 0;
@@ -1467,11 +1515,11 @@ ecore_x_netwm_desktop_request_send(Ecore_X_Window win,
    XEvent xev;
 
    if (!win)
-      return;
+     return;
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    if (!root)
-      root = DefaultRootWindow(_ecore_x_disp);
+     root = DefaultRootWindow(_ecore_x_disp);
 
    xev.xclient.type = ClientMessage;
    xev.xclient.serial = 0;
@@ -1488,14 +1536,14 @@ ecore_x_netwm_desktop_request_send(Ecore_X_Window win,
 
 int
 _ecore_x_netwm_startup_info_begin(Ecore_X_Window win __UNUSED__,
-                                  char *data         __UNUSED__)
+                                  char          *data __UNUSED__)
 {
 #if 0
    Ecore_X_Startup_Info *info;
    unsigned char *exists = 0;
 
    if (!startup_info)
-      return 0;
+     return 0;
 
    info = eina_hash_find(startup_info, (void *)win);
    if (info)
@@ -1507,7 +1555,7 @@ _ecore_x_netwm_startup_info_begin(Ecore_X_Window win __UNUSED__,
 
    info = calloc(1, sizeof(Ecore_X_Startup_Info));
    if (!info)
-      return 0;
+     return 0;
 
    info->win = win;
    info->length = 0;
@@ -1523,13 +1571,13 @@ _ecore_x_netwm_startup_info_begin(Ecore_X_Window win __UNUSED__,
    info->length += 20;
    info->buffer[info->length] = 0;
    if (exists)
-      eina_hash_modify(startup_info, (void *)info->win, info);
+     eina_hash_modify(startup_info, (void *)info->win, info);
    else
-      eina_hash_add(startup_info, (void *)info->win, info);
+     eina_hash_add(startup_info, (void *)info->win, info);
 
    if (strlen(info->buffer) != 20)
-      /* We have a '\0' in there, the message is done */
-      _ecore_x_netwm_startup_info_process(info);
+     /* We have a '\0' in there, the message is done */
+     _ecore_x_netwm_startup_info_process(info);
 
 #endif /* if 0 */
    return 1;
@@ -1537,18 +1585,18 @@ _ecore_x_netwm_startup_info_begin(Ecore_X_Window win __UNUSED__,
 
 int
 _ecore_x_netwm_startup_info(Ecore_X_Window win __UNUSED__,
-                            char *data         __UNUSED__)
+                            char          *data __UNUSED__)
 {
 #if 0
    Ecore_X_Startup_Info *info;
    char *p;
 
    if (!startup_info)
-      return 0;
+     return 0;
 
    info = eina_hash_find(startup_info, (void *)win);
    if (!info)
-      return 0;
+     return 0;
 
    if ((info->length + 20) > info->buffer_size)
      {
@@ -1567,8 +1615,8 @@ _ecore_x_netwm_startup_info(Ecore_X_Window win __UNUSED__,
    info->length += 20;
    info->buffer[info->length] = 0;
    if (strlen(p) != 20)
-      /* We have a '\0' in there, the message is done */
-      _ecore_x_netwm_startup_info_process(info);
+     /* We have a '\0' in there, the message is done */
+     _ecore_x_netwm_startup_info_process(info);
 
 #endif /* if 0 */
    return 1;
@@ -1578,8 +1626,9 @@ _ecore_x_netwm_startup_info(Ecore_X_Window win __UNUSED__,
  * Set UTF-8 string property
  */
 static void
-_ecore_x_window_prop_string_utf8_set(Ecore_X_Window win, Ecore_X_Atom atom,
-                                     const char *str)
+_ecore_x_window_prop_string_utf8_set(Ecore_X_Window win,
+                                     Ecore_X_Atom   atom,
+                                     const char    *str)
 {
    XChangeProperty(_ecore_x_disp, win, atom, ECORE_X_ATOM_UTF8_STRING, 8,
                    PropModeReplace, (unsigned char *)str, strlen(str));
@@ -1589,7 +1638,8 @@ _ecore_x_window_prop_string_utf8_set(Ecore_X_Window win, Ecore_X_Atom atom,
  * Get UTF-8 string property
  */
 static char *
-_ecore_x_window_prop_string_utf8_get(Ecore_X_Window win, Ecore_X_Atom atom)
+_ecore_x_window_prop_string_utf8_get(Ecore_X_Window win,
+                                     Ecore_X_Atom   atom)
 {
    char *str;
    unsigned char *prop_ret;
@@ -1613,7 +1663,7 @@ _ecore_x_window_prop_string_utf8_get(Ecore_X_Window win, Ecore_X_Atom atom)
      }
 
    if (prop_ret)
-      XFree(prop_ret);
+     XFree(prop_ret);
 
    return str;
 } /* _ecore_x_window_prop_string_utf8_get */
@@ -1641,16 +1691,16 @@ _ecore_x_netwm_startup_info_process(Ecore_X_Startup_Info *info)
    if (!strcmp(info->buffer, "new"))
      {
         if (info->init)
-           event = ECORE_X_EVENT_STARTUP_SEQUENCE_CHANGE;
+          event = ECORE_X_EVENT_STARTUP_SEQUENCE_CHANGE;
         else
-           event = ECORE_X_EVENT_STARTUP_SEQUENCE_NEW;
+          event = ECORE_X_EVENT_STARTUP_SEQUENCE_NEW;
 
         info->init = 1;
      }
    else if (!strcmp(info->buffer, "change"))
-      event = ECORE_X_EVENT_STARTUP_SEQUENCE_CHANGE;
+     event = ECORE_X_EVENT_STARTUP_SEQUENCE_CHANGE;
    else if (!strcmp(info->buffer, "remove"))
-      event = ECORE_X_EVENT_STARTUP_SEQUENCE_REMOVE;
+     event = ECORE_X_EVENT_STARTUP_SEQUENCE_REMOVE;
    else
      {
         eina_hash_del(startup_info, (void *)info->win);
@@ -1689,8 +1739,8 @@ _ecore_x_netwm_startup_info_process(Ecore_X_Startup_Info *info)
    else
      {
         /* Discard buffer */
-        info->length = 0;
-        info->buffer[0] = 0;
+         info->length = 0;
+         info->buffer[0] = 0;
      }
 
    return 1;
@@ -1700,7 +1750,8 @@ _ecore_x_netwm_startup_info_process(Ecore_X_Startup_Info *info)
  * Parse startup info
  */
 static int
-_ecore_x_netwm_startup_info_parse(Ecore_X_Startup_Info *info, char *data)
+_ecore_x_netwm_startup_info_parse(Ecore_X_Startup_Info *info,
+                                  char                 *data)
 {
    while (*data)
      {
@@ -1715,7 +1766,7 @@ _ecore_x_netwm_startup_info_parse(Ecore_X_Startup_Info *info, char *data)
         key = data;
         data = strchr(key, '=');
         if (!data)
-           return 0;
+          return 0;
 
         *data = 0;
         data++;
@@ -1729,7 +1780,7 @@ _ecore_x_netwm_startup_info_parse(Ecore_X_Startup_Info *info, char *data)
         while (*p)
           {
              if ((pp - value) >= 1024)
-                return 0;
+               return 0;
 
              if (escaped)
                {
@@ -1740,9 +1791,9 @@ _ecore_x_netwm_startup_info_parse(Ecore_X_Startup_Info *info, char *data)
              else if (in_quot_sing)
                {
                   if (*p == '\\')
-                     escaped = 1;
+                    escaped = 1;
                   else if (*p == '\'')
-                     in_quot_sing = 0;
+                    in_quot_sing = 0;
                   else
                     {
                        *pp = *p;
@@ -1752,9 +1803,9 @@ _ecore_x_netwm_startup_info_parse(Ecore_X_Startup_Info *info, char *data)
              else if (in_quot_dbl)
                {
                   if (*p == '\\')
-                     escaped = 1;
+                    escaped = 1;
                   else if (*p == '\"')
-                     in_quot_dbl = 0;
+                    in_quot_dbl = 0;
                   else
                     {
                        *pp = *p;
@@ -1764,13 +1815,13 @@ _ecore_x_netwm_startup_info_parse(Ecore_X_Startup_Info *info, char *data)
              else
                {
                   if (*p == '\\')
-                     escaped = 1;
+                    escaped = 1;
                   else if (*p == '\'')
-                     in_quot_sing = 1;
+                    in_quot_sing = 1;
                   else if (*p == '\"')
-                     in_quot_dbl = 1;
+                    in_quot_dbl = 1;
                   else if (*p == ' ')
-                     break;
+                    break;
                   else
                     {
                        *pp = *p;
@@ -1781,7 +1832,7 @@ _ecore_x_netwm_startup_info_parse(Ecore_X_Startup_Info *info, char *data)
              p++;
           }
         if ((in_quot_dbl) || (in_quot_sing))
-           return 0;
+          return 0;
 
         data = p;
         *pp = 0;
@@ -1790,64 +1841,64 @@ _ecore_x_netwm_startup_info_parse(Ecore_X_Startup_Info *info, char *data)
         if (!strcmp(key, "ID"))
           {
              if ((info->id) && (strcmp(info->id, value)))
-                return 0;
+               return 0;
 
              info->id = strdup(value);
              p = strstr(value, "_TIME");
              if (p)
-                info->timestamp = atoi(p + 5);
+               info->timestamp = atoi(p + 5);
           }
         else if (!strcmp(key, "NAME"))
           {
              if (info->name)
-                free(info->name);
+               free(info->name);
 
              info->name = strdup(value);
           }
         else if (!strcmp(key, "SCREEN"))
-           info->screen = atoi(value);
+          info->screen = atoi(value);
         else if (!strcmp(key, "BIN"))
           {
              if (info->bin)
-                free(info->bin);
+               free(info->bin);
 
              info->bin = strdup(value);
           }
         else if (!strcmp(key, "ICON"))
           {
              if (info->icon)
-                free(info->icon);
+               free(info->icon);
 
              info->icon = strdup(value);
           }
         else if (!strcmp(key, "DESKTOP"))
-           info->desktop = atoi(value);
+          info->desktop = atoi(value);
         else if (!strcmp(key, "TIMESTAMP"))
           {
              if (!info->timestamp)
-                info->timestamp = atoi(value);
+               info->timestamp = atoi(value);
           }
         else if (!strcmp(key, "DESCRIPTION"))
           {
              if (info->description)
-                free(info->description);
+               free(info->description);
 
              info->description = strdup(value);
           }
         else if (!strcmp(key, "WMCLASS"))
           {
              if (info->wmclass)
-                free(info->wmclass);
+               free(info->wmclass);
 
              info->wmclass = strdup(value);
           }
         else if (!strcmp(key, "SILENT"))
-           info->silent = atoi(value);
+          info->silent = atoi(value);
         else
-           ERR("Ecore X Sequence, Unknown: %s=%s", key, value);
+          ERR("Ecore X Sequence, Unknown: %s=%s", key, value);
      }
    if (!info->id)
-      return 0;
+     return 0;
 
    return 1;
 } /* _ecore_x_netwm_startup_info_parse */
@@ -1864,28 +1915,28 @@ _ecore_x_netwm_startup_info_free(void *data)
 
    info = data;
    if (!info)
-      return;
+     return;
 
    if (info->buffer)
-      free(info->buffer);
+     free(info->buffer);
 
    if (info->id)
-      free(info->id);
+     free(info->id);
 
    if (info->name)
-      free(info->name);
+     free(info->name);
 
    if (info->bin)
-      free(info->bin);
+     free(info->bin);
 
    if (info->icon)
-      free(info->icon);
+     free(info->icon);
 
    if (info->description)
-      free(info->description);
+     free(info->description);
 
    if (info->wmclass)
-      free(info->wmclass);
+     free(info->wmclass);
 
    free(info);
 } /* _ecore_x_netwm_startup_info_free */
@@ -1903,10 +1954,10 @@ ecore_x_screen_is_composited(int screen)
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    snprintf(buf, sizeof(buf), "_NET_WM_CM_S%i", screen);
    if (atom == None)
-      atom = XInternAtom(_ecore_x_disp, buf, False);
+     atom = XInternAtom(_ecore_x_disp, buf, False);
 
    if (atom == None)
-      return EINA_FALSE;
+     return EINA_FALSE;
 
    win = XGetSelectionOwner(_ecore_x_disp, atom);
 
@@ -1914,7 +1965,8 @@ ecore_x_screen_is_composited(int screen)
 } /* ecore_x_screen_is_composited */
 
 EAPI void
-ecore_x_screen_is_composited_set(int screen, Ecore_X_Window win)
+ecore_x_screen_is_composited_set(int            screen,
+                                 Ecore_X_Window win)
 {
    static Ecore_X_Atom atom = None;
    char buf[32];
@@ -1922,10 +1974,10 @@ ecore_x_screen_is_composited_set(int screen, Ecore_X_Window win)
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    snprintf(buf, sizeof(buf), "_NET_WM_CM_S%i", screen);
    if (atom == None)
-      atom = XInternAtom(_ecore_x_disp, buf, False);
+     atom = XInternAtom(_ecore_x_disp, buf, False);
 
    if (atom == None)
-      return;
+     return;
 
    XSetSelectionOwner(_ecore_x_disp, atom, win, _ecore_x_event_last_time);
 } /* ecore_x_screen_is_composited_set */
index 2d23741..b81d06c 100644 (file)
  * @ingroup Ecore_X_Pixmap_Group
  */
 EAPI Ecore_X_Pixmap
-ecore_x_pixmap_new(Ecore_X_Window win, int w, int h, int dep)
+ecore_x_pixmap_new(Ecore_X_Window win,
+                   int            w,
+                   int            h,
+                   int            dep)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    if (win == 0)
-      win = DefaultRootWindow(_ecore_x_disp);
+     win = DefaultRootWindow(_ecore_x_disp);
 
    if (dep == 0)
-      dep = DefaultDepth(_ecore_x_disp, DefaultScreen(_ecore_x_disp));
+     dep = DefaultDepth(_ecore_x_disp, DefaultScreen(_ecore_x_disp));
 
    return XCreatePixmap(_ecore_x_disp, win, w, h, dep);
 } /* ecore_x_pixmap_new */
@@ -68,9 +71,15 @@ ecore_x_pixmap_free(Ecore_X_Pixmap pmap)
  * @ingroup Ecore_X_Pixmap_Group
  */
 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)
+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)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    XCopyArea(_ecore_x_disp, pmap, dest, gc, sx, sy, w, h, dx, dy);
@@ -86,11 +95,15 @@ ecore_x_pixmap_paste(Ecore_X_Pixmap pmap, Ecore_X_Drawable dest,
  * @ingroup Ecore_X_Pixmap_Group
  */
 EAPI void
-ecore_x_pixmap_geometry_get(Ecore_X_Pixmap pmap, int *x, int *y, int *w, int *h)
+ecore_x_pixmap_geometry_get(Ecore_X_Pixmap pmap,
+                            int           *x,
+                            int           *y,
+                            int           *w,
+                            int           *h)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    if (pmap)
-      ecore_x_drawable_geometry_get(pmap, x, y, w, h);
+     ecore_x_drawable_geometry_get(pmap, x, y, w, h);
 } /* ecore_x_pixmap_geometry_get */
 
 /**
index 301af0c..9ff45ed 100644 (file)
@@ -54,7 +54,7 @@
 #endif /* ifdef ECORE_XI2 */
 
 #ifndef XK_MISCELLANY
-# define XK_MISCELLANY  1
+# define XK_MISCELLANY 1
 #endif
 
 #include "Ecore.h"
@@ -93,7 +93,7 @@ extern int _ecore_xlib_log_dom;
 #endif /* ifdef CRIT */
 #define CRIT(...) EINA_LOG_DOM_CRIT(_ecore_xlib_log_dom, __VA_ARGS__)
 
-typedef struct _Ecore_X_Selection_Intern   Ecore_X_Selection_Intern;
+typedef struct _Ecore_X_Selection_Intern Ecore_X_Selection_Intern;
 
 struct _Ecore_X_Selection_Intern
 {
@@ -104,18 +104,16 @@ struct _Ecore_X_Selection_Intern
    Time           time;
 };
 
-typedef struct _Ecore_X_Selection_Converter   Ecore_X_Selection_Converter;
+typedef struct _Ecore_X_Selection_Converter Ecore_X_Selection_Converter;
 
 struct _Ecore_X_Selection_Converter
 {
    Ecore_X_Atom                 target;
-   Eina_Bool                  (*convert)(char *target, void *data, int size,
-                                         void **data_ret, int *size_ret,
-                                         Ecore_X_Atom *type, int *typeseize);
+   Eina_Bool                    (*convert)(char *target, void *data, int size, void **data_ret, int *size_ret, Ecore_X_Atom *type, int *typeseize);
    Ecore_X_Selection_Converter *next;
 };
 
-typedef struct _Ecore_X_Selection_Parser   Ecore_X_Selection_Parser;
+typedef struct _Ecore_X_Selection_Parser Ecore_X_Selection_Parser;
 
 struct _Ecore_X_Selection_Parser
 {
@@ -202,166 +200,162 @@ extern Ecore_X_Atom _ecore_x_atoms_wm_protocols[ECORE_X_WM_PROTOCOL_NUM];
 
 extern int _ecore_window_grabs_num;
 extern Window *_ecore_window_grabs;
-extern Eina_Bool (*_ecore_window_grab_replay_func)(void *data, int event_type,
+extern Eina_Bool (*_ecore_window_grab_replay_func)(void *data,
+                                                   int event_type,
                                                    void *event);
 extern void *_ecore_window_grab_replay_data;
 
 extern Ecore_X_Window _ecore_x_private_win;
 
-void                      _ecore_x_error_handler_init(void);
-void                      _ecore_x_event_handle_any_event(XEvent *xevent);
-void                      _ecore_x_event_handle_key_press(XEvent *xevent);
-void                      _ecore_x_event_handle_key_release(XEvent *xevent);
-void                      _ecore_x_event_handle_button_press(XEvent *xevent);
-void                      _ecore_x_event_handle_button_release(XEvent *xevent);
-void                      _ecore_x_event_handle_motion_notify(XEvent *xevent);
-void                      _ecore_x_event_handle_enter_notify(XEvent *xevent);
-void                      _ecore_x_event_handle_leave_notify(XEvent *xevent);
-void                      _ecore_x_event_handle_focus_in(XEvent *xevent);
-void                      _ecore_x_event_handle_focus_out(XEvent *xevent);
-void                      _ecore_x_event_handle_keymap_notify(XEvent *xevent);
-void                      _ecore_x_event_handle_expose(XEvent *xevent);
-void                      _ecore_x_event_handle_graphics_expose(XEvent *xevent);
-void                      _ecore_x_event_handle_visibility_notify(
-   XEvent *xevent);
-void                      _ecore_x_event_handle_create_notify(XEvent *xevent);
-void                      _ecore_x_event_handle_destroy_notify(XEvent *xevent);
-void                      _ecore_x_event_handle_unmap_notify(XEvent *xevent);
-void                      _ecore_x_event_handle_map_notify(XEvent *xevent);
-void                      _ecore_x_event_handle_map_request(XEvent *xevent);
-void                      _ecore_x_event_handle_reparent_notify(XEvent *xevent);
-void                      _ecore_x_event_handle_configure_notify(XEvent *xevent);
-void                      _ecore_x_event_handle_configure_request(
-   XEvent *xevent);
-void                      _ecore_x_event_handle_gravity_notify(XEvent *xevent);
-void                      _ecore_x_event_handle_resize_request(XEvent *xevent);
-void                      _ecore_x_event_handle_circulate_notify(XEvent *xevent);
-void                      _ecore_x_event_handle_circulate_request(
-   XEvent *xevent);
-void                      _ecore_x_event_handle_property_notify(XEvent *xevent);
-void                      _ecore_x_event_handle_selection_clear(XEvent *xevent);
-void                      _ecore_x_event_handle_selection_request(
-   XEvent *xevent);
-void                      _ecore_x_event_handle_selection_notify(XEvent *xevent);
-void                      _ecore_x_event_handle_colormap_notify(XEvent *xevent);
-void                      _ecore_x_event_handle_client_message(XEvent *xevent);
-void                      _ecore_x_event_handle_mapping_notify(XEvent *xevent);
-void                      _ecore_x_event_handle_shape_change(XEvent *xevent);
-void                      _ecore_x_event_handle_screensaver_notify(
-   XEvent *xevent);
-void                      _ecore_x_event_handle_sync_counter(XEvent *xevent);
-void                      _ecore_x_event_handle_sync_alarm(XEvent *xevent);
+void _ecore_x_error_handler_init(void);
+void _ecore_x_event_handle_any_event(XEvent *xevent);
+void _ecore_x_event_handle_key_press(XEvent *xevent);
+void _ecore_x_event_handle_key_release(XEvent *xevent);
+void _ecore_x_event_handle_button_press(XEvent *xevent);
+void _ecore_x_event_handle_button_release(XEvent *xevent);
+void _ecore_x_event_handle_motion_notify(XEvent *xevent);
+void _ecore_x_event_handle_enter_notify(XEvent *xevent);
+void _ecore_x_event_handle_leave_notify(XEvent *xevent);
+void _ecore_x_event_handle_focus_in(XEvent *xevent);
+void _ecore_x_event_handle_focus_out(XEvent *xevent);
+void _ecore_x_event_handle_keymap_notify(XEvent *xevent);
+void _ecore_x_event_handle_expose(XEvent *xevent);
+void _ecore_x_event_handle_graphics_expose(XEvent *xevent);
+void _ecore_x_event_handle_visibility_notify(XEvent *xevent);
+void _ecore_x_event_handle_create_notify(XEvent *xevent);
+void _ecore_x_event_handle_destroy_notify(XEvent *xevent);
+void _ecore_x_event_handle_unmap_notify(XEvent *xevent);
+void _ecore_x_event_handle_map_notify(XEvent *xevent);
+void _ecore_x_event_handle_map_request(XEvent *xevent);
+void _ecore_x_event_handle_reparent_notify(XEvent *xevent);
+void _ecore_x_event_handle_configure_notify(XEvent *xevent);
+void _ecore_x_event_handle_configure_request(XEvent *xevent);
+void _ecore_x_event_handle_gravity_notify(XEvent *xevent);
+void _ecore_x_event_handle_resize_request(XEvent *xevent);
+void _ecore_x_event_handle_circulate_notify(XEvent *xevent);
+void _ecore_x_event_handle_circulate_request(XEvent *xevent);
+void _ecore_x_event_handle_property_notify(XEvent *xevent);
+void _ecore_x_event_handle_selection_clear(XEvent *xevent);
+void _ecore_x_event_handle_selection_request(XEvent *xevent);
+void _ecore_x_event_handle_selection_notify(XEvent *xevent);
+void _ecore_x_event_handle_colormap_notify(XEvent *xevent);
+void _ecore_x_event_handle_client_message(XEvent *xevent);
+void _ecore_x_event_handle_mapping_notify(XEvent *xevent);
+void _ecore_x_event_handle_shape_change(XEvent *xevent);
+void _ecore_x_event_handle_screensaver_notify(XEvent *xevent);
+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);
+void _ecore_x_event_handle_randr_change(XEvent *xevent);
+void _ecore_x_event_handle_randr_notify(XEvent *xevent);
 #endif /* ifdef ECORE_XRANDR */
 #ifdef ECORE_XFIXES
-void                      _ecore_x_event_handle_fixes_selection_notify(
-   XEvent *xevent);
+void _ecore_x_event_handle_fixes_selection_notify(XEvent *xevent);
 #endif /* ifdef ECORE_XFIXES */
 #ifdef ECORE_XDAMAGE
-void                      _ecore_x_event_handle_damage_notify(XEvent *xevent);
+void      _ecore_x_event_handle_damage_notify(XEvent *xevent);
 #endif /* ifdef ECORE_XDAMAGE */
-void                      _ecore_x_event_handle_generic_event(XEvent *xevent);
-
-void                      _ecore_x_selection_data_init(void);
-void                      _ecore_x_selection_shutdown(void);
-Ecore_X_Atom
-                          _ecore_x_selection_target_atom_get(const char *target);
-char *                    _ecore_x_selection_target_get(Ecore_X_Atom target);
-Ecore_X_Selection_Intern *
-                          _ecore_x_selection_get(Ecore_X_Atom selection);
-Eina_Bool                 _ecore_x_selection_set(Window             w,
-                                                       const void  *data,
-                                                       int          len,
-                                                       Ecore_X_Atom selection);
-int                       _ecore_x_selection_convert(Ecore_X_Atom        selection,
-                                                           Ecore_X_Atom  target,
-                                                           void        **data_ret,
-                                                           Ecore_X_Atom *targettype,
-                                                           int          *targetsize);
-void *                    _ecore_x_selection_parse(const char *target,
-                                                         void *data,
-                                                         int   size,
-                                                         int   format);
-
-void                      _ecore_x_sync_magic_send(int val, Ecore_X_Window swin);
-void                      _ecore_x_window_grab_remove(Ecore_X_Window win);
-void                      _ecore_x_key_grab_remove(Ecore_X_Window win);
+void      _ecore_x_event_handle_generic_event(XEvent *xevent);
+
+void      _ecore_x_selection_data_init(void);
+void      _ecore_x_selection_shutdown(void);
+Ecore_X_Atom _ecore_x_selection_target_atom_get(const char *target);
+char     *_ecore_x_selection_target_get(Ecore_X_Atom target);
+Ecore_X_Selection_Intern *_ecore_x_selection_get(Ecore_X_Atom selection);
+Eina_Bool _ecore_x_selection_set(Window w,
+                                  const void *data,
+                                  int len,
+                                  Ecore_X_Atom selection);
+int _ecore_x_selection_convert(Ecore_X_Atom selection,
+                               Ecore_X_Atom target,
+                               void **data_ret,
+                               Ecore_X_Atom *targettype,
+                               int *targetsize);
+void *_ecore_x_selection_parse(const char *target,
+                               void *data,
+                               int size,
+                               int format);
+
+void _ecore_x_sync_magic_send(int val,
+                              Ecore_X_Window swin);
+void _ecore_x_window_grab_remove(Ecore_X_Window win);
+void _ecore_x_key_grab_remove(Ecore_X_Window win);
 
 /* from dnd */
-void                      _ecore_x_dnd_init(void);
-Ecore_X_DND_Source *      _ecore_x_dnd_source_get(void);
-Ecore_X_DND_Target *      _ecore_x_dnd_target_get(void);
-void                      _ecore_x_dnd_drag(Ecore_X_Window root, int x, int y);
-void                      _ecore_x_dnd_shutdown(void);
+void                _ecore_x_dnd_init(void);
+Ecore_X_DND_Source *_ecore_x_dnd_source_get(void);
+Ecore_X_DND_Target *_ecore_x_dnd_target_get(void);
+void                _ecore_x_dnd_drag(Ecore_X_Window root,
+                                      int x,
+                                      int y);
+void _ecore_x_dnd_shutdown(void);
 
 /* from netwm */
-Ecore_X_Window_State      _ecore_x_netwm_state_get(Ecore_X_Atom a);
-int                       _ecore_x_netwm_startup_info_begin(Ecore_X_Window win,
-                                                                  char    *data);
-int                       _ecore_x_netwm_startup_info(Ecore_X_Window win,
-                                                            char    *data);
+Ecore_X_Window_State _ecore_x_netwm_state_get(Ecore_X_Atom a);
+int                  _ecore_x_netwm_startup_info_begin(Ecore_X_Window win,
+                                                       char *data);
+int                  _ecore_x_netwm_startup_info(Ecore_X_Window win,
+                                                 char *data);
 
 /* Fixes * Damage * Composite * DPMS */
-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_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);
+void _ecore_x_atoms_init(void);
 
 extern int _ecore_x_xi2_opcode;
 
-void                      _ecore_x_events_init(void);
-void                      _ecore_x_events_shutdown(void);
+void _ecore_x_events_init(void);
+void _ecore_x_events_shutdown(void);
 
-void                      _ecore_x_input_init(void);
-void                      _ecore_x_input_shutdown(void);
-void                      _ecore_x_input_handler(XEvent *xevent);
+void _ecore_x_input_init(void);
+void _ecore_x_input_shutdown(void);
+void _ecore_x_input_handler(XEvent *xevent);
 /* from sync */
 
-void                      _ecore_mouse_move(unsigned int       timestamp,
-                                                  unsigned int xmodifiers,
-                                                  int          x,
-                                                  int          y,
-                                                  int          x_root,
-                                                  int          y_root,
-                                                  unsigned int event_window,
-                                                  unsigned int window,
-                                                  unsigned int root_win,
-                                                  int          same_screen,
-                                                  int          dev,
-                                                  double       radx,
-                                                  double       rady,
-                                                  double       pressure,
-                                                  double       angle,
-                                                  double       mx,
-                                                  double       my,
-                                                  double       mrx,
-                                                  double       mry);
-Ecore_Event_Mouse_Button *    _ecore_mouse_button(int          event,
-                                                  unsigned int timestamp,
-                                                  unsigned int xmodifiers,
-                                                  unsigned int buttons,
-                                                  int          x,
-                                                  int          y,
-                                                  int          x_root,
-                                                  int          y_root,
-                                                  unsigned int event_window,
-                                                  unsigned int window,
-                                                  unsigned int root_win,
-                                                  int          same_screen,
-                                                  int          dev,
-                                                  double       radx,
-                                                  double       rady,
-                                                  double       pressure,
-                                                  double       angle,
-                                                  double       mx,
-                                                  double       my,
-                                                  double       mrx,
-                                                  double       mry);
+void _ecore_mouse_move(unsigned int timestamp,
+                       unsigned int xmodifiers,
+                       int x,
+                       int y,
+                       int x_root,
+                       int y_root,
+                       unsigned int event_window,
+                       unsigned int window,
+                       unsigned int root_win,
+                       int same_screen,
+                       int dev,
+                       double radx,
+                       double rady,
+                       double pressure,
+                       double angle,
+                       double mx,
+                       double my,
+                       double mrx,
+                       double mry);
+Ecore_Event_Mouse_Button *_ecore_mouse_button(int event,
+                                              unsigned int timestamp,
+                                              unsigned int xmodifiers,
+                                              unsigned int buttons,
+                                              int x,
+                                              int y,
+                                              int x_root,
+                                              int y_root,
+                                              unsigned int event_window,
+                                              unsigned int window,
+                                              unsigned int root_win,
+                                              int same_screen,
+                                              int dev,
+                                              double radx,
+                                              double rady,
+                                              double pressure,
+                                              double angle,
+                                              double mx,
+                                              double my,
+                                              double mrx,
+                                              double mry);
 
 void _ecore_x_modifiers_get(void);
 
index 9bc5e59..d4d834f 100644 (file)
@@ -9,19 +9,19 @@ static Eina_Bool _randr_available = EINA_FALSE;
 #ifdef ECORE_XRANDR
 static int _randr_major, _randr_minor;
 int _randr_version;
-#define RANDR_1_1 ((1 << 16) | 1)
-#define RANDR_1_2 ((1 << 16) | 2)
-#define RANDR_1_3 ((1 << 16) | 3)
+#define RANDR_1_1           ((1 << 16) | 1)
+#define RANDR_1_2           ((1 << 16) | 2)
+#define RANDR_1_3           ((1 << 16) | 3)
 
-#define RANDR_VALIDATE_ROOT(screen, \
-                            root) ((screen = \
-                                       XRRRootToScreen(_ecore_x_disp, \
-                                                       root)) != -1)
+#define RANDR_VALIDATE_ROOT(screen,                                  \
+                            root) ((screen =                         \
+                                      XRRRootToScreen(_ecore_x_disp, \
+                                                      root)) != -1)
 
 #define Ecore_X_Randr_Unset -1
 
-XRRScreenResources * (*_ecore_x_randr_get_screen_resources)(Display * dpy,
-                                                            Window window);
+XRRScreenResources *(*_ecore_x_randr_get_screen_resources)(Display * dpy,
+                                                           Window window);
 
 #endif /* ifdef ECORE_XRANDR */
 
@@ -35,17 +35,17 @@ _ecore_x_randr_init(void)
 
    _ecore_x_randr_get_screen_resources = NULL;
    if (XRRQueryVersion(_ecore_x_disp, &_randr_major, &_randr_minor))
-   {
-      _randr_version = (_randr_major << 16) | _randr_minor;
-      if (_randr_version >= RANDR_1_3)
-         _ecore_x_randr_get_screen_resources = XRRGetScreenResourcesCurrent;
-      else if (_randr_version == RANDR_1_2)
-         _ecore_x_randr_get_screen_resources = XRRGetScreenResources;
+     {
+        _randr_version = (_randr_major << 16) | _randr_minor;
+        if (_randr_version >= RANDR_1_3)
+          _ecore_x_randr_get_screen_resources = XRRGetScreenResourcesCurrent;
+        else if (_randr_version == RANDR_1_2)
+          _ecore_x_randr_get_screen_resources = XRRGetScreenResources;
 
-      _randr_available = EINA_TRUE;
-   }
+        _randr_available = EINA_TRUE;
+     }
    else
-      _randr_available = EINA_FALSE;
+     _randr_available = EINA_FALSE;
 
 #else
    _randr_available = EINA_FALSE;
@@ -73,13 +73,13 @@ ecore_x_randr_version_get(void)
 #ifdef ECORE_XRANDR
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    if (_randr_available)
-   {
-      return _randr_version;
-   }
+     {
+        return _randr_version;
+     }
    else
-   {
-      return Ecore_X_Randr_Unset;
-   }
+     {
+        return Ecore_X_Randr_Unset;
+     }
 #else
    return -1;
 #endif
@@ -91,11 +91,12 @@ _ecore_x_randr_root_validate(Ecore_X_Window root)
 #ifdef ECORE_XRANDR
    Ecore_X_Randr_Screen scr = -1;
    if (root && RANDR_VALIDATE_ROOT(scr, root))
-      return EINA_TRUE;
+     return EINA_TRUE;
    else
-      return EINA_FALSE;
+     return EINA_FALSE;
 
 #else
    return EINA_FALSE;
 #endif
 }
+
index b6a6886..eca3c0c 100644 (file)
@@ -2,6 +2,6 @@
 #define ECORE_X_INLINE_X
 Eina_Bool _ecore_x_randr_root_validate(Ecore_X_Window root);
 Eina_Bool _ecore_x_randr_output_validate(Ecore_X_Window root,
-                                                Ecore_X_Randr_Output
-                                                output);
+                                         Ecore_X_Randr_Output
+                                         output);
 #endif
index 41f0f84..a6bafb6 100644 (file)
 
 #define RANDR_1_1          ((1 << 16) | 1)
 
-#define RANDR_VALIDATE_ROOT(screen,\
-                            root) ((screen =\
-                                       XRRRootToScreen(_ecore_x_disp,\
-                                                       root)) != -1)
+#define RANDR_VALIDATE_ROOT(screen,                                  \
+                            root) ((screen =                         \
+                                      XRRRootToScreen(_ecore_x_disp, \
+                                                      root)) != -1)
 #define RANDR_CHECK_1_1_RET(ret)  if(_randr_version < RANDR_1_1) return ret
 
-extern XRRScreenResources * (*_ecore_x_randr_get_screen_resources)(Display *
-                                                                   dpy,
-                                                                   Window
-                                                                   window);
+extern XRRScreenResources *(*_ecore_x_randr_get_screen_resources)(Display *
+                                                                  dpy,
+                                                                  Window
+                                                                  window);
 extern int _randr_version;
 #endif /* ifdef ECORE_XRANDR */
 
@@ -38,8 +38,8 @@ ecore_x_randr_screen_primary_output_orientations_get(Ecore_X_Window root)
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    rot =
-      XRRRotations(_ecore_x_disp, XRRRootToScreen(_ecore_x_disp,
-                                                        root), &crot);
+     XRRRotations(_ecore_x_disp, XRRRootToScreen(_ecore_x_disp,
+                                                 root), &crot);
    return rot;
 #else /* ifdef ECORE_XRANDR */
    return Ecore_X_Randr_None;
@@ -56,7 +56,7 @@ ecore_x_randr_screen_primary_output_orientation_get(Ecore_X_Window root)
 #ifdef ECORE_XRANDR
    Rotation crot = Ecore_X_Randr_None;
    XRRRotations(_ecore_x_disp, XRRRootToScreen(_ecore_x_disp,
-                                                     root), &crot);
+                                               root), &crot);
    return crot;
 #else /* ifdef ECORE_XRANDR */
    return Ecore_X_Randr_None;
@@ -71,9 +71,9 @@ ecore_x_randr_screen_primary_output_orientation_get(Ecore_X_Window root)
  */
 EAPI Eina_Bool
 ecore_x_randr_screen_primary_output_orientation_set(
-   Ecore_X_Window root,
-   Ecore_X_Randr_Orientation
-   orientation)
+  Ecore_X_Window root,
+  Ecore_X_Randr_Orientation
+  orientation)
 {
 #ifdef ECORE_XRANDR
    XRRScreenConfiguration *xrr_screen_cfg = NULL;
@@ -81,15 +81,15 @@ ecore_x_randr_screen_primary_output_orientation_set(
    Rotation crot;
    Eina_Bool ret = EINA_FALSE;
    if (!(xrr_screen_cfg = XRRGetScreenInfo(_ecore_x_disp, root)))
-      return EINA_FALSE;
+     return EINA_FALSE;
 
    sizeid = XRRConfigCurrentConfiguration(xrr_screen_cfg, &crot);
    if (!XRRSetScreenConfig(_ecore_x_disp, xrr_screen_cfg, root, sizeid,
                            orientation, CurrentTime))
-      ret = EINA_TRUE;
+     ret = EINA_TRUE;
 
    if (xrr_screen_cfg)
-      XRRFreeScreenConfigInfo(xrr_screen_cfg);
+     XRRFreeScreenConfigInfo(xrr_screen_cfg);
 
    return ret;
 #else /* ifdef ECORE_XRANDR */
@@ -104,7 +104,8 @@ ecore_x_randr_screen_primary_output_orientation_set(
  * @return an array of sizes reported as supported by the screen's primary output or - if query failed - NULL
  */
 EAPI Ecore_X_Randr_Screen_Size_MM *
-ecore_x_randr_screen_primary_output_sizes_get(Ecore_X_Window root, int *num)
+ecore_x_randr_screen_primary_output_sizes_get(Ecore_X_Window root,
+                                              int           *num)
 {
 #ifdef ECORE_XRANDR
    Ecore_X_Randr_Screen_Size_MM *ret = NULL;
@@ -113,15 +114,15 @@ ecore_x_randr_screen_primary_output_sizes_get(Ecore_X_Window root, int *num)
 
    /* we don't have to free sizes, because they're hold in a cache inside X*/
    sizes =
-      XRRSizes(_ecore_x_disp, XRRRootToScreen(_ecore_x_disp,
-                                                    root), &n);
+     XRRSizes(_ecore_x_disp, XRRRootToScreen(_ecore_x_disp,
+                                             root), &n);
    if ((!sizes) || (n <= 0)) return NULL;
    ret = calloc(n, sizeof(Ecore_X_Randr_Screen_Size_MM));
    if (!ret)
-      return NULL;
+     return NULL;
 
    if (num)
-      *num = n;
+     *num = n;
 
    for (i = 0; i < n; i++)
      {
@@ -169,24 +170,24 @@ ecore_x_randr_screen_primary_output_current_size_get(Ecore_X_Window root,
    idx = XRRConfigCurrentConfiguration(sc, &orientation);
 
    sizes =
-      XRRSizes(_ecore_x_disp, XRRRootToScreen(_ecore_x_disp,
-                                                    root), &n);
+     XRRSizes(_ecore_x_disp, XRRRootToScreen(_ecore_x_disp,
+                                             root), &n);
    if ((idx < n) && (idx >= 0))
      {
         if (w)
-           *w = sizes[idx].width;
+          *w = sizes[idx].width;
 
         if (h)
-           *h = sizes[idx].height;
+          *h = sizes[idx].height;
 
         if (w_mm)
-           *w_mm = sizes[idx].mwidth;
+          *w_mm = sizes[idx].mwidth;
 
         if (h_mm)
-           *h_mm = sizes[idx].mheight;
+          *h_mm = sizes[idx].mheight;
 
         if (size_index)
-           *size_index = idx;
+          *size_index = idx;
      }
 
    XRRFreeScreenConfigInfo(sc);
@@ -212,8 +213,8 @@ ecore_x_randr_screen_primary_output_size_set(Ecore_X_Window root,
    if (size_index >= 0 && _ecore_x_randr_root_validate(root))
      {
         sizes =
-           XRRSizes(_ecore_x_disp, XRRRootToScreen(_ecore_x_disp,
-                                                         root), &nsizes);
+          XRRSizes(_ecore_x_disp, XRRRootToScreen(_ecore_x_disp,
+                                                  root), &nsizes);
 
         if (size_index < nsizes)
           {
@@ -226,7 +227,7 @@ ecore_x_randr_screen_primary_output_size_set(Ecore_X_Window root,
                }
 
              if (sc)
-                XRRFreeScreenConfigInfo(sc);
+               XRRFreeScreenConfigInfo(sc);
           }
      }
 
@@ -242,7 +243,7 @@ ecore_x_randr_screen_primary_output_size_set(Ecore_X_Window root,
  */
 EAPI Ecore_X_Randr_Refresh_Rate
 ecore_x_randr_screen_primary_output_current_refresh_rate_get(
-   Ecore_X_Window root)
+  Ecore_X_Window root)
 {
 #ifdef ECORE_XRANDR
    Ecore_X_Randr_Refresh_Rate ret = 0.0;
@@ -250,11 +251,11 @@ ecore_x_randr_screen_primary_output_current_refresh_rate_get(
 
    if (!_ecore_x_randr_root_validate(root) ||
        !(sc = XRRGetScreenInfo(_ecore_x_disp, root)))
-      return ret;
+     return ret;
 
    ret = XRRConfigCurrentRate(sc);
    if (sc)
-      XRRFreeScreenConfigInfo(sc);
+     XRRFreeScreenConfigInfo(sc);
 
    return ret;
 #else /* ifdef ECORE_XRANDR */
@@ -304,10 +305,10 @@ ecore_x_randr_screen_primary_output_refresh_rates_get(Ecore_X_Window root,
  */
 EAPI Eina_Bool
 ecore_x_randr_screen_primary_output_refresh_rate_set(
-   Ecore_X_Window root,
-   int            size_index,
-   Ecore_X_Randr_Refresh_Rate
-   rate)
+  Ecore_X_Window root,
+  int            size_index,
+  Ecore_X_Randr_Refresh_Rate
+  rate)
 {
 #ifdef ECORE_XRANDR
    RANDR_CHECK_1_1_RET(EINA_FALSE);
@@ -315,12 +316,12 @@ ecore_x_randr_screen_primary_output_refresh_rate_set(
    XRRScreenConfiguration *sc = NULL;
 
    if (!(sc = XRRGetScreenInfo(_ecore_x_disp, root)))
-      return ret;
+     return ret;
 
    if (!XRRSetScreenConfigAndRate(_ecore_x_disp, sc,
                                   root, size_index,
                                   RR_Rotate_0, rate, CurrentTime))
-      ret = EINA_TRUE;
+     ret = EINA_TRUE;
 
    XRRFreeScreenConfigInfo(sc);
    return ret;
@@ -328,3 +329,4 @@ ecore_x_randr_screen_primary_output_refresh_rate_set(
    return EINA_FALSE;
 #endif /* ifdef ECORE_XRANDR */
 } /* ecore_x_randr_screen_primary_output_refresh_rate_set */
+
index 7e9631b..df0cddc 100644 (file)
@@ -9,31 +9,31 @@
 #include "ecore_x_private.h"
 #include "ecore_x_randr.h"
 
-#define Ecore_X_Randr_None   (Ecore_X_Randr_Crtc)0
-#define Ecore_X_Randr_Unset  (Ecore_X_Randr_Crtc)-1
+#define Ecore_X_Randr_None  (Ecore_X_Randr_Crtc)0
+#define Ecore_X_Randr_Unset (Ecore_X_Randr_Crtc) - 1
 
 #ifdef ECORE_XRANDR
 
-#define RANDR_1_2 ((1 << 16) | 2)
+#define RANDR_1_2           ((1 << 16) | 2)
 
 #define RANDR_VALIDATE_ROOT(screen, root) \
-   ((screen = XRRRootToScreen(_ecore_x_disp, root)) != -1)
+  ((screen = XRRRootToScreen(_ecore_x_disp, root)) != -1)
 
 #define RANDR_CHECK_1_2_RET(ret) if(_randr_version < RANDR_1_2) return ret
 
-#define RANDR_PROPERTY_EDID                     "EDID"
-#define RANDR_PROPERTY_BACKLIGHT                "Backlight"
-#define RANDR_PROPERTY_SIGNAL_FORMAT            "SignalFormat"
-#define RANDR_PROPERTY_SIGNAL_PROPERTIES        "SignalProperties"
-#define RANDR_PROPERTY_CONNECTOR_TYPE           "ConnectorType"
-#define RANDR_PROPERTY_CONNECTOR_NUMBER         "ConnectorNumber"
-#define RANDR_PROPERTY_COMPATIBILITY_LIST       "CompatibilityList"
-#define RANDR_PROPERTY_CLONE_LIST               "CloneList"
-
-extern XRRScreenResources * (*_ecore_x_randr_get_screen_resources)(Display *
-                                                                   dpy,
-                                                                   Window
-                                                                   window);
+#define RANDR_PROPERTY_EDID               "EDID"
+#define RANDR_PROPERTY_BACKLIGHT          "Backlight"
+#define RANDR_PROPERTY_SIGNAL_FORMAT      "SignalFormat"
+#define RANDR_PROPERTY_SIGNAL_PROPERTIES  "SignalProperties"
+#define RANDR_PROPERTY_CONNECTOR_TYPE     "ConnectorType"
+#define RANDR_PROPERTY_CONNECTOR_NUMBER   "ConnectorNumber"
+#define RANDR_PROPERTY_COMPATIBILITY_LIST "CompatibilityList"
+#define RANDR_PROPERTY_CLONE_LIST         "CloneList"
+
+extern XRRScreenResources *(*_ecore_x_randr_get_screen_resources)(Display *
+                                                                  dpy,
+                                                                  Window
+                                                                  window);
 extern int _randr_version;
 #endif
 
@@ -44,21 +44,22 @@ extern int _randr_version;
  * @param on enable/disable selecting
  */
 EAPI void
-ecore_x_randr_events_select(Ecore_X_Window win, Eina_Bool on)
+ecore_x_randr_events_select(Ecore_X_Window win,
+                            Eina_Bool      on)
 {
 #ifdef ECORE_XRANDR
    int mask;
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    if (!on)
-      mask = 0;
+     mask = 0;
    else
      {
         mask = RRScreenChangeNotifyMask;
         if (_randr_version >= RANDR_1_2)
-           mask |= (RRCrtcChangeNotifyMask |
-                    RROutputChangeNotifyMask |
-                    RROutputPropertyNotifyMask);
+          mask |= (RRCrtcChangeNotifyMask |
+                   RROutputChangeNotifyMask |
+                   RROutputPropertyNotifyMask);
      }
 
    XRRSelectInput(_ecore_x_disp, win, mask);
@@ -72,7 +73,8 @@ ecore_x_randr_events_select(Ecore_X_Window win, Eina_Bool on)
  * @return in case it is found EINA_TRUE will be returned. Else EINA_FALSE is returned.
  */
 static inline Eina_Bool
-_ecore_x_randr_crtc_validate(Ecore_X_Window root, Ecore_X_Randr_Crtc crtc)
+_ecore_x_randr_crtc_validate(Ecore_X_Window     root,
+                             Ecore_X_Randr_Crtc crtc)
 {
 #ifdef ECORE_XRANDR
    RANDR_CHECK_1_2_RET(EINA_FALSE);
@@ -83,7 +85,7 @@ _ecore_x_randr_crtc_validate(Ecore_X_Window root, Ecore_X_Randr_Crtc crtc)
 
    if ((crtc == Ecore_X_Randr_None) ||
        (crtc == Ecore_X_Randr_Unset))
-      return ret;
+     return ret;
 
    if (_ecore_x_randr_root_validate(root) && crtc &&
        (res = _ecore_x_randr_get_screen_resources (_ecore_x_disp, root)))
@@ -106,7 +108,8 @@ _ecore_x_randr_crtc_validate(Ecore_X_Window root, Ecore_X_Randr_Crtc crtc)
 }
 
 Eina_Bool
-_ecore_x_randr_output_validate(Ecore_X_Window root, Ecore_X_Randr_Output output)
+_ecore_x_randr_output_validate(Ecore_X_Window       root,
+                               Ecore_X_Randr_Output output)
 {
 #ifdef ECORE_XRANDR
    RANDR_CHECK_1_2_RET(EINA_FALSE);
@@ -136,7 +139,8 @@ _ecore_x_randr_output_validate(Ecore_X_Window root, Ecore_X_Randr_Output output)
 }
 
 static inline Eina_Bool
-_ecore_x_randr_mode_validate(Ecore_X_Window root, Ecore_X_Randr_Mode mode)
+_ecore_x_randr_mode_validate(Ecore_X_Window     root,
+                             Ecore_X_Randr_Mode mode)
 {
 #ifdef ECORE_XRANDR
    RANDR_CHECK_1_2_RET(EINA_FALSE);
@@ -171,29 +175,29 @@ _ecore_x_randr_mode_validate(Ecore_X_Window root, Ecore_X_Randr_Mode mode)
  */
 EAPI void
 ecore_x_randr_screen_current_size_get(Ecore_X_Window root,
-                                      int *w,
-                                      int *h,
-                                      int *w_mm,
-                                      int *h_mm)
+                                      int           *w,
+                                      int           *h,
+                                      int           *w_mm,
+                                      int           *h_mm)
 {
 #ifdef ECORE_XRANDR
    RANDR_CHECK_1_2_RET();
    Ecore_X_Randr_Screen scr;
 
    if (!RANDR_VALIDATE_ROOT(scr, root))
-      return;
+     return;
 
    if (w)
-      *w = DisplayWidth(_ecore_x_disp, scr);
+     *w = DisplayWidth(_ecore_x_disp, scr);
 
    if (h)
-      *h = DisplayHeight(_ecore_x_disp, scr);
+     *h = DisplayHeight(_ecore_x_disp, scr);
 
    if (w_mm)
-      *w_mm = DisplayWidthMM(_ecore_x_disp, scr);
+     *w_mm = DisplayWidthMM(_ecore_x_disp, scr);
 
    if (h_mm)
-      *h_mm = DisplayHeightMM(_ecore_x_disp, scr);
+     *h_mm = DisplayHeightMM(_ecore_x_disp, scr);
 
 #endif
 }
@@ -207,10 +211,10 @@ ecore_x_randr_screen_current_size_get(Ecore_X_Window root,
  */
 EAPI void
 ecore_x_randr_screen_size_range_get(Ecore_X_Window root,
-                                    int *wmin,
-                                    int *hmin,
-                                    int *wmax,
-                                    int *hmax)
+                                    int           *wmin,
+                                    int           *hmin,
+                                    int           *wmax,
+                                    int           *hmax)
 {
 #ifdef ECORE_XRANDR
    RANDR_CHECK_1_2_RET();
@@ -219,16 +223,16 @@ ecore_x_randr_screen_size_range_get(Ecore_X_Window root,
                               &thmax))
      {
         if (wmin)
-           *wmin = twmin;
+          *wmin = twmin;
 
         if (hmin)
-           *hmin = thmin;
+          *hmin = thmin;
 
         if (wmax)
-           *wmax = twmax;
+          *wmax = twmax;
 
         if (hmax)
-           *hmax = thmax;
+          *hmax = thmax;
      }
 
 #endif
@@ -245,10 +249,10 @@ ecore_x_randr_screen_size_range_get(Ecore_X_Window root,
  */
 EAPI Eina_Bool
 ecore_x_randr_screen_current_size_set(Ecore_X_Window root,
-                                      int w,
-                                      int h,
-                                      int w_mm,
-                                      int h_mm)
+                                      int            w,
+                                      int            h,
+                                      int            w_mm,
+                                      int            h_mm)
 {
 #ifdef ECORE_XRANDR
    RANDR_CHECK_1_2_RET(EINA_FALSE);
@@ -257,11 +261,11 @@ ecore_x_randr_screen_current_size_set(Ecore_X_Window root,
    int w_c, h_c, w_mm_c, h_mm_c, twmin, thmin, twmax, thmax;
 
    if (!RANDR_VALIDATE_ROOT(scr, root))
-      return EINA_FALSE;
+     return EINA_FALSE;
 
    ecore_x_randr_screen_current_size_get(root, &w_c, &h_c, &w_mm_c, &h_mm_c);
    if ((w == w_c) && (h == h_c) && (w_mm_c == w_mm) && (h_mm_c == h_mm))
-      return EINA_TRUE;
+     return EINA_TRUE;
 
    ecore_x_randr_screen_size_range_get(root, &twmin, &thmin, &twmax, &thmax);
 
@@ -269,27 +273,27 @@ ecore_x_randr_screen_current_size_set(Ecore_X_Window root,
         ((w < twmin) ||
          (w > twmax))) ||
        ((h != Ecore_X_Randr_None) && ((h < thmin) || (h > thmax))))
-      return EINA_FALSE;
+     return EINA_FALSE;
 
    if (w <= 0)
-      w = DisplayWidth(_ecore_x_disp, scr);
+     w = DisplayWidth(_ecore_x_disp, scr);
 
    if (h <= 0)
-      h = DisplayHeight(_ecore_x_disp, scr);
+     h = DisplayHeight(_ecore_x_disp, scr);
 
    if(w_mm <= 0)
-      w_mm =
-         (int)(((double)(DisplayWidthMM(_ecore_x_disp,
-                                        scr) /
-                         (double)DisplayWidth(_ecore_x_disp,
-                                              scr))) * (double)w);
+     w_mm =
+       (int)(((double)(DisplayWidthMM(_ecore_x_disp,
+                                      scr) /
+                       (double)DisplayWidth(_ecore_x_disp,
+                                            scr))) * (double)w);
 
    if(h_mm <= 0)
-      h_mm =
-         (int)(((double)(DisplayHeightMM(_ecore_x_disp,
-                                         scr) /
-                         (double)DisplayHeight(_ecore_x_disp,
-                                               scr))) * (double)h);
+     h_mm =
+       (int)(((double)(DisplayHeightMM(_ecore_x_disp,
+                                       scr) /
+                       (double)DisplayHeight(_ecore_x_disp,
+                                             scr))) * (double)h);
 
    XRRSetScreenSize (_ecore_x_disp, root, w, h, w_mm, h_mm);
    return EINA_TRUE;
@@ -305,7 +309,8 @@ ecore_x_randr_screen_current_size_set(Ecore_X_Window root,
  * @return modes' information
  */
 EAPI Ecore_X_Randr_Mode_Info **
-ecore_x_randr_modes_info_get(Ecore_X_Window root, int *num)
+ecore_x_randr_modes_info_get(Ecore_X_Window root,
+                             int           *num)
 {
 #ifdef ECORE_XRANDR
    RANDR_CHECK_1_2_RET(NULL);
@@ -317,10 +322,10 @@ ecore_x_randr_modes_info_get(Ecore_X_Window root, int *num)
        (res = _ecore_x_randr_get_screen_resources (_ecore_x_disp, root)))
      {
         if ((ret =
-                (Ecore_X_Randr_Mode_Info **)malloc(sizeof(
-                                                      Ecore_X_Randr_Mode_Info *)
-                                                   *
-                                                   res->nmode)))
+               (Ecore_X_Randr_Mode_Info **)malloc(sizeof(
+                                                    Ecore_X_Randr_Mode_Info *)
+                                                  *
+                                                  res->nmode)))
           {
              for (i = 0; i < res->nmode; i++)
                {
@@ -338,10 +343,10 @@ ecore_x_randr_modes_info_get(Ecore_X_Window root, int *num)
                        ret[i]->vSyncEnd = res->modes[i].vSyncEnd;
                        ret[i]->vTotal = res->modes[i].vTotal;
                        if ((ret[i]->name = (malloc(res->modes[i].nameLength))))
-                          strncpy(ret[i]->name, res->modes[i].name,
-                                  res->modes[i].nameLength);
+                         strncpy(ret[i]->name, res->modes[i].name,
+                                 res->modes[i].nameLength);
                        else
-                          ret[i]->name = NULL;
+                         ret[i]->name = NULL;
 
                        ret[i]->nameLength = res->modes[i].nameLength;
                        ret[i]->modeFlags = res->modes[i].modeFlags;
@@ -349,8 +354,8 @@ ecore_x_randr_modes_info_get(Ecore_X_Window root, int *num)
                   else
                     {
                        while(i > 0)
-                          free(ret[--i]);
-                          free(ret);
+                         free(ret[--i]);
+                       free(ret);
                        ret = NULL;
                        break;
                     }
@@ -358,7 +363,7 @@ ecore_x_randr_modes_info_get(Ecore_X_Window root, int *num)
           }
 
         if (ret && num)
-           *num = res->nmode;
+          *num = res->nmode;
 
         XRRFreeScreenResources(res);
      }
@@ -376,7 +381,8 @@ ecore_x_randr_modes_info_get(Ecore_X_Window root, int *num)
  * @return mode's detailed information
  */
 EAPI Ecore_X_Randr_Mode_Info *
-ecore_x_randr_mode_info_get(Ecore_X_Window root, Ecore_X_Randr_Mode mode)
+ecore_x_randr_mode_info_get(Ecore_X_Window     root,
+                            Ecore_X_Randr_Mode mode)
 {
 #ifdef ECORE_XRANDR
    RANDR_CHECK_1_2_RET(NULL);
@@ -454,7 +460,8 @@ ecore_x_randr_mode_info_free(Ecore_X_Randr_Mode_Info *mode_info)
  * @return CRTC IDs
  */
 EAPI Ecore_X_Randr_Crtc *
-ecore_x_randr_crtcs_get(Ecore_X_Window root, int *num)
+ecore_x_randr_crtcs_get(Ecore_X_Window root,
+                        int           *num)
 {
 #ifdef ECORE_XRANDR
    RANDR_CHECK_1_2_RET(NULL);
@@ -480,7 +487,8 @@ ecore_x_randr_crtcs_get(Ecore_X_Window root, int *num)
 }
 
 EAPI Ecore_X_Randr_Output *
-ecore_x_randr_outputs_get(Ecore_X_Window root, int *num)
+ecore_x_randr_outputs_get(Ecore_X_Window root,
+                          int           *num)
 {
 #ifdef ECORE_XRANDR
    RANDR_CHECK_1_2_RET(NULL);
@@ -495,11 +503,11 @@ ecore_x_randr_outputs_get(Ecore_X_Window root, int *num)
              memcpy(ret, res->outputs,
                     (sizeof(Ecore_X_Randr_Output) * res->noutput));
              if (num)
-                *num = res->noutput;
+               *num = res->noutput;
           }
 
         if (res)
-           XRRFreeScreenResources(res);
+          XRRFreeScreenResources(res);
      }
 
    return ret;
@@ -515,9 +523,9 @@ ecore_x_randr_outputs_get(Ecore_X_Window root, int *num)
  * @param num number of outputs referenced by given CRTC
  */
 EAPI Ecore_X_Randr_Output *
-ecore_x_randr_crtc_outputs_get(Ecore_X_Window root,
+ecore_x_randr_crtc_outputs_get(Ecore_X_Window     root,
                                Ecore_X_Randr_Crtc crtc,
-                               int *num)
+                               int               *num)
 {
 #ifdef ECORE_XRANDR
    RANDR_CHECK_1_2_RET(NULL);
@@ -528,8 +536,8 @@ ecore_x_randr_crtc_outputs_get(Ecore_X_Window root,
    if (_ecore_x_randr_crtc_validate(root,
                                     crtc) &&
        (res =
-           _ecore_x_randr_get_screen_resources (_ecore_x_disp,
-                                                root)) &&
+          _ecore_x_randr_get_screen_resources (_ecore_x_disp,
+                                               root)) &&
        (crtc_info = XRRGetCrtcInfo(_ecore_x_disp, res, crtc)))
      {
         if ((ret = malloc(sizeof(Ecore_X_Randr_Output) * crtc_info->noutput)))
@@ -537,14 +545,14 @@ ecore_x_randr_crtc_outputs_get(Ecore_X_Window root,
              memcpy(ret, crtc_info->outputs,
                     (sizeof(Ecore_X_Randr_Output) * crtc_info->noutput));
              if (num)
-                *num = crtc_info->noutput;
+               *num = crtc_info->noutput;
           }
 
         if (crtc_info)
-           XRRFreeCrtcInfo(crtc_info);
+          XRRFreeCrtcInfo(crtc_info);
 
         if (res)
-           XRRFreeScreenResources(res);
+          XRRFreeScreenResources(res);
      }
 
    return ret;
@@ -559,9 +567,9 @@ ecore_x_randr_crtc_outputs_get(Ecore_X_Window root,
  * @param num number of possible outputs referenced by given CRTC
  */
 EAPI Ecore_X_Randr_Output *
-ecore_x_randr_crtc_possible_outputs_get(Ecore_X_Window root,
+ecore_x_randr_crtc_possible_outputs_get(Ecore_X_Window     root,
                                         Ecore_X_Randr_Crtc crtc,
-                                        int *num)
+                                        int               *num)
 {
 #ifdef ECORE_XRANDR
    RANDR_CHECK_1_2_RET(NULL);
@@ -576,12 +584,12 @@ ecore_x_randr_crtc_possible_outputs_get(Ecore_X_Window root,
         if((crtc_info = XRRGetCrtcInfo(_ecore_x_disp, res, crtc)))
           {
              if ((ret =
-                     malloc(sizeof(Ecore_X_Randr_Output) * crtc_info->npossible)))
+                    malloc(sizeof(Ecore_X_Randr_Output) * crtc_info->npossible)))
                {
                   memcpy(ret, crtc_info->possible,
                          (sizeof(Ecore_X_Randr_Output) * crtc_info->npossible));
                   if (num)
-                     *num = res->ncrtc;
+                    *num = res->ncrtc;
                }
 
              XRRFreeCrtcInfo(crtc_info);
@@ -597,12 +605,12 @@ ecore_x_randr_crtc_possible_outputs_get(Ecore_X_Window root,
 }
 
 EAPI void
-ecore_x_randr_crtc_geometry_get(Ecore_X_Window root,
+ecore_x_randr_crtc_geometry_get(Ecore_X_Window     root,
                                 Ecore_X_Randr_Crtc crtc,
-                                int *x,
-                                int *y,
-                                int *w,
-                                int *h)
+                                int               *x,
+                                int               *y,
+                                int               *w,
+                                int               *h)
 {
 #ifdef ECORE_XRANDR
    RANDR_CHECK_1_2_RET();
@@ -612,21 +620,21 @@ ecore_x_randr_crtc_geometry_get(Ecore_X_Window root,
    if (_ecore_x_randr_crtc_validate(root,
                                     crtc) &&
        (res =
-           _ecore_x_randr_get_screen_resources (_ecore_x_disp,
-                                                root)) &&
+          _ecore_x_randr_get_screen_resources (_ecore_x_disp,
+                                               root)) &&
        (crtc_info = XRRGetCrtcInfo(_ecore_x_disp, res, crtc)))
      {
         if (x)
-           *x = crtc_info->x;
+          *x = crtc_info->x;
 
         if (y)
-           *y = crtc_info->y;
+          *y = crtc_info->y;
 
         if (w)
-           *w = crtc_info->width;
+          *w = crtc_info->width;
 
         if (h)
-           *h = crtc_info->height;
+          *h = crtc_info->height;
 
         XRRFreeCrtcInfo(crtc_info);
         XRRFreeScreenResources(res);
@@ -644,10 +652,10 @@ ecore_x_randr_crtc_geometry_get(Ecore_X_Window root,
  * @return EINA_TRUE if position could be successfully be altered.
  */
 EAPI Eina_Bool
-ecore_x_randr_crtc_pos_set(Ecore_X_Window root,
+ecore_x_randr_crtc_pos_set(Ecore_X_Window     root,
                            Ecore_X_Randr_Crtc crtc,
-                           int x,
-                           int y)
+                           int                x,
+                           int                y)
 {
 #ifdef ECORE_XRANDR
    RANDR_CHECK_1_2_RET(EINA_FALSE);
@@ -662,20 +670,20 @@ ecore_x_randr_crtc_pos_set(Ecore_X_Window root,
                                    &crtc_geo.h);
    ecore_x_randr_screen_current_size_get(root, &w_c, &h_c, NULL, NULL);
    if (x < 0)
-      x = crtc_geo.x;
+     x = crtc_geo.x;
 
    if (y < 0)
-      y = crtc_geo.y;
+     y = crtc_geo.y;
 
    if ((x + crtc_geo.w) > w_c)
-      w_new = x + crtc_geo.w;
+     w_new = x + crtc_geo.w;
 
    if ((y + crtc_geo.h) > h_c)
-      h_new = y + crtc_geo.h;
+     h_new = y + crtc_geo.h;
 
    if ((w_new != 0) || (h_new != 0))
-      if (!ecore_x_randr_screen_current_size_set(root, w_new, h_new, 0, 0))
-         return EINA_FALSE;
+     if (!ecore_x_randr_screen_current_size_set(root, w_new, h_new, 0, 0))
+       return EINA_FALSE;
 
    return ecore_x_randr_crtc_settings_set(root,
                                           crtc,
@@ -698,7 +706,8 @@ ecore_x_randr_crtc_pos_set(Ecore_X_Window root,
  * Ecore_X_Randr_Unset
  */
 EAPI Ecore_X_Randr_Mode
-ecore_x_randr_crtc_mode_get(Ecore_X_Window root, Ecore_X_Randr_Crtc crtc)
+ecore_x_randr_crtc_mode_get(Ecore_X_Window     root,
+                            Ecore_X_Randr_Crtc crtc)
 {
 #ifdef ECORE_XRANDR
    RANDR_CHECK_1_2_RET(Ecore_X_Randr_Unset);
@@ -709,8 +718,8 @@ ecore_x_randr_crtc_mode_get(Ecore_X_Window root, Ecore_X_Randr_Crtc crtc)
        _ecore_x_randr_crtc_validate(root,
                                     crtc) &&
        (res =
-           _ecore_x_randr_get_screen_resources(_ecore_x_disp,
-                                               root)) &&
+          _ecore_x_randr_get_screen_resources(_ecore_x_disp,
+                                              root)) &&
        (crtc_info = XRRGetCrtcInfo(_ecore_x_disp, res, crtc)))
      {
         ret = crtc_info->mode;
@@ -737,17 +746,17 @@ ecore_x_randr_crtc_mode_get(Ecore_X_Window root, Ecore_X_Randr_Crtc crtc)
  * @return EINA_TRUE if mode setting was successful. Else EINA_FALSE
  */
 EAPI Eina_Bool
-ecore_x_randr_crtc_mode_set(Ecore_X_Window root,
-                            Ecore_X_Randr_Crtc crtc,
+ecore_x_randr_crtc_mode_set(Ecore_X_Window        root,
+                            Ecore_X_Randr_Crtc    crtc,
                             Ecore_X_Randr_Output *outputs,
-                            int noutputs,
-                            Ecore_X_Randr_Mode mode)
+                            int                   noutputs,
+                            Ecore_X_Randr_Mode    mode)
 {
 #ifdef ECORE_XRANDR
    RANDR_CHECK_1_2_RET(EINA_FALSE);
 
    if (mode == Ecore_X_Randr_Unset)
-      return EINA_FALSE;
+     return EINA_FALSE;
 
    return ecore_x_randr_crtc_settings_set(root,
                                           crtc,
@@ -763,10 +772,10 @@ ecore_x_randr_crtc_mode_set(Ecore_X_Window root,
 }
 
 EAPI void
-ecore_x_randr_crtc_size_get(Ecore_X_Window root,
+ecore_x_randr_crtc_size_get(Ecore_X_Window     root,
                             Ecore_X_Randr_Crtc crtc,
-                            int *w,
-                            int *h)
+                            int               *w,
+                            int               *h)
 {
 #ifdef ECORE_XRANDR
    RANDR_CHECK_1_2_RET();
@@ -775,7 +784,7 @@ ecore_x_randr_crtc_size_get(Ecore_X_Window root,
 }
 
 EAPI Ecore_X_Randr_Refresh_Rate
-ecore_x_randr_crtc_refresh_rate_get(Ecore_X_Window root,
+ecore_x_randr_crtc_refresh_rate_get(Ecore_X_Window     root,
                                     Ecore_X_Randr_Crtc crtc,
                                     Ecore_X_Randr_Mode mode)
 {
@@ -791,23 +800,22 @@ ecore_x_randr_crtc_refresh_rate_get(Ecore_X_Window root,
        (res = _ecore_x_randr_get_screen_resources (_ecore_x_disp, root)))
      {
         for (i = 0; i < res->nmode; i++)
-           if (res->modes[i].id == mode)
-             {
-                if (res->modes[i].hTotal && res->modes[i].vTotal)
-                   ret = ((double)res->modes[i].dotClock /
-                          ((double)res->modes[i].hTotal *
-                           (double)res->modes[i].vTotal));
-
-                break;
-             }
+          if (res->modes[i].id == mode)
+            {
+               if (res->modes[i].hTotal && res->modes[i].vTotal)
+                 ret = ((double)res->modes[i].dotClock /
+                        ((double)res->modes[i].hTotal *
+                         (double)res->modes[i].vTotal));
 
+               break;
+            }
      }
 
    if (crtc_info)
-      XRRFreeCrtcInfo(crtc_info);
+     XRRFreeCrtcInfo(crtc_info);
 
    if (res)
-      XRRFreeScreenResources(res);
+     XRRFreeScreenResources(res);
 
    return ret;
 #else
@@ -816,7 +824,7 @@ ecore_x_randr_crtc_refresh_rate_get(Ecore_X_Window root,
 }
 
 EAPI Ecore_X_Randr_Orientation
-ecore_x_randr_crtc_orientations_get(Ecore_X_Window root,
+ecore_x_randr_crtc_orientations_get(Ecore_X_Window     root,
                                     Ecore_X_Randr_Crtc crtc)
 {
 #ifdef ECORE_XRANDR
@@ -828,17 +836,17 @@ ecore_x_randr_crtc_orientations_get(Ecore_X_Window root,
    if (_ecore_x_randr_crtc_validate(root,
                                     crtc) &&
        (res =
-           _ecore_x_randr_get_screen_resources (_ecore_x_disp,
-                                                root)) &&
+          _ecore_x_randr_get_screen_resources (_ecore_x_disp,
+                                               root)) &&
        (crtc_info = XRRGetCrtcInfo(_ecore_x_disp, res, crtc)))
      {
         ret = crtc_info->rotations;
      }
    if (crtc_info)
-      XRRFreeCrtcInfo(crtc_info);
+     XRRFreeCrtcInfo(crtc_info);
 
    if (res)
-      XRRFreeScreenResources(res);
+     XRRFreeScreenResources(res);
 
    return ret;
 #else
@@ -847,7 +855,8 @@ ecore_x_randr_crtc_orientations_get(Ecore_X_Window root,
 }
 
 EAPI Ecore_X_Randr_Orientation
-ecore_x_randr_crtc_orientation_get(Ecore_X_Window root, Ecore_X_Randr_Crtc crtc)
+ecore_x_randr_crtc_orientation_get(Ecore_X_Window     root,
+                                   Ecore_X_Randr_Crtc crtc)
 {
 #ifdef ECORE_XRANDR
    RANDR_CHECK_1_2_RET(Ecore_X_Randr_None);
@@ -858,17 +867,17 @@ ecore_x_randr_crtc_orientation_get(Ecore_X_Window root, Ecore_X_Randr_Crtc crtc)
    if (_ecore_x_randr_crtc_validate(root,
                                     crtc) &&
        (res =
-           _ecore_x_randr_get_screen_resources (_ecore_x_disp,
-                                                root)) &&
+          _ecore_x_randr_get_screen_resources (_ecore_x_disp,
+                                               root)) &&
        (crtc_info = XRRGetCrtcInfo(_ecore_x_disp, res, crtc)))
      {
         ret = crtc_info->rotation;
      }
    if (crtc_info)
-      XRRFreeCrtcInfo(crtc_info);
+     XRRFreeCrtcInfo(crtc_info);
 
    if (res)
-      XRRFreeScreenResources(res);
+     XRRFreeScreenResources(res);
 
    return ret;
 #else
@@ -877,8 +886,8 @@ ecore_x_randr_crtc_orientation_get(Ecore_X_Window root, Ecore_X_Randr_Crtc crtc)
 }
 
 EAPI Eina_Bool
-ecore_x_randr_crtc_orientation_set(Ecore_X_Window root,
-                                   Ecore_X_Randr_Crtc crtc,
+ecore_x_randr_crtc_orientation_set(Ecore_X_Window            root,
+                                   Ecore_X_Randr_Crtc        crtc,
                                    Ecore_X_Randr_Orientation orientation)
 {
 #ifdef ECORE_XRANDR
@@ -904,10 +913,10 @@ ecore_x_randr_crtc_orientation_set(Ecore_X_Window root,
 }
 
 EAPI void
-ecore_x_randr_crtc_pos_get(Ecore_X_Window root,
+ecore_x_randr_crtc_pos_get(Ecore_X_Window     root,
                            Ecore_X_Randr_Crtc crtc,
-                           int *x,
-                           int *y)
+                           int               *x,
+                           int               *y)
 {
 #ifdef ECORE_XRANDR
    RANDR_CHECK_1_2_RET();
@@ -917,7 +926,7 @@ ecore_x_randr_crtc_pos_get(Ecore_X_Window root,
 }
 
 EAPI Eina_Bool
-ecore_x_randr_crtc_clone_set(Ecore_X_Window root,
+ecore_x_randr_crtc_clone_set(Ecore_X_Window     root,
                              Ecore_X_Randr_Crtc original,
                              Ecore_X_Randr_Crtc clon)
 {
@@ -932,13 +941,13 @@ ecore_x_randr_crtc_clone_set(Ecore_X_Window root,
    int x, y;
 
    if (_ecore_x_randr_root_validate(root) &&
-           _ecore_x_randr_crtc_validate(root,
+       _ecore_x_randr_crtc_validate(root,
                                     original) &&
-           _ecore_x_randr_crtc_validate(root,
+       _ecore_x_randr_crtc_validate(root,
                                     clon) &&
        (res =
-           _ecore_x_randr_get_screen_resources (_ecore_x_disp,
-                                                root)) &&
+          _ecore_x_randr_get_screen_resources (_ecore_x_disp,
+                                               root)) &&
        (clone_crtc_info = XRRGetCrtcInfo(_ecore_x_disp, res, clon)))
      {
         ecore_x_randr_crtc_geometry_get(root, original, &x, &y, NULL, NULL);
@@ -984,13 +993,13 @@ ecore_x_randr_crtc_clone_set(Ecore_X_Window root,
  * EINA_FALSE
  */
 EAPI Eina_Bool
-ecore_x_randr_crtc_settings_set(Ecore_X_Window root,
-                                Ecore_X_Randr_Crtc crtc,
-                                Ecore_X_Randr_Output *outputs,
-                                int noutputs,
-                                int x,
-                                int y,
-                                Ecore_X_Randr_Mode mode,
+ecore_x_randr_crtc_settings_set(Ecore_X_Window            root,
+                                Ecore_X_Randr_Crtc        crtc,
+                                Ecore_X_Randr_Output     *outputs,
+                                int                       noutputs,
+                                int                       x,
+                                int                       y,
+                                Ecore_X_Randr_Mode        mode,
                                 Ecore_X_Randr_Orientation orientation)
 {
 #ifdef ECORE_XRANDR
@@ -1018,21 +1027,21 @@ ecore_x_randr_crtc_settings_set(Ecore_X_Window root,
                }
 
              if (mode == Ecore_X_Randr_Unset)
-                mode = crtc_info->mode;
+               mode = crtc_info->mode;
 
              if (x < 0)
-                x = crtc_info->x;
+               x = crtc_info->x;
 
              if (y < 0)
-                y = crtc_info->y;
+               y = crtc_info->y;
 
              if (orientation == Ecore_X_Randr_Unset)
-                orientation = crtc_info->rotation;
+               orientation = crtc_info->rotation;
 
              if (!XRRSetCrtcConfig(_ecore_x_disp, res, crtc, CurrentTime,
                                    x, y, mode, orientation, (RROutput *)outputs,
                                    noutputs))
-                ret = EINA_TRUE;
+               ret = EINA_TRUE;
 
              XRRFreeCrtcInfo(crtc_info);
           }
@@ -1057,10 +1066,10 @@ ecore_x_randr_crtc_settings_set(Ecore_X_Window root,
  * repositioning failed or if position of new crtc would be out of given screen's min/max bounds.
  */
 EAPI Eina_Bool
-ecore_x_randr_crtc_pos_relative_set(Ecore_X_Window root,
-                                    Ecore_X_Randr_Crtc crtc_r1,
-                                    Ecore_X_Randr_Crtc crtc_r2,
-                                    Ecore_X_Randr_Output_Policy policy,
+ecore_x_randr_crtc_pos_relative_set(Ecore_X_Window                   root,
+                                    Ecore_X_Randr_Crtc               crtc_r1,
+                                    Ecore_X_Randr_Crtc               crtc_r2,
+                                    Ecore_X_Randr_Output_Policy      policy,
                                     Ecore_X_Randr_Relative_Alignment alignment)
 {
 #ifdef ECORE_XRANDR
@@ -1068,21 +1077,21 @@ ecore_x_randr_crtc_pos_relative_set(Ecore_X_Window root,
 
    Eina_Rectangle r1_geo, r2_geo;
    int w_max, h_max, cw, ch, x_n = Ecore_X_Randr_Unset, y_n =
-      Ecore_X_Randr_Unset;
+     Ecore_X_Randr_Unset;
    /*
-   int r1_noutputs, r2_noutputs, r1_nmodes, i, j, outputs_mode_found, mode_w, mode_h;
-   Ecore_X_Randr_Output *r1_outputs, *r2_outputs, *r2_r1_outputs;
-   Ecore_X_Randr_Mode *r1_modes, r2_mode, r1_mode;
-   Eina_Bool ret;
-   */
+      int r1_noutputs, r2_noutputs, r1_nmodes, i, j, outputs_mode_found, mode_w, mode_h;
+      Ecore_X_Randr_Output *r1_outputs, *r2_outputs, *r2_r1_outputs;
+      Ecore_X_Randr_Mode *r1_modes, r2_mode, r1_mode;
+      Eina_Bool ret;
+    */
 
    if ((ecore_x_randr_crtc_mode_get(root, crtc_r1) == Ecore_X_Randr_None)
        || (ecore_x_randr_crtc_mode_get(root, crtc_r2) == Ecore_X_Randr_None))
-      return EINA_FALSE;
+     return EINA_FALSE;
 
    if (!_ecore_x_randr_crtc_validate(root, crtc_r1) ||
        (!(crtc_r1 != crtc_r2) &&
-           !_ecore_x_randr_crtc_validate(root, crtc_r2)))
+        !_ecore_x_randr_crtc_validate(root, crtc_r2)))
      return EINA_FALSE;
 
    ecore_x_randr_crtc_geometry_get(root,
@@ -1103,246 +1112,246 @@ ecore_x_randr_crtc_pos_relative_set(Ecore_X_Window root,
    switch (policy)
      {
       case ECORE_X_RANDR_OUTPUT_POLICY_RIGHT:
-         //set r1 right of r2
-         x_n = r2_geo.x + r2_geo.w;
-
-         switch (alignment)
-           {
-            case ECORE_X_RANDR_RELATIVE_ALIGNMENT_NONE:
-               y_n = Ecore_X_Randr_Unset;
-               break;
-
-            case ECORE_X_RANDR_RELATIVE_ALIGNMENT_CENTER_REL:
-               y_n =
-                  ((int)(((double)r2_geo.h /
-                          2.0) + (double)r2_geo.y - ((double)r1_geo.h / 2.0)));
-               break;
+        //set r1 right of r2
+        x_n = r2_geo.x + r2_geo.w;
 
-            case ECORE_X_RANDR_RELATIVE_ALIGNMENT_CENTER_SCR:
-               y_n = ((int)((double)ch / 2.0) - ((double)r1_geo.h / 2.0));
-               break;
-           }
-         break;
+        switch (alignment)
+          {
+           case ECORE_X_RANDR_RELATIVE_ALIGNMENT_NONE:
+             y_n = Ecore_X_Randr_Unset;
+             break;
+
+           case ECORE_X_RANDR_RELATIVE_ALIGNMENT_CENTER_REL:
+             y_n =
+               ((int)(((double)r2_geo.h /
+                       2.0) + (double)r2_geo.y - ((double)r1_geo.h / 2.0)));
+             break;
+
+           case ECORE_X_RANDR_RELATIVE_ALIGNMENT_CENTER_SCR:
+             y_n = ((int)((double)ch / 2.0) - ((double)r1_geo.h / 2.0));
+             break;
+          }
+        break;
 
       case ECORE_X_RANDR_OUTPUT_POLICY_LEFT:
-         //set r1 left of r2
-         x_n = r2_geo.x - r1_geo.w;
-
-         switch (alignment)
-           {
-            case ECORE_X_RANDR_RELATIVE_ALIGNMENT_NONE:
-               y_n = Ecore_X_Randr_Unset;
-               break;
-
-            case ECORE_X_RANDR_RELATIVE_ALIGNMENT_CENTER_REL:
-               y_n =
-                  ((int)(((double)r2_geo.h /
-                          2.0) + r2_geo.y - ((double)r1_geo.h / 2.0)));
-               break;
+        //set r1 left of r2
+        x_n = r2_geo.x - r1_geo.w;
 
-            case ECORE_X_RANDR_RELATIVE_ALIGNMENT_CENTER_SCR:
-               y_n = ((int)(((double)ch / 2.0) - ((double)r1_geo.h / 2.0)));
-               break;
-           }
-         break;
+        switch (alignment)
+          {
+           case ECORE_X_RANDR_RELATIVE_ALIGNMENT_NONE:
+             y_n = Ecore_X_Randr_Unset;
+             break;
+
+           case ECORE_X_RANDR_RELATIVE_ALIGNMENT_CENTER_REL:
+             y_n =
+               ((int)(((double)r2_geo.h /
+                       2.0) + r2_geo.y - ((double)r1_geo.h / 2.0)));
+             break;
+
+           case ECORE_X_RANDR_RELATIVE_ALIGNMENT_CENTER_SCR:
+             y_n = ((int)(((double)ch / 2.0) - ((double)r1_geo.h / 2.0)));
+             break;
+          }
+        break;
 
       case ECORE_X_RANDR_OUTPUT_POLICY_BELOW:
-         //set r1 below r2
-         y_n = r2_geo.y + r2_geo.h;
+        //set r1 below r2
+        y_n = r2_geo.y + r2_geo.h;
 
-         switch (alignment)
-           {
-            case ECORE_X_RANDR_RELATIVE_ALIGNMENT_NONE:
-               x_n = Ecore_X_Randr_Unset;
-               break;
-
-            case ECORE_X_RANDR_RELATIVE_ALIGNMENT_CENTER_REL:
-               x_n =
-                  ((int)((((double)r2_geo.x +
-                           (double)r2_geo.w) / 2.0) - ((double)r1_geo.w / 2.0)));
-               break;
-
-            case ECORE_X_RANDR_RELATIVE_ALIGNMENT_CENTER_SCR:
-               x_n = ((int)((double)cw / 2.0));
-               break;
-           }
-         break;
+        switch (alignment)
+          {
+           case ECORE_X_RANDR_RELATIVE_ALIGNMENT_NONE:
+             x_n = Ecore_X_Randr_Unset;
+             break;
+
+           case ECORE_X_RANDR_RELATIVE_ALIGNMENT_CENTER_REL:
+             x_n =
+               ((int)((((double)r2_geo.x +
+                        (double)r2_geo.w) / 2.0) - ((double)r1_geo.w / 2.0)));
+             break;
+
+           case ECORE_X_RANDR_RELATIVE_ALIGNMENT_CENTER_SCR:
+             x_n = ((int)((double)cw / 2.0));
+             break;
+          }
+        break;
 
       case ECORE_X_RANDR_OUTPUT_POLICY_ABOVE:
-         y_n = r2_geo.y - r1_geo.h;
-
-         //set r1 above r2
-         switch (alignment)
-           {
-            case ECORE_X_RANDR_RELATIVE_ALIGNMENT_NONE:
-               x_n = Ecore_X_Randr_Unset;
-               break;
+        y_n = r2_geo.y - r1_geo.h;
 
-            case ECORE_X_RANDR_RELATIVE_ALIGNMENT_CENTER_REL:
-               x_n =
-                  ((int)((((double)r2_geo.x +
-                           (double)r2_geo.w) / 2.0) - ((double)r1_geo.w / 2.0)));
-               break;
-
-            case ECORE_X_RANDR_RELATIVE_ALIGNMENT_CENTER_SCR:
-               x_n = ((int)((double)cw / 2.0));
-               break;
-           }
-        break;
+        //set r1 above r2
+        switch (alignment)
+          {
+           case ECORE_X_RANDR_RELATIVE_ALIGNMENT_NONE:
+             x_n = Ecore_X_Randr_Unset;
+             break;
+
+           case ECORE_X_RANDR_RELATIVE_ALIGNMENT_CENTER_REL:
+             x_n =
+               ((int)((((double)r2_geo.x +
+                        (double)r2_geo.w) / 2.0) - ((double)r1_geo.w / 2.0)));
+             break;
+
+           case ECORE_X_RANDR_RELATIVE_ALIGNMENT_CENTER_SCR:
+             x_n = ((int)((double)cw / 2.0));
+             break;
+          }
+        break;
 
       case ECORE_X_RANDR_OUTPUT_POLICY_CLONE:
-        return  ecore_x_randr_crtc_pos_set(root, crtc_r1, r2_geo.x, r2_geo.y);
+        return ecore_x_randr_crtc_pos_set(root, crtc_r1, r2_geo.x, r2_geo.y);
 
-        /* entire cloning (including modesetting)
+      /* entire cloning (including modesetting)
          //all outputs of crtc1 capable of crtc2's current mode?
          r2_mode = ecore_x_randr_crtc_mode_get(root, crtc_r2);
          if (!(r1_outputs =
-                  ecore_x_randr_crtc_outputs_get(root, crtc_r1,
-                                                 &r1_noutputs)) ||
-             (r1_noutputs == 0))
-            return EINA_FALSE;
+               ecore_x_randr_crtc_outputs_get(root, crtc_r1,
+                                              &r1_noutputs)) ||
+          (r1_noutputs == 0))
+         return EINA_FALSE;
 
          for (i = 0, outputs_mode_found = 0; i < r1_noutputs; i++)
-           {
-              if (!(r1_modes =
-                       ecore_x_randr_output_modes_get(root, r1_outputs[i],
-                                                      &r1_nmodes, NULL)))
-                {
-                   free(r1_outputs);
-                   return EINA_FALSE;
-                }
+         {
+           if (!(r1_modes =
+                    ecore_x_randr_output_modes_get(root, r1_outputs[i],
+                                                   &r1_nmodes, NULL)))
+             {
+                free(r1_outputs);
+                return EINA_FALSE;
+             }
 
-              for (j = 0; j < r1_nmodes; j++)
-                {
-                   ecore_x_randr_mode_size_get(root,
-                                               r1_modes[j],
-                                               &mode_w,
-                                               &mode_h);
-                   if ((mode_w == r2_geo.w) && (mode_h == r2_geo.h))
-                     {
-                        r1_mode = r1_modes[j];
-                        ++outputs_mode_found;
-                        free(r1_modes);
-                        r1_modes = NULL;
-                        break;
-                     }
-                }
-              if (r1_modes)
-                        free(r1_modes);
+           for (j = 0; j < r1_nmodes; j++)
+             {
+                ecore_x_randr_mode_size_get(root,
+                                            r1_modes[j],
+                                            &mode_w,
+                                            &mode_h);
+                if ((mode_w == r2_geo.w) && (mode_h == r2_geo.h))
+                  {
+                     r1_mode = r1_modes[j];
+         ++outputs_mode_found;
+                     free(r1_modes);
+                     r1_modes = NULL;
+                     break;
+                  }
+             }
+           if (r1_modes)
+                     free(r1_modes);
 
-              if (outputs_mode_found <= i)
-                {
-                   //an output doesn't support the set mode, cancel!
-                        free(r1_outputs);
-                   return EINA_FALSE;
-                }
-           }
-                        free (r1_outputs);
+           if (outputs_mode_found <= i)
+             {
+                //an output doesn't support the set mode, cancel!
+                     free(r1_outputs);
+                return EINA_FALSE;
+             }
+         }
+                     free (r1_outputs);
          //CRTC 1's outputs support a mode of same geometry as CRTC 2.
          ret =
-            (ecore_x_randr_crtc_mode_set(root, crtc_r1, Ecore_X_Randr_None,
-                                         Ecore_X_Randr_None,
-                                         r1_mode) &&
-             ecore_x_randr_crtc_pos_set(root, crtc_r1, r2_geo.x, r2_geo.y));
+         (ecore_x_randr_crtc_mode_set(root, crtc_r1, Ecore_X_Randr_None,
+                                      Ecore_X_Randr_None,
+                                      r1_mode) &&
+          ecore_x_randr_crtc_pos_set(root, crtc_r1, r2_geo.x, r2_geo.y));
          return ret;
-        */
+       */
 
-        /* entire cloning on same CRTC
+      /* entire cloning on same CRTC
          //all outputs of crtc1 capable of crtc2's current mode?
          r2_mode = ecore_x_randr_crtc_mode_get(root, crtc_r2);
          if (!(r1_outputs =
-                  ecore_x_randr_crtc_outputs_get(root, crtc_r1,
-                                                 &r1_noutputs)) ||
-             (r1_noutputs == 0))
-            return EINA_FALSE;
+               ecore_x_randr_crtc_outputs_get(root, crtc_r1,
+                                              &r1_noutputs)) ||
+          (r1_noutputs == 0))
+         return EINA_FALSE;
 
          for (i = 0, outputs_mode_found = 0; i < r1_noutputs; i++)
-           {
-              if (!(r1_modes =
-                       ecore_x_randr_output_modes_get(root, r1_outputs[i],
-                                                      &r1_nmodes, NULL)))
-                {
-                        free(r1_outputs);
-                   return EINA_FALSE;
-                }
+         {
+           if (!(r1_modes =
+                    ecore_x_randr_output_modes_get(root, r1_outputs[i],
+                                                   &r1_nmodes, NULL)))
+             {
+                     free(r1_outputs);
+                return EINA_FALSE;
+             }
 
-              for (j = 0; j < r1_nmodes; j++)
-                {
-                   if (r1_modes[j] == r2_mode)
-                     {
-                        ++outputs_mode_found;
-                        free(r1_modes);
-                        r1_modes = NULL;
-                        break;
-                     }
-                }
-              if (r1_modes)
-                        free(r1_modes);
+           for (j = 0; j < r1_nmodes; j++)
+             {
+                if (r1_modes[j] == r2_mode)
+                  {
+         ++outputs_mode_found;
+                     free(r1_modes);
+                     r1_modes = NULL;
+                     break;
+                  }
+             }
+           if (r1_modes)
+                     free(r1_modes);
 
-              if (outputs_mode_found <= i)
-                {
-                   //an output doesn't support the set mode, cancel!
-                        free(r1_outputs);
-                   return EINA_FALSE;
-                }
-           }
+           if (outputs_mode_found <= i)
+             {
+                //an output doesn't support the set mode, cancel!
+                     free(r1_outputs);
+                return EINA_FALSE;
+             }
+         }
          //check whether crtc r2 can use all outputs of r1.
          if (!(r2_outputs =
-                  ecore_x_randr_crtc_possible_outputs_get(root, crtc_r2,
-                                                          &r2_noutputs)) ||
-             (r2_noutputs == 0))
-           {
-                   free(r1_outputs);
-              return EINA_FALSE;
-           }
+               ecore_x_randr_crtc_possible_outputs_get(root, crtc_r2,
+                                                       &r2_noutputs)) ||
+          (r2_noutputs == 0))
+         {
+                free(r1_outputs);
+           return EINA_FALSE;
+         }
 
          for (i = 0; i < r1_noutputs; i++)
-           {
-              for (j = 0; j < r2_noutputs; )
-                {
-                   if (r1_outputs[i] == r2_outputs[j])
-                      break;
+         {
+           for (j = 0; j < r2_noutputs; )
+             {
+                if (r1_outputs[i] == r2_outputs[j])
+                   break;
 
-                   j++;
-                }
-              if (j == r2_noutputs)
-                {
-                   //didn't find the output!
-                   free (r1_outputs);
-                   free (r2_outputs);
-                   return EINA_FALSE;
-                }
-           }
+                j++;
+             }
+           if (j == r2_noutputs)
+             {
+                //didn't find the output!
+                free (r1_outputs);
+                free (r2_outputs);
+                return EINA_FALSE;
+             }
+         }
 
          //apparently crtc2 supports all outputs of r1
          //TODO: check with the compatible list of outputs (property in RR1.3)
          r2_r1_outputs =
-            malloc(sizeof(Ecore_X_Randr_Output) * (r1_noutputs + r2_noutputs));
+         malloc(sizeof(Ecore_X_Randr_Output) * (r1_noutputs + r2_noutputs));
          for (i = 0; i < r1_noutputs; i++)
-           {
-              r2_r1_outputs[i] = r1_outputs[i];
-           }
-            free(r1_outputs);
+         {
+           r2_r1_outputs[i] = r1_outputs[i];
+         }
+         free(r1_outputs);
          for (; i < r2_noutputs; i++)
-           {
-              r2_r1_outputs[i] = r2_outputs[i];
-           }
-            free(r2_outputs);
+         {
+           r2_r1_outputs[i] = r2_outputs[i];
+         }
+         free(r2_outputs);
          ret =
-            ecore_x_randr_crtc_mode_set(root, crtc_r2, r2_r1_outputs,
-                                        (r1_noutputs + r1_noutputs), r2_mode);
+         ecore_x_randr_crtc_mode_set(root, crtc_r2, r2_r1_outputs,
+                                     (r1_noutputs + r1_noutputs), r2_mode);
          free (r2_r1_outputs);
          return ret;
-        */
+       */
       case ECORE_X_RANDR_OUTPUT_POLICY_NONE:
         break;
      }
    if ((x_n == r1_geo.x) && (y_n == r1_geo.x))
-      return EINA_TRUE;
+     return EINA_TRUE;
 
    //out of possible bounds?
    if (((y_n + r1_geo.h) > h_max) || ((x_n + r1_geo.w) > w_max))
-      return EINA_FALSE;
+     return EINA_FALSE;
 
    return ecore_x_randr_crtc_pos_set(root, crtc_r1, x_n, y_n);
 #else
@@ -1350,12 +1359,11 @@ ecore_x_randr_crtc_pos_relative_set(Ecore_X_Window root,
 #endif
 }
 
-
 EAPI Ecore_X_Randr_Mode *
-ecore_x_randr_output_modes_get(Ecore_X_Window root,
+ecore_x_randr_output_modes_get(Ecore_X_Window       root,
                                Ecore_X_Randr_Output output,
-                               int *num,
-                               int *npreferred)
+                               int                 *num,
+                               int                 *npreferred)
 {
 #ifdef ECORE_XRANDR
    RANDR_CHECK_1_2_RET(NULL);
@@ -1366,25 +1374,25 @@ ecore_x_randr_output_modes_get(Ecore_X_Window root,
    if ((output != Ecore_X_Randr_None)
        && (res = _ecore_x_randr_get_screen_resources(_ecore_x_disp, root))
        && (output_info =
-              XRRGetOutputInfo(_ecore_x_disp, res, (RROutput)output)))
+             XRRGetOutputInfo(_ecore_x_disp, res, (RROutput)output)))
      {
         if ((modes = malloc(sizeof(Ecore_X_Randr_Mode) * output_info->nmode)))
           {
              memcpy(modes, output_info->modes,
                     (sizeof(Ecore_X_Randr_Mode) * output_info->nmode));
              if (num)
-                *num = output_info->nmode;
+               *num = output_info->nmode;
 
              if (npreferred)
-                *npreferred = output_info->npreferred;
+               *npreferred = output_info->npreferred;
           }
      }
 
    if (output_info)
-      XRRFreeOutputInfo(output_info);
+     XRRFreeOutputInfo(output_info);
 
    if (res)
-      XRRFreeScreenResources(res);
+     XRRFreeScreenResources(res);
 
    return modes;
 #else
@@ -1393,7 +1401,9 @@ ecore_x_randr_output_modes_get(Ecore_X_Window root,
 }
 
 EAPI Ecore_X_Randr_Crtc *
-ecore_x_randr_output_possible_crtcs_get(Ecore_X_Window root, Ecore_X_Randr_Output output, int *num)
+ecore_x_randr_output_possible_crtcs_get(Ecore_X_Window       root,
+                                        Ecore_X_Randr_Output output,
+                                        int                 *num)
 {
 #ifdef ECORE_XRANDR
    RANDR_CHECK_1_2_RET(NULL);
@@ -1403,21 +1413,21 @@ ecore_x_randr_output_possible_crtcs_get(Ecore_X_Window root, Ecore_X_Randr_Outpu
 
    if ((output != Ecore_X_Randr_None))
      {
-       if ((res = _ecore_x_randr_get_screen_resources(_ecore_x_disp, root)))
-         {
-            if ((output_info = XRRGetOutputInfo(_ecore_x_disp, res, output)))
-              {
-                 if ((crtcs = malloc(sizeof(Ecore_X_Randr_Crtc) * output_info->ncrtc)))
-                   {
-                      memcpy(crtcs, output_info->crtcs, (sizeof(Ecore_X_Randr_Crtc) * output_info->ncrtc));
-                      if (num) *num = output_info->ncrtc;
-                   }
-                 XRRFreeOutputInfo(output_info);
-              }
-            XRRFreeScreenResources(res);
-         }
+        if ((res = _ecore_x_randr_get_screen_resources(_ecore_x_disp, root)))
+          {
+             if ((output_info = XRRGetOutputInfo(_ecore_x_disp, res, output)))
+               {
+                  if ((crtcs = malloc(sizeof(Ecore_X_Randr_Crtc) * output_info->ncrtc)))
+                    {
+                       memcpy(crtcs, output_info->crtcs, (sizeof(Ecore_X_Randr_Crtc) * output_info->ncrtc));
+                       if (num) *num = output_info->ncrtc;
+                    }
+                  XRRFreeOutputInfo(output_info);
+               }
+             XRRFreeScreenResources(res);
+          }
      }
-     return crtcs;
+   return crtcs;
 #else
    return Ecore_X_Randr_None;
 #endif
@@ -1431,7 +1441,9 @@ ecore_x_randr_output_possible_crtcs_get(Ecore_X_Window root, Ecore_X_Randr_Outpu
  * @param num number of possible clones
  */
 EAPI Ecore_X_Randr_Output *
-ecore_x_randr_output_clones_get(Ecore_X_Window root, Ecore_X_Randr_Output output, int *num)
+ecore_x_randr_output_clones_get(Ecore_X_Window       root,
+                                Ecore_X_Randr_Output output,
+                                int                 *num)
 {
 #ifdef ECORE_XRANDR
    RANDR_CHECK_1_2_RET(NULL);
@@ -1441,28 +1453,29 @@ ecore_x_randr_output_clones_get(Ecore_X_Window root, Ecore_X_Randr_Output output
 
    if ((output != Ecore_X_Randr_None))
      {
-       if ((res = _ecore_x_randr_get_screen_resources(_ecore_x_disp, root)))
-         {
-            if ((output_info = XRRGetOutputInfo(_ecore_x_disp, res, output)))
-              {
-                 if ((outputs = malloc(sizeof(Ecore_X_Randr_Output) * output_info->nclone)))
-                   {
-                      memcpy(outputs, output_info->clones, (sizeof(Ecore_X_Randr_Output) * output_info->nclone));
-                      if (num) *num = output_info->nclone;
-                   }
-                 XRRFreeOutputInfo(output_info);
-              }
-            XRRFreeScreenResources(res);
-         }
+        if ((res = _ecore_x_randr_get_screen_resources(_ecore_x_disp, root)))
+          {
+             if ((output_info = XRRGetOutputInfo(_ecore_x_disp, res, output)))
+               {
+                  if ((outputs = malloc(sizeof(Ecore_X_Randr_Output) * output_info->nclone)))
+                    {
+                       memcpy(outputs, output_info->clones, (sizeof(Ecore_X_Randr_Output) * output_info->nclone));
+                       if (num) *num = output_info->nclone;
+                    }
+                  XRRFreeOutputInfo(output_info);
+               }
+             XRRFreeScreenResources(res);
+          }
      }
-     return outputs;
+   return outputs;
 #else
    return Ecore_X_Randr_None;
 #endif
 }
 
 EAPI Ecore_X_Randr_Crtc
-ecore_x_randr_output_crtc_get(Ecore_X_Window root, Ecore_X_Randr_Output output)
+ecore_x_randr_output_crtc_get(Ecore_X_Window       root,
+                              Ecore_X_Randr_Output output)
 {
 #ifdef ECORE_XRANDR
    RANDR_CHECK_1_2_RET(Ecore_X_Randr_None);
@@ -1472,15 +1485,15 @@ ecore_x_randr_output_crtc_get(Ecore_X_Window root, Ecore_X_Randr_Output output)
 
    if ((output != Ecore_X_Randr_None))
      {
-       if ((res = _ecore_x_randr_get_screen_resources(_ecore_x_disp, root)))
-         {
-            if ((output_info = XRRGetOutputInfo(_ecore_x_disp, res, output)))
-              {
-                 ret = output_info->crtc;
-                 XRRFreeOutputInfo(output_info);
-              }
-            XRRFreeScreenResources(res);
-         }
+        if ((res = _ecore_x_randr_get_screen_resources(_ecore_x_disp, root)))
+          {
+             if ((output_info = XRRGetOutputInfo(_ecore_x_disp, res, output)))
+               {
+                  ret = output_info->crtc;
+                  XRRFreeOutputInfo(output_info);
+               }
+             XRRFreeScreenResources(res);
+          }
      }
 
    return ret;
@@ -1496,7 +1509,9 @@ ecore_x_randr_output_crtc_get(Ecore_X_Window root, Ecore_X_Randr_Output output)
  * @return name of the output as reported by X
  */
 EAPI char *
-ecore_x_randr_output_name_get(Ecore_X_Window root, Ecore_X_Randr_Output output, int *len)
+ecore_x_randr_output_name_get(Ecore_X_Window       root,
+                              Ecore_X_Randr_Output output,
+                              int                 *len)
 {
 #ifdef ECORE_XRANDR
    RANDR_CHECK_1_2_RET(NULL);
@@ -1508,19 +1523,19 @@ ecore_x_randr_output_name_get(Ecore_X_Window root, Ecore_X_Randr_Output output,
        && (res = _ecore_x_randr_get_screen_resources(_ecore_x_disp, root))
        && (output_info = XRRGetOutputInfo(_ecore_x_disp, res, output)))
      {
-       /*
-        * Actually the below command is correct, but due to a bug in libXrandr
-        * it doesn't work. Therefore we stick with strlen().
-        * Replace the line below with the following once this bug is
-        * fixed within libXrandr.
-        *
-        *    *len = output_info->nameLen;
-        *
-        */
-       if ((ret = strdup(output_info->name)) && len)
-         *len = strlen(ret);
-
-       XRRFreeOutputInfo(output_info);
+        /*
+         * Actually the below command is correct, but due to a bug in libXrandr
+         * it doesn't work. Therefore we stick with strlen().
+         * Replace the line below with the following once this bug is
+         * fixed within libXrandr.
+         *
+         *    *len = output_info->nameLen;
+         *
+         */
+          if ((ret = strdup(output_info->name)) && len)
+            *len = strlen(ret);
+
+          XRRFreeOutputInfo(output_info);
      }
 
    if (res)
@@ -1539,7 +1554,10 @@ ecore_x_randr_output_name_get(Ecore_X_Window root, Ecore_X_Randr_Output output,
  * @param h height of given mode in px
  */
 EAPI void
-ecore_x_randr_mode_size_get(Ecore_X_Window root, Ecore_X_Randr_Mode mode, int *w, int *h)
+ecore_x_randr_mode_size_get(Ecore_X_Window     root,
+                            Ecore_X_Randr_Mode mode,
+                            int               *w,
+                            int               *h)
 {
 #ifdef ECORE_XRANDR
    RANDR_CHECK_1_2_RET();
@@ -1550,19 +1568,19 @@ ecore_x_randr_mode_size_get(Ecore_X_Window root, Ecore_X_Randr_Mode mode, int *w
        && (w || h)
        && (res = _ecore_x_randr_get_screen_resources(_ecore_x_disp, root)))
      {
-       for (i = 0; i < res->nmode; i++)
-         {
-            if (res->modes[i].id == mode)
-              {
-                 if (w)
-                   *w = res->modes[i].width;
-
-                 if (h)
-                   *h = res->modes[i].height;
-
-                 break;
-              }
-         }
+        for (i = 0; i < res->nmode; i++)
+          {
+             if (res->modes[i].id == mode)
+               {
+                  if (w)
+                    *w = res->modes[i].width;
+
+                  if (h)
+                    *h = res->modes[i].height;
+
+                  break;
+               }
+          }
      }
 
    if (res)
@@ -1580,9 +1598,9 @@ ecore_x_randr_mode_size_get(Ecore_X_Window root, Ecore_X_Randr_Mode mode, int *w
  * @param length length of the byte-array. If NULL, request will fail.
  */
 EAPI unsigned char *
-ecore_x_randr_output_edid_get(Ecore_X_Window root,
+ecore_x_randr_output_edid_get(Ecore_X_Window       root,
                               Ecore_X_Randr_Output output,
-                              unsigned long *length)
+                              unsigned long       *length)
 {
 #ifdef ECORE_XRANDR
    RANDR_CHECK_1_2_RET(NULL);
@@ -1593,7 +1611,7 @@ ecore_x_randr_output_edid_get(Ecore_X_Window root,
    Atom actual_type;
 
    if (!length || !_ecore_x_randr_output_validate(root, output))
-      return NULL;
+     return NULL;
 
    if(XRRGetOutputProperty (_ecore_x_disp, output, name,
                             0, 100, False, False,
@@ -1607,7 +1625,7 @@ ecore_x_randr_output_edid_get(Ecore_X_Window root,
                {
                   if(length &&
                      (memcpy(ret, prop_data, (nitems * sizeof(unsigned char)))))
-                     *length = nitems;
+                    *length = nitems;
 
                   return ret;
                }
@@ -1621,7 +1639,7 @@ ecore_x_randr_output_edid_get(Ecore_X_Window root,
 }
 
 EAPI Ecore_X_Randr_Connection_Status
-ecore_x_randr_output_connection_status_get(Ecore_X_Window root,
+ecore_x_randr_output_connection_status_get(Ecore_X_Window       root,
                                            Ecore_X_Randr_Output output)
 {
 #ifdef ECORE_XRANDR
@@ -1629,7 +1647,7 @@ ecore_x_randr_output_connection_status_get(Ecore_X_Window root,
    XRRScreenResources *res = NULL;
    XRROutputInfo *output_info = NULL;
    Ecore_X_Randr_Connection_Status ret =
-      ECORE_X_RANDR_CONNECTION_STATUS_UNKNOWN;
+     ECORE_X_RANDR_CONNECTION_STATUS_UNKNOWN;
 
    if ((output != Ecore_X_Randr_None)
        && (res = _ecore_x_randr_get_screen_resources(_ecore_x_disp, root))
@@ -1639,10 +1657,10 @@ ecore_x_randr_output_connection_status_get(Ecore_X_Window root,
      }
 
    if (output_info)
-      XRRFreeOutputInfo(output_info);
+     XRRFreeOutputInfo(output_info);
 
    if (res)
-      XRRFreeScreenResources(res);
+     XRRFreeScreenResources(res);
 
    return ret;
 #else
@@ -1651,10 +1669,10 @@ ecore_x_randr_output_connection_status_get(Ecore_X_Window root,
 }
 
 EAPI void
-ecore_x_randr_output_size_mm_get(Ecore_X_Window root,
+ecore_x_randr_output_size_mm_get(Ecore_X_Window       root,
                                  Ecore_X_Randr_Output output,
-                                 int *w_mm,
-                                 int *h_mm)
+                                 int                 *w_mm,
+                                 int                 *h_mm)
 {
 #ifdef ECORE_XRANDR
    RANDR_CHECK_1_2_RET();
@@ -1665,13 +1683,13 @@ ecore_x_randr_output_size_mm_get(Ecore_X_Window root,
        && (res = _ecore_x_randr_get_screen_resources(_ecore_x_disp, root)))
      {
         if ((output_info =
-                XRRGetOutputInfo(_ecore_x_disp, res, (RROutput)output)))
+               XRRGetOutputInfo(_ecore_x_disp, res, (RROutput)output)))
           {
              if (w_mm)
-                *w_mm = output_info->mm_width;
+               *w_mm = output_info->mm_width;
 
              if (h_mm)
-                *h_mm = output_info->mm_height;
+               *h_mm = output_info->mm_height;
 
              XRRFreeOutputInfo(output_info);
           }
@@ -1683,11 +1701,11 @@ ecore_x_randr_output_size_mm_get(Ecore_X_Window root,
 }
 
 EAPI Eina_Bool
-ecore_x_randr_move_all_crtcs_but(Ecore_X_Window root,
+ecore_x_randr_move_all_crtcs_but(Ecore_X_Window            root,
                                  const Ecore_X_Randr_Crtc *not_moved,
-                                 int nnot_moved,
-                                 int dx,
-                                 int dy)
+                                 int                       nnot_moved,
+                                 int                       dx,
+                                 int                       dy)
 {
 #ifdef ECORE_XRANDR
    Ecore_X_Randr_Crtc *crtcs_to_be_moved = NULL;
@@ -1695,12 +1713,11 @@ ecore_x_randr_move_all_crtcs_but(Ecore_X_Window root,
    int i, j, k, n;
    Eina_Bool ret;
 
-
    if ((nnot_moved <= 0) || (!not_moved)
        || !_ecore_x_randr_root_validate(root)
        || !(res =
-               _ecore_x_randr_get_screen_resources (_ecore_x_disp, root)))
-      return EINA_FALSE;
+              _ecore_x_randr_get_screen_resources (_ecore_x_disp, root)))
+     return EINA_FALSE;
 
    n = (res->ncrtc - nnot_moved);
    if ((crtcs_to_be_moved = malloc(sizeof(Ecore_X_Randr_Crtc) * n)))
@@ -1710,11 +1727,11 @@ ecore_x_randr_move_all_crtcs_but(Ecore_X_Window root,
              for (j = 0; j < nnot_moved; j++)
                {
                   if (res->crtcs[i] == not_moved[j])
-                     break;
+                    break;
                }
              if (j == nnot_moved)
-                //crtcs[i] is not in the 'not to move'-list
-                crtcs_to_be_moved[k++] = res->crtcs[i];
+               //crtcs[i] is not in the 'not to move'-list
+               crtcs_to_be_moved[k++] = res->crtcs[i];
           }
      }
 
@@ -1737,11 +1754,11 @@ ecore_x_randr_move_all_crtcs_but(Ecore_X_Window root,
  * @return EINA_TRUE if all crtcs could be moved successfully.
  */
 EAPI Eina_Bool
-ecore_x_randr_move_crtcs(Ecore_X_Window root,
+ecore_x_randr_move_crtcs(Ecore_X_Window            root,
                          const Ecore_X_Randr_Crtc *crtcs,
-                         int ncrtc,
-                         int dx,
-                         int dy)
+                         int                       ncrtc,
+                         int                       dx,
+                         int                       dy)
 {
 #ifdef ECORE_XRANDR
    RANDR_CHECK_1_2_RET(EINA_FALSE);
@@ -1770,7 +1787,7 @@ ecore_x_randr_move_crtcs(Ecore_X_Window root,
                  || ((crtc_info[i]->y + dy) < 0) ||
                  ((int)(crtc_info[i]->y + crtc_info[i]->height + dy) > h_max)
                  )
-                goto _ecore_x_randr_move_crtcs_fail_free_crtc_info;
+               goto _ecore_x_randr_move_crtcs_fail_free_crtc_info;
 
              nw = MAX((int)(crtc_info[i]->x + crtc_info[i]->width + dx), nw);
              nh = MAX((int)(crtc_info[i]->y + crtc_info[i]->height + dy), nh);
@@ -1783,7 +1800,7 @@ ecore_x_randr_move_crtcs(Ecore_X_Window root,
               ecore_x_randr_screen_current_size_set(root, nw, nh,
                                                     Ecore_X_Randr_Unset,
                                                     Ecore_X_Randr_Unset)))
-           goto _ecore_x_randr_move_crtcs_fail_free_crtc_info;
+          goto _ecore_x_randr_move_crtcs_fail_free_crtc_info;
 
         //actually move all the crtcs, keep their rotation and mode.
         for (i = 0; (i < ncrtc) && crtc_info[i]; i++)
@@ -1804,18 +1821,18 @@ ecore_x_randr_move_crtcs(Ecore_X_Window root,
           {
              //something went wrong, let's try to move the already moved crtcs
              //back.
-             while ((i--) >= 0)
-               {
-                  if (crtc_info[i])
-                     ecore_x_randr_crtc_settings_set(root,
-                                                     crtcs[i],
-                                                     NULL,
-                                                     Ecore_X_Randr_Unset,
-                                                     (crtc_info[i]->x - dx),
-                                                     (crtc_info[i]->y - dy),
-                                                     crtc_info[i]->mode,
-                                                     crtc_info[i]->rotation);
-               }
+                 while ((i--) >= 0)
+                   {
+                      if (crtc_info[i])
+                        ecore_x_randr_crtc_settings_set(root,
+                                                        crtcs[i],
+                                                        NULL,
+                                                        Ecore_X_Randr_Unset,
+                                                        (crtc_info[i]->x - dx),
+                                                        (crtc_info[i]->y - dy),
+                                                        crtc_info[i]->mode,
+                                                        crtc_info[i]->rotation);
+                   }
           }
 
         for (i = 0; i < ncrtc; i++)
@@ -1829,7 +1846,7 @@ ecore_x_randr_move_crtcs(Ecore_X_Window root,
    return ret;
 _ecore_x_randr_move_crtcs_fail_free_crtc_info:
    while (i-- > 0)
-      XRRFreeCrtcInfo(crtc_info[i]);
+     XRRFreeCrtcInfo(crtc_info[i]);
    XRRFreeScreenResources(res);
    return EINA_FALSE;
 #else
@@ -1853,43 +1870,43 @@ ecore_x_randr_screen_reset(Ecore_X_Window root)
 
    if (!_ecore_x_randr_root_validate(root) ||
        !(res = _ecore_x_randr_get_screen_resources(_ecore_x_disp, root)))
-      return;
+     return;
 
    Ecore_X_Randr_Crtc enabled_crtcs[res->ncrtc];
 
    for (i = 0; i < res->ncrtc; i++)
      {
         if (!(crtc_info =
-                 XRRGetCrtcInfo(_ecore_x_disp, res,
-                                res->crtcs[i])) ||
+                XRRGetCrtcInfo(_ecore_x_disp, res,
+                               res->crtcs[i])) ||
             (crtc_info->mode == Ecore_X_Randr_None) ||
             (crtc_info->mode == Ecore_X_Randr_Unset)
             || ((crtc_info->noutput == 0)))
-           continue;
+          continue;
 
-       enabled_crtcs[nenabled_crtcs++] = res->crtcs[i];
+        enabled_crtcs[nenabled_crtcs++] = res->crtcs[i];
 
         if ((int)(crtc_info->x + crtc_info->width) > w_n)
-           w_n = (crtc_info->x + crtc_info->width);
+          w_n = (crtc_info->x + crtc_info->width);
 
         if ((int)(crtc_info->y + crtc_info->height) > h_n)
-           h_n = (crtc_info->y + crtc_info->height);
+          h_n = (crtc_info->y + crtc_info->height);
 
-       if (crtc_info->x < dx_min)
-         dx_min = crtc_info->x;
-       if (crtc_info->y < dy_min)
-         dy_min = crtc_info->y;
+        if (crtc_info->x < dx_min)
+          dx_min = crtc_info->x;
+        if (crtc_info->y < dy_min)
+          dy_min = crtc_info->y;
 
         XRRFreeCrtcInfo(crtc_info);
      }
    fprintf(stderr, "E_RANDR: babam, resize! Trying to move all CRTCs with dx %d and dy %d", dx_min, dy_min);
    if ((dx_min > 0) || (dy_min > 0))
      {
-       if (ecore_x_randr_move_crtcs(root, enabled_crtcs, nenabled_crtcs, -dx_min, -dy_min))
-         {
-            w_n -= dx_min;
-            h_n -= dy_min;
-         }
+        if (ecore_x_randr_move_crtcs(root, enabled_crtcs, nenabled_crtcs, -dx_min, -dy_min))
+          {
+             w_n -= dx_min;
+             h_n -= dy_min;
+          }
      }
    ecore_x_randr_screen_current_size_set(root,
                                          w_n,
@@ -2091,7 +2108,7 @@ ecore_x_randr_output_backlight_level_set(Ecore_X_Window       root,
 
 EAPI Ecore_X_Randr_Output *
 ecore_x_randr_window_outputs_get(Ecore_X_Window window,
-                                 int *num)
+                                 int           *num)
 {
 #ifdef ECORE_XRANDR
    Ecore_X_Window root;
@@ -2120,39 +2137,39 @@ ecore_x_randr_window_outputs_get(Ecore_X_Window window,
    for (i = 0; i < ncrtcs; i++)
      {
         /* if crtc is not enabled, don't bother about it any further */
-        mode = ecore_x_randr_crtc_mode_get(root, crtcs[i]);
-        if (mode == Ecore_X_Randr_None) continue;
+         mode = ecore_x_randr_crtc_mode_get(root, crtcs[i]);
+         if (mode == Ecore_X_Randr_None) continue;
 
-        ecore_x_randr_crtc_geometry_get(root, crtcs[i],
-                                        &c_geo.x, &c_geo.y,
-                                        &c_geo.w, &c_geo.h);
-        if (eina_rectangles_intersect(&w_geo, &c_geo))
-          {
-             outputs = ecore_x_randr_crtc_outputs_get(root, crtcs[i],
-                                                      &noutputs);
-             /* The case below should be impossible, but for safety reasons
-              * remains */
-             if (!outputs)
-               {
-                  if (num) *num = 0;
-                  free(ret);
-                  free(crtcs);
-                  return NULL;
-               }
-             tret = realloc(ret, ((nret + noutputs) * sizeof(Ecore_X_Randr_Output)));
-             if (!tret)
-               {
-                  if (num) *num = 0;
-                  free(outputs);
-                  free(ret);
-                  free(crtcs);
-                  return NULL;
-               }
-             ret = tret;
-             memcpy(&ret[nret], outputs, (noutputs * sizeof(Ecore_X_Randr_Output)));
-             nret += noutputs;
-             free(outputs);
-          }
+         ecore_x_randr_crtc_geometry_get(root, crtcs[i],
+                                         &c_geo.x, &c_geo.y,
+                                         &c_geo.w, &c_geo.h);
+         if (eina_rectangles_intersect(&w_geo, &c_geo))
+           {
+              outputs = ecore_x_randr_crtc_outputs_get(root, crtcs[i],
+                                                       &noutputs);
+     /* The case below should be impossible, but for safety reasons
+      * remains */
+              if (!outputs)
+                {
+                   if (num) *num = 0;
+                   free(ret);
+                   free(crtcs);
+                   return NULL;
+                }
+              tret = realloc(ret, ((nret + noutputs) * sizeof(Ecore_X_Randr_Output)));
+              if (!tret)
+                {
+                   if (num) *num = 0;
+                   free(outputs);
+                   free(ret);
+                   free(crtcs);
+                   return NULL;
+                }
+              ret = tret;
+              memcpy(&ret[nret], outputs, (noutputs * sizeof(Ecore_X_Randr_Output)));
+              nret += noutputs;
+              free(outputs);
+           }
      }
    free(crtcs);
 
@@ -2176,7 +2193,8 @@ _ecore_x_randr_current_output_get_fail:
 
 EINA_DEPRECATED EAPI Ecore_X_Randr_Output *
 ecore_x_randr_current_output_get(Ecore_X_Window window,
-                                 int *num)
+                                 int           *num)
 {
    return ecore_x_randr_window_outputs_get(window, num);
 }
+
index baf58b8..d434f2f 100644 (file)
  * - see other TODO's within this file.
  */
 
-#define ECORE_X_RANDR_EDID_VERSION_10 ((1 << 8) | 0)
-#define ECORE_X_RANDR_EDID_VERSION_11 ((1 << 8) | 1)
-#define ECORE_X_RANDR_EDID_VERSION_12 ((1 << 8) | 2)
-#define ECORE_X_RANDR_EDID_VERSION_13 ((1 << 8) | 3)
-#define ECORE_X_RANDR_EDID_VERSION_14 ((1 << 8) | 4)
-
-#define _ECORE_X_RANDR_EDID_OFFSET_MANUFACTURER 0x08
-#define _ECORE_X_RANDR_EDID_OFFSET_TYPE 0x14
-#define _ECORE_X_RANDR_EDID_OFFSET_VERSION_MAJOR 0x12
-#define _ECORE_X_RANDR_EDID_OFFSET_VERSION_MINOR 0x13
-#define _ECORE_X_RANDR_EDID_OFFSET_DPMS 0x18
-#define _ECORE_X_RANDR_EDID_OFFSET_COLORSPACE 0x18
-#define _ECORE_X_RANDR_EDID_OFFSET_DESCRIPTOR_BLOCK 0x36
-#define _ECORE_X_RANDR_EDID_OFFSET_DESCRIPTOR_BLOCK_TYPE 3
-#define _ECORE_X_RANDR_EDID_OFFSET_DESCRIPTOR_BLOCK_CONTENT 5
-#define _ECORE_X_RANDR_EDID_OFFSET_ASPECT_RATIO_PREFERRED 15
-#define _ECORE_X_RANDR_EDID_OFFSET_ASPECT_RATIO 14
-
-#define _ECORE_X_RANDR_EDID_MASK_DIGITAL 0x80
-#define _ECORE_X_RANDR_EDID_MASK_DIGITAL_INTERFACE 0x0f
-#define _ECORE_X_RANDR_EDID_MASK_DIGITAL_TMDS_DFP_10 0x01
-#define _ECORE_X_RANDR_EDID_MASK_COLORSCHEME_ANALOGOUS 0x18
-#define _ECORE_X_RANDR_EDID_MASK_COLORSCHEME_DIGITAL_YCRCB_444 0x10
-#define _ECORE_X_RANDR_EDID_MASK_COLORSCHEME_DIGITAL_YCRCB_422 0x08
-#define _ECORE_X_RANDR_EDID_MASK_ASPECT_RATIO_PREFERRED 0xe0
-#define _ECORE_X_RANDR_EDID_MASK_DPMS 0xE0
-#define _ECORE_X_RANDR_EDID_MASK_DPMS_STANDBY 0x80
-#define _ECORE_X_RANDR_EDID_MASK_DPMS_SUSPEND 0x40
-#define _ECORE_X_RANDR_EDID_MASK_DPMS_OFF 0x20
-#define _ECORE_X_RANDR_EDID_MASK_INTERFACE_TYPE 0x0f
-#define _ECORE_X_RANDR_EDID_MASK_ASPECT_RATIO_4_3 0x80
-#define _ECORE_X_RANDR_EDID_MASK_ASPECT_RATIO_16_9 0x40
-#define _ECORE_X_RANDR_EDID_MASK_ASPECT_RATIO_16_10 0x20
-#define _ECORE_X_RANDR_EDID_MASK_ASPECT_RATIO_5_4 0x10
-#define _ECORE_X_RANDR_EDID_MASK_ASPECT_RATIO_15_9 0x08
+#define ECORE_X_RANDR_EDID_VERSION_10                                   ((1 << 8) | 0)
+#define ECORE_X_RANDR_EDID_VERSION_11                                   ((1 << 8) | 1)
+#define ECORE_X_RANDR_EDID_VERSION_12                                   ((1 << 8) | 2)
+#define ECORE_X_RANDR_EDID_VERSION_13                                   ((1 << 8) | 3)
+#define ECORE_X_RANDR_EDID_VERSION_14                                   ((1 << 8) | 4)
+
+#define _ECORE_X_RANDR_EDID_OFFSET_MANUFACTURER                         0x08
+#define _ECORE_X_RANDR_EDID_OFFSET_TYPE                                 0x14
+#define _ECORE_X_RANDR_EDID_OFFSET_VERSION_MAJOR                        0x12
+#define _ECORE_X_RANDR_EDID_OFFSET_VERSION_MINOR                        0x13
+#define _ECORE_X_RANDR_EDID_OFFSET_DPMS                                 0x18
+#define _ECORE_X_RANDR_EDID_OFFSET_COLORSPACE                           0x18
+#define _ECORE_X_RANDR_EDID_OFFSET_DESCRIPTOR_BLOCK                     0x36
+#define _ECORE_X_RANDR_EDID_OFFSET_DESCRIPTOR_BLOCK_TYPE                3
+#define _ECORE_X_RANDR_EDID_OFFSET_DESCRIPTOR_BLOCK_CONTENT             5
+#define _ECORE_X_RANDR_EDID_OFFSET_ASPECT_RATIO_PREFERRED               15
+#define _ECORE_X_RANDR_EDID_OFFSET_ASPECT_RATIO                         14
+
+#define _ECORE_X_RANDR_EDID_MASK_DIGITAL                                0x80
+#define _ECORE_X_RANDR_EDID_MASK_DIGITAL_INTERFACE                      0x0f
+#define _ECORE_X_RANDR_EDID_MASK_DIGITAL_TMDS_DFP_10                    0x01
+#define _ECORE_X_RANDR_EDID_MASK_COLORSCHEME_ANALOGOUS                  0x18
+#define _ECORE_X_RANDR_EDID_MASK_COLORSCHEME_DIGITAL_YCRCB_444          0x10
+#define _ECORE_X_RANDR_EDID_MASK_COLORSCHEME_DIGITAL_YCRCB_422          0x08
+#define _ECORE_X_RANDR_EDID_MASK_ASPECT_RATIO_PREFERRED                 0xe0
+#define _ECORE_X_RANDR_EDID_MASK_DPMS                                   0xE0
+#define _ECORE_X_RANDR_EDID_MASK_DPMS_STANDBY                           0x80
+#define _ECORE_X_RANDR_EDID_MASK_DPMS_SUSPEND                           0x40
+#define _ECORE_X_RANDR_EDID_MASK_DPMS_OFF                               0x20
+#define _ECORE_X_RANDR_EDID_MASK_INTERFACE_TYPE                         0x0f
+#define _ECORE_X_RANDR_EDID_MASK_ASPECT_RATIO_4_3                       0x80
+#define _ECORE_X_RANDR_EDID_MASK_ASPECT_RATIO_16_9                      0x40
+#define _ECORE_X_RANDR_EDID_MASK_ASPECT_RATIO_16_10                     0x20
+#define _ECORE_X_RANDR_EDID_MASK_ASPECT_RATIO_5_4                       0x10
+#define _ECORE_X_RANDR_EDID_MASK_ASPECT_RATIO_15_9                      0x08
 
 #define _ECORE_X_RANDR_EDID_DISPLAY_DESCRIPTOR_BLOCK_CONTENT_LENGTH_MAX 13
 
 typedef enum _Ecore_X_Randr_Edid_Aspect_Ratio_Preferred {
    ECORE_X_RANDR_EDID_ASPECT_RATIO_PREFERRED_4_3 = 0x00,
-      ECORE_X_RANDR_EDID_ASPECT_RATIO_PREFERRED_16_9 = 0x01,
-      ECORE_X_RANDR_EDID_ASPECT_RATIO_PREFERRED_16_10 = 0x02,
-      ECORE_X_RANDR_EDID_ASPECT_RATIO_PREFERRED_5_4 = 0x03,
-      ECORE_X_RANDR_EDID_ASPECT_RATIO_PREFERRED_15_9 = 0x04
+   ECORE_X_RANDR_EDID_ASPECT_RATIO_PREFERRED_16_9 = 0x01,
+   ECORE_X_RANDR_EDID_ASPECT_RATIO_PREFERRED_16_10 = 0x02,
+   ECORE_X_RANDR_EDID_ASPECT_RATIO_PREFERRED_5_4 = 0x03,
+   ECORE_X_RANDR_EDID_ASPECT_RATIO_PREFERRED_15_9 = 0x04
 } Ecore_X_Randr_Edid_Aspect_Ratio_Preferred;
 
 /* Some convenience loops */
 #define _ECORE_X_RANDR_EDID_FOR_EACH_EXTENSION_BLOCK(edid, edid_length, extension_block_iter) \
-   for (extension_block_iter = edid; extension_block_iter < (edid + edid_length); extension_block_iter += 128)
+  for (extension_block_iter = edid; extension_block_iter < (edid + edid_length); extension_block_iter += 128)
 
 #define _ECORE_X_RANDR_EDID_FOR_EACH_CEA_BLOCK(edid, edid_length, cea_block_iter) \
-   _ECORE_X_RANDR_EDID_FOR_EACH_EXTENSION_BLOCK(edid, edid_length, cea_block_iter) \
-         if (cea_block_iter[0] == 0x02)
+  _ECORE_X_RANDR_EDID_FOR_EACH_EXTENSION_BLOCK(edid, edid_length, cea_block_iter) \
+  if (cea_block_iter[0] == 0x02)
 
 /* The following macro is to be used with caution as it inherits another loop.
  * Therefore using a 'break;' statement will lead to continuation in the
  * inherent 'Extension block'-loop.
  */
-#define _ECORE_X_RANDR_EDID_FOR_EACH_CEA_DETAILED_BLOCK(edid, edid_length, cea_block_iter, detailed_block_iter) \
-   _ECORE_X_RANDR_EDID_FOR_EACH_CEA_BLOCK(edid, edid_length, cea_block_iter) \
-         for (detailed_block_iter = cea_block_iter + cea_block_iter[2]; detailed_block_iter + 18 < cea_block_iter + 127; detailed_block_iter += 18) \
-            if (detailed_block_iter[0])
+#define _ECORE_X_RANDR_EDID_FOR_EACH_CEA_DETAILED_BLOCK(edid, edid_length, cea_block_iter, detailed_block_iter)                              \
+  _ECORE_X_RANDR_EDID_FOR_EACH_CEA_BLOCK(edid, edid_length, cea_block_iter)                                                                  \
+  for (detailed_block_iter = cea_block_iter + cea_block_iter[2]; detailed_block_iter + 18 < cea_block_iter + 127; detailed_block_iter += 18) \
+    if (detailed_block_iter[0])
 
 #define _ECORE_X_RANDR_EDID_FOR_EACH_DESCRIPTOR_BLOCK(edid, block) \
-   for (block = edid + _ECORE_X_RANDR_EDID_OFFSET_DESCRIPTOR_BLOCK; block <= (edid + _ECORE_X_RANDR_EDID_OFFSET_DESCRIPTOR_BLOCK + (3*18)); block += 18)
+  for (block = edid + _ECORE_X_RANDR_EDID_OFFSET_DESCRIPTOR_BLOCK; block <= (edid + _ECORE_X_RANDR_EDID_OFFSET_DESCRIPTOR_BLOCK + (3 * 18)); block += 18)
 
 #define _ECORE_X_RANDR_EDID_FOR_EACH_NON_PIXEL_DESCRIPTOR_BLOCK(edid, block) \
-   _ECORE_X_RANDR_EDID_FOR_EACH_DESCRIPTOR_BLOCK(edid, block) \
-         if ((block[0] == 0) && (block[1] == 0))
+  _ECORE_X_RANDR_EDID_FOR_EACH_DESCRIPTOR_BLOCK(edid, block)                 \
+  if ((block[0] == 0) && (block[1] == 0))
 
 EAPI Eina_Bool
-ecore_x_randr_edid_has_valid_header(unsigned char *edid, unsigned long edid_length)
+ecore_x_randr_edid_has_valid_header(unsigned char *edid,
+                                    unsigned long  edid_length)
 {
    const unsigned char header[] =
-     { 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00 };
+   { 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00 };
    if (!edid) return EINA_FALSE;
    if (edid_length < 8) return EINA_FALSE;
    if (!memcmp(edid, header, 8)) return EINA_TRUE;
@@ -110,36 +111,40 @@ ecore_x_randr_edid_has_valid_header(unsigned char *edid, unsigned long edid_leng
 }
 
 EAPI int
-ecore_x_randr_edid_version_get(unsigned char *edid, unsigned long edid_length)
+ecore_x_randr_edid_version_get(unsigned char *edid,
+                               unsigned long  edid_length)
 {
    if ((edid_length > _ECORE_X_RANDR_EDID_OFFSET_VERSION_MINOR) &&
        (ecore_x_randr_edid_has_valid_header(edid, edid_length)))
-      return ((edid[_ECORE_X_RANDR_EDID_OFFSET_VERSION_MAJOR] << 8) |
-              edid[_ECORE_X_RANDR_EDID_OFFSET_VERSION_MINOR]);
+     return (edid[_ECORE_X_RANDR_EDID_OFFSET_VERSION_MAJOR] << 8) |
+            edid[_ECORE_X_RANDR_EDID_OFFSET_VERSION_MINOR];
    return ECORE_X_RANDR_EDID_UNKNOWN_VALUE;
 }
 
 EAPI int
-ecore_x_randr_edid_manufacturer_model_get(unsigned char *edid, unsigned long edid_length)
+ecore_x_randr_edid_manufacturer_model_get(unsigned char *edid,
+                                          unsigned long  edid_length)
 {
    if ((edid_length > 0x0b) &&
        (ecore_x_randr_edid_has_valid_header(edid, edid_length)))
-      return (int)(edid[0x0a] + (edid[0x0b] << 8));
+     return (int)(edid[0x0a] + (edid[0x0b] << 8));
    return ECORE_X_RANDR_EDID_UNKNOWN_VALUE;
 }
 
 EAPI int
-ecore_x_randr_edid_manufacturer_serial_number_get(unsigned char *edid, unsigned long edid_length)
+ecore_x_randr_edid_manufacturer_serial_number_get(unsigned char *edid,
+                                                  unsigned long  edid_length)
 {
    if ((edid_length > 0x0f) &&
        (ecore_x_randr_edid_has_valid_header(edid, edid_length)))
-      return (int)(edid[0x0c] + (edid[0x0d] << 8) +
-                   (edid[0x0e] << 16) + (edid[0x0f] << 24));
+     return (int)(edid[0x0c] + (edid[0x0d] << 8) +
+                  (edid[0x0e] << 16) + (edid[0x0f] << 24));
    return ECORE_X_RANDR_EDID_UNKNOWN_VALUE;
 }
 
 EAPI char *
-ecore_x_randr_edid_manufacturer_name_get(unsigned char *edid, unsigned long edid_length)
+ecore_x_randr_edid_manufacturer_name_get(unsigned char *edid,
+                                         unsigned long  edid_length)
 {
    if ((edid_length > (_ECORE_X_RANDR_EDID_OFFSET_MANUFACTURER + 1)) &&
        (ecore_x_randr_edid_has_valid_header(edid, edid_length)))
@@ -160,72 +165,80 @@ ecore_x_randr_edid_manufacturer_name_get(unsigned char *edid, unsigned long edid
 }
 
 EAPI char *
-ecore_x_randr_edid_display_name_get(unsigned char *edid, unsigned long edid_length)
+ecore_x_randr_edid_display_name_get(unsigned char *edid,
+                                    unsigned long  edid_length)
 {
    unsigned char *block = NULL;
    int version = ecore_x_randr_edid_version_get(edid, edid_length);
 
    if (version < ECORE_X_RANDR_EDID_VERSION_13) return NULL;
    _ECORE_X_RANDR_EDID_FOR_EACH_NON_PIXEL_DESCRIPTOR_BLOCK(edid, block)
-     {
-        if (block[_ECORE_X_RANDR_EDID_OFFSET_DESCRIPTOR_BLOCK_TYPE] == 0xfc)
-          {
-             char *name, *p;
-             const char *edid_name;
-
-             edid_name = (const char *)block + _ECORE_X_RANDR_EDID_OFFSET_DESCRIPTOR_BLOCK_CONTENT;
-             name = malloc(sizeof(char) * _ECORE_X_RANDR_EDID_DISPLAY_DESCRIPTOR_BLOCK_CONTENT_LENGTH_MAX);
-             if (!name) return NULL;
-             strncpy(name, edid_name, (_ECORE_X_RANDR_EDID_DISPLAY_DESCRIPTOR_BLOCK_CONTENT_LENGTH_MAX - 1));
-             name[_ECORE_X_RANDR_EDID_DISPLAY_DESCRIPTOR_BLOCK_CONTENT_LENGTH_MAX] = 0;
-             for (p = name; *p; p++)
-               {
-                  if ((*p < ' ') || (*p > '~')) *p = 0;
-               }
-             return name;
-          }
-     }
+   {
+      if (block[_ECORE_X_RANDR_EDID_OFFSET_DESCRIPTOR_BLOCK_TYPE] == 0xfc)
+        {
+           char *name, *p;
+           const char *edid_name;
+
+           edid_name = (const char *)block + _ECORE_X_RANDR_EDID_OFFSET_DESCRIPTOR_BLOCK_CONTENT;
+           name = malloc(sizeof(char) * _ECORE_X_RANDR_EDID_DISPLAY_DESCRIPTOR_BLOCK_CONTENT_LENGTH_MAX);
+           if (!name) return NULL;
+           strncpy(name, edid_name, (_ECORE_X_RANDR_EDID_DISPLAY_DESCRIPTOR_BLOCK_CONTENT_LENGTH_MAX - 1));
+           name[_ECORE_X_RANDR_EDID_DISPLAY_DESCRIPTOR_BLOCK_CONTENT_LENGTH_MAX] = 0;
+           for (p = name; *p; p++)
+             {
+                if ((*p < ' ') || (*p > '~')) *p = 0;
+             }
+           return name;
+        }
+   }
    return NULL;
 }
 
 EAPI Ecore_X_Randr_Edid_Aspect_Ratio
-ecore_x_randr_edid_display_aspect_ratio_preferred_get(unsigned char *edid, unsigned long edid_length)
+ecore_x_randr_edid_display_aspect_ratio_preferred_get(unsigned char *edid,
+                                                      unsigned long  edid_length)
 {
    unsigned char *block = NULL;
    int version = ecore_x_randr_edid_version_get(edid, edid_length);
 
    if (version < ECORE_X_RANDR_EDID_VERSION_13) return ECORE_X_RANDR_EDID_UNKNOWN_VALUE;
    _ECORE_X_RANDR_EDID_FOR_EACH_NON_PIXEL_DESCRIPTOR_BLOCK(edid, block)
-     {
-        if ((block[_ECORE_X_RANDR_EDID_OFFSET_DESCRIPTOR_BLOCK_TYPE] == 0xfd) &&
-            (block[10] == 0x04))
-          {
-             Ecore_X_Randr_Edid_Aspect_Ratio_Preferred preferred_ratio =
-                (Ecore_X_Randr_Edid_Aspect_Ratio_Preferred)
-                ((block[_ECORE_X_RANDR_EDID_OFFSET_ASPECT_RATIO_PREFERRED] &
-                  _ECORE_X_RANDR_EDID_MASK_ASPECT_RATIO_PREFERRED) >> 5);
-             switch (preferred_ratio)
-               {
-                case ECORE_X_RANDR_EDID_ASPECT_RATIO_PREFERRED_4_3:
-                  return ECORE_X_RANDR_EDID_ASPECT_RATIO_4_3;
-                case ECORE_X_RANDR_EDID_ASPECT_RATIO_PREFERRED_16_9:
-                  return ECORE_X_RANDR_EDID_ASPECT_RATIO_16_9;
-                case ECORE_X_RANDR_EDID_ASPECT_RATIO_PREFERRED_16_10:
-                  return ECORE_X_RANDR_EDID_ASPECT_RATIO_16_10;
-                case ECORE_X_RANDR_EDID_ASPECT_RATIO_PREFERRED_5_4:
-                  return ECORE_X_RANDR_EDID_ASPECT_RATIO_5_4;
-                case ECORE_X_RANDR_EDID_ASPECT_RATIO_PREFERRED_15_9:
-                  return ECORE_X_RANDR_EDID_ASPECT_RATIO_15_9;
-                default:
-                  return ECORE_X_RANDR_EDID_UNKNOWN_VALUE;
-               }
-          }
-     }
+   {
+      if ((block[_ECORE_X_RANDR_EDID_OFFSET_DESCRIPTOR_BLOCK_TYPE] == 0xfd) &&
+          (block[10] == 0x04))
+        {
+           Ecore_X_Randr_Edid_Aspect_Ratio_Preferred preferred_ratio =
+             (Ecore_X_Randr_Edid_Aspect_Ratio_Preferred)
+             ((block[_ECORE_X_RANDR_EDID_OFFSET_ASPECT_RATIO_PREFERRED] &
+               _ECORE_X_RANDR_EDID_MASK_ASPECT_RATIO_PREFERRED) >> 5);
+           switch (preferred_ratio)
+             {
+              case ECORE_X_RANDR_EDID_ASPECT_RATIO_PREFERRED_4_3:
+                return ECORE_X_RANDR_EDID_ASPECT_RATIO_4_3;
+
+              case ECORE_X_RANDR_EDID_ASPECT_RATIO_PREFERRED_16_9:
+                return ECORE_X_RANDR_EDID_ASPECT_RATIO_16_9;
+
+              case ECORE_X_RANDR_EDID_ASPECT_RATIO_PREFERRED_16_10:
+                return ECORE_X_RANDR_EDID_ASPECT_RATIO_16_10;
+
+              case ECORE_X_RANDR_EDID_ASPECT_RATIO_PREFERRED_5_4:
+                return ECORE_X_RANDR_EDID_ASPECT_RATIO_5_4;
+
+              case ECORE_X_RANDR_EDID_ASPECT_RATIO_PREFERRED_15_9:
+                return ECORE_X_RANDR_EDID_ASPECT_RATIO_15_9;
+
+              default:
+                return ECORE_X_RANDR_EDID_UNKNOWN_VALUE;
+             }
+        }
+   }
    return ECORE_X_RANDR_EDID_UNKNOWN_VALUE;
 }
 
 EAPI Ecore_X_Randr_Edid_Aspect_Ratio
-ecore_x_randr_edid_display_aspect_ratios_get(unsigned char *edid, unsigned long edid_length)
+ecore_x_randr_edid_display_aspect_ratios_get(unsigned char *edid,
+                                             unsigned long  edid_length)
 {
    Ecore_X_Randr_Edid_Aspect_Ratio ret = ECORE_X_RANDR_EDID_UNKNOWN_VALUE;
    unsigned char *block = NULL;
@@ -233,91 +246,94 @@ ecore_x_randr_edid_display_aspect_ratios_get(unsigned char *edid, unsigned long
 
    if (version < ECORE_X_RANDR_EDID_VERSION_13) return ECORE_X_RANDR_EDID_UNKNOWN_VALUE;
    _ECORE_X_RANDR_EDID_FOR_EACH_NON_PIXEL_DESCRIPTOR_BLOCK(edid, block)
-     {
-        if ((block[_ECORE_X_RANDR_EDID_OFFSET_DESCRIPTOR_BLOCK_TYPE] == 0xfd) &&
-            (block[10] == 0x04))
-          {
-             if (block[_ECORE_X_RANDR_EDID_OFFSET_ASPECT_RATIO] & _ECORE_X_RANDR_EDID_MASK_ASPECT_RATIO_4_3)
-                ret |= ECORE_X_RANDR_EDID_ASPECT_RATIO_4_3;
-             if (block[_ECORE_X_RANDR_EDID_OFFSET_ASPECT_RATIO] & _ECORE_X_RANDR_EDID_MASK_ASPECT_RATIO_16_9)
-                ret |= ECORE_X_RANDR_EDID_ASPECT_RATIO_16_9;
-             if (block[_ECORE_X_RANDR_EDID_OFFSET_ASPECT_RATIO] & _ECORE_X_RANDR_EDID_MASK_ASPECT_RATIO_16_10)
-                ret |= ECORE_X_RANDR_EDID_ASPECT_RATIO_16_10;
-             if (block[_ECORE_X_RANDR_EDID_OFFSET_ASPECT_RATIO] & _ECORE_X_RANDR_EDID_MASK_ASPECT_RATIO_5_4)
-                ret |= ECORE_X_RANDR_EDID_ASPECT_RATIO_5_4;
-             if (block[_ECORE_X_RANDR_EDID_OFFSET_ASPECT_RATIO] & _ECORE_X_RANDR_EDID_MASK_ASPECT_RATIO_15_9)
-                ret |= ECORE_X_RANDR_EDID_ASPECT_RATIO_15_9;
-          }
-     }
+   {
+      if ((block[_ECORE_X_RANDR_EDID_OFFSET_DESCRIPTOR_BLOCK_TYPE] == 0xfd) &&
+          (block[10] == 0x04))
+        {
+           if (block[_ECORE_X_RANDR_EDID_OFFSET_ASPECT_RATIO] & _ECORE_X_RANDR_EDID_MASK_ASPECT_RATIO_4_3)
+             ret |= ECORE_X_RANDR_EDID_ASPECT_RATIO_4_3;
+           if (block[_ECORE_X_RANDR_EDID_OFFSET_ASPECT_RATIO] & _ECORE_X_RANDR_EDID_MASK_ASPECT_RATIO_16_9)
+             ret |= ECORE_X_RANDR_EDID_ASPECT_RATIO_16_9;
+           if (block[_ECORE_X_RANDR_EDID_OFFSET_ASPECT_RATIO] & _ECORE_X_RANDR_EDID_MASK_ASPECT_RATIO_16_10)
+             ret |= ECORE_X_RANDR_EDID_ASPECT_RATIO_16_10;
+           if (block[_ECORE_X_RANDR_EDID_OFFSET_ASPECT_RATIO] & _ECORE_X_RANDR_EDID_MASK_ASPECT_RATIO_5_4)
+             ret |= ECORE_X_RANDR_EDID_ASPECT_RATIO_5_4;
+           if (block[_ECORE_X_RANDR_EDID_OFFSET_ASPECT_RATIO] & _ECORE_X_RANDR_EDID_MASK_ASPECT_RATIO_15_9)
+             ret |= ECORE_X_RANDR_EDID_ASPECT_RATIO_15_9;
+        }
+   }
    return ret;
 }
 
 EAPI char *
-ecore_x_randr_edid_display_ascii_get(unsigned char *edid, unsigned long edid_length)
+ecore_x_randr_edid_display_ascii_get(unsigned char *edid,
+                                     unsigned long  edid_length)
 {
    unsigned char *block = NULL;
    int version = ecore_x_randr_edid_version_get(edid, edid_length);
 
    if (version < ECORE_X_RANDR_EDID_VERSION_13) return NULL;
    _ECORE_X_RANDR_EDID_FOR_EACH_NON_PIXEL_DESCRIPTOR_BLOCK(edid, block)
-     {
-        if (block[_ECORE_X_RANDR_EDID_OFFSET_DESCRIPTOR_BLOCK_TYPE] == 0xfe)
-          {
-             char *ascii, *p;
-             const char *edid_ascii = (const char*)block +
-                _ECORE_X_RANDR_EDID_OFFSET_DESCRIPTOR_BLOCK_CONTENT;
-             /*
-              * TODO: Two of these in a row, in the third and fourth slots,
-              * seems to be specified by SPWG: http://www.spwg.org/
-              */
-             ascii = malloc(sizeof(char) * _ECORE_X_RANDR_EDID_DISPLAY_DESCRIPTOR_BLOCK_CONTENT_LENGTH_MAX);
-             if (!ascii) return NULL;
-             strncpy(ascii, edid_ascii, (_ECORE_X_RANDR_EDID_DISPLAY_DESCRIPTOR_BLOCK_CONTENT_LENGTH_MAX - 1));
-             ascii[_ECORE_X_RANDR_EDID_DISPLAY_DESCRIPTOR_BLOCK_CONTENT_LENGTH_MAX] = 0;
-             for (p = ascii; *p; p++)
-               {
-                  if ((*p < ' ') || (*p > '~')) *p = 0;
-               }
-             return ascii;
-          }
-     }
+   {
+      if (block[_ECORE_X_RANDR_EDID_OFFSET_DESCRIPTOR_BLOCK_TYPE] == 0xfe)
+        {
+           char *ascii, *p;
+           const char *edid_ascii = (const char *)block +
+             _ECORE_X_RANDR_EDID_OFFSET_DESCRIPTOR_BLOCK_CONTENT;
+           /*
+            * TODO: Two of these in a row, in the third and fourth slots,
+            * seems to be specified by SPWG: http://www.spwg.org/
+            */
+           ascii = malloc(sizeof(char) * _ECORE_X_RANDR_EDID_DISPLAY_DESCRIPTOR_BLOCK_CONTENT_LENGTH_MAX);
+           if (!ascii) return NULL;
+           strncpy(ascii, edid_ascii, (_ECORE_X_RANDR_EDID_DISPLAY_DESCRIPTOR_BLOCK_CONTENT_LENGTH_MAX - 1));
+           ascii[_ECORE_X_RANDR_EDID_DISPLAY_DESCRIPTOR_BLOCK_CONTENT_LENGTH_MAX] = 0;
+           for (p = ascii; *p; p++)
+             {
+                if ((*p < ' ') || (*p > '~')) *p = 0;
+             }
+           return ascii;
+        }
+   }
    return NULL;
 }
 
 EAPI char *
-ecore_x_randr_edid_display_serial_get(unsigned char *edid, unsigned long edid_length)
+ecore_x_randr_edid_display_serial_get(unsigned char *edid,
+                                      unsigned long  edid_length)
 {
    unsigned char *block = NULL;
    int version = ecore_x_randr_edid_version_get(edid, edid_length);
 
    if (version < ECORE_X_RANDR_EDID_VERSION_13) return NULL;
    _ECORE_X_RANDR_EDID_FOR_EACH_NON_PIXEL_DESCRIPTOR_BLOCK(edid, block)
-     {
-        if (block[_ECORE_X_RANDR_EDID_OFFSET_DESCRIPTOR_BLOCK_TYPE] == 0xff)
-          {
-             char *serial, *p;
-             const char *edid_serial = (const char*)block +
-                _ECORE_X_RANDR_EDID_OFFSET_DESCRIPTOR_BLOCK_CONTENT;
-             /*
-              * TODO: Two of these in a row, in the third and fourth slots,
-              * seems to be specified by SPWG: http://www.spwg.org/
-              */
-             serial = malloc(sizeof(char) * _ECORE_X_RANDR_EDID_DISPLAY_DESCRIPTOR_BLOCK_CONTENT_LENGTH_MAX);
-             if (!serial) return NULL;
-             strncpy(serial, edid_serial, (_ECORE_X_RANDR_EDID_DISPLAY_DESCRIPTOR_BLOCK_CONTENT_LENGTH_MAX - 1));
-             serial[_ECORE_X_RANDR_EDID_DISPLAY_DESCRIPTOR_BLOCK_CONTENT_LENGTH_MAX] = 0;
-             for (p = serial; *p; p++)
-               {
-                  if ((*p < ' ') || (*p > '~')) *p = 0;
-               }
-             return serial;
-          }
-     }
+   {
+      if (block[_ECORE_X_RANDR_EDID_OFFSET_DESCRIPTOR_BLOCK_TYPE] == 0xff)
+        {
+           char *serial, *p;
+           const char *edid_serial = (const char *)block +
+             _ECORE_X_RANDR_EDID_OFFSET_DESCRIPTOR_BLOCK_CONTENT;
+           /*
+            * TODO: Two of these in a row, in the third and fourth slots,
+            * seems to be specified by SPWG: http://www.spwg.org/
+            */
+           serial = malloc(sizeof(char) * _ECORE_X_RANDR_EDID_DISPLAY_DESCRIPTOR_BLOCK_CONTENT_LENGTH_MAX);
+           if (!serial) return NULL;
+           strncpy(serial, edid_serial, (_ECORE_X_RANDR_EDID_DISPLAY_DESCRIPTOR_BLOCK_CONTENT_LENGTH_MAX - 1));
+           serial[_ECORE_X_RANDR_EDID_DISPLAY_DESCRIPTOR_BLOCK_CONTENT_LENGTH_MAX] = 0;
+           for (p = serial; *p; p++)
+             {
+                if ((*p < ' ') || (*p > '~')) *p = 0;
+             }
+           return serial;
+        }
+   }
    return NULL;
 }
 
 EAPI Eina_Bool
-ecore_x_randr_edid_info_has_valid_checksum(unsigned char *edid, unsigned long edid_length)
+ecore_x_randr_edid_info_has_valid_checksum(unsigned char *edid,
+                                           unsigned long  edid_length)
 {
    unsigned char *cea_block_iter = NULL;
    char sum = 0;
@@ -333,71 +349,77 @@ ecore_x_randr_edid_info_has_valid_checksum(unsigned char *edid, unsigned long ed
 
    /* Check the cea extension blocks */
    _ECORE_X_RANDR_EDID_FOR_EACH_CEA_BLOCK(edid, edid_length, cea_block_iter)
-     {
-        for (i = 0, sum = 0; i < 128; i++) sum += cea_block_iter[i];
-     }
+   {
+      for (i = 0, sum = 0; i < 128; i++) sum += cea_block_iter[i];
+   }
    if (sum) return EINA_FALSE;
    return EINA_TRUE;
 }
 
 EAPI Eina_Bool
-ecore_x_randr_edid_dpms_available_get(unsigned char *edid, unsigned long edid_length)
+ecore_x_randr_edid_dpms_available_get(unsigned char *edid,
+                                      unsigned long  edid_length)
 {
    int version = ecore_x_randr_edid_version_get(edid, edid_length);
 
    if (version < ECORE_X_RANDR_EDID_VERSION_13) return EINA_FALSE;
-   return (!!(edid[_ECORE_X_RANDR_EDID_OFFSET_DPMS] &
-              _ECORE_X_RANDR_EDID_MASK_DPMS));
+   return !!(edid[_ECORE_X_RANDR_EDID_OFFSET_DPMS] &
+             _ECORE_X_RANDR_EDID_MASK_DPMS);
 }
 
 EAPI Eina_Bool
-ecore_x_randr_edid_dpms_standby_available_get(unsigned char *edid, unsigned long edid_length)
+ecore_x_randr_edid_dpms_standby_available_get(unsigned char *edid,
+                                              unsigned long  edid_length)
 {
    int version = ecore_x_randr_edid_version_get(edid, edid_length);
 
    if (version < ECORE_X_RANDR_EDID_VERSION_13) return EINA_FALSE;
    if (edid[_ECORE_X_RANDR_EDID_OFFSET_DPMS] & _ECORE_X_RANDR_EDID_MASK_DPMS)
-      return (!!(edid[_ECORE_X_RANDR_EDID_OFFSET_DPMS] &
-                 _ECORE_X_RANDR_EDID_MASK_DPMS_STANDBY));
+     return !!(edid[_ECORE_X_RANDR_EDID_OFFSET_DPMS] &
+               _ECORE_X_RANDR_EDID_MASK_DPMS_STANDBY);
    return EINA_FALSE;
 }
 
 EAPI Eina_Bool
-ecore_x_randr_edid_dpms_suspend_available_get(unsigned char *edid, unsigned long edid_length)
+ecore_x_randr_edid_dpms_suspend_available_get(unsigned char *edid,
+                                              unsigned long  edid_length)
 {
    int version = ecore_x_randr_edid_version_get(edid, edid_length);
 
    if (version < ECORE_X_RANDR_EDID_VERSION_13) return EINA_FALSE;
    if (edid[_ECORE_X_RANDR_EDID_OFFSET_DPMS] & _ECORE_X_RANDR_EDID_MASK_DPMS)
-      return (!!(edid[_ECORE_X_RANDR_EDID_OFFSET_DPMS] &
-                 _ECORE_X_RANDR_EDID_MASK_DPMS_SUSPEND));
+     return !!(edid[_ECORE_X_RANDR_EDID_OFFSET_DPMS] &
+               _ECORE_X_RANDR_EDID_MASK_DPMS_SUSPEND);
    return EINA_FALSE;
 }
 
 EAPI Eina_Bool
-ecore_x_randr_edid_dpms_off_available_get(unsigned char *edid, unsigned long edid_length)
+ecore_x_randr_edid_dpms_off_available_get(unsigned char *edid,
+                                          unsigned long  edid_length)
 {
    int version = ecore_x_randr_edid_version_get(edid, edid_length);
 
    if (version < ECORE_X_RANDR_EDID_VERSION_13) return EINA_FALSE;
    if (edid[_ECORE_X_RANDR_EDID_OFFSET_DPMS] & _ECORE_X_RANDR_EDID_MASK_DPMS)
-      return (!!(edid[_ECORE_X_RANDR_EDID_OFFSET_DPMS] &
-                 _ECORE_X_RANDR_EDID_MASK_DPMS_OFF));
+     return !!(edid[_ECORE_X_RANDR_EDID_OFFSET_DPMS] &
+               _ECORE_X_RANDR_EDID_MASK_DPMS_OFF);
    return EINA_FALSE;
 }
 
 EAPI Eina_Bool
-ecore_x_randr_edid_display_type_digital_get(unsigned char *edid, unsigned long edid_length)
+ecore_x_randr_edid_display_type_digital_get(unsigned char *edid,
+                                            unsigned long  edid_length)
 {
    int version = ecore_x_randr_edid_version_get(edid, edid_length);
 
    if (version < ECORE_X_RANDR_EDID_VERSION_13) return EINA_FALSE;
-   return (!!(edid[_ECORE_X_RANDR_EDID_OFFSET_TYPE] &
-              _ECORE_X_RANDR_EDID_MASK_DIGITAL));
+   return !!(edid[_ECORE_X_RANDR_EDID_OFFSET_TYPE] &
+             _ECORE_X_RANDR_EDID_MASK_DIGITAL);
 }
 
 EAPI Ecore_X_Randr_Edid_Display_Colorscheme
-ecore_x_randr_edid_display_colorscheme_get(unsigned char *edid, unsigned long edid_length)
+ecore_x_randr_edid_display_colorscheme_get(unsigned char *edid,
+                                           unsigned long  edid_length)
 {
    Ecore_X_Randr_Edid_Display_Colorscheme colorscheme = ECORE_X_RANDR_EDID_UNKNOWN_VALUE;
    int version = ecore_x_randr_edid_version_get(edid, edid_length);
@@ -408,26 +430,28 @@ ecore_x_randr_edid_display_colorscheme_get(unsigned char *edid, unsigned long ed
         colorscheme = ECORE_X_RANDR_EDID_DISPLAY_COLORSCHEME_COLOR_RGB_4_4_4;
         if (edid[_ECORE_X_RANDR_EDID_OFFSET_COLORSPACE] &
             _ECORE_X_RANDR_EDID_MASK_COLORSCHEME_DIGITAL_YCRCB_444)
-           colorscheme |= ECORE_X_RANDR_EDID_DISPLAY_COLORSCHEME_COLOR_RGB_YCRCB_4_4_4;
+          colorscheme |= ECORE_X_RANDR_EDID_DISPLAY_COLORSCHEME_COLOR_RGB_YCRCB_4_4_4;
         if (edid[_ECORE_X_RANDR_EDID_OFFSET_COLORSPACE] &
             _ECORE_X_RANDR_EDID_MASK_COLORSCHEME_DIGITAL_YCRCB_422)
-           colorscheme |= ECORE_X_RANDR_EDID_DISPLAY_COLORSCHEME_COLOR_RGB_YCRCB_4_2_2;
+          colorscheme |= ECORE_X_RANDR_EDID_DISPLAY_COLORSCHEME_COLOR_RGB_YCRCB_4_2_2;
      }
    else
-      colorscheme = edid[_ECORE_X_RANDR_EDID_OFFSET_COLORSPACE] & _ECORE_X_RANDR_EDID_MASK_COLORSCHEME_ANALOGOUS;
+     colorscheme = edid[_ECORE_X_RANDR_EDID_OFFSET_COLORSPACE] & _ECORE_X_RANDR_EDID_MASK_COLORSCHEME_ANALOGOUS;
    return colorscheme;
 }
 
 EAPI Ecore_X_Randr_Edid_Display_Interface_Type
-ecore_x_randr_edid_display_interface_type_get(unsigned char *edid, unsigned long edid_length)
+ecore_x_randr_edid_display_interface_type_get(unsigned char *edid,
+                                              unsigned long  edid_length)
 {
    Ecore_X_Randr_Edid_Display_Interface_Type type = ECORE_X_RANDR_EDID_UNKNOWN_VALUE;
    int version = ecore_x_randr_edid_version_get(edid, edid_length);
 
    if (version < ECORE_X_RANDR_EDID_VERSION_13) return type;
    type = edid[_ECORE_X_RANDR_EDID_OFFSET_TYPE] &
-      _ECORE_X_RANDR_EDID_MASK_INTERFACE_TYPE;
+     _ECORE_X_RANDR_EDID_MASK_INTERFACE_TYPE;
    if (type > ECORE_X_RANDR_EDID_DISPLAY_INTERFACE_DISPLAY_PORT)
-      type = ECORE_X_RANDR_EDID_UNKNOWN_VALUE;
+     type = ECORE_X_RANDR_EDID_UNKNOWN_VALUE;
    return type;
 }
+
index 6564b26..ab242f7 100644 (file)
@@ -9,18 +9,18 @@
 #include "ecore_x_private.h"
 #include "ecore_x_randr.h"
 
-#define Ecore_X_Randr_None   0
+#define Ecore_X_Randr_None  0
 #define Ecore_X_Randr_Unset -1
 
 #ifdef ECORE_XRANDR
 
-#define RANDR_1_3 ((1 << 16) | 3)
+#define RANDR_1_3           ((1 << 16) | 3)
 #define RANDR_CHECK_1_3_RET(ret) if(_randr_version < RANDR_1_3) return ret
 
-extern XRRScreenResources * (*_ecore_x_randr_get_screen_resources)(Display *
-                                                                   dpy,
-                                                                   Window
-                                                                   window);
+extern XRRScreenResources *(*_ecore_x_randr_get_screen_resources)(Display *
+                                                                  dpy,
+                                                                  Window
+                                                                  window);
 extern int _randr_version;
 #endif
 
@@ -34,7 +34,7 @@ ecore_x_randr_primary_output_get(Ecore_X_Window root)
 #ifdef ECORE_XRANDR
    RANDR_CHECK_1_3_RET(Ecore_X_Randr_None);
    if (!_ecore_x_randr_root_validate(root))
-      return Ecore_X_Randr_None;
+     return Ecore_X_Randr_None;
 
    return XRRGetOutputPrimary(_ecore_x_disp, root);
 #else
@@ -47,7 +47,7 @@ ecore_x_randr_primary_output_get(Ecore_X_Window root)
  * @param output that should be set as given root window's screen primary output
  */
 EAPI void
-ecore_x_randr_primary_output_set(Ecore_X_Window root,
+ecore_x_randr_primary_output_set(Ecore_X_Window       root,
                                  Ecore_X_Randr_Output output)
 {
 #ifdef ECORE_XRANDR
@@ -60,3 +60,4 @@ ecore_x_randr_primary_output_set(Ecore_X_Window root,
 
 #endif
 }
+
index f70e2bf..7cc66e3 100644 (file)
@@ -39,24 +39,27 @@ ecore_x_xregion_free(Ecore_X_XRegion *region)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    if (!region)
-      return;
+     return;
 
    XDestroyRegion((Region)region);
 } /* ecore_x_xregion_free */
 
 EAPI Eina_Bool
-ecore_x_xregion_set(Ecore_X_XRegion *region, Ecore_X_GC gc)
+ecore_x_xregion_set(Ecore_X_XRegion *region,
+                    Ecore_X_GC       gc)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    return XSetRegion(_ecore_x_disp, gc, (Region)region) ? EINA_TRUE : EINA_FALSE;
 } /* ecore_x_xregion_set */
 
 EAPI void
-ecore_x_xregion_translate(Ecore_X_XRegion *region, int x, int y)
+ecore_x_xregion_translate(Ecore_X_XRegion *region,
+                          int              x,
+                          int              y)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    if (!region)
-      return;
+     return;
 
    /* return value not used */
    XOffsetRegion((Region)region, x, y);
@@ -109,37 +112,41 @@ EAPI Eina_Bool
 ecore_x_xregion_is_empty(Ecore_X_XRegion *region)
 {
    if (!region)
-      return EINA_TRUE;
+     return EINA_TRUE;
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    return XEmptyRegion((Region)region) ? EINA_TRUE : EINA_FALSE;
 } /* ecore_x_xregion_is_empty */
 
 EAPI Eina_Bool
-ecore_x_xregion_is_equal(Ecore_X_XRegion *r1, Ecore_X_XRegion *r2)
+ecore_x_xregion_is_equal(Ecore_X_XRegion *r1,
+                         Ecore_X_XRegion *r2)
 {
    if (!r1 || !r2)
-      return EINA_FALSE;
+     return EINA_FALSE;
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    return XEqualRegion((Region)r1, (Region)r1) ? EINA_TRUE : EINA_FALSE;
 } /* ecore_x_xregion_is_equal */
 
 EAPI Eina_Bool
-ecore_x_xregion_point_contain(Ecore_X_XRegion *region, int x, int y)
+ecore_x_xregion_point_contain(Ecore_X_XRegion *region,
+                              int              x,
+                              int              y)
 {
    if (!region)
-      return EINA_FALSE;
+     return EINA_FALSE;
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    return XPointInRegion((Region)region, x, y) ? EINA_TRUE : EINA_FALSE;
 } /* ecore_x_xregion_point_contain */
 
 EAPI Eina_Bool
-ecore_x_xregion_rect_contain(Ecore_X_XRegion *region, Ecore_X_Rectangle *rect)
+ecore_x_xregion_rect_contain(Ecore_X_XRegion   *region,
+                             Ecore_X_Rectangle *rect)
 {
    if (!region || !rect)
-      return EINA_FALSE;
+     return EINA_FALSE;
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    return XRectInRegion((Region)region,
index d33b948..a3bca67 100644 (file)
@@ -17,7 +17,7 @@ EAPI Eina_Bool
 ecore_x_screensaver_event_available_get(void)
 {
    if (_screensaver_available >= 0)
-      return _screensaver_available;
+     return _screensaver_available;
 
 #ifdef ECORE_XSS
    int _screensaver_major, _screensaver_minor;
@@ -28,9 +28,9 @@ ecore_x_screensaver_event_available_get(void)
 
    if (XScreenSaverQueryVersion(_ecore_x_disp, &_screensaver_major,
                                 &_screensaver_minor))
-      _screensaver_available = 1;
+     _screensaver_available = 1;
    else
-      _screensaver_available = 0;
+     _screensaver_available = 0;
 
 #else /* ifdef ECORE_XSS */
    _screensaver_available = 0;
@@ -49,7 +49,7 @@ ecore_x_screensaver_idle_time_get(void)
    xss = XScreenSaverAllocInfo();
    XScreenSaverQueryInfo(_ecore_x_disp,
                          RootWindow(_ecore_x_disp, DefaultScreen(
-                                       _ecore_x_disp)), xss);
+                                      _ecore_x_disp)), xss);
    idle = xss->idle / 1000;
    XFree(xss);
 
@@ -162,9 +162,9 @@ ecore_x_screensaver_event_listen_set(Eina_Bool on)
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    root = DefaultRootWindow(_ecore_x_disp);
    if (on)
-      XScreenSaverSelectInput(_ecore_x_disp, root, ScreenSaverNotifyMask);
+     XScreenSaverSelectInput(_ecore_x_disp, root, ScreenSaverNotifyMask);
    else
-      XScreenSaverSelectInput(_ecore_x_disp, root, 0);
+     XScreenSaverSelectInput(_ecore_x_disp, root, 0);
 #else
    return;
    on = EINA_FALSE;
index c484f3e..b1aa611 100644 (file)
@@ -16,28 +16,28 @@ static Ecore_X_Selection_Converter *converters = NULL;
 static Ecore_X_Selection_Parser *parsers = NULL;
 
 static Eina_Bool _ecore_x_selection_converter_text(char         *target,
-                                                  void         *data,
-                                                  int           size,
-                                                  void        **data_ret,
-                                                  int          *size_ret,
-                                                  Ecore_X_Atom *tprop,
-                                                  int *);
-static int       _ecore_x_selection_data_default_free(void *data);
-static void *    _ecore_x_selection_parser_files(const char *target,
-                                                 void       *data,
-                                                 int         size,
-                                                 int         format);
-static int       _ecore_x_selection_data_files_free(void *data);
-static void *    _ecore_x_selection_parser_text(const char *target,
-                                                void       *data,
-                                                int         size,
-                                                int         format);
-static int       _ecore_x_selection_data_text_free(void *data);
-static void *    _ecore_x_selection_parser_targets(const char *target,
-                                                   void       *data,
-                                                   int         size,
-                                                   int         format);
-static int       _ecore_x_selection_data_targets_free(void *data);
+                                                   void         *data,
+                                                   int           size,
+                                                   void        **data_ret,
+                                                   int          *size_ret,
+                                                   Ecore_X_Atom *tprop,
+                                                   int *);
+static int   _ecore_x_selection_data_default_free(void *data);
+static void *_ecore_x_selection_parser_files(const char *target,
+                                             void       *data,
+                                             int         size,
+                                             int         format);
+static int   _ecore_x_selection_data_files_free(void *data);
+static void *_ecore_x_selection_parser_text(const char *target,
+                                            void       *data,
+                                            int         size,
+                                            int         format);
+static int   _ecore_x_selection_data_text_free(void *data);
+static void *_ecore_x_selection_parser_targets(const char *target,
+                                               void       *data,
+                                               int         size,
+                                               int         format);
+static int _ecore_x_selection_data_targets_free(void *data);
 
 #define ECORE_X_SELECTION_DATA(x) ((Ecore_X_Selection_Data *)(x))
 
@@ -45,31 +45,31 @@ void
 _ecore_x_selection_data_init(void)
 {
    /* Initialize global data */
-   memset(selections, 0, sizeof(selections));
+    memset(selections, 0, sizeof(selections));
 
-   /* Initialize converters */
-   ecore_x_selection_converter_atom_add(ECORE_X_ATOM_TEXT,
-                                        _ecore_x_selection_converter_text);
+    /* Initialize converters */
+    ecore_x_selection_converter_atom_add(ECORE_X_ATOM_TEXT,
+                                         _ecore_x_selection_converter_text);
 #ifdef X_HAVE_UTF8_STRING
-   ecore_x_selection_converter_atom_add(ECORE_X_ATOM_UTF8_STRING,
-                                        _ecore_x_selection_converter_text);
+    ecore_x_selection_converter_atom_add(ECORE_X_ATOM_UTF8_STRING,
+                                         _ecore_x_selection_converter_text);
 #endif /* ifdef X_HAVE_UTF8_STRING */
-   ecore_x_selection_converter_atom_add(ECORE_X_ATOM_COMPOUND_TEXT,
-                                        _ecore_x_selection_converter_text);
-   ecore_x_selection_converter_atom_add(ECORE_X_ATOM_STRING,
-                                        _ecore_x_selection_converter_text);
-
-   /* Initialize parsers */
-   ecore_x_selection_parser_add("text/plain",
-                                _ecore_x_selection_parser_text);
-   ecore_x_selection_parser_add(ECORE_X_SELECTION_TARGET_UTF8_STRING,
-                                _ecore_x_selection_parser_text);
-   ecore_x_selection_parser_add("text/uri-list",
-                                _ecore_x_selection_parser_files);
-   ecore_x_selection_parser_add("_NETSCAPE_URL",
-                                _ecore_x_selection_parser_files);
-   ecore_x_selection_parser_add(ECORE_X_SELECTION_TARGET_TARGETS,
-                                _ecore_x_selection_parser_targets);
+    ecore_x_selection_converter_atom_add(ECORE_X_ATOM_COMPOUND_TEXT,
+                                         _ecore_x_selection_converter_text);
+    ecore_x_selection_converter_atom_add(ECORE_X_ATOM_STRING,
+                                         _ecore_x_selection_converter_text);
+
+    /* Initialize parsers */
+    ecore_x_selection_parser_add("text/plain",
+                                 _ecore_x_selection_parser_text);
+    ecore_x_selection_parser_add(ECORE_X_SELECTION_TARGET_UTF8_STRING,
+                                 _ecore_x_selection_parser_text);
+    ecore_x_selection_parser_add("text/uri-list",
+                                 _ecore_x_selection_parser_files);
+    ecore_x_selection_parser_add("_NETSCAPE_URL",
+                                 _ecore_x_selection_parser_files);
+    ecore_x_selection_parser_add(ECORE_X_SELECTION_TARGET_TARGETS,
+                                 _ecore_x_selection_parser_targets);
 } /* _ecore_x_selection_data_init */
 
 void
@@ -108,15 +108,15 @@ Ecore_X_Selection_Intern *
 _ecore_x_selection_get(Ecore_X_Atom selection)
 {
    if (selection == ECORE_X_ATOM_SELECTION_PRIMARY)
-      return &selections[0];
+     return &selections[0];
    else if (selection == ECORE_X_ATOM_SELECTION_SECONDARY)
-      return &selections[1];
+     return &selections[1];
    else if (selection == ECORE_X_ATOM_SELECTION_XDND)
-      return &selections[2];
+     return &selections[2];
    else if (selection == ECORE_X_ATOM_SELECTION_CLIPBOARD)
-      return &selections[3];
+     return &selections[3];
    else
-      return NULL;
+     return NULL;
 } /* _ecore_x_selection_get */
 
 Eina_Bool
@@ -130,18 +130,18 @@ _ecore_x_selection_set(Window       w,
 
    XSetSelectionOwner(_ecore_x_disp, selection, w, _ecore_x_event_last_time);
    if (XGetSelectionOwner(_ecore_x_disp, selection) != w)
-      return EINA_FALSE;
+     return EINA_FALSE;
 
    if (selection == ECORE_X_ATOM_SELECTION_PRIMARY)
-      in = 0;
+     in = 0;
    else if (selection == ECORE_X_ATOM_SELECTION_SECONDARY)
-      in = 1;
+     in = 1;
    else if (selection == ECORE_X_ATOM_SELECTION_XDND)
-      in = 2;
+     in = 2;
    else if (selection == ECORE_X_ATOM_SELECTION_CLIPBOARD)
-      in = 3;
+     in = 3;
    else
-      return EINA_FALSE;
+     return EINA_FALSE;
 
    if (data)
      {
@@ -173,7 +173,9 @@ _ecore_x_selection_set(Window       w,
  *             claimed, or 0 if unsuccessful.
  */
 EAPI Eina_Bool
-ecore_x_selection_primary_set(Ecore_X_Window w, const void *data, int size)
+ecore_x_selection_primary_set(Ecore_X_Window w,
+                              const void    *data,
+                              int            size)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    return _ecore_x_selection_set(w, data, size, ECORE_X_ATOM_SELECTION_PRIMARY);
@@ -201,7 +203,9 @@ ecore_x_selection_primary_clear(void)
  *             claimed, or 0 if unsuccessful.
  */
 EAPI Eina_Bool
-ecore_x_selection_secondary_set(Ecore_X_Window w, const void *data, int size)
+ecore_x_selection_secondary_set(Ecore_X_Window w,
+                                const void    *data,
+                                int            size)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    return _ecore_x_selection_set(w,
@@ -235,7 +239,9 @@ ecore_x_selection_secondary_clear(void)
  *             claimed, or 0 if unsuccessful.
  */
 EAPI Eina_Bool
-ecore_x_selection_xdnd_set(Ecore_X_Window w, const void *data, int size)
+ecore_x_selection_xdnd_set(Ecore_X_Window w,
+                           const void    *data,
+                           int            size)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    return _ecore_x_selection_set(w, data, size, ECORE_X_ATOM_SELECTION_XDND);
@@ -266,7 +272,9 @@ ecore_x_selection_xdnd_clear(void)
  * request. The buffer must be freed when done with.
  */
 EAPI Eina_Bool
-ecore_x_selection_clipboard_set(Ecore_X_Window w, const void *data, int size)
+ecore_x_selection_clipboard_set(Ecore_X_Window w,
+                                const void    *data,
+                                int            size)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    return _ecore_x_selection_set(w,
@@ -297,17 +305,17 @@ _ecore_x_selection_target_atom_get(const char *target)
    Ecore_X_Atom x_target;
 
    if (!strcmp(target, ECORE_X_SELECTION_TARGET_TEXT))
-      x_target = ECORE_X_ATOM_TEXT;
+     x_target = ECORE_X_ATOM_TEXT;
    else if (!strcmp(target, ECORE_X_SELECTION_TARGET_COMPOUND_TEXT))
-      x_target = ECORE_X_ATOM_COMPOUND_TEXT;
+     x_target = ECORE_X_ATOM_COMPOUND_TEXT;
    else if (!strcmp(target, ECORE_X_SELECTION_TARGET_STRING))
-      x_target = ECORE_X_ATOM_STRING;
+     x_target = ECORE_X_ATOM_STRING;
    else if (!strcmp(target, ECORE_X_SELECTION_TARGET_UTF8_STRING))
-      x_target = ECORE_X_ATOM_UTF8_STRING;
+     x_target = ECORE_X_ATOM_UTF8_STRING;
    else if (!strcmp(target, ECORE_X_SELECTION_TARGET_FILENAME))
-      x_target = ECORE_X_ATOM_FILE_NAME;
+     x_target = ECORE_X_ATOM_FILE_NAME;
    else
-      x_target = ecore_x_atom_get(target);
+     x_target = ecore_x_atom_get(target);
 
    return x_target;
 } /* _ecore_x_selection_target_atom_get */
@@ -317,16 +325,16 @@ _ecore_x_selection_target_get(Ecore_X_Atom target)
 {
    /* FIXME: Should not return mem allocated with strdup or X mixed,
     * one should use free to free, the other XFree */
-   if (target == ECORE_X_ATOM_FILE_NAME)
-      return strdup(ECORE_X_SELECTION_TARGET_FILENAME);
-   else if (target == ECORE_X_ATOM_STRING)
-      return strdup(ECORE_X_SELECTION_TARGET_STRING);
-   else if (target == ECORE_X_ATOM_UTF8_STRING)
-      return strdup(ECORE_X_SELECTION_TARGET_UTF8_STRING);
-   else if (target == ECORE_X_ATOM_TEXT)
-      return strdup(ECORE_X_SELECTION_TARGET_TEXT);
-   else
-      return XGetAtomName(_ecore_x_disp, target);
+     if (target == ECORE_X_ATOM_FILE_NAME)
+       return strdup(ECORE_X_SELECTION_TARGET_FILENAME);
+     else if (target == ECORE_X_ATOM_STRING)
+       return strdup(ECORE_X_SELECTION_TARGET_STRING);
+     else if (target == ECORE_X_ATOM_UTF8_STRING)
+       return strdup(ECORE_X_SELECTION_TARGET_UTF8_STRING);
+     else if (target == ECORE_X_ATOM_TEXT)
+       return strdup(ECORE_X_SELECTION_TARGET_TEXT);
+     else
+       return XGetAtomName(_ecore_x_disp, target);
 } /* _ecore_x_selection_target_get */
 
 static void
@@ -339,34 +347,37 @@ _ecore_x_selection_request(Ecore_X_Window w,
    target = _ecore_x_selection_target_atom_get(target_str);
 
    if (selection == ECORE_X_ATOM_SELECTION_PRIMARY)
-      prop = ECORE_X_ATOM_SELECTION_PROP_PRIMARY;
+     prop = ECORE_X_ATOM_SELECTION_PROP_PRIMARY;
    else if (selection == ECORE_X_ATOM_SELECTION_SECONDARY)
-      prop = ECORE_X_ATOM_SELECTION_PROP_SECONDARY;
+     prop = ECORE_X_ATOM_SELECTION_PROP_SECONDARY;
    else if (selection == ECORE_X_ATOM_SELECTION_CLIPBOARD)
-      prop = ECORE_X_ATOM_SELECTION_PROP_CLIPBOARD;
+     prop = ECORE_X_ATOM_SELECTION_PROP_CLIPBOARD;
    else
-      return;
+     return;
 
    XConvertSelection(_ecore_x_disp, selection, target, prop,
                      w, CurrentTime);
 } /* _ecore_x_selection_request */
 
 EAPI void
-ecore_x_selection_primary_request(Ecore_X_Window w, const char *target)
+ecore_x_selection_primary_request(Ecore_X_Window w,
+                                  const char    *target)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    _ecore_x_selection_request(w, ECORE_X_ATOM_SELECTION_PRIMARY, target);
 } /* ecore_x_selection_primary_request */
 
 EAPI void
-ecore_x_selection_secondary_request(Ecore_X_Window w, const char *target)
+ecore_x_selection_secondary_request(Ecore_X_Window w,
+                                    const char    *target)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    _ecore_x_selection_request(w, ECORE_X_ATOM_SELECTION_SECONDARY, target);
 } /* ecore_x_selection_secondary_request */
 
 EAPI void
-ecore_x_selection_xdnd_request(Ecore_X_Window w, const char *target)
+ecore_x_selection_xdnd_request(Ecore_X_Window w,
+                               const char    *target)
 {
    Ecore_X_Atom atom;
    Ecore_X_DND_Target *_target;
@@ -380,21 +391,22 @@ ecore_x_selection_xdnd_request(Ecore_X_Window w, const char *target)
 } /* ecore_x_selection_xdnd_request */
 
 EAPI void
-ecore_x_selection_clipboard_request(Ecore_X_Window w, const char *target)
+ecore_x_selection_clipboard_request(Ecore_X_Window w,
+                                    const char    *target)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    _ecore_x_selection_request(w, ECORE_X_ATOM_SELECTION_CLIPBOARD, target);
 } /* ecore_x_selection_clipboard_request */
 
 EAPI void
-ecore_x_selection_converter_atom_add(Ecore_X_Atom target,
-                                     Eina_Bool  (*func)(char         *target,
-                                                        void         *data,
-                                                        int           size,
-                                                        void        **data_ret,
-                                                        int          *size_ret,
-                                                        Ecore_X_Atom *ttype,
-                                                        int          *tsize))
+ecore_x_selection_converter_atom_add(Ecore_X_Atom                                          target,
+                                     Eina_Bool                                             (*func)(char *target,
+                                                                             void         *data,
+                                                                             int           size,
+                                                                             void        **data_ret,
+                                                                             int          *size_ret,
+                                                                             Ecore_X_Atom *ttype,
+                                                                             int          *tsize))
 {
    Ecore_X_Selection_Converter *cnv;
 
@@ -411,9 +423,9 @@ ecore_x_selection_converter_atom_add(Ecore_X_Atom target,
                }
 
              if (cnv->next)
-                cnv = cnv->next;
+               cnv = cnv->next;
              else
-                break;
+               break;
           }
 
         cnv->next = calloc(1, sizeof(Ecore_X_Selection_Converter));
@@ -432,19 +444,19 @@ ecore_x_selection_converter_atom_add(Ecore_X_Atom target,
 } /* ecore_x_selection_converter_atom_add */
 
 EAPI void
-ecore_x_selection_converter_add(char                             *target,
-                                Eina_Bool                       (*func)(char *target,
-                                                           void  *data,
-                                                           int    size,
-                                                           void **data_ret,
-                                                           int   *size_ret,
-                                                           Ecore_X_Atom *,
-                                                           int *))
+ecore_x_selection_converter_add(char                                   *target,
+                                Eina_Bool                               (*func)(char *target,
+                                                                 void  *data,
+                                                                 int    size,
+                                                                 void **data_ret,
+                                                                 int   *size_ret,
+                                                                 Ecore_X_Atom *,
+                                                                 int *))
 {
    Ecore_X_Atom x_target;
 
    if (!func || !target)
-      return;
+     return;
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    x_target = _ecore_x_selection_target_atom_get(target);
@@ -466,7 +478,7 @@ ecore_x_selection_converter_atom_del(Ecore_X_Atom target)
         if (cnv->target == target)
           {
              if (prev_cnv)
-                prev_cnv->next = cnv->next;
+               prev_cnv->next = cnv->next;
              else
                {
                   converters = cnv->next; /* This was the first converter */
@@ -488,7 +500,7 @@ ecore_x_selection_converter_del(char *target)
    Ecore_X_Atom x_target;
 
    if (!target)
-      return;
+     return;
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    x_target = _ecore_x_selection_target_atom_get(target);
@@ -517,7 +529,7 @@ ecore_x_selection_notify_send(Ecore_X_Window requestor,
    xnotify.serial = 0;
 
    xev.xselection = xnotify;
-   return ((XSendEvent(_ecore_x_disp, requestor, False, 0, &xev) > 0) ? EINA_TRUE : EINA_FALSE);
+   return (XSendEvent(_ecore_x_disp, requestor, False, 0, &xev) > 0) ? EINA_TRUE : EINA_FALSE;
 } /* ecore_x_selection_notify_send */
 
 /* Locate and run conversion callback for specified selection target */
@@ -552,7 +564,7 @@ ecore_x_selection_convert(Ecore_X_Atom  selection,
                   return r;
                }
              else
-                return EINA_FALSE;
+               return EINA_FALSE;
           }
      }
 
@@ -584,22 +596,22 @@ _ecore_x_selection_converter_text(char         *target,
    XICCEncodingStyle style;
 
    if (!data || !size)
-      return EINA_FALSE;
+     return EINA_FALSE;
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    if (!strcmp(target, ECORE_X_SELECTION_TARGET_TEXT))
-      style = XTextStyle;
+     style = XTextStyle;
    else if (!strcmp(target, ECORE_X_SELECTION_TARGET_COMPOUND_TEXT))
-      style = XCompoundTextStyle;
+     style = XCompoundTextStyle;
    else if (!strcmp(target, ECORE_X_SELECTION_TARGET_STRING))
-      style = XStringStyle;
+     style = XStringStyle;
 
 #ifdef X_HAVE_UTF8_STRING
    else if (!strcmp(target, ECORE_X_SELECTION_TARGET_UTF8_STRING))
-      style = XUTF8StringStyle;
+     style = XUTF8StringStyle;
 #endif /* ifdef X_HAVE_UTF8_STRING */
    else
-      return EINA_FALSE;
+     return EINA_FALSE;
 
    mystr = alloca(size + 1);
    memcpy(mystr, data, size);
@@ -650,7 +662,7 @@ ecore_x_selection_parser_add(const char *target,
    Ecore_X_Selection_Parser *prs;
 
    if (!target)
-      return;
+     return;
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    prs = parsers;
@@ -688,7 +700,7 @@ ecore_x_selection_parser_del(const char *target)
    Ecore_X_Selection_Parser *prs, *prev_prs;
 
    if (!target)
-      return;
+     return;
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    prev_prs = NULL;
@@ -699,7 +711,7 @@ ecore_x_selection_parser_del(const char *target)
         if (!strcmp(prs->target, target))
           {
              if (prev_prs)
-                prev_prs->next = prs->next;
+               prev_prs->next = prs->next;
              else
                {
                   parsers = prs->next; /* This was the first parser */
@@ -723,29 +735,34 @@ ecore_x_selection_parser_del(const char *target)
  * @param time Specifies the time
  * @since 1.1.0
  */
-EAPI void 
-ecore_x_selection_owner_set(Ecore_X_Window win, Ecore_X_Atom atom, Ecore_X_Time tim) 
+EAPI void
+ecore_x_selection_owner_set(Ecore_X_Window win,
+                            Ecore_X_Atom   atom,
+                            Ecore_X_Time   tim)
 {
    XSetSelectionOwner(_ecore_x_disp, atom, win, tim);
 }
 
 /**
  * Return the window that currently owns the specified selection.
- * 
+ *
  * @param atom The specified selection atom.
- * 
+ *
  * @return The window that currently owns the specified selection.
  * @since 1.1.0
  */
-EAPI Ecore_X_Window 
-ecore_x_selection_owner_get(Ecore_X_Atom atom) 
+EAPI Ecore_X_Window
+ecore_x_selection_owner_get(Ecore_X_Atom atom)
 {
    return XGetSelectionOwner(_ecore_x_disp, atom);
 }
 
 /* Locate and run conversion callback for specified selection target */
 void *
-_ecore_x_selection_parse(const char *target, void *data, int size, int format)
+_ecore_x_selection_parse(const char *target,
+                         void       *data,
+                         int         size,
+                         int         format)
 {
    Ecore_X_Selection_Parser *prs;
    Ecore_X_Selection_Data *sel;
@@ -755,7 +772,7 @@ _ecore_x_selection_parse(const char *target, void *data, int size, int format)
         if (!strcmp(prs->target, target))
           {
              sel = prs->parse(target, data, size, format);
-            if (sel) return sel;
+             if (sel) return sel;
           }
      }
 
@@ -784,7 +801,7 @@ static void *
 _ecore_x_selection_parser_files(const char *target,
                                 void       *_data,
                                 int         size,
-                                int format  __UNUSED__)
+                                int         format __UNUSED__)
 {
    Ecore_X_Selection_Data_Files *sel;
    char *t, *data = _data;
@@ -794,7 +811,7 @@ _ecore_x_selection_parser_files(const char *target,
 
    if (strcmp(target, "text/uri-list") &&
        strcmp(target, "_NETSCAPE_URL"))
-      return NULL;
+     return NULL;
 
    sel = calloc(1, sizeof(Ecore_X_Selection_Data_Files));
    if (!sel) return NULL;
@@ -803,15 +820,15 @@ _ecore_x_selection_parser_files(const char *target,
    if (data[size - 1])
      {
         /* Isn't nul terminated */
-        size++;
-        t = realloc(data, size);
-        if (!t)
-          {
-             free(sel);
-             return NULL;
-          }
-        data = t;
-        data[size - 1] = 0;
+         size++;
+         t = realloc(data, size);
+         if (!t)
+           {
+              free(sel);
+              return NULL;
+           }
+         data = t;
+         data[size - 1] = 0;
      }
 
    tmp = malloc(size);
@@ -825,12 +842,12 @@ _ecore_x_selection_parser_files(const char *target,
    while ((is < size) && (data[is]))
      {
         if ((i == 0) && (data[is] == '#'))
-           for (; ((data[is]) && (data[is] != '\n')); is++) ;
+          for (; ((data[is]) && (data[is] != '\n')); is++) ;
         else
           {
              if ((data[is] != '\r') &&
                  (data[is] != '\n'))
-                tmp[i++] = data[is++];
+               tmp[i++] = data[is++];
              else
                {
                   while ((data[is] == '\r') || (data[is] == '\n')) is++;
@@ -878,7 +895,7 @@ _ecore_x_selection_data_files_free(void *data)
    if (sel->files)
      {
         for (i = 0; i < sel->num_files; i++)
-           free(sel->files[i]);
+          free(sel->files[i]);
         free(sel->files);
      }
 
@@ -888,9 +905,9 @@ _ecore_x_selection_data_files_free(void *data)
 
 static void *
 _ecore_x_selection_parser_text(const char *target __UNUSED__,
-                               void              *_data,
-                               int                size,
-                               int format         __UNUSED__)
+                               void       *_data,
+                               int         size,
+                               int         format __UNUSED__)
 {
    Ecore_X_Selection_Data_Text *sel;
    unsigned char *data = _data;
@@ -901,15 +918,15 @@ _ecore_x_selection_parser_text(const char *target __UNUSED__,
    if (data[size - 1])
      {
         /* Isn't nul terminated */
-        size++;
-        t = realloc(data, size);
-        if (!t)
-          {
-             free(sel);
-             return NULL;
-          }
-        data = t;
-        data[size - 1] = 0;
+         size++;
+         t = realloc(data, size);
+         if (!t)
+           {
+              free(sel);
+              return NULL;
+           }
+         data = t;
+         data[size - 1] = 0;
      }
 
    sel->text = (char *)data;
@@ -933,9 +950,9 @@ _ecore_x_selection_data_text_free(void *data)
 
 static void *
 _ecore_x_selection_parser_targets(const char *target __UNUSED__,
-                                  void              *data,
-                                  int                size,
-                                  int format         __UNUSED__)
+                                  void       *data,
+                                  int         size,
+                                  int         format __UNUSED__)
 {
    Ecore_X_Selection_Data_Targets *sel;
    unsigned long *targets;
@@ -953,7 +970,7 @@ _ecore_x_selection_parser_targets(const char *target __UNUSED__,
         return NULL;
      }
    for (i = 2; i < size; i++)
-      sel->targets[i - 2] = XGetAtomName(_ecore_x_disp, targets[i]);
+     sel->targets[i - 2] = XGetAtomName(_ecore_x_disp, targets[i]);
 
    ECORE_X_SELECTION_DATA(sel)->free = _ecore_x_selection_data_targets_free;
    ECORE_X_SELECTION_DATA(sel)->content = ECORE_X_SELECTION_CONTENT_TARGETS;
@@ -973,7 +990,7 @@ _ecore_x_selection_data_targets_free(void *data)
    if (sel->targets)
      {
         for (i = 0; i < sel->num_targets; i++)
-           XFree(sel->targets[i]);
+          XFree(sel->targets[i]);
         free(sel->targets);
      }
 
index bc2bb1f..e49fede 100644 (file)
@@ -27,7 +27,7 @@ ecore_x_sync_alarm_new(Ecore_X_Sync_Counter counter)
    XSyncIntToValue(&values.trigger.wait_value, 1);
    values.trigger.test_type = XSyncPositiveComparison;
 
-   XSyncIntToValue(&values.delta,              1);
+   XSyncIntToValue(&values.delta, 1);
 
    values.events = True;
 
@@ -52,7 +52,8 @@ ecore_x_sync_alarm_free(Ecore_X_Sync_Alarm alarm)
 } /* ecore_x_sync_alarm_free */
 
 EAPI Eina_Bool
-ecore_x_sync_counter_query(Ecore_X_Sync_Counter counter, unsigned int *val)
+ecore_x_sync_counter_query(Ecore_X_Sync_Counter counter,
+                           unsigned int        *val)
 {
    XSyncValue value;
 
@@ -86,7 +87,8 @@ ecore_x_sync_counter_free(Ecore_X_Sync_Counter counter)
 } /* ecore_x_sync_counter_free */
 
 EAPI void
-ecore_x_sync_counter_inc(Ecore_X_Sync_Counter counter, int by)
+ecore_x_sync_counter_inc(Ecore_X_Sync_Counter counter,
+                         int                  by)
 {
    XSyncValue v;
 
@@ -96,14 +98,15 @@ ecore_x_sync_counter_inc(Ecore_X_Sync_Counter counter, int by)
 } /* ecore_x_sync_counter_inc */
 
 EAPI void
-ecore_x_sync_counter_val_wait(Ecore_X_Sync_Counter counter, int val)
+ecore_x_sync_counter_val_wait(Ecore_X_Sync_Counter counter,
+                              int                  val)
 {
    XSyncWaitCondition cond;
    XSyncValue v, v2;
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    XSyncQueryCounter(_ecore_x_disp, counter, &v);
-   XSyncIntToValue(&v,  val);
+   XSyncIntToValue(&v, val);
    XSyncIntToValue(&v2, val + 1);
    cond.trigger.counter = counter;
    cond.trigger.value_type = XSyncAbsolute;
@@ -115,7 +118,8 @@ ecore_x_sync_counter_val_wait(Ecore_X_Sync_Counter counter, int val)
 } /* ecore_x_sync_counter_val_wait */
 
 EAPI void
-ecore_x_sync_counter_set(Ecore_X_Sync_Counter counter, int val)
+ecore_x_sync_counter_set(Ecore_X_Sync_Counter counter,
+                         int                  val)
 {
    XSyncValue v;
 
@@ -125,7 +129,9 @@ ecore_x_sync_counter_set(Ecore_X_Sync_Counter counter, int val)
 }
 
 EAPI void
-ecore_x_sync_counter_2_set(Ecore_X_Sync_Counter counter, int val_hi, unsigned int val_lo)
+ecore_x_sync_counter_2_set(Ecore_X_Sync_Counter counter,
+                           int                  val_hi,
+                           unsigned int         val_lo)
 {
    XSyncValue v;
 
@@ -135,7 +141,9 @@ ecore_x_sync_counter_2_set(Ecore_X_Sync_Counter counter, int val_hi, unsigned in
 }
 
 EAPI Eina_Bool
-ecore_x_sync_counter_2_query(Ecore_X_Sync_Counter counter, int *val_hi, unsigned int *val_lo)
+ecore_x_sync_counter_2_query(Ecore_X_Sync_Counter counter,
+                             int                 *val_hi,
+                             unsigned int        *val_lo)
 {
    XSyncValue value;
 
index da64bb7..c4576f9 100644 (file)
@@ -25,18 +25,18 @@ ecore_x_test_fake_key_down(const char *key __UNUSED__)
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    if (!strncmp(key, "Keycode-", 8))
-      keycode = atoi(key + 8);
+     keycode = atoi(key + 8);
    else
      {
         keysym = XStringToKeysym(key);
         if (keysym == NoSymbol)
-           return EINA_FALSE;
+          return EINA_FALSE;
 
         keycode = XKeysymToKeycode(_ecore_x_disp, keysym);
      }
 
    if (keycode == 0)
-      return EINA_FALSE;
+     return EINA_FALSE;
 
    return XTestFakeKeyEvent(_ecore_x_disp, keycode, 1, 0) ? EINA_TRUE : EINA_FALSE;
 #else /* ifdef ECORE_XTEST */
@@ -57,18 +57,18 @@ ecore_x_test_fake_key_up(const char *key __UNUSED__)
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    if (!strncmp(key, "Keycode-", 8))
-      keycode = atoi(key + 8);
+     keycode = atoi(key + 8);
    else
      {
         keysym = XStringToKeysym(key);
         if (keysym == NoSymbol)
-           return EINA_FALSE;
+          return EINA_FALSE;
 
         keycode = XKeysymToKeycode(_ecore_x_disp, keysym);
      }
 
    if (keycode == 0)
-      return EINA_FALSE;
+     return EINA_FALSE;
 
    return XTestFakeKeyEvent(_ecore_x_disp, keycode, 0, 0) ? EINA_TRUE : EINA_FALSE;
 #else /* ifdef ECORE_XTEST */
@@ -90,23 +90,23 @@ ecore_x_test_fake_key_press(const char *key __UNUSED__)
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    if (!strncmp(key, "Keycode-", 8))
-      keycode = atoi(key + 8);
+     keycode = atoi(key + 8);
    else
      {
         keysym = XStringToKeysym(key);
         if (keysym == NoSymbol)
-           return EINA_FALSE;
+          return EINA_FALSE;
 
         keycode = XKeysymToKeycode(_ecore_x_disp, keysym);
         if (XKeycodeToKeysym(_ecore_x_disp, keycode, 0) != keysym)
           {
              if (XKeycodeToKeysym(_ecore_x_disp, keycode, 1) == keysym)
-                shift = 1;
+               shift = 1;
              else
-                keycode = 0;
+               keycode = 0;
           }
         else
-           shift = 0;
+          shift = 0;
      }
 
    if (keycode == 0)
@@ -132,14 +132,14 @@ ecore_x_test_fake_key_press(const char *key __UNUSED__)
      }
 
    if (shift)
-      XTestFakeKeyEvent(_ecore_x_disp,
-                        XKeysymToKeycode(_ecore_x_disp, XK_Shift_L), 1, 0);
+     XTestFakeKeyEvent(_ecore_x_disp,
+                       XKeysymToKeycode(_ecore_x_disp, XK_Shift_L), 1, 0);
 
    XTestFakeKeyEvent(_ecore_x_disp, keycode, 1, 0);
    XTestFakeKeyEvent(_ecore_x_disp, keycode, 0, 0);
    if (shift)
-      XTestFakeKeyEvent(_ecore_x_disp,
-                        XKeysymToKeycode(_ecore_x_disp, XK_Shift_L), 0, 0);
+     XTestFakeKeyEvent(_ecore_x_disp,
+                       XKeysymToKeycode(_ecore_x_disp, XK_Shift_L), 0, 0);
 
    return EINA_TRUE;
 #else /* ifdef ECORE_XTEST */
index 53a9fb8..f054298 100644 (file)
@@ -25,13 +25,13 @@ typedef unsigned int drm_magic_t;
 
 typedef enum
 {
-   DRM_VBLANK_ABSOLUTE    = 0x00000000,
-   DRM_VBLANK_RELATIVE    = 0x00000001,
-   DRM_VBLANK_EVENT       = 0x04000000,
-   DRM_VBLANK_FLIP        = 0x08000000,
-   DRM_VBLANK_NEXTONMISS  = 0x10000000,
-   DRM_VBLANK_SECONDARY   = 0x20000000,
-   DRM_VBLANK_SIGNAL      = 0x40000000
+   DRM_VBLANK_ABSOLUTE = 0x00000000,
+   DRM_VBLANK_RELATIVE = 0x00000001,
+   DRM_VBLANK_EVENT = 0x04000000,
+   DRM_VBLANK_FLIP = 0x08000000,
+   DRM_VBLANK_NEXTONMISS = 0x10000000,
+   DRM_VBLANK_SECONDARY = 0x20000000,
+   DRM_VBLANK_SIGNAL = 0x40000000
 }
 drmVBlankSeqType;
 
@@ -61,48 +61,67 @@ typedef union _drmVBlank
 typedef struct _drmEventContext
 {
    int version;
-   void (*vblank_handler)(int fd, unsigned int sequence, unsigned int tv_sec, unsigned int tv_usec, void *user_data);
-   void (*page_flip_handler)(int fd, unsigned int sequence, unsigned int tv_sec, unsigned int tv_usec, void *user_data);
+   void (*vblank_handler)(int          fd,
+                          unsigned int sequence,
+                          unsigned int tv_sec,
+                          unsigned int tv_usec,
+                          void        *user_data);
+   void (*page_flip_handler)(int          fd,
+                             unsigned int sequence,
+                             unsigned int tv_sec,
+                             unsigned int tv_usec,
+                             void        *user_data);
 } drmEventContext;
 
-static int (*sym_drmClose)       (int fd) = NULL;
-static int (*sym_drmGetMagic)    (int fd, drm_magic_t * magic) = NULL;
-static int (*sym_drmWaitVBlank)  (int fd, drmVBlank *vbl) = NULL;
-static int (*sym_drmHandleEvent) (int fd, drmEventContext *evctx) = NULL;
+static int (*sym_drmClose)(int fd) = NULL;
+static int (*sym_drmGetMagic)(int          fd,
+                              drm_magic_t *magic) = NULL;
+static int (*sym_drmWaitVBlank)(int        fd,
+                                drmVBlank *vbl) = NULL;
+static int (*sym_drmHandleEvent)(int              fd,
+                                 drmEventContext *evctx) = NULL;
 
 //// dri
 
-static Bool (*sym_DRI2QueryExtension) (Display *display, int *eventBase, int *errorBase) = NULL;
-static Bool (*sym_DRI2QueryVersion)   (Display *display, int *major, int *minor) = NULL;
-static Bool (*sym_DRI2Connect)        (Display *display, XID window, char **driverName, char **deviceName) = NULL;
-static Bool (*sym_DRI2Authenticate)   (Display *display, XID window, drm_magic_t magic) = NULL;
-
+static Bool (*sym_DRI2QueryExtension)(Display *display,
+                                      int     *eventBase,
+                                      int     *errorBase) = NULL;
+static Bool (*sym_DRI2QueryVersion)(Display *display,
+                                    int     *major,
+                                    int     *minor) = NULL;
+static Bool (*sym_DRI2Connect)(Display *display,
+                               XID      window,
+                               char   **driverName,
+                               char   **deviceName) = NULL;
+static Bool (*sym_DRI2Authenticate)(Display    *display,
+                                    XID         window,
+                                    drm_magic_t magic) = NULL;
 
 //// dri/drm data needed
-static int               dri2_event = 0;
-static int               dri2_error = 0;
-static int               dri2_major = 0;
-static int               dri2_minor = 0;
-static char             *device_name = 0;
-static char             *driver_name = 0;
-static drm_magic_t       drm_magic;
-
-static int               drm_fd = -1;
-static int               drm_event_is_busy = 0;
-static int               drm_animators_interval = 1;
-static drmEventContext   drm_evctx;
+static int dri2_event = 0;
+static int dri2_error = 0;
+static int dri2_major = 0;
+static int dri2_minor = 0;
+static char *device_name = 0;
+static char *driver_name = 0;
+static drm_magic_t drm_magic;
+
+static int drm_fd = -1;
+static int drm_event_is_busy = 0;
+static int drm_animators_interval = 1;
+static drmEventContext drm_evctx;
 static Ecore_Fd_Handler *dri_drm_fdh = NULL;
 
-static void              *dri_lib = NULL;
-static void              *drm_lib = NULL;
+static void *dri_lib = NULL;
+static void *drm_lib = NULL;
 
-static Window             dri_drm_vsync_root = 0;
+static Window dri_drm_vsync_root = 0;
 
 static void
 _dri_drm_tick_schedule(void)
 {
    drmVBlank vbl;
-   
+
    vbl.request.type = DRM_VBLANK_RELATIVE | DRM_VBLANK_EVENT;
    vbl.request.sequence = drm_animators_interval;
    vbl.request.signal = 0;
@@ -123,16 +142,19 @@ _dri_drm_tick_end(void *data __UNUSED__)
 }
 
 static void
-_dri_drm_vblank_handler(int fd __UNUSED__, unsigned int frame __UNUSED__, 
-                        unsigned int sec __UNUSED__, 
-                        unsigned int usec __UNUSED__, void *data __UNUSED__)
+_dri_drm_vblank_handler(int          fd __UNUSED__,
+                        unsigned int frame __UNUSED__,
+                        unsigned int sec __UNUSED__,
+                        unsigned int usec __UNUSED__,
+                        void        *data __UNUSED__)
 {
    ecore_animator_custom_tick();
    if (drm_event_is_busy) _dri_drm_tick_schedule();
 }
 
 static Eina_Bool
-_dri_drm_cb(void *data __UNUSED__, Ecore_Fd_Handler *fd_handler __UNUSED__)
+_dri_drm_cb(void             *data __UNUSED__,
+            Ecore_Fd_Handler *fd_handler __UNUSED__)
 {
    sym_drmHandleEvent(drm_fd, &drm_evctx);
    return ECORE_CALLBACK_RENEW;
@@ -146,36 +168,36 @@ static int
 _dri_drm_link(void)
 {
    const char *drm_libs[] =
-     {
-        "libdrm.so.2",
-        "libdrm.so.1",
-        "libdrm.so.0",
-        "libdrm.so",
-        NULL,
-     };
+   {
+      "libdrm.so.2",
+      "libdrm.so.1",
+      "libdrm.so.0",
+      "libdrm.so",
+      NULL,
+   };
    const char *dri_libs[] =
-     {
-        "libdri2.so.2",
-        "libdri2.so.1",
-        "libdri2.so.0",
-        "libdri2.so",
-        "libGL.so.4",
-        "libGL.so.3",
-        "libGL.so.2",
-        "libGL.so.1",
-        "libGL.so.0",
-        "libGL.so",
-        NULL,
-     };
+   {
+      "libdri2.so.2",
+      "libdri2.so.1",
+      "libdri2.so.0",
+      "libdri2.so",
+      "libGL.so.4",
+      "libGL.so.3",
+      "libGL.so.2",
+      "libGL.so.1",
+      "libGL.so.0",
+      "libGL.so",
+      NULL,
+   };
    int i, fail;
-#define SYM(lib, xx) \
-   do { \
-      sym_ ## xx = dlsym(lib, #xx); \
-      if (!(sym_ ## xx)) { \
-         fprintf(stderr, "%s\n", dlerror()); \
-         fail = 1; \
-      } \
-   } while (0)
+#define SYM(lib, xx)                            \
+  do {                                          \
+       sym_ ## xx = dlsym(lib, #xx);            \
+       if (!(sym_ ## xx)) {                     \
+            fprintf(stderr, "%s\n", dlerror()); \
+            fail = 1;                           \
+         }                                      \
+    } while (0)
 
    if (dri_lib) return 1;
    for (i = 0; drm_libs[i]; i++)
@@ -227,16 +249,16 @@ static int
 _dri_drm_init(void)
 {
    if (!sym_DRI2QueryExtension(_ecore_x_disp, &dri2_event, &dri2_error))
-      return 0;
+     return 0;
    if (!sym_DRI2QueryVersion(_ecore_x_disp, &dri2_major, &dri2_minor))
-      return 0;
+     return 0;
    if (dri2_major < 2)
-      return 0;
+     return 0;
    if (!sym_DRI2Connect(_ecore_x_disp, dri_drm_vsync_root, &driver_name, &device_name))
-      return 0;
+     return 0;
    drm_fd = open(device_name, O_RDWR);
    if (drm_fd < 0)
-      return 0;
+     return 0;
    sym_drmGetMagic(drm_fd, &drm_magic);
    if (!sym_DRI2Authenticate(_ecore_x_disp, dri_drm_vsync_root, drm_magic))
      {
@@ -248,8 +270,8 @@ _dri_drm_init(void)
    drm_evctx.version = DRM_EVENT_CONTEXT_VERSION;
    drm_evctx.vblank_handler = _dri_drm_vblank_handler;
    drm_evctx.page_flip_handler = NULL;
-   
-   dri_drm_fdh = ecore_main_fd_handler_add(drm_fd, ECORE_FD_READ, 
+
+   dri_drm_fdh = ecore_main_fd_handler_add(drm_fd, ECORE_FD_READ,
                                            _dri_drm_cb, NULL, NULL, NULL);
    if (!dri_drm_fdh)
      {
@@ -274,6 +296,7 @@ _dri_drm_shutdown(void)
         dri_drm_fdh = NULL;
      }
 }
+
 #endif
 
 EAPI Eina_Bool
@@ -281,7 +304,7 @@ ecore_x_vsync_animator_tick_source_set(Ecore_X_Window win)
 {
 #ifdef ECORE_X_VSYNC_DRI2
    Ecore_X_Window root;
-   
+
    root = ecore_x_window_root_get(win);
    if (root != dri_drm_vsync_root)
      {
@@ -301,9 +324,9 @@ ecore_x_vsync_animator_tick_source_set(Ecore_X_Window win)
                   return EINA_FALSE;
                }
              ecore_animator_custom_source_tick_begin_callback_set
-                (_dri_drm_tick_begin, NULL);
+               (_dri_drm_tick_begin, NULL);
              ecore_animator_custom_source_tick_end_callback_set
-                (_dri_drm_tick_end, NULL);
+               (_dri_drm_tick_end, NULL);
              ecore_animator_source_set(ECORE_ANIMATOR_SOURCE_CUSTOM);
           }
         else
@@ -312,9 +335,9 @@ ecore_x_vsync_animator_tick_source_set(Ecore_X_Window win)
                {
                   _dri_drm_shutdown();
                   ecore_animator_custom_source_tick_begin_callback_set
-                     (NULL, NULL);
+                    (NULL, NULL);
                   ecore_animator_custom_source_tick_end_callback_set
-                     (NULL, NULL);
+                    (NULL, NULL);
                   ecore_animator_source_set(ECORE_ANIMATOR_SOURCE_TIMER);
                }
           }
@@ -323,5 +346,6 @@ ecore_x_vsync_animator_tick_source_set(Ecore_X_Window win)
 #else
    return EINA_FALSE;
    win = 0;
-#endif   
+#endif
 }
+
index 2608807..76670d3 100644 (file)
@@ -32,14 +32,18 @@ static Ecore_X_Window *ignore_list = NULL;
  * @ingroup Ecore_X_Window_Create_Group
  */
 EAPI Ecore_X_Window
-ecore_x_window_new(Ecore_X_Window parent, int x, int y, int w, int h)
+ecore_x_window_new(Ecore_X_Window parent,
+                   int            x,
+                   int            y,
+                   int            w,
+                   int            h)
 {
    Window win;
    XSetWindowAttributes attr;
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    if (parent == 0)
-      parent = DefaultRootWindow(_ecore_x_disp);
+     parent = DefaultRootWindow(_ecore_x_disp);
 
    attr.backing_store = NotUseful;
    attr.override_redirect = False;
@@ -50,18 +54,18 @@ ecore_x_window_new(Ecore_X_Window parent, int x, int y, int w, int h)
    attr.save_under = False;
    attr.do_not_propagate_mask = NoEventMask;
    attr.event_mask = KeyPressMask |
-      KeyReleaseMask |
-      ButtonPressMask |
-      ButtonReleaseMask |
-      EnterWindowMask |
-      LeaveWindowMask |
-      PointerMotionMask |
-      ExposureMask |
-      VisibilityChangeMask |
-      StructureNotifyMask |
-      FocusChangeMask |
-      PropertyChangeMask |
-      ColormapChangeMask;
+     KeyReleaseMask |
+     ButtonPressMask |
+     ButtonReleaseMask |
+     EnterWindowMask |
+     LeaveWindowMask |
+     PointerMotionMask |
+     ExposureMask |
+     VisibilityChangeMask |
+     StructureNotifyMask |
+     FocusChangeMask |
+     PropertyChangeMask |
+     ColormapChangeMask;
    win = XCreateWindow(_ecore_x_disp, parent,
                        x, y, w, h, 0,
                        CopyFromParent, /*DefaultDepth(_ecore_x_disp, DefaultScreen(_ecore_x_disp)),*/
@@ -80,7 +84,7 @@ ecore_x_window_new(Ecore_X_Window parent, int x, int y, int w, int h)
                        &attr);
 
    if (parent == DefaultRootWindow(_ecore_x_disp))
-      ecore_x_window_defaults_set(win);
+     ecore_x_window_defaults_set(win);
 
    return win;
 } /* ecore_x_window_new */
@@ -97,14 +101,18 @@ ecore_x_window_new(Ecore_X_Window parent, int x, int y, int w, int h)
  * @ingroup Ecore_X_Window_Create_Group
  */
 EAPI Ecore_X_Window
-ecore_x_window_override_new(Ecore_X_Window parent, int x, int y, int w, int h)
+ecore_x_window_override_new(Ecore_X_Window parent,
+                            int            x,
+                            int            y,
+                            int            w,
+                            int            h)
 {
    Window win;
    XSetWindowAttributes attr;
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    if (parent == 0)
-      parent = DefaultRootWindow(_ecore_x_disp);
+     parent = DefaultRootWindow(_ecore_x_disp);
 
    attr.backing_store = NotUseful;
    attr.override_redirect = True;
@@ -115,18 +123,18 @@ ecore_x_window_override_new(Ecore_X_Window parent, int x, int y, int w, int h)
    attr.save_under = False;
    attr.do_not_propagate_mask = NoEventMask;
    attr.event_mask = KeyPressMask |
-      KeyReleaseMask |
-      ButtonPressMask |
-      ButtonReleaseMask |
-      EnterWindowMask |
-      LeaveWindowMask |
-      PointerMotionMask |
-      ExposureMask |
-      VisibilityChangeMask |
-      StructureNotifyMask |
-      FocusChangeMask |
-      PropertyChangeMask |
-      ColormapChangeMask;
+     KeyReleaseMask |
+     ButtonPressMask |
+     ButtonReleaseMask |
+     EnterWindowMask |
+     LeaveWindowMask |
+     PointerMotionMask |
+     ExposureMask |
+     VisibilityChangeMask |
+     StructureNotifyMask |
+     FocusChangeMask |
+     PropertyChangeMask |
+     ColormapChangeMask;
    win = XCreateWindow(_ecore_x_disp, parent,
                        x, y, w, h, 0,
                        CopyFromParent, /*DefaultDepth(_ecore_x_disp, DefaultScreen(_ecore_x_disp)),*/
@@ -158,30 +166,34 @@ ecore_x_window_override_new(Ecore_X_Window parent, int x, int y, int w, int h)
  * @ingroup Ecore_X_Window_Create_Group
  */
 EAPI Ecore_X_Window
-ecore_x_window_input_new(Ecore_X_Window parent, int x, int y, int w, int h)
+ecore_x_window_input_new(Ecore_X_Window parent,
+                         int            x,
+                         int            y,
+                         int            w,
+                         int            h)
 {
    Window win;
    XSetWindowAttributes attr;
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    if (parent == 0)
-      parent = DefaultRootWindow(_ecore_x_disp);
+     parent = DefaultRootWindow(_ecore_x_disp);
 
    attr.override_redirect = True;
    attr.do_not_propagate_mask = NoEventMask;
    attr.event_mask = KeyPressMask |
-      KeyReleaseMask |
-      ButtonPressMask |
-      ButtonReleaseMask |
-      EnterWindowMask |
-      LeaveWindowMask |
-      PointerMotionMask |
-      ExposureMask |
-      VisibilityChangeMask |
-      StructureNotifyMask |
-      FocusChangeMask |
-      PropertyChangeMask |
-      ColormapChangeMask;
+     KeyReleaseMask |
+     ButtonPressMask |
+     ButtonReleaseMask |
+     EnterWindowMask |
+     LeaveWindowMask |
+     PointerMotionMask |
+     ExposureMask |
+     VisibilityChangeMask |
+     StructureNotifyMask |
+     FocusChangeMask |
+     PropertyChangeMask |
+     ColormapChangeMask;
    win = XCreateWindow(_ecore_x_disp, parent,
                        x, y, w, h, 0,
                        CopyFromParent,
@@ -254,16 +266,20 @@ ecore_x_window_defaults_set(Ecore_X_Window win)
 } /* ecore_x_window_defaults_set */
 
 EAPI void
-ecore_x_window_configure(Ecore_X_Window win,
+ecore_x_window_configure(Ecore_X_Window                win,
                          Ecore_X_Window_Configure_Mask mask,
-                         int x, int y, int w, int h,
-                         int border_width, Ecore_X_Window sibling,
-                         int stack_mode)
+                         int                           x,
+                         int                           y,
+                         int                           w,
+                         int                           h,
+                         int                           border_width,
+                         Ecore_X_Window                sibling,
+                         int                           stack_mode)
 {
    XWindowChanges xwc;
 
    if (!win)
-      return;
+     return;
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
 
@@ -295,9 +311,9 @@ ecore_x_window_free(Ecore_X_Window win)
    /* sorry sir, deleting the root window doesn't sound like
     * a smart idea.
     */
-   LOGFN(__FILE__, __LINE__, __FUNCTION__);
-   if (win)
-      XDestroyWindow(_ecore_x_disp, win);
+     LOGFN(__FILE__, __LINE__, __FUNCTION__);
+     if (win)
+       XDestroyWindow(_ecore_x_disp, win);
 } /* ecore_x_window_free */
 
 /**
@@ -306,7 +322,8 @@ ecore_x_window_free(Ecore_X_Window win)
  * @param   ignore if to ignore
  */
 EAPI void
-ecore_x_window_ignore_set(Ecore_X_Window win, int ignore)
+ecore_x_window_ignore_set(Ecore_X_Window win,
+                          int            ignore)
 {
    int i, j, cnt;
    Ecore_X_Window *t;
@@ -319,7 +336,7 @@ ecore_x_window_ignore_set(Ecore_X_Window win, int ignore)
              for (i = 0; i < ignore_num; i++)
                {
                   if (win == ignore_list[i])
-                     return;
+                    return;
                }
              t = realloc(ignore_list, (ignore_num + 1) * sizeof(Ecore_X_Window));
              if (!t) return;
@@ -331,20 +348,20 @@ ecore_x_window_ignore_set(Ecore_X_Window win, int ignore)
              ignore_num = 0;
              ignore_list = malloc(sizeof(Ecore_X_Window));
              if (ignore_list)
-                ignore_list[ignore_num++] = win;
+               ignore_list[ignore_num++] = win;
           }
      }
    else
      {
         if (!ignore_list)
-           return;
+          return;
 
         for (cnt = ignore_num, i = 0, j = 0; i < cnt; i++)
           {
              if (win != ignore_list[i])
-              ignore_list[j++] = ignore_list[i];
+               ignore_list[j++] = ignore_list[i];
              else
-              ignore_num--;
+               ignore_num--;
           }
 
         if (ignore_num <= 0)
@@ -367,7 +384,7 @@ EAPI Ecore_X_Window *
 ecore_x_window_ignore_list(int *num)
 {
    if (num)
-      *num = ignore_num;
+     *num = ignore_num;
 
    return ignore_list;
 } /* ecore_x_window_ignore_list */
@@ -386,7 +403,7 @@ ecore_x_window_delete_request_send(Ecore_X_Window win)
     * a smart idea.
     */
    if (!win)
-      return;
+     return;
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    xev.xclient.type = ClientMessage;
@@ -441,17 +458,17 @@ ecore_x_window_hide(Ecore_X_Window win)
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    root = win;
    if (ScreenCount(_ecore_x_disp) == 1)
-      root = DefaultRootWindow(_ecore_x_disp);
+     root = DefaultRootWindow(_ecore_x_disp);
    else
-      XGetGeometry(_ecore_x_disp,
-                   win,
-                   &root,
-                   &idum,
-                   &idum,
-                   &uidum,
-                   &uidum,
-                   &uidum,
-                   &uidum);
+     XGetGeometry(_ecore_x_disp,
+                  win,
+                  &root,
+                  &idum,
+                  &idum,
+                  &uidum,
+                  &uidum,
+                  &uidum,
+                  &uidum);
 
    xev.xunmap.type = UnmapNotify;
    xev.xunmap.serial = 0;
@@ -483,7 +500,9 @@ ecore_x_window_hide(Ecore_X_Window win)
  * @ingroup Ecore_X_Window_Geometry_Group
  */
 EAPI void
-ecore_x_window_move(Ecore_X_Window win, int x, int y)
+ecore_x_window_move(Ecore_X_Window win,
+                    int            x,
+                    int            y)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    XMoveWindow(_ecore_x_disp, win, x, y);
@@ -497,14 +516,16 @@ ecore_x_window_move(Ecore_X_Window win, int x, int y)
  * @ingroup Ecore_X_Window_Geometry_Group
  */
 EAPI void
-ecore_x_window_resize(Ecore_X_Window win, int w, int h)
+ecore_x_window_resize(Ecore_X_Window win,
+                      int            w,
+                      int            h)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    if (w < 1)
-      w = 1;
+     w = 1;
 
    if (h < 1)
-      h = 1;
+     h = 1;
 
    XResizeWindow(_ecore_x_disp, win, w, h);
 } /* ecore_x_window_resize */
@@ -519,14 +540,18 @@ ecore_x_window_resize(Ecore_X_Window win, int w, int h)
  * @ingroup Ecore_X_Window_Geometry_Group
  */
 EAPI void
-ecore_x_window_move_resize(Ecore_X_Window win, int x, int y, int w, int h)
+ecore_x_window_move_resize(Ecore_X_Window win,
+                           int            x,
+                           int            y,
+                           int            w,
+                           int            h)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    if (w < 1)
-      w = 1;
+     w = 1;
 
    if (h < 1)
-      h = 1;
+     h = 1;
 
    XMoveResizeWindow(_ecore_x_disp, win, x, y, w, h);
 } /* ecore_x_window_move_resize */
@@ -547,7 +572,7 @@ ecore_x_window_focus(Ecore_X_Window win)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    if (win == 0)
-      win = DefaultRootWindow(_ecore_x_disp);  //   XSetInputFocus(_ecore_x_disp, win, RevertToNone, CurrentTime);
+     win = DefaultRootWindow(_ecore_x_disp);  //   XSetInputFocus(_ecore_x_disp, win, RevertToNone, CurrentTime);
 
 //   XSetInputFocus(_ecore_x_disp, win, RevertToPointerRoot, CurrentTime);
    XSetInputFocus(_ecore_x_disp, win, RevertToParent, CurrentTime);
@@ -560,11 +585,12 @@ ecore_x_window_focus(Ecore_X_Window win)
  * @ingroup Ecore_X_Window_Focus_Functions
  */
 EAPI void
-ecore_x_window_focus_at_time(Ecore_X_Window win, Ecore_X_Time t)
+ecore_x_window_focus_at_time(Ecore_X_Window win,
+                             Ecore_X_Time   t)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    if (win == 0)
-      win = DefaultRootWindow(_ecore_x_disp);  //   XSetInputFocus(_ecore_x_disp, win, RevertToNone, t);
+     win = DefaultRootWindow(_ecore_x_disp);  //   XSetInputFocus(_ecore_x_disp, win, RevertToNone, t);
 
 //   XSetInputFocus(_ecore_x_disp, win, PointerRoot, t);
    XSetInputFocus(_ecore_x_disp, win, RevertToParent, t);
@@ -639,7 +665,7 @@ ecore_x_window_reparent(Ecore_X_Window win,
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    if (new_parent == 0)
-      new_parent = DefaultRootWindow(_ecore_x_disp);
+     new_parent = DefaultRootWindow(_ecore_x_disp);
 
    XReparentWindow(_ecore_x_disp, win, new_parent, x, y);
 } /* ecore_x_window_reparent */
@@ -652,13 +678,15 @@ ecore_x_window_reparent(Ecore_X_Window win,
  * @ingroup Ecore_X_Window_Geometry_Group
  */
 EAPI void
-ecore_x_window_size_get(Ecore_X_Window win, int *w, int *h)
+ecore_x_window_size_get(Ecore_X_Window win,
+                        int           *w,
+                        int           *h)
 {
    int dummy_x, dummy_y;
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    if (win == 0)
-      win = DefaultRootWindow(_ecore_x_disp);
+     win = DefaultRootWindow(_ecore_x_disp);
 
    ecore_x_drawable_geometry_get(win, &dummy_x, &dummy_y, w, h);
 } /* ecore_x_window_size_get */
@@ -680,11 +708,15 @@ ecore_x_window_size_get(Ecore_X_Window win, int *w, int *h)
  * @ingroup Ecore_X_Window_Geometry_Group
  */
 EAPI void
-ecore_x_window_geometry_get(Ecore_X_Window win, int *x, int *y, int *w, int *h)
+ecore_x_window_geometry_get(Ecore_X_Window win,
+                            int           *x,
+                            int           *y,
+                            int           *w,
+                            int           *h)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    if (!win)
-      win = DefaultRootWindow(_ecore_x_disp);
+     win = DefaultRootWindow(_ecore_x_disp);
 
    ecore_x_drawable_geometry_get(win, x, y, w, h);
 } /* ecore_x_window_geometry_get */
@@ -701,7 +733,7 @@ ecore_x_window_border_width_get(Ecore_X_Window win)
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    /* doesn't make sense to call this on a root window */
    if (!win)
-      return 0;
+     return 0;
 
    return ecore_x_drawable_border_width_get(win);
 } /* ecore_x_window_border_width_get */
@@ -713,12 +745,13 @@ ecore_x_window_border_width_get(Ecore_X_Window win)
  * @ingroup Ecore_X_Window_Geometry_Group
  */
 EAPI void
-ecore_x_window_border_width_set(Ecore_X_Window win, int width)
+ecore_x_window_border_width_set(Ecore_X_Window win,
+                                int            width)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    /* doesn't make sense to call this on a root window */
    if (!win)
-      return;
+     return;
 
    XSetWindowBorderWidth (_ecore_x_disp, win, width);
 } /* ecore_x_window_border_width_set */
@@ -741,11 +774,12 @@ ecore_x_window_depth_get(Ecore_X_Window win)
  * FIXME: To be fixed.
  */
 EAPI void
-ecore_x_window_cursor_show(Ecore_X_Window win, Eina_Bool show)
+ecore_x_window_cursor_show(Ecore_X_Window win,
+                           Eina_Bool      show)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    if (win == 0)
-      win = DefaultRootWindow(_ecore_x_disp);
+     win = DefaultRootWindow(_ecore_x_disp);
 
    if (!show)
      {
@@ -768,17 +802,18 @@ ecore_x_window_cursor_show(Ecore_X_Window win, Eina_Bool show)
         XFreePixmap(_ecore_x_disp, m);
      }
    else
-      XDefineCursor(_ecore_x_disp, win, 0);
+     XDefineCursor(_ecore_x_disp, win, 0);
 } /* ecore_x_window_cursor_show */
 
 EAPI void
-ecore_x_window_cursor_set(Ecore_X_Window win, Ecore_X_Cursor c)
+ecore_x_window_cursor_set(Ecore_X_Window win,
+                          Ecore_X_Cursor c)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    if (c == 0)
-      XUndefineCursor(_ecore_x_disp, win);
+     XUndefineCursor(_ecore_x_disp, win);
    else
-      XDefineCursor(_ecore_x_disp, win, c);
+     XDefineCursor(_ecore_x_disp, win, c);
 } /* ecore_x_window_cursor_set */
 
 /**
@@ -793,11 +828,11 @@ ecore_x_window_visible_get(Ecore_X_Window win)
    XWindowAttributes attr;
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
-   return (XGetWindowAttributes(_ecore_x_disp, win, &attr) &&
-           (attr.map_state == IsViewable));
+   return XGetWindowAttributes(_ecore_x_disp, win, &attr) &&
+          (attr.map_state == IsViewable);
 } /* ecore_x_window_visible_get */
 
-typedef struct _Shadow   Shadow;
+typedef struct _Shadow Shadow;
 struct _Shadow
 {
    Shadow        *parent;
@@ -821,14 +856,14 @@ _ecore_x_window_tree_walk(Window win)
    XWindowAttributes att;
 
    if (!XGetWindowAttributes(_ecore_x_disp, win, &att))
-      return NULL;  //   if (att.class == InputOnly) return NULL;
+     return NULL;  //   if (att.class == InputOnly) return NULL;
 
    if (att.map_state != IsViewable)
-      return NULL;
+     return NULL;
 
    s = calloc(1, sizeof(Shadow));
    if (!s)
-      return NULL;
+     return NULL;
 
    s->win = win;
    s->x = att.x;
@@ -847,7 +882,7 @@ _ecore_x_window_tree_walk(Window win)
                {
                   s->children[i] = _ecore_x_window_tree_walk(list[i]);
                   if (s->children[i])
-                     s->children[i]->parent = s;
+                    s->children[i]->parent = s;
                }
              /* compress list down */
              j = 0;
@@ -870,13 +905,13 @@ _ecore_x_window_tree_walk(Window win)
                   s->children_num = j;
                   sl = realloc(s->children, sizeof(Shadow *) * j);
                   if (sl)
-                     s->children = sl;
+                    s->children = sl;
                }
           }
      }
 
    if (list)
-      XFree(list);
+     XFree(list);
 
    return s;
 } /* _ecore_x_window_tree_walk */
@@ -887,14 +922,14 @@ _ecore_x_window_tree_shadow_free1(Shadow *s)
    int i;
 
    if (!s)
-      return;
+     return;
 
    if (s->children)
      {
         for (i = 0; i < s->children_num; i++)
           {
              if (s->children[i])
-                _ecore_x_window_tree_shadow_free1(s->children[i]);
+               _ecore_x_window_tree_shadow_free1(s->children[i]);
           }
         free(s->children);
      }
@@ -908,12 +943,12 @@ _ecore_x_window_tree_shadow_free(void)
    int i;
 
    if (!shadow_base)
-      return;
+     return;
 
    for (i = 0; i < shadow_num; i++)
      {
         if (!shadow_base[i])
-           continue;
+          continue;
 
         _ecore_x_window_tree_shadow_free1(shadow_base[i]);
      }
@@ -936,7 +971,7 @@ _ecore_x_window_tree_shadow_populate(void)
           {
              shadow_num = num;
              for (i = 0; i < num; i++)
-                shadow_base[i] = _ecore_x_window_tree_walk(roots[i]);
+               shadow_base[i] = _ecore_x_window_tree_walk(roots[i]);
           }
 
         free(roots);
@@ -964,24 +999,25 @@ _ecore_x_window_tree_shadow_populate(void)
  */
 
 static Shadow *
-_ecore_x_window_shadow_tree_find_shadow(Shadow *s, Window win)
+_ecore_x_window_shadow_tree_find_shadow(Shadow *s,
+                                        Window  win)
 {
    Shadow *ss;
    int i;
 
    if (s->win == win)
-      return s;
+     return s;
 
    if (s->children)
-      for (i = 0; i < s->children_num; i++)
-        {
-           if (!s->children[i])
-              continue;
+     for (i = 0; i < s->children_num; i++)
+       {
+          if (!s->children[i])
+            continue;
 
-           if ((ss =
-                   _ecore_x_window_shadow_tree_find_shadow(s->children[i], win)))
-              return ss;
-        }
+          if ((ss =
+                 _ecore_x_window_shadow_tree_find_shadow(s->children[i], win)))
+            return ss;
+       }
 
    return NULL;
 } /* _ecore_x_window_shadow_tree_find_shadow */
@@ -995,26 +1031,32 @@ _ecore_x_window_shadow_tree_find(Window base)
    for (i = 0; i < shadow_num; i++)
      {
         if (!shadow_base[i])
-           continue;
+          continue;
 
         if ((s = _ecore_x_window_shadow_tree_find_shadow(shadow_base[i], base)))
-           return s;
+          return s;
      }
    return NULL;
 } /* _ecore_x_window_shadow_tree_find */
 
 static int
-_inside_rects(Shadow *s, int x, int y, int bx, int by, Ecore_X_Rectangle *rects, int num)
+_inside_rects(Shadow            *s,
+              int                x,
+              int                y,
+              int                bx,
+              int                by,
+              Ecore_X_Rectangle *rects,
+              int                num)
 {
    int i, inside;
-        
+
    if (!rects) return 0;
    inside = 0;
    for (i = 0; i < num; i++)
      {
-        if ((x >= s->x + bx + rects[i].x) && 
-            (y >= s->y + by + rects[i].y) && 
-            (x < (int)(s->x + bx + rects[i].x + rects[i].width)) && 
+        if ((x >= s->x + bx + rects[i].x) &&
+            (y >= s->y + by + rects[i].y) &&
+            (x < (int)(s->x + bx + rects[i].x + rects[i].width)) &&
             (y < (int)(s->y + by + rects[i].y + rects[i].height)))
           {
              inside = 1;
@@ -1041,20 +1083,20 @@ _ecore_x_window_shadow_tree_at_xy_get_shadow(Shadow         *s,
    wx = s->x + bx;
    wy = s->y + by;
    if (!((x >= wx) && (y >= wy) && (x < (wx + s->w)) && (y < (wy + s->h))))
-      return 0;
-   
+     return 0;
+
    /* FIXME: get shape */
-     {
-        int num;
-        Ecore_X_Rectangle *rects;
-
-        num = 0;
-        rects = ecore_x_window_shape_rectangles_get(s->win, &num);
-        if (!_inside_rects(s, x, y, bx, by, rects, num)) return 0;
-        num = 0;
-        rects = ecore_x_window_shape_input_rectangles_get(s->win, &num);
-        if (!_inside_rects(s, x, y, bx, by, rects, num)) return 0;
-     }
+   {
+      int num;
+      Ecore_X_Rectangle *rects;
+
+      num = 0;
+      rects = ecore_x_window_shape_rectangles_get(s->win, &num);
+      if (!_inside_rects(s, x, y, bx, by, rects, num)) return 0;
+      num = 0;
+      rects = ecore_x_window_shape_input_rectangles_get(s->win, &num);
+      if (!_inside_rects(s, x, y, bx, by, rects, num)) return 0;
+   }
 
    if (s->children)
      {
@@ -1063,29 +1105,28 @@ _ecore_x_window_shadow_tree_at_xy_get_shadow(Shadow         *s,
         for (i = s->children_num - 1; i >= 0; --i)
           {
              if (!s->children[i])
-                continue;
+               continue;
 
              skipit = 0;
              if (skip)
-                for (j = 0; j < skip_num; j++)
-                  {
-                     if (s->children[i]->win == skip[j])
-                       {
-                          skipit = 1;
-                          goto onward;
-                       }
-                  }
+               for (j = 0; j < skip_num; j++)
+                 {
+                    if (s->children[i]->win == skip[j])
+                      {
+                         skipit = 1;
+                         goto onward;
+                      }
+                 }
 
 onward:
              if (!skipit)
-                if ((child =
-                        _ecore_x_window_shadow_tree_at_xy_get_shadow(s->
-                                                                     children[i
-                                                                     ], wx, wy,
-                                                                     x, y, skip,
-                                                                     skip_num)))
-                   return child;
-
+               if ((child =
+                      _ecore_x_window_shadow_tree_at_xy_get_shadow(s->
+                                                                   children[i
+                                                                   ], wx, wy,
+                                                                   x, y, skip,
+                                                                   skip_num)))
+                 return child;
           }
      }
 
@@ -1093,8 +1134,13 @@ onward:
 } /* _ecore_x_window_shadow_tree_at_xy_get_shadow */
 
 static Window
-_ecore_x_window_shadow_tree_at_xy_get(Window base, int bx, int by, int x, int y,
-                                      Ecore_X_Window *skip, int skip_num)
+_ecore_x_window_shadow_tree_at_xy_get(Window          base,
+                                      int             bx,
+                                      int             by,
+                                      int             x,
+                                      int             y,
+                                      Ecore_X_Window *skip,
+                                      int             skip_num)
 {
    Shadow *s;
 
@@ -1102,12 +1148,12 @@ _ecore_x_window_shadow_tree_at_xy_get(Window base, int bx, int by, int x, int y,
      {
         _ecore_x_window_tree_shadow_populate();
         if (!shadow_base)
-           return 0;
+          return 0;
      }
 
    s = _ecore_x_window_shadow_tree_find(base);
    if (!s)
-      return 0;
+     return 0;
 
    return _ecore_x_window_shadow_tree_at_xy_get_shadow(s,
                                                        bx,
@@ -1157,7 +1203,7 @@ ecore_x_window_shadow_tree_at_xy_with_skip_get(Ecore_X_Window  base,
  */
 EAPI Ecore_X_Window
 ecore_x_window_shadow_parent_get(Ecore_X_Window root __UNUSED__,
-                                 Ecore_X_Window      win)
+                                 Ecore_X_Window win)
 {
    Shadow *s;
    int i;
@@ -1167,19 +1213,19 @@ ecore_x_window_shadow_parent_get(Ecore_X_Window root __UNUSED__,
      {
         _ecore_x_window_tree_shadow_populate();
         if (!shadow_base)
-           return 0;
+          return 0;
      }
 
    for (i = 0; i < shadow_num; i++)
      {
         if (!shadow_base[i])
-           continue;
+          continue;
 
         s = _ecore_x_window_shadow_tree_find_shadow(shadow_base[i], win);
         if (s)
           {
              if (!s->parent)
-                return 0;
+               return 0;
 
              return s->parent->win;
           }
@@ -1211,14 +1257,19 @@ ecore_x_window_root_get(Ecore_X_Window win)
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    if (!XGetWindowAttributes(_ecore_x_disp, win, &att))
-      return 0;
+     return 0;
 
    return att.root;
 } /* ecore_x_window_root_get */
 
 static Window
-_ecore_x_window_at_xy_get(Window base, int bx, int by, int x, int y,
-                          Ecore_X_Window *skip, int skip_num)
+_ecore_x_window_at_xy_get(Window          base,
+                          int             bx,
+                          int             by,
+                          int             x,
+                          int             y,
+                          Ecore_X_Window *skip,
+                          int             skip_num)
 {
    Window *list = NULL;
    Window parent_win = 0, child = 0, root_win = 0;
@@ -1227,7 +1278,7 @@ _ecore_x_window_at_xy_get(Window base, int bx, int by, int x, int y,
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    if (!ecore_x_window_visible_get(base))
-      return 0;
+     return 0;
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    ecore_x_window_geometry_get(base, &wx, &wy, &ww, &wh);
@@ -1235,11 +1286,11 @@ _ecore_x_window_at_xy_get(Window base, int bx, int by, int x, int y,
    wy += by;
 
    if (!((x >= wx) && (y >= wy) && (x < (wx + ww)) && (y < (wy + wh))))
-      return 0;
+     return 0;
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    if (!XQueryTree(_ecore_x_disp, base, &root_win, &parent_win, &list, &num))
-      return base;
+     return base;
 
    if (list)
      {
@@ -1250,25 +1301,24 @@ _ecore_x_window_at_xy_get(Window base, int bx, int by, int x, int y,
              skipit = 0;
 
              if (skip)
-                for (j = 0; j < skip_num; j++)
-                  {
-                     if (list[i] == skip[j])
-                       {
-                          skipit = 1;
-                          goto onward;
-                       }
-                  }
+               for (j = 0; j < skip_num; j++)
+                 {
+                    if (list[i] == skip[j])
+                      {
+                         skipit = 1;
+                         goto onward;
+                      }
+                 }
 
 onward:
              if (!skipit)
-                if ((child =
-                        _ecore_x_window_at_xy_get(list[i], wx, wy, x, y, skip,
-                                                  skip_num)))
-                  {
-                     XFree(list);
-                     return child;
-                  }
-
+               if ((child =
+                      _ecore_x_window_at_xy_get(list[i], wx, wy, x, y, skip,
+                                                skip_num)))
+                 {
+                    XFree(list);
+                    return child;
+                 }
           }
         XFree(list);
      }
@@ -1284,7 +1334,8 @@ onward:
  * @ingroup Ecore_X_Window_Geometry_Group
  */
 EAPI Ecore_X_Window
-ecore_x_window_at_xy_get(int x, int y)
+ecore_x_window_at_xy_get(int x,
+                         int y)
 {
    Ecore_X_Window win, root;
 
@@ -1329,7 +1380,9 @@ ecore_x_window_at_xy_with_skip_get(int             x,
 } /* ecore_x_window_at_xy_with_skip_get */
 
 EAPI Ecore_X_Window
-ecore_x_window_at_xy_begin_get(Ecore_X_Window begin, int x, int y)
+ecore_x_window_at_xy_begin_get(Ecore_X_Window begin,
+                               int            x,
+                               int            y)
 {
    Ecore_X_Window win;
 
@@ -1355,10 +1408,10 @@ ecore_x_window_parent_get(Ecore_X_Window win)
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    if (!XQueryTree(_ecore_x_disp, win, &root, &parent, &children, &num))
-      return 0;
+     return 0;
 
    if (children)
-      XFree(children);
+     XFree(children);
 
    return parent;
 } /* ecore_x_window_parent_get */
@@ -1371,8 +1424,10 @@ ecore_x_window_parent_get(Ecore_X_Window win)
  * @param b     blue value (0...65536, 16 bits)
  */
 EAPI void
-ecore_x_window_background_color_set(Ecore_X_Window win, unsigned short r,
-                                    unsigned short g, unsigned short b)
+ecore_x_window_background_color_set(Ecore_X_Window win,
+                                    unsigned short r,
+                                    unsigned short g,
+                                    unsigned short b)
 {
    XSetWindowAttributes attr;
    Colormap map;
@@ -1391,7 +1446,8 @@ ecore_x_window_background_color_set(Ecore_X_Window win, unsigned short r,
 } /* ecore_x_window_background_color_set */
 
 EAPI void
-ecore_x_window_gravity_set(Ecore_X_Window win, Ecore_X_Gravity grav)
+ecore_x_window_gravity_set(Ecore_X_Window  win,
+                           Ecore_X_Gravity grav)
 {
    XSetWindowAttributes att;
 
@@ -1401,7 +1457,8 @@ ecore_x_window_gravity_set(Ecore_X_Window win, Ecore_X_Gravity grav)
 } /* ecore_x_window_gravity_set */
 
 EAPI void
-ecore_x_window_pixel_gravity_set(Ecore_X_Window win, Ecore_X_Gravity grav)
+ecore_x_window_pixel_gravity_set(Ecore_X_Window  win,
+                                 Ecore_X_Gravity grav)
 {
    XSetWindowAttributes att;
 
@@ -1411,28 +1468,38 @@ ecore_x_window_pixel_gravity_set(Ecore_X_Window win, Ecore_X_Gravity grav)
 } /* ecore_x_window_pixel_gravity_set */
 
 EAPI void
-ecore_x_window_pixmap_set(Ecore_X_Window win, Ecore_X_Pixmap pmap)
+ecore_x_window_pixmap_set(Ecore_X_Window win,
+                          Ecore_X_Pixmap pmap)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    XSetWindowBackgroundPixmap(_ecore_x_disp, win, pmap);
 } /* ecore_x_window_pixmap_set */
 
 EAPI void
-ecore_x_window_area_clear(Ecore_X_Window win, int x, int y, int w, int h)
+ecore_x_window_area_clear(Ecore_X_Window win,
+                          int            x,
+                          int            y,
+                          int            w,
+                          int            h)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    XClearArea(_ecore_x_disp, win, x, y, w, h, False);
 } /* ecore_x_window_area_clear */
 
 EAPI void
-ecore_x_window_area_expose(Ecore_X_Window win, int x, int y, int w, int h)
+ecore_x_window_area_expose(Ecore_X_Window win,
+                           int            x,
+                           int            y,
+                           int            w,
+                           int            h)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    XClearArea(_ecore_x_disp, win, x, y, w, h, True);
 } /* ecore_x_window_area_expose */
 
 EAPI void
-ecore_x_window_override_set(Ecore_X_Window win, Eina_Bool override)
+ecore_x_window_override_set(Ecore_X_Window win,
+                            Eina_Bool      override)
 {
    XSetWindowAttributes att;
 
@@ -1468,15 +1535,15 @@ _ecore_x_window_argb_internal_new(Ecore_X_Window parent,
    else
      {
         /* ewww - round trip */
-        XGetWindowAttributes(_ecore_x_disp, parent, &att);
-        for (i = 0; i < ScreenCount(_ecore_x_disp); i++)
-          {
-             if (att.screen == ScreenOfDisplay(_ecore_x_disp, i))
-               {
-                  scr = i;
-                  break;
-               }
-          }
+         XGetWindowAttributes(_ecore_x_disp, parent, &att);
+         for (i = 0; i < ScreenCount(_ecore_x_disp); i++)
+           {
+              if (att.screen == ScreenOfDisplay(_ecore_x_disp, i))
+                {
+                   scr = i;
+                   break;
+                }
+           }
      }
 
    vi_in.screen = scr;
@@ -1489,7 +1556,7 @@ _ecore_x_window_argb_internal_new(Ecore_X_Window parent,
                         &vi_in,
                         &nvi);
    if (!xvi)
-      return 0;
+     return 0;
 
    vis = NULL;
    for (i = 0; i < nvi; i++)
@@ -1514,18 +1581,18 @@ _ecore_x_window_argb_internal_new(Ecore_X_Window parent,
    attr.save_under = saveunder;
    attr.do_not_propagate_mask = NoEventMask;
    attr.event_mask = KeyPressMask |
-      KeyReleaseMask |
-      ButtonPressMask |
-      ButtonReleaseMask |
-      EnterWindowMask |
-      LeaveWindowMask |
-      PointerMotionMask |
-      ExposureMask |
-      VisibilityChangeMask |
-      StructureNotifyMask |
-      FocusChangeMask |
-      PropertyChangeMask |
-      ColormapChangeMask;
+     KeyReleaseMask |
+     ButtonPressMask |
+     ButtonReleaseMask |
+     EnterWindowMask |
+     LeaveWindowMask |
+     PointerMotionMask |
+     ExposureMask |
+     VisibilityChangeMask |
+     StructureNotifyMask |
+     FocusChangeMask |
+     PropertyChangeMask |
+     ColormapChangeMask;
    win = XCreateWindow(_ecore_x_disp, parent,
                        x, y, w, h, 0,
                        32,
@@ -1545,7 +1612,7 @@ _ecore_x_window_argb_internal_new(Ecore_X_Window parent,
    XFreeColormap(_ecore_x_disp, attr.colormap);
 
    if (parent == DefaultRootWindow(_ecore_x_disp))
-      ecore_x_window_defaults_set(win);
+     ecore_x_window_defaults_set(win);
 
    return win;
 } /* _ecore_x_window_argb_internal_new */
@@ -1561,14 +1628,14 @@ ecore_x_window_argb_get(Ecore_X_Window win)
 
    att.visual = 0;
    if (!XGetWindowAttributes(_ecore_x_disp, win, &att))
-      return 0;
+     return 0;
 
    fmt = XRenderFindVisualFormat(_ecore_x_disp, att.visual);
    if (!fmt)
-      return 0;
+     return 0;
 
    if ((fmt->type == PictTypeDirect) && (fmt->direct.alphaMask))
-      return 1;
+     return 1;
 
    return 0;
 #else /* ifdef ECORE_XRENDER */
@@ -1614,7 +1681,11 @@ ecore_x_window_manager_argb_new(Ecore_X_Window parent,
  * @ingroup Ecore_X_Window_Create_Group
  */
 EAPI Ecore_X_Window
-ecore_x_window_argb_new(Ecore_X_Window parent, int x, int y, int w, int h)
+ecore_x_window_argb_new(Ecore_X_Window parent,
+                        int            x,
+                        int            y,
+                        int            w,
+                        int            h)
 {
 #ifdef ECORE_XRENDER
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
index 82e35a8..b838299 100644 (file)
 #include <inttypes.h>
 #include <limits.h>
 
-#define _ATOM_SET_CARD32(win, atom, p_val, cnt)\
-   XChangeProperty(_ecore_x_disp, win, atom, XA_CARDINAL, 32, PropModeReplace,\
-                   (unsigned char *)p_val, cnt)
+#define _ATOM_SET_CARD32(win, atom, p_val, cnt)                               \
+  XChangeProperty(_ecore_x_disp, win, atom, XA_CARDINAL, 32, PropModeReplace, \
+                  (unsigned char *)p_val, cnt)
 
 /*
  * Set CARD32 (array) property
  */
 EAPI void
-ecore_x_window_prop_card32_set(Ecore_X_Window win, Ecore_X_Atom atom,
-                               unsigned int *val, unsigned int num)
+ecore_x_window_prop_card32_set(Ecore_X_Window win,
+                               Ecore_X_Atom   atom,
+                               unsigned int  *val,
+                               unsigned int   num)
 {
 #if SIZEOF_INT == SIZEOF_LONG
    _ATOM_SET_CARD32(win, atom, val, num);
@@ -32,10 +34,10 @@ ecore_x_window_prop_card32_set(Ecore_X_Window win, Ecore_X_Atom atom,
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    v2 = malloc(num * sizeof(long));
    if (!v2)
-      return;
+     return;
 
    for (i = 0; i < num; i++)
-      v2[i] = val[i];
+     v2[i] = val[i];
    _ATOM_SET_CARD32(win, atom, v2, num);
    free(v2);
 #endif /* if SIZEOF_INT == SIZEOF_LONG */
@@ -50,8 +52,10 @@ ecore_x_window_prop_card32_set(Ecore_X_Window win, Ecore_X_Atom atom,
  * Note: Return value 0 means that the property exists but has no elements.
  */
 EAPI int
-ecore_x_window_prop_card32_get(Ecore_X_Window win, Ecore_X_Atom atom,
-                               unsigned int *val, unsigned int len)
+ecore_x_window_prop_card32_get(Ecore_X_Window win,
+                               Ecore_X_Atom   atom,
+                               unsigned int  *val,
+                               unsigned int   len)
 {
    unsigned char *prop_ret;
    Atom type_ret;
@@ -65,24 +69,24 @@ ecore_x_window_prop_card32_get(Ecore_X_Window win, Ecore_X_Atom atom,
    if (XGetWindowProperty(_ecore_x_disp, win, atom, 0, 0x7fffffff, False,
                           XA_CARDINAL, &type_ret, &format_ret, &num_ret,
                           &bytes_after, &prop_ret) != Success)
-      return -1;
+     return -1;
 
    if (type_ret != XA_CARDINAL || format_ret != 32)
-      num = -1;
+     num = -1;
    else if (num_ret == 0 || !prop_ret)
-      num = 0;
+     num = 0;
    else
      {
         if (num_ret < len)
-           len = num_ret;
+          len = num_ret;
 
         for (i = 0; i < len; i++)
-           val[i] = ((unsigned long *)prop_ret)[i];
+          val[i] = ((unsigned long *)prop_ret)[i];
         num = len;
      }
 
    if (prop_ret)
-      XFree(prop_ret);
+     XFree(prop_ret);
 
    return num;
 } /* ecore_x_window_prop_card32_get */
@@ -95,7 +99,8 @@ ecore_x_window_prop_card32_get(Ecore_X_Window win, Ecore_X_Atom atom,
  * Note: Return value 0 means that the property exists but has no elements.
  */
 EAPI int
-ecore_x_window_prop_card32_list_get(Ecore_X_Window win, Ecore_X_Atom atom,
+ecore_x_window_prop_card32_list_get(Ecore_X_Window win,
+                                    Ecore_X_Atom   atom,
                                     unsigned int **plst)
 {
    unsigned char *prop_ret;
@@ -111,23 +116,23 @@ ecore_x_window_prop_card32_list_get(Ecore_X_Window win, Ecore_X_Atom atom,
    if (XGetWindowProperty(_ecore_x_disp, win, atom, 0, 0x7fffffff, False,
                           XA_CARDINAL, &type_ret, &format_ret, &num_ret,
                           &bytes_after, &prop_ret) != Success)
-      return -1;
+     return -1;
 
    if (type_ret != XA_CARDINAL || format_ret != 32)
-      num = -1;
+     num = -1;
    else if (num_ret == 0 || !prop_ret)
-      num = 0;
+     num = 0;
    else
      {
         val = malloc(num_ret * sizeof(unsigned int));
         for (i = 0; i < num_ret; i++)
-           val[i] = ((unsigned long *)prop_ret)[i];
+          val[i] = ((unsigned long *)prop_ret)[i];
         num = num_ret;
         *plst = val;
      }
 
    if (prop_ret)
-      XFree(prop_ret);
+     XFree(prop_ret);
 
    return num;
 } /* ecore_x_window_prop_card32_list_get */
@@ -136,9 +141,11 @@ ecore_x_window_prop_card32_list_get(Ecore_X_Window win, Ecore_X_Atom atom,
  * Set X ID (array) property
  */
 EAPI void
-ecore_x_window_prop_xid_set(Ecore_X_Window win, Ecore_X_Atom atom,
-                            Ecore_X_Atom type, Ecore_X_ID *lst,
-                            unsigned int num)
+ecore_x_window_prop_xid_set(Ecore_X_Window win,
+                            Ecore_X_Atom   atom,
+                            Ecore_X_Atom   type,
+                            Ecore_X_ID    *lst,
+                            unsigned int   num)
 {
 #if SIZEOF_INT == SIZEOF_LONG
    XChangeProperty(_ecore_x_disp, win, atom, type, 32, PropModeReplace,
@@ -150,10 +157,10 @@ ecore_x_window_prop_xid_set(Ecore_X_Window win, Ecore_X_Atom atom,
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    pl = malloc(num * sizeof(long));
    if (!pl)
-      return;
+     return;
 
    for (i = 0; i < num; i++)
-      pl[i] = lst[i];
+     pl[i] = lst[i];
    XChangeProperty(_ecore_x_disp, win, atom, type, 32, PropModeReplace,
                    (unsigned char *)pl, num);
    free(pl);
@@ -169,9 +176,11 @@ ecore_x_window_prop_xid_set(Ecore_X_Window win, Ecore_X_Atom atom,
  * Note: Return value 0 means that the property exists but has no elements.
  */
 EAPI int
-ecore_x_window_prop_xid_get(Ecore_X_Window win, Ecore_X_Atom atom,
-                            Ecore_X_Atom type, Ecore_X_ID *lst,
-                            unsigned int len)
+ecore_x_window_prop_xid_get(Ecore_X_Window win,
+                            Ecore_X_Atom   atom,
+                            Ecore_X_Atom   type,
+                            Ecore_X_ID    *lst,
+                            unsigned int   len)
 {
    unsigned char *prop_ret;
    Atom type_ret;
@@ -185,24 +194,24 @@ ecore_x_window_prop_xid_get(Ecore_X_Window win, Ecore_X_Atom atom,
    if (XGetWindowProperty(_ecore_x_disp, win, atom, 0, 0x7fffffff, False,
                           type, &type_ret, &format_ret, &num_ret,
                           &bytes_after, &prop_ret) != Success)
-      return -1;
+     return -1;
 
    if (type_ret != type || format_ret != 32)
-      num = -1;
+     num = -1;
    else if (num_ret == 0 || !prop_ret)
-      num = 0;
+     num = 0;
    else
      {
         if (num_ret < len)
-           len = num_ret;
+          len = num_ret;
 
         for (i = 0; i < len; i++)
-           lst[i] = ((unsigned long *)prop_ret)[i];
+          lst[i] = ((unsigned long *)prop_ret)[i];
         num = len;
      }
 
    if (prop_ret)
-      XFree(prop_ret);
+     XFree(prop_ret);
 
    return num;
 } /* ecore_x_window_prop_xid_get */
@@ -216,8 +225,10 @@ ecore_x_window_prop_xid_get(Ecore_X_Window win, Ecore_X_Atom atom,
  * Note: Return value 0 means that the property exists but has no elements.
  */
 EAPI int
-ecore_x_window_prop_xid_list_get(Ecore_X_Window win, Ecore_X_Atom atom,
-                                 Ecore_X_Atom type, Ecore_X_ID **val)
+ecore_x_window_prop_xid_list_get(Ecore_X_Window win,
+                                 Ecore_X_Atom   atom,
+                                 Ecore_X_Atom   type,
+                                 Ecore_X_ID   **val)
 {
    unsigned char *prop_ret;
    Atom type_ret;
@@ -233,23 +244,23 @@ ecore_x_window_prop_xid_list_get(Ecore_X_Window win, Ecore_X_Atom atom,
    if (XGetWindowProperty(_ecore_x_disp, win, atom, 0, 0x7fffffff, False,
                           type, &type_ret, &format_ret, &num_ret,
                           &bytes_after, &prop_ret) != Success)
-      return -1;
+     return -1;
 
    if (type_ret != type || format_ret != 32)
-      num = -1;
+     num = -1;
    else if (num_ret == 0 || !prop_ret)
-      num = 0;
+     num = 0;
    else
      {
         alst = malloc(num_ret * sizeof(Ecore_X_ID));
         for (i = 0; i < num_ret; i++)
-           alst[i] = ((unsigned long *)prop_ret)[i];
+          alst[i] = ((unsigned long *)prop_ret)[i];
         num = num_ret;
         *val = alst;
      }
 
    if (prop_ret)
-      XFree(prop_ret);
+     XFree(prop_ret);
 
    return num;
 } /* ecore_x_window_prop_xid_list_get */
@@ -258,8 +269,11 @@ ecore_x_window_prop_xid_list_get(Ecore_X_Window win, Ecore_X_Atom atom,
  * Remove/add/toggle X ID list item.
  */
 EAPI void
-ecore_x_window_prop_xid_list_change(Ecore_X_Window win, Ecore_X_Atom atom,
-                                    Ecore_X_Atom type, Ecore_X_ID item, int op)
+ecore_x_window_prop_xid_list_change(Ecore_X_Window win,
+                                    Ecore_X_Atom   atom,
+                                    Ecore_X_Atom   type,
+                                    Ecore_X_ID     item,
+                                    int            op)
 {
    Ecore_X_ID *lst;
    int i, num;
@@ -275,43 +289,45 @@ ecore_x_window_prop_xid_list_change(Ecore_X_Window win, Ecore_X_Atom atom,
    for (i = 0; i < num; i++)
      {
         if (lst[i] == item)
-           break;
+          break;
      }
 
    if (i < num)
      {
         /* Was in list */
-        if (op == ECORE_X_PROP_LIST_ADD)
+         if (op == ECORE_X_PROP_LIST_ADD)
            goto done;  /* Remove it */
 
-        num--;
-        for (; i < num; i++)
+         num--;
+         for (; i < num; i++)
            lst[i] = lst[i + 1];
      }
    else
      {
         /* Was not in list */
-        if (op == ECORE_X_PROP_LIST_REMOVE)
+         if (op == ECORE_X_PROP_LIST_REMOVE)
            goto done;  /* Add it */
 
-        num++;
-        lst = realloc(lst, num * sizeof(Ecore_X_ID));
-        lst[i] = item;
+         num++;
+         lst = realloc(lst, num * sizeof(Ecore_X_ID));
+         lst[i] = item;
      }
 
    ecore_x_window_prop_xid_set(win, atom, type, lst, num);
 
 done:
    if (lst)
-      free(lst);
+     free(lst);
 } /* ecore_x_window_prop_xid_list_change */
 
 /*
  * Set Atom (array) property
  */
 EAPI void
-ecore_x_window_prop_atom_set(Ecore_X_Window win, Ecore_X_Atom atom,
-                             Ecore_X_Atom *lst, unsigned int num)
+ecore_x_window_prop_atom_set(Ecore_X_Window win,
+                             Ecore_X_Atom   atom,
+                             Ecore_X_Atom  *lst,
+                             unsigned int   num)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    ecore_x_window_prop_xid_set(win, atom, XA_ATOM, lst, num);
@@ -326,8 +342,10 @@ ecore_x_window_prop_atom_set(Ecore_X_Window win, Ecore_X_Atom atom,
  * Note: Return value 0 means that the property exists but has no elements.
  */
 EAPI int
-ecore_x_window_prop_atom_get(Ecore_X_Window win, Ecore_X_Atom atom,
-                             Ecore_X_Atom *lst, unsigned int len)
+ecore_x_window_prop_atom_get(Ecore_X_Window win,
+                             Ecore_X_Atom   atom,
+                             Ecore_X_Atom  *lst,
+                             unsigned int   len)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    return ecore_x_window_prop_xid_get(win, atom, XA_ATOM, lst, len);
@@ -342,7 +360,8 @@ ecore_x_window_prop_atom_get(Ecore_X_Window win, Ecore_X_Atom atom,
  * Note: Return value 0 means that the property exists but has no elements.
  */
 EAPI int
-ecore_x_window_prop_atom_list_get(Ecore_X_Window win, Ecore_X_Atom atom,
+ecore_x_window_prop_atom_list_get(Ecore_X_Window win,
+                                  Ecore_X_Atom   atom,
                                   Ecore_X_Atom **plst)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
@@ -353,8 +372,10 @@ ecore_x_window_prop_atom_list_get(Ecore_X_Window win, Ecore_X_Atom atom,
  * Remove/add/toggle atom list item.
  */
 EAPI void
-ecore_x_window_prop_atom_list_change(Ecore_X_Window win, Ecore_X_Atom atom,
-                                     Ecore_X_Atom item, int op)
+ecore_x_window_prop_atom_list_change(Ecore_X_Window win,
+                                     Ecore_X_Atom   atom,
+                                     Ecore_X_Atom   item,
+                                     int            op)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    ecore_x_window_prop_xid_list_change(win, atom, XA_ATOM, item, op);
@@ -364,8 +385,10 @@ ecore_x_window_prop_atom_list_change(Ecore_X_Window win, Ecore_X_Atom atom,
  * Set Window (array) property
  */
 EAPI void
-ecore_x_window_prop_window_set(Ecore_X_Window win, Ecore_X_Atom atom,
-                               Ecore_X_Window *lst, unsigned int num)
+ecore_x_window_prop_window_set(Ecore_X_Window  win,
+                               Ecore_X_Atom    atom,
+                               Ecore_X_Window *lst,
+                               unsigned int    num)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    ecore_x_window_prop_xid_set(win, atom, XA_WINDOW, lst, num);
@@ -380,8 +403,10 @@ ecore_x_window_prop_window_set(Ecore_X_Window win, Ecore_X_Atom atom,
  * Note: Return value 0 means that the property exists but has no elements.
  */
 EAPI int
-ecore_x_window_prop_window_get(Ecore_X_Window win, Ecore_X_Atom atom,
-                               Ecore_X_Window *lst, unsigned int len)
+ecore_x_window_prop_window_get(Ecore_X_Window  win,
+                               Ecore_X_Atom    atom,
+                               Ecore_X_Window *lst,
+                               unsigned int    len)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    return ecore_x_window_prop_xid_get(win, atom, XA_WINDOW, lst, len);
@@ -396,7 +421,8 @@ ecore_x_window_prop_window_get(Ecore_X_Window win, Ecore_X_Atom atom,
  * Note: Return value 0 means that the property exists but has no elements.
  */
 EAPI int
-ecore_x_window_prop_window_list_get(Ecore_X_Window win, Ecore_X_Atom atom,
+ecore_x_window_prop_window_list_get(Ecore_X_Window   win,
+                                    Ecore_X_Atom     atom,
                                     Ecore_X_Window **plst)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
@@ -429,17 +455,17 @@ ecore_x_window_prop_property_set(Ecore_X_Window win,
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    if (win == 0)
-      win = DefaultRootWindow(_ecore_x_disp);
+     win = DefaultRootWindow(_ecore_x_disp);
 
    if (size != 32)
-      XChangeProperty(_ecore_x_disp,
-                      win,
-                      property,
-                      type,
-                      size,
-                      PropModeReplace,
-                      (unsigned char *)data,
-                      number);
+     XChangeProperty(_ecore_x_disp,
+                     win,
+                     property,
+                     type,
+                     size,
+                     PropModeReplace,
+                     (unsigned char *)data,
+                     number);
    else
      {
         unsigned long *dat;
@@ -465,7 +491,7 @@ EAPI int
 ecore_x_window_prop_property_get(Ecore_X_Window  win,
                                  Ecore_X_Atom    property,
                                  Ecore_X_Atom    type,
-                                 int size        __UNUSED__,
+                                 int             size __UNUSED__,
                                  unsigned char **data,
                                  int            *num)
 {
@@ -476,23 +502,23 @@ ecore_x_window_prop_property_get(Ecore_X_Window  win,
 
    /* make sure these are initialized */
    if (num)
-      *num = 0;
+     *num = 0;
 
    if (data)
-      *data = NULL;
+     *data = NULL;
    else /* we can't store the retrieved data, so just return */
-      return 0;
+     return 0;
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    if (!win)
-      win = DefaultRootWindow(_ecore_x_disp);
+     win = DefaultRootWindow(_ecore_x_disp);
 
    ret = XGetWindowProperty(_ecore_x_disp, win, property, 0, LONG_MAX,
                             False, type, &type_ret, &size_ret,
                             &num_ret, &bytes, &prop_ret);
 
    if (ret != Success)
-      return 0;
+     return 0;
 
    if (!num_ret)
      {
@@ -508,38 +534,40 @@ ecore_x_window_prop_property_get(Ecore_X_Window  win,
 
    switch (size_ret) {
       case 8:
-         for (i = 0; i < num_ret; i++)
-            (*data)[i] = prop_ret[i];
-         break;
+        for (i = 0; i < num_ret; i++)
+          (*data)[i] = prop_ret[i];
+        break;
 
       case 16:
-         for (i = 0; i < num_ret; i++)
-            ((unsigned short *)*data)[i] = ((unsigned short *)prop_ret)[i];
-         break;
+        for (i = 0; i < num_ret; i++)
+          ((unsigned short *)*data)[i] = ((unsigned short *)prop_ret)[i];
+        break;
 
       case 32:
-         for (i = 0; i < num_ret; i++)
-            ((unsigned int *)*data)[i] = ((unsigned long *)prop_ret)[i];
-         break;
+        for (i = 0; i < num_ret; i++)
+          ((unsigned int *)*data)[i] = ((unsigned long *)prop_ret)[i];
+        break;
      } /* switch */
 
    XFree(prop_ret);
 
    if (num)
-      *num = num_ret;
+     *num = num_ret;
 
    return size_ret;
 } /* ecore_x_window_prop_property_get */
 
 EAPI void
-ecore_x_window_prop_property_del(Ecore_X_Window win, Ecore_X_Atom property)
+ecore_x_window_prop_property_del(Ecore_X_Window win,
+                                 Ecore_X_Atom   property)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    XDeleteProperty(_ecore_x_disp, win, property);
 } /* ecore_x_window_prop_property_del */
 
 EAPI Ecore_X_Atom *
-ecore_x_window_prop_list(Ecore_X_Window win, int *num_ret)
+ecore_x_window_prop_list(Ecore_X_Window win,
+                         int           *num_ret)
 {
    Ecore_X_Atom *atoms;
    Atom *atom_ret;
@@ -547,18 +575,18 @@ ecore_x_window_prop_list(Ecore_X_Window win, int *num_ret)
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    if (num_ret)
-      *num_ret = 0;
+     *num_ret = 0;
 
    atom_ret = XListProperties(_ecore_x_disp, win, &num);
    if (!atom_ret)
-      return NULL;
+     return NULL;
 
    atoms = malloc(num * sizeof(Ecore_X_Atom));
    if (atoms)
      {
         for (i = 0; i < num; i++) atoms[i] = atom_ret[i];
         if (num_ret)
-           *num_ret = num;
+          *num_ret = num;
      }
 
    XFree(atom_ret);
@@ -582,7 +610,7 @@ ecore_x_window_prop_string_set(Ecore_X_Window win,
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    if (win == 0)
-      win = DefaultRootWindow(_ecore_x_disp);
+     win = DefaultRootWindow(_ecore_x_disp);
 
    xtp.value = (unsigned char *)str;
    xtp.format = 8;
@@ -599,14 +627,15 @@ ecore_x_window_prop_string_set(Ecore_X_Window win,
  * Return window string property of a window. String must be free'd when done.
  */
 EAPI char *
-ecore_x_window_prop_string_get(Ecore_X_Window win, Ecore_X_Atom type)
+ecore_x_window_prop_string_get(Ecore_X_Window win,
+                               Ecore_X_Atom   type)
 {
    XTextProperty xtp;
    char *str = NULL;
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    if (win == 0)
-      win = DefaultRootWindow(_ecore_x_disp);
+     win = DefaultRootWindow(_ecore_x_disp);
 
    if (XGetTextProperty(_ecore_x_disp, win, &xtp, type))
      {
@@ -615,7 +644,7 @@ ecore_x_window_prop_string_get(Ecore_X_Window win, Ecore_X_Atom type)
         Status s;
 
         if (xtp.encoding == ECORE_X_ATOM_UTF8_STRING)
-           str = strdup((char *)xtp.value);
+          str = strdup((char *)xtp.value);
         else
           {
 #ifdef X_HAVE_UTF8_STRING
@@ -627,12 +656,12 @@ ecore_x_window_prop_string_get(Ecore_X_Window win, Ecore_X_Atom type)
 #endif /* ifdef X_HAVE_UTF8_STRING */
              if ((s == XLocaleNotSupported) ||
                  (s == XNoMemory) || (s == XConverterNotFound))
-                str = strdup((char *)xtp.value);
+               str = strdup((char *)xtp.value);
              else if ((s >= Success) && (items > 0))
-                str = strdup(list[0]);
+               str = strdup(list[0]);
 
              if (list)
-                XFreeStringList(list);
+               XFreeStringList(list);
           }
 
         XFree(xtp.value);
@@ -651,20 +680,20 @@ ecore_x_window_prop_protocol_isset(Ecore_X_Window      win,
 
    /* check for invalid values */
    if (protocol >= ECORE_X_WM_PROTOCOL_NUM)
-      return EINA_FALSE;
+     return EINA_FALSE;
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    proto = _ecore_x_atoms_wm_protocols[protocol];
 
    if (!XGetWMProtocols(_ecore_x_disp, win, &protos, &protos_count))
-      return ret;
+     return ret;
 
    for (i = 0; i < protos_count; i++)
-      if (protos[i] == proto)
-        {
-           ret = EINA_TRUE;
-           break;
-        }
+     if (protos[i] == proto)
+       {
+          ret = EINA_TRUE;
+          break;
+       }
 
    XFree(protos);
 
@@ -677,7 +706,8 @@ ecore_x_window_prop_protocol_isset(Ecore_X_Window      win,
  * FIXME: To be fixed.
  */
 EAPI Ecore_X_WM_Protocol *
-ecore_x_window_prop_protocol_list_get(Ecore_X_Window win, int *num_ret)
+ecore_x_window_prop_protocol_list_get(Ecore_X_Window win,
+                                      int           *num_ret)
 {
    Atom *protos = NULL;
    int i, protos_count = 0;
@@ -685,10 +715,10 @@ ecore_x_window_prop_protocol_list_get(Ecore_X_Window win, int *num_ret)
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    if (!XGetWMProtocols(_ecore_x_disp, win, &protos, &protos_count))
-      return NULL;
+     return NULL;
 
    if ((!protos) || (protos_count <= 0))
-      return NULL;
+     return NULL;
 
    prot_ret = calloc(1, protos_count * sizeof(Ecore_X_WM_Protocol));
    if (!prot_ret)
@@ -705,7 +735,7 @@ ecore_x_window_prop_protocol_list_get(Ecore_X_Window win, int *num_ret)
         for (j = 0; j < ECORE_X_WM_PROTOCOL_NUM; j++)
           {
              if (_ecore_x_atoms_wm_protocols[j] == protos[i])
-                prot_ret[i] = j;
+               prot_ret[i] = j;
           }
      }
    XFree(protos);
index 6bbc864..2e8f8ce 100644 (file)
@@ -23,7 +23,8 @@
  * @ingroup Ecore_X_Window_Shape
  */
 EAPI void
-ecore_x_window_shape_mask_set(Ecore_X_Window win, Ecore_X_Pixmap mask)
+ecore_x_window_shape_mask_set(Ecore_X_Window win,
+                              Ecore_X_Pixmap mask)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    XShapeCombineMask(_ecore_x_disp, win, ShapeBounding, 0, 0, mask, ShapeSet);
@@ -37,11 +38,12 @@ ecore_x_window_shape_mask_set(Ecore_X_Window win, Ecore_X_Pixmap mask)
  * @ingroup Ecore_X_Window_Shape
  */
 EAPI void
-ecore_x_window_shape_input_mask_set(Ecore_X_Window win, Ecore_X_Pixmap mask)
+ecore_x_window_shape_input_mask_set(Ecore_X_Window win,
+                                    Ecore_X_Pixmap mask)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
 #ifdef ShapeInput
-   XShapeCombineMask(_ecore_x_disp, win, ShapeInput,    0, 0, mask, ShapeSet);
+   XShapeCombineMask(_ecore_x_disp, win, ShapeInput, 0, 0, mask, ShapeSet);
 #else /* ifdef ShapeInput */
    return;
    win = mask = 0;
@@ -49,7 +51,8 @@ ecore_x_window_shape_input_mask_set(Ecore_X_Window win, Ecore_X_Pixmap mask)
 } /* ecore_x_window_shape_input_mask_set */
 
 EAPI void
-ecore_x_window_shape_window_set(Ecore_X_Window win, Ecore_X_Window shape_win)
+ecore_x_window_shape_window_set(Ecore_X_Window win,
+                                Ecore_X_Window shape_win)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    XShapeCombineShape(_ecore_x_disp,
@@ -310,7 +313,8 @@ ecore_x_window_shape_input_rectangle_subtract(Ecore_X_Window win,
 } /* ecore_x_window_shape_input_rectangle_subtract */
 
 EAPI void
-ecore_x_window_shape_window_add(Ecore_X_Window win, Ecore_X_Window shape_win)
+ecore_x_window_shape_window_add(Ecore_X_Window win,
+                                Ecore_X_Window shape_win)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    XShapeCombineShape(_ecore_x_disp,
@@ -546,7 +550,8 @@ ecore_x_window_shape_input_rectangles_add(Ecore_X_Window     win,
 } /* ecore_x_window_shape_input_rectangles_add */
 
 EAPI Ecore_X_Rectangle *
-ecore_x_window_shape_rectangles_get(Ecore_X_Window win, int *num_ret)
+ecore_x_window_shape_rectangles_get(Ecore_X_Window win,
+                                    int           *num_ret)
 {
    XRectangle *rect;
    Ecore_X_Rectangle *rects = NULL;
@@ -583,7 +588,8 @@ ecore_x_window_shape_rectangles_get(Ecore_X_Window win, int *num_ret)
 } /* ecore_x_window_shape_rectangles_get */
 
 EAPI Ecore_X_Rectangle *
-ecore_x_window_shape_input_rectangles_get(Ecore_X_Window win, int *num_ret)
+ecore_x_window_shape_input_rectangles_get(Ecore_X_Window win,
+                                          int           *num_ret)
 {
    Ecore_X_Rectangle *rects = NULL;
 #ifdef ShapeInput
@@ -622,7 +628,7 @@ ecore_x_window_shape_input_rectangles_get(Ecore_X_Window win, int *num_ret)
    // have to return fake shape input rect of size of window
    Window dw;
    unsigned int di;
-   
+
    if (num_ret) *num_ret = 0;
    rects = malloc(sizeof(Ecore_X_Rectangle));
    if (!rects) return NULL;
@@ -640,11 +646,13 @@ ecore_x_window_shape_input_rectangles_get(Ecore_X_Window win, int *num_ret)
 } /* ecore_x_window_shape_input_rectangles_get */
 
 EAPI void
-ecore_x_window_shape_events_select(Ecore_X_Window win, Eina_Bool on)
+ecore_x_window_shape_events_select(Ecore_X_Window win,
+                                   Eina_Bool      on)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    if (on)
-      XShapeSelectInput(_ecore_x_disp, win, ShapeNotifyMask);
+     XShapeSelectInput(_ecore_x_disp, win, ShapeNotifyMask);
    else
-      XShapeSelectInput(_ecore_x_disp, win, 0);
+     XShapeSelectInput(_ecore_x_disp, win, 0);
 } /* ecore_x_window_shape_events_select */
+
index 8c0611d..38a81dd 100644 (file)
 
 int _ecore_x_xi2_opcode = -1;
 
+#ifndef XIPointerEmulated
+#define XIPointerEmulated (1 << 16)
+#endif
+
 #ifdef ECORE_XI2
 static XIDeviceInfo *_ecore_x_xi2_devs = NULL;
 static int _ecore_x_xi2_num = 0;
@@ -65,64 +69,142 @@ _ecore_x_input_handler(XEvent *xevent)
 #ifdef ECORE_XI2
    XIDeviceEvent *evd = (XIDeviceEvent *)(xevent->xcookie.data);
    int devid = evd->deviceid;
+   int i;
+
+   if (_ecore_x_xi2_devs)
+     {
+        for (i = 0; i < _ecore_x_xi2_num; i++)
+          {
+             XIDeviceInfo *dev = &(_ecore_x_xi2_devs[i]);
 
-   //printf("deviceID = %d\n", devid);
+             if (devid == dev->deviceid)
+               {
+                  if (dev->use == XIMasterPointer) return;
+                  if ((dev->use == XISlavePointer) &&
+                      (evd->flags & XIPointerEmulated)) return;
+               }
+          }
+     }
    switch (xevent->xcookie.evtype)
      {
       case XI_Motion:
-         _ecore_mouse_move
-            (evd->time,
-            0, // state
-            evd->event_x, evd->event_y,
-            evd->root_x, evd->root_y,
-            evd->event,
-            (evd->child ? evd->child : evd->event),
-            evd->root,
-            1, // same_screen
-            devid, 1, 1,
-            1.0, // pressure
-            0.0, // angle
-            evd->event_x, evd->event_y,
-            evd->root_x, evd->root_y);
-         break;
+        _ecore_mouse_move
+          (evd->time,
+          0,   // state
+          evd->event_x, evd->event_y,
+          evd->root_x, evd->root_y,
+          evd->event,
+          (evd->child ? evd->child : evd->event),
+          evd->root,
+          1,   // same_screen
+          devid, 1, 1,
+          1.0,   // pressure
+          0.0,   // angle
+          evd->event_x, evd->event_y,
+          evd->root_x, evd->root_y);
+        break;
 
       case XI_ButtonPress:
-         _ecore_mouse_button
-            (ECORE_EVENT_MOUSE_BUTTON_DOWN,
-            evd->time,
-            0, // state
-            0, // button
-            evd->event_x, evd->event_y,
-            evd->root_x, evd->root_y,
-            evd->event,
-            (evd->child ? evd->child : evd->event),
-            evd->root,
-            1, // same_screen
-            devid, 1, 1,
-            1.0, // pressure
-            0.0, // angle
-            evd->event_x, evd->event_y,
-            evd->root_x, evd->root_y);
-         break;
+        _ecore_mouse_button
+          (ECORE_EVENT_MOUSE_BUTTON_DOWN,
+          evd->time,
+          0,   // state
+          0,   // button
+          evd->event_x, evd->event_y,
+          evd->root_x, evd->root_y,
+          evd->event,
+          (evd->child ? evd->child : evd->event),
+          evd->root,
+          1,   // same_screen
+          devid, 1, 1,
+          1.0,   // pressure
+          0.0,   // angle
+          evd->event_x, evd->event_y,
+          evd->root_x, evd->root_y);
+        break;
 
       case XI_ButtonRelease:
-         _ecore_mouse_button
-            (ECORE_EVENT_MOUSE_BUTTON_UP,
-            evd->time,
-            0, // state
-            0, // button
-            evd->event_x, evd->event_y,
-            evd->root_x, evd->root_y,
-            evd->event,
-            (evd->child ? evd->child : evd->event),
-            evd->root,
-            1, // same_screen
-            devid, 1, 1,
-            1.0, // pressure
-            0.0, // angle
-            evd->event_x, evd->event_y,
-            evd->root_x, evd->root_y);
-         break;
+        _ecore_mouse_button
+          (ECORE_EVENT_MOUSE_BUTTON_UP,
+          evd->time,
+          0,   // state
+          0,   // button
+          evd->event_x, evd->event_y,
+          evd->root_x, evd->root_y,
+          evd->event,
+          (evd->child ? evd->child : evd->event),
+          evd->root,
+          1,   // same_screen
+          devid, 1, 1,
+          1.0,   // pressure
+          0.0,   // angle
+          evd->event_x, evd->event_y,
+          evd->root_x, evd->root_y);
+        break;
+
+#ifdef XI_TouchUpdate
+      case XI_TouchUpdate:
+        _ecore_mouse_move
+          (evd->time,
+          0,   // state
+          evd->event_x, evd->event_y,
+          evd->root_x, evd->root_y,
+          evd->event,
+          (evd->child ? evd->child : evd->event),
+          evd->root,
+          1,   // same_screen
+          devid, 1, 1,
+          1.0,   // pressure
+          0.0,   // angle
+          evd->event_x, evd->event_y,
+          evd->root_x, evd->root_y);
+        break;
+
+#endif
+#ifdef XI_TouchBegin
+      case XI_TouchBegin:
+        _ecore_mouse_button
+          (ECORE_EVENT_MOUSE_BUTTON_DOWN,
+          evd->time,
+          0,   // state
+          0,   // button
+          evd->event_x, evd->event_y,
+          evd->root_x, evd->root_y,
+          evd->event,
+          (evd->child ? evd->child : evd->event),
+          evd->root,
+          1,   // same_screen
+          devid, 1, 1,
+          1.0,   // pressure
+          0.0,   // angle
+          evd->event_x, evd->event_y,
+          evd->root_x, evd->root_y);
+        break;
+
+#endif
+#ifdef XI_TouchEnd
+      case XI_TouchEnd:
+        _ecore_mouse_button
+          (ECORE_EVENT_MOUSE_BUTTON_UP,
+          evd->time,
+          0,   // state
+          0,   // button
+          evd->event_x, evd->event_y,
+          evd->root_x, evd->root_y,
+          evd->event,
+          (evd->child ? evd->child : evd->event),
+          evd->root,
+          1,   // same_screen
+          devid, 1, 1,
+          1.0,   // pressure
+          0.0,   // angle
+          evd->event_x, evd->event_y,
+          evd->root_x, evd->root_y);
+        break;
+
+#endif
+      default:
+        break;
      } /* switch */
 #endif /* ifdef ECORE_XI2 */
 } /* _ecore_x_input_handler */
@@ -135,7 +217,7 @@ ecore_x_input_multi_select(Ecore_X_Window win)
    Eina_Bool find = EINA_FALSE;
 
    if (!_ecore_x_xi2_devs)
-      return 0;
+     return 0;
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    for (i = 0; i < _ecore_x_xi2_num; i++)
@@ -145,7 +227,7 @@ ecore_x_input_multi_select(Ecore_X_Window win)
         if (dev->use == XIFloatingSlave)
           {
              XIEventMask eventmask;
-             unsigned char mask[1] = { 0 };
+             unsigned char mask[4] = { 0 };
 
              eventmask.deviceid = dev->deviceid;
              eventmask.mask_len = sizeof(mask);
@@ -156,6 +238,41 @@ ecore_x_input_multi_select(Ecore_X_Window win)
              XISelectEvents(_ecore_x_disp, win, &eventmask, 1);
              find = EINA_TRUE;
           }
+        else if (dev->use == XISlavePointer)
+          {
+             XIDeviceInfo *atdev = NULL;
+             int j;
+
+             for (j = 0; j < _ecore_x_xi2_num; j++)
+               {
+                  if (_ecore_x_xi2_devs[j].deviceid == dev->attachment)
+                    atdev = &(_ecore_x_xi2_devs[j]);
+               }
+             if (((atdev) && (atdev->use != XIMasterPointer)) ||
+                 (!atdev))
+               {
+                  XIEventMask eventmask;
+                  unsigned char mask[4] = { 0 };
+
+                  eventmask.deviceid = dev->deviceid;
+                  eventmask.mask_len = sizeof(mask);
+                  eventmask.mask = mask;
+                  XISetMask(mask, XI_ButtonPress);
+                  XISetMask(mask, XI_ButtonRelease);
+                  XISetMask(mask, XI_Motion);
+# ifdef XI_TouchUpdate
+                  XISetMask(mask, XI_TouchUpdate);
+# endif
+# ifdef XI_TouchBegin
+                  XISetMask(mask, XI_TouchBegin);
+# endif
+# ifdef XI_TouchEnd
+                  XISetMask(mask, XI_TouchEnd);
+# endif
+                  XISelectEvents(_ecore_x_disp, win, &eventmask, 1);
+                  find = EINA_TRUE;
+               }
+          }
      }
 
    return find;
index 18b1385..1d956b7 100644 (file)
@@ -24,14 +24,14 @@ ecore_x_xinerama_screen_count_get(void)
 
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    if (_xin_info)
-      XFree(_xin_info);
+     XFree(_xin_info);
 
    _xin_info = NULL;
    if (XineramaQueryExtension(_ecore_x_disp, &event_base, &error_base))
      {
         _xin_info = XineramaQueryScreens(_ecore_x_disp, &_xin_scr_num);
         if (_xin_info)
-           return _xin_scr_num;
+          return _xin_scr_num;
      }
 
 #endif /* ifdef ECORE_XINERAMA */
@@ -39,7 +39,11 @@ ecore_x_xinerama_screen_count_get(void)
 } /* ecore_x_xinerama_screen_count_get */
 
 EAPI Eina_Bool
-ecore_x_xinerama_screen_geometry_get(int screen, int *x, int *y, int *w, int *h)
+ecore_x_xinerama_screen_geometry_get(int  screen,
+                                     int *x,
+                                     int *y,
+                                     int *w,
+                                     int *h)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
 #ifdef ECORE_XINERAMA
@@ -52,16 +56,16 @@ ecore_x_xinerama_screen_geometry_get(int screen, int *x, int *y, int *w, int *h)
              if (_xin_info[i].screen_number == screen)
                {
                   if (x)
-                     *x = _xin_info[i].x_org;
+                    *x = _xin_info[i].x_org;
 
                   if (y)
-                     *y = _xin_info[i].y_org;
+                    *y = _xin_info[i].y_org;
 
                   if (w)
-                     *w = _xin_info[i].width;
+                    *w = _xin_info[i].width;
 
                   if (h)
-                     *h = _xin_info[i].height;
+                    *h = _xin_info[i].height;
 
                   return EINA_TRUE;
                }
@@ -70,16 +74,16 @@ ecore_x_xinerama_screen_geometry_get(int screen, int *x, int *y, int *w, int *h)
 
 #endif /* ifdef ECORE_XINERAMA */
    if (x)
-      *x = 0;
+     *x = 0;
 
    if (y)
-      *y = 0;
+     *y = 0;
 
    if (w)
-      *w = DisplayWidth(_ecore_x_disp, 0);
+     *w = DisplayWidth(_ecore_x_disp, 0);
 
    if (h)
-      *h = DisplayHeight(_ecore_x_disp, 0);
+     *h = DisplayHeight(_ecore_x_disp, 0);
 
    return EINA_FALSE;
    screen = 0;