diff --git a/accessible/public/nsIAccessible.idl b/accessible/public/nsIAccessible.idl index d63317f89db..d04bfe60cbe 100644 --- a/accessible/public/nsIAccessible.idl +++ b/accessible/public/nsIAccessible.idl @@ -128,69 +128,204 @@ interface nsIAccessible : nsISupports const unsigned long STATE_VERTICAL = 0x80000000; // Especially used for sliders and scrollbars +%{C++ +#ifdef MOZ_ACCESSIBILITY_ATK + +/******************************************************************************* +The following nsIAccessible roles are traslated to ATK_ROLE_UNKNOWN + + ROLE_TITLEBAR, ROLE_SOUND, ROLE_CURSOR, ROLE_CARET, ROLE_BORDER, + ROLE_GROUPING, ROLE_EQUATION, ROLE_COLUMN, ROLE_ROW, ROLE_LINK, + ROLE_WHITESPACE, ROLE_CLOCK, + ROLE_IPADDRESS + + ROLE_GRIP + The object represents a special mouse pointer, which allows a user to + manipulate user interface elements such as windows. + + ROLE_HELPBALLOON + The object displays a Help topic in the form of a ToolTip or Help balloon. + + ROLE_PROPERTYPAGE + The object represents a property sheet. + + ROLE_INDICATOR + The object represents an indicator, such as a pointer graphic pointing to + the currrent item. + + ROLE_HOTKEYFIELD + The object represents a hot-key field that allow the user to enter a + sequence of keystroke. + + +The following ATK roles have no corresponding nsIAccessible roles. Perhaps +there are not these types of widget/control in Mozilla, so don't need these +ATK roles? Or need add some of them? + + ATK_ROLE_ARROW + An arrow in one of the four cardinal directions. + + ATK_ROLE_INTERNAL_FRAME + A frame-like object that is clipped by a desktop pane. + + ATK_ROLE_ACCEL_LABEL, ATK_ROLE_CANVAS, ATK_ROLE_CHECK_MENU_ITEM, + ATK_ROLE_COLOR_CHOOSER, ATK_ROLE_DATE_EDITOR, ATK_ROLE_DESKTOP_ICON, + ATK_ROLE_DESKTOP_FRAME, ATK_ROLE_DIRECTORY_PANE, ATK_ROLE_FILE_CHOOSER, + ATK_ROLE_FILLER, ATK_ROLE_FONT_CHOOSER, ATK_ROLE_GLASS_PANE, + ATK_ROLE_HTML_CONTAINER, ATK_ROLE_ICON, ATK_ROLE_LAYERED_PANE, + ATK_ROLE_POPUP_MENU, ATK_ROLE_OPTION_PANE, ATK_ROLE_PASSWORD_TEXT, + ATK_ROLE_RADIO_MENU_ITEM, ATK_ROLE_ROOT_PANE, ATK_ROLE_SCROLL_PANE, + ATK_ROLE_SPLIT_PANE, ATK_ROLE_TEAR_OFF_MENU_ITEM, ATK_ROLE_TERMINAL, + ATK_ROLE_TOGGLE_BUTTON, ATK_ROLE_TREE_TABLE, ATK_ROLE_VIEWPORT, ATK_ROLE_LABEL + +Important: + Following value should keep synchronization with the definitions in atk.h +*******************************************************************************/ + enum { ROLE_TITLEBAR = 66U }; // ATK_ROLE_UNKNOWN + enum { ROLE_MENUBAR = 33U }; // ATK_ROLE_MENU_BAR + enum { ROLE_SCROLLBAR = 47U }; // ATK_ROLE_SCROLL_BAR + enum { ROLE_GRIP = 66U }; // ATK_ROLE_UNKNOWN + enum { ROLE_SOUND = 66U }; // ATK_ROLE_UNKNOWN + enum { ROLE_CURSOR = 66U }; // ATK_ROLE_UNKNOWN + enum { ROLE_CARET = 66U }; // ATK_ROLE_UNKNOWN + enum { ROLE_ALERT = 2U }; // ATK_ROLE_ALERT + enum { ROLE_WINDOW = 68U }; // ATK_ROLE_WINDOW + // An object used for drawing custom user interface elements + enum { ROLE_CLIENT = 18U }; // ATK_ROLE_DRAWING_AREA + enum { ROLE_MENUPOPUP = 32U }; // ATK_ROLE_MENU + enum { ROLE_MENUITEM = 34U }; // ATK_ROLE_MENU_ITEM + enum { ROLE_TOOLTIP = 63U }; // ATK_ROLE_TOOL_TIP + // The object represents a main window for a application + enum { ROLE_APPLICATION = 22U }; // ATK_ROLE_FRAME + // The object represents a document window, only for MDI windows + enum { ROLE_DOCUMENT = 68U }; // ATK_ROLE_WINDOW + enum { ROLE_PANE = 38U }; // ATK_ROLE_PANEL + enum { ROLE_CHART = 26U }; // ATK_ROLE_IMAGE + enum { ROLE_DIALOG = 16U }; // ATK_ROLE_DIALOG + enum { ROLE_BORDER = 66U }; // ATK_ROLE_UNKNOWN + enum { ROLE_GROUPING = 66U }; // ATK_ROLE_UNKNOWN + enum { ROLE_SEPARATOR = 49U }; // ATK_ROLE_SEPARATOR + enum { ROLE_TOOLBAR = 62U }; // ATK_ROLE_TOOL_BAR + enum { ROLE_STATUSBAR = 53U }; // ATK_ROLE_STATUSBAR + enum { ROLE_TABLE = 54U }; // ATK_ROLE_TABLE + // Or ATK_ROLE_TABLE_COLUMN_HEADER? + enum { ROLE_COLUMNHEADER = 10U };// ATK_ROLE_COLUMN_HEADER + // Or ATK_ROLE_TABLE_ROW_HEADER ? + enum { ROLE_ROWHEADER = 46U }; // ATK_ROLE_ROW_HEADER + enum { ROLE_COLUMN = 66U }; // ATK_ROLE_UNKNOWN + enum { ROLE_ROW = 66U }; // ATK_ROLE_UNKNOWN + enum { ROLE_CELL = 55U }; // ATK_ROLE_TABLE_CELL + enum { ROLE_LINK = 66U }; // ATK_ROLE_UNKNOWN + enum { ROLE_HELPBALLOON = 66U }; // ATK_ROLE_UNKNOWN + // The object represents a cartoon-like graphic object + enum { ROLE_CHARACTER = 26U }; // ATK_ROLE_IMAGE + enum { ROLE_LIST = 30U }; // ATK_ROLE_LIST + enum { ROLE_LISTITEM = 31U }; // ATK_ROLE_LIST_ITEM + // The object represents an outline or tree structure + enum { ROLE_OUTLINE = 64U }; // ATK_ROLE_TREE + // The object represents an item in an outline or tree structure + enum { ROLE_OUTLINEITEM = 31U }; // ATK_ROLE_LIST_ITEM + enum { ROLE_PAGETAB = 36U }; // ATK_ROLE_PAGE_TAB + enum { ROLE_PROPERTYPAGE = 66U };// ATK_ROLE_UNKNOWN + enum { ROLE_INDICATOR = 66U }; // ATK_ROLE_UNKNOWN + enum { ROLE_GRAPHIC = 26U }; // ATK_ROLE_IMAGE + // Read-only text, can't be modified or selected + enum { ROLE_STATICTEXT = 60U }; // ATK_ROLE_TEXT + enum { ROLE_TEXT = 60U }; // ATK_ROLE_TEXT + enum { ROLE_PUSHBUTTON = 42U }; // ATK_ROLE_PUSH_BUTTON + enum { ROLE_CHECKBUTTON = 7U }; // ATK_ROLE_CHECK_BOX + enum { ROLE_RADIOBUTTON = 43U }; // ATK_ROLE_RADIO_BUTTON + enum { ROLE_COMBOBOX = 11U }; // ATK_ROLE_COMBO_BOX + // Just represents the calender control + enum { ROLE_DROPLIST = 5U }; // ATK_ROLE_CALENDAR + enum { ROLE_PROGRESSBAR = 41U }; // ATK_ROLE_PROGRESS_BAR + enum { ROLE_DIAL = 15U }; // ATK_ROLE_DIAL + enum { ROLE_HOTKEYFIELD = 66U }; // ATK_ROLE_UNKNOWN + enum { ROLE_SLIDER = 50U }; // ATK_ROLE_SLIDER + enum { ROLE_SPINBUTTON = 52U }; // ATK_ROLE_SPIN_BUTTON + enum { ROLE_DIAGRAM = 26U }; // ATK_ROLE_IMAGE + enum { ROLE_ANIMATION = 3U }; // ATK_ROLE_ANIMATION + enum { ROLE_EQUATION = 66U }; // ATK_ROLE_UNKNOWN + enum { ROLE_BUTTONDROPDOWN = 42U }; // ATK_ROLE_PUSH_BUTTON + enum { ROLE_BUTTONMENU = 42U }; // ATK_ROLE_PUSH_BUTTON + // Represents a button that drops down a grid + enum { ROLE_BUTTONDROPDOWNGRID = 66U }; // ATK_ROLE_UNKNOWN + enum { ROLE_WHITESPACE = 66U }; // ATK_ROLE_UNKNOWN + enum { ROLE_PAGETABLIST = 37U }; // ATK_ROLE_PAGE_TAB_LIST + enum { ROLE_CLOCK = 66U }; // ATK_ROLE_UNKNOWN + // Represents a button on the toolbar that has a drop-down list icon + // directly adjacent to the button + enum { ROLE_SPLITBUTTON = 42U }; // ATK_ROLE_PUSH_BUTTON + enum { ROLE_IPADDRESS = 66U }; // ATK_ROLE_UNKNOWN + enum { ROLE_NOTHING = 0U }; // ATK_ROLE_INVALID + +#else // MSAA Roles - only one per nsIAccessible or IAccessible - const unsigned long ROLE_TITLEBAR = 0x00000001; - const unsigned long ROLE_MENUBAR = 0x00000002; - const unsigned long ROLE_SCROLLBAR = 0x00000003; - const unsigned long ROLE_GRIP = 0x00000004; - const unsigned long ROLE_SOUND = 0x00000005; - const unsigned long ROLE_CURSOR = 0x00000006; - const unsigned long ROLE_CARET = 0x00000007; - const unsigned long ROLE_ALERT = 0x00000008; - const unsigned long ROLE_WINDOW = 0x00000009; - const unsigned long ROLE_CLIENT = 0x0000000A; - const unsigned long ROLE_MENUPOPUP = 0x0000000B; - const unsigned long ROLE_MENUITEM = 0x0000000C; - const unsigned long ROLE_TOOLTIP = 0x0000000D; - const unsigned long ROLE_APPLICATION = 0x0000000E; - const unsigned long ROLE_DOCUMENT = 0x0000000F; - const unsigned long ROLE_PANE = 0x00000010; - const unsigned long ROLE_CHART = 0x00000011; - const unsigned long ROLE_DIALOG = 0x00000012; - const unsigned long ROLE_BORDER = 0x00000013; - const unsigned long ROLE_GROUPING = 0x00000014; - const unsigned long ROLE_SEPARATOR = 0x00000015; - const unsigned long ROLE_TOOLBAR = 0x00000016; - const unsigned long ROLE_STATUSBAR = 0x00000017; - const unsigned long ROLE_TABLE = 0x00000018; - const unsigned long ROLE_COLUMNHEADER = 0x00000019; - const unsigned long ROLE_ROWHEADER = 0x0000001A; - const unsigned long ROLE_COLUMN = 0x0000001B; - const unsigned long ROLE_ROW = 0x0000001C; - const unsigned long ROLE_CELL = 0x0000001D; - const unsigned long ROLE_LINK = 0x0000001E; - const unsigned long ROLE_HELPBALLOON = 0x0000001F; - const unsigned long ROLE_CHARACTER = 0x00000020; - const unsigned long ROLE_LIST = 0x00000021; - const unsigned long ROLE_LISTITEM = 0x00000022; - const unsigned long ROLE_OUTLINE = 0x00000023; - const unsigned long ROLE_OUTLINEITEM = 0x00000024; - const unsigned long ROLE_PAGETAB = 0x00000025; - const unsigned long ROLE_PROPERTYPAGE = 0x00000026; - const unsigned long ROLE_INDICATOR = 0x00000027; - const unsigned long ROLE_GRAPHIC = 0x00000028; - const unsigned long ROLE_STATICTEXT = 0x00000029; - const unsigned long ROLE_TEXT = 0x0000002A; // Editable, selectable, etc. - const unsigned long ROLE_PUSHBUTTON = 0x0000002B; - const unsigned long ROLE_CHECKBUTTON = 0x0000002C; - const unsigned long ROLE_RADIOBUTTON = 0x0000002D; - const unsigned long ROLE_COMBOBOX = 0x0000002E; - const unsigned long ROLE_DROPLIST = 0x0000002F; - const unsigned long ROLE_PROGRESSBAR = 0x00000030; - const unsigned long ROLE_DIAL = 0x00000031; - const unsigned long ROLE_HOTKEYFIELD = 0x00000032; - const unsigned long ROLE_SLIDER = 0x00000033; - const unsigned long ROLE_SPINBUTTON = 0x00000034; - const unsigned long ROLE_DIAGRAM = 0x00000035; - const unsigned long ROLE_ANIMATION = 0x00000036; - const unsigned long ROLE_EQUATION = 0x00000037; - const unsigned long ROLE_BUTTONDROPDOWN = 0x00000038; - const unsigned long ROLE_BUTTONMENU = 0x00000039; - const unsigned long ROLE_BUTTONDROPDOWNGRID = 0x0000003A; - const unsigned long ROLE_WHITESPACE = 0x0000003B; - const unsigned long ROLE_PAGETABLIST = 0x0000003C; - const unsigned long ROLE_CLOCK = 0x0000003D; - const unsigned long ROLE_SPLITBUTTON = 0x0000003E; // New in MSAA 2.0 - const unsigned long ROLE_IPADDRESS = 0x0000003F; // New in MSAA 2.0 - const unsigned long ROLE_NOTHING = 0xffffffff; + enum { ROLE_TITLEBAR = 1U }; + enum { ROLE_MENUBAR = 2U }; + enum { ROLE_SCROLLBAR = 3U }; + enum { ROLE_GRIP = 4U }; + enum { ROLE_SOUND = 5U }; + enum { ROLE_CURSOR = 6U }; + enum { ROLE_CARET = 7U }; + enum { ROLE_ALERT = 8U }; + enum { ROLE_WINDOW = 9U }; + enum { ROLE_CLIENT = 10U }; + enum { ROLE_MENUPOPUP = 11U }; + enum { ROLE_MENUITEM = 12U }; + enum { ROLE_TOOLTIP = 13U }; + enum { ROLE_APPLICATION = 14U }; + enum { ROLE_DOCUMENT = 15U }; + enum { ROLE_PANE = 16U }; + enum { ROLE_CHART = 17U }; + enum { ROLE_DIALOG = 18U }; + enum { ROLE_BORDER = 19U }; + enum { ROLE_GROUPING = 20U }; + enum { ROLE_SEPARATOR = 21U }; + enum { ROLE_TOOLBAR = 22U }; + enum { ROLE_STATUSBAR = 23U }; + enum { ROLE_TABLE = 24U }; + enum { ROLE_COLUMNHEADER = 25U }; + enum { ROLE_ROWHEADER = 26U }; + enum { ROLE_COLUMN = 27U }; + enum { ROLE_ROW = 28U }; + enum { ROLE_CELL = 29U }; + enum { ROLE_LINK = 30U }; + enum { ROLE_HELPBALLOON = 31U }; + enum { ROLE_CHARACTER = 32U }; + enum { ROLE_LIST = 33U }; + enum { ROLE_LISTITEM = 34U }; + enum { ROLE_OUTLINE = 35U }; + enum { ROLE_OUTLINEITEM = 36U }; + enum { ROLE_PAGETAB = 37U }; + enum { ROLE_PROPERTYPAGE = 38U }; + enum { ROLE_INDICATOR = 39U }; + enum { ROLE_GRAPHIC = 40U }; + enum { ROLE_STATICTEXT = 41U }; + enum { ROLE_TEXT = 42U }; + enum { ROLE_PUSHBUTTON = 43U }; + enum { ROLE_CHECKBUTTON = 44U }; + enum { ROLE_RADIOBUTTON = 45U }; + enum { ROLE_COMBOBOX = 46U }; + enum { ROLE_DROPLIST = 47U }; + enum { ROLE_PROGRESSBAR = 48U }; + enum { ROLE_DIAL = 49U }; + enum { ROLE_HOTKEYFIELD = 50U }; + enum { ROLE_SLIDER = 51U }; + enum { ROLE_SPINBUTTON = 52U }; + enum { ROLE_DIAGRAM = 53U }; + enum { ROLE_ANIMATION = 54U }; + enum { ROLE_EQUATION = 55U }; + enum { ROLE_BUTTONDROPDOWN = 56U }; + enum { ROLE_BUTTONMENU = 57U }; + enum { ROLE_BUTTONDROPDOWNGRID = 58U }; + enum { ROLE_WHITESPACE = 59U }; + enum { ROLE_PAGETABLIST = 60U }; + enum { ROLE_CLOCK = 61U }; + enum { ROLE_SPLITBUTTON = 62U }; + enum { ROLE_IPADDRESS = 63U }; + enum { ROLE_NOTHING = 4294967295U }; + +#endif +%} };