Logo Search packages:      
Sourcecode: xdotool version File versions  Download package

int xdo_get_window_size ( const xdo_t xdo,
Window  wid,
unsigned int *  width_ret,
unsigned int *  height_ret 
)

Get a window's size.

Parameters:
wid the window to query
width_ret pointer to unsigned int where the width is stored.
height_ret pointer to unsigned int where the height is stored.

Definition at line 185 of file xdo.c.

References xdo::xdpy.

                                                  {
  int ret;
  XWindowAttributes attr;
  ret = XGetWindowAttributes(xdo->xdpy, wid, &attr);
  if (ret != 0) {
    if (width_ret != NULL) {
      *width_ret = attr.width;
    }

    if (height_ret != NULL) {
      *height_ret = attr.height;
    }
  }
  return _is_success("XGetWindowAttributes", ret == 0);
}


Generated by  Doxygen 1.6.0   Back to index