Examples of HWND


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

  }

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

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

     * 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

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

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

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

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

        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

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

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

        //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

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

        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

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

        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

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

          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

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

    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
TOP
Copyright © 2018 www.massapi.com. 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.