Class StaticResource

java.lang.Object
org.javagi.base.ProxyInstance
org.gnome.gio.StaticResource
All Implemented Interfaces:
Proxy

@Generated("org.javagi.JavaGI") public class StaticResource extends ProxyInstance
GStaticResource is an opaque data structure and can only be accessed using the following functions.
  • Constructor Details

    • StaticResource

      public StaticResource(MemorySegment address)
      Create a StaticResource proxy instance for the provided memory address.
      Parameters:
      address - the memory address of the native object
    • StaticResource

      public StaticResource(Arena arena)
      Allocate a new StaticResource.
      Parameters:
      arena - to control the memory allocation scope
    • StaticResource

      public StaticResource()
      Allocate a new StaticResource. The memory is allocated with Arena.ofAuto().
    • StaticResource

      public StaticResource(MemorySegment data, long dataLen, Resource resource, StaticResource next, Arena arena)
      Allocate a new StaticResource with the fields set to the provided values.
      Parameters:
      data - value for the field data
      dataLen - value for the field dataLen
      resource - value for the field resource
      next - value for the field next
      arena - to control the memory allocation scope
    • StaticResource

      public StaticResource(MemorySegment data, long dataLen, Resource resource, StaticResource next)
      Allocate a new StaticResource with the fields set to the provided values. The memory is allocated with Arena.ofAuto().
      Parameters:
      data - value for the field data
      dataLen - value for the field dataLen
      resource - value for the field resource
      next - value for the field next
  • Method Details

    • getMemoryLayout

      public static MemoryLayout getMemoryLayout()
      The memory layout of the native struct.
      Returns:
      the memory layout
    • readData

      public MemorySegment readData()
      Read the value of the field data.
      Returns:
      The value of the field data
    • writeData

      public void writeData(MemorySegment data)
      Write a value in the field data.
      Parameters:
      data - The new value for the field data
    • readDataLen

      public long readDataLen()
      Read the value of the field data_len.
      Returns:
      The value of the field data_len
    • writeDataLen

      public void writeDataLen(long dataLen)
      Write a value in the field data_len.
      Parameters:
      dataLen - The new value for the field data_len
    • readResource

      public Resource readResource()
      Read the value of the field resource.
      Returns:
      The value of the field resource
    • writeResource

      public void writeResource(Resource resource)
      Write a value in the field resource.
      Parameters:
      resource - The new value for the field resource
    • readNext

      public StaticResource readNext()
      Read the value of the field next.
      Returns:
      The value of the field next
    • writeNext

      public void writeNext(StaticResource next)
      Write a value in the field next.
      Parameters:
      next - The new value for the field next
    • fini

      public void fini()

      Finalizes a Gio.Resource initialized by init().

      This is normally used by code generated by glib-compile-resources and is not typically used by other code.

      Since:
      2.32
    • getResource

      public Resource getResource()

      Gets the Gio.Resource that was registered by a call to init().

      This is normally used by code generated by glib-compile-resources and is not typically used by other code.

      Returns:
      a Gio.Resource
      Since:
      2.32
    • init

      public void init()

      Initializes a Gio.Resource from static data using a Gio.StaticResource.

      This is normally used by code generated by glib-compile-resources and is not typically used by other code.

      Since:
      2.32