+++ /dev/null
-Plain English Copyright Notice
-
-This file is not intended to be the actual License. The reason this file
-exists is that we here are programmers and engineers. We aren't lawyers. We
-provide licenses that we THINK say the right things, but we have our own
-intentions at heart. This is a plain-english explanation of what those
-intentions are, and if you follow them you will be within the "spirit" of
-the license.
-
-The intent is for us to enjoy writing software that is useful to us (the
-AUTHORS) and allow others to use it freely and also benefit from the work we
-put into making it. We don't want to restrict others using it. They should
-not *HAVE* to make the source code of the applications they write that
-simply link to these libraries (be that statically or dynamically), or for
-them to be limited as to what license they choose to use (be it open, closed
-or anything else). But we would like to know you are using these libraries.
-We simply would like to know that it has been useful to someone. This is why
-we ask for acknowledgement of some sort.
-
-You can do what you want with the source of this software - it doesn't
-matter. We still have it here for ourselves and it is open and free to use
-and download and play with. It can't be taken away. We don't really mind what
-you do with the source to your software. We would simply like to know that
-you are using it - especially if it makes it to a commerical product. If you
-simply e-mail all the AUTHORS (see COPYING and AUTHORS files) telling us, and
-then make sure you include a paragraph or page in the manual for the product
-with the copyright notice and state that you used this software, we will be
-very happy. If you want to contribute back modifications and fixes you may have
-made we will welcome those too with open arms (generally). If you want help
-with changes needed, ports needed or features to be added, arrangements can
-be easily made with some dialogue.
-
-Carsten Haitzler <raster@rasterman.com>
m4/efl_doxygen.m4 \
m4/efl_path_max.m4 \
m4/efl_tests.m4 \
-m4/efl_pthread.m4
+m4/efl_threads.m4
pkgconfigdir = $(libdir)/pkgconfig
##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
-AC_INIT([ecore], [v_ver.beta2], [enlightenment-devel@lists.sourceforge.net])
+AC_INIT([ecore], [v_ver.beta3], [enlightenment-devel@lists.sourceforge.net])
AC_PREREQ([2.52])
AC_CONFIG_SRCDIR([configure.ac])
AC_CONFIG_MACRO_DIR([m4])
])
AC_SUBST(cocoa_ldflags)
+want_epoll=yes
AC_ARG_ENABLE(epoll,
AC_HELP_STRING([--enable-epoll], [enable or disable epoll support]),
[want_epoll=$enableval])
+++ /dev/null
-prefix=@prefix@
-exec_prefix=@exec_prefix@
-libdir=@libdir@
-includedir=@includedir@
-
-Name: ecore-job
-Description: E core library, Job module
-@pkgconfig_requires_private@: @requirements_ecore_job@
-Version: @VERSION@
-Libs: -L${libdir} -lecore_job
-Cflags: -I${includedir}
+++ /dev/null
-EFL:ecore repo for SLP2
static Eina_List *fd_handlers_with_buffer = NULL;
static Eina_List *fd_handlers_to_delete = NULL;
+static Eina_List *fd_handlers_to_call = NULL;
+static Eina_List *fd_handlers_to_call_current;
+static Eina_List *fd_handlers_to_call_current_next;
+
#ifdef _WIN32
static Ecore_Win32_Handler *win32_handlers = NULL;
static Ecore_Win32_Handler *win32_handler_current = NULL;
-static int win32_handlers_delete_me = 0;
+static Eina_Bool win32_handlers_delete_me = EINA_FALSE;
#endif
#ifdef _WIN32
for (i = 0; i < ret; i++)
{
Ecore_Fd_Handler *fdh;
+ Eina_Bool pst, st;
fdh = ev[i].data.ptr;
if (!ECORE_MAGIC_CHECK(fdh, ECORE_MAGIC_FD_HANDLER))
ERR("deleted fd in epoll");
continue;
}
- if (ev[i].events & EPOLLIN) fdh->read_active = 1;
- if (ev[i].events & EPOLLOUT) fdh->write_active = 1;
- if (ev[i].events & EPOLLERR) fdh->error_active = 1;
+ pst = st = fdh->read_active | fdh->write_active | fdh->error_active;
+ if ((ev[i].events & EPOLLIN) && (!fdh->read_active))
+ st = fdh->read_active = EINA_TRUE;
+ if ((ev[i].events & EPOLLOUT) && (!fdh->write_active))
+ st = fdh->write_active = EINA_TRUE;
+ if ((ev[i].events & EPOLLERR) && (!fdh->error_active))
+ st = fdh->error_active = EINA_TRUE;
+ if (pst != st)
+ fd_handlers_to_call = eina_list_append(fd_handlers_to_call, fdh);
}
return ret;
static inline int _ecore_main_fdh_poll_mark_active(void)
{
Ecore_Fd_Handler *fdh;
+ Eina_Bool pst, st;
int ret = 0;
/* call the prepare callback for all handlers */
{
if (fdh->delete_me)
continue;
-
- if (fdh->gfd.revents & G_IO_IN) fdh->read_active = 1;
- if (fdh->gfd.revents & G_IO_OUT) fdh->write_active = 1;
- if (fdh->gfd.revents & G_IO_ERR) fdh->error_active = 1;
+
+ pst = st = fdh->read_active | fdh->write_active | fdh->error_active;
+ if ((fdh->gfd.revents & G_IO_IN) && (!fdh->read_active))
+ st = fdh->read_active = EINA_TRUE;
+ if ((fdh->gfd.revents & G_IO_OUT) && (!fdh->write_active))
+ st = fdh->write_active = EINA_TRUE;
+ if ((fdh->gfd.revents & G_IO_ERR) && (!fdh->error_active))
+ st = fdh->error_active = EINA_TRUE;
+ if (pst != st)
+ fd_handlers_to_call = eina_list_append(fd_handlers_to_call, fdh);
if (fdh->gfd.revents & (G_IO_IN|G_IO_OUT|G_IO_ERR)) ret++;
}
free(fdh);
return NULL;
}
- fdh->read_active = 0;
- fdh->write_active = 0;
- fdh->error_active = 0;
- fdh->delete_me = 0;
+ fdh->read_active = EINA_FALSE;
+ fdh->write_active = EINA_FALSE;
+ fdh->error_active = EINA_FALSE;
+ fdh->delete_me = EINA_FALSE;
fdh->func = func;
fdh->data = (void *)data;
fdh->buf_func = buf_func;
if (!wh) return NULL;
ECORE_MAGIC_SET(wh, ECORE_MAGIC_WIN32_HANDLER);
wh->h = (HANDLE)h;
- wh->delete_me = 0;
+ wh->delete_me = EINA_FALSE;
wh->func = func;
wh->data = (void *)data;
win32_handlers = (Ecore_Win32_Handler *)
/* FIXME: should this return NULL instead? */
return fd_handler->data;
- fd_handler->delete_me = 1;
+ fd_handler->delete_me = EINA_TRUE;
_ecore_main_fdh_poll_del(fd_handler);
fd_handlers_to_delete = eina_list_append(fd_handlers_to_delete, fd_handler);
if (fd_handler->prep_func && fd_handlers_with_prep)
"ecore_main_win32_handler_del");
return NULL;
}
- win32_handler->delete_me = 1;
- win32_handlers_delete_me = 1;
+ win32_handler->delete_me = EINA_TRUE;
+ win32_handlers_delete_me = EINA_TRUE;
return win32_handler->data;
}
#else
free(fdh);
}
if (fd_handlers_with_buffer)
- eina_list_free(fd_handlers_with_buffer);
- fd_handlers_with_buffer = NULL;
+ fd_handlers_with_buffer = eina_list_free(fd_handlers_with_buffer);
if (fd_handlers_with_prep)
- eina_list_free(fd_handlers_with_prep);
- fd_handlers_with_prep = NULL;
+ fd_handlers_with_prep = eina_list_free(fd_handlers_with_prep);
if (fd_handlers_to_delete)
- eina_list_free(fd_handlers_to_delete);
+ fd_handlers_to_delete = eina_list_free(fd_handlers_to_delete);
+ if (fd_handlers_to_call)
+ fd_handlers_to_call = eina_list_free(fd_handlers_to_call);
+
+ fd_handlers_to_call_current = NULL;
fd_handlers_to_delete = NULL;
fd_handler_current = NULL;
ECORE_MAGIC_SET(wh, ECORE_MAGIC_NONE);
free(wh);
}
- win32_handlers_delete_me = 0;
+ win32_handlers_delete_me = EINA_FALSE;
win32_handler_current = NULL;
#endif
}
/* call the prepare callback for all handlers with prep functions */
EINA_LIST_FOREACH_SAFE(fd_handlers_with_prep, l, l2, fdh)
{
- if (!fdh) fd_handlers_with_prep = eina_list_remove_list(l, fd_handlers_with_prep);
+ if (!fdh)
+ {
+ fd_handlers_with_prep = eina_list_remove_list(l, fd_handlers_with_prep);
+ continue;
+ }
if (!fdh->delete_me && fdh->prep_func)
{
fdh->references++;
{
if (!fdh->delete_me)
{
- if (FD_ISSET(fdh->fd, &rfds))
- fdh->read_active = 1;
- if (FD_ISSET(fdh->fd, &wfds))
- fdh->write_active = 1;
- if (FD_ISSET(fdh->fd, &exfds))
- fdh->error_active = 1;
+ Eina_Bool pst, st;
+ pst = st = fdh->read_active | fdh->write_active | fdh->error_active;
+ if ((FD_ISSET(fdh->fd, &rfds)) && (!fdh->read_active))
+ st = fdh->read_active = EINA_TRUE;
+ if ((FD_ISSET(fdh->fd, &wfds)) && (!fdh->write_active))
+ st = fdh->write_active = EINA_TRUE;
+ if ((FD_ISSET(fdh->fd, &exfds)) && (!fdh->error_active))
+ st = fdh->error_active = EINA_TRUE;
+ if (pst != st)
+ fd_handlers_to_call = eina_list_append(fd_handlers_to_call, fdh);
}
}
#endif /* HAVE_EPOLL */
ERR("Fd function err returned 0, remove it");
if (!fdh->delete_me)
{
- fdh->delete_me = 1;
+ fdh->delete_me = EINA_TRUE;
fd_handlers_to_delete = eina_list_append(fd_handlers_to_delete, fdh);
}
found++;
ERR("Problematic fd found at %d! setting it for delete", fdh->fd);
if (!fdh->delete_me)
{
- fdh->delete_me = 1;
+ fdh->delete_me = EINA_TRUE;
fd_handlers_to_delete = eina_list_append(fd_handlers_to_delete, fdh);
}
if (!fd_handlers_to_delete) return;
EINA_LIST_FOREACH_SAFE(fd_handlers_to_delete, l, l2, fdh)
{
- if (!fdh) fd_handlers_to_delete = eina_list_remove_list(l, fd_handlers_to_delete);
+ if (!fdh)
+ {
+ fd_handlers_to_delete = eina_list_remove_list(l, fd_handlers_to_delete);
+ continue;
+ }
/* fdh->delete_me should be set for all fdhs at the start of the list */
if (fdh->references)
continue;
free(wh);
}
}
- if (!deleted_in_use) win32_handlers_delete_me = 0;
+ if (!deleted_in_use) win32_handlers_delete_me = EINA_FALSE;
}
#endif
static void
_ecore_main_fd_handlers_call(void)
{
- if (!fd_handler_current)
+ if (!fd_handlers_to_call_current)
{
/* regular main loop, start from head */
- fd_handler_current = fd_handlers;
+ fd_handlers_to_call_current = fd_handlers_to_call;
+ fd_handlers_to_call_current_next = eina_list_next(fd_handlers_to_call_current);
}
else
{
/* recursive main loop, continue from where we were */
- fd_handler_current = (Ecore_Fd_Handler *)EINA_INLIST_GET(fd_handler_current)->next;
+ fd_handlers_to_call_current = fd_handlers_to_call_current_next;
+ fd_handlers_to_call_current_next = eina_list_next(fd_handlers_to_call_current);
}
- while (fd_handler_current)
+ while (fd_handlers_to_call_current)
{
- Ecore_Fd_Handler *fdh = fd_handler_current;
+ Ecore_Fd_Handler *fdh = fd_handlers_to_call_current->data;
if (!fdh->delete_me)
{
{
if (!fdh->delete_me)
{
- fdh->delete_me = 1;
+ fdh->delete_me = EINA_TRUE;
fd_handlers_to_delete = eina_list_append(fd_handlers_to_delete, fdh);
}
}
fdh->references--;
- fdh->read_active = 0;
- fdh->write_active = 0;
- fdh->error_active = 0;
+ fdh->read_active = EINA_FALSE;
+ fdh->write_active = EINA_FALSE;
+ fdh->error_active = EINA_FALSE;
}
}
- if (fd_handler_current) /* may have changed in recursive main loops */
- fd_handler_current = (Ecore_Fd_Handler *)EINA_INLIST_GET(fd_handler_current)->next;
+ fd_handlers_to_call = eina_list_remove_list(fd_handlers_to_call, fd_handlers_to_call_current);
+ fd_handlers_to_call_current = fd_handlers_to_call_current_next;
+ fd_handlers_to_call_current_next = eina_list_next(fd_handlers_to_call_current_next);
}
}
ret = 0;
EINA_LIST_FOREACH_SAFE(fd_handlers_with_buffer, l, l2, fdh)
{
- if (!fdh) fd_handlers_with_buffer = eina_list_remove_list(l, fd_handlers_with_buffer);
+ if (!fdh)
+ {
+ fd_handlers_with_buffer = eina_list_remove_list(l, fd_handlers_with_buffer);
+ continue;
+ }
if ((!fdh->delete_me) && fdh->buf_func)
{
fdh->references++;
if (fdh->buf_func(fdh->buf_data, fdh))
{
ret |= fdh->func(fdh->data, fdh);
- fdh->read_active = 1;
+ if (!fdh->read_active)
+ {
+ fdh->read_active = EINA_TRUE;
+ if ((!fdh->write_active) && (!fdh->error_active))
+ fd_handlers_to_call = eina_list_append(fd_handlers_to_call, fdh);
+ }
}
fdh->references--;
}
wh->references++;
if (!wh->func(wh->data, wh))
{
- wh->delete_me = 1;
- win32_handlers_delete_me = 1;
+ wh->delete_me = EINA_TRUE;
+ win32_handlers_delete_me = EINA_TRUE;
}
wh->references--;
}
return NULL;
}
- if (cl->client_addr)
- free(cl->client_addr);
- cl->client_addr = NULL;
-
data = cl->data;
cl->delete_me = EINA_TRUE;
if (cl->event_count > 0)
if (cl->fd_handler)
ecore_main_fd_handler_del(cl->fd_handler);
+ if (cl->client_addr)
+ free(cl->client_addr);
+ cl->client_addr = NULL;
+
if (cl->ip)
eina_stringshare_del(cl->ip);
cl->data = NULL;
error:
close(new_fd);
- if (cl->fd_handler)
+ if (cl && cl->fd_handler)
ecore_main_fd_handler_del(cl->fd_handler);
return ECORE_CALLBACK_RENEW;
}
else
length = 1;
- arg->result = malloc(sizeof (Ecore_Con_Info) + length);
+ arg->result = malloc(sizeof(Ecore_Con_Info) + length);
if (!arg->result)
return EINA_FALSE;
Ecore_Con_CAres *cares;
int ai_family = AF_INET6;
- cares = calloc(1, sizeof (Ecore_Con_CAres));
+ cares = calloc(1, sizeof(Ecore_Con_CAres));
if (!cares)
return 0;
if (hints)
{
ai_family = hints->ai_family;
- memcpy(&cares->hints, hints, sizeof (struct addrinfo));
+ memcpy(&cares->hints, hints, sizeof(struct addrinfo));
}
if (inet_pton(AF_INET, svr->name, &cares->addr.v4) == 1)
cares->byaddr = EINA_TRUE;
cares->isv6 = EINA_FALSE;
ares_gethostbyaddr(info_channel, &cares->addr.v4,
- sizeof (cares->addr.v4),
+ sizeof(cares->addr.v4),
AF_INET,
(ares_host_callback)_ecore_con_info_ares_host_cb,
cares);
cares->byaddr = EINA_TRUE;
cares->isv6 = EINA_TRUE;
ares_gethostbyaddr(info_channel, &cares->addr.v6,
- sizeof (cares->addr.v6),
+ sizeof(cares->addr.v6),
AF_INET6,
(ares_host_callback)_ecore_con_info_ares_host_cb,
cares);
if (FD_ISSET(i, &writers))
flags |= ECORE_FD_WRITE;
- if (flags)
- if (!_ecore_con_info_fds_lookup(i))
- {
- ecf = malloc(sizeof (Ecore_Con_FD));
- if (ecf)
- {
- ecf->fd = i;
- ecf->active = active;
- ecf->handler = ecore_main_fd_handler_add(
- i, ECORE_FD_WRITE | ECORE_FD_READ,
- _ecore_con_info_cares_fd_cb,
- NULL, NULL, NULL);
- info_fds = eina_list_append(info_fds, ecf);
- }
- }
+ if (flags && (!_ecore_con_info_fds_lookup(i)))
+ {
+ ecf = malloc(sizeof(Ecore_Con_FD));
+ if (ecf)
+ {
+ ecf->fd = i;
+ ecf->active = active;
+ ecf->handler = ecore_main_fd_handler_add(
+ i, ECORE_FD_WRITE | ECORE_FD_READ,
+ _ecore_con_info_cares_fd_cb,
+ NULL, NULL, NULL);
+ info_fds = eina_list_append(info_fds, ecf);
+ }
+ }
}
info_readers = readers;
{
if (ecf->active != active)
{
- ecore_main_fd_handler_del(ecf->handler);
+ if (ecf->handler) ecore_main_fd_handler_del(ecf->handler);
free(ecf);
info_fds = eina_list_remove_list(info_fds, l);
}
{
struct sockaddr_in *addri;
- addrlen = sizeof (struct sockaddr_in);
+ addrlen = sizeof(struct sockaddr_in);
addri = malloc(addrlen);
if (!addri)
addri->sin_port = htons(arg->svr->port);
memcpy(&addri->sin_addr.s_addr,
- hostent->h_addr_list[0], sizeof (struct in_addr));
+ hostent->h_addr_list[0], sizeof(struct in_addr));
addr = (struct sockaddr *)addri;
break;
{
struct sockaddr_in6 *addri6;
- addrlen = sizeof (struct sockaddr_in6);
+ addrlen = sizeof(struct sockaddr_in6);
addri6 = malloc(addrlen);
if (!addri6)
addri6->sin6_scope_id = 0;
memcpy(&addri6->sin6_addr.s6_addr,
- hostent->h_addr_list[0], sizeof (struct in6_addr));
+ hostent->h_addr_list[0], sizeof(struct in6_addr));
addr = (struct sockaddr *)addri6;
break;
{
struct sockaddr_in6 *addri6;
- addrlen = sizeof (struct sockaddr_in6);
+ addrlen = sizeof(struct sockaddr_in6);
addri6 = malloc(addrlen);
if (!addri6)
addri6->sin6_scope_id = 0;
memcpy(&addri6->sin6_addr.s6_addr,
- &arg->addr.v6, sizeof (struct in6_addr));
+ &arg->addr.v6, sizeof(struct in6_addr));
addr = (struct sockaddr *)addri6;
}
{
struct sockaddr_in *addri;
- addrlen = sizeof (struct sockaddr_in);
+ addrlen = sizeof(struct sockaddr_in);
addri = malloc(addrlen);
if (!addri)
addri->sin_port = htons(arg->svr->port);
memcpy(&addri->sin_addr.s_addr,
- &arg->addr.v4, sizeof (struct in_addr));
+ &arg->addr.v4, sizeof(struct in_addr));
addr = (struct sockaddr *)addri;
}
case ARES_EBADNAME: /* not a valid internet address */
case ARES_ENOMEM: /* not enough memory */
case ARES_EDESTRUCTION: /* request canceled, shuting down */
+ case ARES_ENODATA: /* no data returned */
goto on_error;
default:
ERR("gnutls returned with error: %s - %s", gnutls_strerror_name(ret), gnutls_strerror(ret));
}
+#ifdef ISCOMFITOR
static void
_gnutls_log_func(int level,
const char *str)
{
DBG("|<%d>| %s", level, str);
}
+#endif
static const char *
SSL_GNUTLS_PRINT_HANDSHAKE_STATUS(gnutls_handshake_description_t status)
#endif
if (gnutls_global_init())
return ECORE_CON_SSL_ERROR_INIT_FAILED;
+
+#ifdef ISCOMFITOR
gnutls_global_set_log_level(9);
gnutls_global_set_log_function(_gnutls_log_func);
-
+#endif
return ECORE_CON_SSL_ERROR_NONE;
}
break;
}
+#ifdef ISCOMFITOR
{
/* print session info into DBG */
SSL_SESSION *s;
BIO_free(b);
}
-
+#endif
if (!svr->verify)
/* not verifying certificates, so we're done! */
return ECORE_CON_SSL_ERROR_NONE;
break;
}
+#ifdef ISCOMFITOR
{
/* print session info into DBG */
SSL_SESSION *s;
BIO_free(b);
}
+#endif
if (!cl->host_server->verify)
/* not verifying certificates, so we're done! */
evas_event_feed_mouse_move(ee->evas, y, ee->w - x - 1, timestamp, NULL);
}
+void
+_ecore_evas_mouse_multi_move_process(Ecore_Evas *ee, int device,
+ int x, int y,
+ double radius,
+ double radius_x, double radius_y,
+ double pressure,
+ double angle,
+ double mx, double my,
+ unsigned int timestamp)
+{
+ if (ee->rotation == 0)
+ evas_event_feed_multi_move(ee->evas, device,
+ x, y,
+ radius,
+ radius_x, radius_y,
+ pressure,
+ angle - ee->rotation,
+ mx, my,
+ timestamp, NULL);
+ else if (ee->rotation == 90)
+ evas_event_feed_multi_move(ee->evas, device,
+ ee->h - y - 1, x,
+ radius,
+ radius_y, radius_x,
+ pressure,
+ angle - ee->rotation,
+ ee->h - my - 1, mx,
+ timestamp, NULL);
+ else if (ee->rotation == 180)
+ evas_event_feed_multi_move(ee->evas, device,
+ ee->w - x - 1, ee->h - y - 1,
+ radius,
+ radius_x, radius_y,
+ pressure,
+ angle - ee->rotation,
+ ee->w - mx - 1, ee->h - my - 1,
+ timestamp, NULL);
+ else if (ee->rotation == 270)
+ evas_event_feed_multi_move(ee->evas, device,
+ y, ee->w - x - 1,
+ radius,
+ radius_y, radius_x,
+ pressure,
+ angle - ee->rotation,
+ my, ee->w - mx - 1,
+ timestamp, NULL);
+}
+
+void
+_ecore_evas_mouse_multi_down_process(Ecore_Evas *ee, int device,
+ int x, int y,
+ double radius,
+ double radius_x, double radius_y,
+ double pressure,
+ double angle,
+ double mx, double my,
+ Evas_Button_Flags flags,
+ unsigned int timestamp)
+{
+ if (ee->rotation == 0)
+ evas_event_feed_multi_down(ee->evas, device,
+ x, y,
+ radius,
+ radius_x, radius_y,
+ pressure,
+ angle - ee->rotation,
+ mx, my,
+ flags, timestamp, NULL);
+ else if (ee->rotation == 90)
+ evas_event_feed_multi_down(ee->evas, device,
+ ee->h - y - 1, x,
+ radius,
+ radius_y, radius_x,
+ pressure,
+ angle - ee->rotation,
+ ee->h - my - 1, mx,
+ flags, timestamp, NULL);
+ else if (ee->rotation == 180)
+ evas_event_feed_multi_down(ee->evas, device,
+ ee->w - x - 1, ee->h - y - 1,
+ radius,
+ radius_x, radius_y,
+ pressure,
+ angle - ee->rotation,
+ ee->w - mx - 1, ee->h - my - 1,
+ flags, timestamp, NULL);
+ else if (ee->rotation == 270)
+ evas_event_feed_multi_down(ee->evas, device,
+ y, ee->w - x - 1,
+ radius,
+ radius_y, radius_x,
+ pressure,
+ angle - ee->rotation,
+ my, ee->w - mx - 1,
+ flags, timestamp, NULL);
+}
+
+void
+_ecore_evas_mouse_multi_up_process(Ecore_Evas *ee, int device,
+ int x, int y,
+ double radius,
+ double radius_x, double radius_y,
+ double pressure,
+ double angle,
+ double mx, double my,
+ Evas_Button_Flags flags,
+ unsigned int timestamp)
+{
+ if (ee->rotation == 0)
+ evas_event_feed_multi_up(ee->evas, device,
+ x, y,
+ radius,
+ radius_x, radius_y,
+ pressure,
+ angle - ee->rotation,
+ mx, my,
+ flags, timestamp, NULL);
+ else if (ee->rotation == 90)
+ evas_event_feed_multi_up(ee->evas, device,
+ ee->h - y - 1, x,
+ radius,
+ radius_y, radius_x,
+ pressure,
+ angle - ee->rotation,
+ ee->h - my - 1, mx,
+ flags, timestamp, NULL);
+ else if (ee->rotation == 180)
+ evas_event_feed_multi_up(ee->evas, device,
+ ee->w - x - 1, ee->h - y - 1,
+ radius,
+ radius_x, radius_y,
+ pressure,
+ angle - ee->rotation,
+ ee->w - mx - 1, ee->h - my - 1,
+ flags, timestamp, NULL);
+ else if (ee->rotation == 270)
+ evas_event_feed_multi_up(ee->evas, device,
+ y, ee->w - x - 1,
+ radius,
+ radius_y, radius_x,
+ pressure,
+ angle - ee->rotation,
+ my, ee->w - mx - 1,
+ flags, timestamp, NULL);
+}
+
/**
* Get a list of all the ecore_evases.
*
* @return A list of ecore_evases.
*/
EAPI Eina_List *
-ecore_evas_ecore_evas_list_get(void){
+ecore_evas_ecore_evas_list_get(void)
+{
Ecore_Evas *ee;
Eina_List *l = NULL;
-
+
EINA_INLIST_FOREACH(ecore_evases, ee)
{
l = eina_list_append(l, ee);
}
-
+
return l;
}
-
-
_ecore_evas_cocoa_init(w, h);
- ecore_event_window_register(0, ee, ee->evas, _ecore_evas_mouse_move_process);
+ ecore_event_window_register(0, ee, ee->evas,
+ (Ecore_Event_Mouse_Move_Cb)_ecore_evas_mouse_move_process,
+ (Ecore_Event_Multi_Move_Cb)_ecore_evas_mouse_multi_move_process,
+ (Ecore_Event_Multi_Down_Cb)_ecore_evas_mouse_multi_down_process,
+ (Ecore_Event_Multi_Up_Cb)_ecore_evas_mouse_multi_up_process);
ee->engine.func = (Ecore_Evas_Engine_Func *)&_ecore_cocoa_engine_func;
void _ecore_evas_free(Ecore_Evas *ee);
void _ecore_evas_idle_timeout_update(Ecore_Evas *ee);
void _ecore_evas_mouse_move_process(Ecore_Evas *ee, int x, int y, unsigned int timestamp);
+void _ecore_evas_mouse_multi_move_process(Ecore_Evas *ee, int device,
+ int x, int y,
+ double radius,
+ double radius_x, double radius_y,
+ double pressure,
+ double angle,
+ double mx, double my,
+ unsigned int timestamp);
+void _ecore_evas_mouse_multi_down_process(Ecore_Evas *ee, int device,
+ int x, int y,
+ double radius,
+ double radius_x, double radius_y,
+ double pressure,
+ double angle,
+ double mx, double my,
+ Evas_Button_Flags flags,
+ unsigned int timestamp);
+void _ecore_evas_mouse_multi_up_process(Ecore_Evas *ee, int device,
+ int x, int y,
+ double radius,
+ double radius_x, double radius_y,
+ double pressure,
+ double angle,
+ double mx, double my,
+ Evas_Button_Flags flags,
+ unsigned int timestamp);
extern Eina_Bool _ecore_evas_app_comp_sync;
_ecore_evas_sdl_init(w, h);
- ecore_event_window_register(0, ee, ee->evas, (Ecore_Event_Mouse_Move_Cb) _ecore_evas_mouse_move_process);
+ ecore_event_window_register(0, ee, ee->evas,
+ (Ecore_Event_Mouse_Move_Cb)_ecore_evas_mouse_move_process,
+ (Ecore_Event_Multi_Move_Cb)_ecore_evas_mouse_multi_move_process,
+ (Ecore_Event_Multi_Down_Cb)_ecore_evas_mouse_multi_down_process,
+ (Ecore_Event_Multi_Up_Cb)_ecore_evas_mouse_multi_up_process);
SDL_ShowCursor(SDL_DISABLE);
ee->engine.func->fn_render = _ecore_evas_win32_render;
_ecore_evas_register(ee);
- ecore_event_window_register(ee->prop.window, ee, ee->evas, (Ecore_Event_Mouse_Move_Cb)_ecore_evas_mouse_move_process);
+ ecore_event_window_register(ee->prop.window, ee, ee->evas,
+ (Ecore_Event_Mouse_Move_Cb)_ecore_evas_mouse_move_process,
+ (Ecore_Event_Multi_Move_Cb)_ecore_evas_mouse_multi_move_process,
+ (Ecore_Event_Multi_Down_Cb)_ecore_evas_mouse_multi_down_process,
+ (Ecore_Event_Multi_Up_Cb)_ecore_evas_mouse_multi_up_process);
return ee;
}
ee->engine.func->fn_render = _ecore_evas_wince_render;
_ecore_evas_register(ee);
- ecore_event_window_register(ee->prop.window, ee, ee->evas, (Ecore_Event_Mouse_Move_Cb)_ecore_evas_mouse_move_process);
+ ecore_event_window_register(ee->prop.window, ee, ee->evas,
+ (Ecore_Event_Mouse_Move_Cb)_ecore_evas_mouse_move_process,
+ (Ecore_Event_Multi_Move_Cb)_ecore_evas_mouse_multi_move_process,
+ (Ecore_Event_Multi_Down_Cb)_ecore_evas_mouse_multi_down_process,
+ (Ecore_Event_Multi_Up_Cb)_ecore_evas_mouse_multi_up_process);
evas_focus_in(ee->evas);
return ee;
evas_damage_rectangle_add(ee->evas, 0, 0, ee->req.w, ee->req.h);
ecore_x_window_shape_mask_set(ee->prop.window, 0);
ecore_x_input_multi_select(ee->prop.window);
- ecore_event_window_register(ee->prop.window, ee, ee->evas, (Ecore_Event_Mouse_Move_Cb) _ecore_evas_mouse_move_process);
+ ecore_event_window_register(ee->prop.window, ee, ee->evas,
+ (Ecore_Event_Mouse_Move_Cb)_ecore_evas_mouse_move_process,
+ (Ecore_Event_Multi_Move_Cb)_ecore_evas_mouse_multi_move_process,
+ (Ecore_Event_Multi_Down_Cb)_ecore_evas_mouse_multi_down_process,
+ (Ecore_Event_Multi_Up_Cb)_ecore_evas_mouse_multi_up_process);
if (ee->prop.borderless)
ecore_x_mwm_borderless_set(ee->prop.window, ee->prop.borderless);
if (ee->visible) ecore_x_window_show(ee->prop.window);
evas_damage_rectangle_add(ee->evas, 0, 0, ee->req.w, ee->req.h);
// ecore_x_window_shape_mask_set(ee->prop.window, 0);
ecore_x_input_multi_select(ee->prop.window);
- ecore_event_window_register(ee->prop.window, ee, ee->evas, (Ecore_Event_Mouse_Move_Cb) _ecore_evas_mouse_move_process);
+ ecore_event_window_register(ee->prop.window, ee, ee->evas,
+ (Ecore_Event_Mouse_Move_Cb)_ecore_evas_mouse_move_process,
+ (Ecore_Event_Multi_Move_Cb)_ecore_evas_mouse_multi_move_process,
+ (Ecore_Event_Multi_Down_Cb)_ecore_evas_mouse_multi_down_process,
+ (Ecore_Event_Multi_Up_Cb)_ecore_evas_mouse_multi_up_process);
if (ee->prop.borderless)
ecore_x_mwm_borderless_set(ee->prop.window, ee->prop.borderless);
if (ee->visible) ecore_x_window_show(ee->prop.window);
evas_damage_rectangle_add(ee->evas, 0, 0, ee->req.w, ee->req.h);
ecore_x_window_shape_mask_set(ee->prop.window, 0);
ecore_x_input_multi_select(ee->prop.window);
- ecore_event_window_register(ee->prop.window, ee, ee->evas, (Ecore_Event_Mouse_Move_Cb) _ecore_evas_mouse_move_process);
+ ecore_event_window_register(ee->prop.window, ee, ee->evas,
+ (Ecore_Event_Mouse_Move_Cb)_ecore_evas_mouse_move_process,
+ (Ecore_Event_Multi_Move_Cb)_ecore_evas_mouse_multi_move_process,
+ (Ecore_Event_Multi_Down_Cb)_ecore_evas_mouse_multi_down_process,
+ (Ecore_Event_Multi_Up_Cb)_ecore_evas_mouse_multi_up_process);
if (ee->prop.borderless)
ecore_x_mwm_borderless_set(ee->prop.window, ee->prop.borderless);
if (ee->visible) ecore_x_window_show(ee->prop.window);
evas_damage_rectangle_add(ee->evas, 0, 0, ee->req.w, ee->req.h);
ecore_x_window_shape_mask_set(ee->prop.window, 0);
ecore_x_input_multi_select(ee->prop.window);
- ecore_event_window_register(ee->prop.window, ee, ee->evas, (Ecore_Event_Mouse_Move_Cb) _ecore_evas_mouse_move_process);
+ ecore_event_window_register(ee->prop.window, ee, ee->evas,
+ (Ecore_Event_Mouse_Move_Cb)_ecore_evas_mouse_move_process,
+ (Ecore_Event_Multi_Move_Cb)_ecore_evas_mouse_multi_move_process,
+ (Ecore_Event_Multi_Down_Cb)_ecore_evas_mouse_multi_down_process,
+ (Ecore_Event_Multi_Up_Cb)_ecore_evas_mouse_multi_up_process);
if (ee->prop.borderless)
ecore_x_mwm_borderless_set(ee->prop.window, ee->prop.borderless);
if (ee->visible) ecore_x_window_show(ee->prop.window);
evas_damage_rectangle_add(ee->evas, 0, 0, ee->req.w, ee->req.h);
ecore_x_window_shape_mask_set(ee->prop.window, 0);
ecore_x_input_multi_select(ee->prop.window);
- ecore_event_window_register(ee->prop.window, ee, ee->evas, (Ecore_Event_Mouse_Move_Cb) _ecore_evas_mouse_move_process);
+ ecore_event_window_register(ee->prop.window, ee, ee->evas,
+ (Ecore_Event_Mouse_Move_Cb)_ecore_evas_mouse_move_process,
+ (Ecore_Event_Multi_Move_Cb)_ecore_evas_mouse_multi_move_process,
+ (Ecore_Event_Multi_Down_Cb)_ecore_evas_mouse_multi_down_process,
+ (Ecore_Event_Multi_Up_Cb)_ecore_evas_mouse_multi_up_process);
if (ee->prop.borderless)
ecore_x_mwm_borderless_set(ee->prop.window, ee->prop.borderless);
if (ee->visible) ecore_x_window_show(ee->prop.window);
ee->engine.func->fn_render = _ecore_evas_x_render;
_ecore_evas_register(ee);
ecore_x_input_multi_select(ee->prop.window);
- ecore_event_window_register(ee->prop.window, ee, ee->evas, (Ecore_Event_Mouse_Move_Cb) _ecore_evas_mouse_move_process);
+ ecore_event_window_register(ee->prop.window, ee, ee->evas,
+ (Ecore_Event_Mouse_Move_Cb)_ecore_evas_mouse_move_process,
+ (Ecore_Event_Multi_Move_Cb)_ecore_evas_mouse_multi_move_process,
+ (Ecore_Event_Multi_Down_Cb)_ecore_evas_mouse_multi_down_process,
+ (Ecore_Event_Multi_Up_Cb)_ecore_evas_mouse_multi_up_process);
return ee;
}
#else
*winp = win;
ee->engine.x.win_extra = eina_list_append(ee->engine.x.win_extra, winp);
ecore_x_input_multi_select(win);
- ecore_event_window_register(win, ee, ee->evas, (Ecore_Event_Mouse_Move_Cb) _ecore_evas_mouse_move_process);
+ ecore_event_window_register(win, ee, ee->evas,
+ (Ecore_Event_Mouse_Move_Cb)_ecore_evas_mouse_move_process,
+ (Ecore_Event_Multi_Move_Cb)_ecore_evas_mouse_multi_move_process,
+ (Ecore_Event_Multi_Down_Cb)_ecore_evas_mouse_multi_down_process,
+ (Ecore_Event_Multi_Up_Cb)_ecore_evas_mouse_multi_up_process);
}
}
#else
ee->engine.func->fn_render = _ecore_evas_x_render;
_ecore_evas_register(ee);
ecore_x_input_multi_select(ee->prop.window);
- ecore_event_window_register(ee->prop.window, ee, ee->evas, (Ecore_Event_Mouse_Move_Cb) _ecore_evas_mouse_move_process);
+ ecore_event_window_register(ee->prop.window, ee, ee->evas,
+ (Ecore_Event_Mouse_Move_Cb)_ecore_evas_mouse_move_process,
+ (Ecore_Event_Multi_Move_Cb)_ecore_evas_mouse_multi_move_process,
+ (Ecore_Event_Multi_Down_Cb)_ecore_evas_mouse_multi_down_process,
+ (Ecore_Event_Multi_Up_Cb)_ecore_evas_mouse_multi_up_process);
# endif /* HAVE_ECORE_X_XCB */
return ee;
ee->engine.func->fn_render = _ecore_evas_x_render;
_ecore_evas_register(ee);
ecore_x_input_multi_select(ee->prop.window);
- ecore_event_window_register(ee->prop.window, ee, ee->evas, (Ecore_Event_Mouse_Move_Cb) _ecore_evas_mouse_move_process);
+ ecore_event_window_register(ee->prop.window, ee, ee->evas,
+ (Ecore_Event_Mouse_Move_Cb)_ecore_evas_mouse_move_process,
+ (Ecore_Event_Multi_Move_Cb)_ecore_evas_mouse_multi_move_process,
+ (Ecore_Event_Multi_Down_Cb)_ecore_evas_mouse_multi_down_process,
+ (Ecore_Event_Multi_Up_Cb)_ecore_evas_mouse_multi_up_process);
return ee;
}
#else
ee->engine.func->fn_render = _ecore_evas_x_render;
_ecore_evas_register(ee);
ecore_x_input_multi_select(ee->prop.window);
- ecore_event_window_register(ee->prop.window, ee, ee->evas, (Ecore_Event_Mouse_Move_Cb) _ecore_evas_mouse_move_process);
+ ecore_event_window_register(ee->prop.window, ee, ee->evas,
+ (Ecore_Event_Mouse_Move_Cb)_ecore_evas_mouse_move_process,
+ (Ecore_Event_Multi_Move_Cb)_ecore_evas_mouse_multi_move_process,
+ (Ecore_Event_Multi_Down_Cb)_ecore_evas_mouse_multi_down_process,
+ (Ecore_Event_Multi_Up_Cb)_ecore_evas_mouse_multi_up_process);
return ee;
}
#else
*winp = win;
ee->engine.x.win_extra = eina_list_append(ee->engine.x.win_extra, winp);
ecore_x_input_multi_select(win);
- ecore_event_window_register(win, ee, ee->evas, (Ecore_Event_Mouse_Move_Cb) _ecore_evas_mouse_move_process);
+ ecore_event_window_register(win, ee, ee->evas,
+ (Ecore_Event_Mouse_Move_Cb)_ecore_evas_mouse_move_process,
+ (Ecore_Event_Multi_Move_Cb)_ecore_evas_mouse_multi_move_process,
+ (Ecore_Event_Multi_Down_Cb)_ecore_evas_mouse_multi_down_process,
+ (Ecore_Event_Multi_Up_Cb)_ecore_evas_mouse_multi_up_process);
}
}
#else
ee->engine.func->fn_render = _ecore_evas_x_render;
_ecore_evas_register(ee);
ecore_x_input_multi_select(ee->prop.window);
- ecore_event_window_register(ee->prop.window, ee, ee->evas, (Ecore_Event_Mouse_Move_Cb) _ecore_evas_mouse_move_process);
+ ecore_event_window_register(ee->prop.window, ee, ee->evas,
+ (Ecore_Event_Mouse_Move_Cb)_ecore_evas_mouse_move_process,
+ (Ecore_Event_Multi_Move_Cb)_ecore_evas_mouse_multi_move_process,
+ (Ecore_Event_Multi_Down_Cb)_ecore_evas_mouse_multi_down_process,
+ (Ecore_Event_Multi_Up_Cb)_ecore_evas_mouse_multi_up_process);
return ee;
#else
*winp = win;
ee->engine.x.win_extra = eina_list_append(ee->engine.x.win_extra, winp);
ecore_x_input_multi_select(win);
- ecore_event_window_register(win, ee, ee->evas, (Ecore_Event_Mouse_Move_Cb) _ecore_evas_mouse_move_process);
+ ecore_event_window_register(win, ee, ee->evas,
+ (Ecore_Event_Mouse_Move_Cb)_ecore_evas_mouse_move_process,
+ (Ecore_Event_Multi_Move_Cb)_ecore_evas_mouse_multi_move_process,
+ (Ecore_Event_Multi_Down_Cb)_ecore_evas_mouse_multi_down_process,
+ (Ecore_Event_Multi_Up_Cb)_ecore_evas_mouse_multi_up_process);
}
#else
return;
#endif
/* ecore_imf_context_input_panel_event_callback_add() flag */
- typedef enum
+ typedef enum
{
ECORE_IMF_INPUT_PANEL_STATE_EVENT, /**< Input Panel STATE Event */
ECORE_IMF_INPUT_PANEL_MODE_EVENT, /**< Input Panel MODE Event */
ECORE_IMF_INPUT_PANEL_EVENT_INVALID
} Ecore_IMF_Input_Panel_Event;
- typedef enum
+ typedef enum
{
ECORE_IMF_INPUT_PANEL_STATE_SHOW, /**< Show Input panel */
ECORE_IMF_INPUT_PANEL_STATE_HIDE, /**< Hide Input panel */
ECORE_IMF_INPUT_PANEL_STATE_INVALID
} Ecore_IMF_Input_Panel_State;
- typedef enum
+ typedef enum
{
ECORE_IMF_INPUT_PANEL_LAYOUT_NORMAL, /**< Default 4x4 layout */
ECORE_IMF_INPUT_PANEL_LAYOUT_NUMBER, /**< Number layout */
ECORE_IMF_INPUT_PANEL_LAYOUT_URL, /**< URL layout */
ECORE_IMF_INPUT_PANEL_LAYOUT_PHONENUMBER, /**< Phone Number layout */
ECORE_IMF_INPUT_PANEL_LAYOUT_IP, /**< IP layout */
- ECORE_IMF_INPUT_PANEL_LAYOUT_MONTH, /**< Month layout */
+ ECORE_IMF_INPUT_PANEL_LAYOUT_MONTH, /**< Month layout */
ECORE_IMF_INPUT_PANEL_LAYOUT_NUMBERONLY, /**< Number Only layout */
ECORE_IMF_INPUT_PANEL_LAYOUT_CUSTOM_1 = 100, /* Reserved for future use */
ECORE_IMF_INPUT_PANEL_LAYOUT_CUSTOM_2,
ECORE_IMF_INPUT_PANEL_LAYOUT_CUSTOM_7,
ECORE_IMF_INPUT_PANEL_LAYOUT_CUSTOM_8,
ECORE_IMF_INPUT_PANEL_LAYOUT_CUSTOM_9,
- ECORE_IMF_INPUT_PANEL_LAYOUT_CUSTOM_10,
+ ECORE_IMF_INPUT_PANEL_LAYOUT_CUSTOM_10,
ECORE_IMF_INPUT_PANEL_LAYOUT_INVALID
} Ecore_IMF_Input_Panel_Layout;
ECORE_IMF_KEYBOARD_LANG_ALPHABET /**< Alphabet */
} Ecore_IMF_Keyboard_Lang;
- typedef enum
+ typedef enum
{
ECORE_IMF_AUTOCORRECTION_DEFAULT,
ECORE_IMF_AUTOCORRECTION_NO,
typedef enum
{
- ECORE_IMF_INPUT_PANEL_CAPS_MODE_OFF, /**< Off */
- ECORE_IMF_INPUT_PANEL_CAPS_MODE_ON, /**< On */
+ ECORE_IMF_INPUT_PANEL_CAPS_MODE_OFF, /**< Off */
+ ECORE_IMF_INPUT_PANEL_CAPS_MODE_ON, /**< On */
ECORE_IMF_INPUT_PANEL_CAPS_MODE_LOCK, /**< Lock */
} Ecore_IMF_Input_Panel_Caps_Mode;
- typedef enum
+ typedef enum
{
ECORE_IMF_INPUT_PANEL_ORIENT_NONE,
ECORE_IMF_INPUT_PANEL_ORIENT_90_CW, /* Clockwise */
ECORE_IMF_INPUT_PANEL_ORIENT_90_CCW /* CounterClockwise */
} Ecore_IMF_Input_Panel_Orient;
- typedef struct _Disable_Key_Item Disable_Key_Item;
-
- struct _Disable_Key_Item
+ typedef struct
{
int layout_idx;
int key_idx;
Eina_Bool disabled;
- };
+ } Disable_Key_Item;
- typedef struct _Private_Key_Item Private_Key_Item;
-
- struct _Private_Key_Item
+ typedef struct
{
int layout_idx;
int key_idx;
char data[128]; // label or image path
int key_value;
char key_string[32];
- };
+ } Private_Key_Item;
/* Events sent by the Input Method */
typedef struct _Ecore_IMF_Event_Preedit_Start Ecore_IMF_Event_Preedit_Start;
{
Ecore_IMF_Preedit_Type preedit_type;
unsigned int start_index;
- unsigned int end_index;
- };
-
- typedef struct _Ecore_IMF_Input_Panel_Event_Callback Ecore_IMF_Input_Panel_Event_Callback;
-
- struct _Ecore_IMF_Input_Panel_Event_Callback
- {
- void (*func)(void *data, Ecore_IMF_Context *ctx, int value);
- const void *data;
- Ecore_IMF_Input_Panel_Event type;
+ unsigned int end_index;
};
struct _Ecore_IMF_Context_Class
Ecore_IMF_Input_Panel_Layout (*input_panel_layout_get) (Ecore_IMF_Context *ctx);
void (*input_panel_language_set) (Ecore_IMF_Context *ctx, Ecore_IMF_Input_Panel_Lang lang);
- Ecore_IMF_Input_Panel_Lang (*input_panel_language_get) (Ecore_IMF_Context *ctx);
+ Ecore_IMF_Input_Panel_Lang (*input_panel_language_get) (Ecore_IMF_Context *ctx);
void (*input_panel_imdata_set) (Ecore_IMF_Context *ctx, const char* data, int len);
void (*input_panel_imdata_get) (Ecore_IMF_Context *ctx, char* data, int *len);
* @param lang see Ecore_IMF_Input_Panel_Lang
* @ingroup Ecore_IMF_Context_IMControl_Group
* THIS API IS NOT SUPPORTED NOW
- */
+ */
EAPI void ecore_imf_context_input_panel_language_set (Ecore_IMF_Context *ctx, Ecore_IMF_Input_Panel_Lang lang);
/**
* @param lang see Ecore_IMF_Input_Panel_Lang
* @ingroup Ecore_IMF_Context_IMControl_Group
* THIS API IS NOT SUPPORTED NOW
- */
+ */
EAPI void ecore_imf_context_keyboard_language_set (Ecore_IMF_Context *ctx, Ecore_IMF_Keyboard_Lang lang);
/**
* @return Ecore_IMF_Input_Panel_Lang
* @ingroup Ecore_IMF_Context_IMControl_Group
* THIS API IS NOT SUPPORTED NOW
- */
+ */
EAPI Ecore_IMF_Keyboard_Lang ecore_imf_context_keyboard_language_get (Ecore_IMF_Context *ctx);
-
+
/**
* Get ISE Language of given ISE. -- Not supported for now --
* @ingroup Ecore_IMF_Context_IMControl_Group
* }
* }
* @endcode
- */
+ */
EAPI void ecore_imf_context_input_panel_imdata_set (Ecore_IMF_Context *ctx, const char * data, int len);
/**
* }
* }
* @endcode
- */
+ */
EAPI void ecore_imf_context_input_panel_use_effect_set (Ecore_IMF_Context *ctx, Eina_Bool use_effect);
/**
* return use_effect;
* }
* @endcode
- */
+ */
EAPI Eina_Bool ecore_imf_context_input_panel_use_effect_get (Ecore_IMF_Context *ctx);
/**
* }
* }
* @endcode
- */
+ */
EAPI void ecore_imf_context_input_panel_private_key_set (Ecore_IMF_Context *ctx, int layout_index, int key_index, const char *img_path, const char* label, int key_value, const char* key_string);
EAPI Eina_List *ecore_imf_context_input_panel_private_key_list_get (Ecore_IMF_Context *ctx);
* }
* }
*/
-
- EAPI Ecore_IMF_Input_Panel_Orient ecore_imf_context_input_panel_orient_get (Ecore_IMF_Context *ctx);
+
+ EAPI Ecore_IMF_Input_Panel_Orient ecore_imf_context_input_panel_orient_get (Ecore_IMF_Context *ctx);
/**
* Get name of current active ISE.
* //do imf irrelated things
* }
* @endcode
- */
+ */
EAPI int ecore_imf_context_ise_get_iselist (Ecore_IMF_Context *ctx, char*** iselist);
/**
* }
* @endcode
*/
- EAPI Ecore_IMF_Input_Panel_State ecore_imf_context_input_panel_state_get (Ecore_IMF_Context *ctx);
-
+ EAPI Ecore_IMF_Input_Panel_State ecore_imf_context_input_panel_state_get (Ecore_IMF_Context *ctx);
+
/**
* Application can register a callback function which will be called if there is change in ise state,language,mode etc.
* To use this API application should include Ecore_IMF.h header file.
* }
* @endcode
*/
- EAPI void ecore_imf_context_input_panel_key_disabled_set (Ecore_IMF_Context *ctx, int layout_index, int key_index, Eina_Bool disabled);
-
- EAPI Eina_List *ecore_imf_context_input_panel_key_disabled_list_get (Ecore_IMF_Context *ctx);
+ EAPI void ecore_imf_context_input_panel_key_disabled_set (Ecore_IMF_Context *ctx, int layout_index, int key_index, Eina_Bool disabled);
- EAPI Eina_List *ecore_imf_context_input_panel_event_callback_list_get (Ecore_IMF_Context *ctx);
+ EAPI Eina_List *ecore_imf_context_input_panel_key_disabled_list_get (Ecore_IMF_Context *ctx);
/**
* Move the soft keyboard to the new position.
* }
* @endcode
*/
- EAPI void ecore_imf_context_input_panel_move (Ecore_IMF_Context *ctx, int x, int y);
+ EAPI void ecore_imf_context_input_panel_move (Ecore_IMF_Context *ctx, int x, int y);
EAPI void ecore_imf_context_input_panel_caps_mode_set (Ecore_IMF_Context *ctx, Ecore_IMF_Input_Panel_Caps_Mode mode);
#define _INPUT_PANEL_KETDEFS_H_
-#define ECORE_IMF_INPUT_PANEL_KEY_RESERVED 0
-#define ECORE_IMF_INPUT_PANEL_KEY_ESC 1
+#define ECORE_IMF_INPUT_PANEL_KEY_RESERVED 0
+#define ECORE_IMF_INPUT_PANEL_KEY_ESC 1
#define ECORE_IMF_INPUT_PANEL_KEY_1 2
#define ECORE_IMF_INPUT_PANEL_KEY_2 3
#define ECORE_IMF_INPUT_PANEL_KEY_3 4
ecore_imf_init(void)
{
if (++_ecore_imf_init_count != 1) return _ecore_imf_init_count;
-
+
if (!ecore_init()) return --_ecore_imf_init_count;
_ecore_imf_log_dom = eina_log_domain_register("EcoreIMF", ECORE_IMF_DEFAULT_LOG_COLOR);
- if (_ecore_imf_log_dom < 0)
+ if (_ecore_imf_log_dom < 0)
{
EINA_LOG_ERR("Impossible to create a log domain for the Ecore IMF module.");
ecore_shutdown();
return --_ecore_imf_init_count;
}
ecore_imf_module_init();
-
+
ECORE_IMF_EVENT_PREEDIT_START = ecore_event_type_new();
ECORE_IMF_EVENT_PREEDIT_END = ecore_event_type_new();
ECORE_IMF_EVENT_PREEDIT_CHANGED = ecore_event_type_new();
EINA_LIST_FREE(ctx->disabled_key_list, data)
free(data);
- EINA_LIST_FREE(ctx->callbacks, data)
- free(data);
-
ctx->private_key_list = NULL;
ctx->disabled_key_list = NULL;
- ctx->callbacks = NULL;
free(ctx);
}
ctx->input_panel_layout = ECORE_IMF_INPUT_PANEL_LAYOUT_NORMAL;
ctx->input_panel_orient = ECORE_IMF_INPUT_PANEL_ORIENT_NONE;
ctx->use_effect = EINA_TRUE;
- ctx->disabled_key_list = NULL;
- ctx->private_key_list = NULL;
ctx->callbacks = NULL;
-
+
return ctx;
}
}
if (ctx->klass->input_panel_language_set) ctx->klass->input_panel_language_set(ctx, lang);
- ctx->input_panel_lang = lang;
+ ctx->input_panel_lang = lang;
}
EAPI Ecore_IMF_Input_Panel_Lang
return -1;
}
- if (ctx->klass->ise_get_ise_language)
+ if (ctx->klass->ise_get_ise_language)
return ctx->klass->ise_get_ise_language(ctx, ise_name, langlist);
- else
+ else
return -1;
}
return;
}
- if (!label && !img_path)
+ if (label == NULL && img_path == NULL)
{
printf ("input parameters error!!! \n");
return;
return ctx->private_key_list;
}
-EAPI void
+EAPI void
ecore_imf_context_input_panel_key_disabled_set (Ecore_IMF_Context *ctx, int layout_index, int key_index, Eina_Bool disabled)
{
Disable_Key_Item *key_item;
}
EAPI Eina_List *
-ecore_imf_context_input_panel_key_disabled_list_get (Ecore_IMF_Context *ctx)
+ecore_imf_context_input_panel_key_disabled_list_get (Ecore_IMF_Context *ctx)
{
- if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT))
- {
- ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,"ecore_imf_context_input_panel_key_disabled_list_get");
- return NULL;
- }
-
return ctx->disabled_key_list;
}
-EAPI Eina_List *
-ecore_imf_context_input_panel_event_callback_list_get (Ecore_IMF_Context *ctx)
-{
- if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT))
- {
- ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,"ecore_imf_context_input_panel_event_callback_list_get");
- return NULL;
- }
-
- return ctx->callbacks;
-}
-
EAPI void
ecore_imf_context_input_panel_layout_set (Ecore_IMF_Context *ctx, Ecore_IMF_Input_Panel_Layout layout)
{
return ECORE_IMF_INPUT_PANEL_LAYOUT_INVALID;
}
- if (ctx->klass->input_panel_layout_get)
+ if (ctx->klass->input_panel_layout_get )
{
// ctx->klass->input_panel_layout_get (ctx, &layout);
return ctx->input_panel_layout;
return ctx->input_panel_orient;
}
-EAPI void
+EAPI void
ecore_imf_context_ise_get_active_isename (Ecore_IMF_Context *ctx, char* name)
{
if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT))
if (ctx->klass->ise_get_active_isename) ctx->klass->ise_get_active_isename(ctx, name);
}
-
-EAPI void
+
+EAPI void
ecore_imf_context_ise_set_active_ise_by_name (Ecore_IMF_Context *ctx, const char* name)
{
if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT))
ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,"ecore_imf_context_ise_set_active_ise_by_name");
return;
}
-
+
if (!name)
{
printf ("input parameters error!!! \n");
if (ctx->klass->ise_set_active_ise_by_name) ctx->klass->ise_set_active_ise_by_name(ctx, name);
}
-
-EAPI void
+
+EAPI void
ecore_imf_context_ise_set_active_ise_by_uuid (Ecore_IMF_Context *ctx, const char* uuid)
{
if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT))
return -1;
}
- if (ctx->klass->ise_get_iselist)
+ if (ctx->klass->ise_get_iselist)
return ctx->klass->ise_get_iselist(ctx, iselist);
- else
+ else
return -1;
}
return ECORE_IMF_INPUT_PANEL_STATE_INVALID;
}
- if (ctx->klass->input_panel_state_get)
+ if (ctx->klass->input_panel_state_get)
state = ctx->klass->input_panel_state_get(ctx);
- return state;
+ return state;
}
EAPI void
-ecore_imf_context_input_panel_event_callback_add (Ecore_IMF_Context *ctx, Ecore_IMF_Input_Panel_Event type, void (*func) (void *data, Ecore_IMF_Context *ctx, int value), const void *data)
+ecore_imf_context_input_panel_event_callback_add (Ecore_IMF_Context *ctx, Ecore_IMF_Input_Panel_Event type, void (*pEventCallBackFunc) (void *data, Ecore_IMF_Context *ctx, int value), const void *data)
{
- Ecore_IMF_Input_Panel_Event_Callback *it;
-
if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT))
{
ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,"ecore_imf_context_input_panel_event_callback_add");
return;
}
- if (ctx->klass->input_panel_event_callback_add)
+ if (ctx->klass->input_panel_event_callback_add)
{
- it = calloc(1, sizeof(Ecore_IMF_Input_Panel_Event_Callback));
- if (!it) return;
-
- it->func = func;
- it->data = data;;
- it->type = type;
-
- ctx->callbacks = eina_list_append(ctx->callbacks, it);
-
- ctx->klass->input_panel_event_callback_add(ctx, type, func, data);
+ ctx->klass->input_panel_event_callback_add(ctx, type, pEventCallBackFunc, data);
}
}
EAPI void
-ecore_imf_context_input_panel_event_callback_del (Ecore_IMF_Context *ctx, Ecore_IMF_Input_Panel_Event type, void (*func) (void *data, Ecore_IMF_Context *ctx, int value))
+ecore_imf_context_input_panel_event_callback_del (Ecore_IMF_Context *ctx, Ecore_IMF_Input_Panel_Event type, void (*pEventCallBackFunc) (void *data, Ecore_IMF_Context *ctx, int value))
{
- Eina_List *l;
- Ecore_IMF_Input_Panel_Event_Callback *it;
-
if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT))
{
ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,"ecore_imf_context_input_panel_event_callback_del");
return;
}
- if (ctx->klass->input_panel_event_callback_del)
+ if (ctx->klass->input_panel_event_callback_del)
{
- for (l = ctx->callbacks; l;)
- {
- it = (Ecore_IMF_Input_Panel_Event_Callback *)l->data;
-
- if (it && it->func == func && it->type == type)
- {
- ctx->callbacks = eina_list_remove(ctx->callbacks, it);
- free(it);
- break;
- }
- l = l->next;
- }
-
- ctx->klass->input_panel_event_callback_del(ctx, type, func);
+ ctx->klass->input_panel_event_callback_del(ctx, type, pEventCallBackFunc);
}
}
void *retrieve_surrounding_data;
Eina_List *callbacks;
Eina_List *disabled_key_list;
- Eina_List *private_key_list;
+ Eina_List *private_key_list;
};
struct _Ecore_IMF_Module
#endif
typedef void (*Ecore_Event_Mouse_Move_Cb)(void *window, int x, int y, unsigned int timestamp);
-
+typedef void (*Ecore_Event_Multi_Move_Cb)(void *window, int device, int x, int y, double radius, double radius_x, double radius_y, double pressure, double angle, double mx, double my, unsigned int timestamp);
+typedef void (*Ecore_Event_Multi_Down_Cb)(void *window, int device, int x, int y, double radius, double radius_x, double radius_y, double pressure, double angle, double mx, double my, Evas_Button_Flags flags, unsigned int timestamp);
+typedef void (*Ecore_Event_Multi_Up_Cb)(void *window, int device, int x, int y, double radius, double radius_x, double radius_y, double pressure, double angle, double mx, double my, Evas_Button_Flags flags, unsigned int timestamp);
+
EAPI int ecore_event_evas_init(void);
EAPI int ecore_event_evas_shutdown(void);
EAPI Eina_Bool ecore_event_evas_mouse_in(void *data, int type, void *event);
EAPI Eina_Bool ecore_event_evas_mouse_out(void *data, int type, void *event);
-EAPI void ecore_event_window_register(Ecore_Window id, void *window, Evas *evas, Ecore_Event_Mouse_Move_Cb move_mouse);
+EAPI void ecore_event_window_register(Ecore_Window id, void *window, Evas *evas, Ecore_Event_Mouse_Move_Cb move_mouse, Ecore_Event_Multi_Move_Cb move_multi, Ecore_Event_Multi_Down_Cb down_multi, Ecore_Event_Multi_Up_Cb up_multi);
EAPI void ecore_event_window_unregister(Ecore_Window id);
EAPI void *ecore_event_window_match(Ecore_Window id);
EAPI void ecore_event_window_ignore_events(Ecore_Window id, int ignore_event);
Evas *evas;
void *window;
Ecore_Event_Mouse_Move_Cb move_mouse;
+ Ecore_Event_Multi_Move_Cb move_multi;
+ Ecore_Event_Multi_Down_Cb down_multi;
+ Ecore_Event_Multi_Up_Cb up_multi;
int ignore_event;
};
}
EAPI void
-ecore_event_window_register(Ecore_Window id, void *window, Evas *evas, Ecore_Event_Mouse_Move_Cb move_mouse)
+ecore_event_window_register(Ecore_Window id, void *window, Evas *evas,
+ Ecore_Event_Mouse_Move_Cb move_mouse,
+ Ecore_Event_Multi_Move_Cb move_multi,
+ Ecore_Event_Multi_Down_Cb down_multi,
+ Ecore_Event_Multi_Up_Cb up_multi)
{
Ecore_Input_Window *w;
w->evas = evas;
w->window = window;
w->move_mouse = move_mouse;
+ w->move_multi = move_multi;
+ w->down_multi = down_multi;
+ w->up_multi = up_multi;
w->ignore_event = 0;
eina_hash_add(_window_hash, &id, w);
{
ecore_event_evas_modifier_lock_update(lookup->evas, e->modifiers);
if (press == ECORE_DOWN)
- evas_event_feed_mouse_down(lookup->evas, e->buttons, flags, e->timestamp, NULL);
+ evas_event_feed_mouse_down(lookup->evas, e->buttons, flags,
+ e->timestamp, NULL);
else
- evas_event_feed_mouse_up(lookup->evas, e->buttons, flags, e->timestamp, NULL);
+ evas_event_feed_mouse_up(lookup->evas, e->buttons, flags,
+ e->timestamp, NULL);
}
else
{
if (press == ECORE_DOWN)
- evas_event_feed_multi_down(lookup->evas, e->multi.device, e->x, e->y, e->multi.radius, e->multi.radius_x, e->multi.radius_y, e->multi.pressure, e->multi.angle, e->multi.x, e->multi.y, flags, e->timestamp, NULL);
+ {
+ if (lookup->down_multi)
+ lookup->down_multi(lookup->window, e->multi.device,
+ e->x, e->y, e->multi.radius,
+ e->multi.radius_x, e->multi.radius_y,
+ e->multi.pressure, e->multi.angle,
+ e->multi.x, e->multi.y, flags,
+ e->timestamp);
+ else
+ evas_event_feed_multi_down(lookup->evas, e->multi.device,
+ e->x, e->y, e->multi.radius,
+ e->multi.radius_x, e->multi.radius_y,
+ e->multi.pressure, e->multi.angle,
+ e->multi.x, e->multi.y, flags,
+ e->timestamp, NULL);
+ }
else
- evas_event_feed_multi_up(lookup->evas, e->multi.device, e->x, e->y, e->multi.radius, e->multi.radius_x, e->multi.radius_y, e->multi.pressure, e->multi.angle, e->multi.x, e->multi.y, flags, e->timestamp, NULL);
+ {
+ if (lookup->up_multi)
+ lookup->up_multi(lookup->window, e->multi.device,
+ e->x, e->y, e->multi.radius,
+ e->multi.radius_x, e->multi.radius_y,
+ e->multi.pressure, e->multi.angle,
+ e->multi.x, e->multi.y, flags,
+ e->timestamp);
+ else
+ evas_event_feed_multi_up(lookup->evas, e->multi.device,
+ e->x, e->y, e->multi.radius,
+ e->multi.radius_x, e->multi.radius_y,
+ e->multi.pressure, e->multi.angle,
+ e->multi.x, e->multi.y, flags,
+ e->timestamp, NULL);
+ }
}
return ECORE_CALLBACK_RENEW;
}
if (e->multi.device == 0)
{
ecore_event_evas_modifier_lock_update(lookup->evas, e->modifiers);
- lookup->move_mouse(lookup->window, e->x, e->y, e->timestamp);
+ if (lookup->move_mouse)
+ lookup->move_mouse(lookup->window, e->x, e->y, e->timestamp);
+ else
+ evas_event_feed_mouse_move(lookup->evas, e->x, e->y, e->timestamp,
+ NULL);
}
else
{
- evas_event_feed_multi_move(lookup->evas, e->multi.device, e->x, e->y, e->multi.radius, e->multi.radius_x, e->multi.radius_y, e->multi.pressure, e->multi.angle, e->multi.x, e->multi.y, e->timestamp, NULL);
+ if (lookup->move_multi)
+ lookup->move_multi(lookup->window, e->multi.device,
+ e->x, e->y, e->multi.radius,
+ e->multi.radius_x, e->multi.radius_y,
+ e->multi.pressure, e->multi.angle,
+ e->multi.x, e->multi.y, e->timestamp);
+ else
+ evas_event_feed_multi_move(lookup->evas, e->multi.device,
+ e->x, e->y, e->multi.radius,
+ e->multi.radius_x, e->multi.radius_y,
+ e->multi.pressure, e->multi.angle,
+ e->multi.x, e->multi.y, e->timestamp,
+ NULL);
}
return ECORE_CALLBACK_RENEW;
}
#define MAXHOSTNAMELEN 256
#endif /* ifndef MAXHOSTNAMELEN */
-#define XK_MISCELLANY 1
#include <X11/Xlib.h>
#include <X11/Xproto.h>
#include <X11/Xutil.h>
#include <X11/extensions/XInput2.h>
#endif /* ifdef ECORE_XI2 */
+#ifndef XK_MISCELLANY
+# define XK_MISCELLANY 1
+#endif
+
#include "Ecore.h"
#include "ecore_private.h"
#include "Ecore_X.h"