atk/auto/
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::object::Cast;
7use glib::object::IsA;
8use glib::signal::connect_raw;
9use glib::signal::SignalHandlerId;
10use glib::translate::*;
11use glib::GString;
12use glib::StaticType;
13use glib::Value;
14use glib_sys;
15use gobject_sys;
16use libc;
17use std::boxed::Box as Box_;
18use std::fmt;
19use std::mem::transmute;
20use Layer;
21use RelationSet;
22use RelationType;
23use Role;
24use State;
25use StateSet;
26
27glib_wrapper! {
28    pub struct Object(Object<atk_sys::AtkObject, atk_sys::AtkObjectClass, ObjectClass>);
29
30    match fn {
31        get_type => || atk_sys::atk_object_get_type(),
32    }
33}
34
35pub const NONE_OBJECT: Option<&Object> = None;
36
37pub trait AtkObjectExt: 'static {
38    fn add_relationship<P: IsA<Object>>(&self, relationship: RelationType, target: &P) -> bool;
39
40    //fn connect_property_change_handler(&self, handler: /*Unimplemented*/Fn(&Object, /*Ignored*/PropertyValues)) -> u32;
41
42    //fn get_attributes(&self) -> /*Ignored*/Option<AttributeSet>;
43
44    fn get_description(&self) -> Option<GString>;
45
46    fn get_index_in_parent(&self) -> i32;
47
48    fn get_layer(&self) -> Layer;
49
50    fn get_mdi_zorder(&self) -> i32;
51
52    fn get_n_accessible_children(&self) -> i32;
53
54    fn get_name(&self) -> Option<GString>;
55
56    fn get_object_locale(&self) -> Option<GString>;
57
58    fn get_parent(&self) -> Option<Object>;
59
60    fn get_role(&self) -> Role;
61
62    //fn initialize(&self, data: /*Unimplemented*/Option<Fundamental: Pointer>);
63
64    fn notify_state_change(&self, state: State, value: bool);
65
66    fn peek_parent(&self) -> Option<Object>;
67
68    fn ref_accessible_child(&self, i: i32) -> Option<Object>;
69
70    fn ref_relation_set(&self) -> Option<RelationSet>;
71
72    fn ref_state_set(&self) -> Option<StateSet>;
73
74    fn remove_property_change_handler(&self, handler_id: u32);
75
76    fn remove_relationship<P: IsA<Object>>(&self, relationship: RelationType, target: &P) -> bool;
77
78    fn set_description(&self, description: &str);
79
80    fn set_name(&self, name: &str);
81
82    fn set_parent<P: IsA<Object>>(&self, parent: &P);
83
84    fn set_role(&self, role: Role);
85
86    fn get_property_accessible_component_layer(&self) -> i32;
87
88    fn get_property_accessible_component_mdi_zorder(&self) -> i32;
89
90    fn get_property_accessible_description(&self) -> Option<GString>;
91
92    fn set_property_accessible_description(&self, accessible_description: Option<&str>);
93
94    fn get_property_accessible_hypertext_nlinks(&self) -> i32;
95
96    fn get_property_accessible_name(&self) -> Option<GString>;
97
98    fn set_property_accessible_name(&self, accessible_name: Option<&str>);
99
100    fn get_property_accessible_parent(&self) -> Option<Object>;
101
102    fn set_property_accessible_parent(&self, accessible_parent: Option<&Object>);
103
104    fn get_property_accessible_role(&self) -> Role;
105
106    fn set_property_accessible_role(&self, accessible_role: Role);
107
108    fn get_property_accessible_table_caption(&self) -> Option<GString>;
109
110    fn set_property_accessible_table_caption(&self, accessible_table_caption: Option<&str>);
111
112    fn get_property_accessible_table_caption_object(&self) -> Option<Object>;
113
114    fn set_property_accessible_table_caption_object(
115        &self,
116        accessible_table_caption_object: Option<&Object>,
117    );
118
119    fn get_property_accessible_table_column_description(&self) -> Option<GString>;
120
121    fn set_property_accessible_table_column_description(
122        &self,
123        accessible_table_column_description: Option<&str>,
124    );
125
126    fn get_property_accessible_table_column_header(&self) -> Option<Object>;
127
128    fn set_property_accessible_table_column_header(
129        &self,
130        accessible_table_column_header: Option<&Object>,
131    );
132
133    fn get_property_accessible_table_row_description(&self) -> Option<GString>;
134
135    fn set_property_accessible_table_row_description(
136        &self,
137        accessible_table_row_description: Option<&str>,
138    );
139
140    fn get_property_accessible_table_row_header(&self) -> Option<Object>;
141
142    fn set_property_accessible_table_row_header(
143        &self,
144        accessible_table_row_header: Option<&Object>,
145    );
146
147    fn get_property_accessible_table_summary(&self) -> Option<Object>;
148
149    fn set_property_accessible_table_summary(&self, accessible_table_summary: Option<&Object>);
150
151    fn get_property_accessible_value(&self) -> f64;
152
153    fn set_property_accessible_value(&self, accessible_value: f64);
154
155    fn connect_active_descendant_changed<F: Fn(&Self, &Object) + 'static>(
156        &self,
157        f: F,
158    ) -> SignalHandlerId;
159
160    fn connect_children_changed<F: Fn(&Self, u32, &Object) + 'static>(
161        &self,
162        f: F,
163    ) -> SignalHandlerId;
164
165    //fn connect_property_change<Unsupported or ignored types>(&self, f: F) -> SignalHandlerId;
166
167    fn connect_state_change<F: Fn(&Self, &str, bool) + 'static>(&self, f: F) -> SignalHandlerId;
168
169    fn connect_visible_data_changed<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
170
171    fn connect_property_accessible_component_layer_notify<F: Fn(&Self) + 'static>(
172        &self,
173        f: F,
174    ) -> SignalHandlerId;
175
176    fn connect_property_accessible_component_mdi_zorder_notify<F: Fn(&Self) + 'static>(
177        &self,
178        f: F,
179    ) -> SignalHandlerId;
180
181    fn connect_property_accessible_description_notify<F: Fn(&Self) + 'static>(
182        &self,
183        f: F,
184    ) -> SignalHandlerId;
185
186    fn connect_property_accessible_hypertext_nlinks_notify<F: Fn(&Self) + 'static>(
187        &self,
188        f: F,
189    ) -> SignalHandlerId;
190
191    fn connect_property_accessible_name_notify<F: Fn(&Self) + 'static>(
192        &self,
193        f: F,
194    ) -> SignalHandlerId;
195
196    fn connect_property_accessible_parent_notify<F: Fn(&Self) + 'static>(
197        &self,
198        f: F,
199    ) -> SignalHandlerId;
200
201    fn connect_property_accessible_role_notify<F: Fn(&Self) + 'static>(
202        &self,
203        f: F,
204    ) -> SignalHandlerId;
205
206    fn connect_property_accessible_table_caption_notify<F: Fn(&Self) + 'static>(
207        &self,
208        f: F,
209    ) -> SignalHandlerId;
210
211    fn connect_property_accessible_table_caption_object_notify<F: Fn(&Self) + 'static>(
212        &self,
213        f: F,
214    ) -> SignalHandlerId;
215
216    fn connect_property_accessible_table_column_description_notify<F: Fn(&Self) + 'static>(
217        &self,
218        f: F,
219    ) -> SignalHandlerId;
220
221    fn connect_property_accessible_table_column_header_notify<F: Fn(&Self) + 'static>(
222        &self,
223        f: F,
224    ) -> SignalHandlerId;
225
226    fn connect_property_accessible_table_row_description_notify<F: Fn(&Self) + 'static>(
227        &self,
228        f: F,
229    ) -> SignalHandlerId;
230
231    fn connect_property_accessible_table_row_header_notify<F: Fn(&Self) + 'static>(
232        &self,
233        f: F,
234    ) -> SignalHandlerId;
235
236    fn connect_property_accessible_table_summary_notify<F: Fn(&Self) + 'static>(
237        &self,
238        f: F,
239    ) -> SignalHandlerId;
240
241    fn connect_property_accessible_value_notify<F: Fn(&Self) + 'static>(
242        &self,
243        f: F,
244    ) -> SignalHandlerId;
245}
246
247impl<O: IsA<Object>> AtkObjectExt for O {
248    fn add_relationship<P: IsA<Object>>(&self, relationship: RelationType, target: &P) -> bool {
249        unsafe {
250            from_glib(atk_sys::atk_object_add_relationship(
251                self.as_ref().to_glib_none().0,
252                relationship.to_glib(),
253                target.as_ref().to_glib_none().0,
254            ))
255        }
256    }
257
258    //fn connect_property_change_handler(&self, handler: /*Unimplemented*/Fn(&Object, /*Ignored*/PropertyValues)) -> u32 {
259    //    unsafe { TODO: call atk_sys:atk_object_connect_property_change_handler() }
260    //}
261
262    //fn get_attributes(&self) -> /*Ignored*/Option<AttributeSet> {
263    //    unsafe { TODO: call atk_sys:atk_object_get_attributes() }
264    //}
265
266    fn get_description(&self) -> Option<GString> {
267        unsafe {
268            from_glib_none(atk_sys::atk_object_get_description(
269                self.as_ref().to_glib_none().0,
270            ))
271        }
272    }
273
274    fn get_index_in_parent(&self) -> i32 {
275        unsafe { atk_sys::atk_object_get_index_in_parent(self.as_ref().to_glib_none().0) }
276    }
277
278    fn get_layer(&self) -> Layer {
279        unsafe {
280            from_glib(atk_sys::atk_object_get_layer(
281                self.as_ref().to_glib_none().0,
282            ))
283        }
284    }
285
286    fn get_mdi_zorder(&self) -> i32 {
287        unsafe { atk_sys::atk_object_get_mdi_zorder(self.as_ref().to_glib_none().0) }
288    }
289
290    fn get_n_accessible_children(&self) -> i32 {
291        unsafe { atk_sys::atk_object_get_n_accessible_children(self.as_ref().to_glib_none().0) }
292    }
293
294    fn get_name(&self) -> Option<GString> {
295        unsafe { from_glib_none(atk_sys::atk_object_get_name(self.as_ref().to_glib_none().0)) }
296    }
297
298    fn get_object_locale(&self) -> Option<GString> {
299        unsafe {
300            from_glib_none(atk_sys::atk_object_get_object_locale(
301                self.as_ref().to_glib_none().0,
302            ))
303        }
304    }
305
306    fn get_parent(&self) -> Option<Object> {
307        unsafe {
308            from_glib_none(atk_sys::atk_object_get_parent(
309                self.as_ref().to_glib_none().0,
310            ))
311        }
312    }
313
314    fn get_role(&self) -> Role {
315        unsafe { from_glib(atk_sys::atk_object_get_role(self.as_ref().to_glib_none().0)) }
316    }
317
318    //fn initialize(&self, data: /*Unimplemented*/Option<Fundamental: Pointer>) {
319    //    unsafe { TODO: call atk_sys:atk_object_initialize() }
320    //}
321
322    fn notify_state_change(&self, state: State, value: bool) {
323        unsafe {
324            atk_sys::atk_object_notify_state_change(
325                self.as_ref().to_glib_none().0,
326                state,
327                value.to_glib(),
328            );
329        }
330    }
331
332    fn peek_parent(&self) -> Option<Object> {
333        unsafe {
334            from_glib_none(atk_sys::atk_object_peek_parent(
335                self.as_ref().to_glib_none().0,
336            ))
337        }
338    }
339
340    fn ref_accessible_child(&self, i: i32) -> Option<Object> {
341        unsafe {
342            from_glib_full(atk_sys::atk_object_ref_accessible_child(
343                self.as_ref().to_glib_none().0,
344                i,
345            ))
346        }
347    }
348
349    fn ref_relation_set(&self) -> Option<RelationSet> {
350        unsafe {
351            from_glib_full(atk_sys::atk_object_ref_relation_set(
352                self.as_ref().to_glib_none().0,
353            ))
354        }
355    }
356
357    fn ref_state_set(&self) -> Option<StateSet> {
358        unsafe {
359            from_glib_full(atk_sys::atk_object_ref_state_set(
360                self.as_ref().to_glib_none().0,
361            ))
362        }
363    }
364
365    fn remove_property_change_handler(&self, handler_id: u32) {
366        unsafe {
367            atk_sys::atk_object_remove_property_change_handler(
368                self.as_ref().to_glib_none().0,
369                handler_id,
370            );
371        }
372    }
373
374    fn remove_relationship<P: IsA<Object>>(&self, relationship: RelationType, target: &P) -> bool {
375        unsafe {
376            from_glib(atk_sys::atk_object_remove_relationship(
377                self.as_ref().to_glib_none().0,
378                relationship.to_glib(),
379                target.as_ref().to_glib_none().0,
380            ))
381        }
382    }
383
384    fn set_description(&self, description: &str) {
385        unsafe {
386            atk_sys::atk_object_set_description(
387                self.as_ref().to_glib_none().0,
388                description.to_glib_none().0,
389            );
390        }
391    }
392
393    fn set_name(&self, name: &str) {
394        unsafe {
395            atk_sys::atk_object_set_name(self.as_ref().to_glib_none().0, name.to_glib_none().0);
396        }
397    }
398
399    fn set_parent<P: IsA<Object>>(&self, parent: &P) {
400        unsafe {
401            atk_sys::atk_object_set_parent(
402                self.as_ref().to_glib_none().0,
403                parent.as_ref().to_glib_none().0,
404            );
405        }
406    }
407
408    fn set_role(&self, role: Role) {
409        unsafe {
410            atk_sys::atk_object_set_role(self.as_ref().to_glib_none().0, role.to_glib());
411        }
412    }
413
414    fn get_property_accessible_component_layer(&self) -> i32 {
415        unsafe {
416            let mut value = Value::from_type(<i32 as StaticType>::static_type());
417            gobject_sys::g_object_get_property(
418                self.to_glib_none().0 as *mut gobject_sys::GObject,
419                b"accessible-component-layer\0".as_ptr() as *const _,
420                value.to_glib_none_mut().0,
421            );
422            value.get().unwrap()
423        }
424    }
425
426    fn get_property_accessible_component_mdi_zorder(&self) -> i32 {
427        unsafe {
428            let mut value = Value::from_type(<i32 as StaticType>::static_type());
429            gobject_sys::g_object_get_property(
430                self.to_glib_none().0 as *mut gobject_sys::GObject,
431                b"accessible-component-mdi-zorder\0".as_ptr() as *const _,
432                value.to_glib_none_mut().0,
433            );
434            value.get().unwrap()
435        }
436    }
437
438    fn get_property_accessible_description(&self) -> Option<GString> {
439        unsafe {
440            let mut value = Value::from_type(<GString as StaticType>::static_type());
441            gobject_sys::g_object_get_property(
442                self.to_glib_none().0 as *mut gobject_sys::GObject,
443                b"accessible-description\0".as_ptr() as *const _,
444                value.to_glib_none_mut().0,
445            );
446            value.get()
447        }
448    }
449
450    fn set_property_accessible_description(&self, accessible_description: Option<&str>) {
451        unsafe {
452            gobject_sys::g_object_set_property(
453                self.to_glib_none().0 as *mut gobject_sys::GObject,
454                b"accessible-description\0".as_ptr() as *const _,
455                Value::from(accessible_description).to_glib_none().0,
456            );
457        }
458    }
459
460    fn get_property_accessible_hypertext_nlinks(&self) -> i32 {
461        unsafe {
462            let mut value = Value::from_type(<i32 as StaticType>::static_type());
463            gobject_sys::g_object_get_property(
464                self.to_glib_none().0 as *mut gobject_sys::GObject,
465                b"accessible-hypertext-nlinks\0".as_ptr() as *const _,
466                value.to_glib_none_mut().0,
467            );
468            value.get().unwrap()
469        }
470    }
471
472    fn get_property_accessible_name(&self) -> Option<GString> {
473        unsafe {
474            let mut value = Value::from_type(<GString as StaticType>::static_type());
475            gobject_sys::g_object_get_property(
476                self.to_glib_none().0 as *mut gobject_sys::GObject,
477                b"accessible-name\0".as_ptr() as *const _,
478                value.to_glib_none_mut().0,
479            );
480            value.get()
481        }
482    }
483
484    fn set_property_accessible_name(&self, accessible_name: Option<&str>) {
485        unsafe {
486            gobject_sys::g_object_set_property(
487                self.to_glib_none().0 as *mut gobject_sys::GObject,
488                b"accessible-name\0".as_ptr() as *const _,
489                Value::from(accessible_name).to_glib_none().0,
490            );
491        }
492    }
493
494    fn get_property_accessible_parent(&self) -> Option<Object> {
495        unsafe {
496            let mut value = Value::from_type(<Object as StaticType>::static_type());
497            gobject_sys::g_object_get_property(
498                self.to_glib_none().0 as *mut gobject_sys::GObject,
499                b"accessible-parent\0".as_ptr() as *const _,
500                value.to_glib_none_mut().0,
501            );
502            value.get()
503        }
504    }
505
506    fn set_property_accessible_parent(&self, accessible_parent: Option<&Object>) {
507        unsafe {
508            gobject_sys::g_object_set_property(
509                self.to_glib_none().0 as *mut gobject_sys::GObject,
510                b"accessible-parent\0".as_ptr() as *const _,
511                Value::from(accessible_parent).to_glib_none().0,
512            );
513        }
514    }
515
516    fn get_property_accessible_role(&self) -> Role {
517        unsafe {
518            let mut value = Value::from_type(<Role as StaticType>::static_type());
519            gobject_sys::g_object_get_property(
520                self.to_glib_none().0 as *mut gobject_sys::GObject,
521                b"accessible-role\0".as_ptr() as *const _,
522                value.to_glib_none_mut().0,
523            );
524            value.get().unwrap()
525        }
526    }
527
528    fn set_property_accessible_role(&self, accessible_role: Role) {
529        unsafe {
530            gobject_sys::g_object_set_property(
531                self.to_glib_none().0 as *mut gobject_sys::GObject,
532                b"accessible-role\0".as_ptr() as *const _,
533                Value::from(&accessible_role).to_glib_none().0,
534            );
535        }
536    }
537
538    fn get_property_accessible_table_caption(&self) -> Option<GString> {
539        unsafe {
540            let mut value = Value::from_type(<GString as StaticType>::static_type());
541            gobject_sys::g_object_get_property(
542                self.to_glib_none().0 as *mut gobject_sys::GObject,
543                b"accessible-table-caption\0".as_ptr() as *const _,
544                value.to_glib_none_mut().0,
545            );
546            value.get()
547        }
548    }
549
550    fn set_property_accessible_table_caption(&self, accessible_table_caption: Option<&str>) {
551        unsafe {
552            gobject_sys::g_object_set_property(
553                self.to_glib_none().0 as *mut gobject_sys::GObject,
554                b"accessible-table-caption\0".as_ptr() as *const _,
555                Value::from(accessible_table_caption).to_glib_none().0,
556            );
557        }
558    }
559
560    fn get_property_accessible_table_caption_object(&self) -> Option<Object> {
561        unsafe {
562            let mut value = Value::from_type(<Object as StaticType>::static_type());
563            gobject_sys::g_object_get_property(
564                self.to_glib_none().0 as *mut gobject_sys::GObject,
565                b"accessible-table-caption-object\0".as_ptr() as *const _,
566                value.to_glib_none_mut().0,
567            );
568            value.get()
569        }
570    }
571
572    fn set_property_accessible_table_caption_object(
573        &self,
574        accessible_table_caption_object: Option<&Object>,
575    ) {
576        unsafe {
577            gobject_sys::g_object_set_property(
578                self.to_glib_none().0 as *mut gobject_sys::GObject,
579                b"accessible-table-caption-object\0".as_ptr() as *const _,
580                Value::from(accessible_table_caption_object)
581                    .to_glib_none()
582                    .0,
583            );
584        }
585    }
586
587    fn get_property_accessible_table_column_description(&self) -> Option<GString> {
588        unsafe {
589            let mut value = Value::from_type(<GString as StaticType>::static_type());
590            gobject_sys::g_object_get_property(
591                self.to_glib_none().0 as *mut gobject_sys::GObject,
592                b"accessible-table-column-description\0".as_ptr() as *const _,
593                value.to_glib_none_mut().0,
594            );
595            value.get()
596        }
597    }
598
599    fn set_property_accessible_table_column_description(
600        &self,
601        accessible_table_column_description: Option<&str>,
602    ) {
603        unsafe {
604            gobject_sys::g_object_set_property(
605                self.to_glib_none().0 as *mut gobject_sys::GObject,
606                b"accessible-table-column-description\0".as_ptr() as *const _,
607                Value::from(accessible_table_column_description)
608                    .to_glib_none()
609                    .0,
610            );
611        }
612    }
613
614    fn get_property_accessible_table_column_header(&self) -> Option<Object> {
615        unsafe {
616            let mut value = Value::from_type(<Object as StaticType>::static_type());
617            gobject_sys::g_object_get_property(
618                self.to_glib_none().0 as *mut gobject_sys::GObject,
619                b"accessible-table-column-header\0".as_ptr() as *const _,
620                value.to_glib_none_mut().0,
621            );
622            value.get()
623        }
624    }
625
626    fn set_property_accessible_table_column_header(
627        &self,
628        accessible_table_column_header: Option<&Object>,
629    ) {
630        unsafe {
631            gobject_sys::g_object_set_property(
632                self.to_glib_none().0 as *mut gobject_sys::GObject,
633                b"accessible-table-column-header\0".as_ptr() as *const _,
634                Value::from(accessible_table_column_header).to_glib_none().0,
635            );
636        }
637    }
638
639    fn get_property_accessible_table_row_description(&self) -> Option<GString> {
640        unsafe {
641            let mut value = Value::from_type(<GString as StaticType>::static_type());
642            gobject_sys::g_object_get_property(
643                self.to_glib_none().0 as *mut gobject_sys::GObject,
644                b"accessible-table-row-description\0".as_ptr() as *const _,
645                value.to_glib_none_mut().0,
646            );
647            value.get()
648        }
649    }
650
651    fn set_property_accessible_table_row_description(
652        &self,
653        accessible_table_row_description: Option<&str>,
654    ) {
655        unsafe {
656            gobject_sys::g_object_set_property(
657                self.to_glib_none().0 as *mut gobject_sys::GObject,
658                b"accessible-table-row-description\0".as_ptr() as *const _,
659                Value::from(accessible_table_row_description)
660                    .to_glib_none()
661                    .0,
662            );
663        }
664    }
665
666    fn get_property_accessible_table_row_header(&self) -> Option<Object> {
667        unsafe {
668            let mut value = Value::from_type(<Object as StaticType>::static_type());
669            gobject_sys::g_object_get_property(
670                self.to_glib_none().0 as *mut gobject_sys::GObject,
671                b"accessible-table-row-header\0".as_ptr() as *const _,
672                value.to_glib_none_mut().0,
673            );
674            value.get()
675        }
676    }
677
678    fn set_property_accessible_table_row_header(
679        &self,
680        accessible_table_row_header: Option<&Object>,
681    ) {
682        unsafe {
683            gobject_sys::g_object_set_property(
684                self.to_glib_none().0 as *mut gobject_sys::GObject,
685                b"accessible-table-row-header\0".as_ptr() as *const _,
686                Value::from(accessible_table_row_header).to_glib_none().0,
687            );
688        }
689    }
690
691    fn get_property_accessible_table_summary(&self) -> Option<Object> {
692        unsafe {
693            let mut value = Value::from_type(<Object as StaticType>::static_type());
694            gobject_sys::g_object_get_property(
695                self.to_glib_none().0 as *mut gobject_sys::GObject,
696                b"accessible-table-summary\0".as_ptr() as *const _,
697                value.to_glib_none_mut().0,
698            );
699            value.get()
700        }
701    }
702
703    fn set_property_accessible_table_summary(&self, accessible_table_summary: Option<&Object>) {
704        unsafe {
705            gobject_sys::g_object_set_property(
706                self.to_glib_none().0 as *mut gobject_sys::GObject,
707                b"accessible-table-summary\0".as_ptr() as *const _,
708                Value::from(accessible_table_summary).to_glib_none().0,
709            );
710        }
711    }
712
713    fn get_property_accessible_value(&self) -> f64 {
714        unsafe {
715            let mut value = Value::from_type(<f64 as StaticType>::static_type());
716            gobject_sys::g_object_get_property(
717                self.to_glib_none().0 as *mut gobject_sys::GObject,
718                b"accessible-value\0".as_ptr() as *const _,
719                value.to_glib_none_mut().0,
720            );
721            value.get().unwrap()
722        }
723    }
724
725    fn set_property_accessible_value(&self, accessible_value: f64) {
726        unsafe {
727            gobject_sys::g_object_set_property(
728                self.to_glib_none().0 as *mut gobject_sys::GObject,
729                b"accessible-value\0".as_ptr() as *const _,
730                Value::from(&accessible_value).to_glib_none().0,
731            );
732        }
733    }
734
735    fn connect_active_descendant_changed<F: Fn(&Self, &Object) + 'static>(
736        &self,
737        f: F,
738    ) -> SignalHandlerId {
739        unsafe extern "C" fn active_descendant_changed_trampoline<P, F: Fn(&P, &Object) + 'static>(
740            this: *mut atk_sys::AtkObject,
741            arg1: *mut atk_sys::AtkObject,
742            f: glib_sys::gpointer,
743        ) where
744            P: IsA<Object>,
745        {
746            let f: &F = &*(f as *const F);
747            f(
748                &Object::from_glib_borrow(this).unsafe_cast(),
749                &from_glib_borrow(arg1),
750            )
751        }
752        unsafe {
753            let f: Box_<F> = Box_::new(f);
754            connect_raw(
755                self.as_ptr() as *mut _,
756                b"active-descendant-changed\0".as_ptr() as *const _,
757                Some(transmute(
758                    active_descendant_changed_trampoline::<Self, F> as usize,
759                )),
760                Box_::into_raw(f),
761            )
762        }
763    }
764
765    fn connect_children_changed<F: Fn(&Self, u32, &Object) + 'static>(
766        &self,
767        f: F,
768    ) -> SignalHandlerId {
769        unsafe extern "C" fn children_changed_trampoline<P, F: Fn(&P, u32, &Object) + 'static>(
770            this: *mut atk_sys::AtkObject,
771            arg1: libc::c_uint,
772            arg2: *mut atk_sys::AtkObject,
773            f: glib_sys::gpointer,
774        ) where
775            P: IsA<Object>,
776        {
777            let f: &F = &*(f as *const F);
778            f(
779                &Object::from_glib_borrow(this).unsafe_cast(),
780                arg1,
781                &from_glib_borrow(arg2),
782            )
783        }
784        unsafe {
785            let f: Box_<F> = Box_::new(f);
786            connect_raw(
787                self.as_ptr() as *mut _,
788                b"children-changed\0".as_ptr() as *const _,
789                Some(transmute(children_changed_trampoline::<Self, F> as usize)),
790                Box_::into_raw(f),
791            )
792        }
793    }
794
795    //fn connect_property_change<Unsupported or ignored types>(&self, f: F) -> SignalHandlerId {
796    //    Ignored arg1: Atk.PropertyValues
797    //}
798
799    fn connect_state_change<F: Fn(&Self, &str, bool) + 'static>(&self, f: F) -> SignalHandlerId {
800        unsafe extern "C" fn state_change_trampoline<P, F: Fn(&P, &str, bool) + 'static>(
801            this: *mut atk_sys::AtkObject,
802            arg1: *mut libc::c_char,
803            arg2: glib_sys::gboolean,
804            f: glib_sys::gpointer,
805        ) where
806            P: IsA<Object>,
807        {
808            let f: &F = &*(f as *const F);
809            f(
810                &Object::from_glib_borrow(this).unsafe_cast(),
811                &GString::from_glib_borrow(arg1),
812                from_glib(arg2),
813            )
814        }
815        unsafe {
816            let f: Box_<F> = Box_::new(f);
817            connect_raw(
818                self.as_ptr() as *mut _,
819                b"state-change\0".as_ptr() as *const _,
820                Some(transmute(state_change_trampoline::<Self, F> as usize)),
821                Box_::into_raw(f),
822            )
823        }
824    }
825
826    fn connect_visible_data_changed<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
827        unsafe extern "C" fn visible_data_changed_trampoline<P, F: Fn(&P) + 'static>(
828            this: *mut atk_sys::AtkObject,
829            f: glib_sys::gpointer,
830        ) where
831            P: IsA<Object>,
832        {
833            let f: &F = &*(f as *const F);
834            f(&Object::from_glib_borrow(this).unsafe_cast())
835        }
836        unsafe {
837            let f: Box_<F> = Box_::new(f);
838            connect_raw(
839                self.as_ptr() as *mut _,
840                b"visible-data-changed\0".as_ptr() as *const _,
841                Some(transmute(
842                    visible_data_changed_trampoline::<Self, F> as usize,
843                )),
844                Box_::into_raw(f),
845            )
846        }
847    }
848
849    fn connect_property_accessible_component_layer_notify<F: Fn(&Self) + 'static>(
850        &self,
851        f: F,
852    ) -> SignalHandlerId {
853        unsafe extern "C" fn notify_accessible_component_layer_trampoline<P, F: Fn(&P) + 'static>(
854            this: *mut atk_sys::AtkObject,
855            _param_spec: glib_sys::gpointer,
856            f: glib_sys::gpointer,
857        ) where
858            P: IsA<Object>,
859        {
860            let f: &F = &*(f as *const F);
861            f(&Object::from_glib_borrow(this).unsafe_cast())
862        }
863        unsafe {
864            let f: Box_<F> = Box_::new(f);
865            connect_raw(
866                self.as_ptr() as *mut _,
867                b"notify::accessible-component-layer\0".as_ptr() as *const _,
868                Some(transmute(
869                    notify_accessible_component_layer_trampoline::<Self, F> as usize,
870                )),
871                Box_::into_raw(f),
872            )
873        }
874    }
875
876    fn connect_property_accessible_component_mdi_zorder_notify<F: Fn(&Self) + 'static>(
877        &self,
878        f: F,
879    ) -> SignalHandlerId {
880        unsafe extern "C" fn notify_accessible_component_mdi_zorder_trampoline<
881            P,
882            F: Fn(&P) + 'static,
883        >(
884            this: *mut atk_sys::AtkObject,
885            _param_spec: glib_sys::gpointer,
886            f: glib_sys::gpointer,
887        ) where
888            P: IsA<Object>,
889        {
890            let f: &F = &*(f as *const F);
891            f(&Object::from_glib_borrow(this).unsafe_cast())
892        }
893        unsafe {
894            let f: Box_<F> = Box_::new(f);
895            connect_raw(
896                self.as_ptr() as *mut _,
897                b"notify::accessible-component-mdi-zorder\0".as_ptr() as *const _,
898                Some(transmute(
899                    notify_accessible_component_mdi_zorder_trampoline::<Self, F> as usize,
900                )),
901                Box_::into_raw(f),
902            )
903        }
904    }
905
906    fn connect_property_accessible_description_notify<F: Fn(&Self) + 'static>(
907        &self,
908        f: F,
909    ) -> SignalHandlerId {
910        unsafe extern "C" fn notify_accessible_description_trampoline<P, F: Fn(&P) + 'static>(
911            this: *mut atk_sys::AtkObject,
912            _param_spec: glib_sys::gpointer,
913            f: glib_sys::gpointer,
914        ) where
915            P: IsA<Object>,
916        {
917            let f: &F = &*(f as *const F);
918            f(&Object::from_glib_borrow(this).unsafe_cast())
919        }
920        unsafe {
921            let f: Box_<F> = Box_::new(f);
922            connect_raw(
923                self.as_ptr() as *mut _,
924                b"notify::accessible-description\0".as_ptr() as *const _,
925                Some(transmute(
926                    notify_accessible_description_trampoline::<Self, F> as usize,
927                )),
928                Box_::into_raw(f),
929            )
930        }
931    }
932
933    fn connect_property_accessible_hypertext_nlinks_notify<F: Fn(&Self) + 'static>(
934        &self,
935        f: F,
936    ) -> SignalHandlerId {
937        unsafe extern "C" fn notify_accessible_hypertext_nlinks_trampoline<P, F: Fn(&P) + 'static>(
938            this: *mut atk_sys::AtkObject,
939            _param_spec: glib_sys::gpointer,
940            f: glib_sys::gpointer,
941        ) where
942            P: IsA<Object>,
943        {
944            let f: &F = &*(f as *const F);
945            f(&Object::from_glib_borrow(this).unsafe_cast())
946        }
947        unsafe {
948            let f: Box_<F> = Box_::new(f);
949            connect_raw(
950                self.as_ptr() as *mut _,
951                b"notify::accessible-hypertext-nlinks\0".as_ptr() as *const _,
952                Some(transmute(
953                    notify_accessible_hypertext_nlinks_trampoline::<Self, F> as usize,
954                )),
955                Box_::into_raw(f),
956            )
957        }
958    }
959
960    fn connect_property_accessible_name_notify<F: Fn(&Self) + 'static>(
961        &self,
962        f: F,
963    ) -> SignalHandlerId {
964        unsafe extern "C" fn notify_accessible_name_trampoline<P, F: Fn(&P) + 'static>(
965            this: *mut atk_sys::AtkObject,
966            _param_spec: glib_sys::gpointer,
967            f: glib_sys::gpointer,
968        ) where
969            P: IsA<Object>,
970        {
971            let f: &F = &*(f as *const F);
972            f(&Object::from_glib_borrow(this).unsafe_cast())
973        }
974        unsafe {
975            let f: Box_<F> = Box_::new(f);
976            connect_raw(
977                self.as_ptr() as *mut _,
978                b"notify::accessible-name\0".as_ptr() as *const _,
979                Some(transmute(
980                    notify_accessible_name_trampoline::<Self, F> as usize,
981                )),
982                Box_::into_raw(f),
983            )
984        }
985    }
986
987    fn connect_property_accessible_parent_notify<F: Fn(&Self) + 'static>(
988        &self,
989        f: F,
990    ) -> SignalHandlerId {
991        unsafe extern "C" fn notify_accessible_parent_trampoline<P, F: Fn(&P) + 'static>(
992            this: *mut atk_sys::AtkObject,
993            _param_spec: glib_sys::gpointer,
994            f: glib_sys::gpointer,
995        ) where
996            P: IsA<Object>,
997        {
998            let f: &F = &*(f as *const F);
999            f(&Object::from_glib_borrow(this).unsafe_cast())
1000        }
1001        unsafe {
1002            let f: Box_<F> = Box_::new(f);
1003            connect_raw(
1004                self.as_ptr() as *mut _,
1005                b"notify::accessible-parent\0".as_ptr() as *const _,
1006                Some(transmute(
1007                    notify_accessible_parent_trampoline::<Self, F> as usize,
1008                )),
1009                Box_::into_raw(f),
1010            )
1011        }
1012    }
1013
1014    fn connect_property_accessible_role_notify<F: Fn(&Self) + 'static>(
1015        &self,
1016        f: F,
1017    ) -> SignalHandlerId {
1018        unsafe extern "C" fn notify_accessible_role_trampoline<P, F: Fn(&P) + 'static>(
1019            this: *mut atk_sys::AtkObject,
1020            _param_spec: glib_sys::gpointer,
1021            f: glib_sys::gpointer,
1022        ) where
1023            P: IsA<Object>,
1024        {
1025            let f: &F = &*(f as *const F);
1026            f(&Object::from_glib_borrow(this).unsafe_cast())
1027        }
1028        unsafe {
1029            let f: Box_<F> = Box_::new(f);
1030            connect_raw(
1031                self.as_ptr() as *mut _,
1032                b"notify::accessible-role\0".as_ptr() as *const _,
1033                Some(transmute(
1034                    notify_accessible_role_trampoline::<Self, F> as usize,
1035                )),
1036                Box_::into_raw(f),
1037            )
1038        }
1039    }
1040
1041    fn connect_property_accessible_table_caption_notify<F: Fn(&Self) + 'static>(
1042        &self,
1043        f: F,
1044    ) -> SignalHandlerId {
1045        unsafe extern "C" fn notify_accessible_table_caption_trampoline<P, F: Fn(&P) + 'static>(
1046            this: *mut atk_sys::AtkObject,
1047            _param_spec: glib_sys::gpointer,
1048            f: glib_sys::gpointer,
1049        ) where
1050            P: IsA<Object>,
1051        {
1052            let f: &F = &*(f as *const F);
1053            f(&Object::from_glib_borrow(this).unsafe_cast())
1054        }
1055        unsafe {
1056            let f: Box_<F> = Box_::new(f);
1057            connect_raw(
1058                self.as_ptr() as *mut _,
1059                b"notify::accessible-table-caption\0".as_ptr() as *const _,
1060                Some(transmute(
1061                    notify_accessible_table_caption_trampoline::<Self, F> as usize,
1062                )),
1063                Box_::into_raw(f),
1064            )
1065        }
1066    }
1067
1068    fn connect_property_accessible_table_caption_object_notify<F: Fn(&Self) + 'static>(
1069        &self,
1070        f: F,
1071    ) -> SignalHandlerId {
1072        unsafe extern "C" fn notify_accessible_table_caption_object_trampoline<
1073            P,
1074            F: Fn(&P) + 'static,
1075        >(
1076            this: *mut atk_sys::AtkObject,
1077            _param_spec: glib_sys::gpointer,
1078            f: glib_sys::gpointer,
1079        ) where
1080            P: IsA<Object>,
1081        {
1082            let f: &F = &*(f as *const F);
1083            f(&Object::from_glib_borrow(this).unsafe_cast())
1084        }
1085        unsafe {
1086            let f: Box_<F> = Box_::new(f);
1087            connect_raw(
1088                self.as_ptr() as *mut _,
1089                b"notify::accessible-table-caption-object\0".as_ptr() as *const _,
1090                Some(transmute(
1091                    notify_accessible_table_caption_object_trampoline::<Self, F> as usize,
1092                )),
1093                Box_::into_raw(f),
1094            )
1095        }
1096    }
1097
1098    fn connect_property_accessible_table_column_description_notify<F: Fn(&Self) + 'static>(
1099        &self,
1100        f: F,
1101    ) -> SignalHandlerId {
1102        unsafe extern "C" fn notify_accessible_table_column_description_trampoline<
1103            P,
1104            F: Fn(&P) + 'static,
1105        >(
1106            this: *mut atk_sys::AtkObject,
1107            _param_spec: glib_sys::gpointer,
1108            f: glib_sys::gpointer,
1109        ) where
1110            P: IsA<Object>,
1111        {
1112            let f: &F = &*(f as *const F);
1113            f(&Object::from_glib_borrow(this).unsafe_cast())
1114        }
1115        unsafe {
1116            let f: Box_<F> = Box_::new(f);
1117            connect_raw(
1118                self.as_ptr() as *mut _,
1119                b"notify::accessible-table-column-description\0".as_ptr() as *const _,
1120                Some(transmute(
1121                    notify_accessible_table_column_description_trampoline::<Self, F> as usize,
1122                )),
1123                Box_::into_raw(f),
1124            )
1125        }
1126    }
1127
1128    fn connect_property_accessible_table_column_header_notify<F: Fn(&Self) + 'static>(
1129        &self,
1130        f: F,
1131    ) -> SignalHandlerId {
1132        unsafe extern "C" fn notify_accessible_table_column_header_trampoline<
1133            P,
1134            F: Fn(&P) + 'static,
1135        >(
1136            this: *mut atk_sys::AtkObject,
1137            _param_spec: glib_sys::gpointer,
1138            f: glib_sys::gpointer,
1139        ) where
1140            P: IsA<Object>,
1141        {
1142            let f: &F = &*(f as *const F);
1143            f(&Object::from_glib_borrow(this).unsafe_cast())
1144        }
1145        unsafe {
1146            let f: Box_<F> = Box_::new(f);
1147            connect_raw(
1148                self.as_ptr() as *mut _,
1149                b"notify::accessible-table-column-header\0".as_ptr() as *const _,
1150                Some(transmute(
1151                    notify_accessible_table_column_header_trampoline::<Self, F> as usize,
1152                )),
1153                Box_::into_raw(f),
1154            )
1155        }
1156    }
1157
1158    fn connect_property_accessible_table_row_description_notify<F: Fn(&Self) + 'static>(
1159        &self,
1160        f: F,
1161    ) -> SignalHandlerId {
1162        unsafe extern "C" fn notify_accessible_table_row_description_trampoline<
1163            P,
1164            F: Fn(&P) + 'static,
1165        >(
1166            this: *mut atk_sys::AtkObject,
1167            _param_spec: glib_sys::gpointer,
1168            f: glib_sys::gpointer,
1169        ) where
1170            P: IsA<Object>,
1171        {
1172            let f: &F = &*(f as *const F);
1173            f(&Object::from_glib_borrow(this).unsafe_cast())
1174        }
1175        unsafe {
1176            let f: Box_<F> = Box_::new(f);
1177            connect_raw(
1178                self.as_ptr() as *mut _,
1179                b"notify::accessible-table-row-description\0".as_ptr() as *const _,
1180                Some(transmute(
1181                    notify_accessible_table_row_description_trampoline::<Self, F> as usize,
1182                )),
1183                Box_::into_raw(f),
1184            )
1185        }
1186    }
1187
1188    fn connect_property_accessible_table_row_header_notify<F: Fn(&Self) + 'static>(
1189        &self,
1190        f: F,
1191    ) -> SignalHandlerId {
1192        unsafe extern "C" fn notify_accessible_table_row_header_trampoline<P, F: Fn(&P) + 'static>(
1193            this: *mut atk_sys::AtkObject,
1194            _param_spec: glib_sys::gpointer,
1195            f: glib_sys::gpointer,
1196        ) where
1197            P: IsA<Object>,
1198        {
1199            let f: &F = &*(f as *const F);
1200            f(&Object::from_glib_borrow(this).unsafe_cast())
1201        }
1202        unsafe {
1203            let f: Box_<F> = Box_::new(f);
1204            connect_raw(
1205                self.as_ptr() as *mut _,
1206                b"notify::accessible-table-row-header\0".as_ptr() as *const _,
1207                Some(transmute(
1208                    notify_accessible_table_row_header_trampoline::<Self, F> as usize,
1209                )),
1210                Box_::into_raw(f),
1211            )
1212        }
1213    }
1214
1215    fn connect_property_accessible_table_summary_notify<F: Fn(&Self) + 'static>(
1216        &self,
1217        f: F,
1218    ) -> SignalHandlerId {
1219        unsafe extern "C" fn notify_accessible_table_summary_trampoline<P, F: Fn(&P) + 'static>(
1220            this: *mut atk_sys::AtkObject,
1221            _param_spec: glib_sys::gpointer,
1222            f: glib_sys::gpointer,
1223        ) where
1224            P: IsA<Object>,
1225        {
1226            let f: &F = &*(f as *const F);
1227            f(&Object::from_glib_borrow(this).unsafe_cast())
1228        }
1229        unsafe {
1230            let f: Box_<F> = Box_::new(f);
1231            connect_raw(
1232                self.as_ptr() as *mut _,
1233                b"notify::accessible-table-summary\0".as_ptr() as *const _,
1234                Some(transmute(
1235                    notify_accessible_table_summary_trampoline::<Self, F> as usize,
1236                )),
1237                Box_::into_raw(f),
1238            )
1239        }
1240    }
1241
1242    fn connect_property_accessible_value_notify<F: Fn(&Self) + 'static>(
1243        &self,
1244        f: F,
1245    ) -> SignalHandlerId {
1246        unsafe extern "C" fn notify_accessible_value_trampoline<P, F: Fn(&P) + 'static>(
1247            this: *mut atk_sys::AtkObject,
1248            _param_spec: glib_sys::gpointer,
1249            f: glib_sys::gpointer,
1250        ) where
1251            P: IsA<Object>,
1252        {
1253            let f: &F = &*(f as *const F);
1254            f(&Object::from_glib_borrow(this).unsafe_cast())
1255        }
1256        unsafe {
1257            let f: Box_<F> = Box_::new(f);
1258            connect_raw(
1259                self.as_ptr() as *mut _,
1260                b"notify::accessible-value\0".as_ptr() as *const _,
1261                Some(transmute(
1262                    notify_accessible_value_trampoline::<Self, F> as usize,
1263                )),
1264                Box_::into_raw(f),
1265            )
1266        }
1267    }
1268}
1269
1270impl fmt::Display for Object {
1271    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1272        write!(f, "Object")
1273    }
1274}