Class XSetWindowAttributes

All Implemented Interfaces:
AutoCloseable, NativeResource, Pointer

public class XSetWindowAttributes extends Struct<XSetWindowAttributes> implements NativeResource
Data structure for setting window attributes.

Layout


 struct XSetWindowAttributes {
     Pixmap background_pixmap;
     unsigned long background_pixel;
     Pixmap border_pixmap;
     unsigned long border_pixel;
     int bit_gravity;
     int win_gravity;
     int backing_store;
     unsigned long backing_planes;
     unsigned long backing_pixel;
     Bool save_under;
     long event_mask;
     long do_not_propagate_mask;
     Bool override_redirect;
     Colormap colormap;
     Cursor cursor;
 }
  • Field Details

    • SIZEOF

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

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

      public static final int BACKGROUND_PIXMAP
      The struct member offsets.
    • BACKGROUND_PIXEL

      public static final int BACKGROUND_PIXEL
      The struct member offsets.
    • BORDER_PIXMAP

      public static final int BORDER_PIXMAP
      The struct member offsets.
    • BORDER_PIXEL

      public static final int BORDER_PIXEL
      The struct member offsets.
    • BIT_GRAVITY

      public static final int BIT_GRAVITY
      The struct member offsets.
    • WIN_GRAVITY

      public static final int WIN_GRAVITY
      The struct member offsets.
    • BACKING_STORE

      public static final int BACKING_STORE
      The struct member offsets.
    • BACKING_PLANES

      public static final int BACKING_PLANES
      The struct member offsets.
    • BACKING_PIXEL

      public static final int BACKING_PIXEL
      The struct member offsets.
    • SAVE_UNDER

      public static final int SAVE_UNDER
      The struct member offsets.
    • EVENT_MASK

      public static final int EVENT_MASK
      The struct member offsets.
    • DO_NOT_PROPAGATE_MASK

      public static final int DO_NOT_PROPAGATE_MASK
      The struct member offsets.
    • OVERRIDE_REDIRECT

      public static final int OVERRIDE_REDIRECT
      The struct member offsets.
    • COLORMAP

      public static final int COLORMAP
      The struct member offsets.
    • CURSOR

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

    • XSetWindowAttributes

      public XSetWindowAttributes(ByteBuffer container)
      Creates a XSetWindowAttributes 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<XSetWindowAttributes>
    • background_pixmap

      public long background_pixmap()
      Returns:
      the value of the background_pixmap field.
    • background_pixel

      public long background_pixel()
      Returns:
      the value of the background_pixel field.
    • border_pixmap

      public long border_pixmap()
      Returns:
      the value of the border_pixmap field.
    • border_pixel

      public long border_pixel()
      Returns:
      the value of the border_pixel field.
    • bit_gravity

      public int bit_gravity()
      Returns:
      the value of the bit_gravity field.
    • win_gravity

      public int win_gravity()
      Returns:
      the value of the win_gravity field.
    • backing_store

      public int backing_store()
      Returns:
      the value of the backing_store field.
    • backing_planes

      public long backing_planes()
      Returns:
      the value of the backing_planes field.
    • backing_pixel

      public long backing_pixel()
      Returns:
      the value of the backing_pixel field.
    • save_under

      public boolean save_under()
      Returns:
      the value of the save_under field.
    • event_mask

      public long event_mask()
      Returns:
      the value of the event_mask field.
    • do_not_propagate_mask

      public long do_not_propagate_mask()
      Returns:
      the value of the do_not_propagate_mask field.
    • override_redirect

      public boolean override_redirect()
      Returns:
      the value of the override_redirect field.
    • colormap

      public long colormap()
      Returns:
      the value of the colormap field.
    • cursor

      public long cursor()
      Returns:
      the value of the cursor field.
    • background_pixmap

      public XSetWindowAttributes background_pixmap(long value)
      Sets the specified value to the background_pixmap field.
    • background_pixel

      public XSetWindowAttributes background_pixel(long value)
      Sets the specified value to the background_pixel field.
    • border_pixmap

      public XSetWindowAttributes border_pixmap(long value)
      Sets the specified value to the border_pixmap field.
    • border_pixel

      public XSetWindowAttributes border_pixel(long value)
      Sets the specified value to the border_pixel field.
    • bit_gravity

      public XSetWindowAttributes bit_gravity(int value)
      Sets the specified value to the bit_gravity field.
    • win_gravity

      public XSetWindowAttributes win_gravity(int value)
      Sets the specified value to the win_gravity field.
    • backing_store

      public XSetWindowAttributes backing_store(int value)
      Sets the specified value to the backing_store field.
    • backing_planes

      public XSetWindowAttributes backing_planes(long value)
      Sets the specified value to the backing_planes field.
    • backing_pixel

      public XSetWindowAttributes backing_pixel(long value)
      Sets the specified value to the backing_pixel field.
    • save_under

      public XSetWindowAttributes save_under(boolean value)
      Sets the specified value to the save_under field.
    • event_mask

      public XSetWindowAttributes event_mask(long value)
      Sets the specified value to the event_mask field.
    • do_not_propagate_mask

      public XSetWindowAttributes do_not_propagate_mask(long value)
      Sets the specified value to the do_not_propagate_mask field.
    • override_redirect

      public XSetWindowAttributes override_redirect(boolean value)
      Sets the specified value to the override_redirect field.
    • colormap

      public XSetWindowAttributes colormap(long value)
      Sets the specified value to the colormap field.
    • cursor

      public XSetWindowAttributes cursor(long value)
      Sets the specified value to the cursor field.
    • set

      public XSetWindowAttributes set(long background_pixmap, long background_pixel, long border_pixmap, long border_pixel, int bit_gravity, int win_gravity, int backing_store, long backing_planes, long backing_pixel, boolean save_under, long event_mask, long do_not_propagate_mask, boolean override_redirect, long colormap, long cursor)
      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

      public static XSetWindowAttributes malloc()
      Returns a new XSetWindowAttributes instance allocated with memAlloc. The instance must be explicitly freed.
    • calloc

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      public static XSetWindowAttributes.Buffer calloc(int capacity, MemoryStack stack)
      Returns a new XSetWindowAttributes.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
    • nbackground_pixmap

      public static long nbackground_pixmap(long struct)
      Unsafe version of background_pixmap().
    • nbackground_pixel

      public static long nbackground_pixel(long struct)
      Unsafe version of background_pixel().
    • nborder_pixmap

      public static long nborder_pixmap(long struct)
      Unsafe version of border_pixmap().
    • nborder_pixel

      public static long nborder_pixel(long struct)
      Unsafe version of border_pixel().
    • nbit_gravity

      public static int nbit_gravity(long struct)
      Unsafe version of bit_gravity().
    • nwin_gravity

      public static int nwin_gravity(long struct)
      Unsafe version of win_gravity().
    • nbacking_store

      public static int nbacking_store(long struct)
      Unsafe version of backing_store().
    • nbacking_planes

      public static long nbacking_planes(long struct)
      Unsafe version of backing_planes().
    • nbacking_pixel

      public static long nbacking_pixel(long struct)
      Unsafe version of backing_pixel().
    • nsave_under

      public static int nsave_under(long struct)
      Unsafe version of save_under().
    • nevent_mask

      public static long nevent_mask(long struct)
      Unsafe version of event_mask().
    • ndo_not_propagate_mask

      public static long ndo_not_propagate_mask(long struct)
      Unsafe version of do_not_propagate_mask().
    • noverride_redirect

      public static int noverride_redirect(long struct)
      Unsafe version of override_redirect().
    • ncolormap

      public static long ncolormap(long struct)
      Unsafe version of colormap().
    • ncursor

      public static long ncursor(long struct)
      Unsafe version of cursor().
    • nbackground_pixmap

      public static void nbackground_pixmap(long struct, long value)
      Unsafe version of background_pixmap.
    • nbackground_pixel

      public static void nbackground_pixel(long struct, long value)
      Unsafe version of background_pixel.
    • nborder_pixmap

      public static void nborder_pixmap(long struct, long value)
      Unsafe version of border_pixmap.
    • nborder_pixel

      public static void nborder_pixel(long struct, long value)
      Unsafe version of border_pixel.
    • nbit_gravity

      public static void nbit_gravity(long struct, int value)
      Unsafe version of bit_gravity.
    • nwin_gravity

      public static void nwin_gravity(long struct, int value)
      Unsafe version of win_gravity.
    • nbacking_store

      public static void nbacking_store(long struct, int value)
      Unsafe version of backing_store.
    • nbacking_planes

      public static void nbacking_planes(long struct, long value)
      Unsafe version of backing_planes.
    • nbacking_pixel

      public static void nbacking_pixel(long struct, long value)
      Unsafe version of backing_pixel.
    • nsave_under

      public static void nsave_under(long struct, int value)
      Unsafe version of save_under.
    • nevent_mask

      public static void nevent_mask(long struct, long value)
      Unsafe version of event_mask.
    • ndo_not_propagate_mask

      public static void ndo_not_propagate_mask(long struct, long value)
      Unsafe version of do_not_propagate_mask.
    • noverride_redirect

      public static void noverride_redirect(long struct, int value)
      Unsafe version of override_redirect.
    • ncolormap

      public static void ncolormap(long struct, long value)
      Unsafe version of colormap.
    • ncursor

      public static void ncursor(long struct, long value)
      Unsafe version of cursor.