toolkit/components/places/mozIPlacesAutoComplete.idl

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

michael@0 1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
michael@0 2 * vim: sw=2 ts=2 sts=2
michael@0 3 * This Source Code Form is subject to the terms of the Mozilla Public
michael@0 4 * License, v. 2.0. If a copy of the MPL was not distributed with this
michael@0 5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
michael@0 6
michael@0 7 #include "nsISupports.idl"
michael@0 8
michael@0 9 interface nsIURI;
michael@0 10
michael@0 11 /**
michael@0 12 * This interface provides some constants used by the Places AutoComplete
michael@0 13 * search provider as well as methods to track opened pages for AutoComplete
michael@0 14 * purposes.
michael@0 15 */
michael@0 16 [scriptable, uuid(3bf895a0-d6d9-4ba7-b8db-f2f0e0f32d23)]
michael@0 17 interface mozIPlacesAutoComplete : nsISupports
michael@0 18 {
michael@0 19 //////////////////////////////////////////////////////////////////////////////
michael@0 20 //// Matching Constants
michael@0 21
michael@0 22 /**
michael@0 23 * Match anywhere in each searchable term.
michael@0 24 */
michael@0 25 const long MATCH_ANYWHERE = 0;
michael@0 26
michael@0 27 /**
michael@0 28 * Match first on word boundaries, and if we do not get enough results, then
michael@0 29 * match anywhere in each searchable term.
michael@0 30 */
michael@0 31 const long MATCH_BOUNDARY_ANYWHERE = 1;
michael@0 32
michael@0 33 /**
michael@0 34 * Match on word boundaries in each searchable term.
michael@0 35 */
michael@0 36 const long MATCH_BOUNDARY = 2;
michael@0 37
michael@0 38 /**
michael@0 39 * Match only the beginning of each search term.
michael@0 40 */
michael@0 41 const long MATCH_BEGINNING = 3;
michael@0 42
michael@0 43 /**
michael@0 44 * Match anywhere in each searchable term without doing any transformation
michael@0 45 * or stripping on the underlying data.
michael@0 46 */
michael@0 47 const long MATCH_ANYWHERE_UNMODIFIED = 4;
michael@0 48
michael@0 49 /**
michael@0 50 * Match only the beginning of each search term using a case sensitive
michael@0 51 * comparator.
michael@0 52 */
michael@0 53 const long MATCH_BEGINNING_CASE_SENSITIVE = 5;
michael@0 54
michael@0 55 //////////////////////////////////////////////////////////////////////////////
michael@0 56 //// Search Behavior Constants
michael@0 57
michael@0 58 /**
michael@0 59 * Search through history.
michael@0 60 */
michael@0 61 const long BEHAVIOR_HISTORY = 1 << 0;
michael@0 62
michael@0 63 /**
michael@0 64 * Search though bookmarks.
michael@0 65 */
michael@0 66 const long BEHAVIOR_BOOKMARK = 1 << 1;
michael@0 67
michael@0 68 /**
michael@0 69 * Search through tags.
michael@0 70 */
michael@0 71 const long BEHAVIOR_TAG = 1 << 2;
michael@0 72
michael@0 73 /**
michael@0 74 * Search the title of pages.
michael@0 75 */
michael@0 76 const long BEHAVIOR_TITLE = 1 << 3;
michael@0 77
michael@0 78 /**
michael@0 79 * Search the URL of pages.
michael@0 80 */
michael@0 81 const long BEHAVIOR_URL = 1 << 4;
michael@0 82
michael@0 83 /**
michael@0 84 * Search for typed pages.
michael@0 85 */
michael@0 86 const long BEHAVIOR_TYPED = 1 << 5;
michael@0 87
michael@0 88 /**
michael@0 89 * Search javascript: URLs.
michael@0 90 */
michael@0 91 const long BEHAVIOR_JAVASCRIPT = 1 << 6;
michael@0 92
michael@0 93 /**
michael@0 94 * Search for pages that have been marked as being opened, such as a tab
michael@0 95 * in a tabbrowser.
michael@0 96 */
michael@0 97 const long BEHAVIOR_OPENPAGE = 1 << 7;
michael@0 98
michael@0 99 /**
michael@0 100 * Mark a page as being currently open.
michael@0 101 *
michael@0 102 * @note Pages will not be automatically unregistered when Private Browsing
michael@0 103 * mode is entered or exited. Therefore, consumers MUST unregister or
michael@0 104 * register themselves.
michael@0 105 *
michael@0 106 * @param aURI
michael@0 107 * The URI to register as an open page.
michael@0 108 */
michael@0 109 void registerOpenPage(in nsIURI aURI);
michael@0 110
michael@0 111 /**
michael@0 112 * Mark a page as no longer being open (either by closing the window or tab,
michael@0 113 * or by navigating away from that page).
michael@0 114 *
michael@0 115 * @note Pages will not be automatically unregistered when Private Browsing
michael@0 116 * mode is entered or exited. Therefore, consumers MUST unregister or
michael@0 117 * register themselves.
michael@0 118 *
michael@0 119 * @param aURI
michael@0 120 * The URI to unregister as an open page.
michael@0 121 */
michael@0 122 void unregisterOpenPage(in nsIURI aURI);
michael@0 123 };

mercurial