For a given specific window, i.e. an element of :attr:`windows`, get the windows of all resolutions.

        Arguments:
            ij_win {int} -- The index specifying the window for which to return the resolution-windows.
347190
def ji_windows(self, ij_win):  # what can be given to ij_win NOT intuitive/right name by now!!!
        
        ji_windows = {}
        transform_src = self._layer_meta[self._res_indices[self._windows_res][0]]["transform"]
        for res in self._res_indices:
            transform_dst = self._layer_meta[self._res_indices[res][0]]["transform"]
            ji_windows[res] = window_from_window(window_src=self.windows[ij_win],
                                                 transform_src=transform_src,
                                                 transform_dst=transform_dst)
        return ji_windows
292132
def document_windows(self) -> typing.List[DocumentWindow]:
        
        return [DocumentWindow(document_controller) for document_controller in self.__application.document_controllers]
635121
public static List<Window> windows(String words) {
        StringTokenizer tokenizer = new StringTokenizer(words);
        List<String> list = new ArrayList<String>();
        while (tokenizer.hasMoreTokens())
            list.add(tokenizer.nextToken());
        return windows(list, 5);
    }
110970
def _process_windows(self, func, **kwargs):
        """"""
        ji_results = []
        for ji_win in range(len(self.windows)):
            ji_results.append(self._process_window(ji_win, func, **kwargs))
        return ji_results
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))
932907
def list_windows(self):
        
        windows = [w for w in self._windows if w['session_id'] == self._session_id]

        return [Window(session=self, **window) for window in windows]
200031
def get_windows_if_list(extended=False):
    """"""
    # Should work on Windows XP+
    def _get_mac(x):
        size = x["physical_address_length"]
        if size != 6:
            return ""
        data = bytearray(x["physical_address"])
        return str2mac(bytes(data)[:size])

    def _get_ips(x):
        unicast = x['first_unicast_address']
        anycast = x['first_anycast_address']
        multicast = x['first_multicast_address']

        def _resolve_ips(y):
            if not isinstance(y, list):
                return []
            ips = []
            for ip in y:
                addr = ip['address']['address'].contents
                if addr.si_family == socket.AF_INET6:
                    ip_key = "Ipv6"
                    si_key = "sin6_addr"
                else:
                    ip_key = "Ipv4"
                    si_key = "sin_addr"
                data = getattr(addr, ip_key)
                data = getattr(data, si_key)
                data = bytes(bytearray(data.byte))
                # Build IP
                if data:
                    ips.append(inet_ntop(addr.si_family, data))
            return ips

        ips = []
        ips.extend(_resolve_ips(unicast))
        if extended:
            ips.extend(_resolve_ips(anycast))
            ips.extend(_resolve_ips(multicast))
        return ips

    if six.PY2:
        _str_decode = lambda x: x.encode('utf8', errors='ignore')
    else:
        _str_decode = plain_str
    return [
        {
            "name": _str_decode(x["friendly_name"]),
            "win_index": x["interface_index"],
            "description": _str_decode(x["description"]),
            "guid": _str_decode(x["adapter_name"]),
            "mac": _get_mac(x),
            "ipv4_metric": 0 if WINDOWS_XP else x["ipv4_metric"],
            "ipv6_metric": 0 if WINDOWS_XP else x["ipv6_metric"],
            "ips": _get_ips(x)
        } for x in GetAdaptersAddresses()
    ]
444660
private int getCurrentWindowIndex()
    {
        long currentTime = System.currentTimeMillis();
        long currentWindow =((currentTime - startTime) / windowDurationInMs);
        return (int) currentWindow%(numKeys/windowSize);
    }
612868
function (topWin) {
		var getCrossOriginChildren = module.exports.getCrossOriginChildren
		var isSameOrigin = module.exports.isSameOrigin
		var windows = getCrossOriginChildren(topWin)
		var currentWin = environment.global.window
		if (!isSameOrigin(topWin, currentWin)) {
			windows.push(topWin)
		}
		return windows
	}
115947
def get_window_at_mouse(self):
        
        window_ret = ctypes.c_ulong(0)
        _libxdo.xdo_get_window_at_mouse(self._xdo, ctypes.byref(window_ret))
        return window_ret.value
1099214
def windows(self):
        
        from foxpuppet.windows import BrowserWindow

        return [
            BrowserWindow(self.selenium, handle)
            for handle in self.selenium.window_handles
        ]
519319
def __get_windows_path(self):
        """"""
        if OS_SEP == '\\':
            return self
        else:
            entry = self.get()
            r = entry.get_path().replace(OS_SEP, '\\')
            return SCons.Subst.SpecialAttrWrapper(r, entry.name + "_windows")
1092569
def get_window_from_xy(self, xy):
        """"""
        a_transform = self._get_template_for_given_resolution(res=self.dst_res, return_="meta")["transform"]
        row, col = transform.rowcol(a_transform, xy[0], xy[1])
        ij_containing_xy = None
        for ji, win in enumerate(self.windows):
            (row_start, row_end), (col_start, col_end) = rasterio.windows.toranges(win)
            # print(row, col, row_start, row_end, col_start, col_end)
            if ((col >= col_start) & (col < col_end)) & ((row >= row_start) & (row < row_end)):
                ij_containing_xy = ji
                break
        if ij_containing_xy is None:
            raise ValueError("The given 'xy' value is not contained in any window.")
        return ij_containing_xy
635263
def get_desktop_for_window(self, window):
        
        desktop = ctypes.c_long(0)
        _libxdo.xdo_get_desktop_for_window(
            self._xdo, window, ctypes.byref(desktop))
        return desktop.value
732203
def mean_by_window(self, indices, window):
        
        masks = self._makewindows(indices, window)
        newindex = arange(0, len(masks[0]))
        return self.map(lambda x: mean([x[m] for m in masks], axis=0), index=newindex)
1180962
def _posix_get_window_size():
    
    # see README.txt for reference information
    # http://www.kernel.org/doc/man-pages/online/pages/man4/tty_ioctl.4.html

    from fcntl import ioctl
    from termios import TIOCGWINSZ
    from array import array

    """
    struct winsize {
        unsigned short ws_row;
        unsigned short ws_col;
        unsigned short ws_xpixel;   /* unused */
        unsigned short ws_ypixel;   /* unused */
    };
    """
    winsize = array("H", [0] * 4)
    try:
        ioctl(sys.stdout.fileno(), TIOCGWINSZ, winsize)
    except IOError:
        # for example IOError: [Errno 25] Inappropriate ioctl for device
        # when output is redirected
        # [ ] TODO: check fd with os.isatty
        pass
    return (winsize[1], winsize[0])
168226
def get_active_window_pos():
    '''
    '''
    # http://stackoverflow.com/questions/26050788/in-bash-on-ubuntu-14-04-unity-how-can-i-get-the-total-size-of-an-open-window-i/26060527#26060527
    cmd = ['xdotool','getactivewindow', 'getwindowgeometry']
    res = subprocess.Popen(cmd, stdout = subprocess.PIPE, stderr= subprocess.PIPE).communicate()
    stdout = res[0].decode('utf-8').splitlines()
    pos = stdout[1].split(':')[1].split(',')
    geo = stdout[2].split(':')[1].split('x')
    x, y = int(pos[0].strip()), int(pos[1].split('(')[0].strip())
    w, h = int(geo[0].strip()), int(geo[1].strip())

    # get the window decorations
    window_id = get_window_id()
    cmd = ['xprop', '_NET_FRAME_EXTENTS', '-id', window_id]
    res = subprocess.Popen(cmd, stdout = subprocess.PIPE, stderr= subprocess.PIPE).communicate()
    decos = res[0].decode('utf-8').split('=')[1].split(',')
    l, r = int(decos[0].strip()), int(decos[1].strip())
    t, b = int(decos[2].strip()), int(decos[3].strip())

    return x-l, y-t