summaryrefslogtreecommitdiff
path: root/src/lib/ecore_cocoa
diff options
context:
space:
mode:
authorNicolas Aguirre <aguirre.nicolas@gmail.com>2013-12-10 08:24:14 +0100
committerCedric BAIL <c.bail@partner.samsung.com>2014-06-18 11:34:06 +0200
commitb24e462ef68b62a1ce4075a00587adf882e3b506 (patch)
treeb6b789cf58bb1a00f9de5a3d8a6e088dc79dfa9c /src/lib/ecore_cocoa
parentbef09531c15a504f2385bb2470190102bf2872cb (diff)
ecore_cocoa: remove printf
Diffstat (limited to 'src/lib/ecore_cocoa')
-rw-r--r--src/lib/ecore_cocoa/ecore_cocoa.m28
1 files changed, 22 insertions, 6 deletions
diff --git a/src/lib/ecore_cocoa/ecore_cocoa.m b/src/lib/ecore_cocoa/ecore_cocoa.m
index 3f6023af1f..5d8e2882cf 100644
--- a/src/lib/ecore_cocoa/ecore_cocoa.m
+++ b/src/lib/ecore_cocoa/ecore_cocoa.m
@@ -81,8 +81,13 @@ ecore_cocoa_feed_events(void)
81 { 81 {
82 Ecore_Event_Mouse_Move * ev = calloc(1, sizeof(Ecore_Event_Mouse_Move)); 82 Ecore_Event_Mouse_Move * ev = calloc(1, sizeof(Ecore_Event_Mouse_Move));
83 if (!ev) return; 83 if (!ev) return;
84 ev->x = [event locationInWindow].x; 84
85 ev->y = [event locationInWindow].y; 85 EcoreCocoaWindow *window = (EcoreCocoaWindow *)[event window];
86 NSView *view = [window contentView];
87 NSPoint pt = [event locationInWindow];
88
89 ev->x = pt.x;
90 ev->y = [view frame].size.height - pt.y;
86 ev->root.x = ev->x; 91 ev->root.x = ev->x;
87 ev->root.y = ev->y; 92 ev->root.y = ev->y;
88 ev->timestamp = time; 93 ev->timestamp = time;
@@ -100,8 +105,13 @@ ecore_cocoa_feed_events(void)
100 { 105 {
101 Ecore_Event_Mouse_Button * ev = calloc(1, sizeof(Ecore_Event_Mouse_Button)); 106 Ecore_Event_Mouse_Button * ev = calloc(1, sizeof(Ecore_Event_Mouse_Button));
102 if (!ev) return; 107 if (!ev) return;
103 ev->x = [event locationInWindow].x; 108
104 ev->y = [event locationInWindow].y; 109 EcoreCocoaWindow *window = (EcoreCocoaWindow *)[event window];
110 NSView *view = [window contentView];
111 NSPoint pt = [event locationInWindow];
112
113 ev->x = pt.x;
114 ev->y = [view frame].size.height - pt.y;
105 ev->root.x = ev->x; 115 ev->root.x = ev->x;
106 ev->root.y = ev->y; 116 ev->root.y = ev->y;
107 ev->timestamp = time; 117 ev->timestamp = time;
@@ -128,8 +138,13 @@ ecore_cocoa_feed_events(void)
128 { 138 {
129 Ecore_Event_Mouse_Button * ev = calloc(1, sizeof(Ecore_Event_Mouse_Button)); 139 Ecore_Event_Mouse_Button * ev = calloc(1, sizeof(Ecore_Event_Mouse_Button));
130 if (!ev) return; 140 if (!ev) return;
131 ev->x = [event locationInWindow].x; 141
132 ev->y = [event locationInWindow].y; 142 EcoreCocoaWindow *window = (EcoreCocoaWindow *)[event window];
143 NSView *view = [window contentView];
144 NSPoint pt = [event locationInWindow];
145
146 ev->x = pt.x;
147 ev->y = [view frame].size.height - pt.y;
133 ev->root.x = ev->x; 148 ev->root.x = ev->x;
134 ev->root.y = ev->y; 149 ev->root.y = ev->y;
135 ev->timestamp = time; 150 ev->timestamp = time;
@@ -163,6 +178,7 @@ ecore_cocoa_feed_events(void)
163 { 178 {
164 if (keystable[i].code == tolower([[event charactersIgnoringModifiers] characterAtIndex:0])) 179 if (keystable[i].code == tolower([[event charactersIgnoringModifiers] characterAtIndex:0]))
165 { 180 {
181 printf("Key pressed : %s\n", keystable[i].name);
166 ev->keyname = keystable[i].name; 182 ev->keyname = keystable[i].name;
167 ev->string = keystable[i].compose; 183 ev->string = keystable[i].compose;
168 184