Class JNIThemeInfoMacOS
java.lang.Object
com.github.weisj.darklaf.platform.macos.JNIThemeInfoMacOS
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic longcreatePreferenceChangeListener(Runnable callback) Create an preference change listener.static voiddeletePreferenceChangeListener(long listenerPtr) Delete the preference change listener.static ColorReturns the current accent color.static ColorReturns the current selection color.static booleanReturns whether dark mode is enabled.static booleanReturns whether high contrast mode is enabled.static voidpatchAppBundle(boolean isJava11OrOlder) static void
-
Constructor Details
-
JNIThemeInfoMacOS
public JNIThemeInfoMacOS()
-
-
Method Details
-
isDarkThemeEnabled
public static boolean isDarkThemeEnabled()Returns whether dark mode is enabled.- Returns:
- true if dark mode is enabled.
-
isHighContrastEnabled
public static boolean isHighContrastEnabled()Returns whether high contrast mode is enabled.- Returns:
- true if high contrast mode is enabled.
-
getAccentColor
Returns the current accent color.- Returns:
- the accent color.
-
getSelectionColor
Returns the current selection color.- Returns:
- the current selection color.
-
createPreferenceChangeListener
Create an preference change listener.- Parameters:
callback- the event callback.- Returns:
- the pointer to the listener.
-
deletePreferenceChangeListener
public static void deletePreferenceChangeListener(long listenerPtr) Delete the preference change listener.- Parameters:
listenerPtr- pointer to the listener.
-
patchAppBundle
public static void patchAppBundle(boolean isJava11OrOlder) -
unpatchAppBundle
public static void unpatchAppBundle()
-