Class DEVMODE

    • Field Detail

      • SIZEOF

        The struct size in bytes.
      • ALIGNOF

        The struct alignment in bytes.
      • DMDEVICENAME, DMSPECVERSION, DMDRIVERVERSION, DMSIZE, DMDRIVEREXTRA, DMFIELDS, DMORIENTATION, DMPAPERSIZE, DMPAPERLENGTH, DMPAPERWIDTH, DMSCALE, DMCOPIES, DMDEFAULTSOURCE, DMPRINTQUALITY, DMPOSITION, DMDISPLAYORIENTATION, DMDISPLAYFIXEDOUTPUT, DMCOLOR, DMDUPLEX, DMYRESOLUTION, DMTTOPTION, DMCOLLATE, DMFORMNAME, DMLOGPIXELS, DMBITSPERPEL, DMPELSWIDTH, DMPELSHEIGHT, DMDISPLAYFLAGS, DMNUP, DMDISPLAYFREQUENCY, DMICMMETHOD, DMICMINTENT, DMMEDIATYPE, DMDITHERTYPE, DMRESERVED1, DMRESERVED2, DMPANNINGWIDTH, DMPANNINGHEIGHT

        The struct member offsets.
    • Constructor Detail

      • DEVMODE

        public DEVMODE​(java.nio.ByteBuffer container)
        Creates a DEVMODE instance at the current position of the specified ByteBuffer container. Changes to the buffer's content will be visible to the struct instance and vice versa.

        The created instance holds a strong reference to the container object.

    • Method Detail

      • sizeof

        public int sizeof()
        Specified by:
        sizeof in class org.lwjgl.system.Struct
      • dmDeviceName, dmDeviceNameString

        public java.nio.ByteBuffer dmDeviceName()
        
        public java.lang.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. This string is unique among device drivers. Note that this name may be truncated to fit in the dmDeviceName array.
      • dmSpecVersion

        public short dmSpecVersion()
        the version number of the initialization data specification on which the structure is based. To ensure the correct version is used for any operating system, use GDI32.DM_SPECVERSION.
      • dmDriverVersion

        public short dmDriverVersion()
        the driver version number assigned by the driver developer
      • dmSize

        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. Set this member to SIZEOF to indicate the version of the DEVMODE structure being used.
      • dmDriverExtra

        public short dmDriverExtra()
        contains the number of bytes of private driver-data that follow this structure. If a device driver does not use device-specific information, set this member to zero.
      • dmFields

        public int dmFields()
        specifies whether certain members of the DEVMODE structure have been initialized. If a member is initialized, its corresponding bit is set otherwise the bit is clear. A driver supports only those DEVMODE members that are appropriate for the printer or display technology.
      • dmOrientation, dmPaperSize, dmPaperLength, dmPaperWidth, dmScale, dmCopies, dmDefaultSource, dmPrintQuality

        public short dmOrientation()
        
        public short dmPaperSize()
        
        public short dmPaperLength()
        
        public short dmPaperWidth()
        
        public short dmScale()
        
        public short dmCopies()
        
        public short dmDefaultSource()
        
        public short dmPrintQuality()
        
        for printer devices only
      • dmPosition

        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. The primary display device is always located at coordinates (0,0).
      • dmDisplayFixedOutput

        public int dmDisplayFixedOutput()
        for fixed-resolution display devices only, how the display presents a low-resolution mode on a higher-resolution display. For example, if a display device's resolution is fixed at 1024 x 768 pixels but its mode is set to 640 x 480 pixels, the device can either display a 640 x 480 image somewhere in the interior of the 1024 x 768 screen space or stretch the 640 x 480 image to fill the larger screen space. If GDI32.DM_DISPLAYFIXEDOUTPUT is not set, this member must be zero. If GDI32.DM_DISPLAYFIXEDOUTPUT is set, this member must be one of the following values:
        GDI32.DMDFO_DEFAULT, GDI32.DMDFO_CENTER, GDI32.DMDFO_STRETCH
      • dmColor, dmDuplex, dmYResolution, dmTTOption, dmCollate, dmFormName, dmFormNameString

        public short dmColor()
        
        public short dmDuplex()
        
        public short dmYResolution()
        
        public short dmTTOption()
        
        public short dmCollate()
        
        public java.nio.ByteBuffer dmFormName()
        
        public java.lang.String dmFormNameString()
        
        for printer devices only
      • dmLogPixels

        public short dmLogPixels()
        the number of pixels per logical inch
      • dmBitsPerPel

        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)
      • dmPelsWidth

        public int dmPelsWidth()
        specifies the width, in pixels, of the visible device surface
      • dmPelsHeight

        public int dmPelsHeight()
        specifies the height, in pixels, of the visible device surface
      • dmNup

        public int dmNup()
        for printer devices only
      • dmDisplayFrequency

        public int dmDisplayFrequency()
        specifies the frequency, in hertz (cycles per second), of the display device in a particular mode. This value is also known as the display device's vertical refresh rate.

        When you call the User32.EnumDisplaySettingsEx(java.nio.ByteBuffer, int, org.lwjgl.system.windows.DEVMODE, int) function, the dmDisplayFrequency member may return with the value 0 or 1. These values represent the display hardware's default refresh rate. This default rate is typically set by switches on a display card or computer motherboard, or by a configuration program that does not use display functions such as ChangeDisplaySettingsEx.

      • dmICMMethod, dmICMIntent, dmMediaType, dmDitherType

        public int dmICMMethod()
        
        public int dmICMIntent()
        
        public int dmMediaType()
        
        public int dmDitherType()
        
        for printer devices only
      • dmReserved1, dmReserved2

        public int dmReserved1()
        
        public int dmReserved2()
        
        not used; must be zero
      • dmPanningWidth, dmPanningHeight

        public int dmPanningWidth()
        
        public int dmPanningHeight()
        
        this member must be zero
      • dmSpecVersion

        public DEVMODE dmSpecVersion​(short value)
        Sets the specified value to the dmSpecVersion() field.
      • dmSize

        public DEVMODE dmSize​(short value)
        Sets the specified value to the dmSize() field.
      • dmDriverExtra

        public DEVMODE dmDriverExtra​(short value)
        Sets the specified value to the dmDriverExtra() field.
      • set

        public DEVMODE set​(DEVMODE src)
        Copies the specified struct data to this struct.
        Parameters:
        src - the source struct
        Returns:
        this struct
      • malloc

        public static DEVMODE malloc()
        Returns a new DEVMODE instance allocated with memAlloc. The instance must be explicitly freed.
      • calloc

        public static DEVMODE calloc()
        Returns a new DEVMODE instance allocated with memCalloc. The instance must be explicitly freed.
      • create

        public static DEVMODE create()
        Returns a new DEVMODE instance allocated with BufferUtils.
      • create

        public static DEVMODE create​(long address)
        Returns a new DEVMODE instance for the specified memory address.
      • createSafe

        @Nullable
        public static DEVMODE createSafe​(long address)
        Like create, but returns null if address is NULL.
      • malloc

        public static DEVMODE.Buffer malloc​(int capacity)
        Returns a new DEVMODE.Buffer instance allocated with memAlloc. The instance must be explicitly freed.
        Parameters:
        capacity - the buffer capacity
      • calloc

        public static DEVMODE.Buffer calloc​(int capacity)
        Returns a new DEVMODE.Buffer instance allocated with memCalloc. The instance must be explicitly freed.
        Parameters:
        capacity - the buffer capacity
      • create

        public static DEVMODE.Buffer create​(int capacity)
        Returns a new DEVMODE.Buffer instance allocated with BufferUtils.
        Parameters:
        capacity - the buffer capacity
      • create

        public static DEVMODE.Buffer create​(long address,
                                            int capacity)
        Create a DEVMODE.Buffer instance at the specified memory.
        Parameters:
        address - the memory address
        capacity - the buffer capacity
      • createSafe

        @Nullable
        public static DEVMODE.Buffer createSafe​(long address,
                                                int capacity)
        Like create, but returns null if address is NULL.
      • mallocStack

        @Deprecated
        public static DEVMODE mallocStack()
        Deprecated.
        Deprecated for removal in 3.4.0. Use malloc(MemoryStack) instead.
      • callocStack

        @Deprecated
        public static DEVMODE callocStack()
        Deprecated.
        Deprecated for removal in 3.4.0. Use calloc(MemoryStack) instead.
      • mallocStack

        @Deprecated
        public static DEVMODE mallocStack​(org.lwjgl.system.MemoryStack stack)
        Deprecated.
        Deprecated for removal in 3.4.0. Use malloc(MemoryStack) instead.
      • callocStack

        @Deprecated
        public static DEVMODE callocStack​(org.lwjgl.system.MemoryStack stack)
        Deprecated.
        Deprecated for removal in 3.4.0. Use calloc(MemoryStack) instead.
      • mallocStack

        @Deprecated
        public static DEVMODE.Buffer mallocStack​(int capacity,
                                                 org.lwjgl.system.MemoryStack stack)
        Deprecated.
        Deprecated for removal in 3.4.0. Use malloc(int, MemoryStack) instead.
      • callocStack

        @Deprecated
        public static DEVMODE.Buffer callocStack​(int capacity,
                                                 org.lwjgl.system.MemoryStack stack)
        Deprecated.
        Deprecated for removal in 3.4.0. Use calloc(int, MemoryStack) instead.
      • malloc

        public static DEVMODE malloc​(org.lwjgl.system.MemoryStack stack)
        Returns a new DEVMODE instance allocated on the specified MemoryStack.
        Parameters:
        stack - the stack from which to allocate
      • calloc

        public static DEVMODE calloc​(org.lwjgl.system.MemoryStack stack)
        Returns a new DEVMODE instance allocated on the specified MemoryStack and initializes all its bits to zero.
        Parameters:
        stack - the stack from which to allocate
      • malloc

        public static DEVMODE.Buffer malloc​(int capacity,
                                            org.lwjgl.system.MemoryStack stack)
        Returns a new DEVMODE.Buffer instance allocated on the specified MemoryStack.
        Parameters:
        stack - the stack from which to allocate
        capacity - the buffer capacity
      • calloc

        public static DEVMODE.Buffer calloc​(int capacity,
                                            org.lwjgl.system.MemoryStack stack)
        Returns a new DEVMODE.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.
        Parameters:
        stack - the stack from which to allocate
        capacity - the buffer capacity
      • ndmDeviceName

        public static java.nio.ByteBuffer ndmDeviceName​(long struct)
        Unsafe version of dmDeviceName().
      • ndmDeviceNameString

        public static java.lang.String ndmDeviceNameString​(long struct)
        Unsafe version of dmDeviceNameString().
      • ndmSpecVersion

        public static short ndmSpecVersion​(long struct)
        Unsafe version of dmSpecVersion().
      • ndmDriverVersion

        public static short ndmDriverVersion​(long struct)
        Unsafe version of dmDriverVersion().
      • ndmSize

        public static short ndmSize​(long struct)
        Unsafe version of dmSize().
      • ndmDriverExtra

        public static short ndmDriverExtra​(long struct)
        Unsafe version of dmDriverExtra().
      • ndmFields

        public static int ndmFields​(long struct)
        Unsafe version of dmFields().
      • ndmOrientation

        public static short ndmOrientation​(long struct)
        Unsafe version of dmOrientation().
      • ndmPaperSize

        public static short ndmPaperSize​(long struct)
        Unsafe version of dmPaperSize().
      • ndmPaperLength

        public static short ndmPaperLength​(long struct)
        Unsafe version of dmPaperLength().
      • ndmPaperWidth

        public static short ndmPaperWidth​(long struct)
        Unsafe version of dmPaperWidth().
      • ndmScale

        public static short ndmScale​(long struct)
        Unsafe version of dmScale().
      • ndmCopies

        public static short ndmCopies​(long struct)
        Unsafe version of dmCopies().
      • ndmDefaultSource

        public static short ndmDefaultSource​(long struct)
        Unsafe version of dmDefaultSource().
      • ndmPrintQuality

        public static short ndmPrintQuality​(long struct)
        Unsafe version of dmPrintQuality().
      • ndmPosition

        public static POINTL ndmPosition​(long struct)
        Unsafe version of dmPosition().
      • ndmDisplayOrientation

        public static int ndmDisplayOrientation​(long struct)
        Unsafe version of dmDisplayOrientation().
      • ndmDisplayFixedOutput

        public static int ndmDisplayFixedOutput​(long struct)
        Unsafe version of dmDisplayFixedOutput().
      • ndmColor

        public static short ndmColor​(long struct)
        Unsafe version of dmColor().
      • ndmDuplex

        public static short ndmDuplex​(long struct)
        Unsafe version of dmDuplex().
      • ndmYResolution

        public static short ndmYResolution​(long struct)
        Unsafe version of dmYResolution().
      • ndmTTOption

        public static short ndmTTOption​(long struct)
        Unsafe version of dmTTOption().
      • ndmCollate

        public static short ndmCollate​(long struct)
        Unsafe version of dmCollate().
      • ndmFormName

        public static java.nio.ByteBuffer ndmFormName​(long struct)
        Unsafe version of dmFormName().
      • ndmFormNameString

        public static java.lang.String ndmFormNameString​(long struct)
        Unsafe version of dmFormNameString().
      • ndmLogPixels

        public static short ndmLogPixels​(long struct)
        Unsafe version of dmLogPixels().
      • ndmBitsPerPel

        public static int ndmBitsPerPel​(long struct)
        Unsafe version of dmBitsPerPel().
      • ndmPelsWidth

        public static int ndmPelsWidth​(long struct)
        Unsafe version of dmPelsWidth().
      • ndmPelsHeight

        public static int ndmPelsHeight​(long struct)
        Unsafe version of dmPelsHeight().
      • ndmDisplayFlags

        public static int ndmDisplayFlags​(long struct)
        Unsafe version of dmDisplayFlags().
      • ndmNup

        public static int ndmNup​(long struct)
        Unsafe version of dmNup().
      • ndmDisplayFrequency

        public static int ndmDisplayFrequency​(long struct)
        Unsafe version of dmDisplayFrequency().
      • ndmICMMethod

        public static int ndmICMMethod​(long struct)
        Unsafe version of dmICMMethod().
      • ndmICMIntent

        public static int ndmICMIntent​(long struct)
        Unsafe version of dmICMIntent().
      • ndmMediaType

        public static int ndmMediaType​(long struct)
        Unsafe version of dmMediaType().
      • ndmDitherType

        public static int ndmDitherType​(long struct)
        Unsafe version of dmDitherType().
      • ndmReserved1

        public static int ndmReserved1​(long struct)
        Unsafe version of dmReserved1().
      • ndmReserved2

        public static int ndmReserved2​(long struct)
        Unsafe version of dmReserved2().
      • ndmPanningWidth

        public static int ndmPanningWidth​(long struct)
        Unsafe version of dmPanningWidth().
      • ndmPanningHeight

        public static int ndmPanningHeight​(long struct)
        Unsafe version of dmPanningHeight().
      • ndmSpecVersion

        public static void ndmSpecVersion​(long struct,
                                          short value)
        Unsafe version of dmSpecVersion.
      • ndmSize

        public static void ndmSize​(long struct,
                                   short value)
        Unsafe version of dmSize.
      • ndmDriverExtra

        public static void ndmDriverExtra​(long struct,
                                          short value)
        Unsafe version of dmDriverExtra.