1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
// This file was generated by gir (https://github.com/gtk-rs/gir)
// from gir-files (https://github.com/gtk-rs/gir-files)
// DO NOT EDIT

use crate::Action;
use crate::Component;
use crate::Document;
use crate::EditableText;
use crate::Hypertext;
use crate::Image;
use crate::Object;
use crate::Selection;
use crate::Table;
use crate::TableCell;
use crate::Text;
use crate::Value;
use crate::Window;
use glib::object::Cast;
use glib::object::IsA;
use glib::translate::*;
use std::fmt;

glib::wrapper! {
    /// An AtkObject which purports to implement all ATK interfaces.
    ///
    /// An AtkNoOpObject is an AtkObject which purports to implement all
    /// ATK interfaces. It is the type of AtkObject which is created if an
    /// accessible object is requested for an object type for which no
    /// factory type is specified.
    ///
    /// # Implements
    ///
    /// [`AtkObjectExt`][trait@crate::prelude::AtkObjectExt], [`trait@glib::ObjectExt`], [`AtkActionExt`][trait@crate::prelude::AtkActionExt], [`ComponentExt`][trait@crate::prelude::ComponentExt], [`DocumentExt`][trait@crate::prelude::DocumentExt], [`EditableTextExt`][trait@crate::prelude::EditableTextExt], [`HypertextExt`][trait@crate::prelude::HypertextExt], [`AtkImageExt`][trait@crate::prelude::AtkImageExt], [`SelectionExt`][trait@crate::prelude::SelectionExt], [`TableExt`][trait@crate::prelude::TableExt], [`TableCellExt`][trait@crate::prelude::TableCellExt], [`TextExt`][trait@crate::prelude::TextExt], [`ValueExt`][trait@crate::prelude::ValueExt], [`AtkWindowExt`][trait@crate::prelude::AtkWindowExt], [`EditableTextExtManual`][trait@crate::prelude::EditableTextExtManual], [`TableExtManual`][trait@crate::prelude::TableExtManual]
    #[doc(alias = "AtkNoOpObject")]
    pub struct NoOpObject(Object<ffi::AtkNoOpObject, ffi::AtkNoOpObjectClass>) @extends Object, @implements Action, Component, Document, EditableText, Hypertext, Image, Selection, Table, TableCell, Text, Value, Window;

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

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

    /// Provides a default (non-functioning stub) [`Object`][crate::Object].
    /// Application maintainers should not use this method.
    /// ## `obj`
    /// a [`glib::Object`][crate::glib::Object]
    ///
    /// # Returns
    ///
    /// a default (non-functioning stub) [`Object`][crate::Object]
    #[doc(alias = "atk_no_op_object_new")]
    pub fn new(obj: &impl IsA<glib::Object>) -> NoOpObject {
        assert_initialized_main_thread!();
        unsafe {
            Object::from_glib_full(ffi::atk_no_op_object_new(obj.as_ref().to_glib_none().0))
                .unsafe_cast()
        }
    }
}

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