76 * includes everything from the native GraphicsDevice elements to
77 * the DirectX rendering layer.
78 */
79 private static native void initDisplay();
80
81 private static boolean displayInitialized; // = false;
82 public static void initDisplayWrapper() {
83 if (!displayInitialized) {
84 displayInitialized = true;
85 initDisplay();
86 }
87 }
88
89 public Win32GraphicsEnvironment() {
90 }
91
92 protected native int getNumScreens();
93 protected native int getDefaultScreen();
94
95 public GraphicsDevice getDefaultScreenDevice() {
96 return getScreenDevices()[getDefaultScreen()];
97 }
98
99 /**
100 * Returns the number of pixels per logical inch along the screen width.
101 * In a system with multiple display monitors, this value is the same for
102 * all monitors.
103 * @returns number of pixels per logical inch in X direction
104 */
105 public native int getXResolution();
106 /**
107 * Returns the number of pixels per logical inch along the screen height.
108 * In a system with multiple display monitors, this value is the same for
109 * all monitors.
110 * @returns number of pixels per logical inch in Y direction
111 */
112 public native int getYResolution();
113
114
115 /*
116 * ----DISPLAY CHANGE SUPPORT----
|
76 * includes everything from the native GraphicsDevice elements to
77 * the DirectX rendering layer.
78 */
79 private static native void initDisplay();
80
81 private static boolean displayInitialized; // = false;
82 public static void initDisplayWrapper() {
83 if (!displayInitialized) {
84 displayInitialized = true;
85 initDisplay();
86 }
87 }
88
89 public Win32GraphicsEnvironment() {
90 }
91
92 protected native int getNumScreens();
93 protected native int getDefaultScreen();
94
95 public GraphicsDevice getDefaultScreenDevice() {
96 GraphicsDevice[] screens = getScreenDevices();
97 int index = getDefaultScreen();
98 return screens[screens.length <= index ? 0 : index];
99 }
100
101 /**
102 * Returns the number of pixels per logical inch along the screen width.
103 * In a system with multiple display monitors, this value is the same for
104 * all monitors.
105 * @returns number of pixels per logical inch in X direction
106 */
107 public native int getXResolution();
108 /**
109 * Returns the number of pixels per logical inch along the screen height.
110 * In a system with multiple display monitors, this value is the same for
111 * all monitors.
112 * @returns number of pixels per logical inch in Y direction
113 */
114 public native int getYResolution();
115
116
117 /*
118 * ----DISPLAY CHANGE SUPPORT----
|