Commit Graph

131 Commits

Author SHA1 Message Date
Jean Guyomarc'h 744d2a63c5 ecore_cocoa: fix the backspace key
The backspace key is supposed to send an ASCII code of 0x08, not 0x7F
(this would be the delete key). This has not be seen before as it is is
rare to use the ASCII code for the BackSpace key.

@fix
2017-10-29 16:06:31 +01:00
Jean Guyomarc'h d28dddfdea ecore_cocoa: consitfy structure fields
This structure is exclusively statically initialized. As none of its
fields will be altered, they can all be const.
2017-10-29 16:04:24 +01:00
Andy Williams bf8a0eead2 OSX: fix version detection in build 2017-07-17 13:04:30 +01:00
Jean Guyomarc'h 077791b7cc eina,ecore_cocoa: fix detection of the macOS SDK version
There was trouble with Homebrew's CI to build EFL on a macOS < 10.12
which uses a 10.12 SDK. See PR #13252 on github, Homebrew/homebrew-core
for details.

@fix
2017-06-27 23:14:31 +02:00
Myoungwoon Roy, Kim 802b547310 docs: Fix typos and some wrong expressions in Ecore, Ecore_Audio, Ecore_Cocoa, Ecore_Con, and Ector API reference doxygen.
Summary: I had fixed some typos and wrong expressions, such as capital letters, $simbols in .eo and singulars in Ecore, Ecore_Audio, Ecore_Cocoa, Ecore_Con, and Ector API reference doxygen.

Test Plan: Doxygen Revision

Reviewers: Jaehyun_Cho, stefan, jpeg, cedric, raster

Reviewed By: Jaehyun_Cho

Differential Revision: https://phab.enlightenment.org/D4943
2017-06-07 13:01:13 +09:00
Cedric BAIL af7a5ef5d9 ecore_cocoa: avoid crash during shutdown due to Ecore_Event queue. 2017-03-09 16:17:58 -08:00
Jean Guyomarc'h adf9608387 ecore_cocoa: fix windows initial rendering
We need to refresh the Cocoa's content view when showing the window.
In some particular cases (including the elementary_test initial window),
the content view is redrawn because of external events (the entry
animator). When no action at all is performed, the window and the
content view are resized... nice... but not drew...

Such a simple fix for this hell of a bug!

Fixes T5210
2017-03-09 23:16:16 +01:00
Jean Guyomarc'h fd7f878320 ecore_cocoa: factorize a little access to the cocoa window 2017-03-09 23:16:16 +01:00
Jean Guyomarc'h 88e352efe8 ecore_cocoa: pass the right window to ecore_evas 2017-03-09 00:57:55 +01:00
Jean Guyomarc'h 5e149977e7 ecore_cocoa: fix handling of some keys
The ascii circumflex (^) can be typed by pressing twice the ^ key on a
mac keyboard. A single press allows composition (e.g. ^+e = ê).
Pressing ^ twice though, led to a segmentation fault in elementary,
because the result character of the operation (^) appeared in the raw
characters stack, and not in the filtered one.
This is a bit weird, as backtick (`) appears in the filtered keys stack.

@fix
2016-10-30 16:46:30 +01:00
Jean Guyomarc'h 5c366cab26 ecore_cocoa: prettify code a bit
Remove extraneous whitespaces, use appropriate macros when possible,
and mark a memory allocation failure as an unlikely case.
2016-10-30 16:46:30 +01:00
Jean Guyomarc'h 4029164c8e ecore_cocoa: fix behaviour of option key
Commit e44c48b904 failed to translate the
deprecated API into the Sierra API... replacing the Command key flags
by the Option key flags. This resulted of Opt+q quitting the program.

@fix
2016-10-30 16:46:30 +01:00
Jean Guyomarc'h 1f8224cc9a ecore_cocoa: allow to override termination sequence 2016-10-30 16:46:29 +01:00
Guilherme Iscaro 186dd9b00e Ecore Cocoa: Add missing modifiers field to Ecore Events
Fix T4477
2016-10-10 14:20:47 -03:00
Guilherme Iscaro 0897715c8d Ecore_Cocoa: Fix repeat modifers keys.
Some values were repeated.
2016-10-10 14:20:47 -03: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
Thiep Ha db8b0020ec ecore_cocoa: quit application with key
In OS X, cmd-q is used to quit application,
this patch adds that feature.
2016-09-23 17:49:34 +09:00
Jean Guyomarc'h c8d82dfc61 ecore_cocoa: fix build warning 2016-09-08 07:51:30 +02:00
Jean Guyomarc'h 8118829225 ecore_cocoa: fix wrong key assignment 2016-08-31 21:24:49 +02:00
Jean Guyomarc'h 6b3ca899e8 ecore_cocoa: fix fullscreen for older osx versions
Tested on 10.11 and 10.9.

Fixes T4395
2016-08-26 19:38:57 +02:00
Jean Guyomarc'h 7397b9fbe9 ecore_cocoa: refactor resizing request 2016-08-26 19:05:48 +02:00
Jean Guyomarc'h 8d41099f9e ecore_cocoa: fix memory leak 2016-08-26 19:05:48 +02:00
Jean Guyomarc'h 55f791eb4c ecore_cocoa: remove pointless debug message
This message was also very annoying because systematically
printed out in the syslog when a cocoa window was closed.
2016-08-08 00:12:49 +02:00
Jean Guyomarc'h 51f2488b78 ecore_cocoa: release Ecore_Cocoa as stable 2016-06-25 20:45:25 +02:00
Jean Guyomarc'h 0788827158 ecore_cocoa: mark clipboard API as BETA
Also, Since the API is beta, don't make is available to Doxygen.
2016-06-25 20:45:06 +02:00
Jean Guyomarc'h f53a739e0e ecore_cocoa: simplify clipboard functions naming
ecore_cocoa_selection_clipboard_xxxx() have been renamed into
ecore_cocoa_clipboard_xxxx() and they have nothing to do with
selection, only with clipboard.

Since the API is not stable yet, I can change it.
2016-06-07 22:20:31 +02:00
Jean Guyomarc'h 7ada74abcd ecore_cocoa: move the default cursor definition out of the enum
This makes the code more explicit and less awkward.
2016-06-07 22:20:10 +02:00
Jean Guyomarc'h 7b29dff87e ecore_cocoa: improve documentation 2016-06-07 22:20:06 +02:00
Jean Guyomarc'h 266396b1eb ecore_cocoa: fix main loop handling
Pffff... another tricky one...

-windowDidResize is actually also called when the window is not
resize by the user, leading to multiple event posting, and of
course the infamous call of ecore_main_loop_iterate() when it
was not paused at all, leading to messy events handling... the
most visible being the initial resizing of the window going rogue.

We now ensure with -windowWillStartLiveResize and -windowDidEndLiveResize
that we only send an event when the user requested it. Since the main
loop is paused at this point, calling ecore_main_loop_iterate()
becomes safe.

Fixes T3648
2016-06-05 12:12:02 +02:00
Jean Guyomarc'h de5f293426 ecore_cocoa: fix broken scrolling
Evas events recently changed, and involved the use
of the 'multi' field within a mouse mouve event.
It was used afterwards for mouse scrolling, but since
it was never set by ecore_cocoa, scrolling went
broken...

Fixes T3789
2016-06-04 16:53:54 +02:00
Jean Guyomarc'h 29be8f2819 ecore_cocoa: fix window hiding logic 2016-06-04 16:53:26 +02:00
Jean Guyomarc'h 8a23d53c66 ecore_cocoa: remove extra whitespaces 2016-06-04 16:53:18 +02:00
Jean Guyomarc'h 7ef392c438 ecore_cocoa: fix bad copy/paste in documentation
Thanks to Stefan Schmidt.
2016-06-01 22:45:35 +02:00
Duna Oh fbe4e4b6ad Ecore: Use calloc() to initialize Ecore_Event_Mouse_XXXX
Summary:
To ensure initialize all fields of Ecore_Event_Mouse_XXX,
use calloc() instead of malloc().

Test Plan: N/A

Reviewers: gwanglim, cedric, raster, devilhorns, ManMower, zmike

Subscribers: jpeg, input.hacker, JHyun

Differential Revision: https://phab.enlightenment.org/D3906
2016-04-20 08:33:20 -04:00
Jean Guyomarc'h 0ceca701bf ecore_cocoa: add function attributes
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-03-02 13:56:49 -08:00
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