Package org.lwjgl.system.windows
Class WNDCLASSEX
java.lang.Object
org.lwjgl.system.Pointer.Default
org.lwjgl.system.Struct<WNDCLASSEX>
org.lwjgl.system.windows.WNDCLASSEX
- All Implemented Interfaces:
AutoCloseable
,org.lwjgl.system.NativeResource
,org.lwjgl.system.Pointer
public class WNDCLASSEX
extends org.lwjgl.system.Struct<WNDCLASSEX>
implements org.lwjgl.system.NativeResource
Contains the window class attributes that are registered by the
User32.RegisterClassEx(org.lwjgl.system.windows.WNDCLASSEX)
function.
Layout
struct WNDCLASSEX {
UINT cbSize()
;
UINT style()
;
WNDPROC
lpfnWndProc()
;
int cbClsExtra()
;
int cbWndExtra()
;
HINSTANCE hInstance()
;
HICON hIcon()
;
HCURSOR hCursor()
;
HBRUSH hbrBackground()
;
LPCTSTR lpszMenuName()
;
LPCTSTR lpszClassName()
;
HICON hIconSm()
;
}
-
Nested Class Summary
Nested classes/interfaces inherited from class org.lwjgl.system.Struct
org.lwjgl.system.Struct.StructValidation
Nested classes/interfaces inherited from interface org.lwjgl.system.Pointer
org.lwjgl.system.Pointer.Default
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
The struct alignment in bytes.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct size in bytes.static final int
The struct member offsets.Fields inherited from interface org.lwjgl.system.Pointer
BITS32, BITS64, CLONG_SHIFT, CLONG_SIZE, POINTER_SHIFT, POINTER_SIZE
-
Constructor Summary
ConstructorDescriptionWNDCLASSEX
(ByteBuffer container) Creates aWNDCLASSEX
instance at the current position of the specifiedByteBuffer
container. -
Method Summary
Modifier and TypeMethodDescriptionstatic WNDCLASSEX
calloc()
Returns a newWNDCLASSEX
instance allocated withmemCalloc
.static WNDCLASSEX.Buffer
calloc
(int capacity) Returns a newWNDCLASSEX.Buffer
instance allocated withmemCalloc
.static WNDCLASSEX.Buffer
calloc
(int capacity, org.lwjgl.system.MemoryStack stack) Returns a newWNDCLASSEX.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static WNDCLASSEX
calloc
(org.lwjgl.system.MemoryStack stack) Returns a newWNDCLASSEX
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static WNDCLASSEX
Deprecated.static WNDCLASSEX.Buffer
callocStack
(int capacity) Deprecated.static WNDCLASSEX.Buffer
callocStack
(int capacity, org.lwjgl.system.MemoryStack stack) Deprecated.static WNDCLASSEX
callocStack
(org.lwjgl.system.MemoryStack stack) Deprecated.int
the number of extra bytes to allocate following the window-class structure.cbClsExtra
(int value) Sets the specified value to thecbClsExtra()
field.int
cbSize()
the size, in bytes, of this structurecbSize
(int value) Sets the specified value to thecbSize()
field.int
the number of extra bytes to allocate following the window instance.cbWndExtra
(int value) Sets the specified value to thecbWndExtra()
field.static WNDCLASSEX
create()
Returns a newWNDCLASSEX
instance allocated withBufferUtils
.static WNDCLASSEX.Buffer
create
(int capacity) Returns a newWNDCLASSEX.Buffer
instance allocated withBufferUtils
.static WNDCLASSEX
create
(long address) Returns a newWNDCLASSEX
instance for the specified memory address.static WNDCLASSEX.Buffer
create
(long address, int capacity) Create aWNDCLASSEX.Buffer
instance at the specified memory.static WNDCLASSEX
createSafe
(long address) static WNDCLASSEX.Buffer
createSafe
(long address, int capacity) long
a handle to the class background brush.hbrBackground
(long value) Sets the specified value to thehbrBackground()
field.long
hCursor()
a handle to the class cursor.hCursor
(long value) Sets the specified value to thehCursor()
field.long
hIcon()
a handle to the class icon.hIcon
(long value) Sets the specified value to thehIcon()
field.long
hIconSm()
a handle to a small icon that is associated with the window class.hIconSm
(long value) Sets the specified value to thehIconSm()
field.long
a handle to the instance that contains the window procedure for the classhInstance
(long value) Sets the specified value to thehInstance()
field.a pointer to the window procedurelpfnWndProc
(WindowProcI value) Sets the specified value to thelpfnWndProc()
field.a pointer to a null-terminated string or is an atomlpszClassName
(ByteBuffer value) Sets the address of the specified encoded string to thelpszClassName()
field.a pointer to a null-terminated string or is an atompointer to a null-terminated character string that specifies the resource name of the class menu, as the name appears in the resource file.lpszMenuName
(ByteBuffer value) Sets the address of the specified encoded string to thelpszMenuName()
field.pointer to a null-terminated character string that specifies the resource name of the class menu, as the name appears in the resource file.static WNDCLASSEX
malloc()
Returns a newWNDCLASSEX
instance allocated withmemAlloc
.static WNDCLASSEX.Buffer
malloc
(int capacity) Returns a newWNDCLASSEX.Buffer
instance allocated withmemAlloc
.static WNDCLASSEX.Buffer
malloc
(int capacity, org.lwjgl.system.MemoryStack stack) Returns a newWNDCLASSEX.Buffer
instance allocated on the specifiedMemoryStack
.static WNDCLASSEX
malloc
(org.lwjgl.system.MemoryStack stack) Returns a newWNDCLASSEX
instance allocated on the specifiedMemoryStack
.static WNDCLASSEX
Deprecated.static WNDCLASSEX.Buffer
mallocStack
(int capacity) Deprecated.static WNDCLASSEX.Buffer
mallocStack
(int capacity, org.lwjgl.system.MemoryStack stack) Deprecated.static WNDCLASSEX
mallocStack
(org.lwjgl.system.MemoryStack stack) Deprecated.static int
ncbClsExtra
(long struct) Unsafe version ofcbClsExtra()
.static void
ncbClsExtra
(long struct, int value) Unsafe version ofcbClsExtra
.static int
ncbSize
(long struct) Unsafe version ofcbSize()
.static void
ncbSize
(long struct, int value) Unsafe version ofcbSize
.static int
ncbWndExtra
(long struct) Unsafe version ofcbWndExtra()
.static void
ncbWndExtra
(long struct, int value) Unsafe version ofcbWndExtra
.static long
nhbrBackground
(long struct) Unsafe version ofhbrBackground()
.static void
nhbrBackground
(long struct, long value) Unsafe version ofhbrBackground
.static long
nhCursor
(long struct) Unsafe version ofhCursor()
.static void
nhCursor
(long struct, long value) Unsafe version ofhCursor
.static long
nhIcon
(long struct) Unsafe version ofhIcon()
.static void
nhIcon
(long struct, long value) Unsafe version ofhIcon
.static long
nhIconSm
(long struct) Unsafe version ofhIconSm()
.static void
nhIconSm
(long struct, long value) Unsafe version ofhIconSm
.static long
nhInstance
(long struct) Unsafe version ofhInstance()
.static void
nhInstance
(long struct, long value) Unsafe version ofhInstance
.static WindowProc
nlpfnWndProc
(long struct) Unsafe version oflpfnWndProc()
.static void
nlpfnWndProc
(long struct, WindowProcI value) Unsafe version oflpfnWndProc
.static ByteBuffer
nlpszClassName
(long struct) Unsafe version oflpszClassName()
.static void
nlpszClassName
(long struct, ByteBuffer value) Unsafe version oflpszClassName
.static String
nlpszClassNameString
(long struct) Unsafe version oflpszClassNameString()
.static ByteBuffer
nlpszMenuName
(long struct) Unsafe version oflpszMenuName()
.static void
nlpszMenuName
(long struct, ByteBuffer value) Unsafe version oflpszMenuName
.static String
nlpszMenuNameString
(long struct) Unsafe version oflpszMenuNameString()
.static int
nstyle
(long struct) Unsafe version ofstyle()
.static void
nstyle
(long struct, int value) Unsafe version ofstyle
.set
(int cbSize, int style, WindowProcI lpfnWndProc, int cbClsExtra, int cbWndExtra, long hInstance, long hIcon, long hCursor, long hbrBackground, ByteBuffer lpszMenuName, ByteBuffer lpszClassName, long hIconSm) Initializes this struct with the specified values.set
(WNDCLASSEX src) Copies the specified struct data to this struct.int
sizeof()
int
style()
the class style(s)style
(int value) Sets the specified value to thestyle()
field.static void
validate
(long struct) Validates pointer members that should not beNULL
.Methods inherited from class org.lwjgl.system.Struct
clear, free, isNull, validate
Methods inherited from class org.lwjgl.system.Pointer.Default
address, equals, hashCode, toString
Methods inherited from interface org.lwjgl.system.NativeResource
close, free
-
Field Details
-
SIZEOF
public static final int SIZEOFThe struct size in bytes. -
ALIGNOF
public static final int ALIGNOFThe struct alignment in bytes. -
CBSIZE
public static final int CBSIZEThe struct member offsets. -
STYLE
public static final int STYLEThe struct member offsets. -
LPFNWNDPROC
public static final int LPFNWNDPROCThe struct member offsets. -
CBCLSEXTRA
public static final int CBCLSEXTRAThe struct member offsets. -
CBWNDEXTRA
public static final int CBWNDEXTRAThe struct member offsets. -
HINSTANCE
public static final int HINSTANCEThe struct member offsets. -
HICON
public static final int HICONThe struct member offsets. -
HCURSOR
public static final int HCURSORThe struct member offsets. -
HBRBACKGROUND
public static final int HBRBACKGROUNDThe struct member offsets. -
LPSZMENUNAME
public static final int LPSZMENUNAMEThe struct member offsets. -
LPSZCLASSNAME
public static final int LPSZCLASSNAMEThe struct member offsets. -
HICONSM
public static final int HICONSMThe struct member offsets.
-
-
Constructor Details
-
WNDCLASSEX
Creates aWNDCLASSEX
instance at the current position of the specifiedByteBuffer
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 Details
-
sizeof
public int sizeof()- Specified by:
sizeof
in classorg.lwjgl.system.Struct<WNDCLASSEX>
-
cbSize
public int cbSize()the size, in bytes, of this structure -
style
public int style()the class style(s) -
lpfnWndProc
a pointer to the window procedure -
cbClsExtra
public int cbClsExtra()the number of extra bytes to allocate following the window-class structure. The system initializes the bytes to zero. -
cbWndExtra
public int cbWndExtra()the number of extra bytes to allocate following the window instance. The system initializes the bytes to zero. -
hInstance
public long hInstance()a handle to the instance that contains the window procedure for the class -
hIcon
public long hIcon()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
public long 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
public long 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. -
lpszMenuNameString
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 atom -
lpszClassNameString
a pointer to a null-terminated string or is an atom -
hIconSm
public long hIconSm()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 thehIcon
member for an icon of the appropriate size to use as the small icon. -
cbSize
Sets the specified value to thecbSize()
field. -
style
Sets the specified value to thestyle()
field. -
lpfnWndProc
Sets the specified value to thelpfnWndProc()
field. -
cbClsExtra
Sets the specified value to thecbClsExtra()
field. -
cbWndExtra
Sets the specified value to thecbWndExtra()
field. -
hInstance
Sets the specified value to thehInstance()
field. -
hIcon
Sets the specified value to thehIcon()
field. -
hCursor
Sets the specified value to thehCursor()
field. -
hbrBackground
Sets the specified value to thehbrBackground()
field. -
lpszMenuName
Sets the address of the specified encoded string to thelpszMenuName()
field. -
lpszClassName
Sets the address of the specified encoded string to thelpszClassName()
field. -
hIconSm
Sets the specified value to thehIconSm()
field. -
set
public WNDCLASSEX set(int cbSize, int style, WindowProcI lpfnWndProc, int cbClsExtra, int cbWndExtra, long hInstance, long hIcon, long hCursor, long hbrBackground, @Nullable ByteBuffer lpszMenuName, ByteBuffer lpszClassName, long hIconSm) Initializes this struct with the specified values. -
set
Copies the specified struct data to this struct.- Parameters:
src
- the source struct- Returns:
- this struct
-
malloc
Returns a newWNDCLASSEX
instance allocated withmemAlloc
. The instance must be explicitly freed. -
calloc
Returns a newWNDCLASSEX
instance allocated withmemCalloc
. The instance must be explicitly freed. -
create
Returns a newWNDCLASSEX
instance allocated withBufferUtils
. -
create
Returns a newWNDCLASSEX
instance for the specified memory address. -
createSafe
-
malloc
Returns a newWNDCLASSEX.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
Returns a newWNDCLASSEX.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
Returns a newWNDCLASSEX.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
Create aWNDCLASSEX.Buffer
instance at the specified memory.- Parameters:
address
- the memory addresscapacity
- the buffer capacity
-
createSafe
-
mallocStack
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)
instead. -
callocStack
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)
instead. -
mallocStack
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)
instead. -
callocStack
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)
instead. -
mallocStack
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)
instead. -
callocStack
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)
instead. -
mallocStack
@Deprecated public static WNDCLASSEX.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack) Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)
instead. -
callocStack
@Deprecated public static WNDCLASSEX.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack) Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)
instead. -
malloc
Returns a newWNDCLASSEX
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
calloc
Returns a newWNDCLASSEX
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocate
-
malloc
Returns a newWNDCLASSEX.Buffer
instance allocated on the specifiedMemoryStack
.- Parameters:
capacity
- the buffer capacitystack
- the stack from which to allocate
-
calloc
Returns a newWNDCLASSEX.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
capacity
- the buffer capacitystack
- the stack from which to allocate
-
ncbSize
public static int ncbSize(long struct) Unsafe version ofcbSize()
. -
nstyle
public static int nstyle(long struct) Unsafe version ofstyle()
. -
nlpfnWndProc
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
Unsafe version oflpszMenuName()
. -
nlpszMenuNameString
Unsafe version oflpszMenuNameString()
. -
nlpszClassName
Unsafe version oflpszClassName()
. -
nlpszClassNameString
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
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
Unsafe version oflpszMenuName
. -
nlpszClassName
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
-