Skip to content

Commit

Permalink
Issue #241
Browse files Browse the repository at this point in the history
fix code formatting
  • Loading branch information
bsorrentino committed Jun 22, 2013
1 parent 1646c3c commit 27a5176
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 16 deletions.
22 changes: 11 additions & 11 deletions contrib/platform/src/com/sun/jna/platform/win32/ShellAPI.java
Original file line number Diff line number Diff line change
Expand Up @@ -129,20 +129,20 @@ public String encodePaths(String[] paths) {
* Appbar message value to send. This parameter can be one of the following
* values.
*/
DWORD ABM_NEW = new DWORD(0x00000000);
int ABM_NEW = 0x00000000;
/**
* Registers a new appbar and specifies the message identifier that the
* system should use to send notification messages to the appbar.
*/
DWORD ABM_REMOVE = new DWORD(0x00000001);
int ABM_REMOVE = 0x00000001;
/** Unregisters an appbar, removing the bar from the system's internal list.*/
DWORD ABM_QUERYPOS = new DWORD(0x00000002);
int ABM_QUERYPOS = 0x00000002;
/** Requests a size and screen position for an appbar. */
DWORD ABM_SETPOS = new DWORD(0x00000003);
int ABM_SETPOS = 0x00000003;
/** Sets the size and screen position of an appbar. */
DWORD ABM_GETSTATE = new DWORD(0x00000004);
int ABM_GETSTATE = 0x00000004;
/** Retrieves the autohide and always-on-top states of the Windows taskbar. */
DWORD ABM_GETTASKBARPOS = new DWORD(0x00000005);
int ABM_GETTASKBARPOS = 0x00000005;
/**
* Retrieves the bounding rectangle of the Windows taskbar. Note that this
* applies only to the system taskbar. Other objects, particularly toolbars
Expand All @@ -152,22 +152,22 @@ public String encodePaths(String[] paths) {
* both the taskbar and other app barsÑthe working area available to your
* applicationÑ, use the GetMonitorInfo function.
*/
DWORD ABM_ACTIVATE = new DWORD(0x00000006);
int ABM_ACTIVATE = 0x00000006;
/**
* Notifies the system to activate or deactivate an appbar. The lParam
* member of the APPBARDATA pointed to by pData is set to TRUE to activate
* or FALSE to deactivate.
*/
DWORD ABM_GETAUTOHIDEBAR = new DWORD(0x00000007);
int ABM_GETAUTOHIDEBAR = 0x00000007;
/**
* Retrieves the handle to the autohide appbar associated with a particular
* edge of the screen.
*/
DWORD ABM_SETAUTOHIDEBAR = new DWORD(0x00000008);
int ABM_SETAUTOHIDEBAR = 0x00000008;
/** Registers or unregisters an autohide appbar for an edge of the screen. */
DWORD ABM_WINDOWPOSCHANGED = new DWORD(0x00000009);
int ABM_WINDOWPOSCHANGED = 0x00000009;
/** Notifies the system when an appbar's position has changed. */
DWORD ABM_SETSTATE = new DWORD(0x0000000A);
int ABM_SETSTATE = 0x0000000A;

/** Left edge. */
int ABE_LEFT = 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,20 +63,20 @@ private void newAppBar() {
data.cbSize.setValue(data.size());
data.uCallbackMessage.setValue(WM_USER + 1);

UINT_PTR result = Shell32.INSTANCE.SHAppBarMessage(ShellAPI.ABM_NEW, data);
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(ShellAPI.ABM_REMOVE, data);
UINT_PTR result = Shell32.INSTANCE.SHAppBarMessage(new DWORD(ShellAPI.ABM_REMOVE), data);
assertNotNull(result);

}

private void queryPos(APPBARDATA data) {
UINT_PTR h = Shell32.INSTANCE.SHAppBarMessage(ShellAPI.ABM_QUERYPOS, data);
UINT_PTR h = Shell32.INSTANCE.SHAppBarMessage(new DWORD(ShellAPI.ABM_QUERYPOS), data);

assertNotNull(h);
assertTrue(h.intValue() > 0);
Expand All @@ -97,7 +97,7 @@ public void testResizeDesktopFromBottom() throws InterruptedException {

queryPos(data);

UINT_PTR h = Shell32.INSTANCE.SHAppBarMessage(ShellAPI.ABM_SETPOS, data);
UINT_PTR h = Shell32.INSTANCE.SHAppBarMessage(new DWORD(ShellAPI.ABM_SETPOS), data);

assertNotNull(h);
assertTrue(h.intValue() >= 0);
Expand All @@ -118,7 +118,7 @@ public void testResizeDesktopFromTop() throws InterruptedException {

queryPos(data);

UINT_PTR h = Shell32.INSTANCE.SHAppBarMessage(ShellAPI.ABM_SETPOS, data);
UINT_PTR h = Shell32.INSTANCE.SHAppBarMessage(new DWORD(ShellAPI.ABM_SETPOS), data);

assertNotNull(h);
assertTrue(h.intValue() >= 0);
Expand Down

0 comments on commit 27a5176

Please sign in to comment.