atk/auto/
no_op_object.rs

1// This file was generated by gir (https://github.com/gtk-rs/gir)
2// from gir-files (https://github.com/gtk-rs/gir-files)
3// DO NOT EDIT
4
5use crate::{
6    Action, Component, Document, EditableText, Hypertext, Image, Object, Selection, Table,
7    TableCell, Text, Value, Window,
8};
9use glib::{prelude::*, translate::*};
10use std::fmt;
11
12glib::wrapper! {
13    #[doc(alias = "AtkNoOpObject")]
14    pub struct NoOpObject(Object<ffi::AtkNoOpObject, ffi::AtkNoOpObjectClass>) @extends Object, @implements Action, Component, Document, EditableText, Hypertext, Image, Selection, Table, TableCell, Text, Value, Window;
15
16    match fn {
17        type_ => || ffi::atk_no_op_object_get_type(),
18    }
19}
20
21impl NoOpObject {
22    pub const NONE: Option<&'static NoOpObject> = None;
23
24    #[doc(alias = "atk_no_op_object_new")]
25    pub fn new(obj: &impl IsA<glib::Object>) -> NoOpObject {
26        assert_initialized_main_thread!();
27        unsafe {
28            Object::from_glib_full(ffi::atk_no_op_object_new(obj.as_ref().to_glib_none().0))
29                .unsafe_cast()
30        }
31    }
32}
33
34impl fmt::Display for NoOpObject {
35    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
36        f.write_str("NoOpObject")
37    }
38}