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


/// `interface nsIDOMKeyEvent : nsIDOMUIEvent`
///


// 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 nsIDOMKeyEvent {
    vtable: *const nsIDOMKeyEventVTable,

    /// 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 nsIDOMKeyEvent.
unsafe impl XpCom for nsIDOMKeyEvent {
    const IID: nsIID = nsID(0x2e52eb99, 0x670d, 0x469a,
        [0xb5, 0x1f, 0x8e, 0xfe, 0xe2, 0xdd, 0x09, 0x1d]);
}

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

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

impl nsIDOMKeyEvent {
    /// Cast this `nsIDOMKeyEvent` to one of its base interfaces.
    #[inline]
    pub fn coerce<T: nsIDOMKeyEventCoerce>(&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 nsIDOMKeyEvent {
    type Target = nsIDOMUIEvent;
    #[inline]
    fn deref(&self) -> &nsIDOMUIEvent {
        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: nsIDOMUIEventCoerce> nsIDOMKeyEventCoerce for T {
    #[inline]
    fn coerce_from(v: &nsIDOMKeyEvent) -> &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 nsIDOMKeyEvent
// 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 nsIDOMKeyEventVTable {
    /// We need to include the members from the base interface's vtable at the start
    /// of the VTable definition.
    pub __base: nsIDOMUIEventVTable,

    /* readonly attribute unsigned long charCode; */
    pub GetCharCode: unsafe extern "system" fn (this: *const nsIDOMKeyEvent, aCharCode: *mut libc::uint32_t) -> nsresult,

    /* readonly attribute unsigned long keyCode; */
    pub GetKeyCode: unsafe extern "system" fn (this: *const nsIDOMKeyEvent, aKeyCode: *mut libc::uint32_t) -> nsresult,

    /* readonly attribute boolean altKey; */
    pub GetAltKey: unsafe extern "system" fn (this: *const nsIDOMKeyEvent, aAltKey: *mut bool) -> nsresult,

    /* readonly attribute boolean ctrlKey; */
    pub GetCtrlKey: unsafe extern "system" fn (this: *const nsIDOMKeyEvent, aCtrlKey: *mut bool) -> nsresult,

    /* readonly attribute boolean shiftKey; */
    pub GetShiftKey: unsafe extern "system" fn (this: *const nsIDOMKeyEvent, aShiftKey: *mut bool) -> nsresult,

    /* readonly attribute boolean metaKey; */
    pub GetMetaKey: unsafe extern "system" fn (this: *const nsIDOMKeyEvent, aMetaKey: *mut bool) -> nsresult,

    /* void initKeyEvent (in DOMString typeArg, in boolean canBubbleArg, in boolean cancelableArg, in mozIDOMWindow viewArg, in boolean ctrlKeyArg, in boolean altKeyArg, in boolean shiftKeyArg, in boolean metaKeyArg, in unsigned long keyCodeArg, in unsigned long charCodeArg); */
    pub InitKeyEvent: unsafe extern "system" fn (this: *const nsIDOMKeyEvent, typeArg: &::nsstring::nsAString, canBubbleArg: bool, cancelableArg: bool, viewArg: *const mozIDOMWindow, ctrlKeyArg: bool, altKeyArg: bool, shiftKeyArg: bool, metaKeyArg: bool, keyCodeArg: libc::uint32_t, charCodeArg: libc::uint32_t) -> nsresult,

    /* bool getModifierState (in DOMString keyArg); */
    pub GetModifierState: unsafe extern "system" fn (this: *const nsIDOMKeyEvent, keyArg: &::nsstring::nsAString, _retval: *mut bool) -> nsresult,

    /* readonly attribute unsigned long location; */
    pub GetLocation: unsafe extern "system" fn (this: *const nsIDOMKeyEvent, aLocation: *mut libc::uint32_t) -> nsresult,

    /* readonly attribute boolean repeat; */
    pub GetRepeat: unsafe extern "system" fn (this: *const nsIDOMKeyEvent, aRepeat: *mut bool) -> nsresult,

    /* readonly attribute DOMString key; */
    pub GetKey: unsafe extern "system" fn (this: *const nsIDOMKeyEvent, aKey: &mut ::nsstring::nsAString) -> 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 nsIDOMKeyEvent {

    pub const DOM_VK_CANCEL: i64 = 3;


    pub const DOM_VK_HELP: i64 = 6;


    pub const DOM_VK_BACK_SPACE: i64 = 8;


    pub const DOM_VK_TAB: i64 = 9;


    pub const DOM_VK_CLEAR: i64 = 12;


    pub const DOM_VK_RETURN: i64 = 13;


    pub const DOM_VK_SHIFT: i64 = 16;


    pub const DOM_VK_CONTROL: i64 = 17;


    pub const DOM_VK_ALT: i64 = 18;


    pub const DOM_VK_PAUSE: i64 = 19;


    pub const DOM_VK_CAPS_LOCK: i64 = 20;


    pub const DOM_VK_KANA: i64 = 21;


    pub const DOM_VK_HANGUL: i64 = 21;


    pub const DOM_VK_EISU: i64 = 22;


    pub const DOM_VK_JUNJA: i64 = 23;


    pub const DOM_VK_FINAL: i64 = 24;


    pub const DOM_VK_HANJA: i64 = 25;


    pub const DOM_VK_KANJI: i64 = 25;


    pub const DOM_VK_ESCAPE: i64 = 27;


    pub const DOM_VK_CONVERT: i64 = 28;


    pub const DOM_VK_NONCONVERT: i64 = 29;


    pub const DOM_VK_ACCEPT: i64 = 30;


    pub const DOM_VK_MODECHANGE: i64 = 31;


    pub const DOM_VK_SPACE: i64 = 32;


    pub const DOM_VK_PAGE_UP: i64 = 33;


    pub const DOM_VK_PAGE_DOWN: i64 = 34;


    pub const DOM_VK_END: i64 = 35;


    pub const DOM_VK_HOME: i64 = 36;


    pub const DOM_VK_LEFT: i64 = 37;


    pub const DOM_VK_UP: i64 = 38;


    pub const DOM_VK_RIGHT: i64 = 39;


    pub const DOM_VK_DOWN: i64 = 40;


    pub const DOM_VK_SELECT: i64 = 41;


    pub const DOM_VK_PRINT: i64 = 42;


    pub const DOM_VK_EXECUTE: i64 = 43;


    pub const DOM_VK_PRINTSCREEN: i64 = 44;


    pub const DOM_VK_INSERT: i64 = 45;


    pub const DOM_VK_DELETE: i64 = 46;


    pub const DOM_VK_0: i64 = 48;


    pub const DOM_VK_1: i64 = 49;


    pub const DOM_VK_2: i64 = 50;


    pub const DOM_VK_3: i64 = 51;


    pub const DOM_VK_4: i64 = 52;


    pub const DOM_VK_5: i64 = 53;


    pub const DOM_VK_6: i64 = 54;


    pub const DOM_VK_7: i64 = 55;


    pub const DOM_VK_8: i64 = 56;


    pub const DOM_VK_9: i64 = 57;


    pub const DOM_VK_COLON: i64 = 58;


    pub const DOM_VK_SEMICOLON: i64 = 59;


    pub const DOM_VK_LESS_THAN: i64 = 60;


    pub const DOM_VK_EQUALS: i64 = 61;


    pub const DOM_VK_GREATER_THAN: i64 = 62;


    pub const DOM_VK_QUESTION_MARK: i64 = 63;


    pub const DOM_VK_AT: i64 = 64;


    pub const DOM_VK_A: i64 = 65;


    pub const DOM_VK_B: i64 = 66;


    pub const DOM_VK_C: i64 = 67;


    pub const DOM_VK_D: i64 = 68;


    pub const DOM_VK_E: i64 = 69;


    pub const DOM_VK_F: i64 = 70;


    pub const DOM_VK_G: i64 = 71;


    pub const DOM_VK_H: i64 = 72;


    pub const DOM_VK_I: i64 = 73;


    pub const DOM_VK_J: i64 = 74;


    pub const DOM_VK_K: i64 = 75;


    pub const DOM_VK_L: i64 = 76;


    pub const DOM_VK_M: i64 = 77;


    pub const DOM_VK_N: i64 = 78;


    pub const DOM_VK_O: i64 = 79;


    pub const DOM_VK_P: i64 = 80;


    pub const DOM_VK_Q: i64 = 81;


    pub const DOM_VK_R: i64 = 82;


    pub const DOM_VK_S: i64 = 83;


    pub const DOM_VK_T: i64 = 84;


    pub const DOM_VK_U: i64 = 85;


    pub const DOM_VK_V: i64 = 86;


    pub const DOM_VK_W: i64 = 87;


    pub const DOM_VK_X: i64 = 88;


    pub const DOM_VK_Y: i64 = 89;


    pub const DOM_VK_Z: i64 = 90;


    pub const DOM_VK_WIN: i64 = 91;


    pub const DOM_VK_CONTEXT_MENU: i64 = 93;


    pub const DOM_VK_SLEEP: i64 = 95;


    pub const DOM_VK_NUMPAD0: i64 = 96;


    pub const DOM_VK_NUMPAD1: i64 = 97;


    pub const DOM_VK_NUMPAD2: i64 = 98;


    pub const DOM_VK_NUMPAD3: i64 = 99;


    pub const DOM_VK_NUMPAD4: i64 = 100;


    pub const DOM_VK_NUMPAD5: i64 = 101;


    pub const DOM_VK_NUMPAD6: i64 = 102;


    pub const DOM_VK_NUMPAD7: i64 = 103;


    pub const DOM_VK_NUMPAD8: i64 = 104;


    pub const DOM_VK_NUMPAD9: i64 = 105;


    pub const DOM_VK_MULTIPLY: i64 = 106;


    pub const DOM_VK_ADD: i64 = 107;


    pub const DOM_VK_SEPARATOR: i64 = 108;


    pub const DOM_VK_SUBTRACT: i64 = 109;


    pub const DOM_VK_DECIMAL: i64 = 110;


    pub const DOM_VK_DIVIDE: i64 = 111;


    pub const DOM_VK_F1: i64 = 112;


    pub const DOM_VK_F2: i64 = 113;


    pub const DOM_VK_F3: i64 = 114;


    pub const DOM_VK_F4: i64 = 115;


    pub const DOM_VK_F5: i64 = 116;


    pub const DOM_VK_F6: i64 = 117;


    pub const DOM_VK_F7: i64 = 118;


    pub const DOM_VK_F8: i64 = 119;


    pub const DOM_VK_F9: i64 = 120;


    pub const DOM_VK_F10: i64 = 121;


    pub const DOM_VK_F11: i64 = 122;


    pub const DOM_VK_F12: i64 = 123;


    pub const DOM_VK_F13: i64 = 124;


    pub const DOM_VK_F14: i64 = 125;


    pub const DOM_VK_F15: i64 = 126;


    pub const DOM_VK_F16: i64 = 127;


    pub const DOM_VK_F17: i64 = 128;


    pub const DOM_VK_F18: i64 = 129;


    pub const DOM_VK_F19: i64 = 130;


    pub const DOM_VK_F20: i64 = 131;


    pub const DOM_VK_F21: i64 = 132;


    pub const DOM_VK_F22: i64 = 133;


    pub const DOM_VK_F23: i64 = 134;


    pub const DOM_VK_F24: i64 = 135;


    pub const DOM_VK_NUM_LOCK: i64 = 144;


    pub const DOM_VK_SCROLL_LOCK: i64 = 145;


    pub const DOM_VK_WIN_OEM_FJ_JISHO: i64 = 146;


    pub const DOM_VK_WIN_OEM_FJ_MASSHOU: i64 = 147;


    pub const DOM_VK_WIN_OEM_FJ_TOUROKU: i64 = 148;


    pub const DOM_VK_WIN_OEM_FJ_LOYA: i64 = 149;


    pub const DOM_VK_WIN_OEM_FJ_ROYA: i64 = 150;


    pub const DOM_VK_CIRCUMFLEX: i64 = 160;


    pub const DOM_VK_EXCLAMATION: i64 = 161;


    pub const DOM_VK_DOUBLE_QUOTE: i64 = 162;


    pub const DOM_VK_HASH: i64 = 163;


    pub const DOM_VK_DOLLAR: i64 = 164;


    pub const DOM_VK_PERCENT: i64 = 165;


    pub const DOM_VK_AMPERSAND: i64 = 166;


    pub const DOM_VK_UNDERSCORE: i64 = 167;


    pub const DOM_VK_OPEN_PAREN: i64 = 168;


    pub const DOM_VK_CLOSE_PAREN: i64 = 169;


    pub const DOM_VK_ASTERISK: i64 = 170;


    pub const DOM_VK_PLUS: i64 = 171;


    pub const DOM_VK_PIPE: i64 = 172;


    pub const DOM_VK_HYPHEN_MINUS: i64 = 173;


    pub const DOM_VK_OPEN_CURLY_BRACKET: i64 = 174;


    pub const DOM_VK_CLOSE_CURLY_BRACKET: i64 = 175;


    pub const DOM_VK_TILDE: i64 = 176;


    pub const DOM_VK_VOLUME_MUTE: i64 = 181;


    pub const DOM_VK_VOLUME_DOWN: i64 = 182;


    pub const DOM_VK_VOLUME_UP: i64 = 183;


    pub const DOM_VK_COMMA: i64 = 188;


    pub const DOM_VK_PERIOD: i64 = 190;


    pub const DOM_VK_SLASH: i64 = 191;


    pub const DOM_VK_BACK_QUOTE: i64 = 192;


    pub const DOM_VK_OPEN_BRACKET: i64 = 219;


    pub const DOM_VK_BACK_SLASH: i64 = 220;


    pub const DOM_VK_CLOSE_BRACKET: i64 = 221;


    pub const DOM_VK_QUOTE: i64 = 222;


    pub const DOM_VK_META: i64 = 224;


    pub const DOM_VK_ALTGR: i64 = 225;


    pub const DOM_VK_WIN_ICO_HELP: i64 = 227;


    pub const DOM_VK_WIN_ICO_00: i64 = 228;


    pub const DOM_VK_WIN_ICO_CLEAR: i64 = 230;


    pub const DOM_VK_WIN_OEM_RESET: i64 = 233;


    pub const DOM_VK_WIN_OEM_JUMP: i64 = 234;


    pub const DOM_VK_WIN_OEM_PA1: i64 = 235;


    pub const DOM_VK_WIN_OEM_PA2: i64 = 236;


    pub const DOM_VK_WIN_OEM_PA3: i64 = 237;


    pub const DOM_VK_WIN_OEM_WSCTRL: i64 = 238;


    pub const DOM_VK_WIN_OEM_CUSEL: i64 = 239;


    pub const DOM_VK_WIN_OEM_ATTN: i64 = 240;


    pub const DOM_VK_WIN_OEM_FINISH: i64 = 241;


    pub const DOM_VK_WIN_OEM_COPY: i64 = 242;


    pub const DOM_VK_WIN_OEM_AUTO: i64 = 243;


    pub const DOM_VK_WIN_OEM_ENLW: i64 = 244;


    pub const DOM_VK_WIN_OEM_BACKTAB: i64 = 245;


    pub const DOM_VK_ATTN: i64 = 246;


    pub const DOM_VK_CRSEL: i64 = 247;


    pub const DOM_VK_EXSEL: i64 = 248;


    pub const DOM_VK_EREOF: i64 = 249;


    pub const DOM_VK_PLAY: i64 = 250;


    pub const DOM_VK_ZOOM: i64 = 251;


    pub const DOM_VK_PA1: i64 = 253;


    pub const DOM_VK_WIN_OEM_CLEAR: i64 = 254;


    pub const DOM_KEY_LOCATION_STANDARD: i64 = 0;


    pub const DOM_KEY_LOCATION_LEFT: i64 = 1;


    pub const DOM_KEY_LOCATION_RIGHT: i64 = 2;


    pub const DOM_KEY_LOCATION_NUMPAD: i64 = 3;


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



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



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



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



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



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



    /// `void initKeyEvent (in DOMString typeArg, in boolean canBubbleArg, in boolean cancelableArg, in mozIDOMWindow viewArg, in boolean ctrlKeyArg, in boolean altKeyArg, in boolean shiftKeyArg, in boolean metaKeyArg, in unsigned long keyCodeArg, in unsigned long charCodeArg);`
    #[inline]
    pub unsafe fn InitKeyEvent(&self, typeArg: &::nsstring::nsAString, canBubbleArg: bool, cancelableArg: bool, viewArg: *const mozIDOMWindow, ctrlKeyArg: bool, altKeyArg: bool, shiftKeyArg: bool, metaKeyArg: bool, keyCodeArg: libc::uint32_t, charCodeArg: libc::uint32_t) -> nsresult {
        ((*self.vtable).InitKeyEvent)(self, typeArg, canBubbleArg, cancelableArg, viewArg, ctrlKeyArg, altKeyArg, shiftKeyArg, metaKeyArg, keyCodeArg, charCodeArg)
    }



    /// `bool getModifierState (in DOMString keyArg);`
    #[inline]
    pub unsafe fn GetModifierState(&self, keyArg: &::nsstring::nsAString, _retval: *mut bool) -> nsresult {
        ((*self.vtable).GetModifierState)(self, keyArg, _retval)
    }



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



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



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


}