Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
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 | |
michael@0 | 7 | interface nsIAutoCompleteResult; |
michael@0 | 8 | interface nsIAutoCompleteObserver; |
michael@0 | 9 | |
michael@0 | 10 | [scriptable, uuid(DE8DB85F-C1DE-4d87-94BA-7844890F91FE)] |
michael@0 | 11 | interface nsIAutoCompleteSearch : nsISupports |
michael@0 | 12 | { |
michael@0 | 13 | /* |
michael@0 | 14 | * Search for a given string and notify a listener (either synchronously |
michael@0 | 15 | * or asynchronously) of the result |
michael@0 | 16 | * |
michael@0 | 17 | * @param searchString - The string to search for |
michael@0 | 18 | * @param searchParam - An extra parameter |
michael@0 | 19 | * @param previousResult - A previous result to use for faster searching |
michael@0 | 20 | * @param listener - A listener to notify when the search is complete |
michael@0 | 21 | */ |
michael@0 | 22 | void startSearch(in AString searchString, |
michael@0 | 23 | in AString searchParam, |
michael@0 | 24 | in nsIAutoCompleteResult previousResult, |
michael@0 | 25 | in nsIAutoCompleteObserver listener); |
michael@0 | 26 | |
michael@0 | 27 | /* |
michael@0 | 28 | * Stop all searches that are in progress |
michael@0 | 29 | */ |
michael@0 | 30 | void stopSearch(); |
michael@0 | 31 | }; |
michael@0 | 32 | |
michael@0 | 33 | [scriptable, uuid(8bd1dbbc-dcce-4007-9afa-b551eb687b61)] |
michael@0 | 34 | interface nsIAutoCompleteObserver : nsISupports |
michael@0 | 35 | { |
michael@0 | 36 | /* |
michael@0 | 37 | * Called when a search is complete and the results are ready |
michael@0 | 38 | * |
michael@0 | 39 | * @param search - The search object that processed this search |
michael@0 | 40 | * @param result - The search result object |
michael@0 | 41 | */ |
michael@0 | 42 | void onSearchResult(in nsIAutoCompleteSearch search, in nsIAutoCompleteResult result); |
michael@0 | 43 | |
michael@0 | 44 | /* |
michael@0 | 45 | * Called to update with new results |
michael@0 | 46 | * |
michael@0 | 47 | * @param search - The search object that processed this search |
michael@0 | 48 | * @param result - The search result object |
michael@0 | 49 | */ |
michael@0 | 50 | void onUpdateSearchResult(in nsIAutoCompleteSearch search, in nsIAutoCompleteResult result); |
michael@0 | 51 | }; |
michael@0 | 52 | |
michael@0 | 53 | [scriptable, uuid(02314d6e-b730-40cc-a215-221554d77064)] |
michael@0 | 54 | interface nsIAutoCompleteSearchDescriptor : nsISupports |
michael@0 | 55 | { |
michael@0 | 56 | // The search is started after the timeout specified by the corresponding |
michael@0 | 57 | // nsIAutoCompleteInput implementation. |
michael@0 | 58 | const unsigned short SEARCH_TYPE_DELAYED = 0; |
michael@0 | 59 | // The search is started synchronously, before any delayed searches. |
michael@0 | 60 | const unsigned short SEARCH_TYPE_IMMEDIATE = 1; |
michael@0 | 61 | |
michael@0 | 62 | /** |
michael@0 | 63 | * Identifies the search behavior. |
michael@0 | 64 | * Should be one of the SEARCH_TYPE_* constants above. |
michael@0 | 65 | * Defaults to SEARCH_TYPE_DELAYED. |
michael@0 | 66 | */ |
michael@0 | 67 | readonly attribute unsigned short searchType; |
michael@0 | 68 | }; |