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


/// `interface nsIPromptService : nsISupports`
///

/// ```text
/// /**
///  * This is the interface to the embeddable prompt service; the service that
///  * implements nsIPrompt.  Its interface is designed to be just nsIPrompt, each
///  * method modified to take a parent window parameter.
///  *
///  * Accesskeys can be attached to buttons and checkboxes by inserting an &
///  * before the accesskey character in the checkbox message or button title.  For
///  * a real &, use && instead.  (A "button title" generally refers to the text
    ///  * label of a button.)
///  *
///  * One note: in all cases, the parent window parameter can be null.  However,
///  * these windows are all intended to have parents.  So when no parent is
///  * specified, the implementation should try hard to find a suitable foster
///  * parent.
///  *
///  * Implementations are free to choose how they present the various button
///  * types.  For example, while prompts that give the user a choice between OK
///  * and Cancel are required to return a boolean value indicating whether or not
///  * the user accepted the prompt (pressed OK) or rejected the prompt (pressed
    ///  * Cancel), the implementation of this interface could very well speak the
///  * prompt to the user instead of rendering any visual user-interface.  The
///  * standard button types are merely idioms used to convey the nature of the
///  * choice the user is to make.
///  *
///  * Because implementations of this interface may loosely interpret the various
///  * button types, it is advised that text messages passed to these prompts do
///  * not refer to the button types by name.  For example, it is inadvisable to
///  * tell the user to "Press OK to proceed."  Instead, such a prompt might be
///  * rewritten to ask the user: "Would you like to proceed?"
///  */
/// ```
///

// 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 nsIPromptService {
    vtable: *const nsIPromptServiceVTable,

    /// 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 nsIPromptService.
unsafe impl XpCom for nsIPromptService {
    const IID: nsIID = nsID(0x404ebfa2, 0xd8f4, 0x4c94,
        [0x84, 0x16, 0xe6, 0x5a, 0x55, 0xf9, 0xdf, 0x5a]);
}

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

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

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

    /* void alert (in mozIDOMWindowProxy aParent, in wstring aDialogTitle, in wstring aText); */
    pub Alert: unsafe extern "system" fn (this: *const nsIPromptService, aParent: *const mozIDOMWindowProxy, aDialogTitle: *const libc::int16_t, aText: *const libc::int16_t) -> nsresult,

    /* void alertCheck (in mozIDOMWindowProxy aParent, in wstring aDialogTitle, in wstring aText, in wstring aCheckMsg, inout boolean aCheckState); */
    pub AlertCheck: unsafe extern "system" fn (this: *const nsIPromptService, aParent: *const mozIDOMWindowProxy, aDialogTitle: *const libc::int16_t, aText: *const libc::int16_t, aCheckMsg: *const libc::int16_t, aCheckState: *mut bool) -> nsresult,

    /* boolean confirm (in mozIDOMWindowProxy aParent, in wstring aDialogTitle, in wstring aText); */
    pub Confirm: unsafe extern "system" fn (this: *const nsIPromptService, aParent: *const mozIDOMWindowProxy, aDialogTitle: *const libc::int16_t, aText: *const libc::int16_t, _retval: *mut bool) -> nsresult,

    /* boolean confirmCheck (in mozIDOMWindowProxy aParent, in wstring aDialogTitle, in wstring aText, in wstring aCheckMsg, inout boolean aCheckState); */
    pub ConfirmCheck: unsafe extern "system" fn (this: *const nsIPromptService, aParent: *const mozIDOMWindowProxy, aDialogTitle: *const libc::int16_t, aText: *const libc::int16_t, aCheckMsg: *const libc::int16_t, aCheckState: *mut bool, _retval: *mut bool) -> nsresult,

    /* int32_t confirmEx (in mozIDOMWindowProxy aParent, in wstring aDialogTitle, in wstring aText, in unsigned long aButtonFlags, in wstring aButton0Title, in wstring aButton1Title, in wstring aButton2Title, in wstring aCheckMsg, inout boolean aCheckState); */
    pub ConfirmEx: unsafe extern "system" fn (this: *const nsIPromptService, aParent: *const mozIDOMWindowProxy, aDialogTitle: *const libc::int16_t, aText: *const libc::int16_t, aButtonFlags: libc::uint32_t, aButton0Title: *const libc::int16_t, aButton1Title: *const libc::int16_t, aButton2Title: *const libc::int16_t, aCheckMsg: *const libc::int16_t, aCheckState: *mut bool, _retval: *mut int32_t) -> nsresult,

    /* boolean prompt (in mozIDOMWindowProxy aParent, in wstring aDialogTitle, in wstring aText, inout wstring aValue, in wstring aCheckMsg, inout boolean aCheckState); */
    pub Prompt: unsafe extern "system" fn (this: *const nsIPromptService, aParent: *const mozIDOMWindowProxy, aDialogTitle: *const libc::int16_t, aText: *const libc::int16_t, aValue: *mut *const libc::int16_t, aCheckMsg: *const libc::int16_t, aCheckState: *mut bool, _retval: *mut bool) -> nsresult,

    /* boolean promptUsernameAndPassword (in mozIDOMWindowProxy aParent, in wstring aDialogTitle, in wstring aText, inout wstring aUsername, inout wstring aPassword, in wstring aCheckMsg, inout boolean aCheckState); */
    pub PromptUsernameAndPassword: unsafe extern "system" fn (this: *const nsIPromptService, aParent: *const mozIDOMWindowProxy, aDialogTitle: *const libc::int16_t, aText: *const libc::int16_t, aUsername: *mut *const libc::int16_t, aPassword: *mut *const libc::int16_t, aCheckMsg: *const libc::int16_t, aCheckState: *mut bool, _retval: *mut bool) -> nsresult,

    /* boolean promptPassword (in mozIDOMWindowProxy aParent, in wstring aDialogTitle, in wstring aText, inout wstring aPassword, in wstring aCheckMsg, inout boolean aCheckState); */
    pub PromptPassword: unsafe extern "system" fn (this: *const nsIPromptService, aParent: *const mozIDOMWindowProxy, aDialogTitle: *const libc::int16_t, aText: *const libc::int16_t, aPassword: *mut *const libc::int16_t, aCheckMsg: *const libc::int16_t, aCheckState: *mut bool, _retval: *mut bool) -> nsresult,

    /* boolean select (in mozIDOMWindowProxy aParent, in wstring aDialogTitle, in wstring aText, in uint32_t aCount, [array, size_is (aCount)] in wstring aSelectList, out long aOutSelection); */
    pub Select: unsafe extern "system" fn (this: *const nsIPromptService, aParent: *const mozIDOMWindowProxy, aDialogTitle: *const libc::int16_t, aText: *const libc::int16_t, aCount: uint32_t, aSelectList: *mut *const libc::int16_t, aOutSelection: *mut libc::int32_t, _retval: *mut bool) -> nsresult,

    /* boolean promptAuth (in mozIDOMWindowProxy aParent, in nsIChannel aChannel, in uint32_t level, in nsIAuthInformation authInfo, in wstring checkboxLabel, inout boolean checkValue); */
    pub PromptAuth: unsafe extern "system" fn (this: *const nsIPromptService, aParent: *const mozIDOMWindowProxy, aChannel: *const nsIChannel, level: uint32_t, authInfo: *const nsIAuthInformation, checkboxLabel: *const libc::int16_t, checkValue: *mut bool, _retval: *mut bool) -> nsresult,

    /* nsICancelable asyncPromptAuth (in mozIDOMWindowProxy aParent, in nsIChannel aChannel, in nsIAuthPromptCallback aCallback, in nsISupports aContext, in uint32_t level, in nsIAuthInformation authInfo, in wstring checkboxLabel, inout boolean checkValue); */
    pub AsyncPromptAuth: unsafe extern "system" fn (this: *const nsIPromptService, aParent: *const mozIDOMWindowProxy, aChannel: *const nsIChannel, aCallback: *const nsIAuthPromptCallback, aContext: *const nsISupports, level: uint32_t, authInfo: *const nsIAuthInformation, checkboxLabel: *const libc::int16_t, checkValue: *mut bool, _retval: *mut *const nsICancelable) -> 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 nsIPromptService {
    /// ```text
    /// /**
    ///    * Button Flags
    ///    *
    ///    * The following flags are combined to form the aButtonFlags parameter passed
    ///    * to confirmEx.  See confirmEx for more information on how the flags may be
    ///    * combined.
    ///    */
    /// /**
    ///    * Button Position Flags
    ///    */
    /// ```
    ///

    pub const BUTTON_POS_0: i64 = 1;


    pub const BUTTON_POS_1: i64 = 256;


    pub const BUTTON_POS_2: i64 = 65536;

    /// ```text
    /// /**
    ///    * Button Title Flags (used to set the labels of buttons in the prompt)
    ///    */
    /// ```
    ///

    pub const BUTTON_TITLE_OK: i64 = 1;


    pub const BUTTON_TITLE_CANCEL: i64 = 2;


    pub const BUTTON_TITLE_YES: i64 = 3;


    pub const BUTTON_TITLE_NO: i64 = 4;


    pub const BUTTON_TITLE_SAVE: i64 = 5;


    pub const BUTTON_TITLE_DONT_SAVE: i64 = 6;


    pub const BUTTON_TITLE_REVERT: i64 = 7;


    pub const BUTTON_TITLE_IS_STRING: i64 = 127;

    /// ```text
    /// /**
    ///    * Button Default Flags (used to select which button is the default one)
    ///    */
    /// ```
    ///

    pub const BUTTON_POS_0_DEFAULT: i64 = 0;


    pub const BUTTON_POS_1_DEFAULT: i64 = 16777216;


    pub const BUTTON_POS_2_DEFAULT: i64 = 33554432;

    /// ```text
    /// /**
    ///    * Causes the buttons to be initially disabled.  They are enabled after a
    ///    * timeout expires.  The implementation may interpret this loosely as the
    ///    * intent is to ensure that the user does not click through a security dialog
    ///    * too quickly.  Strictly speaking, the implementation could choose to ignore
    ///    * this flag.
    ///    */
    /// ```
    ///

    pub const BUTTON_DELAY_ENABLE: i64 = 67108864;

    /// ```text
    /// /**
    ///    * Selects the standard set of OK/Cancel buttons.
    ///    */
    /// ```
    ///

    pub const STD_OK_CANCEL_BUTTONS: i64 = 513;

    /// ```text
    /// /**
    ///    * Selects the standard set of Yes/No buttons.
    ///    */
    /// ```
    ///

    pub const STD_YES_NO_BUTTONS: i64 = 1027;

    /// ```text
    /// /**
    ///    * Puts up an alert dialog with an OK button.
    ///    *
    ///    * @param aParent
    ///    *        The parent window or null.
    ///    * @param aDialogTitle
    ///    *        Text to appear in the title of the dialog.
    ///    * @param aText
    ///    *        Text to appear in the body of the dialog.
    ///    */
    /// ```
    ///

    /// `void alert (in mozIDOMWindowProxy aParent, in wstring aDialogTitle, in wstring aText);`
    #[inline]
    pub unsafe fn Alert(&self, aParent: *const mozIDOMWindowProxy, aDialogTitle: *const libc::int16_t, aText: *const libc::int16_t) -> nsresult {
        ((*self.vtable).Alert)(self, aParent, aDialogTitle, aText)
    }


    /// ```text
    /// /**
    ///    * Puts up an alert dialog with an OK button and a labeled checkbox.
    ///    *
    ///    * @param aParent
    ///    *        The parent window or null.
    ///    * @param aDialogTitle
    ///    *        Text to appear in the title of the dialog.
    ///    * @param aText
    ///    *        Text to appear in the body of the dialog.
    ///    * @param aCheckMsg
    ///    *        Text to appear with the checkbox.
    ///    * @param aCheckState
    ///    *        Contains the initial checked state of the checkbox when this method
    ///    *        is called and the final checked state after this method returns.
    ///    */
    /// ```
    ///

    /// `void alertCheck (in mozIDOMWindowProxy aParent, in wstring aDialogTitle, in wstring aText, in wstring aCheckMsg, inout boolean aCheckState);`
    #[inline]
    pub unsafe fn AlertCheck(&self, aParent: *const mozIDOMWindowProxy, aDialogTitle: *const libc::int16_t, aText: *const libc::int16_t, aCheckMsg: *const libc::int16_t, aCheckState: *mut bool) -> nsresult {
        ((*self.vtable).AlertCheck)(self, aParent, aDialogTitle, aText, aCheckMsg, aCheckState)
    }


    /// ```text
    /// /**
    ///    * Puts up a dialog with OK and Cancel buttons.
    ///    *
    ///    * @param aParent
    ///    *        The parent window or null.
    ///    * @param aDialogTitle
    ///    *        Text to appear in the title of the dialog.
    ///    * @param aText
    ///    *        Text to appear in the body of the dialog.
    ///    *
    ///    * @return true for OK, false for Cancel
    ///    */
    /// ```
    ///

    /// `boolean confirm (in mozIDOMWindowProxy aParent, in wstring aDialogTitle, in wstring aText);`
    #[inline]
    pub unsafe fn Confirm(&self, aParent: *const mozIDOMWindowProxy, aDialogTitle: *const libc::int16_t, aText: *const libc::int16_t, _retval: *mut bool) -> nsresult {
        ((*self.vtable).Confirm)(self, aParent, aDialogTitle, aText, _retval)
    }


    /// ```text
    /// /**
    ///    * Puts up a dialog with OK and Cancel buttons and a labeled checkbox.
    ///    *
    ///    * @param aParent
    ///    *        The parent window or null.
    ///    * @param aDialogTitle
    ///    *        Text to appear in the title of the dialog.
    ///    * @param aText
    ///    *        Text to appear in the body of the dialog.
    ///    * @param aCheckMsg
    ///    *        Text to appear with the checkbox.
    ///    * @param aCheckState
    ///    *        Contains the initial checked state of the checkbox when this method
    ///    *        is called and the final checked state after this method returns.
    ///    *
    ///    * @return true for OK, false for Cancel
    ///    */
    /// ```
    ///

    /// `boolean confirmCheck (in mozIDOMWindowProxy aParent, in wstring aDialogTitle, in wstring aText, in wstring aCheckMsg, inout boolean aCheckState);`
    #[inline]
    pub unsafe fn ConfirmCheck(&self, aParent: *const mozIDOMWindowProxy, aDialogTitle: *const libc::int16_t, aText: *const libc::int16_t, aCheckMsg: *const libc::int16_t, aCheckState: *mut bool, _retval: *mut bool) -> nsresult {
        ((*self.vtable).ConfirmCheck)(self, aParent, aDialogTitle, aText, aCheckMsg, aCheckState, _retval)
    }


    /// ```text
    /// /**
    ///    * Puts up a dialog with up to 3 buttons and an optional, labeled checkbox.
    ///    *
    ///    * @param aParent
    ///    *        The parent window or null.
    ///    * @param aDialogTitle
    ///    *        Text to appear in the title of the dialog.
    ///    * @param aText
    ///    *        Text to appear in the body of the dialog.
    ///    * @param aButtonFlags
    ///    *        A combination of Button Flags.
    ///    * @param aButton0Title
    ///    *        Used when button 0 uses TITLE_IS_STRING
    ///    * @param aButton1Title
    ///    *        Used when button 1 uses TITLE_IS_STRING
    ///    * @param aButton2Title
    ///    *        Used when button 2 uses TITLE_IS_STRING
    ///    * @param aCheckMsg
    ///    *        Text to appear with the checkbox.  Null if no checkbox.
    ///    * @param aCheckState
    ///    *        Contains the initial checked state of the checkbox when this method
    ///    *        is called and the final checked state after this method returns.
    ///    *
    ///    * @return index of the button pressed.
    ///    *
    ///    * Buttons are numbered 0 - 2. The implementation can decide whether the
    ///    * sequence goes from right to left or left to right.  Button 0 is the
    ///    * default button unless one of the Button Default Flags is specified.
    ///    *
    ///    * A button may use a predefined title, specified by one of the Button Title
    ///    * Flags values.  Each title value can be multiplied by a position value to
    ///    * assign the title to a particular button.  If BUTTON_TITLE_IS_STRING is
    ///    * used for a button, the string parameter for that button will be used.  If
    ///    * the value for a button position is zero, the button will not be shown.
    ///    *
    ///    * In general, aButtonFlags is constructed per the following example:
    ///    *
    ///    *   aButtonFlags = (BUTTON_POS_0) * (BUTTON_TITLE_AAA) +
    ///    *                  (BUTTON_POS_1) * (BUTTON_TITLE_BBB) +
    ///    *                   BUTTON_POS_1_DEFAULT;
    ///    *
    ///    * where "AAA" and "BBB" correspond to one of the button titles.
    ///    */
    /// ```
    ///

    /// `int32_t confirmEx (in mozIDOMWindowProxy aParent, in wstring aDialogTitle, in wstring aText, in unsigned long aButtonFlags, in wstring aButton0Title, in wstring aButton1Title, in wstring aButton2Title, in wstring aCheckMsg, inout boolean aCheckState);`
    #[inline]
    pub unsafe fn ConfirmEx(&self, aParent: *const mozIDOMWindowProxy, aDialogTitle: *const libc::int16_t, aText: *const libc::int16_t, aButtonFlags: libc::uint32_t, aButton0Title: *const libc::int16_t, aButton1Title: *const libc::int16_t, aButton2Title: *const libc::int16_t, aCheckMsg: *const libc::int16_t, aCheckState: *mut bool, _retval: *mut int32_t) -> nsresult {
        ((*self.vtable).ConfirmEx)(self, aParent, aDialogTitle, aText, aButtonFlags, aButton0Title, aButton1Title, aButton2Title, aCheckMsg, aCheckState, _retval)
    }


    /// ```text
    /// /**
    ///    * Puts up a dialog with an edit field and an optional, labeled checkbox.
    ///    *
    ///    * @param aParent
    ///    *        The parent window or null.
    ///    * @param aDialogTitle
    ///    *        Text to appear in the title of the dialog.
    ///    * @param aText
    ///    *        Text to appear in the body of the dialog.
    ///    * @param aValue
    ///    *        Contains the default value for the dialog field when this method
    ///    *        is called (null value is ok).  Upon return, if the user pressed
    ///    *        OK, then this parameter contains a newly allocated string value.
    ///    *        Otherwise, the parameter's value is unmodified.
    ///    * @param aCheckMsg
    ///    *        Text to appear with the checkbox.  If null, check box will not be shown.
    ///    * @param aCheckState
    ///    *        Contains the initial checked state of the checkbox when this method
    ///    *        is called and the final checked state after this method returns.
    ///    *
    ///    * @return true for OK, false for Cancel.
    ///    */
    /// ```
    ///

    /// `boolean prompt (in mozIDOMWindowProxy aParent, in wstring aDialogTitle, in wstring aText, inout wstring aValue, in wstring aCheckMsg, inout boolean aCheckState);`
    #[inline]
    pub unsafe fn Prompt(&self, aParent: *const mozIDOMWindowProxy, aDialogTitle: *const libc::int16_t, aText: *const libc::int16_t, aValue: *mut *const libc::int16_t, aCheckMsg: *const libc::int16_t, aCheckState: *mut bool, _retval: *mut bool) -> nsresult {
        ((*self.vtable).Prompt)(self, aParent, aDialogTitle, aText, aValue, aCheckMsg, aCheckState, _retval)
    }


    /// ```text
    /// /**
    ///    * Puts up a dialog with an edit field, a password field, and an optional,
    ///    * labeled checkbox.
    ///    *
    ///    * @param aParent
    ///    *        The parent window or null.
    ///    * @param aDialogTitle
    ///    *        Text to appear in the title of the dialog.
    ///    * @param aText
    ///    *        Text to appear in the body of the dialog.
    ///    * @param aUsername
    ///    *        Contains the default value for the username field when this method
    ///    *        is called (null value is ok).  Upon return, if the user pressed OK,
    ///    *        then this parameter contains a newly allocated string value.
    ///    *        Otherwise, the parameter's value is unmodified.
    ///    * @param aPassword
    ///    *        Contains the default value for the password field when this method
    ///    *        is called (null value is ok).  Upon return, if the user pressed OK,
    ///    *        then this parameter contains a newly allocated string value.
    ///    *        Otherwise, the parameter's value is unmodified.
    ///    * @param aCheckMsg
    ///    *        Text to appear with the checkbox.  If null, check box will not be shown.
    ///    * @param aCheckState
    ///    *        Contains the initial checked state of the checkbox when this method
    ///    *        is called and the final checked state after this method returns.
    ///    *
    ///    * @return true for OK, false for Cancel.
    ///    */
    /// ```
    ///

    /// `boolean promptUsernameAndPassword (in mozIDOMWindowProxy aParent, in wstring aDialogTitle, in wstring aText, inout wstring aUsername, inout wstring aPassword, in wstring aCheckMsg, inout boolean aCheckState);`
    #[inline]
    pub unsafe fn PromptUsernameAndPassword(&self, aParent: *const mozIDOMWindowProxy, aDialogTitle: *const libc::int16_t, aText: *const libc::int16_t, aUsername: *mut *const libc::int16_t, aPassword: *mut *const libc::int16_t, aCheckMsg: *const libc::int16_t, aCheckState: *mut bool, _retval: *mut bool) -> nsresult {
        ((*self.vtable).PromptUsernameAndPassword)(self, aParent, aDialogTitle, aText, aUsername, aPassword, aCheckMsg, aCheckState, _retval)
    }


    /// ```text
    /// /**
    ///    * Puts up a dialog with a password field and an optional, labeled checkbox.
    ///    *
    ///    * @param aParent
    ///    *        The parent window or null.
    ///    * @param aDialogTitle
    ///    *        Text to appear in the title of the dialog.
    ///    * @param aText
    ///    *        Text to appear in the body of the dialog.
    ///    * @param aPassword
    ///    *        Contains the default value for the password field when this method
    ///    *        is called (null value is ok).  Upon return, if the user pressed OK,
    ///    *        then this parameter contains a newly allocated string value.
    ///    *        Otherwise, the parameter's value is unmodified.
    ///    * @param aCheckMsg
    ///    *        Text to appear with the checkbox.  If null, check box will not be shown.
    ///    * @param aCheckState
    ///    *        Contains the initial checked state of the checkbox when this method
    ///    *        is called and the final checked state after this method returns.
    ///    *
    ///    * @return true for OK, false for Cancel.
    ///    */
    /// ```
    ///

    /// `boolean promptPassword (in mozIDOMWindowProxy aParent, in wstring aDialogTitle, in wstring aText, inout wstring aPassword, in wstring aCheckMsg, inout boolean aCheckState);`
    #[inline]
    pub unsafe fn PromptPassword(&self, aParent: *const mozIDOMWindowProxy, aDialogTitle: *const libc::int16_t, aText: *const libc::int16_t, aPassword: *mut *const libc::int16_t, aCheckMsg: *const libc::int16_t, aCheckState: *mut bool, _retval: *mut bool) -> nsresult {
        ((*self.vtable).PromptPassword)(self, aParent, aDialogTitle, aText, aPassword, aCheckMsg, aCheckState, _retval)
    }


    /// ```text
    /// /**
    ///    * Puts up a dialog box which has a list box of strings from which the user
    ///    * may make a single selection.
    ///    *
    ///    * @param aParent
    ///    *        The parent window or null.
    ///    * @param aDialogTitle
    ///    *        Text to appear in the title of the dialog.
    ///    * @param aText
    ///    *        Text to appear in the body of the dialog.
    ///    * @param aCount
    ///    *        The length of the aSelectList array parameter.
    ///    * @param aSelectList
    ///    *        The list of strings to display.
    ///    * @param aOutSelection
    ///    *        Contains the index of the selected item in the list when this
    ///    *        method returns true.
    ///    *
    ///    * @return true for OK, false for Cancel.
    ///    */
    /// ```
    ///

    /// `boolean select (in mozIDOMWindowProxy aParent, in wstring aDialogTitle, in wstring aText, in uint32_t aCount, [array, size_is (aCount)] in wstring aSelectList, out long aOutSelection);`
    #[inline]
    pub unsafe fn Select(&self, aParent: *const mozIDOMWindowProxy, aDialogTitle: *const libc::int16_t, aText: *const libc::int16_t, aCount: uint32_t, aSelectList: *mut *const libc::int16_t, aOutSelection: *mut libc::int32_t, _retval: *mut bool) -> nsresult {
        ((*self.vtable).Select)(self, aParent, aDialogTitle, aText, aCount, aSelectList, aOutSelection, _retval)
    }



    /// `boolean promptAuth (in mozIDOMWindowProxy aParent, in nsIChannel aChannel, in uint32_t level, in nsIAuthInformation authInfo, in wstring checkboxLabel, inout boolean checkValue);`
    #[inline]
    pub unsafe fn PromptAuth(&self, aParent: *const mozIDOMWindowProxy, aChannel: *const nsIChannel, level: uint32_t, authInfo: *const nsIAuthInformation, checkboxLabel: *const libc::int16_t, checkValue: *mut bool, _retval: *mut bool) -> nsresult {
        ((*self.vtable).PromptAuth)(self, aParent, aChannel, level, authInfo, checkboxLabel, checkValue, _retval)
    }



    /// `nsICancelable asyncPromptAuth (in mozIDOMWindowProxy aParent, in nsIChannel aChannel, in nsIAuthPromptCallback aCallback, in nsISupports aContext, in uint32_t level, in nsIAuthInformation authInfo, in wstring checkboxLabel, inout boolean checkValue);`
    #[inline]
    pub unsafe fn AsyncPromptAuth(&self, aParent: *const mozIDOMWindowProxy, aChannel: *const nsIChannel, aCallback: *const nsIAuthPromptCallback, aContext: *const nsISupports, level: uint32_t, authInfo: *const nsIAuthInformation, checkboxLabel: *const libc::int16_t, checkValue: *mut bool, _retval: *mut *const nsICancelable) -> nsresult {
        ((*self.vtable).AsyncPromptAuth)(self, aParent, aChannel, aCallback, aContext, level, authInfo, checkboxLabel, checkValue, _retval)
    }


}