Package com.sun.jna.examples.win32.WinDef

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


        final int msg = User32Util.registerWindowMessage("RM_UNITTEST");
        assertTrue(msg >= 0xC000 && msg <= 0xFFFF);
    }

    public final void testCreateWindow() {
        final HWND hWnd = User32Util.createWindow("Message", null, 0, 0, 0, 0, 0, null, null, null, null);
        try {
            assertTrue(Pointer.nativeValue(hWnd.getPointer()) > 0);
        } finally {
            User32Util.destroyWindow(hWnd);
        }
    }
View Full Code Here


            User32Util.destroyWindow(hWnd);
        }
    }

    public final void testCreateWindowEx() {
        final HWND hWnd = User32Util.createWindowEx(0, "Message", null, 0, 0, 0, 0, 0, null, null, null, null);
        try {
            assertTrue(Pointer.nativeValue(hWnd.getPointer()) > 0);
        } finally {
            User32Util.destroyWindow(hWnd);
        }
    }
View Full Code Here

  }

  public Wtsapi32Test() {
    Frame frame = new Frame();
    frame.setVisible(true);
    this.hwnd = new HWND(Native.getWindowPointer(frame));
  }
View Full Code Here

     * Count GPUs
     * @return the number of available GPUs
     */
    public static int countGpusNV() {
        // 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

    @Test
    public final void testMonitorFromWindow() {
        int dwFlags = WinUser.MONITOR_DEFAULTTOPRIMARY;

        HWND hwnd = new HWND();
        assertNotNull(User32.INSTANCE.MonitorFromWindow(hwnd, dwFlags));
    }
View Full Code Here

        junit.textui.TestRunner.run(OpenGL32Test.class);
    }

    public void testGetStringGLVersion() {
        // 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_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

TOP

Related Classes of com.sun.jna.examples.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.