Gdk.ContentFormatsBuilder

Fields

None

Methods

class

new ()

add_formats (formats)

add_gtype (type)

add_mime_type (mime_type)

ref ()

to_formats ()

unref ()

Details

class Gdk.ContentFormatsBuilder

A GdkContentFormatsBuilder is an auxiliary struct used to create new GdkContentFormats, and should not be kept around.

classmethod new()[source]
Returns:

a new GdkContentFormatsBuilder

Return type:

Gdk.ContentFormatsBuilder

Create a new GdkContentFormatsBuilder object.

The resulting builder would create an empty GdkContentFormats. Use addition functions to add types to it.

add_formats(formats)[source]
Parameters:

formats (Gdk.ContentFormats) – the formats to add

Appends all formats from formats to self, skipping those that already exist.

add_gtype(type)[source]
Parameters:

type (GObject.GType) – a GType

Appends type to self if it has not already been added.

add_mime_type(mime_type)[source]
Parameters:

mime_type (str) – a mime type

Appends mime_type to self if it has not already been added.

ref()[source]
Returns:

the given GdkContentFormatsBuilder with its reference count increased

Return type:

Gdk.ContentFormatsBuilder

Acquires a reference on the given self.

This function is intended primarily for bindings. GdkContentFormatsBuilder objects should not be kept around.

to_formats()[source]
Returns:

the newly created GdkContentFormats with all the formats added to self

Return type:

Gdk.ContentFormats

Creates a new GdkContentFormats from the given self.

The given GdkContentFormatsBuilder is reset once this function returns; you cannot call this function multiple times on the same self instance.

This function is intended primarily for bindings. C code should use [method`Gdk`.ContentFormatsBuilder.free_to_formats].

unref()[source]

Releases a reference on the given self.