summaryrefslogtreecommitdiffstats
path: root/widget/nsISound.idl
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 19:33:14 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 19:33:14 +0000
commit36d22d82aa202bb199967e9512281e9a53db42c9 (patch)
tree105e8c98ddea1c1e4784a60a5a6410fa416be2de /widget/nsISound.idl
parentInitial commit. (diff)
downloadfirefox-esr-36d22d82aa202bb199967e9512281e9a53db42c9.tar.xz
firefox-esr-36d22d82aa202bb199967e9512281e9a53db42c9.zip
Adding upstream version 115.7.0esr.upstream/115.7.0esrupstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'widget/nsISound.idl')
-rw-r--r--widget/nsISound.idl40
1 files changed, 40 insertions, 0 deletions
diff --git a/widget/nsISound.idl b/widget/nsISound.idl
new file mode 100644
index 0000000000..8b4a2f29c0
--- /dev/null
+++ b/widget/nsISound.idl
@@ -0,0 +1,40 @@
+/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+#include "nsISupports.idl"
+
+interface nsIURL;
+
+[scriptable, uuid(C3C28D92-A17F-43DF-976D-4EEAE6F995FC)]
+interface nsISound : nsISupports
+{
+ void play(in nsIURL aURL);
+ void beep();
+
+ /**
+ * Not strictly necessary, but avoids delay before first sound.
+ * The various methods on nsISound call Init() if they need to.
+ */
+ void init();
+
+ /**
+ * In some situations, playEventSound will be called. Then, each
+ * implementations will play a system sound for the event if it's necessary.
+ *
+ * NOTE: Don't change these values because they are used in
+ * nsPIPromptService.idl. So, if they are changed, that makes big impact for
+ * the embedders.
+ */
+ const unsigned long EVENT_NEW_MAIL_RECEIVED = 0;
+ const unsigned long EVENT_ALERT_DIALOG_OPEN = 1;
+ const unsigned long EVENT_CONFIRM_DIALOG_OPEN = 2;
+ const unsigned long EVENT_PROMPT_DIALOG_OPEN = 3;
+ const unsigned long EVENT_SELECT_DIALOG_OPEN = 4;
+ const unsigned long EVENT_MENU_EXECUTE = 5;
+ const unsigned long EVENT_MENU_POPUP = 6;
+ const unsigned long EVENT_EDITOR_MAX_LEN = 7;
+ void playEventSound(in unsigned long aEventId);
+};