Debian Codegraph @

arduino-core/src/processing/app/helpers/OSUtils.java

raw symbols SCIP
1 package processing.app.helpers;
2
3 public class OSUtils {
4
5 /**
6 * returns true if running on windows.
7 */
8 static public boolean isWindows() {
9 //return PApplet.platform == PConstants.WINDOWS;
10 return System.getProperty("os.name").contains("Windows");
11 }
12
13 /**
14 * true if running on linux.
15 */
16 static public boolean isLinux() {
17 //return PApplet.platform == PConstants.LINUX;
18 return System.getProperty("os.name").contains("Linux");
19 }
20
21 /**
22 * returns true if Processing is running on a Mac OS X machine.
23 */
24 static public boolean isMacOS() {
25 //return PApplet.platform == PConstants.MACOSX;
26 return System.getProperty("os.name").contains("Mac");
27 }
28
29 static public boolean hasMacOSStyleMenus() {
30 return OSUtils.isMacOS() && "true".equals(System.getProperty("apple.laf.useScreenMenuBar"));
31 }
32
33 static public String version() {
34 return System.getProperty("os.version");
35 }
36 }