Package org.gnome.gdk
Class ContentFormatsBuilder
java.lang.Object
io.github.jwharm.javagi.base.ProxyInstance
org.gnome.gdk.ContentFormatsBuilder
- All Implemented Interfaces:
Proxy
A
GdkContentFormatsBuilder
is an auxiliary struct used to create
new GdkContentFormats
, and should not be kept around.-
Constructor Summary
ConstructorDescriptionCreate a newGdkContentFormatsBuilder
object.ContentFormatsBuilder
(MemorySegment address) Create a ContentFormatsBuilder proxy instance for the provided memory address. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addFormats
(ContentFormats formats) Appends all formats fromformats
to this ContentFormatsBuilder, skipping those that already exist.void
Appendstype
to this ContentFormatsBuilder if it has not already been added.void
addMimeType
(String mimeType) AppendsmimeType
to this ContentFormatsBuilder if it has not already been added.Creates a newGdkContentFormats
from the current state of the given this ContentFormatsBuilder, and frees the this ContentFormatsBuilder instance.static Type
getType()
Get the GType of the ContentFormatsBuilder classref()
Acquires a reference on the given this ContentFormatsBuilder.Creates a newGdkContentFormats
from the given this ContentFormatsBuilder.void
unref()
Releases a reference on the given this ContentFormatsBuilder.Methods inherited from class io.github.jwharm.javagi.base.ProxyInstance
equals, handle, hashCode
-
Constructor Details
-
ContentFormatsBuilder
Create a ContentFormatsBuilder proxy instance for the provided memory address.- Parameters:
address
- the memory address of the native object
-
ContentFormatsBuilder
public ContentFormatsBuilder()Create a newGdkContentFormatsBuilder
object.The resulting builder would create an empty
GdkContentFormats
. Use addition functions to add types to it.
-
-
Method Details
-
getType
-
addFormats
Appends all formats fromformats
to this ContentFormatsBuilder, skipping those that already exist.- Parameters:
formats
- the formats to add
-
addGtype
Appendstype
to this ContentFormatsBuilder if it has not already been added.- Parameters:
type
- aGType
-
addMimeType
AppendsmimeType
to this ContentFormatsBuilder if it has not already been added.- Parameters:
mimeType
- a mime type
-
freeToFormats
Creates a newGdkContentFormats
from the current state of the given this ContentFormatsBuilder, and frees the this ContentFormatsBuilder instance.- Returns:
- the newly created
GdkContentFormats
with all the formats added to this ContentFormatsBuilder
-
ref
Acquires a reference on the given this ContentFormatsBuilder.This function is intended primarily for bindings.
GdkContentFormatsBuilder
objects should not be kept around.- Returns:
- the given
GdkContentFormatsBuilder
with its reference count increased
-
toFormats
Creates a newGdkContentFormats
from the given this ContentFormatsBuilder.The given
GdkContentFormatsBuilder
is reset once this function returns; you cannot call this function multiple times on the same this ContentFormatsBuilder instance.This function is intended primarily for bindings. C code should use
freeToFormats()
.- Returns:
- the newly created
GdkContentFormats
with all the formats added to this ContentFormatsBuilder
-
unref
public void unref()Releases a reference on the given this ContentFormatsBuilder.
-