LCOV - code coverage report
Current view: directory - objdir/dist/include - nsAccessibilityService.h (source / functions) Found Hit Coverage
Test: app.info Lines: 2 0 0.0 %
Date: 2012-06-02 Functions: 1 0 0.0 %

       1                 : /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
       2                 : /* ***** BEGIN LICENSE BLOCK *****
       3                 :  * Version: MPL 1.1/GPL 2.0/LGPL 2.1
       4                 :  *
       5                 :  * The contents of this file are subject to the Mozilla Public License Version
       6                 :  * 1.1 (the "License"); you may not use this file except in compliance with
       7                 :  * the License. You may obtain a copy of the License at
       8                 :  * http://www.mozilla.org/MPL/
       9                 :  *
      10                 :  * Software distributed under the License is distributed on an "AS IS" basis,
      11                 :  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
      12                 :  * for the specific language governing rights and limitations under the
      13                 :  * License.
      14                 :  *
      15                 :  * The Original Code is mozilla.org code.
      16                 :  *
      17                 :  * The Initial Developer of the Original Code is
      18                 :  * Netscape Communications Corporation.
      19                 :  * Portions created by the Initial Developer are Copyright (C) 1998
      20                 :  * the Initial Developer. All Rights Reserved.
      21                 :  *
      22                 :  * Contributor(s):
      23                 :  *   John Gaunt (jgaunt@netscape.com)
      24                 :  *
      25                 :  * Alternatively, the contents of this file may be used under the terms of
      26                 :  * either of the GNU General Public License Version 2 or later (the "GPL"),
      27                 :  * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
      28                 :  * in which case the provisions of the GPL or the LGPL are applicable instead
      29                 :  * of those above. If you wish to allow use of your version of this file only
      30                 :  * under the terms of either the GPL or the LGPL, and not to allow others to
      31                 :  * use your version of this file under the terms of the MPL, indicate your
      32                 :  * decision by deleting the provisions above and replace them with the notice
      33                 :  * and other provisions required by the GPL or the LGPL. If you do not delete
      34                 :  * the provisions above, a recipient may use your version of this file under
      35                 :  * the terms of any one of the MPL, the GPL or the LGPL.
      36                 :  *
      37                 :  * ***** END LICENSE BLOCK ***** */
      38                 : 
      39                 : #ifndef __nsAccessibilityService_h__
      40                 : #define __nsAccessibilityService_h__
      41                 : 
      42                 : #include "nsIAccessibilityService.h"
      43                 : 
      44                 : #include "a11yGeneric.h"
      45                 : #include "nsAccDocManager.h"
      46                 : 
      47                 : #include "mozilla/a11y/FocusManager.h"
      48                 : 
      49                 : #include "nsIObserver.h"
      50                 : 
      51                 : namespace mozilla {
      52                 : namespace a11y {
      53                 : 
      54                 : /**
      55                 :  * Return focus manager.
      56                 :  */
      57                 : FocusManager* FocusMgr();
      58                 : 
      59                 : #ifdef MOZ_ACCESSIBILITY_ATK
      60                 : /**
      61                 :  * Perform initialization that should be done as soon as possible, in order
      62                 :  * to minimize startup time.
      63                 :  * XXX: this function and the next defined in nsApplicationAccessibleWrap.cpp
      64                 :  */
      65                 : void PreInit();
      66                 : 
      67                 : /**
      68                 :  * Is platform accessibility enabled.
      69                 :  * Only used on linux with atk for now.
      70                 :  */
      71                 : bool ShouldA11yBeEnabled();
      72                 : #endif
      73                 : 
      74                 : } // namespace a11y
      75                 : } // namespace mozilla
      76                 : 
      77                 : class nsAccessibilityService : public nsAccDocManager,
      78                 :                                public mozilla::a11y::FocusManager,
      79                 :                                public nsIAccessibilityService,
      80                 :                                public nsIObserver
      81                 : {
      82                 : public:
      83                 :   virtual ~nsAccessibilityService();
      84                 : 
      85                 :   NS_DECL_ISUPPORTS_INHERITED
      86                 :   NS_DECL_NSIACCESSIBLERETRIEVAL
      87                 :   NS_DECL_NSIOBSERVER
      88                 : 
      89                 :   // nsIAccessibilityService
      90                 :   virtual nsAccessible* GetRootDocumentAccessible(nsIPresShell* aPresShell,
      91                 :                                                   bool aCanCreate);
      92                 :   already_AddRefed<nsAccessible>
      93                 :     CreateHTMLButtonAccessible(nsIContent* aContent, nsIPresShell* aPresShell);
      94                 :   virtual already_AddRefed<nsAccessible>
      95                 :     CreateHTMLBRAccessible(nsIContent* aContent, nsIPresShell* aPresShell);
      96                 :   already_AddRefed<nsAccessible>
      97                 :     CreateHTMLCanvasAccessible(nsIContent* aContent, nsIPresShell* aPresShell);
      98                 :   virtual already_AddRefed<nsAccessible>
      99                 :     CreateHTMLCaptionAccessible(nsIContent* aContent, nsIPresShell* aPresShell);
     100                 :   virtual already_AddRefed<nsAccessible>
     101                 :     CreateHTMLCheckboxAccessible(nsIContent* aContent, nsIPresShell* aPresShell);
     102                 :   virtual already_AddRefed<nsAccessible>
     103                 :     CreateHTMLComboboxAccessible(nsIContent* aContent, nsIPresShell* aPresShell);
     104                 :   already_AddRefed<nsAccessible>
     105                 :     CreateHTMLFileInputAccessible(nsIContent* aContent, nsIPresShell* aPresShell);
     106                 :   virtual already_AddRefed<nsAccessible>
     107                 :     CreateHTMLGroupboxAccessible(nsIContent* aContent, nsIPresShell* aPresShell);
     108                 :   virtual already_AddRefed<nsAccessible>
     109                 :     CreateHTMLHRAccessible(nsIContent* aContent, nsIPresShell* aPresShell);
     110                 :   virtual already_AddRefed<nsAccessible>
     111                 :     CreateHTMLImageAccessible(nsIContent* aContent, nsIPresShell* aPresShell);
     112                 :   virtual already_AddRefed<nsAccessible>
     113                 :     CreateHTMLLabelAccessible(nsIContent* aContent, nsIPresShell* aPresShell);
     114                 :   virtual already_AddRefed<nsAccessible>
     115                 :     CreateHTMLLIAccessible(nsIContent* aContent, nsIPresShell* aPresShell);
     116                 :   virtual already_AddRefed<nsAccessible>
     117                 :     CreateHTMLListboxAccessible(nsIContent* aContent, nsIPresShell* aPresShell);
     118                 :   virtual already_AddRefed<nsAccessible>
     119                 :     CreateHTMLMediaAccessible(nsIContent* aContent, nsIPresShell* aPresShell);
     120                 :   virtual already_AddRefed<nsAccessible>
     121                 :     CreateHTMLObjectFrameAccessible(nsObjectFrame* aFrame, nsIContent* aContent,
     122                 :                                     nsIPresShell* aPresShell);
     123                 :   virtual already_AddRefed<nsAccessible>
     124                 :     CreateHTMLRadioButtonAccessible(nsIContent* aContent, nsIPresShell* aPresShell);
     125                 :   virtual already_AddRefed<nsAccessible>
     126                 :     CreateHTMLTableAccessible(nsIContent* aContent, nsIPresShell* aPresShell);
     127                 :   virtual already_AddRefed<nsAccessible>
     128                 :     CreateHTMLTableCellAccessible(nsIContent* aContent, nsIPresShell* aPresShell);
     129                 :   virtual already_AddRefed<nsAccessible>
     130                 :     CreateHTMLTextAccessible(nsIContent* aContent, nsIPresShell* aPresShell);
     131                 :   virtual already_AddRefed<nsAccessible>
     132                 :     CreateHTMLTextFieldAccessible(nsIContent* aContent, nsIPresShell* aPresShell);
     133                 :   virtual already_AddRefed<nsAccessible>
     134                 :     CreateHyperTextAccessible(nsIContent* aContent, nsIPresShell* aPresShell);
     135                 :   virtual already_AddRefed<nsAccessible>
     136                 :     CreateOuterDocAccessible(nsIContent* aContent, nsIPresShell* aPresShell);
     137                 : 
     138                 :   virtual nsAccessible* AddNativeRootAccessible(void* aAtkAccessible);
     139                 :   virtual void RemoveNativeRootAccessible(nsAccessible* aRootAccessible);
     140                 : 
     141                 :   virtual void ContentRangeInserted(nsIPresShell* aPresShell,
     142                 :                                     nsIContent* aContainer,
     143                 :                                     nsIContent* aStartChild,
     144                 :                                     nsIContent* aEndChild);
     145                 : 
     146                 :   virtual void ContentRemoved(nsIPresShell* aPresShell, nsIContent* aContainer,
     147                 :                               nsIContent* aChild);
     148                 : 
     149                 :   virtual void UpdateText(nsIPresShell* aPresShell, nsIContent* aContent);
     150                 : 
     151                 :   /**
     152                 :    * Update list bullet accessible.
     153                 :    */
     154                 :   virtual void UpdateListBullet(nsIPresShell* aPresShell,
     155                 :                                 nsIContent* aHTMLListItemContent,
     156                 :                                 bool aHasBullet);
     157                 : 
     158                 :   virtual void NotifyOfAnchorJumpTo(nsIContent *aTarget);
     159                 : 
     160                 :   virtual void PresShellDestroyed(nsIPresShell* aPresShell);
     161                 : 
     162                 :   /**
     163                 :    * Notify that presshell is activated.
     164                 :    */
     165                 :   virtual void PresShellActivated(nsIPresShell* aPresShell);
     166                 : 
     167                 :   virtual void RecreateAccessible(nsIPresShell* aPresShell,
     168                 :                                   nsIContent* aContent);
     169                 : 
     170                 :   virtual void FireAccessibleEvent(PRUint32 aEvent, nsAccessible* aTarget);
     171                 : 
     172                 :   // nsAccessibiltiyService
     173                 : 
     174                 :   /**
     175                 :    * Return true if accessibility service has been shutdown.
     176                 :    */
     177                 :   static bool IsShutdown() { return gIsShutdown; }
     178                 : 
     179                 :   /**
     180                 :    * Return an accessible for the given DOM node from the cache or create new
     181                 :    * one.
     182                 :    *
     183                 :    * @param  aNode             [in] the given node
     184                 :    * @param  aDoc              [in] the doc accessible of the node  
     185                 :    * @param  aIsSubtreeHidden  [out, optional] indicates whether the node's
     186                 :    *                             frame and its subtree is hidden
     187                 :    */
     188                 :   nsAccessible* GetOrCreateAccessible(nsINode* aNode, nsDocAccessible* aDoc,
     189                 :                                       bool* aIsSubtreeHidden = nsnull);
     190                 : 
     191                 :   /**
     192                 :    * Return an accessible for the given DOM node and eventually a presentation
     193                 :    * shell.
     194                 :    */
     195                 :   nsAccessible* GetAccessible(nsINode* aNode, nsIPresShell* aPresShell);
     196                 : 
     197                 : private:
     198                 :   // nsAccessibilityService creation is controlled by friend
     199                 :   // NS_GetAccessibilityService, keep constructors private.
     200                 :   nsAccessibilityService();
     201                 :   nsAccessibilityService(const nsAccessibilityService&);
     202                 :   nsAccessibilityService& operator =(const nsAccessibilityService&);
     203                 : 
     204                 : private:
     205                 :   /**
     206                 :    * Initialize accessibility service.
     207                 :    */
     208                 :   bool Init();
     209                 : 
     210                 :   /**
     211                 :    * Shutdowns accessibility service.
     212                 :    */
     213                 :   void Shutdown();
     214                 : 
     215                 :   /**
     216                 :    * Create accessible for the element implementing nsIAccessibleProvider
     217                 :    * interface.
     218                 :    */
     219                 :   already_AddRefed<nsAccessible>
     220                 :     CreateAccessibleByType(nsIContent* aContent, nsDocAccessible* aDoc);
     221                 : 
     222                 :   /**
     223                 :    * Create accessible for HTML node by tag name.
     224                 :    */
     225                 :   already_AddRefed<nsAccessible>
     226                 :     CreateHTMLAccessibleByMarkup(nsIFrame* aFrame, nsIContent* aContent,
     227                 :                                  nsDocAccessible* aDoc);
     228                 : 
     229                 :   /**
     230                 :    * Create accessible if parent is a deck frame.
     231                 :    */
     232                 :   already_AddRefed<nsAccessible>
     233                 :     CreateAccessibleForDeckChild(nsIFrame* aFrame, nsIContent* aContent,
     234                 :                                  nsDocAccessible* aDoc);
     235                 : 
     236                 : #ifdef MOZ_XUL
     237                 :   /**
     238                 :    * Create accessible for XUL tree element.
     239                 :    */
     240                 :   already_AddRefed<nsAccessible>
     241                 :     CreateAccessibleForXULTree(nsIContent* aContent, nsDocAccessible* aDoc);
     242                 : #endif
     243                 : 
     244                 :   /**
     245                 :    * Reference for accessibility service instance.
     246                 :    */
     247                 :   static nsAccessibilityService* gAccessibilityService;
     248                 : 
     249                 :   /**
     250                 :    * Indicates whether accessibility service was shutdown.
     251                 :    */
     252                 :   static bool gIsShutdown;
     253                 : 
     254                 :   /**
     255                 :    * Does this content node have a universal ARIA property set on it?
     256                 :    * A universal ARIA property is one that can be defined on any element even if there is no role.
     257                 :    *
     258                 :    * @param aContent The content node to test
     259                 :    * @return true if there is a universal ARIA property set on the node
     260                 :    */
     261                 :   bool HasUniversalAriaProperty(nsIContent *aContent);
     262                 : 
     263                 :   friend nsAccessibilityService* GetAccService();
     264                 :   friend mozilla::a11y::FocusManager* mozilla::a11y::FocusMgr();
     265                 : 
     266                 :   friend nsresult NS_GetAccessibilityService(nsIAccessibilityService** aResult);
     267                 : };
     268                 : 
     269                 : /**
     270                 :  * Return the accessibility service instance. (Handy global function)
     271                 :  */
     272                 : inline nsAccessibilityService*
     273               0 : GetAccService()
     274                 : {
     275               0 :   return nsAccessibilityService::gAccessibilityService;
     276                 : }
     277                 : 
     278                 : /**
     279                 :  * Map nsIAccessibleRole constants to strings. Used by
     280                 :  * nsIAccessibleRetrieval::getStringRole() method.
     281                 :  */
     282                 : static const char kRoleNames[][20] = {
     283                 :   "nothing",             //ROLE_NOTHING
     284                 :   "titlebar",            //ROLE_TITLEBAR
     285                 :   "menubar",             //ROLE_MENUBAR
     286                 :   "scrollbar",           //ROLE_SCROLLBAR
     287                 :   "grip",                //ROLE_GRIP
     288                 :   "sound",               //ROLE_SOUND
     289                 :   "cursor",              //ROLE_CURSOR
     290                 :   "caret",               //ROLE_CARET
     291                 :   "alert",               //ROLE_ALERT
     292                 :   "window",              //ROLE_WINDOW
     293                 :   "internal frame",      //ROLE_INTERNAL_FRAME
     294                 :   "menupopup",           //ROLE_MENUPOPUP
     295                 :   "menuitem",            //ROLE_MENUITEM
     296                 :   "tooltip",             //ROLE_TOOLTIP
     297                 :   "application",         //ROLE_APPLICATION
     298                 :   "document",            //ROLE_DOCUMENT
     299                 :   "pane",                //ROLE_PANE
     300                 :   "chart",               //ROLE_CHART
     301                 :   "dialog",              //ROLE_DIALOG
     302                 :   "border",              //ROLE_BORDER
     303                 :   "grouping",            //ROLE_GROUPING
     304                 :   "separator",           //ROLE_SEPARATOR
     305                 :   "toolbar",             //ROLE_TOOLBAR
     306                 :   "statusbar",           //ROLE_STATUSBAR
     307                 :   "table",               //ROLE_TABLE
     308                 :   "columnheader",        //ROLE_COLUMNHEADER
     309                 :   "rowheader",           //ROLE_ROWHEADER
     310                 :   "column",              //ROLE_COLUMN
     311                 :   "row",                 //ROLE_ROW
     312                 :   "cell",                //ROLE_CELL
     313                 :   "link",                //ROLE_LINK
     314                 :   "helpballoon",         //ROLE_HELPBALLOON
     315                 :   "character",           //ROLE_CHARACTER
     316                 :   "list",                //ROLE_LIST
     317                 :   "listitem",            //ROLE_LISTITEM
     318                 :   "outline",             //ROLE_OUTLINE
     319                 :   "outlineitem",         //ROLE_OUTLINEITEM
     320                 :   "pagetab",             //ROLE_PAGETAB
     321                 :   "propertypage",        //ROLE_PROPERTYPAGE
     322                 :   "indicator",           //ROLE_INDICATOR
     323                 :   "graphic",             //ROLE_GRAPHIC
     324                 :   "statictext",          //ROLE_STATICTEXT
     325                 :   "text leaf",           //ROLE_TEXT_LEAF
     326                 :   "pushbutton",          //ROLE_PUSHBUTTON
     327                 :   "checkbutton",         //ROLE_CHECKBUTTON
     328                 :   "radiobutton",         //ROLE_RADIOBUTTON
     329                 :   "combobox",            //ROLE_COMBOBOX
     330                 :   "droplist",            //ROLE_DROPLIST
     331                 :   "progressbar",         //ROLE_PROGRESSBAR
     332                 :   "dial",                //ROLE_DIAL
     333                 :   "hotkeyfield",         //ROLE_HOTKEYFIELD
     334                 :   "slider",              //ROLE_SLIDER
     335                 :   "spinbutton",          //ROLE_SPINBUTTON
     336                 :   "diagram",             //ROLE_DIAGRAM
     337                 :   "animation",           //ROLE_ANIMATION
     338                 :   "equation",            //ROLE_EQUATION
     339                 :   "buttondropdown",      //ROLE_BUTTONDROPDOWN
     340                 :   "buttonmenu",          //ROLE_BUTTONMENU
     341                 :   "buttondropdowngrid",  //ROLE_BUTTONDROPDOWNGRID
     342                 :   "whitespace",          //ROLE_WHITESPACE
     343                 :   "pagetablist",         //ROLE_PAGETABLIST
     344                 :   "clock",               //ROLE_CLOCK
     345                 :   "splitbutton",         //ROLE_SPLITBUTTON
     346                 :   "ipaddress",           //ROLE_IPADDRESS
     347                 :   "accel label",         //ROLE_ACCEL_LABEL
     348                 :   "arrow",               //ROLE_ARROW
     349                 :   "canvas",              //ROLE_CANVAS
     350                 :   "check menu item",     //ROLE_CHECK_MENU_ITEM
     351                 :   "color chooser",       //ROLE_COLOR_CHOOSER
     352                 :   "date editor",         //ROLE_DATE_EDITOR
     353                 :   "desktop icon",        //ROLE_DESKTOP_ICON
     354                 :   "desktop frame",       //ROLE_DESKTOP_FRAME
     355                 :   "directory pane",      //ROLE_DIRECTORY_PANE
     356                 :   "file chooser",        //ROLE_FILE_CHOOSER
     357                 :   "font chooser",        //ROLE_FONT_CHOOSER
     358                 :   "chrome window",       //ROLE_CHROME_WINDOW
     359                 :   "glass pane",          //ROLE_GLASS_PANE
     360                 :   "html container",      //ROLE_HTML_CONTAINER
     361                 :   "icon",                //ROLE_ICON
     362                 :   "label",               //ROLE_LABEL
     363                 :   "layered pane",        //ROLE_LAYERED_PANE
     364                 :   "option pane",         //ROLE_OPTION_PANE
     365                 :   "password text",       //ROLE_PASSWORD_TEXT
     366                 :   "popup menu",          //ROLE_POPUP_MENU
     367                 :   "radio menu item",     //ROLE_RADIO_MENU_ITEM
     368                 :   "root pane",           //ROLE_ROOT_PANE
     369                 :   "scroll pane",         //ROLE_SCROLL_PANE
     370                 :   "split pane",          //ROLE_SPLIT_PANE
     371                 :   "table column header", //ROLE_TABLE_COLUMN_HEADER
     372                 :   "table row header",    //ROLE_TABLE_ROW_HEADER
     373                 :   "tear off menu item",  //ROLE_TEAR_OFF_MENU_ITEM
     374                 :   "terminal",            //ROLE_TERMINAL
     375                 :   "text container",      //ROLE_TEXT_CONTAINER
     376                 :   "toggle button",       //ROLE_TOGGLE_BUTTON
     377                 :   "tree table",          //ROLE_TREE_TABLE
     378                 :   "viewport",            //ROLE_VIEWPORT
     379                 :   "header",              //ROLE_HEADER
     380                 :   "footer",              //ROLE_FOOTER
     381                 :   "paragraph",           //ROLE_PARAGRAPH
     382                 :   "ruler",               //ROLE_RULER
     383                 :   "autocomplete",        //ROLE_AUTOCOMPLETE
     384                 :   "editbar",             //ROLE_EDITBAR
     385                 :   "entry",               //ROLE_ENTRY
     386                 :   "caption",             //ROLE_CAPTION
     387                 :   "document frame",      //ROLE_DOCUMENT_FRAME
     388                 :   "heading",             //ROLE_HEADING
     389                 :   "page",                //ROLE_PAGE
     390                 :   "section",             //ROLE_SECTION
     391                 :   "redundant object",    //ROLE_REDUNDANT_OBJECT
     392                 :   "form",                //ROLE_FORM
     393                 :   "ime",                 //ROLE_IME
     394                 :   "app root",            //ROLE_APP_ROOT
     395                 :   "parent menuitem",     //ROLE_PARENT_MENUITEM
     396                 :   "calendar",            //ROLE_CALENDAR
     397                 :   "combobox list",       //ROLE_COMBOBOX_LIST
     398                 :   "combobox option",     //ROLE_COMBOBOX_OPTION
     399                 :   "image map",           //ROLE_IMAGE_MAP
     400                 :   "listbox option",      //ROLE_OPTION
     401                 :   "listbox rich option", //ROLE_RICH_OPTION
     402                 :   "listbox",             //ROLE_LISTBOX
     403                 :   "flat equation",       //ROLE_FLAT_EQUATION
     404                 :   "gridcell",            //ROLE_GRID_CELL
     405                 :   "embedded object",     //ROLE_EMBEDDED_OBJECT
     406                 :   "note",                //ROLE_NOTE
     407                 :   "figure"               //ROLE_FIGURE
     408                 : };
     409                 : 
     410                 : /**
     411                 :  * Map nsIAccessibleEvents constants to strings. Used by
     412                 :  * nsIAccessibleRetrieval::getStringEventType() method.
     413                 :  */
     414                 : static const char kEventTypeNames[][40] = {
     415                 :   "unknown",                                 //
     416                 :   "show",                                    // EVENT_SHOW
     417                 :   "hide",                                    // EVENT_HIDE
     418                 :   "reorder",                                 // EVENT_REORDER
     419                 :   "active decendent change",                 // EVENT_ACTIVE_DECENDENT_CHANGED
     420                 :   "focus",                                   // EVENT_FOCUS
     421                 :   "state change",                            // EVENT_STATE_CHANGE
     422                 :   "location change",                         // EVENT_LOCATION_CHANGE
     423                 :   "name changed",                            // EVENT_NAME_CHANGE
     424                 :   "description change",                      // EVENT_DESCRIPTION_CHANGE
     425                 :   "value change",                            // EVENT_VALUE_CHANGE
     426                 :   "help change",                             // EVENT_HELP_CHANGE
     427                 :   "default action change",                   // EVENT_DEFACTION_CHANGE
     428                 :   "action change",                           // EVENT_ACTION_CHANGE
     429                 :   "accelerator change",                      // EVENT_ACCELERATOR_CHANGE
     430                 :   "selection",                               // EVENT_SELECTION
     431                 :   "selection add",                           // EVENT_SELECTION_ADD
     432                 :   "selection remove",                        // EVENT_SELECTION_REMOVE
     433                 :   "selection within",                        // EVENT_SELECTION_WITHIN
     434                 :   "alert",                                   // EVENT_ALERT
     435                 :   "foreground",                              // EVENT_FOREGROUND
     436                 :   "menu start",                              // EVENT_MENU_START
     437                 :   "menu end",                                // EVENT_MENU_END
     438                 :   "menupopup start",                         // EVENT_MENUPOPUP_START
     439                 :   "menupopup end",                           // EVENT_MENUPOPUP_END
     440                 :   "capture start",                           // EVENT_CAPTURE_START
     441                 :   "capture end",                             // EVENT_CAPTURE_END
     442                 :   "movesize start",                          // EVENT_MOVESIZE_START
     443                 :   "movesize end",                            // EVENT_MOVESIZE_END
     444                 :   "contexthelp start",                       // EVENT_CONTEXTHELP_START
     445                 :   "contexthelp end",                         // EVENT_CONTEXTHELP_END
     446                 :   "dragdrop start",                          // EVENT_DRAGDROP_START
     447                 :   "dragdrop end",                            // EVENT_DRAGDROP_END
     448                 :   "dialog start",                            // EVENT_DIALOG_START
     449                 :   "dialog end",                              // EVENT_DIALOG_END
     450                 :   "scrolling start",                         // EVENT_SCROLLING_START
     451                 :   "scrolling end",                           // EVENT_SCROLLING_END
     452                 :   "minimize start",                          // EVENT_MINIMIZE_START
     453                 :   "minimize end",                            // EVENT_MINIMIZE_END
     454                 :   "document load complete",                  // EVENT_DOCUMENT_LOAD_COMPLETE
     455                 :   "document reload",                         // EVENT_DOCUMENT_RELOAD
     456                 :   "document load stopped",                   // EVENT_DOCUMENT_LOAD_STOPPED
     457                 :   "document attributes changed",             // EVENT_DOCUMENT_ATTRIBUTES_CHANGED
     458                 :   "document content changed",                // EVENT_DOCUMENT_CONTENT_CHANGED
     459                 :   "property changed",                        // EVENT_PROPERTY_CHANGED
     460                 :   "page changed",                           // EVENT_PAGE_CHANGED
     461                 :   "text attribute changed",                  // EVENT_TEXT_ATTRIBUTE_CHANGED
     462                 :   "text caret moved",                        // EVENT_TEXT_CARET_MOVED
     463                 :   "text changed",                            // EVENT_TEXT_CHANGED
     464                 :   "text inserted",                           // EVENT_TEXT_INSERTED
     465                 :   "text removed",                            // EVENT_TEXT_REMOVED
     466                 :   "text updated",                            // EVENT_TEXT_UPDATED
     467                 :   "text selection changed",                  // EVENT_TEXT_SELECTION_CHANGED
     468                 :   "visible data changed",                    // EVENT_VISIBLE_DATA_CHANGED
     469                 :   "text column changed",                     // EVENT_TEXT_COLUMN_CHANGED
     470                 :   "section changed",                         // EVENT_SECTION_CHANGED
     471                 :   "table caption changed",                   // EVENT_TABLE_CAPTION_CHANGED
     472                 :   "table model changed",                     // EVENT_TABLE_MODEL_CHANGED
     473                 :   "table summary changed",                   // EVENT_TABLE_SUMMARY_CHANGED
     474                 :   "table row description changed",           // EVENT_TABLE_ROW_DESCRIPTION_CHANGED
     475                 :   "table row header changed",                // EVENT_TABLE_ROW_HEADER_CHANGED
     476                 :   "table row insert",                        // EVENT_TABLE_ROW_INSERT
     477                 :   "table row delete",                        // EVENT_TABLE_ROW_DELETE
     478                 :   "table row reorder",                       // EVENT_TABLE_ROW_REORDER
     479                 :   "table column description changed",        // EVENT_TABLE_COLUMN_DESCRIPTION_CHANGED
     480                 :   "table column header changed",             // EVENT_TABLE_COLUMN_HEADER_CHANGED
     481                 :   "table column insert",                     // EVENT_TABLE_COLUMN_INSERT
     482                 :   "table column delete",                     // EVENT_TABLE_COLUMN_DELETE
     483                 :   "table column reorder",                    // EVENT_TABLE_COLUMN_REORDER
     484                 :   "window activate",                         // EVENT_WINDOW_ACTIVATE
     485                 :   "window create",                           // EVENT_WINDOW_CREATE
     486                 :   "window deactivate",                       // EVENT_WINDOW_DEACTIVATE
     487                 :   "window destroy",                          // EVENT_WINDOW_DESTROY
     488                 :   "window maximize",                         // EVENT_WINDOW_MAXIMIZE
     489                 :   "window minimize",                         // EVENT_WINDOW_MINIMIZE
     490                 :   "window resize",                           // EVENT_WINDOW_RESIZE
     491                 :   "window restore",                          // EVENT_WINDOW_RESTORE
     492                 :   "hyperlink end index changed",             // EVENT_HYPERLINK_END_INDEX_CHANGED
     493                 :   "hyperlink number of anchors changed",     // EVENT_HYPERLINK_NUMBER_OF_ANCHORS_CHANGED
     494                 :   "hyperlink selected link changed",         // EVENT_HYPERLINK_SELECTED_LINK_CHANGED
     495                 :   "hypertext link activated",                // EVENT_HYPERTEXT_LINK_ACTIVATED
     496                 :   "hypertext link selected",                 // EVENT_HYPERTEXT_LINK_SELECTED
     497                 :   "hyperlink start index changed",           // EVENT_HYPERLINK_START_INDEX_CHANGED
     498                 :   "hypertext changed",                       // EVENT_HYPERTEXT_CHANGED
     499                 :   "hypertext links count changed",           // EVENT_HYPERTEXT_NLINKS_CHANGED
     500                 :   "object attribute changed",                // EVENT_OBJECT_ATTRIBUTE_CHANGED
     501                 :   "virtual cursor changed"                   // EVENT_VIRTUALCURSOR_CHANGED
     502                 : };
     503                 : 
     504                 : /**
     505                 :  * Map nsIAccessibleRelation constants to strings. Used by
     506                 :  * nsIAccessibleRetrieval::getStringRelationType() method.
     507                 :  */
     508                 : static const char kRelationTypeNames[][20] = {
     509                 :   "unknown",             // RELATION_NUL
     510                 :   "controlled by",       // RELATION_CONTROLLED_BY
     511                 :   "controller for",      // RELATION_CONTROLLER_FOR
     512                 :   "label for",           // RELATION_LABEL_FOR
     513                 :   "labelled by",         // RELATION_LABELLED_BY
     514                 :   "member of",           // RELATION_MEMBER_OF
     515                 :   "node child of",       // RELATION_NODE_CHILD_OF
     516                 :   "flows to",            // RELATION_FLOWS_TO
     517                 :   "flows from",          // RELATION_FLOWS_FROM
     518                 :   "subwindow of",        // RELATION_SUBWINDOW_OF
     519                 :   "embeds",              // RELATION_EMBEDS
     520                 :   "embedded by",         // RELATION_EMBEDDED_BY
     521                 :   "popup for",           // RELATION_POPUP_FOR
     522                 :   "parent window of",    // RELATION_PARENT_WINDOW_OF
     523                 :   "described by",        // RELATION_DESCRIBED_BY
     524                 :   "description for",     // RELATION_DESCRIPTION_FOR
     525                 :   "default button"       // RELATION_DEFAULT_BUTTON
     526                 : };
     527                 : 
     528                 : #endif /* __nsIAccessibilityService_h__ */
     529                 : 

Generated by: LCOV version 1.7