summaryrefslogtreecommitdiff
path: root/src/lib/ecore_cocoa
diff options
context:
space:
mode:
authorJean Guyomarc'h <jean.guyomarch@gmail.com>2016-01-06 21:38:10 +0100
committerCedric BAIL <cedric@osg.samsung.com>2016-03-02 13:56:16 -0800
commit84bbe500c5441e52b78453d469a183ea15e230db (patch)
tree77e74d15e7dd15b30b323971c19abfc9d0a7b1ed /src/lib/ecore_cocoa
parent71199709db61fb63c2a6766f2cde2b2108fa75a7 (diff)
ecore_cocoa: replace Ecore_Cocoa_Window_Id by Ecore_Cocoa_Object
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
Diffstat (limited to 'src/lib/ecore_cocoa')
-rw-r--r--src/lib/ecore_cocoa/Ecore_Cocoa.h12
-rw-r--r--src/lib/ecore_cocoa/ecore_cocoa_window.m12
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;
55typedef struct _Ecore_Cocoa_Screen Ecore_Cocoa_Screen; 55typedef 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 */
61typedef 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
97typedef struct _Ecore_Cocoa_Event_Window Ecore_Cocoa_Event_Window; 91typedef struct _Ecore_Cocoa_Event_Window Ecore_Cocoa_Event_Window;
98struct _Ecore_Cocoa_Event_Window 92struct _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
263EAPI int ecore_cocoa_titlebar_height_get(void); 257EAPI int ecore_cocoa_titlebar_height_get(void);
264 258
265EAPI Ecore_Cocoa_Window_Id ecore_cocoa_window_get_window_id(const Ecore_Cocoa_Window *window); 259EAPI Ecore_Cocoa_Object *ecore_cocoa_window_get(const Ecore_Cocoa_Window *window);
266 260
267 261
268EAPI Eina_Bool ecore_cocoa_selection_clipboard_set(const void *data, int size, Ecore_Cocoa_Cnp_Type type); 262EAPI 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
591EAPI Ecore_Cocoa_Window_Id 591EAPI Ecore_Cocoa_Object *
592ecore_cocoa_window_get_window_id(const Ecore_Cocoa_Window *window) 592ecore_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;