Package org.gnome.gdk
Class ContentFormatsBuilder
java.lang.Object
org.javagi.base.ProxyInstance
org.gnome.gdk.ContentFormatsBuilder
-
Constructor Summary
ConstructorsConstructorDescriptionCreate a newGdkContentFormatsBuilderobject.ContentFormatsBuilder(MemorySegment address) Create a ContentFormatsBuilder proxy instance for the provided memory address. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddFormats(ContentFormats formats) Appends all formats fromformatstobuilder,skipping those that already exist.voidAppendstypeto this ContentFormatsBuilder if it has not already been added.voidaddMimeType(String mimeType) AppendsmimeTypeto this ContentFormatsBuilder if it has not already been added.Creates a newGdkContentFormatsfrom the current state of the givenbuilder,and frees the this ContentFormatsBuilder instance.static @Nullable TypegetType()Get the GType of the ContentFormatsBuilder classref()Acquires a reference on the givenbuilder.Creates a newGdkContentFormatsfrom the givenbuilder.voidunref()Releases a reference on the givenbuilder.Methods inherited from class org.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 newGdkContentFormatsBuilderobject.The resulting builder would create an empty
GdkContentFormats. Use addition functions to add types to it.
-
-
Method Details
-
getType
Get the GType of the ContentFormatsBuilder class- Returns:
- the GType
-
addFormats
Appends all formats fromformatstobuilder,skipping those that already exist.- Parameters:
formats- the formats to add
-
addGtype
Appendstypeto this ContentFormatsBuilder if it has not already been added.- Parameters:
type- aGType
-
addMimeType
AppendsmimeTypeto this ContentFormatsBuilder if it has not already been added.- Parameters:
mimeType- a mime type
-
freeToFormats
Creates a newGdkContentFormatsfrom the current state of the givenbuilder,and frees the this ContentFormatsBuilder instance.- Returns:
- the newly created
GdkContentFormatswith all the formats added to this ContentFormatsBuilder
-
ref
Acquires a reference on the givenbuilder.This function is intended primarily for bindings.
GdkContentFormatsBuilderobjects should not be kept around.- Returns:
- the given
GdkContentFormatsBuilderwith its reference count increased
-
toFormats
Creates a newGdkContentFormatsfrom the givenbuilder.The given
GdkContentFormatsBuilderis 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
GdkContentFormatswith all the formats added to this ContentFormatsBuilder
-
unref
public void unref()Releases a reference on the givenbuilder.
-