summaryrefslogtreecommitdiff
path: root/src/lib/ecore_cocoa
diff options
context:
space:
mode:
authorJean Guyomarc'h <jean.guyomarch@gmail.com>2016-01-06 00:03:57 +0100
committerCedric BAIL <cedric@osg.samsung.com>2016-03-02 13:56:08 -0800
commit0abeacb8cec2b3339794edc6230531831d19a3cc (patch)
tree24b0dd0e6127d260c75d6090cfcb54c2964eb3cd /src/lib/ecore_cocoa
parent1528b8c6aa019b2a421d597122494f496ffab898 (diff)
ecore_cocoa: introduce Ecore_Cocoa_Object
This type is used as a bridge between objective-c objects (which are ALWAYS pointed to) and the C interface. Ecore_Cocoa_Object* is a less ugly substitute for void*. 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.h8
-rw-r--r--src/lib/ecore_cocoa/ecore_cocoa_window.m2
2 files changed, 8 insertions, 2 deletions
diff --git a/src/lib/ecore_cocoa/Ecore_Cocoa.h b/src/lib/ecore_cocoa/Ecore_Cocoa.h
index 5e3ab8735b..a794495f19 100644
--- a/src/lib/ecore_cocoa/Ecore_Cocoa.h
+++ b/src/lib/ecore_cocoa/Ecore_Cocoa.h
@@ -61,6 +61,12 @@ typedef struct _Ecore_Cocoa_Screen Ecore_Cocoa_Screen;
61typedef void * Ecore_Cocoa_Window_Id; 61typedef void * Ecore_Cocoa_Window_Id;
62 62
63/** 63/**
64 * @typedef Ecore_Cocoa_Object
65 * Opaque handler to refer to an objective-c object (aka id)
66 */
67typedef void Ecore_Cocoa_Object;
68
69/**
64 * @typedef Ecore_Cocoa_Event_Video_Resize 70 * @typedef Ecore_Cocoa_Event_Video_Resize
65 * Type of event thrown when a window is resized 71 * Type of event thrown when a window is resized
66 */ 72 */
@@ -252,7 +258,7 @@ EAPI void ecore_cocoa_window_borderless_set(Ecore_Cocoa_Window *window,
252 Eina_Bool on); 258 Eina_Bool on);
253 259
254EAPI void ecore_cocoa_window_view_set(Ecore_Cocoa_Window *window, 260EAPI void ecore_cocoa_window_view_set(Ecore_Cocoa_Window *window,
255 void *view); 261 Ecore_Cocoa_Object *view);
256 262
257EAPI int ecore_cocoa_titlebar_height_get(void); 263EAPI int ecore_cocoa_titlebar_height_get(void);
258 264
diff --git a/src/lib/ecore_cocoa/ecore_cocoa_window.m b/src/lib/ecore_cocoa/ecore_cocoa_window.m
index 38c167ce43..e50f7d1241 100644
--- a/src/lib/ecore_cocoa/ecore_cocoa_window.m
+++ b/src/lib/ecore_cocoa/ecore_cocoa_window.m
@@ -568,7 +568,7 @@ ecore_cocoa_window_borderless_set(Ecore_Cocoa_Window *window,
568 568
569EAPI void 569EAPI void
570ecore_cocoa_window_view_set(Ecore_Cocoa_Window *window, 570ecore_cocoa_window_view_set(Ecore_Cocoa_Window *window,
571 void *view) 571 Ecore_Cocoa_Object *view)
572{ 572{
573 EINA_SAFETY_ON_NULL_RETURN(window); 573 EINA_SAFETY_ON_NULL_RETURN(window);
574 EINA_SAFETY_ON_NULL_RETURN(view); 574 EINA_SAFETY_ON_NULL_RETURN(view);