Backed out changeset 0c01a856e4c3 (bug 1870427) as requested by Emilio CLOSED TREE
[gecko.git] / widget / nsISound.idl
blobc3aca6674d2b2d079f9caf8d8c8b8a83300d8e95
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
3 * This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
7 #include "nsISupports.idl"
9 interface nsIURL;
11 [scriptable, uuid(C3C28D92-A17F-43DF-976D-4EEAE6F995FC)]
12 interface nsISound : nsISupports
14 void play(in nsIURL aURL);
15 void beep();
17 /**
18 * Not strictly necessary, but avoids delay before first sound.
19 * The various methods on nsISound call Init() if they need to.
21 void init();
23 /**
24 * In some situations, playEventSound will be called. Then, each
25 * implementations will play a system sound for the event if it's necessary.
27 const unsigned long EVENT_NEW_MAIL_RECEIVED = 0;
28 const unsigned long EVENT_ALERT_DIALOG_OPEN = 1;
29 const unsigned long EVENT_CONFIRM_DIALOG_OPEN = 2;
30 const unsigned long EVENT_PROMPT_DIALOG_OPEN = 3;
31 const unsigned long EVENT_SELECT_DIALOG_OPEN = 4;
32 const unsigned long EVENT_MENU_EXECUTE = 5;
33 const unsigned long EVENT_MENU_POPUP = 6;
34 const unsigned long EVENT_EDITOR_MAX_LEN = 7;
35 void playEventSound(in unsigned long aEventId);