/usr/share/idl/firefox/nsIPopupBoxObject.idl is in firefox-dev 11.0+build1-0ubuntu4.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 | /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* David W. Hyatt <hyatt@netscape.com>
* Ben Goodger <ben@netscape.com>
*
* Alternatively, the contents of this file may be used under the terms of
* either of the GNU General Public License Version 2 or later (the "GPL"),
* or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#include "nsIBoxObject.idl"
interface nsIDOMElement;
interface nsIDOMNode;
interface nsIDOMEvent;
interface nsIDOMClientRect;
[scriptable, uuid(6AD1B199-95D3-448B-98D7-896BCE3A1DCD)]
interface nsIPopupBoxObject : nsISupports
{
/**
* This method is deprecated. Use openPopup or openPopupAtScreen instead.
*/
void showPopup(in nsIDOMElement srcContent, in nsIDOMElement popupContent,
in long xpos, in long ypos,
in wstring popupType, in wstring anchorAlignment,
in wstring popupAlignment);
/**
* Hide the popup if it is open.
*/
void hidePopup();
/**
* Allow the popup to automatically position itself.
*/
attribute boolean autoPosition;
/**
* If keyboard navigation is enabled, the keyboard may be used to navigate
* the menuitems on the popup. Enabling keyboard navigation is the default
* behaviour and will install capturing key event listeners on the popup
* that do not propagate key events to the contents. If you wish to place
* elements in a popup which accept key events, such as textboxes, keyboard
* navigation should be disabled.
*
* Setting ignorekeys="true" on the popup element also disables keyboard
* navigation, and is recommended over calling this method.
*/
void enableKeyboardNavigator(in boolean enableKeyboardNavigator);
/**
* Enable automatic popup dismissal. This only has effect when called
* on an open popup.
*/
void enableRollup(in boolean enableRollup);
/**
* Control whether the event that caused the popup to be automatically
* dismissed ("rolled up") should be consumed, or dispatched as a
* normal event. This should be set immediately before calling showPopup()
* if non-default behavior is desired.
*/
const PRUint32 ROLLUP_DEFAULT = 0; /* widget/platform default */
const PRUint32 ROLLUP_CONSUME = 1; /* consume the rollup event */
const PRUint32 ROLLUP_NO_CONSUME = 2; /* don't consume the rollup event */
void setConsumeRollupEvent(in PRUint32 consume);
/**
* Size the popup to the given dimensions
*/
void sizeTo(in long width, in long height);
/**
* Move the popup to a point on screen in CSS pixels.
*/
void moveTo(in long left, in long top);
/**
* Open the popup relative to a specified node at a specific location.
*
* The popup may be either anchored to another node or opened freely.
* To anchor a popup to a node, supply an anchor node and set the position
* to a string indicating the manner in which the popup should be anchored.
* Possible values for position are:
* before_start, before_end, after_start, after_end,
* start_before, start_after, end_before, end_after,
* overlap, after_pointer
*
* The anchor node does not need to be in the same document as the popup.
*
* If the attributesOverride argument is true, the popupanchor, popupalign
* and position attributes on the popup node override the position value
* argument. If attributesOverride is false, the attributes are only used
* if position is empty.
*
* For an anchored popup, the x and y arguments may be used to offset the
* popup from its anchored position by some distance, measured in CSS pixels.
* x increases to the right and y increases down. Negative values may also
* be used to move to the left and upwards respectively.
*
* Unanchored popups may be created by supplying null as the anchor node.
* An unanchored popup appears at the position specified by x and y,
* relative to the viewport of the document containing the popup node. In
* this case, position and attributesOverride are ignored.
*
* @param anchorElement the node to anchor the popup to, may be null
* @param position manner is which to anchor the popup to node
* @param x horizontal offset
* @param y vertical offset
* @param isContextMenu true for context menus, false for other popups
* @param attributesOverride true if popup node attributes override position
* @param triggerEvent the event that triggered this popup (mouse click for example)
*/
void openPopup(in nsIDOMElement anchorElement,
in AString position,
in long x, in long y,
in boolean isContextMenu,
in boolean attributesOverride,
in nsIDOMEvent triggerEvent);
/**
* Open the popup at a specific screen position specified by x and y. This
* position may be adjusted if it would cause the popup to be off of the
* screen. The x and y coordinates are measured in CSS pixels, and like all
* screen coordinates, are given relative to the top left of the primary
* screen.
*
* @param isContextMenu true for context menus, false for other popups
* @param x horizontal screen position
* @param y vertical screen position
* @param triggerEvent the event that triggered this popup (mouse click for example)
*/
void openPopupAtScreen(in long x, in long y,
in boolean isContextMenu,
in nsIDOMEvent triggerEvent);
/**
* Returns the state of the popup:
* closed - the popup is closed
* open - the popup is open
* showing - the popup is in the process of being shown
* hiding - the popup is in the process of being hidden
*/
readonly attribute AString popupState;
/**
* The node that triggered the popup. If the popup is not open, will return
* null.
*/
readonly attribute nsIDOMNode triggerNode;
/**
* Retrieve the anchor that was specified to openPopup or for menupopups in a
* menu, the parent menu.
*/
readonly attribute nsIDOMElement anchorNode;
/*
* Retrieve the screen rectangle of the popup, including the area occupied by
* any titlebar or borders present.
*/
nsIDOMClientRect getOuterScreenRect();
};
%{C++
nsresult
NS_NewPopupBoxObject(nsIBoxObject** aResult);
%}
|