* Improve callbacks in ecore_evas to use typedefs for readability.
+2012-02-20 Cedric Bail
+
+ * Rewrite internal of Ecore_Thread to use Eina_Lock and ecore_main_loop_thread_safe_call_async.
+
2012-02-23 Cedric Bail
* Move to Evas buffer engine for Ecore_Evas SDL software backend.
query a sequence of keysyms for a final compose string (utf8)
that you free if you get it.
+2012-07-02 Mike Blumenkrantz
+
+ * Fix crash which occurred in ecore-con when dns resolution failed
+ immediately due to lack of connectivity
+
+2012-07-03 Cedric Bail
+
+ * Fix unitialized use of Ecore_X_Atom.
+
+2012-07-03 Christopher Michael
+
+ * Merge Tizen EFL changes to upsteam.
+ * Add ecore_evas functions to get/set profiles
+ * Fix GL buffer. some GL drivers are doing buffer copy in a separate thread.
+ we need to check whether GL driver sends SYNC_DRAW_DONE msg afger copying
+ that are required in order to exactly render. - added by gl77.lee
+ * Add Ecore_X atoms for Illume Rotate Window
+ * Add event callbacks for Ecore_Imf Input Panel
+ * Add functions to retrieve input panel geometry & state from Ecore_Imf.
+
+2012-07-05 Carsten Haitzler (The Rasterman)
+
+ * Add ecore_evas_screen_dpi_get()
+ * Fix ecore_evas_screen_geometry_get(0 for x11 to return zone
+ pos/size as it should.
+ * Fix ecore-fb to use key repeat like x so apps dont break in fb
+ * Fix ecore-fb string lookup table to include ctrl+keys
+ * Fix ecore-fb to trap sigint (ctrl+c) so it doesnt exit your fb app
+ * Fix ecore-fb mouse to swap button 2 and 3 ro work right.
+
+2012-07-13 Jiyoun Park
+
+ * Fix bug in Ecore_extn to call pre/post render function
+
+2012-07-16 Carsten Haitzler (The Rasterman)
+
+ * Fix ecore-x selection handling to fall back to getting
+ selection directly if getting targets fails. This fixes e17 to
+ elm cnp.
+
+2012-08-01 Mike Blumenkrantz
+
+ * Add ecore_main_fd_handler_file_add() for integrating file descriptors
+ from regular files into the main loop
+
+2012-08-01 Rob Bradford
+
+ * Support setting fullscreen on Ecore_Evas's under the Wayland engine
+ before they are visible. The fullscreening will then be applied when
+ they become visible.
+
+2012-08-01 Rob Bradford
+
+ * Use libxkbcommon function to map keysym to unicode characters in the
+ Wayland backend. Removing the need to have our own function to do this
+ and increasing the range of supported keysms. Fixes #1105.
+
+2012-08-03 Rob Bradford
+
+ * In the Wayland backend handle the case that events can be received
+ for surfaces that have been since destroyed - the client side
+ marshaller changes the pointer to NULL to when the object is destroyed
+ on the client side. Fixes #1258.
+
+2012-08-09 Cedric Bail
+
+ * Correctly shutdown Ecore_Thread.
--------------------------
Additions:
+ * ecore:
+ - Add ecore_main_fd_handler_file_add()
* ecore_evas:
- Add transparency support on Windows (GDI engine only)
- * ecore_x:
- - Add Ecore_X_Error_Code enumeration
+ - Add API functions to get/set an Ecore_Evas's profile.
* ecore_x:
+ - Add Ecore_X_Error_Code enumeration
- ECORE_X_RANDR_OUTPUT_POLICY_ASK
+ - Add API functions to get/set an Ecore_X window's profile
* ecore_con:
- ECORE_{CON,IPC}_NO_PROXY now available for disabling proxying on certain connections
- New dns.c resolver backend for faster dns lookups
- Reduce race condition on shutdown of Ecore_Thread.
- Force cancel of all running Ecore_Thread on shutdown.
- Make Ecore_Thread work reliably when called without a running main loop.
+ - Correctly shutdown Ecore_Thread.
+
+ * ecore_x
+ - Fix unitialized Ecore_X_Atom use.
Ecore 1.2.0
- certificates can now be added for STARTTTLS
* ecore_win32:
- fix modifiers value on Windows XP
+ * ecore_thread:
+ - use eina_lock
+ - use Ecore thread safe async call
* ecore_evas:
- use Evas buffer backend for SDL software engine
- clean up ecore-evas-buffer code somewhat
-Ecore 1.2.0
+Ecore 1.7.0
******************************************************************************
##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
m4_define([v_maj], [1])
-m4_define([v_min], [2])
+m4_define([v_min], [6])
m4_define([v_mic], [99])
m4_define([v_rev], m4_esyscmd([(svnversion "${SVN_REPO_PATH:-.}" | grep -v '\(export\|Unversioned directory\)' || echo 0) | awk -F : '{printf("%s\n", $1);}' | tr -d ' :MSP\n' | sed 's/Unversioneddirectory/0/' | tr -d '\n']))
m4_if(v_rev, [0], [m4_define([v_rev], m4_esyscmd([git log 2> /dev/null | (grep -m1 git-svn-id || echo 0) | sed -e 's/.*@\([0-9]*\).*/\1/' | tr -d '\n']))])
case "$host_os" in
mingw*)
- PKG_CHECK_MODULES([EVIL], [evil >= 1.0.0])
+ PKG_CHECK_MODULES([EVIL], [evil >= 1.6.99])
AC_DEFINE(HAVE_EVIL, 1, [Set to 1 if Evil library is installed])
requirements_ecore="evil ${requirements_ecore}"
requirements_ecore_evas="evil ${requirements_ecore_evas}"
# Eina library
-PKG_CHECK_MODULES(EINA, [eina >= 1.2.0])
+PKG_CHECK_MODULES(EINA, [eina >= 1.6.99])
#FIXME check all the requirements when the eina move will be finished
-requirements_ecore="eina >= 1.2.0 ${requirements_ecore}"
-requirements_ecore_con="ecore >= 1.2.0 eina >= 1.2.0 ${requirements_ecore_con}"
-#requirements_ecore_config="ecore >= 1.2.0 eina >= 1.2.0 ${requirements_ecore_config}"
-requirements_ecore_directfb="ecore >= 1.2.0 eina >= 1.2.0 ${requirements_ecore_directfb}"
-requirements_ecore_evas="ecore >= 1.2.0 eina >= 1.2.0 ${requirements_ecore_evas}"
-requirements_ecore_fb="ecore >= 1.2.0 eina >= 1.2.0 ${requirements_ecore_fb}"
-requirements_ecore_file="ecore >= 1.2.0 eina >= 1.2.0 ${requirements_ecore_file}"
-requirements_ecore_imf="ecore >= 1.2.0 eina >= 1.2.0 ${requirements_ecore_imf}"
-requirements_ecore_imf_evas="ecore >= 1.2.0 eina >= 1.2.0 ${requirements_ecore_imf_evas}"
-requirements_ecore_input="ecore >= 1.2.0 eina >= 1.2.0 ${requirements_ecore_input}"
-requirements_ecore_input_evas="ecore >= 1.2.0 eina >= 1.2.0 ${requirements_ecore_input_evas}"
-requirements_ecore_ipc="ecore >= 1.2.0 eina >= 1.2.0 ${requirements_ecore_ipc}"
-requirements_ecore_cocoa="ecore >= 1.2.0 eina >= 1.2.0 ${requirements_ecore_cocoa}"
-requirements_ecore_sdl="ecore >= 1.2.0 eina >= 1.2.0 ${requirements_ecore_sdl}"
-requirements_ecore_psl1ght="ecore >= 1.2.0 eina >= 1.2.0 ${requirements_ecore_sdl}"
-requirements_ecore_win32="ecore >= 1.2.0 eina >= 1.2.0 ${requirements_ecore_win32}"
-requirements_ecore_wince="ecore >= 1.2.0 eina >= 1.2.0 ${requirements_ecore_wince}"
-requirements_ecore_x="ecore >= 1.2.0 eina >= 1.2.0 ${requirements_ecore_x}"
+requirements_ecore="eina >= 1.6.99 ${requirements_ecore}"
+requirements_ecore_con="ecore >= 1.6.99 eina >= 1.6.99 ${requirements_ecore_con}"
+#requirements_ecore_config="ecore >= 1.6.99 eina >= 1.6.99 ${requirements_ecore_config}"
+requirements_ecore_directfb="ecore >= 1.6.99 eina >= 1.6.99 ${requirements_ecore_directfb}"
+requirements_ecore_evas="ecore >= 1.6.99 eina >= 1.6.99 ${requirements_ecore_evas}"
+requirements_ecore_fb="ecore >= 1.6.99 eina >= 1.6.99 ${requirements_ecore_fb}"
+requirements_ecore_file="ecore >= 1.6.99 eina >= 1.6.99 ${requirements_ecore_file}"
+requirements_ecore_imf="ecore >= 1.6.99 eina >= 1.6.99 ${requirements_ecore_imf}"
+requirements_ecore_imf_evas="ecore >= 1.6.99 eina >= 1.6.99 ${requirements_ecore_imf_evas}"
+requirements_ecore_input="ecore >= 1.6.99 eina >= 1.6.99 ${requirements_ecore_input}"
+requirements_ecore_input_evas="ecore >= 1.6.99 eina >= 1.6.99 ${requirements_ecore_input_evas}"
+requirements_ecore_ipc="ecore >= 1.6.99 eina >= 1.6.99 ${requirements_ecore_ipc}"
+requirements_ecore_cocoa="ecore >= 1.6.99 eina >= 1.6.99 ${requirements_ecore_cocoa}"
+requirements_ecore_sdl="ecore >= 1.6.99 eina >= 1.6.99 ${requirements_ecore_sdl}"
+requirements_ecore_psl1ght="ecore >= 1.6.99 eina >= 1.6.99 ${requirements_ecore_sdl}"
+requirements_ecore_win32="ecore >= 1.6.99 eina >= 1.6.99 ${requirements_ecore_win32}"
+requirements_ecore_wince="ecore >= 1.6.99 eina >= 1.6.99 ${requirements_ecore_wince}"
+requirements_ecore_x="ecore >= 1.6.99 eina >= 1.6.99 ${requirements_ecore_x}"
# glib support (main loop integration)
# Eet library (ecore_config)
#PKG_CHECK_MODULES([EET],
-# [eet >= 1.4.0],
+# [eet >= 1.6.99],
# [have_eet="yes"],
# [have_eet="no"])
# Evas library (ecore_config, ecore_input_evas, ecore_imf_evas and ecore_evas)
-PKG_CHECK_MODULES([EVAS], [evas >= 1.2.0],
+PKG_CHECK_MODULES([EVAS], [evas >= 1.6.99],
[have_evas="yes"],
[have_evas="no"])
# ecore_ipc
ECORE_CHECK_MODULE([ipc], [${want_ecore_ipc}], [Ipc], [${have_ecore_con}],
[
- requirements_ecore_ipc="ecore-con >= 1.2.0 ${requirements_ecore_ipc}"
- requirements_ecore_evas="ecore-ipc >= 1.2.0 ${requirements_ecore_evas}"
+ requirements_ecore_ipc="ecore-con >= 1.6.99 ${requirements_ecore_ipc}"
+ requirements_ecore_evas="ecore-ipc >= 1.6.99 ${requirements_ecore_evas}"
])
# ecore_file
ECORE_CHECK_NOTIFY_WIN32([${want_notify_win32}], [have_notify_win32="yes"], [have_notify_win32="no"])
if test "x${have_ecore_con}" = "xyes" ; then
- requirements_ecore_file="ecore-con >= 1.2.0 ${requirements_ecore_file}"
+ requirements_ecore_file="ecore-con >= 1.6.99 ${requirements_ecore_file}"
else
ECORE_CHECK_CURL([${want_curl}],
[
#fi
#ECORE_CHECK_MODULE([config], [${want_ecore_config}], [Config], [${ecore_config_deps}],
-# [requirements_ecore_config="ecore-ipc >= 1.2.0 evas >= 1.2.0 eet >= 1.6.0 ${requirements_ecore_config}"])
+# [requirements_ecore_config="ecore-ipc >= 1.6.99 evas >= 1.6.99 eet >= 1.6.99 ${requirements_ecore_config}"])
AM_CONDITIONAL(BUILD_ECORE_CONFIG, false)
fi
ECORE_CHECK_MODULE([imf-evas], [${want_ecore_imf}], [Imf_Evas], [${ecore_imf_evas_deps}],
- [requirements_ecore_imf_evas="ecore-imf >= 1.2.0 evas >= 1.2.0 ${requirements_ecore_imf_evas}"])
+ [requirements_ecore_imf_evas="ecore-imf >= 1.6.99 evas >= 1.6.99 ${requirements_ecore_imf_evas}"])
# ecore_input{_evas}
ECORE_CHECK_MODULE([input], [${want_ecore_input}], [Input])
ECORE_CHECK_MODULE([input-evas], [${want_ecore_input}], [Input_Evas], [${have_evas}],
- [requirements_ecore_input_evas="ecore-input >= 1.2.0 evas >= 1.2.0 ${requirements_ecore_input}"])
+ [requirements_ecore_input_evas="ecore-input >= 1.6.99 evas >= 1.6.99 ${requirements_ecore_input}"])
# ecore_imf_xim
AM_CONDITIONAL(BUILD_ECORE_IMF_XIM, false)
fi
ECORE_CHECK_MODULE([imf-xim], [${want_ecore_imf}], [Imf_XIM], [${ecore_imf_xim_deps}],
- [requirements_ecore_imf_xim="ecore-imf >= 1.2.0 ecore-x >= 1.2.0 ecore-input >= 1.2.0 ${requirements_ecore_imf_xim}"])
+ [requirements_ecore_imf_xim="ecore-imf >= 1.6.99 ecore-x >= 1.6.99 ecore-input >= 1.6.99 ${requirements_ecore_imf_xim}"])
# ecore_imf_scim
PKG_CHECK_MODULES([SCIM], [scim], [have_scim="yes"], [have_scim="no"])
fi
ECORE_CHECK_MODULE([imf-scim], [${want_ecore_imf}], [Imf_SCIM], [${ecore_imf_scim_deps}],
- [requirements_ecore_imf_scim="ecore-imf >= 1.2.0 ecore-x >= 1.2.0 ecore-input >= 1.2.0 ${requirements_ecore_imf_scim}"])
+ [requirements_ecore_imf_scim="ecore-imf >= 1.6.99 ecore-x >= 1.6.99 ecore-input >= 1.6.99 ${requirements_ecore_imf_scim}"])
+
+# ecore_imf_ibus
+PKG_CHECK_MODULES([IBUS], [ibus-1.0 >= 1.4], [have_ibus="yes"], [have_ibus="no"])
+
+AM_CONDITIONAL(BUILD_ECORE_IMF_IBUS, false)
+ecore_imf_ibus_deps="no"
+echo "have_ecore_x_xlib: ${have_ecore_x_xlib}"
+if test "x${have_ecore_imf}" = "xyes" \
+ -a "x${have_glib}" = "xyes" \
+ -a "x${have_ibus}" = "xyes" \
+ -a "x${have_ecore_input}" = "xyes" ; then
+ ecore_imf_ibus_deps="yes"
+ AC_DEFINE(BUILD_ECORE_IMF_IBUS, 1, [Ecore Imf IBUS Support])
+fi
+
+ECORE_CHECK_MODULE([imf-ibus], [${want_ecore_imf}], [Imf_IBUS], [${ecore_imf_ibus_deps}],
+ [requirements_ecore_imf_ibus="ecore-imf >= 1.6.99 ecore-x >= 1.6.99 ecore-input >= 1.6.99 ${requirements_ecore_imf_ibus}"])
# ecore_imf_ibus
PKG_CHECK_MODULES([IBUS], [ibus-1.0 >= 1.3.99], [have_ibus="yes"], [have_ibus="no"])
ECORE_CHECK_MODULE([x], [${want_ecore_x}], [X], [${ecore_x_deps}],
[
ecore_x_libs="$ecore_x_libs $x_libs"
- requirements_ecore_x="ecore-input >= 1.2.0 ${requirements_ecore_x}"
+ requirements_ecore_x="ecore-input >= 1.6.99 ${requirements_ecore_x}"
])
# ecore_win32
ECORE_CHECK_MODULE([win32], [${want_ecore_win32}], [Win32], [${have_ecore_input}],
[
ecore_win32_libs="-lole32 -lgdi32"
- requirements_ecore_win32="ecore-input >= 1.2.0 ${requirements_ecore_win32}"
+ requirements_ecore_win32="ecore-input >= 1.6.99 ${requirements_ecore_win32}"
])
AC_SUBST(ecore_win32_libs)
fi
ECORE_CHECK_MODULE([cocoa], [${want_ecore_cocoa}], [Cocoa], [${ecore_cocoa_deps}],
- [requirements_ecore_cocoa="ecore-input >= 1.2.0 ${requirements_ecore_cocoa}"])
+ [requirements_ecore_cocoa="ecore-input >= 1.6.99 ${requirements_ecore_cocoa}"])
# ecore_sdl
fi
ECORE_CHECK_MODULE([sdl], [${want_ecore_sdl}], [Sdl], [${ecore_sdl_deps}],
- [requirements_ecore_sdl="ecore-input >= 1.2.0 ${requirements_ecore_sdl}"])
+ [requirements_ecore_sdl="ecore-input >= 1.6.99 ${requirements_ecore_sdl}"])
ECORE_CHECK_MODULE([psl1ght], [${want_ecore_psl1ght}], [psl1ght], [${ecore_psl1ght_deps}],
- [requirements_ecore_psl1ght="ecore-input >= 1.2.0 ${requirements_ecore_psl1ght}"])
+ [requirements_ecore_psl1ght="ecore-input >= 1.6.99 ${requirements_ecore_psl1ght}"])
# ecore_fb
ECORE_CHECK_MODULE([fb], [${want_ecore_fb}], [FB], [$have_fb])
# ecore_wince
ECORE_CHECK_MODULE([wince], [${want_ecore_wince}], [WinCE], [${have_ecore_input}],
- [requirements_ecore_win32="ecore-input >= 1.2.0 ${requirements_ecore_win32}"])
+ [requirements_ecore_win32="ecore-input >= 1.6.99 ${requirements_ecore_win32}"])
## Ecore Evas
fi
ECORE_CHECK_MODULE([evas], [${want_ecore_evas}], [Evas], [${ecore_evas_deps}],
- [requirements_ecore_evas="ecore-input >= 1.2.0 ecore-input-evas >= 1.2.0 evas >= 1.2.0 ${requirements_ecore_evas}"])
+ [requirements_ecore_evas="ecore-input >= 1.6.99 ecore-input-evas >= 1.6.99 evas >= 1.6.99 ${requirements_ecore_evas}"])
# ecore_evas_buffer
"x$have_ecore_evas_software_16_x11" = "xyes" -o \
"x$have_ecore_evas_software_xcb" = "xyes"; then
AC_DEFINE(BUILD_ECORE_EVAS_X11, 1, [Support for X Window Engines in Ecore_Evas])
- requirements_ecore_evas="ecore-x >= 1.2.0 ${requirements_ecore_evas}"
+ requirements_ecore_evas="ecore-x >= 1.6.99 ${requirements_ecore_evas}"
fi
# ecore_evas_win32
"x${have_ecore_evas_opengl_glew}" = "xyes" -o \
"x${have_ecore_evas_software_16_ddraw}" = "xyes" ; then
AC_DEFINE(BUILD_ECORE_EVAS_WIN32, 1, [Support for Win32 Engine in Ecore_Evas])
- requirements_ecore_evas="ecore-win32 >= 1.2.0 ${requirements_ecore_evas}"
+ requirements_ecore_evas="ecore-win32 >= 1.6.99 ${requirements_ecore_evas}"
fi
# ecore_evas_software_sdl
have_ecore_evas_software_sdl="no"
if test "x${have_ecore_sdl}" = "xyes"; then
- requirements_ecore_evas="ecore-sdl >= 1.2.0 ${requirements_ecore_evas}"
+ requirements_ecore_evas="ecore-sdl >= 1.6.99 ${requirements_ecore_evas}"
have_ecore_evas_software_sdl="yes"
AC_DEFINE(BUILD_ECORE_EVAS_SOFTWARE_SDL, 1, [Support for Software SDL Engine in Ecore_Evas])
- requirements_ecore_evas="ecore-sdl >= 1.2.0 ${requirements_ecore_evas}"
+ requirements_ecore_evas="ecore-sdl >= 1.6.99 ${requirements_ecore_evas}"
fi
# ecore_evas_gl_sdl
[${want_ecore_evas_gl_sdl}],
[OpenGL SDL],
[${have_ecore_sdl}],
- [requirements_ecore_evas="ecore-sdl >= 1.2.0 ${requirements_ecore_evas}"])
+ [requirements_ecore_evas="ecore-sdl >= 1.6.99 ${requirements_ecore_evas}"])
# ecore_evas_cocoa
[${want_ecore_evas_gl_cocoa}],
[OpenGL Cocoa],
[${have_ecore_cocoa}],
- [requirements_ecore_evas="ecore-cocoa >= 1.2.0 ${requirements_ecore_evas}"])
+ [requirements_ecore_evas="ecore-cocoa >= 1.6.99 ${requirements_ecore_evas}"])
# ecore_evas_directfb
[${want_ecore_evas_directfb}],
[DirectFB],
[${have_ecore_directfb}],
- [requirements_ecore_evas="ecore-directfb >= 1.2.0 ${requirements_ecore_evas}"])
+ [requirements_ecore_evas="ecore-directfb >= 1.6.99 ${requirements_ecore_evas}"])
# ecore_evas_fb
[${want_ecore_evas_fb}],
[Linux Framebuffer],
[${have_ecore_fb}],
- [requirements_ecore_evas="ecore-fb >= 1.2.0 ${requirements_ecore_evas}"])
+ [requirements_ecore_evas="ecore-fb >= 1.6.99 ${requirements_ecore_evas}"])
# ecore_evas_wince
[${want_ecore_evas_software_16_wince}],
[16 bpp Software Windows CE],
[${have_ecore_wince}],
- [requirements_ecore_evas="ecore-wince >= 1.2.0 ${requirements_ecore_evas}"])
+ [requirements_ecore_evas="ecore-wince >= 1.6.99 ${requirements_ecore_evas}"])
# ecore_evas_ews
[${want_ecore_evas_psl1ght}],
[PSL1GHT],
[${have_ecore_psl1ght}],
- [requirements_ecore_evas="ecore-psl1ght >= 1.2.0 ${requirements_ecore_evas}"])
+ [requirements_ecore_evas="ecore-psl1ght >= 1.6.99 ${requirements_ecore_evas}"])
### WAYLAND
ECORE_CHECK_MODULE([wayland], [${want_ecore_wayland}], [Wayland], [${ecore_wayland_deps}])
if test "x${have_ecore_wayland}" = "xyes" ; then
- requirements_ecore_wayland="ecore-input >= 1.1.0 wayland-client xkbcommon ${requirements_ecore_wayland}"
+ requirements_ecore_wayland="ecore-input >= 1.6.99 wayland-client xkbcommon ${requirements_ecore_wayland}"
fi
ECORE_EVAS_CHECK_MODULE_FULL([wayland-shm], [wayland-shm],
msgstr ""
"Project-Id-Version: ecore\n"
"Report-Msgid-Bugs-To: enlightenment-devel@lists.sourceforge.net\n"
-"POT-Creation-Date: 2012-04-26 13:55+0900\n"
+"POT-Creation-Date: 2012-07-09 19:11+0900\n"
"PO-Revision-Date: 2011-10-23 01:28+0100\n"
"Last-Translator: Daniel Kolesa <quaker66@gmail.com>\n"
"Language-Team: Czech <kde-i18n-doc@kde.org>\n"
msgstr ""
"Project-Id-Version: ecore 0.9.9.063-2\n"
"Report-Msgid-Bugs-To: enlightenment-devel@lists.sourceforge.net\n"
-"POT-Creation-Date: 2012-04-26 13:55+0900\n"
+"POT-Creation-Date: 2012-07-09 19:11+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"
msgstr ""
"Project-Id-Version: Ecore\n"
"Report-Msgid-Bugs-To: enlightenment-devel@lists.sourceforge.net\n"
-"POT-Creation-Date: 2012-04-26 13:55+0900\n"
+"POT-Creation-Date: 2012-07-09 19:11+0900\n"
"PO-Revision-Date: 2011-11-20 22:42+0200\n"
"Last-Translator: George Rizopoulos <george.rizopoulos.1@gmail.com>\n"
"Language-Team: Greek\n"
msgstr ""
"Project-Id-Version: Ecore\n"
"Report-Msgid-Bugs-To: enlightenment-devel@lists.sourceforge.net\n"
-"POT-Creation-Date: 2012-04-26 13:55+0900\n"
+"POT-Creation-Date: 2012-07-09 19:11+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"
msgstr ""
"Project-Id-Version: Ecore\n"
"Report-Msgid-Bugs-To: enlightenment-devel@lists.sourceforge.net\n"
-"POT-Creation-Date: 2012-04-26 13:55+0900\n"
+"POT-Creation-Date: 2012-07-09 19:11+0900\n"
"PO-Revision-Date: 2009-10-27 19:36+0100\n"
"Last-Translator: quaker66 <quaker66@gmail.com>\n"
"Language-Team: none\n"
msgstr ""
"Project-Id-Version: Ecore\n"
"Report-Msgid-Bugs-To: enlightenment-devel@lists.sourceforge.net\n"
-"POT-Creation-Date: 2012-04-26 13:55+0900\n"
+"POT-Creation-Date: 2012-07-09 19:11+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"
msgstr ""
"Project-Id-Version: ecore\n"
"Report-Msgid-Bugs-To: enlightenment-devel@lists.sourceforge.net\n"
-"POT-Creation-Date: 2012-04-26 13:55+0900\n"
+"POT-Creation-Date: 2012-07-09 19:11+0900\n"
"PO-Revision-Date: 2010-10-06 12:37-0000\n"
"Last-Translator: Sérgio Marques <smarquespt@gmail.com>\n"
"Language-Team: \n"
msgstr ""
"Project-Id-Version: ecore 1.0\n"
"Report-Msgid-Bugs-To: enlightenment-devel@lists.sourceforge.net\n"
-"POT-Creation-Date: 2012-04-26 13:55+0900\n"
+"POT-Creation-Date: 2012-07-09 19:11+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"
static Eina_Bool _thaw_third_anim(void *data);
int
-main (int argc, char *argv[])
+main(int argc, char *argv[])
{
Evas_Object *rect, *bg, *rect2;
Ecore_Evas *ee;
evas_object_resize(rect2, 50, 50);
evas_object_show(rect2);
- ecore_animator_frametime_set(1./50);
+ ecore_animator_frametime_set(1. / 50);
ecore_animator_timeline_add(5, _advance_frame, rect);
anim = ecore_animator_add(_advance_frame3, rect2);
static Eina_Bool
_start_second_anim(void *data)
{
- ecore_animator_frametime_set(1./10);
+ ecore_animator_frametime_set(1. / 10);
ecore_animator_timeline_add(20, _advance_frame2, data);
return EINA_FALSE;
}
static int x = 0;
if (x >= 250)
- x = 0;
+ x = 0;
evas_object_move(data, ++x, 350);
return EINA_TRUE;
ecore_animator_thaw(data);
return EINA_FALSE;
}
+
_spawn(void *data)
{
int x;
-
+
for (x = 0; x < NUM_CLIENTS; x++)
{
// printf("Creating connection %i\n", x);
exit(1);
}
}
- printf("***Job done***\n");
+ printf("***Job done***\n");
}
-int main(void)
+int
+main(void)
{
double done;
eina_init();
printf("\nTime elapsed for %i connections: %f seconds\n%s", NUM_CLIENTS, ecore_time_get() - done, eina_counter_dump(counter));
return 0;
}
+
return ECORE_CALLBACK_RENEW;
}
-
Eina_Bool
_del(void *data, int type, Ecore_Con_Event_Server_Del *ev)
{
printf(fmt, ev->data);
return ECORE_CALLBACK_RENEW;
}
-int main()
+
+int
+main()
{
Ecore_Con_Server *svr;
Eina_Iterator *it;
{
if (!ecore_con_ssl_server_cafile_add(svr, ca))
printf("Could not load CA: %s!\n", ca);
- eina_stringshare_del(ca);
+ eina_stringshare_del(ca);
}
eina_iterator_free(it);
/* start client */
ecore_main_loop_begin();
}
+
# define __UNUSED__
#endif
-struct _Server {
- int sdata;
+struct _Server
+{
+ int sdata;
};
Eina_Bool
ecore_con_server_data_set(ev->server, server);
printf("Server with ip %s, name %s, port %d, connected = %d!\n",
- ecore_con_server_ip_get(ev->server),
- ecore_con_server_name_get(ev->server),
- ecore_con_server_port_get(ev->server),
- ecore_con_server_connected_get(ev->server));
+ ecore_con_server_ip_get(ev->server),
+ ecore_con_server_name_get(ev->server),
+ ecore_con_server_port_get(ev->server),
+ ecore_con_server_connected_get(ev->server));
ecore_con_server_send(ev->server, welcome, sizeof(welcome));
ecore_con_server_flush(ev->server);
return ECORE_CALLBACK_RENEW;
}
-
Eina_Bool
_del(void *data __UNUSED__, int type __UNUSED__, Ecore_Con_Event_Server_Del *ev)
{
if (!ev->server)
{
- printf("Failed to establish connection to the server.\nExiting.\n");
- ecore_main_loop_quit();
- return ECORE_CALLBACK_RENEW;
+ printf("Failed to establish connection to the server.\nExiting.\n");
+ ecore_main_loop_quit();
+ return ECORE_CALLBACK_RENEW;
}
struct _Server *server = ecore_con_server_data_get(ev->server);
if (server)
{
- printf("Total data received from this server: %d\n", server->sdata);
- free(server);
+ printf("Total data received from this server: %d\n", server->sdata);
+ free(server);
}
ecore_con_server_del(ev->server);
return ECORE_CALLBACK_RENEW;
}
-int main(int argc, const char *argv[])
+int
+main(int argc, const char *argv[])
{
Ecore_Con_Server *svr;
const char *address;
if (argc < 2)
{
- printf("wrong usage. Command syntax is:\n");
- printf("\tecore_con_client_simple_example <address> [port]\n");
- exit (1);
+ printf("wrong usage. Command syntax is:\n");
+ printf("\tecore_con_client_simple_example <address> [port]\n");
+ exit(1);
}
address = argv[1];
if (!(svr = ecore_con_server_connect(ECORE_CON_REMOTE_TCP, address, port, NULL)))
{
- printf("could not connect to the server: %s, port %d.\n",
- address, port);
- exit(2);
+ printf("could not connect to the server: %s, port %d.\n",
+ address, port);
+ exit(2);
}
/* set event handler for server connect */
return 0;
}
+
static void
_lookup_done_cb(const char *canonname, const char *ip, struct sockaddr *addr, int addrlen, void *data)
{
- printf("canonname = %s\n", canonname);
- printf("ip = %s\n", ip);
- printf("addr = %p\n", addr);
- printf("addrlen = %d\n", addrlen);
+ printf("canonname = %s\n", canonname);
+ printf("ip = %s\n", ip);
+ printf("addr = %p\n", addr);
+ printf("addrlen = %d\n", addrlen);
}
-int main(int argc, const char *argv[])
+int
+main(int argc, const char *argv[])
{
if (argc < 2)
{
- printf("need one parameter: <address>\n");
- return -1;
+ printf("need one parameter: <address>\n");
+ return -1;
}
ecore_init();
if (!ecore_con_lookup(argv[1], _lookup_done_cb, NULL))
{
- printf("error when trying to start lookup for %s\n", argv[1]);
- goto end;
+ printf("error when trying to start lookup for %s\n", argv[1]);
+ goto end;
}
ecore_main_loop_begin();
return 0;
}
+
return ECORE_CALLBACK_RENEW;
}
-
Eina_Bool
_del(void *data, int type, Ecore_Con_Event_Client_Del *ev)
{
printf(fmt, ev->data);
return ECORE_CALLBACK_RENEW;
}
-int main()
+
+int
+main()
{
Ecore_Con_Server *svr;
eina_init();
gnutls_global_set_log_level(9);
gnutls_global_set_log_function(tls_log_func);
-
/* to use a PEM certificate with TLS and SSL3, uncomment the lines below */
if (!(svr = ecore_con_server_add(ECORE_CON_REMOTE_TCP | ECORE_CON_USE_TLS | ECORE_CON_USE_SSL3 | ECORE_CON_LOAD_CERT, "127.0.0.1", 8080, NULL)))
-
/* to use simple tcp with ssl/tls, use this line */
// if (!ecore_con_server_add(ECORE_CON_REMOTE_TCP | ECORE_CON_USE_SSL3, "127.0.0.1", 8080, NULL))
exit(1);
/* start server */
ecore_main_loop_begin();
}
+
#endif
static const char response_template[] =
-"HTTP/1.0 200 OK\r\n"
-"Server: Ecore_Con custom server\r\n"
-"Content-Length: %zd\r\n"
-"Content-Type: text/html; charset=UTF-8\r\n"
-"Set-Cookie: MYCOOKIE=1; path=/; expires=%s\r\n"
-"Set-Cookie: SESSIONCOOKIE=1; path=/\r\n"
-"\r\n"
-"%s";
-
-struct _Client {
- int sdata;
+ "HTTP/1.0 200 OK\r\n"
+ "Server: Ecore_Con custom server\r\n"
+ "Content-Length: %zd\r\n"
+ "Content-Type: text/html; charset=UTF-8\r\n"
+ "Set-Cookie: MYCOOKIE=1; path=/; expires=%s\r\n"
+ "Set-Cookie: SESSIONCOOKIE=1; path=/\r\n"
+ "\r\n"
+ "%s";
+
+struct _Client
+{
+ int sdata;
};
Eina_Bool
time_t t;
printf("Client with ip %s, port %d, connected = %d!\n",
- ecore_con_client_ip_get(ev->client),
- ecore_con_client_port_get(ev->client),
- ecore_con_client_connected_get(ev->client));
+ ecore_con_client_ip_get(ev->client),
+ ecore_con_client_port_get(ev->client),
+ ecore_con_client_connected_get(ev->client));
ecore_con_client_data_set(ev->client, client);
ecore_con_client_send(ev->client, buf, strlen(buf));
ecore_con_client_flush(ev->client);
-
return ECORE_CALLBACK_RENEW;
}
-
Eina_Bool
_del(void *data __UNUSED__, int type __UNUSED__, Ecore_Con_Event_Client_Del *ev)
{
printf("Lost client with ip %s!\n", ecore_con_client_ip_get(ev->client));
printf("Total data received from this client: %d\n", client->sdata);
printf("Client was connected for %0.3f seconds.\n",
- ecore_con_client_uptime_get(ev->client));
+ ecore_con_client_uptime_get(ev->client));
if (client)
free(client);
"%%.%is\n"
">>>>>\n\n",
ev->size, ecore_con_client_ip_get(ev->client),
- ecore_con_client_port_get(ev->client), ev->size);
+ ecore_con_client_port_get(ev->client), ev->size);
printf(fmt, ev->data);
return ECORE_CALLBACK_RENEW;
}
-int main(void)
+int
+main(void)
{
Ecore_Con_Server *svr;
Ecore_Con_Client *cl;
eina_list_count(clients));
EINA_LIST_FOREACH(clients, l, cl)
{
- printf("%s\n", ecore_con_client_ip_get(cl));
- free(ecore_con_client_data_get(cl));
+ printf("%s\n", ecore_con_client_ip_get(cl));
+ free(ecore_con_client_data_get(cl));
}
printf("Server was up for %0.3f seconds\n",
return 0;
}
+
# define __UNUSED__
#endif
-struct _Client {
- int sdata;
+struct _Client
+{
+ int sdata;
};
Eina_Bool
client->sdata = 0;
printf("Client with ip %s, port %d, connected = %d!\n",
- ecore_con_client_ip_get(ev->client),
- ecore_con_client_port_get(ev->client),
- ecore_con_client_connected_get(ev->client));
+ ecore_con_client_ip_get(ev->client),
+ ecore_con_client_port_get(ev->client),
+ ecore_con_client_connected_get(ev->client));
ecore_con_client_send(ev->client, welcome, sizeof(welcome));
ecore_con_client_flush(ev->client);
printf("Clients connected to this server:\n");
clients = ecore_con_server_clients_get(srv);
EINA_LIST_FOREACH(clients, l, cl)
- printf("%s\n", ecore_con_client_ip_get(cl));
+ printf("%s\n", ecore_con_client_ip_get(cl));
return ECORE_CALLBACK_RENEW;
}
-
Eina_Bool
_del(void *data __UNUSED__, int type __UNUSED__, Ecore_Con_Event_Client_Del *ev)
{
printf("Lost client with ip %s!\n", ecore_con_client_ip_get(ev->client));
printf("Total data received from this client: %d\n", client->sdata);
printf("Client was connected for %0.3f seconds.\n",
- ecore_con_client_uptime_get(ev->client));
+ ecore_con_client_uptime_get(ev->client));
if (client)
free(client);
"%%.%is\n"
">>>>>\n",
ev->size, ecore_con_client_ip_get(ev->client),
- ecore_con_client_port_get(ev->client), ev->size);
+ ecore_con_client_port_get(ev->client), ev->size);
printf(fmt, ev->data);
return ECORE_CALLBACK_RENEW;
}
-int main(void)
+int
+main(void)
{
Ecore_Con_Server *svr;
Ecore_Con_Client *cl;
eina_list_count(clients));
EINA_LIST_FOREACH(clients, l, cl)
{
- printf("%s\n", ecore_con_client_ip_get(cl));
- free(ecore_con_client_data_get(cl));
+ printf("%s\n", ecore_con_client_ip_get(cl));
+ free(ecore_con_client_data_get(cl));
}
printf("Server was up for %0.3f seconds\n",
return 0;
}
+
printf("response headers:\n");
EINA_LIST_FOREACH(headers, l, str)
- printf("header: %s", str);
+ printf("header: %s", str);
ecore_con_url_cookies_jar_write(url_complete->url_con);
return EINA_TRUE;
}
-int main(int argc, const char *argv[])
+int
+main(int argc, const char *argv[])
{
Ecore_Con_Url *ec_url = NULL;
char cmd = '\0';
if (argc < 2)
{
- printf("need at least one parameter: <url> [command]\n");
- return -1;
+ printf("need at least one parameter: <url> [command]\n");
+ return -1;
}
if (argc > 2)
ec_url = ecore_con_url_new(argv[1]);
if (!ec_url)
{
- printf("error when creating ecore con url object.\n");
- goto end;
+ printf("error when creating ecore con url object.\n");
+ goto end;
}
ecore_event_handler_add(ECORE_CON_EVENT_URL_DATA, _url_data_cb, NULL);
switch (cmd)
{
case 'c': // clear
- printf("Cleaning previously set cookies.\n");
- ecore_con_url_cookies_clear(ec_url);
- break;
+ printf("Cleaning previously set cookies.\n");
+ ecore_con_url_cookies_clear(ec_url);
+ break;
+
case 's': // clear session
- printf("Cleaning previously set session cookies.\n");
- ecore_con_url_cookies_session_clear(ec_url);
- break;
+ printf("Cleaning previously set session cookies.\n");
+ ecore_con_url_cookies_session_clear(ec_url);
+ break;
+
case 'i': // ignore session
- printf("Ignoring old session cookies.\n");
- ecore_con_url_cookies_ignore_old_session_set(ec_url, EINA_TRUE);
+ printf("Ignoring old session cookies.\n");
+ ecore_con_url_cookies_ignore_old_session_set(ec_url, EINA_TRUE);
}
r = ecore_con_url_get(ec_url);
if (!r)
{
- printf("could not realize request.\n");
- goto free_ec_url;
+ printf("could not realize request.\n");
+ goto free_ec_url;
}
ecore_main_loop_begin();
return 0;
}
+
#include <Ecore.h>
#include <Ecore_Con.h>
-struct _request {
- long size;
+struct _request
+{
+ long size;
};
static Eina_Bool
if (url_progress->down.total > 0)
{
- struct _request *req = ecore_con_url_data_get(url_progress->url_con);
- req->size = url_progress->down.now;
+ struct _request *req = ecore_con_url_data_get(url_progress->url_con);
+ req->size = url_progress->down.now;
- percent = (url_progress->down.now / url_progress->down.total) * 100;
- printf("Total of download complete: %0.1f (%0.0f)%%\n",
- percent, url_progress->down.now);
+ percent = (url_progress->down.now / url_progress->down.total) * 100;
+ printf("Total of download complete: %0.1f (%0.0f)%%\n",
+ percent, url_progress->down.now);
}
return EINA_TRUE;
printf("download completed with status code: %d\n", url_complete->status);
printf("Total size of downloaded file: %ld bytes\n", req->size);
printf("Total size of downloaded file: %ld bytes "
- "(from received_bytes_get)\n", nbytes);
+ "(from received_bytes_get)\n", nbytes);
ecore_main_loop_quit();
return EINA_TRUE;
}
-int main(int argc, const char *argv[])
+int
+main(int argc, const char *argv[])
{
Ecore_Con_Url *ec_url = NULL;
struct _request *req;
if (argc < 2)
{
- printf("need one parameter: <url>\n");
- return -1;
+ printf("need one parameter: <url>\n");
+ return -1;
}
- fd = open(filename, O_CREAT|O_WRONLY|O_TRUNC, 0644);
+ fd = open(filename, O_CREAT | O_WRONLY | O_TRUNC, 0644);
if (fd == -1)
{
- printf("error: could not open file for writing: \"%s\"\n",
- filename);
- return -1;
+ printf("error: could not open file for writing: \"%s\"\n",
+ filename);
+ return -1;
}
ecore_init();
ec_url = ecore_con_url_new(argv[1]);
if (!ec_url)
{
- printf("error when creating ecore con url object.\n");
- goto end;
+ printf("error when creating ecore con url object.\n");
+ goto end;
}
req = malloc(sizeof(*req));
if (!ecore_con_url_get(ec_url))
{
- printf("could not realize request.\n");
- goto free_ec_url;
+ printf("could not realize request.\n");
+ goto free_ec_url;
}
ecore_main_loop_begin();
return 0;
}
+
headers = ecore_con_url_response_headers_get(url_complete->url_con);
EINA_LIST_FOREACH(headers, l, str)
- printf("header: %s\n", str);
+ printf("header: %s\n", str);
ecore_main_loop_quit();
return EINA_TRUE;
}
-int main(int argc, const char *argv[])
+int
+main(int argc, const char *argv[])
{
Ecore_Con_Url *ec_url = NULL;
const char *type;
if (argc < 3)
{
- printf("need at least two parameters: < POST|GET > <url1>\n");
- return -1;
+ printf("need at least two parameters: < POST|GET > <url1>\n");
+ return -1;
}
type = argv[1];
if (strcmp(type, "POST") && (strcmp(type, "GET")))
{
- printf("only POST or GET are supported by this example.\n");
- return -1;
+ printf("only POST or GET are supported by this example.\n");
+ return -1;
}
ecore_init();
ec_url = ecore_con_url_custom_new(argv[2], type);
if (!ec_url)
{
- printf("error when creating ecore con url object.\n");
- goto end;
+ printf("error when creating ecore con url object.\n");
+ goto end;
}
ecore_event_handler_add(ECORE_CON_EVENT_URL_DATA, _url_data_cb, NULL);
if (!r)
{
- printf("could not realize request.\n");
- goto free_ec_url;
+ printf("could not realize request.\n");
+ goto free_ec_url;
}
ecore_main_loop_begin();
return 0;
}
+
/* support function to save scene as PPM image */
static void
-_scene_save(Evas *canvas,
+_scene_save(Evas *canvas,
const char *dest)
{
const unsigned int *pixels, *pixels_end;
img = ecore_evas_object_image_new(ee);
evas_object_image_filled_set(img, EINA_TRUE);
evas_object_image_size_set(
- img, ((2 * WIDTH) / 3) - 6, ((2 * HEIGHT) / 3) - 6);
+ img, ((2 * WIDTH) / 3) - 6, ((2 * HEIGHT) / 3) - 6);
sub_ee = ecore_evas_object_ecore_evas_get(img);
sub_canvas = ecore_evas_object_evas_get(img);
ecore_evas_callback_pre_free_set(ee, _pre_free);
ecore_evas_callback_pre_render_set(ee, _pre_render);
ecore_evas_callback_resize_set(ee, _resize);
- ecore_evas_callback_show_set (ee, _show);
+ ecore_evas_callback_show_set(ee, _show);
ecore_main_loop_begin();
return 0;
}
+
}
switch (c) {
- case 'h':
- printf("hide all windows\n");
- EINA_LIST_FOREACH(ecore_evas_ews_children_get(), l, ee)
- ecore_evas_hide(ee);
- break;
- case 's':
- printf("show all windows\n");
- EINA_LIST_FOREACH(ecore_evas_ews_children_get(), l, ee)
- ecore_evas_show(ee);
- break;
- case 'l':
- printf("move all windows left\n");
- EINA_LIST_FOREACH(ecore_evas_ews_children_get(), l, ee)
- {
- int x, y;
- ecore_evas_geometry_get(ee, &x, &y, NULL, NULL);
- ecore_evas_move(ee, x - 10, y);
- }
- break;
- case 'r':
- printf("move all windows right\n");
- EINA_LIST_FOREACH(ecore_evas_ews_children_get(), l, ee)
- {
- int x, y;
- ecore_evas_geometry_get(ee, &x, &y, NULL, NULL);
- ecore_evas_move(ee, x + 10, y);
- }
- break;
- case 't':
- printf("move all windows top\n");
- EINA_LIST_FOREACH(ecore_evas_ews_children_get(), l, ee)
- {
- int x, y;
- ecore_evas_geometry_get(ee, &x, &y, NULL, NULL);
- ecore_evas_move(ee, x, y - 10);
- }
- break;
- case 'b':
- printf("move all windows bottom\n");
- EINA_LIST_FOREACH(ecore_evas_ews_children_get(), l, ee)
- {
- int x, y;
- ecore_evas_geometry_get(ee, &x, &y, NULL, NULL);
- ecore_evas_move(ee, x, y + 10);
- }
- break;
- case 'S':
- printf("make all windows smaller\n");
- EINA_LIST_FOREACH(ecore_evas_ews_children_get(), l, ee)
- {
- int w, h;
- ecore_evas_geometry_get(ee, NULL, NULL, &w, &h);
- ecore_evas_resize(ee, w - 10, h - 10);
- }
- break;
- case 'B':
- printf("make all windows bigger\n");
- EINA_LIST_FOREACH(ecore_evas_ews_children_get(), l, ee)
- {
- int w, h;
- ecore_evas_geometry_get(ee, NULL, NULL, &w, &h);
- ecore_evas_resize(ee, w + 10, h + 10);
- }
- break;
- case 'm':
- printf("make all windows unmaximized\n");
- EINA_LIST_FOREACH(ecore_evas_ews_children_get(), l, ee)
- ecore_evas_maximized_set(ee, EINA_FALSE);
- break;
- case 'M':
- printf("make all windows maximized\n");
- EINA_LIST_FOREACH(ecore_evas_ews_children_get(), l, ee)
- ecore_evas_maximized_set(ee, EINA_TRUE);
- break;
- case 'i':
- printf("make all windows uniconified\n");
- EINA_LIST_FOREACH(ecore_evas_ews_children_get(), l, ee)
- ecore_evas_iconified_set(ee, EINA_FALSE);
- break;
- case 'I':
- printf("make all windows iconified\n");
- EINA_LIST_FOREACH(ecore_evas_ews_children_get(), l, ee)
- ecore_evas_iconified_set(ee, EINA_TRUE);
- break;
- case 'f':
- printf("make all windows unfullscreen\n");
- EINA_LIST_FOREACH(ecore_evas_ews_children_get(), l, ee)
- ecore_evas_fullscreen_set(ee, EINA_FALSE);
- break;
- case 'F':
- printf("make all windows fullscreen\n");
- EINA_LIST_FOREACH(ecore_evas_ews_children_get(), l, ee)
- ecore_evas_fullscreen_set(ee, EINA_TRUE);
- break;
- case 'q':
- printf("quit\n");
- ecore_main_loop_quit();
- break;
- default:
- if (!isspace(c))
- printf("Unknown command: %c\n", c);
- }
+ case 'h':
+ printf("hide all windows\n");
+ EINA_LIST_FOREACH(ecore_evas_ews_children_get(), l, ee)
+ ecore_evas_hide(ee);
+ break;
+
+ case 's':
+ printf("show all windows\n");
+ EINA_LIST_FOREACH(ecore_evas_ews_children_get(), l, ee)
+ ecore_evas_show(ee);
+ break;
+
+ case 'l':
+ printf("move all windows left\n");
+ EINA_LIST_FOREACH(ecore_evas_ews_children_get(), l, ee)
+ {
+ int x, y;
+ ecore_evas_geometry_get(ee, &x, &y, NULL, NULL);
+ ecore_evas_move(ee, x - 10, y);
+ }
+ break;
+
+ case 'r':
+ printf("move all windows right\n");
+ EINA_LIST_FOREACH(ecore_evas_ews_children_get(), l, ee)
+ {
+ int x, y;
+ ecore_evas_geometry_get(ee, &x, &y, NULL, NULL);
+ ecore_evas_move(ee, x + 10, y);
+ }
+ break;
+
+ case 't':
+ printf("move all windows top\n");
+ EINA_LIST_FOREACH(ecore_evas_ews_children_get(), l, ee)
+ {
+ int x, y;
+ ecore_evas_geometry_get(ee, &x, &y, NULL, NULL);
+ ecore_evas_move(ee, x, y - 10);
+ }
+ break;
+
+ case 'b':
+ printf("move all windows bottom\n");
+ EINA_LIST_FOREACH(ecore_evas_ews_children_get(), l, ee)
+ {
+ int x, y;
+ ecore_evas_geometry_get(ee, &x, &y, NULL, NULL);
+ ecore_evas_move(ee, x, y + 10);
+ }
+ break;
+
+ case 'S':
+ printf("make all windows smaller\n");
+ EINA_LIST_FOREACH(ecore_evas_ews_children_get(), l, ee)
+ {
+ int w, h;
+ ecore_evas_geometry_get(ee, NULL, NULL, &w, &h);
+ ecore_evas_resize(ee, w - 10, h - 10);
+ }
+ break;
+
+ case 'B':
+ printf("make all windows bigger\n");
+ EINA_LIST_FOREACH(ecore_evas_ews_children_get(), l, ee)
+ {
+ int w, h;
+ ecore_evas_geometry_get(ee, NULL, NULL, &w, &h);
+ ecore_evas_resize(ee, w + 10, h + 10);
+ }
+ break;
+
+ case 'm':
+ printf("make all windows unmaximized\n");
+ EINA_LIST_FOREACH(ecore_evas_ews_children_get(), l, ee)
+ ecore_evas_maximized_set(ee, EINA_FALSE);
+ break;
+
+ case 'M':
+ printf("make all windows maximized\n");
+ EINA_LIST_FOREACH(ecore_evas_ews_children_get(), l, ee)
+ ecore_evas_maximized_set(ee, EINA_TRUE);
+ break;
+
+ case 'i':
+ printf("make all windows uniconified\n");
+ EINA_LIST_FOREACH(ecore_evas_ews_children_get(), l, ee)
+ ecore_evas_iconified_set(ee, EINA_FALSE);
+ break;
+
+ case 'I':
+ printf("make all windows iconified\n");
+ EINA_LIST_FOREACH(ecore_evas_ews_children_get(), l, ee)
+ ecore_evas_iconified_set(ee, EINA_TRUE);
+ break;
+
+ case 'f':
+ printf("make all windows unfullscreen\n");
+ EINA_LIST_FOREACH(ecore_evas_ews_children_get(), l, ee)
+ ecore_evas_fullscreen_set(ee, EINA_FALSE);
+ break;
+
+ case 'F':
+ printf("make all windows fullscreen\n");
+ EINA_LIST_FOREACH(ecore_evas_ews_children_get(), l, ee)
+ ecore_evas_fullscreen_set(ee, EINA_TRUE);
+ break;
+
+ case 'q':
+ printf("quit\n");
+ ecore_main_loop_quit();
+ break;
+
+ default:
+ if (!isspace(c))
+ printf("Unknown command: %c\n", c);
+ }
return ECORE_CALLBACK_RENEW;
}
Evas_Object *bg;
if (ecore_evas_init() <= 0)
- return 1;
+ return 1;
optional_ews_setup();
optional_ews_window_manager_setup();
canvas = ecore_evas_get(ee);
if (ecore_evas_ecore_evas_get(canvas) == ee)
- printf("Everything is sane!\n");
+ printf("Everything is sane!\n");
bg = evas_object_rectangle_add(canvas);
evas_object_color_set(bg, 0, 0, 255, 255);
ecore_evas_move(ee, 50, 50);
ecore_main_fd_handler_add(STDIN_FILENO,
- ECORE_FD_READ | ECORE_FD_ERROR,
- _stdin_cb,
- NULL, NULL, NULL);
+ ECORE_FD_READ | ECORE_FD_ERROR,
+ _stdin_cb,
+ NULL, NULL, NULL);
ecore_main_loop_begin();
return 0;
}
+
ecore_evas_object_associate(ee, bg, ECORE_EVAS_OBJECT_ASSOCIATE_BASE);
if (bg == ecore_evas_object_associate_get(ee))
- printf("Association worked!\n");
+ printf("Association worked!\n");
cursor = evas_object_rectangle_add(ecore_evas_get(ee));
evas_object_color_set(cursor, 0, 255, 0, 255);
ecore_evas_cursor_get(ee, &obj, &layer, &x, &y);
if (obj == cursor && layer == 0 && x == 1 && y == 1)
- printf("Set cursor worked!\n");
+ printf("Set cursor worked!\n");
ecore_main_loop_begin();
return 0;
}
+
}
static void
-_on_keydown(void *data __UNUSED__,
- Evas *evas __UNUSED__,
+_on_keydown(void *data __UNUSED__,
+ Evas *evas __UNUSED__,
Evas_Object *o __UNUSED__,
- void *einfo)
+ void *einfo)
{
Evas_Event_Key_Down *ev = einfo;
#include <Ecore.h>
#include <unistd.h>
-struct context { // helper struct to give some context to the callbacks
- const char *str1, *str2;
- Ecore_Event_Handler *handler1;
- Ecore_Event_Handler *handler2;
+struct context // helper struct to give some context to the callbacks
+{
+ const char *str1, *str2;
+ Ecore_Event_Handler *handler1;
+ Ecore_Event_Handler *handler2;
};
static _event_type = 0; // a new type of event will be defined and stored here
if (*number == 5)
{
- const char *old = NULL;
- old = ecore_event_handler_data_set(ctxt->handler1, (void *)ctxt->str2);
- printf("changed handler1 data from \"%s\" to \"%s\".\n",
- old, ctxt->str2);
+ const char *old = NULL;
+ old = ecore_event_handler_data_set(ctxt->handler1, (void *)ctxt->str2);
+ printf("changed handler1 data from \"%s\" to \"%s\".\n",
+ old, ctxt->str2);
}
else if (*number >= 10)
{
- printf("finish main loop.\n");
- ecore_main_loop_quit();
+ printf("finish main loop.\n");
+ ecore_main_loop_quit();
}
return ECORE_CALLBACK_DONE; // same as EINA_FALSE
}
-int main(int argc, char **argv)
+int
+main(int argc, char **argv)
{
struct context ctxt = {0};
int i;
if (!ecore_init())
{
- printf("ERROR: Cannot init Ecore!\n");
- return -1;
+ printf("ERROR: Cannot init Ecore!\n");
+ return -1;
}
_event_type = ecore_event_type_new();
ctxt.handler1 = ecore_event_handler_add(_event_type,
- _event_handler1_cb,
- ctxt.str1);
+ _event_handler1_cb,
+ ctxt.str1);
ctxt.handler2 = ecore_event_handler_add(_event_type,
- _event_handler2_cb,
- &ctxt);
+ _event_handler2_cb,
+ &ctxt);
for (i = 0; i <= 15; i++)
{
- int *event_data = malloc(sizeof(*event_data));
- *event_data = i;
- ecore_event_add(_event_type, event_data, NULL, NULL);
+ int *event_data = malloc(sizeof(*event_data));
+ *event_data = i;
+ ecore_event_add(_event_type, event_data, NULL, NULL);
}
printf("start the main loop.\n");
return 0;
}
+
/**
-Compile with gcc -o ecore_exe_example ecore_exe_example.c `pkg-config --cflags --libs ecore`
-*/
+ Compile with gcc -o ecore_exe_example ecore_exe_example.c `pkg-config --cflags --libs ecore`
+ */
#include <stdio.h>
#include <string.h>
_msg_from_child_handler(void *data, int type, void *event)
{
Ecore_Exe_Event_Data *dataFromProcess = (Ecore_Exe_Event_Data *)event;
- char *msg = (char *) dataFromProcess->data;
+ char msg[BUFFER_SIZE];
+ if (dataFromProcess->size >= (BUFFER_SIZE - 1))
+ {
+ fprintf(stdout, "Data too big for bugger. error\n");
+ return ECORE_CALLBACK_DONE;
+ }
+
+ strncpy(msg, dataFromProcess->data, dataFromProcess->size);
+ msg[dataFromProcess->size] = 0;
+
if (strcmp(msg, "quit") == 0)
{
fprintf(stdout, "My child said to me, QUIT!\n");
fprintf(stdout, "I received a message from my child: %s\n", msg);
return ECORE_CALLBACK_DONE;
-
}
static Eina_Bool
_sendMessage(void *data)
{
static int numberOfMessages = 0;
- Ecore_Exe *childHandle = (Ecore_Exe*) data;
+ Ecore_Exe *childHandle = (Ecore_Exe *)data;
char msg[BUFFER_SIZE];
sprintf(msg, " Message: %d\n", numberOfMessages);
fprintf(stdout,
"I'm the father and I sent this message to the child: %s\n", msg);
-
-
return ECORE_CALLBACK_RENEW;
}
childHandle = ecore_exe_pipe_run("./ecore_exe_example_child",
ECORE_EXE_PIPE_WRITE |
- ECORE_EXE_PIPE_READ_LINE_BUFFERED |
+ ECORE_EXE_PIPE_READ_LINE_BUFFERED |
ECORE_EXE_PIPE_READ, NULL);
if (childHandle == NULL)
exit:
return EXIT_FAILURE;
}
+
/**
- Compile with gcc -o ecore_exe_example_child ecore_exe_example_child.c `pkg-config --cflags --libs ecore`
-*/
+ Compile with gcc -o ecore_exe_example_child ecore_exe_example_child.c `pkg-config --cflags --libs ecore`
+ */
#include <stdio.h>
#include <unistd.h>
#include <Ecore.h>
-
#define BUFFER_SIZE 1024
static Eina_Bool
int
main(int argc, char **argv)
{
-
if (!ecore_init())
goto error;
ecore_main_fd_handler_add(STDIN_FILENO,
- ECORE_FD_READ,
- _fd_handler_cb,
- NULL, NULL, NULL);
+ ECORE_FD_READ,
+ _fd_handler_cb,
+ NULL, NULL, NULL);
ecore_main_loop_begin();
ecore_shutdown();
error:
return EXIT_FAILURE;
}
+
#include <Ecore.h>
#include <unistd.h>
-struct context {
- Ecore_Fd_Handler *handler;
- Ecore_Timer *timer;
+struct context
+{
+ Ecore_Fd_Handler *handler;
+ Ecore_Timer *timer;
};
static void
if (ecore_main_fd_handler_active_get(handler, ECORE_FD_ERROR))
{
- printf("An error has occurred. Stop watching this fd and quit.\n");
- ecore_main_loop_quit();
- ctxt->handler = NULL;
- return ECORE_CALLBACK_CANCEL;
+ printf("An error has occurred. Stop watching this fd and quit.\n");
+ ecore_main_loop_quit();
+ ctxt->handler = NULL;
+ return ECORE_CALLBACK_CANCEL;
}
fd = ecore_main_fd_handler_fd_get(handler);
nbytes = read(fd, buf, sizeof(buf));
if (nbytes == 0)
{
- printf("Nothing to read, exiting...\n");
- ecore_main_loop_quit();
- ctxt->handler = NULL;
- return ECORE_CALLBACK_CANCEL;
+ printf("Nothing to read, exiting...\n");
+ ecore_main_loop_quit();
+ ctxt->handler = NULL;
+ return ECORE_CALLBACK_CANCEL;
}
buf[nbytes - 1] = '\0';
return ECORE_CALLBACK_RENEW;
}
-int main(int argc, char **argv)
+int
+main(int argc, char **argv)
{
struct context ctxt = {0};
if (!ecore_init())
{
- printf("ERROR: Cannot init Ecore!\n");
- return -1;
+ printf("ERROR: Cannot init Ecore!\n");
+ return -1;
}
ctxt.handler = ecore_main_fd_handler_add(STDIN_FILENO,
- ECORE_FD_READ | ECORE_FD_ERROR,
- _fd_handler_cb,
- &ctxt, NULL, NULL);
+ ECORE_FD_READ | ECORE_FD_ERROR,
+ _fd_handler_cb,
+ &ctxt, NULL, NULL);
ecore_main_fd_handler_prepare_callback_set(ctxt.handler, _fd_prepare_cb, &ctxt);
ctxt.timer = ecore_timer_add(5, _timer_cb, &ctxt);
printf("Starting the main loop. Type anything and hit <enter> to "
- "activate the fd_handler callback, or CTRL+d to shutdown.\n");
+ "activate the fd_handler callback, or CTRL+d to shutdown.\n");
ecore_main_loop_begin();
return 0;
}
+
* compile with gcc $(pkgconfig --cflags --libs gnutls ecore)
*/
-
#define print(...) fprintf(stderr, "line %i: ", __LINE__); fprintf(stderr, __VA_ARGS__); fprintf(stderr, "\n")
static int done = 0;
static void
-tls_log_func (int level, const char *str)
+tls_log_func(int level, const char *str)
{
- fprintf(stderr, "|<%d>| %s", level, str);
+ fprintf(stderr, "|<%d>| %s", level, str);
}
-static const char*
+static const char *
SSL_GNUTLS_PRINT_HANDSHAKE_STATUS(gnutls_handshake_description_t status)
{
switch (status)
{
case GNUTLS_HANDSHAKE_HELLO_REQUEST:
return "Hello request";
+
case GNUTLS_HANDSHAKE_CLIENT_HELLO:
return "Client hello";
+
case GNUTLS_HANDSHAKE_SERVER_HELLO:
return "Server hello";
+
case GNUTLS_HANDSHAKE_CERTIFICATE_PKT:
return "Certificate packet";
+
case GNUTLS_HANDSHAKE_SERVER_KEY_EXCHANGE:
return "Server key exchange";
+
case GNUTLS_HANDSHAKE_CERTIFICATE_REQUEST:
return "Certificate request";
+
case GNUTLS_HANDSHAKE_SERVER_HELLO_DONE:
return "Server hello done";
+
case GNUTLS_HANDSHAKE_CERTIFICATE_VERIFY:
return "Certificate verify";
+
case GNUTLS_HANDSHAKE_CLIENT_KEY_EXCHANGE:
return "Client key exchange";
+
case GNUTLS_HANDSHAKE_FINISHED:
return "Finished";
+
case GNUTLS_HANDSHAKE_SUPPLEMENTAL:
return "Supplemental";
}
* descriptor.
*/
static int
-tcp_connect (void)
+tcp_connect(void)
{
- const char *PORT = "443";
- const char *SERVER = "69.58.181.89"; //verisign.com
- int err, sd;
- int flag = 1, curstate = 0;
- struct sockaddr_in sa;
-
- /* sets some fd options such as nonblock */
- sd = socket (AF_INET, SOCK_STREAM, 0);
- fcntl(sd, F_SETFL, O_NONBLOCK);
- fcntl(sd, F_SETFD, FD_CLOEXEC);
- setsockopt(sd, SOL_SOCKET, SO_REUSEADDR, (const void *)&curstate, sizeof(curstate));
-
- setsockopt(sd, IPPROTO_TCP, TCP_NODELAY, (char *)&flag, sizeof(int));
-
- memset (&sa, '\0', sizeof (sa));
- sa.sin_family = AF_INET;
- sa.sin_port = htons (atoi (PORT));
- inet_pton (AF_INET, SERVER, &sa.sin_addr);
-
- /* connects to server
- */
- err = connect (sd, (struct sockaddr *) &sa, sizeof (sa));
- if ((err < 0) && (errno != EINPROGRESS))
- {
- print("Connect error\n");
- exit (1);
- }
-
- return sd;
+ const char *PORT = "443";
+ const char *SERVER = "69.58.181.89"; //verisign.com
+ int err, sd;
+ int flag = 1, curstate = 0;
+ struct sockaddr_in sa;
+
+ /* sets some fd options such as nonblock */
+ sd = socket(AF_INET, SOCK_STREAM, 0);
+ fcntl(sd, F_SETFL, O_NONBLOCK);
+ fcntl(sd, F_SETFD, FD_CLOEXEC);
+ setsockopt(sd, SOL_SOCKET, SO_REUSEADDR, (const void *)&curstate, sizeof(curstate));
+
+ setsockopt(sd, IPPROTO_TCP, TCP_NODELAY, (char *)&flag, sizeof(int));
+
+ memset(&sa, '\0', sizeof (sa));
+ sa.sin_family = AF_INET;
+ sa.sin_port = htons(atoi(PORT));
+ inet_pton(AF_INET, SERVER, &sa.sin_addr);
+
+ /* connects to server
+ */
+ err = connect(sd, (struct sockaddr *)&sa, sizeof (sa));
+ if ((err < 0) && (errno != EINPROGRESS))
+ {
+ print("Connect error\n");
+ exit(1);
+ }
+
+ return sd;
}
/* closes the given socket descriptor.
*/
static void
-tcp_close (int sd)
+tcp_close(int sd)
{
- shutdown (sd, SHUT_RDWR); /* no more receptions */
- close (sd);
+ shutdown(sd, SHUT_RDWR); /* no more receptions */
+ close(sd);
}
static Eina_Bool
{
static int ret, lastret;
static unsigned int count = 0;
-
+
if (!done)
{
lastret = ret;
- ret = gnutls_handshake (client);
+ ret = gnutls_handshake(client);
count++;
if (gnutls_record_get_direction(client))
ecore_main_fd_handler_active_set(fd_handler, ECORE_FD_WRITE);
print("yarrr this be an error!");
exit(1);
}
-
}
- if (ret == GNUTLS_E_SUCCESS)
- {
- done = 1;
- print("Handshake successful in %u handshake calls!", count);
- ecore_main_loop_quit();
- }
+ if (ret == GNUTLS_E_SUCCESS)
+ {
+ done = 1;
+ print("Handshake successful in %u handshake calls!", count);
+ ecore_main_loop_quit();
+ }
return ECORE_CALLBACK_RENEW;
}
int
-main (void)
+main(void)
{
- /* credentials */
- gnutls_anon_client_credentials_t c_anoncred;
- gnutls_certificate_credentials_t c_certcred;
-
- gnutls_session_t client;
- int sd;
-
- /* General init. */
- gnutls_global_init ();
- ecore_init();
- gnutls_global_set_log_function (tls_log_func);
- gnutls_global_set_log_level (6);
-
- /* Init client */
- gnutls_anon_allocate_client_credentials (&c_anoncred);
- gnutls_certificate_allocate_credentials (&c_certcred);
- gnutls_init (&client, GNUTLS_CLIENT);
- /* set very specific priorities */
- gnutls_priority_set_direct(client, "NONE:%VERIFY_ALLOW_X509_V1_CA_CRT:+RSA:+DHE-RSA:+DHE-DSS:+ANON-DH:+COMP-DEFLATE:+COMP-NULL:+CTYPE-X509:+SHA1:+SHA256:+SHA384:+SHA512:+AES-256-CBC:+AES-128-CBC:+3DES-CBC:+VERS-TLS1.2:+VERS-TLS1.1:+VERS-TLS1.0:+VERS-SSL3.0", NULL);
- gnutls_credentials_set (client, GNUTLS_CRD_ANON, c_anoncred);
- gnutls_credentials_set (client, GNUTLS_CRD_CERTIFICATE, c_certcred);
- gnutls_server_name_set(client, GNUTLS_NAME_DNS, "www.verisign.com", strlen("www.verisign.com"));
-
-
- /* connect to the peer
- */
- sd = tcp_connect ();
-
- /* associate gnutls with socket */
- gnutls_transport_set_ptr (client, (gnutls_transport_ptr_t) sd);
- /* add a callback for data being available for send/receive on socket */
- if (!ecore_main_fd_handler_add(sd, ECORE_FD_READ | ECORE_FD_WRITE, (Ecore_Fd_Cb)_process_data, client, NULL, NULL))
- {
- print("could not create fd handler!");
- exit(1);
- }
- /* begin main loop */
- ecore_main_loop_begin();
-
- gnutls_bye (client, GNUTLS_SHUT_RDWR);
-
- gnutls_deinit (client);
-
- tcp_close (sd);
-
- return 0;
+ /* credentials */
+ gnutls_anon_client_credentials_t c_anoncred;
+ gnutls_certificate_credentials_t c_certcred;
+
+ gnutls_session_t client;
+ int sd;
+
+ /* General init. */
+ gnutls_global_init();
+ ecore_init();
+ gnutls_global_set_log_function(tls_log_func);
+ gnutls_global_set_log_level(6);
+
+ /* Init client */
+ gnutls_anon_allocate_client_credentials(&c_anoncred);
+ gnutls_certificate_allocate_credentials(&c_certcred);
+ gnutls_init(&client, GNUTLS_CLIENT);
+ /* set very specific priorities */
+ gnutls_priority_set_direct(client, "NONE:%VERIFY_ALLOW_X509_V1_CA_CRT:+RSA:+DHE-RSA:+DHE-DSS:+ANON-DH:+COMP-DEFLATE:+COMP-NULL:+CTYPE-X509:+SHA1:+SHA256:+SHA384:+SHA512:+AES-256-CBC:+AES-128-CBC:+3DES-CBC:+VERS-TLS1.2:+VERS-TLS1.1:+VERS-TLS1.0:+VERS-SSL3.0", NULL);
+ gnutls_credentials_set(client, GNUTLS_CRD_ANON, c_anoncred);
+ gnutls_credentials_set(client, GNUTLS_CRD_CERTIFICATE, c_certcred);
+ gnutls_server_name_set(client, GNUTLS_NAME_DNS, "www.verisign.com", strlen("www.verisign.com"));
+
+ /* connect to the peer
+ */
+ sd = tcp_connect();
+
+ /* associate gnutls with socket */
+ gnutls_transport_set_ptr(client, (gnutls_transport_ptr_t)sd);
+ /* add a callback for data being available for send/receive on socket */
+ if (!ecore_main_fd_handler_add(sd, ECORE_FD_READ | ECORE_FD_WRITE, (Ecore_Fd_Cb)_process_data, client, NULL, NULL))
+ {
+ print("could not create fd handler!");
+ exit(1);
+ }
+ /* begin main loop */
+ ecore_main_loop_begin();
+
+ gnutls_bye(client, GNUTLS_SHUT_RDWR);
+
+ gnutls_deinit(client);
+
+ tcp_close(sd);
+
+ return 0;
}
+
#include <Ecore.h>
#include <Ecore_File.h>
-/*
+/*
* ecore_file_download() example
*
* compile with:
*
*/
-#define URL "http://www.kernel.org/pub/linux/kernel/v1.0/linux-1.0.tar.gz"
-#define DST "linux-1.0.tar.gz"
+#define URL "http://www.kernel.org/pub/linux/kernel/v1.0/linux-1.0.tar.gz"
+#define DST "linux-1.0.tar.gz"
#define DST_MIME "[x-gzip]linux-1.0.tar.gz"
-
void
completion_cb(void *data, const char *file, int status)
{
return ECORE_FILE_PROGRESS_CONTINUE; // continue the download
}
-
-int main(void)
+int
+main(void)
{
double start;
Eina_Hash *headers;
else
{
printf("Error, can't start download\n");
- goto done;
+ goto done;
}
done:
eina_shutdown();
return 0;
}
+
#include <Ecore.h>
#include <unistd.h>
-struct context { // helper struct to give some context to the callbacks
- int count;
- Ecore_Idle_Enterer *enterer;
- Ecore_Idler *idler;
- Ecore_Idle_Exiter *exiter;
- Ecore_Event_Handler *handler;
- Ecore_Timer *timer;
+struct context // helper struct to give some context to the callbacks
+{
+ int count;
+ Ecore_Idle_Enterer *enterer;
+ Ecore_Idler *idler;
+ Ecore_Idle_Exiter *exiter;
+ Ecore_Event_Handler *handler;
+ Ecore_Timer *timer;
};
static _event_type = 0; // a new type of event will be defined and stored here
if (ctxt->count > 100)
{
- ecore_idle_enterer_del(ctxt->enterer);
- ecore_idle_exiter_del(ctxt->exiter);
- ecore_idler_del(ctxt->idler);
+ ecore_idle_enterer_del(ctxt->enterer);
+ ecore_idle_exiter_del(ctxt->exiter);
+ ecore_idler_del(ctxt->idler);
- ctxt->enterer = NULL;
- ctxt->exiter = NULL;
- ctxt->idler = NULL;
+ ctxt->enterer = NULL;
+ ctxt->exiter = NULL;
+ ctxt->idler = NULL;
- if (ctxt->timer)
- {
- ecore_timer_del(ctxt->timer);
- ctxt->timer = NULL;
- }
+ if (ctxt->timer)
+ {
+ ecore_timer_del(ctxt->timer);
+ ctxt->timer = NULL;
+ }
- ecore_main_loop_quit();
+ ecore_main_loop_quit();
}
return ECORE_CALLBACK_DONE; // same as EINA_FALSE
return ECORE_CALLBACK_CANCEL; // same as EINA_FALSE
}
-int main(int argc, char **argv)
+int
+main(int argc, char **argv)
{
struct context ctxt = {0};
if (!ecore_init())
{
- printf("ERROR: Cannot init Ecore!\n");
- return -1;
+ printf("ERROR: Cannot init Ecore!\n");
+ return -1;
}
_event_type = ecore_event_type_new();
ctxt.exiter = ecore_idle_exiter_add(_exiter_cb, &ctxt);
ctxt.idler = ecore_idler_add(_idler_cb, &ctxt);
ctxt.handler = ecore_event_handler_add(_event_type,
- _event_handler_cb,
- &ctxt);
+ _event_handler_cb,
+ &ctxt);
ctxt.timer = ecore_timer_add(0.0005, _timer_cb, &ctxt);
ecore_main_loop_begin();
return 0;
}
+
struct _Entry
{
- Evas_Object *rect;
- Evas_Object *txt_obj;
- Evas_Textblock_Style *txt_style;
+ Evas_Object *rect;
+ Evas_Object *txt_obj;
+ Evas_Textblock_Style *txt_style;
Evas_Textblock_Cursor *cursor;
Evas_Textblock_Cursor *preedit_start;
Evas_Textblock_Cursor *preedit_end;
- Ecore_IMF_Context *imf_context;
- Eina_Bool have_preedit : 1;
+ Ecore_IMF_Context *imf_context;
+ Eina_Bool have_preedit : 1;
};
-static void _mouse_up_cb(void *data, Evas *e, Evas_Object *o, void *event_info)
+static void
+_mouse_up_cb(void *data, Evas *e, Evas_Object *o, void *event_info)
{
Entry *en = data;
if (!en) return;
evas_object_focus_set(en->rect, EINA_TRUE);
}
-static void _entry_focus_in_cb(void *data, Evas *e, Evas_Object *obj, void *event_info)
+static void
+_entry_focus_in_cb(void *data, Evas *e, Evas_Object *obj, void *event_info)
{
Entry *en = data;
if (!en) return;
ecore_imf_context_focus_in(en->imf_context);
}
-static void _entry_focus_out_cb(void *data, Evas *e, Evas_Object *obj, void *event_info)
+static void
+_entry_focus_out_cb(void *data, Evas *e, Evas_Object *obj, void *event_info)
{
Entry *en = data;
if (!en) return;
cursor_pos = evas_textblock_cursor_pos_get(en->cursor);
ecore_imf_context_cursor_position_set(en->imf_context, cursor_pos);
- ecore_imf_context_cursor_location_set(en->imf_context, x+cx, y+cy, cw, ch);
+ ecore_imf_context_cursor_location_set(en->imf_context, x + cx, y + cy, cw, ch);
}
-static void _preedit_del(Entry *en)
+static void
+_preedit_del(Entry *en)
{
if (!en || !en->have_preedit) return;
if (!en->preedit_start || !en->preedit_end) return;
evas_textblock_cursor_free(del_end);
}
-static void _ecore_imf_event_commit_cb (void *data, Ecore_IMF_Context *ctx, void *event_info)
+static void
+_ecore_imf_event_commit_cb(void *data, Ecore_IMF_Context *ctx, void *event_info)
{
Entry *en = data;
char *commit_str = (char *)event_info;
_preedit_del(en);
_preedit_clear(en);
- printf ("commit string : %s\n", commit_str);
+ printf("commit string : %s\n", commit_str);
evas_object_textblock_text_markup_prepend(en->cursor, commit_str);
return;
}
-static void _ecore_imf_event_preedit_changed_cb(void *data, Ecore_IMF_Context *ctx, void *event_info)
+static void
+_ecore_imf_event_preedit_changed_cb(void *data, Ecore_IMF_Context *ctx, void *event_info)
{
/* example how to get preedit string */
Entry *en = data;
Eina_List *attrs = NULL;
Eina_List *l;
Ecore_IMF_Preedit_Attr *attr;
- Ecore_IMF_Context * imf_context = ctx;
+ Ecore_IMF_Context *imf_context = ctx;
int preedit_start_pos, preedit_end_pos;
int i;
Eina_Bool preedit_end_state = EINA_FALSE;
/* notify cursor information */
_imf_cursor_info_set(en);
- EINA_LIST_FREE(attrs, attr) free(attr);
+ EINA_LIST_FREE(attrs, attr)
+ free(attr);
free(preedit_string);
}
return;
}
- else if (!strcmp(ev->key, "Delete") ||
- (!strcmp(ev->key, "KP_Delete") && !ev->string))
+ else if (!strcmp(ev->key, "Delete") ||
+ (!strcmp(ev->key, "KP_Delete") && !ev->string))
{
// FILLME
}
}
else
{
- if (ev->string)
+ if (ev->string)
{
printf("key down string : %s\n", ev->string);
evas_object_textblock_text_markup_prepend(en->cursor, ev->string);
/* set style on textblock */
static const char *style_buf =
- "DEFAULT='font=Sans font_size=30 color=#000 text_class=entry'"
- "newline='br'"
- "b='+ font=Sans:style=bold'";
+ "DEFAULT='font=Sans font_size=30 color=#000 text_class=entry'"
+ "newline='br'"
+ "b='+ font=Sans:style=bold'";
en->txt_style = evas_textblock_style_new();
evas_textblock_style_set(en->txt_style, style_buf);
evas_object_textblock_style_set(en->txt_obj, en->txt_style);
en->cursor = evas_object_textblock_cursor_new(en->txt_obj);
/* create input context */
- const char* default_id = ecore_imf_context_default_id_get();
+ const char *default_id = ecore_imf_context_default_id_get();
if (!default_id)
return;
}
}
-int main(int argc, char *argv[])
+int
+main(int argc, char *argv[])
{
- Ecore_Evas* ee;
- Evas* evas;
+ Ecore_Evas *ee;
+ Evas *evas;
Entry en1, en2;
- if (!ecore_evas_init())
+ if (!ecore_evas_init())
{
fprintf(stderr, "failed to call ecore_evas_init()\n");
return EXIT_FAILURE;
// create a new window, with size=480x800 and default engine
ee = ecore_evas_new(NULL, 0, 0, 480, 800, NULL);
- if (!ee)
+ if (!ee)
{
fprintf(stderr, "failed to call ecore_evas_new\n");
return EXIT_FAILURE;
// get the canvas off just-created window
evas = ecore_evas_get(ee);
- if (!evas)
+ if (!evas)
{
fprintf(stderr, "failed to ccall ecore_evas_get\n");
return EXIT_FAILURE;
}
// create input field rectangle
- Evas_Object* bg = evas_object_rectangle_add(evas);
+ Evas_Object *bg = evas_object_rectangle_add(evas);
evas_object_move(bg, 0, 0);
evas_object_resize(bg, 480, 800);
evas_object_color_set(bg, 255, 255, 255, 255);
return 0;
}
+
ecore_main_loop_quit();
}
-int main(int argc, char **argv)
+int
+main(int argc, char **argv)
{
Ecore_Job *job1, *job2, *job3, *job_quit;
char *str1 = "Job 1 started.";
if (!ecore_init())
{
- printf("ERROR: Cannot init Ecore!\n");
- return -1;
+ printf("ERROR: Cannot init Ecore!\n");
+ return -1;
}
job1 = ecore_job_add(_job_print_cb, str1);
if (job2)
{
- char *str;
- str = ecore_job_del(job2);
- job2 = NULL;
- printf("Deleted job 2. Its data was: \"%s\"\n", str);
+ char *str;
+ str = ecore_job_del(job2);
+ job2 = NULL;
+ printf("Deleted job 2. Its data was: \"%s\"\n", str);
}
ecore_main_loop_begin();
ecore_shutdown();
}
+
static int nbr = 0;
-static GstElement *_buid_pipeline (gchar *filename, Ecore_Pipe *pipe);
+static GstElement *_buid_pipeline(gchar *filename, Ecore_Pipe *pipe);
-static void new_decoded_pad_cb (GstElement *demuxer,
- GstPad *new_pad,
- gpointer user_data);
+static void new_decoded_pad_cb(GstElement *demuxer,
+ GstPad *new_pad,
+ gpointer user_data);
-static void handler(void *data, void *buf, unsigned int len)
+static void
+handler(void *data, void *buf, unsigned int len)
{
- GstBuffer *buffer = *((GstBuffer **)buf);
+ GstBuffer *buffer = *((GstBuffer **)buf);
- printf ("handler : %p\n", buffer);
- printf ("frame : %d %p %lld %p\n", nbr++, data, (long long)GST_BUFFER_DURATION(buffer), buffer);
- gst_buffer_unref (buffer);
+ printf("handler : %p\n", buffer);
+ printf("frame : %d %p %lld %p\n", nbr++, data, (long long)GST_BUFFER_DURATION(buffer), buffer);
+ gst_buffer_unref(buffer);
}
-
-static void handoff (GstElement* object,
- GstBuffer* arg0,
- GstPad* arg1,
- gpointer user_data)
+static void
+handoff(GstElement *object,
+ GstBuffer *arg0,
+ GstPad *arg1,
+ gpointer user_data)
{
- Ecore_Pipe *pipe;
+ Ecore_Pipe *pipe;
- pipe = (Ecore_Pipe *)user_data;
- printf ("handoff : %p\n", arg0);
- gst_buffer_ref (arg0);
- ecore_pipe_write(pipe, &arg0, sizeof(arg0));
+ pipe = (Ecore_Pipe *)user_data;
+ printf("handoff : %p\n", arg0);
+ gst_buffer_ref(arg0);
+ ecore_pipe_write(pipe, &arg0, sizeof(arg0));
}
int
-main (int argc, char *argv[])
+main(int argc, char *argv[])
{
- GstElement *pipeline;
- char *filename;
- Ecore_Pipe *pipe;
-
- gst_init (&argc, &argv);
-
- if (!ecore_init ())
- {
- gst_deinit ();
- return 0;
- }
-
- pipe = ecore_pipe_add (handler);
- if (!pipe)
- {
- ecore_shutdown ();
- gst_deinit ();
- return 0;
- }
-
- if (argc < 2) {
- g_print ("usage: %s file.avi\n", argv[0]);
- ecore_pipe_del (pipe);
- ecore_shutdown ();
- gst_deinit ();
- return 0;
- }
- filename = argv[1];
-
- pipeline = _buid_pipeline (filename, pipe);
- if (!pipeline) {
- g_print ("Error during the pipeline building\n");
- ecore_pipe_del (pipe);
- ecore_shutdown ();
- gst_deinit ();
- return -1;
- }
-
- gst_element_set_state (pipeline, GST_STATE_PLAYING);
-
- ecore_main_loop_begin();
-
- ecore_pipe_del (pipe);
- ecore_shutdown ();
- gst_deinit ();
-
- return 0;
+ GstElement *pipeline;
+ char *filename;
+ Ecore_Pipe *pipe;
+
+ gst_init(&argc, &argv);
+
+ if (!ecore_init())
+ {
+ gst_deinit();
+ return 0;
+ }
+
+ pipe = ecore_pipe_add(handler);
+ if (!pipe)
+ {
+ ecore_shutdown();
+ gst_deinit();
+ return 0;
+ }
+
+ if (argc < 2)
+ {
+ g_print("usage: %s file.avi\n", argv[0]);
+ ecore_pipe_del(pipe);
+ ecore_shutdown();
+ gst_deinit();
+ return 0;
+ }
+ filename = argv[1];
+
+ pipeline = _buid_pipeline(filename, pipe);
+ if (!pipeline)
+ {
+ g_print("Error during the pipeline building\n");
+ ecore_pipe_del(pipe);
+ ecore_shutdown();
+ gst_deinit();
+ return -1;
+ }
+
+ gst_element_set_state(pipeline, GST_STATE_PLAYING);
+
+ ecore_main_loop_begin();
+
+ ecore_pipe_del(pipe);
+ ecore_shutdown();
+ gst_deinit();
+
+ return 0;
}
static void
-new_decoded_pad_cb (GstElement *demuxer,
- GstPad *new_pad,
- gpointer user_data)
+new_decoded_pad_cb(GstElement *demuxer,
+ GstPad *new_pad,
+ gpointer user_data)
{
- GstElement *decoder;
- GstPad *pad;
- GstCaps *caps;
- gchar *str;
-
- caps = gst_pad_get_caps (new_pad);
- str = gst_caps_to_string (caps);
-
- if (g_str_has_prefix (str, "video/")) {
- decoder = GST_ELEMENT (user_data);
-
- pad = gst_element_get_pad (decoder, "sink");
- if (GST_PAD_LINK_FAILED (gst_pad_link (new_pad, pad))) {
- g_warning ("Failed to link %s:%s to %s:%s", GST_DEBUG_PAD_NAME (new_pad),
- GST_DEBUG_PAD_NAME (pad));
- }
- }
- g_free (str);
- gst_caps_unref (caps);
+ GstElement *decoder;
+ GstPad *pad;
+ GstCaps *caps;
+ gchar *str;
+
+ caps = gst_pad_get_caps(new_pad);
+ str = gst_caps_to_string(caps);
+
+ if (g_str_has_prefix(str, "video/"))
+ {
+ decoder = GST_ELEMENT(user_data);
+
+ pad = gst_element_get_pad(decoder, "sink");
+ if (GST_PAD_LINK_FAILED(gst_pad_link(new_pad, pad)))
+ {
+ g_warning("Failed to link %s:%s to %s:%s", GST_DEBUG_PAD_NAME(new_pad),
+ GST_DEBUG_PAD_NAME(pad));
+ }
+ }
+ g_free(str);
+ gst_caps_unref(caps);
}
static GstElement
-_buid_pipeline (gchar *filename, Ecore_Pipe *pipe)
+_buid_pipeline(gchar *filename, Ecore_Pipe *pipe)
{
- GstElement *pipeline;
- GstElement *filesrc;
- GstElement *demuxer;
- GstElement *decoder;
- GstElement *sink;
- GstStateChangeReturn res;
-
- pipeline = gst_pipeline_new ("pipeline");
- if (!pipeline)
- return NULL;
-
- filesrc = gst_element_factory_make ("filesrc", "filesrc");
- if (!filesrc) {
- printf ("no filesrc");
- goto failure;
- }
- g_object_set (G_OBJECT (filesrc), "location", filename, NULL);
-
- demuxer = gst_element_factory_make ("oggdemux", "demuxer");
- if (!demuxer) {
- printf ("no demux");
- goto failure;
- }
-
- decoder = gst_element_factory_make ("theoradec", "decoder");
- if (!decoder) {
- printf ("no dec");
- goto failure;
- }
-
- g_signal_connect (demuxer, "pad-added",
- G_CALLBACK (new_decoded_pad_cb), decoder);
-
- sink = gst_element_factory_make ("fakesink", "sink");
- if (!sink) {
- printf ("no sink");
- goto failure;
- }
- g_object_set (G_OBJECT (sink), "sync", EINA_TRUE, NULL);
- g_object_set (G_OBJECT (sink), "signal-handoffs", EINA_TRUE, NULL);
- g_signal_connect (sink, "handoff",
- G_CALLBACK (handoff), pipe);
-
- gst_bin_add_many (GST_BIN (pipeline),
+ GstElement *pipeline;
+ GstElement *filesrc;
+ GstElement *demuxer;
+ GstElement *decoder;
+ GstElement *sink;
+ GstStateChangeReturn res;
+
+ pipeline = gst_pipeline_new("pipeline");
+ if (!pipeline)
+ return NULL;
+
+ filesrc = gst_element_factory_make("filesrc", "filesrc");
+ if (!filesrc)
+ {
+ printf("no filesrc");
+ goto failure;
+ }
+ g_object_set(G_OBJECT(filesrc), "location", filename, NULL);
+
+ demuxer = gst_element_factory_make("oggdemux", "demuxer");
+ if (!demuxer)
+ {
+ printf("no demux");
+ goto failure;
+ }
+
+ decoder = gst_element_factory_make("theoradec", "decoder");
+ if (!decoder)
+ {
+ printf("no dec");
+ goto failure;
+ }
+
+ g_signal_connect(demuxer, "pad-added",
+ G_CALLBACK(new_decoded_pad_cb), decoder);
+
+ sink = gst_element_factory_make("fakesink", "sink");
+ if (!sink)
+ {
+ printf("no sink");
+ goto failure;
+ }
+ g_object_set(G_OBJECT(sink), "sync", EINA_TRUE, NULL);
+ g_object_set(G_OBJECT(sink), "signal-handoffs", EINA_TRUE, NULL);
+ g_signal_connect(sink, "handoff",
+ G_CALLBACK(handoff), pipe);
+
+ gst_bin_add_many(GST_BIN(pipeline),
filesrc, demuxer, decoder, sink, NULL);
- if (!gst_element_link (filesrc, demuxer))
- goto failure;
- if (!gst_element_link (decoder, sink))
- goto failure;
+ if (!gst_element_link(filesrc, demuxer))
+ goto failure;
+ if (!gst_element_link(decoder, sink))
+ goto failure;
- res = gst_element_set_state (pipeline, GST_STATE_PAUSED);
- if (res == GST_STATE_CHANGE_FAILURE)
- goto failure;
+ res = gst_element_set_state(pipeline, GST_STATE_PAUSED);
+ if (res == GST_STATE_CHANGE_FAILURE)
+ goto failure;
- res = gst_element_get_state( pipeline, NULL, NULL, GST_CLOCK_TIME_NONE );
- if (res != GST_STATE_CHANGE_SUCCESS)
- goto failure;
+ res = gst_element_get_state(pipeline, NULL, NULL, GST_CLOCK_TIME_NONE);
+ if (res != GST_STATE_CHANGE_SUCCESS)
+ goto failure;
- return pipeline;
+ return pipeline;
- failure:
- gst_object_unref (GST_OBJECT (pipeline));
- return NULL;
+failure:
+ gst_object_unref(GST_OBJECT(pipeline));
+ return NULL;
}
+
sleep(1);
buffer = malloc(sizeof(char) * i);
for (j = 0; j < i; j++)
- buffer[j] = 'a' + j;
+ buffer[j] = 'a' + j;
ecore_pipe_write(pipe, buffer, i);
free(buffer);
}
memcpy(str, buf, len);
str[len] = '\0';
printf("received %d bytes\n", len);
- printf("content: %s\n", (const char*)str);
+ printf("content: %s\n", (const char *)str);
free(str);
if (len && !strncmp(buf, "close", len < 5 ? len : 5))
{
}
int
-main (int argc, char *argv[])
+main(int argc, char *argv[])
{
Ecore_Pipe *pipe;
pid_t child_pid;
return 0;
}
+
{
char *str = data;
printf("Ecore Poller '%s' callback called after %0.3f seconds.\n",
- str, ecore_time_get() - _initial_time);
+ str, ecore_time_get() - _initial_time);
return ECORE_CALLBACK_RENEW;
}
-int main(int argc, char **argv)
+int
+main(int argc, char **argv)
{
double interval = 0.3; // tick each 0.3 seconds
Ecore_Poller *poller1, *poller2;
if (!ecore_init())
{
- printf("ERROR: Cannot init Ecore!\n");
- return -1;
+ printf("ERROR: Cannot init Ecore!\n");
+ return -1;
}
_initial_time = ecore_time_get();
ecore_shutdown();
}
+
return ECORE_CALLBACK_RENEW;
}
-int main(int argc, const char *argv[])
+int
+main(int argc, const char *argv[])
{
ecore_init();
ecore_con_init();
eina_log_domain_level_set("ecore_con", EINA_LOG_LEVEL_ERR);
eina_log_domain_level_set("eina", EINA_LOG_LEVEL_ERR);
-
/* to use a PEM certificate with TLS and SSL3, uncomment the lines below */
// if (!(svr = ecore_con_server_add(ECORE_CON_REMOTE_NODELAY | ECORE_CON_USE_MIXED | ECORE_CON_LOAD_CERT, "127.0.0.1", 8080, NULL)))
/* to use simple tcp with ssl/tls, use this line */
- svr = ecore_con_server_add(ECORE_CON_REMOTE_NODELAY , "127.0.0.1", 8080, NULL);
+ svr = ecore_con_server_add(ECORE_CON_REMOTE_NODELAY, "127.0.0.1", 8080, NULL);
if (!svr)
exit(1);
-
+
ecore_event_handler_add(ECORE_CON_EVENT_CLIENT_ADD, (Ecore_Event_Handler_Cb)_add, NULL);
ecore_event_handler_add(ECORE_CON_EVENT_CLIENT_DEL, (Ecore_Event_Handler_Cb)_del, NULL);
}
return 0;
}
+
typedef struct
{
- Ecore_Thread *thread_3;
- int msgs_received;
- int max_msgs;
- Eina_Lock mutex;
+ Ecore_Thread *thread_3;
+ int msgs_received;
+ int max_msgs;
+ Eina_Lock mutex;
Eina_Condition condition;
} App_Data;
typedef struct
{
- char *name;
- char *base;
+ char *name;
+ char *base;
Eina_Lock mutex;
} Feedback_Thread_Data;
typedef struct
{
- int all_done;
+ int all_done;
Eina_List *list;
} App_Msg;
Eina_List *path_list = NULL;
App_Data appdata;
Ecore_Getopt_Value values[] = {
- ECORE_GETOPT_VALUE_INT(max_threads),
- ECORE_GETOPT_VALUE_INT(max_msgs),
- ECORE_GETOPT_VALUE_LIST(path_list),
- ECORE_GETOPT_VALUE_BOOL(opt_quit),
- ECORE_GETOPT_VALUE_NONE
+ ECORE_GETOPT_VALUE_INT(max_threads),
+ ECORE_GETOPT_VALUE_INT(max_msgs),
+ ECORE_GETOPT_VALUE_LIST(path_list),
+ ECORE_GETOPT_VALUE_BOOL(opt_quit),
+ ECORE_GETOPT_VALUE_NONE
};
ecore_init();
return 0;
}
+
return EINA_FALSE;
}
-int main(int argc, char **argv)
+int
+main(int argc, char **argv)
{
if (!ecore_init())
{
- printf("ERROR: Cannot init Ecore!\n");
- return -1;
+ printf("ERROR: Cannot init Ecore!\n");
+ return -1;
}
ecore_timer_add(0.1, _timer_cb, NULL);
ecore_main_loop_begin();
ecore_shutdown();
}
+
#define TIMEOUT_6 18.0 // top timer1 and start timer7 and timer8 with changed precision
#define TIMEOUT_7 1.1 // interval for timer7
#define TIMEOUT_8 1.2 // interval for timer8
-#define DELAY_1 3.0 // delay time for timer1 - used by timer2
+#define DELAY_1 3.0 // delay time for timer1 - used by timer2
#define INTERVAL1 2.0 // new interval for timer1 - used by timer5
static double _initial_time = 0;
-struct context { // helper struct to give some context to the callbacks
- Ecore_Timer *timer1;
- Ecore_Timer *timer2;
- Ecore_Timer *timer3;
- Ecore_Timer *timer4;
- Ecore_Timer *timer5;
- Ecore_Timer *timer6;
- Ecore_Timer *timer7;
- Ecore_Timer *timer8;
+struct context // helper struct to give some context to the callbacks
+{
+ Ecore_Timer *timer1;
+ Ecore_Timer *timer2;
+ Ecore_Timer *timer3;
+ Ecore_Timer *timer4;
+ Ecore_Timer *timer5;
+ Ecore_Timer *timer6;
+ Ecore_Timer *timer7;
+ Ecore_Timer *timer8;
};
static double
{
struct context *ctxt = data;
printf("Timer2 expired after %0.3f seconds. "
- "Adding delay of %0.3f seconds to timer1.\n",
- _get_current_time(), DELAY_1);
+ "Adding delay of %0.3f seconds to timer1.\n",
+ _get_current_time(), DELAY_1);
ecore_timer_delay(ctxt->timer1, DELAY_1);
{
struct context *ctxt = data;
printf("Timer3 expired after %0.3f seconds. "
- "Freezing timer1.\n", _get_current_time());
+ "Freezing timer1.\n", _get_current_time());
ecore_timer_freeze(ctxt->timer1);
{
struct context *ctxt = data;
printf("Timer4 expired after %0.3f seconds. "
- "Resuming timer1, which has %0.3f seconds left to expire.\n",
- _get_current_time(), ecore_timer_pending_get(ctxt->timer1));
+ "Resuming timer1, which has %0.3f seconds left to expire.\n",
+ _get_current_time(), ecore_timer_pending_get(ctxt->timer1));
ecore_timer_thaw(ctxt->timer1);
double interval = ecore_timer_interval_get(ctxt->timer1);
printf("Timer5 expired after %0.3f seconds. "
- "Changing interval of timer1 from %0.3f to %0.3f seconds.\n",
- _get_current_time(), interval, INTERVAL1);
+ "Changing interval of timer1 from %0.3f to %0.3f seconds.\n",
+ _get_current_time(), interval, INTERVAL1);
ecore_timer_interval_set(ctxt->timer1, INTERVAL1);
ctxt->timer1 = NULL;
printf("Starting timer7 (%0.3fs) and timer8 (%0.3fs).\n",
- TIMEOUT_7, TIMEOUT_8);
+ TIMEOUT_7, TIMEOUT_8);
ctxt->timer7 = ecore_timer_add(TIMEOUT_7, _timer7_cb, ctxt);
ctxt->timer8 = ecore_timer_add(TIMEOUT_8, _timer8_cb, ctxt);
return ECORE_CALLBACK_CANCEL;
}
-int main(int argc, char **argv)
+int
+main(int argc, char **argv)
{
struct context ctxt = {0};
if (!ecore_init())
{
- printf("ERROR: Cannot init Ecore!\n");
- return -1;
+ printf("ERROR: Cannot init Ecore!\n");
+ return -1;
}
_initial_time = ecore_time_get();
return 0;
}
+
@li @ref Ecore_Con_Group
@li @ref Ecore_Evas_Group
@li @ref Ecore_FB_Group
+ @li @ref Ecore_IMF_Lib_Group
+ @li @ref Ecore_IMF_Context_Group
+ @li @ref Ecore_IMF_Context_Module_Group
+ @li @ref Ecore_IMF_Evas_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
*/
#define ECORE_VERSION_MAJOR 1
-#define ECORE_VERSION_MINOR 2
+#define ECORE_VERSION_MINOR 6
typedef struct _Ecore_Version
{
struct _Ecore_Exe_Event_Data_Line /**< Lines from a child process */
{
- char *line;
- int size;
+ char *line; /**< The bytes of a line of buffered data */
+ int size; /**< The size of the line buffer in bytes */
};
struct _Ecore_Exe_Event_Data /** Data from a child process event */
*
* @param fd The file descriptor to watch.
* @param flags To monitor it for reading use @c ECORE_FD_READ, for writing @c
- * ECORE_FD_WRITE, and for error @c ECORE_FD_ERROR. Values bay |(ored).
+ * ECORE_FD_WRITE, and for error @c ECORE_FD_ERROR. Values by |(ored).
* @param func The callback function.
* @param data The data to pass to the callback.
* @param buf_func The function to call to check if any data has been buffered
{
if (run_pri != ECORE_EXE_PRIORITY_INHERIT)
{
+#ifdef PRIO_PROCESS
if ((run_pri >= -20) && (run_pri <= 19))
setpriority(PRIO_PROCESS, 0, run_pri);
+#else
+#warning "Your OS/libc does not provide PRIO_PROCESS (and possibly setpriority())"
+#warning "This is a POSIX-1.2001 standard and it is highly encouraged that you"
+#warning "Have support for this"
+#endif
}
/* dup2 STDERR, STDIN, and STDOUT. dup2() allegedly closes the
* second pipe if it's open. On the other hand, there was the
* This doesn't affect the interval of a timer.
*
* @param timer The timer to change.
- * @param add The dalay to add to the next iteration.
+ * @param add The delay to add to the next iteration.
*/
EAPI void
ecore_timer_delay(Ecore_Timer *timer,
errno = 0;
if (!net_info) /* error message has already been handled */
- goto error;
+ {
+ svr->delete_me = EINA_TRUE;
+ goto error;
+ }
svr->fd = socket(net_info->info.ai_family, net_info->info.ai_socktype,
net_info->info.ai_protocol);
errno = 0;
if (!net_info) /* error message has already been handled */
- goto error;
+ {
+ svr->delete_me = EINA_TRUE;
+ goto error;
+ }
svr->fd = socket(net_info->info.ai_family, net_info->info.ai_socktype,
net_info->info.ai_protocol);
errno = 0;
if (!net_info) /* error message has already been handled */
- goto error;
+ {
+ svr->delete_me = EINA_TRUE;
+ goto error;
+ }
svr->fd = socket(net_info->info.ai_family, net_info->info.ai_socktype,
net_info->info.ai_protocol);
errno = 0;
if (!net_info) /* error message has already been handled */
- goto error;
+ {
+ svr->delete_me = EINA_TRUE;
+ goto error;
+ }
svr->fd = socket(net_info->info.ai_family, net_info->info.ai_socktype,
net_info->info.ai_protocol);
if (svr->delete_me)
return ECORE_CALLBACK_RENEW;
- if (svr->delete_me)
- return ECORE_CALLBACK_RENEW;
-
if ((svr->client_limit >= 0) && (!svr->reject_excess_clients) &&
(svr->client_count >= (unsigned int)svr->client_limit))
return ECORE_CALLBACK_RENEW;
if (!count)
{
+ if (!cl->buf) return;
num = eina_binbuf_length_get(cl->buf) - cl->buf_offset;
if (num <= 0) return;
if (!(cl->host_server->type & ECORE_CON_SSL) || (!cl->upgrade))
#include <string.h>
#include <sys/types.h>
+#ifdef HAVE_ERRNO_H
+# include <errno.h> /* for EAGAIN */
+#endif
+
#ifdef HAVE_NETINET_IN_H
# include <netinet/in.h>
#endif
* @param num_profiles The number of profile names
*
* @warning Support for this depends on the underlying windowing system.
- * @since 1.3.0
+ * @since 1.7.0
*/
EAPI void ecore_evas_profiles_set(Ecore_Evas *ee, const char **profiles, unsigned int num_profiles);
/**
* @param ee The Ecore_Evas
* @return The profile name
*
- * @since 1.3.0
+ * @since 1.7.0
*/
EAPI const char *ecore_evas_profile_get(const Ecore_Evas *ee);
/**
* @param ee The Ecore_Evas
* @param on The type of the damage management
*
- * This function causes @p ee to be drawn to a pixmap to avoid recalculations.
- * On expose events it will copy from the pixmap to the window.
+ * This option causes updates of the Ecore_Evas to be done on a pixmap, and
+ * then copied to the window, or the pixmap used directly on the window,
+ * depending on the setting. Possible options are:
+ *
+ * @li @ref ECORE_EVAS_AVOID_DAMAGE_NONE - every expose event triggers a new
+ * damage and consequently render of the affected area. The rendering of things
+ * happens directly on the window;
+ *
+ * @li @ref ECORE_EVAS_AVOID_DAMAGE_EXPOSE - there's a pixmap where everything
+ * is rendered into, and then copied to the window. On expose events, there's
+ * no need to render things again, just to copy the exposed region to the
+ * window;
+ *
+ * @li @ref ECORE_EVAS_AVOID_DAMAGE_BUILT_IN - there's the same pixmap as the
+ * previous one, but it is set as a "background pixmap" of the window. The
+ * rendered things appear directly on the window, with no need to copy
+ * anything, but would stay stored on the pixmap, so there's no need to render
+ * things again on expose events. This option can be faster than the previous
+ * one, but may lead to artifacts during resize of the window.
*/
EAPI void ecore_evas_avoid_damage_set(Ecore_Evas *ee, Ecore_Evas_Avoid_Damage_Type on);
EAPI void ecore_evas_manual_render(Ecore_Evas *ee);
EAPI void ecore_evas_comp_sync_set(Ecore_Evas *ee, Eina_Bool do_sync);
EAPI Eina_Bool ecore_evas_comp_sync_get(const Ecore_Evas *ee);
+
/**
* @brief Get geometry of screen associated with this Ecore_Evas.
*
*/
EAPI void ecore_evas_screen_geometry_get(const Ecore_Evas *ee, int *x, int *y, int *w, int *h);
+/**
+ * @brief Get the dpi of the screen the Ecore_Evas is primarily on.
+ *
+ * @param ee The Ecore_Evas whose window's to query.
+ * @param xdpi Pointer to integer to store horizontal DPI. May be @c NULL.
+ * @param ydpi Pointer to integer to store vertical DPI. May be @c NULL.
+ *
+ * @since 1.7
+ */
+EAPI void ecore_evas_screen_dpi_get(const Ecore_Evas *ee, int *xdpi, int *ydpi);
+
EAPI void ecore_evas_draw_frame_set(Ecore_Evas *ee, Eina_Bool draw_frame);
EAPI Eina_Bool ecore_evas_draw_frame_get(const Ecore_Evas *ee);
}
/**
- * Query if a particular renginering engine target has support
+ * Query if a particular rendering engine target has support
* @param engine The engine to check support for
* @return 1 if the particular engine is supported, 0 if it is not
*
}
EAPI void
+ecore_evas_screen_dpi_get(const Ecore_Evas *ee, int *xdpi, int *ydpi)
+{
+ if (xdpi) *xdpi = 0;
+ if (ydpi) *ydpi = 0;
+ if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS))
+ {
+ ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS,
+ "ecore_evas_screen_geometry_get");
+ return;
+ }
+
+ IFC(ee, fn_screen_dpi_get) (ee, xdpi, ydpi);
+ IFE;
+}
+
+EAPI void
ecore_evas_draw_frame_set(Ecore_Evas *ee, Eina_Bool draw_frame)
{
if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS))
NULL,
_ecore_evas_buffer_render,
- NULL // screen_geometry_get
+ NULL, // screen_geometry_get
+ NULL // screen_dpi_get
};
#endif
NULL,
NULL,
- NULL, // render
- NULL
+ NULL, // render
+ NULL,
+ NULL // screen_dpi_get
};
#endif
NULL,
NULL, // render
- NULL // screen_geometry_get
+ NULL, // screen_geometry_get
+ NULL // screen_dpi_get
};
#endif
NULL,
_ecore_evas_ews_render,
- _ecore_evas_ews_screen_geometry_get
+ _ecore_evas_ews_screen_geometry_get,
+ NULL // screen_dpi_get
};
void
NULL,
NULL,
NULL, //transparent
-
+ NULL, // profiles_set
NULL,
NULL,
NULL,
NULL,
NULL, // render
- NULL // screen_geometry_get
+ NULL, // screen_geometry_get
+ NULL // screen_dpi_get
};
static Eina_Bool
NULL,
_ecore_evas_extn_socket_render, // render
- NULL // screen_geometry_get
+ NULL, // screen_geometry_get
+ NULL, // screen_dpi_get
};
#endif
NULL,
NULL, // render
- NULL // screen_geometry_get
+ NULL, // screen_geometry_get
+ NULL // screen_dpi_get
};
#endif
int (*fn_render) (Ecore_Evas *ee);
void (*fn_screen_geometry_get) (const Ecore_Evas *ee, int *x, int *y, int *w, int *h);
+ void (*fn_screen_dpi_get) (const Ecore_Evas *ee, int *xdpi, int *ydpi);
};
struct _Ecore_Evas_Engine
NULL,
NULL, // render
- _ecore_evas_screen_geometry_get // screen_geometry_get
+ _ecore_evas_screen_geometry_get, // screen_geometry_get
+ NULL // screen_dpi_get
};
EAPI Ecore_Evas *
NULL,
NULL, // render
- NULL // screen_geometry_get
+ NULL, // screen_geometry_get
+ NULL // screen_dpi_get
};
static Ecore_Evas*
if (!rmethod) return NULL;
ee = _ecore_evas_internal_sdl_new(rmethod, name, w, h, fullscreen, 0, noframe, 0);
- ee->driver = "gl_sdl";
+ if (ee) ee->driver = "gl_sdl";
return ee;
}
#else
static void _ecore_evas_wl_transparent_set(Ecore_Evas *ee, int transparent);
static int _ecore_evas_wl_render(Ecore_Evas *ee);
static void _ecore_evas_wl_screen_geometry_get(const Ecore_Evas *ee __UNUSED__, int *x, int *y, int *w, int *h);
-
+static void _ecore_evas_wl_screen_dpi_get(const Ecore_Evas *ee __UNUSED__, int *xdpi, int *ydpi);
static Eina_Bool _ecore_evas_wl_cb_mouse_in(void *data __UNUSED__, int type __UNUSED__, void *event);
static Eina_Bool _ecore_evas_wl_cb_mouse_out(void *data __UNUSED__, int type __UNUSED__, void *event);
static Eina_Bool _ecore_evas_wl_cb_focus_in(void *data __UNUSED__, int type __UNUSED__, void *event);
NULL,
NULL,
_ecore_evas_wl_render,
- _ecore_evas_wl_screen_geometry_get
+ _ecore_evas_wl_screen_geometry_get,
+ _ecore_evas_wl_screen_dpi_get
};
/* external variables */
_ecore_evas_wl_resize(Ecore_Evas *ee, int w, int h)
{
LOGFN(__FILE__, __LINE__, __FUNCTION__);
+ int fw = 0, fh = 0;
if (!ee) return;
if (w < 1) w = 1;
ee->req.w = w;
ee->req.h = h;
+ evas_output_framespace_get(ee->evas, NULL, NULL, &fw, &fh);
+ w += fw;
+ h += fh;
+
// ecore_wl_window_damage(ee->engine.wl.win, 0, 0, ee->w, ee->h);
if ((ee->w != w) || (ee->h != h))
ecore_wl_screen_size_get(w, h);
}
+static void
+_ecore_evas_wl_screen_dpi_get(const Ecore_Evas *ee __UNUSED__, int *xdpi, int *ydpi)
+{
+ int dpi = 0;
+
+ LOGFN(__FILE__, __LINE__, __FUNCTION__);
+
+ if (xdpi) *xdpi = 0;
+ if (ydpi) *ydpi = 0;
+ /* FIXME: Ideally this needs to get the DPI from a specific screen */
+ dpi = ecore_wl_dpi_get();
+ if (xdpi) *xdpi = dpi;
+ if (ydpi) *ydpi = dpi;
+}
+
void
_ecore_evas_wayland_egl_resize(Ecore_Evas *ee, int location)
{
if (ev->win != ee->prop.window) return ECORE_CALLBACK_PASS_ON;
if ((ee->x != ev->x) || (ee->y != ev->y))
{
- ee->x = ev->x;
- ee->y = ev->y;
+ /* ee->x = ev->x; */
+ /* ee->y = ev->y; */
ee->req.x = ee->x;
ee->req.y = ee->y;
if (ee->func.fn_move) ee->func.fn_move(ee);
static void _ecore_evas_wl_transparent_set(Ecore_Evas *ee, int transparent);
static int _ecore_evas_wl_render(Ecore_Evas *ee);
static void _ecore_evas_wl_screen_geometry_get(const Ecore_Evas *ee __UNUSED__, int *x, int *y, int *w, int *h);
+static void _ecore_evas_wl_screen_dpi_get(const Ecore_Evas *ee __UNUSED__, int *xdpi, int *ydpi);
static void _ecore_evas_wl_ensure_pool_size(Ecore_Evas *ee, int w, int h);
static struct wl_shm_pool *_ecore_evas_wl_shm_pool_create(int size, void **data);
NULL, // modal set
NULL, // demand attention set
NULL, // focus skip set
- _ecore_evas_wl_render,
- _ecore_evas_wl_screen_geometry_get
+ _ecore_evas_wl_render,
+ _ecore_evas_wl_screen_geometry_get,
+ _ecore_evas_wl_screen_dpi_get
};
/* external variables */
_ecore_evas_wl_resize(Ecore_Evas *ee, int w, int h)
{
Evas_Engine_Info_Wayland_Shm *einfo;
+ int fw = 0, fh = 0;
LOGFN(__FILE__, __LINE__, __FUNCTION__);
ee->req.w = w;
ee->req.h = h;
+ evas_output_framespace_get(ee->evas, NULL, NULL, &fw, &fh);
+ w += fw;
+ h += fh;
+
if ((ee->w != w) || (ee->h != h))
{
ee->w = w;
if (ee->engine.wl.win)
{
+ ecore_wl_window_update_size(ee->engine.wl.win, w, h);
ecore_wl_window_buffer_attach(ee->engine.wl.win,
ee->engine.wl.buffer, 0, 0);
- ecore_wl_window_update_size(ee->engine.wl.win, w, h);
}
if (ee->func.fn_resize) ee->func.fn_resize(ee);
ecore_wl_screen_size_get(w, h);
}
+static void
+_ecore_evas_wl_screen_dpi_get(const Ecore_Evas *ee __UNUSED__, int *xdpi, int *ydpi)
+{
+ int dpi = 0;
+
+ LOGFN(__FILE__, __LINE__, __FUNCTION__);
+
+ if (xdpi) *xdpi = 0;
+ if (ydpi) *ydpi = 0;
+ /* FIXME: Ideally this needs to get the DPI from a specific screen */
+ dpi = ecore_wl_dpi_get();
+ if (xdpi) *xdpi = dpi;
+ if (ydpi) *ydpi = dpi;
+}
+
static struct wl_shm_pool *
_ecore_evas_wl_shm_pool_create(int size, void **data)
{
}
}
+static void
+_ecore_evas_win32_screen_dpi_get(const Ecore_Evas *ee, int *xdpi, int *ydpi)
+{
+ HDC dc;
+
+ dc = GetDC(NULL);
+ if (!dc)
+ {
+ if (xdpi) *xdpi = 0;
+ if (ydpi) *ydpi = 0;
+ return;
+ }
+
+ if (xdpi) *xdpi = GetDeviceCaps(dc, LOGPIXELSX);
+ if (ydpi) *ydpi = GetDeviceCaps(dc, LOGPIXELSY);
+
+ /*
+ * Alternative (to test)
+ int width_mm;
+ int height_mm;
+ int width_px;
+ int height_px;
+
+ width_mm = GetDeviceCaps(dc, HORZSIZE);
+ height_mm = GetDeviceCaps(dc, VERTSIZE);
+ width_px = GetDeviceCaps(dc, HORZRES);
+ height_px = GetDeviceCaps(dc, VERTRES);
+
+ *xdpi = (width_px * 254) / (width_mm * 10);
+ *ydpi = (height_px * 254) / (height_mm * 10);
+
+ code with LOGPIXELS gives 96x96
+ code with the computation gives 101x77
+
+ */
+
+ ReleaseDC(NULL, dc);
+}
static Ecore_Evas_Engine_Func _ecore_win32_engine_func =
{
NULL,
NULL, // render
- NULL //screen_geometry_get
+ NULL, // screen_geometry_get
+ _ecore_evas_win32_screen_dpi_get
};
#endif /* BUILD_ECORE_EVAS_WIN32 */
}
}
+static void
+_ecore_evas_wince_screen_dpi_get(const Ecore_Evas *ee, int *xdpi, int *ydpi)
+{
+ HDC dc;
+
+ dc = GetDC(NULL);
+ if (!dc)
+ {
+ if (xdpi) *xdpi = 0;
+ if (ydpi) *ydpi = 0;
+ return;
+ }
+
+ if (xdpi) *xdpi = GetDeviceCaps(dc, LOGPIXELSX);
+ if (ydpi) *ydpi = GetDeviceCaps(dc, LOGPIXELSY);
+
+ ReleaseDC(NULL, dc);
+}
+
static Ecore_Evas_Engine_Func _ecore_wince_engine_func =
{
_ecore_evas_wince_free,
NULL,
NULL, // render
- NULL // screen_geometry_get
+ NULL, // screen_geometry_get
+ _ecore_evas_wince_screen_dpi_get
};
/* API */
{
if (ee->engine.x.sync_counter)
{
- ecore_x_sync_counter_free(ee->engine.x.sync_counter);
+ ecore_x_sync_counter_free(ee->engine.x.sync_counter);
ee->engine.x.sync_val = 0;
}
ee->engine.x.sync_counter = 0;
}
if (sync_counter != ee->engine.x.sync_counter)
- ecore_x_e_comp_sync_counter_set(ee->prop.window, ee->engine.x.sync_counter);
+ ecore_x_e_comp_sync_counter_set(ee->prop.window, ee->engine.x.sync_counter);
}
static void
static void
_ecore_evas_x_screen_geometry_get(const Ecore_Evas *ee __UNUSED__, int *x, int *y, int *w, int *h)
{
- if (x) *x = 0;
- if (y) *y = 0;
- ecore_x_screen_size_get(ecore_x_default_screen_get(), w, h);
+ int outnum = 0;
+ int px = 0, py = 0, pw = 0, ph = 0;
+ Ecore_X_Window root;
+ Ecore_X_Randr_Output *out = NULL;
+ Ecore_X_Randr_Crtc crtc;
+
+ root = ecore_x_window_root_get(ee->prop.window);
+ out = ecore_x_randr_window_outputs_get(ee->prop.window, &outnum);
+ if (!out)
+ {
+norandr:
+ if (out) free(out);
+ if (x) *x = 0;
+ if (y) *y = 0;
+ ecore_x_window_size_get(root, w, h);
+ return;
+ }
+ crtc = ecore_x_randr_output_crtc_get(root, out[0]);
+ if (!crtc) goto norandr;
+ ecore_x_randr_crtc_geometry_get(root, crtc, &px, &py, &pw, &ph);
+ if ((pw == 0) || (ph == 0)) goto norandr;
+ if (x) *x = px;
+ if (y) *y = py;
+ if (w) *w = pw;
+ if (h) *h = ph;
+ free(out);
+}
+
+static void
+_ecore_evas_x_screen_dpi_get(const Ecore_Evas *ee, int *xdpi, int *ydpi)
+{
+ int scdpi, xmm = 0, ymm = 0, outnum = 0, w = 0, h = 0;
+ int px = 0, py = 0;
+ Ecore_X_Window root;
+ Ecore_X_Randr_Output *out = NULL;
+ Ecore_X_Randr_Crtc crtc;
+
+ root = ecore_x_window_root_get(ee->prop.window);
+ out = ecore_x_randr_window_outputs_get(ee->prop.window, &outnum);
+ if (!out)
+ {
+norandr:
+ if (out) free(out);
+ scdpi = ecore_x_dpi_get();
+ if (xdpi) *xdpi = scdpi;
+ if (ydpi) *ydpi = scdpi;
+ return;
+ }
+ crtc = ecore_x_randr_output_crtc_get(root, out[0]);
+ if (!crtc) goto norandr;
+ ecore_x_randr_crtc_geometry_get(root, crtc, &px, &py, &w, &h);
+ if ((w == 0) || (h == 0)) goto norandr;
+ ecore_x_randr_output_size_mm_get(root, out[0], &xmm, &ymm);
+ if ((xmm == 0) || (ymm == 0)) goto norandr;
+ if (xdpi) *xdpi = (w * 254) / (xmm * 10); // 25.4mm / inch
+ if (ydpi) *ydpi = (h * 254) / (ymm * 10); // 25.4mm / inch
+ free(out);
}
int
_ecore_evas_x_focus_skip_set,
NULL, // render
- _ecore_evas_x_screen_geometry_get
+ _ecore_evas_x_screen_geometry_get,
+ _ecore_evas_x_screen_dpi_get
};
#endif /* BUILD_ECORE_EVAS_X11 */
* @{
*/
+static sighandler_t oldhand = NULL;
+
+static void
+nosigint(int val __UNUSED__)
+{
+}
+
/**
* @brief Initialize the Ecore_Fb library.
*
if (!ecore_fb_vt_init())
return --_ecore_fb_init_count;
+ if (!oldhand)
+ {
+ oldhand = signal(SIGINT, nosigint);
+ }
+
_ecore_fb_size_get(&_ecore_fb_console_w, &_ecore_fb_console_h);
return _ecore_fb_init_count;
if (--_ecore_fb_init_count != 0)
return _ecore_fb_init_count;
+ if (oldhand)
+ {
+ signal(SIGINT, oldhand);
+ oldhand = NULL;
+ }
+
ecore_fb_vt_shutdown();
return _ecore_fb_init_count;
static void _ecore_fb_event_free_key_down(void *data, void *ev);
static void _ecore_fb_event_free_key_up(void *data, void *ev);
-static const char *_ecore_fb_kbd_syms[128 * 6] =
+static const char *_ecore_fb_kbd_syms[128 * 7] =
{
#include "ecore_fb_keytable.h"
};
if (_ecore_fb_shift) add = 1;
else if (_ecore_fb_lock) add = 2;
- e->keyname = strdup(_ecore_fb_kbd_syms[(buf & 0x7f) * 6]);
- e->keysymbol = strdup(_ecore_fb_kbd_syms[((buf & 0x7f) * 6) + add]);
- e->key_compose = strdup(_ecore_fb_kbd_syms[((buf & 0x7f) * 6) + 3 + add]);
+ e->keyname = strdup(_ecore_fb_kbd_syms[(buf & 0x7f) * 7]);
+ e->keysymbol = strdup(_ecore_fb_kbd_syms[((buf & 0x7f) * 7) + add]);
+ e->key_compose = strdup(_ecore_fb_kbd_syms[((buf & 0x7f) * 7) + 3 + add]);
}
else
e->keyname = strdup(_ecore_fb_btn_syms[buf & 0x7f]);
e->root_window = e->window;
e->same_screen = 1;
e->timestamp = ecore_loop_time_get() * 1000.0;
- ecore_event_add(ECORE_FB_EVENT_KEY_DOWN, e, _ecore_fb_event_free_key_down, NULL);
if (!strcmp(e->keyname, "Control_L"))
_ecore_fb_ctrl++;
else if (!strcmp(e->keyname, "Control_R"))
else if (!strcmp(e->keyname, "F12")) vt_switch = 11;
if (_ecore_fb_ctrl > 2) _ecore_fb_ctrl = 2;
if (_ecore_fb_alt > 2) _ecore_fb_alt = 2;
+ if ((_ecore_fb_kbd_fd == _ecore_fb_tty_fd) &&
+ (_ecore_fb_ctrl))
+ {
+ const char *ts = _ecore_fb_kbd_syms[(buf & 0x7f) + 3 + 3];
+
+ if (ts)
+ {
+ if (e->key_compose) free(e->key_compose);
+ e->key_compose = strdup(ts);
+ }
+ }
if ((vt_switch >= 0) &&
(_ecore_fb_ctrl) &&
(_ecore_fb_alt))
_ecore_fb_vt_switch(vt_switch);
+ ecore_event_add(ECORE_FB_EVENT_KEY_DOWN, e, _ecore_fb_event_free_key_down, NULL);
}
else
{
if (_ecore_fb_shift) add = 1;
else if (_ecore_fb_lock) add = 2;
- e->keyname = strdup(_ecore_fb_kbd_syms[(buf & 0x7f) * 6]);
- e->keysymbol = strdup(_ecore_fb_kbd_syms[((buf & 0x7f) * 6) + add]);
- e->key_compose = strdup(_ecore_fb_kbd_syms[((buf & 0x7f) * 6) + 3 + add]);
+ e->keyname = strdup(_ecore_fb_kbd_syms[(buf & 0x7f) * 7]);
+ e->keysymbol = strdup(_ecore_fb_kbd_syms[((buf & 0x7f) * 7) + add]);
+ e->key_compose = strdup(_ecore_fb_kbd_syms[((buf & 0x7f) * 7) + 3 + add]);
}
else
e->keyname = strdup(_ecore_fb_btn_syms[buf & 0x7f]);
/* this table was taken from ecore_fb, is the default en layout */
- "0x00", "0x00", "0x00", /**/"", "", "",/***/
- "Escape", "Escape", "Escape", /**/"", "", "",/***/
- "1", "exclam", "1", /**/"1", "!", "1",/***/
- "2", "at", "2", /**/"2", "@", "2",/***/
- "3", "numbersign", "3", /**/"3", "#", "3",/***/
- "4", "dollar", "4", /**/"4", "$", "4",/***/
- "5", "percent", "5", /**/"5", "%", "5",/***/
- "6", "asciicircumm", "6", /**/"6", "^", "6",/***/
- "7", "ampersand", "7", /**/"7", "&", "7",/***/
- "8", "asterisk", "8", /**/"8", "*", "8",/***/
- "9", "parenleft", "9", /**/"9", "(", "9",/***/
- "0", "parenright", "0", /**/"0", ")", "0",/***/
- "minus", "underscore", "minus", /**/"-", "_", "-",/***/
- "equal", "plus", "equal", /**/"=", "+", "=",/***/
- "BackSpace", "BackSpace", "BackSpace", /**/"\010","\010","\010",/***/
- "Tab", "ISO_Left_Tab", "Tab", /**/"\011","", "\011",/***/
- "q", "Q", "Q", /**/"q", "Q", "Q",/***/
- "w", "W", "W", /**/"w", "W", "W",/***/
- "e", "E", "E", /**/"e", "E", "E",/***/
- "r", "R", "R", /**/"r", "R", "R",/***/
- "t", "T", "T", /**/"t", "T", "T",/***/
- "y", "Y", "Y", /**/"y", "Y", "Y",/***/
- "u", "U", "U", /**/"u", "U", "U",/***/
- "i", "I", "I", /**/"i", "I", "I",/***/
- "o", "O", "O", /**/"o", "O", "O",/***/
- "p", "P", "P", /**/"p", "P", "P",/***/
- "bracketleft", "braceleft", "bracketleft", /**/"[", "{", "[",/***/
- "bracketright", "braceright", "bracketright", /**/"]", "}", "]",/***/
- "Return", "Return", "Return", /**/"\015","\015","\015",/***/
- "Control_L", "Control_L", "Control_L", /**/"", "", "",/***/
- "a", "A", "A", /**/"a", "A", "A",/***/
- "s", "S", "S", /**/"s", "S", "S",/***/
- "d", "D", "D", /**/"d", "D", "D",/***/
- "f", "F", "F", /**/"f", "F", "F",/***/
- "g", "G", "G", /**/"g", "G", "G",/***/
- "h", "h", "H", /**/"h", "H", "H",/***/
- "j", "J", "J", /**/"j", "J", "J",/***/
- "k", "K", "K", /**/"k", "K", "K",/***/
- "l", "L", "L", /**/"l", "L", "L",/***/
- "semicolon", "colon", "semicolon", /**/";", ":", ";",/***/
- "apostrophe", "quotedbl", "apostrophe", /**/"'", "\"", "'",/***/
- "grave", "asciitilde", "grave", /**/"`", "~", "`",/***/
- "Shift_L", "Shift_L", "Shift_L", /**/"", "", "",/***/
- "backslash", "bar", "backslash", /**/"\\", "|", "\\",/***/
- "z", "Z", "Z", /**/"z", "Z", "Z",/***/
- "x", "X", "X", /**/"x", "X", "X",/***/
- "c", "C", "C", /**/"c", "C", "C",/***/
- "v", "V", "V", /**/"v", "V", "V",/***/
- "b", "B", "B", /**/"b", "B", "B",/***/
- "n", "N", "N", /**/"n", "N", "N",/***/
- "m", "M", "M", /**/"m", "M", "M",/***/
- "comma", "less", "comma", /**/",", "<", ",",/***/
- "period", "greater", "period", /**/".", ">", ".",/***/
- "slash", "question", "slash", /**/"/", "?", "/",/***/
- "Shift_R", "Shift_R", "Shift_R", /**/"", "", "",/***/
- "KP_Multiply", "KP_Multiply", "KP_Multiply", /**/"", "*", "",/***/
- "Alt_L", "Alt_L", "Alt_L", /**/"", "", "",/***/
- "space", "space", "space", /**/" ", " ", " ",/***/
- "Caps_Lock", "Caps_Lock", "Caps_Lock", /**/"", "", "",/***/
- "F1", "F1", "F1", /**/"", "", "",/***/
- "F2", "F2", "F2", /**/"", "", "",/***/
- "F3", "F3", "F3", /**/"", "", "",/***/
- "F4", "F4", "F4", /**/"", "", "",/***/
- "F5", "F5", "F5", /**/"", "", "",/***/
- "F6", "F6", "F6", /**/"", "", "",/***/
- "F7", "F7", "F7", /**/"", "", "",/***/
- "F8", "F8", "F8", /**/"", "", "",/***/
- "F9", "F9", "F9", /**/"", "", "",/***/
- "F10", "F10", "F10", /**/"", "", "",/***/
- "Num_Lock", "Num_Lock", "Num_Lock", /**/"", "", "",/***/
- "Scroll_Lock", "Scroll_Lock", "Scroll_Lock", /**/"", "", "",/***/
- "KP_Home", "KP_7", "KP_Home", /**/"", "7", "",/***/
- "KP_Up", "KP_8", "KP_Up", /**/"", "8", "",/***/
- "KP_Prior", "KP_9", "KP_Prior", /**/"", "9", "",/***/
- "KP_Subtract", "KP_Subtract", "KP_Subtract", /**/"", "", "",/***/
- "KP_Left", "KP_4", "KP_Left", /**/"", "4", "",/***/
- "KP_Begin", "KP_5", "KP_Begin", /**/"", "5", "",/***/
- "KP_Right", "KP_6", "KP_Right", /**/"", "6", "",/***/
- "KP_Add", "KP_Add", "KP_Add", /**/"", "", "",/***/
- "KP_End", "KP_1", "KP_End", /**/"", "1", "",/***/
- "KP_Down", "KP_2", "KP_Down", /**/"", "2", "",/***/
- "KP_Next", "KP_3", "KP_Next", /**/"", "3", "",/***/
- "KP_Insert", "KP_0", "KP_Insert", /**/"", "0", "",/***/
- "KP_Delete", "KP_Decimal", "KP_Delete", /**/"", ".", "",/***/
- "0x54", "0x54", "0x54", /**/"", "", "",/***/
- "0x55", "0x55", "0x55", /**/"", "", "",/***/
- "0x56", "0x56", "0x56", /**/"", "", "",/***/
- "F11", "F11", "F11", /**/"", "", "",/***/
- "F12", "F12", "F12", /**/"", "", "",/***/
- "0x59", "0x59", "0x59", /**/"", "", "",/***/
- "0x5a", "0x5a", "0x5a", /**/"", "", "",/***/
- "0x5b", "0x5b", "0x5b", /**/"", "", "",/***/
- "0x5c", "0x5c", "0x5c", /**/"", "", "",/***/
- "0x5d", "0x5d", "0x5d", /**/"", "", "",/***/
- "0x5e", "0x5e", "0x5e", /**/"", "", "",/***/
- "0x5f", "0x5f", "0x5f", /**/"", "", "",/***/
- "KP_Enter", "KP_Enter", "KP_Enter", /**/"", "", "",/***/
- "Control_R", "Control_R", "Control_R", /**/"", "", "",/***/
- "KP_Divide", "KP_Divide", "KP_Divide", /**/"", "", "",/***/
- "Print", "Print", "Print", /**/"", "", "",/***/
- "Alt_R", "Alt_R", "Alt_R", /**/"", "", "",/***/
- "0x65", "0x65", "0x65", /**/"", "", "",/***/
- "Home", "Home", "Home", /**/"", "", "",/***/
- "Up", "Up", "Up", /**/"", "", "",/***/
- "Prior", "Prior", "Prior", /**/"", "", "",/***/
- "Left", "Left", "Left", /**/"", "", "",/***/
- "Right", "Right", "Right", /**/"", "", "",/***/
- "End", "End", "End", /**/"", "", "",/***/
- "Down", "Down", "Down", /**/"", "", "",/***/
- "Next", "Next", "Next", /**/"", "", "",/***/
- "Insert", "Insert", "Insert", /**/"", "", "",/***/
- "Delete", "Delete", "Delete", /**/"\177","\177","\177",/***/
- "0x70", "0x70", "0x70", /**/"", "", "",/***/
- "0x71", "0x71", "0x71", /**/"", "", "",/***/
- "0x72", "0x72", "0x72", /**/"", "", "",/***/
- "0x73", "0x73", "0x73", /**/"", "", "",/***/
- "0x74", "0x74", "0x74", /**/"", "", "",/***/
- "0x75", "0x75", "0x75", /**/"", "", "",/***/
- "0x76", "0x76", "0x76", /**/"", "", "",/***/
- "Pause", "Pause", "Pause", /**/"", "", "",/***/
- "0x78", "0x78", "0x78", /**/"", "", "",/***/
- "0x79", "0x79", "0x79", /**/"", "", "",/***/
- "0x7a", "0x7a", "0x7a", /**/"", "", "",/***/
- "0x7b", "0x7b", "0x7b", /**/"", "", "",/***/
- "0x7c", "0x7c", "0x7c", /**/"", "", "",/***/
- "Super_L", "Super_L", "Super_L", /**/"", "", "",/***/
- "Super_R", "Super_R", "Super_R", /**/"", "", "",/***/
- "0x7f", "0x7f", "0x7f", /**/"", "", "" /***/
+ "0x00", "0x00", "0x00", /**/"", "", "", NULL,/***/
+ "Escape", "Escape", "Escape", /**/"", "", "", "\x1b",/***/
+ "1", "exclam", "1", /**/"1", "!", "1", NULL,/***/
+ "2", "at", "2", /**/"2", "@", "2", "",/***/
+ "3", "numbersign", "3", /**/"3", "#", "3", "\x1b",/***/
+ "4", "dollar", "4", /**/"4", "$", "4", "\x1c",/***/
+ "5", "percent", "5", /**/"5", "%", "5", "\x1d",/***/
+ "6", "asciicircumm", "6", /**/"6", "^", "6", "\x1e",/***/
+ "7", "ampersand", "7", /**/"7", "&", "7", "\x1f",/***/
+ "8", "asterisk", "8", /**/"8", "*", "8", "\x7f",/***/
+ "9", "parenleft", "9", /**/"9", "(", "9", NULL,/***/
+ "0", "parenright", "0", /**/"0", ")", "0", NULL,/***/
+ "minus", "underscore", "minus", /**/"-", "_", "-", NULL,/***/
+ "equal", "plus", "equal", /**/"=", "+", "=", NULL,/***/
+ "BackSpace", "BackSpace", "BackSpace", /**/"\010","\010","\010", NULL,/***/
+ "Tab", "ISO_Left_Tab", "Tab", /**/"\011","", "\011", NULL,/***/
+ "q", "Q", "Q", /**/"q", "Q", "Q", "\x11",/***/
+ "w", "W", "W", /**/"w", "W", "W", "\x17",/***/
+ "e", "E", "E", /**/"e", "E", "E", "\x05",/***/
+ "r", "R", "R", /**/"r", "R", "R", "\x12",/***/
+ "t", "T", "T", /**/"t", "T", "T", "\x14",/***/
+ "y", "Y", "Y", /**/"y", "Y", "Y", "\x19",/***/
+ "u", "U", "U", /**/"u", "U", "U", "\x15",/***/
+ "i", "I", "I", /**/"i", "I", "I", "\x09",/***/
+ "o", "O", "O", /**/"o", "O", "O", "\x0f",/***/
+ "p", "P", "P", /**/"p", "P", "P", "\x10",/***/
+ "bracketleft", "braceleft", "bracketleft", /**/"[", "{", "[", "\x1b",/***/
+ "bracketright", "braceright", "bracketright", /**/"]", "}", "]", "\x1d",/***/
+ "Return", "Return", "Return", /**/"\015","\015","\015", NULL,/***/
+ "Control_L", "Control_L", "Control_L", /**/"", "", "", NULL,/***/
+ "a", "A", "A", /**/"a", "A", "A", "\x01",/***/
+ "s", "S", "S", /**/"s", "S", "S", "\x13",/***/
+ "d", "D", "D", /**/"d", "D", "D", "\x04",/***/
+ "f", "F", "F", /**/"f", "F", "F", "\x06",/***/
+ "g", "G", "G", /**/"g", "G", "G", "\x07",/***/
+ "h", "h", "H", /**/"h", "H", "H", "\x08",/***/
+ "j", "J", "J", /**/"j", "J", "J", "\x0a",/***/
+ "k", "K", "K", /**/"k", "K", "K", "\x0b",/***/
+ "l", "L", "L", /**/"l", "L", "L", "\x0c",/***/
+ "semicolon", "colon", "semicolon", /**/";", ":", ";", NULL,/***/
+ "apostrophe", "quotedbl", "apostrophe", /**/"'", "\"", "'", NULL,/***/
+ "grave", "asciitilde", "grave", /**/"`", "~", "`", "",/***/
+ "Shift_L", "Shift_L", "Shift_L", /**/"", "", "", NULL,/***/
+ "backslash", "bar", "backslash", /**/"\\", "|", "\\", "\x1c",/***/
+ "z", "Z", "Z", /**/"z", "Z", "Z", "\x1a",/***/
+ "x", "X", "X", /**/"x", "X", "X", "\x18",/***/
+ "c", "C", "C", /**/"c", "C", "C", "\x03",/***/
+ "v", "V", "V", /**/"v", "V", "V", "\x16",/***/
+ "b", "B", "B", /**/"b", "B", "B", "\x02",/***/
+ "n", "N", "N", /**/"n", "N", "N", "\x0e",/***/
+ "m", "M", "M", /**/"m", "M", "M", "\x0d",/***/
+ "comma", "less", "comma", /**/",", "<", ",", NULL,/***/
+ "period", "greater", "period", /**/".", ">", ".", NULL,/***/
+ "slash", "question", "slash", /**/"/", "?", "/", "",/***/
+ "Shift_R", "Shift_R", "Shift_R", /**/"", "", "", NULL,/***/
+ "KP_Multiply", "KP_Multiply", "KP_Multiply", /**/"", "*", "", NULL,/***/
+ "Alt_L", "Alt_L", "Alt_L", /**/"", "", "", NULL,/***/
+ "space", "space", "space", /**/" ", " ", " ", "",/***/
+ "Caps_Lock", "Caps_Lock", "Caps_Lock", /**/"", "", "", NULL,/***/
+ "F1", "F1", "F1", /**/"", "", "", NULL,/***/
+ "F2", "F2", "F2", /**/"", "", "", NULL,/***/
+ "F3", "F3", "F3", /**/"", "", "", NULL,/***/
+ "F4", "F4", "F4", /**/"", "", "", NULL,/***/
+ "F5", "F5", "F5", /**/"", "", "", NULL,/***/
+ "F6", "F6", "F6", /**/"", "", "", NULL,/***/
+ "F7", "F7", "F7", /**/"", "", "", NULL,/***/
+ "F8", "F8", "F8", /**/"", "", "", NULL,/***/
+ "F9", "F9", "F9", /**/"", "", "", NULL,/***/
+ "F10", "F10", "F10", /**/"", "", "", NULL,/***/
+ "Num_Lock", "Num_Lock", "Num_Lock", /**/"", "", "", NULL,/***/
+ "Scroll_Lock", "Scroll_Lock", "Scroll_Lock", /**/"", "", "", NULL,/***/
+ "KP_Home", "KP_7", "KP_Home", /**/"", "7", "", NULL,/***/
+ "KP_Up", "KP_8", "KP_Up", /**/"", "8", "", NULL,/***/
+ "KP_Prior", "KP_9", "KP_Prior", /**/"", "9", "", NULL,/***/
+ "KP_Subtract", "KP_Subtract", "KP_Subtract", /**/"", "", "", NULL,/***/
+ "KP_Left", "KP_4", "KP_Left", /**/"", "4", "", NULL,/***/
+ "KP_Begin", "KP_5", "KP_Begin", /**/"", "5", "", NULL,/***/
+ "KP_Right", "KP_6", "KP_Right", /**/"", "6", "", NULL,/***/
+ "KP_Add", "KP_Add", "KP_Add", /**/"", "", "", NULL,/***/
+ "KP_End", "KP_1", "KP_End", /**/"", "1", "", NULL,/***/
+ "KP_Down", "KP_2", "KP_Down", /**/"", "2", "", NULL,/***/
+ "KP_Next", "KP_3", "KP_Next", /**/"", "3", "", NULL,/***/
+ "KP_Insert", "KP_0", "KP_Insert", /**/"", "0", "", NULL,/***/
+ "KP_Delete", "KP_Decimal", "KP_Delete", /**/"", ".", "", NULL,/***/
+ "0x54", "0x54", "0x54", /**/"", "", "", NULL,/***/
+ "0x55", "0x55", "0x55", /**/"", "", "", NULL,/***/
+ "0x56", "0x56", "0x56", /**/"", "", "", NULL,/***/
+ "F11", "F11", "F11", /**/"", "", "", NULL,/***/
+ "F12", "F12", "F12", /**/"", "", "", NULL,/***/
+ "0x59", "0x59", "0x59", /**/"", "", "", NULL,/***/
+ "0x5a", "0x5a", "0x5a", /**/"", "", "", NULL,/***/
+ "0x5b", "0x5b", "0x5b", /**/"", "", "", NULL,/***/
+ "0x5c", "0x5c", "0x5c", /**/"", "", "", NULL,/***/
+ "0x5d", "0x5d", "0x5d", /**/"", "", "", NULL,/***/
+ "0x5e", "0x5e", "0x5e", /**/"", "", "", NULL,/***/
+ "0x5f", "0x5f", "0x5f", /**/"", "", "", NULL,/***/
+ "KP_Enter", "KP_Enter", "KP_Enter", /**/"\015", "\015", "\015", NULL,/***/
+ "Control_R", "Control_R", "Control_R", /**/"", "", "", NULL,/***/
+ "KP_Divide", "KP_Divide", "KP_Divide", /**/"", "", "", NULL,/***/
+ "Print", "Print", "Print", /**/"", "", "", NULL,/***/
+ "Alt_R", "Alt_R", "Alt_R", /**/"", "", "", NULL,/***/
+ "0x65", "0x65", "0x65", /**/"", "", "", NULL,/***/
+ "Home", "Home", "Home", /**/"", "", "", NULL,/***/
+ "Up", "Up", "Up", /**/"", "", "", NULL,/***/
+ "Prior", "Prior", "Prior", /**/"", "", "", NULL,/***/
+ "Left", "Left", "Left", /**/"", "", "", NULL,/***/
+ "Right", "Right", "Right", /**/"", "", "", NULL,/***/
+ "End", "End", "End", /**/"", "", "", NULL,/***/
+ "Down", "Down", "Down", /**/"", "", "", NULL,/***/
+ "Next", "Next", "Next", /**/"", "", "", NULL,/***/
+ "Insert", "Insert", "Insert", /**/"", "", "", NULL,/***/
+ "Delete", "Delete", "Delete", /**/"\177","\177","\177", NULL,/***/
+ "0x70", "0x70", "0x70", /**/"", "", "", NULL,/***/
+ "0x71", "0x71", "0x71", /**/"", "", "", NULL,/***/
+ "0x72", "0x72", "0x72", /**/"", "", "", NULL,/***/
+ "0x73", "0x73", "0x73", /**/"", "", "", NULL,/***/
+ "0x74", "0x74", "0x74", /**/"", "", "", NULL,/***/
+ "0x75", "0x75", "0x75", /**/"", "", "", NULL,/***/
+ "0x76", "0x76", "0x76", /**/"", "", "", NULL,/***/
+ "Pause", "Pause", "Pause", /**/"", "", "", NULL,/***/
+ "0x78", "0x78", "0x78", /**/"", "", "", NULL,/***/
+ "0x79", "0x79", "0x79", /**/"", "", "", NULL,/***/
+ "0x7a", "0x7a", "0x7a", /**/"", "", "", NULL,/***/
+ "0x7b", "0x7b", "0x7b", /**/"", "", "", NULL,/***/
+ "0x7c", "0x7c", "0x7c", /**/"", "", "", NULL,/***/
+ "Super_L", "Super_L", "Super_L", /**/"", "", "", NULL,/***/
+ "Super_R", "Super_R", "Super_R", /**/"", "", "", NULL,/***/
+ "0x7f", "0x7f", "0x7f", /**/"", "", "", NULL, /***/
static Eina_List *_ecore_fb_li_devices = NULL;
-static const char *_ecore_fb_li_kbd_syms[128 * 6] =
+static const char *_ecore_fb_li_kbd_syms[128 * 7] =
{
#include "ecore_fb_keytable.h"
};
if ((iev->code >= KEY_ESC) && (iev->code <= KEY_COMPOSE))
{
int offset = 0;
- const char *keyname = _ecore_fb_li_kbd_syms[iev->code * 6];
+ const char *keyname = _ecore_fb_li_kbd_syms[iev->code * 7];
+
/* check the key table */
if (iev->value)
{
/* its a repeated key, dont increment */
- if (iev->value == 2)
- return;
- if (!strcmp(keyname, "Control_L"))
- dev->keyboard.ctrl++;
- else if (!strcmp(keyname, "Control_R"))
- dev->keyboard.ctrl++;
- else if (!strcmp(keyname, "Alt_L"))
- dev->keyboard.alt++;
- else if (!strcmp(keyname, "Alt_R"))
- dev->keyboard.alt++;
- else if (!strcmp(keyname, "Shift_L"))
- dev->keyboard.shift++;
- else if (!strcmp(keyname, "Shift_R"))
- dev->keyboard.shift++;
- 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;
- if (dev->keyboard.lock > 1) dev->keyboard.lock = 1;
+ if (iev->value != 2)
+ {
+ if (!strcmp(keyname, "Control_L"))
+ dev->keyboard.ctrl++;
+ else if (!strcmp(keyname, "Control_R"))
+ dev->keyboard.ctrl++;
+ else if (!strcmp(keyname, "Alt_L"))
+ dev->keyboard.alt++;
+ else if (!strcmp(keyname, "Alt_R"))
+ dev->keyboard.alt++;
+ else if (!strcmp(keyname, "Shift_L"))
+ dev->keyboard.shift++;
+ else if (!strcmp(keyname, "Shift_R"))
+ dev->keyboard.shift++;
+ 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;
+ if (dev->keyboard.lock > 1) dev->keyboard.lock = 1;
+ }
}
else
{
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];
+ const char *key = _ecore_fb_li_kbd_syms[(iev->code * 7) + offset];
+ const char *compose = _ecore_fb_li_kbd_syms[(iev->code * 7) + 3 + offset];
+
+ if (dev->keyboard.ctrl)
+ {
+ const char *ts = _ecore_fb_li_kbd_syms[(iev->code * 7) + 3 + 3];
+
+ if (ts) compose = ts;
+ }
e = calloc(1, sizeof(Ecore_Event_Key) + strlen(key) +
strlen(keyname) + (compose ? strlen(compose) : 0) + 3);
double current = ecore_loop_time_get();
button = ((iev->code & 0x00F) + 1);
+ // swap 2 and 3 to make middle and right butotn work right.
+ if (button == 3) button = 2;
+ else if (button == 2) button = 3;
if (iev->value)
{
dev->mouse.did_double = EINA_FALSE;
case REL_Y:
{
Ecore_Event_Mouse_Move *e;
- if(iev->code == REL_X)
+ if (iev->code == REL_X)
{
dev->mouse.x += iev->value;
- if(dev->mouse.x > dev->mouse.w - 1)
- dev->mouse.x = dev->mouse.w;
+ if (dev->mouse.x > dev->mouse.w - 1)
+ dev->mouse.x = dev->mouse.w;
else if(dev->mouse.x < 0)
- dev->mouse.x = 0;
+ dev->mouse.x = 0;
}
else
{
dev->mouse.y += iev->value;
- if(dev->mouse.y > dev->mouse.h - 1)
- dev->mouse.y = dev->mouse.h;
+ if (dev->mouse.y > dev->mouse.h - 1)
+ dev->mouse.y = dev->mouse.h;
else if(dev->mouse.y < 0)
- dev->mouse.y = 0;
+ dev->mouse.y = 0;
}
e = calloc(1, sizeof(Ecore_Event_Mouse_Move));
break;
case ABS_Y:
- if(dev->mouse.h != 0)
+ if (dev->mouse.h != 0)
{
int tmp;
/* set info */
for (event_type = 0; event_type < EV_MAX; event_type++)
{
- if(!test_bit(event_type, event_type_bitmask))
- continue;
+ if (!test_bit(event_type, event_type_bitmask))
+ continue;
switch (event_type)
{
case EV_SYN:
/* ecore_imf_context_input_panel_event_callback_add() flag */
typedef enum
{
- ECORE_IMF_INPUT_PANEL_STATE_EVENT, /**< called when the state of the input panel is changed. */
- ECORE_IMF_INPUT_PANEL_LANGUAGE_EVENT, /**< called when the language of the input panel is changed. */
- ECORE_IMF_INPUT_PANEL_SHIFT_MODE_EVENT, /**< called when the shift key state of the input panel is changed */
- ECORE_IMF_INPUT_PANEL_GEOMETRY_EVENT, /**< called when the size of the input panel is changed. */
- ECORE_IMF_CANDIDATE_PANEL_STATE_EVENT, /**< called when the state of the candidate word panel is changed. */
- ECORE_IMF_CANDIDATE_PANEL_GEOMETRY_EVENT /**< called when the size of the candidate word panel is changed. */
+ ECORE_IMF_INPUT_PANEL_STATE_EVENT, /**< called when the state of the input panel is changed. @since 1.7 */
+ ECORE_IMF_INPUT_PANEL_LANGUAGE_EVENT, /**< called when the language of the input panel is changed. @since 1.7 */
+ ECORE_IMF_INPUT_PANEL_SHIFT_MODE_EVENT, /**< called when the shift key state of the input panel is changed @since 1.7 */
+ ECORE_IMF_INPUT_PANEL_GEOMETRY_EVENT, /**< called when the size of the input panel is changed. @since 1.7 */
+ ECORE_IMF_CANDIDATE_PANEL_STATE_EVENT, /**< called when the state of the candidate word panel is changed. @since 1.7 */
+ ECORE_IMF_CANDIDATE_PANEL_GEOMETRY_EVENT /**< called when the size of the candidate word panel is changed. @since 1.7 */
} Ecore_IMF_Input_Panel_Event;
typedef enum
{
- ECORE_IMF_INPUT_PANEL_STATE_SHOW, /**< Notification after the display of the input panel */
- ECORE_IMF_INPUT_PANEL_STATE_HIDE, /**< Notification prior to the dismissal of the input panel */
- ECORE_IMF_INPUT_PANEL_STATE_WILL_SHOW /**< Notification prior to the display of the input panel */
+ ECORE_IMF_INPUT_PANEL_STATE_SHOW, /**< Notification after the display of the input panel @since 1.7 */
+ ECORE_IMF_INPUT_PANEL_STATE_HIDE, /**< Notification prior to the dismissal of the input panel @since 1.7 */
+ ECORE_IMF_INPUT_PANEL_STATE_WILL_SHOW /**< Notification prior to the display of the input panel @since 1.7 */
} Ecore_IMF_Input_Panel_State;
typedef enum
{
- ECORE_IMF_INPUT_PANEL_SHIFT_MODE_OFF,
- ECORE_IMF_INPUT_PANEL_SHIFT_MODE_ON
+ ECORE_IMF_INPUT_PANEL_SHIFT_MODE_OFF, /**< @since 1.7 */
+ ECORE_IMF_INPUT_PANEL_SHIFT_MODE_ON /**< @since 1.7 */
} Ecore_IMF_Input_Panel_Shift_Mode;
typedef enum
{
- ECORE_IMF_CANDIDATE_PANEL_SHOW, /**< Notification after the display of the candidate word panel */
- ECORE_IMF_CANDIDATE_PANEL_HIDE /**< Notification prior to the dismissal of the candidate word panel */
+ ECORE_IMF_CANDIDATE_PANEL_SHOW, /**< Notification after the display of the candidate word panel @since 1.7 */
+ ECORE_IMF_CANDIDATE_PANEL_HIDE /**< Notification prior to the dismissal of the candidate word panel @since 1.7 */
} Ecore_IMF_Candidate_Panel_State;
/* Events sent by the Input Method */
*/
typedef enum
{
- ECORE_IMF_CALLBACK_PREEDIT_START, /**< "PREEDIT_START" is called when a new preediting sequence starts. */
- ECORE_IMF_CALLBACK_PREEDIT_END, /**< "PREEDIT_END" is called when a preediting sequence has been completed or canceled. */
- ECORE_IMF_CALLBACK_PREEDIT_CHANGED, /**< "PREEDIT_CHANGED" is called whenever the preedit sequence currently being entered has changed. */
- ECORE_IMF_CALLBACK_COMMIT, /**< "COMMIT" is called when a complete input sequence has been entered by the user */
- ECORE_IMF_CALLBACK_DELETE_SURROUNDING /**< "DELETE_SURROUNDING" is called when the input method needs to delete all or part of the context surrounding the cursor */
+ ECORE_IMF_CALLBACK_PREEDIT_START, /**< "PREEDIT_START" is called when a new preediting sequence starts. @since 1.2 */
+ ECORE_IMF_CALLBACK_PREEDIT_END, /**< "PREEDIT_END" is called when a preediting sequence has been completed or canceled. @since 1.2 */
+ ECORE_IMF_CALLBACK_PREEDIT_CHANGED, /**< "PREEDIT_CHANGED" is called whenever the preedit sequence currently being entered has changed. @since 1.2 */
+ ECORE_IMF_CALLBACK_COMMIT, /**< "COMMIT" is called when a complete input sequence has been entered by the user @since 1.2 */
+ ECORE_IMF_CALLBACK_DELETE_SURROUNDING /**< "DELETE_SURROUNDING" is called when the input method needs to delete all or part of the context surrounding the cursor @since 1.2 */
} Ecore_IMF_Callback_Type;
/**
ECORE_IMF_KEYBOARD_MODIFIER_ALT = 1 << 1, /**< "Alt" is pressed */
ECORE_IMF_KEYBOARD_MODIFIER_SHIFT = 1 << 2, /**< "Shift" is pressed */
ECORE_IMF_KEYBOARD_MODIFIER_WIN = 1 << 3, /**< "Win" (between "Ctrl" and "Alt") is pressed */
- ECORE_IMF_KEYBOARD_MODIFIER_ALTGR = 1 << 4 /**< "AltGr" is pressed @since 1.3 */
+ ECORE_IMF_KEYBOARD_MODIFIER_ALTGR = 1 << 4 /**< "AltGr" is pressed @since 1.7 */
} Ecore_IMF_Keyboard_Modifiers;
/**
ECORE_IMF_KEYBOARD_LOCK_CAPS = 1 << 1, /**< "Caps" lock is active */
ECORE_IMF_KEYBOARD_LOCK_SCROLL = 1 << 2 /**< "Scroll" lock is active */
} Ecore_IMF_Keyboard_Locks;
+
/**
* @typedef Ecore_IMF_Mouse_Flags
* Type for Ecore_IMF mouse flags
*/
typedef enum
{
- ECORE_IMF_PREEDIT_TYPE_NONE, /**< None style */
- ECORE_IMF_PREEDIT_TYPE_SUB1, /**< Substring style 1 */
- ECORE_IMF_PREEDIT_TYPE_SUB2, /**< Substring style 2 */
- ECORE_IMF_PREEDIT_TYPE_SUB3 /**< Substring style 3 */
+ ECORE_IMF_PREEDIT_TYPE_NONE, /**< None style @since 1.1 */
+ ECORE_IMF_PREEDIT_TYPE_SUB1, /**< Substring style 1 @since 1.1 */
+ ECORE_IMF_PREEDIT_TYPE_SUB2, /**< Substring style 2 @since 1.1 */
+ ECORE_IMF_PREEDIT_TYPE_SUB3 /**< Substring style 3 @since 1.1 */
} Ecore_IMF_Preedit_Type;
/**
*/
typedef enum
{
- ECORE_IMF_AUTOCAPITAL_TYPE_NONE, /**< No auto-capitalization when typing */
- ECORE_IMF_AUTOCAPITAL_TYPE_WORD, /**< Autocapitalize each word typed */
- ECORE_IMF_AUTOCAPITAL_TYPE_SENTENCE, /**< Autocapitalize the start of each sentence */
- ECORE_IMF_AUTOCAPITAL_TYPE_ALLCHARACTER, /**< Autocapitalize all letters */
+ ECORE_IMF_AUTOCAPITAL_TYPE_NONE, /**< No auto-capitalization when typing @since 1.1 */
+ ECORE_IMF_AUTOCAPITAL_TYPE_WORD, /**< Autocapitalize each word typed @since 1.1 */
+ ECORE_IMF_AUTOCAPITAL_TYPE_SENTENCE, /**< Autocapitalize the start of each sentence @since 1.1 */
+ ECORE_IMF_AUTOCAPITAL_TYPE_ALLCHARACTER, /**< Autocapitalize all letters @since 1.1 */
} Ecore_IMF_Autocapital_Type;
/**
* @param w width of the input panel
* @param h height of the input panel
* @ingroup Ecore_IMF_Context_Group
- * @since 1.2.0
+ * @since 1.3
*/
EAPI void
ecore_imf_context_input_panel_geometry_get(Ecore_IMF_Context *ctx, int *x, int *y, int *w, int *h)
* Get state of current active input panel.
*
* @param ctx An #Ecore_IMF_Context.
- * @param The state of input panel.
+ * @return The state of input panel.
* @ingroup Ecore_IMF_Context_Group
- * @since 1.2.0
+ * @since 1.3
*/
EAPI Ecore_IMF_Input_Panel_State
ecore_imf_context_input_panel_state_get(Ecore_IMF_Context *ctx)
* @param func the callback function
* @param data application-input panel specific data.
* @ingroup Ecore_IMF_Context_Group
- * @since 1.2.0
+ * @since 1.3
*/
EAPI void
ecore_imf_context_input_panel_event_callback_add(Ecore_IMF_Context *ctx,
* Unregister a callback function which will be called if there is change in input panel state, language, mode etc.
*
* @param ctx An #Ecore_IMF_Context.
+ * @param type An #Ecore_IMF_Input_Panel_Event.
* @param func the callback function
- * @param data application-input panel specific data.
* @ingroup Ecore_IMF_Context_Group
- * @since 1.2.0
+ * @since 1.3
*/
EAPI void
ecore_imf_context_input_panel_event_callback_del(Ecore_IMF_Context *ctx,
* @param lang Location to store the retrieved language string. The
* string retrieved must be freed with free().
* @ingroup Ecore_IMF_Context_Group
+ * @since 1.3
*/
EAPI void
ecore_imf_context_input_panel_language_locale_get(Ecore_IMF_Context *ctx, char **lang)
* @param w width of the candidate panel
* @param h height of the candidate panel
* @ingroup Ecore_IMF_Context_Group
+ * @since 1.3
*/
EAPI void
ecore_imf_context_candidate_panel_geometry_get(Ecore_IMF_Context *ctx, int *x, int *y, int *w, int *h)
#define ECORE_EVENT_LOCK_NUM 0x0100
#define ECORE_EVENT_LOCK_CAPS 0x0200
#define ECORE_EVENT_LOCK_SHIFT 0x0300
-#define ECORE_EVENT_MODIFIER_ALTGR 0x0400 /**< @since 1.3 */
+#define ECORE_EVENT_MODIFIER_ALTGR 0x0400 /**< @since 1.7 */
typedef uintptr_t Ecore_Window;
typedef struct _Ecore_Event_Key Ecore_Event_Key;
ECORE_WIN,
ECORE_SCROLL,
ECORE_CAPS,
- ECORE_MODE, /**< @since 1.3 */
+ ECORE_MODE, /**< @since 1.7 */
ECORE_LAST
} Ecore_Event_Modifier;
EAPI Ecore_Event_Modifier ecore_event_update_modifier(const char *key, Ecore_Event_Modifiers *modifiers, int inc);
/**
- * @since 1.3
+ * @since 1.7
*/
EAPI Ecore_Compose_State ecore_compose_get(const Eina_List *seq, char **seqstr_ret);
Ecore_Input_Window *lookup;
lookup = _ecore_event_window_match(e->event_window);
- if (!lookup) return ECORE_CALLBACK_RENEW;
+ if (!lookup) return ECORE_CALLBACK_PASS_ON;
ecore_event_evas_modifier_lock_update(lookup->evas, e->modifiers);
if (press == ECORE_DOWN)
evas_event_feed_key_down(lookup->evas, e->keyname, e->key, e->string, e->compose, e->timestamp, NULL);
else
evas_event_feed_key_up(lookup->evas, e->keyname, e->key, e->string, e->compose, e->timestamp, NULL);
- return ECORE_CALLBACK_RENEW;
+ return ECORE_CALLBACK_PASS_ON;
}
static Eina_Bool
Evas_Button_Flags flags = EVAS_BUTTON_NONE;
lookup = _ecore_event_window_match(e->event_window);
- if (!lookup) return ECORE_CALLBACK_RENEW;
+ if (!lookup) return ECORE_CALLBACK_PASS_ON;
if (e->double_click) flags |= EVAS_BUTTON_DOUBLE_CLICK;
if (e->triple_click) flags |= EVAS_BUTTON_TRIPLE_CLICK;
if (e->multi.device == 0)
e->timestamp, NULL);
}
}
- return ECORE_CALLBACK_RENEW;
+ return ECORE_CALLBACK_PASS_ON;
}
EAPI Eina_Bool
e = event;
lookup = _ecore_event_window_match(e->event_window);
- if (!lookup) return ECORE_CALLBACK_RENEW;
+ if (!lookup) return ECORE_CALLBACK_PASS_ON;
if (e->multi.device == 0)
{
ecore_event_evas_modifier_lock_update(lookup->evas, e->modifiers);
e->multi.x, e->multi.y, e->timestamp,
NULL);
}
- return ECORE_CALLBACK_RENEW;
+ return ECORE_CALLBACK_PASS_ON;
}
EAPI Eina_Bool
Ecore_Input_Window *lookup;
lookup = _ecore_event_window_match(e->event_window);
- if (!lookup) return ECORE_CALLBACK_RENEW;
+ if (!lookup) return ECORE_CALLBACK_PASS_ON;
ecore_event_evas_modifier_lock_update(lookup->evas, e->modifiers);
switch (io)
{
}
lookup->move_mouse(lookup->window, e->x, e->y, e->timestamp);
- return ECORE_CALLBACK_RENEW;
+ return ECORE_CALLBACK_PASS_ON;
}
EAPI Eina_Bool
e = event;
lookup = _ecore_event_window_match(e->event_window);
- if (!lookup) return ECORE_CALLBACK_RENEW;
+ if (!lookup) return ECORE_CALLBACK_PASS_ON;
ecore_event_evas_modifier_lock_update(lookup->evas, e->modifiers);
evas_event_feed_mouse_wheel(lookup->evas, e->direction, e->z, e->timestamp, NULL);
- return ECORE_CALLBACK_RENEW;
+ return ECORE_CALLBACK_PASS_ON;
}
EAPI Eina_Bool
struct wl_touch *touch;
struct wl_surface *cursor_surface;
+ struct wl_callback *cursor_frame_cb;
struct wl_data_device *data_device;
* Return the screen DPI
*
* This is a simplistic call to get DPI. It does not account for differing
- * DPI in the x amd y axes nor does it accoutn for multihead or xinerama and
- * xrander where different parts of the screen may have differen DPI etc.
+ * DPI in the x and y axes nor does it account for multihead or xinerama and
+ * xrandr where different parts of the screen may have different DPI etc.
*
* @return the general screen DPI (dots/pixels per inch).
*
if (mw <= 0) return 75;
w = _ecore_wl_disp->output->allocation.w;
+ /* FIXME: NB: Hrrrmmm, need to verify this. xorg code is using a different
+ * formula to calc this */
return (((w * 254) / mw) + 5) / 10;
}
};
void
-_ecore_wl_dnd_add(Ecore_Wl_Input *input, struct wl_data_device *data_device, unsigned int id)
+_ecore_wl_dnd_add(Ecore_Wl_Input *input, struct wl_data_device *data_device __UNUSED__, struct wl_data_offer *offer)
{
Ecore_Wl_Dnd_Source *source;
wl_array_init(&source->types);
source->refcount = 1;
source->input = input;
- /* FIXME: Change this when wayland has typesafe wrapper for it */
- source->offer = (struct wl_data_offer *)
- wl_proxy_create_for_id((struct wl_proxy *)data_device,
- id, &wl_data_offer_interface);
+ source->offer = offer;
wl_data_offer_add_listener(source->offer,
&_ecore_wl_data_offer_listener, source);
}
static void _ecore_wl_input_cb_pointer_motion(void *data, struct wl_pointer *pointer __UNUSED__, unsigned int timestamp, wl_fixed_t sx, wl_fixed_t sy);
static void _ecore_wl_input_cb_pointer_button(void *data, struct wl_pointer *pointer __UNUSED__, unsigned int serial, unsigned int timestamp, unsigned int button, unsigned int state);
static void _ecore_wl_input_cb_pointer_axis(void *data, struct wl_pointer *pointer __UNUSED__, unsigned int timestamp, unsigned int axis, wl_fixed_t value);
+static void _ecore_wl_input_cb_pointer_frame(void *data, struct wl_callback *callback, unsigned int timestamp __UNUSED__);
static void _ecore_wl_input_cb_keyboard_keymap(void *data, struct wl_keyboard *keyboard __UNUSED__, unsigned int format, int fd, unsigned int size);
static void _ecore_wl_input_cb_keyboard_enter(void *data, struct wl_keyboard *keyboard __UNUSED__, unsigned int serial, struct wl_surface *surface, struct wl_array *keys __UNUSED__);
static void _ecore_wl_input_cb_keyboard_leave(void *data, struct wl_keyboard *keyboard __UNUSED__, unsigned int serial, struct wl_surface *surface);
static void _ecore_wl_input_cb_touch_motion(void *data, struct wl_touch *touch __UNUSED__, unsigned int timestamp, int id __UNUSED__, wl_fixed_t x, wl_fixed_t y);
static void _ecore_wl_input_cb_touch_frame(void *data __UNUSED__, struct wl_touch *touch __UNUSED__);
static void _ecore_wl_input_cb_touch_cancel(void *data __UNUSED__, struct wl_touch *touch __UNUSED__);
-static void _ecore_wl_input_cb_data_offer(void *data, struct wl_data_device *data_device, unsigned int id);
+static void _ecore_wl_input_cb_data_offer(void *data, struct wl_data_device *data_device, struct wl_data_offer *offer);
static void _ecore_wl_input_cb_data_enter(void *data, struct wl_data_device *data_device, unsigned int timestamp, struct wl_surface *surface, wl_fixed_t x, wl_fixed_t y, struct wl_data_offer *offer);
static void _ecore_wl_input_cb_data_leave(void *data, struct wl_data_device *data_device);
static void _ecore_wl_input_cb_data_motion(void *data, struct wl_data_device *data_device, unsigned int timestamp, wl_fixed_t x, wl_fixed_t y);
_ecore_wl_input_cb_data_selection
};
+static const struct wl_callback_listener _ecore_wl_pointer_surface_listener =
+{
+ _ecore_wl_input_cb_pointer_frame
+};
+
/* local variables */
static int _pointer_x, _pointer_y;
wl_surface_attach(input->cursor_surface, buffer, 0, 0);
wl_surface_damage(input->cursor_surface, 0, 0,
cursor_image->width, cursor_image->height);
+
+ if (!input->cursor_frame_cb)
+ _ecore_wl_input_cb_pointer_frame(input, NULL, 0);
}
}
input->selection_source = NULL;
if (input->data_device) wl_data_device_destroy(input->data_device);
- if (input->seat) wl_seat_destroy(input->seat);
- wl_list_remove(&input->link);
if (input->xkb.state)
xkb_state_unref(input->xkb.state);
if (input->xkb.keymap)
xkb_map_unref(input->xkb.keymap);
+
if (input->cursor_surface)
wl_surface_destroy(input->cursor_surface);
+ wl_list_remove(&input->link);
+ if (input->seat) wl_seat_destroy(input->seat);
+
free(input);
}
input->timestamp = timestamp;
- /* TODO: FIXME: NB: Weston window code has set pointer image here also */
if (input->pointer_focus)
_ecore_wl_input_mouse_move_send(input, input->pointer_focus, timestamp);
+
+ ecore_wl_input_cursor_default_restore(input);
}
static void
}
static void
+_ecore_wl_input_cb_pointer_frame(void *data, struct wl_callback *callback, unsigned int timestamp __UNUSED__)
+{
+ Ecore_Wl_Input *input;
+
+ LOGFN(__FILE__, __LINE__, __FUNCTION__);
+
+ if (!(input = data)) return;
+
+ if (callback)
+ {
+ if (callback != input->cursor_frame_cb) return;
+ wl_callback_destroy(callback);
+ input->cursor_frame_cb = NULL;
+ }
+
+ /* TODO: Finish me */
+ if (!input->cursor_frame_cb)
+ {
+ input->cursor_frame_cb = wl_surface_frame(input->cursor_surface);
+ wl_callback_add_listener(input->cursor_frame_cb,
+ &_ecore_wl_pointer_surface_listener, input);
+ }
+}
+
+static void
_ecore_wl_input_cb_keyboard_keymap(void *data, struct wl_keyboard *keyboard __UNUSED__, unsigned int format, int fd, unsigned int size)
{
Ecore_Wl_Input *input;
LOGFN(__FILE__, __LINE__, __FUNCTION__);
+ if (!surface) return;
if (!(input = data)) return;
if (!input->timestamp)
input->timestamp = (tv.tv_sec * 1000 + tv.tv_usec / 1000);
}
- input->sx = wl_fixed_to_int(sx);
- input->sy = wl_fixed_to_int(sy);
+ input->sx = wl_fixed_to_double(sx);
+ input->sy = wl_fixed_to_double(sy);
input->display->serial = serial;
input->pointer_enter_serial = serial;
}
static void
-_ecore_wl_input_cb_data_offer(void *data, struct wl_data_device *data_device, unsigned int id)
+_ecore_wl_input_cb_data_offer(void *data, struct wl_data_device *data_device, struct wl_data_offer *offer)
{
LOGFN(__FILE__, __LINE__, __FUNCTION__);
- _ecore_wl_dnd_add(data, data_device, id);
+ _ecore_wl_dnd_add(data, data_device, offer);
}
static void
#include "ecore_wl_private.h"
/* local function prototypes */
-static void _ecore_wl_output_cb_geometry(void *data, struct wl_output *wl_output __UNUSED__, int x, int y, int w, int h, int subpixel __UNUSED__, const char *make __UNUSED__, const char *model __UNUSED__);
+static void _ecore_wl_output_cb_geometry(void *data, struct wl_output *wl_output __UNUSED__, int x, int y, int w, int h, int subpixel __UNUSED__, const char *make __UNUSED__, const char *model __UNUSED__, int transform __UNUSED__);
static void _ecore_wl_output_cb_mode(void *data, struct wl_output *wl_output __UNUSED__, unsigned int flags, int w, int h, int refresh __UNUSED__);
/* wayland listeners */
/* local functions */
static void
-_ecore_wl_output_cb_geometry(void *data, struct wl_output *wl_output __UNUSED__, int x, int y, int w, int h, int subpixel __UNUSED__, const char *make __UNUSED__, const char *model __UNUSED__)
+_ecore_wl_output_cb_geometry(void *data, struct wl_output *wl_output __UNUSED__, int x, int y, int w, int h, int subpixel __UNUSED__, const char *make __UNUSED__, const char *model __UNUSED__, int transform __UNUSED__)
{
Ecore_Wl_Output *output;
void _ecore_wl_input_del(Ecore_Wl_Input *input);
void _ecore_wl_input_pointer_xy_get(int *x, int *y);
-void _ecore_wl_dnd_add(Ecore_Wl_Input *input, struct wl_data_device *data_device, unsigned int id);
+void _ecore_wl_dnd_add(Ecore_Wl_Input *input, struct wl_data_device *data_device, struct wl_data_offer *offer);
void _ecore_wl_dnd_enter(void *data, struct wl_data_device *data_device __UNUSED__, unsigned int timestamp __UNUSED__, struct wl_surface *surface, int x, int y, struct wl_data_offer *offer);
void _ecore_wl_dnd_leave(void *data, struct wl_data_device *data_device __UNUSED__);
void _ecore_wl_dnd_motion(void *data, struct wl_data_device *data_device __UNUSED__, unsigned int timestamp __UNUSED__, int x, int y);
case ECORE_WL_WINDOW_BUFFER_TYPE_SHM:
if (win->surface)
{
- if (buffer)
- wl_surface_attach(win->surface, buffer, x, y);
+ /* if (buffer) */
+ wl_surface_attach(win->surface, buffer, x, y);
+ wl_surface_damage(win->surface, 0, 0,
+ win->allocation.w, win->allocation.h);
wl_surface_damage(win->surface, 0, 0,
win->allocation.w, win->allocation.h);
break;
case ECORE_WL_WINDOW_TYPE_TRANSIENT:
wl_shell_surface_set_transient(win->shell_surface,
- win->parent->shell_surface,
+ win->parent->surface,
win->allocation.x, win->allocation.y, 0);
break;
case ECORE_WL_WINDOW_TYPE_MENU:
wl_shell_surface_set_popup(win->shell_surface,
_ecore_wl_disp->input->seat,
_ecore_wl_disp->serial,
- win->parent->shell_surface,
+ win->parent->surface,
win->allocation.x, win->allocation.y, 0);
break;
case ECORE_WL_WINDOW_TYPE_NONE:
break;
}
- if (win->type != ECORE_WL_WINDOW_TYPE_FULLSCREEN)
- {
- win->region.input =
- wl_compositor_create_region(_ecore_wl_disp->wl.compositor);
- wl_region_add(win->region.input, win->allocation.x, win->allocation.y,
- win->allocation.w, win->allocation.h);
- }
-
- if (!win->transparent)
- {
- win->region.opaque =
- wl_compositor_create_region(_ecore_wl_disp->wl.compositor);
- wl_region_add(win->region.opaque, win->allocation.x, win->allocation.y,
- win->allocation.w, win->allocation.h);
- }
+ /* if (win->type != ECORE_WL_WINDOW_TYPE_FULLSCREEN) */
+ /* { */
+ /* win->region.input = */
+ /* wl_compositor_create_region(_ecore_wl_disp->wl.compositor); */
+ /* wl_region_add(win->region.input, win->allocation.x, win->allocation.y, */
+ /* win->allocation.w, win->allocation.h); */
+ /* } */
+
+ /* if (!win->transparent) */
+ /* { */
+ /* win->region.opaque = */
+ /* wl_compositor_create_region(_ecore_wl_disp->wl.compositor); */
+ /* wl_region_add(win->region.opaque, win->allocation.x, win->allocation.y, */
+ /* win->allocation.w, win->allocation.h); */
+ /* } */
}
/**
* Defines the error codes of Ecore_X which wraps the X Window Systems
* protocol's errors.
*
- * @since 1.3.0
+ * @since 1.7.0
*/
typedef enum _Ecore_X_Error_Code
{
EAPI extern int ECORE_X_EVENT_XDND_DROP;
EAPI extern int ECORE_X_EVENT_XDND_FINISHED;
-EAPI extern int ECORE_X_MODIFIER_SHIFT; /**< @since 1.3 */
-EAPI extern int ECORE_X_MODIFIER_CTRL; /**< @since 1.3 */
-EAPI extern int ECORE_X_MODIFIER_ALT; /**< @since 1.3 */
-EAPI extern int ECORE_X_MODIFIER_WIN; /**< @since 1.3 */
-EAPI extern int ECORE_X_MODIFIER_ALTGR; /**< @since 1.3 */
+EAPI extern int ECORE_X_MODIFIER_SHIFT; /**< @since 1.7 */
+EAPI extern int ECORE_X_MODIFIER_CTRL; /**< @since 1.7 */
+EAPI extern int ECORE_X_MODIFIER_ALT; /**< @since 1.7 */
+EAPI extern int ECORE_X_MODIFIER_WIN; /**< @since 1.7 */
+EAPI extern int ECORE_X_MODIFIER_ALTGR; /**< @since 1.7 */
EAPI extern int ECORE_X_LOCK_SCROLL;
EAPI extern int ECORE_X_LOCK_NUM;
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_netwm_moveresize_request_send(Ecore_X_Window win, int x, int y, Ecore_X_Netwm_Direction direction, unsigned int button);
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_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);
-/**
- * @brief Set the window profile list.
- *
- * @param win The window
- * @param profiles The profile name list
- * @param num_profiles The number of profile names
- *
- * @since 1.3.0
- */
-EAPI void ecore_x_e_window_profile_list_set(Ecore_X_Window win, const char **profiles, unsigned int num_profiles);
-/**
- * @brief Get the window profile list.
- *
- * @param win The window
- * @param[out] profiles Returns the profile name list
- * @param[out] ret_num Returns the number of profile names
- *
- * @since 1.3.0
- */
-EAPI Eina_Bool ecore_x_e_window_profile_list_get(Ecore_X_Window win, const char ***profiles, int *ret_num);
-/**
- * @brief Set the window profile.
- *
- * @param win The window
- * @param profile The profile name
- *
- * @since 1.3.0
- */
-EAPI void ecore_x_e_window_profile_set(Ecore_X_Window win, const char *profile);
-/**
- * @brief Get the window profile.
- *
- * @param win The window
- * @return The profile name
- *
- * @since 1.3.0
- */
-EAPI char *ecore_x_e_window_profile_get(Ecore_X_Window win);
+EAPI char *ecore_x_e_window_profile_get(Ecore_X_Window win);
+EAPI void ecore_x_e_window_profile_set(Ecore_X_Window win, const char *profile);
+EAPI void ecore_x_e_window_profile_list_set(Ecore_X_Window win, const char **profiles, unsigned int num_profiles);
+EAPI Eina_Bool ecore_x_e_window_profile_list_get(Ecore_X_Window win, const char ***profiles, int *ret_num);
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 Ecore_X_Randr_Signal_Property *ecore_x_randr_output_signal_properties_get(Ecore_X_Window root, Ecore_X_Randr_Output output, int *num);
EAPI int ecore_x_randr_output_connector_number_get(Ecore_X_Window root, Ecore_X_Randr_Output output);
EAPI Ecore_X_Randr_Connector_Type ecore_x_randr_output_connector_type_get(Ecore_X_Window root, Ecore_X_Randr_Output output);
+/* WTF - these dont exist in ecore-x!!!!
EAPI Eina_Rectangle *ecore_x_randr_crtc_panning_area_get(Ecore_X_Window root, Ecore_X_Randr_Crtc crtc, int *x, int *y, int *w, int *h);
EAPI Eina_Bool ecore_x_randr_crtc_panning_area_set(Ecore_X_Window root, Ecore_X_Randr_Crtc crtc, int x, const int y, const int w, const int h);
EAPI Eina_Rectangle *ecore_x_randr_crtc_tracking_area_get(Ecore_X_Window root, Ecore_X_Randr_Crtc crtc, int *x, int *y, int *w, int *h);
EAPI Eina_Bool ecore_x_randr_crtc_tracking_area_set(Ecore_X_Window root, Ecore_X_Randr_Crtc crtc, int x, const int y, 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);
EAPI Eina_Bool ecore_x_randr_crtc_border_area_set(Ecore_X_Window root, Ecore_X_Randr_Crtc crtc, int left, const int top, const int right, const int bottom);
-
+*/
+
/* XRender Support (horrendously incomplete) */
typedef Ecore_X_ID Ecore_X_Picture;
EAPI Ecore_X_Illume_Window_State
ecore_x_e_illume_window_state_get(Ecore_X_Window win);
+EAPI void
+ecore_x_e_illume_window_state_set(Ecore_X_Window win,
+ Ecore_X_Illume_Window_State state);
+
+EAPI Ecore_X_Illume_Window_State
+ecore_x_e_illume_window_state_get(Ecore_X_Window win);
+
#ifdef __cplusplus
}
#endif // ifdef __cplusplus
/* local variables */
static xcb_intern_atom_cookie_t cookies[ECORE_X_ATOMS_COUNT];
-static Xcb_Atom atoms[] =
-{
- { "ATOM", &ECORE_X_ATOM_ATOM },
- { "CARDINAL", &ECORE_X_ATOM_CARDINAL },
- { "COMPOUND_TEXT", &ECORE_X_ATOM_COMPOUND_TEXT },
- { "FILE_NAME", &ECORE_X_ATOM_FILE_NAME },
- { "STRING", &ECORE_X_ATOM_STRING },
- { "TEXT", &ECORE_X_ATOM_TEXT },
- { "UTF8_STRING", &ECORE_X_ATOM_UTF8_STRING },
- { "WINDOW", &ECORE_X_ATOM_WINDOW },
- { "PIXMAP", &ECORE_X_ATOM_PIXMAP },
- { "VISUALID", &ECORE_X_ATOM_VISUALID },
-
- { "JXSelectionWindowProperty", &ECORE_X_ATOM_SELECTION_PROP_XDND },
- { "XdndSelection", &ECORE_X_ATOM_SELECTION_XDND },
- { "XdndAware", &ECORE_X_ATOM_XDND_AWARE },
- { "XdndEnter", &ECORE_X_ATOM_XDND_ENTER },
- { "XdndTypeList", &ECORE_X_ATOM_XDND_TYPE_LIST },
- { "XdndPosition", &ECORE_X_ATOM_XDND_POSITION },
- { "XdndActionCopy", &ECORE_X_ATOM_XDND_ACTION_COPY },
- { "XdndActionMove", &ECORE_X_ATOM_XDND_ACTION_MOVE },
- { "XdndActionPrivate", &ECORE_X_ATOM_XDND_ACTION_PRIVATE },
- { "XdndActionAsk", &ECORE_X_ATOM_XDND_ACTION_ASK },
- { "XdndActionList", &ECORE_X_ATOM_XDND_ACTION_LIST },
- { "XdndActionLink", &ECORE_X_ATOM_XDND_ACTION_LINK },
- { "XdndActionDescription", &ECORE_X_ATOM_XDND_ACTION_DESCRIPTION },
- { "XdndProxy", &ECORE_X_ATOM_XDND_PROXY },
- { "XdndStatus", &ECORE_X_ATOM_XDND_STATUS },
- { "XdndLeave", &ECORE_X_ATOM_XDND_LEAVE },
- { "XdndDrop", &ECORE_X_ATOM_XDND_DROP },
- { "XdndFinished", &ECORE_X_ATOM_XDND_FINISHED },
-
- { "XdndActionCopy", &ECORE_X_DND_ACTION_COPY },
- { "XdndActionMove", &ECORE_X_DND_ACTION_MOVE },
- { "XdndActionLink", &ECORE_X_DND_ACTION_LINK },
- { "XdndActionAsk", &ECORE_X_DND_ACTION_ASK },
- { "XdndActionPrivate", &ECORE_X_DND_ACTION_PRIVATE },
-
- { "_E_FRAME_SIZE", &ECORE_X_ATOM_E_FRAME_SIZE },
-
- { "_WIN_LAYER", &ECORE_X_ATOM_WIN_LAYER },
-
- { "WM_NAME", &ECORE_X_ATOM_WM_NAME },
- { "WM_ICON_NAME", &ECORE_X_ATOM_WM_ICON_NAME },
- { "WM_NORMAL_HINTS", &ECORE_X_ATOM_WM_NORMAL_HINTS },
- { "WM_SIZE_HINTS", &ECORE_X_ATOM_WM_SIZE_HINTS },
- { "WM_HINTS", &ECORE_X_ATOM_WM_HINTS },
- { "WM_CLASS", &ECORE_X_ATOM_WM_CLASS },
- { "WM_TRANSIENT_FOR", &ECORE_X_ATOM_WM_TRANSIENT_FOR },
- { "WM_PROTOCOLS", &ECORE_X_ATOM_WM_PROTOCOLS },
- { "WM_COLORMAP_WINDOWS", &ECORE_X_ATOM_WM_COLORMAP_WINDOWS },
- { "WM_COMMAND", &ECORE_X_ATOM_WM_COMMAND },
- { "WM_CLIENT_MACHINE", &ECORE_X_ATOM_WM_CLIENT_MACHINE },
-
- { "WM_STATE", &ECORE_X_ATOM_WM_STATE },
- { "WM_ICON_SIZE", &ECORE_X_ATOM_WM_ICON_SIZE },
-
- { "WM_CHANGE_STATE", &ECORE_X_ATOM_WM_CHANGE_STATE },
-
- { "WM_TAKE_FOCUS", &ECORE_X_ATOM_WM_TAKE_FOCUS },
- { "WM_SAVE_YOURSELF", &ECORE_X_ATOM_WM_SAVE_YOURSELF },
- { "WM_DELETE_WINDOW", &ECORE_X_ATOM_WM_DELETE_WINDOW },
-
- { "WM_COLORMAP_NOTIFY", &ECORE_X_ATOM_WM_COLORMAP_NOTIFY },
-
- { "SM_CLIENT_ID", &ECORE_X_ATOM_SM_CLIENT_ID },
- { "WM_CLIENT_LEADER", &ECORE_X_ATOM_WM_CLIENT_LEADER },
- { "WM_WINDOW_ROLE", &ECORE_X_ATOM_WM_WINDOW_ROLE },
-
- { "_MOTIF_WM_HINTS", &ECORE_X_ATOM_MOTIF_WM_HINTS },
-
- { "_NET_SUPPORTED", &ECORE_X_ATOM_NET_SUPPORTED },
- { "_NET_CLIENT_LIST", &ECORE_X_ATOM_NET_CLIENT_LIST },
- { "_NET_CLIENT_LIST_STACKING", &ECORE_X_ATOM_NET_CLIENT_LIST_STACKING },
- { "_NET_NUMBER_OF_DESKTOPS", &ECORE_X_ATOM_NET_NUMBER_OF_DESKTOPS },
- { "_NET_DESKTOP_GEOMETRY", &ECORE_X_ATOM_NET_DESKTOP_GEOMETRY },
- { "_NET_DESKTOP_VIEWPORT", &ECORE_X_ATOM_NET_DESKTOP_VIEWPORT },
- { "_NET_CURRENT_DESKTOP", &ECORE_X_ATOM_NET_CURRENT_DESKTOP },
- { "_NET_DESKTOP_NAMES", &ECORE_X_ATOM_NET_DESKTOP_NAMES },
- { "_NET_ACTIVE_WINDOW", &ECORE_X_ATOM_NET_ACTIVE_WINDOW },
- { "_NET_WORKAREA", &ECORE_X_ATOM_NET_WORKAREA },
- { "_NET_SUPPORTING_WM_CHECK", &ECORE_X_ATOM_NET_SUPPORTING_WM_CHECK },
- { "_NET_VIRTUAL_ROOTS", &ECORE_X_ATOM_NET_VIRTUAL_ROOTS },
- { "_NET_DESKTOP_LAYOUT", &ECORE_X_ATOM_NET_DESKTOP_LAYOUT },
- { "_NET_SHOWING_DESKTOP", &ECORE_X_ATOM_NET_SHOWING_DESKTOP },
-
- { "_NET_CLOSE_WINDOW", &ECORE_X_ATOM_NET_CLOSE_WINDOW },
- { "_NET_MOVERESIZE_WINDOW", &ECORE_X_ATOM_NET_MOVERESIZE_WINDOW },
- { "_NET_WM_MOVERESIZE", &ECORE_X_ATOM_NET_WM_MOVERESIZE },
- { "_NET_RESTACK_WINDOW", &ECORE_X_ATOM_NET_RESTACK_WINDOW },
-
- { "_NET_REQUEST_FRAME_EXTENTS", &ECORE_X_ATOM_NET_REQUEST_FRAME_EXTENTS },
-
- { "_NET_WM_NAME", &ECORE_X_ATOM_NET_WM_NAME },
- { "_NET_WM_VISIBLE_NAME", &ECORE_X_ATOM_NET_WM_VISIBLE_NAME },
- { "_NET_WM_ICON_NAME", &ECORE_X_ATOM_NET_WM_ICON_NAME },
- { "_NET_WM_VISIBLE_ICON_NAME", &ECORE_X_ATOM_NET_WM_VISIBLE_ICON_NAME },
- { "_NET_WM_DESKTOP", &ECORE_X_ATOM_NET_WM_DESKTOP },
-
- { "_NET_WM_WINDOW_TYPE", &ECORE_X_ATOM_NET_WM_WINDOW_TYPE },
- { "_NET_WM_WINDOW_TYPE_DESKTOP", &ECORE_X_ATOM_NET_WM_WINDOW_TYPE_DESKTOP },
- { "_NET_WM_WINDOW_TYPE_DOCK", &ECORE_X_ATOM_NET_WM_WINDOW_TYPE_DOCK },
- { "_NET_WM_WINDOW_TYPE_TOOLBAR", &ECORE_X_ATOM_NET_WM_WINDOW_TYPE_TOOLBAR },
- { "_NET_WM_WINDOW_TYPE_MENU", &ECORE_X_ATOM_NET_WM_WINDOW_TYPE_MENU },
- { "_NET_WM_WINDOW_TYPE_UTILITY", &ECORE_X_ATOM_NET_WM_WINDOW_TYPE_UTILITY },
- { "_NET_WM_WINDOW_TYPE_SPLASH", &ECORE_X_ATOM_NET_WM_WINDOW_TYPE_SPLASH },
- { "_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 },
- { "_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 },
- { "_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 },
-
- { "_NET_WM_STATE", &ECORE_X_ATOM_NET_WM_STATE },
- { "_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 },
- { "_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 },
- { "_NET_WM_STATE_HIDDEN", &ECORE_X_ATOM_NET_WM_STATE_HIDDEN },
- { "_NET_WM_STATE_FULLSCREEN", &ECORE_X_ATOM_NET_WM_STATE_FULLSCREEN },
- { "_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 },
-
- { "_NET_WM_ALLOWED_ACTIONS", &ECORE_X_ATOM_NET_WM_ALLOWED_ACTIONS },
- { "_NET_WM_ACTION_MOVE", &ECORE_X_ATOM_NET_WM_ACTION_MOVE },
- { "_NET_WM_ACTION_RESIZE", &ECORE_X_ATOM_NET_WM_ACTION_RESIZE },
- { "_NET_WM_ACTION_MINIMIZE", &ECORE_X_ATOM_NET_WM_ACTION_MINIMIZE },
- { "_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 },
- { "_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 },
- { "_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 },
-
- { "_NET_WM_STRUT", &ECORE_X_ATOM_NET_WM_STRUT },
- { "_NET_WM_STRUT_PARTIAL", &ECORE_X_ATOM_NET_WM_STRUT_PARTIAL },
- { "_NET_WM_ICON_GEOMETRY", &ECORE_X_ATOM_NET_WM_ICON_GEOMETRY },
- { "_NET_WM_ICON", &ECORE_X_ATOM_NET_WM_ICON },
- { "_NET_WM_PID", &ECORE_X_ATOM_NET_WM_PID },
- { "_NET_WM_HANDLED_ICONS", &ECORE_X_ATOM_NET_WM_HANDLED_ICONS },
- { "_NET_WM_USER_TIME", &ECORE_X_ATOM_NET_WM_USER_TIME },
- { "_NET_STARTUP_ID", &ECORE_X_ATOM_NET_STARTUP_ID },
- { "_NET_FRAME_EXTENTS", &ECORE_X_ATOM_NET_FRAME_EXTENTS },
-
- { "_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 },
-
- { "_NET_WM_WINDOW_OPACITY", &ECORE_X_ATOM_NET_WM_WINDOW_OPACITY },
- { "_NET_WM_WINDOW_SHADOW", &ECORE_X_ATOM_NET_WM_WINDOW_SHADOW },
- { "_NET_WM_WINDOW_SHADE", &ECORE_X_ATOM_NET_WM_WINDOW_SHADE },
-
- { "TARGETS", &ECORE_X_ATOM_SELECTION_TARGETS },
- { "CLIPBOARD", &ECORE_X_ATOM_SELECTION_CLIPBOARD },
- { "PRIMARY", &ECORE_X_ATOM_SELECTION_PRIMARY },
- { "SECONDARY", &ECORE_X_ATOM_SELECTION_SECONDARY },
- { "_ECORE_SELECTION_PRIMARY", &ECORE_X_ATOM_SELECTION_PROP_PRIMARY },
- { "_ECORE_SELECTION_SECONDARY", &ECORE_X_ATOM_SELECTION_PROP_SECONDARY },
- { "_ECORE_SELECTION_CLIPBOARD", &ECORE_X_ATOM_SELECTION_PROP_CLIPBOARD },
-
- { "_E_VIRTUAL_KEYBOARD", &ECORE_X_ATOM_E_VIRTUAL_KEYBOARD },
- { "_E_VIRTUAL_KEYBOARD_STATE", &ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_STATE },
- { "_E_VIRTUAL_KEYBOARD_ON", &ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_ON },
- { "_E_VIRTUAL_KEYBOARD_OFF", &ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_OFF },
- { "_E_VIRTUAL_KEYBOARD_ALPHA", &ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_ALPHA },
- { "_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 },
- { "_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 },
- { "_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 },
- { "_E_VIRTUAL_KEYBOARD_URL", &ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_URL },
- { "_E_VIRTUAL_KEYBOARD_KEYPAD", &ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_KEYPAD },
- { "_E_VIRTUAL_KEYBOARD_J2ME", &ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_J2ME },
-
- { "_E_ILLUME_ZONE", &ECORE_X_ATOM_E_ILLUME_ZONE },
- { "_E_ILLUME_ZONE_LIST", &ECORE_X_ATOM_E_ILLUME_ZONE_LIST },
- { "_E_ILLUME_CONFORMANT", &ECORE_X_ATOM_E_ILLUME_CONFORMANT },
- { "_E_ILLUME_MODE", &ECORE_X_ATOM_E_ILLUME_MODE },
- { "_E_ILLUME_MODE_SINGLE", &ECORE_X_ATOM_E_ILLUME_MODE_SINGLE },
- { "_E_ILLUME_MODE_DUAL_TOP", &ECORE_X_ATOM_E_ILLUME_MODE_DUAL_TOP },
- { "_E_ILLUME_MODE_DUAL_LEFT", &ECORE_X_ATOM_E_ILLUME_MODE_DUAL_LEFT },
- { "_E_ILLUME_FOCUS_BACK", &ECORE_X_ATOM_E_ILLUME_FOCUS_BACK },
- { "_E_ILLUME_FOCUS_FORWARD", &ECORE_X_ATOM_E_ILLUME_FOCUS_FORWARD },
- { "_E_ILLUME_FOCUS_HOME", &ECORE_X_ATOM_E_ILLUME_FOCUS_HOME },
- { "_E_ILLUME_CLOSE", &ECORE_X_ATOM_E_ILLUME_CLOSE },
- { "_E_ILLUME_HOME_NEW", &ECORE_X_ATOM_E_ILLUME_HOME_NEW },
- { "_E_ILLUME_HOME_DEL", &ECORE_X_ATOM_E_ILLUME_HOME_DEL },
- { "_E_ILLUME_DRAG", &ECORE_X_ATOM_E_ILLUME_DRAG },
- { "_E_ILLUME_DRAG_LOCKED", &ECORE_X_ATOM_E_ILLUME_DRAG_LOCKED },
- { "_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 },
- { "_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 },
- { "_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 },
- { "_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 },
- { "_E_ILLUME_INDICATOR_STATE", &ECORE_X_ATOM_E_ILLUME_INDICATOR_STATE },
- { "_E_ILLUME_INDICATOR_ON", &ECORE_X_ATOM_E_ILLUME_INDICATOR_ON },
- { "_E_ILLUME_INDICATOR_OFF", &ECORE_X_ATOM_E_ILLUME_INDICATOR_OFF },
- { "_E_ILLUME_INDICATOR_OPACITY_MODE", &ECORE_X_ATOM_E_ILLUME_INDICATOR_OPACITY_MODE },
- { "_E_ILLUME_INDICATOR_OPAQUE", &ECORE_X_ATOM_E_ILLUME_INDICATOR_OPAQUE },
- { "_E_ILLUME_INDICATOR_TRANSLUCENT", &ECORE_X_ATOM_E_ILLUME_INDICATOR_TRANSLUCENT },
- { "_E_ILLUME_INDICATOR_TRANSPARENT", &ECORE_X_ATOM_E_ILLUME_INDICATOR_TRANSPARENT },
- { "_E_ILLUME_ROTATE_WINDOW_AVAILABLE_ANGLES", &ECORE_X_ATOM_E_ILLUME_ROTATE_WINDOW_AVAILABLE_ANGLE },
- { "_E_ILLUME_ROTATE_WINDOW_ANGLE", &ECORE_X_ATOM_E_ILLUME_ROTATE_WINDOW_ANGLE },
- { "_E_ILLUME_ROTATE_ROOT_ANGLE", &ECORE_X_ATOM_E_ILLUME_ROTATE_ROOT_ANGLE },
- { "_E_ILLUME_CLIPBOARD_STATE", &ECORE_X_ATOM_E_ILLUME_CLIPBOARD_STATE },
- { "_E_ILLUME_CLIPBOARD_ON", &ECORE_X_ATOM_E_ILLUME_CLIPBOARD_ON },
- { "_E_ILLUME_CLIPBOARD_OFF", &ECORE_X_ATOM_E_ILLUME_CLIPBOARD_OFF },
- { "_E_ILLUME_CLIPBOARD_GEOMETRY", &ECORE_X_ATOM_E_ILLUME_CLIPBOARD_GEOMETRY },
- { "_E_ILLUME_WINDOW_STATE", &ECORE_X_ATOM_E_ILLUME_WINDOW_STATE },
- { "_E_ILLUME_WINDOW_STATE_NORMAL", &ECORE_X_ATOM_E_ILLUME_WINDOW_STATE_NORMAL },
- { "_E_ILLUME_WINDOW_STATE_FLOATING", &ECORE_X_ATOM_E_ILLUME_WINDOW_STATE_FLOATING },
- { "_E_COMP_SYNC_COUNTER", &ECORE_X_ATOM_E_COMP_SYNC_COUNTER },
- { "_E_COMP_SYNC_DRAW_DONE", &ECORE_X_ATOM_E_COMP_SYNC_DRAW_DONE },
- { "_E_COMP_SYNC_SUPPORTED", &ECORE_X_ATOM_E_COMP_SYNC_SUPPORTED },
- { "_E_COMP_SYNC_BEGIN", &ECORE_X_ATOM_E_COMP_SYNC_BEGIN },
- { "_E_COMP_SYNC_END", &ECORE_X_ATOM_E_COMP_SYNC_END },
- { "_E_COMP_SYNC_CANCEL", &ECORE_X_ATOM_E_COMP_SYNC_CANCEL },
-
- { "_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 },
-
- { "_E_PROFILE", &ECORE_X_ATOM_E_PROFILE },
- { "_E_PROFILE_LIST", &ECORE_X_ATOM_E_PROFILE_LIST }
-};
void
_ecore_xcb_atoms_init(void)
ecore_x_atoms_get(profiles, num_profiles, atoms);
ecore_x_window_prop_property_set(win,
ECORE_X_ATOM_E_PROFILE_LIST,
- XA_ATOM, 32, (void *)atoms,
+ ECORE_X_ATOM_ATOM, 32, (void *)atoms,
num_profiles);
}
}
LOGFN(__FILE__, __LINE__, __FUNCTION__);
if (!ecore_x_window_prop_property_get(win,
ECORE_X_ATOM_E_PROFILE_LIST,
- XA_ATOM, 32, &data, &num))
+ ECORE_X_ATOM_ATOM, 32, &data, &num))
return EINA_FALSE;
if (ret_num)
{
atom = ecore_x_atom_get(profile);
ecore_x_window_prop_property_set(win, ECORE_X_ATOM_E_PROFILE,
- XA_ATOM, 32, (void *)&atom, 1);
+ ECORE_X_ATOM_ATOM, 32, (void *)&atom, 1);
}
}
LOGFN(__FILE__, __LINE__, __FUNCTION__);
if (!ecore_x_window_prop_property_get(win, ECORE_X_ATOM_E_PROFILE,
- XA_ATOM, 32, &data, &num))
+ ECORE_X_ATOM_ATOM, 32, &data, &num))
return NULL;
if (data)
format =
ecore_x_window_prop_property_get(ev->requestor, ev->property,
XCB_ATOM_ATOM, 32, &data, &num);
- if (!format) return;
+ if (!format)
+ {
+ /* fallback if targets handling is not working and try get the
+ * selection directly */
+ xcb_convert_selection(_ecore_xcb_conn, ev->requestor,
+ selection, selection,
+ ECORE_X_ATOM_UTF8_STRING, XCB_CURRENT_TIME);
+ return;
+ }
}
else
{
void
_ecore_x_atoms_init(void)
{
- const Atom_Item items[] =
- {
- { "ATOM", &ECORE_X_ATOM_ATOM },
- { "CARDINAL", &ECORE_X_ATOM_CARDINAL },
- { "COMPOUND_TEXT", &ECORE_X_ATOM_COMPOUND_TEXT },
- { "FILE_NAME", &ECORE_X_ATOM_FILE_NAME },
- { "STRING", &ECORE_X_ATOM_STRING },
- { "TEXT", &ECORE_X_ATOM_TEXT },
- { "UTF8_STRING", &ECORE_X_ATOM_UTF8_STRING },
- { "WINDOW", &ECORE_X_ATOM_WINDOW },
- { "PIXMAP", &ECORE_X_ATOM_PIXMAP },
-
- { "JXSelectionWindowProperty", &ECORE_X_ATOM_SELECTION_PROP_XDND },
- { "XdndSelection", &ECORE_X_ATOM_SELECTION_XDND },
- { "XdndAware", &ECORE_X_ATOM_XDND_AWARE },
- { "XdndEnter", &ECORE_X_ATOM_XDND_ENTER },
- { "XdndTypeList", &ECORE_X_ATOM_XDND_TYPE_LIST },
- { "XdndPosition", &ECORE_X_ATOM_XDND_POSITION },
- { "XdndActionCopy", &ECORE_X_ATOM_XDND_ACTION_COPY },
- { "XdndActionMove", &ECORE_X_ATOM_XDND_ACTION_MOVE },
- { "XdndActionPrivate", &ECORE_X_ATOM_XDND_ACTION_PRIVATE },
- { "XdndActionAsk", &ECORE_X_ATOM_XDND_ACTION_ASK },
- { "XdndActionList", &ECORE_X_ATOM_XDND_ACTION_LIST },
- { "XdndActionLink", &ECORE_X_ATOM_XDND_ACTION_LINK },
- { "XdndActionDescription", &ECORE_X_ATOM_XDND_ACTION_DESCRIPTION },
- { "XdndProxy", &ECORE_X_ATOM_XDND_PROXY },
- { "XdndStatus", &ECORE_X_ATOM_XDND_STATUS },
- { "XdndLeave", &ECORE_X_ATOM_XDND_LEAVE },
- { "XdndDrop", &ECORE_X_ATOM_XDND_DROP },
- { "XdndFinished", &ECORE_X_ATOM_XDND_FINISHED },
-
- { "XdndActionCopy", &ECORE_X_DND_ACTION_COPY },
- { "XdndActionMove", &ECORE_X_DND_ACTION_MOVE },
- { "XdndActionLink", &ECORE_X_DND_ACTION_LINK },
- { "XdndActionAsk", &ECORE_X_DND_ACTION_ASK },
- { "XdndActionPrivate", &ECORE_X_DND_ACTION_PRIVATE },
-
- { "_E_FRAME_SIZE", &ECORE_X_ATOM_E_FRAME_SIZE },
-
- { "_WIN_LAYER", &ECORE_X_ATOM_WIN_LAYER },
-
- { "WM_NAME", &ECORE_X_ATOM_WM_NAME },
- { "WM_ICON_NAME", &ECORE_X_ATOM_WM_ICON_NAME },
- { "WM_NORMAL_HINTS", &ECORE_X_ATOM_WM_NORMAL_HINTS },
- { "WM_SIZE_HINTS", &ECORE_X_ATOM_WM_SIZE_HINTS },
- { "WM_HINTS", &ECORE_X_ATOM_WM_HINTS },
- { "WM_CLASS", &ECORE_X_ATOM_WM_CLASS },
- { "WM_TRANSIENT_FOR", &ECORE_X_ATOM_WM_TRANSIENT_FOR },
- { "WM_PROTOCOLS", &ECORE_X_ATOM_WM_PROTOCOLS },
- { "WM_COLORMAP_WINDOWS", &ECORE_X_ATOM_WM_COLORMAP_WINDOWS },
- { "WM_COMMAND", &ECORE_X_ATOM_WM_COMMAND },
- { "WM_CLIENT_MACHINE", &ECORE_X_ATOM_WM_CLIENT_MACHINE },
-
- { "WM_STATE", &ECORE_X_ATOM_WM_STATE },
- { "WM_ICON_SIZE", &ECORE_X_ATOM_WM_ICON_SIZE },
-
- { "WM_CHANGE_STATE", &ECORE_X_ATOM_WM_CHANGE_STATE },
-
- { "WM_TAKE_FOCUS", &ECORE_X_ATOM_WM_TAKE_FOCUS },
- { "WM_SAVE_YOURSELF", &ECORE_X_ATOM_WM_SAVE_YOURSELF },
- { "WM_DELETE_WINDOW", &ECORE_X_ATOM_WM_DELETE_WINDOW },
-
- { "WM_COLORMAP_NOTIFY", &ECORE_X_ATOM_WM_COLORMAP_NOTIFY },
-
- { "SM_CLIENT_ID", &ECORE_X_ATOM_SM_CLIENT_ID },
- { "WM_CLIENT_LEADER", &ECORE_X_ATOM_WM_CLIENT_LEADER },
- { "WM_WINDOW_ROLE", &ECORE_X_ATOM_WM_WINDOW_ROLE },
-
- { "_MOTIF_WM_HINTS", &ECORE_X_ATOM_MOTIF_WM_HINTS },
-
- { "_NET_SUPPORTED", &ECORE_X_ATOM_NET_SUPPORTED },
- { "_NET_CLIENT_LIST", &ECORE_X_ATOM_NET_CLIENT_LIST },
- { "_NET_CLIENT_LIST_STACKING", &ECORE_X_ATOM_NET_CLIENT_LIST_STACKING },
- { "_NET_NUMBER_OF_DESKTOPS", &ECORE_X_ATOM_NET_NUMBER_OF_DESKTOPS },
- { "_NET_DESKTOP_GEOMETRY", &ECORE_X_ATOM_NET_DESKTOP_GEOMETRY },
- { "_NET_DESKTOP_VIEWPORT", &ECORE_X_ATOM_NET_DESKTOP_VIEWPORT },
- { "_NET_CURRENT_DESKTOP", &ECORE_X_ATOM_NET_CURRENT_DESKTOP },
- { "_NET_DESKTOP_NAMES", &ECORE_X_ATOM_NET_DESKTOP_NAMES },
- { "_NET_ACTIVE_WINDOW", &ECORE_X_ATOM_NET_ACTIVE_WINDOW },
- { "_NET_WORKAREA", &ECORE_X_ATOM_NET_WORKAREA },
- { "_NET_SUPPORTING_WM_CHECK", &ECORE_X_ATOM_NET_SUPPORTING_WM_CHECK },
- { "_NET_VIRTUAL_ROOTS", &ECORE_X_ATOM_NET_VIRTUAL_ROOTS },
- { "_NET_DESKTOP_LAYOUT", &ECORE_X_ATOM_NET_DESKTOP_LAYOUT },
- { "_NET_SHOWING_DESKTOP", &ECORE_X_ATOM_NET_SHOWING_DESKTOP },
-
- { "_NET_CLOSE_WINDOW", &ECORE_X_ATOM_NET_CLOSE_WINDOW },
- { "_NET_MOVERESIZE_WINDOW", &ECORE_X_ATOM_NET_MOVERESIZE_WINDOW },
- { "_NET_WM_MOVERESIZE", &ECORE_X_ATOM_NET_WM_MOVERESIZE },
- { "_NET_RESTACK_WINDOW", &ECORE_X_ATOM_NET_RESTACK_WINDOW },
-
- { "_NET_REQUEST_FRAME_EXTENTS", &ECORE_X_ATOM_NET_REQUEST_FRAME_EXTENTS },
-
- { "_NET_WM_NAME", &ECORE_X_ATOM_NET_WM_NAME },
- { "_NET_WM_VISIBLE_NAME", &ECORE_X_ATOM_NET_WM_VISIBLE_NAME },
- { "_NET_WM_ICON_NAME", &ECORE_X_ATOM_NET_WM_ICON_NAME },
- { "_NET_WM_VISIBLE_ICON_NAME", &ECORE_X_ATOM_NET_WM_VISIBLE_ICON_NAME },
- { "_NET_WM_DESKTOP", &ECORE_X_ATOM_NET_WM_DESKTOP },
-
- { "_NET_WM_WINDOW_TYPE", &ECORE_X_ATOM_NET_WM_WINDOW_TYPE },
- { "_NET_WM_WINDOW_TYPE_DESKTOP", &ECORE_X_ATOM_NET_WM_WINDOW_TYPE_DESKTOP },
- { "_NET_WM_WINDOW_TYPE_DOCK", &ECORE_X_ATOM_NET_WM_WINDOW_TYPE_DOCK },
- { "_NET_WM_WINDOW_TYPE_TOOLBAR", &ECORE_X_ATOM_NET_WM_WINDOW_TYPE_TOOLBAR },
- { "_NET_WM_WINDOW_TYPE_MENU", &ECORE_X_ATOM_NET_WM_WINDOW_TYPE_MENU },
- { "_NET_WM_WINDOW_TYPE_UTILITY", &ECORE_X_ATOM_NET_WM_WINDOW_TYPE_UTILITY },
- { "_NET_WM_WINDOW_TYPE_SPLASH", &ECORE_X_ATOM_NET_WM_WINDOW_TYPE_SPLASH },
- { "_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 },
- { "_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 },
- { "_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 },
-
- { "_NET_WM_STATE", &ECORE_X_ATOM_NET_WM_STATE },
- { "_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 },
- { "_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 },
- { "_NET_WM_STATE_HIDDEN", &ECORE_X_ATOM_NET_WM_STATE_HIDDEN },
- { "_NET_WM_STATE_FULLSCREEN", &ECORE_X_ATOM_NET_WM_STATE_FULLSCREEN },
- { "_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 },
-
- { "_NET_WM_ALLOWED_ACTIONS", &ECORE_X_ATOM_NET_WM_ALLOWED_ACTIONS },
- { "_NET_WM_ACTION_MOVE", &ECORE_X_ATOM_NET_WM_ACTION_MOVE },
- { "_NET_WM_ACTION_RESIZE", &ECORE_X_ATOM_NET_WM_ACTION_RESIZE },
- { "_NET_WM_ACTION_MINIMIZE", &ECORE_X_ATOM_NET_WM_ACTION_MINIMIZE },
- { "_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 },
- { "_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 },
- { "_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 },
-
- { "_NET_WM_STRUT", &ECORE_X_ATOM_NET_WM_STRUT },
- { "_NET_WM_STRUT_PARTIAL", &ECORE_X_ATOM_NET_WM_STRUT_PARTIAL },
- { "_NET_WM_ICON_GEOMETRY", &ECORE_X_ATOM_NET_WM_ICON_GEOMETRY },
- { "_NET_WM_ICON", &ECORE_X_ATOM_NET_WM_ICON },
- { "_NET_WM_PID", &ECORE_X_ATOM_NET_WM_PID },
- { "_NET_WM_HANDLED_ICONS", &ECORE_X_ATOM_NET_WM_HANDLED_ICONS },
- { "_NET_WM_USER_TIME", &ECORE_X_ATOM_NET_WM_USER_TIME },
- { "_NET_STARTUP_ID", &ECORE_X_ATOM_NET_STARTUP_ID },
- { "_NET_FRAME_EXTENTS", &ECORE_X_ATOM_NET_FRAME_EXTENTS },
-
- { "_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 },
-
- { "_NET_WM_WINDOW_OPACITY", &ECORE_X_ATOM_NET_WM_WINDOW_OPACITY },
- { "_NET_WM_WINDOW_SHADOW", &ECORE_X_ATOM_NET_WM_WINDOW_SHADOW },
- { "_NET_WM_WINDOW_SHADE", &ECORE_X_ATOM_NET_WM_WINDOW_SHADE },
-
- { "TARGETS", &ECORE_X_ATOM_SELECTION_TARGETS },
- { "CLIPBOARD", &ECORE_X_ATOM_SELECTION_CLIPBOARD },
- { "PRIMARY", &ECORE_X_ATOM_SELECTION_PRIMARY },
- { "SECONDARY", &ECORE_X_ATOM_SELECTION_SECONDARY },
- { "_ECORE_SELECTION_PRIMARY", &ECORE_X_ATOM_SELECTION_PROP_PRIMARY },
- { "_ECORE_SELECTION_SECONDARY", &ECORE_X_ATOM_SELECTION_PROP_SECONDARY },
- { "_ECORE_SELECTION_CLIPBOARD", &ECORE_X_ATOM_SELECTION_PROP_CLIPBOARD },
-
- { "_E_VIRTUAL_KEYBOARD", &ECORE_X_ATOM_E_VIRTUAL_KEYBOARD },
- { "_E_VIRTUAL_KEYBOARD_STATE", &ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_STATE },
- { "_E_VIRTUAL_KEYBOARD_ON", &ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_ON },
- { "_E_VIRTUAL_KEYBOARD_OFF", &ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_OFF },
- { "_E_VIRTUAL_KEYBOARD_ALPHA", &ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_ALPHA },
- { "_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 },
- { "_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 },
- { "_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 },
- { "_E_VIRTUAL_KEYBOARD_URL", &ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_URL },
- { "_E_VIRTUAL_KEYBOARD_KEYPAD", &ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_KEYPAD },
- { "_E_VIRTUAL_KEYBOARD_J2ME", &ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_J2ME },
-
- { "_E_ILLUME_ZONE", &ECORE_X_ATOM_E_ILLUME_ZONE },
- { "_E_ILLUME_ZONE_LIST", &ECORE_X_ATOM_E_ILLUME_ZONE_LIST },
- { "_E_ILLUME_CONFORMANT", &ECORE_X_ATOM_E_ILLUME_CONFORMANT },
- { "_E_ILLUME_MODE", &ECORE_X_ATOM_E_ILLUME_MODE },
- { "_E_ILLUME_MODE_SINGLE", &ECORE_X_ATOM_E_ILLUME_MODE_SINGLE },
- { "_E_ILLUME_MODE_DUAL_TOP", &ECORE_X_ATOM_E_ILLUME_MODE_DUAL_TOP },
- { "_E_ILLUME_MODE_DUAL_LEFT", &ECORE_X_ATOM_E_ILLUME_MODE_DUAL_LEFT },
- { "_E_ILLUME_FOCUS_BACK", &ECORE_X_ATOM_E_ILLUME_FOCUS_BACK },
- { "_E_ILLUME_FOCUS_FORWARD", &ECORE_X_ATOM_E_ILLUME_FOCUS_FORWARD },
- { "_E_ILLUME_FOCUS_HOME", &ECORE_X_ATOM_E_ILLUME_FOCUS_HOME },
- { "_E_ILLUME_CLOSE", &ECORE_X_ATOM_E_ILLUME_CLOSE },
- { "_E_ILLUME_HOME_NEW", &ECORE_X_ATOM_E_ILLUME_HOME_NEW },
- { "_E_ILLUME_HOME_DEL", &ECORE_X_ATOM_E_ILLUME_HOME_DEL },
- { "_E_ILLUME_DRAG", &ECORE_X_ATOM_E_ILLUME_DRAG },
- { "_E_ILLUME_DRAG_LOCKED", &ECORE_X_ATOM_E_ILLUME_DRAG_LOCKED },
- { "_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 },
- { "_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 },
- { "_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 },
- { "_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 },
- { "_E_ILLUME_INDICATOR_STATE", &ECORE_X_ATOM_E_ILLUME_INDICATOR_STATE },
- { "_E_ILLUME_INDICATOR_ON", &ECORE_X_ATOM_E_ILLUME_INDICATOR_ON },
- { "_E_ILLUME_INDICATOR_OFF", &ECORE_X_ATOM_E_ILLUME_INDICATOR_OFF },
- { "_E_ILLUME_INDICATOR_OPACITY_MODE", &ECORE_X_ATOM_E_ILLUME_INDICATOR_OPACITY_MODE },
- { "_E_ILLUME_INDICATOR_OPAQUE", &ECORE_X_ATOM_E_ILLUME_INDICATOR_OPAQUE },
- { "_E_ILLUME_INDICATOR_TRANSLUCENT", &ECORE_X_ATOM_E_ILLUME_INDICATOR_TRANSLUCENT },
- { "_E_ILLUME_INDICATOR_TRANSPARENT", &ECORE_X_ATOM_E_ILLUME_INDICATOR_TRANSPARENT },
- { "_E_ILLUME_ROTATE_WINDOW_AVAILABLE_ANGLES", &ECORE_X_ATOM_E_ILLUME_ROTATE_WINDOW_AVAILABLE_ANGLE },
- { "_E_ILLUME_ROTATE_WINDOW_ANGLE", &ECORE_X_ATOM_E_ILLUME_ROTATE_WINDOW_ANGLE },
- { "_E_ILLUME_ROTATE_ROOT_ANGLE", &ECORE_X_ATOM_E_ILLUME_ROTATE_ROOT_ANGLE },
- { "_E_ILLUME_CLIPBOARD_STATE", &ECORE_X_ATOM_E_ILLUME_CLIPBOARD_STATE },
- { "_E_ILLUME_CLIPBOARD_ON", &ECORE_X_ATOM_E_ILLUME_CLIPBOARD_ON },
- { "_E_ILLUME_CLIPBOARD_OFF", &ECORE_X_ATOM_E_ILLUME_CLIPBOARD_OFF },
- { "_E_ILLUME_CLIPBOARD_GEOMETRY", &ECORE_X_ATOM_E_ILLUME_CLIPBOARD_GEOMETRY },
- { "_E_ILLUME_WINDOW_STATE", &ECORE_X_ATOM_E_ILLUME_WINDOW_STATE },
- { "_E_ILLUME_WINDOW_STATE_NORMAL", &ECORE_X_ATOM_E_ILLUME_WINDOW_STATE_NORMAL },
- { "_E_ILLUME_WINDOW_STATE_FLOATING", &ECORE_X_ATOM_E_ILLUME_WINDOW_STATE_FLOATING },
- { "_E_COMP_SYNC_COUNTER", &ECORE_X_ATOM_E_COMP_SYNC_COUNTER },
- { "_E_COMP_SYNC_DRAW_DONE", &ECORE_X_ATOM_E_COMP_SYNC_DRAW_DONE },
- { "_E_COMP_SYNC_SUPPORTED", &ECORE_X_ATOM_E_COMP_SYNC_SUPPORTED },
- { "_E_COMP_SYNC_BEGIN", &ECORE_X_ATOM_E_COMP_SYNC_BEGIN },
- { "_E_COMP_SYNC_END", &ECORE_X_ATOM_E_COMP_SYNC_END },
- { "_E_COMP_SYNC_CANCEL", &ECORE_X_ATOM_E_COMP_SYNC_CANCEL },
-
- { "_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 },
-
- { "_E_PROFILE", &ECORE_X_ATOM_E_PROFILE },
- { "_E_PROFILE_LIST", &ECORE_X_ATOM_E_PROFILE_LIST }
-
- /* SLP additions after the comma */ ,
-
- /* for sliding window */
- { "_E_ILLUME_SLIDING_WIN_STATE", &ECORE_X_ATOM_E_ILLUME_SLIDING_WIN_STATE },
- { "_E_ILLUME_SLIDING_WIN_GEOMETRY", &ECORE_X_ATOM_E_ILLUME_SLIDING_WIN_GEOMETRY },
-
- /* for SDB(Samsung Debug Bridge) */
- { "_SDB_SERVER_CONNECT", &ECORE_X_ATOM_SDB_SERVER_CONNECT },
- { "_SDB_SERVER_DISCONNECT", &ECORE_X_ATOM_SDB_SERVER_DISCONNECT }
- };
Atom *atoms;
char **names;
int i, num;
EAPI Ecore_X_Virtual_Keyboard_State
ecore_x_e_virtual_keyboard_state_get(Ecore_X_Window win)
{
- Ecore_X_Atom atom;
+ Ecore_X_Atom atom = 0;
LOGFN(__FILE__, __LINE__, __FUNCTION__);
if (!ecore_x_window_prop_atom_get(win, ECORE_X_ATOM_E_VIRTUAL_KEYBOARD_STATE,
EAPI Ecore_X_Illume_Quickpanel_State
ecore_x_e_illume_quickpanel_state_get(Ecore_X_Window win)
{
- Ecore_X_Atom atom;
+ Ecore_X_Atom atom = 0;
LOGFN(__FILE__, __LINE__, __FUNCTION__);
if (!ecore_x_window_prop_atom_get(win,
&xev);
}
+/*
+ * @since 1.3
+ *
+ */
EAPI void
ecore_x_e_window_profile_list_set(Ecore_X_Window win,
const char **profiles,
}
}
+/*
+ * @since 1.3
+ */
EAPI Eina_Bool
ecore_x_e_window_profile_list_get(Ecore_X_Window win,
const char ***profiles,
return EINA_TRUE;
}
+/*
+ * @since 1.3
+ */
EAPI void
ecore_x_e_window_profile_set(Ecore_X_Window win,
const char *profile)
}
}
+/*
+ * @since 1.3
+ */
EAPI char *
ecore_x_e_window_profile_get(Ecore_X_Window win)
{
EAPI Ecore_X_Illume_Indicator_State
ecore_x_e_illume_indicator_state_get(Ecore_X_Window win)
{
- Ecore_X_Atom atom;
+ Ecore_X_Atom atom = 0;
LOGFN(__FILE__, __LINE__, __FUNCTION__);
if (!ecore_x_window_prop_atom_get(win,
EAPI Ecore_X_Illume_Indicator_Opacity_Mode
ecore_x_e_illume_indicator_opacity_get(Ecore_X_Window win)
{
- Ecore_X_Atom atom;
+ Ecore_X_Atom atom = 0;
LOGFN(__FILE__, __LINE__, __FUNCTION__);
if (!ecore_x_window_prop_atom_get(win,
*
* Return the error code from the last X error
*/
+//FIXME: Use Ecore_X_Error_Code type when 2.0 is released
EAPI int
ecore_x_error_code_get(void)
{
xevent->xselection.property,
XA_ATOM, 32, &data, &num_ret);
if (!format)
- return;
+ {
+ /* fallback if targets handling is not working and try get the
+ * selection directly */
+ XConvertSelection(_ecore_x_disp, selection,
+ ECORE_X_ATOM_UTF8_STRING,
+ selection,
+ xevent->xselection.requestor,
+ CurrentTime);
+ return;
+ }
}
else
{
#include <ibus.h>
#include "ibus_imcontext.h"
-struct _IBusIMContext {
- /* instance members */
- Ecore_IMF_Context *ctx;
+struct _IBusIMContext
+{
+ /* instance members */
+ Ecore_IMF_Context *ctx;
- /* enabled */
- Eina_Bool enable;
- IBusInputContext *ibuscontext;
+ /* enabled */
+ Eina_Bool enable;
+ IBusInputContext *ibuscontext;
- /* preedit status */
- char *preedit_string;
- Eina_List *preedit_attrs;
- int preedit_cursor_pos;
- Eina_Bool preedit_visible;
+ /* preedit status */
+ char *preedit_string;
+ Eina_List *preedit_attrs;
+ int preedit_cursor_pos;
+ Eina_Bool preedit_visible;
- int cursor_x;
- int cursor_y;
- int cursor_w;
- int cursor_h;
+ int cursor_x;
+ int cursor_y;
+ int cursor_w;
+ int cursor_h;
- Eina_Bool has_focus;
+ Eina_Bool has_focus;
- Ecore_X_Window client_window;
- Evas *client_canvas;
+ Ecore_X_Window client_window;
+ Evas *client_canvas;
- int caps;
+ int caps;
};
+typedef struct _KeyEvent KeyEvent;
+
+struct _KeyEvent
+{
+ int keysym;
+ int state;
+};
+
+static Eina_Bool _use_sync_mode = EINA_FALSE;
+
static Ecore_IMF_Context *_focus_im_context = NULL;
-static IBusBus *_bus = NULL;
+static IBusBus *_bus = NULL;
/* functions prototype */
/* static methods*/
(Ecore_IMF_Context *ctx);
static void _bus_connected_cb (IBusBus *bus,
IBusIMContext *context);
-
+static XKeyEvent createXKeyEvent (Window win, Eina_Bool press, int keysym, int modifiers);
static void
_window_to_screen_geometry_get(Ecore_X_Window client_win, int *x, int *y)
if (modifier & ECORE_IMF_KEYBOARD_MODIFIER_SHIFT)
state |= IBUS_SHIFT_MASK;
- /**< "Win" (between "Ctrl" and "A */
+ /**< "Win" (between "Ctrl" and "Alt") */
if (modifier & ECORE_IMF_KEYBOARD_MODIFIER_WIN)
state |= IBUS_SUPER_MASK;
+ /**< "AltGr" is pressed */
+ if (modifier & ECORE_IMF_KEYBOARD_MODIFIER_ALTGR)
+ state |= IBUS_MOD5_MASK;
+
return state;
}
+static void
+key_event_put(int keysym, int state)
+{
+ // Find the window which has the current keyboard focus.
+ Window winFocus = 0;
+ int revert = RevertToParent;
+
+ XGetInputFocus(ecore_x_display_get(), &winFocus, &revert);
+
+ XKeyEvent event;
+ if (state & IBUS_RELEASE_MASK)
+ {
+ event = createXKeyEvent(winFocus, EINA_FALSE, keysym, state);
+ XSendEvent(event.display, event.window, True, KeyReleaseMask, (XEvent *)&event);
+ }
+ else
+ {
+ event = createXKeyEvent(winFocus, EINA_TRUE, keysym, state);
+ XSendEvent(event.display, event.window, True, KeyPressMask, (XEvent *)&event);
+ }
+}
+
+static KeyEvent *
+key_event_copy(int keysym, int state)
+{
+ KeyEvent *kev = calloc(1, sizeof(KeyEvent));
+ kev->keysym = keysym;
+ kev->state = state;
+
+ return kev;
+}
+
IBusIMContext *
ibus_im_context_new(void)
{
{
char *display_name = NULL;
- if ((display_name = getenv ("DISPLAY")))
- ibus_set_display (display_name);
+ if ((display_name = getenv("DISPLAY")))
+ ibus_set_display(display_name);
else
- ibus_set_display (":0.0");
+ ibus_set_display(":0.0");
_bus = ibus_bus_new();
}
return context;
}
+static void
+_process_key_event_done (GObject *object,
+ GAsyncResult *res,
+ gpointer user_data)
+{
+ IBusInputContext *context = (IBusInputContext *)object;
+ KeyEvent *event = (KeyEvent *)user_data;
+
+ GError *error = NULL;
+ Eina_Bool retval = ibus_input_context_process_key_event_async_finish(context,
+ res,
+ &error);
+
+ if (error != NULL)
+ {
+ g_warning("Process Key Event failed: %s.", error->message);
+ g_error_free(error);
+ }
+
+ if (retval == EINA_FALSE)
+ {
+ key_event_put(event->keysym, event->state);
+ }
+ free(event);
+}
+
EAPI void
ibus_im_context_add(Ecore_IMF_Context *ctx)
{
EINA_LOG_DBG("%s", __FUNCTION__);
+ char *s = NULL;
IBusIMContext *ibusimcontext = (IBusIMContext *)ecore_imf_context_data_get(ctx);
EINA_SAFETY_ON_NULL_RETURN(ibusimcontext);
ibusimcontext->caps = IBUS_CAP_PREEDIT_TEXT | IBUS_CAP_FOCUS | IBUS_CAP_SURROUNDING_TEXT;
ibusimcontext->ctx = ctx;
+ s = getenv("IBUS_ENABLE_SYNC_MODE");
+ if (s)
+ _use_sync_mode = !!atoi(s);
+
if (ibus_bus_is_connected(_bus))
_create_input_context (ibusimcontext);
keycode = ecore_x_keysym_keycode_get(ev->key);
keysym = XStringToKeysym(ev->key);
state = _ecore_imf_modifier_to_ibus_modifier(ev->modifiers) | IBUS_RELEASE_MASK;
- retval = ibus_input_context_process_key_event (ibusimcontext->ibuscontext,
- keysym,
- keycode - 8,
- state);
+
+ if (_use_sync_mode)
+ {
+ retval = ibus_input_context_process_key_event(ibusimcontext->ibuscontext,
+ keysym,
+ keycode - 8,
+ state);
+ }
+ else
+ {
+ ibus_input_context_process_key_event_async(ibusimcontext->ibuscontext,
+ keysym,
+ keycode - 8,
+ state,
+ -1,
+ NULL,
+ _process_key_event_done,
+ key_event_copy(keysym, state));
+ retval = EINA_TRUE;
+ }
}
else if (type == ECORE_IMF_EVENT_KEY_DOWN)
{
keycode = ecore_x_keysym_keycode_get(ev->key);
keysym = XStringToKeysym(ev->key);
state = _ecore_imf_modifier_to_ibus_modifier(ev->modifiers);
- retval = ibus_input_context_process_key_event (ibusimcontext->ibuscontext,
- keysym,
- keycode - 8,
- state);
+ if (_use_sync_mode)
+ {
+ retval = ibus_input_context_process_key_event(ibusimcontext->ibuscontext,
+ keysym,
+ keycode - 8,
+ state);
+ }
+ else
+ {
+ ibus_input_context_process_key_event_async(ibusimcontext->ibuscontext,
+ keysym,
+ keycode - 8,
+ state,
+ -1,
+ NULL,
+ _process_key_event_done,
+ key_event_copy(keysym, state));
+ retval = EINA_TRUE;
+ }
}
else
retval = EINA_FALSE;
if (ibusimcontext->enable && ibusimcontext->preedit_visible)
{
if (str)
- *str = strdup (ibusimcontext->preedit_string ? ibusimcontext->preedit_string: "");
+ *str = strdup(ibusimcontext->preedit_string ? ibusimcontext->preedit_string: "");
if (cursor_pos)
*cursor_pos = ibusimcontext->preedit_cursor_pos;
{
EINA_LOG_DBG("keyval : %d, state : %d", keyval, state);
- // Find the window which has the current keyboard focus.
- Window winFocus = 0;
- int revert = RevertToParent;
-
- XGetInputFocus(ecore_x_display_get(), &winFocus, &revert);
-
- XKeyEvent event;
- if (state & IBUS_RELEASE_MASK)
- {
- event = createXKeyEvent(winFocus, EINA_FALSE, keyval, state);
- XSendEvent(event.display, event.window, True, KeyReleaseMask, (XEvent *)&event);
- }
- else
- {
- event = createXKeyEvent(winFocus, EINA_TRUE, keyval, state);
- XSendEvent(event.display, event.window, True, KeyPressMask, (XEvent *)&event);
- }
+ key_event_put(keyval, state);
}
static void
ibusimcontext->preedit_cursor_pos = cursor_pos;
- EINA_LOG_DBG("string : %s, cursor : %d",ibusimcontext->preedit_string, ibusimcontext->preedit_cursor_pos);
+ EINA_LOG_DBG("string : %s, cursor : %d", ibusimcontext->preedit_string, ibusimcontext->preedit_cursor_pos);
flag = ibusimcontext->preedit_visible != visible;
ibusimcontext->preedit_visible = visible;
}
static void
-_ibus_context_show_preedit_text_cb(IBusInputContext *ibuscontext __UNUSED__,
- IBusIMContext *ibusimcontext)
+_ibus_context_show_preedit_text_cb(IBusInputContext *ibuscontext __UNUSED__,
+ IBusIMContext *ibusimcontext)
{
EINA_LOG_DBG("preedit visible : %d", ibusimcontext->preedit_visible);
EINA_SAFETY_ON_NULL_RETURN(ibusimcontext);
NULL, /* input_panel_imdata_get */
NULL, /* input_panel_return_key_type_set */
NULL, /* input_panel_return_key_disabled_set */
- NULL /* input_panel_caps_lock_mode_set */
+ NULL, /* input_panel_caps_lock_mode_set */
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL
};
static Ecore_IMF_Context *im_module_create (void);
if (ev->modifiers & ECORE_IMF_KEYBOARD_MODIFIER_SHIFT) key.mask |=SCIM_KEY_ShiftMask;
if (ev->modifiers & ECORE_IMF_KEYBOARD_MODIFIER_CTRL) key.mask |=SCIM_KEY_ControlMask;
if (ev->modifiers & ECORE_IMF_KEYBOARD_MODIFIER_ALT) key.mask |=SCIM_KEY_AltMask;
+ if (ev->modifiers & ECORE_IMF_KEYBOARD_MODIFIER_ALTGR) key.mask |=SCIM_KEY_Mod5Mask;
if (ev->locks & ECORE_IMF_KEYBOARD_LOCK_CAPS) key.mask |=SCIM_KEY_CapsLockMask;
if (ev->locks & ECORE_IMF_KEYBOARD_LOCK_NUM) key.mask |=SCIM_KEY_NumLockMask;
}
if (ev->modifiers & ECORE_IMF_KEYBOARD_MODIFIER_SHIFT) key.mask |=SCIM_KEY_ShiftMask;
if (ev->modifiers & ECORE_IMF_KEYBOARD_MODIFIER_CTRL) key.mask |=SCIM_KEY_ControlMask;
if (ev->modifiers & ECORE_IMF_KEYBOARD_MODIFIER_ALT) key.mask |=SCIM_KEY_AltMask;
+ if (ev->modifiers & ECORE_IMF_KEYBOARD_MODIFIER_ALTGR) key.mask |=SCIM_KEY_Mod5Mask;
if (ev->locks & ECORE_IMF_KEYBOARD_LOCK_CAPS) key.mask |=SCIM_KEY_CapsLockMask;
if (ev->locks & ECORE_IMF_KEYBOARD_LOCK_NUM) key.mask |=SCIM_KEY_NumLockMask;
}
NULL, /* input_panel_imdata_get */
NULL, /* input_panel_return_key_type_set */
NULL, /* input_panel_return_key_disabled_set */
- NULL /* input_panel_caps_lock_mode_set */
+ NULL, /* input_panel_caps_lock_mode_set */
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL
};
static Ecore_IMF_Context *imf_module_create (void);
XIMFeedback *feedbacks;
XIMCallback destroy_cb;
-
+
XIMCallback preedit_start_cb;
XIMCallback preedit_done_cb;
XIMCallback preedit_draw_cb;