summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorElyes HAOUAS <ehaouas@noos.fr>2020-05-13 19:15:21 +0000
committerStefan Schmidt <s.schmidt@samsung.com>2020-05-14 13:49:13 +0200
commit2b1a72f3cb70a0c16dea221d53d7d48b619572c2 (patch)
tree9a5ad15a05cd33d468dee9923f65ff181c7a7b3f /src
parentb9800346651ac93df9fd7100c672d7c2ec2de87c (diff)
tree-wide: get rid of trailing whitespace (part 3)
Remove trailing whitespaces Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org> Differential Revision: https://phab.enlightenment.org/D11822
Diffstat (limited to 'src')
-rw-r--r--src/bin/e_pointer.c72
1 files changed, 36 insertions, 36 deletions
diff --git a/src/bin/e_pointer.c b/src/bin/e_pointer.c
index f1883fef7..0f7ef2a9b 100644
--- a/src/bin/e_pointer.c
+++ b/src/bin/e_pointer.c
@@ -22,7 +22,7 @@ _e_pointer_theme_buf(E_Pointer *ptr, char cursor[1024])
22 snprintf(cursor, 1024, "e/pointer/enlightenment/%s/mono", ptr->type); 22 snprintf(cursor, 1024, "e/pointer/enlightenment/%s/mono", ptr->type);
23} 23}
24 24
25static inline void 25static inline void
26_e_pointer_hot_update(E_Pointer *ptr, int x, int y) 26_e_pointer_hot_update(E_Pointer *ptr, int x, int y)
27{ 27{
28 if ((ptr->hot.x != x) || (ptr->hot.y != y)) 28 if ((ptr->hot.x != x) || (ptr->hot.y != y))
@@ -33,7 +33,7 @@ _e_pointer_hot_update(E_Pointer *ptr, int x, int y)
33 } 33 }
34} 34}
35 35
36static void 36static void
37_e_pointer_active(E_Pointer *ptr) 37_e_pointer_active(E_Pointer *ptr)
38{ 38{
39 if (!ptr->idle) return; 39 if (!ptr->idle) return;
@@ -42,7 +42,7 @@ _e_pointer_active(E_Pointer *ptr)
42 ptr->idle = EINA_FALSE; 42 ptr->idle = EINA_FALSE;
43} 43}
44 44
45static void 45static void
46_e_pointer_idle(E_Pointer *ptr) 46_e_pointer_idle(E_Pointer *ptr)
47{ 47{
48 if (ptr->idle) return; 48 if (ptr->idle) return;
@@ -51,7 +51,7 @@ _e_pointer_idle(E_Pointer *ptr)
51 ptr->idle = EINA_TRUE; 51 ptr->idle = EINA_TRUE;
52} 52}
53 53
54static Eina_Bool 54static Eina_Bool
55_e_pointer_cb_idle_poller(void *data) 55_e_pointer_cb_idle_poller(void *data)
56{ 56{
57 E_Pointer *ptr; 57 E_Pointer *ptr;
@@ -59,7 +59,7 @@ _e_pointer_cb_idle_poller(void *data)
59 59
60 if (!(ptr = data)) return ECORE_CALLBACK_RENEW; 60 if (!(ptr = data)) return ECORE_CALLBACK_RENEW;
61 61
62 if ((e_powersave_mode_get() >= E_POWERSAVE_MODE_MEDIUM) || 62 if ((e_powersave_mode_get() >= E_POWERSAVE_MODE_MEDIUM) ||
63 (!e_config->idle_cursor)) 63 (!e_config->idle_cursor))
64 { 64 {
65 ptr->idle_poll = NULL; 65 ptr->idle_poll = NULL;
@@ -86,14 +86,14 @@ _e_pointer_cb_idle_poller(void *data)
86 return ECORE_CALLBACK_RENEW; 86 return ECORE_CALLBACK_RENEW;
87} 87}
88 88
89static Eina_Bool 89static Eina_Bool
90_e_pointer_cb_idle_wait(void *data) 90_e_pointer_cb_idle_wait(void *data)
91{ 91{
92 E_Pointer *ptr; 92 E_Pointer *ptr;
93 93
94 if (!(ptr = data)) return ECORE_CALLBACK_RENEW; 94 if (!(ptr = data)) return ECORE_CALLBACK_RENEW;
95 ptr->idle_tmr = NULL; 95 ptr->idle_tmr = NULL;
96 if ((e_powersave_mode_get() >= E_POWERSAVE_MODE_MEDIUM) || 96 if ((e_powersave_mode_get() >= E_POWERSAVE_MODE_MEDIUM) ||
97 (!e_config->idle_cursor)) 97 (!e_config->idle_cursor))
98 { 98 {
99 E_FREE_FUNC(ptr->idle_poll, ecore_poller_del); 99 E_FREE_FUNC(ptr->idle_poll, ecore_poller_del);
@@ -101,13 +101,13 @@ _e_pointer_cb_idle_wait(void *data)
101 } 101 }
102 102
103 if (!ptr->idle_poll) 103 if (!ptr->idle_poll)
104 ptr->idle_poll = ecore_poller_add(ECORE_POLLER_CORE, 64, 104 ptr->idle_poll = ecore_poller_add(ECORE_POLLER_CORE, 64,
105 _e_pointer_cb_idle_poller, ptr); 105 _e_pointer_cb_idle_poller, ptr);
106 106
107 return ECORE_CALLBACK_CANCEL; 107 return ECORE_CALLBACK_CANCEL;
108} 108}
109 109
110static Eina_Bool 110static Eina_Bool
111_e_pointer_cb_idle_pre(void *data) 111_e_pointer_cb_idle_pre(void *data)
112{ 112{
113 E_Pointer *ptr; 113 E_Pointer *ptr;
@@ -126,7 +126,7 @@ _e_pointer_cb_idle_pre(void *data)
126 return ECORE_CALLBACK_CANCEL; 126 return ECORE_CALLBACK_CANCEL;
127} 127}
128 128
129static void 129static void
130_e_pointer_active_handle(E_Pointer *ptr) 130_e_pointer_active_handle(E_Pointer *ptr)
131{ 131{
132 _e_pointer_active(ptr); 132 _e_pointer_active(ptr);
@@ -141,7 +141,7 @@ _e_pointer_active_handle(E_Pointer *ptr)
141 } 141 }
142} 142}
143 143
144static Eina_Bool 144static Eina_Bool
145_e_pointer_cb_mouse_down(void *data EINA_UNUSED, int type EINA_UNUSED, void *event EINA_UNUSED) 145_e_pointer_cb_mouse_down(void *data EINA_UNUSED, int type EINA_UNUSED, void *event EINA_UNUSED)
146{ 146{
147 Eina_List *l; 147 Eina_List *l;
@@ -160,7 +160,7 @@ _e_pointer_cb_mouse_down(void *data EINA_UNUSED, int type EINA_UNUSED, void *eve
160 return ECORE_CALLBACK_PASS_ON; 160 return ECORE_CALLBACK_PASS_ON;
161} 161}
162 162
163static Eina_Bool 163static Eina_Bool
164_e_pointer_cb_mouse_up(void *data EINA_UNUSED, int type EINA_UNUSED, void *event EINA_UNUSED) 164_e_pointer_cb_mouse_up(void *data EINA_UNUSED, int type EINA_UNUSED, void *event EINA_UNUSED)
165{ 165{
166 Eina_List *l; 166 Eina_List *l;
@@ -179,7 +179,7 @@ _e_pointer_cb_mouse_up(void *data EINA_UNUSED, int type EINA_UNUSED, void *event
179 return ECORE_CALLBACK_PASS_ON; 179 return ECORE_CALLBACK_PASS_ON;
180} 180}
181 181
182static Eina_Bool 182static Eina_Bool
183_e_pointer_cb_mouse_move(void *data EINA_UNUSED, int type EINA_UNUSED, void *event EINA_UNUSED) 183_e_pointer_cb_mouse_move(void *data EINA_UNUSED, int type EINA_UNUSED, void *event EINA_UNUSED)
184{ 184{
185 Eina_List *l; 185 Eina_List *l;
@@ -198,7 +198,7 @@ _e_pointer_cb_mouse_move(void *data EINA_UNUSED, int type EINA_UNUSED, void *eve
198 return ECORE_CALLBACK_PASS_ON; 198 return ECORE_CALLBACK_PASS_ON;
199} 199}
200 200
201static Eina_Bool 201static Eina_Bool
202_e_pointer_cb_mouse_wheel(void *data EINA_UNUSED, int type EINA_UNUSED, void *event EINA_UNUSED) 202_e_pointer_cb_mouse_wheel(void *data EINA_UNUSED, int type EINA_UNUSED, void *event EINA_UNUSED)
203{ 203{
204 Eina_List *l; 204 Eina_List *l;
@@ -261,7 +261,7 @@ _e_pointer_pointer_canvas_init(E_Pointer *ptr, Evas *e, Evas_Object **o_ptr, Eva
261 evas_object_resize(*o_ptr, ptr->w, ptr->h); 261 evas_object_resize(*o_ptr, ptr->w, ptr->h);
262} 262}
263 263
264static void 264static void
265_e_pointer_canvas_del(E_Pointer *ptr) 265_e_pointer_canvas_del(E_Pointer *ptr)
266{ 266{
267 E_FREE_FUNC(ptr->buffer_o_hot, evas_object_del); 267 E_FREE_FUNC(ptr->buffer_o_hot, evas_object_del);
@@ -270,7 +270,7 @@ _e_pointer_canvas_del(E_Pointer *ptr)
270 E_FREE(ptr->pixels); 270 E_FREE(ptr->pixels);
271} 271}
272 272
273static void 273static void
274_e_pointer_canvas_add(E_Pointer *ptr) 274_e_pointer_canvas_add(E_Pointer *ptr)
275{ 275{
276 Evas_Engine_Info_Buffer *einfo; 276 Evas_Engine_Info_Buffer *einfo;
@@ -318,7 +318,7 @@ err:
318 _e_pointer_canvas_del(ptr); 318 _e_pointer_canvas_del(ptr);
319} 319}
320 320
321static void 321static void
322_e_pointer_canvas_resize(E_Pointer *ptr, int w, int h) 322_e_pointer_canvas_resize(E_Pointer *ptr, int w, int h)
323{ 323{
324 Evas_Engine_Info_Buffer *einfo; 324 Evas_Engine_Info_Buffer *einfo;
@@ -343,14 +343,14 @@ _e_pointer_canvas_resize(E_Pointer *ptr, int w, int h)
343 evas_object_resize(ptr->buffer_o_ptr, ptr->w, ptr->h); 343 evas_object_resize(ptr->buffer_o_ptr, ptr->w, ptr->h);
344} 344}
345 345
346static void 346static void
347_e_pointer_stack_free(E_Pointer_Stack *stack) 347_e_pointer_stack_free(E_Pointer_Stack *stack)
348{ 348{
349 if (stack->type) eina_stringshare_del(stack->type); 349 if (stack->type) eina_stringshare_del(stack->type);
350 free(stack); 350 free(stack);
351} 351}
352 352
353static void 353static void
354_e_pointer_cb_free(E_Pointer *ptr) 354_e_pointer_cb_free(E_Pointer *ptr)
355{ 355{
356 _ptrs = eina_list_remove(_ptrs, ptr); 356 _ptrs = eina_list_remove(_ptrs, ptr);
@@ -436,7 +436,7 @@ _e_pointer_x11_setup(E_Pointer *ptr, const char *cursor)
436#endif 436#endif
437} 437}
438 438
439static void 439static void
440_e_pointer_type_set(E_Pointer *ptr, const char *type) 440_e_pointer_type_set(E_Pointer *ptr, const char *type)
441{ 441{
442 /* check if pointer type is already set */ 442 /* check if pointer type is already set */
@@ -490,22 +490,22 @@ _e_pointer_type_set(E_Pointer *ptr, const char *type)
490 _e_pointer_x11_setup(ptr, NULL); 490 _e_pointer_x11_setup(ptr, NULL);
491} 491}
492 492
493EINTERN int 493EINTERN int
494e_pointer_init(void) 494e_pointer_init(void)
495{ 495{
496 E_LIST_HANDLER_APPEND(_hdlrs, ECORE_EVENT_MOUSE_BUTTON_DOWN, 496 E_LIST_HANDLER_APPEND(_hdlrs, ECORE_EVENT_MOUSE_BUTTON_DOWN,
497 _e_pointer_cb_mouse_down, NULL); 497 _e_pointer_cb_mouse_down, NULL);
498 E_LIST_HANDLER_APPEND(_hdlrs, ECORE_EVENT_MOUSE_BUTTON_UP, 498 E_LIST_HANDLER_APPEND(_hdlrs, ECORE_EVENT_MOUSE_BUTTON_UP,
499 _e_pointer_cb_mouse_up, NULL); 499 _e_pointer_cb_mouse_up, NULL);
500 E_LIST_HANDLER_APPEND(_hdlrs, ECORE_EVENT_MOUSE_MOVE, 500 E_LIST_HANDLER_APPEND(_hdlrs, ECORE_EVENT_MOUSE_MOVE,
501 _e_pointer_cb_mouse_move, NULL); 501 _e_pointer_cb_mouse_move, NULL);
502 E_LIST_HANDLER_APPEND(_hdlrs, ECORE_EVENT_MOUSE_WHEEL, 502 E_LIST_HANDLER_APPEND(_hdlrs, ECORE_EVENT_MOUSE_WHEEL,
503 _e_pointer_cb_mouse_wheel, NULL); 503 _e_pointer_cb_mouse_wheel, NULL);
504 init = EINA_FALSE; 504 init = EINA_FALSE;
505 return 1; 505 return 1;
506} 506}
507 507
508EINTERN int 508EINTERN int
509e_pointer_shutdown(void) 509e_pointer_shutdown(void)
510{ 510{
511 E_FREE_LIST(_hdlrs, ecore_event_handler_del); 511 E_FREE_LIST(_hdlrs, ecore_event_handler_del);
@@ -573,7 +573,7 @@ e_pointer_canvas_new(Ecore_Evas *ee, Eina_Bool filled)
573 return ptr; 573 return ptr;
574} 574}
575 575
576E_API void 576E_API void
577e_pointers_size_set(int size) 577e_pointers_size_set(int size)
578{ 578{
579 Eina_List *l; 579 Eina_List *l;
@@ -600,7 +600,7 @@ e_pointers_size_set(int size)
600#endif 600#endif
601} 601}
602 602
603E_API void 603E_API void
604e_pointer_hide(E_Pointer *ptr) 604e_pointer_hide(E_Pointer *ptr)
605{ 605{
606 if (ptr->buffer_evas) 606 if (ptr->buffer_evas)
@@ -613,7 +613,7 @@ e_pointer_hide(E_Pointer *ptr)
613#endif 613#endif
614} 614}
615 615
616E_API void 616E_API void
617e_pointer_show(E_Pointer *ptr) 617e_pointer_show(E_Pointer *ptr)
618{ 618{
619 if ((!ptr->buffer_evas) && ptr->win) _e_pointer_canvas_add(ptr); 619 if ((!ptr->buffer_evas) && ptr->win) _e_pointer_canvas_add(ptr);
@@ -636,7 +636,7 @@ e_pointer_type_push(E_Pointer *ptr, void *obj, const char *type)
636 ptr->stack = eina_list_prepend(ptr->stack, stack); 636 ptr->stack = eina_list_prepend(ptr->stack, stack);
637} 637}
638 638
639E_API void 639E_API void
640e_pointer_type_pop(E_Pointer *ptr, void *obj, const char *type) 640e_pointer_type_pop(E_Pointer *ptr, void *obj, const char *type)
641{ 641{
642 Eina_List *l, *ll; 642 Eina_List *l, *ll;
@@ -646,7 +646,7 @@ e_pointer_type_pop(E_Pointer *ptr, void *obj, const char *type)
646 646
647 EINA_LIST_FOREACH_SAFE(ptr->stack, l, ll, stack) 647 EINA_LIST_FOREACH_SAFE(ptr->stack, l, ll, stack)
648 { 648 {
649 if ((stack->obj == obj) && 649 if ((stack->obj == obj) &&
650 ((!type) || (!e_util_strcmp(stack->type, type)))) 650 ((!type) || (!e_util_strcmp(stack->type, type))))
651 { 651 {
652 _e_pointer_stack_free(stack); 652 _e_pointer_stack_free(stack);
@@ -669,7 +669,7 @@ e_pointer_type_pop(E_Pointer *ptr, void *obj, const char *type)
669 eina_stringshare_replace(&ptr->type, stack->type); 669 eina_stringshare_replace(&ptr->type, stack->type);
670} 670}
671 671
672E_API void 672E_API void
673e_pointer_mode_push(void *obj, E_Pointer_Mode mode) 673e_pointer_mode_push(void *obj, E_Pointer_Mode mode)
674{ 674{
675 switch (mode) 675 switch (mode)
@@ -714,7 +714,7 @@ e_pointer_mode_push(void *obj, E_Pointer_Mode mode)
714 } 714 }
715} 715}
716 716
717E_API void 717E_API void
718e_pointer_mode_pop(void *obj, E_Pointer_Mode mode) 718e_pointer_mode_pop(void *obj, E_Pointer_Mode mode)
719{ 719{
720 switch (mode) 720 switch (mode)
@@ -759,7 +759,7 @@ e_pointer_mode_pop(void *obj, E_Pointer_Mode mode)
759 } 759 }
760} 760}
761 761
762E_API void 762E_API void
763e_pointer_idler_before(void) 763e_pointer_idler_before(void)
764{ 764{
765 Eina_List *l; 765 Eina_List *l;
@@ -773,7 +773,7 @@ e_pointer_idler_before(void)
773 773
774 if (ptr->hot.update) 774 if (ptr->hot.update)
775 _e_pointer_type_set(ptr, ptr->type); 775 _e_pointer_type_set(ptr, ptr->type);
776 776
777 if (ptr->buffer_evas) 777 if (ptr->buffer_evas)
778 { 778 {
779 Eina_List *updates; 779 Eina_List *updates;
@@ -783,7 +783,7 @@ e_pointer_idler_before(void)
783#ifndef HAVE_WAYLAND_ONLY 783#ifndef HAVE_WAYLAND_ONLY
784 Ecore_X_Cursor cur; 784 Ecore_X_Cursor cur;
785 785
786 cur = ecore_x_cursor_new(ptr->win, ptr->pixels, ptr->w, 786 cur = ecore_x_cursor_new(ptr->win, ptr->pixels, ptr->w,
787 ptr->h, ptr->hot.x, ptr->hot.y); 787 ptr->h, ptr->hot.x, ptr->hot.y);
788 ecore_x_window_cursor_set(ptr->win, cur); 788 ecore_x_window_cursor_set(ptr->win, cur);
789 ecore_x_cursor_free(cur); 789 ecore_x_cursor_free(cur);