svn update: 58224 (latest:58224)
authorJaehwan Kim <jae.hwan.kim@samsung.com>
Tue, 5 Apr 2011 04:32:28 +0000 (13:32 +0900)
committerJaehwan Kim <jae.hwan.kim@samsung.com>
Tue, 5 Apr 2011 04:32:28 +0000 (13:32 +0900)
23 files changed:
AUTHORS
ChangeLog
configure.ac
doc/ecore.dox.in
ecore.spec.in
src/lib/ecore/Ecore.h
src/lib/ecore/ecore_main.c
src/lib/ecore/ecore_thread.c
src/lib/ecore_con/Ecore_Con.h
src/lib/ecore_con/ecore_con.c
src/lib/ecore_con/ecore_con_ares.c
src/lib/ecore_con/ecore_con_ssl.c
src/lib/ecore_con/ecore_con_url.c
src/lib/ecore_evas/ecore_evas_private.h
src/lib/ecore_evas/ecore_evas_util.c
src/lib/ecore_evas/ecore_evas_x.c
src/lib/ecore_imf/ecore_imf_context.c
src/lib/ecore_input/Ecore_Input.h
src/lib/ecore_x/Ecore_X.h
src/lib/ecore_x/xlib/ecore_x_e.c
src/lib/ecore_x/xlib/ecore_x_events.c
src/lib/ecore_x/xlib/ecore_x_sync.c
src/lib/ecore_x/xlib/ecore_x_xinerama.c

diff --git a/AUTHORS b/AUTHORS
index c8f7095..bf44cd4 100644 (file)
--- a/AUTHORS
+++ b/AUTHORS
@@ -38,3 +38,4 @@ Leif Middelschulte <leif.middelschulte@gmail.com>
 Mike McCormack <mj.mccormack@samsung.com>
 Sangho Park <gouache95@gmail.com>
 Jihoon Kim <jihoon48.kim@samsung.com> <imfine98@gmail.com>
+PnB <Poor.NewBie@gmail.com>
index dfbf4be..d0daefd 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -12,7 +12,7 @@
 
 2011-01-31  Carsten Haitzler (The Rasterman)
 
-        * Fix: ecore-evas CAN send "render done" messages even if not
+        * Fix ecore-evas CAN send "render done" messages even if not
         waiting for sync counter when using gl engine. new semi-sync
         mode to account for that.
 
@@ -47,7 +47,7 @@
 
        * Ecore_Win32: improve resize of windows and fix key up event for
        the 'space' key.
-       * Ecore_WinCE: do not erase a window background
+       * Ecore_WinCE do not erase a window background
 
 2011-02-21 Jihoon Kim
 
 
 2011-02-22  Carsten Haitzler (The Rasterman)
 
-        * Fix: ecore-file inotify fd would be duplicated in children
+        * Fix ecore-file inotify fd would be duplicated in children
         on fork. Have it detecti this on next monitor add and re-init the
         inotify fd and fd handler.
 
 2011-02-24 Vincent Torri
 
-       * Ecore_File: fix compilation when ecore_con and curl are not
+       * Ecore_File fix compilation when ecore_con and curl are not
        available
 
 2011-02-27 Jihoon Kim
 
        * Fix detection of complete file write in ecore_file inotify.
 
+2011-03-16 Cedric Bail
+
+       * Add ecore_thread_reschedule.
+
+2011-03-19 Mike Blumenkrantz
+
+        * Fix crash in ecore_con_ssl related to attempted connections on a dead socket
+
+2011-03-23  Carsten Haitzler (The Rasterman)
+
+        * Fix ecore-evas interceptor didn't handle override-redirect
+        windows correctly, expecting a feed-back event from x, which it didn't
+        get.
+
+2011-03-23  Elixirious
+
+       * Fix ecore_con_url_ftp_upload upload the file until the end.
+
+2011-03-29  PnB
+
+       * Add ecore_con_url_ssl_ca_set to manually set a certificate authority.
+
+2011-03-30  Carsten Haitzler (The Rasterman)
+
+        * Ecore_X gains some more x sync counter controls and Ecore_Evas
+        now uses the netwm sync protocol to get wm's to only configure
+        as fast as it can keep drawing.
index d0f8d44..1e69a90 100644 (file)
@@ -12,8 +12,8 @@ dnl m4_define([relname], [ver-pre-svn-07])
 dnl m4_define([v_rel], [-release relname])
 ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
 m4_ifdef([v_rev], [m4_define([v_ver], [v_maj.v_min.v_mic.v_rev])], [m4_define([v_ver], [v_maj.v_min.v_mic])])
-m4_define([lt_rev], m4_eval(v_maj + v_min))
-m4_define([lt_cur], v_mic)
+m4_define([lt_cur], m4_eval(v_maj + v_min))
+m4_define([lt_rev], v_mic)
 m4_define([lt_age], v_min)
 ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
 ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
@@ -49,7 +49,7 @@ AC_DEFINE_UNQUOTED(VERS_MAJ, [v_maj], [Major version])
 AC_DEFINE_UNQUOTED(VERS_MIN, [v_min], [Minor version])
 AC_DEFINE_UNQUOTED(VERS_MIC, [v_mic], [Micro version])
 AC_DEFINE_UNQUOTED(VERS_REV, [v_rev], [Revison])
-version_info="lt_rev:lt_cur:lt_age"
+version_info="lt_cur:lt_rev:lt_age"
 release_info="v_rel"
 AC_SUBST(version_info)
 AC_SUBST(release_info)
index a92a2cb..2356dce 100644 (file)
@@ -11,44 +11,44 @@ These routines are used for Ecore Library interaction
 @image html  e.png
 
 @version @PACKAGE_VERSION@
-@author Carsten Haitzler <raster@@rasterman.com>
-@author Tom Gilbert <tom@@linuxbrit.co.uk>
-@author Burra <burra@@colorado.edu>
-@author Chris Ross <chris@@darkrock.co.uk>
-@author Term <term@@twistedpath.org>
-@author Tilman Sauerbeck <tilman@@code-monkey.de>
-@author Ibukun Olumuyiwa <ibukun@@computer.org>
-@author Yuri <da2001@@hotmail.ru>
-@author Nicholas Curran <quasar@@bigblue.net.au>
-@author Howell Tam <pigeon@@pigeond.net>
-@author Nathan Ingersoll <rbdpngn@@users.sourceforge.net>
-@author Andrew Elcock <andy@@elcock.org>
-@author Kim Woelders <kim@@woelders.dk>
-@author Sebastian Dransfeld <sebastid@@tango.flipp.net>
-@author Simon Poole <simon.armlinux@@themalago.net>
-@author Jorge Luis Zapata Muga <jorgeluis.zapata@@gmail.com>
-@author dan sinclair <zero@@everburning.com>
-@author Michael 'Mickey' Lauer <mickey@@tm.informatik.uni-frankfurt.de>
-@author David 'onefang' Seikel <onefang@@gmail.com>
-@author Hisham 'CodeWarrior' Mardam Bey <hisham@@hisham.cc>
-@author Brian 'rephorm' Mattern <rephorm@@rephorm.com>
-@author Tim Horton <hortont424@@gmail.com>
-@author Arnaud de Turckheim 'quarium' <quarium@@gmail.com>
-@author Matt Barclay <mbarclay@@gmail.com>
-@author Peter Wehrfritz <peter.wehrfritz@@web.de>
-@author Albin "Lutin" Tonnerre <albin.tonnerre@@gmail.com>
-@author Vincent Torri <vincent.torri@@gmail.com>
-@author Lars Munch <lars@@segv.dk>
-@author Andre Dieb <andre.dieb@@gmail.com>
-@author Mathieu Taillefumier <mathieu.taillefumier@@free.fr>
-@author Rui Miguel Silva Seabra <rms@@1407.org>
+@author Carsten Haitzler <raster@rasterman.com>
+@author Tom Gilbert <tom@linuxbrit.co.uk>
+@author Burra <burra@colorado.edu>
+@author Chris Ross <chris@darkrock.co.uk>
+@author Term <term@twistedpath.org>
+@author Tilman Sauerbeck <tilman@code-monkey.de>
+@author Ibukun Olumuyiwa <ibukun@computer.org>
+@author Yuri <da2001@hotmail.ru>
+@author Nicholas Curran <quasar@bigblue.net.au>
+@author Howell Tam <pigeon@pigeond.net>
+@author Nathan Ingersoll <rbdpngn@users.sourceforge.net>
+@author Andrew Elcock <andy@elcock.org>
+@author Kim Woelders <kim@woelders.dk>
+@author Sebastian Dransfeld <sebastid@tango.flipp.net>
+@author Simon Poole <simon.armlinux@themalago.net>
+@author Jorge Luis Zapata Muga <jorgeluis.zapata@gmail.com>
+@author dan sinclair <zero@everburning.com>
+@author Michael 'Mickey' Lauer <mickey@tm.informatik.uni-frankfurt.de>
+@author David 'onefang' Seikel <onefang@gmail.com>
+@author Hisham 'CodeWarrior' Mardam Bey <hisham@hisham.cc>
+@author Brian 'rephorm' Mattern <rephorm@rephorm.com>
+@author Tim Horton <hortont424@gmail.com>
+@author Arnaud de Turckheim 'quarium' <quarium@gmail.com>
+@author Matt Barclay <mbarclay@gmail.com>
+@author Peter Wehrfritz <peter.wehrfritz@web.de>
+@author Albin "Lutin" Tonnerre <albin.tonnerre@gmail.com>
+@author Vincent Torri <vincent.torri@gmail.com>
+@author Lars Munch <lars@segv.dk>
+@author Andre Dieb <andre.dieb@gmail.com>
+@author Mathieu Taillefumier <mathieu.taillefumier@free.fr>
+@author Rui Miguel Silva Seabra <rms@1407.org>
 @author Samsung Electronics
 @author Samsung SAIT
-@author Nicolas Aguirre <aguirre.nicolas@@gmail.com>
-@author Brett Nash <nash@@nash.id.au>
-@author Mike Blumenkrantz <mike@@zentific.com>
-@author Leif Middelschulte <leif.middelschulte@@gmail.com>
-@author Mike McCormack <mj.mccormack@@samsung.com>
+@author Nicolas Aguirre <aguirre.nicolas@gmail.com>
+@author Brett Nash <nash@nash.id.au>
+@author Mike Blumenkrantz <mike@zentific.com>
+@author Leif Middelschulte <leif.middelschulte@gmail.com>
+@author Mike McCormack <mj.mccormack@samsung.com>
 @author Sangho Park <gouache95@gmail.com>
 @author Jihoon Kim <jihoon48.kim@samsung.com> <imfine98@gmail.com>
 @date 2000-2011
@@ -69,16 +69,11 @@ The Ecore library provides the following modules:
 @li @ref Ecore_WinCE_Group
 
 @section compiling How to compile using Ecore?
-
-This section has to be documented. Below is just a quick line to handle all
-Ecore modules at once.
+pkgconfig (.pc) files are installed for every ecore module.
+Thus, to compile using any of them, you can use something like the following:
 
 @verbatim
-gcc *.c \
--I/usr/local/include -I/usr/X11R6/include \
--L/usr/local/lib -L/usr/X11R6/lib \
--lecore -lecore_evas -lecore_x -lecore_fb \
-`pkg-config evas --cflags --libs`
+gcc *.c $(pkg-config ecore ecore-$x ecore-$y [...] --cflags --libs)
 @endverbatim
 
 @section install How is it installed?
@@ -98,8 +93,6 @@ make CFLAGS="-O9 -mpentiumpro -march=pentiumpro -mcpu=pentiumpro"
 
 @todo (1.0) Document API
 
-*/
-
 /*
 @page Ecore_Main_Loop_Page The Ecore Main Loop
 
index 3b5682e..a010bdf 100644 (file)
@@ -48,7 +48,7 @@ URL: http://www.enlightenment.org
 Packager: %{?_packager:%{_packager}}%{!?_packager:Michael Jennings <mej@eterm.org>}
 Vendor: %{?_vendorinfo:%{_vendorinfo}}%{!?_vendorinfo:The Enlightenment Project (http://www.enlightenment.org/)}
 Distribution: %{?_distribution:%{_distribution}}%{!?_distribution:%{_vendor}}
-#BuildSuggests: xorg-x11-devel, XFree86-devel, libX11-devel
+#BuildSuggests: xorg-x11-devel, XFree86-devel, libX11-devel, c-ares-devel
 BuildRequires: libjpeg-devel, openssl-devel %{?breq_lib_ecore_directfb}
 BuildRequires: curl-devel, evas-devel, eet-devel %{?breq_lib_ecore_sdl}
 BuildRoot: %{_tmppath}/%{name}-%{version}-root
index 215545e..02e1f71 100644 (file)
@@ -237,10 +237,10 @@ extern "C" {
     */
    typedef void (*Ecore_Fd_Prep_Cb) (void *data, Ecore_Fd_Handler *fd_handler);
    /**
-    * @typedef Ecore_Fd_Win32_Cb Ecore_Fd_Win32_Cb
+    * @typedef Ecore_Win32_Handle_Cb Ecore_Win32_Handle_Cb
     * A callback used by an @ref Ecore_Win32_Handler.
     */
-   typedef Eina_Bool (*Ecore_Fd_Win32_Cb) (void *data, Ecore_Win32_Handler *wh);
+   typedef Eina_Bool (*Ecore_Win32_Handle_Cb) (void *data, Ecore_Win32_Handler *wh);
 
 
    typedef struct _Ecore_Job Ecore_Job; /**< A job handle */
@@ -455,7 +455,7 @@ extern "C" {
    EAPI Eina_Bool         ecore_main_fd_handler_active_get(Ecore_Fd_Handler *fd_handler, Ecore_Fd_Handler_Flags flags);
    EAPI void              ecore_main_fd_handler_active_set(Ecore_Fd_Handler *fd_handler, Ecore_Fd_Handler_Flags flags);
 
-   EAPI Ecore_Win32_Handler *ecore_main_win32_handler_add(void *h, Ecore_Fd_Win32_Cb func, const void *data);
+   EAPI Ecore_Win32_Handler *ecore_main_win32_handler_add(void *h, Ecore_Win32_Handle_Cb func, const void *data);
    EAPI void                *ecore_main_win32_handler_del(Ecore_Win32_Handler *win32_handler);
 
   /**
@@ -497,6 +497,7 @@ extern "C" {
    EAPI Eina_Bool     ecore_thread_cancel(Ecore_Thread *thread);
    EAPI Eina_Bool     ecore_thread_check(Ecore_Thread *thread);
    EAPI Eina_Bool     ecore_thread_feedback(Ecore_Thread *thread, const void *msg_data);
+   EAPI Eina_Bool     ecore_thread_reschedule(Ecore_Thread *thread);
    EAPI int           ecore_thread_active_get(void);
    EAPI int           ecore_thread_pending_get(void);
    EAPI int           ecore_thread_pending_feedback_get(void);
index c9e9873..ec63b35 100644 (file)
@@ -85,11 +85,11 @@ struct _Ecore_Win32_Handler
 {
    EINA_INLIST;
    ECORE_MAGIC;
-   HANDLE         h;
-   Ecore_Fd_Win32_Cb func;
-   void          *data;
-   int            references;
-   Eina_Bool      delete_me : 1;
+   HANDLE                h;
+   Ecore_Win32_Handle_Cb func;
+   void                 *data;
+   int                   references;
+   Eina_Bool             delete_me : 1;
 };
 #endif
 
@@ -808,7 +808,7 @@ ecore_main_fd_handler_add(int fd, Ecore_Fd_Handler_Flags flags, Ecore_Fd_Cb func
 
 #ifdef _WIN32
 EAPI Ecore_Win32_Handler *
-ecore_main_win32_handler_add(void *h, Ecore_Fd_Win32_Cb func, const void *data)
+ecore_main_win32_handler_add(void *h, Ecore_Win32_Handle_Cb func, const void *data)
 {
    Ecore_Win32_Handler *wh;
 
@@ -828,7 +828,7 @@ ecore_main_win32_handler_add(void *h, Ecore_Fd_Win32_Cb func, const void *data)
 }
 #else
 EAPI Ecore_Win32_Handler *
-ecore_main_win32_handler_add(void *h __UNUSED__, Ecore_Fd_Win32_Cb func __UNUSED__,
+ecore_main_win32_handler_add(void *h __UNUSED__, Ecore_Win32_Handle_Cb func __UNUSED__,
                              const void *data __UNUSED__)
 {
    return NULL;
index 49059b8..4dc7381 100644 (file)
@@ -343,6 +343,7 @@ struct _Ecore_Pthread_Worker
    Eina_Bool cancel : 1;
    Eina_Bool feedback_run : 1;
    Eina_Bool kill : 1;
+   Eina_Bool reschedule : 1;
 };
 
 #ifdef EFL_HAVE_THREADS
@@ -539,7 +540,18 @@ _ecore_short_job(Ecore_Pipe *end_pipe)
         if (!work->cancel)
           work->u.short_run.func_blocking((void *) work->data, (Ecore_Thread*) work);
 
-        ecore_pipe_write(end_pipe, &work, sizeof (Ecore_Pthread_Worker *));
+        if (work->reschedule)
+          {
+             work->reschedule = EINA_FALSE;
+
+             LKL(_ecore_pending_job_threads_mutex);
+             _ecore_pending_job_threads = eina_list_append(_ecore_pending_job_threads, work);
+             LKU(_ecore_pending_job_threads_mutex);
+          }
+        else
+          {
+             ecore_pipe_write(end_pipe, &work, sizeof (Ecore_Pthread_Worker *));
+          }
      }
 }
 
@@ -568,7 +580,18 @@ _ecore_feedback_job(Ecore_Pipe *end_pipe, PH(thread))
         if (!work->cancel)
           work->u.feedback_run.func_heavy((void *) work->data, (Ecore_Thread *) work);
 
-        ecore_pipe_write(end_pipe, &work, sizeof (Ecore_Pthread_Worker *));
+        if (work->reschedule)
+          {
+             work->reschedule = EINA_FALSE;
+
+             LKL(_ecore_pending_job_threads_mutex);
+             _ecore_pending_job_threads_feedback = eina_list_append(_ecore_pending_job_threads_feedback, work);
+             LKU(_ecore_pending_job_threads_mutex);
+          }
+        else
+          {
+             ecore_pipe_write(end_pipe, &work, sizeof (Ecore_Pthread_Worker *));
+          }
      }
 }
 
@@ -845,6 +868,7 @@ ecore_thread_run(Ecore_Thread_Cb func_blocking,
    work->cancel = EINA_FALSE;
    work->feedback_run = EINA_FALSE;
    work->kill = EINA_FALSE;
+   work->reschedule = EINA_FALSE;
    work->data = data;
 
 #ifdef EFL_HAVE_THREADS
@@ -903,9 +927,18 @@ ecore_thread_run(Ecore_Thread_Cb func_blocking,
      If no thread and as we don't want to break app that rely on this
      facility, we will lock the interface until we are done.
     */
-   func_blocking((void *)data, (Ecore_Thread *) work);
-   if (work->cancel == EINA_FALSE) func_end((void *)data, (Ecore_Thread *) work);
-   else func_end((void *)data, (Ecore_Thread *) work);
+   do {
+      /* Handle reschedule by forcing it here. That would mean locking the app,
+       * would be better with an idler, but really to complex for a case where
+       * thread should really exist.
+       */
+      work->reschedule = EINA_FALSE;
+
+      func_blocking((void *)data, (Ecore_Thread *) work);
+      if (work->cancel == EINA_FALSE) func_end((void *)data, (Ecore_Thread *) work);
+      else func_end((void *)data, (Ecore_Thread *) work);
+
+   } while (work->reschedule == EINA_TRUE);
 
    free(work);
 
@@ -1031,7 +1064,7 @@ ecore_thread_check(Ecore_Thread *thread)
  * parallel thread. You should provide four functions. The first one, func_heavy,
  * that will do the heavy work in another thread (so you should not use the
  * EFL in it except Eina and Eet if you are careful). The second one, func_notify,
- * will receive the data send from the thread function (func_heavy) by ecore_thread_notify
+ * will receive the data send from the thread function (func_heavy) by ecore_thread_feedback
  * in the main loop (and so, can use all the EFL). The third, func_end,
  * that will be called in Ecore main loop when func_heavy is done. So you
  * can use all the EFL inside this function. The last one, func_cancel, will
@@ -1073,6 +1106,8 @@ EAPI Ecore_Thread *ecore_thread_feedback_run(Ecore_Thread_Cb func_heavy,
    worker->cancel = EINA_FALSE;
    worker->feedback_run = EINA_TRUE;
    worker->kill = EINA_FALSE;
+   worker->reschedule = EINA_FALSE;
+
    worker->u.feedback_run.send = 0;
    worker->u.feedback_run.received = 0;
 
@@ -1164,10 +1199,14 @@ EAPI Ecore_Thread *ecore_thread_feedback_run(Ecore_Thread_Cb func_heavy,
    worker.feedback_run = EINA_TRUE;
    worker.kill = EINA_FALSE;
 
-   func_heavy((void *)data, (Ecore_Thread *) &worker);
+   do {
+      worker.reschedule = EINA_FALSE;
 
-   if (worker.cancel) func_cancel((void *)data, (Ecore_Thread *) &worker);
-   else func_end((void *)data, (Ecore_Thread *) &worker);
+      func_heavy((void *)data, (Ecore_Thread *) &worker);
+
+      if (worker.cancel) func_cancel((void *)data, (Ecore_Thread *) &worker);
+      else func_end((void *)data, (Ecore_Thread *) &worker);
+   } while (worker.reschedule == EINA_FALSE);
 
    return NULL;
 #endif
@@ -1208,6 +1247,32 @@ ecore_thread_feedback(Ecore_Thread *thread, const void *data)
 }
 
 /**
+ * @brief Plan to recall the heavy function once it exist it.
+ * @param thread The current Ecore_Thread context to reschedule
+ * @return EINA_TRUE if data was successfully send to main loop,
+ *         EINA_FALSE if anything goes wrong.
+ *
+ * After a succesfull call, you can still do what you want in your thread, it
+ * will only reschedule it once you exit the heavy loop.
+ *
+ * You should use this function only in the func_heavy call.
+ */
+EAPI Eina_Bool
+ecore_thread_reschedule(Ecore_Thread *thread)
+{
+   Ecore_Pthread_Worker *worker = (Ecore_Pthread_Worker *) thread;
+
+   if (!worker) return EINA_FALSE;
+
+#ifdef EFL_HAVE_THREADS
+   if (!PHE(worker->self, PHS())) return EINA_FALSE;
+#endif
+
+   worker->reschedule = EINA_TRUE;
+   return EINA_TRUE;
+}
+
+/**
  * @brief Get number of active thread jobs
  * @return Number of active threads running jobs
  * This returns the number of threads currently running jobs through the
index b8fbad8..692d6c5 100644 (file)
@@ -579,6 +579,8 @@ EAPI void              ecore_con_url_cookies_jar_write(Ecore_Con_Url *url_con);
 
 EAPI void              ecore_con_url_ssl_verify_peer_set(Ecore_Con_Url *url_con,
                                                          Eina_Bool verify);
+EAPI int               ecore_con_url_ssl_ca_set(Ecore_Con_Url *url_con,
+                                                const char *ca_path);
 
 /**
  * @}
index dbf1039..3131551 100644 (file)
@@ -381,7 +381,7 @@ error:
    if (svr->path)
      free(svr->path);
 
-#ifndef _WIN32
+
    if (svr->fd_handler)
      ecore_main_fd_handler_del(svr->fd_handler);
 
@@ -394,7 +394,6 @@ error:
    if (svr->ip)
      eina_stringshare_del(svr->ip);
 
-#endif
    ecore_con_ssl_server_shutdown(svr);
    free(svr);
    return NULL;
@@ -1852,7 +1851,7 @@ svr_try_connect_plain(Ecore_Con_Server *svr)
 {
    int res;
    int so_err = 0;
-   unsigned int size = sizeof(int);
+   socklen_t size = sizeof(int);
 
    res = getsockopt(svr->fd, SOL_SOCKET, SO_ERROR, (void *)&so_err, &size);
 #ifdef _WIN32
@@ -2161,14 +2160,14 @@ _ecore_con_svr_udp_handler(void             *data,
 {
    unsigned char buf[READBUFSIZ];
    unsigned char client_addr[256];
-   unsigned int client_addr_len = sizeof(client_addr);
+   socklen_t client_addr_len = sizeof(client_addr);
    int num;
    Ecore_Con_Server *svr;
    Ecore_Con_Client *cl = NULL;
 
    svr = data;
 
-   if (svr->delete_me || svr->dead) 
+   if (svr->delete_me || svr->dead)
      return ECORE_CALLBACK_RENEW;
 
    if (ecore_main_fd_handler_active_get(fd_handler, ECORE_FD_WRITE))
@@ -2183,7 +2182,7 @@ _ecore_con_svr_udp_handler(void             *data,
 #ifdef _WIN32
    num = fcntl(svr->fd, F_SETFL, O_NONBLOCK);
    if (num >= 0)
-     num = recvfrom(svr->fd, buf, sizeof(buf), 0,
+     num = recvfrom(svr->fd, (char *)buf, sizeof(buf), 0,
                 (struct sockaddr *)&client_addr,
                 &client_addr_len);
 
index ea8ec82..2dac118 100644 (file)
  */
 
 #include <string.h>
-#include <arpa/inet.h>
+
+#ifdef HAVE_ARPA_INET_H
+# include <arpa/inet.h>
+#endif
+
 #include <ares.h>
 
 #include "Ecore.h"
@@ -63,7 +67,7 @@ static Eina_Bool _ecore_con_info_cares_timeout_cb(void *data);
 
 static void
 _ecore_con_info_cares_state_cb(void *data,
-                               int   fd,
+                               ares_socket_t fd,
                                int read,
                                int write);
 static int
@@ -347,7 +351,7 @@ _ecore_con_info_fds_search(const Ecore_Con_FD *fd1,
 
 static void
 _ecore_con_info_cares_state_cb(void *data __UNUSED__,
-                               int   fd,
+                               ares_socket_t fd,
                                int read,
                                int write)
 {
index 95e22fe..b36a74b 100644 (file)
@@ -547,7 +547,7 @@ _ecore_con_ssl_server_init_gnutls(Ecore_Con_Server *svr)
           SSL_ERROR_CHECK_GOTO_ERROR(ret = gnutls_credentials_set(svr->session, GNUTLS_CRD_ANON, svr->anoncred_c));
 
         gnutls_dh_set_prime_bits(svr->session, 512);
-        gnutls_transport_set_ptr(svr->session, (gnutls_transport_ptr_t)svr->fd);
+        gnutls_transport_set_ptr(svr->session, (gnutls_transport_ptr_t)((intptr_t)svr->fd));
         svr->ssl_state = ECORE_CON_SSL_STATE_HANDSHAKING;
 
       case ECORE_CON_SSL_STATE_HANDSHAKING:
@@ -848,7 +848,7 @@ _ecore_con_ssl_client_init_gnutls(Ecore_Con_Client *cl)
         gnutls_certificate_server_set_request(cl->session, GNUTLS_CERT_REQUEST);
 
         gnutls_dh_set_prime_bits(cl->session, 2048);
-        gnutls_transport_set_ptr(cl->session, (gnutls_transport_ptr_t)cl->fd);
+        gnutls_transport_set_ptr(cl->session, (gnutls_transport_ptr_t)((intptr_t)cl->fd));
         cl->ssl_state = ECORE_CON_SSL_STATE_HANDSHAKING;
 
       case ECORE_CON_SSL_STATE_HANDSHAKING:
@@ -1308,6 +1308,7 @@ _ecore_con_ssl_server_read_openssl(Ecore_Con_Server *svr,
 {
    int num;
 
+   if (!svr->ssl) return -1;
    num = SSL_read(svr->ssl, buf, size);
    svr->ssl_err = SSL_get_error(svr->ssl, num);
 
@@ -1460,6 +1461,7 @@ _ecore_con_ssl_client_read_openssl(Ecore_Con_Client *cl,
 {
    int num;
 
+   if (!cl->ssl) return -1;
    num = SSL_read(cl->ssl, buf, size);
    cl->ssl_err = SSL_get_error(cl->ssl, num);
 
index 075b7f0..c90e842 100644 (file)
@@ -1416,7 +1416,7 @@ ecore_con_url_ftp_use_epsv_set(Ecore_Con_Url *url_con,
  */
 EAPI void
 ecore_con_url_ssl_verify_peer_set(Ecore_Con_Url *url_con,
-                              Eina_Bool      verify)
+                                 Eina_Bool      verify)
 {
 #ifdef HAVE_CURL
    if (!ECORE_MAGIC_CHECK(url_con, ECORE_MAGIC_CON_URL))
@@ -1440,6 +1440,55 @@ ecore_con_url_ssl_verify_peer_set(Ecore_Con_Url *url_con,
 }
 
 /**
+ * Set a custom CA to trust for SSL/TLS connections.
+ * 
+ * Specify the path of a file (in PEM format) containing one or more
+ * CA certificate(s) to use for the validation of the server certificate.
+ * 
+ * This function can also disable CA validation if @p ca_path is @c NULL.
+ * However, the server certificate still needs to be valid for the connection
+ * to succeed (i.e., the certificate must concern the server the
+ * connection is made to).
+ * 
+ * @param url_con Connection object that will use the custom CA.
+ * @param ca_path Path to a CA certificate(s) file or @c NULL to disable
+ *                CA validation.
+ * 
+ * @return  @c 0 on success. When cURL is used, non-zero return values
+ *          are equal to cURL error codes.
+ */
+EAPI int
+ecore_con_url_ssl_ca_set(Ecore_Con_Url *url_con, const char *ca_path)
+{
+   int res = -1;
+
+#ifdef HAVE_CURL
+   if (!ECORE_MAGIC_CHECK(url_con, ECORE_MAGIC_CON_URL))
+     {
+       ECORE_MAGIC_FAIL(url_con, ECORE_MAGIC_CON_URL, "ecore_con_url_ssl_ca_set");
+             return -1;
+     }
+
+   if (url_con->active) return -1;
+   if (!url_con->url) return -1;
+   if (ca_path == NULL)
+     res = curl_easy_setopt(url_con->curl_easy, CURLOPT_SSL_VERIFYPEER, 0);
+   else
+     {
+       res = curl_easy_setopt(url_con->curl_easy, CURLOPT_SSL_VERIFYPEER, 1);
+       if (!res)
+         res = curl_easy_setopt(url_con->curl_easy, CURLOPT_CAINFO, ca_path);
+     }
+#else
+   (void)url_con;
+   (void)ca_path;
+#endif
+
+   return res;
+}
+
+
+/**
  * @}
  */
 
@@ -1634,7 +1683,7 @@ _ecore_con_url_read_cb(void  *ptr,
         fclose(stream);
         return CURL_READFUNC_ABORT;
      }
-   else if ((retcode == 0) || (retcode < nitems))
+   else if (retcode == 0)
      {
         fclose((FILE *)stream);
         return 0;
index bc678ff..d45df39 100644 (file)
@@ -202,6 +202,9 @@ struct _Ecore_Evas_Engine
       Ecore_X_XRegion *damages;
       Ecore_X_Sync_Counter sync_counter;
       Ecore_X_Window leader;
+      Ecore_X_Sync_Counter netwm_sync_counter;
+      int            netwm_sync_val_hi;
+      unsigned int   netwm_sync_val_lo;
       int            sync_val; // bigger! this will screw up at 2 billion frames (414 days of continual rendering @ 60fps)
       int            screen_num;
       int            px, py, pw, ph;
@@ -210,6 +213,7 @@ struct _Ecore_Evas_Engine
       unsigned char  managed : 1;
       unsigned char  sync_began : 1;
       unsigned char  sync_cancel : 1;
+      unsigned char  netwm_sync_set : 1;
       struct {
           unsigned char modal : 1;
           unsigned char sticky : 1;
index f479edb..4db59b2 100644 (file)
@@ -57,11 +57,12 @@ _evas_object_associate_del(Evas_Object *obj)
 /* Interceptors Callbacks */
 
 static void
-_ecore_evas_obj_intercept_move(void *data, Evas_Object *obj __UNUSED__, Evas_Coord x, Evas_Coord y)
+_ecore_evas_obj_intercept_move(void *data, Evas_Object *obj, Evas_Coord x, Evas_Coord y)
 {
    Ecore_Evas *ee = data;
    // FIXME: account for frame
    ecore_evas_move(ee, x, y);
+   if (ecore_evas_override_get(ee)) evas_object_move(obj, x, y);
 }
 
 static void
index beb3da9..2f952c3 100644 (file)
@@ -81,7 +81,18 @@ _ecore_evas_x_protocols_set(Ecore_Evas *ee)
    if (ee->func.fn_delete_request)
       protos[num++] = ECORE_X_ATOM_WM_DELETE_WINDOW;
    protos[num++] = ECORE_X_ATOM_NET_WM_PING;
+   protos[num++] = ECORE_X_ATOM_NET_WM_SYNC_REQUEST;
    ecore_x_icccm_protocol_atoms_set(ee->prop.window, protos, num);
+   
+   if (!ee->engine.x.netwm_sync_counter)
+      ee->engine.x.netwm_sync_counter = ecore_x_sync_counter_new(0);
+   ////////
+     {
+        unsigned int tmp = ee->engine.x.netwm_sync_counter;
+        ecore_x_window_prop_card32_set(ee->prop.window, 
+                                       ECORE_X_ATOM_NET_WM_SYNC_REQUEST_COUNTER,
+                                       &tmp, 1);
+     }
 }
 
 static void
@@ -739,6 +750,15 @@ _ecore_evas_x_event_client_message(void *data __UNUSED__, int type __UNUSED__, v
         ee->engine.x.sync_began = 0;
         ee->engine.x.sync_cancel = 1;
      }
+   else if ((e->message_type == ECORE_X_ATOM_WM_PROTOCOLS) &&
+            (e->data.l[0] == (int)ECORE_X_ATOM_NET_WM_SYNC_REQUEST))
+     {
+        ee = ecore_event_window_match(e->win);
+        if (!ee) return ECORE_CALLBACK_PASS_ON; /* pass on event */
+        ee->engine.x.netwm_sync_val_lo = (unsigned int)e->data.l[2];
+        ee->engine.x.netwm_sync_val_hi = (int)e->data.l[3];
+        ee->engine.x.netwm_sync_set = 1;
+     }
    return ECORE_CALLBACK_PASS_ON;
 }
 
@@ -3078,20 +3098,29 @@ _ecore_evas_x_flush_post(void *data, Evas *e __UNUSED__, void *event_info __UNUS
 {
    Ecore_Evas *ee = data;
 
-   if (ee->no_comp_sync) return;
-   if (!_ecore_evas_app_comp_sync) return;
-   if (ee->gl_sync_draw_done) return; // added by gl77.lee
-   if (ee->engine.x.sync_counter)
+   if ((!ee->no_comp_sync) &&
+       (_ecore_evas_app_comp_sync) &&
+       (!ee->gl_sync_draw_done)) // added by gl77.lee
      {
-        if (ee->engine.x.sync_began)
+        if (ee->engine.x.sync_counter)
           {
-             if (!ee->engine.x.sync_cancel)
+             if (ee->engine.x.sync_began)
                {
-                  ecore_x_e_comp_sync_draw_done_send(ee->engine.x.win_root, 
-                                                     ee->prop.window);
+                  if (!ee->engine.x.sync_cancel)
+                    {
+                       ecore_x_e_comp_sync_draw_size_done_send
+                          (ee->engine.x.win_root, ee->prop.window, ee->w, ee->h);
+                    }
                }
           }
      }
+   if (ee->engine.x.netwm_sync_set)
+     {
+        ecore_x_sync_counter_2_set(ee->engine.x.netwm_sync_counter, 
+                                   ee->engine.x.netwm_sync_val_hi, 
+                                   ee->engine.x.netwm_sync_val_lo);
+        ee->engine.x.netwm_sync_set = 0;
+     }
 }
 #endif
 
index c586dbe..49b01d5 100644 (file)
@@ -761,6 +761,8 @@ _ecore_imf_event_free_preedit(void *data __UNUSED__, void *event)
  *
  * ECORE_IMF_EVENT_PREEDIT_START should be added when a new preedit sequence starts.
  *
+ * ECORE_IMF_EVENT_PREEDIT_START should be added when a new preedit sequence starts.
+ *
  * @param ctx An #Ecore_IMF_Context.
  * @ingroup Ecore_IMF_Context_Module_Group
  */
@@ -787,6 +789,8 @@ ecore_imf_context_preedit_start_event_add(Ecore_IMF_Context *ctx)
  *
  * ECORE_IMF_EVENT_PREEDIT_END should be added when a new preedit sequence has been completed or canceled.
  *
+ * ECORE_IMF_EVENT_PREEDIT_END should be added when a new preedit sequence has been completed or canceled.
+ *
  * @param ctx An #Ecore_IMF_Context.
  * @ingroup Ecore_IMF_Context_Module_Group
  */
@@ -882,6 +886,10 @@ _ecore_imf_event_free_delete_surrounding(void *data __UNUSED__, void *event)
  * by adding the ECORE_IMF_EVENT_DELETE_SURROUNDING to the event queue.
  * Note that offset and n_chars are in characters not in bytes.
  *
+ * Asks the widget that the input context is attached to to delete characters around the cursor position 
+ * by adding the ECORE_IMF_EVENT_DELETE_SURROUNDING to the event queue.
+ * Note that offset and n_chars are in characters not in bytes.
+ *
  * @param ctx An #Ecore_IMF_Context.
  * @param offset The start offset of surrounding to be deleted.
  * @param n_chars The number of characters to be deleted.
index 52af19d..9f2c2cc 100644 (file)
@@ -1,6 +1,11 @@
 #ifndef _ECORE_INPUT_H
 #define _ECORE_INPUT_H
 
+#ifdef _WIN32
+# include <stddef.h>
+#else
+# include <inttypes.h>
+#endif
 
 #ifdef EAPI
 # undef EAPI
index 14db3d1..82a440e 100644 (file)
@@ -2305,6 +2305,11 @@ EAPI Ecore_X_Sync_Counter                 ecore_x_e_comp_sync_counter_get(
 EAPI void                                 ecore_x_e_comp_sync_draw_done_send(
    Ecore_X_Window root,
    Ecore_X_Window win);
+EAPI void                                 ecore_x_e_comp_sync_draw_size_done_send(
+   Ecore_X_Window root,
+   Ecore_X_Window win,
+   int w,
+   int h);
 EAPI void                                 ecore_x_e_comp_sync_supported_set(
    Ecore_X_Window root,
    Eina_Bool      enabled);
@@ -2346,7 +2351,11 @@ EAPI void                                 ecore_x_sync_counter_inc(
 EAPI void                                 ecore_x_sync_counter_val_wait(
    Ecore_X_Sync_Counter counter,
    int                  val);
-
+   
+   EAPI void ecore_x_sync_counter_set(Ecore_X_Sync_Counter counter, int val);
+   EAPI void ecore_x_sync_counter_2_set(Ecore_X_Sync_Counter counter, int val_hi, unsigned int val_lo);
+   EAPI Eina_Bool ecore_x_sync_counter_2_query(Ecore_X_Sync_Counter counter, int *val_hi, unsigned int *val_lo);
+   
 EAPI void                                 ecore_x_xinerama_query_screens_prefetch(
    void);
 EAPI void                                 ecore_x_xinerama_query_screens_fetch(void);
index f31135b..f4375a1 100644 (file)
@@ -877,7 +877,7 @@ ecore_x_e_comp_sync_draw_done_send(Ecore_X_Window root, Ecore_X_Window win)
    xev.xclient.message_type = ECORE_X_ATOM_E_COMP_SYNC_DRAW_DONE;
    xev.xclient.format = 32;
    xev.xclient.data.l[0] = win;
-   xev.xclient.data.l[1] = 0; // later
+   xev.xclient.data.l[1] = 0; // version
    xev.xclient.data.l[2] = 0; // later
    xev.xclient.data.l[3] = 0; // later
    xev.xclient.data.l[4] = 0; // later
@@ -888,6 +888,31 @@ ecore_x_e_comp_sync_draw_done_send(Ecore_X_Window root, Ecore_X_Window win)
 } /* ecore_x_e_comp_sync_draw_done_send */
 
 EAPI void
+ecore_x_e_comp_sync_draw_size_done_send(Ecore_X_Window root, Ecore_X_Window win, int w, int h)
+{
+   XEvent xev;
+
+   LOGFN(__FILE__, __LINE__, __FUNCTION__);
+   if (!root)
+      root = DefaultRootWindow(_ecore_x_disp);
+
+   xev.xclient.type = ClientMessage;
+   xev.xclient.display = _ecore_x_disp;
+   xev.xclient.window = win;
+   xev.xclient.message_type = ECORE_X_ATOM_E_COMP_SYNC_DRAW_DONE;
+   xev.xclient.format = 32;
+   xev.xclient.data.l[0] = win;
+   xev.xclient.data.l[1] = 1; // version
+   xev.xclient.data.l[2] = w; // win width at draw time
+   xev.xclient.data.l[3] = h; // win height at draw time
+   xev.xclient.data.l[4] = 0; // later
+
+   XSendEvent(_ecore_x_disp, root, False,
+              SubstructureRedirectMask | SubstructureNotifyMask,
+              &xev);
+} /* ecore_x_e_comp_sync_draw_done_send */
+
+EAPI void
 ecore_x_e_comp_sync_supported_set(Ecore_X_Window root, Eina_Bool enabled)
 {
    Ecore_X_Window win;
index c232d95..3a8b2c0 100644 (file)
@@ -28,7 +28,7 @@ static Window _ecore_x_mouse_down_last_event_win = 0;
 static Window _ecore_x_mouse_down_last_last_event_win = 0;
 static Time _ecore_x_mouse_down_last_time = 0;
 static Time _ecore_x_mouse_down_last_last_time = 0;
-static int _ecore_x_mouse_up_count = 0;
+// static int _ecore_x_mouse_up_count = 0;
 static int _ecore_x_mouse_down_did_double = 0;
 static int _ecore_x_mouse_down_did_triple = 0;
 static int _ecore_x_last_event_mouse_move = 0;
@@ -439,11 +439,16 @@ _ecore_mouse_button(int          event,
           }
               
      }
-   
+
+   /* NB: Block commented out as _ecore_x_mouse_up_count appears to have 
+    * no use. The variable is also commented out above. This code block is 
+    * the only place that this variable is used, and appears to serve no 
+    * purpose. - dh
    if (event == ECORE_EVENT_MOUSE_BUTTON_DOWN
        && !e->double_click
        && !e->triple_click)
       _ecore_x_mouse_up_count = 0;
+    */
 
    e->multi.device = dev;
    e->multi.radius = (radx + rady) / 2;
@@ -1394,8 +1399,6 @@ _ecore_x_event_handle_selection_request(XEvent *xevent)
                                            xevent->xselectionrequest.time);
           }
      }
-
-   return;
 } /* _ecore_x_event_handle_selection_request */
 
 void
index 540ade4..28276e5 100644 (file)
@@ -114,3 +114,38 @@ ecore_x_sync_counter_val_wait(Ecore_X_Sync_Counter counter, int val)
 //   XSync(_ecore_x_disp, False); // dont need this
 } /* ecore_x_sync_counter_val_wait */
 
+EAPI void
+ecore_x_sync_counter_set(Ecore_X_Sync_Counter counter, int val)
+{
+   XSyncValue v;
+   
+   LOGFN(__FILE__, __LINE__, __FUNCTION__);
+   XSyncIntToValue(&v, val);
+   XSyncSetCounter(_ecore_x_disp, counter, v);
+}
+
+EAPI void
+ecore_x_sync_counter_2_set(Ecore_X_Sync_Counter counter, int val_hi, unsigned int val_lo)
+{
+   XSyncValue v;
+   
+   LOGFN(__FILE__, __LINE__, __FUNCTION__);
+   XSyncIntsToValue(&v, val_lo, val_hi);
+   XSyncSetCounter(_ecore_x_disp, counter, v);
+}
+
+EAPI Eina_Bool
+ecore_x_sync_counter_2_query(Ecore_X_Sync_Counter counter, int *val_hi, unsigned int *val_lo)
+{
+   XSyncValue value;
+
+   LOGFN(__FILE__, __LINE__, __FUNCTION__);
+   if (XSyncQueryCounter(_ecore_x_disp, counter, &value))
+     {
+        *val_lo = (unsigned int)XSyncValueLow32(value);
+        *val_hi = (int)XSyncValueHigh32(value);
+        return EINA_TRUE;
+     }
+   return EINA_FALSE;
+}
+
index dcbd133..18b1385 100644 (file)
@@ -39,7 +39,7 @@ ecore_x_xinerama_screen_count_get(void)
 } /* ecore_x_xinerama_screen_count_get */
 
 EAPI Eina_Bool
-ecore_x_xinerama_screen_geometry_get(int screen __UNUSED__, int *x, int *y, int *w, int *h)
+ecore_x_xinerama_screen_geometry_get(int screen, int *x, int *y, int *w, int *h)
 {
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
 #ifdef ECORE_XINERAMA
@@ -82,5 +82,6 @@ ecore_x_xinerama_screen_geometry_get(int screen __UNUSED__, int *x, int *y, int
       *h = DisplayHeight(_ecore_x_disp, 0);
 
    return EINA_FALSE;
+   screen = 0;
 } /* ecore_x_xinerama_screen_geometry_get */