Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added GetClientRect #702

Merged
merged 4 commits into from
Sep 11, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ Features
* [#667](https://github.com/java-native-access/jna/pull/667): Added NtSetSecurityObject and NtQuerySecurityObject to `com.sun.jna.platform.win32.NtDll` - [@amarcionek](https://github.com/amarcionek).
* [#680](https://github.com/java-native-access/jna/pull/680): Added `SetCurrentProcessExplicitAppUserModelID` and `GetCurrentProcessExplicitAppUserModelID` to `com.sun.jna.platform.win32.Shell32` for setting the [System.AppUserModel.ID](https://msdn.microsoft.com/en-us/library/windows/desktop/dd391569.aspx) of the host process - [@rednoah](https://github.com/rednoah).
* [#693](https://github.com/java-native-access/jna/pull/693): Bind DDEML (Dynamic Data Exchange Management Library), add a thread implementation that runs a windows message loop - [@matthiasblaesing](https://github.com/matthiasblaesing).
* [#702](https://github.com/java-native-access/jna/pull/702): Added `GetClientRect` to `com/sun/jna/platform/win32/User32` - [@Jonatino](https://github.com/Jonatino).

Bug Fixes
---------
Expand Down
23 changes: 21 additions & 2 deletions contrib/platform/src/com/sun/jna/platform/win32/User32.java
Original file line number Diff line number Diff line change
Expand Up @@ -188,11 +188,30 @@ public interface User32 extends StdCallLibrary, WinUser, WinNT {
* Long pointer to a RECT structure that receives the screen
* coordinates of the upper-left and lower-right corners of the
* window.
* @return Nonzero indicates success. Zero indicates failure. To get
* extended error information, call GetLastError.
* @return If the function succeeds, the return value is nonzero. If the
* function fails, the return value is zero.
*/
boolean GetWindowRect(HWND hWnd, RECT rect);

/**
* This function retrieves the coordinates of a window's client area.
* The client coordinates specify the upper-left and lower-right corners of the
* client area. Because client coordinates are relative to the upper-left
* corner of a window's client area, the coordinates of the upper-left corner
* are (0,0).
*
* @param hWnd
* Handle to the window.
* @param rect
* Long pointer to a RECT structure that structure that receives
* the client coordinates. The left and top members are zero. The
* right and bottom members contain the width and height of the
* window.
* @return If the function succeeds, the return value is nonzero. If the
* function fails, the return value is zero.
*/
boolean GetClientRect(HWND hWnd, RECT rect);

/**
* This function copies the text of the specified window's title bar - if it
* has one - into a buffer. If the specified window is a control, the text
Expand Down