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
 903
 904
 905
 906
 907
 908
 909
 910
 911
 912
 913
 914
 915
 916
 917
 918
 919
 920
 921
 922
 923
 924
 925
 926
 927
 928
 929
 930
 931
 932
 933
 934
 935
 936
 937
 938
 939
 940
 941
 942
 943
 944
 945
 946
 947
 948
 949
 950
 951
 952
 953
 954
 955
 956
 957
 958
 959
 960
 961
 962
 963
 964
 965
 966
 967
 968
 969
 970
 971
 972
 973
 974
 975
 976
 977
 978
 979
 980
 981
 982
 983
 984
 985
 986
 987
 988
 989
 990
 991
 992
 993
 994
 995
 996
 997
 998
 999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
//
// DO NOT EDIT.  THIS FILE IS GENERATED FROM ../../../dist/idl/nsIEditor.idl
//


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

    /// 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 nsIEditor.
unsafe impl XpCom for nsIEditor {
    const IID: nsIID = nsID(0x094be624, 0xf0bf, 0x400f,
        [0x89, 0xe2, 0x6a, 0x84, 0xba, 0xab, 0x94, 0x74]);
}

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

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

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

    /* readonly attribute nsISelection selection; */
    pub GetSelection: unsafe extern "system" fn (this: *const nsIEditor, aSelection: *mut *const nsISelection) -> nsresult,

    /* [noscript] void finalizeSelection (); */
    pub FinalizeSelection: unsafe extern "system" fn (this: *const nsIEditor) -> nsresult,

    /* [noscript] void init (in nsIDOMDocument doc, in nsIContent aRoot, in nsISelectionController aSelCon, in unsigned long aFlags, in AString initialValue); */
    pub Init: unsafe extern "system" fn (this: *const nsIEditor, doc: *const nsIDOMDocument, aRoot: *const nsIContent, aSelCon: *const nsISelectionController, aFlags: libc::uint32_t, initialValue: &::nsstring::nsAString) -> nsresult,

    /* void setAttributeOrEquivalent (in nsIDOMElement element, in AString sourceAttrName, in AString sourceAttrValue, in boolean aSuppressTransaction); */
    pub SetAttributeOrEquivalent: unsafe extern "system" fn (this: *const nsIEditor, element: *const nsIDOMElement, sourceAttrName: &::nsstring::nsAString, sourceAttrValue: &::nsstring::nsAString, aSuppressTransaction: bool) -> nsresult,

    /* void removeAttributeOrEquivalent (in nsIDOMElement element, in DOMString sourceAttrName, in boolean aSuppressTransaction); */
    pub RemoveAttributeOrEquivalent: unsafe extern "system" fn (this: *const nsIEditor, element: *const nsIDOMElement, sourceAttrName: &::nsstring::nsAString, aSuppressTransaction: bool) -> nsresult,

    /* void postCreate (); */
    pub PostCreate: unsafe extern "system" fn (this: *const nsIEditor) -> nsresult,

    /* void preDestroy (in boolean aDestroyingFrames); */
    pub PreDestroy: unsafe extern "system" fn (this: *const nsIEditor, aDestroyingFrames: bool) -> nsresult,

    /* attribute unsigned long flags; */
    pub GetFlags: unsafe extern "system" fn (this: *const nsIEditor, aFlags: *mut libc::uint32_t) -> nsresult,

    /* attribute unsigned long flags; */
    pub SetFlags: unsafe extern "system" fn (this: *const nsIEditor, aFlags: libc::uint32_t) -> nsresult,

    /* attribute string contentsMIMEType; */
    pub GetContentsMIMEType: unsafe extern "system" fn (this: *const nsIEditor, aContentsMIMEType: *mut *const libc::c_char) -> nsresult,

    /* attribute string contentsMIMEType; */
    pub SetContentsMIMEType: unsafe extern "system" fn (this: *const nsIEditor, aContentsMIMEType: *const libc::c_char) -> nsresult,

    /* readonly attribute boolean isDocumentEditable; */
    pub GetIsDocumentEditable: unsafe extern "system" fn (this: *const nsIEditor, aIsDocumentEditable: *mut bool) -> nsresult,

    /* readonly attribute boolean isSelectionEditable; */
    pub GetIsSelectionEditable: unsafe extern "system" fn (this: *const nsIEditor, aIsSelectionEditable: *mut bool) -> nsresult,

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

    /* readonly attribute nsIDOMElement rootElement; */
    pub GetRootElement: unsafe extern "system" fn (this: *const nsIEditor, aRootElement: *mut *const nsIDOMElement) -> nsresult,

    /* readonly attribute nsISelectionController selectionController; */
    pub GetSelectionController: unsafe extern "system" fn (this: *const nsIEditor, aSelectionController: *mut *const nsISelectionController) -> nsresult,

    /* void deleteSelection (in short action, in short stripWrappers); */
    pub DeleteSelection: unsafe extern "system" fn (this: *const nsIEditor, action: libc::int16_t, stripWrappers: libc::int16_t) -> nsresult,

    /* readonly attribute boolean documentIsEmpty; */
    pub GetDocumentIsEmpty: unsafe extern "system" fn (this: *const nsIEditor, aDocumentIsEmpty: *mut bool) -> nsresult,

    /* readonly attribute boolean documentModified; */
    pub GetDocumentModified: unsafe extern "system" fn (this: *const nsIEditor, aDocumentModified: *mut bool) -> nsresult,

    /* attribute ACString documentCharacterSet; */
    pub GetDocumentCharacterSet: unsafe extern "system" fn (this: *const nsIEditor, aDocumentCharacterSet: &mut ::nsstring::nsACString) -> nsresult,

    /* attribute ACString documentCharacterSet; */
    pub SetDocumentCharacterSet: unsafe extern "system" fn (this: *const nsIEditor, aDocumentCharacterSet: &::nsstring::nsACString) -> nsresult,

    /* void resetModificationCount (); */
    pub ResetModificationCount: unsafe extern "system" fn (this: *const nsIEditor) -> nsresult,

    /* long getModificationCount (); */
    pub GetModificationCount: unsafe extern "system" fn (this: *const nsIEditor, _retval: *mut libc::int32_t) -> nsresult,

    /* void incrementModificationCount (in long aModCount); */
    pub IncrementModificationCount: unsafe extern "system" fn (this: *const nsIEditor, aModCount: libc::int32_t) -> nsresult,

    /* readonly attribute nsITransactionManager transactionManager; */
    pub GetTransactionManager: unsafe extern "system" fn (this: *const nsIEditor, aTransactionManager: *mut *const nsITransactionManager) -> nsresult,

    /* void doTransaction (in nsITransaction txn); */
    pub DoTransaction: unsafe extern "system" fn (this: *const nsIEditor, txn: *const nsITransaction) -> nsresult,

    /* void enableUndo (in boolean enable); */
    pub EnableUndo: unsafe extern "system" fn (this: *const nsIEditor, enable: bool) -> nsresult,

    /* readonly attribute long numberOfUndoItems; */
    pub GetNumberOfUndoItems: unsafe extern "system" fn (this: *const nsIEditor, aNumberOfUndoItems: *mut libc::int32_t) -> nsresult,

    /* readonly attribute long numberOfRedoItems; */
    pub GetNumberOfRedoItems: unsafe extern "system" fn (this: *const nsIEditor, aNumberOfRedoItems: *mut libc::int32_t) -> nsresult,

    /* void undo (in unsigned long count); */
    pub Undo: unsafe extern "system" fn (this: *const nsIEditor, count: libc::uint32_t) -> nsresult,

    /* void canUndo (out boolean isEnabled, out boolean canUndo); */
    pub CanUndo: unsafe extern "system" fn (this: *const nsIEditor, isEnabled: *mut bool, canUndo: *mut bool) -> nsresult,

    /* void redo (in unsigned long count); */
    pub Redo: unsafe extern "system" fn (this: *const nsIEditor, count: libc::uint32_t) -> nsresult,

    /* void canRedo (out boolean isEnabled, out boolean canRedo); */
    pub CanRedo: unsafe extern "system" fn (this: *const nsIEditor, isEnabled: *mut bool, canRedo: *mut bool) -> nsresult,

    /* void beginTransaction (); */
    pub BeginTransaction: unsafe extern "system" fn (this: *const nsIEditor) -> nsresult,

    /* void endTransaction (); */
    pub EndTransaction: unsafe extern "system" fn (this: *const nsIEditor) -> nsresult,

    /* boolean shouldTxnSetSelection (); */
    pub ShouldTxnSetSelection: unsafe extern "system" fn (this: *const nsIEditor, _retval: *mut bool) -> nsresult,

    /* void setShouldTxnSetSelection (in boolean should); */
    pub SetShouldTxnSetSelection: unsafe extern "system" fn (this: *const nsIEditor, should: bool) -> nsresult,

    /* nsIInlineSpellChecker getInlineSpellChecker (in boolean autoCreate); */
    pub GetInlineSpellChecker: unsafe extern "system" fn (this: *const nsIEditor, autoCreate: bool, _retval: *mut *const nsIInlineSpellChecker) -> nsresult,

    /* void syncRealTimeSpell (); */
    pub SyncRealTimeSpell: unsafe extern "system" fn (this: *const nsIEditor) -> nsresult,

    /* void setSpellcheckUserOverride (in boolean enable); */
    pub SetSpellcheckUserOverride: unsafe extern "system" fn (this: *const nsIEditor, enable: bool) -> nsresult,

    /* void cut (); */
    pub Cut: unsafe extern "system" fn (this: *const nsIEditor) -> nsresult,

    /* boolean canCut (); */
    pub CanCut: unsafe extern "system" fn (this: *const nsIEditor, _retval: *mut bool) -> nsresult,

    /* void copy (); */
    pub Copy: unsafe extern "system" fn (this: *const nsIEditor) -> nsresult,

    /* boolean canCopy (); */
    pub CanCopy: unsafe extern "system" fn (this: *const nsIEditor, _retval: *mut bool) -> nsresult,

    /* boolean canDelete (); */
    pub CanDelete: unsafe extern "system" fn (this: *const nsIEditor, _retval: *mut bool) -> nsresult,

    /* void paste (in long aSelectionType); */
    pub Paste: unsafe extern "system" fn (this: *const nsIEditor, aSelectionType: libc::int32_t) -> nsresult,

    /* void pasteTransferable (in nsITransferable aTransferable); */
    pub PasteTransferable: unsafe extern "system" fn (this: *const nsIEditor, aTransferable: *const nsITransferable) -> nsresult,

    /* boolean canPaste (in long aSelectionType); */
    pub CanPaste: unsafe extern "system" fn (this: *const nsIEditor, aSelectionType: libc::int32_t, _retval: *mut bool) -> nsresult,

    /* boolean canPasteTransferable ([optional] in nsITransferable aTransferable); */
    pub CanPasteTransferable: unsafe extern "system" fn (this: *const nsIEditor, aTransferable: *const nsITransferable, _retval: *mut bool) -> nsresult,

    /* void selectAll (); */
    pub SelectAll: unsafe extern "system" fn (this: *const nsIEditor) -> nsresult,

    /* void beginningOfDocument (); */
    pub BeginningOfDocument: unsafe extern "system" fn (this: *const nsIEditor) -> nsresult,

    /* void endOfDocument (); */
    pub EndOfDocument: unsafe extern "system" fn (this: *const nsIEditor) -> nsresult,

    /* void setAttribute (in nsIDOMElement aElement, in AString attributestr, in AString attvalue); */
    pub SetAttribute: unsafe extern "system" fn (this: *const nsIEditor, aElement: *const nsIDOMElement, attributestr: &::nsstring::nsAString, attvalue: &::nsstring::nsAString) -> nsresult,

    /* boolean getAttributeValue (in nsIDOMElement aElement, in AString attributestr, out AString resultValue); */
    pub GetAttributeValue: unsafe extern "system" fn (this: *const nsIEditor, aElement: *const nsIDOMElement, attributestr: &::nsstring::nsAString, resultValue: &mut ::nsstring::nsAString, _retval: *mut bool) -> nsresult,

    /* void removeAttribute (in nsIDOMElement aElement, in AString aAttribute); */
    pub RemoveAttribute: unsafe extern "system" fn (this: *const nsIEditor, aElement: *const nsIDOMElement, aAttribute: &::nsstring::nsAString) -> nsresult,

    /* void cloneAttribute (in AString aAttribute, in nsIDOMNode aDestNode, in nsIDOMNode aSourceNode); */
    pub CloneAttribute: unsafe extern "system" fn (this: *const nsIEditor, aAttribute: &::nsstring::nsAString, aDestNode: *const nsIDOMNode, aSourceNode: *const nsIDOMNode) -> nsresult,

    /* void cloneAttributes (in nsIDOMNode destNode, in nsIDOMNode sourceNode); */
    pub CloneAttributes: unsafe extern "system" fn (this: *const nsIEditor, destNode: *const nsIDOMNode, sourceNode: *const nsIDOMNode) -> nsresult,

    /* void insertNode (in nsIDOMNode node, in nsIDOMNode parent, in long aPosition); */
    pub InsertNode: unsafe extern "system" fn (this: *const nsIEditor, node: *const nsIDOMNode, parent: *const nsIDOMNode, aPosition: libc::int32_t) -> nsresult,

    /* void splitNode (in nsIDOMNode existingRightNode, in long offset, out nsIDOMNode newLeftNode); */
    pub SplitNode: unsafe extern "system" fn (this: *const nsIEditor, existingRightNode: *const nsIDOMNode, offset: libc::int32_t, newLeftNode: *mut *const nsIDOMNode) -> nsresult,

    /* void joinNodes (in nsIDOMNode leftNode, in nsIDOMNode rightNode, in nsIDOMNode parent); */
    pub JoinNodes: unsafe extern "system" fn (this: *const nsIEditor, leftNode: *const nsIDOMNode, rightNode: *const nsIDOMNode, parent: *const nsIDOMNode) -> nsresult,

    /* void deleteNode (in nsIDOMNode child); */
    pub DeleteNode: unsafe extern "system" fn (this: *const nsIEditor, child: *const nsIDOMNode) -> nsresult,

    /* [notxpcom] boolean outputsMozDirty (); */
    pub OutputsMozDirty: unsafe extern "system" fn (this: *const nsIEditor) -> bool,

    /* void markNodeDirty (in nsIDOMNode node); */
    pub MarkNodeDirty: unsafe extern "system" fn (this: *const nsIEditor, node: *const nsIDOMNode) -> nsresult,

    /* void switchTextDirection (); */
    pub SwitchTextDirection: unsafe extern "system" fn (this: *const nsIEditor) -> nsresult,

    /* AString outputToString (in AString formatType, in unsigned long flags); */
    pub OutputToString: unsafe extern "system" fn (this: *const nsIEditor, formatType: &::nsstring::nsAString, flags: libc::uint32_t, _retval: &mut ::nsstring::nsAString) -> nsresult,

    /* void outputToStream (in nsIOutputStream aStream, in AString formatType, in ACString charsetOverride, in unsigned long flags); */
    pub OutputToStream: unsafe extern "system" fn (this: *const nsIEditor, aStream: *const nsIOutputStream, formatType: &::nsstring::nsAString, charsetOverride: &::nsstring::nsACString, flags: libc::uint32_t) -> nsresult,

    /* void addEditorObserver (in nsIEditorObserver observer); */
    pub AddEditorObserver: unsafe extern "system" fn (this: *const nsIEditor, observer: *const nsIEditorObserver) -> nsresult,

    /* void removeEditorObserver (in nsIEditorObserver observer); */
    pub RemoveEditorObserver: unsafe extern "system" fn (this: *const nsIEditor, observer: *const nsIEditorObserver) -> nsresult,

    /* void addEditActionListener (in nsIEditActionListener listener); */
    pub AddEditActionListener: unsafe extern "system" fn (this: *const nsIEditor, listener: *const nsIEditActionListener) -> nsresult,

    /* void removeEditActionListener (in nsIEditActionListener listener); */
    pub RemoveEditActionListener: unsafe extern "system" fn (this: *const nsIEditor, listener: *const nsIEditActionListener) -> nsresult,

    /* void addDocumentStateListener (in nsIDocumentStateListener listener); */
    pub AddDocumentStateListener: unsafe extern "system" fn (this: *const nsIEditor, listener: *const nsIDocumentStateListener) -> nsresult,

    /* void removeDocumentStateListener (in nsIDocumentStateListener listener); */
    pub RemoveDocumentStateListener: unsafe extern "system" fn (this: *const nsIEditor, listener: *const nsIDocumentStateListener) -> nsresult,

    /* void dumpContentTree (); */
    pub DumpContentTree: unsafe extern "system" fn (this: *const nsIEditor) -> nsresult,

    /* void debugDumpContent (); */
    pub DebugDumpContent: unsafe extern "system" fn (this: *const nsIEditor) -> nsresult,

    /* void debugUnitTests (out long outNumTests, out long outNumTestsFailed); */
    pub DebugUnitTests: unsafe extern "system" fn (this: *const nsIEditor, outNumTests: *mut libc::int32_t, outNumTestsFailed: *mut libc::int32_t) -> nsresult,

    /* [notxpcom] boolean isModifiableNode (in nsIDOMNode aNode); */
    pub IsModifiableNode: unsafe extern "system" fn (this: *const nsIEditor, aNode: *const nsIDOMNode) -> bool,

    /* attribute boolean suppressDispatchingInputEvent; */
    pub GetSuppressDispatchingInputEvent: unsafe extern "system" fn (this: *const nsIEditor, aSuppressDispatchingInputEvent: *mut bool) -> nsresult,

    /* attribute boolean suppressDispatchingInputEvent; */
    pub SetSuppressDispatchingInputEvent: unsafe extern "system" fn (this: *const nsIEditor, aSuppressDispatchingInputEvent: bool) -> nsresult,

    /* [noscript] readonly attribute boolean isInEditAction; */
    pub GetIsInEditAction: unsafe extern "system" fn (this: *const nsIEditor, aIsInEditAction: *mut bool) -> nsresult,

    /* void forceCompositionEnd (); */
    pub ForceCompositionEnd: unsafe extern "system" fn (this: *const nsIEditor) -> nsresult,

    /* [noscript] IMEState getPreferredIMEState (); */
    /// Unable to generate binding because `native type mozilla::widget::IMEState is unsupported`
    pub GetPreferredIMEState: *const ::libc::c_void,

    /* readonly attribute boolean composing; */
    pub GetComposing: unsafe extern "system" fn (this: *const nsIEditor, aComposing: *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 nsIEditor {

    pub const eNone: i64 = 0;


    pub const eNext: i64 = 1;


    pub const ePrevious: i64 = 2;


    pub const eNextWord: i64 = 3;


    pub const ePreviousWord: i64 = 4;


    pub const eToBeginningOfLine: i64 = 5;


    pub const eToEndOfLine: i64 = 6;


    pub const eStrip: i64 = 0;


    pub const eNoStrip: i64 = 1;


    /// `readonly attribute nsISelection selection;`
    #[inline]
    pub unsafe fn GetSelection(&self, aSelection: *mut *const nsISelection) -> nsresult {
        ((*self.vtable).GetSelection)(self, aSelection)
    }


    /// ```text
    /// /**
    ///    * Finalizes selection and caret for the editor.
    ///    */
    /// ```
    ///

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


    /// ```text
    /// /**
    ///    * Init is to tell the implementation of nsIEditor to begin its services
    ///    * @param aDoc          The dom document interface being observed
    ///    * @param aRoot         This is the root of the editable section of this
    ///    *                      document. If it is null then we get root
    ///    *                      from document body.
    ///    * @param aSelCon       this should be used to get the selection location
    ///    *                      (will be null for HTML editors)
    ///    * @param aFlags        A bitmask of flags for specifying the behavior
    ///    *                      of the editor.
    ///    */
    /// ```
    ///

    /// `[noscript] void init (in nsIDOMDocument doc, in nsIContent aRoot, in nsISelectionController aSelCon, in unsigned long aFlags, in AString initialValue);`
    #[inline]
    pub unsafe fn Init(&self, doc: *const nsIDOMDocument, aRoot: *const nsIContent, aSelCon: *const nsISelectionController, aFlags: libc::uint32_t, initialValue: &::nsstring::nsAString) -> nsresult {
        ((*self.vtable).Init)(self, doc, aRoot, aSelCon, aFlags, initialValue)
    }



    /// `void setAttributeOrEquivalent (in nsIDOMElement element, in AString sourceAttrName, in AString sourceAttrValue, in boolean aSuppressTransaction);`
    #[inline]
    pub unsafe fn SetAttributeOrEquivalent(&self, element: *const nsIDOMElement, sourceAttrName: &::nsstring::nsAString, sourceAttrValue: &::nsstring::nsAString, aSuppressTransaction: bool) -> nsresult {
        ((*self.vtable).SetAttributeOrEquivalent)(self, element, sourceAttrName, sourceAttrValue, aSuppressTransaction)
    }



    /// `void removeAttributeOrEquivalent (in nsIDOMElement element, in DOMString sourceAttrName, in boolean aSuppressTransaction);`
    #[inline]
    pub unsafe fn RemoveAttributeOrEquivalent(&self, element: *const nsIDOMElement, sourceAttrName: &::nsstring::nsAString, aSuppressTransaction: bool) -> nsresult {
        ((*self.vtable).RemoveAttributeOrEquivalent)(self, element, sourceAttrName, aSuppressTransaction)
    }


    /// ```text
    /// /**
    ///    * postCreate should be called after Init, and is the time that the editor
    ///    * tells its documentStateObservers that the document has been created.
    ///    */
    /// ```
    ///

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


    /// ```text
    /// /**
    ///    * preDestroy is called before the editor goes away, and gives the editor a
    ///    * chance to tell its documentStateObservers that the document is going away.
    ///    * @param aDestroyingFrames set to true when the frames being edited
    ///    * are being destroyed (so there is no need to modify any nsISelections,
        ///    * nor is it safe to do so)
    ///    */
    /// ```
    ///

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


    /// ```text
    /// /** edit flags for this editor.  May be set at any time. */
    /// ```
    ///

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


    /// ```text
    /// /** edit flags for this editor.  May be set at any time. */
    /// ```
    ///

    /// `attribute unsigned long flags;`
    #[inline]
    pub unsafe fn SetFlags(&self, aFlags: libc::uint32_t) -> nsresult {
        ((*self.vtable).SetFlags)(self, aFlags)
    }


    /// ```text
    /// /**
    ///    * the MimeType of the document
    ///    */
    /// ```
    ///

    /// `attribute string contentsMIMEType;`
    #[inline]
    pub unsafe fn GetContentsMIMEType(&self, aContentsMIMEType: *mut *const libc::c_char) -> nsresult {
        ((*self.vtable).GetContentsMIMEType)(self, aContentsMIMEType)
    }


    /// ```text
    /// /**
    ///    * the MimeType of the document
    ///    */
    /// ```
    ///

    /// `attribute string contentsMIMEType;`
    #[inline]
    pub unsafe fn SetContentsMIMEType(&self, aContentsMIMEType: *const libc::c_char) -> nsresult {
        ((*self.vtable).SetContentsMIMEType)(self, aContentsMIMEType)
    }


    /// ```text
    /// /** Returns true if we have a document that is not marked read-only */
    /// ```
    ///

    /// `readonly attribute boolean isDocumentEditable;`
    #[inline]
    pub unsafe fn GetIsDocumentEditable(&self, aIsDocumentEditable: *mut bool) -> nsresult {
        ((*self.vtable).GetIsDocumentEditable)(self, aIsDocumentEditable)
    }


    /// ```text
    /// /** Returns true if the current selection anchor is editable */
    /// ```
    ///

    /// `readonly attribute boolean isSelectionEditable;`
    #[inline]
    pub unsafe fn GetIsSelectionEditable(&self, aIsSelectionEditable: *mut bool) -> nsresult {
        ((*self.vtable).GetIsSelectionEditable)(self, aIsSelectionEditable)
    }


    /// ```text
    /// /**
    ///    * the DOM Document this editor is associated with, refcounted.
    ///    */
    /// ```
    ///

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


    /// ```text
    /// /** the body element, i.e. the root of the editable document.
    ///    */
    /// ```
    ///

    /// `readonly attribute nsIDOMElement rootElement;`
    #[inline]
    pub unsafe fn GetRootElement(&self, aRootElement: *mut *const nsIDOMElement) -> nsresult {
        ((*self.vtable).GetRootElement)(self, aRootElement)
    }


    /// ```text
    /// /**
    ///    * the selection controller for the current presentation, refcounted.
    ///    */
    /// ```
    ///

    /// `readonly attribute nsISelectionController selectionController;`
    #[inline]
    pub unsafe fn GetSelectionController(&self, aSelectionController: *mut *const nsISelectionController) -> nsresult {
        ((*self.vtable).GetSelectionController)(self, aSelectionController)
    }


    /// ```text
    /// /**
    ///    * DeleteSelection removes all nodes in the current selection.
    ///    * @param aDir  if eNext, delete to the right (for example, the DEL key)
    ///    *              if ePrevious, delete to the left (for example, the BACKSPACE key)
    ///    * @param stripWrappers If eStrip, strip any empty inline elements left
    ///    *                      behind after the deletion; if eNoStrip, don't.  If in
    ///    *                      doubt, pass eStrip -- eNoStrip is only for if you're
    ///    *                      about to insert text or similar right after.
    ///    */
    /// ```
    ///

    /// `void deleteSelection (in short action, in short stripWrappers);`
    #[inline]
    pub unsafe fn DeleteSelection(&self, action: libc::int16_t, stripWrappers: libc::int16_t) -> nsresult {
        ((*self.vtable).DeleteSelection)(self, action, stripWrappers)
    }


    /// ```text
    /// /** Returns true if the document has no *meaningful* content */
    /// ```
    ///

    /// `readonly attribute boolean documentIsEmpty;`
    #[inline]
    pub unsafe fn GetDocumentIsEmpty(&self, aDocumentIsEmpty: *mut bool) -> nsresult {
        ((*self.vtable).GetDocumentIsEmpty)(self, aDocumentIsEmpty)
    }


    /// ```text
    /// /** Returns true if the document is modifed and needs saving */
    /// ```
    ///

    /// `readonly attribute boolean documentModified;`
    #[inline]
    pub unsafe fn GetDocumentModified(&self, aDocumentModified: *mut bool) -> nsresult {
        ((*self.vtable).GetDocumentModified)(self, aDocumentModified)
    }


    /// ```text
    /// /** Sets the current 'Save' document character set */
    /// ```
    ///

    /// `attribute ACString documentCharacterSet;`
    #[inline]
    pub unsafe fn GetDocumentCharacterSet(&self, aDocumentCharacterSet: &mut ::nsstring::nsACString) -> nsresult {
        ((*self.vtable).GetDocumentCharacterSet)(self, aDocumentCharacterSet)
    }


    /// ```text
    /// /** Sets the current 'Save' document character set */
    /// ```
    ///

    /// `attribute ACString documentCharacterSet;`
    #[inline]
    pub unsafe fn SetDocumentCharacterSet(&self, aDocumentCharacterSet: &::nsstring::nsACString) -> nsresult {
        ((*self.vtable).SetDocumentCharacterSet)(self, aDocumentCharacterSet)
    }


    /// ```text
    /// /** to be used ONLY when we need to override the doc's modification
    ///     * state (such as when it's saved).
    ///     */
    /// ```
    ///

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


    /// ```text
    /// /** Gets the modification count of the document we are editing.
    ///     * @return the modification count of the document being edited.
    ///     *         Zero means unchanged.
    ///     */
    /// ```
    ///

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


    /// ```text
    /// /** called each time we modify the document.
    ///     * Increments the modification count of the document.
    ///     * @param  aModCount  the number of modifications by which
    ///     *                    to increase or decrease the count
    ///     */
    /// ```
    ///

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


    /// ```text
    /// /** transactionManager Get the transaction manager the editor is using.
    ///     */
    /// ```
    ///

    /// `readonly attribute nsITransactionManager transactionManager;`
    #[inline]
    pub unsafe fn GetTransactionManager(&self, aTransactionManager: *mut *const nsITransactionManager) -> nsresult {
        ((*self.vtable).GetTransactionManager)(self, aTransactionManager)
    }


    /// ```text
    /// /** doTransaction() fires a transaction.
    ///     * It is provided here so clients can create their own transactions.
    ///     * If a transaction manager is present, it is used.
    ///     * Otherwise, the transaction is just executed directly.
    ///     *
    ///     * @param aTxn the transaction to execute
    ///     */
    /// ```
    ///

    /// `void doTransaction (in nsITransaction txn);`
    #[inline]
    pub unsafe fn DoTransaction(&self, txn: *const nsITransaction) -> nsresult {
        ((*self.vtable).DoTransaction)(self, txn)
    }


    /// ```text
    /// /** turn the undo system on or off
    ///     * @param aEnable  if PR_TRUE, the undo system is turned on if available
    ///     *                 if PR_FALSE the undo system is turned off if it
    ///     *                 was previously on
    ///     * @return         if aEnable is PR_TRUE, returns NS_OK if
    ///     *                 the undo system could be initialized properly
    ///     *                 if aEnable is PR_FALSE, returns NS_OK.
    ///     */
    /// ```
    ///

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


    /// ```text
    /// /**
    ///    * The number of items on the undo stack.
    ///    */
    /// ```
    ///

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


    /// ```text
    /// /**
    ///    * The number of items on the redo stack.
    ///    */
    /// ```
    ///

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


    /// ```text
    /// /** undo reverses the effects of the last Do operation,
    ///     * if Undo is enabled in the editor.
    ///     * It is provided here so clients need no knowledge of whether
    ///     * the editor has a transaction manager or not.
    ///     * If a transaction manager is present, it is told to undo,
    ///     * and the result of that undo is returned.
    ///     * Otherwise, the Undo request is ignored and an
    ///     * error NS_ERROR_NOT_AVAILABLE is returned.
    ///     *
    ///     */
    /// ```
    ///

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


    /// ```text
    /// /** returns state information about the undo system.
    ///     * @param aIsEnabled [OUT] PR_TRUE if undo is enabled
    ///     * @param aCanUndo   [OUT] PR_TRUE if at least one transaction is
    ///     *                         currently ready to be undone.
    ///     */
    /// ```
    ///

    /// `void canUndo (out boolean isEnabled, out boolean canUndo);`
    #[inline]
    pub unsafe fn CanUndo(&self, isEnabled: *mut bool, canUndo: *mut bool) -> nsresult {
        ((*self.vtable).CanUndo)(self, isEnabled, canUndo)
    }


    /// ```text
    /// /** redo reverses the effects of the last Undo operation
    ///     * It is provided here so clients need no knowledge of whether
    ///     * the editor has a transaction manager or not.
    ///     * If a transaction manager is present, it is told to redo and the
    ///     * result of the previously undone transaction is reapplied to the document.
    ///     * If no transaction is available for Redo, or if the document
    ///     * has no transaction manager, the Redo request is ignored and an
    ///     * error NS_ERROR_NOT_AVAILABLE is returned.
    ///     *
    ///     */
    /// ```
    ///

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


    /// ```text
    /// /** returns state information about the redo system.
    ///     * @param aIsEnabled [OUT] PR_TRUE if redo is enabled
    ///     * @param aCanRedo   [OUT] PR_TRUE if at least one transaction is
    ///                               currently ready to be redone.
    ///     */
    /// ```
    ///

    /// `void canRedo (out boolean isEnabled, out boolean canRedo);`
    #[inline]
    pub unsafe fn CanRedo(&self, isEnabled: *mut bool, canRedo: *mut bool) -> nsresult {
        ((*self.vtable).CanRedo)(self, isEnabled, canRedo)
    }


    /// ```text
    /// /** beginTransaction is a signal from the caller to the editor that
    ///     * the caller will execute multiple updates to the content tree
    ///     * that should be treated as a single logical operation,
    ///     * in the most efficient way possible.<br>
    ///     * All transactions executed between a call to beginTransaction and
    ///     * endTransaction will be undoable as an atomic action.<br>
    ///     * endTransaction must be called after beginTransaction.<br>
    ///     * Calls to beginTransaction can be nested, as long as endTransaction
    ///     * is called once per beginUpdate.
    ///     */
    /// ```
    ///

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


    /// ```text
    /// /** endTransaction is a signal to the editor that the caller is
    ///     * finished updating the content model.<br>
    ///     * beginUpdate must be called before endTransaction is called.<br>
    ///     * Calls to beginTransaction can be nested, as long as endTransaction
    ///     * is called once per beginTransaction.
    ///     */
    /// ```
    ///

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



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


    /// ```text
    /// /** Set the flag that prevents insertElementTxn from changing the selection
    ///     * @param   should  Set false to suppress changing the selection;
    ///     *                  i.e., before using InsertElement() to insert
    ///     *                  under <head> element
    ///     * WARNING: You must be very careful to reset back to PR_TRUE after
    ///     *          setting PR_FALSE, else selection/caret is trashed
    ///     *          for further editing.
    ///     */
    /// ```
    ///

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


    /// ```text
    /// /** Returns the inline spell checker associated with this object. The spell
    ///     * checker is lazily created, so this function may create the object for
    ///     * you during this call.
    ///     * @param  autoCreate  If true, this will create a spell checker object
    ///     *                     if one does not exist yet for this editor. If false
    ///     *                     and the object has not been created, this function
    ///     *                     WILL RETURN NULL.
    ///     */
    /// ```
    ///

    /// `nsIInlineSpellChecker getInlineSpellChecker (in boolean autoCreate);`
    #[inline]
    pub unsafe fn GetInlineSpellChecker(&self, autoCreate: bool, _retval: *mut *const nsIInlineSpellChecker) -> nsresult {
        ((*self.vtable).GetInlineSpellChecker)(self, autoCreate, _retval)
    }


    /// ```text
    /// /** Resyncs spellchecking state (enabled/disabled).  This should be called
    ///     * when anything that affects spellchecking state changes, such as the
    ///     * spellcheck attribute value.
    ///     */
    /// ```
    ///

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


    /// ```text
    /// /** Called when the user manually overrides the spellchecking state for this
    ///     * editor.
    ///     * @param  enable  The new state of spellchecking in this editor, as
    ///     *                 requested by the user.
    ///     */
    /// ```
    ///

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


    /// ```text
    /// /** cut the currently selected text, putting it into the OS clipboard
    ///     * What if no text is selected?
    ///     * What about mixed selections?
    ///     * What are the clipboard formats?
    ///     */
    /// ```
    ///

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


    /// ```text
    /// /** Can we cut? True if the doc is modifiable, and we have a non-
    ///     * collapsed selection.
    ///     */
    /// ```
    ///

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


    /// ```text
    /// /** copy the currently selected text, putting it into the OS clipboard
    ///     * What if no text is selected?
    ///     * What about mixed selections?
    ///     * What are the clipboard formats?
    ///     */
    /// ```
    ///

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


    /// ```text
    /// /** Can we copy? True if we have a non-collapsed selection.
    ///     */
    /// ```
    ///

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


    /// ```text
    /// /** Can we delete? True if we have a non-collapsed selection.
    ///     */
    /// ```
    ///

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


    /// ```text
    /// /** paste the text in the OS clipboard at the cursor position, replacing
    ///     * the selected text (if any)
    ///     */
    /// ```
    ///

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


    /// ```text
    /// /** Paste the text in |aTransferable| at the cursor position, replacing the
    ///     * selected text (if any).
    ///     */
    /// ```
    ///

    /// `void pasteTransferable (in nsITransferable aTransferable);`
    #[inline]
    pub unsafe fn PasteTransferable(&self, aTransferable: *const nsITransferable) -> nsresult {
        ((*self.vtable).PasteTransferable)(self, aTransferable)
    }


    /// ```text
    /// /** Can we paste? True if the doc is modifiable, and we have
    ///     * pasteable data in the clipboard.
    ///     */
    /// ```
    ///

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


    /// ```text
    /// /** Can we paste |aTransferable| or, if |aTransferable| is null, will a call
    ///     * to pasteTransferable later possibly succeed if given an instance of
    ///     * nsITransferable then? True if the doc is modifiable, and, if
    ///     * |aTransfeable| is non-null, we have pasteable data in |aTransfeable|.
    ///     */
    /// ```
    ///

    /// `boolean canPasteTransferable ([optional] in nsITransferable aTransferable);`
    #[inline]
    pub unsafe fn CanPasteTransferable(&self, aTransferable: *const nsITransferable, _retval: *mut bool) -> nsresult {
        ((*self.vtable).CanPasteTransferable)(self, aTransferable, _retval)
    }


    /// ```text
    /// /** sets the document selection to the entire contents of the document */
    /// ```
    ///

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


    /// ```text
    /// /** sets the document selection to the beginning of the document */
    /// ```
    ///

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


    /// ```text
    /// /** sets the document selection to the end of the document */
    /// ```
    ///

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


    /// ```text
    /// /**
    ///    * setAttribute() sets the attribute of aElement.
    ///    * No checking is done to see if aAttribute is a legal attribute of the node,
    ///    * or if aValue is a legal value of aAttribute.
    ///    *
    ///    * @param aElement    the content element to operate on
    ///    * @param aAttribute  the string representation of the attribute to set
    ///    * @param aValue      the value to set aAttribute to
    ///    */
    /// ```
    ///

    /// `void setAttribute (in nsIDOMElement aElement, in AString attributestr, in AString attvalue);`
    #[inline]
    pub unsafe fn SetAttribute(&self, aElement: *const nsIDOMElement, attributestr: &::nsstring::nsAString, attvalue: &::nsstring::nsAString) -> nsresult {
        ((*self.vtable).SetAttribute)(self, aElement, attributestr, attvalue)
    }


    /// ```text
    /// /**
    ///    * getAttributeValue() retrieves the attribute's value for aElement.
    ///    *
    ///    * @param aElement      the content element to operate on
    ///    * @param aAttribute    the string representation of the attribute to get
    ///    * @param aResultValue  [OUT] the value of aAttribute.
    ///    *                      Only valid if aResultIsSet is PR_TRUE
    ///    * @return              PR_TRUE if aAttribute is set on the current node,
    ///    *                      PR_FALSE if it is not.
    ///    */
    /// ```
    ///

    /// `boolean getAttributeValue (in nsIDOMElement aElement, in AString attributestr, out AString resultValue);`
    #[inline]
    pub unsafe fn GetAttributeValue(&self, aElement: *const nsIDOMElement, attributestr: &::nsstring::nsAString, resultValue: &mut ::nsstring::nsAString, _retval: *mut bool) -> nsresult {
        ((*self.vtable).GetAttributeValue)(self, aElement, attributestr, resultValue, _retval)
    }


    /// ```text
    /// /**
    ///    * removeAttribute() deletes aAttribute from the attribute list of aElement.
    ///    * If aAttribute is not an attribute of aElement, nothing is done.
    ///    *
    ///    * @param aElement      the content element to operate on
    ///    * @param aAttribute    the string representation of the attribute to get
    ///    */
    /// ```
    ///

    /// `void removeAttribute (in nsIDOMElement aElement, in AString aAttribute);`
    #[inline]
    pub unsafe fn RemoveAttribute(&self, aElement: *const nsIDOMElement, aAttribute: &::nsstring::nsAString) -> nsresult {
        ((*self.vtable).RemoveAttribute)(self, aElement, aAttribute)
    }


    /// ```text
    /// /**
    ///    * cloneAttribute() copies the attribute from the source node to
    ///    * the destination node and delete those not in the source.
    ///    *
    ///    * The supplied nodes MUST BE ELEMENTS (most callers are working with nodes)
    ///    * @param aAttribute    the name of the attribute to copy
    ///    * @param aDestNode     the destination element to operate on
    ///    * @param aSourceNode   the source element to copy attributes from
    ///    * @exception NS_ERROR_NULL_POINTER at least one of the nodes is null
    ///    * @exception NS_ERROR_NO_INTERFACE at least one of the nodes is not an
    ///    *                                  element
    ///    */
    /// ```
    ///

    /// `void cloneAttribute (in AString aAttribute, in nsIDOMNode aDestNode, in nsIDOMNode aSourceNode);`
    #[inline]
    pub unsafe fn CloneAttribute(&self, aAttribute: &::nsstring::nsAString, aDestNode: *const nsIDOMNode, aSourceNode: *const nsIDOMNode) -> nsresult {
        ((*self.vtable).CloneAttribute)(self, aAttribute, aDestNode, aSourceNode)
    }


    /// ```text
    /// /**
    ///    * cloneAttributes() is similar to nsIDOMNode::cloneNode(),
    ///    *   it assures the attribute nodes of the destination are identical
    ///    *   with the source node by copying all existing attributes from the
    ///    *   source and deleting those not in the source.
    ///    *   This is used when the destination node (element) already exists
    ///    *
    ///    * The supplied nodes MUST BE ELEMENTS (most callers are working with nodes)
    ///    * @param aDestNode     the destination element to operate on
    ///    * @param aSourceNode   the source element to copy attributes from
    ///    */
    /// ```
    ///

    /// `void cloneAttributes (in nsIDOMNode destNode, in nsIDOMNode sourceNode);`
    #[inline]
    pub unsafe fn CloneAttributes(&self, destNode: *const nsIDOMNode, sourceNode: *const nsIDOMNode) -> nsresult {
        ((*self.vtable).CloneAttributes)(self, destNode, sourceNode)
    }


    /// ```text
    /// /**
    ///    * insertNode inserts aNode into aParent at aPosition.
    ///    * No checking is done to verify the legality of the insertion.
    ///    * That is the responsibility of the caller.
    ///    * @param aNode     The DOM Node to insert.
    ///    * @param aParent   The node to insert the new object into
    ///    * @param aPosition The place in aParent to insert the new node
    ///    *                  0=first child, 1=second child, etc.
    ///    *                  any number > number of current children = last child
    ///    */
    /// ```
    ///

    /// `void insertNode (in nsIDOMNode node, in nsIDOMNode parent, in long aPosition);`
    #[inline]
    pub unsafe fn InsertNode(&self, node: *const nsIDOMNode, parent: *const nsIDOMNode, aPosition: libc::int32_t) -> nsresult {
        ((*self.vtable).InsertNode)(self, node, parent, aPosition)
    }


    /// ```text
    /// /**
    ///    * splitNode() creates a new node identical to an existing node,
    ///    * and split the contents between the two nodes
    ///    * @param aExistingRightNode   the node to split.
    ///    *                             It will become the new node's next sibling.
    ///    * @param aOffset              the offset of aExistingRightNode's
    ///    *                             content|children to do the split at
    ///    * @param aNewLeftNode         [OUT] the new node resulting from the split,
    ///    *                             becomes aExistingRightNode's previous sibling.
    ///    */
    /// ```
    ///

    /// `void splitNode (in nsIDOMNode existingRightNode, in long offset, out nsIDOMNode newLeftNode);`
    #[inline]
    pub unsafe fn SplitNode(&self, existingRightNode: *const nsIDOMNode, offset: libc::int32_t, newLeftNode: *mut *const nsIDOMNode) -> nsresult {
        ((*self.vtable).SplitNode)(self, existingRightNode, offset, newLeftNode)
    }


    /// ```text
    /// /**
    ///    * joinNodes() takes 2 nodes and merge their content|children.
    ///    * @param aLeftNode     The left node.  It will be deleted.
    ///    * @param aRightNode    The right node. It will remain after the join.
    ///    * @param aParent       The parent of aExistingRightNode
    ///    *
    ///    *                      There is no requirement that the two nodes be
    ///    *                      of the same type.  However, a text node can be
    ///    *                      merged only with another text node.
    ///    */
    /// ```
    ///

    /// `void joinNodes (in nsIDOMNode leftNode, in nsIDOMNode rightNode, in nsIDOMNode parent);`
    #[inline]
    pub unsafe fn JoinNodes(&self, leftNode: *const nsIDOMNode, rightNode: *const nsIDOMNode, parent: *const nsIDOMNode) -> nsresult {
        ((*self.vtable).JoinNodes)(self, leftNode, rightNode, parent)
    }


    /// ```text
    /// /**
    ///    * deleteNode removes aChild from aParent.
    ///    * @param aChild    The node to delete
    ///    */
    /// ```
    ///

    /// `void deleteNode (in nsIDOMNode child);`
    #[inline]
    pub unsafe fn DeleteNode(&self, child: *const nsIDOMNode) -> nsresult {
        ((*self.vtable).DeleteNode)(self, child)
    }


    /// ```text
    /// /**
    ///    * Returns true if markNodeDirty() has any effect.  Returns false if
    ///    * markNodeDirty() is a no-op.
    ///    */
    /// ```
    ///

    /// `[notxpcom] boolean outputsMozDirty ();`
    #[inline]
    pub unsafe fn OutputsMozDirty(&self, ) -> bool {
        ((*self.vtable).OutputsMozDirty)(self, )
    }


    /// ```text
    /// /**
    ///    * markNodeDirty() sets a special dirty attribute on the node.
    ///    * Usually this will be called immediately after creating a new node.
    ///    * @param aNode      The node for which to insert formatting.
    ///    */
    /// ```
    ///

    /// `void markNodeDirty (in nsIDOMNode node);`
    #[inline]
    pub unsafe fn MarkNodeDirty(&self, node: *const nsIDOMNode) -> nsresult {
        ((*self.vtable).MarkNodeDirty)(self, node)
    }


    /// ```text
    /// /**
    ///    * Switches the editor element direction; from "Left-to-Right" to
    ///    * "Right-to-Left", and vice versa.
    ///    */
    /// ```
    ///

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


    /// ```text
    /// /**
    ///    * Output methods:
    ///    * aFormatType is a mime type, like text/plain.
    ///    */
    /// ```
    ///

    /// `AString outputToString (in AString formatType, in unsigned long flags);`
    #[inline]
    pub unsafe fn OutputToString(&self, formatType: &::nsstring::nsAString, flags: libc::uint32_t, _retval: &mut ::nsstring::nsAString) -> nsresult {
        ((*self.vtable).OutputToString)(self, formatType, flags, _retval)
    }



    /// `void outputToStream (in nsIOutputStream aStream, in AString formatType, in ACString charsetOverride, in unsigned long flags);`
    #[inline]
    pub unsafe fn OutputToStream(&self, aStream: *const nsIOutputStream, formatType: &::nsstring::nsAString, charsetOverride: &::nsstring::nsACString, flags: libc::uint32_t) -> nsresult {
        ((*self.vtable).OutputToStream)(self, aStream, formatType, charsetOverride, flags)
    }


    /// ```text
    /// /** add an EditorObserver to the editors list of observers. */
    /// ```
    ///

    /// `void addEditorObserver (in nsIEditorObserver observer);`
    #[inline]
    pub unsafe fn AddEditorObserver(&self, observer: *const nsIEditorObserver) -> nsresult {
        ((*self.vtable).AddEditorObserver)(self, observer)
    }


    /// ```text
    /// /** Remove an EditorObserver from the editor's list of observers. */
    /// ```
    ///

    /// `void removeEditorObserver (in nsIEditorObserver observer);`
    #[inline]
    pub unsafe fn RemoveEditorObserver(&self, observer: *const nsIEditorObserver) -> nsresult {
        ((*self.vtable).RemoveEditorObserver)(self, observer)
    }


    /// ```text
    /// /** add an EditActionListener to the editors list of listeners. */
    /// ```
    ///

    /// `void addEditActionListener (in nsIEditActionListener listener);`
    #[inline]
    pub unsafe fn AddEditActionListener(&self, listener: *const nsIEditActionListener) -> nsresult {
        ((*self.vtable).AddEditActionListener)(self, listener)
    }


    /// ```text
    /// /** Remove an EditActionListener from the editor's list of listeners. */
    /// ```
    ///

    /// `void removeEditActionListener (in nsIEditActionListener listener);`
    #[inline]
    pub unsafe fn RemoveEditActionListener(&self, listener: *const nsIEditActionListener) -> nsresult {
        ((*self.vtable).RemoveEditActionListener)(self, listener)
    }


    /// ```text
    /// /** Add a DocumentStateListener to the editors list of doc state listeners. */
    /// ```
    ///

    /// `void addDocumentStateListener (in nsIDocumentStateListener listener);`
    #[inline]
    pub unsafe fn AddDocumentStateListener(&self, listener: *const nsIDocumentStateListener) -> nsresult {
        ((*self.vtable).AddDocumentStateListener)(self, listener)
    }


    /// ```text
    /// /** Remove a DocumentStateListener to the editors list of doc state listeners. */
    /// ```
    ///

    /// `void removeDocumentStateListener (in nsIDocumentStateListener listener);`
    #[inline]
    pub unsafe fn RemoveDocumentStateListener(&self, listener: *const nsIDocumentStateListener) -> nsresult {
        ((*self.vtable).RemoveDocumentStateListener)(self, listener)
    }


    /// ```text
    /// /**
    ///    * And a debug method -- show us what the tree looks like right now
    ///    */
    /// ```
    ///

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


    /// ```text
    /// /** Dumps a text representation of the content tree to standard out */
    /// ```
    ///

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



    /// `void debugUnitTests (out long outNumTests, out long outNumTestsFailed);`
    #[inline]
    pub unsafe fn DebugUnitTests(&self, outNumTests: *mut libc::int32_t, outNumTestsFailed: *mut libc::int32_t) -> nsresult {
        ((*self.vtable).DebugUnitTests)(self, outNumTests, outNumTestsFailed)
    }



    /// `[notxpcom] boolean isModifiableNode (in nsIDOMNode aNode);`
    #[inline]
    pub unsafe fn IsModifiableNode(&self, aNode: *const nsIDOMNode) -> bool {
        ((*self.vtable).IsModifiableNode)(self, aNode)
    }



    /// `attribute boolean suppressDispatchingInputEvent;`
    #[inline]
    pub unsafe fn GetSuppressDispatchingInputEvent(&self, aSuppressDispatchingInputEvent: *mut bool) -> nsresult {
        ((*self.vtable).GetSuppressDispatchingInputEvent)(self, aSuppressDispatchingInputEvent)
    }



    /// `attribute boolean suppressDispatchingInputEvent;`
    #[inline]
    pub unsafe fn SetSuppressDispatchingInputEvent(&self, aSuppressDispatchingInputEvent: bool) -> nsresult {
        ((*self.vtable).SetSuppressDispatchingInputEvent)(self, aSuppressDispatchingInputEvent)
    }


    /// ```text
    /// /**
    ///    * True if an edit action is being handled (in other words, between calls of
        ///    * nsIEditorObserver::BeforeEditAction() and nsIEditorObserver::EditAction()
        ///    * or nsIEditorObserver::CancelEditAction().  Otherwise, false.
        ///    */
        /// ```
        ///

        /// `[noscript] readonly attribute boolean isInEditAction;`
        #[inline]
        pub unsafe fn GetIsInEditAction(&self, aIsInEditAction: *mut bool) -> nsresult {
            ((*self.vtable).GetIsInEditAction)(self, aIsInEditAction)
        }


        /// ```text
        /// /**
        ///    * forceCompositionEnd() force the composition end
        ///    */
        /// ```
        ///

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


        /// ```text
        /// /**
        ///    * Get preferred IME status of current widget.
        ///    */
        /// ```
        ///

        /// `[noscript] IMEState getPreferredIMEState ();`
        const _GetPreferredIMEState: () = ();

        /// ```text
        /// /**
        ///    * whether this editor has active IME transaction
        ///    */
        /// ```
        ///

        /// `readonly attribute boolean composing;`
        #[inline]
        pub unsafe fn GetComposing(&self, aComposing: *mut bool) -> nsresult {
            ((*self.vtable).GetComposing)(self, aComposing)
        }


    }