Samsung SAIT <tbd>
Nicolas Aguirre <aguirre.nicolas@gmail.com>
Brett Nash <nash@nash.id.au>
-Mike Blumenkrantz <mike@zentific.com>
+Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Leif Middelschulte <leif.middelschulte@gmail.com>
Mike McCormack <mj.mccormack@samsung.com>
Sangho Park <gouache95@gmail.com>
* 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-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
2011-11-02 Bluezery
- * Fix return error handling in ecore_file_download when
+ * Fix return error handling in ecore_file_download when
ecore_con_url_get() fails.
+
+2011-11-20 Vincent Torri
+
+ * Ecore_Win32, Ecore_WinCE: fix Shift, Control and Alt keys
+ detection
+ * Ecore_Win32: fix "mouse-down inside and mouse-up outside" issue
+
+2011-11-2 Carsten Haitzler (The Rasterman)
+
+ * Fix bug ecore-evas for fb, buffer, sdl back-ends to ensure
+ mouse is in on init (as events wont always give this) and focus
+ is set on show if appropriate if no focus in/out events come
+ from the back-end later
+ * Fix setting override state to only hide if it should be
+ visible at that point in x back end support
+
+2011-11-24 Rafael Antognolli
+
+ * Add ecore_fb_input_device_window_set().
+
+2011-11-27 Vincent Torri
+
+ * Fix and improve key management on Windows XP
- ecore_con_server_fd_get()
- ecore_con_client_fd_get()
- ECORE_CON_EVENT_CLIENT_WRITE, ECORE_CON_EVENT_SERVER_WRITE events
-
+
* ecore_evas:
- ecore_evas_screen_geometry_get()
- ecore_cocoa_evas support
* bug in ecore_evas when setting modifiers for sub buffer canvases
* NULL pointer dereference in ecore_x selection notification code
* sync GNUTLS thread activation with eina changes
- * ecore_ipc compilation on windows
+ * ecore_ipc compilation on Windows
+ * fix Shift, Control and Alt keys detection on Windows
+ * "mouse-down inside and mouse-up outside" issue on Windows
* ecore_x shadow tree search fixed to respect shape input of windows
* fd handlers fixed when idler callbacks add jobs or events
* ecore_x_selection_convert takes length into account
* use current size not requested size when getting geom in ecore-evas
* ecore_cocoa now handles windows correctly
* ecore_file_download error handling when ecore_con_url_get fails
+ * focus and mouse-in ininital siate on some ecore-evas back-ends
Improvements:
* ecore_evas now is able to send render-done even if not syncing to comp
* more safety checks in ecore_con ares support
* ecore timer monotonic clock now supported on OSX
- * make ecore_con work on windows
+ * make ecore_con work on Windows
+ * improve resize/move on Windows
+ * improve keyboard management on Windows XP
* refactored _ecore_main_loop_iterate_internal
* better safety with ecore_evas_ecore_evas_get
* ecore-evas produces more errors on stderr when errors happen now
* inet_ntop instead of getnameinfo for ecore_con_client_get_ip
* ecore-con unit tests added
* ecore-evas fb uses ecore_input_evas now instead of going direct
+ * fix ecore-evas x changing of override support if window not shown yet
Removals:
msgstr ""
"Project-Id-Version: Ecore\n"
"Report-Msgid-Bugs-To: enlightenment-devel@lists.sourceforge.net\n"
-"POT-Creation-Date: 2011-11-03 10:51+0900\n"
-"PO-Revision-Date: 2009-12-15 00:56+0200\n"
-"Last-Translator: Giorgos Koutsikos <ragecryx@yahoo.gr>\n"
+"POT-Creation-Date: 2011-11-15 18:22+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"
"Language: \n"
"MIME-Version: 1.0\n"
#: src/lib/ecore/ecore_getopt.c:781
#, c-format
msgid "ERROR: unknown option --%s.\n"
-msgstr "ΣΦΑΛΜΑ: άγνωστη παράμετρος --%s.\n"
+msgstr "ΣΦΑΛΜΑ: άγνωστη επιλογή --%s.\n"
#: src/lib/ecore/ecore_getopt.c:783
#, c-format
msgid "ERROR: unknown option -%c.\n"
-msgstr "ΣΦΑΛΜΑ: άγνωστη παράμετρος -%c.\n"
+msgstr "ΣΦΑΛΜΑ: άγνωστη επιλογή -%c.\n"
#: src/lib/ecore/ecore_getopt.c:841
msgid "ERROR: "
msgstr "ΣΦΑΛΜΑ:"
-#: src/lib/ecore/ecore_getopt.c:924 src/lib/ecore/ecore_getopt.c:1061
-#: src/lib/ecore/ecore_getopt.c:1077 src/lib/ecore/ecore_getopt.c:1092
-#: src/lib/ecore/ecore_getopt.c:1109 src/lib/ecore/ecore_getopt.c:1156
-#: src/lib/ecore/ecore_getopt.c:1276 src/lib/ecore/ecore_getopt.c:1317
+#: src/lib/ecore/ecore_getopt.c:924
+#: src/lib/ecore/ecore_getopt.c:1061
+#: src/lib/ecore/ecore_getopt.c:1077
+#: src/lib/ecore/ecore_getopt.c:1092
+#: src/lib/ecore/ecore_getopt.c:1109
+#: src/lib/ecore/ecore_getopt.c:1156
+#: src/lib/ecore/ecore_getopt.c:1276
+#: src/lib/ecore/ecore_getopt.c:1317
msgid "value has no pointer set.\n"
msgstr "η τιμή δεν έχει δείκτη ορισμένο.\n"
-#: src/lib/ecore/ecore_getopt.c:956 src/lib/ecore/ecore_getopt.c:1176
+#: src/lib/ecore/ecore_getopt.c:956
+#: src/lib/ecore/ecore_getopt.c:1176
#, c-format
msgid "unknown boolean value %s.\n"
msgstr "άγνωστη τιμή boolean %s.\n"
-#: src/lib/ecore/ecore_getopt.c:1007 src/lib/ecore/ecore_getopt.c:1264
+#: src/lib/ecore/ecore_getopt.c:1007
+#: src/lib/ecore/ecore_getopt.c:1264
#, c-format
msgid "invalid number format %s\n"
msgstr "άγνωστη μορφή αριθμού %s\n"
#: src/lib/ecore/ecore_getopt.c:1122
#, c-format
msgid "invalid choice \"%s\". Valid values are: "
-msgstr "μη-έγκυρη επιλογή \"%s\". Οι τιμές είναι: "
+msgstr "μη έγκυρη επιλογή \"%s\". Οι έγκυρες τιμές είναι: "
#: src/lib/ecore/ecore_getopt.c:1150
msgid "missing parameter to append.\n"
#: src/lib/ecore/ecore_getopt.c:1254
msgid "could not parse value.\n"
-msgstr ""
+msgstr "αδυναμία ανάλυσης τιμών.\n"
#: src/lib/ecore/ecore_getopt.c:1311
msgid "missing parameter.\n"
#: src/lib/ecore/ecore_getopt.c:1324
msgid "missing callback function!\n"
-msgstr ""
+msgstr "λείπει η λειτουργία επανάκλησης!\n"
#: src/lib/ecore/ecore_getopt.c:1353
msgid "no version was defined.\n"
#: src/lib/ecore/ecore_getopt.c:1462
#, c-format
msgid "ERROR: unknown option --%s, ignored.\n"
-msgstr ""
+msgstr "ΣΦΑΛΜΑ:άγνωστη επιλογή --%s, αγνοήθηκε.\n"
#: src/lib/ecore/ecore_getopt.c:1495
#, c-format
msgid "ERROR: option --%s requires an argument!\n"
-msgstr ""
+msgstr "ΣΦΑΛΜΑ: η επιλογή --%s απαιτεί παραμέτρους!\n"
#: src/lib/ecore/ecore_getopt.c:1537
#, c-format
msgid "ERROR: unknown option -%c, ignored.\n"
-msgstr ""
+msgstr "ΣΦΑΛΜΑ: άγνωστη επιλογή -%c, αγνοήθηκε.\n"
#: src/lib/ecore/ecore_getopt.c:1575
#, c-format
msgid "ERROR: option -%c requires an argument!\n"
-msgstr ""
+msgstr "ΣΦAΛΜΑ: η επιλογή -%c απαιτεί μία παράμετρο!\n"
#: src/lib/ecore/ecore_getopt.c:1784
+#, fuzzy
msgid "ERROR: no parser provided.\n"
-msgstr ""
+msgstr "ΣΦΑΛΜΑ:δεν παρέχεται αναλυτής.\n"
#: src/lib/ecore/ecore_getopt.c:1789
msgid "ERROR: no values provided.\n"
-msgstr ""
+msgstr "ΣΦΑΛΜΑ:δεν έχουν δοθεί τιμές.\n"
#: src/lib/ecore/ecore_getopt.c:1798
msgid "ERROR: no arguments provided.\n"
-msgstr ""
+msgstr "ΣΦΑΛΜΑ:δεν έχουν δοθεί παράμετροι.\n"
#: src/lib/ecore/ecore_getopt.c:1824
msgid "ERROR: invalid options found."
-msgstr ""
+msgstr "ΣΦΑΛΜΑ: βρέθηκαν μη έγκυρες επιλογές."
#: src/lib/ecore/ecore_getopt.c:1830
#, c-format
msgid " See --%s.\n"
-msgstr " Δες --%s.\n"
+msgstr " Δείτε --%s.\n"
#: src/lib/ecore/ecore_getopt.c:1832
#, c-format
msgid " See -%c.\n"
-msgstr " Δες -%c.\n"
+msgstr " Δείτε -%c.\n"
#: src/lib/ecore/ecore_getopt.c:1873
#, c-format
msgid "ERROR: incorrect geometry value '%s'\n"
-msgstr ""
+msgstr "ΣΦΑΛΜΑ: μη έγκυρη γεωμετρική τιμή '%s'\n"
#: src/lib/ecore/ecore_getopt.c:1900
#, c-format
msgid "ERROR: incorrect size value '%s'\n"
-msgstr ""
+msgstr "ΣΦΑΛΜΑ: μη έγκυρη τιμή μεγέθους '%s'\n"
#~ msgid ""
#~ "\n"
ECORE_CONFIG_LIB =
endif
+if EFL_ENABLE_TESTS
+ECORE_TEST_PROG = ecore_test
+endif
+
AM_CPPFLAGS = \
-I$(top_srcdir)/src/lib/ecore \
-I$(top_srcdir)/src/lib/ecore_config \
-DPACKAGE_DATA_DIR=\"$(datadir)/$(PACKAGE)\" \
@EINA_CFLAGS@ @EVAS_CFLAGS@
-bin_PROGRAMS = $(ECORE_CONFIG_PROG) ecore_test
+bin_PROGRAMS = $(ECORE_CONFIG_PROG) $(ECORE_TEST_PROG)
ecore_config_SOURCES = \
ecore_config.c
@author Samsung SAIT
@author Nicolas Aguirre <aguirre.nicolas@gmail.com>
@author Brett Nash <nash@nash.id.au>
- @author Mike Blumenkrantz <mike@zentific.com>
+ @author Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
@author Leif Middelschulte <leif.middelschulte@gmail.com>
@author Mike McCormack <mj.mccormack@samsung.com>
@author Sangho Park <gouache95@gmail.com>
*metavarlen = maxsize - 1;
for (i = 0; i < *metavarlen; i++)
- metavar[i] = toupper(desc->longname[i]);
+ metavar[i] = toupper((int) desc->longname[i]);
metavar[i] = '\0';
}
}
/* The result tells us the type of event we have. */
if (result == WAIT_FAILED)
{
- char *msg;
+ char *m;
- msg = evil_last_error_get();
- ERR(" * %s\n", msg);
- free(msg);
+ m = evil_last_error_get();
+ ERR(" * %s\n", m);
+ free(m);
res = -1;
}
else if (result == WAIT_TIMEOUT)
#include "Ecore.h"
#include "ecore_private.h"
+#ifdef _WIN32
+# define FMT_SSIZE_T "%Id"
+#else
+# define FMT_SSIZE_T "%zd"
+#endif
+
/* How of then we should retry to write to the pipe */
#define ECORE_PIPE_WRITE_RETRY 6
;
else
{
- ERR("An unhandled error (ret: %zd errno: %d)"
+ ERR("An unhandled error (ret: " FMT_SSIZE_T " errno: %d)"
"occurred while writing to the pipe the length",
ret, errno);
}
;
else
{
- ERR("An unhandled error (ret: %zd errno: %d)"
+ ERR("An unhandled error (ret: " FMT_SSIZE_T " errno: %d)"
"occurred while writing to the pipe the length",
ret, errno);
}
static Ecore_Pthread_Worker *
_ecore_thread_worker_new(void)
{
+#ifdef EFL_HAVE_THREADS
Ecore_Pthread_Worker *result;
-#ifdef EFL_HAVE_THREADS
result = eina_trash_pop(&_ecore_thread_worker_trash);
if (!result) result = malloc(sizeof (Ecore_Pthread_Worker));
((Ecore_Pthread_Worker *)thread)->cancel = EINA_TRUE;
return EINA_FALSE;
#else
+ (void) thread;
return EINA_TRUE;
#endif
}
EAPI int
ecore_thread_pending_get(void)
{
- int ret;
#ifdef EFL_HAVE_THREADS
+ int ret;
+
LKL(_ecore_pending_job_threads_mutex);
ret = eina_list_count(_ecore_pending_job_threads);
LKU(_ecore_pending_job_threads_mutex);
EAPI int
ecore_thread_pending_feedback_get(void)
{
- int ret;
#ifdef EFL_HAVE_THREADS
+ int ret;
+
LKL(_ecore_pending_job_threads_mutex);
ret = eina_list_count(_ecore_pending_job_threads_feedback);
LKU(_ecore_pending_job_threads_mutex);
EAPI int
ecore_thread_pending_total_get(void)
{
- int ret;
#ifdef EFL_HAVE_THREADS
+ int ret;
+
LKL(_ecore_pending_job_threads_mutex);
ret = eina_list_count(_ecore_pending_job_threads) + eina_list_count(_ecore_pending_job_threads_feedback);
LKU(_ecore_pending_job_threads_mutex);
EAPI int
ecore_thread_available_get(void)
{
- int ret;
#ifdef EFL_HAVE_THREADS
+ int ret;
+
LKL(_ecore_pending_job_threads_mutex);
ret = _ecore_thread_count_max - _ecore_thread_count;
LKU(_ecore_pending_job_threads_mutex);
Eina_Free_Cb cb,
Eina_Bool direct)
{
+#ifdef EFL_HAVE_THREADS
Ecore_Pthread_Worker *worker = (Ecore_Pthread_Worker *)thread;
Ecore_Thread_Data *d;
Eina_Bool ret;
+#endif
if ((!thread) || (!key) || (!value))
return EINA_FALSE;
CDB(worker->cond);
return ret;
#else
- return EINA_TRUE;
+ (void) cb;
+ (void) direct;
+ return EINA_FALSE;
#endif
}
void *value,
Eina_Free_Cb cb)
{
+#ifdef EFL_HAVE_THREADS
Ecore_Pthread_Worker *worker = (Ecore_Pthread_Worker *)thread;
Ecore_Thread_Data *d, *r;
void *ret;
+#endif
+
if ((!thread) || (!key) || (!value))
return NULL;
#ifdef EFL_HAVE_THREADS
free(r);
return ret;
#else
+ (void) cb;
return NULL;
#endif
}
ecore_thread_local_data_find(Ecore_Thread *thread,
const char *key)
{
+#ifdef EFL_HAVE_THREADS
Ecore_Pthread_Worker *worker = (Ecore_Pthread_Worker *)thread;
Ecore_Thread_Data *d;
+#endif
if ((!thread) || (!key))
return NULL;
ecore_thread_local_data_del(Ecore_Thread *thread,
const char *key)
{
+#ifdef EFL_HAVE_THREADS
Ecore_Pthread_Worker *worker = (Ecore_Pthread_Worker *)thread;
+#endif
+
if ((!thread) || (!key))
return EINA_FALSE;
#ifdef EFL_HAVE_THREADS
Eina_Free_Cb cb,
Eina_Bool direct)
{
- Eina_Bool ret;
+#ifdef EFL_HAVE_THREADS
Ecore_Thread_Data *d;
+ Eina_Bool ret;
+#endif
if ((!key) || (!value))
return EINA_FALSE;
CDB(_ecore_thread_global_hash_cond);
return ret;
#else
+ (void) cb;
+ (void) direct;
return EINA_TRUE;
#endif
}
void *value,
Eina_Free_Cb cb)
{
+#ifdef EFL_HAVE_THREADS
Ecore_Thread_Data *d, *r;
void *ret;
+#endif
if ((!key) || (!value))
return NULL;
free(r);
return ret;
#else
+ (void) cb;
return NULL;
#endif
}
EAPI void *
ecore_thread_global_data_find(const char *key)
{
+#ifdef EFL_HAVE_THREADS
Ecore_Thread_Data *ret;
+#endif
+
if (!key)
return NULL;
#ifdef EFL_HAVE_THREADS
EAPI Eina_Bool
ecore_thread_global_data_del(const char *key)
{
+#ifdef EFL_HAVE_THREADS
Eina_Bool ret;
+#endif
if (!key)
return EINA_FALSE;
ecore_thread_global_data_wait(const char *key,
double seconds)
{
+#ifdef EFL_HAVE_THREADS
double tm = 0;
Ecore_Thread_Data *ret = NULL;
+#endif
if (!key)
return NULL;
if (ret) return ret->data;
return NULL;
#else
+ (void) seconds;
return NULL;
#endif
}
Ecore_Con_Client *cl;
double t_start, t;
+ if (svr->event_count) return;
+
while (svr->infos)
{
ecore_con_info_data_clear(svr->infos->data);
return;
}
- if (svr->event_count) return;
- ECORE_MAGIC_SET(svr, ECORE_MAGIC_NONE);
t_start = ecore_time_get();
while (svr->buf && (!svr->dead))
{
#ifdef _WIN32
ecore_con_local_win32_server_del(svr);
#endif
+ if (svr->event_count) return;
+ ECORE_MAGIC_SET(svr, ECORE_MAGIC_NONE);
if (svr->buf)
eina_binbuf_free(svr->buf);
}
- ECORE_MAGIC_SET(cl, ECORE_MAGIC_NONE);
t_start = ecore_time_get();
while ((cl->buf) && (!cl->dead))
{
ecore_con_local_win32_client_del(cl);
#endif
+ if (cl->event_count) return;
+ ECORE_MAGIC_SET(cl, ECORE_MAGIC_NONE);
+
free(cl->buf);
if (cl->host_server->type & ECORE_CON_SSL)
SSL_ERROR_CHECK_GOTO_ERROR(ret = gnutls_certificate_allocate_credentials(&svr->cert));
- if ((!svr->use_cert) && svr->created)
- {
- SSL_ERROR_CHECK_GOTO_ERROR(ret = gnutls_dh_params_init(&svr->dh_params));
- INF("Generating DH params");
- SSL_ERROR_CHECK_GOTO_ERROR(ret = gnutls_dh_params_generate2(svr->dh_params, 1024));
-
- SSL_ERROR_CHECK_GOTO_ERROR(ret = gnutls_anon_allocate_server_credentials(&svr->anoncred_s));
- /* TODO: implement PSK */
- // SSL_ERROR_CHECK_GOTO_ERROR(ret = gnutls_psk_allocate_server_credentials(&svr->pskcred_s));
-
- gnutls_anon_set_server_dh_params(svr->anoncred_s, svr->dh_params);
- gnutls_certificate_set_dh_params(svr->cert, svr->dh_params);
- //gnutls_psk_set_server_dh_params(svr->pskcred_s, svr->dh_params);
- INF("DH params successfully generated and applied!");
- }
- else if (!svr->use_cert)
+ if (svr->use_cert)
{
- //SSL_ERROR_CHECK_GOTO_ERROR(ret = gnutls_psk_allocate_client_credentials(&svr->pskcred_c));
- SSL_ERROR_CHECK_GOTO_ERROR(ret = gnutls_anon_allocate_client_credentials(&svr->anoncred_c));
+ if (svr->created)
+ {
+ SSL_ERROR_CHECK_GOTO_ERROR(ret = gnutls_dh_params_init(&svr->dh_params));
+ INF("Generating DH params");
+ SSL_ERROR_CHECK_GOTO_ERROR(ret = gnutls_dh_params_generate2(svr->dh_params, 1024));
+
+ SSL_ERROR_CHECK_GOTO_ERROR(ret = gnutls_anon_allocate_server_credentials(&svr->anoncred_s));
+ /* TODO: implement PSK */
+ // SSL_ERROR_CHECK_GOTO_ERROR(ret = gnutls_psk_allocate_server_credentials(&svr->pskcred_s));
+
+ gnutls_anon_set_server_dh_params(svr->anoncred_s, svr->dh_params);
+ gnutls_certificate_set_dh_params(svr->cert, svr->dh_params);
+ //gnutls_psk_set_server_dh_params(svr->pskcred_s, svr->dh_params);
+ INF("DH params successfully generated and applied!");
+ }
+ else
+ {
+ //SSL_ERROR_CHECK_GOTO_ERROR(ret = gnutls_psk_allocate_client_credentials(&svr->pskcred_c));
+ SSL_ERROR_CHECK_GOTO_ERROR(ret = gnutls_anon_allocate_client_credentials(&svr->anoncred_c));
+ }
}
svr->ssl_prepared = EINA_TRUE;
gnutls_deinit(svr->session);
}
- if (svr->cert_file)
- free(svr->cert_file);
+ free(svr->cert_file);
svr->cert_file = NULL;
if (svr->cert)
gnutls_certificate_free_credentials(svr->cert);
return _ecore_evas_init_count;
}
+static void
+_ecore_evas_show(Ecore_Evas *ee)
+{
+ if (ee->engine.buffer.image) return;
+ if (ee->prop.focused) return;
+ ee->prop.focused = 1;
+ evas_focus_in(ee->evas);
+ if (ee->func.fn_focus_in) ee->func.fn_focus_in(ee);
+}
+
int
_ecore_evas_buffer_render(Ecore_Evas *ee)
{
NULL,
NULL,
NULL,
- NULL,
+ _ecore_evas_show,
NULL,
NULL,
NULL,
ee->engine.func->fn_render = _ecore_evas_buffer_render;
_ecore_evas_register(ee);
+ evas_event_feed_mouse_in(ee->evas, (unsigned int)((unsigned long long)(ecore_time_get() * 1000.0) & 0xffffffff), NULL);
+
return ee;
#else
return NULL;
ee = _ecore_evas_cocoa_match();
- if (!ee) return 1;
+ if (!ee) return ECORE_CALLBACK_PASS_ON;
ee->prop.focused = 1;
-
- return 0;
+ evas_focus_in(ee->evas);
+ if (ee->func.fn_focus_in) ee->func.fn_focus_in(ee);
+
+ return ECORE_CALLBACK_PASS_ON;
}
static int
ee = _ecore_evas_cocoa_match();
- if (!ee) return 1;
+ if (!ee) return ECORE_CALLBACK_PASS_ON;
+ evas_focus_out(ee->evas);
ee->prop.focused = 0;
+ if (ee->func.fn_focus_out) ee->func.fn_focus_out(ee);
- return 0;
+ return ECORE_CALLBACK_PASS_ON;
}
static int
return 0;*/
DBG("Video Resize");
-
+ return ECORE_CALLBACK_PASS_ON;
}
static int
ee = _ecore_evas_cocoa_match();
- if (!ee) return 1;
+ if (!ee) return ECORE_CALLBACK_PASS_ON;
evas_output_size_get(ee->evas, &w, &h);
evas_damage_rectangle_add(ee->evas, 0, 0, w, h);
- return 0;
+ return ECORE_CALLBACK_PASS_ON;
}
static int
evas_norender(ee->evas);
}
- return 1;
+ return EINA_TRUE;
}
static int
_ecore_evas_register(ee);
ecore_event_window_register(0, ee, ee->evas, NULL, NULL, NULL, NULL);
+ evas_event_feed_mouse_in(ee->evas, (unsigned int)((unsigned long long)(ecore_time_get() * 1000.0) & 0xffffffff), NULL);
printf("Ecore Evas returned : %p\n", ee);
return ee;
e = event;
ee = _ecore_evas_fb_match();
- if (!ee) return EINA_TRUE; /* pass on event */
+ if (!ee) return ECORE_CALLBACK_PASS_ON;
_ecore_evas_mouse_move_process_fb(ee, e->x, e->y);
- return EINA_TRUE; /* dont pass it on */
+ return ECORE_CALLBACK_PASS_ON;
}
static Eina_Bool
e = event;
ee = _ecore_evas_fb_match();
- if (!ee) return EINA_TRUE; /* pass on event */
+ if (!ee) return ECORE_CALLBACK_PASS_ON;
_ecore_evas_mouse_move_process_fb(ee, e->x, e->y);
- return EINA_TRUE; /* dont pass it on */
+ return ECORE_CALLBACK_PASS_ON;
}
static Eina_Bool
e = event;
ee = _ecore_evas_fb_match();
- if (!ee) return EINA_TRUE; /* pass on event */
+ if (!ee) return ECORE_CALLBACK_PASS_ON;
_ecore_evas_mouse_move_process_fb(ee, e->x, e->y);
- return EINA_TRUE; /* dont pass it on */
+ return ECORE_CALLBACK_PASS_ON;
}
static Eina_Bool
e = event;
ee = _ecore_evas_fb_match();
- if (!ee) return EINA_TRUE; /* pass on event */
+ if (!ee) return ECORE_CALLBACK_PASS_ON;
_ecore_evas_mouse_move_process_fb(ee, e->x, e->y);
- return EINA_TRUE; /* dont pass it on */
+ return ECORE_CALLBACK_PASS_ON;
}
static int
continue;
snprintf(device_path, 256, "/dev/input/%s", input_entry->d_name);
- if (!(device = ecore_fb_input_device_open(ee, device_path)))
+ if (!(device = ecore_fb_input_device_open(device_path)))
continue;
+ ecore_fb_input_device_window_set(device, ee);
caps = ecore_fb_input_device_cap_get(device);
{
if (ecore_fb_ts_init())
{
+ ecore_fb_ts_event_window_set(ee);
ecore_evas_event_handlers[0] = ecore_event_handler_add(ECORE_EVENT_MOUSE_BUTTON_DOWN, _ecore_evas_event_mouse_button_down, NULL);
ecore_evas_event_handlers[1] = ecore_event_handler_add(ECORE_EVENT_MOUSE_BUTTON_UP, _ecore_evas_event_mouse_button_up, NULL);
ecore_evas_event_handlers[2] = ecore_event_handler_add(ECORE_EVENT_MOUSE_MOVE, _ecore_evas_event_mouse_move, NULL);
}
static void
+_ecore_evas_show(Ecore_Evas *ee)
+{
+ if (ee->prop.focused) return;
+ ee->prop.focused = 1;
+ evas_focus_in(ee->evas);
+ if (ee->func.fn_focus_in) ee->func.fn_focus_in(ee);
+}
+
+static void
_ecore_evas_object_cursor_del(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
{
Ecore_Evas *ee;
_ecore_evas_move_resize,
_ecore_evas_rotation_set,
NULL,
- NULL,
+ _ecore_evas_show,
NULL,
NULL,
NULL,
ee->engine.func->fn_render = _ecore_evas_fb_render;
_ecore_evas_register(ee);
fb_ee = ee;
-
evas_event_feed_mouse_in(ee->evas, (unsigned int)((unsigned long long)(ecore_time_get() * 1000.0) & 0xffffffff), NULL);
- evas_focus_in(ee->evas);
-
return ee;
}
#else
if (!ee) return ECORE_CALLBACK_PASS_ON;
/* pass on event */
ee->prop.focused = 1;
-
- return ECORE_CALLBACK_DONE;
+ evas_focus_in(ee->evas);
+ if (ee->func.fn_focus_in) ee->func.fn_focus_in(ee);
+
+ return ECORE_CALLBACK_PASS_ON;
}
static Eina_Bool
if (!ee) return ECORE_CALLBACK_PASS_ON;
/* pass on event */
+ evas_focus_out(ee->evas);
ee->prop.focused = 0;
-
- return ECORE_CALLBACK_DONE;
+ if (ee->func.fn_focus_out) ee->func.fn_focus_out(ee);
+
+ return ECORE_CALLBACK_PASS_ON;
}
static Eina_Bool
evas_output_size_get(ee->evas, &w, &h);
evas_damage_rectangle_add(ee->evas, 0, 0, w, h);
- return ECORE_CALLBACK_DONE;
+ return ECORE_CALLBACK_PASS_ON;
}
static Eina_Bool
if (!ee) return ECORE_CALLBACK_PASS_ON;
ecore_event_evas_modifier_lock_update(ee->evas, e->modifiers);
- return ECORE_CALLBACK_DONE;
+ return ECORE_CALLBACK_PASS_ON;
}
static int
}
static void
+_ecore_evas_show(Ecore_Evas *ee)
+{
+ if (ee->prop.focused) return;
+ ee->prop.focused = 1;
+ evas_focus_in(ee->evas);
+ if (ee->func.fn_focus_in) ee->func.fn_focus_in(ee);
+}
+
+static void
_ecore_evas_screen_geometry_get(const Ecore_Evas *ee __UNUSED__, int *x, int *y, int *w, int *h)
{
if (x) *x = 0;
_ecore_evas_move_resize,
NULL,
NULL,
- NULL,
+ _ecore_evas_show,
NULL,
NULL,
NULL,
psl1ght_ee = ee;
- evas_event_feed_mouse_in(ee->evas, _ecore_evas_time_get (), NULL);
- evas_focus_in(ee->evas);
_ecore_evas_screen_resized (ee);
if (getenv("ECORE_EVAS_PSL1GHT_CURSOR_PATH"))
ecore_evas_cursor_set(ee, getenv("ECORE_EVAS_PSL1GHT_CURSOR_PATH"), EVAS_LAYER_MAX, 0, 0);
+ evas_event_feed_mouse_in(ee->evas, (unsigned int)((unsigned long long)(ecore_time_get() * 1000.0) & 0xffffffff), NULL);
+
return ee;
}
if (!ee) return ECORE_CALLBACK_PASS_ON;
/* pass on event */
ee->prop.focused = 1;
-
- return ECORE_CALLBACK_DONE;
+ evas_focus_in(ee->evas);
+ if (ee->func.fn_focus_in) ee->func.fn_focus_in(ee);
+ return ECORE_CALLBACK_PASS_ON;
}
static Eina_Bool
if (!ee) return ECORE_CALLBACK_PASS_ON;
/* pass on event */
ee->prop.focused = 0;
-
- return ECORE_CALLBACK_DONE;
+ evas_focus_out(ee->evas);
+ if (ee->func.fn_focus_out) ee->func.fn_focus_out(ee);
+ return ECORE_CALLBACK_PASS_ON;
}
static Eina_Bool
if (!ee) return ECORE_CALLBACK_PASS_ON; /* pass on event */
evas_output_size_set(ee->evas, e->w, e->h);
- return ECORE_CALLBACK_DONE;
+ return ECORE_CALLBACK_PASS_ON;
}
static Eina_Bool
evas_output_size_get(ee->evas, &w, &h);
evas_damage_rectangle_add(ee->evas, 0, 0, w, h);
- return ECORE_CALLBACK_DONE;
+ return ECORE_CALLBACK_PASS_ON;
}
static int
}
static void
+_ecore_evas_show(Ecore_Evas *ee)
+{
+ if (ee->prop.focused) return;
+ ee->prop.focused = 1;
+ evas_event_feed_mouse_in(ee->evas, (unsigned int)((unsigned long long)(ecore_time_get() * 1000.0) & 0xffffffff), NULL);
+}
+
+static void
_ecore_evas_object_cursor_del(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
{
Ecore_Evas *ee;
ee = data;
- if (ee)
- ee->prop.cursor.object = NULL;
+ if (ee) ee->prop.cursor.object = NULL;
}
static void
_ecore_evas_move_resize,
NULL,
NULL,
- NULL,
+ _ecore_evas_show,
NULL,
NULL,
NULL,
_ecore_evas_register(ee);
sdl_ee = ee;
-
- evas_event_feed_mouse_in(ee->evas, (unsigned int)((unsigned long long)(ecore_time_get() * 1000.0) & 0xffffffff), NULL);
- evas_focus_in(ee->evas);
-
return ee;
}
#endif
Ecore_Win32_Event_Window_Focus_In *e;
e = event;
- ee = ecore_event_window_match(e->window);
+ ee = ecore_event_window_match((Ecore_Window)e->window);
if ((!ee) || (ee->ignore_events)) return ECORE_CALLBACK_PASS_ON;
- if (e->window != ee->prop.window) return ECORE_CALLBACK_PASS_ON;
+ if ((Ecore_Window)e->window != ee->prop.window) return ECORE_CALLBACK_PASS_ON;
ee->prop.focused = 1;
evas_focus_in(ee->evas);
Ecore_Win32_Event_Window_Focus_Out *e;
e = event;
- ee = ecore_event_window_match(e->window);
+ ee = ecore_event_window_match((Ecore_Window)e->window);
if ((!ee) || (ee->ignore_events)) return ECORE_CALLBACK_PASS_ON;
- if (e->window != ee->prop.window) return ECORE_CALLBACK_PASS_ON;
+ if ((Ecore_Window)e->window != ee->prop.window) return ECORE_CALLBACK_PASS_ON;
evas_focus_out(ee->evas);
ee->prop.focused = 0;
}
if ((first_map_bug) && (!strcmp(ee->driver, "opengl_x11")))
evas_damage_rectangle_add(ee->evas, 0, 0, ee->w, ee->h);
- if (ee->visible) return ECORE_CALLBACK_DONE;
+ if (ee->visible) return ECORE_CALLBACK_PASS_ON;
+// if (ee->visible) return ECORE_CALLBACK_DONE;
// printf("SHOW EVENT %p\n", ee);
ee->visible = 1;
if (ee->func.fn_show) ee->func.fn_show(ee);
ee = ecore_event_window_match(e->win);
if (!ee) return ECORE_CALLBACK_PASS_ON; /* pass on event */
if (e->win != ee->prop.window) return ECORE_CALLBACK_PASS_ON;
- if (!ee->visible) return ECORE_CALLBACK_DONE;
+ if (!ee->visible) return ECORE_CALLBACK_PASS_ON;
+// if (!ee->visible) return ECORE_CALLBACK_DONE;
// printf("HIDE EVENT %p\n", ee);
ee->visible = 0;
if (ee->func.fn_hide) ee->func.fn_hide(ee);
_ecore_evas_x_override_set(Ecore_Evas *ee, int on)
{
if (ee->prop.override == on) return;
- ecore_x_window_hide(ee->prop.window);
+ if (ee->should_be_visible) ecore_x_window_hide(ee->prop.window);
ecore_x_window_override_set(ee->prop.window, on);
- if (ee->visible) ecore_x_window_show(ee->prop.window);
+ if (ee->should_be_visible) ecore_x_window_show(ee->prop.window);
if (ee->prop.focused) ecore_x_window_focus(ee->prop.window);
ee->prop.override = on;
}
EAPI void ecore_fb_callback_lose_set(void (*func) (void *data), void *data);
/* ecore_fb_li.c */
-EAPI Ecore_Fb_Input_Device *ecore_fb_input_device_open(void *window, const char *dev);
+EAPI Ecore_Fb_Input_Device *ecore_fb_input_device_open(const char *dev);
EAPI void ecore_fb_input_device_close(Ecore_Fb_Input_Device *dev);
EAPI void ecore_fb_input_device_listen(Ecore_Fb_Input_Device *dev, Eina_Bool listen);
EAPI const char *ecore_fb_input_device_name_get(Ecore_Fb_Input_Device *dev);
EAPI void ecore_fb_input_device_axis_size_set(Ecore_Fb_Input_Device *dev, int w, int h);
EAPI void ecore_fb_input_threshold_click_set(Ecore_Fb_Input_Device *dev, double threshold);
EAPI double ecore_fb_input_threshold_click_get(Ecore_Fb_Input_Device *dev);
+EAPI void ecore_fb_input_device_window_set(Ecore_Fb_Input_Device *dev, void *window);
/* ecore_fb.c */
e->window = (Ecore_Window)dev->window;
e->event_window = (Ecore_Window)dev->window;
e->root_window = (Ecore_Window)dev->window;
- e->same_screen = 0;
+ e->same_screen = 1;
if (iev->value)
ecore_event_add(ECORE_EVENT_KEY_DOWN, e, NULL, NULL);
e->window = (Ecore_Window)dev->window;
e->event_window = (Ecore_Window)dev->window;
e->root_window = (Ecore_Window)dev->window;
- e->same_screen = 0;
+ e->same_screen = 1;
e->modifiers = 0;
if (dev->keyboard.shift)
e->window = (Ecore_Window)dev->window;
e->event_window = (Ecore_Window)dev->window;
e->root_window = (Ecore_Window)dev->window;
- e->same_screen = 0;
+ e->same_screen = 1;
e->modifiers = 0;
if (dev->keyboard.shift) e->modifiers |= ECORE_EVENT_MODIFIER_SHIFT;
e->window = (Ecore_Window)dev->window;
e->event_window = (Ecore_Window)dev->window;
e->root_window = (Ecore_Window)dev->window;
- e->same_screen = 0;
+ e->same_screen = 1;
e->modifiers = 0;
if (dev->keyboard.shift) e->modifiers |= ECORE_EVENT_MODIFIER_SHIFT;
#endif
/**
+ * @brief Associates an input device with the given @ref Ecore_Evas.
+ *
+ * @param dev The input being associated with an @ref Ecore_Evas (not @c NULL).
+ * @param window The window which this input is being associated to.
+ * @c NULL will remove any previous association.
+ *
+ * Events generated by this device will have a pointer to @p window. If this @p
+ * window is registered with ecore_event_window_register() or
+ * ecore_evas_input_event_register(), respective evas events will be delivered
+ * by the ecore_input_evas system. An example can be seen in the following code:
+ *
+ * @code
+ * Ecore_Evas *ee = ecore_evas_new(NULL, 0, 0, 800, 600, NULL);
+ *
+ * ecore_evas_input_event_register(ee);
+ *
+ * device = ecore_fb_input_device_open(device_path);
+ * if (device)
+ * ecore_fb_input_device_window_set(device, ee);
+ *
+ * @endcode
+ *
+ * On the previous code, all input captured on the mentioned device will be
+ * delivered to the @Ecore_Evas @c ee.
+ *
+ * @since 1.1
+ */
+EAPI void
+ecore_fb_input_device_window_set(Ecore_Fb_Input_Device *dev, void *window)
+{
+ if (!dev) return;
+
+ dev->window = window;
+}
+
+/**
* @brief Open an input device.
*
* @param dev The device to open.
* object for it, or returns @c NULL on failure.
*/
EAPI Ecore_Fb_Input_Device *
-ecore_fb_input_device_open(void *ee, const char *dev)
+ecore_fb_input_device_open(const char *dev)
{
Ecore_Fb_Input_Device *device;
unsigned long event_type_bitmask[EV_CNT / 32 + 1];
}
}
- device->window = ee;
_ecore_fb_li_devices = eina_list_append(_ecore_fb_li_devices, device);
return device;
/* ecore_fb_ts.c */
EAPI int ecore_fb_ts_init(void);
EAPI void ecore_fb_ts_shutdown(void);
+EAPI void ecore_fb_ts_events_window_set(void *window);
+EAPI void *ecore_fb_ts_events_window_get(void);
+EAPI void ecore_fb_ts_event_window_set(void *window);
/* ecore_fb_vt.c */
int ecore_fb_vt_init(void);
#endif
static double _ecore_fb_double_click_time = 0.25;
+static void *_ecore_fb_ts_event_window = NULL;
EAPI int
ecore_fb_ts_init(void)
if (_ecore_fb_ts_fd >= 0) close(_ecore_fb_ts_fd);
_ecore_fb_ts_fd = -1;
_ecore_fb_ts_fd_handler_handle = NULL;
+ _ecore_fb_ts_event_window = NULL;
+}
+
+EAPI void
+ecore_fb_ts_event_window_set(void *window)
+{
+ _ecore_fb_ts_event_window = window;
+}
+
+EAPI void *
+ecore_fb_ts_event_window_get(void)
+{
+ return _ecore_fb_ts_event_window;
}
/**
e->y = y;
e->root.x = x;
e->root.y = y;
+ e->window = (Ecore_Window)_ecore_fb_ts_event_window;
+ e->event_window = e->window;
+ e->root_window = e->window;
+ e->same_screen = 1;
ecore_event_add(ECORE_EVENT_MOUSE_MOVE, e, NULL, NULL);
}
if ((pressure) && (!prev_pressure))
{
did_triple = 0;
}
+ e->window = (Ecore_Window)_ecore_fb_ts_event_window;
+ e->event_window = e->window;
+ e->root_window = e->window;
+ e->same_screen = 1;
ecore_event_add(ECORE_EVENT_MOUSE_BUTTON_DOWN, e, NULL, NULL);
}
else if ((!pressure) && (prev_pressure))
e->double_click = 1;
if (did_triple)
e->triple_click = 1;
+ e->window = (Ecore_Window)_ecore_fb_ts_event_window;
+ e->event_window = e->window;
+ e->root_window = e->window;
+ e->same_screen = 1;
ecore_event_add(ECORE_EVENT_MOUSE_BUTTON_UP, e, NULL, NULL);
}
if (did_triple)
# include <libgen.h>
#endif
+#ifdef _WIN32
+# include <direct.h>
+#endif
+
#ifdef HAVE_FEATURES_H
# include <features.h>
#endif
#include <ctype.h>
#include <errno.h>
+#ifdef HAVE_ATFILE_SOURCE
+# include <dirent.h>
+#endif
+
#include "ecore_file_private.h"
int _ecore_file_log_dom = -1;
EAPI Eina_Bool
ecore_file_recursive_rm(const char *dir)
{
- DIR *dirp;
- struct dirent *dp;
- char path[PATH_MAX], buf[PATH_MAX];
+ Eina_Iterator *it;
+ char buf[PATH_MAX];
struct stat st;
int ret;
ret = stat(dir, &st);
if ((ret == 0) && (S_ISDIR(st.st_mode)))
{
+ Eina_File_Direct_Info *info;
+
ret = 1;
- if (stat(dir, &st) == -1) return EINA_FALSE;
- dirp = opendir(dir);
- if (dirp)
+ if (stat(dir, &st) == -1) return EINA_FALSE; /* WOOT: WHY ARE WE CALLING STAT TWO TIMES ??? */
+
+ it = eina_file_direct_ls(dir);
+ EINA_ITERATOR_FOREACH(it, info)
{
- while ((dp = readdir(dirp)))
- {
- if ((strcmp(dp->d_name, ".")) && (strcmp(dp->d_name, "..")))
- {
- snprintf(path, PATH_MAX, "%s/%s", dir, dp->d_name);
- if (!ecore_file_recursive_rm(path))
- ret = 0;
- }
- }
- closedir(dirp);
+ if (!ecore_file_recursive_rm(info->path))
+ ret = 0;
}
+ eina_iterator_free(it);
+
if (!ecore_file_rmdir(dir)) ret = 0;
if (ret)
return EINA_TRUE;
EAPI Eina_List *
ecore_file_ls(const char *dir)
{
- char *f;
- DIR *dirp;
- struct dirent *dp;
+ Eina_File_Direct_Info *info;
+ Eina_Iterator *ls;
Eina_List *list = NULL;
- dirp = opendir(dir);
- if (!dirp) return NULL;
-
- while ((dp = readdir(dirp)))
+ ls = eina_file_direct_ls(dir);
+ EINA_ITERATOR_FOREACH(ls, info)
{
- if ((strcmp(dp->d_name, ".")) && (strcmp(dp->d_name, "..")))
- {
- f = strdup(dp->d_name);
- list = eina_list_append(list, f);
- }
+ char *f;
+
+ f = strdup(info->path + info->name_start);
+ list = eina_list_append(list, f);
}
- closedir(dirp);
+ eina_iterator_free(ls);
list = eina_list_sort(list, eina_list_count(list), EINA_COMPARE_CB(strcoll));
EAPI int
ecore_file_dir_is_empty(const char *dir)
{
- DIR *dirp;
- struct dirent *dp;
+ Eina_File_Direct_Info *info;
+ Eina_Iterator *it;
- dirp = opendir(dir);
- if (!dirp) return -1;
+ it = eina_file_direct_ls(dir);
+ if (!it) return -1;
- while ((dp = readdir(dirp)))
+ EINA_ITERATOR_FOREACH(it, info)
{
- if ((strcmp(dp->d_name, ".")) && (strcmp(dp->d_name, "..")))
- {
- closedir(dirp);
- return 0;
- }
+ eina_iterator_free(it);
+ return 0;
}
- closedir(dirp);
+ eina_iterator_free(it);
return 1;
}
#ifndef ECORE_FILE_PRIVATE_H_
#define ECORE_FILE_PRIVATE_H_
-#ifndef _FILE_OFFSET_BITS
-# define _FILE_OFFSET_BITS 64
-#endif
-
#ifdef __linux__
# include <features.h>
#endif
#include <sys/types.h>
#include <sys/stat.h>
-#include <dirent.h>
#include "Ecore.h"
#include "ecore_private.h"
_ecore_win32_event_handle_key_press(data, 1);
return 0;
case WM_CHAR:
+ case WM_SYSCHAR:
INF("char message");
_ecore_win32_event_handle_key_press(data, 0);
return 0;
case WM_KEYUP:
case WM_SYSKEYUP:
INF("keyup message");
- _ecore_win32_event_handle_key_release(data, 1);
+ _ecore_win32_event_handle_key_release(data);
return 0;
case WM_SETFOCUS:
INF("setfocus message");
/* Mouse input notifications */
case WM_LBUTTONDOWN:
INF("left button down message");
+ SetCapture(window);
_ecore_win32_event_handle_button_press(data, 1);
return 0;
case WM_MBUTTONDOWN:
INF("left button up message");
+ ReleaseCapture();
w = (Ecore_Win32_Window *)GetWindowLongPtr(window, GWLP_USERDATA);
if (w->drag.dragging)
{
- ReleaseCapture();
w->drag.dragging = 0;
return 0;
}
#include "ecore_win32_private.h"
+typedef enum
+{
+ ECORE_WIN32_KEY_MASK_LSHIFT = 1 << 0,
+ ECORE_WIN32_KEY_MASK_RSHIFT = 1 << 1,
+ ECORE_WIN32_KEY_MASK_LCONTROL = 1 << 2,
+ ECORE_WIN32_KEY_MASK_RCONTROL = 1 << 3,
+ ECORE_WIN32_KEY_MASK_LMENU = 1 << 4,
+ ECORE_WIN32_KEY_MASK_RMENU = 1 << 5
+} Ecore_Win32_Key_Mask;
+
/***** Private declarations *****/
-static Ecore_Win32_Window *_ecore_win32_mouse_down_last_window = NULL;
-static Ecore_Win32_Window *_ecore_win32_mouse_down_last_last_window = NULL;
-static long _ecore_win32_mouse_down_last_time = 0 ;
-static long _ecore_win32_mouse_down_last_last_time = 0 ;
-static int _ecore_win32_mouse_down_did_triple = 0;
-static int _ecore_win32_mouse_up_count = 0;
+static Ecore_Win32_Window *_ecore_win32_mouse_down_last_window = NULL;
+static Ecore_Win32_Window *_ecore_win32_mouse_down_last_last_window = NULL;
+static long _ecore_win32_mouse_down_last_time = 0 ;
+static long _ecore_win32_mouse_down_last_last_time = 0 ;
+static int _ecore_win32_mouse_down_did_triple = 0;
+static int _ecore_win32_mouse_up_count = 0;
+static Ecore_Win32_Key_Mask _ecore_win32_key_mask = 0;
static void _ecore_win32_event_free_key_down(void *data,
void *ev);
static void _ecore_win32_event_free_key_up(void *data,
void *ev);
-static int _ecore_win32_event_keystroke_get(int key,
- int is_extended,
- char **keyname,
- char **keysymbol,
- char **keycompose);
+static int _ecore_win32_event_keystroke_get(int key,
+ int is_extended,
+ Eina_Bool is_down,
+ char **keyname,
+ char **keysymbol,
+ char **keycompose,
+ unsigned int *modifiers);
static int _ecore_win32_event_char_get(int key,
char **keyname,
if (is_keystroke)
{
- if (!_ecore_win32_event_keystroke_get(LOWORD(msg->window_param),
+ if (!_ecore_win32_event_keystroke_get(msg->window_param,
msg->data_param & 0x01000000,
+ EINA_TRUE,
(char **)&e->keyname,
(char **)&e->key,
- (char **)&e->string))
+ (char **)&e->string,
+ &e->modifiers))
{
free(e);
return;
}
- goto store_key;
}
else
{
}
}
- store_key:
e->window = (Ecore_Window)GetWindowLongPtr(msg->window, GWLP_USERDATA);
if (!e->window)
{
}
void
-_ecore_win32_event_handle_key_release(Ecore_Win32_Callback_Data *msg,
- int is_keystroke)
+_ecore_win32_event_handle_key_release(Ecore_Win32_Callback_Data *msg)
{
Ecore_Event_Key *e;
e = (Ecore_Event_Key *)calloc(1, sizeof(Ecore_Event_Key));
if (!e) return;
- if (is_keystroke)
- {
- if (!_ecore_win32_event_keystroke_get(LOWORD(msg->window_param),
- msg->data_param & 0x01000000,
- (char **)&e->keyname,
- (char **)&e->key,
- (char **)&e->string))
- {
- free(e);
- return;
- }
- goto store_key;
- }
- else
+ if (!_ecore_win32_event_keystroke_get(LOWORD(msg->window_param),
+ msg->data_param & 0x01000000,
+ EINA_FALSE,
+ (char **)&e->keyname,
+ (char **)&e->key,
+ (char **)&e->string,
+ &e->modifiers))
{
if (!_ecore_win32_event_char_get(LOWORD(msg->window_param),
(char **)&e->keyname,
}
}
- store_key:
e->window = (Ecore_Window)GetWindowLongPtr(msg->window, GWLP_USERDATA);
if (!e->window)
{
}
static int
-_ecore_win32_event_keystroke_get(int key,
- int is_extended,
- char **keyname,
- char **keysymbol,
- char **keycompose)
+_ecore_win32_event_keystroke_get(int key,
+ int is_extended,
+ Eina_Bool is_down,
+ char **keyname,
+ char **keysymbol,
+ char **keycompose,
+ unsigned int *modifiers)
{
- char *kn;
- char *ks;
- char *kc;
+ char *kn = NULL;
+ char *ks = NULL;
+ char *kc = NULL;
*keyname = NULL;
*keysymbol = NULL;
*keycompose = NULL;
+
+ printf("vk key 0x%x\n", key);
switch (key)
{
/* Keystroke */
{
kn = "Prior";
ks = "Prior";
- kc = "Prior";
+ kc = NULL;
}
else
{
{
kn = "Next";
ks = "Next";
- kc = "Next";
+ kc = NULL;
}
else
{
{
kn = "End";
ks = "End";
- kc = "End";
+ kc = NULL;
}
else
{
{
kn = "Home";
ks = "Home";
- kc = "Home";
+ kc = NULL;
}
else
{
{
kn = "Left";
ks = "Left";
- kc = "Left";
+ kc = NULL;
}
else
{
{
kn = "Up";
ks = "Up";
- kc = "Up";
+ kc = NULL;
}
else
{
}
break;
case VK_RIGHT:
+ printf("vk val 0x%x (right)\n", VK_RIGHT);
if (is_extended)
{
kn = "Right";
ks = "Right";
- kc = "Right";
+ kc = NULL;
}
else
{
{
kn = "Down";
ks = "Down";
- kc = "Down";
+ kc = NULL;
}
else
{
{
kn = "Insert";
ks = "Insert";
- kc = "Insert";
+ kc = NULL;
}
else
{
{
kn = "Delete";
ks = "Delete";
+ /* FIXME: kc is wrong, here */
kc = "Delete";
}
else
}
break;
case VK_SHIFT:
- kn = "Shift";
- ks = "Shift";
- kc = "Shift";
- break;
+ {
+ SHORT res;
+
+ if (is_down)
+ {
+ res = GetKeyState(VK_LSHIFT);
+ if (res & 0x8000)
+ {
+ _ecore_win32_key_mask |= ECORE_WIN32_KEY_MASK_LSHIFT;
+ kn = "Shift_L";
+ ks = "Shift_L";
+ kc = "";
+ }
+ res = GetKeyState(VK_RSHIFT);
+ if (res & 0x8000)
+ {
+ _ecore_win32_key_mask |= ECORE_WIN32_KEY_MASK_RSHIFT;
+ kn = "Shift_R";
+ ks = "Shift_R";
+ kc = "";
+ }
+ *modifiers |= ECORE_EVENT_MODIFIER_SHIFT;
+ }
+ else /* is_up */
+ {
+ res = GetKeyState(VK_LSHIFT);
+ if (!(res & 0x8000) &&
+ (_ecore_win32_key_mask & ECORE_WIN32_KEY_MASK_LSHIFT))
+ {
+ kn = "Shift_L";
+ ks = "Shift_L";
+ kc = "";
+ _ecore_win32_key_mask &= ~ECORE_WIN32_KEY_MASK_LSHIFT;
+ }
+ res = GetKeyState(VK_RSHIFT);
+ if (!(res & 0x8000) &&
+ (_ecore_win32_key_mask & ECORE_WIN32_KEY_MASK_RSHIFT))
+ {
+ kn = "Shift_R";
+ ks = "Shift_R";
+ kc = "";
+ _ecore_win32_key_mask &= ~ECORE_WIN32_KEY_MASK_RSHIFT;
+ }
+ *modifiers &= ~ECORE_EVENT_MODIFIER_SHIFT;
+ }
+ break;
+ }
case VK_CONTROL:
- kn = "Control";
- ks = "Control";
- kc = "Control";
- break;
+ {
+ SHORT res;
+
+ if (is_down)
+ {
+ res = GetKeyState(VK_LCONTROL);
+ if (res & 0x8000)
+ {
+ _ecore_win32_key_mask |= ECORE_WIN32_KEY_MASK_LCONTROL;
+ kn = "Control_L";
+ ks = "Control_L";
+ kc = "";
+ break;
+ }
+ res = GetKeyState(VK_RCONTROL);
+ if (res & 0x8000)
+ {
+ _ecore_win32_key_mask |= ECORE_WIN32_KEY_MASK_RCONTROL;
+ kn = "Control_R";
+ ks = "Control_R";
+ kc = "";
+ break;
+ }
+ *modifiers |= ECORE_EVENT_MODIFIER_CTRL;
+ }
+ else /* is_up */
+ {
+ res = GetKeyState(VK_LCONTROL);
+ if (!(res & 0x8000) &&
+ (_ecore_win32_key_mask & ECORE_WIN32_KEY_MASK_LCONTROL))
+ {
+ kn = "Control_L";
+ ks = "Control_L";
+ kc = "";
+ _ecore_win32_key_mask &= ~ECORE_WIN32_KEY_MASK_LCONTROL;
+ break;
+ }
+ res = GetKeyState(VK_RCONTROL);
+ if (!(res & 0x8000) &&
+ (_ecore_win32_key_mask & ECORE_WIN32_KEY_MASK_RCONTROL))
+ {
+ kn = "Control_R";
+ ks = "Control_R";
+ kc = "";
+ _ecore_win32_key_mask &= ~ECORE_WIN32_KEY_MASK_RCONTROL;
+ break;
+ }
+ *modifiers &= ~ECORE_EVENT_MODIFIER_CTRL;
+ }
+ break;
+ }
case VK_MENU:
- kn = "Menu";
- ks = "Menu";
- kc = "Menu";
- break;
+ {
+ SHORT res;
+
+ if (is_down)
+ {
+ res = GetKeyState(VK_LMENU);
+ if (res & 0x8000)
+ {
+ _ecore_win32_key_mask |= ECORE_WIN32_KEY_MASK_LMENU;
+ kn = "Alt_L";
+ ks = "Alt_L";
+ kc = "";
+ }
+ res = GetKeyState(VK_RMENU);
+ if (res & 0x8000)
+ {
+ _ecore_win32_key_mask |= ECORE_WIN32_KEY_MASK_RMENU;
+ kn = "Alt_R";
+ ks = "Alt_R";
+ kc = "";
+ }
+ *modifiers |= ECORE_EVENT_MODIFIER_ALT;
+ }
+ else /* is_up */
+ {
+ res = GetKeyState(VK_LMENU);
+ if (!(res & 0x8000) &&
+ (_ecore_win32_key_mask & ECORE_WIN32_KEY_MASK_LMENU))
+ {
+ kn = "Alt_L";
+ ks = "Alt_L";
+ kc = "";
+ _ecore_win32_key_mask &= ~ECORE_WIN32_KEY_MASK_LMENU;
+ }
+ res = GetKeyState(VK_RMENU);
+ if (!(res & 0x8000) &&
+ (_ecore_win32_key_mask & ECORE_WIN32_KEY_MASK_RMENU))
+ {
+ kn = "Alt_R";
+ ks = "Alt_R";
+ kc = "";
+ _ecore_win32_key_mask &= ~ECORE_WIN32_KEY_MASK_RMENU;
+ }
+ *modifiers &= ~ECORE_EVENT_MODIFIER_ALT;
+ }
+ break;
+ }
+ case VK_LWIN:
+ {
+ if (is_down)
+ {
+ kn = "Super_L";
+ ks = "Super_L";
+ kc = "";
+ *modifiers |= ECORE_EVENT_MODIFIER_WIN;
+ }
+ else /* is_up */
+ {
+ kn = "Super_L";
+ ks = "Super_L";
+ kc = "";
+ *modifiers &= ~ECORE_EVENT_MODIFIER_WIN;
+ }
+ break;
+ }
+ case VK_RWIN:
+ {
+ if (is_down)
+ {
+ kn = "Super_R";
+ ks = "Super_R";
+ kc = "";
+ *modifiers |= ECORE_EVENT_MODIFIER_WIN;
+ }
+ else /* is_up */
+ {
+ kn = "Super_R";
+ ks = "Super_R";
+ kc = "";
+ *modifiers &= ~ECORE_EVENT_MODIFIER_WIN;
+ }
+ break;
+ }
case VK_F1:
kn = "F1";
ks = "F1";
/* other non keystroke characters */
return 0;
}
+
+ printf("sortie...\n");
*keyname = strdup(kn);
if (!*keyname) return 0;
*keysymbol = strdup(ks);
*keyname = NULL;
return 0;
}
- *keycompose = strdup(kc);
- if (!*keycompose)
+ if (!kc)
+ *keycompose = NULL;
+ else
{
- free(*keyname);
- free(*keysymbol);
- *keyname = NULL;
- *keysymbol = NULL;
- return 0;
+ *keycompose = strdup(kc);
+ if (!*keycompose)
+ {
+ free(*keyname);
+ free(*keysymbol);
+ *keyname = NULL;
+ *keysymbol = NULL;
+ return 0;
+ }
}
+ printf("sortie 2 ...\n");
return 1;
}
char **keysymbol,
char **keycompose)
{
- char kn[32];
- char ks[32];
- char kc[32];
+ char *kn = NULL;
+ char *ks = NULL;
+ char *kc = NULL;
+ char buf[2];
*keyname = NULL;
*keysymbol = NULL;
*keycompose = NULL;
+ printf("char key 0x%x\n", key);
+
switch (key)
{
+ case VK_PROCESSKEY:
+ break;
case VK_BACK:
- strncpy(kn, "BackSpace", 32);
- strncpy(ks, "BackSpace", 32);
- strncpy(kc, "BackSpace", 32);
+ kn = "BackSpace";
+ ks = "BackSpace";
+ kc = "\b";
break;
case VK_TAB:
- strncpy(kn, "Tab", 32);
- strncpy(ks, "ISO_Left_Tab", 32);
- strncpy(kc, "Tab", 32);
+ kn = "Tab";
+ ks = "Tab";
+ kc = "\t";
break;
case 0x0a:
/* Line feed (Shift + Enter) */
- strncpy(kn, "LineFeed", 32);
- strncpy(ks, "LineFeed", 32);
- strncpy(kc, "LineFeed", 32);
+ kn = "LineFeed";
+ ks = "LineFeed";
+ kc = "LineFeed";
break;
case VK_RETURN:
- strncpy(kn, "Return", 32);
- strncpy(ks, "Return", 32);
- strncpy(kc, "Return", 32);
+ kn = "Return";
+ ks = "Return";
+ kc = "\n";
break;
case VK_ESCAPE:
- strncpy(kn, "Escape", 32);
- strncpy(ks, "Escape", 32);
- strncpy(kc, "Escape", 32);
+ kn = "Escape";
+ ks = "Escape";
+ kc = "\e";
break;
case VK_SPACE:
- strncpy(kn, "space", 32);
- strncpy(ks, "space", 32);
- strncpy(kc, " ", 32);
+ kn = "space";
+ ks = "space";
+ kc = " ";
break;
default:
/* displayable characters */
printf (" * key : %d\n", key);
- kn[0] = (TCHAR)key;
- kn[1] = '\0';
- ks[0] = (TCHAR)key;
- ks[1] = '\0';
- kc[0] = (TCHAR)key;
- kc[1] = '\0';
+ buf[0] = key;
+ buf[1] = '\0';
+ kn = buf;
+ ks = buf;
+ kc = buf;
break;
}
*keyname = strdup(kn);
void _ecore_win32_event_handle_key_press(Ecore_Win32_Callback_Data *msg, int is_keystroke);
-void _ecore_win32_event_handle_key_release(Ecore_Win32_Callback_Data *msg, int is_keystroke);
+void _ecore_win32_event_handle_key_release(Ecore_Win32_Callback_Data *msg);
void _ecore_win32_event_handle_button_press(Ecore_Win32_Callback_Data *msg, int button);
void _ecore_win32_event_handle_button_release(Ecore_Win32_Callback_Data *msg, int button);
void _ecore_win32_event_handle_motion_notify(Ecore_Win32_Callback_Data *msg);
w->min_height = 0;
w->max_width = 32767;
w->max_height = 32767;
- w->base_width = -1;
- w->base_height = -1;
- w->step_width = -1;
- w->step_height = -1;
+ w->base_width = 0;
+ w->base_height = 0;
+ w->step_width = 1;
+ w->step_height = 1;
w->state.iconified = 0;
w->state.modal = 0;
* @cond LOCAL
*/
-static Ecore_WinCE_Window *_ecore_wince_mouse_down_last_window = NULL;
-static Ecore_WinCE_Window *_ecore_wince_mouse_down_last_last_window = NULL;
-static long _ecore_wince_mouse_down_last_time = 0;
-static long _ecore_wince_mouse_down_last_last_time = 0;
-static int _ecore_wince_mouse_down_did_triple = 0;
-static int _ecore_wince_mouse_up_count = 0;
+typedef enum
+{
+ ECORE_WINCE_KEY_MASK_LSHIFT = 1 << 0,
+ ECORE_WINCE_KEY_MASK_RSHIFT = 1 << 1,
+ ECORE_WINCE_KEY_MASK_LCONTROL = 1 << 2,
+ ECORE_WINCE_KEY_MASK_RCONTROL = 1 << 3,
+ ECORE_WINCE_KEY_MASK_LMENU = 1 << 4,
+ ECORE_WINCE_KEY_MASK_RMENU = 1 << 5
+} Ecore_Wince_Key_Mask;
+
+static Ecore_WinCE_Window *_ecore_wince_mouse_down_last_window = NULL;
+static Ecore_WinCE_Window *_ecore_wince_mouse_down_last_last_window = NULL;
+static long _ecore_wince_mouse_down_last_time = 0;
+static long _ecore_wince_mouse_down_last_last_time = 0;
+static int _ecore_wince_mouse_down_did_triple = 0;
+static int _ecore_wince_mouse_up_count = 0;
+static Ecore_Wince_Key_Mask _ecore_wince_key_mask = 0;
static void
_ecore_wince_event_free_key_down(void *data __UNUSED__,
}
static int
-_ecore_wince_event_keystroke_get(int key,
- char **keyname,
- char **keysymbol,
- char **keycompose)
+_ecore_wince_event_keystroke_get(int key,
+ Eina_Bool is_down,
+ char **keyname,
+ char **keysymbol,
+ char **keycompose)
{
char *kn;
char *ks;
kc = "";
break;
case VK_SHIFT:
- kn = "Shift";
- ks = "Shift";
- kc = "Shift";
- break;
+ {
+ SHORT res;
+
+ if (is_down)
+ {
+ res = GetKeyState(VK_LSHIFT);
+ if (res & 0x8000)
+ {
+ _ecore_wince_key_mask |= ECORE_WINCE_KEY_MASK_LSHIFT;
+ kn = "Shift_L";
+ ks = "Shift_L";
+ kc = "";
+ }
+ res = GetKeyState(VK_RSHIFT);
+ if (res & 0x8000)
+ {
+ _ecore_wince_key_mask |= ECORE_WINCE_KEY_MASK_RSHIFT;
+ kn = "Shift_R";
+ ks = "Shift_R";
+ kc = "";
+ }
+ }
+ else /* is_up */
+ {
+ res = GetKeyState(VK_LSHIFT);
+ if (!(res & 0x8000) &&
+ (_ecore_wince_key_mask & ECORE_WINCE_KEY_MASK_LSHIFT))
+ {
+ kn = "Shift_L";
+ ks = "Shift_L";
+ kc = "";
+ _ecore_wince_key_mask &= ~ECORE_WINCE_KEY_MASK_LSHIFT;
+ }
+ res = GetKeyState(VK_RSHIFT);
+ if (!(res & 0x8000) &&
+ (_ecore_wince_key_mask & ECORE_WINCE_KEY_MASK_RSHIFT))
+ {
+ kn = "Shift_R";
+ ks = "Shift_R";
+ kc = "";
+ _ecore_wince_key_mask &= ~ECORE_WINCE_KEY_MASK_RSHIFT;
+ }
+ }
+ break;
+ }
case VK_CONTROL:
- kn = "Control";
- ks = "Control";
- kc = "Control";
- break;
+ {
+ SHORT res;
+
+ if (is_down)
+ {
+ res = GetKeyState(VK_LCONTROL);
+ if (res & 0x8000)
+ {
+ _ecore_wince_key_mask |= ECORE_WINCE_KEY_MASK_LCONTROL;
+ kn = "Control_L";
+ ks = "Control_L";
+ kc = "";
+ break;
+ }
+ res = GetKeyState(VK_RCONTROL);
+ if (res & 0x8000)
+ {
+ _ecore_wince_key_mask |= ECORE_WINCE_KEY_MASK_RCONTROL;
+ kn = "Control_R";
+ ks = "Control_R";
+ kc = "";
+ break;
+ }
+ }
+ else /* is_up */
+ {
+ res = GetKeyState(VK_LCONTROL);
+ if (!(res & 0x8000) &&
+ (_ecore_wince_key_mask & ECORE_WINCE_KEY_MASK_LCONTROL))
+ {
+ kn = "Control_L";
+ ks = "Control_L";
+ kc = "";
+ _ecore_wince_key_mask &= ~ECORE_WINCE_KEY_MASK_LCONTROL;
+ break;
+ }
+ res = GetKeyState(VK_RCONTROL);
+ if (!(res & 0x8000) &&
+ (_ecore_wince_key_mask & ECORE_WINCE_KEY_MASK_RCONTROL))
+ {
+ kn = "Control_R";
+ ks = "Control_R";
+ kc = "";
+ _ecore_wince_key_mask &= ~ECORE_WINCE_KEY_MASK_RCONTROL;
+ break;
+ }
+ }
+ break;
+ }
case VK_MENU:
- kn = "Menu";
- ks = "Menu";
- kc = "";
- break;
+ {
+ SHORT res;
+
+ if (is_down)
+ {
+ res = GetKeyState(VK_LMENU);
+ if (res & 0x8000)
+ {
+ _ecore_wince_key_mask |= ECORE_WINCE_KEY_MASK_LMENU;
+ kn = "Alt_L";
+ ks = "Alt_L";
+ kc = "";
+ }
+ res = GetKeyState(VK_RMENU);
+ if (res & 0x8000)
+ {
+ _ecore_wince_key_mask |= ECORE_WINCE_KEY_MASK_RMENU;
+ kn = "Alt_R";
+ ks = "Alt_R";
+ kc = "";
+ }
+ }
+ else /* is_up */
+ {
+ res = GetKeyState(VK_LMENU);
+ if (!(res & 0x8000) &&
+ (_ecore_wince_key_mask & ECORE_WINCE_KEY_MASK_LMENU))
+ {
+ kn = "Alt_L";
+ ks = "Alt_L";
+ kc = "";
+ _ecore_wince_key_mask &= ~ECORE_WINCE_KEY_MASK_LMENU;
+ }
+ res = GetKeyState(VK_RMENU);
+ if (!(res & 0x8000) &&
+ (_ecore_wince_key_mask & ECORE_WINCE_KEY_MASK_RMENU))
+ {
+ kn = "Alt_R";
+ ks = "Alt_R";
+ kc = "";
+ _ecore_wince_key_mask &= ~ECORE_WINCE_KEY_MASK_RMENU;
+ }
+ }
+ break;
+ }
default:
/* other non keystroke characters */
return 0;
if (is_keystroke)
{
if (!_ecore_wince_event_keystroke_get(LOWORD(msg->window_param),
+ EINA_TRUE,
(char **)&e->keyname,
(char **)&e->key,
(char **)&e->string))
if (is_keystroke)
{
if (!_ecore_wince_event_keystroke_get(LOWORD(msg->window_param),
+ EINA_FALSE,
(char **)&e->keyname,
(char **)&e->key,
(char **)&e->string))
compose_buffer[val] = 0;
compose =
eina_str_convert(nl_langinfo(CODESET), "UTF-8", compose_buffer);
-// tmp = compose;
+ if (!compose)
+ ERR("Ecore_X cannot convert input key string '%s' to UTF-8. "
+ "Is Eina built with iconv support?", compose_buffer);
}
key = _ecore_xcb_keymap_keysym_to_string(sym);
compose_buffer[val] = 0;
compose = eina_str_convert(nl_langinfo(CODESET), "UTF-8",
compose_buffer);
+ if (!compose)
+ ERR("Ecore_X cannot convert input key string '%s' to UTF-8. "
+ "Is Eina built with iconv support?", compose_buffer);
tmp = compose;
}
XRRFreeCrtcInfo(crtc_info);
}
- fprintf(stderr, "E_RANDR: babam, resize! Trying to move all CRTCs with dx %d and dy %d", dx_min, dy_min);
if ((dx_min > 0) || (dy_min > 0))
{
if (ecore_x_randr_move_crtcs(root, enabled_crtcs, nenabled_crtcs, -dx_min, -dy_min))