Bug 470455 - test_database_sync_embed_visits.js leaks, r=sdwilsh
[wine-gecko.git] / embedding / components / find / public / nsIWebBrowserFind.idl
blobfc70127119d3a286b6b828845db4357cf4eb7d7a
1 /* -*- Mode: IDL; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
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) 2001
20 * the Initial Developer. All Rights Reserved.
22 * Contributor(s):
23 * Conrad Carlen <ccarlen@netscape.com>
24 * Simon Fraser <sfraser@netscape.com>
26 * Alternatively, the contents of this file may be used under the terms of
27 * either the GNU General Public License Version 2 or later (the "GPL"), or
28 * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
29 * in which case the provisions of the GPL or the LGPL are applicable instead
30 * of those above. If you wish to allow use of your version of this file only
31 * under the terms of either the GPL or the LGPL, and not to allow others to
32 * use your version of this file under the terms of the MPL, indicate your
33 * decision by deleting the provisions above and replace them with the notice
34 * and other provisions required by the GPL or the LGPL. If you do not delete
35 * the provisions above, a recipient may use your version of this file under
36 * the terms of any one of the MPL, the GPL or the LGPL.
38 * ***** END LICENSE BLOCK ***** */
40 #include "nsISupports.idl"
42 #include "domstubs.idl"
44 /* THIS IS A PUBLIC EMBEDDING API */
47 /**
48 * nsIWebBrowserFind
50 * Searches for text in a web browser.
52 * Get one by doing a GetInterface on an nsIWebBrowser.
54 * By default, the implementation will search the focussed frame, or
55 * if there is no focussed frame, the web browser content area. It
56 * does not by default search subframes or iframes. To change this
57 * behaviour, and to explicitly set the frame to search,
58 * QueryInterface to nsIWebBrowserFindInFrames.
60 * @status FROZEN
63 [scriptable, uuid(2f977d44-5485-11d4-87e2-0010a4e75ef2)]
64 interface nsIWebBrowserFind : nsISupports
66 /**
67 * findNext
69 * Finds, highlights, and scrolls into view the next occurrence of the
70 * search string, using the current search settings. Fails if the
71 * search string is empty.
73 * @return Whether an occurrence was found
75 boolean findNext();
77 /**
78 * searchString
80 * The string to search for. This must be non-empty to search.
82 attribute wstring searchString;
84 /**
85 * findBackwards
87 * Whether to find backwards (towards the beginning of the document).
88 * Default is false (search forward).
90 attribute boolean findBackwards;
92 /**
93 * wrapFind
95 * Whether the search wraps around to the start (or end) of the document
96 * if no match was found between the current position and the end (or
97 * beginning). Works correctly when searching backwards. Default is
98 * false.
100 attribute boolean wrapFind;
103 * entireWord
105 * Whether to match entire words only. Default is false.
107 attribute boolean entireWord;
110 * matchCase
112 * Whether to match case (case sensitive) when searching. Default is false.
114 attribute boolean matchCase;
117 * searchFrames
119 * Whether to search through all frames in the content area. Default is true.
121 * Note that you can control whether the search propagates into child or
122 * parent frames explicitly using nsIWebBrowserFindInFrames, but if one,
123 * but not both, of searchSubframes and searchParentFrames are set, this
124 * returns false.
126 attribute boolean searchFrames;
132 * nsIWebBrowserFindInFrames
134 * Controls how find behaves when multiple frames or iframes are present.
136 * Get by doing a QueryInterface from nsIWebBrowserFind.
138 * @status FROZEN
141 [scriptable, uuid(e0f5d182-34bc-11d5-be5b-b760676c6ebc)]
142 interface nsIWebBrowserFindInFrames : nsISupports
145 * currentSearchFrame
147 * Frame at which to start the search. Once the search is done, this will
148 * be set to be the last frame searched, whether or not a result was found.
149 * Has to be equal to or contained within the rootSearchFrame.
151 attribute nsIDOMWindow currentSearchFrame;
154 * rootSearchFrame
156 * Frame within which to confine the search (normally the content area frame).
157 * Set this to only search a subtree of the frame hierarchy.
159 attribute nsIDOMWindow rootSearchFrame;
162 * searchSubframes
164 * Whether to recurse down into subframes while searching. Default is true.
166 * Setting nsIWebBrowserfind.searchFrames to true sets this to true.
168 attribute boolean searchSubframes;
171 * searchParentFrames
173 * Whether to allow the search to propagate out of the currentSearchFrame into its
174 * parent frame(s). Search is always confined within the rootSearchFrame. Default
175 * is true.
177 * Setting nsIWebBrowserfind.searchFrames to true sets this to true.
179 attribute boolean searchParentFrames;