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

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


        assertNotNull("Could not get GL_VERSION", glString);
    }

    public void testGetStringGLRenderer() {
        // create a dummy window
        HWND hWnd = User32Util.createWindow("Message", null, 0, 0, 0, 0, 0, null, null, null, null);
        HDC hdc = User32.INSTANCE.GetDC(hWnd);

        // set a compatible pixel format
        PIXELFORMATDESCRIPTOR.ByReference pfd = new PIXELFORMATDESCRIPTOR.ByReference();
        pfd.nVersion = 1;
View Full Code Here


        //assertNotNull("Could not get GL_RENDERER", glString);
    }

    public void testGetStringGLVendor() {
        // create a dummy window
        HWND hWnd = User32Util.createWindow("Message", null, 0, 0, 0, 0, 0, null, null, null, null);
        HDC hdc = User32.INSTANCE.GetDC(hWnd);

        // set a compatible pixel format
        PIXELFORMATDESCRIPTOR.ByReference pfd = new PIXELFORMATDESCRIPTOR.ByReference();
        pfd.nVersion = 1;
View Full Code Here

        assertNotNull("Could not get GL_VENDOR", glString);
    }

    public void testGetStringGLExtensions() {
        // create a dummy window
        HWND hWnd = User32Util.createWindow("Message", null, 0, 0, 0, 0, 0, null, null, null, null);
        HDC hdc = User32.INSTANCE.GetDC(hWnd);

        // set a compatible pixel format
        PIXELFORMATDESCRIPTOR.ByReference pfd = new PIXELFORMATDESCRIPTOR.ByReference();
        pfd.nVersion = 1;
View Full Code Here

        assertNotNull("Could not get GL_EXTENSIONS", glString);
    }

    public void testGetCurrentContext() {
        // create a dummy window
        HWND hWnd = User32Util.createWindow("Message", null, 0, 0, 0, 0, 0, null, null, null, null);
        HDC hdc = User32.INSTANCE.GetDC(hWnd);

        // set a compatible pixel format
        PIXELFORMATDESCRIPTOR.ByReference pfd = new PIXELFORMATDESCRIPTOR.ByReference();
        pfd.nVersion = 1;
View Full Code Here

          if (values.size() > 1) {
                final User32Extra user32Extra = User32Extra.INSTANCE;
                final String title = values.get(0);
                final String browserName = values.get(1);
                threadLocal.set(null); // reset
                HWND w = user32Extra.GetForegroundWindow();
                if (w != null) {
                  byte[] titleBuff = new byte[1024];
                  User32Extra u32extra = User32Extra.INSTANCE;
                    u32extra.GetWindowTextA(w, titleBuff, titleBuff.length);
                    String winTitle = Native.toString(titleBuff);
View Full Code Here

    state = State.IN_PROGRESS;
    startGame();
  }
 
  private void startGame() {
        HWND hwnd = User32.INSTANCE.FindWindow(null, "Minesweeper");
        if(hwnd == null) {
          try {
        new ProcessBuilder(PROGRAM_PATH).start();
            sleep(2222);
            hwnd = User32.INSTANCE.FindWindow(null, "Minesweeper");
View Full Code Here

  }
 
  private void config() {
        robot.keyPress(KeyEvent.VK_F5);
        takeNap();
        HWND options = User32.INSTANCE.FindWindow(null, "Options");
        int[] r = {0,0,0,0};
        User32.INSTANCE.GetWindowRect(options, r);
        mouseClick(r[0]+200,r[1]+75);
        robot.keyPress(KeyEvent.VK_TAB);
        type(rows);
View Full Code Here

        return Holder.INSTANCE;
    }

    private static class W32WindowUtils extends NativeWindowUtils {
        private HWND getHWnd(Component w) {
            HWND hwnd = new HWND();
            hwnd.setPointer(Native.getComponentPointer(w));
            return hwnd;
        }
View Full Code Here

            if (!isWindowAlphaSupported()) {
                throw new UnsupportedOperationException("Set sun.java2d.noddraw=true to enable transparent windows");
            }
            whenDisplayable(w, new Runnable() {
                public void run() {
                    HWND hWnd = getHWnd(w);
                    User32 user = User32.INSTANCE;
                    int flags = user.GetWindowLong(hWnd, WinUser.GWL_EXSTYLE);
                    byte level = (byte)((int)(255 * alpha) & 0xFF);
                    if (usingUpdateLayeredWindow(w)) {
                        // If already using UpdateLayeredWindow, continue to
View Full Code Here

            if (transparent == isTransparent)
                return;
            whenDisplayable(w, new Runnable() {
                public void run() {
                    User32 user = User32.INSTANCE;
                    HWND hWnd = getHWnd(w);
                    int flags = user.GetWindowLong(hWnd, WinUser.GWL_EXSTYLE);
                    JRootPane root = ((RootPaneContainer)w).getRootPane();
                    JLayeredPane lp = root.getLayeredPane();
                    Container content = root.getContentPane();
                    if (content instanceof W32TransparentContentPane) {
View Full Code Here

TOP

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

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.