gtkmm 3.24.7
Public Member Functions | Static Public Member Functions | Protected Attributes | Related Functions | List of all members
Gdk::PixbufFormat Class Reference

#include <gdkmm/pixbufformat.h>

Public Member Functions

 PixbufFormat (GdkPixbufFormat * gobject, bool make_a_copy=true)
 
 PixbufFormat (const PixbufFormat & other)
 
PixbufFormatoperator= (const PixbufFormat & other)
 
 PixbufFormat (PixbufFormat && other) noexcept
 
PixbufFormatoperator= (PixbufFormat && other) noexcept
 
 ~PixbufFormat () noexcept
 
void swap (PixbufFormat & other) noexcept
 
GdkPixbufFormat * gobj ()
 Provides access to the underlying C instance. More...
 
const GdkPixbufFormat * gobj () const
 Provides access to the underlying C instance. More...
 
GdkPixbufFormat * gobj_copy () const
 Provides access to the underlying C instance. The caller is responsible for freeing it. Use when directly setting fields in structs. More...
 
 PixbufFormat ()
 
Glib::ustring get_name () const
 Returns the name of the format. More...
 
Glib::ustring get_description () const
 Returns a description of the format. More...
 
std::vector< Glib::ustring > get_mime_types () const
 Returns the mime types supported by the format. More...
 
std::vector< Glib::ustring > get_extensions () const
 Returns the filename extensions typically used for files in the given format. More...
 
bool is_save_option_supported (const Glib::ustring & option_key) const
 Returns true if the save option specified by option_key is supported when saving a pixbuf using the module implementing format. More...
 
bool is_writable () const
 Returns whether pixbufs can be saved in the given format. More...
 
bool is_scalable () const
 Returns whether this image format is scalable. More...
 
bool is_disabled () const
 Returns whether this image format is disabled. More...
 
void set_disabled (bool disabled=true)
 Disables or enables an image format. More...
 
Glib::ustring get_license () const
 Returns information about the license of the image loader for the format. More...
 

Static Public Member Functions

static GType get_type ()
 Get the GType for this class, for use with the underlying GObject type system. More...
 

Protected Attributes

GdkPixbufFormat * gobject_
 

Related Functions

(Note that these are not member functions.)

void swap (PixbufFormat & lhs, PixbufFormat & rhs) noexcept
 
Gdk::PixbufFormat wrap (GdkPixbufFormat * object, bool take_copy=false)
 A Glib::wrap() method for this object. More...
 

Constructor & Destructor Documentation

◆ PixbufFormat() [1/4]

Gdk::PixbufFormat::PixbufFormat ( GdkPixbufFormat *  gobject,
bool  make_a_copy = true 
)
explicit

◆ PixbufFormat() [2/4]

Gdk::PixbufFormat::PixbufFormat ( const PixbufFormat other)

◆ PixbufFormat() [3/4]

Gdk::PixbufFormat::PixbufFormat ( PixbufFormat &&  other)
noexcept

◆ ~PixbufFormat()

Gdk::PixbufFormat::~PixbufFormat ( )
noexcept

◆ PixbufFormat() [4/4]

Gdk::PixbufFormat::PixbufFormat ( )

Member Function Documentation

◆ get_description()

Glib::ustring Gdk::PixbufFormat::get_description ( ) const

Returns a description of the format.

Since gtkmm 2.2:
Returns
A description of the format.

◆ get_extensions()

std::vector< Glib::ustring > Gdk::PixbufFormat::get_extensions ( ) const

Returns the filename extensions typically used for files in the given format.

Since gtkmm 2.2:
Returns
A nullptr-terminated array of filename extensions which must be freed with Glib::strfreev() when it is no longer needed.

◆ get_license()

Glib::ustring Gdk::PixbufFormat::get_license ( ) const

Returns information about the license of the image loader for the format.

The returned string should be a shorthand for a wellknown license, e.g. "LGPL", "GPL", "QPL", "GPL/QPL", or "other" to indicate some other license.

Since gtkmm 2.6:
Returns
A string describing the license of format.

◆ get_mime_types()

std::vector< Glib::ustring > Gdk::PixbufFormat::get_mime_types ( ) const

Returns the mime types supported by the format.

Since gtkmm 2.2:
Returns
A nullptr-terminated array of mime types which must be freed with Glib::strfreev() when it is no longer needed.

◆ get_name()

Glib::ustring Gdk::PixbufFormat::get_name ( ) const

Returns the name of the format.

Since gtkmm 2.2:
Returns
The name of the format.

◆ get_type()

static GType Gdk::PixbufFormat::get_type ( )
static

Get the GType for this class, for use with the underlying GObject type system.

◆ gobj() [1/2]

GdkPixbufFormat * Gdk::PixbufFormat::gobj ( )
inline

Provides access to the underlying C instance.

◆ gobj() [2/2]

const GdkPixbufFormat * Gdk::PixbufFormat::gobj ( ) const
inline

Provides access to the underlying C instance.

◆ gobj_copy()

GdkPixbufFormat * Gdk::PixbufFormat::gobj_copy ( ) const

Provides access to the underlying C instance. The caller is responsible for freeing it. Use when directly setting fields in structs.

◆ is_disabled()

bool Gdk::PixbufFormat::is_disabled ( ) const

Returns whether this image format is disabled.

See set_disabled().

Since gtkmm 2.6:
Returns
Whether this image format is disabled.

◆ is_save_option_supported()

bool Gdk::PixbufFormat::is_save_option_supported ( const Glib::ustring &  option_key) const

Returns true if the save option specified by option_key is supported when saving a pixbuf using the module implementing format.

See save() for more information about option keys.

Since gtkmm 2.36:
Parameters
option_keyThe name of an option.
Returns
true if the specified option is supported.

◆ is_scalable()

bool Gdk::PixbufFormat::is_scalable ( ) const

Returns whether this image format is scalable.

If a file is in a scalable format, it is preferable to load it at the desired size, rather than loading it at the default size and scaling the resulting pixbuf to the desired size.

Since gtkmm 2.6:
Returns
Whether this image format is scalable.

◆ is_writable()

bool Gdk::PixbufFormat::is_writable ( ) const

Returns whether pixbufs can be saved in the given format.

Since gtkmm 2.2:
Returns
Whether pixbufs can be saved in the given format.

◆ operator=() [1/2]

PixbufFormat & Gdk::PixbufFormat::operator= ( const PixbufFormat other)

◆ operator=() [2/2]

PixbufFormat & Gdk::PixbufFormat::operator= ( PixbufFormat &&  other)
noexcept

◆ set_disabled()

void Gdk::PixbufFormat::set_disabled ( bool  disabled = true)

Disables or enables an image format.

If a format is disabled, gdk-pixbuf won't use the image loader for this format to load images. Applications can use this to avoid using image loaders with an inappropriate license, see get_license().

Since gtkmm 2.6:
Parameters
disabledtrue to disable the format format.

◆ swap()

void Gdk::PixbufFormat::swap ( PixbufFormat other)
noexcept

Friends And Related Function Documentation

◆ swap()

void swap ( PixbufFormat lhs,
PixbufFormat rhs 
)
related
Parameters
lhsThe left-hand side
rhsThe right-hand side

◆ wrap()

Gdk::PixbufFormat wrap ( GdkPixbufFormat *  object,
bool  take_copy = false 
)
related

A Glib::wrap() method for this object.

Parameters
objectThe C instance.
take_copyFalse if the result should take ownership of the C instance. True if it should take a new copy or ref.
Returns
A C++ instance that wraps this C instance.

Member Data Documentation

◆ gobject_

GdkPixbufFormat* Gdk::PixbufFormat::gobject_
protected