X Window Geometry Functions

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

Functions

EAPI Ecore_X_Window ecore_x_window_at_xy_get (int x, int y)
 Retrieves the top, visible window at the given location.
EAPI 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.
EAPI Ecore_X_Window ecore_x_window_at_xy_begin_get (Ecore_X_Window begin, int x, int y)
 Retrieves the top, visible window at the given location, but begins at the begin window instead of the root one.
EAPI void ecore_x_window_size_get (Ecore_X_Window window, int *width, int *height)
 Retrieves the size of the given window.
EAPI void ecore_x_window_geometry_get (Ecore_X_Window window, int *x, int *y, int *width, int *height)
 Retrieves the geometry of the given window.
EAPI int ecore_x_window_border_width_get (Ecore_X_Window win)
 Retrieves the width of the border of the given window.
EAPI 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.
EAPI 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.
EAPI void ecore_x_window_shadow_tree_flush (void)
 Flushes the window shadow tree so nothing is stored.
EAPI void ecore_x_window_move (Ecore_X_Window win, int x, int y)
 Moves a window to the position x, y.
EAPI void ecore_x_window_resize (Ecore_X_Window win, int w, int h)
 Resizes a window.
EAPI void ecore_x_window_move_resize (Ecore_X_Window win, int x, int y, int w, int h)
 Moves and resizes a window.
EAPI void ecore_x_window_border_width_set (Ecore_X_Window win, int width)
 Sets the width of the border of the given window.
EAPI Ecore_X_Window ecore_x_window_root_get (Ecore_X_Window win)
 Retrieves the root window a given window is on.

Detailed Description

Functions that change or retrieve the geometry of X windows.


Function Documentation

EAPI Ecore_X_Window ecore_x_window_at_xy_begin_get ( Ecore_X_Window  begin,
int  x,
int  y 
)

Retrieves the top, visible window at the given location, but begins at the begin window instead of the root one.

Parameters:
beginThe window from which we begin.
xThe given X position.
yThe given Y position.
Returns:
The window at that position.
EAPI 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.
EAPI 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.
Returns:
The window at that position.
EAPI 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().

EAPI 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.
EAPI 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.

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.

To use this function, you must call before, and in order, ecore_x_drawable_geometry_get_prefetch(), which sends the GetGeometry request, then ecore_x_drawable_geometry_get_fetch(), which gets the reply.

Note that the x & y coordingates 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().

EAPI 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.
EAPI 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.
EAPI 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.
EAPI 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

Referenced by ecore_x_init().

EAPI 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
EAPI 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.
Returns:
The window at that position.
EAPI 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.

To use this function, you must call before, and in order, ecore_x_drawable_geometry_get_prefetch(), which sends the GetGeometry request, then ecore_x_drawable_geometry_get_fetch(), which gets the reply.

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().