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
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
//
// DO NOT EDIT.  THIS FILE IS GENERATED FROM ../../../dist/idl/nsIAccessible.idl
//


/// `interface nsIAccessible : nsISupports`
///

/// ```text
/// /**
///  * A cross-platform interface that supports platform-specific
///  * accessibility APIs like MSAA and ATK. Contains the sum of what's needed
///  * to support IAccessible as well as ATK's generic accessibility objects.
///  * Can also be used by in-process accessibility clients to get information
///  * about objects in the accessible tree. The accessible tree is a subset of
///  * nodes in the DOM tree -- such as documents, focusable elements and text.
///  * Mozilla creates the implementations of nsIAccessible on demand.
///  * See http://www.mozilla.org/projects/ui/accessibility for more information.
///  */
/// ```
///

// The actual type definition for the interface. This struct has methods
// declared on it which will call through its vtable. You never want to pass
// this type around by value, always pass it behind a reference.

#[repr(C)]
pub struct nsIAccessible {
    vtable: *const nsIAccessibleVTable,

    /// This field is a phantomdata to ensure that the VTable type and any
    /// struct containing it is not safe to send across threads, as XPCOM is
    /// generally not threadsafe.
    ///
    /// XPCOM interfaces in general are not safe to send across threads.
    __nosync: ::std::marker::PhantomData<::std::rc::Rc<u8>>,
}

// Implementing XpCom for an interface exposes its IID, which allows for easy
// use of the `.query_interface<T>` helper method. This also defines that
// method for nsIAccessible.
unsafe impl XpCom for nsIAccessible {
    const IID: nsIID = nsID(0xde2869d9, 0x563c, 0x4943,
        [0x99, 0x6b, 0x31, 0xa4, 0xda, 0xa4, 0xd0, 0x97]);
}

// We need to implement the RefCounted trait so we can be used with `RefPtr`.
// This trait teaches `RefPtr` how to manage our memory.
unsafe impl RefCounted for nsIAccessible {
    #[inline]
    unsafe fn addref(&self) {
        self.AddRef();
    }
    #[inline]
    unsafe fn release(&self) {
        self.Release();
    }
}

// This trait is implemented on all types which can be coerced to from nsIAccessible.
// It is used in the implementation of `fn coerce<T>`. We hide it from the
// documentation, because it clutters it up a lot.
#[doc(hidden)]
pub trait nsIAccessibleCoerce {
    /// Cheaply cast a value of this type from a `nsIAccessible`.
    fn coerce_from(v: &nsIAccessible) -> &Self;
}

// The trivial implementation: We can obviously coerce ourselves to ourselves.
impl nsIAccessibleCoerce for nsIAccessible {
    #[inline]
    fn coerce_from(v: &nsIAccessible) -> &Self {
        v
    }
}

impl nsIAccessible {
    /// Cast this `nsIAccessible` to one of its base interfaces.
    #[inline]
    pub fn coerce<T: nsIAccessibleCoerce>(&self) -> &T {
        T::coerce_from(self)
    }
}

// Every interface struct type implements `Deref` to its base interface. This
// causes methods on the base interfaces to be directly avaliable on the
// object. For example, you can call `.AddRef` or `.QueryInterface` directly
// on any interface which inherits from `nsISupports`.
impl ::std::ops::Deref for nsIAccessible {
    type Target = nsISupports;
    #[inline]
    fn deref(&self) -> &nsISupports {
        unsafe {
            ::std::mem::transmute(self)
        }
    }
}

// Ensure we can use .coerce() to cast to our base types as well. Any type which
// our base interface can coerce from should be coercable from us as well.
impl<T: nsISupportsCoerce> nsIAccessibleCoerce for T {
    #[inline]
    fn coerce_from(v: &nsIAccessible) -> &Self {
        T::coerce_from(v)
    }
}

// This struct represents the interface's VTable. A pointer to a statically
// allocated version of this struct is at the beginning of every nsIAccessible
// object. It contains one pointer field for each method in the interface. In
// the case where we can't generate a binding for a method, we include a void
// pointer.
#[doc(hidden)]
#[repr(C)]
pub struct nsIAccessibleVTable {
    /// We need to include the members from the base interface's vtable at the start
    /// of the VTable definition.
    pub __base: nsISupportsVTable,

    /* readonly attribute nsIAccessible parent; */
    pub GetParent: unsafe extern "system" fn (this: *const nsIAccessible, aParent: *mut *const nsIAccessible) -> nsresult,

    /* readonly attribute nsIAccessible nextSibling; */
    pub GetNextSibling: unsafe extern "system" fn (this: *const nsIAccessible, aNextSibling: *mut *const nsIAccessible) -> nsresult,

    /* readonly attribute nsIAccessible previousSibling; */
    pub GetPreviousSibling: unsafe extern "system" fn (this: *const nsIAccessible, aPreviousSibling: *mut *const nsIAccessible) -> nsresult,

    /* readonly attribute nsIAccessible firstChild; */
    pub GetFirstChild: unsafe extern "system" fn (this: *const nsIAccessible, aFirstChild: *mut *const nsIAccessible) -> nsresult,

    /* readonly attribute nsIAccessible lastChild; */
    pub GetLastChild: unsafe extern "system" fn (this: *const nsIAccessible, aLastChild: *mut *const nsIAccessible) -> nsresult,

    /* readonly attribute nsIArray children; */
    pub GetChildren: unsafe extern "system" fn (this: *const nsIAccessible, aChildren: *mut *const nsIArray) -> nsresult,

    /* readonly attribute long childCount; */
    pub GetChildCount: unsafe extern "system" fn (this: *const nsIAccessible, aChildCount: *mut libc::int32_t) -> nsresult,

    /* readonly attribute long indexInParent; */
    pub GetIndexInParent: unsafe extern "system" fn (this: *const nsIAccessible, aIndexInParent: *mut libc::int32_t) -> nsresult,

    /* readonly attribute nsIDOMNode DOMNode; */
    pub GetDOMNode: unsafe extern "system" fn (this: *const nsIAccessible, aDOMNode: *mut *const nsIDOMNode) -> nsresult,

    /* readonly attribute DOMString id; */
    pub GetId: unsafe extern "system" fn (this: *const nsIAccessible, aId: &mut ::nsstring::nsAString) -> nsresult,

    /* readonly attribute nsIAccessibleDocument document; */
    pub GetDocument: unsafe extern "system" fn (this: *const nsIAccessible, aDocument: *mut *const nsIAccessibleDocument) -> nsresult,

    /* readonly attribute nsIAccessibleDocument rootDocument; */
    pub GetRootDocument: unsafe extern "system" fn (this: *const nsIAccessible, aRootDocument: *mut *const nsIAccessibleDocument) -> nsresult,

    /* readonly attribute DOMString language; */
    pub GetLanguage: unsafe extern "system" fn (this: *const nsIAccessible, aLanguage: &mut ::nsstring::nsAString) -> nsresult,

    /* readonly attribute AString name; */
    pub GetName: unsafe extern "system" fn (this: *const nsIAccessible, aName: &mut ::nsstring::nsAString) -> nsresult,

    /* readonly attribute AString value; */
    pub GetValue: unsafe extern "system" fn (this: *const nsIAccessible, aValue: &mut ::nsstring::nsAString) -> nsresult,

    /* readonly attribute AString description; */
    pub GetDescription: unsafe extern "system" fn (this: *const nsIAccessible, aDescription: &mut ::nsstring::nsAString) -> nsresult,

    /* readonly attribute AString accessKey; */
    pub GetAccessKey: unsafe extern "system" fn (this: *const nsIAccessible, aAccessKey: &mut ::nsstring::nsAString) -> nsresult,

    /* readonly attribute AString keyboardShortcut; */
    pub GetKeyboardShortcut: unsafe extern "system" fn (this: *const nsIAccessible, aKeyboardShortcut: &mut ::nsstring::nsAString) -> nsresult,

    /* readonly attribute unsigned long role; */
    pub GetRole: unsafe extern "system" fn (this: *const nsIAccessible, aRole: *mut libc::uint32_t) -> nsresult,

    /* void getState (out unsigned long aState, out unsigned long aExtraState); */
    pub GetState: unsafe extern "system" fn (this: *const nsIAccessible, aState: *mut libc::uint32_t, aExtraState: *mut libc::uint32_t) -> nsresult,

    /* readonly attribute AString help; */
    pub GetHelp: unsafe extern "system" fn (this: *const nsIAccessible, aHelp: &mut ::nsstring::nsAString) -> nsresult,

    /* readonly attribute nsIAccessible focusedChild; */
    pub GetFocusedChild: unsafe extern "system" fn (this: *const nsIAccessible, aFocusedChild: *mut *const nsIAccessible) -> nsresult,

    /* readonly attribute nsIPersistentProperties attributes; */
    pub GetAttributes: unsafe extern "system" fn (this: *const nsIAccessible, aAttributes: *mut *const nsIPersistentProperties) -> nsresult,

    /* void groupPosition (out long aGroupLevel, out long aSimilarItemsInGroup, out long aPositionInGroup); */
    pub GroupPosition: unsafe extern "system" fn (this: *const nsIAccessible, aGroupLevel: *mut libc::int32_t, aSimilarItemsInGroup: *mut libc::int32_t, aPositionInGroup: *mut libc::int32_t) -> nsresult,

    /* nsIAccessible getChildAtPoint (in long x, in long y); */
    pub GetChildAtPoint: unsafe extern "system" fn (this: *const nsIAccessible, x: libc::int32_t, y: libc::int32_t, _retval: *mut *const nsIAccessible) -> nsresult,

    /* nsIAccessible getDeepestChildAtPoint (in long x, in long y); */
    pub GetDeepestChildAtPoint: unsafe extern "system" fn (this: *const nsIAccessible, x: libc::int32_t, y: libc::int32_t, _retval: *mut *const nsIAccessible) -> nsresult,

    /* nsIAccessible getChildAt (in long aChildIndex); */
    pub GetChildAt: unsafe extern "system" fn (this: *const nsIAccessible, aChildIndex: libc::int32_t, _retval: *mut *const nsIAccessible) -> nsresult,

    /* nsIAccessibleRelation getRelationByType (in unsigned long aRelationType); */
    pub GetRelationByType: unsafe extern "system" fn (this: *const nsIAccessible, aRelationType: libc::uint32_t, _retval: *mut *const nsIAccessibleRelation) -> nsresult,

    /* nsIArray getRelations (); */
    pub GetRelations: unsafe extern "system" fn (this: *const nsIAccessible, _retval: *mut *const nsIArray) -> nsresult,

    /* void getBounds (out long x, out long y, out long width, out long height); */
    pub GetBounds: unsafe extern "system" fn (this: *const nsIAccessible, x: *mut libc::int32_t, y: *mut libc::int32_t, width: *mut libc::int32_t, height: *mut libc::int32_t) -> nsresult,

    /* void setSelected (in boolean isSelected); */
    pub SetSelected: unsafe extern "system" fn (this: *const nsIAccessible, isSelected: bool) -> nsresult,

    /* void takeSelection (); */
    pub TakeSelection: unsafe extern "system" fn (this: *const nsIAccessible) -> nsresult,

    /* void takeFocus (); */
    pub TakeFocus: unsafe extern "system" fn (this: *const nsIAccessible) -> nsresult,

    /* readonly attribute uint8_t actionCount; */
    pub GetActionCount: unsafe extern "system" fn (this: *const nsIAccessible, aActionCount: *mut uint8_t) -> nsresult,

    /* AString getActionName (in uint8_t index); */
    pub GetActionName: unsafe extern "system" fn (this: *const nsIAccessible, index: uint8_t, _retval: &mut ::nsstring::nsAString) -> nsresult,

    /* AString getActionDescription (in uint8_t aIndex); */
    pub GetActionDescription: unsafe extern "system" fn (this: *const nsIAccessible, aIndex: uint8_t, _retval: &mut ::nsstring::nsAString) -> nsresult,

    /* void doAction (in uint8_t index); */
    pub DoAction: unsafe extern "system" fn (this: *const nsIAccessible, index: uint8_t) -> nsresult,

    /* void scrollTo (in unsigned long aScrollType); */
    pub ScrollTo: unsafe extern "system" fn (this: *const nsIAccessible, aScrollType: libc::uint32_t) -> nsresult,

    /* void scrollToPoint (in unsigned long coordinateType, in long x, in long y); */
    pub ScrollToPoint: unsafe extern "system" fn (this: *const nsIAccessible, coordinateType: libc::uint32_t, x: libc::int32_t, y: libc::int32_t) -> nsresult,
}


// The implementations of the function wrappers which are exposed to rust code.
// Call these methods rather than manually calling through the VTable struct.
impl nsIAccessible {

    /// ```text
    /// /**
    ///    * Parent node in accessible tree.
    ///    */
    /// ```
    ///

    /// `readonly attribute nsIAccessible parent;`
    #[inline]
    pub unsafe fn GetParent(&self, aParent: *mut *const nsIAccessible) -> nsresult {
        ((*self.vtable).GetParent)(self, aParent)
    }


    /// ```text
    /// /**
    ///    * Next sibling in accessible tree
    ///    */
    /// ```
    ///

    /// `readonly attribute nsIAccessible nextSibling;`
    #[inline]
    pub unsafe fn GetNextSibling(&self, aNextSibling: *mut *const nsIAccessible) -> nsresult {
        ((*self.vtable).GetNextSibling)(self, aNextSibling)
    }


    /// ```text
    /// /**
    ///    * Previous sibling in accessible tree
    ///    */
    /// ```
    ///

    /// `readonly attribute nsIAccessible previousSibling;`
    #[inline]
    pub unsafe fn GetPreviousSibling(&self, aPreviousSibling: *mut *const nsIAccessible) -> nsresult {
        ((*self.vtable).GetPreviousSibling)(self, aPreviousSibling)
    }


    /// ```text
    /// /**
    ///    * First child in accessible tree
    ///    */
    /// ```
    ///

    /// `readonly attribute nsIAccessible firstChild;`
    #[inline]
    pub unsafe fn GetFirstChild(&self, aFirstChild: *mut *const nsIAccessible) -> nsresult {
        ((*self.vtable).GetFirstChild)(self, aFirstChild)
    }


    /// ```text
    /// /**
    ///    * Last child in accessible tree
    ///    */
    /// ```
    ///

    /// `readonly attribute nsIAccessible lastChild;`
    #[inline]
    pub unsafe fn GetLastChild(&self, aLastChild: *mut *const nsIAccessible) -> nsresult {
        ((*self.vtable).GetLastChild)(self, aLastChild)
    }


    /// ```text
    /// /**
    ///    * Array of all this element's children.
    ///    */
    /// ```
    ///

    /// `readonly attribute nsIArray children;`
    #[inline]
    pub unsafe fn GetChildren(&self, aChildren: *mut *const nsIArray) -> nsresult {
        ((*self.vtable).GetChildren)(self, aChildren)
    }


    /// ```text
    /// /**
    ///    * Number of accessible children
    ///    */
    /// ```
    ///

    /// `readonly attribute long childCount;`
    #[inline]
    pub unsafe fn GetChildCount(&self, aChildCount: *mut libc::int32_t) -> nsresult {
        ((*self.vtable).GetChildCount)(self, aChildCount)
    }


    /// ```text
    /// /**
    ///    * The 0-based index of this accessible in its parent's list of children,
    ///    * or -1 if this accessible does not have a parent.
    ///    */
    /// ```
    ///

    /// `readonly attribute long indexInParent;`
    #[inline]
    pub unsafe fn GetIndexInParent(&self, aIndexInParent: *mut libc::int32_t) -> nsresult {
        ((*self.vtable).GetIndexInParent)(self, aIndexInParent)
    }


    /// ```text
    /// /**
    ///    * The DOM node this nsIAccessible is associated with.
    ///    */
    /// ```
    ///

    /// `readonly attribute nsIDOMNode DOMNode;`
    #[inline]
    pub unsafe fn GetDOMNode(&self, aDOMNode: *mut *const nsIDOMNode) -> nsresult {
        ((*self.vtable).GetDOMNode)(self, aDOMNode)
    }


    /// ```text
    /// /**
    ///     * For remote accessibles the id of the related DOM node.
    ///     */
    /// ```
    ///

    /// `readonly attribute DOMString id;`
    #[inline]
    pub unsafe fn GetId(&self, aId: &mut ::nsstring::nsAString) -> nsresult {
        ((*self.vtable).GetId)(self, aId)
    }


    /// ```text
    /// /**
    ///    * The document accessible that this access node resides in.
    ///    */
    /// ```
    ///

    /// `readonly attribute nsIAccessibleDocument document;`
    #[inline]
    pub unsafe fn GetDocument(&self, aDocument: *mut *const nsIAccessibleDocument) -> nsresult {
        ((*self.vtable).GetDocument)(self, aDocument)
    }


    /// ```text
    /// /**
    ///    * The root document accessible that this access node resides in.
    ///    */
    /// ```
    ///

    /// `readonly attribute nsIAccessibleDocument rootDocument;`
    #[inline]
    pub unsafe fn GetRootDocument(&self, aRootDocument: *mut *const nsIAccessibleDocument) -> nsresult {
        ((*self.vtable).GetRootDocument)(self, aRootDocument)
    }


    /// ```text
    /// /**
    ///    * The language for the current DOM node, e.g. en, de, etc.
    ///    */
    /// ```
    ///

    /// `readonly attribute DOMString language;`
    #[inline]
    pub unsafe fn GetLanguage(&self, aLanguage: &mut ::nsstring::nsAString) -> nsresult {
        ((*self.vtable).GetLanguage)(self, aLanguage)
    }


    /// ```text
    /// /**
    ///    * Accessible name -- the main text equivalent for this node. The name is
    ///    * specified by ARIA or by native markup. Example of ARIA markup is
    ///    * aria-labelledby attribute placed on element of this accessible. Example
    ///    * of native markup is HTML label linked with HTML element of this accessible.
    ///    *
    ///    * Value can be string or null. A null value indicates that AT may attempt to
    ///    * compute the name. Any string value, including the empty string, should be
    ///    * considered author-intentional, and respected.
    ///    */
    /// ```
    ///

    /// `readonly attribute AString name;`
    #[inline]
    pub unsafe fn GetName(&self, aName: &mut ::nsstring::nsAString) -> nsresult {
        ((*self.vtable).GetName)(self, aName)
    }


    /// ```text
    /// /**
    ///    * Accessible value -- a number or a secondary text equivalent for this node
    ///    * Widgets that use role attribute can force a value using the valuenow attribute
    ///    */
    /// ```
    ///

    /// `readonly attribute AString value;`
    #[inline]
    pub unsafe fn GetValue(&self, aValue: &mut ::nsstring::nsAString) -> nsresult {
        ((*self.vtable).GetValue)(self, aValue)
    }


    /// ```text
    /// /**
    ///    * Accessible description -- long text associated with this node
    ///    */
    /// ```
    ///

    /// `readonly attribute AString description;`
    #[inline]
    pub unsafe fn GetDescription(&self, aDescription: &mut ::nsstring::nsAString) -> nsresult {
        ((*self.vtable).GetDescription)(self, aDescription)
    }


    /// ```text
    /// /**
    ///    * Provides localized string of accesskey name, such as Alt+D.
    ///    * The modifier may be affected by user and platform preferences.
    ///    * Usually alt+letter, or just the letter alone for menu items.
    ///    */
    /// ```
    ///

    /// `readonly attribute AString accessKey;`
    #[inline]
    pub unsafe fn GetAccessKey(&self, aAccessKey: &mut ::nsstring::nsAString) -> nsresult {
        ((*self.vtable).GetAccessKey)(self, aAccessKey)
    }


    /// ```text
    /// /**
    ///    * Provides localized string of global keyboard accelerator for default
    ///    * action, such as Ctrl+O for Open file
    ///    */
    /// ```
    ///

    /// `readonly attribute AString keyboardShortcut;`
    #[inline]
    pub unsafe fn GetKeyboardShortcut(&self, aKeyboardShortcut: &mut ::nsstring::nsAString) -> nsresult {
        ((*self.vtable).GetKeyboardShortcut)(self, aKeyboardShortcut)
    }


    /// ```text
    /// /**
    ///    * Enumerated accessible role (see the constants defined in nsIAccessibleRole).
    ///    *
    ///    * @note  The values might depend on platform because of variations. Widgets
    ///    *        can use ARIA role attribute to force the final role.
    ///    */
    /// ```
    ///

    /// `readonly attribute unsigned long role;`
    #[inline]
    pub unsafe fn GetRole(&self, aRole: *mut libc::uint32_t) -> nsresult {
        ((*self.vtable).GetRole)(self, aRole)
    }


    /// ```text
    /// /**
    ///    * Accessible states -- bit fields which describe boolean properties of node.
    ///    * Many states are only valid given a certain role attribute that supports
    ///    * them.
    ///    *
    ///    * @param aState - the first bit field (see nsIAccessibleStates::STATE_*
        ///    *                 constants)
    ///    * @param aExtraState - the second bit field
    ///    *                      (see nsIAccessibleStates::EXT_STATE_* constants)
    ///    */
    /// ```
    ///

    /// `void getState (out unsigned long aState, out unsigned long aExtraState);`
    #[inline]
    pub unsafe fn GetState(&self, aState: *mut libc::uint32_t, aExtraState: *mut libc::uint32_t) -> nsresult {
        ((*self.vtable).GetState)(self, aState, aExtraState)
    }


    /// ```text
    /// /**
    ///    * Help text associated with node
    ///    *
    ///    * @note As of now, this just returns empty string.
    ///    */
    /// ```
    ///

    /// `readonly attribute AString help;`
    #[inline]
    pub unsafe fn GetHelp(&self, aHelp: &mut ::nsstring::nsAString) -> nsresult {
        ((*self.vtable).GetHelp)(self, aHelp)
    }


    /// ```text
    /// /**
    ///    * Focused accessible child of node
    ///    */
    /// ```
    ///

    /// `readonly attribute nsIAccessible focusedChild;`
    #[inline]
    pub unsafe fn GetFocusedChild(&self, aFocusedChild: *mut *const nsIAccessible) -> nsresult {
        ((*self.vtable).GetFocusedChild)(self, aFocusedChild)
    }


    /// ```text
    /// /**
    ///    * Attributes of accessible
    ///    */
    /// ```
    ///

    /// `readonly attribute nsIPersistentProperties attributes;`
    #[inline]
    pub unsafe fn GetAttributes(&self, aAttributes: *mut *const nsIPersistentProperties) -> nsresult {
        ((*self.vtable).GetAttributes)(self, aAttributes)
    }


    /// ```text
    /// /**
    ///    * Returns grouping information. Used for tree items, list items, tab panel
    ///    * labels, radio buttons, etc. Also used for collectons of non-text objects.
    ///    *
    ///    * @param groupLevel - 1-based, similar to ARIA 'level' property
    ///    * @param similarItemsInGroup - 1-based, similar to ARIA 'setsize' property,
    ///    *                              inclusive of the current item
    ///    * @param positionInGroup - 1-based, similar to ARIA 'posinset' property
    ///    */
    /// ```
    ///

    /// `void groupPosition (out long aGroupLevel, out long aSimilarItemsInGroup, out long aPositionInGroup);`
    #[inline]
    pub unsafe fn GroupPosition(&self, aGroupLevel: *mut libc::int32_t, aSimilarItemsInGroup: *mut libc::int32_t, aPositionInGroup: *mut libc::int32_t) -> nsresult {
        ((*self.vtable).GroupPosition)(self, aGroupLevel, aSimilarItemsInGroup, aPositionInGroup)
    }


    /// ```text
    /// /**
    ///    * Accessible child which contains the coordinate at (x, y) in screen pixels.
    ///    * If the point is in the current accessible but not in a child, the
    ///    * current accessible will be returned.
    ///    * If the point is in neither the current accessible or a child, then
    ///    * null will be returned.
    ///    *
    ///    * @param x  screen's x coordinate
    ///    * @param y  screen's y coordinate
    ///    * @return   the deepest accessible child containing the given point
    ///    */
    /// ```
    ///

    /// `nsIAccessible getChildAtPoint (in long x, in long y);`
    #[inline]
    pub unsafe fn GetChildAtPoint(&self, x: libc::int32_t, y: libc::int32_t, _retval: *mut *const nsIAccessible) -> nsresult {
        ((*self.vtable).GetChildAtPoint)(self, x, y, _retval)
    }


    /// ```text
    /// /**
    ///    * Deepest accessible child which contains the coordinate at (x, y) in screen
    ///    * pixels. If the point is in the current accessible but not in a child, the
    ///    * current accessible will be returned. If the point is in neither the current
    ///    * accessible or a child, then null will be returned.
    ///    *
    ///    * @param x  screen's x coordinate
    ///    * @param y  screen's y coordinate
    ///    * @return   the deepest accessible child containing the given point
    ///    */
    /// ```
    ///

    /// `nsIAccessible getDeepestChildAtPoint (in long x, in long y);`
    #[inline]
    pub unsafe fn GetDeepestChildAtPoint(&self, x: libc::int32_t, y: libc::int32_t, _retval: *mut *const nsIAccessible) -> nsresult {
        ((*self.vtable).GetDeepestChildAtPoint)(self, x, y, _retval)
    }


    /// ```text
    /// /**
    ///    * Nth accessible child using zero-based index or last child if index less than zero
    ///    */
    /// ```
    ///

    /// `nsIAccessible getChildAt (in long aChildIndex);`
    #[inline]
    pub unsafe fn GetChildAt(&self, aChildIndex: libc::int32_t, _retval: *mut *const nsIAccessible) -> nsresult {
        ((*self.vtable).GetChildAt)(self, aChildIndex, _retval)
    }


    /// ```text
    /// /**
    ///    * Return accessible relation by the given relation type (see.
        ///    * constants defined in nsIAccessibleRelation).
    ///    */
    /// ```
    ///

    /// `nsIAccessibleRelation getRelationByType (in unsigned long aRelationType);`
    #[inline]
    pub unsafe fn GetRelationByType(&self, aRelationType: libc::uint32_t, _retval: *mut *const nsIAccessibleRelation) -> nsresult {
        ((*self.vtable).GetRelationByType)(self, aRelationType, _retval)
    }


    /// ```text
    /// /**
    ///    * Returns multiple accessible relations for this object.
    ///    */
    /// ```
    ///

    /// `nsIArray getRelations ();`
    #[inline]
    pub unsafe fn GetRelations(&self, _retval: *mut *const nsIArray) -> nsresult {
        ((*self.vtable).GetRelations)(self, _retval)
    }


    /// ```text
    /// /**
    ///    * Return accessible's x and y coordinates relative to the screen and
    ///    * accessible's width and height.
    ///    */
    /// ```
    ///

    /// `void getBounds (out long x, out long y, out long width, out long height);`
    #[inline]
    pub unsafe fn GetBounds(&self, x: *mut libc::int32_t, y: *mut libc::int32_t, width: *mut libc::int32_t, height: *mut libc::int32_t) -> nsresult {
        ((*self.vtable).GetBounds)(self, x, y, width, height)
    }


    /// ```text
    /// /**
    ///    * Add or remove this accessible to the current selection
    ///    */
    /// ```
    ///

    /// `void setSelected (in boolean isSelected);`
    #[inline]
    pub unsafe fn SetSelected(&self, isSelected: bool) -> nsresult {
        ((*self.vtable).SetSelected)(self, isSelected)
    }


    /// ```text
    /// /**
    ///    * Select this accessible node only
    ///    */
    /// ```
    ///

    /// `void takeSelection ();`
    #[inline]
    pub unsafe fn TakeSelection(&self, ) -> nsresult {
        ((*self.vtable).TakeSelection)(self, )
    }


    /// ```text
    /// /**
    ///    * Focus this accessible node,
    ///    * The state STATE_FOCUSABLE indicates whether this node is normally focusable.
    ///    * It is the callers responsibility to determine whether this node is focusable.
    ///    * accTakeFocus on a node that is not normally focusable (such as a table),
    ///    * will still set focus on that node, although normally that will not be visually
    ///    * indicated in most style sheets.
    ///    */
    /// ```
    ///

    /// `void takeFocus ();`
    #[inline]
    pub unsafe fn TakeFocus(&self, ) -> nsresult {
        ((*self.vtable).TakeFocus)(self, )
    }


    /// ```text
    /// /**
    ///    * The number of accessible actions associated with this accessible
    ///    */
    /// ```
    ///

    /// `readonly attribute uint8_t actionCount;`
    #[inline]
    pub unsafe fn GetActionCount(&self, aActionCount: *mut uint8_t) -> nsresult {
        ((*self.vtable).GetActionCount)(self, aActionCount)
    }


    /// ```text
    /// /**
    ///    * The name of the accessible action at the given zero-based index
    ///    */
    /// ```
    ///

    /// `AString getActionName (in uint8_t index);`
    #[inline]
    pub unsafe fn GetActionName(&self, index: uint8_t, _retval: &mut ::nsstring::nsAString) -> nsresult {
        ((*self.vtable).GetActionName)(self, index, _retval)
    }


    /// ```text
    /// /**
    ///    * The description of the accessible action at the given zero-based index
    ///    */
    /// ```
    ///

    /// `AString getActionDescription (in uint8_t aIndex);`
    #[inline]
    pub unsafe fn GetActionDescription(&self, aIndex: uint8_t, _retval: &mut ::nsstring::nsAString) -> nsresult {
        ((*self.vtable).GetActionDescription)(self, aIndex, _retval)
    }


    /// ```text
    /// /**
    ///    * Perform the accessible action at the given zero-based index
    ///    * Action number 0 is the default action
    ///    */
    /// ```
    ///

    /// `void doAction (in uint8_t index);`
    #[inline]
    pub unsafe fn DoAction(&self, index: uint8_t) -> nsresult {
        ((*self.vtable).DoAction)(self, index)
    }


    /// ```text
    /// /**
    ///    * Makes an object visible on screen.
    ///    *
    ///    * @param scrollType - defines where the object should be placed on
    ///    *                     the screen (see nsIAccessibleScrollType for
        ///    *                     available constants).
    ///    */
    /// ```
    ///

    /// `void scrollTo (in unsigned long aScrollType);`
    #[inline]
    pub unsafe fn ScrollTo(&self, aScrollType: libc::uint32_t) -> nsresult {
        ((*self.vtable).ScrollTo)(self, aScrollType)
    }


    /// ```text
    /// /**
    ///    * Moves the top left of an object to a specified location.
    ///    *
    ///    * @param coordinateType [in] - specifies whether the coordinates are relative to
    ///    *                         the screen or the parent object (for available
        ///    *                         constants refer to nsIAccessibleCoordinateType)
    ///    * @param x [in] - defines the x coordinate
    ///    * @param y [in] - defines the y coordinate
    ///   */
    /// ```
    ///

    /// `void scrollToPoint (in unsigned long coordinateType, in long x, in long y);`
    #[inline]
    pub unsafe fn ScrollToPoint(&self, coordinateType: libc::uint32_t, x: libc::int32_t, y: libc::int32_t) -> nsresult {
        ((*self.vtable).ScrollToPoint)(self, coordinateType, x, y)
    }


}