CLOSED TREE: TraceMonkey merge head. (a=blockers)
[mozilla-central.git] / xpfe / components / autocomplete / public / nsIAutoCompleteResults.idl
blob893e9f98f59d5a3f5ee6c2a2795ccfc2c0c75594
1 /* -*- Mode: IDL; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /* ***** BEGIN LICENSE BLOCK *****
3 * Version: MPL 1.1/GPL 2.0/LGPL 2.1
5 * The contents of this file are subject to the Mozilla Public License Version
6 * 1.1 (the "License"); you may not use this file except in compliance with
7 * the License. You may obtain a copy of the License at
8 * http://www.mozilla.org/MPL/
10 * Software distributed under the License is distributed on an "AS IS" basis,
11 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
12 * for the specific language governing rights and limitations under the
13 * License.
15 * The Original Code is mozilla.org code.
17 * The Initial Developer of the Original Code is
18 * Netscape Communications Corporation.
19 * Portions created by the Initial Developer are Copyright (C) 1998
20 * the Initial Developer. All Rights Reserved.
22 * Contributor(s):
23 * Original Author: Jean-Francois Ducarroz (ducarroz@netscape.com)
25 * Alternatively, the contents of this file may be used under the terms of
26 * either of the GNU General Public License Version 2 or later (the "GPL"),
27 * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
28 * in which case the provisions of the GPL or the LGPL are applicable instead
29 * of those above. If you wish to allow use of your version of this file only
30 * under the terms of either the GPL or the LGPL, and not to allow others to
31 * use your version of this file under the terms of the MPL, indicate your
32 * decision by deleting the provisions above and replace them with the notice
33 * and other provisions required by the GPL or the LGPL. If you do not delete
34 * the provisions above, a recipient may use your version of this file under
35 * the terms of any one of the MPL, the GPL or the LGPL.
37 * ***** END LICENSE BLOCK ***** */
39 #include "nsISupports.idl"
40 #include "nsISupportsArray.idl"
42 [scriptable, uuid(88DCFA80-062F-11d4-a449-B36A1A94C0FC)]
43 interface nsIAutoCompleteItem : nsISupports {
44 /**
45 * the result value
46 * using AString to avoid excess allocations
48 attribute AString value;
50 /**
51 * an extra comment that will be
52 * displayed next to the value but that
53 * will not be part of the value
54 * itself
56 attribute wstring comment;
58 /**
59 * class name used to define some style through
60 * css like the colors, an icon url, etc...
62 attribute string className;
64 /**
65 * parameter use by the search engine
67 attribute nsISupports param;
71 [scriptable, uuid(88DCFA81-062F-11d4-a449-B36A1A94C0FC)]
72 interface nsIAutoCompleteResults : nsISupports {
74 /**
75 * the original search string
77 attribute wstring searchString;
79 /**
80 * Array of result items (nsIAutoCompleteItem)
82 attribute nsISupportsArray items;
84 /**
85 * Index (0 base) of the default item that
86 * will be preselected and displayed
88 attribute long defaultItemIndex;
90 /**
91 * param use by the the search engine
93 attribute nsISupports param;
96 %{ C++
97 // {FE4FC780-063D-11d4-A449-D45A120774BC}
98 #define NS_AUTOCOMPLETERESULTS_CID \
99 { 0xfe4fc780, 0x063d, 0x11d4, { 0xa4, 0x49, 0xd4, 0x5a, 0x12, 0x07, 0x74, 0xbc } }
100 #define NS_AUTOCOMPLETERESULTS_CONTRACTID "@mozilla.org/autocomplete/results;1"
102 // {FE4FC781-063D-11d4-A449-D45A120774BC}
103 #define NS_AUTOCOMPLETEITEM_CID \
104 { 0xfe4fc781, 0x063d, 0x11d4, { 0xa4, 0x49, 0xd4, 0x5a, 0x12, 0x07, 0x74, 0xbc } }
105 #define NS_AUTOCOMPLETEITEM_CONTRACTID "@mozilla.org/autocomplete/item;1"