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 thehIcon
member for an icon of the appropriate size to use as the small icon.
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 Modifier and Type Class and Description static class
WNDCLASSEX.Buffer
An array ofWNDCLASSEX
structs.-
Nested classes/interfaces inherited from interface org.lwjgl.system.Pointer
Pointer.Default
-
-
Field Summary
Fields Modifier and Type Field and Description static int
SIZEOF
The struct size in bytes.-
Fields inherited from interface org.lwjgl.system.Pointer
POINTER_SHIFT, POINTER_SIZE
-
-
Constructor Summary
Constructors Constructor and Description WNDCLASSEX(java.nio.ByteBuffer container)
Creates aWNDCLASSEX
instance at the current position of the specifiedByteBuffer
container.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method and Description static WNDCLASSEX
calloc()
Returns a newWNDCLASSEX
instance allocated withmemCalloc
.static WNDCLASSEX.Buffer
calloc(int capacity)
Returns a newWNDCLASSEX.Buffer
instance allocated withmemCalloc
.static WNDCLASSEX
callocStack()
Returns a newWNDCLASSEX
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static WNDCLASSEX.Buffer
callocStack(int capacity)
Returns a newWNDCLASSEX.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static WNDCLASSEX.Buffer
callocStack(int capacity, MemoryStack stack)
Returns a newWNDCLASSEX.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static WNDCLASSEX
callocStack(MemoryStack stack)
Returns a newWNDCLASSEX
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.int
cbClsExtra()
Returns the value of thecbClsExtra
field.WNDCLASSEX
cbClsExtra(int value)
Sets the specified value to thecbClsExtra
field.int
cbSize()
Returns the value of thecbSize
field.WNDCLASSEX
cbSize(int value)
Sets the specified value to thecbSize
field.int
cbWndExtra()
Returns the value of thecbWndExtra
field.WNDCLASSEX
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)
static WNDCLASSEX.Buffer
create(long address, int capacity)
Create aWNDCLASSEX.Buffer
instance at the specified memory.long
hbrBackground()
Returns the value of thehbrBackground
field.WNDCLASSEX
hbrBackground(long value)
Sets the specified value to thehbrBackground
field.long
hCursor()
Returns the value of thehCursor
field.WNDCLASSEX
hCursor(long value)
Sets the specified value to thehCursor
field.long
hIcon()
Returns the value of thehIcon
field.WNDCLASSEX
hIcon(long value)
Sets the specified value to thehIcon
field.long
hIconSm()
Returns the value of thehIconSm
field.WNDCLASSEX
hIconSm(long value)
Sets the specified value to thehIconSm
field.long
hInstance()
Returns the value of thehInstance
field.WNDCLASSEX
hInstance(long value)
Sets the specified value to thehInstance
field.WindowProc
lpfnWndProc()
Returns the value of thelpfnWndProc
field.WNDCLASSEX
lpfnWndProc(WindowProcI value)
Sets the specified value to thelpfnWndProc
field.java.nio.ByteBuffer
lpszClassName()
Returns aByteBuffer
view of the null-terminated string pointed to by thelpszClassName
field.WNDCLASSEX
lpszClassName(java.nio.ByteBuffer value)
Sets the address of the specified encoded string to thelpszClassName
field.java.lang.String
lpszClassNameString()
Decodes the null-terminated string pointed to by thelpszClassName
field.java.nio.ByteBuffer
lpszMenuName()
Returns aByteBuffer
view of the null-terminated string pointed to by thelpszMenuName
field.WNDCLASSEX
lpszMenuName(java.nio.ByteBuffer value)
Sets the address of the specified encoded string to thelpszMenuName
field.java.lang.String
lpszMenuNameString()
Decodes the null-terminated string pointed to by thelpszMenuName
field.static WNDCLASSEX
malloc()
Returns a newWNDCLASSEX
instance allocated withmemAlloc
.static WNDCLASSEX.Buffer
malloc(int capacity)
Returns a newWNDCLASSEX.Buffer
instance allocated withmemAlloc
.static WNDCLASSEX
mallocStack()
Returns a newWNDCLASSEX
instance allocated on the thread-localMemoryStack
.static WNDCLASSEX.Buffer
mallocStack(int capacity)
Returns a newWNDCLASSEX.Buffer
instance allocated on the thread-localMemoryStack
.static WNDCLASSEX.Buffer
mallocStack(int capacity, MemoryStack stack)
Returns a newWNDCLASSEX.Buffer
instance allocated on the specifiedMemoryStack
.static WNDCLASSEX
mallocStack(MemoryStack stack)
Returns a newWNDCLASSEX
instance allocated on the specifiedMemoryStack
.WNDCLASSEX
set(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.WNDCLASSEX
set(WNDCLASSEX src)
Copies the specified struct data to this struct.int
sizeof()
Returnssizeof(struct)
.int
style()
Returns the value of thestyle
field.WNDCLASSEX
style(int value)
Sets the specified value to thestyle
field.static void
validate(long struct)
Validates pointer members that should not beNULL
.static void
validate(long array, int count)
CallsWNDCLASSEX.validate(long)
for each struct contained in the specified struct array.-
Methods inherited from class org.lwjgl.system.Pointer.Default
address, equals, hashCode, toString
-
Methods inherited from interface org.lwjgl.system.NativeResource
close, free
-
-
-
-
Constructor Detail
-
WNDCLASSEX
public WNDCLASSEX(java.nio.ByteBuffer container)
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 Detail
-
sizeof
public int sizeof()
Description copied from class:Struct
Returnssizeof(struct)
.
-
cbSize
public int cbSize()
Returns the value of thecbSize
field.
-
style
public int style()
Returns the value of thestyle
field.
-
lpfnWndProc
public WindowProc lpfnWndProc()
Returns the value of thelpfnWndProc
field.
-
cbClsExtra
public int cbClsExtra()
Returns the value of thecbClsExtra
field.
-
cbWndExtra
public int cbWndExtra()
Returns the value of thecbWndExtra
field.
-
hInstance
public long hInstance()
Returns the value of thehInstance
field.
-
hIcon
public long hIcon()
Returns the value of thehIcon
field.
-
hCursor
public long hCursor()
Returns the value of thehCursor
field.
-
hbrBackground
public long hbrBackground()
Returns the value of thehbrBackground
field.
-
lpszMenuName
public java.nio.ByteBuffer lpszMenuName()
Returns aByteBuffer
view of the null-terminated string pointed to by thelpszMenuName
field.
-
lpszMenuNameString
public java.lang.String lpszMenuNameString()
Decodes the null-terminated string pointed to by thelpszMenuName
field.
-
lpszClassName
public java.nio.ByteBuffer lpszClassName()
Returns aByteBuffer
view of the null-terminated string pointed to by thelpszClassName
field.
-
lpszClassNameString
public java.lang.String lpszClassNameString()
Decodes the null-terminated string pointed to by thelpszClassName
field.
-
hIconSm
public long hIconSm()
Returns the value of thehIconSm
field.
-
cbSize
public WNDCLASSEX cbSize(int value)
Sets the specified value to thecbSize
field.
-
style
public WNDCLASSEX style(int value)
Sets the specified value to thestyle
field.
-
lpfnWndProc
public WNDCLASSEX lpfnWndProc(WindowProcI value)
Sets the specified value to thelpfnWndProc
field.
-
cbClsExtra
public WNDCLASSEX cbClsExtra(int value)
Sets the specified value to thecbClsExtra
field.
-
cbWndExtra
public WNDCLASSEX cbWndExtra(int value)
Sets the specified value to thecbWndExtra
field.
-
hInstance
public WNDCLASSEX hInstance(long value)
Sets the specified value to thehInstance
field.
-
hIcon
public WNDCLASSEX hIcon(long value)
Sets the specified value to thehIcon
field.
-
hCursor
public WNDCLASSEX hCursor(long value)
Sets the specified value to thehCursor
field.
-
hbrBackground
public WNDCLASSEX hbrBackground(long value)
Sets the specified value to thehbrBackground
field.
-
lpszMenuName
public WNDCLASSEX lpszMenuName(java.nio.ByteBuffer value)
Sets the address of the specified encoded string to thelpszMenuName
field.
-
lpszClassName
public WNDCLASSEX lpszClassName(java.nio.ByteBuffer value)
Sets the address of the specified encoded string to thelpszClassName
field.
-
hIconSm
public WNDCLASSEX hIconSm(long value)
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, 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 newWNDCLASSEX
instance allocated withmemAlloc
. The instance must be explicitly freed.
-
calloc
public static WNDCLASSEX calloc()
Returns a newWNDCLASSEX
instance allocated withmemCalloc
. The instance must be explicitly freed.
-
create
public static WNDCLASSEX create()
Returns a newWNDCLASSEX
instance allocated withBufferUtils
.
-
create
public static WNDCLASSEX create(long address)
-
malloc
public static WNDCLASSEX.Buffer malloc(int capacity)
Returns a newWNDCLASSEX.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
public static WNDCLASSEX.Buffer calloc(int capacity)
Returns a newWNDCLASSEX.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
public static WNDCLASSEX.Buffer create(int capacity)
Returns a newWNDCLASSEX.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
public static WNDCLASSEX.Buffer create(long address, int capacity)
Create aWNDCLASSEX.Buffer
instance at the specified memory.- Parameters:
address
- the memory addresscapacity
- the buffer capacity
-
mallocStack
public static WNDCLASSEX mallocStack()
Returns a newWNDCLASSEX
instance allocated on the thread-localMemoryStack
.
-
callocStack
public static WNDCLASSEX callocStack()
Returns a newWNDCLASSEX
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.
-
mallocStack
public static WNDCLASSEX mallocStack(MemoryStack stack)
Returns a newWNDCLASSEX
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
callocStack
public static WNDCLASSEX callocStack(MemoryStack stack)
Returns a newWNDCLASSEX
instance allocated on the specifiedMemoryStack
and 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.Buffer
instance allocated on the thread-localMemoryStack
.- Parameters:
capacity
- the buffer capacity
-
callocStack
public static WNDCLASSEX.Buffer callocStack(int capacity)
Returns a newWNDCLASSEX.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.- Parameters:
capacity
- the buffer capacity
-
mallocStack
public static WNDCLASSEX.Buffer mallocStack(int capacity, MemoryStack stack)
Returns a newWNDCLASSEX.Buffer
instance 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.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
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)
CallsWNDCLASSEX.validate(long)
for each struct contained in the specified struct array.- Parameters:
array
- the struct array to validatecount
- the number of structs inarray
-
-