-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Implementation and tests for window utility methods: Detection of window icon, title and so forth #400
Conversation
title and so forth.
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. |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
table tags as well?
There was a problem hiding this comment.
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.
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! |
are mapped to Unicode function invocation, automatically
*/ | ||
public interface Psapi extends StdCallLibrary { | ||
public static final Psapi INSTANCE = (Psapi) Native.loadLibrary("psapi", | ||
Psapi.class); |
There was a problem hiding this comment.
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
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). |
There was a problem hiding this comment.
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.
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. |
icon-extraction-from-hwnd Conflicts: CHANGES.md
Is CHANGES file alright, now? |
Yes, thanks @PAX523 for the detailed list. |
Merged via 95ac06a. |
Motivation: Github does not support windows-2016 anymore Modifications: Switch to windows-2019 Result: Build does not fail anymore on CI
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...