Skip to content

Commit 0477646

Browse files
Move child structure definitions to the end of the structure definition
1 parent 9c126f0 commit 0477646

File tree

1 file changed

+96
-95
lines changed
  • contrib/platform/src/com/sun/jna/platform/win32

1 file changed

+96
-95
lines changed

contrib/platform/src/com/sun/jna/platform/win32/WinGDI.java

+96-95
Original file line numberDiff line numberDiff line change
@@ -191,8 +191,104 @@ public static class ByReference extends DEVMODE implements Structure.ByReference
191191
* For printers: This member is not used for printers.
192192
*/
193193
public int dmPelsHeight;
194+
194195
public DUMMYUNIONNAME2 dummyunionname2;
195196

197+
/**
198+
* For displays: Specifies the frequency, in hertz (cycles per second), of the display device in a particular
199+
* mode. This value is also known as the display device's vertical refresh rate. Display drivers use this
200+
* member. It is used, for example, in the <code>ChangeDisplaySettings</code> function.
201+
*
202+
* When you call the <code>EnumDisplaySettings</code> function, the <code>dmDisplayFrequency</code> member may
203+
* return with the value 0 or 1. These values represent the display hardware's default refresh rate. This
204+
* default rate is typically set by switches on a display card or computer motherboard, or by a configuration
205+
* program that does not use display functions such as <code>ChangeDisplaySettings</code>.
206+
*
207+
* For printers: This member is not used for printers.
208+
*/
209+
public int dmDisplayFrequency;
210+
211+
/**
212+
* For printers: Specifies how ICM (image color management) is handled. For a non-ICM application, this member determines
213+
* if ICM is enabled or disabled. For ICM applications, the system examines this member to determine how to
214+
* handle ICM support. This member can be one of the predefined <code>DMICMMETHOD_XXX</code>values, or a driver-defined value
215+
* greater than or equal to the value of <code>DMICMMETHOD_USER</code>.
216+
*
217+
* The printer driver must provide a user interface for setting this member. Most printer drivers support only
218+
* the <code>DMICMMETHOD_SYSTEM</code> or <code>DMICMMETHOD_NONE</code> value. Drivers for PostScript printers
219+
* support all <code>DCMICMMETHOD_XXX</code>values.
220+
*
221+
* For displays: This member is not used for displays.
222+
*/
223+
public int dmICMMethod;
224+
225+
/**
226+
* For printers: Specifies which color matching method, or intent, should be used by default. This member is primarily for
227+
* non-ICM applications. ICM applications can establish intents by using the ICM functions. This member can be
228+
* one of the following predefined values, or a driver defined value greater than or equal to the value of
229+
* <code>DMICM_USER</code>.
230+
*
231+
* For displays: This member is not used for displays.
232+
*/
233+
public int dmICMIntent;
234+
235+
/**
236+
* For printers: Specifies the type of media being printed on. The member can be one of the predefined
237+
* <code>DMMEDIA_XXX</code> values, or a driver-defined value greater than or equal to the value of <code>DMMEDIA_USER</code>.
238+
*
239+
* To retrieve a list of the available media types for a printer, use the <code>DeviceCapabilities</code>
240+
* function with the <code>DC_MEDIATYPES</code> flag.
241+
*
242+
* For displays: This member is not used for displays.
243+
*/
244+
public int dmMediaType;
245+
246+
/**
247+
* For printers: Specifies how dithering is to be done. The member can be one of the predefined
248+
* <code>DMDITHER_XXX</code> values, or a driver-defined value greater than or equal to the value of
249+
* <code>DMDITHER_USER</code>.
250+
*
251+
* For displays: This member is not used for displays.
252+
*/
253+
public int dmDitherType;
254+
255+
/**
256+
* Not used; must be zero.
257+
*/
258+
public int dmReserved1;
259+
260+
/**
261+
* Not used; must be zero.
262+
*/
263+
public int dmReserved2;
264+
265+
/**
266+
* This member must be zero.
267+
*/
268+
public int dmPanningWidth;
269+
270+
/**
271+
* This member must be zero.
272+
*/
273+
public int dmPanningHeight;
274+
275+
/**
276+
* Converts dmDeviceName from raw byte[] to String
277+
*/
278+
public String getDmDeviceName() {
279+
int offset = fieldOffset("dmDeviceName");
280+
return CHAR_WIDTH == 1 ? getPointer().getString(offset) : getPointer().getWideString(offset);
281+
}
282+
283+
/**
284+
* Converts dmFormName from raw byte[] to String
285+
*/
286+
public String getDmFormName() {
287+
int offset = fieldOffset("dmFormName");
288+
return CHAR_WIDTH == 1 ? getPointer().getString(offset) : getPointer().getWideString(offset);
289+
}
290+
291+
196292
public static class DUMMYUNIONNAME extends Union {
197293
public DUMMYSTRUCTNAME dummystructname;
198294

@@ -353,101 +449,6 @@ public static class DUMMYUNIONNAME2 extends Union {
353449
*/
354450
public int dmNup;
355451
}
356-
357-
358-
/**
359-
* For displays: Specifies the frequency, in hertz (cycles per second), of the display device in a particular
360-
* mode. This value is also known as the display device's vertical refresh rate. Display drivers use this
361-
* member. It is used, for example, in the <code>ChangeDisplaySettings</code> function.
362-
*
363-
* When you call the <code>EnumDisplaySettings</code> function, the <code>dmDisplayFrequency</code> member may
364-
* return with the value 0 or 1. These values represent the display hardware's default refresh rate. This
365-
* default rate is typically set by switches on a display card or computer motherboard, or by a configuration
366-
* program that does not use display functions such as <code>ChangeDisplaySettings</code>.
367-
*
368-
* For printers: This member is not used for printers.
369-
*/
370-
public int dmDisplayFrequency;
371-
372-
/**
373-
* For printers: Specifies how ICM (image color management) is handled. For a non-ICM application, this member determines
374-
* if ICM is enabled or disabled. For ICM applications, the system examines this member to determine how to
375-
* handle ICM support. This member can be one of the predefined <code>DMICMMETHOD_XXX</code>values, or a driver-defined value
376-
* greater than or equal to the value of <code>DMICMMETHOD_USER</code>.
377-
*
378-
* The printer driver must provide a user interface for setting this member. Most printer drivers support only
379-
* the <code>DMICMMETHOD_SYSTEM</code> or <code>DMICMMETHOD_NONE</code> value. Drivers for PostScript printers
380-
* support all <code>DCMICMMETHOD_XXX</code>values.
381-
*
382-
* For displays: This member is not used for displays.
383-
*/
384-
public int dmICMMethod;
385-
386-
/**
387-
* For printers: Specifies which color matching method, or intent, should be used by default. This member is primarily for
388-
* non-ICM applications. ICM applications can establish intents by using the ICM functions. This member can be
389-
* one of the following predefined values, or a driver defined value greater than or equal to the value of
390-
* <code>DMICM_USER</code>.
391-
*
392-
* For displays: This member is not used for displays.
393-
*/
394-
public int dmICMIntent;
395-
396-
/**
397-
* For printers: Specifies the type of media being printed on. The member can be one of the predefined
398-
* <code>DMMEDIA_XXX</code> values, or a driver-defined value greater than or equal to the value of <code>DMMEDIA_USER</code>.
399-
*
400-
* To retrieve a list of the available media types for a printer, use the <code>DeviceCapabilities</code>
401-
* function with the <code>DC_MEDIATYPES</code> flag.
402-
*
403-
* For displays: This member is not used for displays.
404-
*/
405-
public int dmMediaType;
406-
407-
/**
408-
* For printers: Specifies how dithering is to be done. The member can be one of the predefined
409-
* <code>DMDITHER_XXX</code> values, or a driver-defined value greater than or equal to the value of
410-
* <code>DMDITHER_USER</code>.
411-
*
412-
* For displays: This member is not used for displays.
413-
*/
414-
public int dmDitherType;
415-
416-
/**
417-
* Not used; must be zero.
418-
*/
419-
public int dmReserved1;
420-
421-
/**
422-
* Not used; must be zero.
423-
*/
424-
public int dmReserved2;
425-
426-
/**
427-
* This member must be zero.
428-
*/
429-
public int dmPanningWidth;
430-
431-
/**
432-
* This member must be zero.
433-
*/
434-
public int dmPanningHeight;
435-
436-
/**
437-
* Converts dmDeviceName from raw byte[] to String
438-
*/
439-
public String getDmDeviceName() {
440-
int offset = fieldOffset("dmDeviceName");
441-
return CHAR_WIDTH == 1 ? getPointer().getString(offset) : getPointer().getWideString(offset);
442-
}
443-
444-
/**
445-
* Converts dmFormName from raw byte[] to String
446-
*/
447-
public String getDmFormName() {
448-
int offset = fieldOffset("dmFormName");
449-
return CHAR_WIDTH == 1 ? getPointer().getString(offset) : getPointer().getWideString(offset);
450-
}
451452
}
452453

453454
@FieldOrder({"dwSize", "iType", "nCount", "nRgnSize", "rcBound"})

0 commit comments

Comments
 (0)