toolkit/components/autocomplete/nsIAutoCompleteInput.idl

Sat, 03 Jan 2015 20:18:00 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Sat, 03 Jan 2015 20:18:00 +0100
branch
TOR_BUG_3246
changeset 7
129ffea94266
permissions
-rw-r--r--

Conditionally enable double key logic according to:
private browsing mode or privacy.thirdparty.isolate preference and
implement in GetCookieStringCommon and FindCookie where it counts...
With some reservations of how to convince FindCookie users to test
condition and pass a nullptr when disabling double key logic.

michael@0 1 /* This Source Code Form is subject to the terms of the Mozilla Public
michael@0 2 * License, v. 2.0. If a copy of the MPL was not distributed with this
michael@0 3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
michael@0 4
michael@0 5 #include "nsISupports.idl"
michael@0 6 #include "nsIAutoCompleteController.idl"
michael@0 7
michael@0 8 interface nsIAutoCompletePopup;
michael@0 9
michael@0 10 [scriptable, uuid(fadb2bb9-3e2e-4ca0-b0e0-0982b8dda9dc)]
michael@0 11 interface nsIAutoCompleteInput : nsISupports
michael@0 12 {
michael@0 13 /*
michael@0 14 * The result view that will be used to display results
michael@0 15 */
michael@0 16 readonly attribute nsIAutoCompletePopup popup;
michael@0 17
michael@0 18 /*
michael@0 19 * The controller.
michael@0 20 */
michael@0 21 readonly attribute nsIAutoCompleteController controller;
michael@0 22
michael@0 23 /*
michael@0 24 * Indicates if the popup is currently open
michael@0 25 */
michael@0 26 attribute boolean popupOpen;
michael@0 27
michael@0 28 /*
michael@0 29 * Option to disable autocomplete functionality
michael@0 30 */
michael@0 31 attribute boolean disableAutoComplete;
michael@0 32
michael@0 33 /*
michael@0 34 * If a search result has its defaultIndex set, this will optionally
michael@0 35 * try to complete the text in the textbox to the entire text of the
michael@0 36 * result at the default index as the user types
michael@0 37 */
michael@0 38 attribute boolean completeDefaultIndex;
michael@0 39
michael@0 40 /*
michael@0 41 * complete text in the textbox as the user selects from the dropdown
michael@0 42 * options if set to true
michael@0 43 */
michael@0 44 attribute boolean completeSelectedIndex;
michael@0 45
michael@0 46 /*
michael@0 47 * Option for completing to the default result whenever the user hits
michael@0 48 * enter or the textbox loses focus
michael@0 49 */
michael@0 50 attribute boolean forceComplete;
michael@0 51
michael@0 52 /*
michael@0 53 * Option to open the popup only after a certain number of results are available
michael@0 54 */
michael@0 55 attribute unsigned long minResultsForPopup;
michael@0 56
michael@0 57 /*
michael@0 58 * The maximum number of rows to show in the autocomplete popup.
michael@0 59 */
michael@0 60 attribute unsigned long maxRows;
michael@0 61
michael@0 62 /*
michael@0 63 * Option to show a second column in the popup which contains
michael@0 64 * the comment for each autocomplete result
michael@0 65 */
michael@0 66 attribute boolean showCommentColumn;
michael@0 67
michael@0 68 /*
michael@0 69 * Option to show a third column in the popup which contains
michael@0 70 * an additional image for each autocomplete result
michael@0 71 */
michael@0 72 attribute boolean showImageColumn;
michael@0 73
michael@0 74 /*
michael@0 75 * Number of milliseconds after a keystroke before a search begins
michael@0 76 */
michael@0 77 attribute unsigned long timeout;
michael@0 78
michael@0 79 /*
michael@0 80 * An extra parameter to configure searches with.
michael@0 81 */
michael@0 82 attribute AString searchParam;
michael@0 83
michael@0 84 /*
michael@0 85 * The number of autocomplete session to search
michael@0 86 */
michael@0 87 readonly attribute unsigned long searchCount;
michael@0 88
michael@0 89 /*
michael@0 90 * Get the name of one of the autocomplete search session objects
michael@0 91 */
michael@0 92 ACString getSearchAt(in unsigned long index);
michael@0 93
michael@0 94 /*
michael@0 95 * The value of text in the autocomplete textbox
michael@0 96 */
michael@0 97 attribute AString textValue;
michael@0 98
michael@0 99 /*
michael@0 100 * Report the starting index of the cursor in the textbox
michael@0 101 */
michael@0 102 readonly attribute long selectionStart;
michael@0 103
michael@0 104 /*
michael@0 105 * Report the ending index of the cursor in the textbox
michael@0 106 */
michael@0 107 readonly attribute long selectionEnd;
michael@0 108
michael@0 109 /*
michael@0 110 * Select a range of text in the autocomplete textbox
michael@0 111 */
michael@0 112 void selectTextRange(in long startIndex, in long endIndex);
michael@0 113
michael@0 114 /*
michael@0 115 * Notification that the search has started
michael@0 116 */
michael@0 117 void onSearchBegin();
michael@0 118
michael@0 119 /*
michael@0 120 * Notification that the search concluded successfully
michael@0 121 */
michael@0 122 void onSearchComplete();
michael@0 123
michael@0 124 /*
michael@0 125 * Notification that the user selected and entered a result item
michael@0 126 *
michael@0 127 * @return True if the user wishes to prevent the enter
michael@0 128 */
michael@0 129 boolean onTextEntered();
michael@0 130
michael@0 131 /*
michael@0 132 * Notification that the user cancelled the autocomplete session
michael@0 133 *
michael@0 134 * @return True if the user wishes to prevent the revert
michael@0 135 */
michael@0 136 boolean onTextReverted();
michael@0 137
michael@0 138 /*
michael@0 139 * This popup should consume or dispatch the rollup event.
michael@0 140 * TRUE: should consume; FALSE: should dispatch.
michael@0 141 */
michael@0 142 readonly attribute boolean consumeRollupEvent;
michael@0 143
michael@0 144 /*
michael@0 145 * Indicates whether this input is in a "private browsing" context.
michael@0 146 * nsIAutoCompleteSearches for these inputs should not persist any data to disk
michael@0 147 * (such as a history database).
michael@0 148 */
michael@0 149 readonly attribute boolean inPrivateContext;
michael@0 150 };

mercurial