cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=ff9eb2e8e7e33cf12688df5ce7221a32582f1f58

commit ff9eb2e8e7e33cf12688df5ce7221a32582f1f58
Author: Romain Perier <romain.per...@openwide.fr>
Date:   Thu Jan 15 16:45:32 2015 +0100

    ecore_cocoa: add new events type for multiple window support.
    
    This commit adds a method in Ecore_Cocoa_Window to be able to retrieve an 
unique
    identifier for each window. It adds new events type and modify existing 
ones to
    pass these windows identifiers through the event call chain. Resize, 
GotFocus and
    LotFocus events are also updated to pass these identifiers to event 
handlers.
    
    Signed-off-by: Cedric BAIL <ced...@osg.samsung.com>
---
 src/lib/ecore_cocoa/Ecore_Cocoa.h        | 10 ++++++++++
 src/lib/ecore_cocoa/ecore_cocoa_window.m |  8 ++++++++
 2 files changed, 18 insertions(+)

diff --git a/src/lib/ecore_cocoa/Ecore_Cocoa.h 
b/src/lib/ecore_cocoa/Ecore_Cocoa.h
index 4f76f39..50796f1 100644
--- a/src/lib/ecore_cocoa/Ecore_Cocoa.h
+++ b/src/lib/ecore_cocoa/Ecore_Cocoa.h
@@ -39,11 +39,19 @@ EAPI extern int ECORE_COCOA_EVENT_LOST_FOCUS;
 EAPI extern int ECORE_COCOA_EVENT_RESIZE;
 EAPI extern int ECORE_COCOA_EVENT_EXPOSE;
 
+typedef void * Ecore_Cocoa_Window_Id;
 typedef struct _Ecore_Cocoa_Event_Video_Resize Ecore_Cocoa_Event_Video_Resize;
 struct _Ecore_Cocoa_Event_Video_Resize
 {
    int             w;
    int             h;
+   Ecore_Cocoa_Window_Id wid;
+};
+
+typedef struct _Ecore_Cocoa_Event_Window Ecore_Cocoa_Event_Window;
+struct _Ecore_Cocoa_Event_Window
+{
+   Ecore_Cocoa_Window_Id wid;
 };
 
 struct _Ecore_Cocoa_Screen
@@ -152,6 +160,8 @@ EAPI void ecore_cocoa_window_view_set(Ecore_Cocoa_Window 
*window,
 
 EAPI int ecore_cocoa_titlebar_height_get(void);
 
+EAPI Ecore_Cocoa_Window_Id ecore_cocoa_window_get_window_id(Ecore_Cocoa_Window 
*window);
+
 
 #ifdef __cplusplus
 }
diff --git a/src/lib/ecore_cocoa/ecore_cocoa_window.m 
b/src/lib/ecore_cocoa/ecore_cocoa_window.m
index 9739220..8300fbb 100644
--- a/src/lib/ecore_cocoa/ecore_cocoa_window.m
+++ b/src/lib/ecore_cocoa/ecore_cocoa_window.m
@@ -65,6 +65,7 @@
    event->w = size.width;
    event->h = size.height -
       (([self isFullScreen] == YES) ? 0 : ecore_cocoa_titlebar_height_get());
+   event->wid = [notif object];
    ecore_event_add(ECORE_COCOA_EVENT_RESIZE, event, NULL, NULL);
    ecore_main_loop_iterate();
 }
@@ -270,3 +271,10 @@ ecore_cocoa_window_view_set(Ecore_Cocoa_Window *window,
 
   [area release];
 }
+
+Ecore_Cocoa_Window_Id ecore_cocoa_window_get_window_id(Ecore_Cocoa_Window 
*window)
+{
+  if (!window)
+    return 0;
+  return window->window;
+}

-- 


Reply via email to