Commit Graph

13 Commits

Author SHA1 Message Date
Bo Anderson 51e4bcc32c ecore_cocoa: fix compile error using 10.15 SDK 2020-04-16 10:10:03 +02:00
Jean Guyomarc'h 1f8224cc9a ecore_cocoa: allow to override termination sequence 2016-10-30 16:46:29 +01:00
Jean Guyomarc'h e44c48b904 ecore_cocoa: upgrade API to macOS Sierra
Since macOS 10.12, several enumarations have been deprecated in favor of
new ones, with more meaningful ones, which are defined in SDK 10.12.
2016-09-27 08:52:51 +02: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 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 8182fc38cb ecore_cocoa: silent warning: unused parameter 2015-12-01 12:15:31 -08: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
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
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
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