Package org.lwjgl.system.windows
Class WNDCLASSEX
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.system.windows.WNDCLASSEX
-
- All Implemented Interfaces:
java.lang.AutoCloseable,NativeResource,Pointer
public class WNDCLASSEX extends Struct implements NativeResource
Contains the window class attributes that are registered by theUser32.RegisterClassEx(org.lwjgl.system.windows.WNDCLASSEX)function.Member documentation
cbSize– the size, in bytes, of this structurestyle– the class style(s)lpfnWndProc– a pointer to the window procedurecbClsExtra– the number of extra bytes to allocate following the window-class structure. The system initializes the bytes to zero.cbWndExtra– the number of extra bytes to allocate following the window instance. The system initializes the bytes to zero.hInstance– a handle to the instance that contains the window procedure for the classhIcon– a handle to the class icon. This member must be a handle to an icon resource. If this member isNULL, the system provides a default icon.hCursor– a handle to the class cursor. This member must be a handle to a cursor resource. If this member isNULL, an application must explicitly set the cursor shape whenever the mouse moves into the application's window.hbrBackground– a handle to the class background brush. This member can be a handle to the brush to be used for painting the background, or it can be a color value. When this member isNULL, an application must paint its own background whenever it is requested to paint in its client area.lpszMenuName– pointer to a null-terminated character string that specifies the resource name of the class menu, as the name appears in the resource file. If this member isNULL, windows belonging to this class have no default menu.lpszClassName– a pointer to a null-terminated string or is an atomhIconSm– a handle to a small icon that is associated with the window class. If this member isNULL, the system searches the icon resource specified by thehIconmember for an icon of the appropriate size to use as the small icon.
Layout
struct WNDCLASSEX { UINT cbSize; UINT style;WNDPROClpfnWndProc; int cbClsExtra; int cbWndExtra; HINSTANCE hInstance; HICON hIcon; HCURSOR hCursor; HBRUSH hbrBackground; LPCTSTR lpszMenuName; LPCTSTR lpszClassName; HICON hIconSm; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classWNDCLASSEX.BufferAn array ofWNDCLASSEXstructs.-
Nested classes/interfaces inherited from interface org.lwjgl.system.Pointer
Pointer.Default
-
-
Field Summary
Fields Modifier and Type Field Description static intALIGNOFThe struct alignment in bytes.static intCBCLSEXTRA
CBSIZE
CBWNDEXTRA
HBRBACKGROUND
HCURSOR
HICON
HICONSM
HINSTANCE
LPFNWNDPROC
LPSZCLASSNAME
LPSZMENUNAMEThe struct member offsets.static intSIZEOFThe struct size in bytes.static intSTYLEThe struct member offsets.-
Fields inherited from interface org.lwjgl.system.Pointer
BITS32, BITS64, CLONG_SHIFT, CLONG_SIZE, POINTER_SHIFT, POINTER_SIZE
-
-
Constructor Summary
Constructors Constructor Description WNDCLASSEX(java.nio.ByteBuffer container)Creates aWNDCLASSEXinstance at the current position of the specifiedByteBuffercontainer.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static WNDCLASSEXcalloc()Returns a newWNDCLASSEXinstance allocated withmemCalloc.static WNDCLASSEX.Buffercalloc(int capacity)Returns a newWNDCLASSEX.Bufferinstance allocated withmemCalloc.static WNDCLASSEXcallocStack()Returns a newWNDCLASSEXinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.static WNDCLASSEX.BuffercallocStack(int capacity)Returns a newWNDCLASSEX.Bufferinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.static WNDCLASSEX.BuffercallocStack(int capacity, MemoryStack stack)Returns a newWNDCLASSEX.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static WNDCLASSEXcallocStack(MemoryStack stack)Returns a newWNDCLASSEXinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.intcbClsExtra()Returns the value of thecbClsExtrafield.WNDCLASSEXcbClsExtra(int value)Sets the specified value to thecbClsExtrafield.intcbSize()Returns the value of thecbSizefield.WNDCLASSEXcbSize(int value)Sets the specified value to thecbSizefield.intcbWndExtra()Returns the value of thecbWndExtrafield.WNDCLASSEXcbWndExtra(int value)Sets the specified value to thecbWndExtrafield.static WNDCLASSEXcreate()Returns a newWNDCLASSEXinstance allocated withBufferUtils.static WNDCLASSEX.Buffercreate(int capacity)Returns a newWNDCLASSEX.Bufferinstance allocated withBufferUtils.static WNDCLASSEXcreate(long address)Returns a newWNDCLASSEXinstance for the specified memory address.static WNDCLASSEX.Buffercreate(long address, int capacity)Create aWNDCLASSEX.Bufferinstance at the specified memory.static WNDCLASSEXcreateSafe(long address)static WNDCLASSEX.BuffercreateSafe(long address, int capacity)longhbrBackground()Returns the value of thehbrBackgroundfield.WNDCLASSEXhbrBackground(long value)Sets the specified value to thehbrBackgroundfield.longhCursor()Returns the value of thehCursorfield.WNDCLASSEXhCursor(long value)Sets the specified value to thehCursorfield.longhIcon()Returns the value of thehIconfield.WNDCLASSEXhIcon(long value)Sets the specified value to thehIconfield.longhIconSm()Returns the value of thehIconSmfield.WNDCLASSEXhIconSm(long value)Sets the specified value to thehIconSmfield.longhInstance()Returns the value of thehInstancefield.WNDCLASSEXhInstance(long value)Sets the specified value to thehInstancefield.WindowProclpfnWndProc()Returns the value of thelpfnWndProcfield.WNDCLASSEXlpfnWndProc(WindowProcI value)Sets the specified value to thelpfnWndProcfield.java.nio.ByteBufferlpszClassName()Returns aByteBufferview of the null-terminated string pointed to by thelpszClassNamefield.WNDCLASSEXlpszClassName(java.nio.ByteBuffer value)Sets the address of the specified encoded string to thelpszClassNamefield.java.lang.StringlpszClassNameString()Decodes the null-terminated string pointed to by thelpszClassNamefield.java.nio.ByteBufferlpszMenuName()Returns aByteBufferview of the null-terminated string pointed to by thelpszMenuNamefield.WNDCLASSEXlpszMenuName(java.nio.ByteBuffer value)Sets the address of the specified encoded string to thelpszMenuNamefield.java.lang.StringlpszMenuNameString()Decodes the null-terminated string pointed to by thelpszMenuNamefield.static WNDCLASSEXmalloc()Returns a newWNDCLASSEXinstance allocated withmemAlloc.static WNDCLASSEX.Buffermalloc(int capacity)Returns a newWNDCLASSEX.Bufferinstance allocated withmemAlloc.static WNDCLASSEXmallocStack()Returns a newWNDCLASSEXinstance allocated on the thread-localMemoryStack.static WNDCLASSEX.BuffermallocStack(int capacity)Returns a newWNDCLASSEX.Bufferinstance allocated on the thread-localMemoryStack.static WNDCLASSEX.BuffermallocStack(int capacity, MemoryStack stack)Returns a newWNDCLASSEX.Bufferinstance allocated on the specifiedMemoryStack.static WNDCLASSEXmallocStack(MemoryStack stack)Returns a newWNDCLASSEXinstance allocated on the specifiedMemoryStack.static intncbClsExtra(long struct)Unsafe version ofcbClsExtra().static voidncbClsExtra(long struct, int value)Unsafe version ofcbClsExtra.static intncbSize(long struct)Unsafe version ofcbSize().static voidncbSize(long struct, int value)Unsafe version ofcbSize.static intncbWndExtra(long struct)Unsafe version ofcbWndExtra().static voidncbWndExtra(long struct, int value)Unsafe version ofcbWndExtra.static longnhbrBackground(long struct)Unsafe version ofhbrBackground().static voidnhbrBackground(long struct, long value)Unsafe version ofhbrBackground.static longnhCursor(long struct)Unsafe version ofhCursor().static voidnhCursor(long struct, long value)Unsafe version ofhCursor.static longnhIcon(long struct)Unsafe version ofhIcon().static voidnhIcon(long struct, long value)Unsafe version ofhIcon.static longnhIconSm(long struct)Unsafe version ofhIconSm().static voidnhIconSm(long struct, long value)Unsafe version ofhIconSm.static longnhInstance(long struct)Unsafe version ofhInstance().static voidnhInstance(long struct, long value)Unsafe version ofhInstance.static WindowProcnlpfnWndProc(long struct)Unsafe version oflpfnWndProc().static voidnlpfnWndProc(long struct, WindowProcI value)Unsafe version oflpfnWndProc.static java.nio.ByteBuffernlpszClassName(long struct)Unsafe version oflpszClassName().static voidnlpszClassName(long struct, java.nio.ByteBuffer value)Unsafe version oflpszClassName.static java.lang.StringnlpszClassNameString(long struct)Unsafe version oflpszClassNameString().static java.nio.ByteBuffernlpszMenuName(long struct)Unsafe version oflpszMenuName().static voidnlpszMenuName(long struct, java.nio.ByteBuffer value)Unsafe version oflpszMenuName.static java.lang.StringnlpszMenuNameString(long struct)Unsafe version oflpszMenuNameString().static intnstyle(long struct)Unsafe version ofstyle().static voidnstyle(long struct, int value)Unsafe version ofstyle.WNDCLASSEXset(int cbSize, int style, WindowProcI lpfnWndProc, int cbClsExtra, int cbWndExtra, long hInstance, long hIcon, long hCursor, long hbrBackground, java.nio.ByteBuffer lpszMenuName, java.nio.ByteBuffer lpszClassName, long hIconSm)Initializes this struct with the specified values.WNDCLASSEXset(WNDCLASSEX src)Copies the specified struct data to this struct.intsizeof()Returnssizeof(struct).intstyle()Returns the value of thestylefield.WNDCLASSEXstyle(int value)Sets the specified value to thestylefield.static voidvalidate(long struct)Validates pointer members that should not beNULL.static voidvalidate(long array, int count)Callsvalidate(long)for each struct contained in the specified struct array.-
Methods inherited from interface org.lwjgl.system.NativeResource
close, free
-
Methods inherited from class org.lwjgl.system.Pointer.Default
address, equals, hashCode, toString
-
-
-
-
Constructor Detail
-
WNDCLASSEX
public WNDCLASSEX(java.nio.ByteBuffer container)
Creates aWNDCLASSEXinstance at the current position of the specifiedByteBuffercontainer. 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()
Description copied from class:StructReturnssizeof(struct).
-
cbSize
public int cbSize()
Returns the value of thecbSizefield.
-
style
public int style()
Returns the value of thestylefield.
-
lpfnWndProc
public WindowProc lpfnWndProc()
Returns the value of thelpfnWndProcfield.
-
cbClsExtra
public int cbClsExtra()
Returns the value of thecbClsExtrafield.
-
cbWndExtra
public int cbWndExtra()
Returns the value of thecbWndExtrafield.
-
hInstance
public long hInstance()
Returns the value of thehInstancefield.
-
hIcon
public long hIcon()
Returns the value of thehIconfield.
-
hCursor
public long hCursor()
Returns the value of thehCursorfield.
-
hbrBackground
public long hbrBackground()
Returns the value of thehbrBackgroundfield.
-
lpszMenuName
@Nullable public java.nio.ByteBuffer lpszMenuName()
Returns aByteBufferview of the null-terminated string pointed to by thelpszMenuNamefield.
-
lpszMenuNameString
@Nullable public java.lang.String lpszMenuNameString()
Decodes the null-terminated string pointed to by thelpszMenuNamefield.
-
lpszClassName
public java.nio.ByteBuffer lpszClassName()
Returns aByteBufferview of the null-terminated string pointed to by thelpszClassNamefield.
-
lpszClassNameString
public java.lang.String lpszClassNameString()
Decodes the null-terminated string pointed to by thelpszClassNamefield.
-
hIconSm
public long hIconSm()
Returns the value of thehIconSmfield.
-
cbSize
public WNDCLASSEX cbSize(int value)
Sets the specified value to thecbSizefield.
-
style
public WNDCLASSEX style(int value)
Sets the specified value to thestylefield.
-
lpfnWndProc
public WNDCLASSEX lpfnWndProc(WindowProcI value)
Sets the specified value to thelpfnWndProcfield.
-
cbClsExtra
public WNDCLASSEX cbClsExtra(int value)
Sets the specified value to thecbClsExtrafield.
-
cbWndExtra
public WNDCLASSEX cbWndExtra(int value)
Sets the specified value to thecbWndExtrafield.
-
hInstance
public WNDCLASSEX hInstance(long value)
Sets the specified value to thehInstancefield.
-
hIcon
public WNDCLASSEX hIcon(long value)
Sets the specified value to thehIconfield.
-
hCursor
public WNDCLASSEX hCursor(long value)
Sets the specified value to thehCursorfield.
-
hbrBackground
public WNDCLASSEX hbrBackground(long value)
Sets the specified value to thehbrBackgroundfield.
-
lpszMenuName
public WNDCLASSEX lpszMenuName(@Nullable java.nio.ByteBuffer value)
Sets the address of the specified encoded string to thelpszMenuNamefield.
-
lpszClassName
public WNDCLASSEX lpszClassName(java.nio.ByteBuffer value)
Sets the address of the specified encoded string to thelpszClassNamefield.
-
hIconSm
public WNDCLASSEX hIconSm(long value)
Sets the specified value to thehIconSmfield.
-
set
public WNDCLASSEX set(int cbSize, int style, WindowProcI lpfnWndProc, int cbClsExtra, int cbWndExtra, long hInstance, long hIcon, long hCursor, long hbrBackground, @Nullable java.nio.ByteBuffer lpszMenuName, java.nio.ByteBuffer lpszClassName, long hIconSm)
Initializes this struct with the specified values.
-
set
public WNDCLASSEX set(WNDCLASSEX src)
Copies the specified struct data to this struct.- Parameters:
src- the source struct- Returns:
- this struct
-
malloc
public static WNDCLASSEX malloc()
Returns a newWNDCLASSEXinstance allocated withmemAlloc. The instance must be explicitly freed.
-
calloc
public static WNDCLASSEX calloc()
Returns a newWNDCLASSEXinstance allocated withmemCalloc. The instance must be explicitly freed.
-
create
public static WNDCLASSEX create()
Returns a newWNDCLASSEXinstance allocated withBufferUtils.
-
create
public static WNDCLASSEX create(long address)
Returns a newWNDCLASSEXinstance for the specified memory address.
-
createSafe
@Nullable public static WNDCLASSEX createSafe(long address)
-
malloc
public static WNDCLASSEX.Buffer malloc(int capacity)
Returns a newWNDCLASSEX.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
public static WNDCLASSEX.Buffer calloc(int capacity)
Returns a newWNDCLASSEX.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
public static WNDCLASSEX.Buffer create(int capacity)
Returns a newWNDCLASSEX.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
public static WNDCLASSEX.Buffer create(long address, int capacity)
Create aWNDCLASSEX.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
@Nullable public static WNDCLASSEX.Buffer createSafe(long address, int capacity)
-
mallocStack
public static WNDCLASSEX mallocStack()
Returns a newWNDCLASSEXinstance allocated on the thread-localMemoryStack.
-
callocStack
public static WNDCLASSEX callocStack()
Returns a newWNDCLASSEXinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.
-
mallocStack
public static WNDCLASSEX mallocStack(MemoryStack stack)
Returns a newWNDCLASSEXinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
callocStack
public static WNDCLASSEX callocStack(MemoryStack stack)
Returns a newWNDCLASSEXinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
mallocStack
public static WNDCLASSEX.Buffer mallocStack(int capacity)
Returns a newWNDCLASSEX.Bufferinstance allocated on the thread-localMemoryStack.- Parameters:
capacity- the buffer capacity
-
callocStack
public static WNDCLASSEX.Buffer callocStack(int capacity)
Returns a newWNDCLASSEX.Bufferinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.- Parameters:
capacity- the buffer capacity
-
mallocStack
public static WNDCLASSEX.Buffer mallocStack(int capacity, MemoryStack stack)
Returns a newWNDCLASSEX.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
callocStack
public static WNDCLASSEX.Buffer callocStack(int capacity, MemoryStack stack)
Returns a newWNDCLASSEX.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
ncbSize
public static int ncbSize(long struct)
Unsafe version ofcbSize().
-
nstyle
public static int nstyle(long struct)
Unsafe version ofstyle().
-
nlpfnWndProc
public static WindowProc nlpfnWndProc(long struct)
Unsafe version oflpfnWndProc().
-
ncbClsExtra
public static int ncbClsExtra(long struct)
Unsafe version ofcbClsExtra().
-
ncbWndExtra
public static int ncbWndExtra(long struct)
Unsafe version ofcbWndExtra().
-
nhInstance
public static long nhInstance(long struct)
Unsafe version ofhInstance().
-
nhIcon
public static long nhIcon(long struct)
Unsafe version ofhIcon().
-
nhCursor
public static long nhCursor(long struct)
Unsafe version ofhCursor().
-
nhbrBackground
public static long nhbrBackground(long struct)
Unsafe version ofhbrBackground().
-
nlpszMenuName
@Nullable public static java.nio.ByteBuffer nlpszMenuName(long struct)
Unsafe version oflpszMenuName().
-
nlpszMenuNameString
@Nullable public static java.lang.String nlpszMenuNameString(long struct)
Unsafe version oflpszMenuNameString().
-
nlpszClassName
public static java.nio.ByteBuffer nlpszClassName(long struct)
Unsafe version oflpszClassName().
-
nlpszClassNameString
public static java.lang.String nlpszClassNameString(long struct)
Unsafe version oflpszClassNameString().
-
nhIconSm
public static long nhIconSm(long struct)
Unsafe version ofhIconSm().
-
ncbSize
public static void ncbSize(long struct, int value)Unsafe version ofcbSize.
-
nstyle
public static void nstyle(long struct, int value)Unsafe version ofstyle.
-
nlpfnWndProc
public static void nlpfnWndProc(long struct, WindowProcI value)Unsafe version oflpfnWndProc.
-
ncbClsExtra
public static void ncbClsExtra(long struct, int value)Unsafe version ofcbClsExtra.
-
ncbWndExtra
public static void ncbWndExtra(long struct, int value)Unsafe version ofcbWndExtra.
-
nhInstance
public static void nhInstance(long struct, long value)Unsafe version ofhInstance.
-
nhIcon
public static void nhIcon(long struct, long value)Unsafe version ofhIcon.
-
nhCursor
public static void nhCursor(long struct, long value)Unsafe version ofhCursor.
-
nhbrBackground
public static void nhbrBackground(long struct, long value)Unsafe version ofhbrBackground.
-
nlpszMenuName
public static void nlpszMenuName(long struct, @Nullable java.nio.ByteBuffer value)Unsafe version oflpszMenuName.
-
nlpszClassName
public static void nlpszClassName(long struct, java.nio.ByteBuffer value)Unsafe version oflpszClassName.
-
nhIconSm
public static void nhIconSm(long struct, long value)Unsafe version ofhIconSm.
-
validate
public static void validate(long struct)
Validates pointer members that should not beNULL.- Parameters:
struct- the struct to validate
-
validate
public static void validate(long array, int count)Callsvalidate(long)for each struct contained in the specified struct array.- Parameters:
array- the struct array to validatecount- the number of structs inarray
-
-