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
// This file was generated by gir (https://github.com/gtk-rs/gir)
// from gir-files (https://github.com/gtk-rs/gir-files.git)
// from webkit2gtk-gir-files
// DO NOT EDIT

use crate::PermissionRequest;
use std::fmt;

glib::wrapper! {
    /// A permission request for displaying web notifications.
    ///
    /// WebKitNotificationPermissionRequest represents a request for
    /// permission to decide whether WebKit should provide the user with
    /// notifications through the Web Notification API.
    ///
    /// When a WebKitNotificationPermissionRequest is not handled by the user,
    /// it is denied by default.
    ///
    /// # Implements
    ///
    /// [`trait@glib::ObjectExt`], [`PermissionRequestExt`][trait@crate::prelude::PermissionRequestExt]
    #[doc(alias = "WebKitNotificationPermissionRequest")]
    pub struct NotificationPermissionRequest(Object<ffi::WebKitNotificationPermissionRequest, ffi::WebKitNotificationPermissionRequestClass>) @implements PermissionRequest;

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

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

impl fmt::Display for NotificationPermissionRequest {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        f.write_str("NotificationPermissionRequest")
    }
}