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 atk_sys;
6use glib;
7use glib::object::Cast;
8use glib::object::IsA;
9use glib::translate::*;
10use std::fmt;
11use Action;
12use Component;
13use Document;
14use EditableText;
15use Hypertext;
16use Image;
17use Object;
18use Selection;
19use Table;
20use TableCell;
21use Text;
22use Value;
23use Window;
24
25glib_wrapper! {
26    pub struct NoOpObject(Object<atk_sys::AtkNoOpObject, atk_sys::AtkNoOpObjectClass, NoOpObjectClass>) @extends Object, @implements Action, Component, Document, EditableText, Hypertext, Image, Selection, Table, TableCell, Text, Value, Window;
27
28    match fn {
29        get_type => || atk_sys::atk_no_op_object_get_type(),
30    }
31}
32
33impl NoOpObject {
34    pub fn new<P: IsA<glib::Object>>(obj: &P) -> NoOpObject {
35        assert_initialized_main_thread!();
36        unsafe {
37            Object::from_glib_full(atk_sys::atk_no_op_object_new(obj.as_ref().to_glib_none().0))
38                .unsafe_cast()
39        }
40    }
41}
42
43pub const NONE_NO_OP_OBJECT: Option<&NoOpObject> = None;
44
45impl fmt::Display for NoOpObject {
46    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
47        write!(f, "NoOpObject")
48    }
49}