Added new API for ATK 1.11/1.12. Minor docs cleanup.
[platform/upstream/atk.git] / atk / atkstate.h
1 /* ATK -  Accessibility Toolkit
2  * Copyright 2001 Sun Microsystems Inc.
3  *
4  * This library is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Library General Public
6  * License as published by the Free Software Foundation; either
7  * version 2 of the License, or (at your option) any later version.
8  *
9  * This library is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12  * Library General Public License for more details.
13  *
14  * You should have received a copy of the GNU Library General Public
15  * License along with this library; if not, write to the
16  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17  * Boston, MA 02111-1307, USA.
18  */
19
20 #ifndef __ATK_STATE_H__
21 #define __ATK_STATE_H__
22
23 #ifdef __cplusplus
24 extern "C" {
25 #endif /* __cplusplus */
26
27 #include <glib-object.h>
28
29 /**
30  *AtkStateType:
31  *@ATK_STATE_INVALID: Indicates an invalid state
32  *@ATK_STATE_ACTIVE: Indicates a window is currently the active window
33  *@ATK_STATE_ARMED: Indicates that the object is armed.
34  *@ATK_STATE_BUSY: Indicates the current object is busy.  This state may be used by implementors of Document to indicate that content loading is in process.
35  *@ATK_STATE_CHECKED: Indicates this object is currently checked
36  *@ATK_STATE_DEFUNCT: Indicates the user interface object corresponding to this object no longer exists
37  *@ATK_STATE_EDITABLE: Indicates the user can change the contents of this object
38  *@ATK_STATE_ENABLED: Indicates that this object is enabled. An inconsistent GtkToggleButton is an example of an object which is sensitive but not enabled.
39  *@ATK_STATE_EXPANDABLE: Indicates this object allows progressive disclosure of its children
40  *@ATK_STATE_EXPANDED: Indicates this object its expanded
41  *@ATK_STATE_FOCUSABLE: Indicates this object can accept keyboard focus, which means all events resulting from typing on the keyboard will normally be passed to it when it has focus
42  *@ATK_STATE_FOCUSED: Indicates this object currently has the keyboard focus
43  *@ATK_STATE_HORIZONTAL: Indicates the orientation of this object is horizontal
44  *@ATK_STATE_ICONIFIED: Indicates this object is minimized and is represented only by an icon
45  *@ATK_STATE_MODAL: Indicates something must be done with this object before the user can interact with an object in a different window
46  *@ATK_STATE_MULTI_LINE: Indicates this (text) object can contain multiple lines of text
47  *@ATK_STATE_MULTISELECTABLE: Indicates this object allows more than one of its children to be selected at the same time
48  *@ATK_STATE_OPAQUE: Indicates this object paints every pixel within its rectangular region.
49  *@ATK_STATE_PRESSED: Indicates this object is currently pressed
50  *@ATK_STATE_RESIZABLE: Indicates the size of this object is not fixed
51  *@ATK_STATE_SELECTABLE: Indicates this object is the child of an object that allows its children to be selected and that this child is one of those children that can be selected
52  *@ATK_STATE_SELECTED: Indicates this object is the child of an object that allows its children to be selected and that this child is one of those children that has been selected
53  *@ATK_STATE_SENSITIVE: Indicates this object is sensitive
54  *@ATK_STATE_SHOWING: Indicates this object, the object's parent, the object's parent's parent, and so on, are all visible
55  *@ATK_STATE_SINGLE_LINE: Indicates this (text) object can contain only a single line of text
56  *@ATK_STATE_STALE: Indicates that the index associated with this object has changed since the user accessed the object.
57  *@ATK_STATE_TRANSIENT: Indicates this object is transient
58  *@ATK_STATE_VERTICAL: Indicates the orientation of this object is vertical
59  *@ATK_STATE_VISIBLE: Indicates this object is visible
60  *@ATK_STATE_MANAGES_DESCENDANTS: Indicates that "active-descendant-changed" event
61  * is sent when children become 'active' (i.e. are selected or navigated to onscreen).
62  * Used to prevent need to enumerate all children in very large containers, like tables.
63  *@ATK_STATE_INDETERMINATE: Indicates that a check box is in a state other than checked or not checked.
64  *@ATK_STATE_TRUNCATED: Indicates that an object is truncated, e.g. a text value in a speradsheet cell.
65  *@ATK_STATE_REQUIRED: Indicates that explicit user interaction with an object is required by the user interface, e.g. a required field in a "web-form" interface.
66  *@ATK_STATE_INVALID_ENTRY: Indicates that the object has encountered an error condition due to failure of input validation. For instance, a form control may acquire this state in response to invalid or malformed user input.
67  *@ATK_STATE_SUPPORTS_AUTOCOMPLETION: Indicates that the object may exhibit "typeahead" behavior in response to user keystrokes, e.g. one keystroke may result in the insertion of several characters into an entry, or result in the auto-selection of an item in a list.  This state supplants @ATK_ROLE_AUTOCOMPLETE.
68  *@ATK_STATE_SELECTABLE_TEXT:Indicates that the object in question supports text selection. It should only be exposed on objects which implement the Text interface, in order to distinguish this state from @ATK_STATE_SELECTABLE, which infers that the object in question is a selectable child of an object which implements Selection. While similar, text selection and subelement selection are distinct operations.
69  *@ATK_STATE_LAST_DEFINED: Not a valid state, used for finding end of enumeration
70  *
71  *The possible types of states of an object
72  **/ 
73 typedef enum
74 {
75   ATK_STATE_INVALID,
76   ATK_STATE_ACTIVE,
77   ATK_STATE_ARMED,
78   ATK_STATE_BUSY,
79   ATK_STATE_CHECKED,
80   ATK_STATE_DEFUNCT,
81   ATK_STATE_EDITABLE,
82   ATK_STATE_ENABLED,
83   ATK_STATE_EXPANDABLE,
84   ATK_STATE_EXPANDED,
85   ATK_STATE_FOCUSABLE,
86   ATK_STATE_FOCUSED,
87   ATK_STATE_HORIZONTAL,
88   ATK_STATE_ICONIFIED,
89   ATK_STATE_MODAL,
90   ATK_STATE_MULTI_LINE,
91   ATK_STATE_MULTISELECTABLE,
92   ATK_STATE_OPAQUE,
93   ATK_STATE_PRESSED,
94   ATK_STATE_RESIZABLE,
95   ATK_STATE_SELECTABLE,
96   ATK_STATE_SELECTED,
97   ATK_STATE_SENSITIVE,
98   ATK_STATE_SHOWING,
99   ATK_STATE_SINGLE_LINE,
100   ATK_STATE_STALE,
101   ATK_STATE_TRANSIENT,
102   ATK_STATE_VERTICAL,
103   ATK_STATE_VISIBLE,
104   ATK_STATE_MANAGES_DESCENDANTS,
105   ATK_STATE_INDETERMINATE,
106   ATK_STATE_TRUNCATED,
107   ATK_STATE_REQUIRED,
108   ATK_STATE_INVALID_ENTRY,
109   ATK_STATE_SUPPORTS_AUTOCOMPLETION,
110   ATK_STATE_SELECTABLE_TEXT,
111         
112   ATK_STATE_LAST_DEFINED
113 } AtkStateType;
114
115 typedef guint64      AtkState;
116
117 AtkStateType atk_state_type_register            (const gchar *name);
118
119 G_CONST_RETURN gchar* atk_state_type_get_name   (AtkStateType type);
120 AtkStateType          atk_state_type_for_name   (const gchar  *name);
121
122 #ifdef __cplusplus
123 }
124 #endif /* __cplusplus */
125
126 #endif /* __ATK_STATE_H__ */