// This file was generated by gir (https://github.com/gtk-rs/gir)
// from ../../girs
// from ../../gtk-girs
// DO NOT EDIT

use crate::{ffi,Action,ClosedReason,State,Urgency};
use glib::{object::ObjectType as _,prelude::*,signal::{connect_raw, SignalHandlerId},translate::*};
use std::{boxed::Box as Box_};

glib::wrapper! {
    /// Class representing a notification.
    ///
    /// ## Properties
    ///
    ///
    /// #### `state`
    ///  State of the notification.
    ///
    /// Readable | Writeable
    ///
    ///
    /// #### `time`
    ///  Unix time of when the notification was sent or received.
    ///
    /// Readable | Writeable
    ///
    ///
    /// #### `id`
    ///  Id of the notification.
    ///
    /// Readable | Writeable
    ///
    ///
    /// #### `app-name`
    ///  Name of the sending application.
    ///
    /// Readable | Writeable
    ///
    ///
    /// #### `app-icon`
    ///  Icon name of the sending application.
    ///
    /// Readable | Writeable
    ///
    ///
    /// #### `summary`
    ///  Single line overview of the notification.
    ///
    /// Readable | Writeable
    ///
    ///
    /// #### `body`
    ///  Multi-line body of text, where each line is a paragraph. May contain markup.
    ///
    /// Readable | Writeable
    ///
    ///
    /// #### `expire-timeout`
    ///  Time in milliseconds after the notification expires.
    ///
    /// Readable | Writeable
    ///
    ///
    /// #### `actions`
    ///  List of [`Action`][crate::Action] of the notification. Can be invoked by calling [`NotificationExt::invoke()`][crate::prelude::NotificationExt::invoke()] with
    /// the action's id.
    ///
    /// Readable
    ///
    ///
    /// #### `hints`
    ///  Hints of the notification. Hints are a way to provide extra data to servers. To set hints on a `DRAFT` Notification use [method@
    /// AstalNotifd.Notification.set_hint] or the property setters for standard hints.
    ///
    /// Readable | Writeable
    ///
    ///
    /// #### `image`
    ///  Standard `image-path` hint. Path of an image
    ///
    /// Readable | Writeable
    ///
    ///
    /// #### `action-icons`
    ///  Standard `action-icons` hint. Indicates whether [`Action`][crate::Action] identifier should be interpreted as a named icon.
    ///
    /// Readable | Writeable
    ///
    ///
    /// #### `category`
    ///  Standard `category` hint. [](https://specifications.freedesktop.org/notification-spec/latest/categories.html)
    ///
    /// Readable | Writeable
    ///
    ///
    /// #### `desktop-entry`
    ///  Standard `desktop-entry` hint. Specifies the name of the desktop filename representing the calling program.
    ///
    /// Readable | Writeable
    ///
    ///
    /// #### `resident`
    ///  Standard `resident` hint. Indicates whether notification is kept after action invocation.
    ///
    /// Readable | Writeable
    ///
    ///
    /// #### `sound-file`
    ///  Standard `sound-file` hint. The path to a sound file to play when the notification pops up.
    ///
    /// Readable | Writeable
    ///
    ///
    /// #### `sound-name`
    ///  Standard `sound-name` hint. A themeable named sound from to play when the notification pops up
    ///
    /// Readable | Writeable
    ///
    ///
    /// #### `suppress-sound`
    ///  Standard `suppress-sound` hint. Indicates to suppress playing any sounds.
    ///
    /// Readable | Writeable
    ///
    ///
    /// #### `transient`
    ///  Standard `transient` hint. Indicates that the notification should be excluded from persistency.
    ///
    /// Readable | Writeable
    ///
    ///
    /// #### `x`
    ///  Standard `x` hint. Specifies the X location on the screen that the notification should point to. The "y" hint must also be specified.
    ///
    ///
    /// Readable | Writeable
    ///
    ///
    /// #### `y`
    ///  Standard `y` hint. Specifies the Y location on the screen that the notification should point to. The "x" hint must also be specified.
    ///
    ///
    /// Readable | Writeable
    ///
    ///
    /// #### `urgency`
    ///  Standard `urgency` hint. [`Urgency`][crate::Urgency] level of the notification.
    ///
    /// Readable | Writeable
    ///
    /// ## Signals
    ///
    ///
    /// #### `resolved`
    ///  Emitted when this this notification is resolved.
    ///
    ///
    ///
    ///
    /// #### `invoked`
    ///  Emitted when an [`Action`][crate::Action] of this notification is invoked.
    ///
    ///
    ///
    /// # Implements
    ///
    /// [`NotificationExt`][trait@crate::prelude::NotificationExt]
    #[doc(alias = "AstalNotifdNotification")]
    pub struct Notification(Object<ffi::AstalNotifdNotification, ffi::AstalNotifdNotificationClass>);

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

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

    #[doc(alias = "astal_notifd_notification_new")]
    pub fn new() -> Notification {
        assert_initialized_main_thread!();
        unsafe {
            from_glib_full(ffi::astal_notifd_notification_new())
        }
    }

            // rustdoc-stripper-ignore-next
            /// Creates a new builder-pattern struct instance to construct [`Notification`] objects.
            ///
            /// This method returns an instance of [`NotificationBuilder`](crate::builders::NotificationBuilder) which can be used to create [`Notification`] objects.
            pub fn builder() -> NotificationBuilder {
                NotificationBuilder::new()
            }
        
}

impl Default for Notification {
                     fn default() -> Self {
                         Self::new()
                     }
                 }

// rustdoc-stripper-ignore-next
        /// A [builder-pattern] type to construct [`Notification`] objects.
        ///
        /// [builder-pattern]: https://doc.rust-lang.org/1.0.0/style/ownership/builders.html
#[must_use = "The builder must be built to be used"]
pub struct NotificationBuilder {
            builder: glib::object::ObjectBuilder<'static, Notification>,
        }

        impl NotificationBuilder {
        fn new() -> Self {
            Self { builder: glib::object::Object::builder() }
        }

                            /// State of the notification.
                            pub fn state(self, state: State) -> Self {
                            Self { builder: self.builder.property("state", state), }
                        }

                            /// Unix time of when the notification was sent or received.
                            pub fn time(self, time: i64) -> Self {
                            Self { builder: self.builder.property("time", time), }
                        }

                            /// Id of the notification.
                            pub fn id(self, id: u32) -> Self {
                            Self { builder: self.builder.property("id", id), }
                        }

                            /// Name of the sending application.
                            pub fn app_name(self, app_name: impl Into<glib::GString>) -> Self {
                            Self { builder: self.builder.property("app-name", app_name.into()), }
                        }

                            /// Icon name of the sending application.
                            pub fn app_icon(self, app_icon: impl Into<glib::GString>) -> Self {
                            Self { builder: self.builder.property("app-icon", app_icon.into()), }
                        }

                            /// Single line overview of the notification.
                            pub fn summary(self, summary: impl Into<glib::GString>) -> Self {
                            Self { builder: self.builder.property("summary", summary.into()), }
                        }

                            /// Multi-line body of text, where each line is a paragraph. May contain markup.
                            pub fn body(self, body: impl Into<glib::GString>) -> Self {
                            Self { builder: self.builder.property("body", body.into()), }
                        }

                            /// Time in milliseconds after the notification expires.
                            pub fn expire_timeout(self, expire_timeout: i32) -> Self {
                            Self { builder: self.builder.property("expire-timeout", expire_timeout), }
                        }

                            /// Hints of the notification. Hints are a way to provide extra data to servers. To set hints on a `DRAFT` Notification use [method@
                            /// AstalNotifd.Notification.set_hint] or the property setters for standard hints.
                            pub fn hints(self, hints: &glib::Variant) -> Self {
                            Self { builder: self.builder.property("hints", hints.clone()), }
                        }

                            /// Standard `image-path` hint. Path of an image
                            pub fn image(self, image: impl Into<glib::GString>) -> Self {
                            Self { builder: self.builder.property("image", image.into()), }
                        }

                            /// Standard `action-icons` hint. Indicates whether [`Action`][crate::Action] identifier should be interpreted as a named icon.
                            pub fn action_icons(self, action_icons: bool) -> Self {
                            Self { builder: self.builder.property("action-icons", action_icons), }
                        }

                            /// Standard `category` hint. [](https://specifications.freedesktop.org/notification-spec/latest/categories.html)
                            pub fn category(self, category: impl Into<glib::GString>) -> Self {
                            Self { builder: self.builder.property("category", category.into()), }
                        }

                            /// Standard `desktop-entry` hint. Specifies the name of the desktop filename representing the calling program.
                            pub fn desktop_entry(self, desktop_entry: impl Into<glib::GString>) -> Self {
                            Self { builder: self.builder.property("desktop-entry", desktop_entry.into()), }
                        }

                            /// Standard `resident` hint. Indicates whether notification is kept after action invocation.
                            pub fn resident(self, resident: bool) -> Self {
                            Self { builder: self.builder.property("resident", resident), }
                        }

                            /// Standard `sound-file` hint. The path to a sound file to play when the notification pops up.
                            pub fn sound_file(self, sound_file: impl Into<glib::GString>) -> Self {
                            Self { builder: self.builder.property("sound-file", sound_file.into()), }
                        }

                            /// Standard `sound-name` hint. A themeable named sound from to play when the notification pops up
                            pub fn sound_name(self, sound_name: impl Into<glib::GString>) -> Self {
                            Self { builder: self.builder.property("sound-name", sound_name.into()), }
                        }

                            /// Standard `suppress-sound` hint. Indicates to suppress playing any sounds.
                            pub fn suppress_sound(self, suppress_sound: bool) -> Self {
                            Self { builder: self.builder.property("suppress-sound", suppress_sound), }
                        }

                            /// Standard `transient` hint. Indicates that the notification should be excluded from persistency.
                            pub fn transient(self, transient: bool) -> Self {
                            Self { builder: self.builder.property("transient", transient), }
                        }

                            /// Standard `x` hint. Specifies the X location on the screen that the notification should point to. The "y" hint must also be specified.
                            ///
                            pub fn x(self, x: i32) -> Self {
                            Self { builder: self.builder.property("x", x), }
                        }

                            /// Standard `y` hint. Specifies the Y location on the screen that the notification should point to. The "x" hint must also be specified.
                            ///
                            pub fn y(self, y: i32) -> Self {
                            Self { builder: self.builder.property("y", y), }
                        }

                            /// Standard `urgency` hint. [`Urgency`][crate::Urgency] level of the notification.
                            pub fn urgency(self, urgency: Urgency) -> Self {
                            Self { builder: self.builder.property("urgency", urgency), }
                        }

    // rustdoc-stripper-ignore-next
    /// Build the [`Notification`].
    #[must_use = "Building the object from the builder is usually expensive and is not expected to have side effects"]
    pub fn build(self) -> Notification {
assert_initialized_main_thread!();
    self.builder.build() }
}

/// Trait containing all [`struct@Notification`] methods.
///
/// # Implementors
///
/// [`Notification`][struct@crate::Notification]
pub trait NotificationExt: IsA<Notification> + 'static {
    /// Resolve this notification with [enum@AstalNotifd.ClosedReason.DISMISSED_BY_USER].
    #[doc(alias = "astal_notifd_notification_dismiss")]
    fn dismiss(&self) {
        unsafe {
            ffi::astal_notifd_notification_dismiss(self.as_ref().to_glib_none().0);
        }
    }

    /// Resolve this notification with [enum@AstalNotifd.ClosedReason.EXPIRED]. Note that there should be no reason to use this method because
    /// expiration should be left to the daemon.
    #[doc(alias = "astal_notifd_notification_expire")]
    fn expire(&self) {
        unsafe {
            ffi::astal_notifd_notification_expire(self.as_ref().to_glib_none().0);
        }
    }

    /// Invoke an [`Action`][crate::Action] of this notification.
    #[doc(alias = "astal_notifd_notification_invoke")]
    fn invoke(&self, action_id: &str) {
        unsafe {
            ffi::astal_notifd_notification_invoke(self.as_ref().to_glib_none().0, action_id.to_glib_none().0);
        }
    }

    #[doc(alias = "astal_notifd_notification_add_action")]
#[must_use]
    fn add_action(&self, action: &impl IsA<Action>) -> Notification {
        unsafe {
            from_glib_full(ffi::astal_notifd_notification_add_action(self.as_ref().to_glib_none().0, action.as_ref().to_glib_none().0))
        }
    }

    #[doc(alias = "astal_notifd_notification_set_hint")]
#[must_use]
    fn set_hint(&self, name: &str, value: &glib::Variant) -> Notification {
        unsafe {
            from_glib_full(ffi::astal_notifd_notification_set_hint(self.as_ref().to_glib_none().0, name.to_glib_none().0, value.to_glib_none().0))
        }
    }

    #[doc(alias = "astal_notifd_notification_get_hint")]
    #[doc(alias = "get_hint")]
    fn hint(&self, name: &str) -> Option<glib::Variant> {
        unsafe {
            from_glib_full(ffi::astal_notifd_notification_get_hint(self.as_ref().to_glib_none().0, name.to_glib_none().0))
        }
    }

    #[doc(alias = "astal_notifd_notification_get_state")]
    #[doc(alias = "get_state")]
    fn state(&self) -> State {
        unsafe {
            from_glib(ffi::astal_notifd_notification_get_state(self.as_ref().to_glib_none().0))
        }
    }

    #[doc(alias = "astal_notifd_notification_get_time")]
    #[doc(alias = "get_time")]
    fn time(&self) -> i64 {
        unsafe {
            ffi::astal_notifd_notification_get_time(self.as_ref().to_glib_none().0)
        }
    }

    #[doc(alias = "astal_notifd_notification_get_id")]
    #[doc(alias = "get_id")]
    fn id(&self) -> u32 {
        unsafe {
            ffi::astal_notifd_notification_get_id(self.as_ref().to_glib_none().0)
        }
    }

    #[doc(alias = "astal_notifd_notification_set_id")]
    fn set_id(&self, value: u32) {
        unsafe {
            ffi::astal_notifd_notification_set_id(self.as_ref().to_glib_none().0, value);
        }
    }

    #[doc(alias = "astal_notifd_notification_get_app_name")]
    #[doc(alias = "get_app_name")]
    fn app_name(&self) -> glib::GString {
        unsafe {
            from_glib_none(ffi::astal_notifd_notification_get_app_name(self.as_ref().to_glib_none().0))
        }
    }

    #[doc(alias = "astal_notifd_notification_set_app_name")]
    fn set_app_name(&self, value: &str) {
        unsafe {
            ffi::astal_notifd_notification_set_app_name(self.as_ref().to_glib_none().0, value.to_glib_none().0);
        }
    }

    #[doc(alias = "astal_notifd_notification_get_app_icon")]
    #[doc(alias = "get_app_icon")]
    fn app_icon(&self) -> glib::GString {
        unsafe {
            from_glib_none(ffi::astal_notifd_notification_get_app_icon(self.as_ref().to_glib_none().0))
        }
    }

    #[doc(alias = "astal_notifd_notification_set_app_icon")]
    fn set_app_icon(&self, value: &str) {
        unsafe {
            ffi::astal_notifd_notification_set_app_icon(self.as_ref().to_glib_none().0, value.to_glib_none().0);
        }
    }

    #[doc(alias = "astal_notifd_notification_get_summary")]
    #[doc(alias = "get_summary")]
    fn summary(&self) -> glib::GString {
        unsafe {
            from_glib_none(ffi::astal_notifd_notification_get_summary(self.as_ref().to_glib_none().0))
        }
    }

    #[doc(alias = "astal_notifd_notification_set_summary")]
    fn set_summary(&self, value: &str) {
        unsafe {
            ffi::astal_notifd_notification_set_summary(self.as_ref().to_glib_none().0, value.to_glib_none().0);
        }
    }

    #[doc(alias = "astal_notifd_notification_get_body")]
    #[doc(alias = "get_body")]
    fn body(&self) -> glib::GString {
        unsafe {
            from_glib_none(ffi::astal_notifd_notification_get_body(self.as_ref().to_glib_none().0))
        }
    }

    #[doc(alias = "astal_notifd_notification_set_body")]
    fn set_body(&self, value: &str) {
        unsafe {
            ffi::astal_notifd_notification_set_body(self.as_ref().to_glib_none().0, value.to_glib_none().0);
        }
    }

    #[doc(alias = "astal_notifd_notification_get_expire_timeout")]
    #[doc(alias = "get_expire_timeout")]
    fn expire_timeout(&self) -> i32 {
        unsafe {
            ffi::astal_notifd_notification_get_expire_timeout(self.as_ref().to_glib_none().0)
        }
    }

    #[doc(alias = "astal_notifd_notification_set_expire_timeout")]
    fn set_expire_timeout(&self, value: i32) {
        unsafe {
            ffi::astal_notifd_notification_set_expire_timeout(self.as_ref().to_glib_none().0, value);
        }
    }

    #[doc(alias = "astal_notifd_notification_get_actions")]
    #[doc(alias = "get_actions")]
    fn actions(&self) -> Vec<Action> {
        unsafe {
            FromGlibPtrContainer::from_glib_none(ffi::astal_notifd_notification_get_actions(self.as_ref().to_glib_none().0))
        }
    }

    #[doc(alias = "astal_notifd_notification_get_hints")]
    #[doc(alias = "get_hints")]
    fn hints(&self) -> glib::Variant {
        unsafe {
            from_glib_none(ffi::astal_notifd_notification_get_hints(self.as_ref().to_glib_none().0))
        }
    }

    #[doc(alias = "astal_notifd_notification_get_image")]
    #[doc(alias = "get_image")]
    fn image(&self) -> glib::GString {
        unsafe {
            from_glib_full(ffi::astal_notifd_notification_get_image(self.as_ref().to_glib_none().0))
        }
    }

    #[doc(alias = "astal_notifd_notification_set_image")]
    fn set_image(&self, value: &str) {
        unsafe {
            ffi::astal_notifd_notification_set_image(self.as_ref().to_glib_none().0, value.to_glib_none().0);
        }
    }

    #[doc(alias = "astal_notifd_notification_get_action_icons")]
    #[doc(alias = "get_action_icons")]
    fn is_action_icons(&self) -> bool {
        unsafe {
            from_glib(ffi::astal_notifd_notification_get_action_icons(self.as_ref().to_glib_none().0))
        }
    }

    #[doc(alias = "astal_notifd_notification_set_action_icons")]
    fn set_action_icons(&self, value: bool) {
        unsafe {
            ffi::astal_notifd_notification_set_action_icons(self.as_ref().to_glib_none().0, value.into_glib());
        }
    }

    #[doc(alias = "astal_notifd_notification_get_category")]
    #[doc(alias = "get_category")]
    fn category(&self) -> glib::GString {
        unsafe {
            from_glib_full(ffi::astal_notifd_notification_get_category(self.as_ref().to_glib_none().0))
        }
    }

    #[doc(alias = "astal_notifd_notification_set_category")]
    fn set_category(&self, value: &str) {
        unsafe {
            ffi::astal_notifd_notification_set_category(self.as_ref().to_glib_none().0, value.to_glib_none().0);
        }
    }

    #[doc(alias = "astal_notifd_notification_get_desktop_entry")]
    #[doc(alias = "get_desktop_entry")]
    fn desktop_entry(&self) -> glib::GString {
        unsafe {
            from_glib_full(ffi::astal_notifd_notification_get_desktop_entry(self.as_ref().to_glib_none().0))
        }
    }

    #[doc(alias = "astal_notifd_notification_set_desktop_entry")]
    fn set_desktop_entry(&self, value: &str) {
        unsafe {
            ffi::astal_notifd_notification_set_desktop_entry(self.as_ref().to_glib_none().0, value.to_glib_none().0);
        }
    }

    #[doc(alias = "astal_notifd_notification_get_resident")]
    #[doc(alias = "get_resident")]
    fn is_resident(&self) -> bool {
        unsafe {
            from_glib(ffi::astal_notifd_notification_get_resident(self.as_ref().to_glib_none().0))
        }
    }

    #[doc(alias = "astal_notifd_notification_set_resident")]
    fn set_resident(&self, value: bool) {
        unsafe {
            ffi::astal_notifd_notification_set_resident(self.as_ref().to_glib_none().0, value.into_glib());
        }
    }

    #[doc(alias = "astal_notifd_notification_get_sound_file")]
    #[doc(alias = "get_sound_file")]
    fn sound_file(&self) -> glib::GString {
        unsafe {
            from_glib_full(ffi::astal_notifd_notification_get_sound_file(self.as_ref().to_glib_none().0))
        }
    }

    #[doc(alias = "astal_notifd_notification_set_sound_file")]
    fn set_sound_file(&self, value: &str) {
        unsafe {
            ffi::astal_notifd_notification_set_sound_file(self.as_ref().to_glib_none().0, value.to_glib_none().0);
        }
    }

    #[doc(alias = "astal_notifd_notification_get_sound_name")]
    #[doc(alias = "get_sound_name")]
    fn sound_name(&self) -> glib::GString {
        unsafe {
            from_glib_full(ffi::astal_notifd_notification_get_sound_name(self.as_ref().to_glib_none().0))
        }
    }

    #[doc(alias = "astal_notifd_notification_set_sound_name")]
    fn set_sound_name(&self, value: &str) {
        unsafe {
            ffi::astal_notifd_notification_set_sound_name(self.as_ref().to_glib_none().0, value.to_glib_none().0);
        }
    }

    #[doc(alias = "astal_notifd_notification_get_suppress_sound")]
    #[doc(alias = "get_suppress_sound")]
    fn is_suppress_sound(&self) -> bool {
        unsafe {
            from_glib(ffi::astal_notifd_notification_get_suppress_sound(self.as_ref().to_glib_none().0))
        }
    }

    #[doc(alias = "astal_notifd_notification_set_suppress_sound")]
    fn set_suppress_sound(&self, value: bool) {
        unsafe {
            ffi::astal_notifd_notification_set_suppress_sound(self.as_ref().to_glib_none().0, value.into_glib());
        }
    }

    #[doc(alias = "astal_notifd_notification_get_transient")]
    #[doc(alias = "get_transient")]
    fn is_transient(&self) -> bool {
        unsafe {
            from_glib(ffi::astal_notifd_notification_get_transient(self.as_ref().to_glib_none().0))
        }
    }

    #[doc(alias = "astal_notifd_notification_set_transient")]
    fn set_transient(&self, value: bool) {
        unsafe {
            ffi::astal_notifd_notification_set_transient(self.as_ref().to_glib_none().0, value.into_glib());
        }
    }

    #[doc(alias = "astal_notifd_notification_get_x")]
    #[doc(alias = "get_x")]
    fn x(&self) -> i32 {
        unsafe {
            ffi::astal_notifd_notification_get_x(self.as_ref().to_glib_none().0)
        }
    }

    #[doc(alias = "astal_notifd_notification_set_x")]
    fn set_x(&self, value: i32) {
        unsafe {
            ffi::astal_notifd_notification_set_x(self.as_ref().to_glib_none().0, value);
        }
    }

    #[doc(alias = "astal_notifd_notification_get_y")]
    #[doc(alias = "get_y")]
    fn y(&self) -> i32 {
        unsafe {
            ffi::astal_notifd_notification_get_y(self.as_ref().to_glib_none().0)
        }
    }

    #[doc(alias = "astal_notifd_notification_set_y")]
    fn set_y(&self, value: i32) {
        unsafe {
            ffi::astal_notifd_notification_set_y(self.as_ref().to_glib_none().0, value);
        }
    }

    #[doc(alias = "astal_notifd_notification_get_urgency")]
    #[doc(alias = "get_urgency")]
    fn urgency(&self) -> Urgency {
        unsafe {
            from_glib(ffi::astal_notifd_notification_get_urgency(self.as_ref().to_glib_none().0))
        }
    }

    #[doc(alias = "astal_notifd_notification_set_urgency")]
    fn set_urgency(&self, value: Urgency) {
        unsafe {
            ffi::astal_notifd_notification_set_urgency(self.as_ref().to_glib_none().0, value.into_glib());
        }
    }

    /// State of the notification.
    fn set_state(&self, state: State) {
        ObjectExt::set_property(self.as_ref(),"state", state)
    }

    /// Unix time of when the notification was sent or received.
    fn set_time(&self, time: i64) {
        ObjectExt::set_property(self.as_ref(),"time", time)
    }

    /// Hints of the notification. Hints are a way to provide extra data to servers. To set hints on a `DRAFT` Notification use [method@
    /// AstalNotifd.Notification.set_hint] or the property setters for standard hints.
    fn set_hints(&self, hints: Option<&glib::Variant>) {
        ObjectExt::set_property(self.as_ref(),"hints", hints)
    }

    /// Emitted when this this notification is resolved.
    /// ## `reason`
    /// The reason how the Notification was resolved. 
    #[doc(alias = "resolved")]
    fn connect_resolved<F: Fn(&Self, ClosedReason) + 'static>(&self, f: F) -> SignalHandlerId {
        unsafe extern "C" fn resolved_trampoline<P: IsA<Notification>, F: Fn(&P, ClosedReason) + 'static>(this: *mut ffi::AstalNotifdNotification, reason: ffi::AstalNotifdClosedReason, f: glib::ffi::gpointer) {
            let f: &F = &*(f as *const F);
            f(Notification::from_glib_borrow(this).unsafe_cast_ref(), from_glib(reason))
        }
        unsafe {
            let f: Box_<F> = Box_::new(f);
            connect_raw(self.as_ptr() as *mut _, c"resolved".as_ptr() as *const _,
                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(resolved_trampoline::<Self, F> as *const ())), Box_::into_raw(f))
        }
    }

    /// Emitted when an [`Action`][crate::Action] of this notification is invoked.
    /// ## `action_id`
    /// id of the invoked action 
    #[doc(alias = "invoked")]
    fn connect_invoked<F: Fn(&Self, &str) + 'static>(&self, f: F) -> SignalHandlerId {
        unsafe extern "C" fn invoked_trampoline<P: IsA<Notification>, F: Fn(&P, &str) + 'static>(this: *mut ffi::AstalNotifdNotification, action_id: *const std::ffi::c_char, f: glib::ffi::gpointer) {
            let f: &F = &*(f as *const F);
            f(Notification::from_glib_borrow(this).unsafe_cast_ref(), &glib::GString::from_glib_borrow(action_id))
        }
        unsafe {
            let f: Box_<F> = Box_::new(f);
            connect_raw(self.as_ptr() as *mut _, c"invoked".as_ptr() as *const _,
                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(invoked_trampoline::<Self, F> as *const ())), Box_::into_raw(f))
        }
    }

    #[doc(alias = "state")]
    fn connect_state_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
        unsafe extern "C" fn notify_state_trampoline<P: IsA<Notification>, F: Fn(&P) + 'static>(this: *mut ffi::AstalNotifdNotification, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer) {
            let f: &F = &*(f as *const F);
            f(Notification::from_glib_borrow(this).unsafe_cast_ref())
        }
        unsafe {
            let f: Box_<F> = Box_::new(f);
            connect_raw(self.as_ptr() as *mut _, c"notify::state".as_ptr() as *const _,
                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(notify_state_trampoline::<Self, F> as *const ())), Box_::into_raw(f))
        }
    }

    #[doc(alias = "time")]
    fn connect_time_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
        unsafe extern "C" fn notify_time_trampoline<P: IsA<Notification>, F: Fn(&P) + 'static>(this: *mut ffi::AstalNotifdNotification, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer) {
            let f: &F = &*(f as *const F);
            f(Notification::from_glib_borrow(this).unsafe_cast_ref())
        }
        unsafe {
            let f: Box_<F> = Box_::new(f);
            connect_raw(self.as_ptr() as *mut _, c"notify::time".as_ptr() as *const _,
                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(notify_time_trampoline::<Self, F> as *const ())), Box_::into_raw(f))
        }
    }

    #[doc(alias = "id")]
    fn connect_id_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
        unsafe extern "C" fn notify_id_trampoline<P: IsA<Notification>, F: Fn(&P) + 'static>(this: *mut ffi::AstalNotifdNotification, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer) {
            let f: &F = &*(f as *const F);
            f(Notification::from_glib_borrow(this).unsafe_cast_ref())
        }
        unsafe {
            let f: Box_<F> = Box_::new(f);
            connect_raw(self.as_ptr() as *mut _, c"notify::id".as_ptr() as *const _,
                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(notify_id_trampoline::<Self, F> as *const ())), Box_::into_raw(f))
        }
    }

    #[doc(alias = "app-name")]
    fn connect_app_name_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
        unsafe extern "C" fn notify_app_name_trampoline<P: IsA<Notification>, F: Fn(&P) + 'static>(this: *mut ffi::AstalNotifdNotification, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer) {
            let f: &F = &*(f as *const F);
            f(Notification::from_glib_borrow(this).unsafe_cast_ref())
        }
        unsafe {
            let f: Box_<F> = Box_::new(f);
            connect_raw(self.as_ptr() as *mut _, c"notify::app-name".as_ptr() as *const _,
                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(notify_app_name_trampoline::<Self, F> as *const ())), Box_::into_raw(f))
        }
    }

    #[doc(alias = "app-icon")]
    fn connect_app_icon_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
        unsafe extern "C" fn notify_app_icon_trampoline<P: IsA<Notification>, F: Fn(&P) + 'static>(this: *mut ffi::AstalNotifdNotification, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer) {
            let f: &F = &*(f as *const F);
            f(Notification::from_glib_borrow(this).unsafe_cast_ref())
        }
        unsafe {
            let f: Box_<F> = Box_::new(f);
            connect_raw(self.as_ptr() as *mut _, c"notify::app-icon".as_ptr() as *const _,
                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(notify_app_icon_trampoline::<Self, F> as *const ())), Box_::into_raw(f))
        }
    }

    #[doc(alias = "summary")]
    fn connect_summary_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
        unsafe extern "C" fn notify_summary_trampoline<P: IsA<Notification>, F: Fn(&P) + 'static>(this: *mut ffi::AstalNotifdNotification, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer) {
            let f: &F = &*(f as *const F);
            f(Notification::from_glib_borrow(this).unsafe_cast_ref())
        }
        unsafe {
            let f: Box_<F> = Box_::new(f);
            connect_raw(self.as_ptr() as *mut _, c"notify::summary".as_ptr() as *const _,
                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(notify_summary_trampoline::<Self, F> as *const ())), Box_::into_raw(f))
        }
    }

    #[doc(alias = "body")]
    fn connect_body_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
        unsafe extern "C" fn notify_body_trampoline<P: IsA<Notification>, F: Fn(&P) + 'static>(this: *mut ffi::AstalNotifdNotification, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer) {
            let f: &F = &*(f as *const F);
            f(Notification::from_glib_borrow(this).unsafe_cast_ref())
        }
        unsafe {
            let f: Box_<F> = Box_::new(f);
            connect_raw(self.as_ptr() as *mut _, c"notify::body".as_ptr() as *const _,
                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(notify_body_trampoline::<Self, F> as *const ())), Box_::into_raw(f))
        }
    }

    #[doc(alias = "expire-timeout")]
    fn connect_expire_timeout_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
        unsafe extern "C" fn notify_expire_timeout_trampoline<P: IsA<Notification>, F: Fn(&P) + 'static>(this: *mut ffi::AstalNotifdNotification, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer) {
            let f: &F = &*(f as *const F);
            f(Notification::from_glib_borrow(this).unsafe_cast_ref())
        }
        unsafe {
            let f: Box_<F> = Box_::new(f);
            connect_raw(self.as_ptr() as *mut _, c"notify::expire-timeout".as_ptr() as *const _,
                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(notify_expire_timeout_trampoline::<Self, F> as *const ())), Box_::into_raw(f))
        }
    }

    #[doc(alias = "actions")]
    fn connect_actions_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
        unsafe extern "C" fn notify_actions_trampoline<P: IsA<Notification>, F: Fn(&P) + 'static>(this: *mut ffi::AstalNotifdNotification, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer) {
            let f: &F = &*(f as *const F);
            f(Notification::from_glib_borrow(this).unsafe_cast_ref())
        }
        unsafe {
            let f: Box_<F> = Box_::new(f);
            connect_raw(self.as_ptr() as *mut _, c"notify::actions".as_ptr() as *const _,
                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(notify_actions_trampoline::<Self, F> as *const ())), Box_::into_raw(f))
        }
    }

    #[doc(alias = "hints")]
    fn connect_hints_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
        unsafe extern "C" fn notify_hints_trampoline<P: IsA<Notification>, F: Fn(&P) + 'static>(this: *mut ffi::AstalNotifdNotification, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer) {
            let f: &F = &*(f as *const F);
            f(Notification::from_glib_borrow(this).unsafe_cast_ref())
        }
        unsafe {
            let f: Box_<F> = Box_::new(f);
            connect_raw(self.as_ptr() as *mut _, c"notify::hints".as_ptr() as *const _,
                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(notify_hints_trampoline::<Self, F> as *const ())), Box_::into_raw(f))
        }
    }

    #[doc(alias = "image")]
    fn connect_image_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
        unsafe extern "C" fn notify_image_trampoline<P: IsA<Notification>, F: Fn(&P) + 'static>(this: *mut ffi::AstalNotifdNotification, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer) {
            let f: &F = &*(f as *const F);
            f(Notification::from_glib_borrow(this).unsafe_cast_ref())
        }
        unsafe {
            let f: Box_<F> = Box_::new(f);
            connect_raw(self.as_ptr() as *mut _, c"notify::image".as_ptr() as *const _,
                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(notify_image_trampoline::<Self, F> as *const ())), Box_::into_raw(f))
        }
    }

    #[doc(alias = "action-icons")]
    fn connect_action_icons_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
        unsafe extern "C" fn notify_action_icons_trampoline<P: IsA<Notification>, F: Fn(&P) + 'static>(this: *mut ffi::AstalNotifdNotification, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer) {
            let f: &F = &*(f as *const F);
            f(Notification::from_glib_borrow(this).unsafe_cast_ref())
        }
        unsafe {
            let f: Box_<F> = Box_::new(f);
            connect_raw(self.as_ptr() as *mut _, c"notify::action-icons".as_ptr() as *const _,
                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(notify_action_icons_trampoline::<Self, F> as *const ())), Box_::into_raw(f))
        }
    }

    #[doc(alias = "category")]
    fn connect_category_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
        unsafe extern "C" fn notify_category_trampoline<P: IsA<Notification>, F: Fn(&P) + 'static>(this: *mut ffi::AstalNotifdNotification, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer) {
            let f: &F = &*(f as *const F);
            f(Notification::from_glib_borrow(this).unsafe_cast_ref())
        }
        unsafe {
            let f: Box_<F> = Box_::new(f);
            connect_raw(self.as_ptr() as *mut _, c"notify::category".as_ptr() as *const _,
                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(notify_category_trampoline::<Self, F> as *const ())), Box_::into_raw(f))
        }
    }

    #[doc(alias = "desktop-entry")]
    fn connect_desktop_entry_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
        unsafe extern "C" fn notify_desktop_entry_trampoline<P: IsA<Notification>, F: Fn(&P) + 'static>(this: *mut ffi::AstalNotifdNotification, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer) {
            let f: &F = &*(f as *const F);
            f(Notification::from_glib_borrow(this).unsafe_cast_ref())
        }
        unsafe {
            let f: Box_<F> = Box_::new(f);
            connect_raw(self.as_ptr() as *mut _, c"notify::desktop-entry".as_ptr() as *const _,
                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(notify_desktop_entry_trampoline::<Self, F> as *const ())), Box_::into_raw(f))
        }
    }

    #[doc(alias = "resident")]
    fn connect_resident_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
        unsafe extern "C" fn notify_resident_trampoline<P: IsA<Notification>, F: Fn(&P) + 'static>(this: *mut ffi::AstalNotifdNotification, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer) {
            let f: &F = &*(f as *const F);
            f(Notification::from_glib_borrow(this).unsafe_cast_ref())
        }
        unsafe {
            let f: Box_<F> = Box_::new(f);
            connect_raw(self.as_ptr() as *mut _, c"notify::resident".as_ptr() as *const _,
                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(notify_resident_trampoline::<Self, F> as *const ())), Box_::into_raw(f))
        }
    }

    #[doc(alias = "sound-file")]
    fn connect_sound_file_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
        unsafe extern "C" fn notify_sound_file_trampoline<P: IsA<Notification>, F: Fn(&P) + 'static>(this: *mut ffi::AstalNotifdNotification, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer) {
            let f: &F = &*(f as *const F);
            f(Notification::from_glib_borrow(this).unsafe_cast_ref())
        }
        unsafe {
            let f: Box_<F> = Box_::new(f);
            connect_raw(self.as_ptr() as *mut _, c"notify::sound-file".as_ptr() as *const _,
                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(notify_sound_file_trampoline::<Self, F> as *const ())), Box_::into_raw(f))
        }
    }

    #[doc(alias = "sound-name")]
    fn connect_sound_name_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
        unsafe extern "C" fn notify_sound_name_trampoline<P: IsA<Notification>, F: Fn(&P) + 'static>(this: *mut ffi::AstalNotifdNotification, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer) {
            let f: &F = &*(f as *const F);
            f(Notification::from_glib_borrow(this).unsafe_cast_ref())
        }
        unsafe {
            let f: Box_<F> = Box_::new(f);
            connect_raw(self.as_ptr() as *mut _, c"notify::sound-name".as_ptr() as *const _,
                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(notify_sound_name_trampoline::<Self, F> as *const ())), Box_::into_raw(f))
        }
    }

    #[doc(alias = "suppress-sound")]
    fn connect_suppress_sound_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
        unsafe extern "C" fn notify_suppress_sound_trampoline<P: IsA<Notification>, F: Fn(&P) + 'static>(this: *mut ffi::AstalNotifdNotification, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer) {
            let f: &F = &*(f as *const F);
            f(Notification::from_glib_borrow(this).unsafe_cast_ref())
        }
        unsafe {
            let f: Box_<F> = Box_::new(f);
            connect_raw(self.as_ptr() as *mut _, c"notify::suppress-sound".as_ptr() as *const _,
                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(notify_suppress_sound_trampoline::<Self, F> as *const ())), Box_::into_raw(f))
        }
    }

    #[doc(alias = "transient")]
    fn connect_transient_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
        unsafe extern "C" fn notify_transient_trampoline<P: IsA<Notification>, F: Fn(&P) + 'static>(this: *mut ffi::AstalNotifdNotification, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer) {
            let f: &F = &*(f as *const F);
            f(Notification::from_glib_borrow(this).unsafe_cast_ref())
        }
        unsafe {
            let f: Box_<F> = Box_::new(f);
            connect_raw(self.as_ptr() as *mut _, c"notify::transient".as_ptr() as *const _,
                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(notify_transient_trampoline::<Self, F> as *const ())), Box_::into_raw(f))
        }
    }

    #[doc(alias = "x")]
    fn connect_x_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
        unsafe extern "C" fn notify_x_trampoline<P: IsA<Notification>, F: Fn(&P) + 'static>(this: *mut ffi::AstalNotifdNotification, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer) {
            let f: &F = &*(f as *const F);
            f(Notification::from_glib_borrow(this).unsafe_cast_ref())
        }
        unsafe {
            let f: Box_<F> = Box_::new(f);
            connect_raw(self.as_ptr() as *mut _, c"notify::x".as_ptr() as *const _,
                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(notify_x_trampoline::<Self, F> as *const ())), Box_::into_raw(f))
        }
    }

    #[doc(alias = "y")]
    fn connect_y_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
        unsafe extern "C" fn notify_y_trampoline<P: IsA<Notification>, F: Fn(&P) + 'static>(this: *mut ffi::AstalNotifdNotification, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer) {
            let f: &F = &*(f as *const F);
            f(Notification::from_glib_borrow(this).unsafe_cast_ref())
        }
        unsafe {
            let f: Box_<F> = Box_::new(f);
            connect_raw(self.as_ptr() as *mut _, c"notify::y".as_ptr() as *const _,
                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(notify_y_trampoline::<Self, F> as *const ())), Box_::into_raw(f))
        }
    }

    #[doc(alias = "urgency")]
    fn connect_urgency_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
        unsafe extern "C" fn notify_urgency_trampoline<P: IsA<Notification>, F: Fn(&P) + 'static>(this: *mut ffi::AstalNotifdNotification, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer) {
            let f: &F = &*(f as *const F);
            f(Notification::from_glib_borrow(this).unsafe_cast_ref())
        }
        unsafe {
            let f: Box_<F> = Box_::new(f);
            connect_raw(self.as_ptr() as *mut _, c"notify::urgency".as_ptr() as *const _,
                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(notify_urgency_trampoline::<Self, F> as *const ())), Box_::into_raw(f))
        }
    }
}

impl<O: IsA<Notification>> NotificationExt for O {}
