layout/inspector/inISearchProcess.idl

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/layout/inspector/inISearchProcess.idl	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,49 @@
     1.4 +/* This Source Code Form is subject to the terms of the Mozilla Public
     1.5 + * License, v. 2.0. If a copy of the MPL was not distributed with this
     1.6 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     1.7 +
     1.8 +
     1.9 +#include "nsISupports.idl"
    1.10 +
    1.11 +interface nsAString;
    1.12 +interface inISearchObserver;
    1.13 +
    1.14 +[scriptable, uuid(D5FA765B-2448-4686-B7C1-5FF13ACB0FC9)]
    1.15 +interface inISearchProcess : nsISupports
    1.16 +{
    1.17 +  // indicates if an asynchronous search is in progress
    1.18 +  readonly attribute boolean isActive;
    1.19 +
    1.20 +  // the number of results returned 
    1.21 +  readonly attribute long resultCount;
    1.22 +
    1.23 +  // for optimization when doing an async search, this will optionally
    1.24 +  // destroy old results, assuming they will be fetched as soon as 
    1.25 +  // the observer is notified of their presence.  If true, then indices
    1.26 +  // pass to the get*ResultAt methods will return null for any index
    1.27 +  // other than the most recent one, and getResults will return null always.
    1.28 +  attribute boolean holdResults;
    1.29 +
    1.30 +  // start a synchronous search
    1.31 +  void searchSync();
    1.32 +
    1.33 +  // start an asynchronous search
    1.34 +  void searchAsync(in inISearchObserver aObserver);
    1.35 +
    1.36 +  // command an async process to stop immediately
    1.37 +  void searchStop();
    1.38 +
    1.39 +  // performs a step in the asynchronous search loop
    1.40 +  // return indicates true if loop is done, false if it should continue
    1.41 +  // This is there only for the benefit of asynchronous search controllers,
    1.42 +  // and is not for use by those who just wish to call searchAsync
    1.43 +  boolean searchStep();
    1.44 +
    1.45 +  // methods for getting results of specific types
    1.46 +  
    1.47 +  AString getStringResultAt(in long aIndex);
    1.48 +  
    1.49 +  long getIntResultAt(in long aIndex);
    1.50 +  
    1.51 +  unsigned long getUIntResultAt(in long aIndex);
    1.52 +};

mercurial