summaryrefslogtreecommitdiff
path: root/src/lib/ecore_cocoa
diff options
context:
space:
mode:
authorJean Guyomarc'h <jean.guyomarch@gmail.com>2016-01-06 00:16:16 +0100
committerCedric BAIL <cedric@osg.samsung.com>2016-03-02 13:56:12 -0800
commit71199709db61fb63c2a6766f2cde2b2108fa75a7 (patch)
tree964056f65f8c582d50e72aef7084480e01029ca2 /src/lib/ecore_cocoa
parent0abeacb8cec2b3339794edc6230531831d19a3cc (diff)
ecore_cocoa: unify API with Ecore_Evas
- Sizes are signed integers - Width is named w - Height is named h 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.h24
-rw-r--r--src/lib/ecore_cocoa/ecore_cocoa_window.m44
2 files changed, 34 insertions, 34 deletions
diff --git a/src/lib/ecore_cocoa/Ecore_Cocoa.h b/src/lib/ecore_cocoa/Ecore_Cocoa.h
index a794495f19..8d0e1bb8b2 100644
--- a/src/lib/ecore_cocoa/Ecore_Cocoa.h
+++ b/src/lib/ecore_cocoa/Ecore_Cocoa.h
@@ -215,28 +215,28 @@ EAPI void ecore_cocoa_window_size_get(const Ecore_Cocoa_Window *window,
215 int *h); 215 int *h);
216 216
217EAPI void ecore_cocoa_window_size_min_set(Ecore_Cocoa_Window *window, 217EAPI void ecore_cocoa_window_size_min_set(Ecore_Cocoa_Window *window,
218 unsigned int min_width, 218 int w,
219 unsigned int min_height); 219 int h);
220 220
221EAPI void ecore_cocoa_window_size_min_get(const Ecore_Cocoa_Window *window, 221EAPI void ecore_cocoa_window_size_min_get(const Ecore_Cocoa_Window *window,
222 unsigned int *min_width, 222 int *w,
223 unsigned int *min_height); 223 int *h);
224 224
225EAPI void ecore_cocoa_window_size_max_set(Ecore_Cocoa_Window *window, 225EAPI void ecore_cocoa_window_size_max_set(Ecore_Cocoa_Window *window,
226 unsigned int max_width, 226 int w,
227 unsigned int max_height); 227 int h);
228 228
229EAPI void ecore_cocoa_window_size_max_get(const Ecore_Cocoa_Window *window, 229EAPI void ecore_cocoa_window_size_max_get(const Ecore_Cocoa_Window *window,
230 unsigned int *max_width, 230 int *w,
231 unsigned int *max_height); 231 int *h);
232 232
233EAPI void ecore_cocoa_window_size_step_set(Ecore_Cocoa_Window *window, 233EAPI void ecore_cocoa_window_size_step_set(Ecore_Cocoa_Window *window,
234 unsigned int step_width, 234 int w,
235 unsigned int step_height); 235 int h);
236 236
237EAPI void ecore_cocoa_window_size_step_get(const Ecore_Cocoa_Window *window, 237EAPI void ecore_cocoa_window_size_step_get(const Ecore_Cocoa_Window *window,
238 unsigned int *step_width, 238 int *w,
239 unsigned int *step_height); 239 int *h);
240 240
241EAPI void ecore_cocoa_window_show(Ecore_Cocoa_Window *window); 241EAPI void ecore_cocoa_window_show(Ecore_Cocoa_Window *window);
242 242
diff --git a/src/lib/ecore_cocoa/ecore_cocoa_window.m b/src/lib/ecore_cocoa/ecore_cocoa_window.m
index e50f7d1241..e50e9c334a 100644
--- a/src/lib/ecore_cocoa/ecore_cocoa_window.m
+++ b/src/lib/ecore_cocoa/ecore_cocoa_window.m
@@ -341,8 +341,8 @@ ecore_cocoa_window_free(Ecore_Cocoa_Window *window)
341 341
342EAPI void 342EAPI void
343ecore_cocoa_window_size_min_set(Ecore_Cocoa_Window *window, 343ecore_cocoa_window_size_min_set(Ecore_Cocoa_Window *window,
344 unsigned int w, 344 int w,
345 unsigned int h) 345 int h)
346{ 346{
347 EINA_SAFETY_ON_NULL_RETURN(window); 347 EINA_SAFETY_ON_NULL_RETURN(window);
348 348
@@ -351,20 +351,20 @@ ecore_cocoa_window_size_min_set(Ecore_Cocoa_Window *window,
351 351
352EAPI void 352EAPI void
353ecore_cocoa_window_size_min_get(const Ecore_Cocoa_Window *window, 353ecore_cocoa_window_size_min_get(const Ecore_Cocoa_Window *window,
354 unsigned int *min_width, 354 int *w,
355 unsigned int *min_height) 355 int *h)
356{ 356{
357 EINA_SAFETY_ON_NULL_RETURN(window); 357 EINA_SAFETY_ON_NULL_RETURN(window);
358 358
359 const NSSize size = window->window.contentMinSize; 359 const NSSize size = window->window.contentMinSize;
360 if (min_width) *min_width = size.width; 360 if (w) *w = size.width;
361 if (min_height) *min_height = size.height; 361 if (h) *h = size.height;
362} 362}
363 363
364EAPI void 364EAPI void
365ecore_cocoa_window_size_max_set(Ecore_Cocoa_Window *window, 365ecore_cocoa_window_size_max_set(Ecore_Cocoa_Window *window,
366 unsigned int w, 366 int w,
367 unsigned int h) 367 int h)
368{ 368{
369 EINA_SAFETY_ON_NULL_RETURN(window); 369 EINA_SAFETY_ON_NULL_RETURN(window);
370 370
@@ -373,20 +373,20 @@ ecore_cocoa_window_size_max_set(Ecore_Cocoa_Window *window,
373 373
374EAPI void 374EAPI void
375ecore_cocoa_window_size_max_get(const Ecore_Cocoa_Window *window, 375ecore_cocoa_window_size_max_get(const Ecore_Cocoa_Window *window,
376 unsigned int *max_width, 376 int *w,
377 unsigned int *max_height) 377 int *h)
378{ 378{
379 EINA_SAFETY_ON_NULL_RETURN(window); 379 EINA_SAFETY_ON_NULL_RETURN(window);
380 380
381 const NSSize size = window->window.contentMaxSize; 381 const NSSize size = window->window.contentMaxSize;
382 if (max_width) *max_width = size.width; 382 if (w) *w = size.width;
383 if (max_height) *max_height = size.height; 383 if (h) *h = size.height;
384} 384}
385 385
386EAPI void 386EAPI void
387ecore_cocoa_window_size_step_set(Ecore_Cocoa_Window *window, 387ecore_cocoa_window_size_step_set(Ecore_Cocoa_Window *window,
388 unsigned int w, 388 int w,
389 unsigned int h) 389 int h)
390{ 390{
391 EINA_SAFETY_ON_NULL_RETURN(window); 391 EINA_SAFETY_ON_NULL_RETURN(window);
392 392
@@ -395,14 +395,14 @@ ecore_cocoa_window_size_step_set(Ecore_Cocoa_Window *window,
395 395
396EAPI void 396EAPI void
397ecore_cocoa_window_size_step_get(const Ecore_Cocoa_Window *window, 397ecore_cocoa_window_size_step_get(const Ecore_Cocoa_Window *window,
398 unsigned int *step_width, 398 int *w,
399 unsigned int *step_height) 399 int *h)
400{ 400{
401 EINA_SAFETY_ON_NULL_RETURN(window); 401 EINA_SAFETY_ON_NULL_RETURN(window);
402 402
403 const NSSize size = window->window.contentResizeIncrements; 403 const NSSize size = window->window.contentResizeIncrements;
404 if (step_width) *step_width = size.width; 404 if (w) *w = size.width;
405 if (step_height) *step_height = size.height; 405 if (h) *h = size.height;
406} 406}
407 407
408EAPI void 408EAPI void
@@ -470,17 +470,17 @@ EAPI void
470ecore_cocoa_window_move_resize(Ecore_Cocoa_Window *window, 470ecore_cocoa_window_move_resize(Ecore_Cocoa_Window *window,
471 int x, 471 int x,
472 int y, 472 int y,
473 int width, 473 int w,
474 int height) 474 int h)
475{ 475{
476 EINA_SAFETY_ON_NULL_RETURN(window); 476 EINA_SAFETY_ON_NULL_RETURN(window);
477 477
478 NSRect win_frame; 478 NSRect win_frame;
479 479
480 win_frame = [window->window frame]; 480 win_frame = [window->window frame];
481 win_frame.size.height = height + 481 win_frame.size.height = h +
482 (([window->window isFullScreen] == YES) ? 0 : ecore_cocoa_titlebar_height_get()); 482 (([window->window isFullScreen] == YES) ? 0 : ecore_cocoa_titlebar_height_get());
483 win_frame.size.width = width; 483 win_frame.size.width = w;
484 win_frame.origin.x = x; 484 win_frame.origin.x = x;
485 win_frame.origin.y = y; 485 win_frame.origin.y = y;
486 486