summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean Guyomarc'h <jean.guyomarch@gmail.com>2016-01-06 00:03:57 +0100
committerJean Guyomarc'h <jean.guyomarch@gmail.com>2016-02-11 22:27:44 +0100
commit80f33d72cf5d05281b002dd60850d6e2e61a16fd (patch)
treea3b56cdf5239a5e5a0556a17f9defa3dcbe9d2a0
parent4fb340e65244653d1880ccc6279565dfca4d37c9 (diff)
downloadefl-80f33d72cf5d05281b002dd60850d6e2e61a16fd.tar.gz
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*.
-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;
typedef void * Ecore_Cocoa_Window_Id;
/**
+ * @typedef Ecore_Cocoa_Object
+ * Opaque handler to refer to an objective-c object (aka id)
+ */
+typedef void Ecore_Cocoa_Object;
+
+/**
* @typedef Ecore_Cocoa_Event_Video_Resize
* Type of event thrown when a window is resized
*/
@@ -252,7 +258,7 @@ EAPI void ecore_cocoa_window_borderless_set(Ecore_Cocoa_Window *window,
Eina_Bool on);
EAPI void ecore_cocoa_window_view_set(Ecore_Cocoa_Window *window,
- void *view);
+ Ecore_Cocoa_Object *view);
EAPI int ecore_cocoa_titlebar_height_get(void);
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,
EAPI void
ecore_cocoa_window_view_set(Ecore_Cocoa_Window *window,
- void *view)
+ Ecore_Cocoa_Object *view)
{
EINA_SAFETY_ON_NULL_RETURN(window);
EINA_SAFETY_ON_NULL_RETURN(view);