efl/legacy/ecore/src/lib/ecore_evas/ecore_evas_directfb.c

574 lines
16 KiB
C
Raw Normal View History

#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#include <string.h>
#include <Ecore.h>
#include "ecore_private.h"
#ifdef BUILD_ECORE_EVAS_DIRECTFB
#include <Ecore_DirectFB.h>
#endif
#include "ecore_evas_private.h"
#include "Ecore_Evas.h"
#ifdef BUILD_ECORE_EVAS_DIRECTFB
static int _ecore_evas_init_count = 0;
static Ecore_Event_Handler *ecore_evas_event_handlers[13];
static Eina_Hash *ecore_evases_hash = NULL;
static int
_ecore_evas_directfb_render(Ecore_Evas *ee)
{
Eina_List *updates, *ll;
Ecore_Evas *ee2;
int rend = 0;
#ifdef BUILD_ECORE_EVAS_SOFTWARE_BUFFER
EINA_LIST_FOREACH(ee->sub_ecore_evas, ll, ee2)
{
if (ee2->func.fn_pre_render) ee2->func.fn_pre_render(ee2);
rend |= _ecore_evas_buffer_render(ee2);
if (ee2->func.fn_post_render) ee2->func.fn_post_render(ee2);
}
#endif
if (ee->func.fn_pre_render) ee->func.fn_pre_render(ee);
updates = evas_render_updates(ee->evas);
if (updates)
{
evas_render_updates_free(updates);
e: 1. configure/build changes to allow cross-compiling painlessly 2. pager module namespace changes - this was still dirty afdter the namespace cleanup, so clean it up 3. add a powersave subsystem - doesnt have an "automatic" way to turn on and off right now, this i think is best provided by modules (that do things like monitor acpi status's (eg close lid of laptop), AC power status etc. etc. this allows e to nicely defer "power" expensive actions to avoid disk spinups etc. 4. move to use the new ecore poller system - discussed long ago as part of power management/saving issues. now it exists 5. add a canvas idle flush call that helsp cope with the new shm greedy software x11 engine stuff 6. use the new powersave subsystem where appropriate 7. fix non-zeroed/initted memory access in e_fm_main 8. fix mem leak for e menus 9. remove ipc handlers for changed/removed config values 10. use animaotr not timer for menu scrolls - then menu scrolls obey the fps config 11. fix up timer/poll happienss of cursor idle stuff 12. remove avoid damage from popups for now - causing problems 13. change battery and temp readouts to b e shorter so they fit 14. pager can emit signals on focus change for mini-windows now 15. temperature module now uses a slave process and uses stdin/out to talk to it and get output - this makes e smoother as in my expereicne i found getting the temp on my laptop actually took like 200ms so e "hang" for 200ms while reading the acpi files - so now the subprocess does it and just writesa back to e when it gets it. ecore: 1. add ecore_pollers. see the documentation on them in doxygen comments :) 2. fix timers to only go off when they have to - bug there that made e's select time out a LOT more than it needed to. defensive coding hid the problem. now fixed. e should be much more power friendly now. 3. formatting/niceness in ecore_exe stuff 4. some comments on comments with SIGIO ideas vs. select 5. add call to be able to add an idle enterer at the start of the list of them, not just the end (as has been the default) 6. fix ecore_evas to support auto evas idler calls after 0.5 secs of idle in all canvases - and to do it right 7. if argb destination - set the shape EVENT shape (to mask out events in transparent regions much like shape does withotu translucency) 8. in ecore_x add support for the event shape evas: 1. fix cache to work properly and not just always fill up (as it seemed to like to think cahce useage dropped below 0 when it didnt and thus just over-fill) 2. software x11 engine now ONLY uses shm segments - no ximages over the socket. this ximage hack was there to avoid the 2 round trips involved in setting up an shm image - now i mitigated that wih an shm image cache pool. it keeps shm images around and repurposes them for new update regions if appropriate. this means many fewer shm creates (about 1/100th the number) and since we recycle the memory less 0 memory page filling by the kernel - in the end, i recorded about a 10-20% speedup over the old software x11 engine. simple tests i have seen up to 120% speedups. idle flush now does something - it frees all the cached shm segments. it has a hard-coded limit of 4mb worth of shm segments (or 32 segments - whichever comes first) to keep around. once can never complain much about speedups methinks :). also evas will defer sync until the NEXT frame is written - this means evas can calculate the next frame of data while x dma's/copies the images to the screen at the same time (if you hve a dual core or multi-cpu machnike or your xserver is able to use DMA to copy image data to the screen/video ram then this should see a decent speedup). SVN revision: 33448
2008-01-10 23:33:57 -08:00
_ecore_evas_idle_timeout_update(ee);
}
if (ee->func.fn_post_render) ee->func.fn_post_render(ee);
return updates ? 1 : rend;
}
static char *
_ecore_evas_directfb_winid_str_get(Ecore_X_Window win)
{
const char *vals = "qWeRtYuIoP5$&<~";
static char id[9];
unsigned int val;
val = (unsigned int)win;
id[0] = vals[(val >> 28) & 0xf];
id[1] = vals[(val >> 24) & 0xf];
id[2] = vals[(val >> 20) & 0xf];
id[3] = vals[(val >> 16) & 0xf];
id[4] = vals[(val >> 12) & 0xf];
id[5] = vals[(val >> 8) & 0xf];
id[6] = vals[(val >> 4) & 0xf];
id[7] = vals[(val ) & 0xf];
id[8] = 0;
return id;
}
static Ecore_Evas *
_ecore_evas_directfb_match(DFBWindowID win)
{
Ecore_Evas *ee;
ee = eina_hash_find(ecore_evases_hash, _ecore_evas_directfb_winid_str_get(win));
return ee;
}
static Eina_Bool
_ecore_evas_directfb_event_key_down(void *data __UNUSED__, int type __UNUSED__, void *event)
{
Ecore_Evas *ee;
Ecore_DirectFB_Event_Key_Down *e;
e = event;
ee = _ecore_evas_directfb_match(e->win);
if (!ee) return EINA_TRUE; /* pass on event */
evas_event_feed_key_down(ee->evas, e->name, e->name, e->string,
e->key_compose, e->time, NULL);
return EINA_TRUE;
}
Fix callback signatures The change from returning int to Eina_Bool left several call sites with warnings because they were not updated. Here they are fixed by using Coccinelle, a tool that allows us to automate tasks like that. This commit was generated from the following semantic patch: virtual org @r1@ identifier fn!=NULL, fn2; expression E1, E2, E3; @@ ( ecore_event_handler_add(E1, fn, ...) | ecore_event_filter_add(E1, fn, ...) | ecore_idler_add(fn, ...) | ecore_idle_enterer_add(E1, fn, ...) | ecore_idle_enterer_before_add(E1, fn, ...) | ecore_idle_exiter_add(E1, fn, ...) | ecore_main_fd_handler_add(E1, E2, fn, E3, fn2, ...) | ecore_main_win32_handler_add(E1, fn, ...) | ecore_timer_add(E1, fn, ...) | ecore_timer_loop_add(E1, fn, ...) | ecore_animator_add(fn, ...) | ecore_poller_add(E1, E2, fn, ...) ) @r2@ identifier r1.fn; identifier ret; typedef Eina_Bool; position p; @@ - int + Eina_Bool fn@p(...) { <... ( - return 1; + return EINA_TRUE; | - return 0; + return EINA_FALSE; | - int + Eina_Bool ret; ... return <+...ret...+>; | return ...; ) ...> } @r3@ identifier r1.fn2; identifier ret; position p; @@ - int + Eina_Bool fn2@p(...) { ... ( - return 1; + return EINA_TRUE; | - return 0; + return EINA_FALSE; | - int + Eina_Bool ret; ... return <+...ret...+>; | return ...; ) ... } @r4@ identifier r1.fn; @@ - int + Eina_Bool fn(...); @r5@ identifier r1.fn2; @@ - int + Eina_Bool fn2(...); @script:python depends on org@ p << r2.p; f << r1.fn; @@ import sys msg="WARNING: wrong callback %s! ( %s:%s )" % (f, p[0].file,p[0].line) print >> sys.stderr, msg @script:python depends on org@ p << r3.p; f << r1.fn2; @@ import sys msg="WARNING: wrong callback %s! ( %s:%s )" % (f, p[0].file,p[0].line) print >> sys.stderr, msg SVN revision: 49985
2010-07-01 18:38:05 -07:00
static Eina_Bool
_ecore_evas_directfb_event_key_up(void *data __UNUSED__, int type __UNUSED__, void *event)
{
Ecore_Evas *ee;
Ecore_DirectFB_Event_Key_Up *e;
e = event;
ee = _ecore_evas_directfb_match(e->win);
Fix callback signatures The change from returning int to Eina_Bool left several call sites with warnings because they were not updated. Here they are fixed by using Coccinelle, a tool that allows us to automate tasks like that. This commit was generated from the following semantic patch: virtual org @r1@ identifier fn!=NULL, fn2; expression E1, E2, E3; @@ ( ecore_event_handler_add(E1, fn, ...) | ecore_event_filter_add(E1, fn, ...) | ecore_idler_add(fn, ...) | ecore_idle_enterer_add(E1, fn, ...) | ecore_idle_enterer_before_add(E1, fn, ...) | ecore_idle_exiter_add(E1, fn, ...) | ecore_main_fd_handler_add(E1, E2, fn, E3, fn2, ...) | ecore_main_win32_handler_add(E1, fn, ...) | ecore_timer_add(E1, fn, ...) | ecore_timer_loop_add(E1, fn, ...) | ecore_animator_add(fn, ...) | ecore_poller_add(E1, E2, fn, ...) ) @r2@ identifier r1.fn; identifier ret; typedef Eina_Bool; position p; @@ - int + Eina_Bool fn@p(...) { <... ( - return 1; + return EINA_TRUE; | - return 0; + return EINA_FALSE; | - int + Eina_Bool ret; ... return <+...ret...+>; | return ...; ) ...> } @r3@ identifier r1.fn2; identifier ret; position p; @@ - int + Eina_Bool fn2@p(...) { ... ( - return 1; + return EINA_TRUE; | - return 0; + return EINA_FALSE; | - int + Eina_Bool ret; ... return <+...ret...+>; | return ...; ) ... } @r4@ identifier r1.fn; @@ - int + Eina_Bool fn(...); @r5@ identifier r1.fn2; @@ - int + Eina_Bool fn2(...); @script:python depends on org@ p << r2.p; f << r1.fn; @@ import sys msg="WARNING: wrong callback %s! ( %s:%s )" % (f, p[0].file,p[0].line) print >> sys.stderr, msg @script:python depends on org@ p << r3.p; f << r1.fn2; @@ import sys msg="WARNING: wrong callback %s! ( %s:%s )" % (f, p[0].file,p[0].line) print >> sys.stderr, msg SVN revision: 49985
2010-07-01 18:38:05 -07:00
if (!ee) return EINA_TRUE; /* pass on event */
evas_event_feed_key_up(ee->evas, e->name, e->name, e->string,
e->key_compose, e->time, NULL);
Fix callback signatures The change from returning int to Eina_Bool left several call sites with warnings because they were not updated. Here they are fixed by using Coccinelle, a tool that allows us to automate tasks like that. This commit was generated from the following semantic patch: virtual org @r1@ identifier fn!=NULL, fn2; expression E1, E2, E3; @@ ( ecore_event_handler_add(E1, fn, ...) | ecore_event_filter_add(E1, fn, ...) | ecore_idler_add(fn, ...) | ecore_idle_enterer_add(E1, fn, ...) | ecore_idle_enterer_before_add(E1, fn, ...) | ecore_idle_exiter_add(E1, fn, ...) | ecore_main_fd_handler_add(E1, E2, fn, E3, fn2, ...) | ecore_main_win32_handler_add(E1, fn, ...) | ecore_timer_add(E1, fn, ...) | ecore_timer_loop_add(E1, fn, ...) | ecore_animator_add(fn, ...) | ecore_poller_add(E1, E2, fn, ...) ) @r2@ identifier r1.fn; identifier ret; typedef Eina_Bool; position p; @@ - int + Eina_Bool fn@p(...) { <... ( - return 1; + return EINA_TRUE; | - return 0; + return EINA_FALSE; | - int + Eina_Bool ret; ... return <+...ret...+>; | return ...; ) ...> } @r3@ identifier r1.fn2; identifier ret; position p; @@ - int + Eina_Bool fn2@p(...) { ... ( - return 1; + return EINA_TRUE; | - return 0; + return EINA_FALSE; | - int + Eina_Bool ret; ... return <+...ret...+>; | return ...; ) ... } @r4@ identifier r1.fn; @@ - int + Eina_Bool fn(...); @r5@ identifier r1.fn2; @@ - int + Eina_Bool fn2(...); @script:python depends on org@ p << r2.p; f << r1.fn; @@ import sys msg="WARNING: wrong callback %s! ( %s:%s )" % (f, p[0].file,p[0].line) print >> sys.stderr, msg @script:python depends on org@ p << r3.p; f << r1.fn2; @@ import sys msg="WARNING: wrong callback %s! ( %s:%s )" % (f, p[0].file,p[0].line) print >> sys.stderr, msg SVN revision: 49985
2010-07-01 18:38:05 -07:00
return EINA_TRUE;
}
Fix callback signatures The change from returning int to Eina_Bool left several call sites with warnings because they were not updated. Here they are fixed by using Coccinelle, a tool that allows us to automate tasks like that. This commit was generated from the following semantic patch: virtual org @r1@ identifier fn!=NULL, fn2; expression E1, E2, E3; @@ ( ecore_event_handler_add(E1, fn, ...) | ecore_event_filter_add(E1, fn, ...) | ecore_idler_add(fn, ...) | ecore_idle_enterer_add(E1, fn, ...) | ecore_idle_enterer_before_add(E1, fn, ...) | ecore_idle_exiter_add(E1, fn, ...) | ecore_main_fd_handler_add(E1, E2, fn, E3, fn2, ...) | ecore_main_win32_handler_add(E1, fn, ...) | ecore_timer_add(E1, fn, ...) | ecore_timer_loop_add(E1, fn, ...) | ecore_animator_add(fn, ...) | ecore_poller_add(E1, E2, fn, ...) ) @r2@ identifier r1.fn; identifier ret; typedef Eina_Bool; position p; @@ - int + Eina_Bool fn@p(...) { <... ( - return 1; + return EINA_TRUE; | - return 0; + return EINA_FALSE; | - int + Eina_Bool ret; ... return <+...ret...+>; | return ...; ) ...> } @r3@ identifier r1.fn2; identifier ret; position p; @@ - int + Eina_Bool fn2@p(...) { ... ( - return 1; + return EINA_TRUE; | - return 0; + return EINA_FALSE; | - int + Eina_Bool ret; ... return <+...ret...+>; | return ...; ) ... } @r4@ identifier r1.fn; @@ - int + Eina_Bool fn(...); @r5@ identifier r1.fn2; @@ - int + Eina_Bool fn2(...); @script:python depends on org@ p << r2.p; f << r1.fn; @@ import sys msg="WARNING: wrong callback %s! ( %s:%s )" % (f, p[0].file,p[0].line) print >> sys.stderr, msg @script:python depends on org@ p << r3.p; f << r1.fn2; @@ import sys msg="WARNING: wrong callback %s! ( %s:%s )" % (f, p[0].file,p[0].line) print >> sys.stderr, msg SVN revision: 49985
2010-07-01 18:38:05 -07:00
static Eina_Bool
_ecore_evas_directfb_event_motion(void *data __UNUSED__, int type __UNUSED__, void *event)
{
Ecore_Evas *ee;
Ecore_DirectFB_Event_Motion *e;
e = event;
ee = _ecore_evas_directfb_match(e->win);
Fix callback signatures The change from returning int to Eina_Bool left several call sites with warnings because they were not updated. Here they are fixed by using Coccinelle, a tool that allows us to automate tasks like that. This commit was generated from the following semantic patch: virtual org @r1@ identifier fn!=NULL, fn2; expression E1, E2, E3; @@ ( ecore_event_handler_add(E1, fn, ...) | ecore_event_filter_add(E1, fn, ...) | ecore_idler_add(fn, ...) | ecore_idle_enterer_add(E1, fn, ...) | ecore_idle_enterer_before_add(E1, fn, ...) | ecore_idle_exiter_add(E1, fn, ...) | ecore_main_fd_handler_add(E1, E2, fn, E3, fn2, ...) | ecore_main_win32_handler_add(E1, fn, ...) | ecore_timer_add(E1, fn, ...) | ecore_timer_loop_add(E1, fn, ...) | ecore_animator_add(fn, ...) | ecore_poller_add(E1, E2, fn, ...) ) @r2@ identifier r1.fn; identifier ret; typedef Eina_Bool; position p; @@ - int + Eina_Bool fn@p(...) { <... ( - return 1; + return EINA_TRUE; | - return 0; + return EINA_FALSE; | - int + Eina_Bool ret; ... return <+...ret...+>; | return ...; ) ...> } @r3@ identifier r1.fn2; identifier ret; position p; @@ - int + Eina_Bool fn2@p(...) { ... ( - return 1; + return EINA_TRUE; | - return 0; + return EINA_FALSE; | - int + Eina_Bool ret; ... return <+...ret...+>; | return ...; ) ... } @r4@ identifier r1.fn; @@ - int + Eina_Bool fn(...); @r5@ identifier r1.fn2; @@ - int + Eina_Bool fn2(...); @script:python depends on org@ p << r2.p; f << r1.fn; @@ import sys msg="WARNING: wrong callback %s! ( %s:%s )" % (f, p[0].file,p[0].line) print >> sys.stderr, msg @script:python depends on org@ p << r3.p; f << r1.fn2; @@ import sys msg="WARNING: wrong callback %s! ( %s:%s )" % (f, p[0].file,p[0].line) print >> sys.stderr, msg SVN revision: 49985
2010-07-01 18:38:05 -07:00
if (!ee) return EINA_TRUE; /* pass on event */
_ecore_evas_mouse_move_process(ee, e->x, e->y, e->time);
Fix callback signatures The change from returning int to Eina_Bool left several call sites with warnings because they were not updated. Here they are fixed by using Coccinelle, a tool that allows us to automate tasks like that. This commit was generated from the following semantic patch: virtual org @r1@ identifier fn!=NULL, fn2; expression E1, E2, E3; @@ ( ecore_event_handler_add(E1, fn, ...) | ecore_event_filter_add(E1, fn, ...) | ecore_idler_add(fn, ...) | ecore_idle_enterer_add(E1, fn, ...) | ecore_idle_enterer_before_add(E1, fn, ...) | ecore_idle_exiter_add(E1, fn, ...) | ecore_main_fd_handler_add(E1, E2, fn, E3, fn2, ...) | ecore_main_win32_handler_add(E1, fn, ...) | ecore_timer_add(E1, fn, ...) | ecore_timer_loop_add(E1, fn, ...) | ecore_animator_add(fn, ...) | ecore_poller_add(E1, E2, fn, ...) ) @r2@ identifier r1.fn; identifier ret; typedef Eina_Bool; position p; @@ - int + Eina_Bool fn@p(...) { <... ( - return 1; + return EINA_TRUE; | - return 0; + return EINA_FALSE; | - int + Eina_Bool ret; ... return <+...ret...+>; | return ...; ) ...> } @r3@ identifier r1.fn2; identifier ret; position p; @@ - int + Eina_Bool fn2@p(...) { ... ( - return 1; + return EINA_TRUE; | - return 0; + return EINA_FALSE; | - int + Eina_Bool ret; ... return <+...ret...+>; | return ...; ) ... } @r4@ identifier r1.fn; @@ - int + Eina_Bool fn(...); @r5@ identifier r1.fn2; @@ - int + Eina_Bool fn2(...); @script:python depends on org@ p << r2.p; f << r1.fn; @@ import sys msg="WARNING: wrong callback %s! ( %s:%s )" % (f, p[0].file,p[0].line) print >> sys.stderr, msg @script:python depends on org@ p << r3.p; f << r1.fn2; @@ import sys msg="WARNING: wrong callback %s! ( %s:%s )" % (f, p[0].file,p[0].line) print >> sys.stderr, msg SVN revision: 49985
2010-07-01 18:38:05 -07:00
return EINA_TRUE;
}
Fix callback signatures The change from returning int to Eina_Bool left several call sites with warnings because they were not updated. Here they are fixed by using Coccinelle, a tool that allows us to automate tasks like that. This commit was generated from the following semantic patch: virtual org @r1@ identifier fn!=NULL, fn2; expression E1, E2, E3; @@ ( ecore_event_handler_add(E1, fn, ...) | ecore_event_filter_add(E1, fn, ...) | ecore_idler_add(fn, ...) | ecore_idle_enterer_add(E1, fn, ...) | ecore_idle_enterer_before_add(E1, fn, ...) | ecore_idle_exiter_add(E1, fn, ...) | ecore_main_fd_handler_add(E1, E2, fn, E3, fn2, ...) | ecore_main_win32_handler_add(E1, fn, ...) | ecore_timer_add(E1, fn, ...) | ecore_timer_loop_add(E1, fn, ...) | ecore_animator_add(fn, ...) | ecore_poller_add(E1, E2, fn, ...) ) @r2@ identifier r1.fn; identifier ret; typedef Eina_Bool; position p; @@ - int + Eina_Bool fn@p(...) { <... ( - return 1; + return EINA_TRUE; | - return 0; + return EINA_FALSE; | - int + Eina_Bool ret; ... return <+...ret...+>; | return ...; ) ...> } @r3@ identifier r1.fn2; identifier ret; position p; @@ - int + Eina_Bool fn2@p(...) { ... ( - return 1; + return EINA_TRUE; | - return 0; + return EINA_FALSE; | - int + Eina_Bool ret; ... return <+...ret...+>; | return ...; ) ... } @r4@ identifier r1.fn; @@ - int + Eina_Bool fn(...); @r5@ identifier r1.fn2; @@ - int + Eina_Bool fn2(...); @script:python depends on org@ p << r2.p; f << r1.fn; @@ import sys msg="WARNING: wrong callback %s! ( %s:%s )" % (f, p[0].file,p[0].line) print >> sys.stderr, msg @script:python depends on org@ p << r3.p; f << r1.fn2; @@ import sys msg="WARNING: wrong callback %s! ( %s:%s )" % (f, p[0].file,p[0].line) print >> sys.stderr, msg SVN revision: 49985
2010-07-01 18:38:05 -07:00
static Eina_Bool
_ecore_evas_directfb_event_button_down(void *data __UNUSED__, int type __UNUSED__, void *event)
{
Ecore_Evas *ee;
Ecore_DirectFB_Event_Button_Down *e;
e = event;
ee = _ecore_evas_directfb_match(e->win);
Fix callback signatures The change from returning int to Eina_Bool left several call sites with warnings because they were not updated. Here they are fixed by using Coccinelle, a tool that allows us to automate tasks like that. This commit was generated from the following semantic patch: virtual org @r1@ identifier fn!=NULL, fn2; expression E1, E2, E3; @@ ( ecore_event_handler_add(E1, fn, ...) | ecore_event_filter_add(E1, fn, ...) | ecore_idler_add(fn, ...) | ecore_idle_enterer_add(E1, fn, ...) | ecore_idle_enterer_before_add(E1, fn, ...) | ecore_idle_exiter_add(E1, fn, ...) | ecore_main_fd_handler_add(E1, E2, fn, E3, fn2, ...) | ecore_main_win32_handler_add(E1, fn, ...) | ecore_timer_add(E1, fn, ...) | ecore_timer_loop_add(E1, fn, ...) | ecore_animator_add(fn, ...) | ecore_poller_add(E1, E2, fn, ...) ) @r2@ identifier r1.fn; identifier ret; typedef Eina_Bool; position p; @@ - int + Eina_Bool fn@p(...) { <... ( - return 1; + return EINA_TRUE; | - return 0; + return EINA_FALSE; | - int + Eina_Bool ret; ... return <+...ret...+>; | return ...; ) ...> } @r3@ identifier r1.fn2; identifier ret; position p; @@ - int + Eina_Bool fn2@p(...) { ... ( - return 1; + return EINA_TRUE; | - return 0; + return EINA_FALSE; | - int + Eina_Bool ret; ... return <+...ret...+>; | return ...; ) ... } @r4@ identifier r1.fn; @@ - int + Eina_Bool fn(...); @r5@ identifier r1.fn2; @@ - int + Eina_Bool fn2(...); @script:python depends on org@ p << r2.p; f << r1.fn; @@ import sys msg="WARNING: wrong callback %s! ( %s:%s )" % (f, p[0].file,p[0].line) print >> sys.stderr, msg @script:python depends on org@ p << r3.p; f << r1.fn2; @@ import sys msg="WARNING: wrong callback %s! ( %s:%s )" % (f, p[0].file,p[0].line) print >> sys.stderr, msg SVN revision: 49985
2010-07-01 18:38:05 -07:00
if (!ee) return EINA_TRUE; /* pass on event */
// _ecore_evas_mouse_move_process(ee, e->x, e->y, e->time);
evas_event_feed_mouse_down(ee->evas, e->button, EVAS_BUTTON_NONE, e->time, NULL);
Fix callback signatures The change from returning int to Eina_Bool left several call sites with warnings because they were not updated. Here they are fixed by using Coccinelle, a tool that allows us to automate tasks like that. This commit was generated from the following semantic patch: virtual org @r1@ identifier fn!=NULL, fn2; expression E1, E2, E3; @@ ( ecore_event_handler_add(E1, fn, ...) | ecore_event_filter_add(E1, fn, ...) | ecore_idler_add(fn, ...) | ecore_idle_enterer_add(E1, fn, ...) | ecore_idle_enterer_before_add(E1, fn, ...) | ecore_idle_exiter_add(E1, fn, ...) | ecore_main_fd_handler_add(E1, E2, fn, E3, fn2, ...) | ecore_main_win32_handler_add(E1, fn, ...) | ecore_timer_add(E1, fn, ...) | ecore_timer_loop_add(E1, fn, ...) | ecore_animator_add(fn, ...) | ecore_poller_add(E1, E2, fn, ...) ) @r2@ identifier r1.fn; identifier ret; typedef Eina_Bool; position p; @@ - int + Eina_Bool fn@p(...) { <... ( - return 1; + return EINA_TRUE; | - return 0; + return EINA_FALSE; | - int + Eina_Bool ret; ... return <+...ret...+>; | return ...; ) ...> } @r3@ identifier r1.fn2; identifier ret; position p; @@ - int + Eina_Bool fn2@p(...) { ... ( - return 1; + return EINA_TRUE; | - return 0; + return EINA_FALSE; | - int + Eina_Bool ret; ... return <+...ret...+>; | return ...; ) ... } @r4@ identifier r1.fn; @@ - int + Eina_Bool fn(...); @r5@ identifier r1.fn2; @@ - int + Eina_Bool fn2(...); @script:python depends on org@ p << r2.p; f << r1.fn; @@ import sys msg="WARNING: wrong callback %s! ( %s:%s )" % (f, p[0].file,p[0].line) print >> sys.stderr, msg @script:python depends on org@ p << r3.p; f << r1.fn2; @@ import sys msg="WARNING: wrong callback %s! ( %s:%s )" % (f, p[0].file,p[0].line) print >> sys.stderr, msg SVN revision: 49985
2010-07-01 18:38:05 -07:00
return EINA_TRUE;
}
Fix callback signatures The change from returning int to Eina_Bool left several call sites with warnings because they were not updated. Here they are fixed by using Coccinelle, a tool that allows us to automate tasks like that. This commit was generated from the following semantic patch: virtual org @r1@ identifier fn!=NULL, fn2; expression E1, E2, E3; @@ ( ecore_event_handler_add(E1, fn, ...) | ecore_event_filter_add(E1, fn, ...) | ecore_idler_add(fn, ...) | ecore_idle_enterer_add(E1, fn, ...) | ecore_idle_enterer_before_add(E1, fn, ...) | ecore_idle_exiter_add(E1, fn, ...) | ecore_main_fd_handler_add(E1, E2, fn, E3, fn2, ...) | ecore_main_win32_handler_add(E1, fn, ...) | ecore_timer_add(E1, fn, ...) | ecore_timer_loop_add(E1, fn, ...) | ecore_animator_add(fn, ...) | ecore_poller_add(E1, E2, fn, ...) ) @r2@ identifier r1.fn; identifier ret; typedef Eina_Bool; position p; @@ - int + Eina_Bool fn@p(...) { <... ( - return 1; + return EINA_TRUE; | - return 0; + return EINA_FALSE; | - int + Eina_Bool ret; ... return <+...ret...+>; | return ...; ) ...> } @r3@ identifier r1.fn2; identifier ret; position p; @@ - int + Eina_Bool fn2@p(...) { ... ( - return 1; + return EINA_TRUE; | - return 0; + return EINA_FALSE; | - int + Eina_Bool ret; ... return <+...ret...+>; | return ...; ) ... } @r4@ identifier r1.fn; @@ - int + Eina_Bool fn(...); @r5@ identifier r1.fn2; @@ - int + Eina_Bool fn2(...); @script:python depends on org@ p << r2.p; f << r1.fn; @@ import sys msg="WARNING: wrong callback %s! ( %s:%s )" % (f, p[0].file,p[0].line) print >> sys.stderr, msg @script:python depends on org@ p << r3.p; f << r1.fn2; @@ import sys msg="WARNING: wrong callback %s! ( %s:%s )" % (f, p[0].file,p[0].line) print >> sys.stderr, msg SVN revision: 49985
2010-07-01 18:38:05 -07:00
static Eina_Bool
_ecore_evas_directfb_event_button_up(void *data __UNUSED__, int type __UNUSED__, void *event)
{
Ecore_Evas *ee;
Ecore_DirectFB_Event_Button_Up *e;
Evas_Button_Flags flags = EVAS_BUTTON_NONE;
e = event;
ee = _ecore_evas_directfb_match(e->win);
Fix callback signatures The change from returning int to Eina_Bool left several call sites with warnings because they were not updated. Here they are fixed by using Coccinelle, a tool that allows us to automate tasks like that. This commit was generated from the following semantic patch: virtual org @r1@ identifier fn!=NULL, fn2; expression E1, E2, E3; @@ ( ecore_event_handler_add(E1, fn, ...) | ecore_event_filter_add(E1, fn, ...) | ecore_idler_add(fn, ...) | ecore_idle_enterer_add(E1, fn, ...) | ecore_idle_enterer_before_add(E1, fn, ...) | ecore_idle_exiter_add(E1, fn, ...) | ecore_main_fd_handler_add(E1, E2, fn, E3, fn2, ...) | ecore_main_win32_handler_add(E1, fn, ...) | ecore_timer_add(E1, fn, ...) | ecore_timer_loop_add(E1, fn, ...) | ecore_animator_add(fn, ...) | ecore_poller_add(E1, E2, fn, ...) ) @r2@ identifier r1.fn; identifier ret; typedef Eina_Bool; position p; @@ - int + Eina_Bool fn@p(...) { <... ( - return 1; + return EINA_TRUE; | - return 0; + return EINA_FALSE; | - int + Eina_Bool ret; ... return <+...ret...+>; | return ...; ) ...> } @r3@ identifier r1.fn2; identifier ret; position p; @@ - int + Eina_Bool fn2@p(...) { ... ( - return 1; + return EINA_TRUE; | - return 0; + return EINA_FALSE; | - int + Eina_Bool ret; ... return <+...ret...+>; | return ...; ) ... } @r4@ identifier r1.fn; @@ - int + Eina_Bool fn(...); @r5@ identifier r1.fn2; @@ - int + Eina_Bool fn2(...); @script:python depends on org@ p << r2.p; f << r1.fn; @@ import sys msg="WARNING: wrong callback %s! ( %s:%s )" % (f, p[0].file,p[0].line) print >> sys.stderr, msg @script:python depends on org@ p << r3.p; f << r1.fn2; @@ import sys msg="WARNING: wrong callback %s! ( %s:%s )" % (f, p[0].file,p[0].line) print >> sys.stderr, msg SVN revision: 49985
2010-07-01 18:38:05 -07:00
if (!ee) return EINA_TRUE; /* pass on event */
//_ecore_evas_mouse_move_process(ee, e->x, e->y, e->time);
evas_event_feed_mouse_up(ee->evas, e->button, flags, e->time, NULL);
Fix callback signatures The change from returning int to Eina_Bool left several call sites with warnings because they were not updated. Here they are fixed by using Coccinelle, a tool that allows us to automate tasks like that. This commit was generated from the following semantic patch: virtual org @r1@ identifier fn!=NULL, fn2; expression E1, E2, E3; @@ ( ecore_event_handler_add(E1, fn, ...) | ecore_event_filter_add(E1, fn, ...) | ecore_idler_add(fn, ...) | ecore_idle_enterer_add(E1, fn, ...) | ecore_idle_enterer_before_add(E1, fn, ...) | ecore_idle_exiter_add(E1, fn, ...) | ecore_main_fd_handler_add(E1, E2, fn, E3, fn2, ...) | ecore_main_win32_handler_add(E1, fn, ...) | ecore_timer_add(E1, fn, ...) | ecore_timer_loop_add(E1, fn, ...) | ecore_animator_add(fn, ...) | ecore_poller_add(E1, E2, fn, ...) ) @r2@ identifier r1.fn; identifier ret; typedef Eina_Bool; position p; @@ - int + Eina_Bool fn@p(...) { <... ( - return 1; + return EINA_TRUE; | - return 0; + return EINA_FALSE; | - int + Eina_Bool ret; ... return <+...ret...+>; | return ...; ) ...> } @r3@ identifier r1.fn2; identifier ret; position p; @@ - int + Eina_Bool fn2@p(...) { ... ( - return 1; + return EINA_TRUE; | - return 0; + return EINA_FALSE; | - int + Eina_Bool ret; ... return <+...ret...+>; | return ...; ) ... } @r4@ identifier r1.fn; @@ - int + Eina_Bool fn(...); @r5@ identifier r1.fn2; @@ - int + Eina_Bool fn2(...); @script:python depends on org@ p << r2.p; f << r1.fn; @@ import sys msg="WARNING: wrong callback %s! ( %s:%s )" % (f, p[0].file,p[0].line) print >> sys.stderr, msg @script:python depends on org@ p << r3.p; f << r1.fn2; @@ import sys msg="WARNING: wrong callback %s! ( %s:%s )" % (f, p[0].file,p[0].line) print >> sys.stderr, msg SVN revision: 49985
2010-07-01 18:38:05 -07:00
return EINA_TRUE;
}
Fix callback signatures The change from returning int to Eina_Bool left several call sites with warnings because they were not updated. Here they are fixed by using Coccinelle, a tool that allows us to automate tasks like that. This commit was generated from the following semantic patch: virtual org @r1@ identifier fn!=NULL, fn2; expression E1, E2, E3; @@ ( ecore_event_handler_add(E1, fn, ...) | ecore_event_filter_add(E1, fn, ...) | ecore_idler_add(fn, ...) | ecore_idle_enterer_add(E1, fn, ...) | ecore_idle_enterer_before_add(E1, fn, ...) | ecore_idle_exiter_add(E1, fn, ...) | ecore_main_fd_handler_add(E1, E2, fn, E3, fn2, ...) | ecore_main_win32_handler_add(E1, fn, ...) | ecore_timer_add(E1, fn, ...) | ecore_timer_loop_add(E1, fn, ...) | ecore_animator_add(fn, ...) | ecore_poller_add(E1, E2, fn, ...) ) @r2@ identifier r1.fn; identifier ret; typedef Eina_Bool; position p; @@ - int + Eina_Bool fn@p(...) { <... ( - return 1; + return EINA_TRUE; | - return 0; + return EINA_FALSE; | - int + Eina_Bool ret; ... return <+...ret...+>; | return ...; ) ...> } @r3@ identifier r1.fn2; identifier ret; position p; @@ - int + Eina_Bool fn2@p(...) { ... ( - return 1; + return EINA_TRUE; | - return 0; + return EINA_FALSE; | - int + Eina_Bool ret; ... return <+...ret...+>; | return ...; ) ... } @r4@ identifier r1.fn; @@ - int + Eina_Bool fn(...); @r5@ identifier r1.fn2; @@ - int + Eina_Bool fn2(...); @script:python depends on org@ p << r2.p; f << r1.fn; @@ import sys msg="WARNING: wrong callback %s! ( %s:%s )" % (f, p[0].file,p[0].line) print >> sys.stderr, msg @script:python depends on org@ p << r3.p; f << r1.fn2; @@ import sys msg="WARNING: wrong callback %s! ( %s:%s )" % (f, p[0].file,p[0].line) print >> sys.stderr, msg SVN revision: 49985
2010-07-01 18:38:05 -07:00
static Eina_Bool
_ecore_evas_directfb_event_enter(void *data __UNUSED__, int type __UNUSED__, void *event)
{
Ecore_Evas *ee;
Ecore_DirectFB_Event_Enter *e;
e = event;
ee = _ecore_evas_directfb_match(e->win);
Fix callback signatures The change from returning int to Eina_Bool left several call sites with warnings because they were not updated. Here they are fixed by using Coccinelle, a tool that allows us to automate tasks like that. This commit was generated from the following semantic patch: virtual org @r1@ identifier fn!=NULL, fn2; expression E1, E2, E3; @@ ( ecore_event_handler_add(E1, fn, ...) | ecore_event_filter_add(E1, fn, ...) | ecore_idler_add(fn, ...) | ecore_idle_enterer_add(E1, fn, ...) | ecore_idle_enterer_before_add(E1, fn, ...) | ecore_idle_exiter_add(E1, fn, ...) | ecore_main_fd_handler_add(E1, E2, fn, E3, fn2, ...) | ecore_main_win32_handler_add(E1, fn, ...) | ecore_timer_add(E1, fn, ...) | ecore_timer_loop_add(E1, fn, ...) | ecore_animator_add(fn, ...) | ecore_poller_add(E1, E2, fn, ...) ) @r2@ identifier r1.fn; identifier ret; typedef Eina_Bool; position p; @@ - int + Eina_Bool fn@p(...) { <... ( - return 1; + return EINA_TRUE; | - return 0; + return EINA_FALSE; | - int + Eina_Bool ret; ... return <+...ret...+>; | return ...; ) ...> } @r3@ identifier r1.fn2; identifier ret; position p; @@ - int + Eina_Bool fn2@p(...) { ... ( - return 1; + return EINA_TRUE; | - return 0; + return EINA_FALSE; | - int + Eina_Bool ret; ... return <+...ret...+>; | return ...; ) ... } @r4@ identifier r1.fn; @@ - int + Eina_Bool fn(...); @r5@ identifier r1.fn2; @@ - int + Eina_Bool fn2(...); @script:python depends on org@ p << r2.p; f << r1.fn; @@ import sys msg="WARNING: wrong callback %s! ( %s:%s )" % (f, p[0].file,p[0].line) print >> sys.stderr, msg @script:python depends on org@ p << r3.p; f << r1.fn2; @@ import sys msg="WARNING: wrong callback %s! ( %s:%s )" % (f, p[0].file,p[0].line) print >> sys.stderr, msg SVN revision: 49985
2010-07-01 18:38:05 -07:00
if (!ee) return EINA_TRUE; /* pass on event */
evas_event_feed_mouse_in(ee->evas, e->time, NULL);
//_ecore_evas_mouse_move_process(ee, e->x, e->y, e->time);
Fix callback signatures The change from returning int to Eina_Bool left several call sites with warnings because they were not updated. Here they are fixed by using Coccinelle, a tool that allows us to automate tasks like that. This commit was generated from the following semantic patch: virtual org @r1@ identifier fn!=NULL, fn2; expression E1, E2, E3; @@ ( ecore_event_handler_add(E1, fn, ...) | ecore_event_filter_add(E1, fn, ...) | ecore_idler_add(fn, ...) | ecore_idle_enterer_add(E1, fn, ...) | ecore_idle_enterer_before_add(E1, fn, ...) | ecore_idle_exiter_add(E1, fn, ...) | ecore_main_fd_handler_add(E1, E2, fn, E3, fn2, ...) | ecore_main_win32_handler_add(E1, fn, ...) | ecore_timer_add(E1, fn, ...) | ecore_timer_loop_add(E1, fn, ...) | ecore_animator_add(fn, ...) | ecore_poller_add(E1, E2, fn, ...) ) @r2@ identifier r1.fn; identifier ret; typedef Eina_Bool; position p; @@ - int + Eina_Bool fn@p(...) { <... ( - return 1; + return EINA_TRUE; | - return 0; + return EINA_FALSE; | - int + Eina_Bool ret; ... return <+...ret...+>; | return ...; ) ...> } @r3@ identifier r1.fn2; identifier ret; position p; @@ - int + Eina_Bool fn2@p(...) { ... ( - return 1; + return EINA_TRUE; | - return 0; + return EINA_FALSE; | - int + Eina_Bool ret; ... return <+...ret...+>; | return ...; ) ... } @r4@ identifier r1.fn; @@ - int + Eina_Bool fn(...); @r5@ identifier r1.fn2; @@ - int + Eina_Bool fn2(...); @script:python depends on org@ p << r2.p; f << r1.fn; @@ import sys msg="WARNING: wrong callback %s! ( %s:%s )" % (f, p[0].file,p[0].line) print >> sys.stderr, msg @script:python depends on org@ p << r3.p; f << r1.fn2; @@ import sys msg="WARNING: wrong callback %s! ( %s:%s )" % (f, p[0].file,p[0].line) print >> sys.stderr, msg SVN revision: 49985
2010-07-01 18:38:05 -07:00
return EINA_TRUE;
}
Fix callback signatures The change from returning int to Eina_Bool left several call sites with warnings because they were not updated. Here they are fixed by using Coccinelle, a tool that allows us to automate tasks like that. This commit was generated from the following semantic patch: virtual org @r1@ identifier fn!=NULL, fn2; expression E1, E2, E3; @@ ( ecore_event_handler_add(E1, fn, ...) | ecore_event_filter_add(E1, fn, ...) | ecore_idler_add(fn, ...) | ecore_idle_enterer_add(E1, fn, ...) | ecore_idle_enterer_before_add(E1, fn, ...) | ecore_idle_exiter_add(E1, fn, ...) | ecore_main_fd_handler_add(E1, E2, fn, E3, fn2, ...) | ecore_main_win32_handler_add(E1, fn, ...) | ecore_timer_add(E1, fn, ...) | ecore_timer_loop_add(E1, fn, ...) | ecore_animator_add(fn, ...) | ecore_poller_add(E1, E2, fn, ...) ) @r2@ identifier r1.fn; identifier ret; typedef Eina_Bool; position p; @@ - int + Eina_Bool fn@p(...) { <... ( - return 1; + return EINA_TRUE; | - return 0; + return EINA_FALSE; | - int + Eina_Bool ret; ... return <+...ret...+>; | return ...; ) ...> } @r3@ identifier r1.fn2; identifier ret; position p; @@ - int + Eina_Bool fn2@p(...) { ... ( - return 1; + return EINA_TRUE; | - return 0; + return EINA_FALSE; | - int + Eina_Bool ret; ... return <+...ret...+>; | return ...; ) ... } @r4@ identifier r1.fn; @@ - int + Eina_Bool fn(...); @r5@ identifier r1.fn2; @@ - int + Eina_Bool fn2(...); @script:python depends on org@ p << r2.p; f << r1.fn; @@ import sys msg="WARNING: wrong callback %s! ( %s:%s )" % (f, p[0].file,p[0].line) print >> sys.stderr, msg @script:python depends on org@ p << r3.p; f << r1.fn2; @@ import sys msg="WARNING: wrong callback %s! ( %s:%s )" % (f, p[0].file,p[0].line) print >> sys.stderr, msg SVN revision: 49985
2010-07-01 18:38:05 -07:00
static Eina_Bool
_ecore_evas_directfb_event_leave(void *data __UNUSED__, int type __UNUSED__, void *event)
{
Ecore_Evas *ee;
Ecore_DirectFB_Event_Leave *e;
e = event;
ee = _ecore_evas_directfb_match(e->win);
Fix callback signatures The change from returning int to Eina_Bool left several call sites with warnings because they were not updated. Here they are fixed by using Coccinelle, a tool that allows us to automate tasks like that. This commit was generated from the following semantic patch: virtual org @r1@ identifier fn!=NULL, fn2; expression E1, E2, E3; @@ ( ecore_event_handler_add(E1, fn, ...) | ecore_event_filter_add(E1, fn, ...) | ecore_idler_add(fn, ...) | ecore_idle_enterer_add(E1, fn, ...) | ecore_idle_enterer_before_add(E1, fn, ...) | ecore_idle_exiter_add(E1, fn, ...) | ecore_main_fd_handler_add(E1, E2, fn, E3, fn2, ...) | ecore_main_win32_handler_add(E1, fn, ...) | ecore_timer_add(E1, fn, ...) | ecore_timer_loop_add(E1, fn, ...) | ecore_animator_add(fn, ...) | ecore_poller_add(E1, E2, fn, ...) ) @r2@ identifier r1.fn; identifier ret; typedef Eina_Bool; position p; @@ - int + Eina_Bool fn@p(...) { <... ( - return 1; + return EINA_TRUE; | - return 0; + return EINA_FALSE; | - int + Eina_Bool ret; ... return <+...ret...+>; | return ...; ) ...> } @r3@ identifier r1.fn2; identifier ret; position p; @@ - int + Eina_Bool fn2@p(...) { ... ( - return 1; + return EINA_TRUE; | - return 0; + return EINA_FALSE; | - int + Eina_Bool ret; ... return <+...ret...+>; | return ...; ) ... } @r4@ identifier r1.fn; @@ - int + Eina_Bool fn(...); @r5@ identifier r1.fn2; @@ - int + Eina_Bool fn2(...); @script:python depends on org@ p << r2.p; f << r1.fn; @@ import sys msg="WARNING: wrong callback %s! ( %s:%s )" % (f, p[0].file,p[0].line) print >> sys.stderr, msg @script:python depends on org@ p << r3.p; f << r1.fn2; @@ import sys msg="WARNING: wrong callback %s! ( %s:%s )" % (f, p[0].file,p[0].line) print >> sys.stderr, msg SVN revision: 49985
2010-07-01 18:38:05 -07:00
if (!ee) return EINA_TRUE; /* pass on event */
evas_event_feed_mouse_out(ee->evas, e->time, NULL);
//_ecore_evas_mouse_move_process(ee, e->x, e->y, e->time);
if (ee->func.fn_mouse_out) ee->func.fn_mouse_out(ee);
if (ee->prop.cursor.object) evas_object_hide(ee->prop.cursor.object);
Fix callback signatures The change from returning int to Eina_Bool left several call sites with warnings because they were not updated. Here they are fixed by using Coccinelle, a tool that allows us to automate tasks like that. This commit was generated from the following semantic patch: virtual org @r1@ identifier fn!=NULL, fn2; expression E1, E2, E3; @@ ( ecore_event_handler_add(E1, fn, ...) | ecore_event_filter_add(E1, fn, ...) | ecore_idler_add(fn, ...) | ecore_idle_enterer_add(E1, fn, ...) | ecore_idle_enterer_before_add(E1, fn, ...) | ecore_idle_exiter_add(E1, fn, ...) | ecore_main_fd_handler_add(E1, E2, fn, E3, fn2, ...) | ecore_main_win32_handler_add(E1, fn, ...) | ecore_timer_add(E1, fn, ...) | ecore_timer_loop_add(E1, fn, ...) | ecore_animator_add(fn, ...) | ecore_poller_add(E1, E2, fn, ...) ) @r2@ identifier r1.fn; identifier ret; typedef Eina_Bool; position p; @@ - int + Eina_Bool fn@p(...) { <... ( - return 1; + return EINA_TRUE; | - return 0; + return EINA_FALSE; | - int + Eina_Bool ret; ... return <+...ret...+>; | return ...; ) ...> } @r3@ identifier r1.fn2; identifier ret; position p; @@ - int + Eina_Bool fn2@p(...) { ... ( - return 1; + return EINA_TRUE; | - return 0; + return EINA_FALSE; | - int + Eina_Bool ret; ... return <+...ret...+>; | return ...; ) ... } @r4@ identifier r1.fn; @@ - int + Eina_Bool fn(...); @r5@ identifier r1.fn2; @@ - int + Eina_Bool fn2(...); @script:python depends on org@ p << r2.p; f << r1.fn; @@ import sys msg="WARNING: wrong callback %s! ( %s:%s )" % (f, p[0].file,p[0].line) print >> sys.stderr, msg @script:python depends on org@ p << r3.p; f << r1.fn2; @@ import sys msg="WARNING: wrong callback %s! ( %s:%s )" % (f, p[0].file,p[0].line) print >> sys.stderr, msg SVN revision: 49985
2010-07-01 18:38:05 -07:00
return EINA_TRUE;
}
Fix callback signatures The change from returning int to Eina_Bool left several call sites with warnings because they were not updated. Here they are fixed by using Coccinelle, a tool that allows us to automate tasks like that. This commit was generated from the following semantic patch: virtual org @r1@ identifier fn!=NULL, fn2; expression E1, E2, E3; @@ ( ecore_event_handler_add(E1, fn, ...) | ecore_event_filter_add(E1, fn, ...) | ecore_idler_add(fn, ...) | ecore_idle_enterer_add(E1, fn, ...) | ecore_idle_enterer_before_add(E1, fn, ...) | ecore_idle_exiter_add(E1, fn, ...) | ecore_main_fd_handler_add(E1, E2, fn, E3, fn2, ...) | ecore_main_win32_handler_add(E1, fn, ...) | ecore_timer_add(E1, fn, ...) | ecore_timer_loop_add(E1, fn, ...) | ecore_animator_add(fn, ...) | ecore_poller_add(E1, E2, fn, ...) ) @r2@ identifier r1.fn; identifier ret; typedef Eina_Bool; position p; @@ - int + Eina_Bool fn@p(...) { <... ( - return 1; + return EINA_TRUE; | - return 0; + return EINA_FALSE; | - int + Eina_Bool ret; ... return <+...ret...+>; | return ...; ) ...> } @r3@ identifier r1.fn2; identifier ret; position p; @@ - int + Eina_Bool fn2@p(...) { ... ( - return 1; + return EINA_TRUE; | - return 0; + return EINA_FALSE; | - int + Eina_Bool ret; ... return <+...ret...+>; | return ...; ) ... } @r4@ identifier r1.fn; @@ - int + Eina_Bool fn(...); @r5@ identifier r1.fn2; @@ - int + Eina_Bool fn2(...); @script:python depends on org@ p << r2.p; f << r1.fn; @@ import sys msg="WARNING: wrong callback %s! ( %s:%s )" % (f, p[0].file,p[0].line) print >> sys.stderr, msg @script:python depends on org@ p << r3.p; f << r1.fn2; @@ import sys msg="WARNING: wrong callback %s! ( %s:%s )" % (f, p[0].file,p[0].line) print >> sys.stderr, msg SVN revision: 49985
2010-07-01 18:38:05 -07:00
static Eina_Bool
_ecore_evas_directfb_event_wheel(void *data __UNUSED__, int type __UNUSED__, void *event)
{
Ecore_Evas *ee;
Ecore_DirectFB_Event_Wheel *e;
e = event;
ee = _ecore_evas_directfb_match(e->win);
Fix callback signatures The change from returning int to Eina_Bool left several call sites with warnings because they were not updated. Here they are fixed by using Coccinelle, a tool that allows us to automate tasks like that. This commit was generated from the following semantic patch: virtual org @r1@ identifier fn!=NULL, fn2; expression E1, E2, E3; @@ ( ecore_event_handler_add(E1, fn, ...) | ecore_event_filter_add(E1, fn, ...) | ecore_idler_add(fn, ...) | ecore_idle_enterer_add(E1, fn, ...) | ecore_idle_enterer_before_add(E1, fn, ...) | ecore_idle_exiter_add(E1, fn, ...) | ecore_main_fd_handler_add(E1, E2, fn, E3, fn2, ...) | ecore_main_win32_handler_add(E1, fn, ...) | ecore_timer_add(E1, fn, ...) | ecore_timer_loop_add(E1, fn, ...) | ecore_animator_add(fn, ...) | ecore_poller_add(E1, E2, fn, ...) ) @r2@ identifier r1.fn; identifier ret; typedef Eina_Bool; position p; @@ - int + Eina_Bool fn@p(...) { <... ( - return 1; + return EINA_TRUE; | - return 0; + return EINA_FALSE; | - int + Eina_Bool ret; ... return <+...ret...+>; | return ...; ) ...> } @r3@ identifier r1.fn2; identifier ret; position p; @@ - int + Eina_Bool fn2@p(...) { ... ( - return 1; + return EINA_TRUE; | - return 0; + return EINA_FALSE; | - int + Eina_Bool ret; ... return <+...ret...+>; | return ...; ) ... } @r4@ identifier r1.fn; @@ - int + Eina_Bool fn(...); @r5@ identifier r1.fn2; @@ - int + Eina_Bool fn2(...); @script:python depends on org@ p << r2.p; f << r1.fn; @@ import sys msg="WARNING: wrong callback %s! ( %s:%s )" % (f, p[0].file,p[0].line) print >> sys.stderr, msg @script:python depends on org@ p << r3.p; f << r1.fn2; @@ import sys msg="WARNING: wrong callback %s! ( %s:%s )" % (f, p[0].file,p[0].line) print >> sys.stderr, msg SVN revision: 49985
2010-07-01 18:38:05 -07:00
if (!ee) return EINA_TRUE; /* pass on event */
evas_event_feed_mouse_wheel(ee->evas, e->direction, e->z, e->time, NULL);
Fix callback signatures The change from returning int to Eina_Bool left several call sites with warnings because they were not updated. Here they are fixed by using Coccinelle, a tool that allows us to automate tasks like that. This commit was generated from the following semantic patch: virtual org @r1@ identifier fn!=NULL, fn2; expression E1, E2, E3; @@ ( ecore_event_handler_add(E1, fn, ...) | ecore_event_filter_add(E1, fn, ...) | ecore_idler_add(fn, ...) | ecore_idle_enterer_add(E1, fn, ...) | ecore_idle_enterer_before_add(E1, fn, ...) | ecore_idle_exiter_add(E1, fn, ...) | ecore_main_fd_handler_add(E1, E2, fn, E3, fn2, ...) | ecore_main_win32_handler_add(E1, fn, ...) | ecore_timer_add(E1, fn, ...) | ecore_timer_loop_add(E1, fn, ...) | ecore_animator_add(fn, ...) | ecore_poller_add(E1, E2, fn, ...) ) @r2@ identifier r1.fn; identifier ret; typedef Eina_Bool; position p; @@ - int + Eina_Bool fn@p(...) { <... ( - return 1; + return EINA_TRUE; | - return 0; + return EINA_FALSE; | - int + Eina_Bool ret; ... return <+...ret...+>; | return ...; ) ...> } @r3@ identifier r1.fn2; identifier ret; position p; @@ - int + Eina_Bool fn2@p(...) { ... ( - return 1; + return EINA_TRUE; | - return 0; + return EINA_FALSE; | - int + Eina_Bool ret; ... return <+...ret...+>; | return ...; ) ... } @r4@ identifier r1.fn; @@ - int + Eina_Bool fn(...); @r5@ identifier r1.fn2; @@ - int + Eina_Bool fn2(...); @script:python depends on org@ p << r2.p; f << r1.fn; @@ import sys msg="WARNING: wrong callback %s! ( %s:%s )" % (f, p[0].file,p[0].line) print >> sys.stderr, msg @script:python depends on org@ p << r3.p; f << r1.fn2; @@ import sys msg="WARNING: wrong callback %s! ( %s:%s )" % (f, p[0].file,p[0].line) print >> sys.stderr, msg SVN revision: 49985
2010-07-01 18:38:05 -07:00
return EINA_TRUE;
}
Fix callback signatures The change from returning int to Eina_Bool left several call sites with warnings because they were not updated. Here they are fixed by using Coccinelle, a tool that allows us to automate tasks like that. This commit was generated from the following semantic patch: virtual org @r1@ identifier fn!=NULL, fn2; expression E1, E2, E3; @@ ( ecore_event_handler_add(E1, fn, ...) | ecore_event_filter_add(E1, fn, ...) | ecore_idler_add(fn, ...) | ecore_idle_enterer_add(E1, fn, ...) | ecore_idle_enterer_before_add(E1, fn, ...) | ecore_idle_exiter_add(E1, fn, ...) | ecore_main_fd_handler_add(E1, E2, fn, E3, fn2, ...) | ecore_main_win32_handler_add(E1, fn, ...) | ecore_timer_add(E1, fn, ...) | ecore_timer_loop_add(E1, fn, ...) | ecore_animator_add(fn, ...) | ecore_poller_add(E1, E2, fn, ...) ) @r2@ identifier r1.fn; identifier ret; typedef Eina_Bool; position p; @@ - int + Eina_Bool fn@p(...) { <... ( - return 1; + return EINA_TRUE; | - return 0; + return EINA_FALSE; | - int + Eina_Bool ret; ... return <+...ret...+>; | return ...; ) ...> } @r3@ identifier r1.fn2; identifier ret; position p; @@ - int + Eina_Bool fn2@p(...) { ... ( - return 1; + return EINA_TRUE; | - return 0; + return EINA_FALSE; | - int + Eina_Bool ret; ... return <+...ret...+>; | return ...; ) ... } @r4@ identifier r1.fn; @@ - int + Eina_Bool fn(...); @r5@ identifier r1.fn2; @@ - int + Eina_Bool fn2(...); @script:python depends on org@ p << r2.p; f << r1.fn; @@ import sys msg="WARNING: wrong callback %s! ( %s:%s )" % (f, p[0].file,p[0].line) print >> sys.stderr, msg @script:python depends on org@ p << r3.p; f << r1.fn2; @@ import sys msg="WARNING: wrong callback %s! ( %s:%s )" % (f, p[0].file,p[0].line) print >> sys.stderr, msg SVN revision: 49985
2010-07-01 18:38:05 -07:00
static Eina_Bool
_ecore_evas_directfb_event_got_focus(void *data __UNUSED__, int type __UNUSED__, void *event)
{
Ecore_Evas *ee;
Ecore_DirectFB_Event_Got_Focus *e;
e = event;
ee = _ecore_evas_directfb_match(e->win);
Fix callback signatures The change from returning int to Eina_Bool left several call sites with warnings because they were not updated. Here they are fixed by using Coccinelle, a tool that allows us to automate tasks like that. This commit was generated from the following semantic patch: virtual org @r1@ identifier fn!=NULL, fn2; expression E1, E2, E3; @@ ( ecore_event_handler_add(E1, fn, ...) | ecore_event_filter_add(E1, fn, ...) | ecore_idler_add(fn, ...) | ecore_idle_enterer_add(E1, fn, ...) | ecore_idle_enterer_before_add(E1, fn, ...) | ecore_idle_exiter_add(E1, fn, ...) | ecore_main_fd_handler_add(E1, E2, fn, E3, fn2, ...) | ecore_main_win32_handler_add(E1, fn, ...) | ecore_timer_add(E1, fn, ...) | ecore_timer_loop_add(E1, fn, ...) | ecore_animator_add(fn, ...) | ecore_poller_add(E1, E2, fn, ...) ) @r2@ identifier r1.fn; identifier ret; typedef Eina_Bool; position p; @@ - int + Eina_Bool fn@p(...) { <... ( - return 1; + return EINA_TRUE; | - return 0; + return EINA_FALSE; | - int + Eina_Bool ret; ... return <+...ret...+>; | return ...; ) ...> } @r3@ identifier r1.fn2; identifier ret; position p; @@ - int + Eina_Bool fn2@p(...) { ... ( - return 1; + return EINA_TRUE; | - return 0; + return EINA_FALSE; | - int + Eina_Bool ret; ... return <+...ret...+>; | return ...; ) ... } @r4@ identifier r1.fn; @@ - int + Eina_Bool fn(...); @r5@ identifier r1.fn2; @@ - int + Eina_Bool fn2(...); @script:python depends on org@ p << r2.p; f << r1.fn; @@ import sys msg="WARNING: wrong callback %s! ( %s:%s )" % (f, p[0].file,p[0].line) print >> sys.stderr, msg @script:python depends on org@ p << r3.p; f << r1.fn2; @@ import sys msg="WARNING: wrong callback %s! ( %s:%s )" % (f, p[0].file,p[0].line) print >> sys.stderr, msg SVN revision: 49985
2010-07-01 18:38:05 -07:00
if (!ee) return EINA_TRUE; /* pass on event */
ee->prop.focused = 1;
Fix callback signatures The change from returning int to Eina_Bool left several call sites with warnings because they were not updated. Here they are fixed by using Coccinelle, a tool that allows us to automate tasks like that. This commit was generated from the following semantic patch: virtual org @r1@ identifier fn!=NULL, fn2; expression E1, E2, E3; @@ ( ecore_event_handler_add(E1, fn, ...) | ecore_event_filter_add(E1, fn, ...) | ecore_idler_add(fn, ...) | ecore_idle_enterer_add(E1, fn, ...) | ecore_idle_enterer_before_add(E1, fn, ...) | ecore_idle_exiter_add(E1, fn, ...) | ecore_main_fd_handler_add(E1, E2, fn, E3, fn2, ...) | ecore_main_win32_handler_add(E1, fn, ...) | ecore_timer_add(E1, fn, ...) | ecore_timer_loop_add(E1, fn, ...) | ecore_animator_add(fn, ...) | ecore_poller_add(E1, E2, fn, ...) ) @r2@ identifier r1.fn; identifier ret; typedef Eina_Bool; position p; @@ - int + Eina_Bool fn@p(...) { <... ( - return 1; + return EINA_TRUE; | - return 0; + return EINA_FALSE; | - int + Eina_Bool ret; ... return <+...ret...+>; | return ...; ) ...> } @r3@ identifier r1.fn2; identifier ret; position p; @@ - int + Eina_Bool fn2@p(...) { ... ( - return 1; + return EINA_TRUE; | - return 0; + return EINA_FALSE; | - int + Eina_Bool ret; ... return <+...ret...+>; | return ...; ) ... } @r4@ identifier r1.fn; @@ - int + Eina_Bool fn(...); @r5@ identifier r1.fn2; @@ - int + Eina_Bool fn2(...); @script:python depends on org@ p << r2.p; f << r1.fn; @@ import sys msg="WARNING: wrong callback %s! ( %s:%s )" % (f, p[0].file,p[0].line) print >> sys.stderr, msg @script:python depends on org@ p << r3.p; f << r1.fn2; @@ import sys msg="WARNING: wrong callback %s! ( %s:%s )" % (f, p[0].file,p[0].line) print >> sys.stderr, msg SVN revision: 49985
2010-07-01 18:38:05 -07:00
return EINA_TRUE;
}
Fix callback signatures The change from returning int to Eina_Bool left several call sites with warnings because they were not updated. Here they are fixed by using Coccinelle, a tool that allows us to automate tasks like that. This commit was generated from the following semantic patch: virtual org @r1@ identifier fn!=NULL, fn2; expression E1, E2, E3; @@ ( ecore_event_handler_add(E1, fn, ...) | ecore_event_filter_add(E1, fn, ...) | ecore_idler_add(fn, ...) | ecore_idle_enterer_add(E1, fn, ...) | ecore_idle_enterer_before_add(E1, fn, ...) | ecore_idle_exiter_add(E1, fn, ...) | ecore_main_fd_handler_add(E1, E2, fn, E3, fn2, ...) | ecore_main_win32_handler_add(E1, fn, ...) | ecore_timer_add(E1, fn, ...) | ecore_timer_loop_add(E1, fn, ...) | ecore_animator_add(fn, ...) | ecore_poller_add(E1, E2, fn, ...) ) @r2@ identifier r1.fn; identifier ret; typedef Eina_Bool; position p; @@ - int + Eina_Bool fn@p(...) { <... ( - return 1; + return EINA_TRUE; | - return 0; + return EINA_FALSE; | - int + Eina_Bool ret; ... return <+...ret...+>; | return ...; ) ...> } @r3@ identifier r1.fn2; identifier ret; position p; @@ - int + Eina_Bool fn2@p(...) { ... ( - return 1; + return EINA_TRUE; | - return 0; + return EINA_FALSE; | - int + Eina_Bool ret; ... return <+...ret...+>; | return ...; ) ... } @r4@ identifier r1.fn; @@ - int + Eina_Bool fn(...); @r5@ identifier r1.fn2; @@ - int + Eina_Bool fn2(...); @script:python depends on org@ p << r2.p; f << r1.fn; @@ import sys msg="WARNING: wrong callback %s! ( %s:%s )" % (f, p[0].file,p[0].line) print >> sys.stderr, msg @script:python depends on org@ p << r3.p; f << r1.fn2; @@ import sys msg="WARNING: wrong callback %s! ( %s:%s )" % (f, p[0].file,p[0].line) print >> sys.stderr, msg SVN revision: 49985
2010-07-01 18:38:05 -07:00
static Eina_Bool
_ecore_evas_directfb_event_lost_focus(void *data __UNUSED__, int type __UNUSED__, void *event)
{
Ecore_Evas *ee;
Ecore_DirectFB_Event_Lost_Focus *e;
e = event;
ee = _ecore_evas_directfb_match(e->win);
Fix callback signatures The change from returning int to Eina_Bool left several call sites with warnings because they were not updated. Here they are fixed by using Coccinelle, a tool that allows us to automate tasks like that. This commit was generated from the following semantic patch: virtual org @r1@ identifier fn!=NULL, fn2; expression E1, E2, E3; @@ ( ecore_event_handler_add(E1, fn, ...) | ecore_event_filter_add(E1, fn, ...) | ecore_idler_add(fn, ...) | ecore_idle_enterer_add(E1, fn, ...) | ecore_idle_enterer_before_add(E1, fn, ...) | ecore_idle_exiter_add(E1, fn, ...) | ecore_main_fd_handler_add(E1, E2, fn, E3, fn2, ...) | ecore_main_win32_handler_add(E1, fn, ...) | ecore_timer_add(E1, fn, ...) | ecore_timer_loop_add(E1, fn, ...) | ecore_animator_add(fn, ...) | ecore_poller_add(E1, E2, fn, ...) ) @r2@ identifier r1.fn; identifier ret; typedef Eina_Bool; position p; @@ - int + Eina_Bool fn@p(...) { <... ( - return 1; + return EINA_TRUE; | - return 0; + return EINA_FALSE; | - int + Eina_Bool ret; ... return <+...ret...+>; | return ...; ) ...> } @r3@ identifier r1.fn2; identifier ret; position p; @@ - int + Eina_Bool fn2@p(...) { ... ( - return 1; + return EINA_TRUE; | - return 0; + return EINA_FALSE; | - int + Eina_Bool ret; ... return <+...ret...+>; | return ...; ) ... } @r4@ identifier r1.fn; @@ - int + Eina_Bool fn(...); @r5@ identifier r1.fn2; @@ - int + Eina_Bool fn2(...); @script:python depends on org@ p << r2.p; f << r1.fn; @@ import sys msg="WARNING: wrong callback %s! ( %s:%s )" % (f, p[0].file,p[0].line) print >> sys.stderr, msg @script:python depends on org@ p << r3.p; f << r1.fn2; @@ import sys msg="WARNING: wrong callback %s! ( %s:%s )" % (f, p[0].file,p[0].line) print >> sys.stderr, msg SVN revision: 49985
2010-07-01 18:38:05 -07:00
if (!ee) return EINA_TRUE; /* pass on event */
ee->prop.focused = 0;
Fix callback signatures The change from returning int to Eina_Bool left several call sites with warnings because they were not updated. Here they are fixed by using Coccinelle, a tool that allows us to automate tasks like that. This commit was generated from the following semantic patch: virtual org @r1@ identifier fn!=NULL, fn2; expression E1, E2, E3; @@ ( ecore_event_handler_add(E1, fn, ...) | ecore_event_filter_add(E1, fn, ...) | ecore_idler_add(fn, ...) | ecore_idle_enterer_add(E1, fn, ...) | ecore_idle_enterer_before_add(E1, fn, ...) | ecore_idle_exiter_add(E1, fn, ...) | ecore_main_fd_handler_add(E1, E2, fn, E3, fn2, ...) | ecore_main_win32_handler_add(E1, fn, ...) | ecore_timer_add(E1, fn, ...) | ecore_timer_loop_add(E1, fn, ...) | ecore_animator_add(fn, ...) | ecore_poller_add(E1, E2, fn, ...) ) @r2@ identifier r1.fn; identifier ret; typedef Eina_Bool; position p; @@ - int + Eina_Bool fn@p(...) { <... ( - return 1; + return EINA_TRUE; | - return 0; + return EINA_FALSE; | - int + Eina_Bool ret; ... return <+...ret...+>; | return ...; ) ...> } @r3@ identifier r1.fn2; identifier ret; position p; @@ - int + Eina_Bool fn2@p(...) { ... ( - return 1; + return EINA_TRUE; | - return 0; + return EINA_FALSE; | - int + Eina_Bool ret; ... return <+...ret...+>; | return ...; ) ... } @r4@ identifier r1.fn; @@ - int + Eina_Bool fn(...); @r5@ identifier r1.fn2; @@ - int + Eina_Bool fn2(...); @script:python depends on org@ p << r2.p; f << r1.fn; @@ import sys msg="WARNING: wrong callback %s! ( %s:%s )" % (f, p[0].file,p[0].line) print >> sys.stderr, msg @script:python depends on org@ p << r3.p; f << r1.fn2; @@ import sys msg="WARNING: wrong callback %s! ( %s:%s )" % (f, p[0].file,p[0].line) print >> sys.stderr, msg SVN revision: 49985
2010-07-01 18:38:05 -07:00
return EINA_TRUE;
}
int
_ecore_evas_directfb_shutdown(void)
{
_ecore_evas_init_count--;
if (_ecore_evas_init_count == 0)
{
int i;
for (i = 0; i < 8; i++)
ecore_event_handler_del(ecore_evas_event_handlers[i]);
}
if (_ecore_evas_init_count < 0) _ecore_evas_init_count = 0;
return _ecore_evas_init_count;
}
int
_ecore_evas_directfb_init(void)
{
_ecore_evas_init_count++;
if (_ecore_evas_init_count > 1) return _ecore_evas_init_count;
ecore_evas_event_handlers[0] = ecore_event_handler_add(ECORE_DIRECTFB_EVENT_KEY_DOWN, _ecore_evas_directfb_event_key_down, NULL);
ecore_evas_event_handlers[1] = ecore_event_handler_add(ECORE_DIRECTFB_EVENT_KEY_UP, _ecore_evas_directfb_event_key_up, NULL);
ecore_evas_event_handlers[2] = ecore_event_handler_add(ECORE_DIRECTFB_EVENT_BUTTON_DOWN, _ecore_evas_directfb_event_button_down, NULL);
ecore_evas_event_handlers[3] = ecore_event_handler_add(ECORE_DIRECTFB_EVENT_BUTTON_UP, _ecore_evas_directfb_event_button_up, NULL);
ecore_evas_event_handlers[4] = ecore_event_handler_add(ECORE_DIRECTFB_EVENT_MOTION, _ecore_evas_directfb_event_motion, NULL);
ecore_evas_event_handlers[5] = ecore_event_handler_add(ECORE_DIRECTFB_EVENT_ENTER, _ecore_evas_directfb_event_enter, NULL);
ecore_evas_event_handlers[6] = ecore_event_handler_add(ECORE_DIRECTFB_EVENT_LEAVE, _ecore_evas_directfb_event_leave, NULL);
ecore_evas_event_handlers[7] = ecore_event_handler_add(ECORE_DIRECTFB_EVENT_WHEEL, _ecore_evas_directfb_event_wheel, NULL);
ecore_evas_event_handlers[8] = ecore_event_handler_add(ECORE_DIRECTFB_EVENT_GOT_FOCUS, _ecore_evas_directfb_event_got_focus, NULL);
ecore_evas_event_handlers[9] = ecore_event_handler_add(ECORE_DIRECTFB_EVENT_LOST_FOCUS, _ecore_evas_directfb_event_lost_focus, NULL);
ecore_evas_event_handlers[10] = NULL;
ecore_evas_event_handlers[11] = NULL;
ecore_evas_event_handlers[12] = NULL;
return _ecore_evas_init_count;
}
/* engine functions */
/********************/
static void
_ecore_evas_directfb_free(Ecore_Evas *ee)
{
eina_hash_del(ecore_evases_hash, _ecore_evas_directfb_winid_str_get(ee->engine.directfb.window->id), ee);
ecore_directfb_window_free(ee->engine.directfb.window);
_ecore_evas_directfb_shutdown();
ecore_directfb_shutdown();
}
static void
_ecore_evas_directfb_move(Ecore_Evas *ee, int x, int y)
{
ecore_directfb_window_move(ee->engine.directfb.window, x, y);
}
static void
_ecore_evas_directfb_resize(Ecore_Evas *ee, int w, int h)
{
if ((w == ee->w) && (h == ee->h)) return;
ecore_directfb_window_resize(ee->engine.directfb.window, w, h);
ee->w = w;
ee->h = h;
if ((ee->rotation == 90) || (ee->rotation == 270))
{
evas_output_size_set(ee->evas, ee->h, ee->w);
evas_output_viewport_set(ee->evas, 0, 0, ee->h, ee->w);
}
else
{
evas_output_size_set(ee->evas, ee->w, ee->h);
evas_output_viewport_set(ee->evas, 0, 0, ee->w, ee->h);
}
}
static void
_ecore_evas_directfb_focus_set(Ecore_Evas *ee, int on __UNUSED__)
{
ecore_directfb_window_focus(ee->engine.directfb.window);
}
static void
_ecore_evas_directfb_hide(Ecore_Evas *ee)
{
ecore_directfb_window_hide(ee->engine.directfb.window);
ee->should_be_visible = 0;
}
static void
_ecore_evas_directfb_show(Ecore_Evas *ee)
{
ecore_directfb_window_show(ee->engine.directfb.window);
ee->should_be_visible = 1;
}
static void
_ecore_evas_directfb_shaped_set(Ecore_Evas *ee, int shaped)
{
if (((ee->shaped) && (shaped)) || ((!ee->shaped) && (!shaped)))
return;
ee->shaped = shaped;
if(ee->shaped)
ecore_directfb_window_shaped_set(ee->engine.directfb.window, 1);
else
ecore_directfb_window_shaped_set(ee->engine.directfb.window, 0);
}
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;
}
static void
_ecore_evas_directfb_object_cursor_set(Ecore_Evas *ee, Evas_Object *obj, int layer, int hot_x, int hot_y)
{
int x, y;
if (ee->prop.cursor.object) evas_object_del(ee->prop.cursor.object);
if (!obj)
{
ee->prop.cursor.object = NULL;
ee->prop.cursor.layer = 0;
ee->prop.cursor.hot.x = 0;
ee->prop.cursor.hot.y = 0;
ecore_directfb_window_cursor_show(ee->engine.directfb.window, 1);
return;
}
ee->prop.cursor.object = obj;
ee->prop.cursor.layer = layer;
ee->prop.cursor.hot.x = hot_x;
ee->prop.cursor.hot.y = hot_y;
ecore_directfb_window_cursor_show(ee->engine.directfb.window, 0);
evas_pointer_output_xy_get(ee->evas, &x, &y);
evas_object_layer_set(ee->prop.cursor.object, ee->prop.cursor.layer);
evas_object_move(ee->prop.cursor.object,x - ee->prop.cursor.hot.x,y - ee->prop.cursor.hot.y);
evas_object_pass_events_set(ee->prop.cursor.object, 1);
if (evas_pointer_inside_get(ee->evas))
evas_object_show(ee->prop.cursor.object);
evas_object_event_callback_add(obj, EVAS_CALLBACK_DEL, _ecore_evas_object_cursor_del, ee);
}
static void
_ecore_evas_directfb_fullscreen_set(Ecore_Evas *ee, int on)
{
Evas_Engine_Info_DirectFB *einfo;
int w;
int h;
int resized = 0;
if (((ee->prop.fullscreen) && (on)) || ((!ee->prop.fullscreen) && (!on)))
return;
if (on)
ecore_directfb_window_fullscreen_set(ee->engine.directfb.window, 1);
else
ecore_directfb_window_fullscreen_set(ee->engine.directfb.window, 0);
/* set the new size of the evas */
ecore_directfb_window_size_get(ee->engine.directfb.window, &w, &h);
if( (ee->w != w) || (ee->h != h))
{
resized = 1;
ee->w = w;
ee->h = h;
if ((ee->rotation == 90) || (ee->rotation == 270))
{
evas_output_size_set(ee->evas, ee->h, ee->w);
evas_output_viewport_set(ee->evas, 0, 0, ee->h, ee->w);
}
else
{
evas_output_size_set(ee->evas, ee->w, ee->h);
evas_output_viewport_set(ee->evas, 0, 0, ee->w, ee->h);
}
}
einfo = (Evas_Engine_Info_DirectFB *)evas_engine_info_get(ee->evas);
if (einfo)
{
einfo->info.surface = ee->engine.directfb.window->surface;
evas_engine_info_set(ee->evas, (Evas_Engine_Info *)einfo);
}
ee->prop.fullscreen = on;
if (resized)
{
if(ee->func.fn_resize) ee->func.fn_resize(ee);
}
}
static void *
2008-10-29 13:12:45 -07:00
_ecore_evas_directfb_window_get(const Ecore_Evas *ee)
{
return ee->engine.directfb.window;
}
#endif
#ifdef BUILD_ECORE_EVAS_DIRECTFB
static Ecore_Evas_Engine_Func _ecore_directfb_engine_func =
{
_ecore_evas_directfb_free, /* free an ecore_evas */
NULL, /* cb resize */
NULL, /* cb move */
NULL, /* cb show */
NULL, /* cb hide */
NULL, /* cb delete request */
NULL, /* cb destroy */
NULL, /* cb focus in */
NULL, /* cb focus out */
NULL, /* cb sticky */
NULL, /* cb unsticky */
NULL, /* cb mouse in */
NULL, /* cb mouse out */
NULL, /* cb pre render */
NULL, /* cb post render */
_ecore_evas_directfb_move, /* move */
NULL, /* managed move */
_ecore_evas_directfb_resize, /* resize */
NULL, /* move resize */
NULL,//_ecore_evas_directfb_rotation_set,/* rotation */
_ecore_evas_directfb_shaped_set, /* shaped */
_ecore_evas_directfb_show, /* show */
_ecore_evas_directfb_hide, /* hide */
NULL, /* raise */
NULL, /* lower */
NULL, /* activate */
NULL, /* title set */
NULL, /* name class set */
NULL, /* size min */
NULL, /* size max */
NULL, /* size base */
NULL, /* size step */
_ecore_evas_directfb_object_cursor_set, /* set cursor to an evas object */
NULL, /* layer set */
_ecore_evas_directfb_focus_set, /* focus */
NULL, /* iconified */
NULL, /* borderless */
NULL, /* override */
NULL, /* maximized */
_ecore_evas_directfb_fullscreen_set,/* fullscreen */
NULL, /* avoid damage */
NULL, /* withdrawn */
NULL, /* sticky */
NULL, /* ignore events */
NULL, /* alpha */
NULL, //transparent
NULL // render
};
#endif
/* api */
/*******/
#ifdef BUILD_ECORE_EVAS_DIRECTFB
2006-01-06 10:47:56 -08:00
EAPI Ecore_Evas *
ecore_evas_directfb_new(const char *disp_name, int windowed, int x, int y, int w, int h)
{
Evas_Engine_Info_DirectFB *einfo;
Ecore_Evas *ee;
Ecore_DirectFB_Window *window;
int rmethod;
rmethod = evas_render_method_lookup("directfb");
if (!rmethod) return NULL;
if (!ecore_directfb_init(disp_name)) return NULL;
ee = calloc(1, sizeof(Ecore_Evas));
if (!ee) return NULL;
ECORE_MAGIC_SET(ee, ECORE_MAGIC_EVAS);
_ecore_evas_directfb_init();
ee->engine.func = (Ecore_Evas_Engine_Func *)&_ecore_directfb_engine_func;
ee->driver = "directfb";
if (disp_name) ee->name = strdup(disp_name);
if (w < 1) w = 1;
if (h < 1) h = 1;
ee->rotation = 0;
ee->visible = 1;
ee->x = x;
ee->y = y;
ee->w = w;
ee->h = h;
ee->prop.layer = 1;
ee->prop.fullscreen = 0;
/* init evas here */
ee->evas = evas_new();
2005-11-06 01:47:28 -08:00
evas_data_attach_set(ee->evas, ee);
evas_output_method_set(ee->evas, rmethod);
evas_output_size_set(ee->evas, w, h);
evas_output_viewport_set(ee->evas, 0, 0, w, h);
einfo = (Evas_Engine_Info_DirectFB *)evas_engine_info_get(ee->evas);
window = ecore_directfb_window_new(x,y,w,h);
ee->engine.directfb.window = window;
if (einfo)
{
einfo->info.dfb = ecore_directfb_interface_get();
einfo->info.surface = window->surface;
evas_engine_info_set(ee->evas, (Evas_Engine_Info *)einfo);
}
ee->engine.func->fn_render = _ecore_evas_directfb_render;
_ecore_evas_register(ee);
if (!ecore_evases_hash)
ecore_evases_hash = eina_hash_string_superfast_new(NULL);
eina_hash_add(ecore_evases_hash, _ecore_evas_directfb_winid_str_get(ee->engine.directfb.window->id), ee);
return ee;
}
#else
EAPI Ecore_Evas *
ecore_evas_directfb_new(const char *disp_name __UNUSED__, int windowed __UNUSED__, int x __UNUSED__, int y __UNUSED__, int w __UNUSED__, int h __UNUSED__)
{
return NULL;
}
#endif
#ifdef BUILD_ECORE_EVAS_DIRECTFB
EAPI Ecore_DirectFB_Window *
ecore_evas_directfb_window_get(const Ecore_Evas *ee)
{
return (Ecore_DirectFB_Window *) _ecore_evas_directfb_window_get(ee);
}
#else
EAPI Ecore_DirectFB_Window *
ecore_evas_directfb_window_get(const Ecore_Evas *ee __UNUSED__)
{
return NULL;
}
#endif