Package com.sun.jna.platform.win32

Examples of com.sun.jna.platform.win32.User32


                pbits.write(0, bits, 0, bits.length);
               
                SIZE size = new SIZE();
                size.cx = w;
                size.cy = h;
                POINT loc = new POINT();
                loc.x = alphaWindow.getX();
                loc.y = alphaWindow.getY();
                POINT srcLoc = new POINT();
                BLENDFUNCTION blend = new BLENDFUNCTION();
                blend.SourceConstantAlpha = (byte)(alpha * 255);
                blend.AlphaFormat = User32.AC_SRC_ALPHA;
                user.UpdateLayeredWindow(hWnd, screenDC, loc, size, memDC, srcLoc,
                                         0, blend, User32.ULW_ALPHA);
View Full Code Here


                            int blue = (pixel[0] & 0xFF) << 16;
                            bits[col + row * w] = alpha | red | green | blue;
                        }
                    }
                    pbits.write(0, bits, 0, bits.length);
                    SIZE size = new SIZE();
                    size.cx = w;
                    size.cy = h;
                    POINT srcLoc = new POINT();
                    BLENDFUNCTION blend = new BLENDFUNCTION();
                    POINT loc = new POINT();
View Full Code Here

                        bits[x + y * w] = alpha|red|green|blue;
                    }
                }
                pbits.write(0, bits, 0, bits.length);
               
                SIZE size = new SIZE();
                size.cx = w;
                size.cy = h;
                POINT loc = new POINT();
                loc.x = alphaWindow.getX();
                loc.y = alphaWindow.getY();
View Full Code Here

                            bits[col] = alpha | red | green | blue;
                        }
                        int v = wh - (origin.y + row) - 1;
                        pbits.write((v*ww+origin.x)*4, bits, 0, bits.length);
                    }
                    SIZE winSize = new SIZE();
                    winSize.cx = win.getWidth();
                    winSize.cy = win.getHeight();
                    POINT winLoc = new POINT();
                    winLoc.x = win.getX();
                    winLoc.y = win.getY();
View Full Code Here

                        bits[x + y * w] = alpha|red|green|blue;
                    }
                }
                pbits.write(0, bits, 0, bits.length);
               
                SIZE size = new SIZE();
                size.cx = w;
                size.cy = h;
                POINT loc = new POINT();
                loc.x = alphaWindow.getX();
                loc.y = alphaWindow.getY();
View Full Code Here

  public static void main(String[] args) {
    junit.textui.TestRunner.run(Ole32Test.class);
  }

  public void testCoCreateGUID() {
    GUID pguid = new GUID();
    assertEquals(W32Errors.S_OK, Ole32.INSTANCE.CoCreateGuid(pguid));
    assertTrue(pguid.Data1 != 0 || pguid.Data2 != 0 || pguid.Data3 != 0
        && pguid.Data4 != null);
  }
View Full Code Here

  }

  public void testCoCreateInstance() {
    HRESULT hrCI = Ole32.INSTANCE.CoInitializeEx(null, 0);

    GUID guid = Ole32Util
        .getGUIDFromString("{00021401-0000-0000-C000-000000000046}"); // Shell object
    GUID riid = Ole32Util
        .getGUIDFromString("{000214EE-0000-0000-C000-000000000046}"); // IShellLinkA

    PointerByReference pDispatch = new PointerByReference();

    HRESULT hr = Ole32.INSTANCE.CoCreateInstance(guid, null, // pOuter =
View Full Code Here

      }
        assertTrue(Kernel32.INSTANCE.CloseHandle(phToken.getValue()));
    }
   
    public void testImpersonateLoggedOnUser() {
      USER_INFO_1 userInfo = new USER_INFO_1();
      userInfo.usri1_name = new WString("JNAAdvapi32TestImp");
      userInfo.usri1_password = new WString("!JNAP$$Wrd0");
      userInfo.usri1_priv = LMAccess.USER_PRIV_USER;
        // ignore test if not able to add user (need to be administrator to do this).
      if (LMErr.NERR_Success != Netapi32.INSTANCE.NetUserAdd(null, 1, userInfo, null)) {
View Full Code Here

        assertFalse(Native.toString(pszPath).isEmpty());
    }

   
    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

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

    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

TOP

Related Classes of com.sun.jna.platform.win32.User32

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.