зеркало из https://github.com/mozilla/pjs.git
bug 127893 check in additional IDL files contributed by Sun
r=jgaunt sr=jst this part is only the new idl files, I will checkin makefile for 3 platforms soon.
This commit is contained in:
Родитель
556d4d0bc9
Коммит
1142f2ced3
|
@ -0,0 +1,51 @@
|
|||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public
|
||||
* License Version 1.1 (the "License"); you may not use this file
|
||||
* except in compliance with the License. You may obtain a copy of
|
||||
* the License at http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS
|
||||
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
* implied. See the License for the specific language governing
|
||||
* rights and limitations under the License.
|
||||
*
|
||||
* The Original Code is the Mozilla browser.
|
||||
*
|
||||
* The Initial Developer of the Original Code is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1999 Netscape Communications Corporation. All
|
||||
* Rights Reserved.
|
||||
*
|
||||
* Original Author: Marc Mulcahy (marc.mulcahy@sun.com)
|
||||
*
|
||||
* Contributor(s): Paul Sandoz (paul.sandoz@sun.com)
|
||||
* Bill Haneman (bill.haneman@sun.com)
|
||||
* John Gaunt (jgaunt@netscape.com)
|
||||
*/
|
||||
|
||||
#include "nsISupports.idl"
|
||||
|
||||
[scriptable, uuid(829B36D4-125A-4279-ABC4-87D834664F82)]
|
||||
interface nsIAccessibleAction : nsISupports
|
||||
{
|
||||
readonly attribute long actions;
|
||||
|
||||
boolean doAction (in long index);
|
||||
|
||||
wstring getDescription (in long index);
|
||||
void getDescriptionConst (in long index,
|
||||
[shared, retval] out string description);
|
||||
|
||||
wstring getKeyBinding (in long index);
|
||||
void getKeyBindingConst (in long index,
|
||||
[shared, retval] out string keyBinding);
|
||||
};
|
||||
|
||||
/*
|
||||
Assumptions:
|
||||
|
||||
string is a UTF-8 or most likely ASCII
|
||||
encoding.
|
||||
|
||||
*/
|
|
@ -0,0 +1,53 @@
|
|||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public
|
||||
* License Version 1.1 (the "License"); you may not use this file
|
||||
* except in compliance with the License. You may obtain a copy of
|
||||
* the License at http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS
|
||||
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
* implied. See the License for the specific language governing
|
||||
* rights and limitations under the License.
|
||||
*
|
||||
* The Original Code is the Mozilla browser.
|
||||
*
|
||||
* The Initial Developer of the Original Code is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1999 Netscape Communications Corporation. All
|
||||
* Rights Reserved.
|
||||
*
|
||||
* Original Author: Marc Mulcahy (marc.mulcahy@sun.com)
|
||||
*
|
||||
* Contributor(s): Paul Sandoz (paul.sandoz@sun.com)
|
||||
* Bill Haneman (bill.haneman@sun.com)
|
||||
* John Gaunt (jgaunt@netscape.com)
|
||||
*/
|
||||
|
||||
#include "nsISupports.idl"
|
||||
|
||||
[scriptable, uuid(91F0A56C-11BE-47C7-8D02-7C15E00C05F5)]
|
||||
interface nsIAccessibleEditableText : nsISupports
|
||||
{
|
||||
/**
|
||||
* Set font styles, such as italic, bold...
|
||||
*/
|
||||
void setAttributes (in long startPos, in long endPos,
|
||||
in nsISupports attributes);
|
||||
boolean setTextContents (in wstring text);
|
||||
void insertText (in wstring text, in long length, inout long position);
|
||||
void copyText (in long startPos, in long endPos);
|
||||
void cutText (in long startPos, in long endPos);
|
||||
void deleteText (in long startPos, in long endPos);
|
||||
void pasteText (in long position);
|
||||
};
|
||||
|
||||
/*
|
||||
Assumptions:
|
||||
|
||||
selectAttributes method takes an nsISupports parameter.
|
||||
'set' methods throw exception on failure.
|
||||
'wstring' inputs are potentially multibyte (UTF-16 for
|
||||
instance); 'string' and UTF-8 may be a better choice.
|
||||
|
||||
*/
|
|
@ -0,0 +1,60 @@
|
|||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public
|
||||
* License Version 1.1 (the "License"); you may not use this file
|
||||
* except in compliance with the License. You may obtain a copy of
|
||||
* the License at http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS
|
||||
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
* implied. See the License for the specific language governing
|
||||
* rights and limitations under the License.
|
||||
*
|
||||
* The Original Code is the Mozilla browser.
|
||||
*
|
||||
* The Initial Developer of the Original Code is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1999 Netscape Communications Corporation. All
|
||||
* Rights Reserved.
|
||||
*
|
||||
* Original Author: Marc Mulcahy (marc.mulcahy@sun.com)
|
||||
*
|
||||
* Contributor(s): Bill Haneman (bill.haneman@sun.com)
|
||||
* John Gaunt (jgaunt@netscape.com)
|
||||
*/
|
||||
|
||||
#include "nsISupports.idl"
|
||||
#include "nsIAccessible.idl"
|
||||
|
||||
interface nsIURI;
|
||||
|
||||
[scriptable, uuid(a492c7d6-1dd1-11b2-9bc0-80614884799a)]
|
||||
interface nsIAccessibleHyperLink : nsISupports
|
||||
{
|
||||
readonly attribute long links;
|
||||
readonly attribute long getStartIndex;
|
||||
readonly attribute long getEndIndex;
|
||||
|
||||
nsIURI getURI (in long i);
|
||||
|
||||
nsIAccessible getObject (in long i);
|
||||
|
||||
boolean isValid ();
|
||||
};
|
||||
|
||||
/*
|
||||
Assumptions:
|
||||
|
||||
The object associated with object or anchor index
|
||||
is an nsIAccessible.
|
||||
A URI can be represented by the nsIURI interface
|
||||
(or nsIURL interface).
|
||||
|
||||
Note that an object which supports nsIAccessibleHyperlink
|
||||
does *not* generally implement nsIAccessible, unlike the
|
||||
case of the other nsiAccessible* interfaces in this directory.
|
||||
|
||||
Aaron: would the nsISupports return from
|
||||
getObject be queryable for nsIURI and nsIURL directly?
|
||||
|
||||
*/
|
|
@ -0,0 +1,38 @@
|
|||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public
|
||||
* License Version 1.1 (the "License"); you may not use this file
|
||||
* except in compliance with the License. You may obtain a copy of
|
||||
* the License at http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS
|
||||
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
* implied. See the License for the specific language governing
|
||||
* rights and limitations under the License.
|
||||
*
|
||||
* The Original Code is the Mozilla browser.
|
||||
*
|
||||
* The Initial Developer of the Original Code is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1999 Netscape Communications Corporation. All
|
||||
* Rights Reserved.
|
||||
*
|
||||
* Original Author: Marc Mulcahy (marc.mulcahy@sun.com)
|
||||
*
|
||||
* Contributor(s): Bill Haneman (bill.haneman@sun.com)
|
||||
* Paul Sandoz (paul.sandoz@sun.com)
|
||||
* John Gaunt (jgaunt@netscape.com)
|
||||
*/
|
||||
|
||||
#include "nsISupports.idl"
|
||||
#include "nsIAccessibleHyperLink.idl"
|
||||
|
||||
[scriptable, uuid(8f18d922-1dd2-11b2-82ea-829b78a44413)]
|
||||
interface nsIAccessibleHyperText : nsISupports
|
||||
{
|
||||
readonly attribute long links;
|
||||
|
||||
nsIAccessibleHyperLink getLink (in long index);
|
||||
|
||||
long getLinkIndex (in long charIndex);
|
||||
};
|
|
@ -0,0 +1,66 @@
|
|||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public
|
||||
* License Version 1.1 (the "License"); you may not use this file
|
||||
* except in compliance with the License. You may obtain a copy of
|
||||
* the License at http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS
|
||||
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
* implied. See the License for the specific language governing
|
||||
* rights and limitations under the License.
|
||||
*
|
||||
* The Original Code is the Mozilla browser.
|
||||
*
|
||||
* The Initial Developer of the Original Code is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1999 Netscape Communications Corporation. All
|
||||
* Rights Reserved.
|
||||
*
|
||||
* Original Author: Marc Mulcahy (marc.mulcahy@sun.com)
|
||||
*
|
||||
* Contributor(s): Paul Sandoz (paul.sandoz@sun.com)
|
||||
* Bill Haneman (bill.haneman@sun.com)
|
||||
* John Gaunt (jgaunt@netscape.com)
|
||||
*/
|
||||
|
||||
#include "nsISupports.idl"
|
||||
#include "nsIAccessible.idl"
|
||||
|
||||
[scriptable, uuid(0A7E98A9-CA7D-42F0-BFE1-2CFC35256038)]
|
||||
interface nsIAccessibleTable : nsISupports
|
||||
{
|
||||
attribute nsIAccessible caption;
|
||||
attribute nsIAccessible summary;
|
||||
readonly attribute long columns;
|
||||
readonly attribute nsIAccessibleTable columnHeader;
|
||||
readonly attribute long rows;
|
||||
readonly attribute nsIAccessibleTable rowHeader;
|
||||
|
||||
void getSelectedColumns (out unsigned long columnsSize,
|
||||
[retval, array, size_is(columnsSize)] out long columns);
|
||||
|
||||
void getSelectedRows (out unsigned long rowsSize,
|
||||
[retval, array, size_is(rowsSize)] out long rows);
|
||||
|
||||
/**
|
||||
* gets a cell
|
||||
*/
|
||||
nsIAccessible cellRefAt (in long row, in long column);
|
||||
|
||||
/**
|
||||
* get an index
|
||||
*/
|
||||
long getIndexAt (in long row, in long column);
|
||||
long getColumnAtIndex (in long index);
|
||||
long getRowAtIndex (in long index);
|
||||
long getColumnExtentAt (in long row, in long column);
|
||||
long getRowExtentAt (in long row, in long column);
|
||||
|
||||
wstring getColumnDescription (in long column);
|
||||
wstring getRowDescription (in long row);
|
||||
|
||||
boolean isColumnSelected (in long column);
|
||||
boolean isRowSelected (in long row);
|
||||
boolean isCellSelected (in long row, in long column);
|
||||
};
|
|
@ -0,0 +1,149 @@
|
|||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public
|
||||
* License Version 1.1 (the "License"); you may not use this file
|
||||
* except in compliance with the License. You may obtain a copy of
|
||||
* the License at http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS
|
||||
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
* implied. See the License for the specific language governing
|
||||
* rights and limitations under the License.
|
||||
*
|
||||
* The Original Code is the Mozilla browser.
|
||||
*
|
||||
* The Initial Developer of the Original Code is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1999 Netscape Communications Corporation. All
|
||||
* Rights Reserved.
|
||||
*
|
||||
* Original Author: Marc Mulcahy (marc.mulcahy@sun.com)
|
||||
*
|
||||
* Contributor(s): Paul Sandoz (paul.sandoz@sun.com)
|
||||
* Bill Haneman (bill.haneman@sun.com)
|
||||
* John Gaunt (jgaunt@netscape.com)
|
||||
*/
|
||||
|
||||
#include "nsISupports.idl"
|
||||
|
||||
typedef long nsAccessibleTextBoundary;
|
||||
typedef long nsAccessibleCoordType;
|
||||
|
||||
[scriptable, uuid(E44D3FA6-9CB2-432A-8BDB-69D72B6ADA00)]
|
||||
interface nsIAccessibleText : nsISupports
|
||||
{
|
||||
const nsAccessibleTextBoundary BOUNDARY_CHAR = 0;
|
||||
const nsAccessibleTextBoundary BOUNDARY_WORD_START = 1;
|
||||
const nsAccessibleTextBoundary BOUNDARY_WORD_END = 2;
|
||||
const nsAccessibleTextBoundary BOUNDARY_SENTENCE_START = 3;
|
||||
const nsAccessibleTextBoundary BOUNDARY_SENTENCE_END = 4;
|
||||
const nsAccessibleTextBoundary BOUNDARY_LINE_START = 5;
|
||||
const nsAccessibleTextBoundary BOUNDARY_LINE_END = 6;
|
||||
const nsAccessibleTextBoundary BOUNDARY_ATTRIBUTE_RANGE = 7;
|
||||
|
||||
const nsAccessibleCoordType COORD_TYPE_SCREEN = 0;
|
||||
const nsAccessibleCoordType COORD_TYPE_WINDOW = 1;
|
||||
|
||||
readonly attribute long caretOffset;
|
||||
/**
|
||||
* This needs a return value for success/failure
|
||||
* Not all text fields may support this
|
||||
*/
|
||||
boolean setCaretOffset (in long offset);
|
||||
|
||||
readonly attribute long characterCount;
|
||||
|
||||
/**
|
||||
* String methods may need to return multibyte-encoded strings,
|
||||
* since some locales can't be encoded using 16-bit chars.
|
||||
* So the methods below might return UTF-16 strings, or they could
|
||||
* return "string" values which are UTF-8.
|
||||
*/
|
||||
wstring getText (in long startOffset, in long endOffset);
|
||||
|
||||
wstring getTextAfterOffset (in long offset,
|
||||
in nsAccessibleTextBoundary boundaryType,
|
||||
out long startOffset,
|
||||
out long endOffset);
|
||||
|
||||
wstring getTextAtOffset (in long offset,
|
||||
in nsAccessibleTextBoundary boundaryType,
|
||||
out long startOffset,
|
||||
out long endOffset);
|
||||
|
||||
/**
|
||||
* It would be better to return an unsigned long here,
|
||||
* to allow unicode chars > 16 bits
|
||||
*/
|
||||
wchar getCharacterAtOffset (in long offset);
|
||||
|
||||
nsISupports getAttributeRange (in long offset,
|
||||
out long rangeStartOffset,
|
||||
out long rangeEndOffset);
|
||||
|
||||
wstring getTextBeforeOffset (in long offset,
|
||||
in nsAccessibleTextBoundary boundaryType,
|
||||
out long startOffset,
|
||||
out long endOffset);
|
||||
|
||||
void getCharacterExtents (in long offset,
|
||||
out long x,
|
||||
out long y,
|
||||
out long length,
|
||||
out long width,
|
||||
in nsAccessibleCoordType coordType);
|
||||
|
||||
long getOffsetAtPoint (in long x, in long y,
|
||||
in nsAccessibleCoordType coordType);
|
||||
|
||||
void getSelectionBounds (in long selectionNum,
|
||||
out long startOffset,
|
||||
out long endOffset);
|
||||
|
||||
/**
|
||||
* This needs a return value for success/failure
|
||||
* Not all text fields may support this
|
||||
*/
|
||||
boolean setSelectionBounds (in long selectionNum,
|
||||
in long startOffset,
|
||||
in long endOffset);
|
||||
|
||||
/**
|
||||
* This needs a return value for success/failure
|
||||
* Not all text fields may support this
|
||||
*/
|
||||
boolean addSelection (in long selectionNum,
|
||||
in long startOffset,
|
||||
in long endOffset);
|
||||
|
||||
/**
|
||||
* This needs a return value for success/failure
|
||||
* Not all text fields may support this
|
||||
*/
|
||||
boolean removeSelection (in long selectionNum);
|
||||
};
|
||||
|
||||
/*
|
||||
Assumptions:
|
||||
|
||||
Using wstring (UCS2) instead of string encoded in UTF-8.
|
||||
Multibyte encodings (or at least potentially multi-byte
|
||||
encodings) would be preferred for the reasons cited above.
|
||||
|
||||
The following methods will throw an exception
|
||||
on failure (since not every text component will allow
|
||||
every operation):
|
||||
setSelectionBounds, addSelection, removeSelection,
|
||||
setCaretOffset.
|
||||
|
||||
getRangeAttributes defined to return an nsISupports
|
||||
interface instead of a pango specific data structure.
|
||||
It may be that some other return type is more appropriate
|
||||
for mozilla text attributes.
|
||||
|
||||
we assume that all text components support the idea of
|
||||
a caret offset, whether visible or "virtual". If this
|
||||
isn't the case, caretOffset can be made readonly and
|
||||
a setCaretOffset method provided which throws an exception
|
||||
on failure (as with *selection methods above).
|
||||
*/
|
Загрузка…
Ссылка в новой задаче