<commit_before>/*
    Copyright 2012 <NAME> <<EMAIL>>

    This library is free software; you can redistribute it and/or
    modify it under the terms of the GNU Lesser General Public
    License as published by the Free Software Foundation; either
    version 2.1 of the License, or (at your option) version 3, or any
    later version accepted by the membership of KDE e.V. (or its
    successor approved by the membership of KDE e.V.), which shall
    act as a proxy defined in Section 6 of version 3 of the license.

    This library is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    Lesser General Public License for more details.

    You should have received a copy of the GNU Lesser General Public
    License along with this library.  If not, see <http://www.gnu.org/licenses/>.
*/

#ifndef QACCESSIBILITYCLIENT_ACCESSIBLEOBJECT_H
#define QACCESSIBILITYCLIENT_ACCESSIBLEOBJECT_H

#include <QtGlobal>

namespace QAccessibleClient {
    class AccessibleObject;
}

uint qHash(const QAccessibleClient::AccessibleObject& object);

#include <qlist.h>
#include <QSharedPointer>
#include <qaction.h>

#include "qaccessibilityclient_export.h"

namespace QAccessibleClient {

class AccessibleObjectPrivate;
class RegistryPrivate;

/**
    This class represents an accessible object.

    An accessible object equals usually a visible widget or some kind
    of other element the user can interact with but can also present
    a not visible object that offers certain functionality like for
    example actions which can be triggered.

    It is implicitly shared and only created by the library.
*/
class QACCESSIBILITYCLIENT_EXPORT AccessibleObject
{
public:

    enum Interface {
        NoInterface = 0x0,
        CacheInterface = 0x1,
        AccessibleInterface = 0x2,
        ActionInterface = 0x4,
        ApplicationInterface = 0x8,
        CollectionInterface = 0x10,
        ComponentInterface = 0x20,
        DocumentInterface = 0x40,
        EditableTextInterface = 0x80,
        EventKeyboardInterface = 0x100,
        EventMouseInterface = 0x200,
        EventObjectInterface = 0x400,
        HyperlinkInterface = 0x800,
        HypertextInterface = 0x1000,
        ImageInterface = 0x2000,
        SelectionInterface = 0x4000,
        TableInterface = 0x8000,
        TextInterface = 0x10000,
        ValueInterface = 0x20000,
        SocketInterface = 0x40000,
        EventWindowInterface = 0x80000,
        EventFocusInterface = 0x100000
    };
    Q_DECLARE_FLAGS(Interfaces, Interface)

    enum Role {
        NoRole, /*!< The object is invalid and has no role set. This is generally a bug. */
        CheckBox,
        CheckableMenuItem,
        ColumnHeader,
        ComboBox,
        DesktopFrame,
        Dial,
        Dialog,
        Filler,
        Frame,
        Icon,
        Label,
        ListView,
        ListItem,
        Menu,
        MenuBar,
        MenuItem,
        Tab,
        TabContainer,
        PasswordText,
        PopupMenu,
        ProgressBar,
        Button,
        RadioButton,
        RadioMenuItem,
        RowHeader,
        ScrollBar,
        ScrollArea,
        Separator,
        Slider,
        SpinButton,
        StatusBar,
        TableView,
        TableCell,
        TableColumnHeader,
        TableColumn,
        TableRowHeader,
        TableRow,
        Terminal,
        Text,
        ToggleButton,
        ToolBar,
        ToolTip,
        TreeView,
        Window ,
        TableRow,
        TreeItem
// Roles in Qt, I don't think we want those
//    TitleBar       = 0x00000001,
//    Grip           = 0x00000004,
//    Sound          = 0x00000005,
//    Cursor         = 0x00000006,
//    Caret          = 0x00000007,
//    AlertMessage   = 0x00000008,
//    Client         = 0x0000000A,
//    Application    = 0x0000000E,
//    Document       = 0x0000000F,
//    Pane           = 0x00000010,
//    Chart          = 0x00000011,
//    Border         = 0x00000013,
//    Grouping       = 0x00000014,
//    Cell           = 0x0000001D,
//    Link           = 0x0000001E,
//    HelpBalloon    = 0x0000001F,
//    Assistant      = 0x00000020,
//    PageTab        = 0x00000025,
//    PropertyPage   = 0x00000026,
//    Indicator      = 0x00000027,
//    Graphic        = 0x00000028,
//    StaticText     = 0x00000029,
//    EditableText   = 0x0000002A,  // Editable, selectable, etc.
//    HotkeyField    = 0x00000032,<commit_msg>Do not duplicate enum values.<commit_after>/*
    Copyright 2012 <NAME> <<EMAIL>>

    This library is free software; you can redistribute it and/or
    modify it under the terms of the GNU Lesser General Public
    License as published by the Free Software Foundation; either
    version 2.1 of the License, or (at your option) version 3, or any
    later version accepted by the membership of KDE e.V. (or its
    successor approved by the membership of KDE e.V.), which shall
    act as a proxy defined in Section 6 of version 3 of the license.

    This library is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    Lesser General Public License for more details.

    You should have received a copy of the GNU Lesser General Public
    License along with this library.  If not, see <http://www.gnu.org/licenses/>.
*/

#ifndef QACCESSIBILITYCLIENT_ACCESSIBLEOBJECT_H
#define QACCESSIBILITYCLIENT_ACCESSIBLEOBJECT_H

#include <QtGlobal>

namespace QAccessibleClient {
    class AccessibleObject;
}

uint qHash(const QAccessibleClient::AccessibleObject& object);

#include <qlist.h>
#include <QSharedPointer>
#include <qaction.h>

#include "qaccessibilityclient_export.h"

namespace QAccessibleClient {

class AccessibleObjectPrivate;
class RegistryPrivate;

/**
    This class represents an accessible object.

    An accessible object equals usually a visible widget or some kind
    of other element the user can interact with but can also present
    a not visible object that offers certain functionality like for
    example actions which can be triggered.

    It is implicitly shared and only created by the library.
*/
class QACCESSIBILITYCLIENT_EXPORT AccessibleObject
{
public:

    enum Interface {
        NoInterface = 0x0,
        CacheInterface = 0x1,
        AccessibleInterface = 0x2,
        ActionInterface = 0x4,
        ApplicationInterface = 0x8,
        CollectionInterface = 0x10,
        ComponentInterface = 0x20,
        DocumentInterface = 0x40,
        EditableTextInterface = 0x80,
        EventKeyboardInterface = 0x100,
        EventMouseInterface = 0x200,
        EventObjectInterface = 0x400,
        HyperlinkInterface = 0x800,
        HypertextInterface = 0x1000,
        ImageInterface = 0x2000,
        SelectionInterface = 0x4000,
        TableInterface = 0x8000,
        TextInterface = 0x10000,
        ValueInterface = 0x20000,
        SocketInterface = 0x40000,
        EventWindowInterface = 0x80000,
        EventFocusInterface = 0x100000
    };
    Q_DECLARE_FLAGS(Interfaces, Interface)

    enum Role {
        NoRole, /*!< The object is invalid and has no role set. This is generally a bug. */
        CheckBox,
        CheckableMenuItem,
        ColumnHeader,
        ComboBox,
        DesktopFrame,
        Dial,
        Dialog,
        Filler,
        Frame,
        Icon,
        Label,
        ListView,
        ListItem,
        Menu,
        MenuBar,
        MenuItem,
        Tab,
        TabContainer,
        PasswordText,
        PopupMenu,
        ProgressBar,
        Button,
        RadioButton,
        RadioMenuItem,
        RowHeader,
        ScrollBar,
        ScrollArea,
        Separator,
        Slider,
        SpinButton,
        StatusBar,
        TableView,
        TableCell,
        TableColumnHeader,
        TableColumn,
        TableRowHeader,
        TableRow,
        Terminal,
        Text,
        ToggleButton,
        ToolBar,
        ToolTip,
        TreeView,
        Window,
        TreeItem
// Roles in Qt, I don't think we want those
//    TitleBar       = 0x00000001,
//    Grip           = 0x00000004,
//    Sound          = 0x00000005,
//    Cursor         = 0x00000006,
//    Caret          = 0x00000007,
//    AlertMessage   = 0x00000008,
//    Client         = 0x0000000A,
//    Application    = 0x0000000E,
//    Document       = 0x0000000F,
//    Pane           = 0x00000010,
//    Chart          = 0x00000011,
//    Border         = 0x00000013,
//    Grouping       = 0x00000014,
//    Cell           = 0x0000001D,
//    Link           = 0x0000001E,
//    HelpBalloon    = 0x0000001F,
//    Assistant      = 0x00000020,
//    PageTab        = 0x00000025,
//    PropertyPage   = 0x00000026,
//    Indicator      = 0x00000027,
//    Graphic        = 0x00000028,
//    StaticText     = 0x00000029,
//    EditableText   = 0x0000002A,  // Editable, selectable, etc.
//    HotkeyField    = 0x00000032,
{'fraction_non_alphanumeric': 0.06521978627299768, 'fraction_numerical': 0.06764349454665639, 'mean_word_length': 2.104651162790698, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 19, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 18, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1550785', 'n_tokens_mistral': 3024, 'n_tokens_neox': 2483, 'n_words': 804}