1*b1cdbd2cSJim Jagielski/**************************************************************
2*b1cdbd2cSJim Jagielski *
3*b1cdbd2cSJim Jagielski * Licensed to the Apache Software Foundation (ASF) under one
4*b1cdbd2cSJim Jagielski * or more contributor license agreements.  See the NOTICE file
5*b1cdbd2cSJim Jagielski * distributed with this work for additional information
6*b1cdbd2cSJim Jagielski * regarding copyright ownership.  The ASF licenses this file
7*b1cdbd2cSJim Jagielski * to you under the Apache License, Version 2.0 (the
8*b1cdbd2cSJim Jagielski * "License"); you may not use this file except in compliance
9*b1cdbd2cSJim Jagielski * with the License.  You may obtain a copy of the License at
10*b1cdbd2cSJim Jagielski *
11*b1cdbd2cSJim Jagielski *   http://www.apache.org/licenses/LICENSE-2.0
12*b1cdbd2cSJim Jagielski *
13*b1cdbd2cSJim Jagielski * Unless required by applicable law or agreed to in writing,
14*b1cdbd2cSJim Jagielski * software distributed under the License is distributed on an
15*b1cdbd2cSJim Jagielski * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*b1cdbd2cSJim Jagielski * KIND, either express or implied.  See the License for the
17*b1cdbd2cSJim Jagielski * specific language governing permissions and limitations
18*b1cdbd2cSJim Jagielski * under the License.
19*b1cdbd2cSJim Jagielski *
20*b1cdbd2cSJim Jagielski *************************************************************/
21*b1cdbd2cSJim Jagielski
22*b1cdbd2cSJim Jagielski
23*b1cdbd2cSJim Jagielski
24*b1cdbd2cSJim Jagielski#ifndef __com_sun_star_drawing_AccessibleShape_idl__
25*b1cdbd2cSJim Jagielski#define __com_sun_star_drawing_AccessibleShape_idl__
26*b1cdbd2cSJim Jagielski
27*b1cdbd2cSJim Jagielski#ifndef __com_sun_star_accessibility_XAccessible_idl__
28*b1cdbd2cSJim Jagielski#include <com/sun/star/accessibility/XAccessible.idl>
29*b1cdbd2cSJim Jagielski#endif
30*b1cdbd2cSJim Jagielski#ifndef __com_sun_star_accessibility_XAccessibleContext_idl__
31*b1cdbd2cSJim Jagielski#include <com/sun/star/accessibility/XAccessibleContext.idl>
32*b1cdbd2cSJim Jagielski#endif
33*b1cdbd2cSJim Jagielski#ifndef __com_sun_star_accessibility_XAccessibleExtendedComponent_idl__
34*b1cdbd2cSJim Jagielski#include <com/sun/star/accessibility/XAccessibleExtendedComponent.idl>
35*b1cdbd2cSJim Jagielski#endif
36*b1cdbd2cSJim Jagielski
37*b1cdbd2cSJim Jagielskimodule com {  module sun {  module star {  module drawing {
38*b1cdbd2cSJim Jagielski
39*b1cdbd2cSJim Jagielski/** The <type>AccessibleShape</type> service is implemented by UNO shapes to
40*b1cdbd2cSJim Jagielski    provide accessibility information that describe the shapes' features.
41*b1cdbd2cSJim Jagielski    A UNO shape is any object that implements the <type
42*b1cdbd2cSJim Jagielski    scope="::com::sun::star::drawing">XShape</type> interface.
43*b1cdbd2cSJim Jagielski
44*b1cdbd2cSJim Jagielski    <p>The content of a draw page is modeled as tree of accessible shapes
45*b1cdbd2cSJim Jagielski    and accessible text paragraphs.  The root of this (sub-)tree is the
46*b1cdbd2cSJim Jagielski    accessible draw document view.  An accessible shape implements either
47*b1cdbd2cSJim Jagielski    this service or one of the 'derived' services
48*b1cdbd2cSJim Jagielski    <type>AccessibleGraphicShape</type> or <type>AccessibleOLEShape</type>.
49*b1cdbd2cSJim Jagielski    See the section Children in the description of the
50*b1cdbd2cSJim Jagielski    <type scope="::com::sun::star::accessibility"
51*b1cdbd2cSJim Jagielski    >XAccessibleContext</type> interface support for more details.</p>
52*b1cdbd2cSJim Jagielski
53*b1cdbd2cSJim Jagielski    <p>There are two services that extend this one:  the
54*b1cdbd2cSJim Jagielski    <type>AccessibleGraphicShape</type> and the
55*b1cdbd2cSJim Jagielski    <type>AccessibleOLEShape</type> services provide additional interfaces.
56*b1cdbd2cSJim Jagielski    See there for details.</p>
57*b1cdbd2cSJim Jagielski
58*b1cdbd2cSJim Jagielski    <p>A shape object is either fully or partially visible on the screen or
59*b1cdbd2cSJim Jagielski    has set the <const scope="::com::sun::star::accessibility"
60*b1cdbd2cSJim Jagielski    >AccessibleStateType::DEFUNC</const> state to indicate that it is no longer
61*b1cdbd2cSJim Jagielski    actively supported by its parent.</p>
62*b1cdbd2cSJim Jagielski
63*b1cdbd2cSJim Jagielski    <p>Each shape object that has not set the DEFUNC state has a valid
64*b1cdbd2cSJim Jagielski    parent.  That is either the containing draw page or a group shape or a
65*b1cdbd2cSJim Jagielski    3D scene object.</p>
66*b1cdbd2cSJim Jagielski
67*b1cdbd2cSJim Jagielski	 @since OpenOffice 1.1.2
68*b1cdbd2cSJim Jagielski*/
69*b1cdbd2cSJim Jagielskipublished service AccessibleShape
70*b1cdbd2cSJim Jagielski{
71*b1cdbd2cSJim Jagielski    /** Base interface for being accessible.  It gives access to the
72*b1cdbd2cSJim Jagielski        <type scope="::com::sun::star::accessibility">XAccessibleContext</type>
73*b1cdbd2cSJim Jagielski        interface.
74*b1cdbd2cSJim Jagielski    */
75*b1cdbd2cSJim Jagielski    interface ::com::sun::star::accessibility::XAccessible;
76*b1cdbd2cSJim Jagielski
77*b1cdbd2cSJim Jagielski    /** Give access to the structural information of a shape.
78*b1cdbd2cSJim Jagielski
79*b1cdbd2cSJim Jagielski        <p>You can access the following information for the shape being made
80*b1cdbd2cSJim Jagielski        accessible:
81*b1cdbd2cSJim Jagielski        <ul>
82*b1cdbd2cSJim Jagielski        <li>Role: The role of all shapes is <const
83*b1cdbd2cSJim Jagielski            scope="com::sun::star::accessibility"
84*b1cdbd2cSJim Jagielski            >AccessibleRole::SHAPE</const>.</li>
85*b1cdbd2cSJim Jagielski        <li>Name: The name of a shape is its localized type name.</li>
86*b1cdbd2cSJim Jagielski        <li>Description: Descriptions are localized and start with the
87*b1cdbd2cSJim Jagielski            shape's type and style.  After that follow some properties that
88*b1cdbd2cSJim Jagielski            differ from the defaults with respect to the style.
89*b1cdbd2cSJim Jagielski        <li>Children: The children of a shape are either other accessible
90*b1cdbd2cSJim Jagielski            shapes or accessible text paragraphs.  Only group shapes, 3D scene
91*b1cdbd2cSJim Jagielski            shapes, and OLE shapes may contain other shapes as children.
92*b1cdbd2cSJim Jagielski            Some of the shapes may have text paragraphs as (additional)
93*b1cdbd2cSJim Jagielski            children.  See <type scope="::com::sun::star::text"
94*b1cdbd2cSJim Jagielski            >AccessibleParagraphView</type> for details of
95*b1cdbd2cSJim Jagielski            how this text is represented.</li>
96*b1cdbd2cSJim Jagielski        <li>Parent: The parent is either the document view as represented by
97*b1cdbd2cSJim Jagielski            <type>AccessibleDrawDocumentView</type> or a group shape, 3D
98*b1cdbd2cSJim Jagielski            scene shape, or OLE shape.</li>
99*b1cdbd2cSJim Jagielski        <li>Relations: Are set and maintained from the outside.  See the
100*b1cdbd2cSJim Jagielski        service description of the object that has accessible shapes as
101*b1cdbd2cSJim Jagielski        children for details.</li>
102*b1cdbd2cSJim Jagielski        <li>States: The states supported by this service are:
103*b1cdbd2cSJim Jagielski            <ul>
104*b1cdbd2cSJim Jagielski            <li><p><const scope="com::sun::star::accessibility"
105*b1cdbd2cSJim Jagielski                >AccessibleStateType::DEFUNC</const> is set if an accessible
106*b1cdbd2cSJim Jagielski                shape is not visible but still existent for some reason.
107*b1cdbd2cSJim Jagielski                This should not really happen and is a sign that someone,
108*b1cdbd2cSJim Jagielski                e.g. an AT-Tool holds references to such a shape.  The
109*b1cdbd2cSJim Jagielski                reason for this is that either the owner of the accessible
110*b1cdbd2cSJim Jagielski                shape did not remove it from its list of children or that
111*b1cdbd2cSJim Jagielski                the AT-Tool does not care for the events indicating
112*b1cdbd2cSJim Jagielski                this.</p>
113*b1cdbd2cSJim Jagielski                <p>Usually an object that has the <const
114*b1cdbd2cSJim Jagielski                scope="com::sun::star::accessibility"
115*b1cdbd2cSJim Jagielski                >AccessibleStateType::DEFUNC</const> state set has already
116*b1cdbd2cSJim Jagielski                been disposed and subsequent calls to this object result in
117*b1cdbd2cSJim Jagielski                <type scope="::com::sun::star::lang">DisposedException</type>
118*b1cdbd2cSJim Jagielski                exceptions.</p>
119*b1cdbd2cSJim Jagielski                <p>If this state is set then no other of the states below is
120*b1cdbd2cSJim Jagielski                set.  This  is also true for the states that are otherwise
121*b1cdbd2cSJim Jagielski                allways set (which  makes 'allways' more of a sort of
122*b1cdbd2cSJim Jagielski                'normally').</p></li>
123*b1cdbd2cSJim Jagielski            <li><const scope="com::sun::star::accessibility"
124*b1cdbd2cSJim Jagielski                >AccessibleStateType::EDITABLE</const></li> is always set.
125*b1cdbd2cSJim Jagielski                This state is interpreted to mean that not only text but
126*b1cdbd2cSJim Jagielski                also other, graphical, properties of a shape can be modified.
127*b1cdbd2cSJim Jagielski            <li><const scope="com::sun::star::accessibility"
128*b1cdbd2cSJim Jagielski                >AccessibleStateType::ENABLED</const> is always set.</li>
129*b1cdbd2cSJim Jagielski            <li><const scope="com::sun::star::accessibility"
130*b1cdbd2cSJim Jagielski                >AccessibleStateType::FOCUSABLE</const> is always set.</li>
131*b1cdbd2cSJim Jagielski            <li><const scope="com::sun::star::accessibility"
132*b1cdbd2cSJim Jagielski                >AccessibleStateType::FOCUSED</const> is set according to
133*b1cdbd2cSJim Jagielski                whether the shape currently has the focus.</li>
134*b1cdbd2cSJim Jagielski            <li><const scope="com::sun::star::accessibility"
135*b1cdbd2cSJim Jagielski                >AccessibleStateType::MULTI_LINE</const> is set if a shape
136*b1cdbd2cSJim Jagielski                supports the <type scope="::com::sun::star::accessibility"
137*b1cdbd2cSJim Jagielski                >XAccessibleText</type> interface.</li>
138*b1cdbd2cSJim Jagielski            <li><const scope="com::sun::star::accessibility"
139*b1cdbd2cSJim Jagielski                >AccessibleStateType::OPAQUE</const> is set for certain shapes
140*b1cdbd2cSJim Jagielski                with certain attributes like for a filled rectangle.</li>
141*b1cdbd2cSJim Jagielski            <li><const scope="com::sun::star::accessibility"
142*b1cdbd2cSJim Jagielski                >AccessibleStateType::RESIZABLE</const> is always set.</li>
143*b1cdbd2cSJim Jagielski            <li><const scope="com::sun::star::accessibility"
144*b1cdbd2cSJim Jagielski                >AccessibleStateType::SELECTABLE</const> is always set.</li>
145*b1cdbd2cSJim Jagielski            <li><const scope="com::sun::star::accessibility"
146*b1cdbd2cSJim Jagielski                >AccessibleStateType::SELECTED</const> is set according to
147*b1cdbd2cSJim Jagielski                whether the shape is currently selected.</li>
148*b1cdbd2cSJim Jagielski            <li><const scope="com::sun::star::accessibility"
149*b1cdbd2cSJim Jagielski                >AccessibleStateType::SHOWING</const> is always set.</li>
150*b1cdbd2cSJim Jagielski            <li><const scope="com::sun::star::accessibility"
151*b1cdbd2cSJim Jagielski                >AccessibleStateType::VISIBLE</const> is always set.</li>
152*b1cdbd2cSJim Jagielski            </ul>
153*b1cdbd2cSJim Jagielski        <li>Locale: The shape returns the locale of its parent.</li>
154*b1cdbd2cSJim Jagielski        <li>Property change listeners: Property change listeners that are
155*b1cdbd2cSJim Jagielski            registered with a shape are informed of the usual events.</li>
156*b1cdbd2cSJim Jagielski        </ul>
157*b1cdbd2cSJim Jagielski    */
158*b1cdbd2cSJim Jagielski    interface ::com::sun::star::accessibility::XAccessibleContext;
159*b1cdbd2cSJim Jagielski
160*b1cdbd2cSJim Jagielski    /** Give access to the graphical representation of a shape.
161*b1cdbd2cSJim Jagielski
162*b1cdbd2cSJim Jagielski        <p>The bounding box returned by the <method
163*b1cdbd2cSJim Jagielski        scope="::com::sun::star::accessibility"
164*b1cdbd2cSJim Jagielski        >XAccessibleComponent::getBounds</method> function returns the
165*b1cdbd2cSJim Jagielski        shape's bounding box clipped at its parent's bounding box</p>
166*b1cdbd2cSJim Jagielski
167*b1cdbd2cSJim Jagielski        <p>An accessible shape tries as best as it can to return proper
168*b1cdbd2cSJim Jagielski        values for calls to the
169*b1cdbd2cSJim Jagielski        <method scope="::com::sun::star::accessibility"
170*b1cdbd2cSJim Jagielski        >XAccessibleExtendedComponent::getForeground</method> and
171*b1cdbd2cSJim Jagielski        <method scope="::com::sun::star::accessibility"
172*b1cdbd2cSJim Jagielski        >XAccessibleExtendedComponent::getBackground</method> functions.
173*b1cdbd2cSJim Jagielski        If the shape is painted with a uniform and non-transparent color
174*b1cdbd2cSJim Jagielski        then the returned colors may differ from the ones visible on the
175*b1cdbd2cSJim Jagielski        screen.</p>
176*b1cdbd2cSJim Jagielski
177*b1cdbd2cSJim Jagielski        <p>Key bindings are not supported at the moment</p>
178*b1cdbd2cSJim Jagielski    */
179*b1cdbd2cSJim Jagielski    interface ::com::sun::star::accessibility::XAccessibleComponent;
180*b1cdbd2cSJim Jagielski
181*b1cdbd2cSJim Jagielski    /** Give extended access to the graphical representation of a shape.
182*b1cdbd2cSJim Jagielski
183*b1cdbd2cSJim Jagielski        <p>The functions <method
184*b1cdbd2cSJim Jagielski        scope="::com::sun::star::accessibility"
185*b1cdbd2cSJim Jagielski        >XAccessibleExtendedComponent::getFont</method>,
186*b1cdbd2cSJim Jagielski        <method scope="::com::sun::star::accessibility"
187*b1cdbd2cSJim Jagielski        >XAccessibleExtendedComponent::getTitledBorderText</method>, and
188*b1cdbd2cSJim Jagielski        <method scope="::com::sun::star::accessibility"
189*b1cdbd2cSJim Jagielski        >XAccessibleExtendedComponent::getToolTipText</method> are not
190*b1cdbd2cSJim Jagielski        supported and return empty references respectively empty
191*b1cdbd2cSJim Jagielski        strings.</p>
192*b1cdbd2cSJim Jagielski
193*b1cdbd2cSJim Jagielski        <p>The support of this interface is optional to reduce overhead in
194*b1cdbd2cSJim Jagielski        case that no text is displayed and color information can not be
195*b1cdbd2cSJim Jagielski        determined with an acceptable cost.</p>
196*b1cdbd2cSJim Jagielski    */
197*b1cdbd2cSJim Jagielski    [optional] interface ::com::sun::star::accessibility::XAccessibleExtendedComponent;
198*b1cdbd2cSJim Jagielski};
199*b1cdbd2cSJim Jagielski
200*b1cdbd2cSJim Jagielski}; }; }; };
201*b1cdbd2cSJim Jagielski
202*b1cdbd2cSJim Jagielski#endif
203