Some comments.
This commit is contained in:
@@ -10,9 +10,10 @@ package net.rubygrapefruit.platform;
|
|||||||
@ThreadSafe
|
@ThreadSafe
|
||||||
public interface Terminal {
|
public interface Terminal {
|
||||||
/**
|
/**
|
||||||
* Colors supported by a terminal.
|
* Basic colors supported by a terminal.
|
||||||
*/
|
*/
|
||||||
enum Color {
|
enum Color {
|
||||||
|
// Don't change the order of these. They are in ANSI order
|
||||||
Black, Red, Green, Yellow, Blue, Magenta, Cyan, White
|
Black, Red, Green, Yellow, Blue, Magenta, Cyan, White
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ package net.rubygrapefruit.platform.internal;
|
|||||||
import net.rubygrapefruit.platform.SystemInfo;
|
import net.rubygrapefruit.platform.SystemInfo;
|
||||||
|
|
||||||
public class MutableSystemInfo implements SystemInfo {
|
public class MutableSystemInfo implements SystemInfo {
|
||||||
|
// Fields set from native code
|
||||||
public String osName;
|
public String osName;
|
||||||
public String osVersion;
|
public String osVersion;
|
||||||
public String machineArchitecture;
|
public String machineArchitecture;
|
||||||
@@ -19,6 +20,7 @@ public class MutableSystemInfo implements SystemInfo {
|
|||||||
return machineArchitecture;
|
return machineArchitecture;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Called from native code
|
||||||
void windows(int major, int minor, int build, boolean workstation, String arch) {
|
void windows(int major, int minor, int build, boolean workstation, String arch) {
|
||||||
osName = toWindowsVersionName(major, minor, workstation);
|
osName = toWindowsVersionName(major, minor, workstation);
|
||||||
osVersion = String.format("%s.%s (build %s)", major, minor, build);
|
osVersion = String.format("%s.%s (build %s)", major, minor, build);
|
||||||
|
|||||||
Reference in New Issue
Block a user