Class WNDCLASSEX

All Implemented Interfaces:
AutoCloseable, NativeResource, Pointer

public class WNDCLASSEX extends Struct<WNDCLASSEX> implements NativeResource

 struct WNDCLASSEX {
     UINT cbSize;
     UINT style;
     {@link WindowProcI WNDPROC} lpfnWndProc;
     int cbClsExtra;
     int cbWndExtra;
     HINSTANCE hInstance;
     HICON hIcon;
     HCURSOR hCursor;
     HBRUSH hbrBackground;
     LPCTSTR lpszMenuName;
     LPCTSTR lpszClassName;
     HICON hIconSm;
 }
  • Field Details

    • SIZEOF

      public static final int SIZEOF
      The struct size in bytes.
    • ALIGNOF

      public static final int ALIGNOF
      The struct alignment in bytes.
    • CBSIZE

      public static final int CBSIZE
      The struct member offsets.
    • STYLE

      public static final int STYLE
      The struct member offsets.
    • LPFNWNDPROC

      public static final int LPFNWNDPROC
      The struct member offsets.
    • CBCLSEXTRA

      public static final int CBCLSEXTRA
      The struct member offsets.
    • CBWNDEXTRA

      public static final int CBWNDEXTRA
      The struct member offsets.
    • HINSTANCE

      public static final int HINSTANCE
      The struct member offsets.
    • HICON

      public static final int HICON
      The struct member offsets.
    • HCURSOR

      public static final int HCURSOR
      The struct member offsets.
    • HBRBACKGROUND

      public static final int HBRBACKGROUND
      The struct member offsets.
    • LPSZMENUNAME

      public static final int LPSZMENUNAME
      The struct member offsets.
    • LPSZCLASSNAME

      public static final int LPSZCLASSNAME
      The struct member offsets.
    • HICONSM

      public static final int HICONSM
      The struct member offsets.
  • Constructor Details

    • WNDCLASSEX

      public WNDCLASSEX(ByteBuffer container)
      Creates a WNDCLASSEX instance at the current position of the specified ByteBuffer 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()
      Description copied from class: Struct
      Returns sizeof(struct).
      Specified by:
      sizeof in class Struct<WNDCLASSEX>
    • cbSize

      public int cbSize()
      Returns:
      the value of the cbSize field.
    • style

      public int style()
      Returns:
      the value of the style field.
    • lpfnWndProc

      public WindowProc lpfnWndProc()
      Returns:
      the value of the lpfnWndProc field.
    • cbClsExtra

      public int cbClsExtra()
      Returns:
      the value of the cbClsExtra field.
    • cbWndExtra

      public int cbWndExtra()
      Returns:
      the value of the cbWndExtra field.
    • hInstance

      public long hInstance()
      Returns:
      the value of the hInstance field.
    • hIcon

      public long hIcon()
      Returns:
      the value of the hIcon field.
    • hCursor

      public long hCursor()
      Returns:
      the value of the hCursor field.
    • hbrBackground

      public long hbrBackground()
      Returns:
      the value of the hbrBackground field.
    • lpszMenuName

      public @Nullable ByteBuffer lpszMenuName()
      Returns:
      a ByteBuffer view of the null-terminated string pointed to by the lpszMenuName field.
    • lpszMenuNameString

      public @Nullable String lpszMenuNameString()
      Returns:
      the null-terminated string pointed to by the lpszMenuName field.
    • lpszClassName

      public ByteBuffer lpszClassName()
      Returns:
      a ByteBuffer view of the null-terminated string pointed to by the lpszClassName field.
    • lpszClassNameString

      public String lpszClassNameString()
      Returns:
      the null-terminated string pointed to by the lpszClassName field.
    • hIconSm

      public long hIconSm()
      Returns:
      the value of the hIconSm field.
    • cbSize

      public WNDCLASSEX cbSize(int value)
      Sets the specified value to the cbSize field.
    • style

      public WNDCLASSEX style(int value)
      Sets the specified value to the style field.
    • lpfnWndProc

      public WNDCLASSEX lpfnWndProc(WindowProcI value)
      Sets the specified value to the lpfnWndProc field.
    • cbClsExtra

      public WNDCLASSEX cbClsExtra(int value)
      Sets the specified value to the cbClsExtra field.
    • cbWndExtra

      public WNDCLASSEX cbWndExtra(int value)
      Sets the specified value to the cbWndExtra field.
    • hInstance

      public WNDCLASSEX hInstance(long value)
      Sets the specified value to the hInstance field.
    • hIcon

      public WNDCLASSEX hIcon(long value)
      Sets the specified value to the hIcon field.
    • hCursor

      public WNDCLASSEX hCursor(long value)
      Sets the specified value to the hCursor field.
    • hbrBackground

      public WNDCLASSEX hbrBackground(long value)
      Sets the specified value to the hbrBackground field.
    • lpszMenuName

      public WNDCLASSEX lpszMenuName(@Nullable ByteBuffer value)
      Sets the address of the specified encoded string to the lpszMenuName field.
    • lpszClassName

      public WNDCLASSEX lpszClassName(ByteBuffer value)
      Sets the address of the specified encoded string to the lpszClassName field.
    • hIconSm

      public WNDCLASSEX hIconSm(long value)
      Sets the specified value to the hIconSm 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

      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 new WNDCLASSEX instance allocated with memAlloc. The instance must be explicitly freed.
    • calloc

      public static WNDCLASSEX calloc()
      Returns a new WNDCLASSEX instance allocated with memCalloc. The instance must be explicitly freed.
    • create

      public static WNDCLASSEX create()
      Returns a new WNDCLASSEX instance allocated with BufferUtils.
    • create

      public static WNDCLASSEX create(long address)
      Returns a new WNDCLASSEX instance for the specified memory address.
    • createSafe

      public static @Nullable WNDCLASSEX createSafe(long address)
      Like create, but returns null if address is NULL.
    • malloc

      public static WNDCLASSEX.Buffer malloc(int capacity)
      Returns a new WNDCLASSEX.Buffer instance allocated with memAlloc. The instance must be explicitly freed.
      Parameters:
      capacity - the buffer capacity
    • calloc

      public static WNDCLASSEX.Buffer calloc(int capacity)
      Returns a new WNDCLASSEX.Buffer instance allocated with memCalloc. The instance must be explicitly freed.
      Parameters:
      capacity - the buffer capacity
    • create

      public static WNDCLASSEX.Buffer create(int capacity)
      Returns a new WNDCLASSEX.Buffer instance allocated with BufferUtils.
      Parameters:
      capacity - the buffer capacity
    • create

      public static WNDCLASSEX.Buffer create(long address, int capacity)
      Create a WNDCLASSEX.Buffer instance at the specified memory.
      Parameters:
      address - the memory address
      capacity - the buffer capacity
    • createSafe

      public static @Nullable WNDCLASSEX.Buffer createSafe(long address, int capacity)
      Like create, but returns null if address is NULL.
    • mallocStack

      @Deprecated public static WNDCLASSEX mallocStack()
      Deprecated.
      Deprecated for removal in 3.4.0. Use malloc(MemoryStack) instead.
    • callocStack

      @Deprecated public static WNDCLASSEX callocStack()
      Deprecated.
      Deprecated for removal in 3.4.0. Use calloc(MemoryStack) instead.
    • mallocStack

      @Deprecated public static WNDCLASSEX mallocStack(MemoryStack stack)
      Deprecated.
      Deprecated for removal in 3.4.0. Use malloc(MemoryStack) instead.
    • callocStack

      @Deprecated public static WNDCLASSEX callocStack(MemoryStack stack)
      Deprecated.
      Deprecated for removal in 3.4.0. Use calloc(MemoryStack) instead.
    • mallocStack

      @Deprecated public static WNDCLASSEX.Buffer mallocStack(int capacity)
      Deprecated.
      Deprecated for removal in 3.4.0. Use malloc(int, MemoryStack) instead.
    • callocStack

      @Deprecated public static WNDCLASSEX.Buffer callocStack(int capacity)
      Deprecated.
      Deprecated for removal in 3.4.0. Use calloc(int, MemoryStack) instead.
    • mallocStack

      @Deprecated public static WNDCLASSEX.Buffer mallocStack(int capacity, MemoryStack stack)
      Deprecated.
      Deprecated for removal in 3.4.0. Use malloc(int, MemoryStack) instead.
    • callocStack

      @Deprecated public static WNDCLASSEX.Buffer callocStack(int capacity, MemoryStack stack)
      Deprecated.
      Deprecated for removal in 3.4.0. Use calloc(int, MemoryStack) instead.
    • malloc

      public static WNDCLASSEX malloc(MemoryStack stack)
      Returns a new WNDCLASSEX instance allocated on the specified MemoryStack.
      Parameters:
      stack - the stack from which to allocate
    • calloc

      public static WNDCLASSEX calloc(MemoryStack stack)
      Returns a new WNDCLASSEX instance allocated on the specified MemoryStack and initializes all its bits to zero.
      Parameters:
      stack - the stack from which to allocate
    • malloc

      public static WNDCLASSEX.Buffer malloc(int capacity, MemoryStack stack)
      Returns a new WNDCLASSEX.Buffer instance allocated on the specified MemoryStack.
      Parameters:
      capacity - the buffer capacity
      stack - the stack from which to allocate
    • calloc

      public static WNDCLASSEX.Buffer calloc(int capacity, MemoryStack stack)
      Returns a new WNDCLASSEX.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.
      Parameters:
      capacity - the buffer capacity
      stack - the stack from which to allocate
    • ncbSize

      public static int ncbSize(long struct)
      Unsafe version of cbSize().
    • nstyle

      public static int nstyle(long struct)
      Unsafe version of style().
    • nlpfnWndProc

      public static WindowProc nlpfnWndProc(long struct)
      Unsafe version of lpfnWndProc().
    • ncbClsExtra

      public static int ncbClsExtra(long struct)
      Unsafe version of cbClsExtra().
    • ncbWndExtra

      public static int ncbWndExtra(long struct)
      Unsafe version of cbWndExtra().
    • nhInstance

      public static long nhInstance(long struct)
      Unsafe version of hInstance().
    • nhIcon

      public static long nhIcon(long struct)
      Unsafe version of hIcon().
    • nhCursor

      public static long nhCursor(long struct)
      Unsafe version of hCursor().
    • nhbrBackground

      public static long nhbrBackground(long struct)
      Unsafe version of hbrBackground().
    • nlpszMenuName

      public static @Nullable ByteBuffer nlpszMenuName(long struct)
      Unsafe version of lpszMenuName().
    • nlpszMenuNameString

      public static @Nullable String nlpszMenuNameString(long struct)
      Unsafe version of lpszMenuNameString().
    • nlpszClassName

      public static ByteBuffer nlpszClassName(long struct)
      Unsafe version of lpszClassName().
    • nlpszClassNameString

      public static String nlpszClassNameString(long struct)
      Unsafe version of lpszClassNameString().
    • nhIconSm

      public static long nhIconSm(long struct)
      Unsafe version of hIconSm().
    • ncbSize

      public static void ncbSize(long struct, int value)
      Unsafe version of cbSize.
    • nstyle

      public static void nstyle(long struct, int value)
      Unsafe version of style.
    • nlpfnWndProc

      public static void nlpfnWndProc(long struct, WindowProcI value)
      Unsafe version of lpfnWndProc.
    • ncbClsExtra

      public static void ncbClsExtra(long struct, int value)
      Unsafe version of cbClsExtra.
    • ncbWndExtra

      public static void ncbWndExtra(long struct, int value)
      Unsafe version of cbWndExtra.
    • nhInstance

      public static void nhInstance(long struct, long value)
      Unsafe version of hInstance.
    • nhIcon

      public static void nhIcon(long struct, long value)
      Unsafe version of hIcon.
    • nhCursor

      public static void nhCursor(long struct, long value)
      Unsafe version of hCursor.
    • nhbrBackground

      public static void nhbrBackground(long struct, long value)
      Unsafe version of hbrBackground.
    • nlpszMenuName

      public static void nlpszMenuName(long struct, @Nullable ByteBuffer value)
      Unsafe version of lpszMenuName.
    • nlpszClassName

      public static void nlpszClassName(long struct, ByteBuffer value)
      Unsafe version of lpszClassName.
    • nhIconSm

      public static void nhIconSm(long struct, long value)
      Unsafe version of hIconSm.
    • validate

      public static void validate(long struct)
      Validates pointer members that should not be NULL.
      Parameters:
      struct - the struct to validate