summaryrefslogtreecommitdiff
path: root/src/lib/ecore_evas/ecore_evas.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/ecore_evas/ecore_evas.c')
-rw-r--r--src/lib/ecore_evas/ecore_evas.c49
1 files changed, 43 insertions, 6 deletions
diff --git a/src/lib/ecore_evas/ecore_evas.c b/src/lib/ecore_evas/ecore_evas.c
index 8e90539d59..9a9fbac69c 100644
--- a/src/lib/ecore_evas/ecore_evas.c
+++ b/src/lib/ecore_evas/ecore_evas.c
@@ -3746,12 +3746,7 @@ ecore_evas_sub_ecore_evas_list_get(const Ecore_Evas *ee)
3746EAPI void 3746EAPI void
3747ecore_evas_input_event_register(Ecore_Evas *ee) 3747ecore_evas_input_event_register(Ecore_Evas *ee)
3748{ 3748{
3749 ecore_event_window_register(ee->prop.window, ee, ee->evas, 3749 ecore_evas_done(ee, EINA_FALSE);
3750 (Ecore_Event_Mouse_Move_Cb)_ecore_evas_mouse_move_process,
3751 (Ecore_Event_Multi_Move_Cb)_ecore_evas_mouse_multi_move_process,
3752 (Ecore_Event_Multi_Down_Cb)_ecore_evas_mouse_multi_down_process,
3753 (Ecore_Event_Multi_Up_Cb)_ecore_evas_mouse_multi_up_process);
3754 _ecore_event_window_direct_cb_set((Ecore_Window)ee, _ecore_evas_input_direct_cb);
3755} 3750}
3756 3751
3757EAPI void 3752EAPI void
@@ -5089,3 +5084,45 @@ ecore_evas_callback_device_mouse_in_set(Ecore_Evas *ee,
5089 IFE; 5084 IFE;
5090 ee->func.fn_device_mouse_in = func; 5085 ee->func.fn_device_mouse_in = func;
5091} 5086}
5087
5088EAPI Evas *
5089ecore_evas_evas_new(Ecore_Evas *ee, int w, int h)
5090{
5091 Evas *e;
5092
5093 if (ee->evas) return ee->evas;
5094
5095 e = evas_new();
5096 if (!e) return NULL;
5097
5098 ee->evas = e;
5099 evas_data_attach_set(e, ee);
5100
5101 if (ECORE_EVAS_PORTRAIT(ee))
5102 {
5103 evas_output_size_set(e, w, h);
5104 evas_output_viewport_set(e, 0, 0, w, h);
5105 }
5106 else
5107 {
5108 evas_output_size_set(e, h, w);
5109 evas_output_viewport_set(e, 0, 0, h, w);
5110 }
5111
5112 return e;
5113}
5114
5115EAPI void
5116ecore_evas_done(Ecore_Evas *ee, Eina_Bool single_window)
5117{
5118 _ecore_evas_register(ee);
5119 ecore_event_window_register(ee->prop.window, ee, ee->evas,
5120 (Ecore_Event_Mouse_Move_Cb)_ecore_evas_mouse_move_process,
5121 (Ecore_Event_Multi_Move_Cb)_ecore_evas_mouse_multi_move_process,
5122 (Ecore_Event_Multi_Down_Cb)_ecore_evas_mouse_multi_down_process,
5123 (Ecore_Event_Multi_Up_Cb)_ecore_evas_mouse_multi_up_process);
5124 _ecore_event_window_direct_cb_set(ee->prop.window, _ecore_evas_input_direct_cb);
5125
5126 if (single_window)
5127 evas_event_feed_mouse_in(ee->evas, (unsigned int)((unsigned long long)(ecore_time_get() * 1000.0) & 0xffffffff), NULL);
5128}