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

项目:nanobot    文件:BlueStacksWinPlatform.java   
private Point clientToScreen(final Point clientPoint) {
    final POINT point = new POINT(clientPoint.x(), clientPoint.y());
    User32.INSTANCE.ClientToScreen(handler, point);
    return new Point(point.x, point.y);
}
项目:TheConsole_POC    文件:Window.java   
public void getPosition(POINT outPosition) {
    User32Ext.INSTANCE.GetWindowRect(_hwnd, tmpRect);
    outPosition.x = tmpRect.left;
    outPosition.y = tmpRect.top;
}
项目:TheConsole_POC    文件:Window.java   
public void getSize(POINT outSize) {
    User32Ext.INSTANCE.GetWindowRect(_hwnd, tmpRect);
    outSize.x = tmpRect.right - tmpRect.left;
    outSize.y = tmpRect.bottom - tmpRect.top;
}
项目: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 };
}
项目: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    文件:Mouse.java   
/**
 * Retrieves the current position of the mouse cursor.
 * 
 * See MouseCoordMode for relative/absolute position settings. If relative
 * positioning, numbers may be negative.
 * 
 * @return Returns the current position of the mouse cursor.
 */
public static int[] getPos() {
    POINT point = new POINT();
    autoItX.AU3_MouseGetPos(point);
    return new int[] { point.x, point.y };
}
项目:JAutoItX    文件:AutoItX.java   
/**
 * Retrieves the current X position of the mouse cursor.
 * 
 * See MouseCoordMode for relative/absolute position settings. If
 * relative positioning, numbers may be negative.
 * 
 * @param point
 */
public void AU3_MouseGetPos(POINT point);
项目: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   
/**
 * Returns the coordinates of the caret in the foreground window.
 * 
 * WinGetCaretPos might not return accurate values for Multiple Document
 * Interface (MDI) applications if absolute CaretCoordMode is used. See
 * example for a workaround. Note: Some applications report static
 * coordinates regardless of caret position!
 * 
 * @param lpPoint
 */
public void AU3_WinGetCaretPos(POINT lpPoint);
项目:JAutoItX    文件:Win.java   
/**
 * Returns the coordinates of the caret in the foreground window.
 * 
 * WinGetCaretPos might not return accurate values for Multiple Document
 * Interface (MDI) applications if absolute CaretCoordMode is used. See
 * example for a workaround. Note: Some applications report static
 * coordinates regardless of caret position!
 * 
 * @return Returns the coordinate of the caret if success, return null if
 *         failed.
 */
public static int[] getCaretPos() {
    POINT point = new POINT();
    autoItX.AU3_WinGetCaretPos(point);
    return hasError() ? null : new int[] { point.x, point.y };
}
项目:twitchplayclient    文件:Mouse.java   
/**
 * Retrieves the current position of the mouse cursor.
 * 
 * See MouseCoordMode for relative/absolute position settings. If relative
 * positioning, numbers may be negative.
 * 
 * @return Returns the current position of the mouse cursor.
 */
public static int[] getPos() {
    POINT point = new POINT();
    autoItX.AU3_MouseGetPos(point);
    return new int[] { point.x, point.y };
}
项目:twitchplayclient    文件:AutoItX.java   
/**
 * Retrieves the current X position of the mouse cursor.
 * 
 * See MouseCoordMode for relative/absolute position settings. If
 * relative positioning, numbers may be negative.
 * 
 * @param point
 */
public void AU3_MouseGetPos(POINT point);
项目: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   
/**
 * Returns the coordinates of the caret in the foreground window.
 * 
 * WinGetCaretPos might not return accurate values for Multiple Document
 * Interface (MDI) applications if absolute CaretCoordMode is used. See
 * example for a workaround. Note: Some applications report static
 * coordinates regardless of caret position!
 * 
 * @param lpPoint
 */
public void AU3_WinGetCaretPos(POINT lpPoint);
项目:twitchplayclient    文件:Win.java   
/**
 * Returns the coordinates of the caret in the foreground window.
 * 
 * WinGetCaretPos might not return accurate values for Multiple Document
 * Interface (MDI) applications if absolute CaretCoordMode is used. See
 * example for a workaround. Note: Some applications report static
 * coordinates regardless of caret position!
 * 
 * @return Returns the coordinate of the caret if success, return null if
 *         failed.
 */
public static int[] getCaretPos() {
    POINT point = new POINT();
    autoItX.AU3_WinGetCaretPos(point);
    return hasError() ? null : new int[] { point.x, point.y };
}