* @param layer
* @param hot_x The x coordinate of the cursor's hot spot
* @param hot_y The y coordinate of the cursor's hot spot
- *
+ *
* This function makes the mouse cursor over @p ee be the image specified by
* @p file. The actual point within the image that the mouse is at is specified
* by @p hot_x and @p hot_y, which are coordinates with respect to the top left
static int frames = 0;
static int flapse = 0;
double tim;
-
+
tim = ecore_time_get();
rtime += t;
frames++;
-
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
Ecore_List2 *l;
double t1 = 0.0;
double t2 = 0.0;
-
+
if (!ecore_evases) return 1;
if (_ecore_evas_fps_debug)
{
for (l = (Ecore_List2 *)ecore_evases; l; l = l->next)
{
Ecore_Evas *ee;
-
+
ee = (Ecore_Evas *)l;
_ecore_evas_directfb_render(ee);
}
return 1;
}
-static int
+static int
_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 1; /* pass on event */
evas_event_feed_key_down(ee->evas, e->name, e->name, e->string,
e->key_compose, e->time, NULL);
{
Ecore_Evas *ee;
Ecore_DirectFB_Event_Key_Up *e;
-
+
e = event;
ee = _ecore_evas_directfb_match(e->win);
-
+
if (!ee) return 1; /* pass on event */
evas_event_feed_key_up(ee->evas, e->name, e->name, e->string,
e->key_compose, e->time, NULL);
- return 1;
+ return 1;
}
static int
{
Ecore_Evas *ee;
Ecore_DirectFB_Event_Motion *e;
-
+
e = event;
ee = _ecore_evas_directfb_match(e->win);
-
+
if (!ee) return 1; /* pass on event */
ecore_evas_mouse_move_process(ee, e->x, e->y, e->time);
- return 1;
+ return 1;
}
static int
{
Ecore_Evas *ee;
Ecore_DirectFB_Event_Button_Down *e;
-
+
e = event;
ee = _ecore_evas_directfb_match(e->win);
-
+
if (!ee) return 1; /* 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);
- return 1;
+ return 1;
}
static int
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);
-
+
if (!ee) return 1; /* 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);
- return 1;
+ return 1;
}
static int
{
Ecore_Evas *ee;
Ecore_DirectFB_Event_Enter *e;
-
+
e = event;
ee = _ecore_evas_directfb_match(e->win);
-
+
if (!ee) return 1; /* 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);
- return 1;
+ return 1;
}
static int
{
Ecore_Evas *ee;
Ecore_DirectFB_Event_Leave *e;
-
+
e = event;
ee = _ecore_evas_directfb_match(e->win);
-
+
if (!ee) return 1; /* 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);
- return 1;
+ return 1;
}
static int
{
Ecore_Evas *ee;
Ecore_DirectFB_Event_Wheel *e;
-
+
e = event;
ee = _ecore_evas_directfb_match(e->win);
-
+
if (!ee) return 1; /* pass on event */
evas_event_feed_mouse_wheel(ee->evas, e->direction, e->z, e->time, NULL);
- return 1;
+ return 1;
}
static int
{
Ecore_Evas *ee;
Ecore_DirectFB_Event_Got_Focus *e;
-
+
e = event;
ee = _ecore_evas_directfb_match(e->win);
-
+
if (!ee) return 1; /* pass on event */
ee->prop.focused = 1;
- return 1;
+ return 1;
}
static int
{
Ecore_Evas *ee;
Ecore_DirectFB_Event_Lost_Focus *e;
-
+
e = event;
ee = _ecore_evas_directfb_match(e->win);
-
+
if (!ee) return 1; /* pass on event */
ee->prop.focused = 0;
- return 1;
+ return 1;
}
-
+
int
_ecore_evas_directfb_shutdown(void)
{
if (_ecore_evas_init_count == 0)
{
int i;
-
+
while (ecore_evases) _ecore_evas_free(ecore_evases);
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;
}
-
+
if (getenv("ECORE_EVAS_FPS_DEBUG")) _ecore_evas_fps_debug = 1;
ecore_evas_directfb_idle_enterer = ecore_idle_enterer_add(_ecore_evas_directfb_idle_enter, NULL);
if (_ecore_evas_fps_debug) _ecore_evas_fps_debug_init();
-
+
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_directfb_window_move(ee->engine.directfb.window, x, y);
}
-static void
+static void
_ecore_evas_directfb_resize(Ecore_Evas *ee, int w, int h)
{
if ((w == ee->w) && (h == ee->h)) return;
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_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 == NULL)
ee->prop.cursor.hot.y = 0;
ecore_directfb_window_cursor_show(ee->engine.directfb.window, 1);
return;
-
+
}
ee->prop.cursor.object = obj;
int w;
int h;
int resized = 0;
-
- if (((ee->prop.fullscreen) && (on)) || ((!ee->prop.fullscreen) && (!on)))
+
+ if (((ee->prop.fullscreen) && (on)) || ((!ee->prop.fullscreen) && (!on)))
return;
-
+
if (on)
ecore_directfb_window_fullscreen_set(ee->engine.directfb.window, 1);
else
_ecore_evas_directfb_fullscreen_set,/* fullscreen */
NULL, /* avoid damage */
NULL, /* withdrawn */
- NULL, /* sticky */
+ NULL, /* sticky */
NULL, /* ignore events */
NULL /* alpha */
};
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.layer = 1;
ee->prop.fullscreen = 0;
-
+
/* init evas here */
ee->evas = evas_new();
evas_data_attach_set(ee->evas, ee);
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)
_ecore_evas_mouse_move_process(Ecore_Evas *ee, int x, int y, unsigned int timestamp)
{
int fbw, fbh;
-
+
ee->mouse.x = x;
ee->mouse.y = y;
ecore_fb_size_get(&fbw, &fbh);
else if (ee->rotation == 180)
evas_event_feed_mouse_move(ee->evas, (fbw - ee->w) + ee->w - x - 1, (fbh - ee->h) + ee->h - y - 1, timestamp, NULL);
else if (ee->rotation == 270)
- evas_event_feed_mouse_move(ee->evas, y, (fbw - ee->w) + ee->w - x - 1, timestamp, NULL);
+ evas_event_feed_mouse_move(ee->evas, y, (fbw - ee->w) + ee->w - x - 1, timestamp, NULL);
}
static Ecore_Evas *
for (l = (Ecore_List2 *)ecore_evases; l; l = l->next)
{
Ecore_Evas *ee;
-
+
ee = (Ecore_Evas *)l;
ee->visible = 0;
}
for (l = (Ecore_List2 *)ecore_evases; l; l = l->next)
{
Ecore_Evas *ee;
-
+
ee = (Ecore_Evas *)l;
ee->visible = 1;
if ((ee->rotation == 90) || (ee->rotation == 270))
{
Ecore_Evas *ee;
Ecore_Fb_Event_Key_Down *e;
-
+
e = event;
ee = _ecore_evas_fb_match();
if (!ee) return 1; /* pass on event */
{
Ecore_Evas *ee;
Ecore_Fb_Event_Key_Up *e;
-
+
e = event;
ee = _ecore_evas_fb_match();
if (!ee) return 1; /* pass on event */
Ecore_Evas *ee;
Ecore_Fb_Event_Mouse_Button_Down *e;
Evas_Button_Flags flags = EVAS_BUTTON_NONE;
-
+
e = event;
ee = _ecore_evas_fb_match();
if (!ee) return 1; /* pass on event */
{
Ecore_Evas *ee;
Ecore_Fb_Event_Mouse_Button_Up *e;
-
+
e = event;
ee = _ecore_evas_fb_match();
if (!ee) return 1; /* pass on event */
{
Ecore_Evas *ee;
Ecore_Fb_Event_Mouse_Move *e;
-
+
e = event;
ee = _ecore_evas_fb_match();
if (!ee) return 1; /* pass on event */
{
Ecore_Evas *ee;
Ecore_Fb_Event_Mouse_Wheel *e;
-
+
e = event;
ee = _ecore_evas_fb_match();
if (!ee) return 1; /* pass on event */
for (l = (Ecore_List2 *)ecore_evases; l; l = l->next)
{
Ecore_Evas *ee;
-
+
ee = (Ecore_Evas *)l;
if (ee->visible)
{
Eina_List *updates;
-
+
#ifdef BUILD_ECORE_EVAS_SOFTWARE_BUFFER
Eina_List *ll;
Ecore_Evas *ee2;
_ecore_evas_buffer_render(ee2);
if (ee2->func.fn_post_render) ee2->func.fn_post_render(ee2);
}
-#endif
- updates = evas_render_updates(ee->evas);
+#endif
+ updates = evas_render_updates(ee->evas);
if (updates)
{
evas_render_updates_free(updates);
Ecore_Fb_Input_Device_Cap caps;
int mouse_handled = 0;
int keyboard_handled = 0;
-
+
DIR *input_dir;
struct dirent *input_entry;
-
+
_ecore_evas_init_count++;
if (_ecore_evas_init_count > 1) return _ecore_evas_init_count;
-
+
if (getenv("ECORE_EVAS_FPS_DEBUG")) _ecore_evas_fps_debug = 1;
ecore_evas_idle_enterer = ecore_idle_enterer_add(_ecore_evas_idle_enter, NULL);
if (_ecore_evas_fps_debug) _ecore_evas_fps_debug_init();
/* register all input devices */
input_dir = opendir("/dev/input/");
if (!input_dir) return _ecore_evas_init_count;
-
+
while ((input_entry = readdir(input_dir)))
{
char device_path[256];
-
+
if (strncmp(input_entry->d_name, "event", 5) != 0)
continue;
-
+
snprintf(device_path, 256, "/dev/input/%s", input_entry->d_name);
if (!(device = ecore_fb_input_device_open(device_path)))
continue;
-
+
caps = ecore_fb_input_device_cap_get(device);
if (ecore_evas_input_devices)
static void
_ecore_evas_fb_free(Ecore_Evas *ee)
{
- ecore_evases = _ecore_list2_remove(ecore_evases, ee);
+ ecore_evases = _ecore_list2_remove(ecore_evases, ee);
_ecore_evas_fb_shutdown();
ecore_fb_shutdown();
}
evas_output_viewport_set(ee->evas, 0, 0, ee->w, ee->h);
evas_damage_rectangle_add(ee->evas, 0, 0, ee->w, ee->h);
}
- if (ee->func.fn_resize) ee->func.fn_resize(ee);
+ if (ee->func.fn_resize) ee->func.fn_resize(ee);
}
static void
evas_output_viewport_set(ee->evas, 0, 0, ee->w, ee->h);
evas_damage_rectangle_add(ee->evas, 0, 0, ee->w, ee->h);
}
- if (ee->func.fn_resize) ee->func.fn_resize(ee);
+ if (ee->func.fn_resize) ee->func.fn_resize(ee);
}
static void
{
Evas_Engine_Info_FB *einfo;
int rot_dif;
-
+
if (ee->rotation == rotation) return;
einfo = (Evas_Engine_Info_FB *)evas_engine_info_get(ee->evas);
if (!einfo) return;
if (rot_dif < 0) rot_dif = -rot_dif;
if (rot_dif != 180)
{
-
+
einfo->info.rotation = rotation;
evas_engine_info_set(ee->evas, (Evas_Engine_Info *)einfo);
if (!ee->prop.fullscreen)
{
int tmp;
-
+
tmp = ee->w;
ee->w = ee->h;
ee->h = tmp;
_ecore_evas_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 == NULL)
ee->prop.cursor.hot.y = hot_y;
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,
+ 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);
{
Eina_List *l;
int resized = 0;
-
+
if (((ee->prop.fullscreen) && (on)) ||
((!ee->prop.fullscreen) && (!on))) return;
if (on)
{
int w, h;
-
+
ee->engine.fb.real_w = ee->w;
ee->engine.fb.real_h = ee->h;
w = ee->w;
if (ecore_evas_input_devices)
{
Ecore_Fb_Input_Device *dev;
-
+
EINA_LIST_FOREACH(ecore_evas_input_devices, l, dev)
ecore_fb_input_device_axis_size_set(dev, ee->w, ee->h);
}
if (resized)
{
- if (ee->func.fn_resize) ee->func.fn_resize(ee);
+ if (ee->func.fn_resize) ee->func.fn_resize(ee);
}
}
-
+
int
_ecore_evas_fb_shutdown(void)
{
if (_ecore_evas_init_count == 0)
{
int i;
-
+
while (ecore_evases) _ecore_evas_free(ecore_evases);
for (i = 0; i < 5; i++)
ecore_event_handler_del(ecore_evas_event_handlers[i]);
rmethod = evas_render_method_lookup("fb");
if (!rmethod) return NULL;
-
+
if (!ecore_fb_init(disp_name)) return NULL;
ecore_fb_callback_gain_set(_ecore_evas_fb_gain, NULL);
ecore_fb_callback_lose_set(_ecore_evas_fb_lose, NULL);
if (!ee) return NULL;
ECORE_MAGIC_SET(ee, ECORE_MAGIC_EVAS);
-
+
_ecore_evas_fb_init(w, h);
-
+
ee->engine.func = (Ecore_Evas_Engine_Func *)&_ecore_fb_engine_func;
-
+
ee->driver = "fb";
if (disp_name) ee->name = strdup(disp_name);
ee->prop.fullscreen = 0;
ee->prop.withdrawn = 0;
ee->prop.sticky = 0;
-
+
/* init evas here */
ee->evas = evas_new();
evas_data_attach_set(ee->evas, ee);
evas_key_lock_add(ee->evas, "Caps_Lock");
evas_key_lock_add(ee->evas, "Num_Lock");
evas_key_lock_add(ee->evas, "Scroll_Lock");
-
+
evas_event_feed_mouse_in(ee->evas, (unsigned int)((unsigned long long)(ecore_time_get() * 1000.0) & 0xffffffff), NULL);
ecore_evases = _ecore_list2_prepend(ecore_evases, ee);
disp_name = NULL;
rotation = w = h = 0;
return NULL;
-#endif
+#endif
}
# endif
# ifdef BUILD_ECORE_EVAS_XRENDER_XCB
# include <xcb/render.h>
-# include <Evas_Engine_XRender_Xcb.h>
+# include <Evas_Engine_XRender_X11.h>
# endif
# endif
# ifdef HAVE_ECORE_X_XLIB
if(ctx != NULL)
{
Ecore_List2 *l;
-
+
for (l = (Ecore_List2 *)ecore_evases; l; l = l->next)
{
Ecore_Evas *ee;
ee = _ecore_evas_quartz_match();
if (!ee) return 1; // pass on event
-
+
NSWindow * win = ((NSWindow*) (e->window));
-
+
// Also notify on entering or leaving the window
NSPoint mouseLoc = [win convertBaseToScreen:NSMakePoint(e->x, e->y)];
-
+
if(NSPointInRect(mouseLoc, [win frame]))
{
evas_event_feed_mouse_in(ee, 0, NULL);
-
+
int w, h;
evas_output_size_get(ee->evas, &w, &h);
e->y = h - e->y;
e = event;
ee = _ecore_evas_quartz_match();
flags = EVAS_BUTTON_NONE;
-
+
if (!ee) return 1;
-
+
int w, h;
evas_output_size_get(ee->evas, &w, &h);
e->y = h - e->y;
-
+
// pass on event
_ecore_evas_mouse_move_process(ee, e->x, e->y, e->time);
if (e->double_click) flags |= EVAS_BUTTON_DOUBLE_CLICK;
if (e->triple_click) flags |= EVAS_BUTTON_TRIPLE_CLICK;
-
+
if (e->y >= 0) // Don't register clicks in titlebar!
evas_event_feed_mouse_down(ee->evas, e->button, flags, e->time, NULL);
flags = EVAS_BUTTON_NONE;
if (!ee) return 1;
-
+
int w, h;
evas_output_size_get(ee->evas, &w, &h);
e->y = h - e->y;
-
+
// pass on event
_ecore_evas_mouse_move_process(ee, e->x, e->y, e->time);
if (e->double_click) flags |= EVAS_BUTTON_DOUBLE_CLICK;
if (e->triple_click) flags |= EVAS_BUTTON_TRIPLE_CLICK;
-
+
if (e->y >= 0) // Don't register clicks in titlebar!
evas_event_feed_mouse_up(ee->evas, e->button, flags, e->time, NULL);
for (l = (Ecore_List2 *)ecore_evases; l; l = l->next)
{
Ecore_Evas *ee = (Ecore_Evas *)l;
-
+
if (ee->visible)
evas_render(ee->evas);
else
int i;
while (ecore_evases) _ecore_evas_free(ecore_evases);
-
+
for (i = 0; i < sizeof (ecore_evas_event_handlers) / sizeof (Ecore_Event_Handler*); i++)
ecore_event_handler_del(ecore_evas_event_handlers[i]);
-
+
ecore_idle_enterer_del(ecore_evas_idle_enterer);
ecore_evas_idle_enterer = NULL;
ecore_timer_del(ecore_evas_event);
ee->prop.cursor.layer = layer;
ee->prop.cursor.hot.x = hot_x;
ee->prop.cursor.hot.y = hot_y;
-
+
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);
ee->evas = evas_new();
evas_data_attach_set(ee->evas, ee);
evas_output_method_set(ee->evas, rmethod);
-
+
// Set up the Cocoa runtime
[[NSAutoreleasePool alloc] init];
[NSApplication sharedApplication];
TransformProcessType (&psn, kProcessTransformToForegroundApplication);
[NSApp finishLaunching];
-
+
// Create our main window, and embed an EvasView in it
main_window = [[NSWindow alloc] initWithContentRect:NSMakeRect(0,0,w,h) styleMask:(NSTitledWindowMask | NSClosableWindowMask | NSResizableWindowMask | NSMiniaturizableWindowMask) backing:NSBackingStoreBuffered defer:NO screen:nil];
[main_window makeKeyAndOrderFront:NSApp];
[main_window makeMainWindow];
[main_window setAcceptsMouseMovedEvents:YES];
[NSApp activateIgnoringOtherApps:YES];
-
+
evas_view = [[EvasView alloc] initWithFrame:NSMakeRect(0,0,w,h)];
[[main_window contentView] addSubview:evas_view];
-
+
// drawRect: must be run at least once, to make sure we've set ctx
[evas_view display];
-
+
evas_output_size_set(ee->evas, w, h);
evas_output_viewport_set(ee->evas, 0, 0, w, h);
einfo->info.context = [[evas_view context] retain];
evas_engine_info_set(ee->evas, (Evas_Engine_Info *)einfo);
}
-
+
evas_key_modifier_add(ee->evas, "Shift");
evas_key_modifier_add(ee->evas, "Control");
evas_key_modifier_add(ee->evas, "Alt");
/* if (rot_dif < 0) rot_dif = -rot_dif; */
/* if (!strcmp(ee->driver, "software_ddraw")) */
/* { */
-/* Evas_Engine_Info_Software_16_WinCE *einfo; */
-
-/* einfo = (Evas_Engine_Info_Software_16_WinCE *)evas_engine_info_get(ee->evas); */
-/* if (!einfo) return; */
-/* if (rot_dif != 180) */
-/* { */
-/* int minw, minh, maxw, maxh, basew, baseh, stepw, steph; */
-
-/* einfo->info.rotation = rotation; */
-/* evas_engine_info_set(ee->evas, (Evas_Engine_Info *)einfo); */
-/* if (!ee->prop.fullscreen) */
-/* { */
-/* ecore_wince_window_resize(ee->engine.wince.window, ee->h, ee->w); */
-/* ee->expecting_resize.w = ee->h; */
-/* ee->expecting_resize.h = ee->w; */
-/* } */
-/* else */
-/* { */
-/* int w, h; */
-
-/* ecore_wince_window_size_get(ee->engine.wince.window, &w, &h); */
-/* ecore_wince_window_resize(ee->engine.wince.window, h, w); */
-/* if ((rotation == 0) || (rotation == 180)) */
-/* { */
-/* evas_output_size_set(ee->evas, ee->w, ee->h); */
-/* evas_output_viewport_set(ee->evas, 0, 0, ee->w, ee->h); */
-/* } */
-/* else */
-/* { */
-/* evas_output_size_set(ee->evas, ee->h, ee->w); */
-/* evas_output_viewport_set(ee->evas, 0, 0, ee->h, ee->w); */
-/* } */
-/* if (ee->func.fn_resize) ee->func.fn_resize(ee); */
-/* } */
-/* ecore_evas_size_min_get(ee, &minw, &minh); */
-/* ecore_evas_size_max_get(ee, &maxw, &maxh); */
-/* ecore_evas_size_base_get(ee, &basew, &baseh); */
-/* ecore_evas_size_step_get(ee, &stepw, &steph); */
-/* ee->rotation = rotation; */
-/* ecore_evas_size_min_set(ee, minh, minw); */
-/* ecore_evas_size_max_set(ee, maxh, maxw); */
-/* ecore_evas_size_base_set(ee, baseh, basew); */
-/* ecore_evas_size_step_set(ee, steph, stepw); */
-/* _ecore_evas_wince_mouse_move_process(ee, ee->mouse.x, ee->mouse.y, */
+/* Evas_Engine_Info_Software_16_WinCE *einfo; */
+
+/* einfo = (Evas_Engine_Info_Software_16_WinCE *)evas_engine_info_get(ee->evas); */
+/* if (!einfo) return; */
+/* if (rot_dif != 180) */
+/* { */
+/* int minw, minh, maxw, maxh, basew, baseh, stepw, steph; */
+
+/* einfo->info.rotation = rotation; */
+/* evas_engine_info_set(ee->evas, (Evas_Engine_Info *)einfo); */
+/* if (!ee->prop.fullscreen) */
+/* { */
+/* ecore_wince_window_resize(ee->engine.wince.window, ee->h, ee->w); */
+/* ee->expecting_resize.w = ee->h; */
+/* ee->expecting_resize.h = ee->w; */
+/* } */
+/* else */
+/* { */
+/* int w, h; */
+
+/* ecore_wince_window_size_get(ee->engine.wince.window, &w, &h); */
+/* ecore_wince_window_resize(ee->engine.wince.window, h, w); */
+/* if ((rotation == 0) || (rotation == 180)) */
+/* { */
+/* evas_output_size_set(ee->evas, ee->w, ee->h); */
+/* evas_output_viewport_set(ee->evas, 0, 0, ee->w, ee->h); */
+/* } */
+/* else */
+/* { */
+/* evas_output_size_set(ee->evas, ee->h, ee->w); */
+/* evas_output_viewport_set(ee->evas, 0, 0, ee->h, ee->w); */
+/* } */
+/* if (ee->func.fn_resize) ee->func.fn_resize(ee); */
+/* } */
+/* ecore_evas_size_min_get(ee, &minw, &minh); */
+/* ecore_evas_size_max_get(ee, &maxw, &maxh); */
+/* ecore_evas_size_base_get(ee, &basew, &baseh); */
+/* ecore_evas_size_step_get(ee, &stepw, &steph); */
+/* ee->rotation = rotation; */
+/* ecore_evas_size_min_set(ee, minh, minw); */
+/* ecore_evas_size_max_set(ee, maxh, maxw); */
+/* ecore_evas_size_base_set(ee, baseh, basew); */
+/* ecore_evas_size_step_set(ee, steph, stepw); */
+/* _ecore_evas_wince_mouse_move_process(ee, ee->mouse.x, ee->mouse.y, */
/* ecore_wince_current_time_get()); */
-/* } */
-/* else */
-/* { */
-/* einfo->info.rotation = rotation; */
-/* evas_engine_info_set(ee->evas, (Evas_Engine_Info *)einfo); */
-/* ee->rotation = rotation; */
-/* _ecore_evas_wince_mouse_move_process(ee, ee->mouse.x, ee->mouse.y, */
+/* } */
+/* else */
+/* { */
+/* einfo->info.rotation = rotation; */
+/* evas_engine_info_set(ee->evas, (Evas_Engine_Info *)einfo); */
+/* ee->rotation = rotation; */
+/* _ecore_evas_wince_mouse_move_process(ee, ee->mouse.x, ee->mouse.y, */
/* ecore_wince_current_time_get()); */
-/* if (ee->func.fn_resize) ee->func.fn_resize(ee); */
-/* } */
-/* if ((ee->rotation == 90) || (ee->rotation == 270)) */
-/* evas_damage_rectangle_add(ee->evas, 0, 0, ee->h, ee->w); */
-/* else */
-/* evas_damage_rectangle_add(ee->evas, 0, 0, ee->w, ee->h); */
+/* if (ee->func.fn_resize) ee->func.fn_resize(ee); */
+/* } */
+/* if ((ee->rotation == 90) || (ee->rotation == 270)) */
+/* evas_damage_rectangle_add(ee->evas, 0, 0, ee->h, ee->w); */
+/* else */
+/* evas_damage_rectangle_add(ee->evas, 0, 0, ee->w, ee->h); */
/* } */
/* } */
{
if (updates)
{
- EINA_LIST_FOREACH(updates, l, r)
+ EINA_LIST_FOREACH(updates, l, r)
ecore_x_window_area_clear(ee->prop.window, r->x, r->y, r->w, r->h);
if ((ee->shaped) && (updates))
ecore_x_window_shape_mask_set(ee->prop.window, ee->engine.x.mask);
}
#endif /* BUILD_ECORE_EVAS_SOFTWARE_X11 || BUILD_ECORE_EVAS_SOFTWARE_XCB */
}
- else if (!strcmp(ee->driver, "xrender_x11") || !strcmp(ee->driver, "xrender_xcb"))
+ else if (!strcmp(ee->driver, "xrender_x11"))
{
#if defined (BUILD_ECORE_EVAS_XRENDER_X11) || defined (BUILD_ECORE_EVAS_XRENDER_XCB)
-# ifdef BUILD_ECORE_EVAS_XRENDER_XCB
- Evas_Engine_Info_XRender_Xcb *einfo;
-
- einfo = (Evas_Engine_Info_XRender_Xcb *)evas_engine_info_get(ee->evas);
-# else
Evas_Engine_Info_XRender_X11 *einfo;
einfo = (Evas_Engine_Info_XRender_X11 *)evas_engine_info_get(ee->evas);
-# endif /* ! BUILD_ECORE_EVAS_XRENDER_XCB */
if (einfo)
{
# ifdef BUILD_ECORE_EVAS_XRENDER_XCB
/* char *ct; */
/* const char *modes[] = { */
-/* "MODE_NORMAL", */
-/* "MODE_WHILE_GRABBED", */
-/* "MODE_GRAB", */
-/* "MODE_UNGRAB" */
+/* "MODE_NORMAL", */
+/* "MODE_WHILE_GRABBED", */
+/* "MODE_GRAB", */
+/* "MODE_UNGRAB" */
/* }; */
/* const char *details[] = { */
-/* "DETAIL_ANCESTOR", */
-/* "DETAIL_VIRTUAL", */
-/* "DETAIL_INFERIOR", */
-/* "DETAIL_NON_LINEAR", */
-/* "DETAIL_NON_LINEAR_VIRTUAL", */
-/* "DETAIL_POINTER", */
-/* "DETAIL_POINTER_ROOT", */
-/* "DETAIL_DETAIL_NONE" */
+/* "DETAIL_ANCESTOR", */
+/* "DETAIL_VIRTUAL", */
+/* "DETAIL_INFERIOR", */
+/* "DETAIL_NON_LINEAR", */
+/* "DETAIL_NON_LINEAR_VIRTUAL", */
+/* "DETAIL_POINTER", */
+/* "DETAIL_POINTER_ROOT", */
+/* "DETAIL_DETAIL_NONE" */
/* }; */
/* t = time(NULL); */
/* ct = ctime(&t); */
/* ct[strlen(ct) - 1] = 0; */
/* printf("@@ ->IN 0x%x 0x%x %s md=%s dt=%s\n", */
-/* e->win, e->event_win, */
-/* ct, */
-/* modes[e->mode], */
-/* details[e->detail]); */
+/* e->win, e->event_win, */
+/* ct, */
+/* modes[e->mode], */
+/* details[e->detail]); */
/* } */
// disable. causes mroe problems than it fixes
// if ((e->mode == ECORE_X_EVENT_MODE_GRAB) ||
/* char *ct; */
/* const char *modes[] = { */
-/* "MODE_NORMAL", */
-/* "MODE_WHILE_GRABBED", */
-/* "MODE_GRAB", */
-/* "MODE_UNGRAB" */
+/* "MODE_NORMAL", */
+/* "MODE_WHILE_GRABBED", */
+/* "MODE_GRAB", */
+/* "MODE_UNGRAB" */
/* }; */
/* const char *details[] = { */
-/* "DETAIL_ANCESTOR", */
-/* "DETAIL_VIRTUAL", */
-/* "DETAIL_INFERIOR", */
-/* "DETAIL_NON_LINEAR", */
-/* "DETAIL_NON_LINEAR_VIRTUAL", */
-/* "DETAIL_POINTER", */
-/* "DETAIL_POINTER_ROOT", */
-/* "DETAIL_DETAIL_NONE" */
+/* "DETAIL_ANCESTOR", */
+/* "DETAIL_VIRTUAL", */
+/* "DETAIL_INFERIOR", */
+/* "DETAIL_NON_LINEAR", */
+/* "DETAIL_NON_LINEAR_VIRTUAL", */
+/* "DETAIL_POINTER", */
+/* "DETAIL_POINTER_ROOT", */
+/* "DETAIL_DETAIL_NONE" */
/* }; */
/* t = time(NULL); */
/* ct = ctime(&t); */
/* ct[strlen(ct) - 1] = 0; */
/* printf("@@ ->OUT 0x%x 0x%x %s md=%s dt=%s\n", */
-/* e->win, e->event_win, */
-/* ct, */
-/* modes[e->mode], */
-/* details[e->detail]); */
+/* e->win, e->event_win, */
+/* ct, */
+/* modes[e->mode], */
+/* details[e->detail]); */
/* } */
// disable. causes more problems than it fixes
// if ((e->mode == ECORE_X_EVENT_MODE_GRAB) ||
}
#endif /* BUILD_ECORE_EVAS_SOFTWARE_X11 || BUILD_ECORE_EVAS_SOFTWARE_XCB */
}
- else if (!strcmp(ee->driver, "xrender_x11") || !strcmp(ee->driver, "xrender_xcb"))
+ else if (!strcmp(ee->driver, "xrender_x11"))
{
#if defined (BUILD_ECORE_EVAS_XRENDER_X11) || defined (BUILD_ECORE_EVAS_XRENDER_XCB)
-# ifdef BUILD_ECORE_EVAS_XRENDER_XCB
- Evas_Engine_Info_XRender_Xcb *einfo;
-# else
Evas_Engine_Info_XRender_X11 *einfo;
-# endif /* ! BUILD_ECORE_EVAS_XRENDER_XCB */
ee->shaped = shaped;
-# ifdef BUILD_ECORE_EVAS_XRENDER_XCB
- einfo = (Evas_Engine_Info_XRender_Xcb *)evas_engine_info_get(ee->evas);
-# else
einfo = (Evas_Engine_Info_XRender_X11 *)evas_engine_info_get(ee->evas);
-# endif /* ! BUILD_ECORE_EVAS_XRENDER_XCB */
if (einfo)
{
if (ee->shaped)
}
#endif /* BUILD_ECORE_EVAS_SOFTWARE_X11 || BUILD_ECORE_EVAS_SOFTWARE_XCB */
}
- else if (!strcmp(ee->driver, "xrender_x11") || !strcmp(ee->driver, "xrender_xcb"))
+ else if (!strcmp(ee->driver, "xrender_x11"))
{
#if defined (BUILD_ECORE_EVAS_XRENDER_X11) || defined (BUILD_ECORE_EVAS_XRENDER_XCB)
Evas_Engine_Info_XRender_X11 *einfo;
int x, int y, int w, int h)
{
#if defined (BUILD_ECORE_EVAS_XRENDER_X11) || defined (BUILD_ECORE_EVAS_XRENDER_XCB)
-# ifdef BUILD_ECORE_EVAS_XRENDER_XCB
- Evas_Engine_Info_XRender_Xcb *einfo;
-# else
Evas_Engine_Info_XRender_X11 *einfo;
-# endif /* ! BUILD_ECORE_EVAS_XRENDER_XCB */
Ecore_Evas *ee;
int rmethod;
-# ifdef BUILD_ECORE_EVAS_XRENDER_XCB
- rmethod = evas_render_method_lookup("xrender_xcb");
-# else
rmethod = evas_render_method_lookup("xrender_x11");
-# endif /* ! BUILD_ECORE_EVAS_XRENDER_XCB */
if (!rmethod) return NULL;
if (!ecore_x_init(disp_name)) return NULL;
ee = calloc(1, sizeof(Ecore_Evas));
ee->engine.func = (Ecore_Evas_Engine_Func *)&_ecore_x_engine_func;
-# ifdef BUILD_ECORE_EVAS_XRENDER_XCB
- ee->driver = "xrender_xcb";
-# else
ee->driver = "xrender_x11";
-# endif /* ! BUILD_ECORE_EVAS_XRENDER_XCB */
if (disp_name) ee->name = strdup(disp_name);
if (w < 1) w = 1;
* for the '=' char */
// putenv((char*)"DESKTOP_STARTUP_ID=");
}
-# ifdef BUILD_ECORE_EVAS_XRENDER_XCB
- einfo = (Evas_Engine_Info_XRender_Xcb *)evas_engine_info_get(ee->evas);
-# else
einfo = (Evas_Engine_Info_XRender_X11 *)evas_engine_info_get(ee->evas);
-# endif /* ! BUILD_ECORE_EVAS_XRENDER_XCB */
if (einfo)
{
# ifdef BUILD_ECORE_EVAS_XRENDER_XCB
if (reply) free(reply);
}
}
- einfo->info.conn = ecore_x_connection_get();
- /* FIXME: uncomment that once the XCB render engine has that member */
-/* einfo->info.screen = screen; */
+ einfo->info.backend = 1;
+ einfo->info.connection = ecore_x_connection_get();
+ einfo->info.screen = screen;
einfo->info.visual = screen->root_visual;
# else
int screen;
free(roots);
}
}
- einfo->info.display = ecore_x_display_get();
+ einfo->info.backend = 0;
+ einfo->info.connection = ecore_x_display_get();
+ einfo->info.screen = NULL;
einfo->info.visual = DefaultVisual(ecore_x_display_get(), screen);
# endif /* HAVE_ECORE_X_XCB */
einfo->info.drawable = ee->prop.window;