other-licenses/atk-1.0/atk/atkobject.h

Tue, 06 Jan 2015 21:39:09 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Tue, 06 Jan 2015 21:39:09 +0100
branch
TOR_BUG_9701
changeset 8
97036ab72558
permissions
-rw-r--r--

Conditionally force memory storage according to privacy.thirdparty.isolate;
This solves Tor bug #9701, complying with disk avoidance documented in
https://www.torproject.org/projects/torbrowser/design/#disk-avoidance.

michael@0 1 /* ATK - Accessibility Toolkit
michael@0 2 * Copyright 2001 Sun Microsystems Inc.
michael@0 3 *
michael@0 4 * This library is free software; you can redistribute it and/or
michael@0 5 * modify it under the terms of the GNU Library General Public
michael@0 6 * License as published by the Free Software Foundation; either
michael@0 7 * version 2 of the License, or (at your option) any later version.
michael@0 8 *
michael@0 9 * This library is distributed in the hope that it will be useful,
michael@0 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
michael@0 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
michael@0 12 * Library General Public License for more details.
michael@0 13 *
michael@0 14 * You should have received a copy of the GNU Library General Public
michael@0 15 * License along with this library; if not, write to the
michael@0 16 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
michael@0 17 * Boston, MA 02111-1307, USA.
michael@0 18 */
michael@0 19
michael@0 20 #ifndef __ATK_OBJECT_H__
michael@0 21 #define __ATK_OBJECT_H__
michael@0 22
michael@0 23 #ifdef __cplusplus
michael@0 24 extern "C" {
michael@0 25 #endif /* __cplusplus */
michael@0 26
michael@0 27 #include <glib-object.h>
michael@0 28 #include <atk/atkstate.h>
michael@0 29 #include <atk/atkrelationtype.h>
michael@0 30
michael@0 31 /*
michael@0 32 * AtkObject represents the minimum information all accessible objects
michael@0 33 * return. This information includes accessible name, accessible
michael@0 34 * description, role and state of the object, as well information about
michael@0 35 * its parent and children. It is also possible to obtain more specific
michael@0 36 * accessibility information about a component if it supports one or more
michael@0 37 * of the following interfaces:
michael@0 38 */
michael@0 39
michael@0 40
michael@0 41 /**
michael@0 42 *AtkRole:
michael@0 43 *@ATK_ROLE_INVALID: Invalid role
michael@0 44 *@ATK_ROLE_ACCEL_LABEL: A label which represents an accelerator
michael@0 45 *@ATK_ROLE_ALERT: An object which is an alert to the user. Assistive Technologies typically respond to ATK_ROLE_ALERT by reading the entire onscreen contents of containers advertising this role. Should be used for warning dialogs, etc.
michael@0 46 *@ATK_ROLE_ANIMATION: An object which is an animated image
michael@0 47 *@ATK_ROLE_ARROW: An arrow in one of the four cardinal directions
michael@0 48 *@ATK_ROLE_CALENDAR: An object that displays a calendar and allows the user to select a date
michael@0 49 *@ATK_ROLE_CANVAS: An object that can be drawn into and is used to trap events
michael@0 50 *@ATK_ROLE_CHECK_BOX: A choice that can be checked or unchecked and provides a separate indicator for the current state
michael@0 51 *@ATK_ROLE_CHECK_MENU_ITEM: A menu item with a check box
michael@0 52 *@ATK_ROLE_COLOR_CHOOSER: A specialized dialog that lets the user choose a color
michael@0 53 *@ATK_ROLE_COLUMN_HEADER: The header for a column of data
michael@0 54 *@ATK_ROLE_COMBO_BOX: A collapsible list of choices the user can select from
michael@0 55 *@ATK_ROLE_DATE_EDITOR: An object whose purpose is to allow a user to edit a date
michael@0 56 *@ATK_ROLE_DESKTOP_ICON: An inconifed internal frame within a DESKTOP_PANE
michael@0 57 *@ATK_ROLE_DESKTOP_FRAME: A pane that supports internal frames and iconified versions of those internal frames
michael@0 58 *@ATK_ROLE_DIAL: An object whose purpose is to allow a user to set a value
michael@0 59 *@ATK_ROLE_DIALOG: A top level window with title bar and a border
michael@0 60 *@ATK_ROLE_DIRECTORY_PANE: A pane that allows the user to navigate through and select the contents of a directory
michael@0 61 *@ATK_ROLE_DRAWING_AREA: An object used for drawing custom user interface elements
michael@0 62 *@ATK_ROLE_FILE_CHOOSER: A specialized dialog that lets the user choose a file
michael@0 63 *@ATK_ROLE_FILLER: A object that fills up space in a user interface
michael@0 64 *@ATK_ROLE_FONT_CHOOSER: A specialized dialog that lets the user choose a font
michael@0 65 *@ATK_ROLE_FRAME: A top level window with a title bar, border, menubar, etc.
michael@0 66 *@ATK_ROLE_GLASS_PANE: A pane that is guaranteed to be painted on top of all panes beneath it
michael@0 67 *@ATK_ROLE_HTML_CONTAINER: A document container for HTML, whose children represent the document content
michael@0 68 *@ATK_ROLE_ICON: A small fixed size picture, typically used to decorate components
michael@0 69 *@ATK_ROLE_IMAGE: An object whose primary purpose is to display an image
michael@0 70 *@ATK_ROLE_INTERNAL_FRAME: A frame-like object that is clipped by a desktop pane
michael@0 71 *@ATK_ROLE_LABEL: An object used to present an icon or short string in an interface
michael@0 72 *@ATK_ROLE_LAYERED_PANE: A specialized pane that allows its children to be drawn in layers, providing a form of stacking order
michael@0 73 *@ATK_ROLE_LIST: An object that presents a list of objects to the user and allows the user to select one or more of them
michael@0 74 *@ATK_ROLE_LIST_ITEM: An object that represents an element of a list
michael@0 75 *@ATK_ROLE_MENU: An object usually found inside a menu bar that contains a list of actions the user can choose from
michael@0 76 *@ATK_ROLE_MENU_BAR: An object usually drawn at the top of the primary dialog box of an application that contains a list of menus the user can choose from
michael@0 77 *@ATK_ROLE_MENU_ITEM: An object usually contained in a menu that presents an action the user can choose
michael@0 78 *@ATK_ROLE_OPTION_PANE: A specialized pane whose primary use is inside a DIALOG
michael@0 79 *@ATK_ROLE_PAGE_TAB: An object that is a child of a page tab list
michael@0 80 *@ATK_ROLE_PAGE_TAB_LIST: An object that presents a series of panels (or page tabs), one at a time, through some mechanism provided by the object
michael@0 81 *@ATK_ROLE_PANEL: A generic container that is often used to group objects
michael@0 82 *@ATK_ROLE_PASSWORD_TEXT: A text object uses for passwords, or other places where the text content is not shown visibly to the user
michael@0 83 *@ATK_ROLE_POPUP_MENU: A temporary window that is usually used to offer the user a list of choices, and then hides when the user selects one of those choices
michael@0 84 *@ATK_ROLE_PROGRESS_BAR: An object used to indicate how much of a task has been completed
michael@0 85 *@ATK_ROLE_PUSH_BUTTON: An object the user can manipulate to tell the application to do something
michael@0 86 *@ATK_ROLE_RADIO_BUTTON: A specialized check box that will cause other radio buttons in the same group to become unchecked when this one is checked
michael@0 87 *@ATK_ROLE_RADIO_MENU_ITEM: A check menu item which belongs to a group. At each instant exactly one of the radio menu items from a group is selected
michael@0 88 *@ATK_ROLE_ROOT_PANE: A specialized pane that has a glass pane and a layered pane as its children
michael@0 89 *@ATK_ROLE_ROW_HEADER: The header for a row of data
michael@0 90 *@ATK_ROLE_SCROLL_BAR: An object usually used to allow a user to incrementally view a large amount of data.
michael@0 91 *@ATK_ROLE_SCROLL_PANE: An object that allows a user to incrementally view a large amount of information
michael@0 92 *@ATK_ROLE_SEPARATOR: An object usually contained in a menu to provide a visible and logical separation of the contents in a menu
michael@0 93 *@ATK_ROLE_SLIDER: An object that allows the user to select from a bounded range
michael@0 94 *@ATK_ROLE_SPLIT_PANE: A specialized panel that presents two other panels at the same time
michael@0 95 *@ATK_ROLE_SPIN_BUTTON: An object used to get an integer or floating point number from the user
michael@0 96 *@ATK_ROLE_STATUSBAR: An object which reports messages of minor importance to the user
michael@0 97 *@ATK_ROLE_TABLE: An object used to represent information in terms of rows and columns
michael@0 98 *@ATK_ROLE_TABLE_CELL: A cell in a table
michael@0 99 *@ATK_ROLE_TABLE_COLUMN_HEADER: The header for a column of a table
michael@0 100 *@ATK_ROLE_TABLE_ROW_HEADER: The header for a row of a table
michael@0 101 *@ATK_ROLE_TEAR_OFF_MENU_ITEM: A menu item used to tear off and reattach its menu
michael@0 102 *@ATK_ROLE_TERMINAL: An object that represents an accessible terminal. @Since: ATK-0.6
michael@0 103 *@ATK_ROLE_TEXT: An object that presents text to the user
michael@0 104 *@ATK_ROLE_TOGGLE_BUTTON: A specialized push button that can be checked or unchecked, but does not provide a separate indicator for the current state
michael@0 105 *@ATK_ROLE_TOOL_BAR: A bar or palette usually composed of push buttons or toggle buttons
michael@0 106 *@ATK_ROLE_TOOL_TIP: An object that provides information about another object
michael@0 107 *@ATK_ROLE_TREE: An object used to represent hierarchical information to the user
michael@0 108 *@ATK_ROLE_TREE_TABLE: An object capable of expanding and collapsing rows as well as showing multiple columns of data. @Since: ATK-0.7
michael@0 109 *@ATK_ROLE_UNKNOWN: The object contains some Accessible information, but its role is not known
michael@0 110 *@ATK_ROLE_VIEWPORT: An object usually used in a scroll pane
michael@0 111 *@ATK_ROLE_WINDOW: A top level window with no title or border.
michael@0 112 *@ATK_ROLE_HEADER: An object that serves as a document header. @Since: ATK-1.1.1
michael@0 113 *@ATK_ROLE_FOOTER: An object that serves as a document footer. @Since: ATK-1.1.1
michael@0 114 *@ATK_ROLE_PARAGRAPH: An object which is contains a paragraph of text content. @Since: ATK-1.1.1
michael@0 115 *@ATK_ROLE_RULER: An object which describes margins and tab stops, etc. for text objects which it controls (should have CONTROLLER_FOR relation to such). @Since: ATK-1.1.1
michael@0 116 *@ATK_ROLE_APPLICATION: The object is an application object, which may contain @ATK_ROLE_FRAME objects or other types of accessibles. The root accessible of any application's ATK hierarchy should have ATK_ROLE_APPLICATION. @Since: ATK-1.1.4
michael@0 117 *@ATK_ROLE_AUTOCOMPLETE: The object is a dialog or list containing items for insertion into an entry widget, for instance a list of words for completion of a text entry. @Since: ATK-1.3
michael@0 118 *@ATK_ROLE_EDITBAR: The object is an editable text object in a toolbar. @Since: ATK-1.5
michael@0 119 *@ATK_ROLE_EMBEDDED: The object is an embedded container within a document or panel. This role is a grouping "hint" indicating that the contained objects share a context. @Since: ATK-1.7.2
michael@0 120 *@ATK_ROLE_ENTRY: The object is a component whose textual content may be entered or modified by the user, provided @ATK_STATE_EDITABLE is present. @Since: ATK-1.11
michael@0 121 *@ATK_ROLE_CHART: The object is a graphical depiction of quantitative data. It may contain multiple subelements whose attributes and/or description may be queried to obtain both the quantitative data and information about how the data is being presented. The LABELLED_BY relation is particularly important in interpreting objects of this type, as is the accessible-description property. @Since: ATK-1.11
michael@0 122 *@ATK_ROLE_CAPTION: The object contains descriptive information, usually textual, about another user interface element such as a table, chart, or image. @Since: ATK-1.11
michael@0 123 *@ATK_ROLE_DOCUMENT_FRAME: The object is a visual frame or container which contains a view of document content. Document frames may occur within another Document instance, in which case the second document may be said to be embedded in the containing instance. HTML frames are often ROLE_DOCUMENT_FRAME. Either this object, or a singleton descendant, should implement the Document interface. @Since: ATK-1.11
michael@0 124 *@ATK_ROLE_HEADING: The object serves as a heading for content which follows it in a document. The 'heading level' of the heading, if availabe, may be obtained by querying the object's attributes.
michael@0 125 *@ATK_ROLE_PAGE: The object is a containing instance which encapsulates a page of information. @ATK_ROLE_PAGE is used in documents and content which support a paginated navigation model. @Since: ATK-1.11
michael@0 126 *@ATK_ROLE_SECTION: The object is a containing instance of document content which constitutes a particular 'logical' section of the document. The type of content within a section, and the nature of the section division itself, may be obtained by querying the object's attributes. Sections may be nested. @Since: ATK-1.11
michael@0 127 *@ATK_ROLE_REDUNDANT_OBJECT: The object is redundant with another object in the hierarchy, and is exposed for purely technical reasons. Objects of this role should normally be ignored by clients. @Since: ATK-1.11
michael@0 128 *@ATK_ROLE_FORM: The object is a container for form controls, for instance as part of a
michael@0 129 * web form or user-input form within a document. This role is primarily a tag/convenience for
michael@0 130 * clients when navigating complex documents, it is not expected that ordinary GUI containers will
michael@0 131 * always have ATK_ROLE_FORM. @Since: ATK-1.12.0
michael@0 132 *@ATK_ROLE_LINK: The object is a hypertext anchor, i.e. a "link" in a
michael@0 133 * hypertext document. Such objects are distinct from 'inline'
michael@0 134 * content which may also use the Hypertext/Hyperlink interfaces
michael@0 135 * to indicate the range/location within a text object where
michael@0 136 * an inline or embedded object lies. @Since: ATK-1.12.1
michael@0 137 *@ATK_ROLE_INPUT_METHOD_WINDOW: The object is a window or similar viewport
michael@0 138 * which is used to allow composition or input of a 'complex character',
michael@0 139 * in other words it is an "input method window." @Since: ATK-1.12.1
michael@0 140 *@ATK_ROLE_TABLE_ROW: A row in a table. @Since: ATK-2.1.0
michael@0 141 *@ATK_ROLE_TREE_ITEM: An object that represents an element of a tree. @Since: ATK-2.1.0
michael@0 142 *@ATK_ROLE_DOCUMENT_SPREADSHEET: A document frame which contains a spreadsheet. @Since: ATK-2.1.0
michael@0 143 *@ATK_ROLE_DOCUMENT_PRESENTATION: A document frame which contains a presentation or slide content. @Since: ATK-2.1.0
michael@0 144 *@ATK_ROLE_DOCUMENT_TEXT: A document frame which contains textual content, such as found in a word processing application. @Since: ATK-2.1.0
michael@0 145 *@ATK_ROLE_DOCUMENT_WEB: A document frame which contains HTML or other markup suitable for display in a web browser. @Since: ATK-2.1.0
michael@0 146 *@ATK_ROLE_DOCUMENT_EMAIL: A document frame which contains email content to be displayed or composed either in plain text or HTML. @Since: ATK-2.1.0
michael@0 147 *@ATK_ROLE_COMMENT: An object found within a document and designed to present a comment, note, or other annotation. In some cases, this object might not be visible until activated. @Since: ATK-2.1.0
michael@0 148 *@ATK_ROLE_LIST_BOX: A non-collapsible list of choices the user can select from. @Since: ATK-2.1.0
michael@0 149 *@ATK_ROLE_GROUPING: A group of related widgets. This group typically has a label. @Since: ATK-2.1.0
michael@0 150 *@ATK_ROLE_IMAGE_MAP: An image map object. Usually a graphic with multiple hotspots, where each hotspot can be activated resulting in the loading of another document or section of a document. @Since: ATK-2.1.0
michael@0 151 *@ATK_ROLE_NOTIFICATION: A transitory object designed to present a message to the user, typically at the desktop level rather than inside a particular application. @Since: ATK-2.1.0
michael@0 152 *@ATK_ROLE_INFO_BAR: An object designed to present a message to the user within an existing window. @Since: ATK-2.1.0
michael@0 153 *@ATK_ROLE_LEVEL_BAR: A bar that serves as a level indicator to, for instance, show the strength of a password or the state of a battery. @Since: ATK-2.7.3
michael@0 154 *@ATK_ROLE_TITLE_BAR: A bar that serves as the title of a window or a
michael@0 155 * dialog. @Since: ATK-2.12
michael@0 156 *@ATK_ROLE_BLOCK_QUOTE: An object which contains a text section
michael@0 157 * that is quoted from another source. @Since: ATK-2.12
michael@0 158 *@ATK_ROLE_AUDIO: An object which represents an audio element. @Since: ATK-2.12
michael@0 159 *@ATK_ROLE_VIDEO: An object which represents a video element. @Since: ATK-2.12
michael@0 160 *@ATK_ROLE_DEFINITION: A definition of a term or concept. @Since: ATK-2.12
michael@0 161 *@ATK_ROLE_ARTICLE: A section of a page that consists of a
michael@0 162 * composition that forms an independent part of a document, page, or
michael@0 163 * site. Examples: A blog entry, a news story, a forum post. @Since:
michael@0 164 * ATK-2.12
michael@0 165 *@ATK_ROLE_LANDMARK: A region of a web page intended as a
michael@0 166 * navigational landmark. This is designed to allow Assistive
michael@0 167 * Technologies to provide quick navigation among key regions within a
michael@0 168 * document. @Since: ATK-2.12
michael@0 169 *@ATK_ROLE_LOG: A text widget or container holding log content, such
michael@0 170 * as chat history and error logs. In this role there is a
michael@0 171 * relationship between the arrival of new items in the log and the
michael@0 172 * reading order. The log contains a meaningful sequence and new
michael@0 173 * information is added only to the end of the log, not at arbitrary
michael@0 174 * points. @Since: ATK-2.12
michael@0 175 *@ATK_ROLE_MARQUEE: A container where non-essential information
michael@0 176 * changes frequently. Common usages of marquee include stock tickers
michael@0 177 * and ad banners. The primary difference between a marquee and a log
michael@0 178 * is that logs usually have a meaningful order or sequence of
michael@0 179 * important content changes. @Since: ATK-2.12
michael@0 180 *@ATK_ROLE_MATH: A text widget or container that holds a mathematical
michael@0 181 * expression. @Since: ATK-2.12
michael@0 182 *@ATK_ROLE_RATING: A widget whose purpose is to display a rating,
michael@0 183 * such as the number of stars associated with a song in a media
michael@0 184 * player. Objects of this role should also implement
michael@0 185 * AtkValue. @Since: ATK-2.12
michael@0 186 *@ATK_ROLE_TIMER: An object containing a numerical counter which
michael@0 187 * indicates an amount of elapsed time from a start point, or the time
michael@0 188 * remaining until an end point. @Since: ATK-2.12
michael@0 189 *@ATK_ROLE_DESCRIPTION_LIST: An object that represents a list of
michael@0 190 * term-value groups. A term-value group represents a individual
michael@0 191 * description and consist of one or more names
michael@0 192 * (ATK_ROLE_DESCRIPTION_TERM) followed by one or more values
michael@0 193 * (ATK_ROLE_DESCRIPTION_VALUE). For each list, there should not be
michael@0 194 * more than one group with the same term name. @Since: ATK-2.12
michael@0 195 *@ATK_ROLE_DESCRIPTION_TERM: An object that represents the term, or
michael@0 196 * name, part of a term-description group in a description
michael@0 197 * list. @Since: ATK-2.12
michael@0 198 *@ATK_ROLE_DESCRIPTION_VALUE: An object that represents the
michael@0 199 * description, definition or value of a term-description group in a
michael@0 200 * description list. The values within a group are alternatives,
michael@0 201 * meaning that you can have several ATK_ROLE_DESCRIPTION_VALUE for a
michael@0 202 * given ATK_ROLE_DESCRIPTION_TERM. @Since: ATK-2.12
michael@0 203 *@ATK_ROLE_LAST_DEFINED: not a valid role, used for finding end of the enumeration
michael@0 204 *
michael@0 205 * Describes the role of an object
michael@0 206 *
michael@0 207 * These are the built-in enumerated roles that UI components can have in
michael@0 208 * ATK. Other roles may be added at runtime, so an AtkRole >=
michael@0 209 * ATK_ROLE_LAST_DEFINED is not necessarily an error.
michael@0 210 **/
michael@0 211 typedef enum
michael@0 212 {
michael@0 213 ATK_ROLE_INVALID = 0,
michael@0 214 ATK_ROLE_ACCEL_LABEL, /*<nick=accelerator-label>*/
michael@0 215 ATK_ROLE_ALERT,
michael@0 216 ATK_ROLE_ANIMATION,
michael@0 217 ATK_ROLE_ARROW,
michael@0 218 ATK_ROLE_CALENDAR,
michael@0 219 ATK_ROLE_CANVAS,
michael@0 220 ATK_ROLE_CHECK_BOX,
michael@0 221 ATK_ROLE_CHECK_MENU_ITEM,
michael@0 222 ATK_ROLE_COLOR_CHOOSER,
michael@0 223 ATK_ROLE_COLUMN_HEADER,
michael@0 224 ATK_ROLE_COMBO_BOX,
michael@0 225 ATK_ROLE_DATE_EDITOR,
michael@0 226 ATK_ROLE_DESKTOP_ICON,
michael@0 227 ATK_ROLE_DESKTOP_FRAME,
michael@0 228 ATK_ROLE_DIAL,
michael@0 229 ATK_ROLE_DIALOG,
michael@0 230 ATK_ROLE_DIRECTORY_PANE,
michael@0 231 ATK_ROLE_DRAWING_AREA,
michael@0 232 ATK_ROLE_FILE_CHOOSER,
michael@0 233 ATK_ROLE_FILLER,
michael@0 234 ATK_ROLE_FONT_CHOOSER,
michael@0 235 ATK_ROLE_FRAME,
michael@0 236 ATK_ROLE_GLASS_PANE,
michael@0 237 ATK_ROLE_HTML_CONTAINER,
michael@0 238 ATK_ROLE_ICON,
michael@0 239 ATK_ROLE_IMAGE,
michael@0 240 ATK_ROLE_INTERNAL_FRAME,
michael@0 241 ATK_ROLE_LABEL,
michael@0 242 ATK_ROLE_LAYERED_PANE,
michael@0 243 ATK_ROLE_LIST,
michael@0 244 ATK_ROLE_LIST_ITEM,
michael@0 245 ATK_ROLE_MENU,
michael@0 246 ATK_ROLE_MENU_BAR,
michael@0 247 ATK_ROLE_MENU_ITEM,
michael@0 248 ATK_ROLE_OPTION_PANE,
michael@0 249 ATK_ROLE_PAGE_TAB,
michael@0 250 ATK_ROLE_PAGE_TAB_LIST,
michael@0 251 ATK_ROLE_PANEL,
michael@0 252 ATK_ROLE_PASSWORD_TEXT,
michael@0 253 ATK_ROLE_POPUP_MENU,
michael@0 254 ATK_ROLE_PROGRESS_BAR,
michael@0 255 ATK_ROLE_PUSH_BUTTON,
michael@0 256 ATK_ROLE_RADIO_BUTTON,
michael@0 257 ATK_ROLE_RADIO_MENU_ITEM,
michael@0 258 ATK_ROLE_ROOT_PANE,
michael@0 259 ATK_ROLE_ROW_HEADER,
michael@0 260 ATK_ROLE_SCROLL_BAR,
michael@0 261 ATK_ROLE_SCROLL_PANE,
michael@0 262 ATK_ROLE_SEPARATOR,
michael@0 263 ATK_ROLE_SLIDER,
michael@0 264 ATK_ROLE_SPLIT_PANE,
michael@0 265 ATK_ROLE_SPIN_BUTTON,
michael@0 266 ATK_ROLE_STATUSBAR,
michael@0 267 ATK_ROLE_TABLE,
michael@0 268 ATK_ROLE_TABLE_CELL,
michael@0 269 ATK_ROLE_TABLE_COLUMN_HEADER,
michael@0 270 ATK_ROLE_TABLE_ROW_HEADER,
michael@0 271 ATK_ROLE_TEAR_OFF_MENU_ITEM,
michael@0 272 ATK_ROLE_TERMINAL,
michael@0 273 ATK_ROLE_TEXT,
michael@0 274 ATK_ROLE_TOGGLE_BUTTON,
michael@0 275 ATK_ROLE_TOOL_BAR,
michael@0 276 ATK_ROLE_TOOL_TIP,
michael@0 277 ATK_ROLE_TREE,
michael@0 278 ATK_ROLE_TREE_TABLE,
michael@0 279 ATK_ROLE_UNKNOWN,
michael@0 280 ATK_ROLE_VIEWPORT,
michael@0 281 ATK_ROLE_WINDOW,
michael@0 282 ATK_ROLE_HEADER,
michael@0 283 ATK_ROLE_FOOTER,
michael@0 284 ATK_ROLE_PARAGRAPH,
michael@0 285 ATK_ROLE_RULER,
michael@0 286 ATK_ROLE_APPLICATION,
michael@0 287 ATK_ROLE_AUTOCOMPLETE,
michael@0 288 ATK_ROLE_EDITBAR,
michael@0 289 ATK_ROLE_EMBEDDED,
michael@0 290 ATK_ROLE_ENTRY,
michael@0 291 ATK_ROLE_CHART,
michael@0 292 ATK_ROLE_CAPTION,
michael@0 293 ATK_ROLE_DOCUMENT_FRAME,
michael@0 294 ATK_ROLE_HEADING,
michael@0 295 ATK_ROLE_PAGE,
michael@0 296 ATK_ROLE_SECTION,
michael@0 297 ATK_ROLE_REDUNDANT_OBJECT,
michael@0 298 ATK_ROLE_FORM,
michael@0 299 ATK_ROLE_LINK,
michael@0 300 ATK_ROLE_INPUT_METHOD_WINDOW,
michael@0 301 ATK_ROLE_TABLE_ROW,
michael@0 302 ATK_ROLE_TREE_ITEM,
michael@0 303 ATK_ROLE_DOCUMENT_SPREADSHEET,
michael@0 304 ATK_ROLE_DOCUMENT_PRESENTATION,
michael@0 305 ATK_ROLE_DOCUMENT_TEXT,
michael@0 306 ATK_ROLE_DOCUMENT_WEB,
michael@0 307 ATK_ROLE_DOCUMENT_EMAIL,
michael@0 308 ATK_ROLE_COMMENT,
michael@0 309 ATK_ROLE_LIST_BOX,
michael@0 310 ATK_ROLE_GROUPING,
michael@0 311 ATK_ROLE_IMAGE_MAP,
michael@0 312 ATK_ROLE_NOTIFICATION,
michael@0 313 ATK_ROLE_INFO_BAR,
michael@0 314 ATK_ROLE_LEVEL_BAR,
michael@0 315 ATK_ROLE_TITLE_BAR,
michael@0 316 ATK_ROLE_BLOCK_QUOTE,
michael@0 317 ATK_ROLE_AUDIO,
michael@0 318 ATK_ROLE_VIDEO,
michael@0 319 ATK_ROLE_DEFINITION,
michael@0 320 ATK_ROLE_ARTICLE,
michael@0 321 ATK_ROLE_LANDMARK,
michael@0 322 ATK_ROLE_LOG,
michael@0 323 ATK_ROLE_MARQUEE,
michael@0 324 ATK_ROLE_MATH,
michael@0 325 ATK_ROLE_RATING,
michael@0 326 ATK_ROLE_TIMER,
michael@0 327 ATK_ROLE_DESCRIPTION_LIST,
michael@0 328 ATK_ROLE_DESCRIPTION_TERM,
michael@0 329 ATK_ROLE_DESCRIPTION_VALUE,
michael@0 330 ATK_ROLE_LAST_DEFINED
michael@0 331 } AtkRole;
michael@0 332
michael@0 333 AtkRole atk_role_register (const gchar *name);
michael@0 334
michael@0 335 /**
michael@0 336 *AtkLayer:
michael@0 337 *@ATK_LAYER_INVALID: The object does not have a layer
michael@0 338 *@ATK_LAYER_BACKGROUND: This layer is reserved for the desktop background
michael@0 339 *@ATK_LAYER_CANVAS: This layer is used for Canvas components
michael@0 340 *@ATK_LAYER_WIDGET: This layer is normally used for components
michael@0 341 *@ATK_LAYER_MDI: This layer is used for layered components
michael@0 342 *@ATK_LAYER_POPUP: This layer is used for popup components, such as menus
michael@0 343 *@ATK_LAYER_OVERLAY: This layer is reserved for future use.
michael@0 344 *@ATK_LAYER_WINDOW: This layer is used for toplevel windows.
michael@0 345 *
michael@0 346 * Describes the layer of a component
michael@0 347 *
michael@0 348 * These enumerated "layer values" are used when determining which UI
michael@0 349 * rendering layer a component is drawn into, which can help in making
michael@0 350 * determinations of when components occlude one another.
michael@0 351 **/
michael@0 352 typedef enum
michael@0 353 {
michael@0 354 ATK_LAYER_INVALID,
michael@0 355 ATK_LAYER_BACKGROUND,
michael@0 356 ATK_LAYER_CANVAS,
michael@0 357 ATK_LAYER_WIDGET,
michael@0 358 ATK_LAYER_MDI,
michael@0 359 ATK_LAYER_POPUP,
michael@0 360 ATK_LAYER_OVERLAY,
michael@0 361 ATK_LAYER_WINDOW
michael@0 362 } AtkLayer;
michael@0 363
michael@0 364 /**
michael@0 365 * AtkAttributeSet:
michael@0 366 *
michael@0 367 * This is a singly-linked list (a #GSList) of #AtkAttribute. It is
michael@0 368 * used by atk_text_get_run_attributes(), atk_text_get_default_attributes()
michael@0 369 * and atk_editable_text_set_run_attributes()
michael@0 370 **/
michael@0 371 typedef GSList AtkAttributeSet;
michael@0 372
michael@0 373 /**
michael@0 374 * AtkAttribute:
michael@0 375 * @name: The attribute name. Call atk_text_attr_get_name()
michael@0 376 * @value: the value of the attribute, represented as a string.
michael@0 377 * Call atk_text_attr_get_value() for those which are strings.
michael@0 378 * For values which are numbers, the string representation of the number
michael@0 379 * is in value.
michael@0 380 *
michael@0 381 * A string name/value pair representing a text attribute.
michael@0 382 **/
michael@0 383 typedef struct _AtkAttribute AtkAttribute;
michael@0 384
michael@0 385 struct _AtkAttribute {
michael@0 386 gchar* name;
michael@0 387 gchar* value;
michael@0 388 };
michael@0 389
michael@0 390 #define ATK_TYPE_OBJECT (atk_object_get_type ())
michael@0 391 #define ATK_OBJECT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), ATK_TYPE_OBJECT, AtkObject))
michael@0 392 #define ATK_OBJECT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), ATK_TYPE_OBJECT, AtkObjectClass))
michael@0 393 #define ATK_IS_OBJECT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), ATK_TYPE_OBJECT))
michael@0 394 #define ATK_IS_OBJECT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), ATK_TYPE_OBJECT))
michael@0 395 #define ATK_OBJECT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), ATK_TYPE_OBJECT, AtkObjectClass))
michael@0 396
michael@0 397 #define ATK_TYPE_IMPLEMENTOR (atk_implementor_get_type ())
michael@0 398 #define ATK_IS_IMPLEMENTOR(obj) G_TYPE_CHECK_INSTANCE_TYPE ((obj), ATK_TYPE_IMPLEMENTOR)
michael@0 399 #define ATK_IMPLEMENTOR(obj) G_TYPE_CHECK_INSTANCE_CAST ((obj), ATK_TYPE_IMPLEMENTOR, AtkImplementor)
michael@0 400 #define ATK_IMPLEMENTOR_GET_IFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), ATK_TYPE_IMPLEMENTOR, AtkImplementorIface))
michael@0 401
michael@0 402
michael@0 403 typedef struct _AtkImplementor AtkImplementor; /* dummy typedef */
michael@0 404 typedef struct _AtkImplementorIface AtkImplementorIface;
michael@0 405
michael@0 406
michael@0 407 typedef struct _AtkObject AtkObject;
michael@0 408 typedef struct _AtkObjectClass AtkObjectClass;
michael@0 409 typedef struct _AtkRelationSet AtkRelationSet;
michael@0 410 typedef struct _AtkStateSet AtkStateSet;
michael@0 411
michael@0 412 /**
michael@0 413 * AtkPropertyValues:
michael@0 414 * @property_name: The name of the ATK property which is being presented or which has been changed.
michael@0 415 * @old_value: The old property value, NULL; in some contexts this value is undefined (see note below).
michael@0 416 * @new_value: The new value of the named property.
michael@0 417 *
michael@0 418 * @note: For most properties the old_value field of AtkPropertyValues will
michael@0 419 * not contain a valid value.
michael@0 420 *
michael@0 421 * Currently, the only property for which old_value is used is
michael@0 422 * accessible-state; for instance if there is a focus state the
michael@0 423 * property change handler will be called for the object which lost the focus
michael@0 424 * with the old_value containing an AtkState value corresponding to focused
michael@0 425 * and the property change handler will be called for the object which
michael@0 426 * received the focus with the new_value containing an AtkState value
michael@0 427 * corresponding to focused.
michael@0 428 *
michael@0 429 **/
michael@0 430 struct _AtkPropertyValues
michael@0 431 {
michael@0 432 const gchar *property_name;
michael@0 433 GValue old_value;
michael@0 434 GValue new_value;
michael@0 435 };
michael@0 436
michael@0 437 typedef struct _AtkPropertyValues AtkPropertyValues;
michael@0 438
michael@0 439 typedef gboolean (*AtkFunction) (gpointer data);
michael@0 440 /*
michael@0 441 * For most properties the old_value field of AtkPropertyValues will
michael@0 442 * not contain a valid value.
michael@0 443 *
michael@0 444 * Currently, the only property for which old_value is used is
michael@0 445 * accessible-state; for instance if there is a focus state the
michael@0 446 * property change handler will be called for the object which lost the focus
michael@0 447 * with the old_value containing an AtkState value corresponding to focused
michael@0 448 * and the property change handler will be called for the object which
michael@0 449 * received the focus with the new_value containing an AtkState value
michael@0 450 * corresponding to focused.
michael@0 451 */
michael@0 452 typedef void (*AtkPropertyChangeHandler) (AtkObject*, AtkPropertyValues*);
michael@0 453
michael@0 454
michael@0 455 struct _AtkObject
michael@0 456 {
michael@0 457 GObject parent;
michael@0 458
michael@0 459 gchar *description;
michael@0 460 gchar *name;
michael@0 461 AtkObject *accessible_parent;
michael@0 462 AtkRole role;
michael@0 463 AtkRelationSet *relation_set;
michael@0 464 AtkLayer layer;
michael@0 465 };
michael@0 466
michael@0 467 struct _AtkObjectClass
michael@0 468 {
michael@0 469 GObjectClass parent;
michael@0 470
michael@0 471 /*
michael@0 472 * Gets the accessible name of the object
michael@0 473 */
michael@0 474 G_CONST_RETURN gchar* (* get_name) (AtkObject *accessible);
michael@0 475 /*
michael@0 476 * Gets the accessible description of the object
michael@0 477 */
michael@0 478 G_CONST_RETURN gchar* (* get_description) (AtkObject *accessible);
michael@0 479 /*
michael@0 480 * Gets the accessible parent of the object
michael@0 481 */
michael@0 482 AtkObject* (*get_parent) (AtkObject *accessible);
michael@0 483
michael@0 484 /*
michael@0 485 * Gets the number of accessible children of the object
michael@0 486 */
michael@0 487 gint (* get_n_children) (AtkObject *accessible);
michael@0 488 /*
michael@0 489 * Returns a reference to the specified accessible child of the object.
michael@0 490 * The accessible children are 0-based so the first accessible child is
michael@0 491 * at index 0, the second at index 1 and so on.
michael@0 492 */
michael@0 493 AtkObject* (* ref_child) (AtkObject *accessible,
michael@0 494 gint i);
michael@0 495 /*
michael@0 496 * Gets the 0-based index of this object in its parent; returns -1 if the
michael@0 497 * object does not have an accessible parent.
michael@0 498 */
michael@0 499 gint (* get_index_in_parent) (AtkObject *accessible);
michael@0 500 /*
michael@0 501 * Gets the RelationSet associated with the object
michael@0 502 */
michael@0 503 AtkRelationSet* (* ref_relation_set) (AtkObject *accessible);
michael@0 504 /*
michael@0 505 * Gets the role of the object
michael@0 506 */
michael@0 507 AtkRole (* get_role) (AtkObject *accessible);
michael@0 508 AtkLayer (* get_layer) (AtkObject *accessible);
michael@0 509 gint (* get_mdi_zorder) (AtkObject *accessible);
michael@0 510 /*
michael@0 511 * Gets the state set of the object
michael@0 512 */
michael@0 513 AtkStateSet* (* ref_state_set) (AtkObject *accessible);
michael@0 514 /*
michael@0 515 * Sets the accessible name of the object
michael@0 516 */
michael@0 517 void (* set_name) (AtkObject *accessible,
michael@0 518 const gchar *name);
michael@0 519 /*
michael@0 520 * Sets the accessible description of the object
michael@0 521 */
michael@0 522 void (* set_description) (AtkObject *accessible,
michael@0 523 const gchar *description);
michael@0 524 /*
michael@0 525 * Sets the accessible parent of the object
michael@0 526 */
michael@0 527 void (* set_parent) (AtkObject *accessible,
michael@0 528 AtkObject *parent);
michael@0 529 /*
michael@0 530 * Sets the accessible role of the object
michael@0 531 */
michael@0 532 void (* set_role) (AtkObject *accessible,
michael@0 533 AtkRole role);
michael@0 534 /*
michael@0 535 * Specifies a function to be called when a property changes value
michael@0 536 */
michael@0 537 guint (* connect_property_change_handler) (AtkObject
michael@0 538 *accessible,
michael@0 539 AtkPropertyChangeHandler *handler);
michael@0 540 /*
michael@0 541 * Removes a property change handler which was specified using
michael@0 542 * connect_property_change_handler
michael@0 543 */
michael@0 544 void (* remove_property_change_handler) (AtkObject
michael@0 545 *accessible,
michael@0 546 guint
michael@0 547 handler_id);
michael@0 548 void (* initialize) (AtkObject *accessible,
michael@0 549 gpointer data);
michael@0 550 /*
michael@0 551 * The signal handler which is executed when there is a change in the
michael@0 552 * children of the object
michael@0 553 */
michael@0 554 void (* children_changed) (AtkObject *accessible,
michael@0 555 guint change_index,
michael@0 556 gpointer changed_child);
michael@0 557 /*
michael@0 558 * The signal handler which is executed when there is a focus event
michael@0 559 * for an object.
michael@0 560 */
michael@0 561 void (* focus_event) (AtkObject *accessible,
michael@0 562 gboolean focus_in);
michael@0 563 /*
michael@0 564 * The signal handler which is executed when there is a property_change
michael@0 565 * signal for an object.
michael@0 566 */
michael@0 567 void (* property_change) (AtkObject *accessible,
michael@0 568 AtkPropertyValues *values);
michael@0 569 /*
michael@0 570 * The signal handler which is executed when there is a state_change
michael@0 571 * signal for an object.
michael@0 572 */
michael@0 573 void (* state_change) (AtkObject *accessible,
michael@0 574 const gchar *name,
michael@0 575 gboolean state_set);
michael@0 576 /*
michael@0 577 * The signal handler which is executed when there is a change in the
michael@0 578 * visible data for an object
michael@0 579 */
michael@0 580 void (*visible_data_changed) (AtkObject *accessible);
michael@0 581
michael@0 582 /*
michael@0 583 * The signal handler which is executed when there is a change in the
michael@0 584 * 'active' child or children of the object, for instance when
michael@0 585 * interior focus changes in a table or list. This signal should be emitted
michael@0 586 * by objects whose state includes ATK_STATE_MANAGES_DESCENDANTS.
michael@0 587 */
michael@0 588 void (*active_descendant_changed) (AtkObject *accessible,
michael@0 589 gpointer *child);
michael@0 590
michael@0 591 /*
michael@0 592 * Gets a list of properties applied to this object as a whole, as an #AtkAttributeSet consisting of name-value pairs.
michael@0 593 * Since ATK 1.12
michael@0 594 */
michael@0 595 AtkAttributeSet* (*get_attributes) (AtkObject *accessible);
michael@0 596
michael@0 597 const gchar* (*get_object_locale) (AtkObject *accessible);
michael@0 598
michael@0 599 AtkFunction pad1;
michael@0 600 };
michael@0 601
michael@0 602 GType atk_object_get_type (void);
michael@0 603
michael@0 604 struct _AtkImplementorIface
michael@0 605 {
michael@0 606 GTypeInterface parent;
michael@0 607
michael@0 608 AtkObject* (*ref_accessible) (AtkImplementor *implementor);
michael@0 609 };
michael@0 610 GType atk_implementor_get_type (void);
michael@0 611
michael@0 612 /*
michael@0 613 * This method uses the ref_accessible method in AtkImplementorIface,
michael@0 614 * if the object's class implements AtkImplementorIface.
michael@0 615 * Otherwise it returns %NULL.
michael@0 616 *
michael@0 617 * IMPORTANT:
michael@0 618 * Note also that because this method may return flyweight objects,
michael@0 619 * it increments the returned AtkObject's reference count.
michael@0 620 * Therefore it is the responsibility of the calling
michael@0 621 * program to unreference the object when no longer needed.
michael@0 622 * (c.f. gtk_widget_get_accessible() where this is not the case).
michael@0 623 */
michael@0 624 AtkObject* atk_implementor_ref_accessible (AtkImplementor *implementor);
michael@0 625
michael@0 626 /*
michael@0 627 * Properties directly supported by AtkObject
michael@0 628 */
michael@0 629
michael@0 630 G_CONST_RETURN gchar* atk_object_get_name (AtkObject *accessible);
michael@0 631 G_CONST_RETURN gchar* atk_object_get_description (AtkObject *accessible);
michael@0 632 AtkObject* atk_object_get_parent (AtkObject *accessible);
michael@0 633 gint atk_object_get_n_accessible_children (AtkObject *accessible);
michael@0 634 AtkObject* atk_object_ref_accessible_child (AtkObject *accessible,
michael@0 635 gint i);
michael@0 636 AtkRelationSet* atk_object_ref_relation_set (AtkObject *accessible);
michael@0 637 AtkRole atk_object_get_role (AtkObject *accessible);
michael@0 638 AtkLayer atk_object_get_layer (AtkObject *accessible);
michael@0 639 gint atk_object_get_mdi_zorder (AtkObject *accessible);
michael@0 640 AtkAttributeSet* atk_object_get_attributes (AtkObject *accessible);
michael@0 641 AtkStateSet* atk_object_ref_state_set (AtkObject *accessible);
michael@0 642 gint atk_object_get_index_in_parent (AtkObject *accessible);
michael@0 643 void atk_object_set_name (AtkObject *accessible,
michael@0 644 const gchar *name);
michael@0 645 void atk_object_set_description (AtkObject *accessible,
michael@0 646 const gchar *description);
michael@0 647 void atk_object_set_parent (AtkObject *accessible,
michael@0 648 AtkObject *parent);
michael@0 649 void atk_object_set_role (AtkObject *accessible,
michael@0 650 AtkRole role);
michael@0 651
michael@0 652
michael@0 653 guint atk_object_connect_property_change_handler (AtkObject *accessible,
michael@0 654 AtkPropertyChangeHandler *handler);
michael@0 655 void atk_object_remove_property_change_handler (AtkObject *accessible,
michael@0 656 guint handler_id);
michael@0 657
michael@0 658 void atk_object_notify_state_change (AtkObject *accessible,
michael@0 659 AtkState state,
michael@0 660 gboolean value);
michael@0 661 void atk_object_initialize (AtkObject *accessible,
michael@0 662 gpointer data);
michael@0 663
michael@0 664 G_CONST_RETURN gchar* atk_role_get_name (AtkRole role);
michael@0 665 AtkRole atk_role_for_name (const gchar *name);
michael@0 666
michael@0 667
michael@0 668 /* NEW in 1.1: convenience API */
michael@0 669 gboolean atk_object_add_relationship (AtkObject *object,
michael@0 670 AtkRelationType relationship,
michael@0 671 AtkObject *target);
michael@0 672 gboolean atk_object_remove_relationship (AtkObject *object,
michael@0 673 AtkRelationType relationship,
michael@0 674 AtkObject *target);
michael@0 675 G_CONST_RETURN gchar* atk_role_get_localized_name (AtkRole role);
michael@0 676
michael@0 677 /* */
michael@0 678
michael@0 679
michael@0 680 /*
michael@0 681 * Note: the properties which are registered with the GType
michael@0 682 * property registry, for type ATK_TYPE_OBJECT, are as follows:
michael@0 683 *
michael@0 684 * "accessible-name"
michael@0 685 * "accessible-description"
michael@0 686 * "accessible-parent"
michael@0 687 * "accessible-role"
michael@0 688 * "accessible-value"
michael@0 689 * "accessible-component-layer"
michael@0 690 * "accessible-component-zorder"
michael@0 691 * "accessible-table-caption"
michael@0 692 * "accessible-table-column-description"
michael@0 693 * "accessible-table-column-header"
michael@0 694 * "accessible-table-row-description"
michael@0 695 * "accessible-table-row-header"
michael@0 696 * "accessible-table-summary"
michael@0 697 * "accessible-model"
michael@0 698 *
michael@0 699 * accessibility property change listeners should use the
michael@0 700 * normal GObject property interfaces and "property-change"
michael@0 701 * signal handler semantics to interpret the property change
michael@0 702 * information relayed from AtkObject.
michael@0 703 * (AtkObject instances will connect to the "notify"
michael@0 704 * signal in their host objects, and relay the signals when appropriate).
michael@0 705 */
michael@0 706
michael@0 707 /* For other signals, see related interfaces
michael@0 708 *
michael@0 709 * AtkActionIface,
michael@0 710 * AtkComponentIface,
michael@0 711 * AtkHypertextIface,
michael@0 712 * AtkImageIface,
michael@0 713 * AtkSelectionIface,
michael@0 714 * AtkTableIface,
michael@0 715 * AtkTextIface,
michael@0 716 * AtkValueIface.
michael@0 717 *
michael@0 718 * The usage model for obtaining these interface instances is:
michael@0 719 * ATK_<interfacename>_GET_IFACE(GObject *accessible),
michael@0 720 * where accessible, though specified as a GObject, is
michael@0 721 * the AtkObject instance being queried.
michael@0 722 * More usually, the interface will be used via a cast to the
michael@0 723 * interface's corresponding "type":
michael@0 724 *
michael@0 725 * AtkText textImpl = ATK_TEXT(accessible);
michael@0 726 * if (textImpl)
michael@0 727 * {
michael@0 728 * cpos = atk_text_get_caret_position(textImpl);
michael@0 729 * }
michael@0 730 *
michael@0 731 * If it's known in advance that accessible implements AtkTextIface,
michael@0 732 * this is shortened to:
michael@0 733 *
michael@0 734 * cpos = atk_text_get_caret_position (ATK_TEXT (accessible));
michael@0 735 */
michael@0 736
michael@0 737 #ifdef __cplusplus
michael@0 738 }
michael@0 739 #endif /* __cplusplus */
michael@0 740
michael@0 741
michael@0 742 #endif /* __ATK_OBJECT_H__ */

mercurial