3 typedef struct _E_Pointer_Stack E_Pointer_Stack;
4 struct _E_Pointer_Stack
11 static Eina_List *_hdlrs = NULL;
12 static Eina_List *_ptrs = NULL;
13 static Eina_Bool _initted = EINA_FALSE;
16 _e_pointer_theme_buf(E_Pointer *ptr, char cursor[1024])
19 snprintf(cursor, 1024, "e/pointer/enlightenment/%s/color", ptr->type);
21 snprintf(cursor, 1024, "e/pointer/enlightenment/%s/mono", ptr->type);
25 _e_pointer_hot_update(E_Pointer *ptr, int x, int y)
27 if ((ptr->hot.x != x) || (ptr->hot.y != y))
31 ptr->hot.update = EINA_TRUE;
36 _e_pointer_active(E_Pointer *ptr)
38 if (!ptr->idle) return;
40 edje_object_signal_emit(ptr->o_ptr, "e,state,mouse,active", "e");
41 ptr->idle = EINA_FALSE;
45 _e_pointer_idle(E_Pointer *ptr)
47 if (ptr->idle) return;
49 edje_object_signal_emit(ptr->o_ptr, "e,state,mouse,idle", "e");
50 ptr->idle = EINA_TRUE;
54 _e_pointer_cb_idle_poller(void *data)
59 if (!(ptr = data)) return ECORE_CALLBACK_RENEW;
61 if ((e_powersave_mode_get() >= E_POWERSAVE_MODE_MEDIUM) ||
62 (!e_config->idle_cursor))
64 ptr->idle_poll = NULL;
65 return ECORE_CALLBACK_CANCEL;
69 ecore_evas_pointer_xy_get(ptr->ee, &x, &y);
70 #ifndef HAVE_WAYLAND_ONLY
72 ecore_x_pointer_xy_get(ptr->win, &x, &y);
75 if ((ptr->x != x) || (ptr->y != y))
79 if (ptr->idle) _e_pointer_active(ptr);
80 return ECORE_CALLBACK_RENEW;
83 if (!ptr->idle) _e_pointer_idle(ptr);
85 return ECORE_CALLBACK_RENEW;
89 _e_pointer_cb_idle_wait(void *data)
93 if (!(ptr = data)) return ECORE_CALLBACK_RENEW;
95 if ((e_powersave_mode_get() >= E_POWERSAVE_MODE_MEDIUM) ||
96 (!e_config->idle_cursor))
98 E_FREE_FUNC(ptr->idle_poll, ecore_poller_del);
99 return ECORE_CALLBACK_CANCEL;
103 ptr->idle_poll = ecore_poller_add(ECORE_POLLER_CORE, 64,
104 _e_pointer_cb_idle_poller, ptr);
106 return ECORE_CALLBACK_CANCEL;
110 _e_pointer_cb_idle_pre(void *data)
114 if (!(ptr = data)) return ECORE_CALLBACK_RENEW;
117 ecore_evas_pointer_xy_get(ptr->ee, &ptr->x, &ptr->y);
118 #ifndef HAVE_WAYLAND_ONLY
120 ecore_x_pointer_xy_get(ptr->win, &ptr->x, &ptr->y);
123 ptr->idle_tmr = ecore_timer_loop_add(4.0, _e_pointer_cb_idle_wait, ptr);
125 return ECORE_CALLBACK_CANCEL;
129 _e_pointer_active_handle(E_Pointer *ptr)
131 _e_pointer_active(ptr);
133 ecore_timer_reset(ptr->idle_tmr);
136 E_FREE_FUNC(ptr->idle_poll, ecore_poller_del);
137 if (e_powersave_mode_get() >= E_POWERSAVE_MODE_MEDIUM) return;
138 if (!e_config->idle_cursor) return;
139 ptr->idle_tmr = ecore_timer_loop_add(1.0, _e_pointer_cb_idle_pre, ptr);
144 _e_pointer_cb_mouse_down(void *data EINA_UNUSED, int type EINA_UNUSED, void *event EINA_UNUSED)
149 EINA_LIST_FOREACH(_ptrs, l, ptr)
151 _e_pointer_active_handle(ptr);
152 if (e_powersave_mode_get() < E_POWERSAVE_MODE_EXTREME)
155 edje_object_signal_emit(ptr->o_ptr, "e,action,mouse,down", "e");
159 return ECORE_CALLBACK_PASS_ON;
163 _e_pointer_cb_mouse_up(void *data EINA_UNUSED, int type EINA_UNUSED, void *event EINA_UNUSED)
168 EINA_LIST_FOREACH(_ptrs, l, ptr)
170 _e_pointer_active_handle(ptr);
171 if (e_powersave_mode_get() < E_POWERSAVE_MODE_EXTREME)
174 edje_object_signal_emit(ptr->o_ptr, "e,action,mouse,up", "e");
178 return ECORE_CALLBACK_PASS_ON;
182 _e_pointer_cb_mouse_move(void *data EINA_UNUSED, int type EINA_UNUSED, void *event EINA_UNUSED)
187 EINA_LIST_FOREACH(_ptrs, l, ptr)
189 _e_pointer_active_handle(ptr);
190 if (e_powersave_mode_get() < E_POWERSAVE_MODE_HIGH)
193 edje_object_signal_emit(ptr->o_ptr, "e,action,mouse,move", "e");
197 return ECORE_CALLBACK_PASS_ON;
201 _e_pointer_cb_mouse_wheel(void *data EINA_UNUSED, int type EINA_UNUSED, void *event EINA_UNUSED)
206 EINA_LIST_FOREACH(_ptrs, l, ptr)
208 _e_pointer_active_handle(ptr);
209 if (e_powersave_mode_get() < E_POWERSAVE_MODE_EXTREME)
212 edje_object_signal_emit(ptr->o_ptr, "e,action,mouse,wheel", "e");
216 return ECORE_CALLBACK_PASS_ON;
220 _e_pointer_cb_hot_move(void *data, Evas *evas EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event EINA_UNUSED)
222 E_Pointer *ptr = data;
225 if (!ptr->e_cursor) return;
226 if (!evas_object_visible_get(ptr->o_ptr)) return;
227 edje_object_part_geometry_get(ptr->o_ptr, "e.swallow.hotspot",
229 _e_pointer_hot_update(ptr, x, y);
233 _e_pointer_cb_hot_show(void *data, Evas *evas EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event EINA_UNUSED)
235 E_Pointer *ptr = data;
238 if (!ptr->e_cursor) return;
239 edje_object_part_geometry_get(ptr->o_ptr, "e.swallow.hotspot",
241 _e_pointer_hot_update(ptr, x, y);
245 _e_pointer_pointer_canvas_init(E_Pointer *ptr, Evas *e, Evas_Object **o_ptr, Evas_Object **o_hot)
247 /* create pointer object */
248 *o_ptr = edje_object_add(e);
250 /* create hotspot object */
251 *o_hot = evas_object_rectangle_add(e);
252 evas_object_color_set(*o_hot, 0, 0, 0, 0);
254 evas_object_event_callback_add(*o_hot, EVAS_CALLBACK_MOVE,
255 _e_pointer_cb_hot_move, ptr);
256 evas_object_event_callback_add(*o_hot, EVAS_CALLBACK_SHOW,
257 _e_pointer_cb_hot_show, ptr);
259 evas_object_move(*o_ptr, 0, 0);
260 evas_object_resize(*o_ptr, ptr->w, ptr->h);
264 _e_pointer_canvas_del(E_Pointer *ptr)
266 E_FREE_FUNC(ptr->buffer_o_hot, evas_object_del);
267 E_FREE_FUNC(ptr->buffer_o_ptr, evas_object_del);
268 E_FREE_FUNC(ptr->buffer_evas, evas_free);
273 _e_pointer_canvas_add(E_Pointer *ptr)
275 Evas_Engine_Info_Buffer *einfo;
278 /* try to create new canvas */
279 if (!(ptr->buffer_evas = evas_new())) goto err;
281 method = evas_render_method_lookup("buffer");
282 evas_output_method_set(ptr->buffer_evas, method);
283 evas_output_size_set(ptr->buffer_evas, ptr->w, ptr->h);
284 evas_output_viewport_set(ptr->buffer_evas, 0, 0, ptr->w, ptr->h);
286 /* try to allocate space for pixels */
287 if (!(ptr->pixels = malloc(ptr->w * ptr->h * sizeof(int))))
290 /* try to get the buffer engine info */
291 einfo = (Evas_Engine_Info_Buffer *)evas_engine_info_get(ptr->buffer_evas);
292 if (!einfo) goto err;
294 /* fill in buffer engine info */
295 einfo->info.depth_type = EVAS_ENGINE_BUFFER_DEPTH_ARGB32;
296 einfo->info.dest_buffer = ptr->pixels;
297 einfo->info.dest_buffer_row_bytes = (ptr->w * sizeof(int));
298 einfo->info.use_color_key = 0;
299 einfo->info.alpha_threshold = 0;
300 einfo->info.func.new_update_region = NULL;
301 einfo->info.func.free_update_region = NULL;
303 /* set buffer engine info */
304 evas_engine_info_set(ptr->buffer_evas, (Evas_Engine_Info *)einfo);
306 _e_pointer_pointer_canvas_init(ptr, ptr->buffer_evas, &ptr->buffer_o_ptr, &ptr->buffer_o_hot);
309 ptr->evas = ptr->buffer_evas;
310 ptr->o_ptr = ptr->buffer_o_ptr;
311 ptr->o_hot = ptr->buffer_o_hot;
316 _e_pointer_canvas_del(ptr);
320 _e_pointer_canvas_resize(E_Pointer *ptr, int w, int h)
322 Evas_Engine_Info_Buffer *einfo;
324 if ((ptr->w == w) && (ptr->h == h)) return;
327 evas_output_size_set(ptr->buffer_evas, w, h);
328 evas_output_viewport_set(ptr->buffer_evas, 0, 0, w, h);
330 ptr->pixels = realloc(ptr->pixels, (ptr->w * ptr->h * sizeof(int)));
332 einfo = (Evas_Engine_Info_Buffer *)evas_engine_info_get(ptr->buffer_evas);
333 EINA_SAFETY_ON_NULL_RETURN(einfo);
335 einfo->info.dest_buffer = ptr->pixels;
336 einfo->info.dest_buffer_row_bytes = (ptr->w * sizeof(int));
337 evas_engine_info_set(ptr->buffer_evas, (Evas_Engine_Info *)einfo);
339 evas_object_move(ptr->buffer_o_ptr, 0, 0);
340 evas_object_resize(ptr->buffer_o_ptr, ptr->w, ptr->h);
344 _e_pointer_stack_free(E_Pointer_Stack *stack)
346 if (stack->type) eina_stringshare_del(stack->type);
351 _e_pointer_cb_free(E_Pointer *ptr)
353 _ptrs = eina_list_remove(_ptrs, ptr);
355 E_FREE_LIST(ptr->stack, _e_pointer_stack_free);
357 eina_stringshare_del(ptr->type);
359 E_FREE_FUNC(ptr->idle_tmr, ecore_timer_del);
360 E_FREE_FUNC(ptr->idle_poll, ecore_poller_del);
362 if (ptr->buffer_evas) _e_pointer_canvas_del(ptr);
368 _e_pointer_x11_setup(E_Pointer *ptr, const char *cursor)
372 /* create a pointer canvas if we need to */
373 if ((!ptr->buffer_evas) && ptr->win) _e_pointer_canvas_add(ptr);
374 if (ptr->buffer_o_ptr && (ptr->buffer_o_ptr != ptr->o_ptr))
376 e_theme_edje_object_set(ptr->buffer_o_ptr, "base/theme/pointer", cursor);
377 edje_object_part_swallow(ptr->buffer_o_ptr, "e.swallow.hotspot", ptr->buffer_o_hot);
381 if (ptr->buffer_evas) _e_pointer_canvas_del(ptr);
382 #ifndef HAVE_WAYLAND_ONLY
383 if (!e_comp_util_has_x()) return;
384 Ecore_X_Cursor curs = 0;
386 if (!strcmp(ptr->type, "move"))
387 curs = ecore_x_cursor_shape_get(ECORE_X_CURSOR_FLEUR);
389 else if (!strcmp(ptr->type, "resize"))
390 curs = ecore_x_cursor_shape_get(ECORE_X_CURSOR_SIZING);
392 else if (!strcmp(ptr->type, "resize_tl"))
393 curs = ecore_x_cursor_shape_get(ECORE_X_CURSOR_TOP_LEFT_CORNER);
394 else if (!strcmp(ptr->type, "resize_t"))
395 curs = ecore_x_cursor_shape_get(ECORE_X_CURSOR_TOP_SIDE);
396 else if (!strcmp(ptr->type, "resize_tr"))
397 curs = ecore_x_cursor_shape_get(ECORE_X_CURSOR_TOP_RIGHT_CORNER);
398 else if (!strcmp(ptr->type, "resize_r"))
399 curs = ecore_x_cursor_shape_get(ECORE_X_CURSOR_RIGHT_SIDE);
400 else if (!strcmp(ptr->type, "resize_br"))
401 curs = ecore_x_cursor_shape_get(ECORE_X_CURSOR_BOTTOM_RIGHT_CORNER);
402 else if (!strcmp(ptr->type, "resize_b"))
403 curs = ecore_x_cursor_shape_get(ECORE_X_CURSOR_BOTTOM_SIDE);
404 else if (!strcmp(ptr->type, "resize_bl"))
405 curs = ecore_x_cursor_shape_get(ECORE_X_CURSOR_BOTTOM_LEFT_CORNER);
406 else if (!strcmp(ptr->type, "resize_l"))
407 curs = ecore_x_cursor_shape_get(ECORE_X_CURSOR_LEFT_SIDE);
408 else if (!strcmp(ptr->type, "entry"))
409 curs = ecore_x_cursor_shape_get(ECORE_X_CURSOR_XTERM);
410 else if (!strcmp(ptr->type, "default"))
411 curs = ecore_x_cursor_shape_get(ECORE_X_CURSOR_LEFT_PTR);
412 else if (!strcmp(ptr->type, "plus"))
413 curs = ecore_x_cursor_shape_get(ECORE_X_CURSOR_PLUS);
414 else if (!strcmp(ptr->type, "hand"))
415 curs = ecore_x_cursor_shape_get(ECORE_X_CURSOR_HAND1);
416 else if (!strcmp(ptr->type, "rotate"))
417 curs = ecore_x_cursor_shape_get(ECORE_X_CURSOR_EXCHANGE);
420 WRN("Unknown pointer ptr->type: %s\n", ptr->type);
421 curs = ecore_x_cursor_shape_get(ECORE_X_CURSOR_ARROW);
423 if (!curs) WRN("X Cursor for %s is missing\n", ptr->type);
424 ecore_x_window_cursor_set(ptr->win, curs);
425 if (curs) ecore_x_cursor_free(curs);
430 _e_pointer_type_set(E_Pointer *ptr, const char *type)
432 /* check if pointer type is already set */
433 if (!e_util_strcmp(ptr->type, type)) return;
435 eina_stringshare_replace(&ptr->type, type);
437 /* don't show cursor if in hidden mode */
438 if (!e_config->show_cursor)
449 if ((!ptr->buffer_evas) && ptr->win) _e_pointer_canvas_add(ptr);
450 _e_pointer_theme_buf(ptr, cursor);
452 /* try to set the edje object theme */
453 if (!e_theme_edje_object_set(ptr->o_ptr, "base/theme/pointer", cursor))
455 _e_pointer_x11_setup(ptr, cursor);
456 if (!cursor[0]) return;
458 edje_object_part_geometry_get(ptr->o_ptr, "e.swallow.hotspot",
460 _e_pointer_hot_update(ptr, x, y);
463 e_pointer_object_set(ptr, NULL, 0, 0);
465 evas_object_show(ptr->o_ptr);
469 _e_pointer_x11_setup(ptr, NULL);
475 E_LIST_HANDLER_APPEND(_hdlrs, ECORE_EVENT_MOUSE_BUTTON_DOWN,
476 _e_pointer_cb_mouse_down, NULL);
477 E_LIST_HANDLER_APPEND(_hdlrs, ECORE_EVENT_MOUSE_BUTTON_UP,
478 _e_pointer_cb_mouse_up, NULL);
479 E_LIST_HANDLER_APPEND(_hdlrs, ECORE_EVENT_MOUSE_MOVE,
480 _e_pointer_cb_mouse_move, NULL);
481 E_LIST_HANDLER_APPEND(_hdlrs, ECORE_EVENT_MOUSE_WHEEL,
482 _e_pointer_cb_mouse_wheel, NULL);
483 _initted = EINA_TRUE;
488 e_pointer_shutdown(void)
490 _initted = EINA_FALSE;
491 E_FREE_LIST(_hdlrs, ecore_event_handler_del);
496 e_pointer_window_new(Ecore_Window win, Eina_Bool filled)
498 E_Pointer *ptr = NULL;
500 EINA_SAFETY_ON_FALSE_RETURN_VAL(win, NULL);
501 if (!_initted) return NULL;
503 /* allocate space for new pointer */
504 if (!(ptr = E_OBJECT_ALLOC(E_Pointer, E_POINTER_TYPE, _e_pointer_cb_free)))
507 /* set default pointer properties */
508 ptr->w = ptr->h = e_config->cursor_size;
509 ptr->e_cursor = e_config->use_e_cursor;
511 ptr->color = EINA_FALSE;
513 ptr->color = e_comp->pointer->color;
515 /* set pointer default type */
516 if (filled) e_pointer_type_push(ptr, ptr, "default");
518 /* append this pointer to the list */
519 _ptrs = eina_list_append(_ptrs, ptr);
525 e_pointer_canvas_new(Ecore_Evas *ee, Eina_Bool filled)
527 E_Pointer *ptr = NULL;
529 EINA_SAFETY_ON_FALSE_RETURN_VAL(ee, NULL);
530 if (!_initted) return NULL;
532 /* allocate space for new pointer */
533 if (!(ptr = E_OBJECT_ALLOC(E_Pointer, E_POINTER_TYPE, _e_pointer_cb_free)))
536 /* set default pointer properties */
537 ptr->color = EINA_TRUE;
538 ptr->canvas = EINA_TRUE;
539 ptr->w = ptr->h = e_config->cursor_size;
540 ptr->e_cursor = e_config->use_e_cursor;
543 ptr->evas = ecore_evas_get(ee);
544 _e_pointer_pointer_canvas_init(ptr, ptr->evas, &ptr->o_ptr, &ptr->o_hot);
546 /* set pointer default type */
547 if (filled) e_pointer_type_push(ptr, ptr, "default");
549 /* append this pointer to the list */
550 _ptrs = eina_list_append(_ptrs, ptr);
552 _e_pointer_active_handle(ptr);
558 e_pointers_size_set(int size)
563 if (!e_config->show_cursor) return;
565 EINA_LIST_FOREACH(_ptrs, l, ptr)
567 if ((ptr->w == size) && (ptr->h == size)) continue;
568 if (ptr->buffer_evas)
569 _e_pointer_canvas_resize(ptr, size, size);
574 evas_object_resize(ptr->o_ptr, size, size);
577 #ifndef HAVE_WAYLAND_ONLY
578 if (e_comp_util_has_x())
579 ecore_x_cursor_size_set(e_config->cursor_size * 3 / 4);
584 e_pointer_hide(E_Pointer *ptr)
586 EINA_SAFETY_ON_NULL_RETURN(ptr);
588 if (ptr->buffer_evas)
589 _e_pointer_canvas_del(ptr);
591 evas_object_hide(ptr->o_ptr);
592 #ifndef HAVE_WAYLAND_ONLY
594 ecore_x_window_cursor_set(ptr->win, 0);
599 e_pointer_type_push(E_Pointer *ptr, void *obj, const char *type)
601 E_Pointer_Stack *stack;
603 EINA_SAFETY_ON_NULL_RETURN(ptr);
605 _e_pointer_type_set(ptr, type);
607 if (!(stack = E_NEW(E_Pointer_Stack, 1))) return;
608 stack->type = eina_stringshare_ref(ptr->type);
610 ptr->stack = eina_list_prepend(ptr->stack, stack);
614 e_pointer_type_pop(E_Pointer *ptr, void *obj, const char *type)
617 E_Pointer_Stack *stack;
619 EINA_SAFETY_ON_NULL_RETURN(ptr);
621 EINA_LIST_FOREACH_SAFE(ptr->stack, l, ll, stack)
623 if ((stack->obj == obj) &&
624 ((!type) || (!e_util_strcmp(stack->type, type))))
626 _e_pointer_stack_free(stack);
627 ptr->stack = eina_list_remove_list(ptr->stack, l);
635 eina_stringshare_replace(&ptr->type, NULL);
639 if (!(stack = eina_list_data_get(ptr->stack))) return;
641 _e_pointer_type_set(ptr, stack->type);
643 eina_stringshare_refplace(&ptr->type, stack->type);
647 e_pointer_mode_push(void *obj, E_Pointer_Mode mode)
652 EINA_SAFETY_ON_NULL_RETURN(e_comp->pointer);
654 ecore_evas_cursor_get(e_comp->pointer->ee, &o, NULL, NULL, NULL);
655 if ((o != e_comp->pointer->o_ptr) && (ec = e_comp_object_client_get(o)))
660 case E_POINTER_RESIZE_TL:
661 e_pointer_type_push(e_comp->pointer, obj, "resize_tl");
664 case E_POINTER_RESIZE_T:
665 e_pointer_type_push(e_comp->pointer, obj, "resize_t");
668 case E_POINTER_RESIZE_TR:
669 e_pointer_type_push(e_comp->pointer, obj, "resize_tr");
672 case E_POINTER_RESIZE_R:
673 e_pointer_type_push(e_comp->pointer, obj, "resize_r");
676 case E_POINTER_RESIZE_BR:
677 e_pointer_type_push(e_comp->pointer, obj, "resize_br");
680 case E_POINTER_RESIZE_B:
681 e_pointer_type_push(e_comp->pointer, obj, "resize_b");
684 case E_POINTER_RESIZE_BL:
685 e_pointer_type_push(e_comp->pointer, obj, "resize_bl");
688 case E_POINTER_RESIZE_L:
689 e_pointer_type_push(e_comp->pointer, obj, "resize_l");
693 e_pointer_type_push(e_comp->pointer, obj, "move");
701 e_pointer_mode_pop(void *obj, E_Pointer_Mode mode)
705 case E_POINTER_RESIZE_TL:
706 e_pointer_type_pop(e_comp->pointer, obj, "resize_tl");
709 case E_POINTER_RESIZE_T:
710 e_pointer_type_pop(e_comp->pointer, obj, "resize_t");
713 case E_POINTER_RESIZE_TR:
714 e_pointer_type_pop(e_comp->pointer, obj, "resize_tr");
717 case E_POINTER_RESIZE_R:
718 e_pointer_type_pop(e_comp->pointer, obj, "resize_r");
721 case E_POINTER_RESIZE_BR:
722 e_pointer_type_pop(e_comp->pointer, obj, "resize_br");
725 case E_POINTER_RESIZE_B:
726 e_pointer_type_pop(e_comp->pointer, obj, "resize_b");
729 case E_POINTER_RESIZE_BL:
730 e_pointer_type_pop(e_comp->pointer, obj, "resize_bl");
733 case E_POINTER_RESIZE_L:
734 e_pointer_type_pop(e_comp->pointer, obj, "resize_l");
738 e_pointer_type_pop(e_comp->pointer, obj, "move");
746 e_pointer_idler_before(void)
751 if (!e_config->show_cursor) return;
753 EINA_LIST_FOREACH(_ptrs, l, ptr)
755 if ((!ptr->e_cursor) || (!ptr->buffer_evas)) continue;
758 _e_pointer_type_set(ptr, ptr->type);
760 if (ptr->buffer_evas)
764 if ((updates = evas_render_updates(ptr->buffer_evas)))
766 #ifndef HAVE_WAYLAND_ONLY
769 cur = ecore_x_cursor_new(ptr->win, ptr->pixels, ptr->w,
770 ptr->h, ptr->hot.x, ptr->hot.y);
771 ecore_x_window_cursor_set(ptr->win, cur);
772 ecore_x_cursor_free(cur);
774 evas_render_updates_free(updates);
778 ptr->hot.update = EINA_FALSE;
783 e_pointer_object_set(E_Pointer *ptr, Evas_Object *obj, int x, int y)
788 EINA_SAFETY_ON_NULL_RETURN(ptr);
790 /* don't show cursor if in hidden mode */
791 if (!e_config->show_cursor)
793 if (obj) evas_object_hide(obj);
797 ecore_evas_cursor_get(ptr->ee, &o, NULL, NULL, NULL);
802 ecore_evas_object_cursor_set(ptr->ee, obj, E_LAYER_MAX - 1, x, y);
805 ec = e_comp_object_client_get(o);
809 ecore_evas_cursor_unset(ptr->ee);
813 ec = e_comp_object_client_get(obj);
816 ecore_evas_object_cursor_set(ptr->ee, obj, E_LAYER_MAX - 1, x, y);
819 ecore_evas_object_cursor_set(ptr->ee, ptr->o_ptr, E_LAYER_MAX - 1, ptr->hot.x, ptr->hot.y);
823 e_pointer_window_add(E_Pointer *ptr, Ecore_Window win)
828 _e_pointer_theme_buf(ptr, buf);
829 _e_pointer_x11_setup(ptr, buf);
833 e_pointer_is_hidden(E_Pointer *ptr)
837 EINA_SAFETY_ON_NULL_RETURN(ptr);
839 if (!e_config->show_cursor)
842 ecore_evas_cursor_get(ptr->ee, &o, NULL, NULL, NULL);
847 if (ptr->o_ptr && (evas_object_visible_get(ptr->o_ptr)))