1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
// Generated by gir (https://github.com/gtk-rs/gir @ 36917718ae60)
// from
// from gir-files (https://github.com/gtk-rs/gir-files @ 4488813a3fc3)
// DO NOT EDIT
use crate::{ffi, ResolutionUnit};
use glib::{prelude::*, translate::*};
glib::wrapper! {
#[doc(alias = "GeglMetadata")]
pub struct Metadata(Interface<ffi::GeglMetadata, ffi::GeglMetadataInterface>);
match fn {
type_ => || ffi::gegl_metadata_get_type(),
}
}
impl Metadata {
pub const NONE: Option<&'static Metadata> = None;
}
pub trait MetadataExt: IsA<Metadata> + 'static {
//#[doc(alias = "gegl_metadata_iter_get_value")]
//fn iter_get_value(&self, iter: /*Ignored*/&mut MetadataIter, value: &mut glib::Value) -> bool {
// unsafe { TODO: call ffi:gegl_metadata_iter_get_value() }
//}
//#[doc(alias = "gegl_metadata_iter_init")]
//fn iter_init(&self, iter: /*Ignored*/&mut MetadataIter) {
// unsafe { TODO: call ffi:gegl_metadata_iter_init() }
//}
//#[doc(alias = "gegl_metadata_iter_lookup")]
//fn iter_lookup(&self, iter: /*Ignored*/&mut MetadataIter, key: &str) -> bool {
// unsafe { TODO: call ffi:gegl_metadata_iter_lookup() }
//}
//#[doc(alias = "gegl_metadata_iter_next")]
//fn iter_next(&self, iter: /*Ignored*/&mut MetadataIter) -> Option<glib::GString> {
// unsafe { TODO: call ffi:gegl_metadata_iter_next() }
//}
//#[doc(alias = "gegl_metadata_iter_set_value")]
//fn iter_set_value(&self, iter: /*Ignored*/&mut MetadataIter, value: &glib::Value) -> bool {
// unsafe { TODO: call ffi:gegl_metadata_iter_set_value() }
//}
//#[doc(alias = "gegl_metadata_register_map")]
//fn register_map(&self, file_module: &str, flags: u32, map: /*Ignored*/&[MetadataMap]) {
// unsafe { TODO: call ffi:gegl_metadata_register_map() }
//}
#[doc(alias = "gegl_metadata_set_resolution")]
fn set_resolution(&self, unit: ResolutionUnit, x: f32, y: f32) -> bool {
unsafe {
from_glib(ffi::gegl_metadata_set_resolution(
self.as_ref().to_glib_none().0,
unit.into_glib(),
x,
y,
))
}
}
#[doc(alias = "gegl_metadata_unregister_map")]
fn unregister_map(&self) {
unsafe {
ffi::gegl_metadata_unregister_map(self.as_ref().to_glib_none().0);
}
}
}
impl<O: IsA<Metadata>> MetadataExt for O {}