Ecore_Wayland.h File Reference

- Main Page
- Related Pages
- Topics
- Data Structures
- Files
- Examples

- File List
- Globals

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

Ecore functions for dealing with the Wayland window system. More...

## Data Structures
struct | _Ecore_Wl_Global
struct | _Ecore_Wl_Event_Mouse_In
struct | _Ecore_Wl_Event_Mouse_Out
struct | _Ecore_Wl_Event_Focus_In
struct | _Ecore_Wl_Event_Focus_Out
struct | _Ecore_Wl_Event_Window_Configure
struct | _Ecore_Wl_Event_Dnd_Enter
struct | _Ecore_Wl_Event_Dnd_Position
struct | _Ecore_Wl_Event_Dnd_Leave
struct | _Ecore_Wl_Event_Dnd_Drop
struct | _Ecore_Wl_Event_Dnd_End
struct | _Ecore_Wl_Event_Data_Source_Cancelled
struct | _Ecore_Wl_Event_Data_Source_Send
struct | _Ecore_Wl_Event_Data_Source_Target
struct | _Ecore_Wl_Event_Selection_Data_Ready
struct | _Ecore_Wl_Event_Interfaces_Bound

## Typedefs
typedef struct _Ecore_Wl_Output | Ecore_Wl_Output
typedef struct _Ecore_Wl_Input | Ecore_Wl_Input
typedef struct _Ecore_Wl_Global | Ecore_Wl_Global
typedef struct _Ecore_Wl_Subsurf | Ecore_Wl_Subsurf
typedef struct _Ecore_Wl_Window | Ecore_Wl_Window
typedef struct _Ecore_Wl_Dnd | Ecore_Wl_Dnd
typedef struct _Ecore_Wl_Dnd_Source | Ecore_Wl_Dnd_Source
typedef struct _Ecore_Wl_Dnd_Target | Ecore_Wl_Dnd_Target
typedef struct _Ecore_Wl_Event_Mouse_In | Ecore_Wl_Event_Mouse_In
typedef struct _Ecore_Wl_Event_Mouse_Out | Ecore_Wl_Event_Mouse_Out
typedef struct _Ecore_Wl_Event_Focus_In | Ecore_Wl_Event_Focus_In
typedef struct _Ecore_Wl_Event_Focus_Out | Ecore_Wl_Event_Focus_Out
typedef struct _Ecore_Wl_Event_Window_Configure | Ecore_Wl_Event_Window_Configure
typedef struct _Ecore_Wl_Event_Dnd_Enter | Ecore_Wl_Event_Dnd_Enter
typedef struct _Ecore_Wl_Event_Dnd_Position | Ecore_Wl_Event_Dnd_Position
typedef struct _Ecore_Wl_Event_Dnd_Leave | Ecore_Wl_Event_Dnd_Leave
typedef struct _Ecore_Wl_Event_Dnd_Drop | Ecore_Wl_Event_Dnd_Drop
typedef struct _Ecore_Wl_Event_Dnd_End | Ecore_Wl_Event_Dnd_End
typedef struct _Ecore_Wl_Event_Data_Source_Cancelled | Ecore_Wl_Event_Data_Source_Cancelled
typedef struct _Ecore_Wl_Event_Data_Source_Send | Ecore_Wl_Event_Data_Source_Send
typedef struct _Ecore_Wl_Event_Data_Source_Target | Ecore_Wl_Event_Data_Source_Target
typedef struct _Ecore_Wl_Event_Selection_Data_Ready | Ecore_Wl_Event_Selection_Data_Ready
typedef struct _Ecore_Wl_Event_Interfaces_Bound | Ecore_Wl_Event_Interfaces_Bound
typedef enum _Ecore_Wl_Window_Type | Ecore_Wl_Window_Type
typedef enum _Ecore_Wl_Window_Buffer_Type | Ecore_Wl_Window_Buffer_Type

## Enumerations
enum | _Ecore_Wl_Window_Type { ECORE_WL_WINDOW_TYPE_NONE , ECORE_WL_WINDOW_TYPE_TOPLEVEL , ECORE_WL_WINDOW_TYPE_FULLSCREEN , ECORE_WL_WINDOW_TYPE_MAXIMIZED , ECORE_WL_WINDOW_TYPE_TRANSIENT , ECORE_WL_WINDOW_TYPE_MENU , ECORE_WL_WINDOW_TYPE_DND , ECORE_WL_WINDOW_TYPE_CUSTOM }
enum | _Ecore_Wl_Window_Buffer_Type { ECORE_WL_WINDOW_BUFFER_TYPE_EGL_WINDOW , ECORE_WL_WINDOW_BUFFER_TYPE_EGL_IMAGE , ECORE_WL_WINDOW_BUFFER_TYPE_SHM }

## Functions
EAPI int | ecore_wl_init (const char *name)
| Initializes the Wayland display connection to the given display.
EAPI int | ecore_wl_shutdown (void)
| Shuts down the Ecore Wayland Library.
EAPI void | ecore_wl_flush (void)
| Sends all Wayland commands to the Wayland Display.
EAPI void | ecore_wl_sync (void)
| Flushes the command buffer and waits until all requests have been processed by the server.
EAPI struct wl_shm * | ecore_wl_shm_get (void)
| Retrieves the Wayland Shm Interface used for the current Wayland connection.
EAPI struct wl_display * | ecore_wl_display_get (void)
| Retrieves the Wayland Display Interface used for the current Wayland connection.
EAPI void | ecore_wl_screen_size_get (int *w, int *h)
| Retrieves the Compositor interface.
EAPI void | ecore_wl_pointer_xy_get (int *x, int *y)
| Retrieves the position of the current screen.
EAPI int | ecore_wl_dpi_get (void)
| Returns the screen DPI.
EAPI void | ecore_wl_display_iterate (void)
| Dispatches Wayland events.
EAPI Eina_Bool | ecore_wl_animator_source_set (Ecore_Animator_Source source)
EAPI struct wl_cursor * | ecore_wl_cursor_get (const char *cursor_name)
| Retrieves the requested cursor from the cursor theme.
EAPI Ecore_Wl_Input * | ecore_wl_input_get (void)
EAPI void | ecore_wl_input_grab (Ecore_Wl_Input *input, Ecore_Wl_Window *win, unsigned int button)
EAPI void | ecore_wl_input_ungrab (Ecore_Wl_Input *input)
EAPI void | ecore_wl_input_pointer_set (Ecore_Wl_Input *input, struct wl_surface *surface, int hot_x, int hot_y)
EAPI void | ecore_wl_input_cursor_from_name_set (Ecore_Wl_Input *input, const char *cursor_name)
EAPI void | ecore_wl_input_cursor_default_restore (Ecore_Wl_Input *input)
EAPI struct wl_seat * | ecore_wl_input_seat_get (Ecore_Wl_Input *input)
EAPI Eina_Inlist * | ecore_wl_outputs_get (void)
EAPI void | ecore_wl_input_cursor_size_set (Ecore_Wl_Input *input, const int size)
EAPI void | ecore_wl_input_cursor_theme_name_set (Ecore_Wl_Input *input, const char *cursor_theme_name)
EAPI struct xkb_keymap * | ecore_wl_input_keymap_get (Ecore_Wl_Input *input)
EAPI Eina_Inlist * | ecore_wl_globals_get (void)
| Retrieves the Wayland Globals Interface list used for the current Wayland connection.
EAPI struct wl_registry * | ecore_wl_registry_get (void)
| Retrieves the Wayland Registry used for the current Wayland connection.
EAPI Ecore_Wl_Window * | ecore_wl_window_new (Ecore_Wl_Window *parent, int x, int y, int w, int h, int buffer_type)
| Creates a new window.
EAPI void | ecore_wl_window_free (Ecore_Wl_Window *win)
| Deletes the given window.
EAPI void | ecore_wl_window_move (Ecore_Wl_Window *win, int x, int y)
| Signals for Wayland to initiate a window move.
EAPI void | ecore_wl_window_resize (Ecore_Wl_Window *win, int w, int h, int location)
| Signals for Wayland to initiate a window resize.
EAPI void | ecore_wl_window_damage (Ecore_Wl_Window *win, int x, int y, int w, int h)
EAPI void | ecore_wl_window_buffer_attach (Ecore_Wl_Window *win, struct wl_buffer *buffer, int x, int y)
EAPI void | ecore_wl_window_commit (Ecore_Wl_Window *win)
EAPI void | ecore_wl_window_show (Ecore_Wl_Window *win)
| Shows a window.
EAPI void | ecore_wl_window_hide (Ecore_Wl_Window *win)
| Hides a window.
EAPI void | ecore_wl_window_raise (Ecore_Wl_Window *win)
| Raises a window.
EAPI void | ecore_wl_window_maximized_set (Ecore_Wl_Window *win, Eina_Bool maximized)
EAPI Eina_Bool | ecore_wl_window_maximized_get (Ecore_Wl_Window *win)
EAPI void | ecore_wl_window_fullscreen_set (Ecore_Wl_Window *win, Eina_Bool fullscreen)
EAPI Eina_Bool | ecore_wl_window_fullscreen_get (Ecore_Wl_Window *win)
EAPI void | ecore_wl_window_transparent_set (Ecore_Wl_Window *win, Eina_Bool transparent)
EAPI Eina_Bool | ecore_wl_window_transparent_get (Ecore_Wl_Window *win)
EAPI void | ecore_wl_window_update_size (Ecore_Wl_Window *win, int w, int h)
EAPI void | ecore_wl_window_update_location (Ecore_Wl_Window *win, int x, int y)
EAPI struct wl_surface * | ecore_wl_window_surface_get (Ecore_Wl_Window *win)
EAPI struct wl_shell_surface * | ecore_wl_window_shell_surface_get (Ecore_Wl_Window *win)
EAPI struct xdg_surface * | ecore_wl_window_xdg_surface_get (Ecore_Wl_Window *win)
EAPI Ecore_Wl_Window * | ecore_wl_window_find (unsigned int id)
EAPI void | ecore_wl_window_type_set (Ecore_Wl_Window *win, Ecore_Wl_Window_Type type)
EAPI void | ecore_wl_window_pointer_set (Ecore_Wl_Window *win, struct wl_surface *surface, int hot_x, int hot_y)
EAPI void | ecore_wl_window_cursor_from_name_set (Ecore_Wl_Window *win, const char *cursor_name)
EAPI void | ecore_wl_window_cursor_default_restore (Ecore_Wl_Window *win)
EAPI void | ecore_wl_window_parent_set (Ecore_Wl_Window *win, Ecore_Wl_Window *parent)
EAPI void | ecore_wl_window_iconified_set (Ecore_Wl_Window *win, Eina_Bool iconified)
| Iconifies a window.
EAPI Eina_Bool | ecore_wl_window_iconified_get (Ecore_Wl_Window *win)
EAPI int | ecore_wl_window_id_get (Ecore_Wl_Window *win)
EAPI void | ecore_wl_window_title_set (Ecore_Wl_Window *win, const char *title)
EAPI void | ecore_wl_window_class_name_set (Ecore_Wl_Window *win, const char *class_name)
EAPI int | ecore_wl_window_surface_id_get (Ecore_Wl_Window *win)
EAPI Ecore_Wl_Input * | ecore_wl_window_keyboard_get (Ecore_Wl_Window *win)
EAPI struct wl_surface * | ecore_wl_window_surface_create (Ecore_Wl_Window *win)
| Returns a wl_surface with no association to any wl_shell_surface.
EAPI void | ecore_wl_window_alpha_set (Ecore_Wl_Window *win, Eina_Bool alpha)
EAPI Eina_Bool | ecore_wl_window_alpha_get (Ecore_Wl_Window *win)
EAPI Ecore_Wl_Window * | ecore_wl_window_surface_find (struct wl_surface *surface)
| Returns the Ecore_Wl_Window from a wl_surface.
EAPI void | ecore_wl_window_input_region_set (Ecore_Wl_Window *win, int x, int y, int w, int h)
| Sets the input region of the Ecore_Wl_Window.
EAPI void | ecore_wl_window_opaque_region_set (Ecore_Wl_Window *win, int x, int y, int w, int h)
| Sets the opaque region of the Ecore_Wl_Window.
EAPI void | ecore_wl_window_rotation_set (Ecore_Wl_Window *win, int rotation)
| Sets the rotation of the Ecore_Wl_Window.
EAPI int | ecore_wl_window_rotation_get (Ecore_Wl_Window *win)
| Gets the rotation of the Ecore_Wl_Window.
EINA_DEPRECATED EAPI Eina_Bool | ecore_wl_dnd_set_selection (Ecore_Wl_Dnd *dnd, const char **types_offered)
EINA_DEPRECATED EAPI Eina_Bool | ecore_wl_dnd_get_selection (Ecore_Wl_Dnd *dnd, const char *type)
EINA_DEPRECATED EAPI Ecore_Wl_Dnd * | ecore_wl_dnd_get (void)
EINA_DEPRECATED EAPI Eina_Bool | ecore_wl_dnd_start_drag (Ecore_Wl_Dnd *dnd)
EINA_DEPRECATED EAPI Eina_Bool | ecore_wl_dnd_selection_has_owner (Ecore_Wl_Dnd *dnd)
EAPI Eina_Bool | ecore_wl_dnd_selection_set (Ecore_Wl_Input *input, const char **types_offered)
EAPI Eina_Bool | ecore_wl_dnd_selection_get (Ecore_Wl_Input *input, const char *type)
EAPI Eina_Bool | ecore_wl_dnd_selection_owner_has (Ecore_Wl_Input *input)
EAPI Eina_Bool | ecore_wl_dnd_selection_clear (Ecore_Wl_Input *input)
EAPI void | ecore_wl_dnd_drag_start (Ecore_Wl_Input *input, Ecore_Wl_Window *win, Ecore_Wl_Window *dragwin, int x, int y, int w, int h)
EAPI void | ecore_wl_dnd_drag_end (Ecore_Wl_Input *input)
EAPI Eina_Bool | ecore_wl_dnd_drag_get (Ecore_Wl_Input *input, const char *type)
EAPI void | ecore_wl_dnd_drag_types_set (Ecore_Wl_Input *input, const char **types_offered)
EAPI struct wl_array * | ecore_wl_dnd_drag_types_get (Ecore_Wl_Input *input)
EAPI void | ecore_wl_server_mode_set (Eina_Bool on)
| Enables/disables server mode.
EAPI Ecore_Wl_Subsurf * | ecore_wl_subsurf_create (Ecore_Wl_Window *win)
| Creates and returns a new subsurface.
EAPI void | ecore_wl_subsurf_del (Ecore_Wl_Subsurf *ess)
| Destroys the given subsurface, as well as the surface associated with it.
EAPI struct wl_surface * | ecore_wl_subsurf_surface_get (Ecore_Wl_Subsurf *ess)
| Gets the wl_surface for this subsurface.
EAPI void | ecore_wl_subsurf_position_set (Ecore_Wl_Subsurf *ess, int x, int y)
| Sets the position of this subsurface, relative to its parent surface.
EAPI void | ecore_wl_subsurf_position_get (Ecore_Wl_Subsurf *ess, int *x, int *y)
| Gets the position of this subsurface, relative to its parent surface.
EAPI void | ecore_wl_subsurf_place_above (Ecore_Wl_Subsurf *ess, struct wl_surface *surface)
| Places subsurface on layer above a reference surface.
EAPI void | ecore_wl_subsurf_place_below (Ecore_Wl_Subsurf *ess, struct wl_surface *surface)
| Places subsurface on layer below a reference surface.
EAPI void | ecore_wl_subsurf_sync_set (Ecore_Wl_Subsurf *ess, Eina_Bool val)
| Enables or disables sub-surface synchronization.
EAPI void | ecore_wl_subsurf_opaque_region_set (Ecore_Wl_Subsurf *ess, int x, int y, int w, int h)
| Sets an opaque region for the given subsurface.

## Variables
EAPI int | ECORE_WL_EVENT_MOUSE_IN
EAPI int | ECORE_WL_EVENT_MOUSE_OUT
EAPI int | ECORE_WL_EVENT_FOCUS_IN
EAPI int | ECORE_WL_EVENT_FOCUS_OUT
EAPI int | ECORE_WL_EVENT_WINDOW_CONFIGURE
EAPI int | ECORE_WL_EVENT_DND_ENTER
EAPI int | ECORE_WL_EVENT_DND_POSITION
EAPI int | ECORE_WL_EVENT_DND_LEAVE
EAPI int | ECORE_WL_EVENT_DND_DROP
EAPI int | ECORE_WL_EVENT_DND_OFFER
EAPI int | ECORE_WL_EVENT_DND_END
EAPI int | ECORE_WL_EVENT_DATA_SOURCE_TARGET
EAPI int | ECORE_WL_EVENT_DATA_SOURCE_SEND
EAPI int | ECORE_WL_EVENT_DATA_SOURCE_CANCELLED
EAPI int | ECORE_WL_EVENT_SELECTION_DATA_READY
EAPI int | ECORE_WL_EVENT_INTERFACES_BOUND

## Detailed Description

Ecore functions for dealing with the Wayland window system.

## Typedef Documentation

## ◆ Ecore_Wl_Subsurf

typedef struct _Ecore_Wl_Subsurf Ecore_Wl_Subsurf

Since
  1.7.6

## ◆ Ecore_Wl_Window

typedef struct _Ecore_Wl_Window Ecore_Wl_Window

Since
  1.8

## ◆ Ecore_Wl_Dnd

typedef struct _Ecore_Wl_Dnd Ecore_Wl_Dnd

Deprecated
  Do Not Use

Since
  1.7

## ◆ Ecore_Wl_Event_Data_Source_Send

typedef struct _Ecore_Wl_Event_Data_Source_Send Ecore_Wl_Event_Data_Source_Send

Since
  1.12

## ◆ Ecore_Wl_Event_Data_Source_Target

typedef struct _Ecore_Wl_Event_Data_Source_Target Ecore_Wl_Event_Data_Source_Target

Since
  1.7

## ◆ Ecore_Wl_Event_Selection_Data_Ready

typedef struct _Ecore_Wl_Event_Selection_Data_Ready Ecore_Wl_Event_Selection_Data_Ready

Since
  1.12

## ◆ Ecore_Wl_Event_Interfaces_Bound

typedef struct _Ecore_Wl_Event_Interfaces_Bound Ecore_Wl_Event_Interfaces_Bound

Since
  1.7

## Function Documentation

## ◆ ecore_wl_dpi_get()

EAPI int ecore_wl_dpi_get | ( | void |  | ) |

Returns the screen DPI.

This is a simplistic call to get DPI. It does not account for differing DPI in the x and y axes nor does it account for multihead or xinerama and xrandr where different parts of the screen may have different DPI etc.

Returns
  the general screen DPI (dots/pixels per inch).

Since
  1.2

## ◆ ecore_wl_display_iterate()

EAPI void ecore_wl_display_iterate | ( | void |  | ) |

Dispatches Wayland events.

Dispatches any events queued on the default queue. Wayland will attempt to read from the display fd and queue things up according to the proxy assignment.

## ◆ ecore_wl_cursor_get()

EAPI struct wl_cursor * ecore_wl_cursor_get | ( | const char * | cursor_name | ) |

Retrieves the requested cursor from the cursor theme.

Parameters

  cursor_name | The desired cursor name to be looked up in the theme

Returns
  the cursor or NULL if the cursor cannot be found

Since
  1.2

## ◆ ecore_wl_input_seat_get()

EAPI struct wl_seat * ecore_wl_input_seat_get | ( | Ecore_Wl_Input * | input | ) |

Since
  1.8

## ◆ ecore_wl_window_find()

EAPI Ecore_Wl_Window * ecore_wl_window_find | ( | unsigned int | id | ) |

Since
  1.12

References eina_hash_find().

## ◆ ecore_wl_dnd_set_selection()

EINA_DEPRECATED EAPI Eina_Bool ecore_wl_dnd_set_selection | ( | Ecore_Wl_Dnd * | dnd,
|  | const char ** | types_offered )

Deprecated
  use ecore_wl_dnd_selection_set

Since
  1.7

Deprecated
  use ecore_wl_dnd_selection_set

Since
  1.7

References ecore_wl_dnd_selection_set().

## ◆ ecore_wl_dnd_get_selection()

EINA_DEPRECATED EAPI Eina_Bool ecore_wl_dnd_get_selection | ( | Ecore_Wl_Dnd * | dnd,
|  | const char * | type )

Deprecated
  use ecore_wl_dnd_selection_get

Since
  1.7

Deprecated
  use ecore_wl_dnd_selection_get

Since
  1.7

References ecore_wl_dnd_selection_get().

## ◆ ecore_wl_dnd_get()

EINA_DEPRECATED EAPI Ecore_Wl_Dnd * ecore_wl_dnd_get | ( | void |  | ) |

Deprecated
  Do Not Use

Since
  1.7

Deprecated
  Do Not Use

Since
  1.7

## ◆ ecore_wl_dnd_start_drag()

EINA_DEPRECATED EAPI Eina_Bool ecore_wl_dnd_start_drag | ( | Ecore_Wl_Dnd * | dnd | ) |

Deprecated
  use ecore_wl_dnd_drag_start

Since
  1.7

Deprecated
  use ecore_wl_dnd_drag_start

Since
  1.7

References EINA_FALSE.

## ◆ ecore_wl_dnd_selection_has_owner()

EINA_DEPRECATED EAPI Eina_Bool ecore_wl_dnd_selection_has_owner | ( | Ecore_Wl_Dnd * | dnd | ) |

Deprecated
  use ecore_wl_dnd_selection_owner_has

Since
  1.7

Deprecated
  use ecore_wl_dnd_selection_owner_has

Since
  1.7

References ecore_wl_dnd_selection_owner_has().

## Variable Documentation

## ◆ ECORE_WL_EVENT_DND_END

EAPI int ECORE_WL_EVENT_DND_END
| extern

Since
  1.8

Referenced by ecore_wl_dnd_drag_end(), and ecore_wl_init().

## ◆ ECORE_WL_EVENT_DATA_SOURCE_TARGET

EAPI int ECORE_WL_EVENT_DATA_SOURCE_TARGET
| extern

Since
  1.8

Referenced by ecore_wl_init().

## ◆ ECORE_WL_EVENT_DATA_SOURCE_SEND

EAPI int ECORE_WL_EVENT_DATA_SOURCE_SEND
| extern

Since
  1.7

Referenced by ecore_wl_init().

## ◆ ECORE_WL_EVENT_DATA_SOURCE_CANCELLED

EAPI int ECORE_WL_EVENT_DATA_SOURCE_CANCELLED
| extern

Since
  1.7

Referenced by ecore_wl_init().

## ◆ ECORE_WL_EVENT_SELECTION_DATA_READY

EAPI int ECORE_WL_EVENT_SELECTION_DATA_READY
| extern

Since
  1.7

Referenced by ecore_wl_init().

## ◆ ECORE_WL_EVENT_INTERFACES_BOUND

EAPI int ECORE_WL_EVENT_INTERFACES_BOUND
| extern

Since
  1.7

Referenced by ecore_wl_init().