Top Description Inners Fields Constructors Methods
org.lwjgl.system.windows

public Class DEVMODE

extends Struct<DEVMODE>
implements NativeResource
Class Inheritance
All Implemented Interfaces
org.lwjgl.system.NativeResource, java.lang.AutoCloseable
Imports
javax.annotation.*, java.nio.*, org.lwjgl.*, org.lwjgl.system.*

Contains information about the initialization and environment of a printer or a display device.

Layout


struct DEVMODE {
    TCHAR dmDeviceName[32];
    WORD dmSpecVersion;
    WORD dmDriverVersion;
    WORD dmSize;
    WORD dmDriverExtra;
    DWORD dmFields;
    union {
        struct {
            short dmOrientation;
            short dmPaperSize;
            short dmPaperLength;
            short dmPaperWidth;
            short dmScale;
            short dmCopies;
            short dmDefaultSource;
            short dmPrintQuality;
        };
        struct {
            POINTL dmPosition;
            DWORD dmDisplayOrientation;
            DWORD dmDisplayFixedOutput;
        };
    };
    short dmColor;
    short dmDuplex;
    short dmYResolution;
    short dmTTOption;
    short dmCollate;
    TCHAR dmFormName[32];
    WORD dmLogPixels;
    DWORD dmBitsPerPel;
    DWORD dmPelsWidth;
    DWORD dmPelsHeight;
    union {
        DWORD dmDisplayFlags;
        DWORD dmNup;
    };
    DWORD dmDisplayFrequency;
    DWORD dmICMMethod;
    DWORD dmICMIntent;
    DWORD dmMediaType;
    DWORD dmDitherType;
    DWORD dmReserved1;
    DWORD dmReserved2;
    DWORD dmPanningWidth;
    DWORD dmPanningHeight;
}

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class
DEVMODE.Buffer

An array of DEVMODE structs.

Field Summary

Modifier and TypeField and Description
public static final int
ALIGNOF

The struct alignment in bytes.

public static final int
DMBITSPERPEL

The struct member offsets.

public static final int
DMCOLLATE

The struct member offsets.

public static final int
DMCOLOR

The struct member offsets.

public static final int
DMCOPIES

The struct member offsets.

public static final int
DMDEFAULTSOURCE

The struct member offsets.

public static final int
DMDEVICENAME

The struct member offsets.

public static final int
DMDISPLAYFIXEDOUTPUT

The struct member offsets.

public static final int
DMDISPLAYFLAGS

The struct member offsets.

public static final int
DMDISPLAYFREQUENCY

The struct member offsets.

public static final int
DMDISPLAYORIENTATION

The struct member offsets.

public static final int
DMDITHERTYPE

The struct member offsets.

public static final int
DMDRIVEREXTRA

The struct member offsets.

public static final int
DMDRIVERVERSION

The struct member offsets.

public static final int
DMDUPLEX

The struct member offsets.

public static final int
DMFIELDS

The struct member offsets.

public static final int
DMFORMNAME

The struct member offsets.

public static final int
DMICMINTENT

The struct member offsets.

public static final int
DMICMMETHOD

The struct member offsets.

public static final int
DMLOGPIXELS

The struct member offsets.

public static final int
DMMEDIATYPE

The struct member offsets.

public static final int
DMNUP

The struct member offsets.

public static final int
DMORIENTATION

The struct member offsets.

public static final int
DMPANNINGHEIGHT

The struct member offsets.

public static final int
DMPANNINGWIDTH

The struct member offsets.

public static final int
DMPAPERLENGTH

The struct member offsets.

public static final int
DMPAPERSIZE

The struct member offsets.

public static final int
DMPAPERWIDTH

The struct member offsets.

public static final int
DMPELSHEIGHT

The struct member offsets.

public static final int
DMPELSWIDTH

The struct member offsets.

public static final int
DMPOSITION

The struct member offsets.

public static final int
DMPRINTQUALITY

The struct member offsets.

public static final int
DMRESERVED1

The struct member offsets.

public static final int
DMRESERVED2

The struct member offsets.

public static final int
DMSCALE

The struct member offsets.

public static final int
DMSIZE

The struct member offsets.

public static final int
DMSPECVERSION

The struct member offsets.

public static final int
DMTTOPTION

The struct member offsets.

public static final int
DMYRESOLUTION

The struct member offsets.

public static final int
SIZEOF

The struct size in bytes.

Inherited from org.lwjgl.system.Struct:
containerDEFAULT_ALIGN_ASDEFAULT_PACK_ALIGNMENT

Constructor Summary

AccessConstructor and Description
protected
DEVMODE(long address, ByteBuffer container)

public
DEVMODE(ByteBuffer container)

Creates a DEVMODE instance at the current position of the specified ByteBuffer container.

Method Summary

Modifier and TypeMethod and Description
public static DEVMODE
calloc()

Returns a new DEVMODE instance allocated with memCalloc.

public static DEVMODE.Buffer
calloc(int
the buffer capacity
capacity
)

Returns a new DEVMODE.Buffer instance allocated with memCalloc.

public static DEVMODE
calloc(MemoryStack
the stack from which to allocate
stack
)

Returns a new DEVMODE instance allocated on the specified MemoryStack and initializes all its bits to zero.

public static DEVMODE.Buffer
calloc(int
the buffer capacity
capacity
,
MemoryStack
the stack from which to allocate
stack
)

Returns a new DEVMODE.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.

public static DEVMODE
callocStack()

Deprecated
Deprecated for removal in 3.4.0.
public static DEVMODE
callocStack(MemoryStack stack)

Deprecated
Deprecated for removal in 3.4.0.
public static DEVMODE.Buffer
callocStack(int capacity)

Deprecated
Deprecated for removal in 3.4.0.
public static DEVMODE.Buffer
callocStack(int capacity, MemoryStack stack)

Deprecated
Deprecated for removal in 3.4.0.
protected DEVMODE
create(long
the struct memory address
address
,
ByteBuffer
an optional container buffer, to be referenced strongly by the struct instance.
container
)

Implements abstract org.lwjgl.system.Struct.create.

Similar to the constructor, but returns the exact type of the Struct subclass.
public static DEVMODE
create()

Returns a new DEVMODE instance allocated with BufferUtils.

public static DEVMODE
create(long address)

Returns a new DEVMODE instance for the specified memory address.

public static DEVMODE.Buffer
create(int
the buffer capacity
capacity
)

Returns a new DEVMODE.Buffer instance allocated with BufferUtils.

public static DEVMODE.Buffer
create(long
the memory address
address
,
int
the buffer capacity
capacity
)

Create a DEVMODE.Buffer instance at the specified memory.

public static DEVMODE
createSafe(long address)

Like create, but returns null if address is NULL.

public static DEVMODE.Buffer
createSafe(long address, int capacity)

Like create, but returns null if address is NULL.

public int
dmBitsPerPel()

specifies the color resolution, in bits per pixel, of the display device (for example: 4 bits for 16 colors, 8 bits for 256 colors, or 16 bits for 65,536 colors)

public short
dmCollate()

for printer devices only

public short
dmColor()

for printer devices only

public short
dmCopies()

for printer devices only

public short
dmDefaultSource()

for printer devices only

public ByteBuffer
dmDeviceName()

A zero-terminated character array that specifies the "friendly" name of the printer or display; for example, "PCL/HP LaserJet" in the case of PCL/HP LaserJet.

public String
dmDeviceNameString()

A zero-terminated character array that specifies the "friendly" name of the printer or display; for example, "PCL/HP LaserJet" in the case of PCL/HP LaserJet.

public int
dmDisplayFixedOutput()

for fixed-resolution display devices only, how the display presents a low-resolution mode on a higher-resolution display.

public int
dmDisplayFlags()

specifies the device's display mode, one or more of: GDI32#DM_INTERLACED, GDI32#DMDISPLAYFLAGS_TEXTMODE

public int
dmDisplayFrequency()

specifies the frequency, in hertz (cycles per second), of the display device in a particular mode.

public int
dmDisplayOrientation()

for display devices only, the orientation at which images should be presented.

public int
dmDitherType()

for printer devices only

public short
dmDriverExtra()

contains the number of bytes of private driver-data that follow this structure.

public DEVMODE
dmDriverExtra(short value)

Sets the specified value to the dmDriverExtra field.

public short
dmDriverVersion()

the driver version number assigned by the driver developer

public short
dmDuplex()

for printer devices only

public int
dmFields()

specifies whether certain members of the DEVMODE structure have been initialized.

public ByteBuffer
dmFormName()

for printer devices only

public String
dmFormNameString()

for printer devices only

public int
dmICMIntent()

for printer devices only

public int
dmICMMethod()

for printer devices only

public short
dmLogPixels()

the number of pixels per logical inch

public int
dmMediaType()

for printer devices only

public int
dmNup()

for printer devices only

public short
dmOrientation()

for printer devices only

public int
dmPanningHeight()

this member must be zero

public int
dmPanningWidth()

this member must be zero

public short
dmPaperLength()

for printer devices only

public short
dmPaperSize()

for printer devices only

public short
dmPaperWidth()

for printer devices only

public int
dmPelsHeight()

specifies the height, in pixels, of the visible device surface

public int
dmPelsWidth()

specifies the width, in pixels, of the visible device surface

public POINTL
dmPosition()

for display devices only, a POINTL structure that indicates the positional coordinates of the display device in reference to the desktop area.

public short
dmPrintQuality()

for printer devices only

public int
dmReserved1()

not used; must be zero

public int
dmReserved2()

not used; must be zero

public short
dmScale()

for printer devices only

public short
dmSize()

specifies the size, in bytes, of the DEVMODE structure, not including any private driver-specific data that might follow the structure's public members.

public DEVMODE
dmSize(short value)

Sets the specified value to the dmSize field.

public short
dmSpecVersion()

the version number of the initialization data specification on which the structure is based.

public DEVMODE
dmSpecVersion(short value)

Sets the specified value to the dmSpecVersion field.

public short
dmTTOption()

for printer devices only

public short
dmYResolution()

for printer devices only

public static DEVMODE
malloc()

Returns a new DEVMODE instance allocated with memAlloc.

public static DEVMODE.Buffer
malloc(int
the buffer capacity
capacity
)

Returns a new DEVMODE.Buffer instance allocated with memAlloc.

public static DEVMODE
malloc(MemoryStack
the stack from which to allocate
stack
)

Returns a new DEVMODE instance allocated on the specified MemoryStack.

public static DEVMODE.Buffer
malloc(int
the buffer capacity
capacity
,
MemoryStack
the stack from which to allocate
stack
)

Returns a new DEVMODE.Buffer instance allocated on the specified MemoryStack.

public static DEVMODE
mallocStack()

Deprecated
Deprecated for removal in 3.4.0.
public static DEVMODE
mallocStack(MemoryStack stack)

Deprecated
Deprecated for removal in 3.4.0.
public static DEVMODE.Buffer
mallocStack(int capacity)

Deprecated
Deprecated for removal in 3.4.0.
public static DEVMODE.Buffer
mallocStack(int capacity, MemoryStack stack)

Deprecated
Deprecated for removal in 3.4.0.
public static int
ndmBitsPerPel(long struct)

Unsafe version of dmBitsPerPel.

public static short
ndmCollate(long struct)

Unsafe version of dmCollate.

public static short
ndmColor(long struct)

Unsafe version of dmColor.

public static short
ndmCopies(long struct)

Unsafe version of dmCopies.

public static short
ndmDefaultSource(long struct)

Unsafe version of dmDefaultSource.

public static ByteBuffer
ndmDeviceName(long struct)

Unsafe version of dmDeviceName.

public static String
ndmDeviceNameString(long struct)

Unsafe version of dmDeviceNameString.

public static int
ndmDisplayFixedOutput(long struct)

Unsafe version of dmDisplayFixedOutput.

public static int
ndmDisplayFlags(long struct)

Unsafe version of dmDisplayFlags.

public static int
ndmDisplayFrequency(long struct)

Unsafe version of dmDisplayFrequency.

public static int
ndmDisplayOrientation(long struct)

Unsafe version of dmDisplayOrientation.

public static int
ndmDitherType(long struct)

Unsafe version of dmDitherType.

public static short
ndmDriverExtra(long struct)

Unsafe version of dmDriverExtra.

public static void
ndmDriverExtra(long struct, short value)

Unsafe version of dmDriverExtra.

public static short
ndmDriverVersion(long struct)

Unsafe version of dmDriverVersion.

public static short
ndmDuplex(long struct)

Unsafe version of dmDuplex.

public static int
ndmFields(long struct)

Unsafe version of dmFields.

public static ByteBuffer
ndmFormName(long struct)

Unsafe version of dmFormName.

public static String
ndmFormNameString(long struct)

Unsafe version of dmFormNameString.

public static int
ndmICMIntent(long struct)

Unsafe version of dmICMIntent.

public static int
ndmICMMethod(long struct)

Unsafe version of dmICMMethod.

public static short
ndmLogPixels(long struct)

Unsafe version of dmLogPixels.

public static int
ndmMediaType(long struct)

Unsafe version of dmMediaType.

public static int
ndmNup(long struct)

Unsafe version of dmNup.

public static short
ndmOrientation(long struct)

Unsafe version of dmOrientation.

public static int
ndmPanningHeight(long struct)

Unsafe version of dmPanningHeight.

public static int
ndmPanningWidth(long struct)

Unsafe version of dmPanningWidth.

public static short
ndmPaperLength(long struct)

Unsafe version of dmPaperLength.

public static short
ndmPaperSize(long struct)

Unsafe version of dmPaperSize.

public static short
ndmPaperWidth(long struct)

Unsafe version of dmPaperWidth.

public static int
ndmPelsHeight(long struct)

Unsafe version of dmPelsHeight.

public static int
ndmPelsWidth(long struct)

Unsafe version of dmPelsWidth.

public static POINTL
ndmPosition(long struct)

Unsafe version of dmPosition.

public static short
ndmPrintQuality(long struct)

Unsafe version of dmPrintQuality.

public static int
ndmReserved1(long struct)

Unsafe version of dmReserved1.

public static int
ndmReserved2(long struct)

Unsafe version of dmReserved2.

public static short
ndmScale(long struct)

Unsafe version of dmScale.

public static short
ndmSize(long struct)

Unsafe version of dmSize.

public static void
ndmSize(long struct, short value)

Unsafe version of dmSize.

public static short
ndmSpecVersion(long struct)

Unsafe version of dmSpecVersion.

public static void
ndmSpecVersion(long struct, short value)

Unsafe version of dmSpecVersion.

public static short
ndmTTOption(long struct)

Unsafe version of dmTTOption.

public static short
ndmYResolution(long struct)

Unsafe version of dmYResolution.

public DEVMODE

Returns:

this struct
set
(DEVMODE
the source struct
src
)

Copies the specified struct data to this struct.

public int
sizeof()

Implements abstract org.lwjgl.system.Struct.sizeof.

Returns sizeof(struct).
Inherited from org.lwjgl.system.Struct:
__array__array__array__checkContainer__checkMalloc__create__getContainer__getContainer__member__member__member__padding__padding__struct__struct__union__unionclearfreeisNullvalidate