Bytes.this

Creates a GBytes from data. When the last reference is dropped, free_func will be called with the user_data argument. data must not be modified after this call is made until free_func has been called to indicate that the bytes is no longer in use. Since 2.32

  1. this(GBytes* gBytes)
  2. this(void* data, gsize size)
  3. this(void* data, gsize size, GDestroyNotify freeFunc, void* userData)
    class Bytes
  4. this(Bytes bytes, gsize offset, gsize length)

Parameters

data void*

the data to be used for the bytes. [array length=size]

size gsize

the size of data

freeFunc GDestroyNotify

the function to call to release the data

userData void*

data to pass to free_func

Throws

ConstructionException GTK+ fails to create the object.

Meta