1 | /* |
2 | * Copyright (C) 2008 Nuanti Ltd. |
3 | * Copyright (C) 2009 Jan Alonzo |
4 | * Copyright (C) 2009, 2010, 2011, 2012, 2019 Igalia S.L. |
5 | * Copyright (C) 2013 Samsung Electronics |
6 | * |
7 | * This library is free software; you can redistribute it and/or |
8 | * modify it under the terms of the GNU Library General Public |
9 | * License as published by the Free Software Foundation; either |
10 | * version 2 of the License, or (at your option) any later version. |
11 | * |
12 | * This library is distributed in the hope that it will be useful, |
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
15 | * Library General Public License for more details. |
16 | * |
17 | * You should have received a copy of the GNU Library General Public License |
18 | * along with this library; see the file COPYING.LIB. If not, write to |
19 | * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
20 | * Boston, MA 02110-1301, USA. |
21 | */ |
22 | |
23 | #pragma once |
24 | |
25 | #if HAVE(ACCESSIBILITY) |
26 | |
27 | #include <atk/atk.h> |
28 | #include <wtf/text/WTFString.h> |
29 | |
30 | namespace WebCore { |
31 | class AccessibilityObject; |
32 | } |
33 | |
34 | G_BEGIN_DECLS |
35 | |
36 | #define WEBKIT_TYPE_ACCESSIBLE (webkit_accessible_get_type()) |
37 | #define WEBKIT_ACCESSIBLE(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), WEBKIT_TYPE_ACCESSIBLE, WebKitAccessible)) |
38 | #define WEBKIT_ACCESSIBLE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), WEBKIT_TYPE_ACCESSIBLE, WebKitAccessibleClass)) |
39 | #define WEBKIT_IS_ACCESSIBLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), WEBKIT_TYPE_ACCESSIBLE)) |
40 | #define WEBKIT_IS_ACCESSIBLE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), WEBKIT_TYPE_ACCESSIBLE)) |
41 | #define WEBKIT_ACCESSIBLE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), WEBKIT_TYPE_ACCESSIBLE, WebKitAccessibleClass)) |
42 | |
43 | typedef struct _WebKitAccessible WebKitAccessible; |
44 | typedef struct _WebKitAccessibleClass WebKitAccessibleClass; |
45 | typedef struct _WebKitAccessiblePrivate WebKitAccessiblePrivate; |
46 | |
47 | |
48 | struct _WebKitAccessible { |
49 | AtkObject parent; |
50 | |
51 | WebKitAccessiblePrivate *priv; |
52 | }; |
53 | |
54 | struct _WebKitAccessibleClass { |
55 | AtkObjectClass parentClass; |
56 | }; |
57 | |
58 | enum AtkCachedProperty { |
59 | AtkCachedAccessibleName, |
60 | AtkCachedAccessibleDescription, |
61 | AtkCachedActionName, |
62 | AtkCachedActionKeyBinding, |
63 | AtkCachedDocumentLocale, |
64 | AtkCachedDocumentType, |
65 | AtkCachedDocumentEncoding, |
66 | AtkCachedDocumentURI, |
67 | AtkCachedImageDescription |
68 | }; |
69 | |
70 | GType webkit_accessible_get_type(void); |
71 | |
72 | WebKitAccessible* webkitAccessibleNew(WebCore::AccessibilityObject*); |
73 | |
74 | WebCore::AccessibilityObject& webkitAccessibleGetAccessibilityObject(WebKitAccessible*); |
75 | |
76 | void webkitAccessibleDetach(WebKitAccessible*); |
77 | |
78 | bool webkitAccessibleIsDetached(WebKitAccessible*); |
79 | |
80 | const char* webkitAccessibleCacheAndReturnAtkProperty(WebKitAccessible*, AtkCachedProperty, CString&&); |
81 | |
82 | G_END_DECLS |
83 | |
84 | #endif // HAVE(ACCESSIBILITY) |
85 | |