diff options
Diffstat (limited to 'src/lib/ecore_cocoa')
-rw-r--r-- | src/lib/ecore_cocoa/Ecore_Cocoa.h | 12 | ||||
-rw-r--r-- | src/lib/ecore_cocoa/ecore_cocoa_window.m | 12 |
2 files changed, 9 insertions, 15 deletions
diff --git a/src/lib/ecore_cocoa/Ecore_Cocoa.h b/src/lib/ecore_cocoa/Ecore_Cocoa.h index 8d0e1bb8b2..f97bd20d27 100644 --- a/src/lib/ecore_cocoa/Ecore_Cocoa.h +++ b/src/lib/ecore_cocoa/Ecore_Cocoa.h | |||
@@ -55,12 +55,6 @@ typedef struct _Ecore_Cocoa_Window Ecore_Cocoa_Window; | |||
55 | typedef struct _Ecore_Cocoa_Screen Ecore_Cocoa_Screen; | 55 | typedef struct _Ecore_Cocoa_Screen Ecore_Cocoa_Screen; |
56 | 56 | ||
57 | /** | 57 | /** |
58 | * @typedef Ecore_Cocoa_Window_Id | ||
59 | * Opaque handler to reference the actual Cocoa window | ||
60 | */ | ||
61 | typedef void * Ecore_Cocoa_Window_Id; | ||
62 | |||
63 | /** | ||
64 | * @typedef Ecore_Cocoa_Object | 58 | * @typedef Ecore_Cocoa_Object |
65 | * Opaque handler to refer to an objective-c object (aka id) | 59 | * Opaque handler to refer to an objective-c object (aka id) |
66 | */ | 60 | */ |
@@ -91,13 +85,13 @@ struct _Ecore_Cocoa_Event_Video_Resize | |||
91 | { | 85 | { |
92 | int w; /**< Current width of the window */ | 86 | int w; /**< Current width of the window */ |
93 | int h; /**< Current height of the window */ | 87 | int h; /**< Current height of the window */ |
94 | Ecore_Cocoa_Window_Id wid; /**< Handler of the Cocoa window */ | 88 | Ecore_Cocoa_Object *cocoa_window; /**< Handler of the Cocoa window */ |
95 | }; | 89 | }; |
96 | 90 | ||
97 | typedef struct _Ecore_Cocoa_Event_Window Ecore_Cocoa_Event_Window; | 91 | typedef struct _Ecore_Cocoa_Event_Window Ecore_Cocoa_Event_Window; |
98 | struct _Ecore_Cocoa_Event_Window | 92 | struct _Ecore_Cocoa_Event_Window |
99 | { | 93 | { |
100 | Ecore_Cocoa_Window_Id wid; | 94 | Ecore_Cocoa_Object *cocoa_window; |
101 | }; | 95 | }; |
102 | 96 | ||
103 | /** | 97 | /** |
@@ -262,7 +256,7 @@ EAPI void ecore_cocoa_window_view_set(Ecore_Cocoa_Window *window, | |||
262 | 256 | ||
263 | EAPI int ecore_cocoa_titlebar_height_get(void); | 257 | EAPI int ecore_cocoa_titlebar_height_get(void); |
264 | 258 | ||
265 | EAPI Ecore_Cocoa_Window_Id ecore_cocoa_window_get_window_id(const Ecore_Cocoa_Window *window); | 259 | EAPI Ecore_Cocoa_Object *ecore_cocoa_window_get(const Ecore_Cocoa_Window *window); |
266 | 260 | ||
267 | 261 | ||
268 | EAPI Eina_Bool ecore_cocoa_selection_clipboard_set(const void *data, int size, Ecore_Cocoa_Cnp_Type type); | 262 | EAPI Eina_Bool ecore_cocoa_selection_clipboard_set(const void *data, int size, Ecore_Cocoa_Cnp_Type type); |
diff --git a/src/lib/ecore_cocoa/ecore_cocoa_window.m b/src/lib/ecore_cocoa/ecore_cocoa_window.m index e50e9c334a..b1d7d6e59f 100644 --- a/src/lib/ecore_cocoa/ecore_cocoa_window.m +++ b/src/lib/ecore_cocoa/ecore_cocoa_window.m | |||
@@ -64,7 +64,7 @@ static NSCursor *_cursors[__ECORE_COCOA_CURSOR_LAST]; | |||
64 | CRI("Failed to allocate Ecore_Cocoa_Event_Window"); | 64 | CRI("Failed to allocate Ecore_Cocoa_Event_Window"); |
65 | return; | 65 | return; |
66 | } | 66 | } |
67 | event->wid = [notification object]; | 67 | event->cocoa_window = [notification object]; |
68 | ecore_event_add(ECORE_COCOA_EVENT_WINDOW_DESTROY, event, NULL, NULL); | 68 | ecore_event_add(ECORE_COCOA_EVENT_WINDOW_DESTROY, event, NULL, NULL); |
69 | } | 69 | } |
70 | 70 | ||
@@ -82,7 +82,7 @@ static NSCursor *_cursors[__ECORE_COCOA_CURSOR_LAST]; | |||
82 | event->w = size.width; | 82 | event->w = size.width; |
83 | event->h = size.height - | 83 | event->h = size.height - |
84 | (([self isFullScreen] == YES) ? 0 : ecore_cocoa_titlebar_height_get()); | 84 | (([self isFullScreen] == YES) ? 0 : ecore_cocoa_titlebar_height_get()); |
85 | event->wid = [notif object]; | 85 | event->cocoa_window = [notif object]; |
86 | ecore_event_add(ECORE_COCOA_EVENT_RESIZE, event, NULL, NULL); | 86 | ecore_event_add(ECORE_COCOA_EVENT_RESIZE, event, NULL, NULL); |
87 | 87 | ||
88 | /* | 88 | /* |
@@ -107,7 +107,7 @@ static NSCursor *_cursors[__ECORE_COCOA_CURSOR_LAST]; | |||
107 | CRI("Failed to allocate Ecore_Cocoa_Event_Window"); | 107 | CRI("Failed to allocate Ecore_Cocoa_Event_Window"); |
108 | return; | 108 | return; |
109 | } | 109 | } |
110 | e->wid = [notification object]; | 110 | e->cocoa_window = [notification object]; |
111 | ecore_event_add(ECORE_COCOA_EVENT_GOT_FOCUS, e, NULL, NULL); | 111 | ecore_event_add(ECORE_COCOA_EVENT_GOT_FOCUS, e, NULL, NULL); |
112 | } | 112 | } |
113 | 113 | ||
@@ -131,7 +131,7 @@ static NSCursor *_cursors[__ECORE_COCOA_CURSOR_LAST]; | |||
131 | CRI("Failed to allocate Ecore_Cocoa_Event_Window"); | 131 | CRI("Failed to allocate Ecore_Cocoa_Event_Window"); |
132 | return; | 132 | return; |
133 | } | 133 | } |
134 | e->wid = [notification object]; | 134 | e->cocoa_window = [notification object]; |
135 | ecore_event_add(ECORE_COCOA_EVENT_LOST_FOCUS, e, NULL, NULL); | 135 | ecore_event_add(ECORE_COCOA_EVENT_LOST_FOCUS, e, NULL, NULL); |
136 | } | 136 | } |
137 | 137 | ||
@@ -588,8 +588,8 @@ ecore_cocoa_window_view_set(Ecore_Cocoa_Window *window, | |||
588 | [area release]; | 588 | [area release]; |
589 | } | 589 | } |
590 | 590 | ||
591 | EAPI Ecore_Cocoa_Window_Id | 591 | EAPI Ecore_Cocoa_Object * |
592 | ecore_cocoa_window_get_window_id(const Ecore_Cocoa_Window *window) | 592 | ecore_cocoa_window_get(const Ecore_Cocoa_Window *window) |
593 | { | 593 | { |
594 | EINA_SAFETY_ON_NULL_RETURN_VAL(window, NULL); | 594 | EINA_SAFETY_ON_NULL_RETURN_VAL(window, NULL); |
595 | return window->window; | 595 | return window->window; |