widget/nsISound.idl
author arthur.iakab <aiakab@mozilla.com>
Fri, 15 Mar 2019 15:50:20 +0200
changeset 522067 5edbe9b1b82220b07ff446bd4a3b9ff2f7dda508
parent 463771 b858515d31112e6b6322495413fa5451e3f944d9
child 534859 020c8c871c0d3b3920fe95935cfef06501976c0f
permissions -rw-r--r--
Backed out 4 changesets (bug 1500713) on request of jcristau for causing Bug 1535603 a=Backout Backed out changeset 5d0cad2c99a4 (bug 1500713) Backed out changeset f96a12eedd89 (bug 1500713) Backed out changeset 2633cea7d119 (bug 1500713) Backed out changeset 49c4cfbf2bee (bug 1500713)

/* -*- 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);
};