1 | // This file was generated by gir (https://github.com/gtk-rs/gir) |
2 | // from gir-files (https://github.com/gtk-rs/gir-files) |
3 | // from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git) |
4 | // DO NOT EDIT |
5 | |
6 | use crate::{Object, Plugin}; |
7 | use glib::{prelude::*, translate::*}; |
8 | |
9 | glib::wrapper! { |
10 | #[doc (alias = "GstPluginFeature" )] |
11 | pub struct PluginFeature(Object<ffi::GstPluginFeature, ffi::GstPluginFeatureClass>) @extends Object; |
12 | |
13 | match fn { |
14 | type_ => || ffi::gst_plugin_feature_get_type(), |
15 | } |
16 | } |
17 | |
18 | impl PluginFeature { |
19 | pub const NONE: Option<&'static PluginFeature> = None; |
20 | } |
21 | |
22 | unsafe impl Send for PluginFeature {} |
23 | unsafe impl Sync for PluginFeature {} |
24 | |
25 | mod sealed { |
26 | pub trait Sealed {} |
27 | impl<T: super::IsA<super::PluginFeature>> Sealed for T {} |
28 | } |
29 | |
30 | pub trait PluginFeatureExt: IsA<PluginFeature> + sealed::Sealed + 'static { |
31 | #[doc (alias = "gst_plugin_feature_check_version" )] |
32 | fn check_version(&self, min_major: u32, min_minor: u32, min_micro: u32) -> bool { |
33 | unsafe { |
34 | from_glib(ffi::gst_plugin_feature_check_version( |
35 | self.as_ref().to_glib_none().0, |
36 | min_major, |
37 | min_minor, |
38 | min_micro, |
39 | )) |
40 | } |
41 | } |
42 | |
43 | #[doc (alias = "gst_plugin_feature_get_plugin" )] |
44 | #[doc (alias = "get_plugin" )] |
45 | fn plugin(&self) -> Option<Plugin> { |
46 | unsafe { |
47 | from_glib_full(ffi::gst_plugin_feature_get_plugin( |
48 | self.as_ref().to_glib_none().0, |
49 | )) |
50 | } |
51 | } |
52 | |
53 | #[doc (alias = "gst_plugin_feature_get_plugin_name" )] |
54 | #[doc (alias = "get_plugin_name" )] |
55 | fn plugin_name(&self) -> Option<glib::GString> { |
56 | unsafe { |
57 | from_glib_none(ffi::gst_plugin_feature_get_plugin_name( |
58 | self.as_ref().to_glib_none().0, |
59 | )) |
60 | } |
61 | } |
62 | } |
63 | |
64 | impl<O: IsA<PluginFeature>> PluginFeatureExt for O {} |
65 | |