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 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 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 intnChoosePixelFormat(long hdc, long pixelFormatDescriptor)Unsafe version of:ChoosePixelFormat(long, org.lwjgl.system.windows.PIXELFORMATDESCRIPTOR)static intnChoosePixelFormat(long hdc, long pixelFormatDescriptor, long __functionAddress)Unsafe version of:ChoosePixelFormat(long, org.lwjgl.system.windows.PIXELFORMATDESCRIPTOR)static intnDescribePixelFormat(long hdc, int pixelFormat, int bytes, long pixelFormatDescriptor)static intnDescribePixelFormat(long hdc, int pixelFormat, int bytes, long pixelFormatDescriptor, long __functionAddress)static intnGetPixelFormat(long hdc, long __functionAddress)Unsafe version of:GetPixelFormat(long)static intnSetPixelFormat(long hdc, int pixelFormat, long pixelFormatDescriptor)Unsafe version of:SetPixelFormat(long, int, org.lwjgl.system.windows.PIXELFORMATDESCRIPTOR)static intnSetPixelFormat(long hdc, int pixelFormat, long pixelFormatDescriptor, long __functionAddress)Unsafe version of:SetPixelFormat(long, int, org.lwjgl.system.windows.PIXELFORMATDESCRIPTOR)static intnSwapBuffers(long dc, long __functionAddress)Unsafe version of:SwapBuffers(long)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, DISPLAY_DEVICE_MULTI_DRIVER, DISPLAY_DEVICE_PRIMARY_DEVICE, DISPLAY_DEVICE_MIRRORING_DRIVER, DISPLAY_DEVICE_VGA_COMPATIBLE, DISPLAY_DEVICE_REMOVABLE, DISPLAY_DEVICE_MODESPRUNED, DISPLAY_DEVICE_REMOTE, DISPLAY_DEVICE_DISCONNECT, DISPLAY_DEVICE_TS_COMPATIBLE, DISPLAY_DEVICE_UNSAFE_MODES_ON
Display device state flags.
-
DISPLAY_DEVICE_ACTIVE, DISPLAY_DEVICE_ATTACHED
Child display device state flags.
-
DM_SPECVERSION
DEVMODEspecification version.
-
DM_ORIENTATION, DM_PAPERSIZE, DM_PAPERLENGTH, DM_PAPERWIDTH, DM_SCALE, DM_POSITION, DM_NUP, DM_DISPLAYORIENTATION, DM_COPIES, DM_DEFAULTSOURCE, DM_PRINTQUALITY, DM_COLOR, DM_DUPLEX, DM_YRESOLUTION, DM_TTOPTION, DM_COLLATE, DM_FORMNAME, DM_LOGPIXELS, DM_BITSPERPEL, DM_PELSWIDTH, DM_PELSHEIGHT, DM_DISPLAYFLAGS, DM_DISPLAYFREQUENCY, DM_ICMMETHOD, DM_ICMINTENT, DM_MEDIATYPE, DM_DITHERTYPE, DM_PANNINGWIDTH, DM_PANNINGHEIGHT, DM_DISPLAYFIXEDOUTPUT
DEVMODEfield selection bits.
-
DMDO_DEFAULT, DMDO_90, DMDO_180, DMDO_270
DEVMODEdmDisplayOrientationspecifications.
-
DMDFO_DEFAULT, DMDFO_STRETCH, DMDFO_CENTER
DEVMODEdmDisplayFixedOutputspecifications.
-
DM_INTERLACED, DMDISPLAYFLAGS_TEXTMODE
DEVMODEdmDisplayFlagsflags.
-
PFD_DOUBLEBUFFER, PFD_STEREO, PFD_DRAW_TO_WINDOW, PFD_DRAW_TO_BITMAP, PFD_SUPPORT_GDI, PFD_SUPPORT_OPENGL, PFD_GENERIC_FORMAT, PFD_NEED_PALETTE, PFD_NEED_SYSTEM_PALETTE, PFD_SWAP_EXCHANGE, PFD_SWAP_COPY, PFD_SWAP_LAYER_BUFFERS, PFD_GENERIC_ACCELERATED, PFD_SUPPORT_DIRECTDRAW, PFD_DIRECT3D_ACCELERATED, PFD_SUPPORT_COMPOSITION, PFD_DEPTH_DONTCARE, PFD_DOUBLEBUFFER_DONTCARE, PFD_STEREO_DONTCARE
PIXELFORMATDESCRIPTORflags.
-
PFD_TYPE_RGBA, PFD_TYPE_COLORINDEX
PIXELFORMATDESCRIPTORpixel types.
-
PFD_MAIN_PLANE, PFD_OVERLAY_PLANE, PFD_UNDERLAY_PLANE
PIXELFORMATDESCRIPTORlayer types.
-
-
Method Detail
-
getLibrary
public static SharedLibrary getLibrary()
Returns the gdi32SharedLibrary.
-
nChoosePixelFormat
public static int nChoosePixelFormat(long hdc, long pixelFormatDescriptor, long __functionAddress) public static int nChoosePixelFormat(long hdc, long pixelFormatDescriptor)Unsafe version of:ChoosePixelFormat(long, org.lwjgl.system.windows.PIXELFORMATDESCRIPTOR)
-
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
-
nDescribePixelFormat
public static int nDescribePixelFormat(long hdc, int pixelFormat, int bytes, long pixelFormatDescriptor, long __functionAddress) public static int nDescribePixelFormat(long hdc, int pixelFormat, int bytes, long pixelFormatDescriptor)
-
DescribePixelFormat
public static int DescribePixelFormat(long hdc, int pixelFormat, int bytes, @Nullable 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, @Nullable 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.
-
nGetPixelFormat
public static int nGetPixelFormat(long hdc, long __functionAddress)Unsafe version of:GetPixelFormat(long)
-
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
-
nSetPixelFormat
public static int nSetPixelFormat(long hdc, int pixelFormat, long pixelFormatDescriptor, long __functionAddress) public static int nSetPixelFormat(long hdc, int pixelFormat, long pixelFormatDescriptor)Unsafe version of:SetPixelFormat(long, int, org.lwjgl.system.windows.PIXELFORMATDESCRIPTOR)
-
SetPixelFormat
public static boolean SetPixelFormat(long hdc, int pixelFormat, @Nullable 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.
-
nSwapBuffers
public static int nSwapBuffers(long dc, long __functionAddress)Unsafe version of:SwapBuffers(long)
-
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.
-
-