X Window Geometry Functions
Ecore » Ecore_X - X11 Integration

Functions that change or retrieve the geometry of X windows. More...

## Functions

void | ecore_x_window_move (Ecore_X_Window win, int x, int y)
| Moves a window to the position `x`, `y`.
void | ecore_x_window_resize (Ecore_X_Window win, int w, int h)
| Resizes a window.
void | ecore_x_window_move_resize (Ecore_X_Window win, int x, int y, int w, int h)
| Moves and resizes a window.
void | ecore_x_window_size_get (Ecore_X_Window win, int *w, int *h)
| Retrieves the size of the given window.
void | ecore_x_window_geometry_get (Ecore_X_Window win, int *x, int *y, int *w, int *h)
| Retrieves the geometry of the given window.
int | ecore_x_window_border_width_get (Ecore_X_Window win)
| Retrieves the width of the border of the given window.
void | ecore_x_window_border_width_set (Ecore_X_Window win, int width)
| Sets the width of the border of the given window.
Ecore_X_Window | ecore_x_window_shadow_tree_at_xy_with_skip_get (Ecore_X_Window base, int x, int y, Ecore_X_Window *skip, int skip_num)
| Retrieves the top, visible window at the given location, but skips the windows in the list.
Ecore_X_Window | ecore_x_window_shadow_parent_get (Ecore_X_Window root, Ecore_X_Window win)
| Retrieves the parent window a given window has.
void | ecore_x_window_shadow_tree_flush (void)
| Flushes the window shadow tree so nothing is stored.
Ecore_X_Window | ecore_x_window_root_get (Ecore_X_Window win)
| Retrieves the root window a given window is on.
Ecore_X_Window | ecore_x_window_at_xy_get (int x, int y)
| Retrieves the top, visible window at the given location.
Ecore_X_Window | ecore_x_window_at_xy_with_skip_get (int x, int y, Ecore_X_Window *skip, int skip_num)
| Retrieves the top, visible window at the given location, but skips the windows in the list.

## Detailed Description

Functions that change or retrieve the geometry of X windows.

## Function Documentation

## ecore_x_window_move()

void ecore_x_window_move | ( | Ecore_X_Window | win,
|  | int | x,
|  | int | y )

Moves a window to the position `x`, `y`.

The position is relative to the upper left hand corner of the parent window.

Parameters

  win | The window to move.
  x | X position.
  y | Y position.

References ecore_x_sync().

## ecore_x_window_resize()

void ecore_x_window_resize | ( | Ecore_X_Window | win,
|  | int | w,
|  | int | h )

Resizes a window.

Parameters

  win | The window to resize.
  w | New width of the window.
  h | New height of the window.

References ecore_x_sync().

## ecore_x_window_move_resize()

void ecore_x_window_move_resize | ( | Ecore_X_Window | win,
|  | int | x,
|  | int | y,
|  | int | w,
|  | int | h )

Moves and resizes a window.

Parameters

  win | The window to move and resize.
  x | New X position of the window.
  y | New Y position of the window.
  w | New width of the window.
  h | New height of the window.

References ecore_x_sync().

## ecore_x_window_size_get()

void ecore_x_window_size_get | ( | Ecore_X_Window | win,
|  | int * | w,
|  | int * | h )

Retrieves the size of the given window.

Parameters

  win | The given window.
  w | Pointer to an integer into which the width is to be stored.
  h | Pointer to an integer into which the height is to be stored.

References ecore_x_drawable_geometry_get(), and ecore_x_sync().

## ecore_x_window_geometry_get()

void ecore_x_window_geometry_get | ( | Ecore_X_Window | win,
|  | int * | x,
|  | int * | y,
|  | int * | w,
|  | int * | h )

Retrieves the geometry of the given window.

Note that the x & y coordinates are relative to your parent. In particular for reparenting window managers - relative to you window border. If you want screen coordinates either walk the window tree to the root, else for ecore_evas applications see ecore_evas_geometry_get(). Elementary applications can use elm_win_screen_position_get().

Parameters

  win | The given window.
  x | Pointer to an integer in which the X position is to be stored.
  y | Pointer to an integer in which the Y position is to be stored.
  w | Pointer to an integer in which the width is to be stored.
  h | Pointer to an integer in which the height is to be stored.

References ecore_x_drawable_geometry_get(), and ecore_x_sync().

## ecore_x_window_border_width_get()

int ecore_x_window_border_width_get | ( | Ecore_X_Window | win | ) |

Retrieves the width of the border of the given window.

Parameters

  win | The given window.

Returns
  Width of the border of `win`.

References ecore_x_drawable_border_width_get(), and ecore_x_sync().

## ecore_x_window_border_width_set()

void ecore_x_window_border_width_set | ( | Ecore_X_Window | win,
|  | int | width )

Sets the width of the border of the given window.

Parameters

  win | The given window.
  width | The new border width.

References ecore_x_sync().

## ecore_x_window_shadow_tree_at_xy_with_skip_get()

Ecore_X_Window ecore_x_window_shadow_tree_at_xy_with_skip_get | ( | Ecore_X_Window | base,
|  | int | x,
|  | int | y,
|  | Ecore_X_Window * | skip,
|  | int | skip_num )

Retrieves the top, visible window at the given location, but skips the windows in the list.

This uses a shadow tree built from the window tree that is only updated the first time ecore_x_window_shadow_tree_at_xy_with_skip_get() is called, or the next time it is called after a ecore_x_window_shadow_tree_flush()

Parameters

  base | The base window to start searching from (normally root).
  x | The given X position.
  y | The given Y position.
  skip | The list of windows to be skipped.
  skip_num | The number of windows to be skipped.

Returns
  The window at that position.

## ecore_x_window_shadow_parent_get()

Ecore_X_Window ecore_x_window_shadow_parent_get | ( | Ecore_X_Window | root,
|  | Ecore_X_Window | win )

Retrieves the parent window a given window has.

This uses the shadow window tree.

Parameters

  root | The root window of `win` - if 0, this will be automatically determined with extra processing overhead
  win | The window to get the parent window of

Returns
  The parent window of `win`

References EINA_UNUSED.

## ecore_x_window_root_get()

Ecore_X_Window ecore_x_window_root_get | ( | Ecore_X_Window | win | ) |

Retrieves the root window a given window is on.

Parameters

  win | The window to get the root window of

Returns
  The root window of `win`

## ecore_x_window_at_xy_get()

Ecore_X_Window ecore_x_window_at_xy_get | ( | int | x,
|  | int | y )

Retrieves the top, visible window at the given location.

Parameters

  x | The given X position.
  y | The given Y position.

Returns
  The window at that position.

## ecore_x_window_at_xy_with_skip_get()

Ecore_X_Window ecore_x_window_at_xy_with_skip_get | ( | int | x,
|  | int | y,
|  | Ecore_X_Window * | skip,
|  | int | skip_num )

Retrieves the top, visible window at the given location, but skips the windows in the list.

Parameters

  x | The given X position.
  y | The given Y position.
  skip | The list of windows to be skipped.
  skip_num | The number of windows to be skipped.

Returns
  The window at that position.