Package com.sun.jna.platform.win32.WinDef

Examples of com.sun.jna.platform.win32.WinDef.RECT


    }

    @Test
    public final void testMonitorFromRect() {
        int dwFlags = WinUser.MONITOR_DEFAULTTOPRIMARY;
        RECT lprc = new RECT();
        assertNotNull(User32.INSTANCE.MonitorFromRect(lprc, dwFlags));
    }
View Full Code Here


        }, new LPARAM(0)).booleanValue());
    }
   
    @Test
    public final void testAdjustWindowRect() {
      RECT lpRect = new RECT();
      lpRect.left = 100;
      lpRect.top = 200;
      lpRect.bottom = 300;
      lpRect.right = 500;
     
View Full Code Here

                          if (winTitle.indexOf(title) >= 0 && winTitle.toLowerCase().indexOf(
                              (browserName.toLowerCase().indexOf("ie") >=0 ? "internet explorer" : browserName)) >= 0) {
                           
                            // ignore IE's empty window instance
                            if (browserName.toLowerCase().indexOf("ie") >= 0) {
                                  RECT bounds = new RECT();
                                  org.zkoss.ztl.jna.User32Extra.INSTANCE.GetClientRect(hWnd, bounds);
 
                                  int width = bounds.right - bounds.left;
                                  int height = bounds.bottom - bounds.top;
                                  if (width == 0 || height == 0) {
View Full Code Here

    public static BufferedImage capture(HWND hWnd) {

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

        RECT bounds = new RECT();
        org.zkoss.ztl.jna.User32Extra.INSTANCE.GetClientRect(hWnd, bounds);

        int width = bounds.right - bounds.left;
        int height = bounds.bottom - bounds.top;
View Full Code Here

    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;
View Full Code Here

    return (rect.width >= width && rect.height >= height);
  }


    public Rectangle getHSWindowBounds() {
        RECT bounds = new RECT();
        User32Extra.INSTANCE.GetWindowRect(windowHandle, bounds);
        return bounds.toRectangle();
    }
View Full Code Here

  private BufferedImage _getScreenCaptureWindows(HWND hWnd) {

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

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

    // check to make sure the window's not minimized
    if (bounds.toRectangle().width >= 1024) {
      if (isMinimised) {
        _notifyObserversOfChangeTo("Hearthstone window restored");
        isMinimised = false;
      }

      if (_isFullScreen(bounds.toRectangle())) {
        if (!isFullscreen) {
          _notifyObserversOfChangeTo("Hearthstone running in fullscreen");
          isFullscreen = true;
        }
        return null;
View Full Code Here

    private void newAppBar() {
        APPBARDATA data = new APPBARDATA.ByReference();
        data.cbSize.setValue(data.size());
        data.uCallbackMessage.setValue(WM_USER + 1);

        UINT_PTR result = Shell32.INSTANCE.SHAppBarMessage(new DWORD(ShellAPI.ABM_NEW), data);
        assertNotNull(result);
    }
View Full Code Here

    }

    private void removeAppBar() {
        APPBARDATA data = new APPBARDATA.ByReference();
        data.cbSize.setValue(data.size());
        UINT_PTR result = Shell32.INSTANCE.SHAppBarMessage(new DWORD(ShellAPI.ABM_REMOVE), data);
        assertNotNull(result);

    }
View Full Code Here

        assertNotNull(result);

    }

    private void queryPos(APPBARDATA data) {
        UINT_PTR h = Shell32.INSTANCE.SHAppBarMessage(new DWORD(ShellAPI.ABM_QUERYPOS), data);

        assertNotNull(h);
        assertTrue(h.intValue() > 0);

    }
View Full Code Here

TOP

Related Classes of com.sun.jna.platform.win32.WinDef.RECT

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.