System class (named Sys so as not to conflict with java.lang.System)
| Modifier and Type | Field and Description |
|---|---|
| private static final SysImplementation | implementation
The implementation instance to delegate platform specific behavior to |
| private static final boolean | |
| private static final String | JNI_LIBRARY_NAME
The native library name |
| private static final String | |
| private static final String | VERSION
Current version of library |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static void | |
| private static SysImplementation | |
| private static void | |
| public static String | Returns: a String, or null if there is no system clipboard.Get the contents of the system clipboard. |
| public static long | Returns: the current hires time, in ticks (always >= 0)Gets the current value of the hires timer, in ticks. |
| public static long | Returns: timer resolution in ticks per second or 0 if no timer is present.Obtains the number of ticks that the hires timer does in a second. |
| public static String | |
| public static void | |
| public static boolean | |
| private static void | |
| public static boolean |
| implementation | back to summary |
|---|---|
| private static final SysImplementation implementation The implementation instance to delegate platform specific behavior to | |
| is64Bit | back to summary |
|---|---|
| private static final boolean is64Bit | |
| JNI_LIBRARY_NAME | back to summary |
|---|---|
| private static final String JNI_LIBRARY_NAME The native library name | |
| POSTFIX64BIT | back to summary |
|---|---|
| private static final String POSTFIX64BIT | |
| VERSION | back to summary |
|---|---|
| private static final String VERSION Current version of library | |
| Sys | back to summary |
|---|---|
| private Sys() No constructor for Sys. | |
| alert | back to summary |
|---|---|
| public static void alert(String title, String message) Attempt to display a modal alert to the user. This method should be used when a game fails to initialize properly or crashes out losing its display in the process. It is provided because AWT may not be available on the target platform, although on Mac and Linux and other platforms supporting AWT we delegate the task to AWT instead of doing it ourselves. The alert should display the title and the message and then the current thread should block until the user dismisses the alert - typically with an OK button click. It may be that the user's system has no windowing system installed for some reason, in which case this method may do nothing at all, or attempt to provide some console output. | |
| createImplementation | back to summary |
|---|---|
| private static SysImplementation createImplementation() | |
| doLoadLibrary | back to summary |
|---|---|
| private static void doLoadLibrary(final String lib_name) | |
| getClipboard | back to summary |
|---|---|
| public static String getClipboard() Get the contents of the system clipboard. The system might not have a clipboard (particularly if it doesn't even have a keyboard) in which case we return null. Otherwise we return a String, which may be the empty string "".
| |
| getTime | back to summary |
|---|---|
| public static long getTime() Gets the current value of the hires timer, in ticks. When the Sys class is first loaded the hires timer is reset to 0. If no hires timer is present then this method will always return 0. NOTEZ BIEN that the hires timer WILL wrap around.
| |
| getTimerResolution | back to summary |
|---|---|
| public static long getTimerResolution() Obtains the number of ticks that the hires timer does in a second. This method is fast; it should be called as frequently as possible, as it recalibrates the timer.
| |
| getVersion | back to summary |
|---|---|
| public static String getVersion() Return the version of the core LWJGL libraries as a String. | |
| initialize | back to summary |
|---|---|
| public static void initialize() Initialization. This is just a dummy method to trigger the static constructor. | |
| is64Bit | back to summary |
|---|---|
| public static boolean is64Bit() Returns true if a 64bit implementation was loaded. | |
| loadLibrary | back to summary |
|---|---|
| private static void loadLibrary(final String lib_name) | |
| openURL | back to summary |
|---|---|
| public static boolean openURL(String url) Open the system web browser and point it at the specified URL. It is recommended that this not be called whilst your game is running, but on application exit in a shutdown hook, as the screen resolution will not be reset when the browser is brought into view. There is no guarantee that this will work, nor that we can detect if it has failed - hence we don't return success code or throw an Exception. This is just a best attempt at opening the URL given - don't rely on it to work!
| |