ContentFormatsBuilder#
- class ContentFormatsBuilder(**kwargs)#
A GdkContentFormatsBuilder is an auxiliary struct used to create
new GdkContentFormats, and should not be kept around.
Constructors#
- class ContentFormatsBuilder
- classmethod new() ContentFormatsBuilder#
Create a new
GdkContentFormatsBuilderobject.The resulting builder would create an empty
GdkContentFormats. Use addition functions to add types to it.
Methods#
- class ContentFormatsBuilder
- add_formats(formats: ContentFormats) None#
Appends all formats from
formatstobuilder, skipping those that already exist.- Parameters:
formats – the formats to add
- add_gtype(type: GType) None#
Appends
typetobuilderif it has not already been added.- Parameters:
type – a
GType
- add_mime_type(mime_type: str) None#
Appends
mime_typetobuilderif it has not already been added.- Parameters:
mime_type – a mime type
- to_formats() ContentFormats#
Creates a new
GdkContentFormatsfrom the givenbuilder.The given
GdkContentFormatsBuilderis reset once this function returns; you cannot call this function multiple times on the samebuilderinstance.This function is intended primarily for bindings. C code should use
free_to_formats.