Wayland Library Window Functions

- Main Page
- Related Pages
- Modules
- Namespaces
- Data Structures
- Files
- Examples

Functions
Wayland Library Window Functions
Ecore » Ecore_Wl2 - Wayland integration

Functions that deal with creating, destroying, or interacting with Wayland windows. More...

## Functions
EAPI Ecore_Wl2_Window * | ecore_wl2_window_new (Ecore_Wl2_Display *display, Ecore_Wl2_Window *parent, int x, int y, int w, int h)
| Create a new Ecore_Wl2_Window. More...
EAPI int | ecore_wl2_window_id_get (Ecore_Wl2_Window *window)
| Get the window id associated with an Ecore_Wl2_Window. More...
EAPI struct wl_surface * | ecore_wl2_window_surface_get (Ecore_Wl2_Window *window)
| Get the wl_surface which belongs to this window. More...
EAPI int | ecore_wl2_window_surface_id_get (Ecore_Wl2_Window *window)
| Get the id of a given Ecore_Wl2_Window. More...
EAPI void | ecore_wl2_window_show (Ecore_Wl2_Window *window)
| Show a given Ecore_Wl2_Window. More...
EAPI void | ecore_wl2_window_hide (Ecore_Wl2_Window *window)
| Hide a given Ecore_Wl2_Window. More...
EAPI void | ecore_wl2_window_free (Ecore_Wl2_Window *window)
| Free a given Ecore_Wl2_Window. More...
EAPI void | ecore_wl2_window_move (Ecore_Wl2_Window *window, int x, int y)
| Move a given Ecore_Wl2_Window. More...
EAPI void | ecore_wl2_window_resize (Ecore_Wl2_Window *window, int w, int h, int location)
| Resize a given Ecore_Wl2_Window. More...
EAPI void | ecore_wl2_window_raise (Ecore_Wl2_Window *window)
| Raise a given Ecore_Wl2_Window. More...
EAPI Eina_Bool | ecore_wl2_window_alpha_get (Ecore_Wl2_Window *window)
| Get if a given window is alpha. More...
EAPI void | ecore_wl2_window_alpha_set (Ecore_Wl2_Window *window, Eina_Bool alpha)
| Set a given window's alpha property. More...
EAPI void | ecore_wl2_window_transparent_set (Ecore_Wl2_Window *window, Eina_Bool transparent)
| Set a given window's transparent property. More...
EAPI void | ecore_wl2_window_opaque_region_set (Ecore_Wl2_Window *window, int x, int y, int w, int h)
| Set the opaque region of the Ecore_Wl2_Window. More...
EAPI void | ecore_wl2_window_input_region_set (Ecore_Wl2_Window *window, int x, int y, int w, int h)
| Set the input region of the Ecore_Wl2_Window. More...
EAPI Eina_Bool | ecore_wl2_window_maximized_get (Ecore_Wl2_Window *window)
| Get if a given window is maximized. More...
EAPI void | ecore_wl2_window_maximized_set (Ecore_Wl2_Window *window, Eina_Bool maximized)
| Set the maximized state of a given window. More...
EAPI Eina_Bool | ecore_wl2_window_fullscreen_get (Ecore_Wl2_Window *window)
| Get if a given window is fullscreen. More...
EAPI void | ecore_wl2_window_fullscreen_set (Ecore_Wl2_Window *window, Eina_Bool fullscreen)
| Set the fullscreen state of a given window. More...
EAPI int | ecore_wl2_window_rotation_get (Ecore_Wl2_Window *window)
| Get if a given window is rotated. More...
EAPI void | ecore_wl2_window_rotation_set (Ecore_Wl2_Window *window, int rotation)
| Set the rotation of a given window. More...
EAPI void | ecore_wl2_window_title_set (Ecore_Wl2_Window *window, const char *title)
| Set the title of a given window. More...
EAPI void | ecore_wl2_window_class_set (Ecore_Wl2_Window *window, const char *clas)
| Set the class of a given window. More...
EAPI void | ecore_wl2_window_geometry_get (Ecore_Wl2_Window *window, int *x, int *y, int *w, int *h)
| Get the geometry of a given window. More...
EAPI void | ecore_wl2_window_geometry_set (Ecore_Wl2_Window *window, int x, int y, int w, int h)
| Set the geometry of a given window. More...
EAPI Eina_Bool | ecore_wl2_window_iconified_get (Ecore_Wl2_Window *window)
| Get the iconified state of a given window. More...
EAPI void | ecore_wl2_window_iconified_set (Ecore_Wl2_Window *window, Eina_Bool iconified)
| Iconify a window. More...
EAPI void | ecore_wl2_window_pointer_xy_get (Ecore_Wl2_Window *window, int *x, int *y)
| Retrieves the mouse position of the current window. More...
EAPI void | ecore_wl2_window_pointer_set (Ecore_Wl2_Window *window, struct wl_surface *surface, int hot_x, int hot_y)
| Set a given wl_surface to use as the pointer on a window. More...
EAPI void | ecore_wl2_window_cursor_from_name_set (Ecore_Wl2_Window *window, const char *cursor)
| Set a specific cursor on a given window. More...
EAPI void | ecore_wl2_window_type_set (Ecore_Wl2_Window *window, Ecore_Wl2_Window_Type type)
| Set the type of a given window. More...

## Detailed Description

Functions that deal with creating, destroying, or interacting with Wayland windows.

## Function Documentation

EAPI Ecore_Wl2_Window* ecore_wl2_window_new | ( | Ecore_Wl2_Display * | display,
|  | Ecore_Wl2_Window * | parent,
|  | int | x,
|  | int | y,
|  | int | w,
|  | int | h
| ) |  |

Create a new Ecore_Wl2_Window.

Parameters

  display | The Ecore_Wl2_Display on which to create this new window
  parent | The Ecore_Wl2_Window which is the parent of this window
  x | Initial x position of window
  y | Initial y position of window
  w | Initial width of window
  h | Initial height of window

Since
  1.17

References eina_inlist_append(), EINA_INLIST_GET, and efl::eo::parent.

EAPI int ecore_wl2_window_id_get | ( | Ecore_Wl2_Window * | window | ) |

Get the window id associated with an Ecore_Wl2_Window.

Parameters

  window | The Ecore_Wl2_Window of which to retrieve the window id

Returns
  The id associated with this window

Since
  1.17

EAPI struct wl_surface* ecore_wl2_window_surface_get | ( | Ecore_Wl2_Window * | window | ) |

Get the wl_surface which belongs to this window.

Parameters

  window | The Ecore_Wl2_Window to get the surface of

Returns
  The wl_surface associated with this window.

Since
  1.17

Referenced by ecore_wl2_dnd_drag_start().

EAPI int ecore_wl2_window_surface_id_get | ( | Ecore_Wl2_Window * | window | ) |

Get the id of a given Ecore_Wl2_Window.

Parameters

  window | The window to return the id of

Returns
  The id of the given window, or -1 on failure

Since
  1.17

EAPI void ecore_wl2_window_show | ( | Ecore_Wl2_Window * | window | ) |

Show a given Ecore_Wl2_Window.

Parameters

  window | The Ecore_Wl2_Window to show

Since
  1.17

References ERR.

EAPI void ecore_wl2_window_hide | ( | Ecore_Wl2_Window * | window | ) |

Hide a given Ecore_Wl2_Window.

Parameters

  window | The Ecore_Wl2_Window to hide

Since
  1.17

Referenced by ecore_wl2_window_free().

EAPI void ecore_wl2_window_free | ( | Ecore_Wl2_Window * | window | ) |

Free a given Ecore_Wl2_Window.

Parameters

  window | The Ecore_Wl2_Window to free

Since
  1.17

References ecore_timer_del(), ecore_wl2_window_hide(), EINA_INLIST_FOREACH, EINA_INLIST_FOREACH_SAFE, EINA_INLIST_GET, eina_inlist_remove(), and eina_stringshare_del().

EAPI void ecore_wl2_window_move | ( | Ecore_Wl2_Window * | window,
|  | int | x,
|  | int | y
| ) |  |

Move a given Ecore_Wl2_Window.

The position requested (`x`, `y`) is not honored by Wayland because Wayland does not allow specific window placement to be set.

Parameters

  window | The Ecore_Wl2_Window which to move
  x | Desired x position of window
  y | Desired y position of window

Since
  1.17

References EINA_TRUE.

EAPI void ecore_wl2_window_resize | ( | Ecore_Wl2_Window * | window,
|  | int | w,
|  | int | h,
|  | int | location
| ) |  |

Resize a given Ecore_Wl2_Window.

The size requested (`w`, `h`) is not honored by Wayland because Wayland does not allow specific window sizes to be set.

Parameters

  window | The Ecore_Wl2_Window which to resize
  w | Desired width of window
  h | Desired height of window
  location | The edge of the window from where the resize should start

Since
  1.17

EAPI void ecore_wl2_window_raise | ( | Ecore_Wl2_Window * | window | ) |

Raise a given Ecore_Wl2_Window.

Parameters

  window | The Ecore_Wl2_Window which to raise

Since
  1.17

EAPI Eina_Bool ecore_wl2_window_alpha_get | ( | Ecore_Wl2_Window * | window | ) |

Get if a given window is alpha.

Parameters

  window | The window to get if is alpha

Returns
  EINA_TRUE if window is alpha, EINA_FALSE otherwise

Since
  1.17

References EINA_FALSE.

EAPI void ecore_wl2_window_alpha_set | ( | Ecore_Wl2_Window * | window,
|  | Eina_Bool | alpha
| ) |  |

Set a given window's alpha property.

Parameters

  window | The window on which to set the alpha property
  alpha | EINA_TRUE to set window as alpha, EINA_FALSE otherwise

Since
  1.17

References ecore_wl2_window_opaque_region_set().

EAPI void ecore_wl2_window_transparent_set | ( | Ecore_Wl2_Window * | window,
|  | Eina_Bool | transparent
| ) |  |

Set a given window's transparent property.

Parameters

  window | The window on which to set the transparent property
  transparent | EINA_TRUE to set window as transparent, EINA_FALSE otherwise

Since
  1.17

References ecore_wl2_window_opaque_region_set().

EAPI void ecore_wl2_window_opaque_region_set | ( | Ecore_Wl2_Window * | window,
|  | int | x,
|  | int | y,
|  | int | w,
|  | int | h
| ) |  |

Set the opaque region of the Ecore_Wl2_Window.

Parameters

  win | The window
  x | The left point of the region.
  y | The top point of the region.
  w | The width of the region.
  h | The height of the region.

Since
  1.17

References ERR.

Referenced by ecore_wl2_window_alpha_set(), and ecore_wl2_window_transparent_set().

EAPI void ecore_wl2_window_input_region_set | ( | Ecore_Wl2_Window * | window,
|  | int | x,
|  | int | y,
|  | int | w,
|  | int | h
| ) |  |

Set the input region of the Ecore_Wl2_Window.

To set an empty region, pass width and height as 0.

An empty input region means the entire window surface will accept input.

Parameters

  window | The window to set the input region of
  x | The left point of the region.
  y | The top point of the region.
  w | The width of the region.
  h | The height of the region.

Since
  1.17

References ERR.

EAPI Eina_Bool ecore_wl2_window_maximized_get | ( | Ecore_Wl2_Window * | window | ) |

Get if a given window is maximized.

Parameters

  window | The window to get the maximized state of

Returns
  EINA_TRUE if window is maximized, EINA_FALSE otherwise

Since
  1.17

References EINA_FALSE.

EAPI void ecore_wl2_window_maximized_set | ( | Ecore_Wl2_Window * | window,
|  | Eina_Bool | maximized
| ) |  |

Set the maximized state of a given window.

Parameters

  window | The window to set the maximized state of
  maximized | EINA_TRUE to set maximized, EINA_FALSE to unset

Since
  1.17

EAPI Eina_Bool ecore_wl2_window_fullscreen_get | ( | Ecore_Wl2_Window * | window | ) |

Get if a given window is fullscreen.

Parameters

  window | The window to get the fullscreen state of

Returns
  EINA_TRUE if window is fullscreen, EINA_FALSE otherwise

Since
  1.17

References EINA_FALSE.

EAPI void ecore_wl2_window_fullscreen_set | ( | Ecore_Wl2_Window * | window,
|  | Eina_Bool | fullscreen
| ) |  |

Set the fullscreen state of a given window.

Parameters

  window | The window to set the fullscreen state of
  maximized | EINA_TRUE to set fullscreen, EINA_FALSE to unset

Since
  1.17

EAPI int ecore_wl2_window_rotation_get | ( | Ecore_Wl2_Window * | window | ) |

Get if a given window is rotated.

Parameters

  window | The window to get the rotation of

Returns
  The amount of rotation for this window, or -1 on failure

Since
  1.17

EAPI void ecore_wl2_window_rotation_set | ( | Ecore_Wl2_Window * | window,
|  | int | rotation
| ) |  |

Set the rotation of a given window.

Parameters

  window | The window to set the rotation of
  rotation | The amount of rotation

Since
  1.17

EAPI void ecore_wl2_window_title_set | ( | Ecore_Wl2_Window * | window,
|  | const char * | title
| ) |  |

Set the title of a given window.

Parameters

  window | The window to set the title of
  title | The title of the window

Since
  1.17

EAPI void ecore_wl2_window_class_set | ( | Ecore_Wl2_Window * | window,
|  | const char * | clas
| ) |  |

Set the class of a given window.

Parameters

  window | The window to set the class of
  clas | The class of the window

Since
  1.17

EAPI void ecore_wl2_window_geometry_get | ( | Ecore_Wl2_Window * | window,
|  | int * | x,
|  | int * | y,
|  | int * | w,
|  | int * | h
| ) |  |

Get the geometry of a given window.

The window geometry returned here is the window geometry as recognized by xdg_surface_set_window_geometry. As such, it represents the "visible bounds" of a window from the user's perspective.

Parameters

  window | The window to get the geometry of
  x | The left point of the window geometry
  y | The top point of the window geometry
  w | The width of the window geometry
  h | The height of the window geometry

Since
  1.17

EAPI void ecore_wl2_window_geometry_set | ( | Ecore_Wl2_Window * | window,
|  | int | x,
|  | int | y,
|  | int | w,
|  | int | h
| ) |  |

Set the geometry of a given window.

The window geometry referenced here is the window geometry as recognized by xdg_surface_set_window_geometry. As such, it represents the "visible bounds" of a window from the user's perspective.

Parameters

  window | The window to set the geometry of
  x | The left point of the window geometry
  y | The top point of the window geometry
  w | The width of the window geometry
  h | The height of the window geometry

Since
  1.17

EAPI Eina_Bool ecore_wl2_window_iconified_get | ( | Ecore_Wl2_Window * | window | ) |

Get the iconified state of a given window.

Parameters

  window | The window to get the iconified state of

Returns
  EINA_TRUE if window is iconified, EINA_FALSE otherwise

Since
  1.17

References EINA_FALSE.

EAPI void ecore_wl2_window_iconified_set | ( | Ecore_Wl2_Window * | window,
|  | Eina_Bool | iconified
| ) |  |

Iconify a window.

Parameters

  win | The window to iconifiy
  iconified | The new iconified state to set

Since
  1.17

EAPI void ecore_wl2_window_pointer_xy_get | ( | Ecore_Wl2_Window * | window,
|  | int * | x,
|  | int * | y
| ) |  |

Retrieves the mouse position of the current window.

Parameters

  window | The window on which to retrieve the mouse position
  x | where to return the horizontal position. May be NULL. Returns 0 on error.
  y | where to return the vertical position. May be NULL. Returns 0 on error.

Since
  1.17

References ecore_wl2_window_input_get().

EAPI void ecore_wl2_window_pointer_set | ( | Ecore_Wl2_Window * | window,
|  | struct wl_surface * | surface,
|  | int | hot_x,
|  | int | hot_y
| ) |  |

Set a given wl_surface to use as the pointer on a window.

Parameters

  window | The window to set this surface as the pointer on
  surface | The surface to use as the pointer
  hot_x | The x coordinate to use as the cursor hot spot
  hot_y | The y coordinate to use as the cursor hot spot

Since
  1.17

References ecore_wl2_window_input_get().

EAPI void ecore_wl2_window_cursor_from_name_set | ( | Ecore_Wl2_Window * | window,
|  | const char * | cursor
| ) |  |

Set a specific cursor on a given window.

This function will try to find a matching cursor inside the existing cursor theme and set the pointer which is over the given window to be the specified cursor

Parameters

  window | The window to set the cursor on
  cursor | The name of the cursor to try and set

Since
  1.17

References ecore_wl2_window_input_get().

Referenced by ecore_wl2_dnd_drag_start().

EAPI void ecore_wl2_window_type_set | ( | Ecore_Wl2_Window * | window,
|  | Ecore_Wl2_Window_Type | type
| ) |  |

Set the type of a given window.

Parameters

  window | The window to set the type of The Ecore_Wl2_Window_Type to set on the window

Since
  1.17