Class NotificationBitmap

  • All Implemented Interfaces:
    java.lang.AutoCloseable, NativeResource, Pointer

    public class NotificationBitmap
    extends Struct
    implements NativeResource
    Used for passing graphic data.

    Layout

    
     struct NotificationBitmap_t {
         void * m_pImageData;
         int32_t m_nWidth;
         int32_t m_nHeight;
         int32_t m_nBytesPerPixel;
     }
    • Field Detail

      • SIZEOF

        The struct size in bytes.
      • ALIGNOF

        The struct alignment in bytes.
      • M_PIMAGEDATA, M_NWIDTH, M_NHEIGHT, M_NBYTESPERPIXEL

        The struct member offsets.
    • Constructor Detail

      • NotificationBitmap

        public NotificationBitmap​(java.nio.ByteBuffer container)
        Creates a NotificationBitmap 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 Detail

      • sizeof

        public int sizeof()
        Description copied from class: Struct
        Returns sizeof(struct).
        Specified by:
        sizeof in class Struct
      • m_pImageData

        public java.nio.ByteBuffer m_pImageData​(int capacity)
        Returns a ByteBuffer view of the data pointed to by the m_pImageData field.
        Parameters:
        capacity - the number of elements in the returned buffer
      • m_nWidth

        public int m_nWidth()
        Returns the value of the m_nWidth field.
      • m_nHeight

        public int m_nHeight()
        Returns the value of the m_nHeight field.
      • m_nBytesPerPixel

        public int m_nBytesPerPixel()
        Returns the value of the m_nBytesPerPixel field.
      • m_pImageData

        public NotificationBitmap m_pImageData​(java.nio.ByteBuffer value)
        Sets the address of the specified ByteBuffer to the m_pImageData field.
      • m_nWidth

        public NotificationBitmap m_nWidth​(int value)
        Sets the specified value to the m_nWidth field.
      • m_nHeight

        public NotificationBitmap m_nHeight​(int value)
        Sets the specified value to the m_nHeight field.
      • m_nBytesPerPixel

        public NotificationBitmap m_nBytesPerPixel​(int value)
        Sets the specified value to the m_nBytesPerPixel field.
      • set

        public NotificationBitmap set​(java.nio.ByteBuffer m_pImageData,
                                      int m_nWidth,
                                      int m_nHeight,
                                      int m_nBytesPerPixel)
        Initializes this struct with the specified values.
      • createSafe

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

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

        public static java.nio.ByteBuffer nm_pImageData​(long struct,
                                                        int capacity)
        Unsafe version of m_pImageData.
      • nm_nWidth

        public static int nm_nWidth​(long struct)
        Unsafe version of m_nWidth().
      • nm_nHeight

        public static int nm_nHeight​(long struct)
        Unsafe version of m_nHeight().
      • nm_nBytesPerPixel

        public static int nm_nBytesPerPixel​(long struct)
        Unsafe version of m_nBytesPerPixel().
      • nm_pImageData

        public static void nm_pImageData​(long struct,
                                         java.nio.ByteBuffer value)
        Unsafe version of m_pImageData.
      • nm_nWidth

        public static void nm_nWidth​(long struct,
                                     int value)
        Unsafe version of m_nWidth.
      • nm_nHeight

        public static void nm_nHeight​(long struct,
                                      int value)
        Unsafe version of m_nHeight.
      • nm_nBytesPerPixel

        public static void nm_nBytesPerPixel​(long struct,
                                             int value)
        Unsafe version of m_nBytesPerPixel.
      • validate

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

        public static void validate​(long array,
                                    int count)
        Calls validate(long) for each struct contained in the specified struct array.
        Parameters:
        array - the struct array to validate
        count - the number of structs in array