-
Notifications
You must be signed in to change notification settings - Fork 50
Expand file tree
/
Copy pathTheme.java
More file actions
36 lines (31 loc) · 1.19 KB
/
Theme.java
File metadata and controls
36 lines (31 loc) · 1.19 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
package io.github.humbleui.jwm;
import org.jetbrains.annotations.*;
import io.github.humbleui.jwm.impl.*;
public class Theme {
/**
* <p>Check whether OS currently uses high contrast mode.</p>
*
* @return bool on Windows macOS, false otherwise
*/
public static boolean isHighContrast() {
assert App._onUIThread() : "Should be run on UI thread";
if (Platform.CURRENT != Platform.WINDOWS && Platform.CURRENT != Platform.MACOS)
return false;
return _nIsHighContrast();
}
public static boolean isDark() {
assert App._onUIThread() : "Should be run on UI thread";
if (Platform.CURRENT != Platform.WINDOWS && Platform.CURRENT != Platform.MACOS)
return false;
return _nIsDark();
}
public static boolean isInverted() {
assert App._onUIThread() : "Should be run on UI thread";
if (Platform.CURRENT != Platform.MACOS)
return false;
return _nIsInverted();
}
@ApiStatus.Internal public static native boolean _nIsHighContrast();
@ApiStatus.Internal public static native boolean _nIsDark();
@ApiStatus.Internal public static native boolean _nIsInverted();
}