Package org.lwjgl.system.windows
Class GDI32
- java.lang.Object
-
- org.lwjgl.system.windows.GDI32
-
public class GDI32 extends java.lang.ObjectNative bindings to wingdi.h and gdi32.dll.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class and Description static classGDI32.FunctionsContains the function pointers loaded from the gdi32SharedLibrary.
-
Field Summary
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method and Description static intChoosePixelFormat(long hdc, PIXELFORMATDESCRIPTOR pixelFormatDescriptor)Attempts to match an appropriate pixel format supported by a device context to a given pixel format specification.static intDescribePixelFormat(long hdc, int pixelFormat, int bytes, PIXELFORMATDESCRIPTOR pixelFormatDescriptor)Obtains information about the pixel format identified by pixelFormat of the device associated with dc.static intDescribePixelFormat(long hdc, int pixelFormat, PIXELFORMATDESCRIPTOR pixelFormatDescriptor)Obtains information about the pixel format identified by pixelFormat of the device associated with dc.static SharedLibrarygetLibrary()Returns the gdi32SharedLibrary.static intGetPixelFormat(long hdc)Obtains the index of the currently selected pixel format of the specified device context.static booleanSetPixelFormat(long hdc, int pixelFormat, PIXELFORMATDESCRIPTOR pixelFormatDescriptor)Sets the pixel format of the specified device context to the format specified by the pixelFormat index.static booleanSwapBuffers(long dc)Exchanges the front and back buffers if the current pixel format for the window referenced by the specified device context includes a back buffer.
-
-
-
Field Detail
-
DISPLAY_DEVICE_ATTACHED_TO_DESKTOP
public static final int DISPLAY_DEVICE_ATTACHED_TO_DESKTOP
Display device state flags.- See Also:
- Constant Field Values
-
DISPLAY_DEVICE_MULTI_DRIVER
public static final int DISPLAY_DEVICE_MULTI_DRIVER
Display device state flags.- See Also:
- Constant Field Values
-
DISPLAY_DEVICE_PRIMARY_DEVICE
public static final int DISPLAY_DEVICE_PRIMARY_DEVICE
Display device state flags.- See Also:
- Constant Field Values
-
DISPLAY_DEVICE_MIRRORING_DRIVER
public static final int DISPLAY_DEVICE_MIRRORING_DRIVER
Display device state flags.- See Also:
- Constant Field Values
-
DISPLAY_DEVICE_VGA_COMPATIBLE
public static final int DISPLAY_DEVICE_VGA_COMPATIBLE
Display device state flags.- See Also:
- Constant Field Values
-
DISPLAY_DEVICE_REMOVABLE
public static final int DISPLAY_DEVICE_REMOVABLE
Display device state flags.- See Also:
- Constant Field Values
-
DISPLAY_DEVICE_MODESPRUNED
public static final int DISPLAY_DEVICE_MODESPRUNED
Display device state flags.- See Also:
- Constant Field Values
-
DISPLAY_DEVICE_REMOTE
public static final int DISPLAY_DEVICE_REMOTE
Display device state flags.- See Also:
- Constant Field Values
-
DISPLAY_DEVICE_DISCONNECT
public static final int DISPLAY_DEVICE_DISCONNECT
Display device state flags.- See Also:
- Constant Field Values
-
DISPLAY_DEVICE_TS_COMPATIBLE
public static final int DISPLAY_DEVICE_TS_COMPATIBLE
Display device state flags.- See Also:
- Constant Field Values
-
DISPLAY_DEVICE_UNSAFE_MODES_ON
public static final int DISPLAY_DEVICE_UNSAFE_MODES_ON
Display device state flags.- See Also:
- Constant Field Values
-
DISPLAY_DEVICE_ACTIVE
public static final int DISPLAY_DEVICE_ACTIVE
Child display device state flags.- See Also:
- Constant Field Values
-
DISPLAY_DEVICE_ATTACHED
public static final int DISPLAY_DEVICE_ATTACHED
Child display device state flags.- See Also:
- Constant Field Values
-
DM_SPECVERSION
public static final int DM_SPECVERSION
DEVMODEspecification version.- See Also:
- Constant Field Values
-
DM_ORIENTATION
public static final int DM_ORIENTATION
DEVMODEfield selection bits.- See Also:
- Constant Field Values
-
DM_PAPERSIZE
public static final int DM_PAPERSIZE
DEVMODEfield selection bits.- See Also:
- Constant Field Values
-
DM_PAPERLENGTH
public static final int DM_PAPERLENGTH
DEVMODEfield selection bits.- See Also:
- Constant Field Values
-
DM_PAPERWIDTH
public static final int DM_PAPERWIDTH
DEVMODEfield selection bits.- See Also:
- Constant Field Values
-
DM_SCALE
public static final int DM_SCALE
DEVMODEfield selection bits.- See Also:
- Constant Field Values
-
DM_POSITION
public static final int DM_POSITION
DEVMODEfield selection bits.- See Also:
- Constant Field Values
-
DM_NUP
public static final int DM_NUP
DEVMODEfield selection bits.- See Also:
- Constant Field Values
-
DM_DISPLAYORIENTATION
public static final int DM_DISPLAYORIENTATION
DEVMODEfield selection bits.- See Also:
- Constant Field Values
-
DM_COPIES
public static final int DM_COPIES
DEVMODEfield selection bits.- See Also:
- Constant Field Values
-
DM_DEFAULTSOURCE
public static final int DM_DEFAULTSOURCE
DEVMODEfield selection bits.- See Also:
- Constant Field Values
-
DM_PRINTQUALITY
public static final int DM_PRINTQUALITY
DEVMODEfield selection bits.- See Also:
- Constant Field Values
-
DM_COLOR
public static final int DM_COLOR
DEVMODEfield selection bits.- See Also:
- Constant Field Values
-
DM_DUPLEX
public static final int DM_DUPLEX
DEVMODEfield selection bits.- See Also:
- Constant Field Values
-
DM_YRESOLUTION
public static final int DM_YRESOLUTION
DEVMODEfield selection bits.- See Also:
- Constant Field Values
-
DM_TTOPTION
public static final int DM_TTOPTION
DEVMODEfield selection bits.- See Also:
- Constant Field Values
-
DM_COLLATE
public static final int DM_COLLATE
DEVMODEfield selection bits.- See Also:
- Constant Field Values
-
DM_FORMNAME
public static final int DM_FORMNAME
DEVMODEfield selection bits.- See Also:
- Constant Field Values
-
DM_LOGPIXELS
public static final int DM_LOGPIXELS
DEVMODEfield selection bits.- See Also:
- Constant Field Values
-
DM_BITSPERPEL
public static final int DM_BITSPERPEL
DEVMODEfield selection bits.- See Also:
- Constant Field Values
-
DM_PELSWIDTH
public static final int DM_PELSWIDTH
DEVMODEfield selection bits.- See Also:
- Constant Field Values
-
DM_PELSHEIGHT
public static final int DM_PELSHEIGHT
DEVMODEfield selection bits.- See Also:
- Constant Field Values
-
DM_DISPLAYFLAGS
public static final int DM_DISPLAYFLAGS
DEVMODEfield selection bits.- See Also:
- Constant Field Values
-
DM_DISPLAYFREQUENCY
public static final int DM_DISPLAYFREQUENCY
DEVMODEfield selection bits.- See Also:
- Constant Field Values
-
DM_ICMMETHOD
public static final int DM_ICMMETHOD
DEVMODEfield selection bits.- See Also:
- Constant Field Values
-
DM_ICMINTENT
public static final int DM_ICMINTENT
DEVMODEfield selection bits.- See Also:
- Constant Field Values
-
DM_MEDIATYPE
public static final int DM_MEDIATYPE
DEVMODEfield selection bits.- See Also:
- Constant Field Values
-
DM_DITHERTYPE
public static final int DM_DITHERTYPE
DEVMODEfield selection bits.- See Also:
- Constant Field Values
-
DM_PANNINGWIDTH
public static final int DM_PANNINGWIDTH
DEVMODEfield selection bits.- See Also:
- Constant Field Values
-
DM_PANNINGHEIGHT
public static final int DM_PANNINGHEIGHT
DEVMODEfield selection bits.- See Also:
- Constant Field Values
-
DM_DISPLAYFIXEDOUTPUT
public static final int DM_DISPLAYFIXEDOUTPUT
DEVMODEfield selection bits.- See Also:
- Constant Field Values
-
DMDO_DEFAULT
public static final int DMDO_DEFAULT
DEVMODEdmDisplayOrientationspecifications.- See Also:
- Constant Field Values
-
DMDO_90
public static final int DMDO_90
DEVMODEdmDisplayOrientationspecifications.- See Also:
- Constant Field Values
-
DMDO_180
public static final int DMDO_180
DEVMODEdmDisplayOrientationspecifications.- See Also:
- Constant Field Values
-
DMDO_270
public static final int DMDO_270
DEVMODEdmDisplayOrientationspecifications.- See Also:
- Constant Field Values
-
DMDFO_DEFAULT
public static final int DMDFO_DEFAULT
DEVMODEdmDisplayFixedOutputspecifications.- See Also:
- Constant Field Values
-
DMDFO_STRETCH
public static final int DMDFO_STRETCH
DEVMODEdmDisplayFixedOutputspecifications.- See Also:
- Constant Field Values
-
DMDFO_CENTER
public static final int DMDFO_CENTER
DEVMODEdmDisplayFixedOutputspecifications.- See Also:
- Constant Field Values
-
DM_INTERLACED
public static final int DM_INTERLACED
DEVMODEdmDisplayFlagsflags.- See Also:
- Constant Field Values
-
DMDISPLAYFLAGS_TEXTMODE
public static final int DMDISPLAYFLAGS_TEXTMODE
DEVMODEdmDisplayFlagsflags.- See Also:
- Constant Field Values
-
PFD_DOUBLEBUFFER
public static final int PFD_DOUBLEBUFFER
PIXELFORMATDESCRIPTORflags.- See Also:
- Constant Field Values
-
PFD_STEREO
public static final int PFD_STEREO
PIXELFORMATDESCRIPTORflags.- See Also:
- Constant Field Values
-
PFD_DRAW_TO_WINDOW
public static final int PFD_DRAW_TO_WINDOW
PIXELFORMATDESCRIPTORflags.- See Also:
- Constant Field Values
-
PFD_DRAW_TO_BITMAP
public static final int PFD_DRAW_TO_BITMAP
PIXELFORMATDESCRIPTORflags.- See Also:
- Constant Field Values
-
PFD_SUPPORT_GDI
public static final int PFD_SUPPORT_GDI
PIXELFORMATDESCRIPTORflags.- See Also:
- Constant Field Values
-
PFD_SUPPORT_OPENGL
public static final int PFD_SUPPORT_OPENGL
PIXELFORMATDESCRIPTORflags.- See Also:
- Constant Field Values
-
PFD_GENERIC_FORMAT
public static final int PFD_GENERIC_FORMAT
PIXELFORMATDESCRIPTORflags.- See Also:
- Constant Field Values
-
PFD_NEED_PALETTE
public static final int PFD_NEED_PALETTE
PIXELFORMATDESCRIPTORflags.- See Also:
- Constant Field Values
-
PFD_NEED_SYSTEM_PALETTE
public static final int PFD_NEED_SYSTEM_PALETTE
PIXELFORMATDESCRIPTORflags.- See Also:
- Constant Field Values
-
PFD_SWAP_EXCHANGE
public static final int PFD_SWAP_EXCHANGE
PIXELFORMATDESCRIPTORflags.- See Also:
- Constant Field Values
-
PFD_SWAP_COPY
public static final int PFD_SWAP_COPY
PIXELFORMATDESCRIPTORflags.- See Also:
- Constant Field Values
-
PFD_SWAP_LAYER_BUFFERS
public static final int PFD_SWAP_LAYER_BUFFERS
PIXELFORMATDESCRIPTORflags.- See Also:
- Constant Field Values
-
PFD_GENERIC_ACCELERATED
public static final int PFD_GENERIC_ACCELERATED
PIXELFORMATDESCRIPTORflags.- See Also:
- Constant Field Values
-
PFD_SUPPORT_DIRECTDRAW
public static final int PFD_SUPPORT_DIRECTDRAW
PIXELFORMATDESCRIPTORflags.- See Also:
- Constant Field Values
-
PFD_DIRECT3D_ACCELERATED
public static final int PFD_DIRECT3D_ACCELERATED
PIXELFORMATDESCRIPTORflags.- See Also:
- Constant Field Values
-
PFD_SUPPORT_COMPOSITION
public static final int PFD_SUPPORT_COMPOSITION
PIXELFORMATDESCRIPTORflags.- See Also:
- Constant Field Values
-
PFD_DEPTH_DONTCARE
public static final int PFD_DEPTH_DONTCARE
PIXELFORMATDESCRIPTORflags.- See Also:
- Constant Field Values
-
PFD_DOUBLEBUFFER_DONTCARE
public static final int PFD_DOUBLEBUFFER_DONTCARE
PIXELFORMATDESCRIPTORflags.- See Also:
- Constant Field Values
-
PFD_STEREO_DONTCARE
public static final int PFD_STEREO_DONTCARE
PIXELFORMATDESCRIPTORflags.- See Also:
- Constant Field Values
-
PFD_TYPE_RGBA
public static final byte PFD_TYPE_RGBA
PIXELFORMATDESCRIPTORpixel types.- See Also:
- Constant Field Values
-
PFD_TYPE_COLORINDEX
public static final byte PFD_TYPE_COLORINDEX
PIXELFORMATDESCRIPTORpixel types.- See Also:
- Constant Field Values
-
PFD_MAIN_PLANE
public static final byte PFD_MAIN_PLANE
PIXELFORMATDESCRIPTORlayer types.- See Also:
- Constant Field Values
-
PFD_OVERLAY_PLANE
public static final byte PFD_OVERLAY_PLANE
PIXELFORMATDESCRIPTORlayer types.- See Also:
- Constant Field Values
-
PFD_UNDERLAY_PLANE
public static final byte PFD_UNDERLAY_PLANE
PIXELFORMATDESCRIPTORlayer types.- See Also:
- Constant Field Values
-
-
Method Detail
-
getLibrary
public static SharedLibrary getLibrary()
Returns the gdi32SharedLibrary.
-
ChoosePixelFormat
public static int ChoosePixelFormat(long hdc, PIXELFORMATDESCRIPTOR pixelFormatDescriptor)Attempts to match an appropriate pixel format supported by a device context to a given pixel format specification.- Parameters:
hdc- the device context that the function examines to determine the best match for the pixel format descriptor pointed to bypixelFormatDescriptorpixelFormatDescriptor- aPIXELFORMATDESCRIPTORstructure that specifies the requested pixel format
-
DescribePixelFormat
public static int DescribePixelFormat(long hdc, int pixelFormat, int bytes, PIXELFORMATDESCRIPTOR pixelFormatDescriptor)Obtains information about the pixel format identified by pixelFormat of the device associated with dc. The function sets the members of thePIXELFORMATDESCRIPTORstructure pointed to by pixelFormatDescriptor with that pixel format data. The return value is the maximum pixel format index of the device context.- Parameters:
hdc- the device contextpixelFormat- index that specifies the pixel format. The pixel formats that a device context supports are identified by positive one-based integer indexes.bytes- the size, in bytes, of the structure pointed to bypixelFormatDescriptor. ThewglDescribePixelFormatfunction stores no more thanbytesbytes of data to that structure. Set this value toPIXELFORMATDESCRIPTOR.SIZEOF.pixelFormatDescriptor- aPIXELFORMATDESCRIPTORstructure whose members the function sets with pixel format data. The function stores the number of bytes copied to the structure in the structure'ssizemember. If, upon entry,pixelFormatDescriptorisNULL, the function writes no data to the structure. This is useful when you only want to obtain the maximum pixel format index of a device context.
-
DescribePixelFormat
public static int DescribePixelFormat(long hdc, int pixelFormat, PIXELFORMATDESCRIPTOR pixelFormatDescriptor)Obtains information about the pixel format identified by pixelFormat of the device associated with dc. The function sets the members of thePIXELFORMATDESCRIPTORstructure pointed to by pixelFormatDescriptor with that pixel format data. The return value is the maximum pixel format index of the device context.- Parameters:
hdc- the device contextpixelFormat- index that specifies the pixel format. The pixel formats that a device context supports are identified by positive one-based integer indexes.pixelFormatDescriptor- aPIXELFORMATDESCRIPTORstructure whose members the function sets with pixel format data. The function stores the number of bytes copied to the structure in the structure'ssizemember. If, upon entry,pixelFormatDescriptorisNULL, the function writes no data to the structure. This is useful when you only want to obtain the maximum pixel format index of a device context.
-
GetPixelFormat
public static int GetPixelFormat(long hdc)
Obtains the index of the currently selected pixel format of the specified device context.- Parameters:
hdc- the device context of the currently selected pixel format index returned by the function
-
SetPixelFormat
public static boolean SetPixelFormat(long hdc, int pixelFormat, PIXELFORMATDESCRIPTOR pixelFormatDescriptor)Sets the pixel format of the specified device context to the format specified by the pixelFormat index.- Parameters:
hdc- the device context whose pixel format the function attempts to setpixelFormat- index that identifies the pixel format to set. The various pixel formats supported by a device context are identified by one-based indexes.pixelFormatDescriptor- aPIXELFORMATDESCRIPTORstructure that contains the logical pixel format specification. The system's metafile component uses this structure to record the logical pixel format specification. The structure has no other effect upon the behavior of the SetPixelFormat function.
-
SwapBuffers
public static boolean SwapBuffers(long dc)
Exchanges the front and back buffers if the current pixel format for the window referenced by the specified device context includes a back buffer.- Parameters:
dc- a device context. If the current pixel format for the window referenced by this device context includes a back buffer, the function exchanges the front and back buffers.
-
-