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
// 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 Action;
use Component;
use Document;
use EditableText;
use Hypertext;
use Image;
use Object;
use Selection;
use Table;
use TableCell;
use Text;
use Value;
use Window;
use ffi;
use glib;
use glib::object::Cast;
use glib::object::IsA;
use glib::translate::*;
use std::fmt;

glib_wrapper! {
    pub struct NoOpObject(Object<ffi::AtkNoOpObject, ffi::AtkNoOpObjectClass, NoOpObjectClass>) @extends Object, @implements Action, Component, Document, EditableText, Hypertext, Image, Selection, Table, TableCell, Text, Value, Window;

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

impl NoOpObject {
    pub fn new<P: IsA<glib::Object>>(obj: &P) -> 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()
        }
    }
}

pub const NONE_NO_OP_OBJECT: Option<&NoOpObject> = None;

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