summaryrefslogtreecommitdiff
path: root/src/lib/ecore_cocoa
diff options
context:
space:
mode:
authorNicolas Aguirre <aguirre.nicolas@gmail.com>2015-08-06 19:06:34 +0200
committerCedric BAIL <cedric@osg.samsung.com>2015-11-09 10:42:34 -0800
commitaab530e3473fa06ce035d2a30b200caa3b3c0ddc (patch)
treeff0c4c370bacaf93d481e57c940164504fc9a40b /src/lib/ecore_cocoa
parent23d8d71e083f24232cf316e8b272e3c8588141db (diff)
ecore_cocoa/evas_gl_cocoa: fix indent, remove printf, and add DBG messages
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.m26
1 files changed, 6 insertions, 20 deletions
diff --git a/src/lib/ecore_cocoa/ecore_cocoa.m b/src/lib/ecore_cocoa/ecore_cocoa.m
index 568a828e23..d4e85804b2 100644
--- a/src/lib/ecore_cocoa/ecore_cocoa.m
+++ b/src/lib/ecore_cocoa/ecore_cocoa.m
@@ -33,8 +33,6 @@ ecore_cocoa_init(void)
33 if (++_ecore_cocoa_init_count != 1) 33 if (++_ecore_cocoa_init_count != 1)
34 return _ecore_cocoa_init_count; 34 return _ecore_cocoa_init_count;
35 35
36 DBG("Ecore Cocoa Init");
37
38 if (!ecore_init()) 36 if (!ecore_init())
39 return --_ecore_cocoa_init_count; 37 return --_ecore_cocoa_init_count;
40 38
@@ -48,6 +46,8 @@ ecore_cocoa_init(void)
48 return 0; 46 return 0;
49 } 47 }
50 48
49 DBG("");
50
51 ECORE_COCOA_EVENT_GOT_FOCUS = ecore_event_type_new(); 51 ECORE_COCOA_EVENT_GOT_FOCUS = ecore_event_type_new();
52 ECORE_COCOA_EVENT_LOST_FOCUS = ecore_event_type_new(); 52 ECORE_COCOA_EVENT_LOST_FOCUS = ecore_event_type_new();
53 ECORE_COCOA_EVENT_RESIZE = ecore_event_type_new(); 53 ECORE_COCOA_EVENT_RESIZE = ecore_event_type_new();
@@ -163,20 +163,6 @@ _ecore_cocoa_event_key(NSEvent *event, int keyType)
163 return ev; 163 return ev;
164} 164}
165 165
166static inline Eina_Bool
167_nsevent_window_is_type_of(NSEvent *event, Class class)
168{
169 /* An NSPeriodic event has no window (undefined behaviour) */
170 if ([event type] == NSPeriodic) return EINA_FALSE;
171 return [[event window] isKindOfClass:class];
172}
173
174static inline Eina_Bool
175_has_ecore_cocoa_window(NSEvent *event)
176{
177 return _nsevent_window_is_type_of(event, [EcoreCocoaWindow class]);
178}
179
180EAPI Eina_Bool 166EAPI Eina_Bool
181ecore_cocoa_feed_events(void *anEvent) 167ecore_cocoa_feed_events(void *anEvent)
182{ 168{
@@ -186,7 +172,7 @@ ecore_cocoa_feed_events(void *anEvent)
186 unsigned int time = (unsigned int)((unsigned long long)(ecore_time_get() * 1000.0) & 0xffffffff); 172 unsigned int time = (unsigned int)((unsigned long long)(ecore_time_get() * 1000.0) & 0xffffffff);
187 Eina_Bool pass = EINA_FALSE; 173 Eina_Bool pass = EINA_FALSE;
188 174
189 DBG("Feed events, event type ; %d", [event type]); 175 DBG("Feed events, event type ; %lu", [event type]);
190 176
191 switch ([event type]) 177 switch ([event type])
192 { 178 {
@@ -381,14 +367,14 @@ ecore_cocoa_feed_events(void *anEvent)
381} 367}
382 368
383EAPI void 369EAPI void
384ecore_cocoa_screen_size_get(Ecore_Cocoa_Screen *screen, int *w, int *h) 370ecore_cocoa_screen_size_get(Ecore_Cocoa_Screen *screen EINA_UNUSED, int *w, int *h)
385{ 371{
386 NSSize pt = [[[NSScreen screens] objectAtIndex:0] frame].size; 372 NSSize pt = [[[NSScreen screens] objectAtIndex:0] frame].size;
387 373
388 DBG("Screen size get : %dx%d", w, h);
389
390 if (w) *w = (int)pt.width; 374 if (w) *w = (int)pt.width;
391 if (h) *h = (int)pt.height; 375 if (h) *h = (int)pt.height;
376
377 DBG("Screen size get : %dx%d", (int)pt.width, (int)pt.height);
392} 378}
393 379
394EAPI int 380EAPI int