Get the window's client area coordinates in the desktop.

        @rtype:  L{win32.Rect}
        @return: Rectangle occupied by the window's client area in the desktop.

        @raise WindowsError: An error occured while processing this request.
763995
def get_client_rect(self):
        
        cr = win32.GetClientRect( self.get_handle() )
        cr.left, cr.top     = self.client_to_screen(cr.left, cr.top)
        cr.right, cr.bottom = self.client_to_screen(cr.right, cr.bottom)
        return cr
1360848
def get_window_location(self, window):
        
        screen_ret = Screen()
        x_ret = ctypes.c_int(0)
        y_ret = ctypes.c_int(0)
        _libxdo.xdo_get_window_location(
            self._xdo, window, ctypes.byref(x_ret), ctypes.byref(y_ret),
            ctypes.byref(screen_ret))
        return window_location(x_ret.value, y_ret.value, screen_ret)
1292663
def getWindowRect(self, hwnd):
        
        for w in self._get_window_list():
            if "kCGWindowNumber" in w and w["kCGWindowNumber"] == hwnd:
                x = w["kCGWindowBounds"]["X"]
                y = w["kCGWindowBounds"]["Y"]
                width = w["kCGWindowBounds"]["Width"]
                height = w["kCGWindowBounds"]["Height"]
                return (x, y, width, height)
        raise OSError("Unrecognized window number {}".format(hwnd))
956350
function () {
                    var rect = this._anchorElement.getBoundingClientRect();

                    return {
                        x: rect.left,
                        y: rect.top,
                        width: rect.width,
                        height: rect.height
                    };
                }
443918
def get_position(self):
        """"""
        rect = _Rect()
        GetWindowRect(self._hwnd, ctypes.pointer(rect))
        return rect.left, rect.top, rect.right, rect.bottom
1374838
function() {
    var e = this._element;
    if (!e) return null;
    if (typeof e.getBoundingClientRect !== 'function') {
      console.error("[wdg.rect] This element has non `getBoundingClientRect` function:", e);
    }
    var r = e.getBoundingClientRect();
    if( typeof r.width === 'undefined' ) r.width = r.right - r.left;
    if( typeof r.height === 'undefined' ) r.height = r.bottom - r.top;
    return r;
  }
783430
def getBitmapFromRect(self, x, y, w, h):
        
        min_x, min_y, screen_width, screen_height = self._getVirtualScreenRect()
        img = self._getVirtualScreenBitmap() # TODO
        # Limit the coordinates to the virtual screen
        # Then offset so 0,0 is the top left corner of the image
        # (Top left of virtual screen could be negative)
        x1 = min(max(min_x, x), min_x+screen_width) - min_x
        y1 = min(max(min_y, y), min_y+screen_height) - min_y
        x2 = min(max(min_x, x+w), min_x+screen_width) - min_x
        y2 = min(max(min_y, y+h), min_y+screen_height) - min_y
        return numpy.array(img.crop((x1, y1, x2, y2)))
744053
def get_window_size(self, window):
        
        w_ret = ctypes.c_uint(0)
        h_ret = ctypes.c_uint(0)
        _libxdo.xdo_get_window_size(self._xdo, window, ctypes.byref(w_ret),
                                    ctypes.byref(h_ret))
        return window_size(w_ret.value, h_ret.value)
1040235
function getIntersectRect() {
  let n = arguments.length;

  if (!assert(n > 0, 'This method requires at least 1 argument specified.')) return null;

  let rect = {};
  let currRect, nextRect;

  for (let i = 0; i < n; i++) {
    if (!currRect) currRect = getRect(arguments[i]);

    if (!assert(currRect, 'Invalid computed rect.')) return null;

    if (i === 0 && ((i + 1) === n)) {
      nextRect = getRect(window);
    }
    else if ((i + 1) < n) {
      nextRect = getRect(arguments[i + 1]);
    }
    else {
      break;
    }

    if (!assert(nextRect, 'Invalid computed rect.')) return null;

    rect.width = Math.max(0.0, Math.min(currRect.right, nextRect.right) - Math.max(currRect.left, nextRect.left));
    rect.height = Math.max(0.0, Math.min(currRect.bottom, nextRect.bottom) - Math.max(currRect.top, nextRect.top));
    rect.top = Math.max(currRect.top, nextRect.top);
    rect.left = Math.max(currRect.left, nextRect.left);
    rect.bottom = rect.top + rect.height;
    rect.right = rect.left + rect.width;

    if (rect.width * rect.height === 0) {
      rect.width = 0;
      rect.height = 0;
      rect.top = 0;
      rect.left = 0;
      rect.bottom = 0;
      rect.right = 0;
    }

    currRect = rect;
  }

  return rect;
}
670080
private double getStartAngle() {
        ScaleDirection scaleDirection = gauge.getScaleDirection();
        Pos            knobPosition   = gauge.getKnobPosition();
        switch(knobPosition) {
            case BOTTOM_LEFT : return ScaleDirection.CLOCKWISE == scaleDirection ? 180 : 90;
            case TOP_LEFT    : return ScaleDirection.CLOCKWISE == scaleDirection ?  90 : 0;
            case TOP_RIGHT   : return ScaleDirection.CLOCKWISE == scaleDirection ?   0 : 270;
            case BOTTOM_RIGHT:
            default          : return ScaleDirection.CLOCKWISE == scaleDirection ? 270 : 180;
        }
    }
444660
private int getCurrentWindowIndex()
    {
        long currentTime = System.currentTimeMillis();
        long currentWindow =((currentTime - startTime) / windowDurationInMs);
        return (int) currentWindow%(numKeys/windowSize);
    }
419096
function getClientRect(offsets) {
  return _extends({}, offsets, {
    right: offsets.left + offsets.width,
    bottom: offsets.top + offsets.height
  });
}
749490
def window_size(self):
        
        value = self.http.get('/window/size').value
        w = roundint(value['width'])
        h = roundint(value['height'])
        return namedtuple('Size', ['width', 'height'])(w, h)
639738
function clickRegion( e ) {
	
	let pos 	= {
		x : e.clientX,
		y : e.clientY
	},
	region 		= '',
	dividant 	= 4,
	right  		= window.innerWidth - (window.innerWidth / dividant),
	left   		= (window.innerWidth / dividant),
	top    		= (window.innerHeight / dividant),
	bottom 		= window.innerHeight - (window.innerHeight / dividant);

	if( pos.y <= top ) { region = 'top'; }
	else if(  pos.y >= bottom ) { region = 'bottom'; }

	if( pos.x <= left ) { region = 'left'; }
	else if(  pos.x >= right ) { region = 'right'; }

	return region;
}
1328483
def viewbox(self):
        
        return self.left, self.top, self.right, self.bottom
52935
def get_window_size(window):
    
    width_value = ctypes.c_int(0)
    width = ctypes.pointer(width_value)
    height_value = ctypes.c_int(0)
    height = ctypes.pointer(height_value)
    _glfw.glfwGetWindowSize(window, width, height)
    return width_value.value, height_value.value
345553
def _as_parameter_(self):
        
        return RECT(self.left, self.top, self.right, self.bottom)