Struct gdk_pixbuf::PixbufFormat
source · pub struct PixbufFormat { /* private fields */ }
Expand description
A PixbufFormat
contains information about the image format accepted
by a module.
Only modules should access the fields directly, applications should
use the gdk_pixbuf_format_*
family of functions.
GLib type: Boxed type with copy-on-clone semantics.
Implementations§
source§impl PixbufFormat
impl PixbufFormat
sourcepub fn as_ptr(&self) -> *mut GdkPixbufFormat
pub fn as_ptr(&self) -> *mut GdkPixbufFormat
Return the inner pointer to the underlying C value.
sourcepub unsafe fn from_glib_ptr_borrow<'a>(
ptr: *const *const GdkPixbufFormat,
) -> &'a Self
pub unsafe fn from_glib_ptr_borrow<'a>( ptr: *const *const GdkPixbufFormat, ) -> &'a Self
Borrows the underlying C value.
sourcepub unsafe fn from_glib_ptr_borrow_mut<'a>(
ptr: *mut *mut GdkPixbufFormat,
) -> &'a mut Self
pub unsafe fn from_glib_ptr_borrow_mut<'a>( ptr: *mut *mut GdkPixbufFormat, ) -> &'a mut Self
Borrows the underlying C value mutably.
source§impl PixbufFormat
impl PixbufFormat
sourcepub fn description(&self) -> Option<GString>
pub fn description(&self) -> Option<GString>
sourcepub fn extensions(&self) -> Vec<GString>
pub fn extensions(&self) -> Vec<GString>
Returns the filename extensions typically used for files in the given format.
§Returns
an array of filename extensions
sourcepub fn license(&self) -> Option<GString>
pub fn license(&self) -> Option<GString>
Returns information about the license of the image loader for the format.
The returned string should be a shorthand for a well known license, e.g. “LGPL”, “GPL”, “QPL”, “GPL/QPL”, or “other” to indicate some other license.
§Returns
a string describing the license of the pixbuf format
sourcepub fn mime_types(&self) -> Vec<GString>
pub fn mime_types(&self) -> Vec<GString>
sourcepub fn is_disabled(&self) -> bool
pub fn is_disabled(&self) -> bool
Returns whether this image format is disabled.
See gdk_pixbuf_format_set_disabled().
§Returns
whether this image format is disabled.
sourcepub fn is_save_option_supported(&self, option_key: &str) -> bool
pub fn is_save_option_supported(&self, option_key: &str) -> bool
sourcepub fn is_scalable(&self) -> bool
pub fn is_scalable(&self) -> bool
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.
§Returns
whether this image format is scalable.
sourcepub fn is_writable(&self) -> bool
pub fn is_writable(&self) -> bool
Returns whether pixbufs can be saved in the given format.
§Returns
whether pixbufs can be saved in the given format.
sourcepub fn set_disabled(&mut self, disabled: bool)
pub fn set_disabled(&mut self, disabled: bool)
Disables or enables an image format.
If a format is disabled, GdkPixbuf 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 gdk_pixbuf_format_get_license().
§disabled
TRUE
to disable the format @self
Trait Implementations§
source§impl Clone for PixbufFormat
impl Clone for PixbufFormat
source§impl Debug for PixbufFormat
impl Debug for PixbufFormat
source§impl From<PixbufFormat> for Value
impl From<PixbufFormat> for Value
source§fn from(o: PixbufFormat) -> Self
fn from(o: PixbufFormat) -> Self
source§impl HasParamSpec for PixbufFormat
impl HasParamSpec for PixbufFormat
type ParamSpec = ParamSpecBoxed
§type SetValue = PixbufFormat
type SetValue = PixbufFormat
type BuilderFn = fn(_: &str) -> ParamSpecBoxedBuilder<'_, PixbufFormat>
fn param_spec_builder() -> Self::BuilderFn
source§impl Hash for PixbufFormat
impl Hash for PixbufFormat
source§impl Ord for PixbufFormat
impl Ord for PixbufFormat
source§fn cmp(&self, other: &PixbufFormat) -> Ordering
fn cmp(&self, other: &PixbufFormat) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
source§impl PartialEq for PixbufFormat
impl PartialEq for PixbufFormat
source§fn eq(&self, other: &PixbufFormat) -> bool
fn eq(&self, other: &PixbufFormat) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for PixbufFormat
impl PartialOrd for PixbufFormat
source§fn partial_cmp(&self, other: &PixbufFormat) -> Option<Ordering>
fn partial_cmp(&self, other: &PixbufFormat) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moresource§impl StaticType for PixbufFormat
impl StaticType for PixbufFormat
source§fn static_type() -> Type
fn static_type() -> Type
Self
.impl Eq for PixbufFormat
impl Send for PixbufFormat
impl StructuralPartialEq for PixbufFormat
impl Sync for PixbufFormat
Auto Trait Implementations§
impl Freeze for PixbufFormat
impl RefUnwindSafe for PixbufFormat
impl Unpin for PixbufFormat
impl UnwindSafe for PixbufFormat
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)source§impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
source§impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GPtrArray> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GPtrArray> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
source§impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GSList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GSList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
source§impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
source§impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GPtrArray> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GPtrArray> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
source§impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GSList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GSList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
source§impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
source§impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GPtrArray> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GPtrArray> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
source§impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GSList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GSList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
source§impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
source§impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GPtrArray> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GPtrArray> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
source§impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GSList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GSList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
source§impl<T> IntoClosureReturnValue for T
impl<T> IntoClosureReturnValue for T
fn into_closure_return_value(self) -> Option<Value>
source§impl<T> PropertyGet for Twhere
T: HasParamSpec,
impl<T> PropertyGet for Twhere
T: HasParamSpec,
source§impl<T> StaticTypeExt for Twhere
T: StaticType,
impl<T> StaticTypeExt for Twhere
T: StaticType,
source§fn ensure_type()
fn ensure_type()
source§impl<T> ToSendValue for T
impl<T> ToSendValue for T
source§fn to_send_value(&self) -> SendValue
fn to_send_value(&self) -> SendValue
SendValue
clone of self
.