/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
 * This file is part of the LibreOffice project.
 *
 * This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
 *
 * This file incorporates work covered by the following license notice:
 *
 *   Licensed to the Apache Software Foundation (ASF) under one or more
 *   contributor license agreements. See the NOTICE file distributed
 *   with this work for additional information regarding copyright
 *   ownership. The ASF licenses this file to you under the Apache
 *   License, Version 2.0 (the "License"); you may not use this file
 *   except in compliance with the License. You may obtain a copy of
 *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
 */

module com { module sun { module star { module accessibility {

/** Collection of state types.

    <p>This list of constants defines the available set of states that an
    object that implements XAccessibleContext can be in.</p>

    <p>The comments describing the states is taken verbatim from the Java
    Accessibility API 1.4 documentation.</p>

    <p>We are using constants instead of a more typesafe enum.  The reason
    for this is that IDL enums may not be extended.  Therefore, in order to
    include future extensions to the set of roles we have to use constants
    here.</p>

    <p>These states are giving values corresponding to the bits of a 64-bit
    value, since we OR them together to create bitsets to represent the
    combined state of an accessibility object .</p>

    @since OOo 1.1.2
*/
constants AccessibleStateType
{
    /** Indicates an invalid state.
    */
    const hyper INVALID = 0;

    /** Indicates a window is currently the active window.
    */
    const hyper ACTIVE = 1;

    /** Indicates that the object is armed.
    */
    const hyper ARMED = 2;

    /** Indicates the current object is busy.
    */
    const hyper BUSY = 4;

    /** Indicates this object is currently checked.
    */
    const hyper CHECKED = 8;

    /** User interface object corresponding to this object no longer exists.

        <p>Indicates the user interface object corresponding to this object
        no longer exists.</p>
    */
    const hyper DEFUNC = 16;

    /** Indicates the user can change the contents of this object.
    */
    const hyper EDITABLE = 32;

    /** Indicates this object is enabled.
    */
    const hyper ENABLED = 64;

    /** Indicates this object allows progressive disclosure of its children.
    */
    const hyper EXPANDABLE = 128;

    /** Indicates this object is expanded.
    */
    const hyper EXPANDED = 256;

    /** Object can accept the keyboard focus.

        <p>Indicates this object can accept keyboard focus, which means all
        events resulting from typing on the keyboard will normally be passed
        to it when it has focus.</p>
    */
    const hyper FOCUSABLE = 512;

    /** Indicates this object currently has the keyboard focus.
    */
    const hyper FOCUSED = 1024;

    /** Indicates the orientation of this object is horizontal.
    */
    const hyper HORIZONTAL = 2048;

    /** Indicates this object is minimized and is represented only by an
        icon.
    */
    const hyper ICONIFIED = 4096;

    /** Sometimes UI elements can have a state indeterminate.
        This can happen e.g. if a check box reflects the bold state of text in a text processor.
        When the current selection contains text which is bold and also text which is not bold, the state is indeterminate.

    */
    const hyper INDETERMINATE = 8192;

    /** Indicates the most (all) children are transient and it is not
        necessary to add listener to the children. Only the active descendant
        (given by the event) should be not transient to make it possible
        to add listener to this object and recognize changes in this object.

        The state is added to make a performance improvement. Now it is no
        longer necessary to iterate over all children to find out whether
        they are transient or not to decide whether to add listener or not.
        If there is an object with this state no one should iterate over the
        children to add listener. Only the active descendant should get
        listener if it is not transient.
    */
    const hyper MANAGES_DESCENDANTS = 16384;

    /** Object is modal.

        <p>Indicates something must be done with this object before the user
        can interact with an object in a different window.</p>
    */
    const hyper MODAL = 32768;

    /** Indicates this (text) object can contain multiple lines of text
    */
    const hyper MULTI_LINE = 65536;

    /** More than one child may be selected at the same time.

        <p>Indicates this object allows more than one of its children to be
        selected at the same time.</p>
    */
    const hyper MULTI_SELECTABLE = 131072;

    /** Indicates this object paints every pixel within its rectangular
        region.
    */
    const hyper OPAQUE = 262144;

    /** Indicates this object is currently pressed.
    */
    const hyper PRESSED = 524288;

    /** Indicates the size of this object is not fixed.
    */
    const hyper RESIZABLE = 1048576;

    /** Object is selectable.

        <p>Indicates this object is the child of an object that allows its
        children to be selected, and that this child is one of those
        children that can be selected.</p>
    */
    const hyper SELECTABLE = 2097152;

    /** Object is selected.

        <p>Indicates this object is the child of an object that allows its
        children to be selected, and that this child is one of those
        children that has been selected.</p>
    */
    const hyper SELECTED = 4194304;

    /** Indicates this object is sensitive.
    */
    const hyper SENSITIVE = 8388608;

    /** Object is displayed on the screen.

        <p>An object has set the SHOWING state if itself and
        all of its parents have set the VISIBLE state and it
        lies at least partly inside the visible area of its parent.  It is,
        though, not necessarily visible on the screen because it may be
        occluded by other objects.</p>
    */
    const hyper SHOWING = 16777216;

    /** Indicates this (text) object can contain only a single line of text
    */
    const hyper SINGLE_LINE = 33554432;

    /** Object information is stale and might not be up to date

        <p>Indicates that the information that is returned from this object
        might be out of sync with the application.</p>
    */
    const hyper STALE = 67108864;

    /** Indicates this object is transient.
    */
    const hyper TRANSIENT= 134217728;

    /** Indicates the orientation of this object is vertical.
    */
    const hyper VERTICAL = 268435456;

    /** Object wants to be displayed on the screen.

        <p>A set VISIBLE state indicates that an object wants
        to be displayed on the screen.  It is displayed, as indicated by a
        set SHOWING state, if all of its parents have also
        set the VISIBLE state and the object lies at least
        partly in the visible area of its parent.</p>
    */
    const hyper VISIBLE = 536870912;

    // The following constants have been introduced with the IA2 CWS:

    // MOVEABLE only exists in MSAA/IA2, but not in ATK/JAA/NSAccessibility.
    /** Indicates the position of the object is not fixed.
    */
    const hyper MOVEABLE = 1073741824;

    // DEFAULT exists in MSAA/IA2, and now also in ATK and NSAccessibility.
    /** Indicates the object is the default button in a window
    */
    const hyper DEFAULT = 2147483648;

    // OFFSCREEN only exists in MSAA/IA2, but not in ATK/JAA/NSAccessibility.
    // MT: Shouldn't this be the same like !SHOWING in UAA/ATK?
    /** Indicates the object is outside of the screen area
    */
    const hyper OFFSCREEN = 4294967296;

    // COLLAPSED exists in MSAA/IA2, and now also in JAA, but not in ATK/NSAccessibility. In NSAccessibility, there is a notification for collapse.
    // In opposite to MSAA, UAA has EXPANDABLE, so EXPANDABLE && !EXPANDED should be the same like COLLAPSED.
    /** Indicates that the object is collapsed
    */
    const hyper COLLAPSE = 8589934592;

    /** Indicates this object is checkable, i.e. it has the potential
        to be checked.
        See also the CHECKED state.
    */
    const hyper CHECKABLE = 17179869184;

};

}; }; }; };

/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
