Ecore_Cocoa Wrapper Library to interact with the Cocoa environment (Mac OS X) from the E environment. More...
Data Structures | |
| struct | _Ecore_Cocoa_Event_Window_Resize_Request |
| Data available when a window is resized. More... | |
| struct | _Ecore_Cocoa_Event_Window_Focused |
| Data available when a Cocoa window receives focus. More... | |
| struct | _Ecore_Cocoa_Event_Window_Unfocused |
| Data available when a Cocoa window losrs focus. More... | |
| struct | _Ecore_Cocoa_Event_Window_Destroy |
| Data available when a Cocoa window is destroyed. More... | |
Macros | |
| #define | EAPI |
| #define | ECORE_COCOA_CURSOR_DEFAULT ECORE_COCOA_CURSOR_ARROW |
| Defines the default Cocoa cursor, to be used when nothing is specified or as a fallback. | |
| #define | EAPI |
Typedefs | |
| typedef struct _Ecore_Cocoa_Window | Ecore_Cocoa_Window |
| Opaque handler to manipulate a Cocoa Window through Ecore. | |
| typedef struct _Ecore_Cocoa_Screen | Ecore_Cocoa_Screen |
| Opaque handler to manipulate a Cocoa Screen through Ecore. | |
| typedef void | Ecore_Cocoa_Object |
| Opaque handler to refer to an objective-c object (a.k.a. | |
| typedef struct _Ecore_Cocoa_Event_Window_Resize_Request | Ecore_Cocoa_Event_Window_Resize_Request |
| Type of event thrown when a Cocoa window is resized. | |
| typedef struct _Ecore_Cocoa_Event_Window_Focused | Ecore_Cocoa_Event_Window_Focused |
| Type of event thrown when a Cocoa window receives focus. | |
| typedef struct _Ecore_Cocoa_Event_Window_Unfocused | Ecore_Cocoa_Event_Window_Unfocused |
| Type of event thrown when a Cocoa window loses the focus. | |
| typedef struct _Ecore_Cocoa_Event_Window_Destroy | Ecore_Cocoa_Event_Window_Destroy |
| Type of event thrown when a Cocoa window gets destoyed. | |
| typedef Eina_Bool(*) | Ecore_Cocoa_Terminate_Cb(Ecore_Cocoa_Object *sender) |
| Callback called when a delete request is sent to the application. | |
| typedef Eina_Bool(*) | Ecore_Cocoa_Reopen_Cb(Eina_Bool has_visible) |
| Callback called when the application is asked to reopen (e.g. | |
| typedef Eina_Bool(*) | Ecore_Cocoa_URL_Open_Cb(const char *url) |
| Callback called when macOS asks the application to open a URL. | |
| typedef struct _Ecore_Cocoa_Menu | Ecore_Cocoa_Menu |
| Opaque handle for a native NSMenu managed through Ecore_Cocoa. | |
Enumerations | |
| enum | Ecore_Cocoa_Cursor { ECORE_COCOA_CURSOR_ARROW = 0 , ECORE_COCOA_CURSOR_CONTEXTUAL_MENU , ECORE_COCOA_CURSOR_CLOSED_HAND , ECORE_COCOA_CURSOR_CROSSHAIR , ECORE_COCOA_CURSOR_DISAPPEARING_ITEM , ECORE_COCOA_CURSOR_DRAG_COPY , ECORE_COCOA_CURSOR_DRAG_LINK , ECORE_COCOA_CURSOR_IBEAM , ECORE_COCOA_CURSOR_OPEN_HAND , ECORE_COCOA_CURSOR_OPERATION_NOT_ALLOWED , ECORE_COCOA_CURSOR_POINTING_HAND , ECORE_COCOA_CURSOR_RESIZE_DOWN , ECORE_COCOA_CURSOR_RESIZE_LEFT , ECORE_COCOA_CURSOR_RESIZE_LEFT_RIGHT , ECORE_COCOA_CURSOR_RESIZE_RIGHT , ECORE_COCOA_CURSOR_RESIZE_UP , ECORE_COCOA_CURSOR_RESIZE_UP_DOWN , ECORE_COCOA_CURSOR_IBEAM_VERTICAL , __ECORE_COCOA_CURSOR_LAST } |
| Values of the Cocoa cursors handled by Ecore_Cocoa See https://developer.apple.com/library/mac/documentation/Cocoa/Reference/ApplicationKit/Classes/NSCursor_Class/index.html for images of each cursors. More... | |
Functions | |
| EAPI int | ecore_cocoa_init (void) |
| Inits the Ecore_Cocoa library. | |
| EAPI int | ecore_cocoa_shutdown (void) |
| Shuts the Ecore_Cocoa library down. | |
| EAPI void | ecore_cocoa_screen_size_get (Ecore_Cocoa_Screen *screen, int *w, int *h) |
| Retrieves the size of a Cocoa screen. | |
| EAPI Ecore_Cocoa_Window * | ecore_cocoa_window_new (int x, int y, int w, int h) |
| Creates a Cocoa window. | |
| EAPI void | ecore_cocoa_window_free (Ecore_Cocoa_Window *window) |
| Releases a Cocoa window. | |
| EAPI void | ecore_cocoa_window_move (Ecore_Cocoa_Window *window, int x, int y) |
| Moves a Cocoa window at a given point. | |
| EAPI void | ecore_cocoa_window_resize (Ecore_Cocoa_Window *window, int w, int h) |
| Resizes a Cocoa window to a given size. | |
| EAPI void | ecore_cocoa_window_move_resize (Ecore_Cocoa_Window *window, int x, int y, int w, int h) |
| Moves and resizes a Cocoa window to a given point and size. | |
| EAPI void | ecore_cocoa_window_geometry_get (const Ecore_Cocoa_Window *window, int *x, int *y, int *w, int *h) |
| Gets the geometry of a Cocoa window. | |
| EAPI void | ecore_cocoa_window_size_get (const Ecore_Cocoa_Window *window, int *w, int *h) |
| Gets the size of a Cocoa window. | |
| EAPI void | ecore_cocoa_window_size_min_set (Ecore_Cocoa_Window *window, int w, int h) |
| Sets the minimum size of a Cocoa window. | |
| EAPI void | ecore_cocoa_window_size_min_get (const Ecore_Cocoa_Window *window, int *w, int *h) |
| Gets the minimum size size of a Cocoa window. | |
| EAPI void | ecore_cocoa_window_size_max_set (Ecore_Cocoa_Window *window, int w, int h) |
| Sets the maximum size of a Cocoa window. | |
| EAPI void | ecore_cocoa_window_size_max_get (const Ecore_Cocoa_Window *window, int *w, int *h) |
| Gets the maximum size size of a Cocoa window. | |
| EAPI void | ecore_cocoa_window_size_step_set (Ecore_Cocoa_Window *window, int w, int h) |
| Sets a Cocoa window's resize increment. | |
| EAPI void | ecore_cocoa_window_size_step_get (const Ecore_Cocoa_Window *window, int *w, int *h) |
| Gets a Cocoa window's resize increment. | |
| EAPI void | ecore_cocoa_window_show (Ecore_Cocoa_Window *window) |
| Displays a Cocoa window. | |
| EAPI void | ecore_cocoa_window_hide (Ecore_Cocoa_Window *window) |
| Hides a Cocoa window. | |
| EAPI void | ecore_cocoa_window_raise (Ecore_Cocoa_Window *window) |
| Brings a Cocoa window to front. | |
| EAPI void | ecore_cocoa_window_lower (Ecore_Cocoa_Window *window) |
| Brings a Cocoa window back. | |
| EAPI void | ecore_cocoa_window_activate (Ecore_Cocoa_Window *window) |
| Makes a Cocoa window the current key window by raising it. | |
| EAPI void | ecore_cocoa_window_title_set (Ecore_Cocoa_Window *window, const char *title) |
| Changes the title of a Cocoa window. | |
| EAPI void | ecore_cocoa_window_iconified_set (Ecore_Cocoa_Window *window, Eina_Bool on) |
| Miniaturizes or deminiaturizes a Cocoa window. | |
| EAPI void | ecore_cocoa_window_borderless_set (Ecore_Cocoa_Window *window, Eina_Bool on) |
| Manages the borders of a Cocoa window. | |
| EAPI void | ecore_cocoa_window_view_set (Ecore_Cocoa_Window *window, Ecore_Cocoa_Object *view) |
| Sets the content view of a Cocoa window. | |
| EAPI int | ecore_cocoa_titlebar_height_get (void) |
| Gets the height of the title bar of Cocoa windows. | |
| EAPI Ecore_Cocoa_Object * | ecore_cocoa_window_get (const Ecore_Cocoa_Window *window) |
| Retrieves the actual NSWindow behind the Ecore_Cocoa wrapper. | |
| EAPI void | ecore_cocoa_window_cursor_set (Ecore_Cocoa_Window *win, Ecore_Cocoa_Cursor c) |
| Sets the Cocoa cursor for a given Cocoa window. | |
| EAPI void | ecore_cocoa_window_cursor_show (Ecore_Cocoa_Window *win, Eina_Bool show) |
| Hides or shows the Cocoa cursor for a given Cocoa window. | |
| EAPI double | ecore_cocoa_window_backing_scale_get (const Ecore_Cocoa_Window *window) |
| Gets the backing scale factor for HiDPI/Retina displays. | |
| EAPI void | ecore_cocoa_terminate_cb_set (Ecore_Cocoa_Terminate_Cb cb) |
| Overrides the default behaviour in response to an application delete request. | |
| EAPI Eina_Bool | ecore_cocoa_app_icon_set (const char *path) |
| Sets the application icon shown in the Dock and Command+Tab switcher. | |
| EAPI void | ecore_cocoa_reopen_cb_set (Ecore_Cocoa_Reopen_Cb cb) |
| Registers a callback to be invoked when the application is asked to reopen. | |
| EAPI void | ecore_cocoa_url_open_cb_set (Ecore_Cocoa_URL_Open_Cb cb) |
| Registers a callback to be invoked when macOS asks the application to open a URL via a registered custom URL scheme (CFBundleURLTypes in Info.plist). | |
| EAPI Ecore_Cocoa_Menu * | ecore_cocoa_menu_new (const char *title) |
| Creates a new top-level or sub NSMenu. | |
| EAPI void | ecore_cocoa_menu_free (Ecore_Cocoa_Menu *menu) |
| Frees an NSMenu and all associated target objects. | |
| EAPI int | ecore_cocoa_menu_item_add (Ecore_Cocoa_Menu *menu, const char *label, const char *icon, void(*cb)(void *data, Ecore_Cocoa_Menu *menu, int idx), void *data) |
| Adds a labeled menu item with an optional action callback. | |
| EAPI int | ecore_cocoa_menu_item_add_separator (Ecore_Cocoa_Menu *menu) |
| Adds a separator item to the menu. | |
| EAPI void | ecore_cocoa_menu_item_del (Ecore_Cocoa_Menu *menu, int idx) |
Removes the item at idx from the menu. | |
| EAPI void | ecore_cocoa_menu_item_tag_set (Ecore_Cocoa_Menu *menu, int idx, int tag) |
| Sets an integer tag on a menu item. | |
| EAPI void | ecore_cocoa_menu_item_del_by_tag (Ecore_Cocoa_Menu *menu, int tag) |
| Removes a menu item identified by its tag. | |
| EAPI int | ecore_cocoa_menu_item_index_by_tag (Ecore_Cocoa_Menu *menu, int tag) |
| Returns the positional index of the menu item matching the given tag. | |
| EAPI void | ecore_cocoa_menu_item_enabled_set (Ecore_Cocoa_Menu *menu, int idx, Eina_Bool enabled) |
| Enables or disables a menu item. | |
| EAPI void | ecore_cocoa_menu_item_enabled_set_by_tag (Ecore_Cocoa_Menu *menu, int tag, Eina_Bool enabled) |
| Enables or disables a menu item identified by its tag. | |
| EAPI void | ecore_cocoa_menu_item_label_set (Ecore_Cocoa_Menu *menu, int idx, const char *label) |
| Updates the label of an existing menu item. | |
| EAPI void | ecore_cocoa_menu_submenu_set (Ecore_Cocoa_Menu *menu, int idx, Ecore_Cocoa_Menu *submenu) |
| Attaches a sub-menu to an existing menu item. | |
| EAPI void | ecore_cocoa_menu_main_set (Ecore_Cocoa_Menu *menu) |
Installs menu as the application's main menu bar. | |
| EAPI Ecore_Cocoa_Menu * | ecore_cocoa_menu_main_get (void) |
| Returns the current main menu handle, or NULL if none has been set. | |
| EAPI Eina_Bool | ecore_cocoa_clipboard_set (const void *data, int size, const char *mime_type) |
| EAPI void * | ecore_cocoa_clipboard_get (int *size, const char *mime_type) |
| EAPI void | ecore_cocoa_clipboard_clear (void) |
| EAPI Eina_Bool | ecore_cocoa_clipboard_exists (void) |
Variables | |
| EAPI int | ECORE_COCOA_EVENT_WINDOW_FOCUSED |
| Event triggered when a Cocoa window receives focus. | |
| EAPI int | ECORE_COCOA_EVENT_WINDOW_UNFOCUSED |
| Event triggered when a Cocoa window loses focus. | |
| EAPI int | ECORE_COCOA_EVENT_WINDOW_RESIZE_REQUEST |
| Event triggered when a Cocoa window is resized. | |
| EAPI int | ECORE_COCOA_EVENT_WINDOW_DESTROY |
| Event triggered when a Cocoa window get destroyed. | |
Ecore_Cocoa Wrapper Library to interact with the Cocoa environment (Mac OS X) from the E environment.
| #define ECORE_COCOA_CURSOR_DEFAULT ECORE_COCOA_CURSOR_ARROW |
Defines the default Cocoa cursor, to be used when nothing is specified or as a fallback.
Referenced by elm_object_cursor_unset().
| typedef struct _Ecore_Cocoa_Window Ecore_Cocoa_Window |
Opaque handler to manipulate a Cocoa Window through Ecore.
| typedef struct _Ecore_Cocoa_Screen Ecore_Cocoa_Screen |
Opaque handler to manipulate a Cocoa Screen through Ecore.
| typedef void Ecore_Cocoa_Object |
Opaque handler to refer to an objective-c object (a.k.a.
id)
Type of event thrown when a Cocoa window is resized.
Type of event thrown when a Cocoa window receives focus.
Type of event thrown when a Cocoa window loses the focus.
Type of event thrown when a Cocoa window gets destoyed.
| typedef Eina_Bool(*) Ecore_Cocoa_Terminate_Cb(Ecore_Cocoa_Object *sender) |
Callback called when a delete request is sent to the application.
Such function must return EINA_TRUE for the application to terminate, and EINA_FALSE to ignore application termination. It is typically called by a CMD+Q signal.
| sender | The NSApplication instance to be terminated |
Callback called when the application is asked to reopen (e.g.
the user clicks the Dock icon or re-launches from Spotlight while the application is already running). This corresponds to the applicationShouldHandleReopen:hasVisibleWindows: NSApplicationDelegate method. Return EINA_TRUE to indicate the event was handled (macOS will not apply default behaviour). Return EINA_FALSE to let macOS apply its default behaviour (bring existing visible windows to front, or do nothing).
| has_visible | EINA_TRUE if the application has at least one visible window at the time of the reopen request. |
| typedef Eina_Bool(*) Ecore_Cocoa_URL_Open_Cb(const char *url) |
Callback called when macOS asks the application to open a URL.
This occurs when the user clicks a link using a custom URL scheme registered in the application's Info.plist (CFBundleURLTypes), e.g. terminology://tmux/work. This corresponds to the application:openURLs: NSApplicationDelegate method. The callback is invoked once per URL. Return EINA_TRUE to indicate the URL was handled, EINA_FALSE otherwise.
| url | The URL string to open (UTF-8 encoded, caller-owned — the callback must copy it if it needs to persist beyond the call). |
| enum Ecore_Cocoa_Cursor |
Values of the Cocoa cursors handled by Ecore_Cocoa See https://developer.apple.com/library/mac/documentation/Cocoa/Reference/ApplicationKit/Classes/NSCursor_Class/index.html for images of each cursors.
| EAPI int ecore_cocoa_init | ( | void | ) |
Inits the Ecore_Cocoa library.
References ecore_cocoa_init().
Referenced by ecore_cocoa_init().
| EAPI int ecore_cocoa_shutdown | ( | void | ) |
Shuts the Ecore_Cocoa library down.
References ecore_cocoa_shutdown().
Referenced by ecore_cocoa_shutdown().
| EAPI void ecore_cocoa_screen_size_get | ( | Ecore_Cocoa_Screen * | screen, |
| int * | w, | ||
| int * | h ) |
Retrieves the size of a Cocoa screen.
| screen | The screen which size must be retrieved | |
| [out] | w | The width of the screen |
| [out] | h | The height of the screen |
References ecore_cocoa_screen_size_get().
Referenced by ecore_cocoa_screen_size_get().
| EAPI Ecore_Cocoa_Window * ecore_cocoa_window_new | ( | int | x, |
| int | y, | ||
| int | w, | ||
| int | h ) |
Creates a Cocoa window.
| x | The origin (X) where the window must be created |
| y | The origin (Y) where the window must be created |
| w | The width of the window |
| h | The height of the window |
References ecore_cocoa_window_new(), EINA_MALLOC, and EINA_WARN_UNUSED_RESULT.
Referenced by ecore_cocoa_window_new().
| EAPI void ecore_cocoa_window_free | ( | Ecore_Cocoa_Window * | window | ) |
Releases a Cocoa window.
| window | The window to be released |
References ecore_cocoa_window_free(), and EINA_ARG_NONNULL.
Referenced by ecore_cocoa_window_free().
| EAPI void ecore_cocoa_window_move | ( | Ecore_Cocoa_Window * | window, |
| int | x, | ||
| int | y ) |
Moves a Cocoa window at a given point.
| window | The window to be moved |
| x | The new origin of the window (X) |
| y | The new origin of the window (Y) |
References ecore_cocoa_window_move(), and EINA_ARG_NONNULL.
Referenced by ecore_cocoa_window_move().
| EAPI void ecore_cocoa_window_resize | ( | Ecore_Cocoa_Window * | window, |
| int | w, | ||
| int | h ) |
Resizes a Cocoa window to a given size.
| window | The window to be moved |
| w | The new width of the window |
| h | The new height of the window |
References ecore_cocoa_window_resize(), and EINA_ARG_NONNULL.
Referenced by ecore_cocoa_window_resize().
| EAPI void ecore_cocoa_window_move_resize | ( | Ecore_Cocoa_Window * | window, |
| int | x, | ||
| int | y, | ||
| int | w, | ||
| int | h ) |
Moves and resizes a Cocoa window to a given point and size.
| window | The window to be moved |
| x | The new origin of the window (X) |
| y | The new origin of the window (Y) |
| w | The new width of the window |
| h | The new height of the window |
References ecore_cocoa_window_move_resize(), and EINA_ARG_NONNULL.
Referenced by ecore_cocoa_window_move_resize().
| EAPI void ecore_cocoa_window_geometry_get | ( | const Ecore_Cocoa_Window * | window, |
| int * | x, | ||
| int * | y, | ||
| int * | w, | ||
| int * | h ) |
Gets the geometry of a Cocoa window.
| window | The window which geometry is queried |
| x | Pointer used to retrieve its origin in X |
| y | Pointer used to retrieve its origin in Y |
| w | Pointer used to retrieve its width |
| h | Pointer used to retrieve its height |
References ecore_cocoa_window_geometry_get(), and EINA_ARG_NONNULL.
Referenced by ecore_cocoa_window_geometry_get().
| EAPI void ecore_cocoa_window_size_get | ( | const Ecore_Cocoa_Window * | window, |
| int * | w, | ||
| int * | h ) |
Gets the size of a Cocoa window.
| window | The window which size is queried |
| w | Pointer used to retrieve its width |
| h | Pointer used to retrieve its height |
References ecore_cocoa_window_size_get(), and EINA_ARG_NONNULL.
Referenced by ecore_cocoa_window_size_get().
| EAPI void ecore_cocoa_window_size_min_set | ( | Ecore_Cocoa_Window * | window, |
| int | w, | ||
| int | h ) |
Sets the minimum size of a Cocoa window.
| window | The window which minimum size is to be altered |
| w | The new minimum width of the window |
| h | The new minimum height of the window |
References ecore_cocoa_window_size_min_set(), and EINA_ARG_NONNULL.
Referenced by ecore_cocoa_window_size_min_set().
| EAPI void ecore_cocoa_window_size_min_get | ( | const Ecore_Cocoa_Window * | window, |
| int * | w, | ||
| int * | h ) |
Gets the minimum size size of a Cocoa window.
| window | The window which minimum size is queried |
| w | Pointer used to retrieve its minimum width |
| h | Pointer used to retrieve its minimum height |
References ecore_cocoa_window_size_min_get(), and EINA_ARG_NONNULL.
Referenced by ecore_cocoa_window_size_min_get().
| EAPI void ecore_cocoa_window_size_max_set | ( | Ecore_Cocoa_Window * | window, |
| int | w, | ||
| int | h ) |
Sets the maximum size of a Cocoa window.
| window | The window which maximum size is to be altered |
| w | The new maximum width of the window |
| h | The new maximum height of the window |
References ecore_cocoa_window_size_max_set(), and EINA_ARG_NONNULL.
Referenced by ecore_cocoa_window_size_max_set().
| EAPI void ecore_cocoa_window_size_max_get | ( | const Ecore_Cocoa_Window * | window, |
| int * | w, | ||
| int * | h ) |
Gets the maximum size size of a Cocoa window.
| window | The window which maximum size is queried |
| w | Pointer used to retrieve its maximum width |
| h | Pointer used to retrieve its maximum height |
References ecore_cocoa_window_size_max_get(), and EINA_ARG_NONNULL.
Referenced by ecore_cocoa_window_size_max_get().
| EAPI void ecore_cocoa_window_size_step_set | ( | Ecore_Cocoa_Window * | window, |
| int | w, | ||
| int | h ) |
Sets a Cocoa window's resize increment.
| window | The Cocoa window which resize increment is to be set |
| w | The width size increment |
| h | The height size increment |
References ecore_cocoa_window_size_step_set(), and EINA_ARG_NONNULL.
Referenced by ecore_cocoa_window_size_step_set().
| EAPI void ecore_cocoa_window_size_step_get | ( | const Ecore_Cocoa_Window * | window, |
| int * | w, | ||
| int * | h ) |
Gets a Cocoa window's resize increment.
| window | The Cocoa window which resize increment queried |
| w | The width size increment |
| h | The height size increment |
References ecore_cocoa_window_size_step_get(), and EINA_ARG_NONNULL.
Referenced by ecore_cocoa_window_size_step_get().
| EAPI void ecore_cocoa_window_show | ( | Ecore_Cocoa_Window * | window | ) |
Displays a Cocoa window.
| window | The Cocoa window to be displayed |
References ecore_cocoa_window_show(), and EINA_ARG_NONNULL.
Referenced by ecore_cocoa_window_show().
| EAPI void ecore_cocoa_window_hide | ( | Ecore_Cocoa_Window * | window | ) |
Hides a Cocoa window.
| window | The Cocoa window to be hid |
References ecore_cocoa_window_hide(), and EINA_ARG_NONNULL.
Referenced by ecore_cocoa_window_hide().
| EAPI void ecore_cocoa_window_raise | ( | Ecore_Cocoa_Window * | window | ) |
Brings a Cocoa window to front.
| window | The Cocoa window to be raised |
References ecore_cocoa_window_raise(), and EINA_ARG_NONNULL.
Referenced by ecore_cocoa_window_raise().
| EAPI void ecore_cocoa_window_lower | ( | Ecore_Cocoa_Window * | window | ) |
Brings a Cocoa window back.
| window | The Cocoa window to be lowered |
References ecore_cocoa_window_lower(), and EINA_ARG_NONNULL.
Referenced by ecore_cocoa_window_lower().
| EAPI void ecore_cocoa_window_activate | ( | Ecore_Cocoa_Window * | window | ) |
Makes a Cocoa window the current key window by raising it.
| window | The Cocoa window to be activated |
References ecore_cocoa_window_activate(), and EINA_ARG_NONNULL.
Referenced by ecore_cocoa_window_activate().
| EAPI void ecore_cocoa_window_title_set | ( | Ecore_Cocoa_Window * | window, |
| const char * | title ) |
Changes the title of a Cocoa window.
| window | The Cocoa window which title is to be changed |
| title | The new title of the Cocoa window |
References ecore_cocoa_window_title_set(), and EINA_ARG_NONNULL.
Referenced by ecore_cocoa_window_title_set().
| EAPI void ecore_cocoa_window_iconified_set | ( | Ecore_Cocoa_Window * | window, |
| Eina_Bool | on ) |
Miniaturizes or deminiaturizes a Cocoa window.
| window | The Cocoa window which iconify status is to be changed |
| on | If EINA_TRUE, will miniaturize the window. Will deminiaturize it if EINA_FALSE |
References ecore_cocoa_window_iconified_set(), and EINA_ARG_NONNULL.
Referenced by ecore_cocoa_window_iconified_set().
| EAPI void ecore_cocoa_window_borderless_set | ( | Ecore_Cocoa_Window * | window, |
| Eina_Bool | on ) |
Manages the borders of a Cocoa window.
| window | The Cocoa window which borders are to be changed |
| on | If EINA_TRUE, will remove borders. Will restore them if EINA_FALSE |
References ecore_cocoa_window_borderless_set(), and EINA_ARG_NONNULL.
Referenced by ecore_cocoa_window_borderless_set().
| EAPI void ecore_cocoa_window_view_set | ( | Ecore_Cocoa_Window * | window, |
| Ecore_Cocoa_Object * | view ) |
Sets the content view of a Cocoa window.
Refer to Apple's documentation of the property 'contentView' of the NSWindow class for more details about the content view.
| window | The Cocoa window which internal view is to be set |
| view | The NSView to be set as window content view |
References ecore_cocoa_window_view_set(), and EINA_ARG_NONNULL.
Referenced by ecore_cocoa_window_view_set().
| EAPI int ecore_cocoa_titlebar_height_get | ( | void | ) |
Gets the height of the title bar of Cocoa windows.
References ecore_cocoa_titlebar_height_get().
Referenced by ecore_cocoa_titlebar_height_get().
| EAPI Ecore_Cocoa_Object * ecore_cocoa_window_get | ( | const Ecore_Cocoa_Window * | window | ) |
Retrieves the actual NSWindow behind the Ecore_Cocoa wrapper.
| window | The Ecore_Cocoa wrapper which window is to be retrieved |
window References ecore_cocoa_window_get(), EINA_ARG_NONNULL, and EINA_WARN_UNUSED_RESULT.
Referenced by ecore_cocoa_window_get().
| EAPI void ecore_cocoa_window_cursor_set | ( | Ecore_Cocoa_Window * | win, |
| Ecore_Cocoa_Cursor | c ) |
Sets the Cocoa cursor for a given Cocoa window.
| win | The Cocoa window on which the cursor is to be changed. |
| c | The cursor to be set |
References ecore_cocoa_window_cursor_set(), and EINA_ARG_NONNULL.
Referenced by ecore_cocoa_window_cursor_set(), and elm_object_cursor_unset().
| EAPI void ecore_cocoa_window_cursor_show | ( | Ecore_Cocoa_Window * | win, |
| Eina_Bool | show ) |
Hides or shows the Cocoa cursor for a given Cocoa window.
| win | The Cocoa window on which the cursor is to be hid |
| show | Shows the cursor if EINA_TRUE. Hides it if EINA_FALSE |
References ecore_cocoa_window_cursor_show(), and EINA_ARG_NONNULL.
Referenced by ecore_cocoa_window_cursor_show().
| EAPI double ecore_cocoa_window_backing_scale_get | ( | const Ecore_Cocoa_Window * | window | ) |
Gets the backing scale factor for HiDPI/Retina displays.
| window | The Cocoa window to query |
References ecore_cocoa_window_backing_scale_get().
Referenced by ecore_cocoa_window_backing_scale_get().
| EAPI void ecore_cocoa_terminate_cb_set | ( | Ecore_Cocoa_Terminate_Cb | cb | ) |
Overrides the default behaviour in response to an application delete request.
When an application receives a delete request (i.e. CMD+Q) the termination callback will be called and its result will determine whether the application should terminate or not
| cb | The custom termination callback to set |
References ecore_cocoa_terminate_cb_set(), and EINA_ARG_NONNULL.
Referenced by ecore_cocoa_terminate_cb_set().
| EAPI Eina_Bool ecore_cocoa_app_icon_set | ( | const char * | path | ) |
Sets the application icon shown in the Dock and Command+Tab switcher.
| path | Absolute path to a PNG or other image file |
References ecore_cocoa_app_icon_set(), and EINA_ARG_NONNULL.
Referenced by ecore_cocoa_app_icon_set(), and elm_win_icon_name_set().
| EAPI void ecore_cocoa_reopen_cb_set | ( | Ecore_Cocoa_Reopen_Cb | cb | ) |
Registers a callback to be invoked when the application is asked to reopen.
This occurs when the user clicks the running application's Dock icon or re-launches it from Spotlight / Launchpad while it is already running. If cb is NULL the default macOS reopen behaviour is restored (bring visible windows to front).
| cb | The reopen callback to set, or NULL to clear it. |
References ecore_cocoa_reopen_cb_set().
Referenced by ecore_cocoa_reopen_cb_set().
| EAPI void ecore_cocoa_url_open_cb_set | ( | Ecore_Cocoa_URL_Open_Cb | cb | ) |
Registers a callback to be invoked when macOS asks the application to open a URL via a registered custom URL scheme (CFBundleURLTypes in Info.plist).
The callback fires for each URL, both on cold launch (URL triggers app start) and warm launch (app already running). If cb is NULL, incoming URL open requests are silently ignored.
| cb | The URL open callback to set, or NULL to clear it. |
References ecore_cocoa_url_open_cb_set().
Referenced by ecore_cocoa_url_open_cb_set().
| EAPI Ecore_Cocoa_Menu * ecore_cocoa_menu_new | ( | const char * | title | ) |
Creates a new top-level or sub NSMenu.
| title | The menu title (used by macOS for the menu bar title). |
References ecore_cocoa_menu_new(), and EINA_WARN_UNUSED_RESULT.
Referenced by ecore_cocoa_menu_new().
| EAPI void ecore_cocoa_menu_free | ( | Ecore_Cocoa_Menu * | menu | ) |
Frees an NSMenu and all associated target objects.
| menu | The menu to free. |
References ecore_cocoa_menu_free().
Referenced by ecore_cocoa_menu_free().
| EAPI int ecore_cocoa_menu_item_add | ( | Ecore_Cocoa_Menu * | menu, |
| const char * | label, | ||
| const char * | icon, | ||
| void(* | cb )(void *data, Ecore_Cocoa_Menu *menu, int idx), | ||
| void * | data ) |
Adds a labeled menu item with an optional action callback.
| menu | The menu to add the item to. |
| label | UTF-8 label text. |
| icon | Reserved for future use (pass NULL). |
| cb | C callback invoked when the item is clicked, or NULL. |
| data | User data passed to cb. |
References ecore_cocoa_menu_item_add(), and EINA_ARG_NONNULL.
Referenced by ecore_cocoa_menu_item_add().
| EAPI int ecore_cocoa_menu_item_add_separator | ( | Ecore_Cocoa_Menu * | menu | ) |
Adds a separator item to the menu.
| menu | The menu to add the separator to. |
References ecore_cocoa_menu_item_add_separator(), and EINA_ARG_NONNULL.
Referenced by ecore_cocoa_menu_item_add_separator().
| EAPI void ecore_cocoa_menu_item_del | ( | Ecore_Cocoa_Menu * | menu, |
| int | idx ) |
Removes the item at idx from the menu.
| menu | The menu. |
| idx | Index returned by ecore_cocoa_menu_item_add(). |
References ecore_cocoa_menu_item_del(), and EINA_ARG_NONNULL.
Referenced by ecore_cocoa_menu_item_del().
| EAPI void ecore_cocoa_menu_item_tag_set | ( | Ecore_Cocoa_Menu * | menu, |
| int | idx, | ||
| int | tag ) |
Sets an integer tag on a menu item.
Tags can be used to identify items independently of their positional index (which drifts on deletion).
| menu | The menu. |
| idx | Positional index of the item. |
| tag | Integer tag value (stored in NSMenuItem.tag). |
References ecore_cocoa_menu_item_tag_set(), and EINA_ARG_NONNULL.
Referenced by ecore_cocoa_menu_item_tag_set().
| EAPI void ecore_cocoa_menu_item_del_by_tag | ( | Ecore_Cocoa_Menu * | menu, |
| int | tag ) |
Removes a menu item identified by its tag.
| menu | The menu. |
| tag | Tag previously assigned via ecore_cocoa_menu_item_tag_set(). |
References ecore_cocoa_menu_item_del_by_tag(), and EINA_ARG_NONNULL.
Referenced by ecore_cocoa_menu_item_del_by_tag().
| EAPI int ecore_cocoa_menu_item_index_by_tag | ( | Ecore_Cocoa_Menu * | menu, |
| int | tag ) |
Returns the positional index of the menu item matching the given tag.
| menu | The menu. |
| tag | Tag previously assigned via ecore_cocoa_menu_item_tag_set(). |
References ecore_cocoa_menu_item_index_by_tag(), and EINA_ARG_NONNULL.
Referenced by ecore_cocoa_menu_item_index_by_tag().
| EAPI void ecore_cocoa_menu_item_enabled_set | ( | Ecore_Cocoa_Menu * | menu, |
| int | idx, | ||
| Eina_Bool | enabled ) |
Enables or disables a menu item.
| menu | The menu. |
| idx | Item index. |
| enabled | EINA_TRUE to enable, EINA_FALSE to grey out. |
References ecore_cocoa_menu_item_enabled_set(), and EINA_ARG_NONNULL.
Referenced by ecore_cocoa_menu_item_enabled_set().
| EAPI void ecore_cocoa_menu_item_enabled_set_by_tag | ( | Ecore_Cocoa_Menu * | menu, |
| int | tag, | ||
| Eina_Bool | enabled ) |
Enables or disables a menu item identified by its tag.
| menu | The menu. |
| tag | Tag value. |
| enabled | EINA_TRUE to enable, EINA_FALSE to grey out. |
References ecore_cocoa_menu_item_enabled_set_by_tag(), and EINA_ARG_NONNULL.
Referenced by ecore_cocoa_menu_item_enabled_set_by_tag().
| EAPI void ecore_cocoa_menu_item_label_set | ( | Ecore_Cocoa_Menu * | menu, |
| int | idx, | ||
| const char * | label ) |
Updates the label of an existing menu item.
| menu | The menu. |
| idx | Item index. |
| label | New UTF-8 label. |
References ecore_cocoa_menu_item_label_set(), and EINA_ARG_NONNULL.
Referenced by ecore_cocoa_menu_item_label_set().
| EAPI void ecore_cocoa_menu_submenu_set | ( | Ecore_Cocoa_Menu * | menu, |
| int | idx, | ||
| Ecore_Cocoa_Menu * | submenu ) |
Attaches a sub-menu to an existing menu item.
| menu | The parent menu. |
| idx | Index of the parent item that will own the submenu. |
| submenu | The child menu to attach. |
References ecore_cocoa_menu_submenu_set(), and EINA_ARG_NONNULL.
Referenced by ecore_cocoa_menu_submenu_set().
| EAPI void ecore_cocoa_menu_main_set | ( | Ecore_Cocoa_Menu * | menu | ) |
Installs menu as the application's main menu bar.
The menu is set unconditionally — NSApp is always initialised by the time a window exists.
| menu | The top-level menu to install. |
References ecore_cocoa_menu_main_set(), and EINA_ARG_NONNULL.
Referenced by ecore_cocoa_menu_main_set().
| EAPI Ecore_Cocoa_Menu * ecore_cocoa_menu_main_get | ( | void | ) |
Returns the current main menu handle, or NULL if none has been set.
References ecore_cocoa_menu_main_get(), and EINA_WARN_UNUSED_RESULT.
Referenced by ecore_cocoa_menu_main_get().
|
extern |
Event triggered when a Cocoa window receives focus.
|
extern |
Event triggered when a Cocoa window loses focus.
|
extern |
Event triggered when a Cocoa window is resized.
|
extern |
Event triggered when a Cocoa window get destroyed.