Xfce Foundation Classes
Main Page  | IndexNamespace List  |  Alphabetical List  |  Class List  |  File List


Xfc::Gdk::PixbufFormat Class Reference

A GdkPixbufFormat C++ wrapper class. More...

#include <xfc/gdk-pixbuf/pixbuf-io.hh>

Inheritance diagram for Xfc::Gdk::PixbufFormat:

Xfc::Object Xfc::Trackable List of all members.

Public Member Functions

Constructors
Accessors
Methods

Static Public Member Functions

Accessors

Detailed Description

A GdkPixbufFormat C++ wrapper class.

PixbufFormat contains information about the image format accepted by a module.


Constructor & Destructor Documentation

Xfc::Gdk::PixbufFormat::PixbufFormat GdkPixbufFormat *  format  )  [explicit]
 

Construct a new PixbufFormat from an existing GdkPixbufFormat.

Parameters:
format A pointer to a GdkPixbufFormat.


Member Function Documentation

std::vector<String> Xfc::Gdk::PixbufFormat::get_extensions  )  const
 

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

Returns:
A vector of String holding the list of filename extensions.

PixbufFormat* Xfc::Gdk::PixbufFormat::get_file_info const String filename,
int *  width,
int *  height
[static]
 

Parses an image file far enough to determine its format and size.

Parameters:
filename The name of the file to identify.
width The return location for the width of the image, or null.
height The return location for the height of the image, or null.
Returns:
A PixbufFormat object describing the image format of the file, or null if the image format wasn't recognized.

bool Xfc::Gdk::PixbufFormat::get_formats std::vector< Pointer< PixbufFormat > > &  formats  )  [static]
 

Obtains the available information about the image formats supported by Gdk::Pixbuf.

Parameters:
formats A vector of Pointer<PixbufFormat> to hold the list of the supported image formats.
Returns:
true if the vector is not empty.

String Xfc::Gdk::PixbufFormat::get_license  )  const
 

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

Returns:
A string describing the license of 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.

std::vector<String> Xfc::Gdk::PixbufFormat::get_mime_types  )  const
 

Gets the mime types supported by the format.

Returns:
A vector of String holding the list mime types.

bool Xfc::Gdk::PixbufFormat::is_disabled  )  const
 

Determines whether this image format is disabled (see set_disabled()).

Returns:
Whether this image format is disabled.

bool Xfc::Gdk::PixbufFormat::is_scalable  )  const
 

Determines whether this image format is scalable.

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.

bool Xfc::Gdk::PixbufFormat::is_writable  )  const
 

Determines whether pixbufs can be saved in the given format.

Returns:
true if pixbufs can be saved in the given format.

void Xfc::Gdk::PixbufFormat::set_disabled bool  disabled  ) 
 

Disables or enables an image format.

Parameters:
disabled Set to true to disable this pixbuf 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()).


The documentation for this class was generated from the following file: Xfce Foundation Classes
Copyright © 2004-2005 The XFC Development Team XFC 4.3