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
// This file was generated by gir (https://github.com/gtk-rs/gir)
// from gir-files (https://github.com/tauri-apps/gir-files)
// DO NOT EDIT
#![allow(deprecated)]

use crate::MimeInfo;
use glib::{prelude::*, translate::*};

glib::wrapper! {
    #[doc(alias = "WebKitPlugin")]
    pub struct Plugin(Object<ffi::WebKitPlugin, ffi::WebKitPluginClass>);

    match fn {
        type_ => || ffi::webkit_plugin_get_type(),
    }
}

impl Plugin {
  pub const NONE: Option<&'static Plugin> = None;
}

mod sealed {
  pub trait Sealed {}
  impl<T: super::IsA<super::Plugin>> Sealed for T {}
}

pub trait PluginExt: IsA<Plugin> + sealed::Sealed + 'static {
  #[cfg_attr(feature = "v2_32", deprecated = "Since 2.32")]
  #[allow(deprecated)]
  #[doc(alias = "webkit_plugin_get_description")]
  #[doc(alias = "get_description")]
  fn description(&self) -> Option<glib::GString> {
    unsafe {
      from_glib_none(ffi::webkit_plugin_get_description(
        self.as_ref().to_glib_none().0,
      ))
    }
  }

  #[cfg_attr(feature = "v2_32", deprecated = "Since 2.32")]
  #[allow(deprecated)]
  #[doc(alias = "webkit_plugin_get_mime_info_list")]
  #[doc(alias = "get_mime_info_list")]
  fn mime_info_list(&self) -> Vec<MimeInfo> {
    unsafe {
      FromGlibPtrContainer::from_glib_none(ffi::webkit_plugin_get_mime_info_list(
        self.as_ref().to_glib_none().0,
      ))
    }
  }

  #[cfg_attr(feature = "v2_32", deprecated = "Since 2.32")]
  #[allow(deprecated)]
  #[doc(alias = "webkit_plugin_get_name")]
  #[doc(alias = "get_name")]
  fn name(&self) -> Option<glib::GString> {
    unsafe { from_glib_none(ffi::webkit_plugin_get_name(self.as_ref().to_glib_none().0)) }
  }

  #[cfg_attr(feature = "v2_32", deprecated = "Since 2.32")]
  #[allow(deprecated)]
  #[doc(alias = "webkit_plugin_get_path")]
  #[doc(alias = "get_path")]
  fn path(&self) -> Option<glib::GString> {
    unsafe { from_glib_none(ffi::webkit_plugin_get_path(self.as_ref().to_glib_none().0)) }
  }
}

impl<O: IsA<Plugin>> PluginExt for O {}