diff options
Diffstat (limited to 'src/lib/ecore_cocoa/Ecore_Cocoa.h')
-rw-r--r-- | src/lib/ecore_cocoa/Ecore_Cocoa.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/lib/ecore_cocoa/Ecore_Cocoa.h b/src/lib/ecore_cocoa/Ecore_Cocoa.h index a1c1e22218..b187f81e61 100644 --- a/src/lib/ecore_cocoa/Ecore_Cocoa.h +++ b/src/lib/ecore_cocoa/Ecore_Cocoa.h | |||
@@ -81,6 +81,17 @@ typedef struct _Ecore_Cocoa_Event_Window_Unfocused Ecore_Cocoa_Event_Window_Unfo | |||
81 | typedef struct _Ecore_Cocoa_Event_Window_Destroy Ecore_Cocoa_Event_Window_Destroy; | 81 | typedef struct _Ecore_Cocoa_Event_Window_Destroy Ecore_Cocoa_Event_Window_Destroy; |
82 | 82 | ||
83 | /** | 83 | /** |
84 | * @typedef Ecore_Cocoa_Terminate_Cb | ||
85 | * Callback called when a delete request is sent to the application. | ||
86 | * Such function must return EINA_TRUE for the application to terminate, | ||
87 | * and EINA_FALSE to ignore application termination. | ||
88 | * It is typically called by a CMD+Q signal. | ||
89 | * @param sender The NSApplication instance to be terminated | ||
90 | * @since 1.19 | ||
91 | */ | ||
92 | typedef Eina_Bool (*Ecore_Cocoa_Terminate_Cb)(Ecore_Cocoa_Object *sender); | ||
93 | |||
94 | /** | ||
84 | * @typedef Ecore_Cocoa_Cursor | 95 | * @typedef Ecore_Cocoa_Cursor |
85 | * Values of the Cocoa cursors handled by Ecore_Cocoa | 96 | * Values of the Cocoa cursors handled by Ecore_Cocoa |
86 | * See https://developer.apple.com/library/mac/documentation/Cocoa/Reference/ApplicationKit/Classes/NSCursor_Class/index.html for images of each cursors. | 97 | * See https://developer.apple.com/library/mac/documentation/Cocoa/Reference/ApplicationKit/Classes/NSCursor_Class/index.html for images of each cursors. |
@@ -527,6 +538,17 @@ EAPI void ecore_cocoa_window_cursor_set(Ecore_Cocoa_Window *win, | |||
527 | EAPI void ecore_cocoa_window_cursor_show(Ecore_Cocoa_Window *win, Eina_Bool show); | 538 | EAPI void ecore_cocoa_window_cursor_show(Ecore_Cocoa_Window *win, Eina_Bool show); |
528 | EINA_ARG_NONNULL(1); | 539 | EINA_ARG_NONNULL(1); |
529 | 540 | ||
541 | /** | ||
542 | * Overrides the default behaviour in response to an application delete | ||
543 | * request. When an application receives a delete request (i.e. CMD+Q) | ||
544 | * the termination callback will be called and its result will determine | ||
545 | * whether the application should terminate or not | ||
546 | * @param cb The custom termination callback to set | ||
547 | * @see Ecore_Cocoa_Terminate_Cb | ||
548 | * @since 1.19 | ||
549 | */ | ||
550 | EAPI void ecore_cocoa_terminate_cb_set(Ecore_Cocoa_Terminate_Cb cb) | ||
551 | EINA_ARG_NONNULL(1); | ||
530 | 552 | ||
531 | 553 | ||
532 | /* | 554 | /* |