diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 19:33:14 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 19:33:14 +0000 |
commit | 36d22d82aa202bb199967e9512281e9a53db42c9 (patch) | |
tree | 105e8c98ddea1c1e4784a60a5a6410fa416be2de /dom/interfaces/xul | |
parent | Initial commit. (diff) | |
download | firefox-esr-upstream.tar.xz firefox-esr-upstream.zip |
Adding upstream version 115.7.0esr.upstream/115.7.0esrupstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | dom/interfaces/xul/moz.build | 23 | ||||
-rw-r--r-- | dom/interfaces/xul/nsIDOMXULButtonElement.idl | 20 | ||||
-rw-r--r-- | dom/interfaces/xul/nsIDOMXULCommandDispatcher.idl | 41 | ||||
-rw-r--r-- | dom/interfaces/xul/nsIDOMXULContainerElement.idl | 23 | ||||
-rw-r--r-- | dom/interfaces/xul/nsIDOMXULControlElement.idl | 19 | ||||
-rw-r--r-- | dom/interfaces/xul/nsIDOMXULMenuListElement.idl | 19 | ||||
-rw-r--r-- | dom/interfaces/xul/nsIDOMXULMultSelectCntrlEl.idl | 36 | ||||
-rw-r--r-- | dom/interfaces/xul/nsIDOMXULRadioGroupElement.idl | 13 | ||||
-rw-r--r-- | dom/interfaces/xul/nsIDOMXULRelatedElement.idl | 21 | ||||
-rw-r--r-- | dom/interfaces/xul/nsIDOMXULSelectCntrlEl.idl | 21 | ||||
-rw-r--r-- | dom/interfaces/xul/nsIDOMXULSelectCntrlItemEl.idl | 27 |
11 files changed, 263 insertions, 0 deletions
diff --git a/dom/interfaces/xul/moz.build b/dom/interfaces/xul/moz.build new file mode 100644 index 0000000000..5c7b5d3a9d --- /dev/null +++ b/dom/interfaces/xul/moz.build @@ -0,0 +1,23 @@ +# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*- +# vim: set filetype=python: +# 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/. + +with Files("**"): + BUG_COMPONENT = ("Core", "XUL") + +XPIDL_SOURCES += [ + "nsIDOMXULButtonElement.idl", + "nsIDOMXULCommandDispatcher.idl", + "nsIDOMXULContainerElement.idl", + "nsIDOMXULControlElement.idl", + "nsIDOMXULMenuListElement.idl", + "nsIDOMXULMultSelectCntrlEl.idl", + "nsIDOMXULRadioGroupElement.idl", + "nsIDOMXULRelatedElement.idl", + "nsIDOMXULSelectCntrlEl.idl", + "nsIDOMXULSelectCntrlItemEl.idl", +] + +XPIDL_MODULE = "dom_xul" diff --git a/dom/interfaces/xul/nsIDOMXULButtonElement.idl b/dom/interfaces/xul/nsIDOMXULButtonElement.idl new file mode 100644 index 0000000000..88fefa94ce --- /dev/null +++ b/dom/interfaces/xul/nsIDOMXULButtonElement.idl @@ -0,0 +1,20 @@ +/* -*- Mode: IDL; 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 "nsIDOMXULControlElement.idl" + +[scriptable, uuid(6ed53cfb-9e59-424c-af8d-e74582381951)] +interface nsIDOMXULButtonElement : nsIDOMXULControlElement { + attribute AString type; + + // For buttons of type="menu" only. + attribute boolean open; + + // For buttons of type="checkbox" only. + attribute boolean checked; + + // For buttons of type="radio" only. + attribute AString group; +}; diff --git a/dom/interfaces/xul/nsIDOMXULCommandDispatcher.idl b/dom/interfaces/xul/nsIDOMXULCommandDispatcher.idl new file mode 100644 index 0000000000..21ac541505 --- /dev/null +++ b/dom/interfaces/xul/nsIDOMXULCommandDispatcher.idl @@ -0,0 +1,41 @@ +/* -*- Mode: IDL; 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 nsIController; +interface nsIControllers; +interface mozIDOMWindowProxy; + +webidl Element; + +[scriptable, uuid(a9fa9fd3-8d62-4f94-9ed8-3ea9c3cf0773)] +interface nsIDOMXULCommandDispatcher : nsISupports +{ + [setter_can_run_script] + attribute Element focusedElement; + [setter_can_run_script] + attribute mozIDOMWindowProxy focusedWindow; + + void addCommandUpdater(in Element updater, + in AString events, + in AString targets); + void removeCommandUpdater(in Element updater); + + [can_run_script] + void updateCommands(in AString eventName); + + nsIController getControllerForCommand(in string command); + nsIControllers getControllers(); + + void advanceFocus(); + void rewindFocus(); + void advanceFocusIntoSubtree(in Element elt); + + // When locked, command updating is batched until unlocked. Always ensure that + // lock and unlock is called in a pair. + void lock(); + void unlock(); +}; diff --git a/dom/interfaces/xul/nsIDOMXULContainerElement.idl b/dom/interfaces/xul/nsIDOMXULContainerElement.idl new file mode 100644 index 0000000000..78b8275f35 --- /dev/null +++ b/dom/interfaces/xul/nsIDOMXULContainerElement.idl @@ -0,0 +1,23 @@ +/* -*- Mode: IDL; 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 nsIDOMXULContainerElement; + +webidl Element; + +[scriptable, uuid(800a68c7-b854-4597-a436-3055ce5c5c96)] +interface nsIDOMXULContainerItemElement : nsISupports +{ + /** + * Returns the parent container if any. + */ + readonly attribute Element parentContainer; +}; + +[scriptable, uuid(b2bc96b8-31fc-42f4-937a-bd27291af40b)] +interface nsIDOMXULContainerElement : nsIDOMXULContainerItemElement +{ +}; diff --git a/dom/interfaces/xul/nsIDOMXULControlElement.idl b/dom/interfaces/xul/nsIDOMXULControlElement.idl new file mode 100644 index 0000000000..0ddf5e8864 --- /dev/null +++ b/dom/interfaces/xul/nsIDOMXULControlElement.idl @@ -0,0 +1,19 @@ +/* -*- Mode: IDL; 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 nsIControllers; + +[scriptable, uuid(bdc1d047-6d22-4813-bc50-638ccb349c7d)] +interface nsIDOMXULControlElement : nsISupports { + attribute boolean disabled; + +// XXX defined in XULElement, but should be defined here +// readonly attribute nsIControllers controllers; + +// void focus(); +// void blur(); +}; diff --git a/dom/interfaces/xul/nsIDOMXULMenuListElement.idl b/dom/interfaces/xul/nsIDOMXULMenuListElement.idl new file mode 100644 index 0000000000..689c823ff0 --- /dev/null +++ b/dom/interfaces/xul/nsIDOMXULMenuListElement.idl @@ -0,0 +1,19 @@ +/* -*- Mode: IDL; 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 "nsIDOMXULSelectCntrlEl.idl" + +webidl Element; + +[scriptable, uuid(36c16a17-c0e9-4b35-951b-81a147314ef1)] +interface nsIDOMXULMenuListElement : nsIDOMXULSelectControlElement { + attribute boolean editable; + attribute boolean open; + + // label of selected option or value of textfield for editable menu lists + readonly attribute AString label; + + attribute AString image; +}; diff --git a/dom/interfaces/xul/nsIDOMXULMultSelectCntrlEl.idl b/dom/interfaces/xul/nsIDOMXULMultSelectCntrlEl.idl new file mode 100644 index 0000000000..03db9c3bc8 --- /dev/null +++ b/dom/interfaces/xul/nsIDOMXULMultSelectCntrlEl.idl @@ -0,0 +1,36 @@ +/* -*- Mode: IDL; 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 "nsIDOMXULSelectCntrlEl.idl" + +webidl Element; +webidl NodeList; + +[scriptable, uuid(40654a10-8204-4f06-9f21-7baa31c7b1dd)] +interface nsIDOMXULMultiSelectControlElement : nsIDOMXULSelectControlElement +{ + attribute AString selType; + + attribute Element currentItem; + attribute long currentIndex; + + readonly attribute NodeList selectedItems; + + void addItemToSelection(in nsIDOMXULSelectControlItemElement item); + void removeItemFromSelection(in nsIDOMXULSelectControlItemElement item); + void toggleItemSelection(in nsIDOMXULSelectControlItemElement item); + + void selectItem(in nsIDOMXULSelectControlItemElement item); + void selectItemRange(in nsIDOMXULSelectControlItemElement startItem, in nsIDOMXULSelectControlItemElement item); + + void selectAll(); + void clearSelection(); + + // XXX - temporary, pending implementation of scriptable, + // mutable NodeList for selectedItems + readonly attribute long selectedCount; + [binaryname(MultiGetSelectedItem)] + Element getSelectedItem(in long index); +}; diff --git a/dom/interfaces/xul/nsIDOMXULRadioGroupElement.idl b/dom/interfaces/xul/nsIDOMXULRadioGroupElement.idl new file mode 100644 index 0000000000..6ec16d833c --- /dev/null +++ b/dom/interfaces/xul/nsIDOMXULRadioGroupElement.idl @@ -0,0 +1,13 @@ +/* -*- Mode: IDL; 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" + +webidl Element; + +[scriptable, uuid(2cc1d24b-ec9f-4e18-aa34-a298a9007f23)] +interface nsIDOMXULRadioGroupElement : nsISupports { + attribute Element focusedItem; +}; diff --git a/dom/interfaces/xul/nsIDOMXULRelatedElement.idl b/dom/interfaces/xul/nsIDOMXULRelatedElement.idl new file mode 100644 index 0000000000..428db2ba5d --- /dev/null +++ b/dom/interfaces/xul/nsIDOMXULRelatedElement.idl @@ -0,0 +1,21 @@ +/* -*- Mode: IDL; 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 "domstubs.idl" + +webidl Element; +webidl Node; + +[scriptable, uuid(9fbac05a-fb27-470d-8e5f-028b2dc54ad0)] +interface nsIDOMXULRelatedElement : nsISupports +{ + /** + * Retrun an element associated with the given element. It's implemented + * by container elements having relation between their items. For example, + * this interface is implemented by XUL tabs and XUL tabpanels elements + * and used to get XUL tab element by linked tab panel and vice versa. + */ + Element getRelatedElement(in Node aElement); +}; diff --git a/dom/interfaces/xul/nsIDOMXULSelectCntrlEl.idl b/dom/interfaces/xul/nsIDOMXULSelectCntrlEl.idl new file mode 100644 index 0000000000..197791cb04 --- /dev/null +++ b/dom/interfaces/xul/nsIDOMXULSelectCntrlEl.idl @@ -0,0 +1,21 @@ +/* -*- Mode: IDL; 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 "nsIDOMXULControlElement.idl" +interface nsIDOMXULSelectControlItemElement; + +webidl Element; + +[scriptable, uuid(9bf188a7-d6f9-431b-b5c7-118013998e8b)] +interface nsIDOMXULSelectControlElement : nsIDOMXULControlElement { + attribute Element selectedItem; + attribute long selectedIndex; + + attribute AString value; + + readonly attribute unsigned long itemCount; + long getIndexOfItem(in nsIDOMXULSelectControlItemElement item); + Element getItemAtIndex(in long index); +}; diff --git a/dom/interfaces/xul/nsIDOMXULSelectCntrlItemEl.idl b/dom/interfaces/xul/nsIDOMXULSelectCntrlItemEl.idl new file mode 100644 index 0000000000..e3f031bd50 --- /dev/null +++ b/dom/interfaces/xul/nsIDOMXULSelectCntrlItemEl.idl @@ -0,0 +1,27 @@ +/* -*- Mode: IDL; 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 nsIDOMXULSelectControlElement; + +webidl Element; + +[scriptable, uuid(5c6be58f-17df-4750-88a5-4a59ac28adc9)] +interface nsIDOMXULSelectControlItemElement : nsISupports { + attribute boolean disabled; + attribute AString image; + attribute AString label; + attribute AString accessKey; + attribute AString command; + + attribute AString value; + + readonly attribute boolean selected; + + readonly attribute Element control; + + // XXX defined in XULElement, but should be defined here + // void doCommand(); +}; |