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 |
| struct | _Ecore_Cocoa_Event_Window_Focused |
| struct | _Ecore_Cocoa_Event_Window_Unfocused |
| struct | _Ecore_Cocoa_Event_Window_Destroy |
Macros | |
| #define | EAPI |
| #define | ECORE_COCOA_CURSOR_DEFAULT ECORE_COCOA_CURSOR_ARROW |
| #define | EAPI |
Typedefs | |
| typedef struct _Ecore_Cocoa_Window | Ecore_Cocoa_Window |
| typedef struct _Ecore_Cocoa_Screen | Ecore_Cocoa_Screen |
| typedef void | Ecore_Cocoa_Object |
| typedef struct _Ecore_Cocoa_Event_Window_Resize_Request | Ecore_Cocoa_Event_Window_Resize_Request |
| typedef struct _Ecore_Cocoa_Event_Window_Focused | Ecore_Cocoa_Event_Window_Focused |
| typedef struct _Ecore_Cocoa_Event_Window_Unfocused | Ecore_Cocoa_Event_Window_Unfocused |
| typedef struct _Ecore_Cocoa_Event_Window_Destroy | Ecore_Cocoa_Event_Window_Destroy |
| typedef Eina_Bool(* | Ecore_Cocoa_Terminate_Cb) (Ecore_Cocoa_Object *sender) |
Functions | |
| EAPI int | ecore_cocoa_init (void) |
| Inits the Ecore_Cocoa library. More... | |
| EAPI int | ecore_cocoa_shutdown (void) |
| Shuts the Ecore_Cocoa library down. More... | |
| EAPI void | ecore_cocoa_screen_size_get (Ecore_Cocoa_Screen *screen, int *w, int *h) |
| Retrieves the size of a Cocoa screen. More... | |
| EAPI Ecore_Cocoa_Window * | ecore_cocoa_window_new (int x, int y, int w, int h) |
| Creates a Cocoa window. More... | |
| EAPI void | ecore_cocoa_window_free (Ecore_Cocoa_Window *window) |
| Releases a Cocoa window. More... | |
| EAPI void | ecore_cocoa_window_move (Ecore_Cocoa_Window *window, int x, int y) |
| Moves a Cocoa window at a given point. More... | |
| EAPI void | ecore_cocoa_window_resize (Ecore_Cocoa_Window *window, int w, int h) |
| Resizes a Cocoa window to a given size. More... | |
| 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. More... | |
| 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. More... | |
| EAPI void | ecore_cocoa_window_size_get (const Ecore_Cocoa_Window *window, int *w, int *h) |
| Gets the size of a Cocoa window. More... | |
| EAPI void | ecore_cocoa_window_size_min_set (Ecore_Cocoa_Window *window, int w, int h) |
| Sets the minimum size of a Cocoa window. More... | |
| 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. More... | |
| EAPI void | ecore_cocoa_window_size_max_set (Ecore_Cocoa_Window *window, int w, int h) |
| Sets the maximum size of a Cocoa window. More... | |
| 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. More... | |
| EAPI void | ecore_cocoa_window_size_step_set (Ecore_Cocoa_Window *window, int w, int h) |
| Sets a Cocoa window's resize increment. More... | |
| EAPI void | ecore_cocoa_window_size_step_get (const Ecore_Cocoa_Window *window, int *w, int *h) |
| Gets a Cocoa window's resize increment. More... | |
| EAPI void | ecore_cocoa_window_show (Ecore_Cocoa_Window *window) |
| Displays a Cocoa window. More... | |
| EAPI void | ecore_cocoa_window_hide (Ecore_Cocoa_Window *window) |
| Hides a Cocoa window. More... | |
| EAPI void | ecore_cocoa_window_raise (Ecore_Cocoa_Window *window) |
| Brings a Cocoa window to front. More... | |
| EAPI void | ecore_cocoa_window_lower (Ecore_Cocoa_Window *window) |
| Brings a Cocoa window back. More... | |
| EAPI void | ecore_cocoa_window_activate (Ecore_Cocoa_Window *window) |
| Makes a Cocoa window the current key window by raising it. More... | |
| EAPI void | ecore_cocoa_window_title_set (Ecore_Cocoa_Window *window, const char *title) |
| Changes the title of a Cocoa window. More... | |
| EAPI void | ecore_cocoa_window_iconified_set (Ecore_Cocoa_Window *window, Eina_Bool on) |
| Miniaturizes or deminiaturizes a Cocoa window. More... | |
| EAPI void | ecore_cocoa_window_borderless_set (Ecore_Cocoa_Window *window, Eina_Bool on) |
| Manages the borders of a Cocoa window. More... | |
| EAPI void | ecore_cocoa_window_view_set (Ecore_Cocoa_Window *window, Ecore_Cocoa_Object *view) |
| Sets the content view of a Cocoa window. More... | |
| EAPI int | ecore_cocoa_titlebar_height_get (void) |
| Gets the height of the title bar of Cocoa windows. More... | |
| EAPI Ecore_Cocoa_Object * | ecore_cocoa_window_get (const Ecore_Cocoa_Window *window) |
| Retrieves the actual NSWindow behind the Ecore_Cocoa wrapper. More... | |
| EAPI void | ecore_cocoa_window_cursor_set (Ecore_Cocoa_Window *win, Ecore_Cocoa_Cursor c) |
| Sets the Cocoa cursor for a given Cocoa window. More... | |
| 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. More... | |
| EAPI void | ecore_cocoa_terminate_cb_set (Ecore_Cocoa_Terminate_Cb cb) |
| Overrides the default behaviour in response to an application delete request. More... | |
| 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. More... | |
| EAPI int | ECORE_COCOA_EVENT_WINDOW_UNFOCUSED |
| Event triggered when a Cocoa window loses focus. More... | |
| EAPI int | ECORE_COCOA_EVENT_WINDOW_RESIZE_REQUEST |
| Event triggered when a Cocoa window is resized. More... | |
| EAPI int | ECORE_COCOA_EVENT_WINDOW_DESTROY |
| Event triggered when a Cocoa window get destroyed. More... | |
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.
Opaque handler to manipulate a Cocoa Window through Ecore
Opaque handler to manipulate a Cocoa Screen through Ecore
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
| Ecore_Cocoa_Terminate_Cb |
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 |
| 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.
| 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.
| screen | The screen which size must be retrieved | |
| [out] | w | The width of the screen |
| [out] | h | The height of the screen |
| 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 |
| EAPI void ecore_cocoa_window_free | ( | Ecore_Cocoa_Window * | window | ) |
Releases a Cocoa window.
| window | The window to be released |
| 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) |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| EAPI void ecore_cocoa_window_show | ( | Ecore_Cocoa_Window * | window | ) |
Displays a Cocoa window.
| window | The Cocoa window to be displayed |
| EAPI void ecore_cocoa_window_hide | ( | Ecore_Cocoa_Window * | window | ) |
Hides a Cocoa window.
| window | The Cocoa window to be hid |
| EAPI void ecore_cocoa_window_raise | ( | Ecore_Cocoa_Window * | window | ) |
Brings a Cocoa window to front.
| window | The Cocoa window to be raised |
| EAPI void ecore_cocoa_window_lower | ( | Ecore_Cocoa_Window * | window | ) |
Brings a Cocoa window back.
| window | The Cocoa window to be lowered |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| 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.
| window | The Ecore_Cocoa wrapper which window is to be retrieved |
window | 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 |
| 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 |
| 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 |
| 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.