Bug 422974 ? Prism uses old "Remember password?" mechanism. r=gavin
[wine-gecko.git] / content / base / public / nsISelectionPrivate.idl
blob178a91de928c3b837049d89991a8668d00aa25c9
1 /* -*- Mode: C++; 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):
24 * Alternatively, the contents of this file may be used under the terms of
25 * either of the GNU General Public License Version 2 or later (the "GPL"),
26 * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
27 * in which case the provisions of the GPL or the LGPL are applicable instead
28 * of those above. If you wish to allow use of your version of this file only
29 * under the terms of either the GPL or the LGPL, and not to allow others to
30 * use your version of this file under the terms of the MPL, indicate your
31 * decision by deleting the provisions above and replace them with the notice
32 * and other provisions required by the GPL or the LGPL. If you do not delete
33 * the provisions above, a recipient may use your version of this file under
34 * the terms of any one of the MPL, the GPL or the LGPL.
36 * ***** END LICENSE BLOCK ***** */
38 #include "nsISupports.idl"
39 #include "nsISelectionListener.idl"
40 #include "nsIEnumerator.idl"
42 interface nsIDOMRange;
43 interface nsISelectionListener;
44 interface nsIContent;
46 %{C++
47 class nsFrameSelection;
48 class nsIFrame;
49 class nsIPresShell;
50 struct nsPoint;
53 [ptr] native nsFrameSelection(nsFrameSelection);
54 [ptr] native nsIFrame(nsIFrame);
55 [ptr] native nsIPresShell(nsIPresShell);
56 [ref] native nsPointRef(nsPoint);
58 [scriptable, uuid(b416c692-eeb8-4186-addd-c444e81b68e5)]
59 interface nsISelectionPrivate : nsISupports
61 const short ENDOFPRECEDINGLINE=0;
62 const short STARTOFNEXTLINE=1;
64 attribute boolean interlinePosition;
66 /* startBatchChanges
67 match this up with endbatchChanges. will stop ui updates while multiple selection methods are called
69 void startBatchChanges();
71 /* endBatchChanges
72 match this up with startBatchChanges
74 void endBatchChanges();
76 nsIEnumerator getEnumerator();
77 wstring toStringWithFormat(in string formatType, in unsigned long flags, in PRInt32 wrapColumn);
78 void addSelectionListener(in nsISelectionListener newListener);
79 void removeSelectionListener(in nsISelectionListener listenerToRemove);
81 /* Table selection stuff
82 We should probably move this and table-related
83 items in nsFrameSelection to a
84 new nsITableSelection interface
86 const long TABLESELECTION_NONE = 0;
87 const long TABLESELECTION_CELL = 1;
88 const long TABLESELECTION_ROW = 2;
89 const long TABLESELECTION_COLUMN = 3;
90 const long TABLESELECTION_TABLE = 4;
91 const long TABLESELECTION_ALLCELLS = 5;
93 /** Test if supplied range points to a single table element:
94 * Result is one of above constants. "None" means
95 * a table element isn't selected.
97 long getTableSelectionType(in nsIDOMRange range);
99 /* Internal utility method to set the pres shell on a newly created selection */
100 [noscript] void setPresShell(in nsIPresShell aPresShell);
102 /* canCacheFrameOffset
103 * Frame Offset cache can be used just during calling nsEditor::EndPlaceHolderTransaction.
104 * EndPlaceHolderTransaction will give rise to reflow/refreshing view/scroll, and call times
105 * of nsTextFrame::GetPointFromOffset whose return value is to be cached.
106 * see bugs 35296 and 199412
108 [noscript] attribute boolean canCacheFrameOffset;
110 /* GetCachedOffsetForFrame
111 * Returns cached value for nsTextFrame::GetPointFromOffset.
113 [noscript] void getCachedFrameOffset(in nsIFrame aFrame, in PRInt32 inOffset, in nsPointRef aPoint);
115 /* getFrameSelection
116 * Returnes a reference to the frame selection associated with this selection
118 [noscript] nsFrameSelection getFrameSelection();
120 [noscript] void setAncestorLimiter(in nsIContent aContent);