michael@0: /* ATK - Accessibility Toolkit michael@0: * Copyright 2001 Sun Microsystems Inc. michael@0: * michael@0: * This library is free software; you can redistribute it and/or michael@0: * modify it under the terms of the GNU Library General Public michael@0: * License as published by the Free Software Foundation; either michael@0: * version 2 of the License, or (at your option) any later version. michael@0: * michael@0: * This library is distributed in the hope that it will be useful, michael@0: * but WITHOUT ANY WARRANTY; without even the implied warranty of michael@0: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU michael@0: * Library General Public License for more details. michael@0: * michael@0: * You should have received a copy of the GNU Library General Public michael@0: * License along with this library; if not, write to the michael@0: * Free Software Foundation, Inc., 59 Temple Place - Suite 330, michael@0: * Boston, MA 02111-1307, USA. michael@0: */ michael@0: michael@0: #ifndef __ATK_OBJECT_H__ michael@0: #define __ATK_OBJECT_H__ michael@0: michael@0: #ifdef __cplusplus michael@0: extern "C" { michael@0: #endif /* __cplusplus */ michael@0: michael@0: #include michael@0: #include michael@0: #include michael@0: michael@0: /* michael@0: * AtkObject represents the minimum information all accessible objects michael@0: * return. This information includes accessible name, accessible michael@0: * description, role and state of the object, as well information about michael@0: * its parent and children. It is also possible to obtain more specific michael@0: * accessibility information about a component if it supports one or more michael@0: * of the following interfaces: michael@0: */ michael@0: michael@0: michael@0: /** michael@0: *AtkRole: michael@0: *@ATK_ROLE_INVALID: Invalid role michael@0: *@ATK_ROLE_ACCEL_LABEL: A label which represents an accelerator michael@0: *@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: *@ATK_ROLE_ANIMATION: An object which is an animated image michael@0: *@ATK_ROLE_ARROW: An arrow in one of the four cardinal directions michael@0: *@ATK_ROLE_CALENDAR: An object that displays a calendar and allows the user to select a date michael@0: *@ATK_ROLE_CANVAS: An object that can be drawn into and is used to trap events michael@0: *@ATK_ROLE_CHECK_BOX: A choice that can be checked or unchecked and provides a separate indicator for the current state michael@0: *@ATK_ROLE_CHECK_MENU_ITEM: A menu item with a check box michael@0: *@ATK_ROLE_COLOR_CHOOSER: A specialized dialog that lets the user choose a color michael@0: *@ATK_ROLE_COLUMN_HEADER: The header for a column of data michael@0: *@ATK_ROLE_COMBO_BOX: A collapsible list of choices the user can select from michael@0: *@ATK_ROLE_DATE_EDITOR: An object whose purpose is to allow a user to edit a date michael@0: *@ATK_ROLE_DESKTOP_ICON: An inconifed internal frame within a DESKTOP_PANE michael@0: *@ATK_ROLE_DESKTOP_FRAME: A pane that supports internal frames and iconified versions of those internal frames michael@0: *@ATK_ROLE_DIAL: An object whose purpose is to allow a user to set a value michael@0: *@ATK_ROLE_DIALOG: A top level window with title bar and a border michael@0: *@ATK_ROLE_DIRECTORY_PANE: A pane that allows the user to navigate through and select the contents of a directory michael@0: *@ATK_ROLE_DRAWING_AREA: An object used for drawing custom user interface elements michael@0: *@ATK_ROLE_FILE_CHOOSER: A specialized dialog that lets the user choose a file michael@0: *@ATK_ROLE_FILLER: A object that fills up space in a user interface michael@0: *@ATK_ROLE_FONT_CHOOSER: A specialized dialog that lets the user choose a font michael@0: *@ATK_ROLE_FRAME: A top level window with a title bar, border, menubar, etc. michael@0: *@ATK_ROLE_GLASS_PANE: A pane that is guaranteed to be painted on top of all panes beneath it michael@0: *@ATK_ROLE_HTML_CONTAINER: A document container for HTML, whose children represent the document content michael@0: *@ATK_ROLE_ICON: A small fixed size picture, typically used to decorate components michael@0: *@ATK_ROLE_IMAGE: An object whose primary purpose is to display an image michael@0: *@ATK_ROLE_INTERNAL_FRAME: A frame-like object that is clipped by a desktop pane michael@0: *@ATK_ROLE_LABEL: An object used to present an icon or short string in an interface michael@0: *@ATK_ROLE_LAYERED_PANE: A specialized pane that allows its children to be drawn in layers, providing a form of stacking order michael@0: *@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: *@ATK_ROLE_LIST_ITEM: An object that represents an element of a list michael@0: *@ATK_ROLE_MENU: An object usually found inside a menu bar that contains a list of actions the user can choose from michael@0: *@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: *@ATK_ROLE_MENU_ITEM: An object usually contained in a menu that presents an action the user can choose michael@0: *@ATK_ROLE_OPTION_PANE: A specialized pane whose primary use is inside a DIALOG michael@0: *@ATK_ROLE_PAGE_TAB: An object that is a child of a page tab list michael@0: *@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: *@ATK_ROLE_PANEL: A generic container that is often used to group objects michael@0: *@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: *@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: *@ATK_ROLE_PROGRESS_BAR: An object used to indicate how much of a task has been completed michael@0: *@ATK_ROLE_PUSH_BUTTON: An object the user can manipulate to tell the application to do something michael@0: *@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: *@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: *@ATK_ROLE_ROOT_PANE: A specialized pane that has a glass pane and a layered pane as its children michael@0: *@ATK_ROLE_ROW_HEADER: The header for a row of data michael@0: *@ATK_ROLE_SCROLL_BAR: An object usually used to allow a user to incrementally view a large amount of data. michael@0: *@ATK_ROLE_SCROLL_PANE: An object that allows a user to incrementally view a large amount of information michael@0: *@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: *@ATK_ROLE_SLIDER: An object that allows the user to select from a bounded range michael@0: *@ATK_ROLE_SPLIT_PANE: A specialized panel that presents two other panels at the same time michael@0: *@ATK_ROLE_SPIN_BUTTON: An object used to get an integer or floating point number from the user michael@0: *@ATK_ROLE_STATUSBAR: An object which reports messages of minor importance to the user michael@0: *@ATK_ROLE_TABLE: An object used to represent information in terms of rows and columns michael@0: *@ATK_ROLE_TABLE_CELL: A cell in a table michael@0: *@ATK_ROLE_TABLE_COLUMN_HEADER: The header for a column of a table michael@0: *@ATK_ROLE_TABLE_ROW_HEADER: The header for a row of a table michael@0: *@ATK_ROLE_TEAR_OFF_MENU_ITEM: A menu item used to tear off and reattach its menu michael@0: *@ATK_ROLE_TERMINAL: An object that represents an accessible terminal. @Since: ATK-0.6 michael@0: *@ATK_ROLE_TEXT: An object that presents text to the user michael@0: *@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: *@ATK_ROLE_TOOL_BAR: A bar or palette usually composed of push buttons or toggle buttons michael@0: *@ATK_ROLE_TOOL_TIP: An object that provides information about another object michael@0: *@ATK_ROLE_TREE: An object used to represent hierarchical information to the user michael@0: *@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: *@ATK_ROLE_UNKNOWN: The object contains some Accessible information, but its role is not known michael@0: *@ATK_ROLE_VIEWPORT: An object usually used in a scroll pane michael@0: *@ATK_ROLE_WINDOW: A top level window with no title or border. michael@0: *@ATK_ROLE_HEADER: An object that serves as a document header. @Since: ATK-1.1.1 michael@0: *@ATK_ROLE_FOOTER: An object that serves as a document footer. @Since: ATK-1.1.1 michael@0: *@ATK_ROLE_PARAGRAPH: An object which is contains a paragraph of text content. @Since: ATK-1.1.1 michael@0: *@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: *@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: *@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: *@ATK_ROLE_EDITBAR: The object is an editable text object in a toolbar. @Since: ATK-1.5 michael@0: *@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: *@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: *@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: *@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: *@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: *@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: *@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: *@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: *@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: *@ATK_ROLE_FORM: The object is a container for form controls, for instance as part of a michael@0: * web form or user-input form within a document. This role is primarily a tag/convenience for michael@0: * clients when navigating complex documents, it is not expected that ordinary GUI containers will michael@0: * always have ATK_ROLE_FORM. @Since: ATK-1.12.0 michael@0: *@ATK_ROLE_LINK: The object is a hypertext anchor, i.e. a "link" in a michael@0: * hypertext document. Such objects are distinct from 'inline' michael@0: * content which may also use the Hypertext/Hyperlink interfaces michael@0: * to indicate the range/location within a text object where michael@0: * an inline or embedded object lies. @Since: ATK-1.12.1 michael@0: *@ATK_ROLE_INPUT_METHOD_WINDOW: The object is a window or similar viewport michael@0: * which is used to allow composition or input of a 'complex character', michael@0: * in other words it is an "input method window." @Since: ATK-1.12.1 michael@0: *@ATK_ROLE_TABLE_ROW: A row in a table. @Since: ATK-2.1.0 michael@0: *@ATK_ROLE_TREE_ITEM: An object that represents an element of a tree. @Since: ATK-2.1.0 michael@0: *@ATK_ROLE_DOCUMENT_SPREADSHEET: A document frame which contains a spreadsheet. @Since: ATK-2.1.0 michael@0: *@ATK_ROLE_DOCUMENT_PRESENTATION: A document frame which contains a presentation or slide content. @Since: ATK-2.1.0 michael@0: *@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: *@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: *@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: *@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: *@ATK_ROLE_LIST_BOX: A non-collapsible list of choices the user can select from. @Since: ATK-2.1.0 michael@0: *@ATK_ROLE_GROUPING: A group of related widgets. This group typically has a label. @Since: ATK-2.1.0 michael@0: *@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: *@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: *@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: *@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: *@ATK_ROLE_TITLE_BAR: A bar that serves as the title of a window or a michael@0: * dialog. @Since: ATK-2.12 michael@0: *@ATK_ROLE_BLOCK_QUOTE: An object which contains a text section michael@0: * that is quoted from another source. @Since: ATK-2.12 michael@0: *@ATK_ROLE_AUDIO: An object which represents an audio element. @Since: ATK-2.12 michael@0: *@ATK_ROLE_VIDEO: An object which represents a video element. @Since: ATK-2.12 michael@0: *@ATK_ROLE_DEFINITION: A definition of a term or concept. @Since: ATK-2.12 michael@0: *@ATK_ROLE_ARTICLE: A section of a page that consists of a michael@0: * composition that forms an independent part of a document, page, or michael@0: * site. Examples: A blog entry, a news story, a forum post. @Since: michael@0: * ATK-2.12 michael@0: *@ATK_ROLE_LANDMARK: A region of a web page intended as a michael@0: * navigational landmark. This is designed to allow Assistive michael@0: * Technologies to provide quick navigation among key regions within a michael@0: * document. @Since: ATK-2.12 michael@0: *@ATK_ROLE_LOG: A text widget or container holding log content, such michael@0: * as chat history and error logs. In this role there is a michael@0: * relationship between the arrival of new items in the log and the michael@0: * reading order. The log contains a meaningful sequence and new michael@0: * information is added only to the end of the log, not at arbitrary michael@0: * points. @Since: ATK-2.12 michael@0: *@ATK_ROLE_MARQUEE: A container where non-essential information michael@0: * changes frequently. Common usages of marquee include stock tickers michael@0: * and ad banners. The primary difference between a marquee and a log michael@0: * is that logs usually have a meaningful order or sequence of michael@0: * important content changes. @Since: ATK-2.12 michael@0: *@ATK_ROLE_MATH: A text widget or container that holds a mathematical michael@0: * expression. @Since: ATK-2.12 michael@0: *@ATK_ROLE_RATING: A widget whose purpose is to display a rating, michael@0: * such as the number of stars associated with a song in a media michael@0: * player. Objects of this role should also implement michael@0: * AtkValue. @Since: ATK-2.12 michael@0: *@ATK_ROLE_TIMER: An object containing a numerical counter which michael@0: * indicates an amount of elapsed time from a start point, or the time michael@0: * remaining until an end point. @Since: ATK-2.12 michael@0: *@ATK_ROLE_DESCRIPTION_LIST: An object that represents a list of michael@0: * term-value groups. A term-value group represents a individual michael@0: * description and consist of one or more names michael@0: * (ATK_ROLE_DESCRIPTION_TERM) followed by one or more values michael@0: * (ATK_ROLE_DESCRIPTION_VALUE). For each list, there should not be michael@0: * more than one group with the same term name. @Since: ATK-2.12 michael@0: *@ATK_ROLE_DESCRIPTION_TERM: An object that represents the term, or michael@0: * name, part of a term-description group in a description michael@0: * list. @Since: ATK-2.12 michael@0: *@ATK_ROLE_DESCRIPTION_VALUE: An object that represents the michael@0: * description, definition or value of a term-description group in a michael@0: * description list. The values within a group are alternatives, michael@0: * meaning that you can have several ATK_ROLE_DESCRIPTION_VALUE for a michael@0: * given ATK_ROLE_DESCRIPTION_TERM. @Since: ATK-2.12 michael@0: *@ATK_ROLE_LAST_DEFINED: not a valid role, used for finding end of the enumeration michael@0: * michael@0: * Describes the role of an object michael@0: * michael@0: * These are the built-in enumerated roles that UI components can have in michael@0: * ATK. Other roles may be added at runtime, so an AtkRole >= michael@0: * ATK_ROLE_LAST_DEFINED is not necessarily an error. michael@0: **/ michael@0: typedef enum michael@0: { michael@0: ATK_ROLE_INVALID = 0, michael@0: ATK_ROLE_ACCEL_LABEL, /**/ michael@0: ATK_ROLE_ALERT, michael@0: ATK_ROLE_ANIMATION, michael@0: ATK_ROLE_ARROW, michael@0: ATK_ROLE_CALENDAR, michael@0: ATK_ROLE_CANVAS, michael@0: ATK_ROLE_CHECK_BOX, michael@0: ATK_ROLE_CHECK_MENU_ITEM, michael@0: ATK_ROLE_COLOR_CHOOSER, michael@0: ATK_ROLE_COLUMN_HEADER, michael@0: ATK_ROLE_COMBO_BOX, michael@0: ATK_ROLE_DATE_EDITOR, michael@0: ATK_ROLE_DESKTOP_ICON, michael@0: ATK_ROLE_DESKTOP_FRAME, michael@0: ATK_ROLE_DIAL, michael@0: ATK_ROLE_DIALOG, michael@0: ATK_ROLE_DIRECTORY_PANE, michael@0: ATK_ROLE_DRAWING_AREA, michael@0: ATK_ROLE_FILE_CHOOSER, michael@0: ATK_ROLE_FILLER, michael@0: ATK_ROLE_FONT_CHOOSER, michael@0: ATK_ROLE_FRAME, michael@0: ATK_ROLE_GLASS_PANE, michael@0: ATK_ROLE_HTML_CONTAINER, michael@0: ATK_ROLE_ICON, michael@0: ATK_ROLE_IMAGE, michael@0: ATK_ROLE_INTERNAL_FRAME, michael@0: ATK_ROLE_LABEL, michael@0: ATK_ROLE_LAYERED_PANE, michael@0: ATK_ROLE_LIST, michael@0: ATK_ROLE_LIST_ITEM, michael@0: ATK_ROLE_MENU, michael@0: ATK_ROLE_MENU_BAR, michael@0: ATK_ROLE_MENU_ITEM, michael@0: ATK_ROLE_OPTION_PANE, michael@0: ATK_ROLE_PAGE_TAB, michael@0: ATK_ROLE_PAGE_TAB_LIST, michael@0: ATK_ROLE_PANEL, michael@0: ATK_ROLE_PASSWORD_TEXT, michael@0: ATK_ROLE_POPUP_MENU, michael@0: ATK_ROLE_PROGRESS_BAR, michael@0: ATK_ROLE_PUSH_BUTTON, michael@0: ATK_ROLE_RADIO_BUTTON, michael@0: ATK_ROLE_RADIO_MENU_ITEM, michael@0: ATK_ROLE_ROOT_PANE, michael@0: ATK_ROLE_ROW_HEADER, michael@0: ATK_ROLE_SCROLL_BAR, michael@0: ATK_ROLE_SCROLL_PANE, michael@0: ATK_ROLE_SEPARATOR, michael@0: ATK_ROLE_SLIDER, michael@0: ATK_ROLE_SPLIT_PANE, michael@0: ATK_ROLE_SPIN_BUTTON, michael@0: ATK_ROLE_STATUSBAR, michael@0: ATK_ROLE_TABLE, michael@0: ATK_ROLE_TABLE_CELL, michael@0: ATK_ROLE_TABLE_COLUMN_HEADER, michael@0: ATK_ROLE_TABLE_ROW_HEADER, michael@0: ATK_ROLE_TEAR_OFF_MENU_ITEM, michael@0: ATK_ROLE_TERMINAL, michael@0: ATK_ROLE_TEXT, michael@0: ATK_ROLE_TOGGLE_BUTTON, michael@0: ATK_ROLE_TOOL_BAR, michael@0: ATK_ROLE_TOOL_TIP, michael@0: ATK_ROLE_TREE, michael@0: ATK_ROLE_TREE_TABLE, michael@0: ATK_ROLE_UNKNOWN, michael@0: ATK_ROLE_VIEWPORT, michael@0: ATK_ROLE_WINDOW, michael@0: ATK_ROLE_HEADER, michael@0: ATK_ROLE_FOOTER, michael@0: ATK_ROLE_PARAGRAPH, michael@0: ATK_ROLE_RULER, michael@0: ATK_ROLE_APPLICATION, michael@0: ATK_ROLE_AUTOCOMPLETE, michael@0: ATK_ROLE_EDITBAR, michael@0: ATK_ROLE_EMBEDDED, michael@0: ATK_ROLE_ENTRY, michael@0: ATK_ROLE_CHART, michael@0: ATK_ROLE_CAPTION, michael@0: ATK_ROLE_DOCUMENT_FRAME, michael@0: ATK_ROLE_HEADING, michael@0: ATK_ROLE_PAGE, michael@0: ATK_ROLE_SECTION, michael@0: ATK_ROLE_REDUNDANT_OBJECT, michael@0: ATK_ROLE_FORM, michael@0: ATK_ROLE_LINK, michael@0: ATK_ROLE_INPUT_METHOD_WINDOW, michael@0: ATK_ROLE_TABLE_ROW, michael@0: ATK_ROLE_TREE_ITEM, michael@0: ATK_ROLE_DOCUMENT_SPREADSHEET, michael@0: ATK_ROLE_DOCUMENT_PRESENTATION, michael@0: ATK_ROLE_DOCUMENT_TEXT, michael@0: ATK_ROLE_DOCUMENT_WEB, michael@0: ATK_ROLE_DOCUMENT_EMAIL, michael@0: ATK_ROLE_COMMENT, michael@0: ATK_ROLE_LIST_BOX, michael@0: ATK_ROLE_GROUPING, michael@0: ATK_ROLE_IMAGE_MAP, michael@0: ATK_ROLE_NOTIFICATION, michael@0: ATK_ROLE_INFO_BAR, michael@0: ATK_ROLE_LEVEL_BAR, michael@0: ATK_ROLE_TITLE_BAR, michael@0: ATK_ROLE_BLOCK_QUOTE, michael@0: ATK_ROLE_AUDIO, michael@0: ATK_ROLE_VIDEO, michael@0: ATK_ROLE_DEFINITION, michael@0: ATK_ROLE_ARTICLE, michael@0: ATK_ROLE_LANDMARK, michael@0: ATK_ROLE_LOG, michael@0: ATK_ROLE_MARQUEE, michael@0: ATK_ROLE_MATH, michael@0: ATK_ROLE_RATING, michael@0: ATK_ROLE_TIMER, michael@0: ATK_ROLE_DESCRIPTION_LIST, michael@0: ATK_ROLE_DESCRIPTION_TERM, michael@0: ATK_ROLE_DESCRIPTION_VALUE, michael@0: ATK_ROLE_LAST_DEFINED michael@0: } AtkRole; michael@0: michael@0: AtkRole atk_role_register (const gchar *name); michael@0: michael@0: /** michael@0: *AtkLayer: michael@0: *@ATK_LAYER_INVALID: The object does not have a layer michael@0: *@ATK_LAYER_BACKGROUND: This layer is reserved for the desktop background michael@0: *@ATK_LAYER_CANVAS: This layer is used for Canvas components michael@0: *@ATK_LAYER_WIDGET: This layer is normally used for components michael@0: *@ATK_LAYER_MDI: This layer is used for layered components michael@0: *@ATK_LAYER_POPUP: This layer is used for popup components, such as menus michael@0: *@ATK_LAYER_OVERLAY: This layer is reserved for future use. michael@0: *@ATK_LAYER_WINDOW: This layer is used for toplevel windows. michael@0: * michael@0: * Describes the layer of a component michael@0: * michael@0: * These enumerated "layer values" are used when determining which UI michael@0: * rendering layer a component is drawn into, which can help in making michael@0: * determinations of when components occlude one another. michael@0: **/ michael@0: typedef enum michael@0: { michael@0: ATK_LAYER_INVALID, michael@0: ATK_LAYER_BACKGROUND, michael@0: ATK_LAYER_CANVAS, michael@0: ATK_LAYER_WIDGET, michael@0: ATK_LAYER_MDI, michael@0: ATK_LAYER_POPUP, michael@0: ATK_LAYER_OVERLAY, michael@0: ATK_LAYER_WINDOW michael@0: } AtkLayer; michael@0: michael@0: /** michael@0: * AtkAttributeSet: michael@0: * michael@0: * This is a singly-linked list (a #GSList) of #AtkAttribute. It is michael@0: * used by atk_text_get_run_attributes(), atk_text_get_default_attributes() michael@0: * and atk_editable_text_set_run_attributes() michael@0: **/ michael@0: typedef GSList AtkAttributeSet; michael@0: michael@0: /** michael@0: * AtkAttribute: michael@0: * @name: The attribute name. Call atk_text_attr_get_name() michael@0: * @value: the value of the attribute, represented as a string. michael@0: * Call atk_text_attr_get_value() for those which are strings. michael@0: * For values which are numbers, the string representation of the number michael@0: * is in value. michael@0: * michael@0: * A string name/value pair representing a text attribute. michael@0: **/ michael@0: typedef struct _AtkAttribute AtkAttribute; michael@0: michael@0: struct _AtkAttribute { michael@0: gchar* name; michael@0: gchar* value; michael@0: }; michael@0: michael@0: #define ATK_TYPE_OBJECT (atk_object_get_type ()) michael@0: #define ATK_OBJECT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), ATK_TYPE_OBJECT, AtkObject)) michael@0: #define ATK_OBJECT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), ATK_TYPE_OBJECT, AtkObjectClass)) michael@0: #define ATK_IS_OBJECT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), ATK_TYPE_OBJECT)) michael@0: #define ATK_IS_OBJECT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), ATK_TYPE_OBJECT)) michael@0: #define ATK_OBJECT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), ATK_TYPE_OBJECT, AtkObjectClass)) michael@0: michael@0: #define ATK_TYPE_IMPLEMENTOR (atk_implementor_get_type ()) michael@0: #define ATK_IS_IMPLEMENTOR(obj) G_TYPE_CHECK_INSTANCE_TYPE ((obj), ATK_TYPE_IMPLEMENTOR) michael@0: #define ATK_IMPLEMENTOR(obj) G_TYPE_CHECK_INSTANCE_CAST ((obj), ATK_TYPE_IMPLEMENTOR, AtkImplementor) michael@0: #define ATK_IMPLEMENTOR_GET_IFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), ATK_TYPE_IMPLEMENTOR, AtkImplementorIface)) michael@0: michael@0: michael@0: typedef struct _AtkImplementor AtkImplementor; /* dummy typedef */ michael@0: typedef struct _AtkImplementorIface AtkImplementorIface; michael@0: michael@0: michael@0: typedef struct _AtkObject AtkObject; michael@0: typedef struct _AtkObjectClass AtkObjectClass; michael@0: typedef struct _AtkRelationSet AtkRelationSet; michael@0: typedef struct _AtkStateSet AtkStateSet; michael@0: michael@0: /** michael@0: * AtkPropertyValues: michael@0: * @property_name: The name of the ATK property which is being presented or which has been changed. michael@0: * @old_value: The old property value, NULL; in some contexts this value is undefined (see note below). michael@0: * @new_value: The new value of the named property. michael@0: * michael@0: * @note: For most properties the old_value field of AtkPropertyValues will michael@0: * not contain a valid value. michael@0: * michael@0: * Currently, the only property for which old_value is used is michael@0: * accessible-state; for instance if there is a focus state the michael@0: * property change handler will be called for the object which lost the focus michael@0: * with the old_value containing an AtkState value corresponding to focused michael@0: * and the property change handler will be called for the object which michael@0: * received the focus with the new_value containing an AtkState value michael@0: * corresponding to focused. michael@0: * michael@0: **/ michael@0: struct _AtkPropertyValues michael@0: { michael@0: const gchar *property_name; michael@0: GValue old_value; michael@0: GValue new_value; michael@0: }; michael@0: michael@0: typedef struct _AtkPropertyValues AtkPropertyValues; michael@0: michael@0: typedef gboolean (*AtkFunction) (gpointer data); michael@0: /* michael@0: * For most properties the old_value field of AtkPropertyValues will michael@0: * not contain a valid value. michael@0: * michael@0: * Currently, the only property for which old_value is used is michael@0: * accessible-state; for instance if there is a focus state the michael@0: * property change handler will be called for the object which lost the focus michael@0: * with the old_value containing an AtkState value corresponding to focused michael@0: * and the property change handler will be called for the object which michael@0: * received the focus with the new_value containing an AtkState value michael@0: * corresponding to focused. michael@0: */ michael@0: typedef void (*AtkPropertyChangeHandler) (AtkObject*, AtkPropertyValues*); michael@0: michael@0: michael@0: struct _AtkObject michael@0: { michael@0: GObject parent; michael@0: michael@0: gchar *description; michael@0: gchar *name; michael@0: AtkObject *accessible_parent; michael@0: AtkRole role; michael@0: AtkRelationSet *relation_set; michael@0: AtkLayer layer; michael@0: }; michael@0: michael@0: struct _AtkObjectClass michael@0: { michael@0: GObjectClass parent; michael@0: michael@0: /* michael@0: * Gets the accessible name of the object michael@0: */ michael@0: G_CONST_RETURN gchar* (* get_name) (AtkObject *accessible); michael@0: /* michael@0: * Gets the accessible description of the object michael@0: */ michael@0: G_CONST_RETURN gchar* (* get_description) (AtkObject *accessible); michael@0: /* michael@0: * Gets the accessible parent of the object michael@0: */ michael@0: AtkObject* (*get_parent) (AtkObject *accessible); michael@0: michael@0: /* michael@0: * Gets the number of accessible children of the object michael@0: */ michael@0: gint (* get_n_children) (AtkObject *accessible); michael@0: /* michael@0: * Returns a reference to the specified accessible child of the object. michael@0: * The accessible children are 0-based so the first accessible child is michael@0: * at index 0, the second at index 1 and so on. michael@0: */ michael@0: AtkObject* (* ref_child) (AtkObject *accessible, michael@0: gint i); michael@0: /* michael@0: * Gets the 0-based index of this object in its parent; returns -1 if the michael@0: * object does not have an accessible parent. michael@0: */ michael@0: gint (* get_index_in_parent) (AtkObject *accessible); michael@0: /* michael@0: * Gets the RelationSet associated with the object michael@0: */ michael@0: AtkRelationSet* (* ref_relation_set) (AtkObject *accessible); michael@0: /* michael@0: * Gets the role of the object michael@0: */ michael@0: AtkRole (* get_role) (AtkObject *accessible); michael@0: AtkLayer (* get_layer) (AtkObject *accessible); michael@0: gint (* get_mdi_zorder) (AtkObject *accessible); michael@0: /* michael@0: * Gets the state set of the object michael@0: */ michael@0: AtkStateSet* (* ref_state_set) (AtkObject *accessible); michael@0: /* michael@0: * Sets the accessible name of the object michael@0: */ michael@0: void (* set_name) (AtkObject *accessible, michael@0: const gchar *name); michael@0: /* michael@0: * Sets the accessible description of the object michael@0: */ michael@0: void (* set_description) (AtkObject *accessible, michael@0: const gchar *description); michael@0: /* michael@0: * Sets the accessible parent of the object michael@0: */ michael@0: void (* set_parent) (AtkObject *accessible, michael@0: AtkObject *parent); michael@0: /* michael@0: * Sets the accessible role of the object michael@0: */ michael@0: void (* set_role) (AtkObject *accessible, michael@0: AtkRole role); michael@0: /* michael@0: * Specifies a function to be called when a property changes value michael@0: */ michael@0: guint (* connect_property_change_handler) (AtkObject michael@0: *accessible, michael@0: AtkPropertyChangeHandler *handler); michael@0: /* michael@0: * Removes a property change handler which was specified using michael@0: * connect_property_change_handler michael@0: */ michael@0: void (* remove_property_change_handler) (AtkObject michael@0: *accessible, michael@0: guint michael@0: handler_id); michael@0: void (* initialize) (AtkObject *accessible, michael@0: gpointer data); michael@0: /* michael@0: * The signal handler which is executed when there is a change in the michael@0: * children of the object michael@0: */ michael@0: void (* children_changed) (AtkObject *accessible, michael@0: guint change_index, michael@0: gpointer changed_child); michael@0: /* michael@0: * The signal handler which is executed when there is a focus event michael@0: * for an object. michael@0: */ michael@0: void (* focus_event) (AtkObject *accessible, michael@0: gboolean focus_in); michael@0: /* michael@0: * The signal handler which is executed when there is a property_change michael@0: * signal for an object. michael@0: */ michael@0: void (* property_change) (AtkObject *accessible, michael@0: AtkPropertyValues *values); michael@0: /* michael@0: * The signal handler which is executed when there is a state_change michael@0: * signal for an object. michael@0: */ michael@0: void (* state_change) (AtkObject *accessible, michael@0: const gchar *name, michael@0: gboolean state_set); michael@0: /* michael@0: * The signal handler which is executed when there is a change in the michael@0: * visible data for an object michael@0: */ michael@0: void (*visible_data_changed) (AtkObject *accessible); michael@0: michael@0: /* michael@0: * The signal handler which is executed when there is a change in the michael@0: * 'active' child or children of the object, for instance when michael@0: * interior focus changes in a table or list. This signal should be emitted michael@0: * by objects whose state includes ATK_STATE_MANAGES_DESCENDANTS. michael@0: */ michael@0: void (*active_descendant_changed) (AtkObject *accessible, michael@0: gpointer *child); michael@0: michael@0: /* michael@0: * Gets a list of properties applied to this object as a whole, as an #AtkAttributeSet consisting of name-value pairs. michael@0: * Since ATK 1.12 michael@0: */ michael@0: AtkAttributeSet* (*get_attributes) (AtkObject *accessible); michael@0: michael@0: const gchar* (*get_object_locale) (AtkObject *accessible); michael@0: michael@0: AtkFunction pad1; michael@0: }; michael@0: michael@0: GType atk_object_get_type (void); michael@0: michael@0: struct _AtkImplementorIface michael@0: { michael@0: GTypeInterface parent; michael@0: michael@0: AtkObject* (*ref_accessible) (AtkImplementor *implementor); michael@0: }; michael@0: GType atk_implementor_get_type (void); michael@0: michael@0: /* michael@0: * This method uses the ref_accessible method in AtkImplementorIface, michael@0: * if the object's class implements AtkImplementorIface. michael@0: * Otherwise it returns %NULL. michael@0: * michael@0: * IMPORTANT: michael@0: * Note also that because this method may return flyweight objects, michael@0: * it increments the returned AtkObject's reference count. michael@0: * Therefore it is the responsibility of the calling michael@0: * program to unreference the object when no longer needed. michael@0: * (c.f. gtk_widget_get_accessible() where this is not the case). michael@0: */ michael@0: AtkObject* atk_implementor_ref_accessible (AtkImplementor *implementor); michael@0: michael@0: /* michael@0: * Properties directly supported by AtkObject michael@0: */ michael@0: michael@0: G_CONST_RETURN gchar* atk_object_get_name (AtkObject *accessible); michael@0: G_CONST_RETURN gchar* atk_object_get_description (AtkObject *accessible); michael@0: AtkObject* atk_object_get_parent (AtkObject *accessible); michael@0: gint atk_object_get_n_accessible_children (AtkObject *accessible); michael@0: AtkObject* atk_object_ref_accessible_child (AtkObject *accessible, michael@0: gint i); michael@0: AtkRelationSet* atk_object_ref_relation_set (AtkObject *accessible); michael@0: AtkRole atk_object_get_role (AtkObject *accessible); michael@0: AtkLayer atk_object_get_layer (AtkObject *accessible); michael@0: gint atk_object_get_mdi_zorder (AtkObject *accessible); michael@0: AtkAttributeSet* atk_object_get_attributes (AtkObject *accessible); michael@0: AtkStateSet* atk_object_ref_state_set (AtkObject *accessible); michael@0: gint atk_object_get_index_in_parent (AtkObject *accessible); michael@0: void atk_object_set_name (AtkObject *accessible, michael@0: const gchar *name); michael@0: void atk_object_set_description (AtkObject *accessible, michael@0: const gchar *description); michael@0: void atk_object_set_parent (AtkObject *accessible, michael@0: AtkObject *parent); michael@0: void atk_object_set_role (AtkObject *accessible, michael@0: AtkRole role); michael@0: michael@0: michael@0: guint atk_object_connect_property_change_handler (AtkObject *accessible, michael@0: AtkPropertyChangeHandler *handler); michael@0: void atk_object_remove_property_change_handler (AtkObject *accessible, michael@0: guint handler_id); michael@0: michael@0: void atk_object_notify_state_change (AtkObject *accessible, michael@0: AtkState state, michael@0: gboolean value); michael@0: void atk_object_initialize (AtkObject *accessible, michael@0: gpointer data); michael@0: michael@0: G_CONST_RETURN gchar* atk_role_get_name (AtkRole role); michael@0: AtkRole atk_role_for_name (const gchar *name); michael@0: michael@0: michael@0: /* NEW in 1.1: convenience API */ michael@0: gboolean atk_object_add_relationship (AtkObject *object, michael@0: AtkRelationType relationship, michael@0: AtkObject *target); michael@0: gboolean atk_object_remove_relationship (AtkObject *object, michael@0: AtkRelationType relationship, michael@0: AtkObject *target); michael@0: G_CONST_RETURN gchar* atk_role_get_localized_name (AtkRole role); michael@0: michael@0: /* */ michael@0: michael@0: michael@0: /* michael@0: * Note: the properties which are registered with the GType michael@0: * property registry, for type ATK_TYPE_OBJECT, are as follows: michael@0: * michael@0: * "accessible-name" michael@0: * "accessible-description" michael@0: * "accessible-parent" michael@0: * "accessible-role" michael@0: * "accessible-value" michael@0: * "accessible-component-layer" michael@0: * "accessible-component-zorder" michael@0: * "accessible-table-caption" michael@0: * "accessible-table-column-description" michael@0: * "accessible-table-column-header" michael@0: * "accessible-table-row-description" michael@0: * "accessible-table-row-header" michael@0: * "accessible-table-summary" michael@0: * "accessible-model" michael@0: * michael@0: * accessibility property change listeners should use the michael@0: * normal GObject property interfaces and "property-change" michael@0: * signal handler semantics to interpret the property change michael@0: * information relayed from AtkObject. michael@0: * (AtkObject instances will connect to the "notify" michael@0: * signal in their host objects, and relay the signals when appropriate). michael@0: */ michael@0: michael@0: /* For other signals, see related interfaces michael@0: * michael@0: * AtkActionIface, michael@0: * AtkComponentIface, michael@0: * AtkHypertextIface, michael@0: * AtkImageIface, michael@0: * AtkSelectionIface, michael@0: * AtkTableIface, michael@0: * AtkTextIface, michael@0: * AtkValueIface. michael@0: * michael@0: * The usage model for obtaining these interface instances is: michael@0: * ATK__GET_IFACE(GObject *accessible), michael@0: * where accessible, though specified as a GObject, is michael@0: * the AtkObject instance being queried. michael@0: * More usually, the interface will be used via a cast to the michael@0: * interface's corresponding "type": michael@0: * michael@0: * AtkText textImpl = ATK_TEXT(accessible); michael@0: * if (textImpl) michael@0: * { michael@0: * cpos = atk_text_get_caret_position(textImpl); michael@0: * } michael@0: * michael@0: * If it's known in advance that accessible implements AtkTextIface, michael@0: * this is shortened to: michael@0: * michael@0: * cpos = atk_text_get_caret_position (ATK_TEXT (accessible)); michael@0: */ michael@0: michael@0: #ifdef __cplusplus michael@0: } michael@0: #endif /* __cplusplus */ michael@0: michael@0: michael@0: #endif /* __ATK_OBJECT_H__ */