michael@0: /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #include "nsISupports.idl" michael@0: michael@0: interface nsIDOMRange; michael@0: interface nsIWordBreaker; michael@0: michael@0: [scriptable, uuid(75125d55-37ee-4575-b9b5-f33bfa68c2a1)] michael@0: interface nsIFind : nsISupports michael@0: { michael@0: attribute boolean findBackwards; michael@0: attribute boolean caseSensitive; michael@0: michael@0: /** michael@0: * Use "find entire words" mode by setting to a word breaker michael@0: * or null, to disable "entire words" mode. michael@0: */ michael@0: [noscript] attribute nsIWordBreaker wordBreaker; michael@0: michael@0: /** michael@0: * Find some text in the current context. The implementation is michael@0: * responsible for performing the find and highlighting the text. michael@0: * michael@0: * @param aPatText The text to search for. michael@0: * @param aSearchRange A Range specifying domain of search. michael@0: * @param aStartPoint A Range specifying search start point. michael@0: * If not collapsed, we'll start from michael@0: * end (forward) or start (backward). michael@0: * @param aEndPoint A Range specifying search end point. michael@0: * If not collapsed, we'll end at michael@0: * end (forward) or start (backward). michael@0: * @retval A range spanning the match that was found (or null). michael@0: */ michael@0: nsIDOMRange Find(in wstring aPatText, in nsIDOMRange aSearchRange, michael@0: in nsIDOMRange aStartPoint, in nsIDOMRange aEndPoint); michael@0: };