// This file was generated by gir (https://github.com/gtk-rs/gir)
// from
// from gir-files (https://github.com/gtk-rs/gir-files.git)
// DO NOT EDIT
#![allow(deprecated)]

#[cfg(feature = "v0_76")]
#[cfg_attr(docsrs, doc(cfg(feature = "v0_76")))]
use crate::Align;
use crate::{
    ffi, CursorBlinkMode, CursorShape, EraseBinding, Format, Pty, PtyFlags, Regex, TextBlinkMode,
    WriteFlags,
};
use glib::{
    prelude::*,
    signal::{connect_raw, SignalHandlerId},
    translate::*,
};
use std::boxed::Box as Box_;

glib::wrapper! {
    #[doc(alias = "VteTerminal")]
    pub struct Terminal(Object<ffi::VteTerminal, ffi::VteTerminalClass>) @extends gtk::Widget, @implements gtk::Accessible, gtk::Buildable, gtk::ConstraintTarget, gtk::Scrollable;

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

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

    #[doc(alias = "vte_terminal_new")]
    pub fn new() -> Terminal {
        assert_initialized_main_thread!();
        unsafe { from_glib_none(ffi::vte_terminal_new()) }
    }

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

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

// rustdoc-stripper-ignore-next
/// A [builder-pattern] type to construct [`Terminal`] 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 TerminalBuilder {
    builder: glib::object::ObjectBuilder<'static, Terminal>,
}

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

    pub fn allow_hyperlink(self, allow_hyperlink: bool) -> Self {
        Self {
            builder: self.builder.property("allow-hyperlink", allow_hyperlink),
        }
    }

    pub fn audible_bell(self, audible_bell: bool) -> Self {
        Self {
            builder: self.builder.property("audible-bell", audible_bell),
        }
    }

    pub fn backspace_binding(self, backspace_binding: EraseBinding) -> Self {
        Self {
            builder: self
                .builder
                .property("backspace-binding", backspace_binding),
        }
    }

    pub fn bold_is_bright(self, bold_is_bright: bool) -> Self {
        Self {
            builder: self.builder.property("bold-is-bright", bold_is_bright),
        }
    }

    pub fn cell_height_scale(self, cell_height_scale: f64) -> Self {
        Self {
            builder: self
                .builder
                .property("cell-height-scale", cell_height_scale),
        }
    }

    pub fn cell_width_scale(self, cell_width_scale: f64) -> Self {
        Self {
            builder: self.builder.property("cell-width-scale", cell_width_scale),
        }
    }

    pub fn cjk_ambiguous_width(self, cjk_ambiguous_width: i32) -> Self {
        Self {
            builder: self
                .builder
                .property("cjk-ambiguous-width", cjk_ambiguous_width),
        }
    }

    #[cfg(feature = "v0_76")]
    #[cfg_attr(docsrs, doc(cfg(feature = "v0_76")))]
    pub fn context_menu(self, context_menu: &impl IsA<gtk::Popover>) -> Self {
        Self {
            builder: self
                .builder
                .property("context-menu", context_menu.clone().upcast()),
        }
    }

    #[cfg(feature = "v0_76")]
    #[cfg_attr(docsrs, doc(cfg(feature = "v0_76")))]
    pub fn context_menu_model(self, context_menu_model: &impl IsA<gio::MenuModel>) -> Self {
        Self {
            builder: self
                .builder
                .property("context-menu-model", context_menu_model.clone().upcast()),
        }
    }

    pub fn cursor_blink_mode(self, cursor_blink_mode: CursorBlinkMode) -> Self {
        Self {
            builder: self
                .builder
                .property("cursor-blink-mode", cursor_blink_mode),
        }
    }

    pub fn cursor_shape(self, cursor_shape: CursorShape) -> Self {
        Self {
            builder: self.builder.property("cursor-shape", cursor_shape),
        }
    }

    pub fn delete_binding(self, delete_binding: EraseBinding) -> Self {
        Self {
            builder: self.builder.property("delete-binding", delete_binding),
        }
    }

    #[cfg(feature = "v0_78")]
    #[cfg_attr(docsrs, doc(cfg(feature = "v0_78")))]
    pub fn enable_a11y(self, enable_a11y: bool) -> Self {
        Self {
            builder: self.builder.property("enable-a11y", enable_a11y),
        }
    }

    pub fn enable_bidi(self, enable_bidi: bool) -> Self {
        Self {
            builder: self.builder.property("enable-bidi", enable_bidi),
        }
    }

    pub fn enable_fallback_scrolling(self, enable_fallback_scrolling: bool) -> Self {
        Self {
            builder: self
                .builder
                .property("enable-fallback-scrolling", enable_fallback_scrolling),
        }
    }

    pub fn enable_shaping(self, enable_shaping: bool) -> Self {
        Self {
            builder: self.builder.property("enable-shaping", enable_shaping),
        }
    }

    pub fn enable_sixel(self, enable_sixel: bool) -> Self {
        Self {
            builder: self.builder.property("enable-sixel", enable_sixel),
        }
    }

    pub fn font_desc(self, font_desc: &pango::FontDescription) -> Self {
        Self {
            builder: self.builder.property("font-desc", font_desc),
        }
    }

    #[cfg(feature = "v0_74")]
    #[cfg_attr(docsrs, doc(cfg(feature = "v0_74")))]
    pub fn font_options(self, font_options: &cairo::FontOptions) -> Self {
        Self {
            builder: self.builder.property("font-options", font_options),
        }
    }

    pub fn font_scale(self, font_scale: f64) -> Self {
        Self {
            builder: self.builder.property("font-scale", font_scale),
        }
    }

    pub fn input_enabled(self, input_enabled: bool) -> Self {
        Self {
            builder: self.builder.property("input-enabled", input_enabled),
        }
    }

    pub fn pointer_autohide(self, pointer_autohide: bool) -> Self {
        Self {
            builder: self.builder.property("pointer-autohide", pointer_autohide),
        }
    }

    pub fn pty(self, pty: &Pty) -> Self {
        Self {
            builder: self.builder.property("pty", pty.clone()),
        }
    }

    #[cfg(feature = "v0_76")]
    #[cfg_attr(docsrs, doc(cfg(feature = "v0_76")))]
    pub fn scroll_on_insert(self, scroll_on_insert: bool) -> Self {
        Self {
            builder: self.builder.property("scroll-on-insert", scroll_on_insert),
        }
    }

    pub fn scroll_on_keystroke(self, scroll_on_keystroke: bool) -> Self {
        Self {
            builder: self
                .builder
                .property("scroll-on-keystroke", scroll_on_keystroke),
        }
    }

    pub fn scroll_on_output(self, scroll_on_output: bool) -> Self {
        Self {
            builder: self.builder.property("scroll-on-output", scroll_on_output),
        }
    }

    pub fn scroll_unit_is_pixels(self, scroll_unit_is_pixels: bool) -> Self {
        Self {
            builder: self
                .builder
                .property("scroll-unit-is-pixels", scroll_unit_is_pixels),
        }
    }

    pub fn scrollback_lines(self, scrollback_lines: u32) -> Self {
        Self {
            builder: self.builder.property("scrollback-lines", scrollback_lines),
        }
    }

    pub fn text_blink_mode(self, text_blink_mode: TextBlinkMode) -> Self {
        Self {
            builder: self.builder.property("text-blink-mode", text_blink_mode),
        }
    }

    #[cfg(feature = "v0_76")]
    #[cfg_attr(docsrs, doc(cfg(feature = "v0_76")))]
    pub fn xalign(self, xalign: Align) -> Self {
        Self {
            builder: self.builder.property("xalign", xalign),
        }
    }

    #[cfg(feature = "v0_76")]
    #[cfg_attr(docsrs, doc(cfg(feature = "v0_76")))]
    pub fn xfill(self, xfill: bool) -> Self {
        Self {
            builder: self.builder.property("xfill", xfill),
        }
    }

    #[cfg(feature = "v0_76")]
    #[cfg_attr(docsrs, doc(cfg(feature = "v0_76")))]
    pub fn yalign(self, yalign: Align) -> Self {
        Self {
            builder: self.builder.property("yalign", yalign),
        }
    }

    #[cfg(feature = "v0_76")]
    #[cfg_attr(docsrs, doc(cfg(feature = "v0_76")))]
    pub fn yfill(self, yfill: bool) -> Self {
        Self {
            builder: self.builder.property("yfill", yfill),
        }
    }

    pub fn can_focus(self, can_focus: bool) -> Self {
        Self {
            builder: self.builder.property("can-focus", can_focus),
        }
    }

    pub fn can_target(self, can_target: bool) -> Self {
        Self {
            builder: self.builder.property("can-target", can_target),
        }
    }

    pub fn css_classes(self, css_classes: impl Into<glib::StrV>) -> Self {
        Self {
            builder: self.builder.property("css-classes", css_classes.into()),
        }
    }

    pub fn css_name(self, css_name: impl Into<glib::GString>) -> Self {
        Self {
            builder: self.builder.property("css-name", css_name.into()),
        }
    }

    //pub fn cursor(self, cursor: /*Ignored*/&gdk::Cursor) -> Self {
    //    Self { builder: self.builder.property("cursor", cursor), }
    //}

    pub fn focus_on_click(self, focus_on_click: bool) -> Self {
        Self {
            builder: self.builder.property("focus-on-click", focus_on_click),
        }
    }

    pub fn focusable(self, focusable: bool) -> Self {
        Self {
            builder: self.builder.property("focusable", focusable),
        }
    }

    //pub fn halign(self, halign: /*Ignored*/gtk::Align) -> Self {
    //    Self { builder: self.builder.property("halign", halign), }
    //}

    pub fn has_tooltip(self, has_tooltip: bool) -> Self {
        Self {
            builder: self.builder.property("has-tooltip", has_tooltip),
        }
    }

    pub fn height_request(self, height_request: i32) -> Self {
        Self {
            builder: self.builder.property("height-request", height_request),
        }
    }

    pub fn hexpand(self, hexpand: bool) -> Self {
        Self {
            builder: self.builder.property("hexpand", hexpand),
        }
    }

    pub fn hexpand_set(self, hexpand_set: bool) -> Self {
        Self {
            builder: self.builder.property("hexpand-set", hexpand_set),
        }
    }

    //pub fn layout_manager(self, layout_manager: &impl IsA</*Ignored*/gtk::LayoutManager>) -> Self {
    //    Self { builder: self.builder.property("layout-manager", layout_manager.clone().upcast()), }
    //}

    pub fn margin_bottom(self, margin_bottom: i32) -> Self {
        Self {
            builder: self.builder.property("margin-bottom", margin_bottom),
        }
    }

    pub fn margin_end(self, margin_end: i32) -> Self {
        Self {
            builder: self.builder.property("margin-end", margin_end),
        }
    }

    pub fn margin_start(self, margin_start: i32) -> Self {
        Self {
            builder: self.builder.property("margin-start", margin_start),
        }
    }

    pub fn margin_top(self, margin_top: i32) -> Self {
        Self {
            builder: self.builder.property("margin-top", margin_top),
        }
    }

    pub fn name(self, name: impl Into<glib::GString>) -> Self {
        Self {
            builder: self.builder.property("name", name.into()),
        }
    }

    pub fn opacity(self, opacity: f64) -> Self {
        Self {
            builder: self.builder.property("opacity", opacity),
        }
    }

    //pub fn overflow(self, overflow: /*Ignored*/gtk::Overflow) -> Self {
    //    Self { builder: self.builder.property("overflow", overflow), }
    //}

    pub fn receives_default(self, receives_default: bool) -> Self {
        Self {
            builder: self.builder.property("receives-default", receives_default),
        }
    }

    pub fn sensitive(self, sensitive: bool) -> Self {
        Self {
            builder: self.builder.property("sensitive", sensitive),
        }
    }

    pub fn tooltip_markup(self, tooltip_markup: impl Into<glib::GString>) -> Self {
        Self {
            builder: self
                .builder
                .property("tooltip-markup", tooltip_markup.into()),
        }
    }

    pub fn tooltip_text(self, tooltip_text: impl Into<glib::GString>) -> Self {
        Self {
            builder: self.builder.property("tooltip-text", tooltip_text.into()),
        }
    }

    //pub fn valign(self, valign: /*Ignored*/gtk::Align) -> Self {
    //    Self { builder: self.builder.property("valign", valign), }
    //}

    pub fn vexpand(self, vexpand: bool) -> Self {
        Self {
            builder: self.builder.property("vexpand", vexpand),
        }
    }

    pub fn vexpand_set(self, vexpand_set: bool) -> Self {
        Self {
            builder: self.builder.property("vexpand-set", vexpand_set),
        }
    }

    pub fn visible(self, visible: bool) -> Self {
        Self {
            builder: self.builder.property("visible", visible),
        }
    }

    pub fn width_request(self, width_request: i32) -> Self {
        Self {
            builder: self.builder.property("width-request", width_request),
        }
    }

    //pub fn accessible_role(self, accessible_role: /*Ignored*/gtk::AccessibleRole) -> Self {
    //    Self { builder: self.builder.property("accessible-role", accessible_role), }
    //}

    //pub fn hadjustment(self, hadjustment: &impl IsA</*Ignored*/gtk::Adjustment>) -> Self {
    //    Self { builder: self.builder.property("hadjustment", hadjustment.clone().upcast()), }
    //}

    //pub fn hscroll_policy(self, hscroll_policy: /*Ignored*/gtk::ScrollablePolicy) -> Self {
    //    Self { builder: self.builder.property("hscroll-policy", hscroll_policy), }
    //}

    //pub fn vadjustment(self, vadjustment: &impl IsA</*Ignored*/gtk::Adjustment>) -> Self {
    //    Self { builder: self.builder.property("vadjustment", vadjustment.clone().upcast()), }
    //}

    //pub fn vscroll_policy(self, vscroll_policy: /*Ignored*/gtk::ScrollablePolicy) -> Self {
    //    Self { builder: self.builder.property("vscroll-policy", vscroll_policy), }
    //}

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

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

pub trait TerminalExt: IsA<Terminal> + sealed::Sealed + 'static {
    #[cfg(feature = "v0_70")]
    #[cfg_attr(docsrs, doc(cfg(feature = "v0_70")))]
    #[doc(alias = "vte_terminal_check_hyperlink_at")]
    fn check_hyperlink_at(&self, x: f64, y: f64) -> Option<glib::GString> {
        unsafe {
            from_glib_full(ffi::vte_terminal_check_hyperlink_at(
                self.as_ref().to_glib_none().0,
                x,
                y,
            ))
        }
    }

    #[cfg(feature = "v0_70")]
    #[cfg_attr(docsrs, doc(cfg(feature = "v0_70")))]
    #[doc(alias = "vte_terminal_check_match_at")]
    fn check_match_at(&self, x: f64, y: f64) -> (Option<glib::GString>, i32) {
        unsafe {
            let mut tag = std::mem::MaybeUninit::uninit();
            let ret = from_glib_full(ffi::vte_terminal_check_match_at(
                self.as_ref().to_glib_none().0,
                x,
                y,
                tag.as_mut_ptr(),
            ));
            (ret, tag.assume_init())
        }
    }

    #[doc(alias = "vte_terminal_copy_clipboard_format")]
    fn copy_clipboard_format(&self, format: Format) {
        unsafe {
            ffi::vte_terminal_copy_clipboard_format(
                self.as_ref().to_glib_none().0,
                format.into_glib(),
            );
        }
    }

    #[doc(alias = "vte_terminal_copy_primary")]
    fn copy_primary(&self) {
        unsafe {
            ffi::vte_terminal_copy_primary(self.as_ref().to_glib_none().0);
        }
    }

    #[doc(alias = "vte_terminal_feed")]
    fn feed(&self, data: &[u8]) {
        let length = data.len() as _;
        unsafe {
            ffi::vte_terminal_feed(
                self.as_ref().to_glib_none().0,
                data.to_glib_none().0,
                length,
            );
        }
    }

    #[doc(alias = "vte_terminal_feed_child")]
    fn feed_child(&self, text: &[u8]) {
        let length = text.len() as _;
        unsafe {
            ffi::vte_terminal_feed_child(
                self.as_ref().to_glib_none().0,
                text.to_glib_none().0,
                length,
            );
        }
    }

    #[doc(alias = "vte_terminal_get_allow_hyperlink")]
    #[doc(alias = "get_allow_hyperlink")]
    #[doc(alias = "allow-hyperlink")]
    fn allows_hyperlink(&self) -> bool {
        unsafe {
            from_glib(ffi::vte_terminal_get_allow_hyperlink(
                self.as_ref().to_glib_none().0,
            ))
        }
    }

    #[doc(alias = "vte_terminal_get_audible_bell")]
    #[doc(alias = "get_audible_bell")]
    #[doc(alias = "audible-bell")]
    fn is_audible_bell(&self) -> bool {
        unsafe {
            from_glib(ffi::vte_terminal_get_audible_bell(
                self.as_ref().to_glib_none().0,
            ))
        }
    }

    #[doc(alias = "vte_terminal_get_bold_is_bright")]
    #[doc(alias = "get_bold_is_bright")]
    #[doc(alias = "bold-is-bright")]
    fn is_bold_is_bright(&self) -> bool {
        unsafe {
            from_glib(ffi::vte_terminal_get_bold_is_bright(
                self.as_ref().to_glib_none().0,
            ))
        }
    }

    #[doc(alias = "vte_terminal_get_cell_height_scale")]
    #[doc(alias = "get_cell_height_scale")]
    #[doc(alias = "cell-height-scale")]
    fn cell_height_scale(&self) -> f64 {
        unsafe { ffi::vte_terminal_get_cell_height_scale(self.as_ref().to_glib_none().0) }
    }

    #[doc(alias = "vte_terminal_get_cell_width_scale")]
    #[doc(alias = "get_cell_width_scale")]
    #[doc(alias = "cell-width-scale")]
    fn cell_width_scale(&self) -> f64 {
        unsafe { ffi::vte_terminal_get_cell_width_scale(self.as_ref().to_glib_none().0) }
    }

    #[doc(alias = "vte_terminal_get_char_height")]
    #[doc(alias = "get_char_height")]
    fn char_height(&self) -> libc::c_long {
        unsafe { ffi::vte_terminal_get_char_height(self.as_ref().to_glib_none().0) }
    }

    #[doc(alias = "vte_terminal_get_char_width")]
    #[doc(alias = "get_char_width")]
    fn char_width(&self) -> libc::c_long {
        unsafe { ffi::vte_terminal_get_char_width(self.as_ref().to_glib_none().0) }
    }

    #[doc(alias = "vte_terminal_get_cjk_ambiguous_width")]
    #[doc(alias = "get_cjk_ambiguous_width")]
    #[doc(alias = "cjk-ambiguous-width")]
    fn cjk_ambiguous_width(&self) -> i32 {
        unsafe { ffi::vte_terminal_get_cjk_ambiguous_width(self.as_ref().to_glib_none().0) }
    }

    #[doc(alias = "vte_terminal_get_color_background_for_draw")]
    #[doc(alias = "get_color_background_for_draw")]
    fn color_background_for_draw(&self) -> gdk::RGBA {
        unsafe {
            let mut color = gdk::RGBA::uninitialized();
            ffi::vte_terminal_get_color_background_for_draw(
                self.as_ref().to_glib_none().0,
                color.to_glib_none_mut().0,
            );
            color
        }
    }

    #[doc(alias = "vte_terminal_get_column_count")]
    #[doc(alias = "get_column_count")]
    fn column_count(&self) -> libc::c_long {
        unsafe { ffi::vte_terminal_get_column_count(self.as_ref().to_glib_none().0) }
    }

    #[cfg(feature = "v0_76")]
    #[cfg_attr(docsrs, doc(cfg(feature = "v0_76")))]
    #[doc(alias = "vte_terminal_get_context_menu")]
    #[doc(alias = "get_context_menu")]
    #[doc(alias = "context-menu")]
    fn context_menu(&self) -> Option<gtk::Widget> {
        unsafe {
            from_glib_none(ffi::vte_terminal_get_context_menu(
                self.as_ref().to_glib_none().0,
            ))
        }
    }

    #[cfg(feature = "v0_76")]
    #[cfg_attr(docsrs, doc(cfg(feature = "v0_76")))]
    #[doc(alias = "vte_terminal_get_context_menu_model")]
    #[doc(alias = "get_context_menu_model")]
    #[doc(alias = "context-menu-model")]
    fn context_menu_model(&self) -> Option<gio::MenuModel> {
        unsafe {
            from_glib_none(ffi::vte_terminal_get_context_menu_model(
                self.as_ref().to_glib_none().0,
            ))
        }
    }

    #[doc(alias = "vte_terminal_get_current_container_name")]
    #[doc(alias = "get_current_container_name")]
    #[doc(alias = "current-container-name")]
    fn current_container_name(&self) -> Option<glib::GString> {
        unsafe {
            from_glib_none(ffi::vte_terminal_get_current_container_name(
                self.as_ref().to_glib_none().0,
            ))
        }
    }

    #[doc(alias = "vte_terminal_get_current_container_runtime")]
    #[doc(alias = "get_current_container_runtime")]
    #[doc(alias = "current-container-runtime")]
    fn current_container_runtime(&self) -> Option<glib::GString> {
        unsafe {
            from_glib_none(ffi::vte_terminal_get_current_container_runtime(
                self.as_ref().to_glib_none().0,
            ))
        }
    }

    #[doc(alias = "vte_terminal_get_current_directory_uri")]
    #[doc(alias = "get_current_directory_uri")]
    #[doc(alias = "current-directory-uri")]
    fn current_directory_uri(&self) -> Option<glib::GString> {
        unsafe {
            from_glib_none(ffi::vte_terminal_get_current_directory_uri(
                self.as_ref().to_glib_none().0,
            ))
        }
    }

    #[doc(alias = "vte_terminal_get_current_file_uri")]
    #[doc(alias = "get_current_file_uri")]
    #[doc(alias = "current-file-uri")]
    fn current_file_uri(&self) -> Option<glib::GString> {
        unsafe {
            from_glib_none(ffi::vte_terminal_get_current_file_uri(
                self.as_ref().to_glib_none().0,
            ))
        }
    }

    #[doc(alias = "vte_terminal_get_cursor_blink_mode")]
    #[doc(alias = "get_cursor_blink_mode")]
    #[doc(alias = "cursor-blink-mode")]
    fn cursor_blink_mode(&self) -> CursorBlinkMode {
        unsafe {
            from_glib(ffi::vte_terminal_get_cursor_blink_mode(
                self.as_ref().to_glib_none().0,
            ))
        }
    }

    #[doc(alias = "vte_terminal_get_cursor_position")]
    #[doc(alias = "get_cursor_position")]
    fn cursor_position(&self) -> (libc::c_long, libc::c_long) {
        unsafe {
            let mut column = std::mem::MaybeUninit::uninit();
            let mut row = std::mem::MaybeUninit::uninit();
            ffi::vte_terminal_get_cursor_position(
                self.as_ref().to_glib_none().0,
                column.as_mut_ptr(),
                row.as_mut_ptr(),
            );
            (column.assume_init(), row.assume_init())
        }
    }

    #[doc(alias = "vte_terminal_get_cursor_shape")]
    #[doc(alias = "get_cursor_shape")]
    #[doc(alias = "cursor-shape")]
    fn cursor_shape(&self) -> CursorShape {
        unsafe {
            from_glib(ffi::vte_terminal_get_cursor_shape(
                self.as_ref().to_glib_none().0,
            ))
        }
    }

    #[cfg(feature = "v0_78")]
    #[cfg_attr(docsrs, doc(cfg(feature = "v0_78")))]
    #[doc(alias = "vte_terminal_get_enable_a11y")]
    #[doc(alias = "get_enable_a11y")]
    #[doc(alias = "enable-a11y")]
    fn enables_a11y(&self) -> bool {
        unsafe {
            from_glib(ffi::vte_terminal_get_enable_a11y(
                self.as_ref().to_glib_none().0,
            ))
        }
    }

    #[doc(alias = "vte_terminal_get_enable_bidi")]
    #[doc(alias = "get_enable_bidi")]
    #[doc(alias = "enable-bidi")]
    fn enables_bidi(&self) -> bool {
        unsafe {
            from_glib(ffi::vte_terminal_get_enable_bidi(
                self.as_ref().to_glib_none().0,
            ))
        }
    }

    #[doc(alias = "vte_terminal_get_enable_fallback_scrolling")]
    #[doc(alias = "get_enable_fallback_scrolling")]
    #[doc(alias = "enable-fallback-scrolling")]
    fn enables_fallback_scrolling(&self) -> bool {
        unsafe {
            from_glib(ffi::vte_terminal_get_enable_fallback_scrolling(
                self.as_ref().to_glib_none().0,
            ))
        }
    }

    #[doc(alias = "vte_terminal_get_enable_shaping")]
    #[doc(alias = "get_enable_shaping")]
    #[doc(alias = "enable-shaping")]
    fn enables_shaping(&self) -> bool {
        unsafe {
            from_glib(ffi::vte_terminal_get_enable_shaping(
                self.as_ref().to_glib_none().0,
            ))
        }
    }

    #[doc(alias = "vte_terminal_get_enable_sixel")]
    #[doc(alias = "get_enable_sixel")]
    #[doc(alias = "enable-sixel")]
    fn enables_sixel(&self) -> bool {
        unsafe {
            from_glib(ffi::vte_terminal_get_enable_sixel(
                self.as_ref().to_glib_none().0,
            ))
        }
    }

    #[doc(alias = "vte_terminal_get_font")]
    #[doc(alias = "get_font")]
    fn font(&self) -> Option<pango::FontDescription> {
        unsafe { from_glib_none(ffi::vte_terminal_get_font(self.as_ref().to_glib_none().0)) }
    }

    #[cfg(feature = "v0_74")]
    #[cfg_attr(docsrs, doc(cfg(feature = "v0_74")))]
    #[doc(alias = "vte_terminal_get_font_options")]
    #[doc(alias = "get_font_options")]
    #[doc(alias = "font-options")]
    fn font_options(&self) -> Option<cairo::FontOptions> {
        unsafe {
            from_glib_none(ffi::vte_terminal_get_font_options(
                self.as_ref().to_glib_none().0,
            ))
        }
    }

    #[doc(alias = "vte_terminal_get_font_scale")]
    #[doc(alias = "get_font_scale")]
    #[doc(alias = "font-scale")]
    fn font_scale(&self) -> f64 {
        unsafe { ffi::vte_terminal_get_font_scale(self.as_ref().to_glib_none().0) }
    }

    #[doc(alias = "vte_terminal_get_has_selection")]
    #[doc(alias = "get_has_selection")]
    fn has_selection(&self) -> bool {
        unsafe {
            from_glib(ffi::vte_terminal_get_has_selection(
                self.as_ref().to_glib_none().0,
            ))
        }
    }

    #[doc(alias = "vte_terminal_get_input_enabled")]
    #[doc(alias = "get_input_enabled")]
    #[doc(alias = "input-enabled")]
    fn is_input_enabled(&self) -> bool {
        unsafe {
            from_glib(ffi::vte_terminal_get_input_enabled(
                self.as_ref().to_glib_none().0,
            ))
        }
    }

    #[doc(alias = "vte_terminal_get_mouse_autohide")]
    #[doc(alias = "get_mouse_autohide")]
    fn is_mouse_autohide(&self) -> bool {
        unsafe {
            from_glib(ffi::vte_terminal_get_mouse_autohide(
                self.as_ref().to_glib_none().0,
            ))
        }
    }

    #[doc(alias = "vte_terminal_get_pty")]
    #[doc(alias = "get_pty")]
    fn pty(&self) -> Option<Pty> {
        unsafe { from_glib_none(ffi::vte_terminal_get_pty(self.as_ref().to_glib_none().0)) }
    }

    #[doc(alias = "vte_terminal_get_row_count")]
    #[doc(alias = "get_row_count")]
    fn row_count(&self) -> libc::c_long {
        unsafe { ffi::vte_terminal_get_row_count(self.as_ref().to_glib_none().0) }
    }

    #[cfg(feature = "v0_76")]
    #[cfg_attr(docsrs, doc(cfg(feature = "v0_76")))]
    #[doc(alias = "vte_terminal_get_scroll_on_insert")]
    #[doc(alias = "get_scroll_on_insert")]
    #[doc(alias = "scroll-on-insert")]
    fn is_scroll_on_insert(&self) -> bool {
        unsafe {
            from_glib(ffi::vte_terminal_get_scroll_on_insert(
                self.as_ref().to_glib_none().0,
            ))
        }
    }

    #[doc(alias = "vte_terminal_get_scroll_on_keystroke")]
    #[doc(alias = "get_scroll_on_keystroke")]
    #[doc(alias = "scroll-on-keystroke")]
    fn is_scroll_on_keystroke(&self) -> bool {
        unsafe {
            from_glib(ffi::vte_terminal_get_scroll_on_keystroke(
                self.as_ref().to_glib_none().0,
            ))
        }
    }

    #[doc(alias = "vte_terminal_get_scroll_on_output")]
    #[doc(alias = "get_scroll_on_output")]
    #[doc(alias = "scroll-on-output")]
    fn is_scroll_on_output(&self) -> bool {
        unsafe {
            from_glib(ffi::vte_terminal_get_scroll_on_output(
                self.as_ref().to_glib_none().0,
            ))
        }
    }

    #[doc(alias = "vte_terminal_get_scroll_unit_is_pixels")]
    #[doc(alias = "get_scroll_unit_is_pixels")]
    #[doc(alias = "scroll-unit-is-pixels")]
    fn is_scroll_unit_is_pixels(&self) -> bool {
        unsafe {
            from_glib(ffi::vte_terminal_get_scroll_unit_is_pixels(
                self.as_ref().to_glib_none().0,
            ))
        }
    }

    #[doc(alias = "vte_terminal_get_scrollback_lines")]
    #[doc(alias = "get_scrollback_lines")]
    #[doc(alias = "scrollback-lines")]
    fn scrollback_lines(&self) -> libc::c_long {
        unsafe { ffi::vte_terminal_get_scrollback_lines(self.as_ref().to_glib_none().0) }
    }

    //#[cfg_attr(feature = "v0_76", deprecated = "Since 0.76")]
    //#[allow(deprecated)]
    //#[doc(alias = "vte_terminal_get_text")]
    //#[doc(alias = "get_text")]
    //fn text(&self, is_selected: Option<&mut dyn (FnMut(&Terminal, libc::c_long, libc::c_long) -> bool)>, attributes: /*Unknown conversion*//*Unimplemented*/Array TypeId { ns_id: 1, id: 1 }) -> Option<glib::GString> {
    //    unsafe { TODO: call ffi:vte_terminal_get_text() }
    //}

    #[doc(alias = "vte_terminal_get_text_blink_mode")]
    #[doc(alias = "get_text_blink_mode")]
    #[doc(alias = "text-blink-mode")]
    fn text_blink_mode(&self) -> TextBlinkMode {
        unsafe {
            from_glib(ffi::vte_terminal_get_text_blink_mode(
                self.as_ref().to_glib_none().0,
            ))
        }
    }

    #[cfg(feature = "v0_76")]
    #[cfg_attr(docsrs, doc(cfg(feature = "v0_76")))]
    #[doc(alias = "vte_terminal_get_text_format")]
    #[doc(alias = "get_text_format")]
    fn text_format(&self, format: Format) -> Option<glib::GString> {
        unsafe {
            from_glib_full(ffi::vte_terminal_get_text_format(
                self.as_ref().to_glib_none().0,
                format.into_glib(),
            ))
        }
    }

    //#[cfg_attr(feature = "v0_76", deprecated = "Since 0.76")]
    //#[allow(deprecated)]
    //#[doc(alias = "vte_terminal_get_text_range")]
    //#[doc(alias = "get_text_range")]
    //fn text_range(&self, start_row: libc::c_long, start_col: libc::c_long, end_row: libc::c_long, end_col: libc::c_long, is_selected: Option<&mut dyn (FnMut(&Terminal, libc::c_long, libc::c_long) -> bool)>, attributes: /*Unknown conversion*//*Unimplemented*/Array TypeId { ns_id: 1, id: 1 }) -> Option<glib::GString> {
    //    unsafe { TODO: call ffi:vte_terminal_get_text_range() }
    //}

    #[cfg(feature = "v0_72")]
    #[cfg_attr(docsrs, doc(cfg(feature = "v0_72")))]
    #[doc(alias = "vte_terminal_get_text_range_format")]
    #[doc(alias = "get_text_range_format")]
    fn text_range_format(
        &self,
        format: Format,
        start_row: libc::c_long,
        start_col: libc::c_long,
        end_row: libc::c_long,
        end_col: libc::c_long,
    ) -> (Option<glib::GString>, usize) {
        unsafe {
            let mut length = std::mem::MaybeUninit::uninit();
            let ret = from_glib_full(ffi::vte_terminal_get_text_range_format(
                self.as_ref().to_glib_none().0,
                format.into_glib(),
                start_row,
                start_col,
                end_row,
                end_col,
                length.as_mut_ptr(),
            ));
            (ret, length.assume_init())
        }
    }

    #[cfg(feature = "v0_70")]
    #[cfg_attr(docsrs, doc(cfg(feature = "v0_70")))]
    #[doc(alias = "vte_terminal_get_text_selected")]
    #[doc(alias = "get_text_selected")]
    fn text_selected(&self, format: Format) -> Option<glib::GString> {
        unsafe {
            from_glib_full(ffi::vte_terminal_get_text_selected(
                self.as_ref().to_glib_none().0,
                format.into_glib(),
            ))
        }
    }

    #[cfg(feature = "v0_72")]
    #[cfg_attr(docsrs, doc(cfg(feature = "v0_72")))]
    #[doc(alias = "vte_terminal_get_text_selected_full")]
    #[doc(alias = "get_text_selected_full")]
    fn text_selected_full(&self, format: Format) -> (Option<glib::GString>, usize) {
        unsafe {
            let mut length = std::mem::MaybeUninit::uninit();
            let ret = from_glib_full(ffi::vte_terminal_get_text_selected_full(
                self.as_ref().to_glib_none().0,
                format.into_glib(),
                length.as_mut_ptr(),
            ));
            (ret, length.assume_init())
        }
    }

    #[doc(alias = "vte_terminal_get_window_title")]
    #[doc(alias = "get_window_title")]
    #[doc(alias = "window-title")]
    fn window_title(&self) -> Option<glib::GString> {
        unsafe {
            from_glib_none(ffi::vte_terminal_get_window_title(
                self.as_ref().to_glib_none().0,
            ))
        }
    }

    #[doc(alias = "vte_terminal_get_word_char_exceptions")]
    #[doc(alias = "get_word_char_exceptions")]
    #[doc(alias = "word-char-exceptions")]
    fn word_char_exceptions(&self) -> Option<glib::GString> {
        unsafe {
            from_glib_none(ffi::vte_terminal_get_word_char_exceptions(
                self.as_ref().to_glib_none().0,
            ))
        }
    }

    #[cfg(feature = "v0_76")]
    #[cfg_attr(docsrs, doc(cfg(feature = "v0_76")))]
    #[doc(alias = "vte_terminal_get_xalign")]
    #[doc(alias = "get_xalign")]
    fn xalign(&self) -> Align {
        unsafe { from_glib(ffi::vte_terminal_get_xalign(self.as_ref().to_glib_none().0)) }
    }

    #[cfg(feature = "v0_76")]
    #[cfg_attr(docsrs, doc(cfg(feature = "v0_76")))]
    #[doc(alias = "vte_terminal_get_xfill")]
    #[doc(alias = "get_xfill")]
    #[doc(alias = "xfill")]
    fn is_xfill(&self) -> bool {
        unsafe { from_glib(ffi::vte_terminal_get_xfill(self.as_ref().to_glib_none().0)) }
    }

    #[cfg(feature = "v0_76")]
    #[cfg_attr(docsrs, doc(cfg(feature = "v0_76")))]
    #[doc(alias = "vte_terminal_get_yalign")]
    #[doc(alias = "get_yalign")]
    fn yalign(&self) -> Align {
        unsafe { from_glib(ffi::vte_terminal_get_yalign(self.as_ref().to_glib_none().0)) }
    }

    #[cfg(feature = "v0_76")]
    #[cfg_attr(docsrs, doc(cfg(feature = "v0_76")))]
    #[doc(alias = "vte_terminal_get_yfill")]
    #[doc(alias = "get_yfill")]
    #[doc(alias = "yfill")]
    fn is_yfill(&self) -> bool {
        unsafe { from_glib(ffi::vte_terminal_get_yfill(self.as_ref().to_glib_none().0)) }
    }

    #[doc(alias = "vte_terminal_match_add_regex")]
    fn match_add_regex(&self, regex: &Regex, flags: u32) -> i32 {
        unsafe {
            ffi::vte_terminal_match_add_regex(
                self.as_ref().to_glib_none().0,
                regex.to_glib_none().0,
                flags,
            )
        }
    }

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

    #[doc(alias = "vte_terminal_match_remove_all")]
    fn match_remove_all(&self) {
        unsafe {
            ffi::vte_terminal_match_remove_all(self.as_ref().to_glib_none().0);
        }
    }

    #[doc(alias = "vte_terminal_match_set_cursor_name")]
    fn match_set_cursor_name(&self, tag: i32, cursor_name: &str) {
        unsafe {
            ffi::vte_terminal_match_set_cursor_name(
                self.as_ref().to_glib_none().0,
                tag,
                cursor_name.to_glib_none().0,
            );
        }
    }

    #[doc(alias = "vte_terminal_paste_clipboard")]
    fn paste_clipboard(&self) {
        unsafe {
            ffi::vte_terminal_paste_clipboard(self.as_ref().to_glib_none().0);
        }
    }

    #[doc(alias = "vte_terminal_paste_primary")]
    fn paste_primary(&self) {
        unsafe {
            ffi::vte_terminal_paste_primary(self.as_ref().to_glib_none().0);
        }
    }

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

    #[doc(alias = "vte_terminal_pty_new_sync")]
    fn pty_new_sync(
        &self,
        flags: PtyFlags,
        cancellable: Option<&impl IsA<gio::Cancellable>>,
    ) -> Result<Pty, glib::Error> {
        unsafe {
            let mut error = std::ptr::null_mut();
            let ret = ffi::vte_terminal_pty_new_sync(
                self.as_ref().to_glib_none().0,
                flags.into_glib(),
                cancellable.map(|p| p.as_ref()).to_glib_none().0,
                &mut error,
            );
            if error.is_null() {
                Ok(from_glib_full(ret))
            } else {
                Err(from_glib_full(error))
            }
        }
    }

    #[doc(alias = "vte_terminal_reset")]
    fn reset(&self, clear_tabstops: bool, clear_history: bool) {
        unsafe {
            ffi::vte_terminal_reset(
                self.as_ref().to_glib_none().0,
                clear_tabstops.into_glib(),
                clear_history.into_glib(),
            );
        }
    }

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

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

    #[doc(alias = "vte_terminal_search_get_regex")]
    fn search_get_regex(&self) -> Option<Regex> {
        unsafe {
            from_glib_none(ffi::vte_terminal_search_get_regex(
                self.as_ref().to_glib_none().0,
            ))
        }
    }

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

    #[doc(alias = "vte_terminal_search_set_regex")]
    fn search_set_regex(&self, regex: Option<&Regex>, flags: u32) {
        unsafe {
            ffi::vte_terminal_search_set_regex(
                self.as_ref().to_glib_none().0,
                regex.to_glib_none().0,
                flags,
            );
        }
    }

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

    #[doc(alias = "vte_terminal_select_all")]
    fn select_all(&self) {
        unsafe {
            ffi::vte_terminal_select_all(self.as_ref().to_glib_none().0);
        }
    }

    #[doc(alias = "vte_terminal_set_allow_hyperlink")]
    #[doc(alias = "allow-hyperlink")]
    fn set_allow_hyperlink(&self, allow_hyperlink: bool) {
        unsafe {
            ffi::vte_terminal_set_allow_hyperlink(
                self.as_ref().to_glib_none().0,
                allow_hyperlink.into_glib(),
            );
        }
    }

    #[doc(alias = "vte_terminal_set_audible_bell")]
    #[doc(alias = "audible-bell")]
    fn set_audible_bell(&self, is_audible: bool) {
        unsafe {
            ffi::vte_terminal_set_audible_bell(
                self.as_ref().to_glib_none().0,
                is_audible.into_glib(),
            );
        }
    }

    #[doc(alias = "vte_terminal_set_backspace_binding")]
    #[doc(alias = "backspace-binding")]
    fn set_backspace_binding(&self, binding: EraseBinding) {
        unsafe {
            ffi::vte_terminal_set_backspace_binding(
                self.as_ref().to_glib_none().0,
                binding.into_glib(),
            );
        }
    }

    #[doc(alias = "vte_terminal_set_bold_is_bright")]
    #[doc(alias = "bold-is-bright")]
    fn set_bold_is_bright(&self, bold_is_bright: bool) {
        unsafe {
            ffi::vte_terminal_set_bold_is_bright(
                self.as_ref().to_glib_none().0,
                bold_is_bright.into_glib(),
            );
        }
    }

    #[doc(alias = "vte_terminal_set_cell_height_scale")]
    #[doc(alias = "cell-height-scale")]
    fn set_cell_height_scale(&self, scale: f64) {
        unsafe {
            ffi::vte_terminal_set_cell_height_scale(self.as_ref().to_glib_none().0, scale);
        }
    }

    #[doc(alias = "vte_terminal_set_cell_width_scale")]
    #[doc(alias = "cell-width-scale")]
    fn set_cell_width_scale(&self, scale: f64) {
        unsafe {
            ffi::vte_terminal_set_cell_width_scale(self.as_ref().to_glib_none().0, scale);
        }
    }

    #[doc(alias = "vte_terminal_set_cjk_ambiguous_width")]
    #[doc(alias = "cjk-ambiguous-width")]
    fn set_cjk_ambiguous_width(&self, width: i32) {
        unsafe {
            ffi::vte_terminal_set_cjk_ambiguous_width(self.as_ref().to_glib_none().0, width);
        }
    }

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

    #[doc(alias = "vte_terminal_set_color_background")]
    fn set_color_background(&self, background: &gdk::RGBA) {
        unsafe {
            ffi::vte_terminal_set_color_background(
                self.as_ref().to_glib_none().0,
                background.to_glib_none().0,
            );
        }
    }

    #[doc(alias = "vte_terminal_set_color_bold")]
    fn set_color_bold(&self, bold: Option<&gdk::RGBA>) {
        unsafe {
            ffi::vte_terminal_set_color_bold(self.as_ref().to_glib_none().0, bold.to_glib_none().0);
        }
    }

    #[doc(alias = "vte_terminal_set_color_cursor")]
    fn set_color_cursor(&self, cursor_background: Option<&gdk::RGBA>) {
        unsafe {
            ffi::vte_terminal_set_color_cursor(
                self.as_ref().to_glib_none().0,
                cursor_background.to_glib_none().0,
            );
        }
    }

    #[doc(alias = "vte_terminal_set_color_cursor_foreground")]
    fn set_color_cursor_foreground(&self, cursor_foreground: Option<&gdk::RGBA>) {
        unsafe {
            ffi::vte_terminal_set_color_cursor_foreground(
                self.as_ref().to_glib_none().0,
                cursor_foreground.to_glib_none().0,
            );
        }
    }

    #[doc(alias = "vte_terminal_set_color_foreground")]
    fn set_color_foreground(&self, foreground: &gdk::RGBA) {
        unsafe {
            ffi::vte_terminal_set_color_foreground(
                self.as_ref().to_glib_none().0,
                foreground.to_glib_none().0,
            );
        }
    }

    #[doc(alias = "vte_terminal_set_color_highlight")]
    fn set_color_highlight(&self, highlight_background: Option<&gdk::RGBA>) {
        unsafe {
            ffi::vte_terminal_set_color_highlight(
                self.as_ref().to_glib_none().0,
                highlight_background.to_glib_none().0,
            );
        }
    }

    #[doc(alias = "vte_terminal_set_color_highlight_foreground")]
    fn set_color_highlight_foreground(&self, highlight_foreground: Option<&gdk::RGBA>) {
        unsafe {
            ffi::vte_terminal_set_color_highlight_foreground(
                self.as_ref().to_glib_none().0,
                highlight_foreground.to_glib_none().0,
            );
        }
    }

    #[cfg(feature = "v0_76")]
    #[cfg_attr(docsrs, doc(cfg(feature = "v0_76")))]
    #[doc(alias = "vte_terminal_set_context_menu")]
    #[doc(alias = "context-menu")]
    fn set_context_menu(&self, menu: Option<&impl IsA<gtk::Widget>>) {
        unsafe {
            ffi::vte_terminal_set_context_menu(
                self.as_ref().to_glib_none().0,
                menu.map(|p| p.as_ref()).to_glib_none().0,
            );
        }
    }

    #[cfg(feature = "v0_76")]
    #[cfg_attr(docsrs, doc(cfg(feature = "v0_76")))]
    #[doc(alias = "vte_terminal_set_context_menu_model")]
    #[doc(alias = "context-menu-model")]
    fn set_context_menu_model(&self, model: Option<&impl IsA<gio::MenuModel>>) {
        unsafe {
            ffi::vte_terminal_set_context_menu_model(
                self.as_ref().to_glib_none().0,
                model.map(|p| p.as_ref()).to_glib_none().0,
            );
        }
    }

    #[doc(alias = "vte_terminal_set_cursor_blink_mode")]
    #[doc(alias = "cursor-blink-mode")]
    fn set_cursor_blink_mode(&self, mode: CursorBlinkMode) {
        unsafe {
            ffi::vte_terminal_set_cursor_blink_mode(
                self.as_ref().to_glib_none().0,
                mode.into_glib(),
            );
        }
    }

    #[doc(alias = "vte_terminal_set_cursor_shape")]
    #[doc(alias = "cursor-shape")]
    fn set_cursor_shape(&self, shape: CursorShape) {
        unsafe {
            ffi::vte_terminal_set_cursor_shape(self.as_ref().to_glib_none().0, shape.into_glib());
        }
    }

    #[doc(alias = "vte_terminal_set_default_colors")]
    fn set_default_colors(&self) {
        unsafe {
            ffi::vte_terminal_set_default_colors(self.as_ref().to_glib_none().0);
        }
    }

    #[doc(alias = "vte_terminal_set_delete_binding")]
    #[doc(alias = "delete-binding")]
    fn set_delete_binding(&self, binding: EraseBinding) {
        unsafe {
            ffi::vte_terminal_set_delete_binding(
                self.as_ref().to_glib_none().0,
                binding.into_glib(),
            );
        }
    }

    #[cfg(feature = "v0_78")]
    #[cfg_attr(docsrs, doc(cfg(feature = "v0_78")))]
    #[doc(alias = "vte_terminal_set_enable_a11y")]
    #[doc(alias = "enable-a11y")]
    fn set_enable_a11y(&self, enable_a11y: bool) {
        unsafe {
            ffi::vte_terminal_set_enable_a11y(
                self.as_ref().to_glib_none().0,
                enable_a11y.into_glib(),
            );
        }
    }

    #[doc(alias = "vte_terminal_set_enable_bidi")]
    #[doc(alias = "enable-bidi")]
    fn set_enable_bidi(&self, enable_bidi: bool) {
        unsafe {
            ffi::vte_terminal_set_enable_bidi(
                self.as_ref().to_glib_none().0,
                enable_bidi.into_glib(),
            );
        }
    }

    #[doc(alias = "vte_terminal_set_enable_fallback_scrolling")]
    #[doc(alias = "enable-fallback-scrolling")]
    fn set_enable_fallback_scrolling(&self, enable: bool) {
        unsafe {
            ffi::vte_terminal_set_enable_fallback_scrolling(
                self.as_ref().to_glib_none().0,
                enable.into_glib(),
            );
        }
    }

    #[doc(alias = "vte_terminal_set_enable_shaping")]
    #[doc(alias = "enable-shaping")]
    fn set_enable_shaping(&self, enable_shaping: bool) {
        unsafe {
            ffi::vte_terminal_set_enable_shaping(
                self.as_ref().to_glib_none().0,
                enable_shaping.into_glib(),
            );
        }
    }

    #[doc(alias = "vte_terminal_set_enable_sixel")]
    #[doc(alias = "enable-sixel")]
    fn set_enable_sixel(&self, enabled: bool) {
        unsafe {
            ffi::vte_terminal_set_enable_sixel(self.as_ref().to_glib_none().0, enabled.into_glib());
        }
    }

    #[doc(alias = "vte_terminal_set_font")]
    fn set_font(&self, font_desc: Option<&pango::FontDescription>) {
        unsafe {
            ffi::vte_terminal_set_font(self.as_ref().to_glib_none().0, font_desc.to_glib_none().0);
        }
    }

    #[cfg(feature = "v0_74")]
    #[cfg_attr(docsrs, doc(cfg(feature = "v0_74")))]
    #[doc(alias = "vte_terminal_set_font_options")]
    #[doc(alias = "font-options")]
    fn set_font_options(&self, font_options: Option<&cairo::FontOptions>) {
        unsafe {
            ffi::vte_terminal_set_font_options(
                self.as_ref().to_glib_none().0,
                font_options.to_glib_none().0,
            );
        }
    }

    #[doc(alias = "vte_terminal_set_font_scale")]
    #[doc(alias = "font-scale")]
    fn set_font_scale(&self, scale: f64) {
        unsafe {
            ffi::vte_terminal_set_font_scale(self.as_ref().to_glib_none().0, scale);
        }
    }

    #[doc(alias = "vte_terminal_set_input_enabled")]
    #[doc(alias = "input-enabled")]
    fn set_input_enabled(&self, enabled: bool) {
        unsafe {
            ffi::vte_terminal_set_input_enabled(
                self.as_ref().to_glib_none().0,
                enabled.into_glib(),
            );
        }
    }

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

    #[doc(alias = "vte_terminal_set_pty")]
    #[doc(alias = "pty")]
    fn set_pty(&self, pty: Option<&Pty>) {
        unsafe {
            ffi::vte_terminal_set_pty(self.as_ref().to_glib_none().0, pty.to_glib_none().0);
        }
    }

    #[cfg(feature = "v0_76")]
    #[cfg_attr(docsrs, doc(cfg(feature = "v0_76")))]
    #[doc(alias = "vte_terminal_set_scroll_on_insert")]
    #[doc(alias = "scroll-on-insert")]
    fn set_scroll_on_insert(&self, scroll: bool) {
        unsafe {
            ffi::vte_terminal_set_scroll_on_insert(
                self.as_ref().to_glib_none().0,
                scroll.into_glib(),
            );
        }
    }

    #[doc(alias = "vte_terminal_set_scroll_on_keystroke")]
    #[doc(alias = "scroll-on-keystroke")]
    fn set_scroll_on_keystroke(&self, scroll: bool) {
        unsafe {
            ffi::vte_terminal_set_scroll_on_keystroke(
                self.as_ref().to_glib_none().0,
                scroll.into_glib(),
            );
        }
    }

    #[doc(alias = "vte_terminal_set_scroll_on_output")]
    #[doc(alias = "scroll-on-output")]
    fn set_scroll_on_output(&self, scroll: bool) {
        unsafe {
            ffi::vte_terminal_set_scroll_on_output(
                self.as_ref().to_glib_none().0,
                scroll.into_glib(),
            );
        }
    }

    #[doc(alias = "vte_terminal_set_scroll_unit_is_pixels")]
    #[doc(alias = "scroll-unit-is-pixels")]
    fn set_scroll_unit_is_pixels(&self, enable: bool) {
        unsafe {
            ffi::vte_terminal_set_scroll_unit_is_pixels(
                self.as_ref().to_glib_none().0,
                enable.into_glib(),
            );
        }
    }

    #[doc(alias = "vte_terminal_set_scrollback_lines")]
    #[doc(alias = "scrollback-lines")]
    fn set_scrollback_lines(&self, lines: libc::c_long) {
        unsafe {
            ffi::vte_terminal_set_scrollback_lines(self.as_ref().to_glib_none().0, lines);
        }
    }

    #[doc(alias = "vte_terminal_set_size")]
    fn set_size(&self, columns: libc::c_long, rows: libc::c_long) {
        unsafe {
            ffi::vte_terminal_set_size(self.as_ref().to_glib_none().0, columns, rows);
        }
    }

    #[doc(alias = "vte_terminal_set_text_blink_mode")]
    #[doc(alias = "text-blink-mode")]
    fn set_text_blink_mode(&self, text_blink_mode: TextBlinkMode) {
        unsafe {
            ffi::vte_terminal_set_text_blink_mode(
                self.as_ref().to_glib_none().0,
                text_blink_mode.into_glib(),
            );
        }
    }

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

    #[cfg(feature = "v0_76")]
    #[cfg_attr(docsrs, doc(cfg(feature = "v0_76")))]
    #[doc(alias = "vte_terminal_set_xalign")]
    #[doc(alias = "xalign")]
    fn set_xalign(&self, align: Align) {
        unsafe {
            ffi::vte_terminal_set_xalign(self.as_ref().to_glib_none().0, align.into_glib());
        }
    }

    #[cfg(feature = "v0_76")]
    #[cfg_attr(docsrs, doc(cfg(feature = "v0_76")))]
    #[doc(alias = "vte_terminal_set_xfill")]
    #[doc(alias = "xfill")]
    fn set_xfill(&self, fill: bool) {
        unsafe {
            ffi::vte_terminal_set_xfill(self.as_ref().to_glib_none().0, fill.into_glib());
        }
    }

    #[cfg(feature = "v0_76")]
    #[cfg_attr(docsrs, doc(cfg(feature = "v0_76")))]
    #[doc(alias = "vte_terminal_set_yalign")]
    #[doc(alias = "yalign")]
    fn set_yalign(&self, align: Align) {
        unsafe {
            ffi::vte_terminal_set_yalign(self.as_ref().to_glib_none().0, align.into_glib());
        }
    }

    #[cfg(feature = "v0_76")]
    #[cfg_attr(docsrs, doc(cfg(feature = "v0_76")))]
    #[doc(alias = "vte_terminal_set_yfill")]
    #[doc(alias = "yfill")]
    fn set_yfill(&self, fill: bool) {
        unsafe {
            ffi::vte_terminal_set_yfill(self.as_ref().to_glib_none().0, fill.into_glib());
        }
    }

    #[doc(alias = "vte_terminal_unselect_all")]
    fn unselect_all(&self) {
        unsafe {
            ffi::vte_terminal_unselect_all(self.as_ref().to_glib_none().0);
        }
    }

    #[doc(alias = "vte_terminal_write_contents_sync")]
    fn write_contents_sync(
        &self,
        stream: &impl IsA<gio::OutputStream>,
        flags: WriteFlags,
        cancellable: Option<&impl IsA<gio::Cancellable>>,
    ) -> Result<(), glib::Error> {
        unsafe {
            let mut error = std::ptr::null_mut();
            let is_ok = ffi::vte_terminal_write_contents_sync(
                self.as_ref().to_glib_none().0,
                stream.as_ref().to_glib_none().0,
                flags.into_glib(),
                cancellable.map(|p| p.as_ref()).to_glib_none().0,
                &mut error,
            );
            debug_assert_eq!(is_ok == glib::ffi::GFALSE, !error.is_null());
            if error.is_null() {
                Ok(())
            } else {
                Err(from_glib_full(error))
            }
        }
    }

    #[doc(alias = "backspace-binding")]
    fn backspace_binding(&self) -> EraseBinding {
        ObjectExt::property(self.as_ref(), "backspace-binding")
    }

    #[doc(alias = "delete-binding")]
    fn delete_binding(&self) -> EraseBinding {
        ObjectExt::property(self.as_ref(), "delete-binding")
    }

    #[doc(alias = "font-desc")]
    fn font_desc(&self) -> Option<pango::FontDescription> {
        ObjectExt::property(self.as_ref(), "font-desc")
    }

    #[doc(alias = "font-desc")]
    fn set_font_desc(&self, font_desc: Option<&pango::FontDescription>) {
        ObjectExt::set_property(self.as_ref(), "font-desc", font_desc)
    }

    #[doc(alias = "hyperlink-hover-uri")]
    fn hyperlink_hover_uri(&self) -> Option<glib::GString> {
        ObjectExt::property(self.as_ref(), "hyperlink-hover-uri")
    }

    #[doc(alias = "pointer-autohide")]
    fn is_pointer_autohide(&self) -> bool {
        ObjectExt::property(self.as_ref(), "pointer-autohide")
    }

    #[doc(alias = "pointer-autohide")]
    fn set_pointer_autohide(&self, pointer_autohide: bool) {
        ObjectExt::set_property(self.as_ref(), "pointer-autohide", pointer_autohide)
    }

    #[doc(alias = "bell")]
    fn connect_bell<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
        unsafe extern "C" fn bell_trampoline<P: IsA<Terminal>, F: Fn(&P) + 'static>(
            this: *mut ffi::VteTerminal,
            f: glib::ffi::gpointer,
        ) {
            let f: &F = &*(f as *const F);
            f(Terminal::from_glib_borrow(this).unsafe_cast_ref())
        }
        unsafe {
            let f: Box_<F> = Box_::new(f);
            connect_raw(
                self.as_ptr() as *mut _,
                b"bell\0".as_ptr() as *const _,
                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
                    bell_trampoline::<Self, F> as *const (),
                )),
                Box_::into_raw(f),
            )
        }
    }

    #[doc(alias = "char-size-changed")]
    fn connect_char_size_changed<F: Fn(&Self, u32, u32) + 'static>(&self, f: F) -> SignalHandlerId {
        unsafe extern "C" fn char_size_changed_trampoline<
            P: IsA<Terminal>,
            F: Fn(&P, u32, u32) + 'static,
        >(
            this: *mut ffi::VteTerminal,
            width: libc::c_uint,
            height: libc::c_uint,
            f: glib::ffi::gpointer,
        ) {
            let f: &F = &*(f as *const F);
            f(
                Terminal::from_glib_borrow(this).unsafe_cast_ref(),
                width,
                height,
            )
        }
        unsafe {
            let f: Box_<F> = Box_::new(f);
            connect_raw(
                self.as_ptr() as *mut _,
                b"char-size-changed\0".as_ptr() as *const _,
                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
                    char_size_changed_trampoline::<Self, F> as *const (),
                )),
                Box_::into_raw(f),
            )
        }
    }

    #[doc(alias = "child-exited")]
    fn connect_child_exited<F: Fn(&Self, i32) + 'static>(&self, f: F) -> SignalHandlerId {
        unsafe extern "C" fn child_exited_trampoline<P: IsA<Terminal>, F: Fn(&P, i32) + 'static>(
            this: *mut ffi::VteTerminal,
            status: libc::c_int,
            f: glib::ffi::gpointer,
        ) {
            let f: &F = &*(f as *const F);
            f(Terminal::from_glib_borrow(this).unsafe_cast_ref(), status)
        }
        unsafe {
            let f: Box_<F> = Box_::new(f);
            connect_raw(
                self.as_ptr() as *mut _,
                b"child-exited\0".as_ptr() as *const _,
                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
                    child_exited_trampoline::<Self, F> as *const (),
                )),
                Box_::into_raw(f),
            )
        }
    }

    #[doc(alias = "commit")]
    fn connect_commit<F: Fn(&Self, &str, u32) + 'static>(&self, f: F) -> SignalHandlerId {
        unsafe extern "C" fn commit_trampoline<P: IsA<Terminal>, F: Fn(&P, &str, u32) + 'static>(
            this: *mut ffi::VteTerminal,
            text: *mut libc::c_char,
            size: libc::c_uint,
            f: glib::ffi::gpointer,
        ) {
            let f: &F = &*(f as *const F);
            f(
                Terminal::from_glib_borrow(this).unsafe_cast_ref(),
                &glib::GString::from_glib_borrow(text),
                size,
            )
        }
        unsafe {
            let f: Box_<F> = Box_::new(f);
            connect_raw(
                self.as_ptr() as *mut _,
                b"commit\0".as_ptr() as *const _,
                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
                    commit_trampoline::<Self, F> as *const (),
                )),
                Box_::into_raw(f),
            )
        }
    }

    #[doc(alias = "contents-changed")]
    fn connect_contents_changed<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
        unsafe extern "C" fn contents_changed_trampoline<P: IsA<Terminal>, F: Fn(&P) + 'static>(
            this: *mut ffi::VteTerminal,
            f: glib::ffi::gpointer,
        ) {
            let f: &F = &*(f as *const F);
            f(Terminal::from_glib_borrow(this).unsafe_cast_ref())
        }
        unsafe {
            let f: Box_<F> = Box_::new(f);
            connect_raw(
                self.as_ptr() as *mut _,
                b"contents-changed\0".as_ptr() as *const _,
                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
                    contents_changed_trampoline::<Self, F> as *const (),
                )),
                Box_::into_raw(f),
            )
        }
    }

    #[doc(alias = "copy-clipboard")]
    fn connect_copy_clipboard<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
        unsafe extern "C" fn copy_clipboard_trampoline<P: IsA<Terminal>, F: Fn(&P) + 'static>(
            this: *mut ffi::VteTerminal,
            f: glib::ffi::gpointer,
        ) {
            let f: &F = &*(f as *const F);
            f(Terminal::from_glib_borrow(this).unsafe_cast_ref())
        }
        unsafe {
            let f: Box_<F> = Box_::new(f);
            connect_raw(
                self.as_ptr() as *mut _,
                b"copy-clipboard\0".as_ptr() as *const _,
                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
                    copy_clipboard_trampoline::<Self, F> as *const (),
                )),
                Box_::into_raw(f),
            )
        }
    }

    fn emit_copy_clipboard(&self) {
        self.emit_by_name::<()>("copy-clipboard", &[]);
    }

    #[doc(alias = "current-directory-uri-changed")]
    fn connect_current_directory_uri_changed<F: Fn(&Self) + 'static>(
        &self,
        f: F,
    ) -> SignalHandlerId {
        unsafe extern "C" fn current_directory_uri_changed_trampoline<
            P: IsA<Terminal>,
            F: Fn(&P) + 'static,
        >(
            this: *mut ffi::VteTerminal,
            f: glib::ffi::gpointer,
        ) {
            let f: &F = &*(f as *const F);
            f(Terminal::from_glib_borrow(this).unsafe_cast_ref())
        }
        unsafe {
            let f: Box_<F> = Box_::new(f);
            connect_raw(
                self.as_ptr() as *mut _,
                b"current-directory-uri-changed\0".as_ptr() as *const _,
                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
                    current_directory_uri_changed_trampoline::<Self, F> as *const (),
                )),
                Box_::into_raw(f),
            )
        }
    }

    #[doc(alias = "current-file-uri-changed")]
    fn connect_current_file_uri_changed<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
        unsafe extern "C" fn current_file_uri_changed_trampoline<
            P: IsA<Terminal>,
            F: Fn(&P) + 'static,
        >(
            this: *mut ffi::VteTerminal,
            f: glib::ffi::gpointer,
        ) {
            let f: &F = &*(f as *const F);
            f(Terminal::from_glib_borrow(this).unsafe_cast_ref())
        }
        unsafe {
            let f: Box_<F> = Box_::new(f);
            connect_raw(
                self.as_ptr() as *mut _,
                b"current-file-uri-changed\0".as_ptr() as *const _,
                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
                    current_file_uri_changed_trampoline::<Self, F> as *const (),
                )),
                Box_::into_raw(f),
            )
        }
    }

    #[doc(alias = "cursor-moved")]
    fn connect_cursor_moved<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
        unsafe extern "C" fn cursor_moved_trampoline<P: IsA<Terminal>, F: Fn(&P) + 'static>(
            this: *mut ffi::VteTerminal,
            f: glib::ffi::gpointer,
        ) {
            let f: &F = &*(f as *const F);
            f(Terminal::from_glib_borrow(this).unsafe_cast_ref())
        }
        unsafe {
            let f: Box_<F> = Box_::new(f);
            connect_raw(
                self.as_ptr() as *mut _,
                b"cursor-moved\0".as_ptr() as *const _,
                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
                    cursor_moved_trampoline::<Self, F> as *const (),
                )),
                Box_::into_raw(f),
            )
        }
    }

    #[doc(alias = "decrease-font-size")]
    fn connect_decrease_font_size<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
        unsafe extern "C" fn decrease_font_size_trampoline<
            P: IsA<Terminal>,
            F: Fn(&P) + 'static,
        >(
            this: *mut ffi::VteTerminal,
            f: glib::ffi::gpointer,
        ) {
            let f: &F = &*(f as *const F);
            f(Terminal::from_glib_borrow(this).unsafe_cast_ref())
        }
        unsafe {
            let f: Box_<F> = Box_::new(f);
            connect_raw(
                self.as_ptr() as *mut _,
                b"decrease-font-size\0".as_ptr() as *const _,
                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
                    decrease_font_size_trampoline::<Self, F> as *const (),
                )),
                Box_::into_raw(f),
            )
        }
    }

    #[doc(alias = "encoding-changed")]
    fn connect_encoding_changed<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
        unsafe extern "C" fn encoding_changed_trampoline<P: IsA<Terminal>, F: Fn(&P) + 'static>(
            this: *mut ffi::VteTerminal,
            f: glib::ffi::gpointer,
        ) {
            let f: &F = &*(f as *const F);
            f(Terminal::from_glib_borrow(this).unsafe_cast_ref())
        }
        unsafe {
            let f: Box_<F> = Box_::new(f);
            connect_raw(
                self.as_ptr() as *mut _,
                b"encoding-changed\0".as_ptr() as *const _,
                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
                    encoding_changed_trampoline::<Self, F> as *const (),
                )),
                Box_::into_raw(f),
            )
        }
    }

    #[doc(alias = "eof")]
    fn connect_eof<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
        unsafe extern "C" fn eof_trampoline<P: IsA<Terminal>, F: Fn(&P) + 'static>(
            this: *mut ffi::VteTerminal,
            f: glib::ffi::gpointer,
        ) {
            let f: &F = &*(f as *const F);
            f(Terminal::from_glib_borrow(this).unsafe_cast_ref())
        }
        unsafe {
            let f: Box_<F> = Box_::new(f);
            connect_raw(
                self.as_ptr() as *mut _,
                b"eof\0".as_ptr() as *const _,
                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
                    eof_trampoline::<Self, F> as *const (),
                )),
                Box_::into_raw(f),
            )
        }
    }

    //#[doc(alias = "hyperlink-hover-uri-changed")]
    //fn connect_hyperlink_hover_uri_changed<Unsupported or ignored types>(&self, f: F) -> SignalHandlerId {
    //    Ignored bbox: Gdk.Rectangle
    //}

    #[doc(alias = "increase-font-size")]
    fn connect_increase_font_size<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
        unsafe extern "C" fn increase_font_size_trampoline<
            P: IsA<Terminal>,
            F: Fn(&P) + 'static,
        >(
            this: *mut ffi::VteTerminal,
            f: glib::ffi::gpointer,
        ) {
            let f: &F = &*(f as *const F);
            f(Terminal::from_glib_borrow(this).unsafe_cast_ref())
        }
        unsafe {
            let f: Box_<F> = Box_::new(f);
            connect_raw(
                self.as_ptr() as *mut _,
                b"increase-font-size\0".as_ptr() as *const _,
                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
                    increase_font_size_trampoline::<Self, F> as *const (),
                )),
                Box_::into_raw(f),
            )
        }
    }

    #[doc(alias = "notification-received")]
    fn connect_notification_received<F: Fn(&Self, &str, Option<&str>) + 'static>(
        &self,
        f: F,
    ) -> SignalHandlerId {
        unsafe extern "C" fn notification_received_trampoline<
            P: IsA<Terminal>,
            F: Fn(&P, &str, Option<&str>) + 'static,
        >(
            this: *mut ffi::VteTerminal,
            summary: *mut libc::c_char,
            body: *mut libc::c_char,
            f: glib::ffi::gpointer,
        ) {
            let f: &F = &*(f as *const F);
            f(
                Terminal::from_glib_borrow(this).unsafe_cast_ref(),
                &glib::GString::from_glib_borrow(summary),
                Option::<glib::GString>::from_glib_borrow(body)
                    .as_ref()
                    .as_ref()
                    .map(|s| s.as_str()),
            )
        }
        unsafe {
            let f: Box_<F> = Box_::new(f);
            connect_raw(
                self.as_ptr() as *mut _,
                b"notification-received\0".as_ptr() as *const _,
                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
                    notification_received_trampoline::<Self, F> as *const (),
                )),
                Box_::into_raw(f),
            )
        }
    }

    #[doc(alias = "paste-clipboard")]
    fn connect_paste_clipboard<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
        unsafe extern "C" fn paste_clipboard_trampoline<P: IsA<Terminal>, F: Fn(&P) + 'static>(
            this: *mut ffi::VteTerminal,
            f: glib::ffi::gpointer,
        ) {
            let f: &F = &*(f as *const F);
            f(Terminal::from_glib_borrow(this).unsafe_cast_ref())
        }
        unsafe {
            let f: Box_<F> = Box_::new(f);
            connect_raw(
                self.as_ptr() as *mut _,
                b"paste-clipboard\0".as_ptr() as *const _,
                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
                    paste_clipboard_trampoline::<Self, F> as *const (),
                )),
                Box_::into_raw(f),
            )
        }
    }

    fn emit_paste_clipboard(&self) {
        self.emit_by_name::<()>("paste-clipboard", &[]);
    }

    #[doc(alias = "resize-window")]
    fn connect_resize_window<F: Fn(&Self, u32, u32) + 'static>(&self, f: F) -> SignalHandlerId {
        unsafe extern "C" fn resize_window_trampoline<
            P: IsA<Terminal>,
            F: Fn(&P, u32, u32) + 'static,
        >(
            this: *mut ffi::VteTerminal,
            width: libc::c_uint,
            height: libc::c_uint,
            f: glib::ffi::gpointer,
        ) {
            let f: &F = &*(f as *const F);
            f(
                Terminal::from_glib_borrow(this).unsafe_cast_ref(),
                width,
                height,
            )
        }
        unsafe {
            let f: Box_<F> = Box_::new(f);
            connect_raw(
                self.as_ptr() as *mut _,
                b"resize-window\0".as_ptr() as *const _,
                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
                    resize_window_trampoline::<Self, F> as *const (),
                )),
                Box_::into_raw(f),
            )
        }
    }

    #[doc(alias = "selection-changed")]
    fn connect_selection_changed<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
        unsafe extern "C" fn selection_changed_trampoline<P: IsA<Terminal>, F: Fn(&P) + 'static>(
            this: *mut ffi::VteTerminal,
            f: glib::ffi::gpointer,
        ) {
            let f: &F = &*(f as *const F);
            f(Terminal::from_glib_borrow(this).unsafe_cast_ref())
        }
        unsafe {
            let f: Box_<F> = Box_::new(f);
            connect_raw(
                self.as_ptr() as *mut _,
                b"selection-changed\0".as_ptr() as *const _,
                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
                    selection_changed_trampoline::<Self, F> as *const (),
                )),
                Box_::into_raw(f),
            )
        }
    }

    //#[doc(alias = "setup-context-menu")]
    //fn connect_setup_context_menu<Unsupported or ignored types>(&self, f: F) -> SignalHandlerId {
    //    Ignored context: Vte.EventContext
    //}

    #[doc(alias = "shell-precmd")]
    fn connect_shell_precmd<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
        unsafe extern "C" fn shell_precmd_trampoline<P: IsA<Terminal>, F: Fn(&P) + 'static>(
            this: *mut ffi::VteTerminal,
            f: glib::ffi::gpointer,
        ) {
            let f: &F = &*(f as *const F);
            f(Terminal::from_glib_borrow(this).unsafe_cast_ref())
        }
        unsafe {
            let f: Box_<F> = Box_::new(f);
            connect_raw(
                self.as_ptr() as *mut _,
                b"shell-precmd\0".as_ptr() as *const _,
                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
                    shell_precmd_trampoline::<Self, F> as *const (),
                )),
                Box_::into_raw(f),
            )
        }
    }

    #[doc(alias = "shell-preexec")]
    fn connect_shell_preexec<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
        unsafe extern "C" fn shell_preexec_trampoline<P: IsA<Terminal>, F: Fn(&P) + 'static>(
            this: *mut ffi::VteTerminal,
            f: glib::ffi::gpointer,
        ) {
            let f: &F = &*(f as *const F);
            f(Terminal::from_glib_borrow(this).unsafe_cast_ref())
        }
        unsafe {
            let f: Box_<F> = Box_::new(f);
            connect_raw(
                self.as_ptr() as *mut _,
                b"shell-preexec\0".as_ptr() as *const _,
                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
                    shell_preexec_trampoline::<Self, F> as *const (),
                )),
                Box_::into_raw(f),
            )
        }
    }

    #[doc(alias = "window-title-changed")]
    fn connect_window_title_changed<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
        unsafe extern "C" fn window_title_changed_trampoline<
            P: IsA<Terminal>,
            F: Fn(&P) + 'static,
        >(
            this: *mut ffi::VteTerminal,
            f: glib::ffi::gpointer,
        ) {
            let f: &F = &*(f as *const F);
            f(Terminal::from_glib_borrow(this).unsafe_cast_ref())
        }
        unsafe {
            let f: Box_<F> = Box_::new(f);
            connect_raw(
                self.as_ptr() as *mut _,
                b"window-title-changed\0".as_ptr() as *const _,
                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
                    window_title_changed_trampoline::<Self, F> as *const (),
                )),
                Box_::into_raw(f),
            )
        }
    }

    #[doc(alias = "allow-hyperlink")]
    fn connect_allow_hyperlink_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
        unsafe extern "C" fn notify_allow_hyperlink_trampoline<
            P: IsA<Terminal>,
            F: Fn(&P) + 'static,
        >(
            this: *mut ffi::VteTerminal,
            _param_spec: glib::ffi::gpointer,
            f: glib::ffi::gpointer,
        ) {
            let f: &F = &*(f as *const F);
            f(Terminal::from_glib_borrow(this).unsafe_cast_ref())
        }
        unsafe {
            let f: Box_<F> = Box_::new(f);
            connect_raw(
                self.as_ptr() as *mut _,
                b"notify::allow-hyperlink\0".as_ptr() as *const _,
                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
                    notify_allow_hyperlink_trampoline::<Self, F> as *const (),
                )),
                Box_::into_raw(f),
            )
        }
    }

    #[doc(alias = "audible-bell")]
    fn connect_audible_bell_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
        unsafe extern "C" fn notify_audible_bell_trampoline<
            P: IsA<Terminal>,
            F: Fn(&P) + 'static,
        >(
            this: *mut ffi::VteTerminal,
            _param_spec: glib::ffi::gpointer,
            f: glib::ffi::gpointer,
        ) {
            let f: &F = &*(f as *const F);
            f(Terminal::from_glib_borrow(this).unsafe_cast_ref())
        }
        unsafe {
            let f: Box_<F> = Box_::new(f);
            connect_raw(
                self.as_ptr() as *mut _,
                b"notify::audible-bell\0".as_ptr() as *const _,
                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
                    notify_audible_bell_trampoline::<Self, F> as *const (),
                )),
                Box_::into_raw(f),
            )
        }
    }

    #[doc(alias = "backspace-binding")]
    fn connect_backspace_binding_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
        unsafe extern "C" fn notify_backspace_binding_trampoline<
            P: IsA<Terminal>,
            F: Fn(&P) + 'static,
        >(
            this: *mut ffi::VteTerminal,
            _param_spec: glib::ffi::gpointer,
            f: glib::ffi::gpointer,
        ) {
            let f: &F = &*(f as *const F);
            f(Terminal::from_glib_borrow(this).unsafe_cast_ref())
        }
        unsafe {
            let f: Box_<F> = Box_::new(f);
            connect_raw(
                self.as_ptr() as *mut _,
                b"notify::backspace-binding\0".as_ptr() as *const _,
                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
                    notify_backspace_binding_trampoline::<Self, F> as *const (),
                )),
                Box_::into_raw(f),
            )
        }
    }

    #[doc(alias = "bold-is-bright")]
    fn connect_bold_is_bright_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
        unsafe extern "C" fn notify_bold_is_bright_trampoline<
            P: IsA<Terminal>,
            F: Fn(&P) + 'static,
        >(
            this: *mut ffi::VteTerminal,
            _param_spec: glib::ffi::gpointer,
            f: glib::ffi::gpointer,
        ) {
            let f: &F = &*(f as *const F);
            f(Terminal::from_glib_borrow(this).unsafe_cast_ref())
        }
        unsafe {
            let f: Box_<F> = Box_::new(f);
            connect_raw(
                self.as_ptr() as *mut _,
                b"notify::bold-is-bright\0".as_ptr() as *const _,
                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
                    notify_bold_is_bright_trampoline::<Self, F> as *const (),
                )),
                Box_::into_raw(f),
            )
        }
    }

    #[doc(alias = "cell-height-scale")]
    fn connect_cell_height_scale_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
        unsafe extern "C" fn notify_cell_height_scale_trampoline<
            P: IsA<Terminal>,
            F: Fn(&P) + 'static,
        >(
            this: *mut ffi::VteTerminal,
            _param_spec: glib::ffi::gpointer,
            f: glib::ffi::gpointer,
        ) {
            let f: &F = &*(f as *const F);
            f(Terminal::from_glib_borrow(this).unsafe_cast_ref())
        }
        unsafe {
            let f: Box_<F> = Box_::new(f);
            connect_raw(
                self.as_ptr() as *mut _,
                b"notify::cell-height-scale\0".as_ptr() as *const _,
                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
                    notify_cell_height_scale_trampoline::<Self, F> as *const (),
                )),
                Box_::into_raw(f),
            )
        }
    }

    #[doc(alias = "cell-width-scale")]
    fn connect_cell_width_scale_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
        unsafe extern "C" fn notify_cell_width_scale_trampoline<
            P: IsA<Terminal>,
            F: Fn(&P) + 'static,
        >(
            this: *mut ffi::VteTerminal,
            _param_spec: glib::ffi::gpointer,
            f: glib::ffi::gpointer,
        ) {
            let f: &F = &*(f as *const F);
            f(Terminal::from_glib_borrow(this).unsafe_cast_ref())
        }
        unsafe {
            let f: Box_<F> = Box_::new(f);
            connect_raw(
                self.as_ptr() as *mut _,
                b"notify::cell-width-scale\0".as_ptr() as *const _,
                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
                    notify_cell_width_scale_trampoline::<Self, F> as *const (),
                )),
                Box_::into_raw(f),
            )
        }
    }

    #[doc(alias = "cjk-ambiguous-width")]
    fn connect_cjk_ambiguous_width_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
        unsafe extern "C" fn notify_cjk_ambiguous_width_trampoline<
            P: IsA<Terminal>,
            F: Fn(&P) + 'static,
        >(
            this: *mut ffi::VteTerminal,
            _param_spec: glib::ffi::gpointer,
            f: glib::ffi::gpointer,
        ) {
            let f: &F = &*(f as *const F);
            f(Terminal::from_glib_borrow(this).unsafe_cast_ref())
        }
        unsafe {
            let f: Box_<F> = Box_::new(f);
            connect_raw(
                self.as_ptr() as *mut _,
                b"notify::cjk-ambiguous-width\0".as_ptr() as *const _,
                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
                    notify_cjk_ambiguous_width_trampoline::<Self, F> as *const (),
                )),
                Box_::into_raw(f),
            )
        }
    }

    #[cfg(feature = "v0_76")]
    #[cfg_attr(docsrs, doc(cfg(feature = "v0_76")))]
    #[doc(alias = "context-menu")]
    fn connect_context_menu_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
        unsafe extern "C" fn notify_context_menu_trampoline<
            P: IsA<Terminal>,
            F: Fn(&P) + 'static,
        >(
            this: *mut ffi::VteTerminal,
            _param_spec: glib::ffi::gpointer,
            f: glib::ffi::gpointer,
        ) {
            let f: &F = &*(f as *const F);
            f(Terminal::from_glib_borrow(this).unsafe_cast_ref())
        }
        unsafe {
            let f: Box_<F> = Box_::new(f);
            connect_raw(
                self.as_ptr() as *mut _,
                b"notify::context-menu\0".as_ptr() as *const _,
                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
                    notify_context_menu_trampoline::<Self, F> as *const (),
                )),
                Box_::into_raw(f),
            )
        }
    }

    #[cfg(feature = "v0_76")]
    #[cfg_attr(docsrs, doc(cfg(feature = "v0_76")))]
    #[doc(alias = "context-menu-model")]
    fn connect_context_menu_model_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
        unsafe extern "C" fn notify_context_menu_model_trampoline<
            P: IsA<Terminal>,
            F: Fn(&P) + 'static,
        >(
            this: *mut ffi::VteTerminal,
            _param_spec: glib::ffi::gpointer,
            f: glib::ffi::gpointer,
        ) {
            let f: &F = &*(f as *const F);
            f(Terminal::from_glib_borrow(this).unsafe_cast_ref())
        }
        unsafe {
            let f: Box_<F> = Box_::new(f);
            connect_raw(
                self.as_ptr() as *mut _,
                b"notify::context-menu-model\0".as_ptr() as *const _,
                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
                    notify_context_menu_model_trampoline::<Self, F> as *const (),
                )),
                Box_::into_raw(f),
            )
        }
    }

    #[doc(alias = "current-container-name")]
    fn connect_current_container_name_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F,
    ) -> SignalHandlerId {
        unsafe extern "C" fn notify_current_container_name_trampoline<
            P: IsA<Terminal>,
            F: Fn(&P) + 'static,
        >(
            this: *mut ffi::VteTerminal,
            _param_spec: glib::ffi::gpointer,
            f: glib::ffi::gpointer,
        ) {
            let f: &F = &*(f as *const F);
            f(Terminal::from_glib_borrow(this).unsafe_cast_ref())
        }
        unsafe {
            let f: Box_<F> = Box_::new(f);
            connect_raw(
                self.as_ptr() as *mut _,
                b"notify::current-container-name\0".as_ptr() as *const _,
                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
                    notify_current_container_name_trampoline::<Self, F> as *const (),
                )),
                Box_::into_raw(f),
            )
        }
    }

    #[doc(alias = "current-container-runtime")]
    fn connect_current_container_runtime_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F,
    ) -> SignalHandlerId {
        unsafe extern "C" fn notify_current_container_runtime_trampoline<
            P: IsA<Terminal>,
            F: Fn(&P) + 'static,
        >(
            this: *mut ffi::VteTerminal,
            _param_spec: glib::ffi::gpointer,
            f: glib::ffi::gpointer,
        ) {
            let f: &F = &*(f as *const F);
            f(Terminal::from_glib_borrow(this).unsafe_cast_ref())
        }
        unsafe {
            let f: Box_<F> = Box_::new(f);
            connect_raw(
                self.as_ptr() as *mut _,
                b"notify::current-container-runtime\0".as_ptr() as *const _,
                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
                    notify_current_container_runtime_trampoline::<Self, F> as *const (),
                )),
                Box_::into_raw(f),
            )
        }
    }

    #[doc(alias = "current-directory-uri")]
    fn connect_current_directory_uri_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F,
    ) -> SignalHandlerId {
        unsafe extern "C" fn notify_current_directory_uri_trampoline<
            P: IsA<Terminal>,
            F: Fn(&P) + 'static,
        >(
            this: *mut ffi::VteTerminal,
            _param_spec: glib::ffi::gpointer,
            f: glib::ffi::gpointer,
        ) {
            let f: &F = &*(f as *const F);
            f(Terminal::from_glib_borrow(this).unsafe_cast_ref())
        }
        unsafe {
            let f: Box_<F> = Box_::new(f);
            connect_raw(
                self.as_ptr() as *mut _,
                b"notify::current-directory-uri\0".as_ptr() as *const _,
                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
                    notify_current_directory_uri_trampoline::<Self, F> as *const (),
                )),
                Box_::into_raw(f),
            )
        }
    }

    #[doc(alias = "current-file-uri")]
    fn connect_current_file_uri_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
        unsafe extern "C" fn notify_current_file_uri_trampoline<
            P: IsA<Terminal>,
            F: Fn(&P) + 'static,
        >(
            this: *mut ffi::VteTerminal,
            _param_spec: glib::ffi::gpointer,
            f: glib::ffi::gpointer,
        ) {
            let f: &F = &*(f as *const F);
            f(Terminal::from_glib_borrow(this).unsafe_cast_ref())
        }
        unsafe {
            let f: Box_<F> = Box_::new(f);
            connect_raw(
                self.as_ptr() as *mut _,
                b"notify::current-file-uri\0".as_ptr() as *const _,
                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
                    notify_current_file_uri_trampoline::<Self, F> as *const (),
                )),
                Box_::into_raw(f),
            )
        }
    }

    #[doc(alias = "cursor-blink-mode")]
    fn connect_cursor_blink_mode_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
        unsafe extern "C" fn notify_cursor_blink_mode_trampoline<
            P: IsA<Terminal>,
            F: Fn(&P) + 'static,
        >(
            this: *mut ffi::VteTerminal,
            _param_spec: glib::ffi::gpointer,
            f: glib::ffi::gpointer,
        ) {
            let f: &F = &*(f as *const F);
            f(Terminal::from_glib_borrow(this).unsafe_cast_ref())
        }
        unsafe {
            let f: Box_<F> = Box_::new(f);
            connect_raw(
                self.as_ptr() as *mut _,
                b"notify::cursor-blink-mode\0".as_ptr() as *const _,
                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
                    notify_cursor_blink_mode_trampoline::<Self, F> as *const (),
                )),
                Box_::into_raw(f),
            )
        }
    }

    #[doc(alias = "cursor-shape")]
    fn connect_cursor_shape_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
        unsafe extern "C" fn notify_cursor_shape_trampoline<
            P: IsA<Terminal>,
            F: Fn(&P) + 'static,
        >(
            this: *mut ffi::VteTerminal,
            _param_spec: glib::ffi::gpointer,
            f: glib::ffi::gpointer,
        ) {
            let f: &F = &*(f as *const F);
            f(Terminal::from_glib_borrow(this).unsafe_cast_ref())
        }
        unsafe {
            let f: Box_<F> = Box_::new(f);
            connect_raw(
                self.as_ptr() as *mut _,
                b"notify::cursor-shape\0".as_ptr() as *const _,
                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
                    notify_cursor_shape_trampoline::<Self, F> as *const (),
                )),
                Box_::into_raw(f),
            )
        }
    }

    #[doc(alias = "delete-binding")]
    fn connect_delete_binding_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
        unsafe extern "C" fn notify_delete_binding_trampoline<
            P: IsA<Terminal>,
            F: Fn(&P) + 'static,
        >(
            this: *mut ffi::VteTerminal,
            _param_spec: glib::ffi::gpointer,
            f: glib::ffi::gpointer,
        ) {
            let f: &F = &*(f as *const F);
            f(Terminal::from_glib_borrow(this).unsafe_cast_ref())
        }
        unsafe {
            let f: Box_<F> = Box_::new(f);
            connect_raw(
                self.as_ptr() as *mut _,
                b"notify::delete-binding\0".as_ptr() as *const _,
                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
                    notify_delete_binding_trampoline::<Self, F> as *const (),
                )),
                Box_::into_raw(f),
            )
        }
    }

    #[cfg(feature = "v0_78")]
    #[cfg_attr(docsrs, doc(cfg(feature = "v0_78")))]
    #[doc(alias = "enable-a11y")]
    fn connect_enable_a11y_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
        unsafe extern "C" fn notify_enable_a11y_trampoline<
            P: IsA<Terminal>,
            F: Fn(&P) + 'static,
        >(
            this: *mut ffi::VteTerminal,
            _param_spec: glib::ffi::gpointer,
            f: glib::ffi::gpointer,
        ) {
            let f: &F = &*(f as *const F);
            f(Terminal::from_glib_borrow(this).unsafe_cast_ref())
        }
        unsafe {
            let f: Box_<F> = Box_::new(f);
            connect_raw(
                self.as_ptr() as *mut _,
                b"notify::enable-a11y\0".as_ptr() as *const _,
                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
                    notify_enable_a11y_trampoline::<Self, F> as *const (),
                )),
                Box_::into_raw(f),
            )
        }
    }

    #[doc(alias = "enable-bidi")]
    fn connect_enable_bidi_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
        unsafe extern "C" fn notify_enable_bidi_trampoline<
            P: IsA<Terminal>,
            F: Fn(&P) + 'static,
        >(
            this: *mut ffi::VteTerminal,
            _param_spec: glib::ffi::gpointer,
            f: glib::ffi::gpointer,
        ) {
            let f: &F = &*(f as *const F);
            f(Terminal::from_glib_borrow(this).unsafe_cast_ref())
        }
        unsafe {
            let f: Box_<F> = Box_::new(f);
            connect_raw(
                self.as_ptr() as *mut _,
                b"notify::enable-bidi\0".as_ptr() as *const _,
                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
                    notify_enable_bidi_trampoline::<Self, F> as *const (),
                )),
                Box_::into_raw(f),
            )
        }
    }

    #[doc(alias = "enable-fallback-scrolling")]
    fn connect_enable_fallback_scrolling_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F,
    ) -> SignalHandlerId {
        unsafe extern "C" fn notify_enable_fallback_scrolling_trampoline<
            P: IsA<Terminal>,
            F: Fn(&P) + 'static,
        >(
            this: *mut ffi::VteTerminal,
            _param_spec: glib::ffi::gpointer,
            f: glib::ffi::gpointer,
        ) {
            let f: &F = &*(f as *const F);
            f(Terminal::from_glib_borrow(this).unsafe_cast_ref())
        }
        unsafe {
            let f: Box_<F> = Box_::new(f);
            connect_raw(
                self.as_ptr() as *mut _,
                b"notify::enable-fallback-scrolling\0".as_ptr() as *const _,
                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
                    notify_enable_fallback_scrolling_trampoline::<Self, F> as *const (),
                )),
                Box_::into_raw(f),
            )
        }
    }

    #[doc(alias = "enable-shaping")]
    fn connect_enable_shaping_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
        unsafe extern "C" fn notify_enable_shaping_trampoline<
            P: IsA<Terminal>,
            F: Fn(&P) + 'static,
        >(
            this: *mut ffi::VteTerminal,
            _param_spec: glib::ffi::gpointer,
            f: glib::ffi::gpointer,
        ) {
            let f: &F = &*(f as *const F);
            f(Terminal::from_glib_borrow(this).unsafe_cast_ref())
        }
        unsafe {
            let f: Box_<F> = Box_::new(f);
            connect_raw(
                self.as_ptr() as *mut _,
                b"notify::enable-shaping\0".as_ptr() as *const _,
                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
                    notify_enable_shaping_trampoline::<Self, F> as *const (),
                )),
                Box_::into_raw(f),
            )
        }
    }

    #[doc(alias = "enable-sixel")]
    fn connect_enable_sixel_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
        unsafe extern "C" fn notify_enable_sixel_trampoline<
            P: IsA<Terminal>,
            F: Fn(&P) + 'static,
        >(
            this: *mut ffi::VteTerminal,
            _param_spec: glib::ffi::gpointer,
            f: glib::ffi::gpointer,
        ) {
            let f: &F = &*(f as *const F);
            f(Terminal::from_glib_borrow(this).unsafe_cast_ref())
        }
        unsafe {
            let f: Box_<F> = Box_::new(f);
            connect_raw(
                self.as_ptr() as *mut _,
                b"notify::enable-sixel\0".as_ptr() as *const _,
                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
                    notify_enable_sixel_trampoline::<Self, F> as *const (),
                )),
                Box_::into_raw(f),
            )
        }
    }

    #[doc(alias = "font-desc")]
    fn connect_font_desc_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
        unsafe extern "C" fn notify_font_desc_trampoline<P: IsA<Terminal>, F: Fn(&P) + 'static>(
            this: *mut ffi::VteTerminal,
            _param_spec: glib::ffi::gpointer,
            f: glib::ffi::gpointer,
        ) {
            let f: &F = &*(f as *const F);
            f(Terminal::from_glib_borrow(this).unsafe_cast_ref())
        }
        unsafe {
            let f: Box_<F> = Box_::new(f);
            connect_raw(
                self.as_ptr() as *mut _,
                b"notify::font-desc\0".as_ptr() as *const _,
                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
                    notify_font_desc_trampoline::<Self, F> as *const (),
                )),
                Box_::into_raw(f),
            )
        }
    }

    #[cfg(feature = "v0_74")]
    #[cfg_attr(docsrs, doc(cfg(feature = "v0_74")))]
    #[doc(alias = "font-options")]
    fn connect_font_options_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
        unsafe extern "C" fn notify_font_options_trampoline<
            P: IsA<Terminal>,
            F: Fn(&P) + 'static,
        >(
            this: *mut ffi::VteTerminal,
            _param_spec: glib::ffi::gpointer,
            f: glib::ffi::gpointer,
        ) {
            let f: &F = &*(f as *const F);
            f(Terminal::from_glib_borrow(this).unsafe_cast_ref())
        }
        unsafe {
            let f: Box_<F> = Box_::new(f);
            connect_raw(
                self.as_ptr() as *mut _,
                b"notify::font-options\0".as_ptr() as *const _,
                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
                    notify_font_options_trampoline::<Self, F> as *const (),
                )),
                Box_::into_raw(f),
            )
        }
    }

    #[doc(alias = "font-scale")]
    fn connect_font_scale_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
        unsafe extern "C" fn notify_font_scale_trampoline<P: IsA<Terminal>, F: Fn(&P) + 'static>(
            this: *mut ffi::VteTerminal,
            _param_spec: glib::ffi::gpointer,
            f: glib::ffi::gpointer,
        ) {
            let f: &F = &*(f as *const F);
            f(Terminal::from_glib_borrow(this).unsafe_cast_ref())
        }
        unsafe {
            let f: Box_<F> = Box_::new(f);
            connect_raw(
                self.as_ptr() as *mut _,
                b"notify::font-scale\0".as_ptr() as *const _,
                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
                    notify_font_scale_trampoline::<Self, F> as *const (),
                )),
                Box_::into_raw(f),
            )
        }
    }

    #[doc(alias = "hyperlink-hover-uri")]
    fn connect_hyperlink_hover_uri_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
        unsafe extern "C" fn notify_hyperlink_hover_uri_trampoline<
            P: IsA<Terminal>,
            F: Fn(&P) + 'static,
        >(
            this: *mut ffi::VteTerminal,
            _param_spec: glib::ffi::gpointer,
            f: glib::ffi::gpointer,
        ) {
            let f: &F = &*(f as *const F);
            f(Terminal::from_glib_borrow(this).unsafe_cast_ref())
        }
        unsafe {
            let f: Box_<F> = Box_::new(f);
            connect_raw(
                self.as_ptr() as *mut _,
                b"notify::hyperlink-hover-uri\0".as_ptr() as *const _,
                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
                    notify_hyperlink_hover_uri_trampoline::<Self, F> as *const (),
                )),
                Box_::into_raw(f),
            )
        }
    }

    #[doc(alias = "input-enabled")]
    fn connect_input_enabled_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
        unsafe extern "C" fn notify_input_enabled_trampoline<
            P: IsA<Terminal>,
            F: Fn(&P) + 'static,
        >(
            this: *mut ffi::VteTerminal,
            _param_spec: glib::ffi::gpointer,
            f: glib::ffi::gpointer,
        ) {
            let f: &F = &*(f as *const F);
            f(Terminal::from_glib_borrow(this).unsafe_cast_ref())
        }
        unsafe {
            let f: Box_<F> = Box_::new(f);
            connect_raw(
                self.as_ptr() as *mut _,
                b"notify::input-enabled\0".as_ptr() as *const _,
                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
                    notify_input_enabled_trampoline::<Self, F> as *const (),
                )),
                Box_::into_raw(f),
            )
        }
    }

    #[doc(alias = "pointer-autohide")]
    fn connect_pointer_autohide_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
        unsafe extern "C" fn notify_pointer_autohide_trampoline<
            P: IsA<Terminal>,
            F: Fn(&P) + 'static,
        >(
            this: *mut ffi::VteTerminal,
            _param_spec: glib::ffi::gpointer,
            f: glib::ffi::gpointer,
        ) {
            let f: &F = &*(f as *const F);
            f(Terminal::from_glib_borrow(this).unsafe_cast_ref())
        }
        unsafe {
            let f: Box_<F> = Box_::new(f);
            connect_raw(
                self.as_ptr() as *mut _,
                b"notify::pointer-autohide\0".as_ptr() as *const _,
                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
                    notify_pointer_autohide_trampoline::<Self, F> as *const (),
                )),
                Box_::into_raw(f),
            )
        }
    }

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

    #[cfg(feature = "v0_76")]
    #[cfg_attr(docsrs, doc(cfg(feature = "v0_76")))]
    #[doc(alias = "scroll-on-insert")]
    fn connect_scroll_on_insert_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
        unsafe extern "C" fn notify_scroll_on_insert_trampoline<
            P: IsA<Terminal>,
            F: Fn(&P) + 'static,
        >(
            this: *mut ffi::VteTerminal,
            _param_spec: glib::ffi::gpointer,
            f: glib::ffi::gpointer,
        ) {
            let f: &F = &*(f as *const F);
            f(Terminal::from_glib_borrow(this).unsafe_cast_ref())
        }
        unsafe {
            let f: Box_<F> = Box_::new(f);
            connect_raw(
                self.as_ptr() as *mut _,
                b"notify::scroll-on-insert\0".as_ptr() as *const _,
                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
                    notify_scroll_on_insert_trampoline::<Self, F> as *const (),
                )),
                Box_::into_raw(f),
            )
        }
    }

    #[doc(alias = "scroll-on-keystroke")]
    fn connect_scroll_on_keystroke_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
        unsafe extern "C" fn notify_scroll_on_keystroke_trampoline<
            P: IsA<Terminal>,
            F: Fn(&P) + 'static,
        >(
            this: *mut ffi::VteTerminal,
            _param_spec: glib::ffi::gpointer,
            f: glib::ffi::gpointer,
        ) {
            let f: &F = &*(f as *const F);
            f(Terminal::from_glib_borrow(this).unsafe_cast_ref())
        }
        unsafe {
            let f: Box_<F> = Box_::new(f);
            connect_raw(
                self.as_ptr() as *mut _,
                b"notify::scroll-on-keystroke\0".as_ptr() as *const _,
                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
                    notify_scroll_on_keystroke_trampoline::<Self, F> as *const (),
                )),
                Box_::into_raw(f),
            )
        }
    }

    #[doc(alias = "scroll-on-output")]
    fn connect_scroll_on_output_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
        unsafe extern "C" fn notify_scroll_on_output_trampoline<
            P: IsA<Terminal>,
            F: Fn(&P) + 'static,
        >(
            this: *mut ffi::VteTerminal,
            _param_spec: glib::ffi::gpointer,
            f: glib::ffi::gpointer,
        ) {
            let f: &F = &*(f as *const F);
            f(Terminal::from_glib_borrow(this).unsafe_cast_ref())
        }
        unsafe {
            let f: Box_<F> = Box_::new(f);
            connect_raw(
                self.as_ptr() as *mut _,
                b"notify::scroll-on-output\0".as_ptr() as *const _,
                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
                    notify_scroll_on_output_trampoline::<Self, F> as *const (),
                )),
                Box_::into_raw(f),
            )
        }
    }

    #[doc(alias = "scroll-unit-is-pixels")]
    fn connect_scroll_unit_is_pixels_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F,
    ) -> SignalHandlerId {
        unsafe extern "C" fn notify_scroll_unit_is_pixels_trampoline<
            P: IsA<Terminal>,
            F: Fn(&P) + 'static,
        >(
            this: *mut ffi::VteTerminal,
            _param_spec: glib::ffi::gpointer,
            f: glib::ffi::gpointer,
        ) {
            let f: &F = &*(f as *const F);
            f(Terminal::from_glib_borrow(this).unsafe_cast_ref())
        }
        unsafe {
            let f: Box_<F> = Box_::new(f);
            connect_raw(
                self.as_ptr() as *mut _,
                b"notify::scroll-unit-is-pixels\0".as_ptr() as *const _,
                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
                    notify_scroll_unit_is_pixels_trampoline::<Self, F> as *const (),
                )),
                Box_::into_raw(f),
            )
        }
    }

    #[doc(alias = "scrollback-lines")]
    fn connect_scrollback_lines_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
        unsafe extern "C" fn notify_scrollback_lines_trampoline<
            P: IsA<Terminal>,
            F: Fn(&P) + 'static,
        >(
            this: *mut ffi::VteTerminal,
            _param_spec: glib::ffi::gpointer,
            f: glib::ffi::gpointer,
        ) {
            let f: &F = &*(f as *const F);
            f(Terminal::from_glib_borrow(this).unsafe_cast_ref())
        }
        unsafe {
            let f: Box_<F> = Box_::new(f);
            connect_raw(
                self.as_ptr() as *mut _,
                b"notify::scrollback-lines\0".as_ptr() as *const _,
                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
                    notify_scrollback_lines_trampoline::<Self, F> as *const (),
                )),
                Box_::into_raw(f),
            )
        }
    }

    #[doc(alias = "text-blink-mode")]
    fn connect_text_blink_mode_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
        unsafe extern "C" fn notify_text_blink_mode_trampoline<
            P: IsA<Terminal>,
            F: Fn(&P) + 'static,
        >(
            this: *mut ffi::VteTerminal,
            _param_spec: glib::ffi::gpointer,
            f: glib::ffi::gpointer,
        ) {
            let f: &F = &*(f as *const F);
            f(Terminal::from_glib_borrow(this).unsafe_cast_ref())
        }
        unsafe {
            let f: Box_<F> = Box_::new(f);
            connect_raw(
                self.as_ptr() as *mut _,
                b"notify::text-blink-mode\0".as_ptr() as *const _,
                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
                    notify_text_blink_mode_trampoline::<Self, F> as *const (),
                )),
                Box_::into_raw(f),
            )
        }
    }

    #[doc(alias = "window-title")]
    fn connect_window_title_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
        unsafe extern "C" fn notify_window_title_trampoline<
            P: IsA<Terminal>,
            F: Fn(&P) + 'static,
        >(
            this: *mut ffi::VteTerminal,
            _param_spec: glib::ffi::gpointer,
            f: glib::ffi::gpointer,
        ) {
            let f: &F = &*(f as *const F);
            f(Terminal::from_glib_borrow(this).unsafe_cast_ref())
        }
        unsafe {
            let f: Box_<F> = Box_::new(f);
            connect_raw(
                self.as_ptr() as *mut _,
                b"notify::window-title\0".as_ptr() as *const _,
                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
                    notify_window_title_trampoline::<Self, F> as *const (),
                )),
                Box_::into_raw(f),
            )
        }
    }

    #[doc(alias = "word-char-exceptions")]
    fn connect_word_char_exceptions_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
        unsafe extern "C" fn notify_word_char_exceptions_trampoline<
            P: IsA<Terminal>,
            F: Fn(&P) + 'static,
        >(
            this: *mut ffi::VteTerminal,
            _param_spec: glib::ffi::gpointer,
            f: glib::ffi::gpointer,
        ) {
            let f: &F = &*(f as *const F);
            f(Terminal::from_glib_borrow(this).unsafe_cast_ref())
        }
        unsafe {
            let f: Box_<F> = Box_::new(f);
            connect_raw(
                self.as_ptr() as *mut _,
                b"notify::word-char-exceptions\0".as_ptr() as *const _,
                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
                    notify_word_char_exceptions_trampoline::<Self, F> as *const (),
                )),
                Box_::into_raw(f),
            )
        }
    }

    #[cfg(feature = "v0_76")]
    #[cfg_attr(docsrs, doc(cfg(feature = "v0_76")))]
    #[doc(alias = "xalign")]
    fn connect_xalign_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
        unsafe extern "C" fn notify_xalign_trampoline<P: IsA<Terminal>, F: Fn(&P) + 'static>(
            this: *mut ffi::VteTerminal,
            _param_spec: glib::ffi::gpointer,
            f: glib::ffi::gpointer,
        ) {
            let f: &F = &*(f as *const F);
            f(Terminal::from_glib_borrow(this).unsafe_cast_ref())
        }
        unsafe {
            let f: Box_<F> = Box_::new(f);
            connect_raw(
                self.as_ptr() as *mut _,
                b"notify::xalign\0".as_ptr() as *const _,
                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
                    notify_xalign_trampoline::<Self, F> as *const (),
                )),
                Box_::into_raw(f),
            )
        }
    }

    #[cfg(feature = "v0_76")]
    #[cfg_attr(docsrs, doc(cfg(feature = "v0_76")))]
    #[doc(alias = "xfill")]
    fn connect_xfill_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
        unsafe extern "C" fn notify_xfill_trampoline<P: IsA<Terminal>, F: Fn(&P) + 'static>(
            this: *mut ffi::VteTerminal,
            _param_spec: glib::ffi::gpointer,
            f: glib::ffi::gpointer,
        ) {
            let f: &F = &*(f as *const F);
            f(Terminal::from_glib_borrow(this).unsafe_cast_ref())
        }
        unsafe {
            let f: Box_<F> = Box_::new(f);
            connect_raw(
                self.as_ptr() as *mut _,
                b"notify::xfill\0".as_ptr() as *const _,
                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
                    notify_xfill_trampoline::<Self, F> as *const (),
                )),
                Box_::into_raw(f),
            )
        }
    }

    #[cfg(feature = "v0_76")]
    #[cfg_attr(docsrs, doc(cfg(feature = "v0_76")))]
    #[doc(alias = "yalign")]
    fn connect_yalign_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
        unsafe extern "C" fn notify_yalign_trampoline<P: IsA<Terminal>, F: Fn(&P) + 'static>(
            this: *mut ffi::VteTerminal,
            _param_spec: glib::ffi::gpointer,
            f: glib::ffi::gpointer,
        ) {
            let f: &F = &*(f as *const F);
            f(Terminal::from_glib_borrow(this).unsafe_cast_ref())
        }
        unsafe {
            let f: Box_<F> = Box_::new(f);
            connect_raw(
                self.as_ptr() as *mut _,
                b"notify::yalign\0".as_ptr() as *const _,
                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
                    notify_yalign_trampoline::<Self, F> as *const (),
                )),
                Box_::into_raw(f),
            )
        }
    }

    #[cfg(feature = "v0_76")]
    #[cfg_attr(docsrs, doc(cfg(feature = "v0_76")))]
    #[doc(alias = "yfill")]
    fn connect_yfill_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
        unsafe extern "C" fn notify_yfill_trampoline<P: IsA<Terminal>, F: Fn(&P) + 'static>(
            this: *mut ffi::VteTerminal,
            _param_spec: glib::ffi::gpointer,
            f: glib::ffi::gpointer,
        ) {
            let f: &F = &*(f as *const F);
            f(Terminal::from_glib_borrow(this).unsafe_cast_ref())
        }
        unsafe {
            let f: Box_<F> = Box_::new(f);
            connect_raw(
                self.as_ptr() as *mut _,
                b"notify::yfill\0".as_ptr() as *const _,
                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
                    notify_yfill_trampoline::<Self, F> as *const (),
                )),
                Box_::into_raw(f),
            )
        }
    }
}

impl<O: IsA<Terminal>> TerminalExt for O {}
