Upstream merge
[framework/uifw/ecore.git] / src / lib / ecore_evas / ecore_evas_fb.c
1 #ifdef HAVE_CONFIG_H
2 # include <config.h>
3 #endif
4
5 #include <stdlib.h>
6 #include <sys/types.h>
7 #include <dirent.h>
8
9 #include <Ecore.h>
10 #include "ecore_private.h"
11 #ifdef BUILD_ECORE_EVAS_FB
12 #include <Ecore_Fb.h>
13 #include <ecore_fb_private.h>
14 #endif
15
16 #include "ecore_evas_private.h"
17 #include "Ecore_Evas.h"
18
19 #ifdef BUILD_ECORE_EVAS_FB
20 static int _ecore_evas_init_count = 0;
21
22 static char *ecore_evas_default_display = "0";
23 static Eina_List *ecore_evas_input_devices = NULL;
24 static Ecore_Event_Handler *ecore_evas_event_handlers[4] = {NULL, NULL, NULL, NULL};
25
26 static void
27 _ecore_evas_mouse_move_process_fb(Ecore_Evas *ee, int x, int y)
28 {
29    int fbw, fbh;
30
31    ee->mouse.x = x;
32    ee->mouse.y = y;
33    ecore_fb_size_get(&fbw, &fbh);
34    if (ee->prop.cursor.object)
35      {
36         evas_object_show(ee->prop.cursor.object);
37         if (ee->rotation == 0)
38           evas_object_move(ee->prop.cursor.object,
39                            x - ee->prop.cursor.hot.x,
40                            y - ee->prop.cursor.hot.y);
41         else if (ee->rotation == 90)
42           evas_object_move(ee->prop.cursor.object,
43                            (fbh - ee->h) + ee->h - y - 1 - ee->prop.cursor.hot.x,
44                            x - ee->prop.cursor.hot.y);
45         else if (ee->rotation == 180)
46           evas_object_move(ee->prop.cursor.object,
47                            (fbw - ee->w) + ee->w - x - 1 - ee->prop.cursor.hot.x,
48                            (fbh - ee->h) + ee->h - y - 1 - ee->prop.cursor.hot.y);
49         else if (ee->rotation == 270)
50           evas_object_move(ee->prop.cursor.object,
51                            y - ee->prop.cursor.hot.x,
52                            (fbw - ee->w) + ee->w - x - 1 - ee->prop.cursor.hot.y);
53      }
54 }
55
56 static Ecore_Evas *fb_ee = NULL;
57
58 static Ecore_Evas *
59 _ecore_evas_fb_match(void)
60 {
61    return fb_ee;
62 }
63
64 static void
65 _ecore_evas_fb_lose(void *data __UNUSED__)
66 {
67    Eina_List *ll;
68    Ecore_Fb_Input_Device *dev;
69
70    if (fb_ee) fb_ee->visible = 0;
71
72    EINA_LIST_FOREACH(ecore_evas_input_devices, ll, dev)
73      ecore_fb_input_device_listen(dev, 0);
74 }
75
76 static void
77 _ecore_evas_fb_gain(void *data __UNUSED__)
78 {
79    Ecore_Evas *ee;
80    Eina_List *ll;
81    Ecore_Fb_Input_Device *dev;
82
83    if (fb_ee)
84      {
85         ee = fb_ee;
86
87         ee->visible = 1;
88         if ((ee->rotation == 90) || (ee->rotation == 270))
89           evas_damage_rectangle_add(ee->evas, 0, 0, ee->h, ee->w);
90         else
91           evas_damage_rectangle_add(ee->evas, 0, 0, ee->w, ee->h);
92      }
93
94    EINA_LIST_FOREACH(ecore_evas_input_devices, ll, dev)
95      ecore_fb_input_device_listen(dev, 1);
96 }
97
98 static Eina_Bool
99 _ecore_evas_event_mouse_button_down(void *data __UNUSED__, int type __UNUSED__, void *event)
100 {
101    Ecore_Evas *ee;
102    Ecore_Event_Mouse_Button *e;
103
104    e = event;
105    ee = _ecore_evas_fb_match();
106    if (!ee) return ECORE_CALLBACK_PASS_ON;
107    _ecore_evas_mouse_move_process_fb(ee, e->x, e->y);
108    return ECORE_CALLBACK_PASS_ON;
109 }
110
111 static Eina_Bool
112 _ecore_evas_event_mouse_button_up(void *data __UNUSED__, int type __UNUSED__, void *event)
113 {
114    Ecore_Evas *ee;
115    Ecore_Event_Mouse_Button *e;
116
117    e = event;
118    ee = _ecore_evas_fb_match();
119    if (!ee) return ECORE_CALLBACK_PASS_ON;
120    _ecore_evas_mouse_move_process_fb(ee, e->x, e->y);
121    return ECORE_CALLBACK_PASS_ON;
122 }
123
124 static Eina_Bool
125 _ecore_evas_event_mouse_move(void *data __UNUSED__, int type __UNUSED__, void *event)
126 {
127    Ecore_Evas *ee;
128    Ecore_Event_Mouse_Move *e;
129
130    e = event;
131    ee = _ecore_evas_fb_match();
132    if (!ee) return ECORE_CALLBACK_PASS_ON;
133    _ecore_evas_mouse_move_process_fb(ee, e->x, e->y);
134    return ECORE_CALLBACK_PASS_ON;
135 }
136
137 static Eina_Bool
138 _ecore_evas_event_mouse_wheel(void *data __UNUSED__, int type __UNUSED__, void *event)
139 {
140    Ecore_Evas *ee;
141    Ecore_Event_Mouse_Wheel *e;
142
143    e = event;
144    ee = _ecore_evas_fb_match();
145    if (!ee) return ECORE_CALLBACK_PASS_ON;
146    _ecore_evas_mouse_move_process_fb(ee, e->x, e->y);
147    return ECORE_CALLBACK_PASS_ON;
148 }
149
150 static int
151 _ecore_evas_fb_render(Ecore_Evas *ee)
152 {
153    int rend = 0;
154
155    if (ee->visible)
156      {
157         Eina_List *updates;
158         Eina_List *ll;
159         Ecore_Evas *ee2;
160
161         if (ee->func.fn_pre_render) ee->func.fn_pre_render(ee);
162
163         EINA_LIST_FOREACH(ee->sub_ecore_evas, ll, ee2)
164           {
165              if (ee2->func.fn_pre_render) ee2->func.fn_pre_render(ee2);
166              if (ee2->engine.func->fn_render)
167                rend |= ee2->engine.func->fn_render(ee2);
168              if (ee2->func.fn_post_render) ee2->func.fn_post_render(ee2);
169           }
170
171         updates = evas_render_updates(ee->evas);
172         if (updates)
173           {
174              evas_render_updates_free(updates);
175              _ecore_evas_idle_timeout_update(ee);
176              rend = 1;
177           }
178         if (ee->func.fn_post_render) ee->func.fn_post_render(ee);
179      }
180    else
181      evas_norender(ee->evas);
182    return rend;
183 }
184
185 static int
186 _ecore_evas_fb_init(Ecore_Evas *ee, int w, int h)
187 {
188    Eina_File_Direct_Info *info;
189    Eina_Iterator *ls;
190    Ecore_Fb_Input_Device *device;
191    Ecore_Fb_Input_Device_Cap caps;
192    int mouse_handled = 0;
193
194    _ecore_evas_init_count++;
195    if (_ecore_evas_init_count > 1) return _ecore_evas_init_count;
196
197    ecore_event_evas_init();
198
199    /* register all input devices */
200    ls = eina_file_direct_ls("/dev/input/");
201
202    EINA_ITERATOR_FOREACH(ls, info)
203      {
204         if (strncmp(info->path + info->name_start, "event", 5) != 0)
205           continue;
206
207         if (!(device = ecore_fb_input_device_open(info->path)))
208           continue;
209         ecore_fb_input_device_window_set(device, ee);
210
211         caps = ecore_fb_input_device_cap_get(device);
212
213         /* Mouse */
214 #ifdef HAVE_TSLIB
215         if (caps & ECORE_FB_INPUT_DEVICE_CAP_RELATIVE)
216 #else
217         if ((caps & ECORE_FB_INPUT_DEVICE_CAP_RELATIVE) || (caps & ECORE_FB_INPUT_DEVICE_CAP_ABSOLUTE))
218 #endif
219           {
220              ecore_fb_input_device_axis_size_set(device, w, h);
221              ecore_fb_input_device_listen(device,1);
222              ecore_evas_input_devices = eina_list_append(ecore_evas_input_devices, device);
223              if (!mouse_handled)
224                {
225                   ecore_evas_event_handlers[0]  = ecore_event_handler_add(ECORE_EVENT_MOUSE_BUTTON_DOWN, _ecore_evas_event_mouse_button_down, NULL);
226                   ecore_evas_event_handlers[1]  = ecore_event_handler_add(ECORE_EVENT_MOUSE_BUTTON_UP, _ecore_evas_event_mouse_button_up, NULL);
227                   ecore_evas_event_handlers[2]  = ecore_event_handler_add(ECORE_EVENT_MOUSE_MOVE, _ecore_evas_event_mouse_move, NULL);
228                   ecore_evas_event_handlers[3]  = ecore_event_handler_add(ECORE_EVENT_MOUSE_WHEEL, _ecore_evas_event_mouse_wheel, NULL);
229                   mouse_handled = 1;
230                }
231           }
232         /* Keyboard */
233         else if ((caps & ECORE_FB_INPUT_DEVICE_CAP_KEYS_OR_BUTTONS) && !(caps & ECORE_FB_INPUT_DEVICE_CAP_ABSOLUTE))
234           {
235              ecore_fb_input_device_listen(device,1);
236              ecore_evas_input_devices = eina_list_append(ecore_evas_input_devices, device);
237           }
238      }
239    eina_iterator_free(ls);
240
241    if (!mouse_handled)
242      {
243         if (ecore_fb_ts_init())
244           {
245              ecore_fb_ts_event_window_set(ee);
246              ecore_evas_event_handlers[0]  = ecore_event_handler_add(ECORE_EVENT_MOUSE_BUTTON_DOWN, _ecore_evas_event_mouse_button_down, NULL);
247              ecore_evas_event_handlers[1]  = ecore_event_handler_add(ECORE_EVENT_MOUSE_BUTTON_UP, _ecore_evas_event_mouse_button_up, NULL);
248              ecore_evas_event_handlers[2]  = ecore_event_handler_add(ECORE_EVENT_MOUSE_MOVE, _ecore_evas_event_mouse_move, NULL);
249              mouse_handled = 1;
250           }
251      }
252    return _ecore_evas_init_count;
253 }
254
255 static void
256 _ecore_evas_fb_free(Ecore_Evas *ee)
257 {
258    ecore_evas_input_event_unregister(ee);
259    if (fb_ee == ee) fb_ee = NULL;
260    _ecore_evas_fb_shutdown();
261    ecore_fb_shutdown();
262 }
263
264 static void
265 _ecore_evas_resize(Ecore_Evas *ee, int w, int h)
266 {
267    ee->req.w = w;
268    ee->req.h = h;
269    if ((w == ee->w) && (h == ee->h)) return;
270    ee->w = w;
271    ee->h = h;
272    if ((ee->rotation == 90) || (ee->rotation == 270))
273      {
274        evas_output_size_set(ee->evas, ee->h, ee->w);
275        evas_output_viewport_set(ee->evas, 0, 0, ee->h, ee->w);
276        evas_damage_rectangle_add(ee->evas, 0, 0, ee->h, ee->w);
277      }
278    else
279      {
280        evas_output_size_set(ee->evas, ee->w, ee->h);
281        evas_output_viewport_set(ee->evas, 0, 0, ee->w, ee->h);
282        evas_damage_rectangle_add(ee->evas, 0, 0, ee->w, ee->h);
283      }
284    if (ee->func.fn_resize) ee->func.fn_resize(ee);
285 }
286
287 static void
288 _ecore_evas_move_resize(Ecore_Evas *ee, int x __UNUSED__, int y __UNUSED__, int w, int h)
289 {
290    ee->req.w = w;
291    ee->req.h = h;
292    if ((w == ee->w) && (h == ee->h)) return;
293    ee->w = w;
294    ee->h = h;
295    if ((ee->rotation == 90) || (ee->rotation == 270))
296      {
297        evas_output_size_set(ee->evas, ee->h, ee->w);
298        evas_output_viewport_set(ee->evas, 0, 0, ee->h, ee->w);
299        evas_damage_rectangle_add(ee->evas, 0, 0, ee->h, ee->w);
300      }
301    else
302      {
303        evas_output_size_set(ee->evas, ee->w, ee->h);
304        evas_output_viewport_set(ee->evas, 0, 0, ee->w, ee->h);
305        evas_damage_rectangle_add(ee->evas, 0, 0, ee->w, ee->h);
306      }
307    if (ee->func.fn_resize) ee->func.fn_resize(ee);
308 }
309
310 static void
311 _ecore_evas_rotation_set(Ecore_Evas *ee, int rotation, int resize __UNUSED__)
312 {
313    Evas_Engine_Info_FB *einfo;
314    int rot_dif;
315
316    if (ee->rotation == rotation) return;
317    einfo = (Evas_Engine_Info_FB *)evas_engine_info_get(ee->evas);
318    if (!einfo) return;
319    rot_dif = ee->rotation - rotation;
320    if (rot_dif < 0) rot_dif = -rot_dif;
321    if (rot_dif != 180)
322      {
323
324         einfo->info.rotation = rotation;
325         if (!evas_engine_info_set(ee->evas, (Evas_Engine_Info *)einfo))
326           {
327              ERR("evas_engine_info_set() for engine '%s' failed.", ee->driver);
328           }
329         if (!ee->prop.fullscreen)
330           {
331              int tmp;
332
333              tmp = ee->w;
334              ee->w = ee->h;
335              ee->h = tmp;
336              ee->req.w = ee->w;
337              ee->req.h = ee->h;
338           }
339         else
340           {
341              if ((rotation == 0) || (rotation == 180))
342                {
343                   evas_output_size_set(ee->evas, ee->w, ee->h);
344                   evas_output_viewport_set(ee->evas, 0, 0, ee->w, ee->h);
345                }
346              else
347                {
348                   evas_output_size_set(ee->evas, ee->h, ee->w);
349                   evas_output_viewport_set(ee->evas, 0, 0, ee->h, ee->w);
350                }
351           }
352         ee->rotation = rotation;
353      }
354    else
355      {
356         einfo->info.rotation = rotation;
357         if (!evas_engine_info_set(ee->evas, (Evas_Engine_Info *)einfo))
358           {
359              ERR("evas_engine_info_set() for engine '%s' failed.", ee->driver);
360           }
361         ee->rotation = rotation;
362      }
363    if ((ee->rotation == 90) || (ee->rotation == 270))
364      evas_damage_rectangle_add(ee->evas, 0, 0, ee->h, ee->w);
365    else
366      evas_damage_rectangle_add(ee->evas, 0, 0, ee->w, ee->h);
367    _ecore_evas_mouse_move_process_fb(ee, ee->mouse.x, ee->mouse.y);
368    if (ee->func.fn_resize) ee->func.fn_resize(ee);
369 }
370
371 static void
372 _ecore_evas_show(Ecore_Evas *ee)
373 {
374    if (ee->prop.focused) return;
375    ee->prop.focused = 1;
376    evas_focus_in(ee->evas);
377    if (ee->func.fn_focus_in) ee->func.fn_focus_in(ee);
378 }
379
380 static void
381 _ecore_evas_hide(Ecore_Evas *ee)
382 {
383    if (ee->prop.focused)
384      {
385         ee->prop.focused = 0;
386         evas_focus_out(ee->evas);
387         if (ee->func.fn_focus_out) ee->func.fn_focus_out(ee);
388      }
389 }
390
391 static void
392 _ecore_evas_object_cursor_del(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
393 {
394    Ecore_Evas *ee;
395
396    ee = data;
397    if (ee)
398      ee->prop.cursor.object = NULL;
399 }
400
401 static void
402 _ecore_evas_object_cursor_set(Ecore_Evas *ee, Evas_Object *obj, int layer, int hot_x, int hot_y)
403 {
404    int x, y;
405
406    if (ee->prop.cursor.object) evas_object_del(ee->prop.cursor.object);
407
408    if (!obj)
409      {
410         ee->prop.cursor.object = NULL;
411         ee->prop.cursor.layer = 0;
412         ee->prop.cursor.hot.x = 0;
413         ee->prop.cursor.hot.y = 0;
414         return;
415      }
416
417    ee->prop.cursor.object = obj;
418    ee->prop.cursor.layer = layer;
419    ee->prop.cursor.hot.x = hot_x;
420    ee->prop.cursor.hot.y = hot_y;
421    evas_pointer_output_xy_get(ee->evas, &x, &y);
422    evas_object_layer_set(ee->prop.cursor.object, ee->prop.cursor.layer);
423    evas_object_move(ee->prop.cursor.object,
424                     x - ee->prop.cursor.hot.x,
425                     y - ee->prop.cursor.hot.y);
426    evas_object_pass_events_set(ee->prop.cursor.object, 1);
427    if (evas_pointer_inside_get(ee->evas))
428      evas_object_show(ee->prop.cursor.object);
429
430    evas_object_event_callback_add(obj, EVAS_CALLBACK_DEL, _ecore_evas_object_cursor_del, ee);
431 }
432
433 static void
434 _ecore_evas_fullscreen_set(Ecore_Evas *ee, int on)
435 {
436    Eina_List *l;
437    Ecore_Fb_Input_Device *dev;
438    int resized = 0;
439
440    if (((ee->prop.fullscreen) && (on)) ||
441        ((!ee->prop.fullscreen) && (!on))) return;
442    if (on)
443      {
444         int w, h;
445
446         ee->engine.fb.real_w = ee->w;
447         ee->engine.fb.real_h = ee->h;
448         w = ee->w;
449         h = ee->h;
450         ecore_fb_size_get(&w, &h);
451         if ((w == 0) && (h == 0))
452           {
453              w = ee->w;
454              h = ee->h;
455           }
456         if ((w != ee->w) || (h != ee->h)) resized = 1;
457         ee->w = w;
458         ee->h = h;
459         ee->req.w = ee->w;
460         ee->req.h = ee->h;
461         evas_output_size_set(ee->evas, ee->w, ee->h);
462         evas_output_viewport_set(ee->evas, 0, 0, ee->w, ee->h);
463         evas_damage_rectangle_add(ee->evas, 0, 0, ee->w, ee->h);
464      }
465    else
466      {
467         if ((ee->engine.fb.real_w != ee->w) || (ee->engine.fb.real_h != ee->h)) resized = 1;
468         ee->w = ee->engine.fb.real_w;
469         ee->h = ee->engine.fb.real_h;
470         ee->req.w = ee->w;
471         ee->req.h = ee->h;
472         evas_output_size_set(ee->evas, ee->w, ee->h);
473         evas_output_viewport_set(ee->evas, 0, 0, ee->w, ee->h);
474         evas_damage_rectangle_add(ee->evas, 0, 0, ee->w, ee->h);
475      }
476    ee->prop.fullscreen = on;
477    EINA_LIST_FOREACH(ecore_evas_input_devices, l, dev)
478      ecore_fb_input_device_axis_size_set(dev, ee->w, ee->h);
479    /* rescale the input device area */
480    if (resized)
481      {
482         if (ee->func.fn_resize) ee->func.fn_resize(ee);
483      }
484 }
485
486 int
487 _ecore_evas_fb_shutdown(void)
488 {
489    _ecore_evas_init_count--;
490    if (_ecore_evas_init_count == 0)
491      {
492         int i;
493
494         for (i = 0; i < 4; i++)
495           {
496              if (ecore_evas_event_handlers[i])
497                ecore_event_handler_del(ecore_evas_event_handlers[i]);
498           }
499         ecore_fb_ts_shutdown();
500         ecore_event_evas_shutdown();
501      }
502    if (_ecore_evas_init_count < 0) _ecore_evas_init_count = 0;
503    return _ecore_evas_init_count;
504 }
505
506 static Ecore_Evas_Engine_Func _ecore_fb_engine_func =
507 {
508    _ecore_evas_fb_free,
509      NULL,
510      NULL,
511      NULL,
512      NULL,
513      NULL,
514      NULL,
515      NULL,
516      NULL,
517      NULL,
518      NULL,
519      NULL,
520      NULL,
521      NULL,
522      NULL,
523      NULL,
524      NULL,
525      _ecore_evas_resize,
526      _ecore_evas_move_resize,
527      _ecore_evas_rotation_set,
528      NULL,
529      _ecore_evas_show,
530      _ecore_evas_hide,
531      NULL,
532      NULL,
533      NULL,
534      NULL,
535      NULL,
536      NULL,
537      NULL,
538      NULL,
539      NULL,
540      _ecore_evas_object_cursor_set,
541      NULL,
542      NULL,
543      NULL,
544      NULL,
545      NULL,
546      NULL,
547      _ecore_evas_fullscreen_set,
548      NULL,
549      NULL,
550      NULL,
551      NULL,
552      NULL,
553      NULL, //transparent
554      NULL, // profiles_set
555
556      NULL,
557      NULL,
558      NULL,
559      NULL,
560      NULL,
561      NULL,
562
563      NULL, // render
564      NULL  // screen_geometry_get
565 };
566 #endif
567
568 /**
569  * @brief Create Ecore_Evas using fb backend.
570  * @param disp_name The name of the display to be used.
571  * @param rotation The rotation to be used.
572  * @param w The width of the Ecore_Evas to be created.
573  * @param h The height of the Ecore_Evas to be created.
574  * @return The new Ecore_Evas.
575  */
576 #ifdef BUILD_ECORE_EVAS_FB
577 EAPI Ecore_Evas *
578 ecore_evas_fb_new(const char *disp_name, int rotation, int w, int h)
579 {
580    Evas_Engine_Info_FB *einfo;
581    Ecore_Evas *ee;
582
583    int rmethod;
584
585    if (!disp_name)
586    disp_name = ecore_evas_default_display;
587
588    rmethod = evas_render_method_lookup("fb");
589    if (!rmethod) return NULL;
590
591    if (!ecore_fb_init(disp_name)) return NULL;
592    ecore_fb_callback_gain_set(_ecore_evas_fb_gain, NULL);
593    ecore_fb_callback_lose_set(_ecore_evas_fb_lose, NULL);
594    ee = calloc(1, sizeof(Ecore_Evas));
595    if (!ee) return NULL;
596
597    ECORE_MAGIC_SET(ee, ECORE_MAGIC_EVAS);
598
599    _ecore_evas_fb_init(ee, w, h);
600
601    ee->engine.func = (Ecore_Evas_Engine_Func *)&_ecore_fb_engine_func;
602
603    ee->driver = "fb";
604    if (disp_name) ee->name = strdup(disp_name);
605
606    if (w < 1) w = 1;
607    if (h < 1) h = 1;
608    ee->rotation = rotation;
609    ee->visible = 1;
610    ee->w = w;
611    ee->h = h;
612    ee->req.w = ee->w;
613    ee->req.h = ee->h;
614
615    ee->prop.max.w = 0;
616    ee->prop.max.h = 0;
617    ee->prop.layer = 0;
618    ee->prop.focused = 0;
619    ee->prop.borderless = 1;
620    ee->prop.override = 1;
621    ee->prop.maximized = 1;
622    ee->prop.fullscreen = 0;
623    ee->prop.withdrawn = 0;
624    ee->prop.sticky = 0;
625
626    /* init evas here */
627    ee->evas = evas_new();
628    evas_data_attach_set(ee->evas, ee);
629    evas_output_method_set(ee->evas, rmethod);
630
631    if ((rotation == 90) || (rotation == 270))
632      {
633        evas_output_size_set(ee->evas, h, w);
634        evas_output_viewport_set(ee->evas, 0, 0, h, w);
635      }
636    else
637      {
638        evas_output_size_set(ee->evas, w, h);
639        evas_output_viewport_set(ee->evas, 0, 0, w, h);
640      }
641
642    einfo = (Evas_Engine_Info_FB *)evas_engine_info_get(ee->evas);
643    if (einfo && disp_name)
644      {
645         einfo->info.virtual_terminal = 0;
646         einfo->info.device_number = strtol(disp_name, NULL, 10);
647         einfo->info.refresh = 0;
648         einfo->info.rotation = ee->rotation;
649         if (!evas_engine_info_set(ee->evas, (Evas_Engine_Info *)einfo))
650           {
651              ERR("evas_engine_info_set() for engine '%s' failed.", ee->driver);
652              ecore_evas_free(ee);
653              return NULL;
654           }
655      }
656    else
657      {
658         ERR("evas_engine_info_set() init engine '%s' failed.", ee->driver);
659         ecore_evas_free(ee);
660         return NULL;
661      }
662
663    ecore_evas_input_event_register(ee);
664
665    ee->engine.func->fn_render = _ecore_evas_fb_render;
666    _ecore_evas_register(ee);
667    fb_ee = ee;
668    evas_event_feed_mouse_in(ee->evas, (unsigned int)((unsigned long long)(ecore_time_get() * 1000.0) & 0xffffffff), NULL);
669    return ee;
670 }
671 #else
672 EAPI Ecore_Evas *
673 ecore_evas_fb_new(const char *disp_name __UNUSED__, int rotation __UNUSED__, int w __UNUSED__, int h __UNUSED__)
674 {
675    return NULL;
676 }
677 #endif