Back to index

lightning-sunbird  0.9+nobinonly
Functions | Variables
nsDocAccessibleWrap.cpp File Reference
#include "nsMai.h"
#include "nsDocAccessibleWrap.h"
#include "nsAccessibleEventData.h"
#include <atk/atk.h>
#include <glib.h>
#include <glib-object.h>

Go to the source code of this file.

Functions

static AtkStateType TranslateAState (PRUint32 aState, PRUint32 aExtState)

Variables

static char * sAtkPropertyNameArray [PROP_LAST]

Function Documentation

AtkStateType TranslateAState ( PRUint32  aState,
PRUint32  aExtState 
) [static]

Definition at line 446 of file nsDocAccessibleWrap.cpp.

{
    switch (aState) {
    case nsIAccessible::STATE_SELECTED:
        return ATK_STATE_SELECTED;
    case nsIAccessible::STATE_FOCUSED:
        return ATK_STATE_FOCUSED;
    case nsIAccessible::STATE_PRESSED:
        return ATK_STATE_PRESSED;
    case nsIAccessible::STATE_CHECKED:
        return ATK_STATE_CHECKED;
    case nsIAccessible::STATE_EXPANDED:
        return ATK_STATE_EXPANDED;
    case nsIAccessible::STATE_COLLAPSED:
        return ATK_STATE_EXPANDABLE;
        // The control can't accept input at this time
    case nsIAccessible::STATE_BUSY:
        return ATK_STATE_BUSY;
    case nsIAccessible::STATE_FOCUSABLE:
        return ATK_STATE_FOCUSABLE;
    case nsIAccessible::STATE_SELECTABLE:
        return ATK_STATE_SELECTABLE;
    case nsIAccessible::STATE_SIZEABLE:
        return ATK_STATE_RESIZABLE;
    case nsIAccessible::STATE_MULTISELECTABLE:
        return ATK_STATE_MULTISELECTABLE;

#if 0
        // The following states are opposite the MSAA states.
        // We need to deal with them specially
    case nsIAccessible::STATE_INVISIBLE:
        return !ATK_STATE_VISIBLE;

    case nsIAccessible::STATE_UNAVAILABLE:
        return !ATK_STATE_ENABLED;

    case nsIAccessible::STATE_READONLY:
        return !ATK_STATE_EDITABLE;
#endif
    }

    // The following state is
    // Extended state flags (for non-MSAA, for Java and Gnome/ATK support)
    switch (aExtState) {
    case nsIAccessible::EXT_STATE_ACTIVE:
        return ATK_STATE_ACTIVE;
    case nsIAccessible::EXT_STATE_EXPANDABLE:
        return ATK_STATE_EXPANDABLE;
#if 0
        // Need change definitions in nsIAccessible.idl to avoid
        // duplicate value
    case nsIAccessible::EXT_STATE_MODAL:
        return ATK_STATE_MODAL;
#endif
    case nsIAccessible::EXT_STATE_MULTI_LINE:
        return ATK_STATE_MULTI_LINE;
    case nsIAccessible::EXT_STATE_SENSITIVE:
        return ATK_STATE_SENSITIVE;
    case nsIAccessible::EXT_STATE_SHOWING:
        return ATK_STATE_SHOWING;
    case nsIAccessible::EXT_STATE_SINGLE_LINE:
        return ATK_STATE_SINGLE_LINE;
    case nsIAccessible::EXT_STATE_TRANSIENT:
        return ATK_STATE_TRANSIENT;
    case nsIAccessible::EXT_STATE_VERTICAL:
        return ATK_STATE_VERTICAL;
    }
    return ATK_STATE_INVALID;
}

Here is the caller graph for this function:


Variable Documentation

Initial value:
 {
    0,
    "accessible_name",
    "accessible_description",
    "accessible_parent",
    "accessible_value",
    "accessible_role",
    "accessible_layer",
    "accessible_mdi_zorder",
    "accessible_table_caption",
    "accessible_table_column_description",
    "accessible_table_column_header",
    "accessible_table_row_description",
    "accessible_table_row_header",
    "accessible_table_summary"
}

Definition at line 56 of file nsDocAccessibleWrap.cpp.