2007-09-08 Li Yuan <li.yuan@sun.com>
[platform/core/uifw/at-spi2-atk.git] / idl / Accessibility_Collection.idl
1  /* 
2   * AT-SPI - Assistive Technology Service Provider Interface 
3   * (Gnome Accessibility Project; http://developer.gnome.org/projects/gap)
4   *
5   * Copyright 2005 Sun Microsystems, Inc.
6   *
7   * This library is free software; you can redistribute it and/or
8   * modify it under the terms of the GNU Library General Public
9   * License as published by the Free Software Foundation; either
10   * version 2 of the License, or (at your option) any later version.
11   *
12   * This library is distributed in the hope that it will be useful,
13   * but WITHOUT ANY WARRANTY; without even the implied warranty of
14   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
15   * Library General Public License for more details.
16   *
17   * You should have received a copy of the GNU Library General Public
18   * License along with this library; if not, write to the
19   * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
20   * Boston, MA 02111-1307, USA.
21   */
22
23 #ifndef __ACCESSIBILITY_COLLECTION_DEFINED__
24 #define __ACCESSIBILITY_COLLECTION_DEFINED__
25  
26 module Accessibility {
27
28 struct AccessibleSetEntry {
29          Accessible accessible;
30          string     name;
31          Role       role;
32 };
33
34 typedef sequence<AccessibleSetEntry> AccessibleSet;
35  
36      interface MatchRule {
37      };
38
39
40      interface Collection : Bonobo::Unknown {
41  
42        enum SortOrder {
43             SORT_ORDER_INVALID,
44             SORT_ORDER_CANONICAL, 
45             SORT_ORDER_FLOW, 
46             SORT_ORDER_TAB, 
47             SORT_ORDER_REVERSE_CANONICAL, 
48             SORT_ORDER_REVERSE_FLOW, 
49             SORT_ORDER_REVERSE_TAB, 
50             SORT_ORDER_LAST_DEFINED
51        };
52    
53        enum MatchType {
54            MATCH_INVALID, 
55            MATCH_ALL, 
56            MATCH_ANY, 
57            MATCH_NONE,
58            MATCH_EMPTY,
59            MATCH_LAST_DEFINED
60            };
61
62
63         boolean isAncestorOf (in Accessible object); 
64   
65         MatchRule        createMatchRule (in StateSet states,
66                                           in MatchType statematchtype,
67                                           in AttributeSet attributes,
68                                           in MatchType attributematchtype,
69                                           in RoleSet roles,
70                                           in MatchType rolematchtype,
71                                           in string interfaces,
72                                           in MatchType interfacematchtype,
73                                           in boolean invert);
74
75         void             freeMatchRule (in MatchRule rule);
76
77         AccessibleSet getChildren (in MatchRule rule,
78                                    in SortOrder sortby,
79                                    in boolean recurse,
80                                    inout long count); /* inOut not accepted */
81
82         AccessibleSet getPreviousChildren (in Accessible current_object,
83                                            in MatchRule rule, 
84                                            in SortOrder sortby, 
85                                            in boolean recurse,
86                                            inout long count);
87
88
89         AccessibleSet getNextChildren (in Accessible current_object,
90                                        in MatchRule rule, 
91                                        in SortOrder sortby, 
92                                        in boolean recurse,
93                                        inout long count);
94
95         Accessible getActiveDescendant ();
96         
97         void unImplemented ();
98         void unImplemented2 ();
99         void unImplemented3 ();
100         void unImplemented4 (); 
101    };
102 };
103
104 #endif