Commit Graph

146 Commits

Author SHA1 Message Date
Jean Guyomarc'h 2d338afb7c ecore_cocoa: add missing documentation
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-03-02 13:56:39 -08:00
Jean Guyomarc'h b21ab5b541 ecore_cocoa: move Ecore_Cocoa_Cursor.h in Ecore_Cocoa.h
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-03-02 13:56:35 -08:00
Jean Guyomarc'h e8c17ce341 ecore_cocoa: full documentation of Ecore_Cocoa.h
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-03-02 13:56:32 -08:00
Jean Guyomarc'h deb553d55e ecore_cocoa: remove Ecore_Cocoa_Event_Window
Create specific structures for each event:
- Ecore_Cocoa_Event_Window_Focused
- Ecore_Cocoa_Event_Window_Unfocused
- Ecore_Cocoa_Event_Window_Destroy

They are currently hold the same data, but this will allow not to break
the event protocol when future extensions will be needed.

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-03-02 13:56:28 -08:00
Jean Guyomarc'h e7dc1491a2 ecore_cocoa: rename width and height parameters
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-03-02 13:56:24 -08:00
Jean Guyomarc'h 3b61c2e07c ecore_cocoa: better naming of events
Lost and got focused have been renamed FOCUSED and UNFOCUSED to mirror
the focus API in Elementary.

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-03-02 13:56:20 -08:00
Jean Guyomarc'h 84bbe500c5 ecore_cocoa: replace Ecore_Cocoa_Window_Id by Ecore_Cocoa_Object
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-03-02 13:56:16 -08:00
Jean Guyomarc'h 71199709db 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>
2016-03-02 13:56:12 -08:00
Jean Guyomarc'h 0abeacb8ce 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*.

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-03-02 13:56:08 -08:00
Jean Guyomarc'h 1528b8c6aa ecore_cocoa: use Eina_Bool instead of int
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-03-02 13:56:04 -08:00
Jean Guyomarc'h f85667c3fc ecore_cocoa: implement and const-correct window size step getter
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-03-02 13:56:01 -08:00
Jean Guyomarc'h 070430d51a ecore_cocoa: implement and const-correct window size max getter
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-03-02 13:55:57 -08:00
Jean Guyomarc'h 3eee82de31 ecore_cocoa: implement and const-correct window min size getter
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-03-02 13:55:53 -08:00
Jean Guyomarc'h 5deb157770 ecore_cocoa: implement and const-correct window size getter
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-03-02 13:55:49 -08:00
Jean Guyomarc'h 24a7209b51 ecore_cocoa: implement and const-correct window geometry getter
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-03-02 13:55:43 -08:00
Jean Guyomarc'h 4c5cc811d9 ecore_cocoa: don't redefine EAPI in private header 2016-01-07 12:03:05 +01:00
Jean Guyomarc'h 34293b02af ecore_cocoa: don't expose Ecore_Cocoa_Screen in the public API 2016-01-07 12:03:05 +01:00
Jean Guyomarc'h edaa72ce1c ecore_cocoa: remove unimplemented function 2016-01-07 12:03:05 +01:00
Jean Guyomarc'h 5e268c9973 ecore_cocoa: remove non-implemented functions 2016-01-07 12:03:05 +01:00
Jean Guyomarc'h 8d364f56f4 ecore_cocoa: possibly avoid useless copies 2016-01-07 12:03:04 +01:00
Jean Guyomarc'h 8a77d72317 ecore_cocoa: remove unimplemented function 2016-01-07 12:03:04 +01:00
Jean Guyomarc'h f3ca5f6f3d ecore_cocoa: don't use Ecore_Cocoa's EAPI in Eina 2016-01-07 12:03:04 +01:00
Jaehyun Cho 91d9e7f83c Revert "ecore_cocoa: add support for system cursors"
This reverts commit 4623d57762.
This commit is duplicated with 2c93c73cbd.
2015-12-11 14:28:33 +09:00
Jean Guyomarc'h 4623d57762 ecore_cocoa: add support for system cursors
- Ecore_Cocoa_Cursor enum which references system cursors;
- API to show/hide cursor: ecore_cocoa_window_cursor_show();
- API to set system cursor: ecore_cocoa_window_cursor_set();
- Ecore_Evas interface to get Ecore_Cocoa_Window from Ecore_Evas.

@feature

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-12-03 12:07:20 -05:00
Jean Guyomarc'h 12db3c2213 ecore_cocoa: fix live resize of windows
This was a tricky little bastard!
When a window is live resized, the NSWindow which is the target of
the live resize will wait for a kevent from the window manager,
until live resizing is done. So... live resizing is synchronous
and blocks the main thread... hence ecore_main_loop.

- When live resize starts, the Ecore_Timer which polls NSRunLoop
is paused.
- When the window is resized, the ecore_main_loop is run manually
with ecore_main_loop_iterate() to process Ecore events (mostly
Ecore_Evas)
- When live resize finished, the Ecore_Timer which polls NSRunLoop
is resumed.

@fix

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-12-01 12:15:33 -08:00
Jean Guyomarc'h ca49333757 ecore_cocoa_app: don't override init
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-12-01 12:15:32 -08:00
Jean Guyomarc'h 2d7870083c ecore_cocoa: don't make ecore_cocoa_feed_events() a public API
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-12-01 12:15:32 -08:00
Jean Guyomarc'h 907f14c003 ecore_cocoa: NSApp must be configured in the App wrapper
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-12-01 12:15:32 -08:00
Jean Guyomarc'h af19d15a78 ecore_cocoa_window: cosmetic changes
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-12-01 12:15:32 -08:00
Jean Guyomarc'h 967d2fe7fa ecore_cocoa: don't export Ecore_Cocoa_Keys.h
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-12-01 12:15:32 -08:00
Jean Guyomarc'h 614274f857 ecore_cocoa: factorize code
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-12-01 12:15:32 -08:00
Jean Guyomarc'h 69ed0d889c ecore_cocoa_cnp: make API thread-safe
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-12-01 12:15:32 -08:00
Jean Guyomarc'h 2f883ba151 ecore_cocoa_cnp: clear the clipboard only if writable
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-12-01 12:15:32 -08:00
Jean Guyomarc'h 32d6cb6efd ecore_cocoa: NSEvent modifiers are of type NSUInteger
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-12-01 12:15:32 -08:00
Jean Guyomarc'h 6574b8769c ecore_cocoa: report error when [super init] fails
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-12-01 12:15:32 -08:00
Jean Guyomarc'h a8c9c9a60e ecore_cocoa: remove EINA_UNUSED because parameter is used
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-12-01 12:15:32 -08:00
Jean Guyomarc'h f83ece242e ecore_cocoa: remove debug log
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-12-01 12:15:32 -08:00
Jean Guyomarc'h 70a04ea746 ecore_cocoa: reindent file
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-12-01 12:15:32 -08:00
Jean Guyomarc'h 0bb310f2ad ecore_cocoa: add more safety checks
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-12-01 12:15:32 -08:00
Jean Guyomarc'h b61fc5814b ecore_cocoa: remove EINA_UNUSED because parameter is actually used
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-12-01 12:15:32 -08:00
Jean Guyomarc'h 63ad6ed3f0 ecore_cocoa: prevent Ecore_Cocoa_Window to be re-defined
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-12-01 12:15:32 -08:00
Jean Guyomarc'h 1ab2b14cfb ecore_cocoa: remove ECORE_COCOA_EVENT_EXPOSE
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-12-01 12:15:32 -08:00
Jean Guyomarc'h 616ad954fc ecore_cocoa: remove unused events 2015-12-01 12:15:32 -08:00
Jean Guyomarc'h 52506cf214 ecore_cocoa: start doxygen
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-12-01 12:15:31 -08:00
Jean Guyomarc'h 25a44cc9d8 ecore_cocoa: don't track NSAppKitDefined event
Currently, it was used only to get track of focus, howver focus was
already handled (and better) in ecore_cocoa_window (with
NSWindowDelegate).
This led to the LOST_FOCUS event to be posted twice, with different
values, which messed up the focus stack.

@fix

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-12-01 12:15:31 -08:00
Jean Guyomarc'h cb334b3e37 ecore_cocoa: fix types
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-12-01 12:15:31 -08:00
Jean Guyomarc'h 3d5f1817e6 ecore_cocoa: copy and paste support
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-12-01 12:15:31 -08:00
Jean Guyomarc'h 8182fc38cb ecore_cocoa: silent warning: unused parameter 2015-12-01 12:15:31 -08:00
Jean Guyomarc'h 916bf675e1 ecore_cocoa: use EAPI in implementation 2015-12-01 12:15:31 -08:00
Jean Guyomarc'h d48faf39bf ecore_cocoa: improve const-correctness 2015-12-01 12:15:31 -08:00
Jean Guyomarc'h 586c8b4582 ecore_cocoa: don't specify inline
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-12-01 12:15:31 -08:00
Jean Guyomarc'h 2c93c73cbd ecore_cocoa: add support for system cursors
- Ecore_Cocoa_Cursor enum which references system cursors;
- API to show/hide cursor: ecore_cocoa_window_cursor_show();
- API to set system cursor: ecore_cocoa_window_cursor_set();
- Ecore_Evas interface to get Ecore_Cocoa_Window from Ecore_Evas.

@feature

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-12-01 12:15:31 -08:00
Nicolas Aguirre aab530e347 ecore_cocoa/evas_gl_cocoa: fix indent, remove printf, and add DBG messages
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-11-09 10:42:34 -08:00
pierre lamot c3f40bd0f9 ecore_cocoa: prevent mouse event loss when clicking in titlebar
fix
2015-11-02 20:15:59 +01:00
Nicolas Aguirre 51e0bc022b ecore_cocoa: fix a bug where event timestamp was not retrieved correctly.
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-10-13 15:40:01 -07:00
Nicolas Aguirre 44e945abbb ecore_cocoa: use a timer instead of a poller to be more responsive when dealing with cocoa Event.
As all Mouse and Keyboard events comme from Cocoa, the poll period must
be reduced. Backwards of this method is that when no signal are
received for a long period, the timer fired anyway and consumes CPU
for nothig but it seems there is no easy method to integrate NSApplication
mainloop into an existing one.

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-10-13 15:40:00 -07:00
Nicolas Aguirre 86030d308c ecore_cocoa: fix warnings, add Debug outputs where needed and remove printfs
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-10-13 15:40:00 -07:00
Stefan Schmidt 56560329ae ecore: cocoa: convert dos to unix line endings 2015-09-04 14:54:07 +02:00
Jean Guyomarc'h 3a3b12d403 ecore_cocoa,ethumb: fix compiling after EAPI policy changes
Summary:
I went through a lot of undefined symbols while compiling ecore_evas_cocoa
module and ethumb-related binaries. E.g.:

  Undefined symbols for architecture x86_64:
    "_ECORE_COCOA_EVENT_EXPOSE", referenced from:
        _ecore_evas_cocoa_new_internal in modules_ecore_evas_engines_cocoa_module_la-ecore_evas_cocoa.o
    "_ECORE_COCOA_EVENT_GOT_FOCUS", referenced from:
        _ecore_evas_cocoa_new_internal in modules_ecore_evas_engines_cocoa_module_la-ecore_evas_cocoa.o
    "_ECORE_COCOA_EVENT_LOST_FOCUS", referenced from:
        _ecore_evas_cocoa_new_internal in modules_ecore_evas_engines_cocoa_module_la-ecore_evas_cocoa.o
    "_ECORE_COCOA_EVENT_RESIZE", referenced from:
        _ecore_evas_cocoa_new_internal in modules_ecore_evas_engines_cocoa_module_la-ecore_evas_cocoa.o
    "_ECORE_COCOA_EVENT_WINDOW_DESTROY", referenced from:
        _ecore_evas_cocoa_new_internal in modules_ecore_evas_engines_cocoa_module_la-ecore_evas_cocoa.o
    "_ecore_cocoa_init", referenced from:
        _ecore_evas_cocoa_new_internal in modules_ecore_evas_engines_cocoa_module_la-ecore_evas_cocoa.o
    "_ecore_cocoa_screen_size_get", referenced from:
        __ecore_evas_screen_geometry_get in modules_ecore_evas_engines_cocoa_module_la-ecore_evas_cocoa.o
    "_ecore_cocoa_shutdown", referenced from:
        _ecore_evas_cocoa_new_internal in modules_ecore_evas_engines_cocoa_module_la-ecore_evas_cocoa.o
        __ecore_evas_cocoa_free in modules_ecore_evas_engines_cocoa_module_la-ecore_evas_cocoa.o

  Undefined symbols for architecture x86_64:
    "_ethumb_calculate_aspect_from_ratio", referenced from:
        __resize_movie in modules_ethumb_emotion_module_la-emotion.o
    "_ethumb_calculate_fill_from_ratio", referenced from:
        __resize_movie in modules_ethumb_emotion_module_la-emotion.o
    "_ethumb_ecore_evas_get", referenced from:
        __frame_decode_cb in modules_ethumb_emotion_module_la-emotion.o
    "_ethumb_evas_get", referenced from:
        __thumb_generate in modules_ethumb_emotion_module_la-emotion.o
        __finish_thumb_generation in modules_ethumb_emotion_module_la-emotion.o
    "_ethumb_finished_callback_call", referenced from:
        __thumb_generate in modules_ethumb_emotion_module_la-emotion.o
        __frame_decode_cb in modules_ethumb_emotion_module_la-emotion.o
        __finish_thumb_generation in modules_ethumb_emotion_module_la-emotion.o
    "_ethumb_image_save", referenced from:
        __frame_decode_cb in modules_ethumb_emotion_module_la-emotion.o
    "_ethumb_plugin_image_resize", referenced from:
        __resize_movie in modules_ethumb_emotion_module_la-emotion.o
    "_ethumb_plugin_register", referenced from:
        __module_init in modules_ethumb_emotion_module_la-emotion.o
    "_ethumb_plugin_unregister", referenced from:
        __module_shutdown in modules_ethumb_emotion_module_la-emotion.o

EAPI was not well re-defined in both cases. It has been handled in
ecore_cocoa_private.h and ethumb_private.h. These files must be included
after a main library header (because EAPI is undef there).

Reviewers: cedric

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D2483

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-05-10 22:58:14 +02:00
Cedric BAIL ce5ccfb5be ecore: remove the need to order the header correctly for Windows. 2015-05-07 09:53:10 +02:00
pierre lamot 869ed025a2 ecore_cocoa: fix scrollwheel behavior
- prioritize vertical scroll over horizontal
  - set amount to either -1 or 1, since EFL doesn't handle other value properly
  - fix wheel bouncing with some devices (X:0,Y:0 scrolling events)

  @fix
2015-04-07 19:05:55 +02:00
pierre lamot 59532c7d96 ecore_cocoa: add missing window state functions
implement missing window state functions:

  * raise
  * lower
  * activate
  * iconified_set
  * withdrawn_set
  * move

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-03-17 10:42:51 +01:00
pierre lamot ca3bd69485 ecore_cocoa: add functions to allow min/max window size
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-03-17 10:42:51 +01:00
pierre lamot be98af31bf ecore_cocoa: fix mouse scrollwheel direction
horizontal and vertical direction where inverted

@fix
2015-03-17 10:42:51 +01:00
pierre lamot ef7e8562a1 ecore_cocoa: don't reject mouse events outside the window
mouse events ouside the window where rejected. that was creating
interactions where half an event was created, the application was
then not able to process correctly following events.

@fix

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-03-17 10:42:51 +01:00
pierre lamot fec6d1207a ecore_cocoa: add support for non latin keyboard events
this patch adds support for non latin keyboard layout such as
arabic, greek or hebrew, some language might not be functionnal
tough like korean or chineese

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-03-17 10:42:51 +01:00
pierre lamot 6ea9b476ad ecore_cocoa: release resources on window close event
@fix this patch:

catch the window close event from cocoa and send an ecore event
this event is catched by a handler in ecore_evas wich will
call the registered fn_delete_request (from elementary for instance)

/!\ this patch is currently incomplete and leads to a segv when
closing the last window

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-03-17 10:42:51 +01:00
pierre lamot ae4389a7bd ecore_cocoa: fix keyboad event handling
This patch allows to interpret correctly several types of key combinations:
  - alt keys : € œ ¬
  - dead keys : ä ë
  - dead keys (bis, they are handled differently) : ~ ã
  - control keys: ^C ^A
  - page up/ page down

@fix

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-03-12 07:43:59 +01:00
pierre lamot d9830a199f ecore_cocoa: handle right and other mouse events
right and other mouse events where missing in the patch
correcting mouse event handling

@fix

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-03-12 07:43:59 +01:00
pierre lamot c0aedc828a ecore_cocoa: move mouse event handling to NSWindow
Mouse events was broken after a resize of the window from the left
or the bottom. As I understand, theses resize were changing the origin
of Cocoa window independly from the origin of the EFL.

This has been resolved by moving mouse envents handling to our NSWindow
delegate. thus events are always in the right referential.

@fix

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-03-12 07:43:59 +01:00
Nicolas Aguirre 2b4faaaeac ecore_cocoa: remove ObjC autorelease block to avoid segv when window is closed.
autorelease block is used in ObjC to release automatically objects not used
anymore. Placed here this block release the NSWindow we created by hand in the
ecore_cocoa code and give us a SEGV as we use memory already freed
automatically. Removing this block fix this issue.

@fix

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-03-12 07:43:58 +01:00
Guilherme Lepsch 186a1ab11d ecore_cocoa: cosmetic color.
Summary: The log is registered with the private definition ECORE_DEFAULT_LOG_COLOR from ecore_private.h. Changed to a explicit color.

Reviewers: cedric

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D2010

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-02-20 14:53:04 +01:00
Guilherme Lepsch 6749348325 ecore_cocoa: remove duplicated includes.
Summary: Remove duplicated includes in source file.

Reviewers: naguirre

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D2001

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-02-20 11:29:34 +01:00
Guilherme Lepsch 7b12e6cc86 ecore_cocoa: fix MacOS X build with clang 3.6
Summary:
* Fix extern declaration of _ecore_cocoa_log_domain variable defined as private with static;
* Fix including a private header from another module (ecore).

Reviewers: naguirre

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D2000

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-02-20 11:28:03 +01:00
Michelle Legrand 73634580f8 ecore_cocoa: Handle more special characters and capital characters.
This improve the situation and only affect Ecore_Cocoa code base by
detecting a useful charactere.

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-02-05 16:38:07 +01:00
Michelle Legrand 48fff1478c ecore_cocoa: add ecore event on mouse scroll for cocoa.
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-02-05 16:38:07 +01:00
Michelle Legrand c9dd8fde7d ecore_cocoa: replace "keyname" by "key".
Ecore_Event_Key attribute "key" cannot be NULL. This
raise a segmentation fault in Enventor when hitting on
modifier keys.

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-02-05 16:38:07 +01:00
Nicolas Aguirre 72baccaf44 ecore_cocoa: create a log domain and use Eina_Log.
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-02-05 16:38:07 +01:00
Nicolas Aguirre 61fbb2ffd9 ecore_cocoa: don't send mouse event with negative x or y values.
With cocoa you may have negatives values when Mouse Down or Up. This
changes fix this behavior by sending mouse event only if x and y are
inside the ecore_evas space.

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-02-05 16:38:07 +01:00
Romain Perier ff9eb2e8e7 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 <cedric@osg.samsung.com>
2015-02-05 16:38:07 +01:00
Romain Perier c6945c075e ecore_cocoa: use the right Cocoa notification handlers for focus events
Don't use NSAppKitDefined events subtype for focus events, which contain NULL
window object most of the time. Use the NSWindowDelegate method designed for that
purpose instead. It fixes random focus issues in windows which was caused by
incorrect window identifier not found in ecore_evas_cocoa.

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-02-05 16:38:07 +01:00
Romain Perier 382957c2b3 ecore_cocoa: add on the fly resizing support.
Until now, video_resize events was received only when application returned control
to the event loop. When a window is resized dynamically a lot of video_resize
events are emitted from EcoreCocoaWindow::windowDidResize and not handled
immediatly, only when the main thread is back to the ecore main loop. This is why
there are not refreshed window areas. Call ecore_main_loop_iterate() from
windowDidResize solves the issue.

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-02-05 16:38:07 +01:00
Romain Perier 2f6c564cc9 ecore_cocoa: fix _nsevent_window_is_type_of() type check
isKindOfClass should receive an instance of a class and a class as arguments and
not two class. It fixes Mouse events sent to a window on OSX.

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-02-05 16:38:07 +01:00
Michelle Legrand 1d18543719 ecore_cocoa: handle more special characters and capital characters.
This patch is self contained for Mac OS X and improve its keyboard handling.

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-02-05 16:38:07 +01:00
Jean Guyomarc'h c03876d611 ecore_cocoa: NSRunLoop integration
Summary: Get rid of the old NSApplicationLoad() which was aimed to be use with Carbon. Unless the NSRunLoop is strictly integrated to the ecore_main_loop() (where cocoa events would be checked when entering the ecore_main_loop) I think the poller is the only option left.

Reviewers: raster, naguirre, raoulh, stefan_schmidt, cedric

@feature

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D1222

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2014-09-03 20:34:57 +02:00
Jean Guyomarc'h f8235ff5c1 ecore_cocoa: Lion fullscreen workaround + warning fixes
Summary: Warnings and deprecated code fixes. I started to implement the OSX-Lion fullscreen style.

Reviewers: cedric, naguirre, raster, raoulh

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D1175
2014-07-23 16:56:16 +02:00
Jean Guyomarc'h be077f079d ecore_cocoa: Introduce canvas resizing + warning fixes
Summary: Add support for canvas resizing: the window was resizable but its content was not resized.

Reviewers: raster, raoulh, naguirre, cedric

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D1163
2014-07-10 20:04:24 +02:00
Raoul Hecky 6f2d060c80 ecore_cocoa: add code from old branch 2014-06-18 11:34:07 +02:00
Raoul Hecky fc4d108b5f ecore_cocoa: add missing header from my old branch 2014-06-18 11:34:07 +02:00
Nicolas Aguirre 6d7caf9450 ecore_cocoa: switch keys to map correctly on OS-X.
os-x is notoriously switching the meaning of those keys
calling "BackSpace" "Delete, and "Delete" "Forward Delete"

Original patch by Pierre Tardy
2014-06-18 11:34:07 +02:00
Nicolas Aguirre e4538b94d1 ecore_cocoa: fix button order. 2014-06-18 11:34:06 +02:00
Nicolas Aguirre 7e0d7a2c54 ecore_cocoa: indent with efl style 2014-06-18 11:34:06 +02:00
Nicolas Aguirre c7993e2cb4 ecore_cocoa: fix Key up/down usage, the event window was missing and the ev->key was not specified 2014-06-18 11:34:06 +02:00
Nicolas Aguirre b24e462ef6 ecore_cocoa: remove printf 2014-06-18 11:34:06 +02:00
Ivan Briano 61b8e2aefe More removal of \r 2013-02-17 14:53:25 -03:00
Vincent Torri 7d6010b12c merge: add escape ecore, fix several bugs
SVN revision: 79995
2012-12-02 22:35:45 +00:00