Functions
X Window Geometry Functions

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. More...
 
void ecore_x_window_resize (Ecore_X_Window win, int w, int h)
 Resizes a window. More...
 
void ecore_x_window_move_resize (Ecore_X_Window win, int x, int y, int w, int h)
 Moves and resizes a window. More...
 
void ecore_x_window_size_get (Ecore_X_Window win, int *w, int *h)
 Retrieves the size of the given window. More...
 
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. More...
 
int ecore_x_window_border_width_get (Ecore_X_Window win)
 Retrieves the width of the border of the given window. More...
 
void ecore_x_window_border_width_set (Ecore_X_Window win, int width)
 Sets the width of the border of the given window. More...
 
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. More...
 
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. More...
 
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. More...
 
Ecore_X_Window ecore_x_window_at_xy_get (int x, int y)
 Retrieves the top, visible window at the given location. More...
 
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. More...
 

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
winThe window to move.
xX position.
yY 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
winThe window to resize.
wNew width of the window.
hNew 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
winThe window to move and resize.
xNew X position of the window.
yNew Y position of the window.
wNew width of the window.
hNew 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
winThe given window.
wPointer to an integer into which the width is to be stored.
hPointer 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
winThe given window.
xPointer to an integer in which the X position is to be stored.
yPointer to an integer in which the Y position is to be stored.
wPointer to an integer in which the width is to be stored.
hPointer 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
winThe 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
winThe given window.
widthThe 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
baseThe base window to start searching from (normally root).
xThe given X position.
yThe given Y position.
skipThe list of windows to be skipped.
skip_numThe 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
rootThe root window of win - if 0, this will be automatically determined with extra processing overhead
winThe window to get the parent window of
Returns
The parent window of win

◆ 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
winThe 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
xThe given X position.
yThe 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
xThe given X position.
yThe given Y position.
skipThe list of windows to be skipped.
skip_numThe number of windows to be skipped.
Returns
The window at that position.