On Wed, 23 Apr 2025 18:11:43 GMT, Jeremy Wood <d...@openjdk.org> wrote:
>>>public static final State DEFAULTBUTTON = new State(_pulsed); >> >> This line maps the State.DEFAULTBUTTON constant to the _pulsed property in >> JRS (JRSUIProperties.h). Although _pulse is no longer supported, there does >> not seem to be a suitable alternative, so unfortunately we're still stuck >> with pulse forever. >> >> >> enum { >> kJRSUI_State_active = 1, >> kJRSUI_State_inactive = 2, >> kJRSUI_State_disabled = 3, >> kJRSUI_State_pressed = 4, >> kJRSUI_State_pulsed = 5, >> kJRSUI_State_rollover = 6, >> kJRSUI_State_drag = 7 >> }; >> typedef CFIndex JRSUIState; > > Ah, thanks for identifying the problem. > > Wait... is that still the correct file? When I search my machine for that > file I get a path like: > `/Library/Developer/CommandLineTools/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/JavaRuntimeSupport.framework/Versions/A/Headers/JRSUIProperties.h` > > But I don't see a copy of that file for JDK v20 or higher. > > Either way: any objections to my adding comments like these for posterity? > > <img width="545" alt="image" > src="https://github.com/user-attachments/assets/ec0ed40e-e876-4cb1-9b65-b93f35c6931b" > /> This file (JRSUIProperties.h) is provided by Apple. It is there exclusively for use by the JDK - its is the compile time part of JavaRuntimeSupport.framework. So you won't find it in JDK sources. There's also a runtime framework part that's on every mac. You can certainly add a comment that it is misleading now, but I don't see anyway to change the name, and since the name matching is generally true for JRS, I don't think we need to call out the one instance. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24778#discussion_r2056708118