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
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
//
// DO NOT EDIT.  THIS FILE IS GENERATED FROM ../../../dist/idl/nsIAccessibleTable.idl
//


/// `interface nsIAccessibleTable : nsISupports`
///


// 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 nsIAccessibleTable {
    vtable: *const nsIAccessibleTableVTable,

    /// 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 nsIAccessibleTable.
unsafe impl XpCom for nsIAccessibleTable {
    const IID: nsIID = nsID(0xcb0bf7b9, 0x117e, 0x40e2,
        [0x9e, 0x46, 0x18, 0x9c, 0x3d, 0x43, 0xce, 0x4a]);
}

// 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 nsIAccessibleTable {
    #[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 nsIAccessibleTable.
// 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 nsIAccessibleTableCoerce {
    /// Cheaply cast a value of this type from a `nsIAccessibleTable`.
    fn coerce_from(v: &nsIAccessibleTable) -> &Self;
}

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

impl nsIAccessibleTable {
    /// Cast this `nsIAccessibleTable` to one of its base interfaces.
    #[inline]
    pub fn coerce<T: nsIAccessibleTableCoerce>(&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 nsIAccessibleTable {
    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> nsIAccessibleTableCoerce for T {
    #[inline]
    fn coerce_from(v: &nsIAccessibleTable) -> &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 nsIAccessibleTable
// 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 nsIAccessibleTableVTable {
    /// 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 caption; */
    pub GetCaption: unsafe extern "system" fn (this: *const nsIAccessibleTable, aCaption: *mut *const nsIAccessible) -> nsresult,

    /* readonly attribute AString summary; */
    pub GetSummary: unsafe extern "system" fn (this: *const nsIAccessibleTable, aSummary: &mut ::nsstring::nsAString) -> nsresult,

    /* readonly attribute long columnCount; */
    pub GetColumnCount: unsafe extern "system" fn (this: *const nsIAccessibleTable, aColumnCount: *mut libc::int32_t) -> nsresult,

    /* readonly attribute long rowCount; */
    pub GetRowCount: unsafe extern "system" fn (this: *const nsIAccessibleTable, aRowCount: *mut libc::int32_t) -> nsresult,

    /* nsIAccessible getCellAt (in long rowIndex, in long columnIndex); */
    pub GetCellAt: unsafe extern "system" fn (this: *const nsIAccessibleTable, rowIndex: libc::int32_t, columnIndex: libc::int32_t, _retval: *mut *const nsIAccessible) -> nsresult,

    /* long getCellIndexAt (in long rowIndex, in long columnIndex); */
    pub GetCellIndexAt: unsafe extern "system" fn (this: *const nsIAccessibleTable, rowIndex: libc::int32_t, columnIndex: libc::int32_t, _retval: *mut libc::int32_t) -> nsresult,

    /* long getColumnIndexAt (in long cellIndex); */
    pub GetColumnIndexAt: unsafe extern "system" fn (this: *const nsIAccessibleTable, cellIndex: libc::int32_t, _retval: *mut libc::int32_t) -> nsresult,

    /* long getRowIndexAt (in long cellIndex); */
    pub GetRowIndexAt: unsafe extern "system" fn (this: *const nsIAccessibleTable, cellIndex: libc::int32_t, _retval: *mut libc::int32_t) -> nsresult,

    /* void getRowAndColumnIndicesAt (in long cellIndex, out long rowIndex, out long columnIndex); */
    pub GetRowAndColumnIndicesAt: unsafe extern "system" fn (this: *const nsIAccessibleTable, cellIndex: libc::int32_t, rowIndex: *mut libc::int32_t, columnIndex: *mut libc::int32_t) -> nsresult,

    /* long getColumnExtentAt (in long row, in long column); */
    pub GetColumnExtentAt: unsafe extern "system" fn (this: *const nsIAccessibleTable, row: libc::int32_t, column: libc::int32_t, _retval: *mut libc::int32_t) -> nsresult,

    /* long getRowExtentAt (in long row, in long column); */
    pub GetRowExtentAt: unsafe extern "system" fn (this: *const nsIAccessibleTable, row: libc::int32_t, column: libc::int32_t, _retval: *mut libc::int32_t) -> nsresult,

    /* AString getColumnDescription (in long columnIndex); */
    pub GetColumnDescription: unsafe extern "system" fn (this: *const nsIAccessibleTable, columnIndex: libc::int32_t, _retval: &mut ::nsstring::nsAString) -> nsresult,

    /* AString getRowDescription (in long rowIndex); */
    pub GetRowDescription: unsafe extern "system" fn (this: *const nsIAccessibleTable, rowIndex: libc::int32_t, _retval: &mut ::nsstring::nsAString) -> nsresult,

    /* boolean isColumnSelected (in long columnIndex); */
    pub IsColumnSelected: unsafe extern "system" fn (this: *const nsIAccessibleTable, columnIndex: libc::int32_t, _retval: *mut bool) -> nsresult,

    /* boolean isRowSelected (in long rowIndex); */
    pub IsRowSelected: unsafe extern "system" fn (this: *const nsIAccessibleTable, rowIndex: libc::int32_t, _retval: *mut bool) -> nsresult,

    /* boolean isCellSelected (in long rowIndex, in long columnIndex); */
    pub IsCellSelected: unsafe extern "system" fn (this: *const nsIAccessibleTable, rowIndex: libc::int32_t, columnIndex: libc::int32_t, _retval: *mut bool) -> nsresult,

    /* readonly attribute unsigned long selectedCellCount; */
    pub GetSelectedCellCount: unsafe extern "system" fn (this: *const nsIAccessibleTable, aSelectedCellCount: *mut libc::uint32_t) -> nsresult,

    /* readonly attribute unsigned long selectedColumnCount; */
    pub GetSelectedColumnCount: unsafe extern "system" fn (this: *const nsIAccessibleTable, aSelectedColumnCount: *mut libc::uint32_t) -> nsresult,

    /* readonly attribute unsigned long selectedRowCount; */
    pub GetSelectedRowCount: unsafe extern "system" fn (this: *const nsIAccessibleTable, aSelectedRowCount: *mut libc::uint32_t) -> nsresult,

    /* readonly attribute nsIArray selectedCells; */
    pub GetSelectedCells: unsafe extern "system" fn (this: *const nsIAccessibleTable, aSelectedCells: *mut *const nsIArray) -> nsresult,

    /* void getSelectedCellIndices (out unsigned long cellsArraySize, [array, size_is (cellsArraySize), retval] out long cellsArray); */
    pub GetSelectedCellIndices: unsafe extern "system" fn (this: *const nsIAccessibleTable, cellsArraySize: *mut libc::uint32_t, cellsArray: *mut *mut libc::int32_t) -> nsresult,

    /* void getSelectedColumnIndices (out unsigned long columnsArraySize, [array, size_is (columnsArraySize), retval] out long columnsArray); */
    pub GetSelectedColumnIndices: unsafe extern "system" fn (this: *const nsIAccessibleTable, columnsArraySize: *mut libc::uint32_t, columnsArray: *mut *mut libc::int32_t) -> nsresult,

    /* void getSelectedRowIndices (out unsigned long rowsArraySize, [array, size_is (rowsArraySize), retval] out long rowsArray); */
    pub GetSelectedRowIndices: unsafe extern "system" fn (this: *const nsIAccessibleTable, rowsArraySize: *mut libc::uint32_t, rowsArray: *mut *mut libc::int32_t) -> nsresult,

    /* void selectRow (in long rowIndex); */
    pub SelectRow: unsafe extern "system" fn (this: *const nsIAccessibleTable, rowIndex: libc::int32_t) -> nsresult,

    /* void selectColumn (in long columnIndex); */
    pub SelectColumn: unsafe extern "system" fn (this: *const nsIAccessibleTable, columnIndex: libc::int32_t) -> nsresult,

    /* void unselectRow (in long rowIndex); */
    pub UnselectRow: unsafe extern "system" fn (this: *const nsIAccessibleTable, rowIndex: libc::int32_t) -> nsresult,

    /* void unselectColumn (in long columnIndex); */
    pub UnselectColumn: unsafe extern "system" fn (this: *const nsIAccessibleTable, columnIndex: libc::int32_t) -> nsresult,

    /* boolean isProbablyForLayout (); */
    pub IsProbablyForLayout: unsafe extern "system" fn (this: *const nsIAccessibleTable, _retval: *mut bool) -> 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 nsIAccessibleTable {

    /// ```text
    /// /**
    ///    * Return the caption accessible for the table. For example, html:caption
    ///    * element of html:table element.
    ///    */
    /// ```
    ///

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


    /// ```text
    /// /**
    ///    * Return summary description for the table. For example, @summary attribute
    ///    * on html:table element.
    ///    */
    /// ```
    ///

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


    /// ```text
    /// /**
    ///    * Return columns count in the table.
    ///    */
    /// ```
    ///

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


    /// ```text
    /// /**
    ///    * Return rows count in the table.
    ///    */
    /// ```
    ///

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


    /// ```text
    /// /**
    ///    * Return the accessible object at the specified row and column in the table.
    ///    * If both row and column index are valid then the corresponding accessible
    ///    * object is returned that represents the requested cell regardless of whether
    ///    * the cell is currently visible (on the screen).
    ///    *
    ///    * @param  rowIndex     [in] the row index to retrieve the cell at
    ///    * @param  columnIndex  [in] the column index to retrieve the cell at
    ///    */
    /// ```
    ///

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


    /// ```text
    /// /**
    ///    * Translate the given row and column indices into the corresponding cell
    ///    * index.
    ///    *
    ///    * @param  rowIndex    [in] the row index to return cell index at
    ///    * @param  columnIndex [in] the column index to return cell index at
    ///    */
    /// ```
    ///

    /// `long getCellIndexAt (in long rowIndex, in long columnIndex);`
    #[inline]
    pub unsafe fn GetCellIndexAt(&self, rowIndex: libc::int32_t, columnIndex: libc::int32_t, _retval: *mut libc::int32_t) -> nsresult {
        ((*self.vtable).GetCellIndexAt)(self, rowIndex, columnIndex, _retval)
    }


    /// ```text
    /// /**
    ///    * Translate the given cell index into the corresponding column index.
    ///    *
    ///    * @param  cellIndex  [in] index of the table cell to return column index for
    ///    */
    /// ```
    ///

    /// `long getColumnIndexAt (in long cellIndex);`
    #[inline]
    pub unsafe fn GetColumnIndexAt(&self, cellIndex: libc::int32_t, _retval: *mut libc::int32_t) -> nsresult {
        ((*self.vtable).GetColumnIndexAt)(self, cellIndex, _retval)
    }


    /// ```text
    /// /**
    ///    * Translate the given cell index into the corresponding row index.
    ///    *
    ///    * @param cellIndex  [in] index of the table cell to return row index for
    ///    */
    /// ```
    ///

    /// `long getRowIndexAt (in long cellIndex);`
    #[inline]
    pub unsafe fn GetRowIndexAt(&self, cellIndex: libc::int32_t, _retval: *mut libc::int32_t) -> nsresult {
        ((*self.vtable).GetRowIndexAt)(self, cellIndex, _retval)
    }


    /// ```text
    /// /**
    ///    * Translate the given cell index into the corresponding row and column
    ///    * indices.
    ///    *
    ///    * @param cellIndex    [in] cell index to return row and column indices for
    ///    * @param rowIndex     [out] row index at the given cell index
    ///    * @param columnIndex  [out] column index at the given cell index
    ///    */
    /// ```
    ///

    /// `void getRowAndColumnIndicesAt (in long cellIndex, out long rowIndex, out long columnIndex);`
    #[inline]
    pub unsafe fn GetRowAndColumnIndicesAt(&self, cellIndex: libc::int32_t, rowIndex: *mut libc::int32_t, columnIndex: *mut libc::int32_t) -> nsresult {
        ((*self.vtable).GetRowAndColumnIndicesAt)(self, cellIndex, rowIndex, columnIndex)
    }


    /// ```text
    /// /**
    ///    * Return the number of columns occupied by the accessible cell at
    ///    * the specified row and column in the table. The result differs from 1 if
    ///    * the specified cell spans multiple columns.
    ///    *
    ///    * @param  row     [in] row index of the cell to return the column extent for
    ///    * @param  column  [in] column index of the cell to return the column extent
    ///    *                  for
    ///    */
    /// ```
    ///

    /// `long getColumnExtentAt (in long row, in long column);`
    #[inline]
    pub unsafe fn GetColumnExtentAt(&self, row: libc::int32_t, column: libc::int32_t, _retval: *mut libc::int32_t) -> nsresult {
        ((*self.vtable).GetColumnExtentAt)(self, row, column, _retval)
    }


    /// ```text
    /// /**
    ///    * Return the number of rows occupied by the accessible cell at the specified
    ///    * row and column in the table. The result differs from 1 if the specified
    ///    * cell spans multiple rows.
    ///    *
    ///    * @param  row     [in] row index of the cell to return the column extent for
    ///    * @param  column  [in] column index of the cell to return the column extent
    ///    *                  for
    ///    */
    /// ```
    ///

    /// `long getRowExtentAt (in long row, in long column);`
    #[inline]
    pub unsafe fn GetRowExtentAt(&self, row: libc::int32_t, column: libc::int32_t, _retval: *mut libc::int32_t) -> nsresult {
        ((*self.vtable).GetRowExtentAt)(self, row, column, _retval)
    }


    /// ```text
    /// /**
    ///    * Return the description text of the specified column in the table.
    ///    *
    ///    * @param  columnIndex  [in] the column index to retrieve description for
    ///    */
    /// ```
    ///

    /// `AString getColumnDescription (in long columnIndex);`
    #[inline]
    pub unsafe fn GetColumnDescription(&self, columnIndex: libc::int32_t, _retval: &mut ::nsstring::nsAString) -> nsresult {
        ((*self.vtable).GetColumnDescription)(self, columnIndex, _retval)
    }


    /// ```text
    /// /**
    ///    * Return the description text of the specified row in the table.
    ///    *
    ///    * @param  rowIndex  [in] the row index to retrieve description for
    ///    */
    /// ```
    ///

    /// `AString getRowDescription (in long rowIndex);`
    #[inline]
    pub unsafe fn GetRowDescription(&self, rowIndex: libc::int32_t, _retval: &mut ::nsstring::nsAString) -> nsresult {
        ((*self.vtable).GetRowDescription)(self, rowIndex, _retval)
    }


    /// ```text
    /// /**
    ///    * Return a boolean value indicating whether the specified column is
    ///    * selected, i.e. all cells within the column are selected.
    ///    *
    ///    * @param  columnIndex  [in] the column index to determine if it's selected
    ///    */
    /// ```
    ///

    /// `boolean isColumnSelected (in long columnIndex);`
    #[inline]
    pub unsafe fn IsColumnSelected(&self, columnIndex: libc::int32_t, _retval: *mut bool) -> nsresult {
        ((*self.vtable).IsColumnSelected)(self, columnIndex, _retval)
    }


    /// ```text
    /// /**
    ///    * Return a boolean value indicating whether the specified row is selected,
    ///    * i.e. all cells within the row are selected.
    ///    *
    ///    * @param  rowIndex  [in] the row index to determine whether it's selected
    ///    */
    /// ```
    ///

    /// `boolean isRowSelected (in long rowIndex);`
    #[inline]
    pub unsafe fn IsRowSelected(&self, rowIndex: libc::int32_t, _retval: *mut bool) -> nsresult {
        ((*self.vtable).IsRowSelected)(self, rowIndex, _retval)
    }


    /// ```text
    /// /**
    ///    * Return a boolean value indicating whether the specified cell is selected.
    ///    *
    ///    * @param  rowIndex     [in] the row index of the cell
    ///    * @param  columnIndex  [in] the column index of the cell
    ///    */
    /// ```
    ///

    /// `boolean isCellSelected (in long rowIndex, in long columnIndex);`
    #[inline]
    pub unsafe fn IsCellSelected(&self, rowIndex: libc::int32_t, columnIndex: libc::int32_t, _retval: *mut bool) -> nsresult {
        ((*self.vtable).IsCellSelected)(self, rowIndex, columnIndex, _retval)
    }


    /// ```text
    /// /**
    ///    * Return the total number of selected cells.
    ///    */
    /// ```
    ///

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


    /// ```text
    /// /**
    ///    * Return the total number of selected columns.
    ///    */
    /// ```
    ///

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


    /// ```text
    /// /**
    ///    * Return the total number of selected rows.
    ///    */
    /// ```
    ///

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


    /// ```text
    /// /**
    ///    * Return an array of selected cells.
    ///    */
    /// ```
    ///

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


    /// ```text
    /// /**
    ///    * Return an array of cell indices currently selected.
    ///    *
    ///    * @param  cellsArraySize  [in] length of array
    ///    * @param  cellsArray      [in] array of indexes of selected cells
    ///    */
    /// ```
    ///

    /// `void getSelectedCellIndices (out unsigned long cellsArraySize, [array, size_is (cellsArraySize), retval] out long cellsArray);`
    #[inline]
    pub unsafe fn GetSelectedCellIndices(&self, cellsArraySize: *mut libc::uint32_t, cellsArray: *mut *mut libc::int32_t) -> nsresult {
        ((*self.vtable).GetSelectedCellIndices)(self, cellsArraySize, cellsArray)
    }


    /// ```text
    /// /**
    ///    * Return an array of column indices currently selected.
    ///    *
    ///    * @param  columnsArraySize  [in] length of array
    ///    * @param  columnsArray      [in] array of indices of selected columns
    ///    */
    /// ```
    ///

    /// `void getSelectedColumnIndices (out unsigned long columnsArraySize, [array, size_is (columnsArraySize), retval] out long columnsArray);`
    #[inline]
    pub unsafe fn GetSelectedColumnIndices(&self, columnsArraySize: *mut libc::uint32_t, columnsArray: *mut *mut libc::int32_t) -> nsresult {
        ((*self.vtable).GetSelectedColumnIndices)(self, columnsArraySize, columnsArray)
    }


    /// ```text
    /// /**
    ///    * Return an array of row indices currently selected.
    ///    *
    ///    * @param  rowsArraySize  [in] Length of array
    ///    * @param  rowsArray      [in] array of indices of selected rows
    ///    */
    /// ```
    ///

    /// `void getSelectedRowIndices (out unsigned long rowsArraySize, [array, size_is (rowsArraySize), retval] out long rowsArray);`
    #[inline]
    pub unsafe fn GetSelectedRowIndices(&self, rowsArraySize: *mut libc::uint32_t, rowsArray: *mut *mut libc::int32_t) -> nsresult {
        ((*self.vtable).GetSelectedRowIndices)(self, rowsArraySize, rowsArray)
    }


    /// ```text
    /// /**
    ///    * Select a row and unselects all previously selected rows.
    ///    *
    ///    * @param  rowIndex  [in] the row index to select
    ///    */
    /// ```
    ///

    /// `void selectRow (in long rowIndex);`
    #[inline]
    pub unsafe fn SelectRow(&self, rowIndex: libc::int32_t) -> nsresult {
        ((*self.vtable).SelectRow)(self, rowIndex)
    }


    /// ```text
    /// /**
    ///    * Select a column and unselects all previously selected columns.
    ///    *
    ///    * @param  columnIndex  [in] the column index to select
    ///    */
    /// ```
    ///

    /// `void selectColumn (in long columnIndex);`
    #[inline]
    pub unsafe fn SelectColumn(&self, columnIndex: libc::int32_t) -> nsresult {
        ((*self.vtable).SelectColumn)(self, columnIndex)
    }


    /// ```text
    /// /**
    ///    * Unselect the given row, leaving other selected rows selected (if any).
    ///    *
    ///    * @param  rowIndex  [in] the row index to select
    ///   */
    /// ```
    ///

    /// `void unselectRow (in long rowIndex);`
    #[inline]
    pub unsafe fn UnselectRow(&self, rowIndex: libc::int32_t) -> nsresult {
        ((*self.vtable).UnselectRow)(self, rowIndex)
    }


    /// ```text
    /// /**
    ///    * Unselect the given column, leaving other selected columns selected (if any).
    ///    *
    ///    * @param  columnIndex  [in] the column index to select
    ///    */
    /// ```
    ///

    /// `void unselectColumn (in long columnIndex);`
    #[inline]
    pub unsafe fn UnselectColumn(&self, columnIndex: libc::int32_t) -> nsresult {
        ((*self.vtable).UnselectColumn)(self, columnIndex)
    }


    /// ```text
    /// /**
    ///    * Use heuristics to determine if table is most likely used for layout.
    ///    */
    /// ```
    ///

    /// `boolean isProbablyForLayout ();`
    #[inline]
    pub unsafe fn IsProbablyForLayout(&self, _retval: *mut bool) -> nsresult {
        ((*self.vtable).IsProbablyForLayout)(self, _retval)
    }


}


/// `interface nsIAccessibleTableCell : nsISupports`
///


// 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 nsIAccessibleTableCell {
    vtable: *const nsIAccessibleTableCellVTable,

    /// 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 nsIAccessibleTableCell.
unsafe impl XpCom for nsIAccessibleTableCell {
    const IID: nsIID = nsID(0x654e296d, 0xfae6, 0x452b,
        [0x98, 0x7d, 0x74, 0x6b, 0x20, 0xb9, 0x51, 0x4b]);
}

// 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 nsIAccessibleTableCell {
    #[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 nsIAccessibleTableCell.
// 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 nsIAccessibleTableCellCoerce {
    /// Cheaply cast a value of this type from a `nsIAccessibleTableCell`.
    fn coerce_from(v: &nsIAccessibleTableCell) -> &Self;
}

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

impl nsIAccessibleTableCell {
    /// Cast this `nsIAccessibleTableCell` to one of its base interfaces.
    #[inline]
    pub fn coerce<T: nsIAccessibleTableCellCoerce>(&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 nsIAccessibleTableCell {
    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> nsIAccessibleTableCellCoerce for T {
    #[inline]
    fn coerce_from(v: &nsIAccessibleTableCell) -> &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 nsIAccessibleTableCell
// 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 nsIAccessibleTableCellVTable {
    /// We need to include the members from the base interface's vtable at the start
    /// of the VTable definition.
    pub __base: nsISupportsVTable,

    /* readonly attribute nsIAccessibleTable table; */
    pub GetTable: unsafe extern "system" fn (this: *const nsIAccessibleTableCell, aTable: *mut *const nsIAccessibleTable) -> nsresult,

    /* readonly attribute long columnIndex; */
    pub GetColumnIndex: unsafe extern "system" fn (this: *const nsIAccessibleTableCell, aColumnIndex: *mut libc::int32_t) -> nsresult,

    /* readonly attribute long rowIndex; */
    pub GetRowIndex: unsafe extern "system" fn (this: *const nsIAccessibleTableCell, aRowIndex: *mut libc::int32_t) -> nsresult,

    /* readonly attribute long columnExtent; */
    pub GetColumnExtent: unsafe extern "system" fn (this: *const nsIAccessibleTableCell, aColumnExtent: *mut libc::int32_t) -> nsresult,

    /* readonly attribute long rowExtent; */
    pub GetRowExtent: unsafe extern "system" fn (this: *const nsIAccessibleTableCell, aRowExtent: *mut libc::int32_t) -> nsresult,

    /* readonly attribute nsIArray columnHeaderCells; */
    pub GetColumnHeaderCells: unsafe extern "system" fn (this: *const nsIAccessibleTableCell, aColumnHeaderCells: *mut *const nsIArray) -> nsresult,

    /* readonly attribute nsIArray rowHeaderCells; */
    pub GetRowHeaderCells: unsafe extern "system" fn (this: *const nsIAccessibleTableCell, aRowHeaderCells: *mut *const nsIArray) -> nsresult,

    /* boolean isSelected (); */
    pub IsSelected: unsafe extern "system" fn (this: *const nsIAccessibleTableCell, _retval: *mut bool) -> 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 nsIAccessibleTableCell {

    /// ```text
    /// /**
    ///    * Return host table accessible.
    ///    */
    /// ```
    ///

    /// `readonly attribute nsIAccessibleTable table;`
    #[inline]
    pub unsafe fn GetTable(&self, aTable: *mut *const nsIAccessibleTable) -> nsresult {
        ((*self.vtable).GetTable)(self, aTable)
    }


    /// ```text
    /// /**
    ///    * Return column index of this cell.
    ///    */
    /// ```
    ///

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


    /// ```text
    /// /**
    ///    * Return row index of this cell.
    ///    */
    /// ```
    ///

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


    /// ```text
    /// /**
    ///    * Return the number of columns occupied by this cell. The result differs
    ///    * from 1 if the specified cell spans multiple columns.
    ///    */
    /// ```
    ///

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


    /// ```text
    /// /**
    ///    * Return the number of rows occupied by this accessible cell. The result
    ///    * differs from 1 if the specified cell spans multiple rows.
    ///    */
    /// ```
    ///

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


    /// ```text
    /// /**
    ///    * Return an array of column header cells for this cell.
    ///    */
    /// ```
    ///

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


    /// ```text
    /// /**
    ///    * Return an array of row header cells for this cell.
    ///    */
    /// ```
    ///

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


    /// ```text
    /// /**
    ///    * Return a boolean value indicating whether this cell is selected.
    ///    */
    /// ```
    ///

    /// `boolean isSelected ();`
    #[inline]
    pub unsafe fn IsSelected(&self, _retval: *mut bool) -> nsresult {
        ((*self.vtable).IsSelected)(self, _retval)
    }


}