Trait gegl::prelude::MetadataStoreExt
source · pub trait MetadataStoreExt: IsA<MetadataStore> + Sealed + 'static {
Show 49 methods
// Provided methods
fn artist(&self) -> Option<GString> { ... }
fn comment(&self) -> Option<GString> { ... }
fn copyright(&self) -> Option<GString> { ... }
fn description(&self) -> Option<GString> { ... }
fn disclaimer(&self) -> Option<GString> { ... }
fn file_module_name(&self) -> Option<GString> { ... }
fn resolution_unit(&self) -> ResolutionUnit { ... }
fn resolution_x(&self) -> f64 { ... }
fn resolution_y(&self) -> f64 { ... }
fn software(&self) -> Option<GString> { ... }
fn source(&self) -> Option<GString> { ... }
fn string(&self, name: &str) -> Option<GString> { ... }
fn timestamp(&self) -> Option<DateTime> { ... }
fn title(&self) -> Option<GString> { ... }
fn warning(&self) -> Option<GString> { ... }
fn has_value(&self, name: &str) -> bool { ... }
fn set_artist(&self, artist: &str) { ... }
fn set_comment(&self, comment: &str) { ... }
fn set_copyright(&self, copyright: &str) { ... }
fn set_description(&self, description: &str) { ... }
fn set_disclaimer(&self, disclaimer: &str) { ... }
fn set_resolution_unit(&self, unit: ResolutionUnit) { ... }
fn set_resolution_x(&self, resolution_x: f64) { ... }
fn set_resolution_y(&self, resolution_y: f64) { ... }
fn set_software(&self, software: &str) { ... }
fn set_source(&self, source: &str) { ... }
fn set_string(&self, name: &str, string: &str) { ... }
fn set_timestamp(&self, timestamp: &DateTime) { ... }
fn set_title(&self, title: &str) { ... }
fn set_value(&self, name: &str, value: &Value) { ... }
fn set_warning(&self, warning: &str) { ... }
fn typeof_value(&self, name: &str) -> Type { ... }
fn connect_changed<F: Fn(&Self, &ParamSpec) + 'static>(
&self,
detail: Option<&str>,
f: F
) -> SignalHandlerId { ... }
fn connect_mapped<F: Fn(&Self, &str, bool) + 'static>(
&self,
f: F
) -> SignalHandlerId { ... }
fn connect_unmapped<F: Fn(&Self, &str, &str) + 'static>(
&self,
f: F
) -> SignalHandlerId { ... }
fn connect_artist_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId { ... }
fn connect_comment_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId { ... }
fn connect_copyright_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId { ... }
fn connect_description_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId { ... }
fn connect_disclaimer_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId { ... }
fn connect_file_module_name_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId { ... }
fn connect_resolution_unit_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId { ... }
fn connect_resolution_x_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId { ... }
fn connect_resolution_y_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId { ... }
fn connect_software_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId { ... }
fn connect_source_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId { ... }
fn connect_timestamp_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId { ... }
fn connect_title_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId { ... }
fn connect_warning_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId { ... }
}
Expand description
Provided Methods§
sourcefn description(&self) -> Option<GString>
fn description(&self) -> Option<GString>
sourcefn disclaimer(&self) -> Option<GString>
fn disclaimer(&self) -> Option<GString>
sourcefn file_module_name(&self) -> Option<GString>
fn file_module_name(&self) -> Option<GString>
sourcefn resolution_unit(&self) -> ResolutionUnit
fn resolution_unit(&self) -> ResolutionUnit
sourcefn resolution_x(&self) -> f64
fn resolution_x(&self) -> f64
sourcefn resolution_y(&self) -> f64
fn resolution_y(&self) -> f64
sourcefn has_value(&self, name: &str) -> bool
fn has_value(&self, name: &str) -> bool
Test whether the MetadataStore
contains a value for the specified name.
name
Metadata name
Returns
true
if metadata is declared and contains a valid value.
sourcefn set_artist(&self, artist: &str)
fn set_artist(&self, artist: &str)
sourcefn set_comment(&self, comment: &str)
fn set_comment(&self, comment: &str)
sourcefn set_copyright(&self, copyright: &str)
fn set_copyright(&self, copyright: &str)
sourcefn set_description(&self, description: &str)
fn set_description(&self, description: &str)
sourcefn set_disclaimer(&self, disclaimer: &str)
fn set_disclaimer(&self, disclaimer: &str)
sourcefn set_resolution_unit(&self, unit: ResolutionUnit)
fn set_resolution_unit(&self, unit: ResolutionUnit)
sourcefn set_resolution_x(&self, resolution_x: f64)
fn set_resolution_x(&self, resolution_x: f64)
sourcefn set_resolution_y(&self, resolution_y: f64)
fn set_resolution_y(&self, resolution_y: f64)
sourcefn set_software(&self, software: &str)
fn set_software(&self, software: &str)
sourcefn set_source(&self, source: &str)
fn set_source(&self, source: &str)
sourcefn set_string(&self, name: &str, string: &str)
fn set_string(&self, name: &str, string: &str)
A slightly more efficient version of set_value()
for string values avoiding a duplication. Otherwise it behaves the same
set_value()
.
name
Metadata name
string
String value to set
sourcefn set_timestamp(&self, timestamp: &DateTime)
fn set_timestamp(&self, timestamp: &DateTime)
sourcefn set_value(&self, name: &str, value: &Value)
fn set_value(&self, name: &str, value: &Value)
Set the specified metadata value. If value
is None
the default value from
the associated [glib::ParamSpec
][crate::glib::ParamSpec] is used. This operation will fail if the value
has not been previously declared. A changed::name
signal is emitted when
the value is set. If the value is shadowed by a property a notify::name
signal is also emitted.
name
Metadata name
value
(nullable): A valid [glib::Value
][crate::glib::Value] or None
sourcefn set_warning(&self, warning: &str)
fn set_warning(&self, warning: &str)
sourcefn typeof_value(&self, name: &str) -> Type
fn typeof_value(&self, name: &str) -> Type
Get the declared type of the value in the MetadataStore
.
name
Metadata name
Returns
Declared GType
of metadata value or G_TYPE_INVALID
.
sourcefn connect_changed<F: Fn(&Self, &ParamSpec) + 'static>(
&self,
detail: Option<&str>,
f: F
) -> SignalHandlerId
fn connect_changed<F: Fn(&Self, &ParamSpec) + 'static>( &self, detail: Option<&str>, f: F ) -> SignalHandlerId
::changed
is emitted when a metadata value is changed. This is analogous
to the GObject::notify
signal.
pspec
A [glib::ParamSpec
][crate::glib::ParamSpec] declaring the metadata value
sourcefn connect_mapped<F: Fn(&Self, &str, bool) + 'static>(
&self,
f: F
) -> SignalHandlerId
fn connect_mapped<F: Fn(&Self, &str, bool) + 'static>( &self, f: F ) -> SignalHandlerId
::mapped
is emitted after a file module registers a mapping and before
other processing takes place. An application may respond to the signal by
registering additional mappings or overriding existing values, for example
it might override the TIFF ImageDescription tag to format multiple metadata
values into the description.
file_module
The file module name
exclude_unmapped
true
if the file module cannot handle unmapped values
sourcefn connect_unmapped<F: Fn(&Self, &str, &str) + 'static>(
&self,
f: F
) -> SignalHandlerId
fn connect_unmapped<F: Fn(&Self, &str, &str) + 'static>( &self, f: F ) -> SignalHandlerId
::unmapped
is emitted when a file module tries to look up an unmapped
metadata name. When the handler returns a second attempt is made to look
up the metadata.
file_module
The file module name
local_name
The unmapped metadata name as used by the file module