Back to index

lightning-sunbird  0.9+nobinonly
nsISelectionController.idl
Go to the documentation of this file.
00001 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
00002  *
00003  * ***** BEGIN LICENSE BLOCK *****
00004  * Version: MPL 1.1/GPL 2.0/LGPL 2.1
00005  *
00006  * The contents of this file are subject to the Mozilla Public License Version
00007  * 1.1 (the "License"); you may not use this file except in compliance with
00008  * the License. You may obtain a copy of the License at
00009  * http://www.mozilla.org/MPL/
00010  *
00011  * Software distributed under the License is distributed on an "AS IS" basis,
00012  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
00013  * for the specific language governing rights and limitations under the
00014  * License.
00015  *
00016  * The Original Code is mozilla.org code.
00017  *
00018  * The Initial Developer of the Original Code is
00019  * Netscape Communications Corporation.
00020  * Portions created by the Initial Developer are Copyright (C) 1998
00021  * the Initial Developer. All Rights Reserved.
00022  *
00023  * Contributor(s):
00024  *   Sammy Ford
00025  *
00026  * Alternatively, the contents of this file may be used under the terms of
00027  * either of the GNU General Public License Version 2 or later (the "GPL"),
00028  * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
00029  * in which case the provisions of the GPL or the LGPL are applicable instead
00030  * of those above. If you wish to allow use of your version of this file only
00031  * under the terms of either the GPL or the LGPL, and not to allow others to
00032  * use your version of this file under the terms of the MPL, indicate your
00033  * decision by deleting the provisions above and replace them with the notice
00034  * and other provisions required by the GPL or the LGPL. If you do not delete
00035  * the provisions above, a recipient may use your version of this file under
00036  * the terms of any one of the MPL, the GPL or the LGPL.
00037  *
00038  * ***** END LICENSE BLOCK ***** */
00039 
00040 
00041 #include "nsISupports.idl"
00042 #include "nsISelection.idl"
00043 #include "nsISelectionDisplay.idl"
00044 
00045 %{C++
00046 typedef short SelectionType;
00047 typedef short SelectionRegion;
00048 %}
00049 
00050 interface nsIDOMNode;
00051 interface nsISelection;
00052 interface nsISelectionDisplay;
00053 
00054 [scriptable, uuid(93AAA4A9-B78E-42eb-9D67-5DE77EE2F54B)]
00055 interface nsISelectionController : nsISelectionDisplay
00056 {
00057    const short SELECTION_NONE=0;
00058    const short SELECTION_NORMAL=1;
00059    const short SELECTION_SPELLCHECK=2;
00060    const short SELECTION_IME_RAWINPUT=4;
00061    const short SELECTION_IME_SELECTEDRAWTEXT=8;
00062    const short SELECTION_IME_CONVERTEDTEXT=16;
00063    const short SELECTION_IME_SELECTEDCONVERTEDTEXT=32;
00064    const short SELECTION_ACCESSIBILITY=64; // For accessibility API usage
00065    const short NUM_SELECTIONTYPES=8;
00066 
00067    const short SELECTION_ANCHOR_REGION = 0;
00068    const short SELECTION_FOCUS_REGION = 1;
00069    const short NUM_SELECTION_REGIONS = 2;
00070 
00071    const short SELECTION_OFF = 0;
00072    const short SELECTION_HIDDEN =1;//>HIDDEN displays selection
00073    const short SELECTION_ON = 2;
00074    const short SELECTION_DISABLED = 3;
00075    const short SELECTION_ATTENTION = 4;
00076 
00080     void    setDisplaySelection(in short toggle);
00081 
00085     short   getDisplaySelection();
00086 
00094     nsISelection getSelection(in short type);
00095 
00106     void scrollSelectionIntoView(in short type, in short region, in boolean isSynchronous);
00112     void repaintSelection(in short type);
00113 
00122     void setCaretEnabled(in boolean enabled);
00123 
00130     void setCaretReadOnly(in boolean readOnly);
00131 
00138     boolean getCaretEnabled();
00139 
00146     void setCaretVisibilityDuringSelection(in boolean visibility);
00147 
00155     void characterMove(in boolean forward, in boolean extend);
00156 
00165     void wordMove(in boolean forward, in boolean extend);
00166 
00174     void lineMove(in boolean forward, in boolean extend);
00175 
00184     void intraLineMove(in boolean forward, in boolean extend);
00185 
00193     void pageMove(in boolean forward, in boolean extend);
00194 
00198     void completeScroll(in boolean forward);
00199 
00207     void completeMove(in boolean forward, in boolean extend);
00208 
00209 
00213     void scrollPage(in boolean forward);
00214 
00218          void scrollLine(in boolean forward);
00219 
00223          void scrollHorizontal(in boolean left);
00226     void selectAll();
00227 
00235     boolean checkVisibility(in nsIDOMNode node, in short startOffset, in short endOffset);
00236 
00237 };
00238 %{ C++
00239    #define NS_ISELECTIONCONTROLLER_CID \
00240    { 0xd2d1d179, 0x85a7, 0x11d3, \
00241    { 0x99, 0x32, 0x0, 0x10, 0x83, 0x1, 0x23, 0x3c }}
00242 %}