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
//
// DO NOT EDIT.  THIS FILE IS GENERATED FROM ../../../dist/idl/nsITableEditor.idl
//


/// `interface nsITableEditor : 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 nsITableEditor {
    vtable: *const nsITableEditorVTable,

    /// 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 nsITableEditor.
unsafe impl XpCom for nsITableEditor {
    const IID: nsIID = nsID(0x4805e684, 0x49b9, 0x11d3,
        [0x9c, 0xe4, 0xed, 0x60, 0xbd, 0x6c, 0xb5, 0xbc]);
}

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

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

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

    /* void insertTableCell (in long aNumber, in boolean aAfter); */
    pub InsertTableCell: unsafe extern "system" fn (this: *const nsITableEditor, aNumber: libc::int32_t, aAfter: bool) -> nsresult,

    /* void insertTableColumn (in long aNumber, in boolean aAfter); */
    pub InsertTableColumn: unsafe extern "system" fn (this: *const nsITableEditor, aNumber: libc::int32_t, aAfter: bool) -> nsresult,

    /* void insertTableRow (in long aNumber, in boolean aAfter); */
    pub InsertTableRow: unsafe extern "system" fn (this: *const nsITableEditor, aNumber: libc::int32_t, aAfter: bool) -> nsresult,

    /* void deleteTable (); */
    pub DeleteTable: unsafe extern "system" fn (this: *const nsITableEditor) -> nsresult,

    /* void deleteTableCellContents (); */
    pub DeleteTableCellContents: unsafe extern "system" fn (this: *const nsITableEditor) -> nsresult,

    /* void deleteTableCell (in long aNumber); */
    pub DeleteTableCell: unsafe extern "system" fn (this: *const nsITableEditor, aNumber: libc::int32_t) -> nsresult,

    /* void deleteTableColumn (in long aNumber); */
    pub DeleteTableColumn: unsafe extern "system" fn (this: *const nsITableEditor, aNumber: libc::int32_t) -> nsresult,

    /* void deleteTableRow (in long aNumber); */
    pub DeleteTableRow: unsafe extern "system" fn (this: *const nsITableEditor, aNumber: libc::int32_t) -> nsresult,

    /* void selectTableCell (); */
    pub SelectTableCell: unsafe extern "system" fn (this: *const nsITableEditor) -> nsresult,

    /* void selectBlockOfCells (in nsIDOMElement aStartCell, in nsIDOMElement aEndCell); */
    pub SelectBlockOfCells: unsafe extern "system" fn (this: *const nsITableEditor, aStartCell: *const nsIDOMElement, aEndCell: *const nsIDOMElement) -> nsresult,

    /* void selectTableRow (); */
    pub SelectTableRow: unsafe extern "system" fn (this: *const nsITableEditor) -> nsresult,

    /* void selectTableColumn (); */
    pub SelectTableColumn: unsafe extern "system" fn (this: *const nsITableEditor) -> nsresult,

    /* void selectTable (); */
    pub SelectTable: unsafe extern "system" fn (this: *const nsITableEditor) -> nsresult,

    /* void selectAllTableCells (); */
    pub SelectAllTableCells: unsafe extern "system" fn (this: *const nsITableEditor) -> nsresult,

    /* nsIDOMElement switchTableCellHeaderType (in nsIDOMElement aSourceCell); */
    pub SwitchTableCellHeaderType: unsafe extern "system" fn (this: *const nsITableEditor, aSourceCell: *const nsIDOMElement, _retval: *mut *const nsIDOMElement) -> nsresult,

    /* void joinTableCells (in boolean aMergeNonContiguousContents); */
    pub JoinTableCells: unsafe extern "system" fn (this: *const nsITableEditor, aMergeNonContiguousContents: bool) -> nsresult,

    /* void splitTableCell (); */
    pub SplitTableCell: unsafe extern "system" fn (this: *const nsITableEditor) -> nsresult,

    /* void normalizeTable (in nsIDOMElement aTable); */
    pub NormalizeTable: unsafe extern "system" fn (this: *const nsITableEditor, aTable: *const nsIDOMElement) -> nsresult,

    /* void getCellIndexes (in nsIDOMElement aCell, out long aRowIndex, out long aColIndex); */
    pub GetCellIndexes: unsafe extern "system" fn (this: *const nsITableEditor, aCell: *const nsIDOMElement, aRowIndex: *mut libc::int32_t, aColIndex: *mut libc::int32_t) -> nsresult,

    /* void getTableSize (in nsIDOMElement aTable, out long aRowCount, out long aColCount); */
    pub GetTableSize: unsafe extern "system" fn (this: *const nsITableEditor, aTable: *const nsIDOMElement, aRowCount: *mut libc::int32_t, aColCount: *mut libc::int32_t) -> nsresult,

    /* nsIDOMElement getCellAt (in nsIDOMElement aTable, in long aRowIndex, in long aColIndex); */
    pub GetCellAt: unsafe extern "system" fn (this: *const nsITableEditor, aTable: *const nsIDOMElement, aRowIndex: libc::int32_t, aColIndex: libc::int32_t, _retval: *mut *const nsIDOMElement) -> nsresult,

    /* void getCellDataAt (in nsIDOMElement aTable, in long aRowIndex, in long aColIndex, out nsIDOMElement aCell, out long aStartRowIndex, out long aStartColIndex, out long aRowSpan, out long aColSpan, out long aActualRowSpan, out long aActualColSpan, out boolean aIsSelected); */
    pub GetCellDataAt: unsafe extern "system" fn (this: *const nsITableEditor, aTable: *const nsIDOMElement, aRowIndex: libc::int32_t, aColIndex: libc::int32_t, aCell: *mut *const nsIDOMElement, aStartRowIndex: *mut libc::int32_t, aStartColIndex: *mut libc::int32_t, aRowSpan: *mut libc::int32_t, aColSpan: *mut libc::int32_t, aActualRowSpan: *mut libc::int32_t, aActualColSpan: *mut libc::int32_t, aIsSelected: *mut bool) -> nsresult,

    /* nsIDOMNode getFirstRow (in nsIDOMElement aTableElement); */
    pub GetFirstRow: unsafe extern "system" fn (this: *const nsITableEditor, aTableElement: *const nsIDOMElement, _retval: *mut *const nsIDOMNode) -> nsresult,

    /* nsIDOMNode getNextRow (in nsIDOMNode aTableElement); */
    pub GetNextRow: unsafe extern "system" fn (this: *const nsITableEditor, aTableElement: *const nsIDOMNode, _retval: *mut *const nsIDOMNode) -> nsresult,

    /* nsIDOMElement getSelectedOrParentTableElement (out AString aTagName, out long aCount); */
    pub GetSelectedOrParentTableElement: unsafe extern "system" fn (this: *const nsITableEditor, aTagName: &mut ::nsstring::nsAString, aCount: *mut libc::int32_t, _retval: *mut *const nsIDOMElement) -> nsresult,

    /* uint32_t getSelectedCellsType (in nsIDOMElement aElement); */
    pub GetSelectedCellsType: unsafe extern "system" fn (this: *const nsITableEditor, aElement: *const nsIDOMElement, _retval: *mut uint32_t) -> nsresult,

    /* nsIDOMElement getFirstSelectedCell (out nsIDOMRange aRange); */
    pub GetFirstSelectedCell: unsafe extern "system" fn (this: *const nsITableEditor, aRange: *mut *const nsIDOMRange, _retval: *mut *const nsIDOMElement) -> nsresult,

    /* nsIDOMElement getFirstSelectedCellInTable (out long aRowIndex, out long aColIndex); */
    pub GetFirstSelectedCellInTable: unsafe extern "system" fn (this: *const nsITableEditor, aRowIndex: *mut libc::int32_t, aColIndex: *mut libc::int32_t, _retval: *mut *const nsIDOMElement) -> nsresult,

    /* nsIDOMElement getNextSelectedCell (out nsIDOMRange aRange); */
    pub GetNextSelectedCell: unsafe extern "system" fn (this: *const nsITableEditor, aRange: *mut *const nsIDOMRange, _retval: *mut *const nsIDOMElement) -> 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 nsITableEditor {

    pub const eNoSearch: i64 = 0;


    pub const ePreviousColumn: i64 = 1;


    pub const ePreviousRow: i64 = 2;

    /// ```text
    /// /** Insert table methods
    ///     * Insert relative to the selected cell or the
    ///     *  cell enclosing the selection anchor
    ///     * The selection is collapsed and is left in the new cell
    ///     *  at the same row,col location as the original anchor cell
    ///     *
    ///     * @param aNumber    Number of items to insert
    ///     * @param aAfter     If TRUE, insert after the current cell,
    ///     *                     else insert before current cell
    ///     */
    /// ```
    ///

    /// `void insertTableCell (in long aNumber, in boolean aAfter);`
    #[inline]
    pub unsafe fn InsertTableCell(&self, aNumber: libc::int32_t, aAfter: bool) -> nsresult {
        ((*self.vtable).InsertTableCell)(self, aNumber, aAfter)
    }



    /// `void insertTableColumn (in long aNumber, in boolean aAfter);`
    #[inline]
    pub unsafe fn InsertTableColumn(&self, aNumber: libc::int32_t, aAfter: bool) -> nsresult {
        ((*self.vtable).InsertTableColumn)(self, aNumber, aAfter)
    }



    /// `void insertTableRow (in long aNumber, in boolean aAfter);`
    #[inline]
    pub unsafe fn InsertTableRow(&self, aNumber: libc::int32_t, aAfter: bool) -> nsresult {
        ((*self.vtable).InsertTableRow)(self, aNumber, aAfter)
    }


    /// ```text
    /// /** Delete table methods
    ///     * Delete starting at the selected cell or the
    ///     *  cell (or table) enclosing the selection anchor
    ///     * The selection is collapsed and is left in the
    ///     *  cell at the same row,col location as
    ///     *  the previous selection anchor, if possible,
    ///     *  else in the closest neigboring cell
    ///     *
    ///     * @param aNumber    Number of items to insert/delete
    ///     */
    /// ```
    ///

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


    /// ```text
    /// /** Delete just the cell contents
    ///     * This is what should happen when Delete key is used
    ///     *   for selected cells, to minimize upsetting the table layout
    ///     */
    /// ```
    ///

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


    /// ```text
    /// /** Delete cell elements as well as contents
    ///     * @param aNumber   Number of contiguous cells, rows, or columns
    ///     *
    ///     * When there are more than 1 selected cells, aNumber is ignored.
    ///     * For Delete Rows or Columns, the complete columns or rows are
    ///     *  determined by the selected cells. E.g., to delete 2 complete rows,
    ///     *  user simply selects a cell in each, and they don't
    ///     *  have to be contiguous.
    ///     */
    /// ```
    ///

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



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



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


    /// ```text
    /// /** Table Selection methods
    ///     * Selecting a row or column actually
    ///     * selects all cells (not TR in the case of rows)
    ///     */
    /// ```
    ///

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


    /// ```text
    /// /** Select a rectangular block of cells:
    ///     *  all cells falling within the row/column index of aStartCell
    ///     *  to through the row/column index of the aEndCell
    ///     *  aStartCell can be any location relative to aEndCell,
    ///     *   as long as they are in the same table
    ///     *  @param aStartCell  starting cell in block
    ///     *  @param aEndCell    ending cell in block
    ///     */
    /// ```
    ///

    /// `void selectBlockOfCells (in nsIDOMElement aStartCell, in nsIDOMElement aEndCell);`
    #[inline]
    pub unsafe fn SelectBlockOfCells(&self, aStartCell: *const nsIDOMElement, aEndCell: *const nsIDOMElement) -> nsresult {
        ((*self.vtable).SelectBlockOfCells)(self, aStartCell, aEndCell)
    }



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



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



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



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


    /// ```text
    /// /** Create a new TD or TH element, the opposite type of the supplied aSourceCell
    ///     *   1. Copy all attributes from aSourceCell to the new cell
    ///     *   2. Move all contents of aSourceCell to the new cell
    ///     *   3. Replace aSourceCell in the table with the new cell
    ///     *
    ///     *  @param aSourceCell   The cell to be replaced
    ///     *  @return              The new cell that replaces aSourceCell
    ///     */
    /// ```
    ///

    /// `nsIDOMElement switchTableCellHeaderType (in nsIDOMElement aSourceCell);`
    #[inline]
    pub unsafe fn SwitchTableCellHeaderType(&self, aSourceCell: *const nsIDOMElement, _retval: *mut *const nsIDOMElement) -> nsresult {
        ((*self.vtable).SwitchTableCellHeaderType)(self, aSourceCell, _retval)
    }


    /// ```text
    /// /** Merges contents of all selected cells
    ///     * for selected cells that are adjacent,
    ///     * this will result in a larger cell with appropriate
    ///     * rowspan and colspan, and original cells are deleted
    ///     * The resulting cell is in the location of the
    ///     *   cell at the upper-left corner of the adjacent
    ///     *   block of selected cells
    ///     *
    ///     * @param aMergeNonContiguousContents:
    ///     *       If true:
    ///     *         Non-contiguous cells are not deleted,
    ///     *         but their contents are still moved
    ///     *         to the upper-left cell
    ///     *       If false: contiguous cells are ignored
    ///     *
    ///     * If there are no selected cells,
    ///     *   and selection or caret is in a cell,
    ///     *   that cell and the one to the right
    ///     *   are merged
    ///     */
    /// ```
    ///

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


    /// ```text
    /// /** Split a cell that has rowspan and/or colspan > 0
    ///     *   into cells such that all new cells have
    ///     *   rowspan = 1 and colspan = 1
    ///     *  All of the contents are not touched --
    ///     *   they will appear to be in the upper-left cell
    ///     */
    /// ```
    ///

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


    /// ```text
    /// /** Scan through all rows and add cells as needed so
    ///     *   all locations in the cellmap are occupied.
    ///     *   Used after inserting single cells or pasting
    ///     *   a collection of cells that extend past the
    ///     *   previous size of the table
    ///     * If aTable is null, it uses table enclosing the selection anchor
    ///     * This doesn't doesn't change the selection,
    ///     *   thus it can be used to fixup all tables
    ///     *   in a page independent of the selection
    ///     */
    /// ```
    ///

    /// `void normalizeTable (in nsIDOMElement aTable);`
    #[inline]
    pub unsafe fn NormalizeTable(&self, aTable: *const nsIDOMElement) -> nsresult {
        ((*self.vtable).NormalizeTable)(self, aTable)
    }


    /// ```text
    /// /** Get the row an column index from the layout's cellmap
    ///     * If aCell is null, it will try to find enclosing table of selection anchor
    ///     *
    ///     */
    /// ```
    ///

    /// `void getCellIndexes (in nsIDOMElement aCell, out long aRowIndex, out long aColIndex);`
    #[inline]
    pub unsafe fn GetCellIndexes(&self, aCell: *const nsIDOMElement, aRowIndex: *mut libc::int32_t, aColIndex: *mut libc::int32_t) -> nsresult {
        ((*self.vtable).GetCellIndexes)(self, aCell, aRowIndex, aColIndex)
    }


    /// ```text
    /// /** Get the number of rows and columns in a table from the layout's cellmap
    ///     * If aTable is null, it will try to find enclosing table of selection ancho
    ///     * Note that all rows in table will not have this many because of
    ///     * ROWSPAN effects or if table is not "rectangular" (has short rows)
    ///     */
    /// ```
    ///

    /// `void getTableSize (in nsIDOMElement aTable, out long aRowCount, out long aColCount);`
    #[inline]
    pub unsafe fn GetTableSize(&self, aTable: *const nsIDOMElement, aRowCount: *mut libc::int32_t, aColCount: *mut libc::int32_t) -> nsresult {
        ((*self.vtable).GetTableSize)(self, aTable, aRowCount, aColCount)
    }


    /// ```text
    /// /** Get a cell element at cellmap grid coordinates
    ///     * A cell that spans across multiple cellmap locations will
    ///     *   be returned multiple times, once for each location it occupies
    ///     *
    ///     * @param aTable                   A table in the document
    ///     * @param aRowIndex, aColIndex     The 0-based cellmap indexes
    ///     *
    ///     * (in C++ returns: NS_EDITOR_ELEMENT_NOT_FOUND if an element is not found
        ///     *  passes NS_SUCCEEDED macro)
    ///     *
    ///     *   You can scan for all cells in a row or column
    ///     *   by iterating through the appropriate indexes
    ///     *   until the returned aCell is null
    ///     */
    /// ```
    ///

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


    /// ```text
    /// /** Get a cell at cellmap grid coordinates and associated data
    ///     * A cell that spans across multiple cellmap locations will
    ///     *   be returned multiple times, once for each location it occupies
    ///     * Examine the returned aStartRowIndex and aStartColIndex to see
    ///     *   if it is in the same layout column or layout row:
    ///     *   A "layout row" is all cells sharing the same top edge
    ///     *   A "layout column" is all cells sharing the same left edge
    ///     *   This is important to determine what to do when inserting or deleting a column or row
    ///     *
    ///     *  @param aTable                   A table in the document
    ///     *  @param aRowIndex, aColIndex     The 0-based cellmap indexes
    ///     * returns values:
    ///     *  @param aCell                    The cell at this cellmap location
    ///     *  @param aStartRowIndex           The row index where cell starts
    ///     *  @param aStartColIndex           The col index where cell starts
    ///     *  @param aRowSpan                 May be 0 (to span down entire table) or number of cells spanned
    ///     *  @param aColSpan                 May be 0 (to span across entire table) or number of cells spanned
    ///     *  @param aActualRowSpan           The actual number of cellmap locations (rows) spanned by the cell
    ///     *  @param aActualColSpan           The actual number of cellmap locations (columns) spanned by the cell
    ///     *  @param aIsSelected
    ///     *  @param
    ///     *
    ///     * (in C++ returns: NS_EDITOR_ELEMENT_NOT_FOUND if an element is not found
        ///     *  passes NS_SUCCEEDED macro)
    ///     */
    /// ```
    ///

    /// `void getCellDataAt (in nsIDOMElement aTable, in long aRowIndex, in long aColIndex, out nsIDOMElement aCell, out long aStartRowIndex, out long aStartColIndex, out long aRowSpan, out long aColSpan, out long aActualRowSpan, out long aActualColSpan, out boolean aIsSelected);`
    #[inline]
    pub unsafe fn GetCellDataAt(&self, aTable: *const nsIDOMElement, aRowIndex: libc::int32_t, aColIndex: libc::int32_t, aCell: *mut *const nsIDOMElement, aStartRowIndex: *mut libc::int32_t, aStartColIndex: *mut libc::int32_t, aRowSpan: *mut libc::int32_t, aColSpan: *mut libc::int32_t, aActualRowSpan: *mut libc::int32_t, aActualColSpan: *mut libc::int32_t, aIsSelected: *mut bool) -> nsresult {
        ((*self.vtable).GetCellDataAt)(self, aTable, aRowIndex, aColIndex, aCell, aStartRowIndex, aStartColIndex, aRowSpan, aColSpan, aActualRowSpan, aActualColSpan, aIsSelected)
    }


    /// ```text
    /// /** Get the first row element in a table
    ///     *
    ///     * @return            The row at the requested index
    ///     *                    Returns null if there are no rows in table
    ///     * (in C++ returns: NS_EDITOR_ELEMENT_NOT_FOUND if an element is not found
        ///     *  passes NS_SUCCEEDED macro)
    ///     */
    /// ```
    ///

    /// `nsIDOMNode getFirstRow (in nsIDOMElement aTableElement);`
    #[inline]
    pub unsafe fn GetFirstRow(&self, aTableElement: *const nsIDOMElement, _retval: *mut *const nsIDOMNode) -> nsresult {
        ((*self.vtable).GetFirstRow)(self, aTableElement, _retval)
    }


    /// ```text
    /// /** Get the next row element starting the search from aTableElement
    ///     *
    ///     * @param aTableElement Any TR or child-of-TR element in the document
    ///     *
    ///     * @return            The row to start search from
    ///     *                    and the row returned from the search
    ///     *                    Returns null if there isn't another row
    ///     * (in C++ returns: NS_EDITOR_ELEMENT_NOT_FOUND if an element is not found
        ///     *  passes NS_SUCCEEDED macro)
    ///     */
    /// ```
    ///

    /// `nsIDOMNode getNextRow (in nsIDOMNode aTableElement);`
    #[inline]
    pub unsafe fn GetNextRow(&self, aTableElement: *const nsIDOMNode, _retval: *mut *const nsIDOMNode) -> nsresult {
        ((*self.vtable).GetNextRow)(self, aTableElement, _retval)
    }


    /// ```text
    /// /** Preferred direction to search for neighboring cell
    ///     * when trying to locate a cell to place caret in after
    ///     * a table editing action.
    ///     * Used for aDirection param in SetSelectionAfterTableEdit
    ///     */
    /// /** Examine the current selection and find
    ///     *   a selected TABLE, TD or TH, or TR element.
    ///     *   or return the parent TD or TH if selection is inside a table cell
    ///     *   Returns null if no table element is found.
    ///     *
    ///     * @param aTagName         The tagname of returned element
    ///     *                         Note that "td" will be returned if name
    ///     *                         is actually "th"
    ///     * @param aCount           How many table elements were selected
    ///     *                         This tells us if we have multiple cells selected
    ///     *                           (0 if element is a parent cell of selection)
    ///     * @return                 The table element (table, row, or first selected cell)
    ///     *
    ///     */
    /// ```
    ///

    /// `nsIDOMElement getSelectedOrParentTableElement (out AString aTagName, out long aCount);`
    #[inline]
    pub unsafe fn GetSelectedOrParentTableElement(&self, aTagName: &mut ::nsstring::nsAString, aCount: *mut libc::int32_t, _retval: *mut *const nsIDOMElement) -> nsresult {
        ((*self.vtable).GetSelectedOrParentTableElement)(self, aTagName, aCount, _retval)
    }


    /// ```text
    /// /** Generally used after GetSelectedOrParentTableElement
    ///     *   to test if selected cells are complete rows or columns
    ///     *
    ///     * @param aElement           Any table or cell element or any element
    ///     *                           inside a table
    ///     *                           Used to get enclosing table.
    ///     *                           If null, selection's anchorNode is used
    ///     *
    ///     * @return
    ///     *     0                        aCellElement was not a cell
    ///     *                              (returned result = NS_ERROR_FAILURE)
    ///     *     TABLESELECTION_CELL      There are 1 or more cells selected but
    ///     *                              complete rows or columns are not selected
    ///     *     TABLESELECTION_ROW       All cells are in 1 or more rows
    ///     *                              and in each row, all cells selected
    ///     *                              Note: This is the value if all rows
    ///     *                              (thus all cells) are selected
    ///     *     TABLESELECTION_COLUMN    All cells are in 1 or more columns
    ///     *                              and in each column, all cells are selected
    ///     */
    /// ```
    ///

    /// `uint32_t getSelectedCellsType (in nsIDOMElement aElement);`
    #[inline]
    pub unsafe fn GetSelectedCellsType(&self, aElement: *const nsIDOMElement, _retval: *mut uint32_t) -> nsresult {
        ((*self.vtable).GetSelectedCellsType)(self, aElement, _retval)
    }


    /// ```text
    /// /** Get first selected element from first selection range.
    ///     *   (If multiple cells were selected this is the first in the order they were selected)
    ///     * Assumes cell-selection model where each cell
    ///     * is in a separate range (selection parent node is table row)
    ///     * @param aCell     [OUT] Selected cell or null if ranges don't contain
    ///     *                  cell selections
    ///     * @param aRange    [OUT] Optional: if not null, return the selection range
    ///     *                     associated with the cell
    ///     * Returns the DOM cell element
    ///     *   (in C++: returns NS_EDITOR_ELEMENT_NOT_FOUND if an element is not found
        ///     *    passes NS_SUCCEEDED macro)
    ///     */
    /// ```
    ///

    /// `nsIDOMElement getFirstSelectedCell (out nsIDOMRange aRange);`
    #[inline]
    pub unsafe fn GetFirstSelectedCell(&self, aRange: *mut *const nsIDOMRange, _retval: *mut *const nsIDOMElement) -> nsresult {
        ((*self.vtable).GetFirstSelectedCell)(self, aRange, _retval)
    }


    /// ```text
    /// /** Get first selected element in the table
    ///     *   This is the upper-left-most selected cell in table,
    ///     *   ignoring the order that the user selected them (order in the selection ranges)
    ///     * Assumes cell-selection model where each cell
    ///     * is in a separate range (selection parent node is table row)
    ///     * @param aCell       Selected cell or null if ranges don't contain
    ///     *                    cell selections
    ///     * @param aRowIndex   Optional: if not null, return row index of 1st cell
    ///     * @param aColIndex   Optional: if not null, return column index of 1st cell
    ///     *
    ///     * Returns the DOM cell element
    ///     *   (in C++: returns NS_EDITOR_ELEMENT_NOT_FOUND if an element is not found
        ///     *    passes NS_SUCCEEDED macro)
    ///     */
    /// ```
    ///

    /// `nsIDOMElement getFirstSelectedCellInTable (out long aRowIndex, out long aColIndex);`
    #[inline]
    pub unsafe fn GetFirstSelectedCellInTable(&self, aRowIndex: *mut libc::int32_t, aColIndex: *mut libc::int32_t, _retval: *mut *const nsIDOMElement) -> nsresult {
        ((*self.vtable).GetFirstSelectedCellInTable)(self, aRowIndex, aColIndex, _retval)
    }


    /// ```text
    /// /** Get next selected cell element from first selection range.
    ///     * Assumes cell-selection model where each cell
    ///     * is in a separate range (selection parent node is table row)
    ///     * Always call GetFirstSelectedCell() to initialize stored index of "next" cell
    ///     * @param aCell     Selected cell or null if no more selected cells
    ///     *                     or ranges don't contain cell selections
    ///     * @param aRange    Optional: if not null, return the selection range
    ///     *                     associated with the cell
    ///     *
    ///     * Returns the DOM cell element
    ///     *   (in C++: returns NS_EDITOR_ELEMENT_NOT_FOUND if an element is not found
        ///     *    passes NS_SUCCEEDED macro)
    ///     */
    /// ```
    ///

    /// `nsIDOMElement getNextSelectedCell (out nsIDOMRange aRange);`
    #[inline]
    pub unsafe fn GetNextSelectedCell(&self, aRange: *mut *const nsIDOMRange, _retval: *mut *const nsIDOMElement) -> nsresult {
        ((*self.vtable).GetNextSelectedCell)(self, aRange, _retval)
    }


}