Bug 1641886 [wpt PR 23851] - Support interpolating contain-intrinsic-size, a=testonly
[gecko.git] / widget / nsIStandaloneNativeMenu.idl
bloba40b3f8840d712ab1f49acffcb7a35a11d77637c
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 * The native object representing the XUL menu that was passed to Init(). On
34 * Mac OS X, this will be a NSMenu pointer, which will be retained and
35 * autoreleased when the attribute is retrieved.
37 [noscript] readonly attribute voidPtr nativeMenu;
39 /**
40 * Activate the native menu item specified by |anIndexString|. This method
41 * is intended to be used by the test suite.
43 * @param anIndexString string containing a list of indices separated by
44 * pipe ('|') characters
46 void activateNativeMenuItemAt(in AString anIndexString);
48 /**
49 * Force an update of the native menu item specified by |anIndexString|. This
50 * method is intended to be used by the test suite.
52 * @param anIndexString string containing a list of indices separated by
53 * pipe ('|') characters
55 void forceUpdateNativeMenuAt(in AString anIndexString);