Bug 1861709 replace AudioCallbackDriver::ThreadRunning() assertions that mean to...
[gecko.git] / widget / nsIStandaloneNativeMenu.idl
blobb995f1f8b97b53d09bf36c9ea56a645f44cd2adf
1 /* This Source Code Form is subject to the terms of the Mozilla Public
2 * License, v. 2.0. If a copy of the MPL was not distributed with this
3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
5 #include "nsISupports.idl"
7 webidl Element;
9 /**
10 * Platform-independent interface to platform native menu objects.
13 [scriptable, uuid(7F7201EB-510C-4CEF-BDF0-04A15A7A4A8C)]
14 interface nsIStandaloneNativeMenu : nsISupports
16 /**
17 * Initialize the native menu using given XUL DOM element.
19 * @param aDOMElement A XUL DOM element of tag type |menu| or |menupopup|.
21 void init(in Element aElement);
23 /**
24 * This method must be called before the menu is opened and displayed to the
25 * user. It allows the platform code to update the menu and also determine
26 * whether the menu should even be shown.
28 * @return true if the menu can be shown, false if it should not be shown
30 boolean menuWillOpen();
32 /**
33 * Activate the native menu item specified by |anIndexString|. This method
34 * is intended to be used by the test suite.
36 * @param anIndexString string containing a list of indices separated by
37 * pipe ('|') characters
39 void activateNativeMenuItemAt(in AString anIndexString);
41 /**
42 * Force an update of the native menu item specified by |anIndexString|. This
43 * method is intended to be used by the test suite.
45 * @param anIndexString string containing a list of indices separated by
46 * pipe ('|') characters
48 void forceUpdateNativeMenuAt(in AString anIndexString);
50 /**
51 * Print information about the menu structure to stdout. Only used for
52 * debugging.
54 void dump();