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
use Object;
use ffi;
use glib;
use glib::object::IsA;
use glib::translate::*;
use std::fmt;
glib_wrapper! {
pub struct GObjectAccessible(Object<ffi::AtkGObjectAccessible, ffi::AtkGObjectAccessibleClass, GObjectAccessibleClass>) @extends Object;
match fn {
get_type => || ffi::atk_gobject_accessible_get_type(),
}
}
impl GObjectAccessible {
pub fn for_object<P: IsA<glib::Object>>(obj: &P) -> Option<Object> {
assert_initialized_main_thread!();
unsafe {
from_glib_none(ffi::atk_gobject_accessible_for_object(obj.as_ref().to_glib_none().0))
}
}
}
pub const NONE_GOBJECT_ACCESSIBLE: Option<&GObjectAccessible> = None;
pub trait GObjectAccessibleExt: 'static {
fn get_object(&self) -> Option<glib::Object>;
}
impl<O: IsA<GObjectAccessible>> GObjectAccessibleExt for O {
fn get_object(&self) -> Option<glib::Object> {
unsafe {
from_glib_none(ffi::atk_gobject_accessible_get_object(self.as_ref().to_glib_none().0))
}
}
}
impl fmt::Display for GObjectAccessible {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "GObjectAccessible")
}
}