Java 类com.sun.jna.platform.win32.WinDef.RECT 实例源码

项目:HearthStats.net-Uploader    文件:JnaUtil.java   
public static Rectangle getWindowRect(Pointer hWnd) throws JnaUtilException {
    if (hWnd == null) {
        throw new JnaUtilException(
                "Failed to getWindowRect since Pointer hWnd is null");
    }
    Rectangle result = null;
    RECT rect = new RECT();
    boolean rectOK = user32.GetWindowRect(hWnd, rect);
    if (rectOK) {
        int x = rect.left;
        int y = rect.top;
        int width = rect.right - rect.left;
        int height = rect.bottom - rect.top;
        result = new Rectangle(x, y, width, height);
    }

    return result;
}
项目:MonitorBrightness    文件:MonitorInfoDemo.java   
/**
 * @param args (ignored)
 */
public static void main(String[] args)
{
    System.out.println("Installed Physical Monitors: " + User32.INSTANCE.GetSystemMetrics(WinUser.SM_CMONITORS));

    User32.INSTANCE.EnumDisplayMonitors(null, null, new MONITORENUMPROC() {

        @Override
        public int apply(HMONITOR hMonitor, HDC hdc, RECT rect, LPARAM lparam)
        {
            enumerate(hMonitor);

            return 1;
        }

    }, new LPARAM(0));
}
项目:AppWoksUtils    文件:Paint.java   
public BufferedImage capture(final HWND hWnd) {

        final HDC hdcWindow = User32.INSTANCE.GetDC(hWnd);
        final HDC hdcMemDC = GDI32.INSTANCE.CreateCompatibleDC(hdcWindow);

        final RECT bounds = new RECT();
        User32Extra.INSTANCE.GetClientRect(hWnd, bounds);

        final int width = bounds.right - bounds.left;
        final int height = bounds.bottom - bounds.top;
        if (width * height <= 0) { return null; }
        final HBITMAP hBitmap = GDI32.INSTANCE.CreateCompatibleBitmap(hdcWindow, width, height);

        final HANDLE hOld = GDI32.INSTANCE.SelectObject(hdcMemDC, hBitmap);
        GDI32Extra.INSTANCE.BitBlt(hdcMemDC, 0, 0, width, height, hdcWindow, 0, 0, WinGDIExtra.SRCCOPY);

        GDI32.INSTANCE.SelectObject(hdcMemDC, hOld);
        GDI32.INSTANCE.DeleteDC(hdcMemDC);

        final BITMAPINFO bmi = new BITMAPINFO();
        bmi.bmiHeader.biWidth = width;
        bmi.bmiHeader.biHeight = -height;
        bmi.bmiHeader.biPlanes = 1;
        bmi.bmiHeader.biBitCount = 32;
        bmi.bmiHeader.biCompression = WinGDI.BI_RGB;

        final Memory buffer = new Memory(width * height * 4);
        GDI32.INSTANCE.GetDIBits(hdcWindow, hBitmap, 0, height, buffer, bmi, WinGDI.DIB_RGB_COLORS);

        final BufferedImage image = new BufferedImage(width, height, BufferedImage.TYPE_INT_RGB);
        image.setRGB(0, 0, width, height, buffer.getIntArray(0, width * height), 0, width);

        GDI32.INSTANCE.DeleteObject(hBitmap);
        User32.INSTANCE.ReleaseDC(hWnd, hdcWindow);

        return image;

    }
项目:MonitorBrightness    文件:MonitorControllerJna.java   
public MonitorControllerJna()
{
    System.out.println("Monitors: " + User32.INSTANCE.GetSystemMetrics(User32.SM_CMONITORS));

    User32.INSTANCE.EnumDisplayMonitors(null, null, new MONITORENUMPROC() {

        @Override
        public int apply(HMONITOR hMonitor, HDC hdc, RECT rect, LPARAM lparam)
        {
            System.out.println("Monitor handle: " + hMonitor);

            MONITORINFOEX info = new MONITORINFOEX();
            User32.INSTANCE.GetMonitorInfo(hMonitor, info);
            System.out.println(info.rcMonitor);

            DWORDByReference pdwNumberOfPhysicalMonitors = new DWORDByReference();
            Dxva2.INSTANCE.GetNumberOfPhysicalMonitorsFromHMONITOR(hMonitor, pdwNumberOfPhysicalMonitors);
            int monitorCount = pdwNumberOfPhysicalMonitors.getValue().intValue();

            System.out.println("Physical monitors for " + hMonitor + ": " + monitorCount);

            PHYSICAL_MONITOR[] physMons = new PHYSICAL_MONITOR[monitorCount];
            Dxva2.INSTANCE.GetPhysicalMonitorsFromHMONITOR(hMonitor, monitorCount, physMons);

            for (PHYSICAL_MONITOR mon : physMons)
            {
                String desc = new String(mon.szPhysicalMonitorDescription);
                monitors.add(new MonitorJna(mon.hPhysicalMonitor, desc));
            }

            return 1;
        }
    }, new LPARAM(0));
}
项目:poker-bot    文件:WindowHolder.java   
public WindowHolder(HWND parentWindow, RECT rect) {
    super();
    this.parentWindow = parentWindow;
    this.rect = rect;
}
项目:NanoUI    文件:WindowPreview.java   
@Override
public void update(float delta) {
    compWin.update(delta, window);
    if (run) {
        if (thumbnail.getValue() != 0)
            DWMapiExt.INSTANCE.DwmUnregisterThumbnail(new INT_PTR(thumbnail.getValue()));
        DWMapiExt.INSTANCE.DwmRegisterThumbnail(local, hwndWin, thumbnail);

        SIZE size = new SIZE();
        DWMapiExt.INSTANCE.DwmQueryThumbnailSourceSize(new INT_PTR(thumbnail.getValue()), size);
        size.read();
        float aspectX = (float) size.cx / (float) size.cy;
        float aspectY = (float) size.cy / (float) size.cx;

        DWM_THUMBNAIL_PROPERTIES props = new DWM_THUMBNAIL_PROPERTIES();
        props.dwFlags = DWM_TNP.DWM_TNP_VISIBLE | DWM_TNP.DWM_TNP_RECTDESTINATION | DWM_TNP.DWM_TNP_OPACITY;

        props.fVisible = true;
        props.opacity = (byte) 0xFF;

        props.rcDestination = new RECT();
        if (size.cx > size.cy) {
            props.rcDestination.left = 5;
            props.rcDestination.top = 100 - (int) (190 / aspectX / 2);
            props.rcDestination.right = props.rcDestination.left + 190;
            props.rcDestination.bottom = props.rcDestination.top + (int) (190 / aspectX);
        } else {
            props.rcDestination.left = 100 - (int) (190 / aspectY / 2);
            props.rcDestination.top = 5;
            props.rcDestination.right = props.rcDestination.left + (int) (190 / aspectY);
            props.rcDestination.bottom = props.rcDestination.top + 190;
        }

        props.write();
        DWMapiExt.INSTANCE.DwmUpdateThumbnailProperties(new INT_PTR(thumbnail.getValue()), props);
        //DWMapiExt.INSTANCE.InvokeAeroPeek(true, hwndWin, local, 3, new INT_PTR(32), 0x3244);
        //DWMapiExt.INSTANCE.DwmpActivateLivePreview(1, hwndWin, local, 1);
        TaskManager.addTask(() -> window.setVisible(true));
        run = false;
    }
}
项目:JAutoItX    文件:Pixel.java   
/**
 * Searches a rectangle of pixels for the pixel color provided.
 * 
 * @param left
 *            left coordinate of rectangle.
 * @param top
 *            top coordinate of rectangle.
 * @param right
 *            right coordinate of rectangle.
 * @param bottom
 *            bottom coordinate of rectangle.
 * @param color
 *            Colour value of pixel to find (in decimal or hex).
 * @param shadeVariation
 *            A number between 0 and 255 to indicate the allowed number of
 *            shades of variation of the red, green, and blue components of
 *            the colour. Default is 0 (exact match).
 * @param step
 *            Instead of searching each pixel use a value larger than 1 to
 *            skip pixels (for speed). E.g. A value of 2 will only check
 *            every other pixel. Default is 1.
 * @return Return a 2 element array containing the pixel's coordinates if
 *         success, return null if color is not found.
 */
public static int[] search(final int left, final int top, final int right,
        final int bottom, final int color, Integer shadeVariation,
        Integer step) {
    final POINT point = new POINT();

    if ((shadeVariation == null) || (shadeVariation < 0)
            || (shadeVariation > 255)) {
        shadeVariation = 0;
    }
    if ((step == null) || (step <= 0)) {
        step = DEFAULT_STEP;
    }

    RECT rect = new RECT();
    rect.left = left;
    rect.top = top;
    rect.right = right;
    rect.bottom = bottom;
    autoItX.AU3_PixelSearch(rect, color, shadeVariation, step, point);

    return hasError() ? null : new int[] { point.x, point.y };
}
项目:HearthStats.net-Uploader    文件:ProgramHelperWindows.java   
public Rectangle getHSWindowBounds() {
    RECT bounds = new RECT();
    User32Extra.INSTANCE.GetWindowRect(windowHandle, bounds);
    return bounds.toRectangle();
}
项目:twitchplayclient    文件:Pixel.java   
/**
 * Searches a rectangle of pixels for the pixel color provided.
 * 
 * @param left
 *            left coordinate of rectangle.
 * @param top
 *            top coordinate of rectangle.
 * @param right
 *            right coordinate of rectangle.
 * @param bottom
 *            bottom coordinate of rectangle.
 * @param color
 *            Colour value of pixel to find (in decimal or hex).
 * @param shadeVariation
 *            A number between 0 and 255 to indicate the allowed number of
 *            shades of variation of the red, green, and blue components of
 *            the colour. Default is 0 (exact match).
 * @param step
 *            Instead of searching each pixel use a value larger than 1 to
 *            skip pixels (for speed). E.g. A value of 2 will only check
 *            every other pixel. Default is 1.
 * @return Return a 2 element array containing the pixel's coordinates if
 *         success, return null if color is not found.
 */
public static int[] search(final int left, final int top, final int right,
        final int bottom, final int color, Integer shadeVariation,
        Integer step) {
    final POINT point = new POINT();

    if ((shadeVariation == null) || (shadeVariation < 0)
            || (shadeVariation > 255)) {
        shadeVariation = 0;
    }
    if ((step == null) || (step <= 0)) {
        step = DEFAULT_STEP;
    }

    RECT rect = new RECT();
    rect.left = left;
    rect.top = top;
    rect.right = right;
    rect.bottom = bottom;
    autoItX.AU3_PixelSearch(rect, color, shadeVariation, step, point);

    return hasError() ? null : new int[] { point.x, point.y };
}
项目:JAutoItX    文件:Win.java   
/**
 * Retrieves the size of a given window's client area.
 * 
 * If the window is minimized, the returned height is null. However,
 * getClientSize works correctly on (non-minimized) hidden windows. If the
 * window title "Program Manager" is used, the function will return the size
 * of the desktop. getClientSize("") matches the active window. If multiple
 * windows match the criteria, the most recently active window is used.
 * 
 * @param title
 *            The title of the window to read.
 * @param text
 *            The text of the window to read.
 * @return Returns the size of the window's client area if success, returns
 *         null if windows is not found or window is minimized.
 */
public static int[] getClientSize(final String title, final String text) {
    int[] clientSize = null;
    if (!minimized(title, text)) {
        RECT rect = new RECT();
        autoItX.AU3_WinGetClientSize(stringToWString(defaultString(title)),
                stringToWString(text), rect);
        if (!hasError()) {
            clientSize = new int[] { rect.right - rect.left,
                    rect.bottom - rect.top };
        }
    }
    return clientSize;
}
项目:JAutoItX    文件:Win.java   
/**
 * Retrieves the position of a given window.
 * 
 * getPos returns null for minimized windows, but works fine with
 * (non-minimized) hidden windows. If the window title "Program Manager" is
 * used, the function will return [0, 0]. If multiple windows match the
 * criteria, the most recently active window is used.
 * 
 * @param title
 *            The title of the window to read.
 * @param text
 *            The text of the window to read.
 * @return Returns the position of the window if success, return null if
 *         windows is not found or window is minimized.
 */
public static int[] getPos(final String title, final String text) {
    int[] pos = null;
    if (!Win.minimized(title, text)) {
        RECT rect = new RECT();
        autoItX.AU3_WinGetPos(stringToWString(defaultString(title)),
                stringToWString(text), rect);
        if (!hasError()) {
            pos = new int[] { rect.left, rect.top };
        }
    }

    return pos;
}
项目:JAutoItX    文件:Win.java   
/**
 * Retrieves the size of a given window.
 * 
 * getSize returns null for minimized windows, but works fine with
 * (non-minimized) hidden windows. If the window title "Program Manager" is
 * used, the function will return the size of the desktop. If multiple
 * windows match the criteria, the most recently active window is used.
 * 
 * @param title
 *            The title of the window to read.
 * @param text
 *            The text of the window to read.
 * @return Returns the size of the window if success, returns null if
 *         windows is not found or window is minimized.
 */
public static int[] getSize(final String title, final String text) {
    int[] size = null;
    if (!minimized(title, text)) {
        RECT rect = new RECT();
        autoItX.AU3_WinGetPos(stringToWString(defaultString(title)),
                stringToWString(text), rect);
        if (!hasError()) {
            size = new int[] { rect.right - rect.left,
                    rect.bottom - rect.top };
        }
    }
    return size;
}
项目:JAutoItX    文件:Pixel.java   
/**
 * Generates a checksum for a region of pixels.
 * 
 * Performing a checksum of a region is very time consuming, so use the
 * smallest region you are able to reduce CPU load. On some machines a
 * checksum of the whole screen could take many seconds!
 * 
 * A checksum only allows you to see if "something" has changed in a region
 * - it does not tell you exactly what has changed.
 * 
 * When using a step value greater than 1 you must bear in mind that the
 * checksumming becomes less reliable for small changes as not every pixel
 * is checked.
 * 
 * @param left
 *            left coordinate of rectangle.
 * @param top
 *            top coordinate of rectangle.
 * @param right
 *            right coordinate of rectangle.
 * @param bottom
 *            bottom coordinate of rectangle.
 * @param step
 *            Instead of checksumming each pixel use a value larger than 1
 *            to skip pixels (for speed). E.g. A value of 2 will only check
 *            every other pixel. Default is 1.
 * @return Returns the checksum value of the region.
 */
public static int checksum(final int left, final int top, final int right,
        final int bottom, Integer step) {
    if ((step == null) || (step <= 0)) {
        step = DEFAULT_STEP;
    }
    RECT rect = new RECT();
    rect.left = left;
    rect.top = top;
    rect.right = right;
    rect.bottom = bottom;
    return autoItX.AU3_PixelChecksum(rect, step);
}
项目:JAutoItX    文件:Control.java   
/**
 * Retrieves the position of a control relative to it's window.
 * 
 * When using a control name in the Control functions, you need to add a
 * number to the end of the name to indicate which control. For example, if
 * there two controls listed called "MDIClient", you would refer to these as
 * "MDIClient1" and "MDIClient2".
 * 
 * @param title
 *            The title of the window to access.
 * @param text
 *            The text of the window to access.
 * @param control
 *            The control to interact with.
 * @return Returns the position of the control if success, returns null if
 *         failed.
 */
public static int[] getPos(final String title, final String text,
        final String control) {
    RECT rect = new RECT();
    autoItX.AU3_ControlGetPos(stringToWString(defaultString(title)),
            stringToWString(text), stringToWString(defaultString(control)),
            rect);

    return hasError() ? null : new int[] { rect.left, rect.top };
}
项目:JAutoItX    文件:Control.java   
/**
 * Retrieves the size of a control.
 * 
 * When using a control name in the Control functions, you need to add a
 * number to the end of the name to indicate which control. For example, if
 * there two controls listed called "MDIClient", you would refer to these as
 * "MDIClient1" and "MDIClient2".
 * 
 * @param title
 *            The title of the window to access.
 * @param text
 *            The text of the window to access.
 * @param control
 *            The control to interact with.
 * @return Returns the size of the control if success, returns null if
 *         failed.
 */
public static int[] getSize(final String title, final String text,
        final String control) {
    RECT rect = new RECT();
    autoItX.AU3_ControlGetPos(stringToWString(defaultString(title)),
            stringToWString(text), stringToWString(defaultString(control)),
            rect);

    return hasError() ? null : new int[] { rect.right - rect.left,
            rect.bottom - rect.top };
}
项目:twitchplayclient    文件:Win.java   
/**
 * Retrieves the size of a given window's client area.
 * 
 * If the window is minimized, the returned height is null. However,
 * getClientSize works correctly on (non-minimized) hidden windows. If the
 * window title "Program Manager" is used, the function will return the size
 * of the desktop. getClientSize("") matches the active window. If multiple
 * windows match the criteria, the most recently active window is used.
 * 
 * @param title
 *            The title of the window to read.
 * @param text
 *            The text of the window to read.
 * @return Returns the size of the window's client area if success, returns
 *         null if windows is not found or window is minimized.
 */
public static int[] getClientSize(final String title, final String text) {
    int[] clientSize = null;
    if (!minimized(title, text)) {
        RECT rect = new RECT();
        autoItX.AU3_WinGetClientSize(stringToWString(defaultString(title)),
                stringToWString(text), rect);
        if (!hasError()) {
            clientSize = new int[] { rect.right - rect.left,
                    rect.bottom - rect.top };
        }
    }
    return clientSize;
}
项目:twitchplayclient    文件:Win.java   
/**
 * Retrieves the position of a given window.
 * 
 * getPos returns null for minimized windows, but works fine with
 * (non-minimized) hidden windows. If the window title "Program Manager" is
 * used, the function will return [0, 0]. If multiple windows match the
 * criteria, the most recently active window is used.
 * 
 * @param title
 *            The title of the window to read.
 * @param text
 *            The text of the window to read.
 * @return Returns the position of the window if success, return null if
 *         windows is not found or window is minimized.
 */
public static int[] getPos(final String title, final String text) {
    int[] pos = null;
    if (!Win.minimized(title, text)) {
        RECT rect = new RECT();
        autoItX.AU3_WinGetPos(stringToWString(defaultString(title)),
                stringToWString(text), rect);
        if (!hasError()) {
            pos = new int[] { rect.left, rect.top };
        }
    }

    return pos;
}
项目:twitchplayclient    文件:Win.java   
/**
 * Retrieves the size of a given window.
 * 
 * getSize returns null for minimized windows, but works fine with
 * (non-minimized) hidden windows. If the window title "Program Manager" is
 * used, the function will return the size of the desktop. If multiple
 * windows match the criteria, the most recently active window is used.
 * 
 * @param title
 *            The title of the window to read.
 * @param text
 *            The text of the window to read.
 * @return Returns the size of the window if success, returns null if
 *         windows is not found or window is minimized.
 */
public static int[] getSize(final String title, final String text) {
    int[] size = null;
    if (!minimized(title, text)) {
        RECT rect = new RECT();
        autoItX.AU3_WinGetPos(stringToWString(defaultString(title)),
                stringToWString(text), rect);
        if (!hasError()) {
            size = new int[] { rect.right - rect.left,
                    rect.bottom - rect.top };
        }
    }
    return size;
}
项目:twitchplayclient    文件:Pixel.java   
/**
 * Generates a checksum for a region of pixels.
 * 
 * Performing a checksum of a region is very time consuming, so use the
 * smallest region you are able to reduce CPU load. On some machines a
 * checksum of the whole screen could take many seconds!
 * 
 * A checksum only allows you to see if "something" has changed in a region
 * - it does not tell you exactly what has changed.
 * 
 * When using a step value greater than 1 you must bear in mind that the
 * checksumming becomes less reliable for small changes as not every pixel
 * is checked.
 * 
 * @param left
 *            left coordinate of rectangle.
 * @param top
 *            top coordinate of rectangle.
 * @param right
 *            right coordinate of rectangle.
 * @param bottom
 *            bottom coordinate of rectangle.
 * @param step
 *            Instead of checksumming each pixel use a value larger than 1
 *            to skip pixels (for speed). E.g. A value of 2 will only check
 *            every other pixel. Default is 1.
 * @return Returns the checksum value of the region.
 */
public static int checksum(final int left, final int top, final int right,
        final int bottom, Integer step) {
    if ((step == null) || (step <= 0)) {
        step = DEFAULT_STEP;
    }
    RECT rect = new RECT();
    rect.left = left;
    rect.top = top;
    rect.right = right;
    rect.bottom = bottom;
    return autoItX.AU3_PixelChecksum(rect, step);
}
项目:twitchplayclient    文件:Control.java   
/**
 * Retrieves the position of a control relative to it's window.
 * 
 * When using a control name in the Control functions, you need to add a
 * number to the end of the name to indicate which control. For example, if
 * there two controls listed called "MDIClient", you would refer to these as
 * "MDIClient1" and "MDIClient2".
 * 
 * @param title
 *            The title of the window to access.
 * @param text
 *            The text of the window to access.
 * @param control
 *            The control to interact with.
 * @return Returns the position of the control if success, returns null if
 *         failed.
 */
public static int[] getPos(final String title, final String text,
        final String control) {
    RECT rect = new RECT();
    autoItX.AU3_ControlGetPos(stringToWString(defaultString(title)),
            stringToWString(text), stringToWString(defaultString(control)),
            rect);

    return hasError() ? null : new int[] { rect.left, rect.top };
}
项目:twitchplayclient    文件:Control.java   
/**
 * Retrieves the size of a control.
 * 
 * When using a control name in the Control functions, you need to add a
 * number to the end of the name to indicate which control. For example, if
 * there two controls listed called "MDIClient", you would refer to these as
 * "MDIClient1" and "MDIClient2".
 * 
 * @param title
 *            The title of the window to access.
 * @param text
 *            The text of the window to access.
 * @param control
 *            The control to interact with.
 * @return Returns the size of the control if success, returns null if
 *         failed.
 */
public static int[] getSize(final String title, final String text,
        final String control) {
    RECT rect = new RECT();
    autoItX.AU3_ControlGetPos(stringToWString(defaultString(title)),
            stringToWString(text), stringToWString(defaultString(control)),
            rect);

    return hasError() ? null : new int[] { rect.right - rect.left,
            rect.bottom - rect.top };
}
项目:peeknick    文件:Paint.java   
private static BufferedImage capture(HWND hWnd) throws WindowNotFoundException {

    HDC hdcWindow = User32.INSTANCE.GetDC(hWnd);
    HDC hdcMemDC = GDI32.INSTANCE.CreateCompatibleDC(hdcWindow);

    RECT bounds = new RECT();
    User32Extra.INSTANCE.GetClientRect(hWnd, bounds);

    int width = bounds.right - bounds.left;
    int height = bounds.bottom - bounds.top;

    if(width == 0 || height == 0) throw new peeknick.errormanager.WindowNotFoundException();

    HBITMAP hBitmap = GDI32.INSTANCE.CreateCompatibleBitmap(hdcWindow, width, height);

    HANDLE hOld = GDI32.INSTANCE.SelectObject(hdcMemDC, hBitmap);
    GDI32Extra.INSTANCE.BitBlt(hdcMemDC, 0, 0, width, height, hdcWindow, 0, 0, WinGDIExtra.SRCCOPY);

    GDI32.INSTANCE.SelectObject(hdcMemDC, hOld);
    GDI32.INSTANCE.DeleteDC(hdcMemDC);

    BITMAPINFO bmi = new BITMAPINFO();
    bmi.bmiHeader.biWidth = width;
    bmi.bmiHeader.biHeight = -height;
    bmi.bmiHeader.biPlanes = 1;
    bmi.bmiHeader.biBitCount = 32;
    bmi.bmiHeader.biCompression = WinGDI.BI_RGB;

    Memory buffer = new Memory(width * height * 4);
    GDI32.INSTANCE.GetDIBits(hdcWindow, hBitmap, 0, height, buffer, bmi, WinGDI.DIB_RGB_COLORS);

    BufferedImage image = new BufferedImage(width, height, BufferedImage.TYPE_INT_RGB);
    image.setRGB(0, 0, width, height, buffer.getIntArray(0, width * height), 0, width);

    GDI32.INSTANCE.DeleteObject(hBitmap);
    User32.INSTANCE.ReleaseDC(hWnd, hdcWindow);

    return image;

  }
项目:JAutoItX    文件:AutoItX.java   
/**
 * Retrieves the position and size of a control relative to it's window.
 * 
 * When using a control name in the Control functions, you need to add a
 * number to the end of the name to indicate which control. For example,
 * if there two controls listed called "MDIClient", you would refer to
 * these as "MDIClient1" and "MDIClient2".
 * 
 * @param title
 *            The title of the window to access.
 * @param text
 *            The text of the window to access.
 * @param control
 *            The control to interact with.
 * @param rect
 */
public void AU3_ControlGetPos(final WString title, final WString text,
        final WString control, final RECT rect);
项目:JAutoItX    文件:AutoItX.java   
/**
 * Generates a checksum for a region of pixels.
 * 
 * Performing a checksum of a region is very time consuming, so use the
 * smallest region you are able to reduce CPU load. On some machines a
 * checksum of the whole screen could take many seconds!
 * 
 * A checksum only allows you to see if "something" has changed in a
 * region - it does not tell you exactly what has changed.
 * 
 * When using a step value greater than 1 you must bear in mind that the
 * checksumming becomes less reliable for small changes as not every
 * pixel is checked.
 * 
 * @param rect
 *            position and size of rectangle
 * @param step
 *            Instead of checksumming each pixel use a value larger than
 *            1 to skip pixels (for speed). E.g. A value of 2 will only
 *            check every other pixel. Default is 1.
 * @return Returns the checksum value of the region.
 */
public int AU3_PixelChecksum(final RECT rect, final Integer step);
项目:JAutoItX    文件:AutoItX.java   
/**
 * Searches a rectangle of pixels for the pixel color provided.
 * 
 * @param rect
 *            position and size of rectangle.
 * @param color
 *            Colour value of pixel to find (in decimal or hex).
 * @param shadeVariation
 *            A number between 0 and 255 to indicate the allowed number
 *            of shades of variation of the red, green, and blue
 *            components of the colour. Default is 0 (exact match).
 * @param step
 *            Instead of searching each pixel use a value larger than 1
 *            to skip pixels (for speed). E.g. A value of 2 will only
 *            check every other pixel. Default is 1.
 * @param point
 *            Return the pixel's coordinates if success, sets
 *            oAutoIt.error to 1 if color is not found.
 */
public void AU3_PixelSearch(RECT rect, int color,
        Integer shadeVariation, Integer step, POINT point);
项目:JAutoItX    文件:AutoItX.java   
/**
 * Retrieves the size of a given window's client area.
 * 
 * If the window is minimized, the returned width and height values are
 * both zero. However, WinGetClientSize works correctly on
 * (non-minimized) hidden windows. If the window title "Program Manager"
 * is used, the function will return the size of the desktop.
 * WinGetClientSize("") matches the active window. If multiple windows
 * match the criteria, the most recently active window is used.
 * 
 * @param title
 *            The title of the window to read.
 * @param text
 *            The text of the window to read.
 * @param rect
 */
public void AU3_WinGetClientSize(final WString title,
        final WString text, RECT rect);
项目:JAutoItX    文件:AutoItX.java   
/**
 * Retrieves the position and size of a given window.
 * 
 * WinGetPos returns negative numbers such as -32000 for minimized
 * windows, but works fine with (non-minimized) hidden windows. If the
 * window title "Program Manager" is used, the function will return the
 * size of the desktop. If multiple windows match the criteria, the most
 * recently active window is used.
 * 
 * @param title
 *            The title of the window to read.
 * @param text
 *            The text of the window to read.
 * @param rect
 */
public void AU3_WinGetPos(final WString title, final WString text,
        RECT rect);
项目:twitchplayclient    文件:AutoItX.java   
/**
 * Retrieves the position and size of a control relative to it's window.
 * 
 * When using a control name in the Control functions, you need to add a
 * number to the end of the name to indicate which control. For example,
 * if there two controls listed called "MDIClient", you would refer to
 * these as "MDIClient1" and "MDIClient2".
 * 
 * @param title
 *            The title of the window to access.
 * @param text
 *            The text of the window to access.
 * @param control
 *            The control to interact with.
 * @param rect
 */
public void AU3_ControlGetPos(final WString title, final WString text,
        final WString control, final RECT rect);
项目:twitchplayclient    文件:AutoItX.java   
/**
 * Generates a checksum for a region of pixels.
 * 
 * Performing a checksum of a region is very time consuming, so use the
 * smallest region you are able to reduce CPU load. On some machines a
 * checksum of the whole screen could take many seconds!
 * 
 * A checksum only allows you to see if "something" has changed in a
 * region - it does not tell you exactly what has changed.
 * 
 * When using a step value greater than 1 you must bear in mind that the
 * checksumming becomes less reliable for small changes as not every
 * pixel is checked.
 * 
 * @param rect
 *            position and size of rectangle
 * @param step
 *            Instead of checksumming each pixel use a value larger than
 *            1 to skip pixels (for speed). E.g. A value of 2 will only
 *            check every other pixel. Default is 1.
 * @return Returns the checksum value of the region.
 */
public int AU3_PixelChecksum(final RECT rect, final Integer step);
项目:twitchplayclient    文件:AutoItX.java   
/**
 * Searches a rectangle of pixels for the pixel color provided.
 * 
 * @param rect
 *            position and size of rectangle.
 * @param color
 *            Colour value of pixel to find (in decimal or hex).
 * @param shadeVariation
 *            A number between 0 and 255 to indicate the allowed number
 *            of shades of variation of the red, green, and blue
 *            components of the colour. Default is 0 (exact match).
 * @param step
 *            Instead of searching each pixel use a value larger than 1
 *            to skip pixels (for speed). E.g. A value of 2 will only
 *            check every other pixel. Default is 1.
 * @param point
 *            Return the pixel's coordinates if success, sets
 *            oAutoIt.error to 1 if color is not found.
 */
public void AU3_PixelSearch(RECT rect, int color,
        Integer shadeVariation, Integer step, POINT point);
项目:twitchplayclient    文件:AutoItX.java   
/**
 * Retrieves the size of a given window's client area.
 * 
 * If the window is minimized, the returned width and height values are
 * both zero. However, WinGetClientSize works correctly on
 * (non-minimized) hidden windows. If the window title "Program Manager"
 * is used, the function will return the size of the desktop.
 * WinGetClientSize("") matches the active window. If multiple windows
 * match the criteria, the most recently active window is used.
 * 
 * @param title
 *            The title of the window to read.
 * @param text
 *            The text of the window to read.
 * @param rect
 */
public void AU3_WinGetClientSize(final WString title,
        final WString text, RECT rect);
项目:twitchplayclient    文件:AutoItX.java   
/**
 * Retrieves the position and size of a given window.
 * 
 * WinGetPos returns negative numbers such as -32000 for minimized
 * windows, but works fine with (non-minimized) hidden windows. If the
 * window title "Program Manager" is used, the function will return the
 * size of the desktop. If multiple windows match the criteria, the most
 * recently active window is used.
 * 
 * @param title
 *            The title of the window to read.
 * @param text
 *            The text of the window to read.
 * @param rect
 */
public void AU3_WinGetPos(final WString title, final WString text,
        RECT rect);
项目:Spark-Reader    文件:User32.java   
boolean GetWindowRect(Pointer hWnd, WinDef.RECT rect);
项目:AppWoksUtils    文件:User32Extra.java   
public boolean GetClientRect(HWND hWnd, RECT rect);
项目:HearthStats.net-Uploader    文件:User32.java   
boolean GetWindowRect(Pointer hWnd, RECT rect);
项目:peeknick    文件:User32Extra.java   
public boolean GetClientRect(HWND hWnd, RECT rect);