/** * evaluates the region currently occupied by the topmost window of this App instance. The region might not be fully * visible, not visible at all or invalid with respect to the current monitor configuration (outside any screen) * * @return the region */ public Region window() { if (appPID != 0) { return asRegion(_osUtil.getWindow(appPID)); } return asRegion(_osUtil.getWindow(appNameGiven)); }
/** * evaluates the region currently occupied by the systemwide frontmost window (usually the one that has focus for * mouse and keyboard actions) * * @return the region */ public static Region focusedWindow() { return asRegion(_osUtil.getFocusedWindow()); } //</editor-fold>
/** * evaluates the region currently occupied by the window with the given number of this App instance. The region might * not be fully visible, not visible at all or invalid with respect to the current monitor configuration (outside any * screen) * * @param winNum window * @return the region */ public Region window(int winNum) { if (appPID != 0) { return asRegion(_osUtil.getWindow(appPID, winNum)); } return asRegion(_osUtil.getWindow(appNameGiven, winNum)); }