tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

atkobject.h (37186B)


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