summaryrefslogtreecommitdiff
path: root/src/lib/ecore_cocoa
diff options
context:
space:
mode:
authorJaehyun Cho <jae_hyun.cho@samsung.com>2015-12-11 13:44:40 +0900
committerJaehyun Cho <jae_hyun.cho@samsung.com>2015-12-11 14:28:33 +0900
commit91d9e7f83cd81b1b3098e3ee5016358799b1236e (patch)
treed873c4af9b377156708978daeffd9dc303e86868 /src/lib/ecore_cocoa
parenta9df72f6110e219e0202bb5ea168c143dbfa61e2 (diff)
Revert "ecore_cocoa: add support for system cursors"
This reverts commit 4623d57762094011c5155cbea9512ae6a2db8852. This commit is duplicated with 2c93c73cbd1966e8cead7e7856044a2eb12138d7.
Diffstat (limited to 'src/lib/ecore_cocoa')
-rw-r--r--src/lib/ecore_cocoa/Ecore_Cocoa.h4
-rw-r--r--src/lib/ecore_cocoa/ecore_cocoa_private.h2
-rw-r--r--src/lib/ecore_cocoa/ecore_cocoa_window.m47
3 files changed, 2 insertions, 51 deletions
diff --git a/src/lib/ecore_cocoa/Ecore_Cocoa.h b/src/lib/ecore_cocoa/Ecore_Cocoa.h
index 530f3a56c8..2a20050c70 100644
--- a/src/lib/ecore_cocoa/Ecore_Cocoa.h
+++ b/src/lib/ecore_cocoa/Ecore_Cocoa.h
@@ -285,10 +285,6 @@ EAPI void ecore_cocoa_selection_clipboard_clear(void);
285EAPI void ecore_cocoa_window_cursor_set(Ecore_Cocoa_Window *win, Ecore_Cocoa_Cursor c); 285EAPI void ecore_cocoa_window_cursor_set(Ecore_Cocoa_Window *win, Ecore_Cocoa_Cursor c);
286EAPI void ecore_cocoa_window_cursor_show(Ecore_Cocoa_Window *win, Eina_Bool show); 286EAPI void ecore_cocoa_window_cursor_show(Ecore_Cocoa_Window *win, Eina_Bool show);
287 287
288
289EAPI void ecore_cocoa_window_cursor_set(Ecore_Cocoa_Window *win, Ecore_Cocoa_Cursor c);
290EAPI void ecore_cocoa_window_cursor_show(Ecore_Cocoa_Window *win, Eina_Bool show);
291
292#ifdef __cplusplus 288#ifdef __cplusplus
293} 289}
294#endif 290#endif
diff --git a/src/lib/ecore_cocoa/ecore_cocoa_private.h b/src/lib/ecore_cocoa/ecore_cocoa_private.h
index db002886fa..535e08a7ed 100644
--- a/src/lib/ecore_cocoa/ecore_cocoa_private.h
+++ b/src/lib/ecore_cocoa/ecore_cocoa_private.h
@@ -67,4 +67,6 @@ Eina_Bool _ecore_cocoa_window_init(void);
67 67
68Eina_Bool _ecore_cocoa_feed_events(void *anEvent); 68Eina_Bool _ecore_cocoa_feed_events(void *anEvent);
69 69
70
71
70#endif 72#endif
diff --git a/src/lib/ecore_cocoa/ecore_cocoa_window.m b/src/lib/ecore_cocoa/ecore_cocoa_window.m
index 508eb8a92e..25a7c58c5a 100644
--- a/src/lib/ecore_cocoa/ecore_cocoa_window.m
+++ b/src/lib/ecore_cocoa/ecore_cocoa_window.m
@@ -578,50 +578,3 @@ _ecore_cocoa_window_init(void)
578 return EINA_TRUE; 578 return EINA_TRUE;
579} 579}
580 580
581EAPI void
582ecore_cocoa_window_cursor_set(Ecore_Cocoa_Window *win,
583 Ecore_Cocoa_Cursor c)
584{
585 EINA_SAFETY_ON_NULL_RETURN(win);
586 EINA_SAFETY_ON_FALSE_RETURN((c >= 0) && (c <= __ECORE_COCOA_CURSOR_LAST));
587
588 NSCursor *cursor = _cursors[c];
589
590 DBG("Setting cursor %i (%s)", c, [[cursor description] UTF8String]);
591 [cursor set];
592}
593
594EAPI void
595ecore_cocoa_window_cursor_show(Ecore_Cocoa_Window *win,
596 Eina_Bool show)
597{
598 EINA_SAFETY_ON_NULL_RETURN(win);
599
600 if (show) [NSCursor unhide];
601 else [NSCursor hide];
602}
603
604Eina_Bool
605_ecore_cocoa_window_init(void)
606{
607 _cursors[ECORE_COCOA_CURSOR_ARROW] = [NSCursor arrowCursor];
608 _cursors[ECORE_COCOA_CURSOR_CONTEXTUAL_MENU] = [NSCursor contextualMenuCursor];
609 _cursors[ECORE_COCOA_CURSOR_CLOSED_HAND] = [NSCursor closedHandCursor];
610 _cursors[ECORE_COCOA_CURSOR_CROSSHAIR] = [NSCursor crosshairCursor];
611 _cursors[ECORE_COCOA_CURSOR_DISAPPEARING_ITEM] = [NSCursor disappearingItemCursor];
612 _cursors[ECORE_COCOA_CURSOR_DRAG_COPY] = [NSCursor dragCopyCursor];
613 _cursors[ECORE_COCOA_CURSOR_DRAG_LINK] = [NSCursor dragLinkCursor];
614 _cursors[ECORE_COCOA_CURSOR_IBEAM] = [NSCursor IBeamCursor];
615 _cursors[ECORE_COCOA_CURSOR_OPEN_HAND] = [NSCursor openHandCursor];
616 _cursors[ECORE_COCOA_CURSOR_OPERATION_NOT_ALLOWED] = [NSCursor operationNotAllowedCursor];
617 _cursors[ECORE_COCOA_CURSOR_POINTING_HAND] = [NSCursor pointingHandCursor];
618 _cursors[ECORE_COCOA_CURSOR_RESIZE_DOWN] = [NSCursor resizeDownCursor];
619 _cursors[ECORE_COCOA_CURSOR_RESIZE_LEFT] = [NSCursor resizeLeftCursor];
620 _cursors[ECORE_COCOA_CURSOR_RESIZE_LEFT_RIGHT] = [NSCursor resizeLeftRightCursor];
621 _cursors[ECORE_COCOA_CURSOR_RESIZE_RIGHT] = [NSCursor resizeRightCursor];
622 _cursors[ECORE_COCOA_CURSOR_RESIZE_UP] = [NSCursor resizeUpCursor];
623 _cursors[ECORE_COCOA_CURSOR_RESIZE_UP_DOWN] = [NSCursor resizeUpDownCursor];
624 _cursors[ECORE_COCOA_CURSOR_IBEAM_VERTICAL] = [NSCursor IBeamCursorForVerticalLayout];
625
626 return EINA_TRUE;
627}