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

Implementation and tests for window utility methods: Detection of window icon, title and so forth #400

Closed

Conversation

PAX523
Copy link
Contributor

@PAX523 PAX523 commented Mar 8, 2015

I extended some Windows API interfaces in order to provide utility methods that request several information about a HWND instance. Some of these information are: Window icon, window location/size/title, all currently available windows, icon size...

@PAX523
Copy link
Contributor Author

PAX523 commented Mar 8, 2015

It has problems with Umlauts. But they are part of my name... Can this be fixed on the CI?

* <p/>
* The following table shows the type of information the buffer
* receives for each type of graphics object you can specify with
* hgdiobj.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does HTML in here actually work when JavaDoc is generated?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're right! The JavaDoc HTML generation script prints several warnings about that. It seems that I'm not the only one who used HTML content in JavaDoc. I could remove all paragraph/linebreak tags but what should I do with HTML tables? Some documentations have tables?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe this is a (relatively) recent change to javadoc generation. It used to not be an issue to drop in paragraph and line break tags.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

table tags as well?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dunno. If it renders well in JavaDoc, great. Do note people read those as comments too.

@dblock
Copy link
Member

dblock commented Mar 9, 2015

You do need to figure out what's up with CI, please, the simplest could be to remove the umlaut from your name if you don't want to deal with the issue.

Thanks!

*/
public interface Psapi extends StdCallLibrary {
public static final Psapi INSTANCE = (Psapi) Native.loadLibrary("psapi",
Psapi.class);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be loaded with the same options as the other w32 libraries, namely with W32APIOptions.DEFAULT_OPTIONS. That automatically handles A/W suffixes and wide string type mappings.

invocations; Provide correct complete API for Psapi.GetModuleFileNameEx;
Test class for Psapi API
@PAX523
Copy link
Contributor Author

PAX523 commented Mar 14, 2015

I hope I have adjusted all mentioned points completely, now. If not then let me know.

@@ -23,6 +23,7 @@ Features
* [#365](https://github.com/twall/jna/pull/365): Added `com.sun.jna.platform.win32.Kernel32.GetComputerNameEx` support - [@lgoldstein](https://github.com/lgoldstein).
* [#368](https://github.com/twall/jna/pull/368): Added `com.sun.jna.platform.win32.Kernel32.VirtualQueryEx`, `com.sun.jna.platform.win32.WinNT.MEMORY_BASIC_INFORMATION` and `MEM_COMMIT`, `MEM_FREE`, `MEM_RESERVE`, `MEM_IMAGE`, `MEM_MAPPED`, `MEM_PRIVATE` constants to `com.sun.jna.platform.win32.WinNT` - [@apsk](https://github.com/apsk).
* Allow interoperation with JNI revision changes - [@twall](https://github.com/twall).
* [#400](https://github.com/twall/jna/pull/400): Added several window utility functions for Windows (get all current window handles, get set icon of window, obtain size of HICON, get title of window, get process file path of window, get window location and size), Request textual message of current last error code, Added missing constants and API functions that were required - [@PAX523](https://github.com/PAX523).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since these are mappings we usually write out the names, see above. For example added com.sun.jna.platform.win32.Kernel32Util. getLastErrorMessage. You can also write multiple entries with the same Github link, just so that the changelog is clearer for those who are reading it during the release.

@dblock
Copy link
Member

dblock commented Mar 15, 2015

I think this is good to merge, just needs a rebase and I would appreciate the small CHANGELOG changes.

I want to run these tests on a Windows box before merging, give me a little bit of time.

@PAX523
Copy link
Contributor Author

PAX523 commented Mar 15, 2015

Is CHANGES file alright, now?

@dblock
Copy link
Member

dblock commented Mar 16, 2015

Yes, thanks @PAX523 for the detailed list.

@dblock
Copy link
Member

dblock commented Mar 16, 2015

Merged via 95ac06a.

@dblock dblock closed this Mar 16, 2015
mstyura pushed a commit to mstyura/jna that referenced this pull request Sep 9, 2024
Motivation:

Github does not support windows-2016 anymore

Modifications:

Switch to windows-2019

Result:

Build does not fail anymore on CI
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants