use of com.sun.jna.platform.win32.WinDef.UINT_PTR in project jna by java-native-access.
the class Shell32Test method queryPos.
private void queryPos(APPBARDATA data) {
UINT_PTR h = Shell32.INSTANCE.SHAppBarMessage(new DWORD(ShellAPI.ABM_QUERYPOS), data);
assertNotNull(h);
assertTrue(h.intValue() > 0);
}
use of com.sun.jna.platform.win32.WinDef.UINT_PTR in project jna by java-native-access.
the class Shell32Test method removeAppBar.
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);
}
use of com.sun.jna.platform.win32.WinDef.UINT_PTR in project jna by java-native-access.
the class Shell32Test method testResizeDesktopFromBottom.
public void testResizeDesktopFromBottom() throws InterruptedException {
newAppBar();
APPBARDATA data = new APPBARDATA.ByReference();
data.uEdge.setValue(ShellAPI.ABE_BOTTOM);
data.rc.top = User32.INSTANCE.GetSystemMetrics(User32.SM_CYFULLSCREEN) - RESIZE_DELTA;
data.rc.left = 0;
data.rc.bottom = User32.INSTANCE.GetSystemMetrics(User32.SM_CYFULLSCREEN);
data.rc.right = User32.INSTANCE.GetSystemMetrics(User32.SM_CXFULLSCREEN);
queryPos(data);
UINT_PTR h = Shell32.INSTANCE.SHAppBarMessage(new DWORD(ShellAPI.ABM_SETPOS), data);
assertNotNull(h);
assertTrue(h.intValue() >= 0);
removeAppBar();
}
use of com.sun.jna.platform.win32.WinDef.UINT_PTR in project jna by java-native-access.
the class Shell32Test method newAppBar.
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);
}
use of com.sun.jna.platform.win32.WinDef.UINT_PTR in project jna by java-native-access.
the class Shell32Test method testResizeDesktopFromTop.
public void testResizeDesktopFromTop() throws InterruptedException {
newAppBar();
APPBARDATA data = new APPBARDATA.ByReference();
data.uEdge.setValue(ShellAPI.ABE_TOP);
data.rc.top = 0;
data.rc.left = 0;
data.rc.bottom = User32.INSTANCE.GetSystemMetrics(User32.SM_CXFULLSCREEN) - RESIZE_DELTA;
data.rc.right = User32.INSTANCE.GetSystemMetrics(User32.SM_CXFULLSCREEN);
queryPos(data);
UINT_PTR h = Shell32.INSTANCE.SHAppBarMessage(new DWORD(ShellAPI.ABM_SETPOS), data);
assertNotNull(h);
assertTrue(h.intValue() >= 0);
removeAppBar();
}
Aggregations