Ecore_Cocoa.h File Reference

Data Structures | Macros | Typedefs | Enumerations | Functions | Variables
Ecore_Cocoa.h File Reference

Ecore_Cocoa Wrapper Library to interact with the Cocoa envirnement (Mac OS X) from the E environment. More...

## Data Structures
struct | _Ecore_Cocoa_Event_Video_Resize
| Data available when a window is resized. More...
struct | _Ecore_Cocoa_Event_Window

## 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_Window_Id
| Opaque handler to reference the actual Cocoa window.
typedef struct _Ecore_Cocoa_Event_Video_Resize | Ecore_Cocoa_Event_Video_Resize
| Type of event thrown when a window is resized.
typedef struct _Ecore_Cocoa_Event_Window | Ecore_Cocoa_Event_Window

## Enumerations
enum | Ecore_Cocoa_Cnp_Type { ECORE_COCOA_CNP_TYPE_UNKNOWN = 0, ECORE_COCOA_CNP_TYPE_STRING = (1 << 0), ECORE_COCOA_CNP_TYPE_MARKUP = (1 << 1), ECORE_COCOA_CNP_TYPE_IMAGE = (1 << 2), ECORE_COCOA_CNP_TYPE_HTML = (1 << 3) }
| Type used to interact with the Cocoa pasteboard. More...

## 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 width, int height)
| 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 to a given point. More...
EAPI void | ecore_cocoa_window_resize (Ecore_Cocoa_Window *window, int width, int height)
| 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 width, int height)
| Moves and resizes a Cocoa window to a given point and size. More...
EAPI void | ecore_cocoa_window_geometry_get (Ecore_Cocoa_Window *window, int *x, int *y, int *width, int *height)
EAPI void | ecore_cocoa_window_size_get (Ecore_Cocoa_Window *window, int *width, int *height)
EAPI void | ecore_cocoa_window_size_min_set (Ecore_Cocoa_Window *window, unsigned int min_width, unsigned int min_height)
EAPI void | ecore_cocoa_window_size_min_get (Ecore_Cocoa_Window *window, unsigned int *min_width, unsigned int *min_height)
EAPI void | ecore_cocoa_window_size_max_set (Ecore_Cocoa_Window *window, unsigned int max_width, unsigned int max_height)
EAPI void | ecore_cocoa_window_size_max_get (Ecore_Cocoa_Window *window, unsigned int *max_width, unsigned int *max_height)
EAPI void | ecore_cocoa_window_size_step_set (Ecore_Cocoa_Window *window, unsigned int step_width, unsigned int step_height)
EAPI void | ecore_cocoa_window_size_step_get (Ecore_Cocoa_Window *window, unsigned int *step_width, unsigned int *step_height)
EAPI void | ecore_cocoa_window_show (Ecore_Cocoa_Window *window)
EAPI void | ecore_cocoa_window_hide (Ecore_Cocoa_Window *window)
EAPI void | ecore_cocoa_window_raise (Ecore_Cocoa_Window *window)
EAPI void | ecore_cocoa_window_lower (Ecore_Cocoa_Window *window)
EAPI void | ecore_cocoa_window_activate (Ecore_Cocoa_Window *window)
EAPI void | ecore_cocoa_window_title_set (Ecore_Cocoa_Window *window, const char *title)
EAPI void | ecore_cocoa_window_iconified_set (Ecore_Cocoa_Window *window, int on)
EAPI void | ecore_cocoa_window_borderless_set (Ecore_Cocoa_Window *window, int on)
EAPI void | ecore_cocoa_window_view_set (Ecore_Cocoa_Window *window, void *view)
EAPI int | ecore_cocoa_titlebar_height_get (void)
EAPI Ecore_Cocoa_Window_Id | ecore_cocoa_window_get_window_id (const Ecore_Cocoa_Window *window)
EAPI Eina_Bool | ecore_cocoa_selection_clipboard_set (const void *data, int size, Ecore_Cocoa_Cnp_Type type)
EAPI void * | ecore_cocoa_selection_clipboard_get (int *size, Ecore_Cocoa_Cnp_Type type, Ecore_Cocoa_Cnp_Type *retrieved_types)
EAPI void | ecore_cocoa_selection_clipboard_clear (void)
EAPI void | ecore_cocoa_window_cursor_set (Ecore_Cocoa_Window *win, Ecore_Cocoa_Cursor c)
EAPI void | ecore_cocoa_window_cursor_show (Ecore_Cocoa_Window *win, Eina_Bool show)

## Variables
EAPI int | ECORE_COCOA_EVENT_GOT_FOCUS
| Event triggered when a window receives focus.
EAPI int | ECORE_COCOA_EVENT_LOST_FOCUS
| Event triggered when a window loses focus.
EAPI int | ECORE_COCOA_EVENT_RESIZE
| Event triggered when a window is resized.
EAPI int | ECORE_COCOA_EVENT_WINDOW_DESTROY

## Detailed Description

Ecore_Cocoa Wrapper Library to interact with the Cocoa envirnement (Mac OS X) from the E environment.

## Enumeration Type Documentation

## ◆ Ecore_Cocoa_Cnp_Type

enum Ecore_Cocoa_Cnp_Type

Type used to interact with the Cocoa pasteboard.

It hold types that can apply to a context.

Enumerator
ECORE_COCOA_CNP_TYPE_UNKNOWN | Undefined type.
ECORE_COCOA_CNP_TYPE_STRING | String type (pure text)
ECORE_COCOA_CNP_TYPE_MARKUP | Elementary markup.
ECORE_COCOA_CNP_TYPE_IMAGE | Image (all formats)
ECORE_COCOA_CNP_TYPE_HTML | HTML.

## Function Documentation

## ◆ ecore_cocoa_init()

EAPI int ecore_cocoa_init | ( | void |  | ) |

Inits the Ecore_Cocoa library.

Returns
  How many times Ecore_Cocoa has been initted

## ◆ ecore_cocoa_shutdown()

EAPI int ecore_cocoa_shutdown | ( | void |  | ) |

Shuts the Ecore_Cocoa library down.

Returns
  How many times Ecore_Cocoa has been initted

## ◆ ecore_cocoa_screen_size_get()

EAPI void ecore_cocoa_screen_size_get | ( | Ecore_Cocoa_Screen * | screen,
|  | int * | w,
|  | int * | h
| ) |  |

Retrieves the size of a Cocoa screen.

Parameters

  | screen | The screen which size must be retrieved
  [out] | w | The width of the screen
  [out] | h | The height of the screen

## ◆ ecore_cocoa_window_new()

EAPI Ecore_Cocoa_Window* ecore_cocoa_window_new | ( | int | x,
|  | int | y,
|  | int | width,
|  | int | height
| ) |  |

Creates a Cocoa window.

Parameters

  x | The origin (X) where the window must be created
  y | The origin (Y) where the window must be created
  width | The width of the window
  height | The height of the window

Returns
  A handler on the window. NULL on failure

## ◆ ecore_cocoa_window_free()

EAPI void ecore_cocoa_window_free | ( | Ecore_Cocoa_Window * | window | ) |

Releases a Cocoa window.

Parameters

  window | The window to be released

## ◆ ecore_cocoa_window_move()

EAPI void ecore_cocoa_window_move | ( | Ecore_Cocoa_Window * | window,
|  | int | x,
|  | int | y
| ) |  |

Moves a Cocoa window to a given point.

Parameters

  window | The window to be moved
  x | The new origin of the window (X)
  y | The new origin of the window (Y)

## ◆ ecore_cocoa_window_resize()

EAPI void ecore_cocoa_window_resize | ( | Ecore_Cocoa_Window * | window,
|  | int | width,
|  | int | height
| ) |  |

Resizes a Cocoa window to a given size.

Parameters

  window | The window to be moved
  width | The new width of the window
  height | The new height of the window

## ◆ ecore_cocoa_window_move_resize()

EAPI void ecore_cocoa_window_move_resize | ( | Ecore_Cocoa_Window * | window,
|  | int | x,
|  | int | y,
|  | int | width,
|  | int | height
| ) |  |

Moves and resizes a Cocoa window to a given point and size.

Parameters

  window | The window to be moved
  x | The new origin of the window (X)
  y | The new origin of the window (Y)
  width | The new width of the window
  height | The new height of the window

See also
  ecore_cocoa_window_resize()
  ecore_cocoa_window_move()