/* * AT-SPI - Assistive Technology Service Provider Interface * (Gnome Accessibility Project; http://developer.gnome.org/projects/gap) * * Copyright 2001 Sun Microsystems, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ module Accessibility { enum TEXT_BOUNDARY_TYPE { TEXT_BOUNDARY_CHAR, TEXT_BOUNDARY_CURSOR_POS, TEXT_BOUNDARY_WORD_START, TEXT_BOUNDARY_WORD_END, TEXT_BOUNDARY_SENTENCE_START, TEXT_BOUNDARY_SENTENCE_END, TEXT_BOUNDARY_LINE_START, TEXT_BOUNDARY_LINE_END }; interface Text { long getCharacterCount (); string getText (in long startOfffset, in long endOffset); long getCaretOffset (); boolean setCaretOffset (in long offset); string getTextBeforeOffset (in long offset, in TEXT_BOUNDARY_TYPE type); string getTextAtOffset (in long offset, in TEXT_BOUNDARY_TYPE type); string getTextAfterOffset (in long offset, in TEXT_BOUNDARY_TYPE type); /* could be string instead, to allow unicode chars > 16 bits */ wchar getCharacterAtOffset (in long offset); void getRowColAtOffset (in long offset, out long row, out long column); string getAttributes (in long startOffset, in long endOffset); boolean getCharacterExtents (in long offset, out long x, out long y, out long length, out long width); long getOffsetAtPoint (in long x, in long y); string getSelectedText (); void getSelectionBounds (out long startOffset, out long endOffset); boolean setSelectionBounds (in long startOffset, in long endOffset); }; };