Github User Fetcher 1.0.0
C Application with Server and GUI
Loading...
Searching...
No Matches
gtkaccessible.h
Go to the documentation of this file.
1/* gtkaccessible.h: Accessible interface
2 *
3 * Copyright 2020 GNOME Foundation
4 *
5 * SPDX-License-Identifier: LGPL-2.1-or-later
6 *
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either
10 * version 2.1 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 * Lesser General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public
18 * License along with this library; if not, see <http://www.gnu.org/licenses/>.
19 */
20
21#pragma once
22
23#if !defined (__GTK_H_INSIDE__) && !defined (GTK_COMPILATION)
24#error "Only <gtk/gtk.h> can be included directly."
25#endif
26
27#include <glib-object.h>
28#include <gtk/gtktypes.h>
29#include <gtk/gtkenums.h>
30
32
33#define GTK_TYPE_ACCESSIBLE (gtk_accessible_get_type())
34
36G_DECLARE_INTERFACE (GtkAccessible, gtk_accessible, GTK, ACCESSIBLE, GObject)
37
38/**
39 * GtkAccessiblePlatformState:
40 * @GTK_ACCESSIBLE_PLATFORM_STATE_FOCUSABLE: whether the accessible can be focused
41 * @GTK_ACCESSIBLE_PLATFORM_STATE_FOCUSED: whether the accessible has focus
42 * @GTK_ACCESSIBLE_PLATFORM_STATE_ACTIVE: whether the accessible is active
43 *
44 * The various platform states which can be queried
45 * using [method@Gtk.Accessible.get_platform_state].
46 *
47 * Since: 4.10
48 */
54
55/**
56 * GtkAccessibleInterface:
57 * @get_at_context: retrieve the platform-specific accessibility context
58 * for the accessible implementation
59 * @get_platform_state: retrieve the accessible state
60 *
61 * The common interface for accessible objects.
62 *
63 * Since: 4.10
64 */
66{
68
69 /**
70 * GtkAccessibleInterface::get_at_context:
71 * @self: an accessible object
72 *
73 * Retrieves the platform-specific accessibility context for the
74 * accessible implementation.
75 *
76 * Returns: (transfer full) (nullable): the accessibility context
77 *
78 * Since: 4.10
79 */
80 GtkATContext * (* get_at_context) (GtkAccessible *self);
81
82 /**
83 * GtkAccessibleInterface::get_platform_state:
84 * @self: an accessible object
85 * @state: the state to query
86 *
87 * Checks if the given @state applies to the accessible object.
88 *
89 * Returns: true if the @state is set, and false otherwise
90 *
91 * Since: 4.10
92 */
93 gboolean (* get_platform_state) (GtkAccessible *self,
95
96 /**
97 * GtkAccessibleInterface::get_accessible_parent:
98 * @self: an accessible object
99 *
100 * Retrieves the accessible parent of an accessible object.
101 *
102 * This virtual function should return `NULL` for top level objects.
103 *
104 * Returns: (nullable) (transfer full): the accessible parent
105 *
106 * Since: 4.10
107 */
108 GtkAccessible * (* get_accessible_parent) (GtkAccessible *self);
109
110 /**
111 * GtkaccessibleInterface::get_first_accessible_child:
112 * @self: an accessible object
113 *
114 * Retrieves the first accessible child of an accessible object.
115 *
116 * Returns: (transfer full) (nullable): an accessible object
117 *
118 * Since: 4.10
119 */
120 GtkAccessible * (* get_first_accessible_child) (GtkAccessible *self);
121
122 /**
123 * GtkaccessibleInterface::get_next_accessible_sibling:
124 * @self: an accessible object
125 *
126 * Retrieves the next accessible sibling of an accessible object.
127 *
128 * Returns: (transfer full) (nullable): an accessible object
129 *
130 * Since: 4.10
131 */
132 GtkAccessible * (* get_next_accessible_sibling) (GtkAccessible *self);
133
134 /**
135 * GtkAccessibleInterface::get_bounds:
136 * @self: an accessible object
137 * @x: (out): the horizontal coordinate of a rectangle
138 * @y: (out): the vertical coordinate of a rectangle
139 * @width: (out): the width of a rectangle
140 * @height: (out): the height of a rectangle
141 *
142 * Retrieves the dimensions and position of an accessible object in its
143 * parent's coordinate space, if those values can be determined.
144 *
145 * For top level accessible objects, the X and Y coordinates are always
146 * going to be set to zero.
147 *
148 * Returns: true if the values are value, and false otherwise
149 */
150 gboolean (* get_bounds) (GtkAccessible *self,
151 int *x,
152 int *y,
153 int *width,
154 int *height);
155};
156
157/**
158 * GtkAccessibleList:
159 *
160 * A boxed type which wraps a list of references to GtkAccessible objects.
161 *
162 * Since: 4.14
163 */
164typedef struct _GtkAccessibleList GtkAccessibleList;
165
168
172
174GtkAccessible * gtk_accessible_get_accessible_parent (GtkAccessible *self);
175
177void gtk_accessible_set_accessible_parent (GtkAccessible *self,
178 GtkAccessible *parent,
179 GtkAccessible *next_sibling);
180
182GtkAccessible * gtk_accessible_get_first_accessible_child (GtkAccessible *self);
183
185GtkAccessible * gtk_accessible_get_next_accessible_sibling (GtkAccessible *self);
188 GtkAccessible *new_sibling);
189
190
193 int *x,
194 int *y,
195 int *width,
196 int *height);
197
200
202void gtk_accessible_update_state (GtkAccessible *self,
203 GtkAccessibleState first_state,
204 ...);
206void gtk_accessible_update_property (GtkAccessible *self,
207 GtkAccessibleProperty first_property,
208 ...);
210void gtk_accessible_update_relation (GtkAccessible *self,
211 GtkAccessibleRelation first_relation,
212 ...);
214void gtk_accessible_update_state_value (GtkAccessible *self,
215 int n_states,
216 GtkAccessibleState states[],
217 const GValue values[]);
219void gtk_accessible_update_property_value (GtkAccessible *self,
220 int n_properties,
221 GtkAccessibleProperty properties[],
222 const GValue values[]);
224void gtk_accessible_update_relation_value (GtkAccessible *self,
225 int n_relations,
226 GtkAccessibleRelation relations[],
227 const GValue values[]);
229void gtk_accessible_reset_state (GtkAccessible *self,
230 GtkAccessibleState state);
232void gtk_accessible_reset_property (GtkAccessible *self,
233 GtkAccessibleProperty property);
235void gtk_accessible_reset_relation (GtkAccessible *self,
236 GtkAccessibleRelation relation);
237
240 GValue *value);
243 GValue *value);
246 GValue *value);
247
248#define GTK_ACCESSIBLE_LIST (gtk_accessible_list_get_type())
249
252
255
258
261 gsize n_accessibles);
262
264void gtk_accessible_announce (GtkAccessible *self,
265 const char *message,
267
#define GDK_AVAILABLE_IN_4_10
#define GDK_AVAILABLE_IN_4_14
#define GDK_AVAILABLE_IN_ALL
unsigned long gsize
Definition glibconfig.h:83
typedefG_BEGIN_DECLS struct _GList GList
Definition glist.h:39
#define G_END_DECLS
Definition gmacros.h:910
#define G_BEGIN_DECLS
Definition gmacros.h:909
GDK_AVAILABLE_IN_ALL void gtk_accessible_update_state(GtkAccessible *self, GtkAccessibleState first_state,...)
GDK_AVAILABLE_IN_ALL void gtk_accessible_update_relation(GtkAccessible *self, GtkAccessibleRelation first_relation,...)
GDK_AVAILABLE_IN_4_14 void gtk_accessible_announce(GtkAccessible *self, const char *message, GtkAccessibleAnnouncementPriority priority)
GDK_AVAILABLE_IN_ALL void gtk_accessible_update_property_value(GtkAccessible *self, int n_properties, GtkAccessibleProperty properties[], const GValue values[])
GDK_AVAILABLE_IN_4_10 gboolean gtk_accessible_get_bounds(GtkAccessible *self, int *x, int *y, int *width, int *height)
GDK_AVAILABLE_IN_ALL void gtk_accessible_property_init_value(GtkAccessibleProperty property, GValue *value)
GDK_AVAILABLE_IN_4_10 void gtk_accessible_set_accessible_parent(GtkAccessible *self, GtkAccessible *parent, GtkAccessible *next_sibling)
GtkAccessiblePlatformState
@ GTK_ACCESSIBLE_PLATFORM_STATE_ACTIVE
@ GTK_ACCESSIBLE_PLATFORM_STATE_FOCUSED
@ GTK_ACCESSIBLE_PLATFORM_STATE_FOCUSABLE
GDK_AVAILABLE_IN_4_10 GtkAccessible * gtk_accessible_get_first_accessible_child(GtkAccessible *self)
GDK_AVAILABLE_IN_4_10 void gtk_accessible_update_next_accessible_sibling(GtkAccessible *self, GtkAccessible *new_sibling)
GDK_AVAILABLE_IN_ALL void gtk_accessible_update_relation_value(GtkAccessible *self, int n_relations, GtkAccessibleRelation relations[], const GValue values[])
GDK_AVAILABLE_IN_ALL void gtk_accessible_reset_state(GtkAccessible *self, GtkAccessibleState state)
GDK_AVAILABLE_IN_4_14 GList * gtk_accessible_list_get_objects(GtkAccessibleList *accessible_list)
GDK_AVAILABLE_IN_ALL GtkAccessibleRole gtk_accessible_get_accessible_role(GtkAccessible *self)
GDK_AVAILABLE_IN_ALL void gtk_accessible_reset_property(GtkAccessible *self, GtkAccessibleProperty property)
GDK_AVAILABLE_IN_4_10 gboolean gtk_accessible_get_platform_state(GtkAccessible *self, GtkAccessiblePlatformState state)
GDK_AVAILABLE_IN_4_14 GType gtk_accessible_list_get_type(void)
GDK_AVAILABLE_IN_4_14 GtkAccessibleList * gtk_accessible_list_new_from_list(GList *list)
GDK_AVAILABLE_IN_ALL void gtk_accessible_state_init_value(GtkAccessibleState state, GValue *value)
GDK_AVAILABLE_IN_ALL void gtk_accessible_relation_init_value(GtkAccessibleRelation relation, GValue *value)
GDK_AVAILABLE_IN_ALL GtkATContext * gtk_accessible_get_at_context(GtkAccessible *self)
GDK_AVAILABLE_IN_4_10 GtkAccessible * gtk_accessible_get_next_accessible_sibling(GtkAccessible *self)
GDK_AVAILABLE_IN_ALL void gtk_accessible_reset_relation(GtkAccessible *self, GtkAccessibleRelation relation)
GDK_AVAILABLE_IN_4_10 GtkAccessible * gtk_accessible_get_accessible_parent(GtkAccessible *self)
GDK_AVAILABLE_IN_ALL void gtk_accessible_update_property(GtkAccessible *self, GtkAccessibleProperty first_property,...)
GDK_AVAILABLE_IN_ALL void gtk_accessible_update_state_value(GtkAccessible *self, int n_states, GtkAccessibleState states[], const GValue values[])
struct _GtkAccessibleList GtkAccessibleList
GDK_AVAILABLE_IN_4_14 GtkAccessibleList * gtk_accessible_list_new_from_array(GtkAccessible **accessibles, gsize n_accessibles)
GtkAccessibleAnnouncementPriority
Definition gtkenums.h:1840
GtkAccessibleState
Definition gtkenums.h:1564
GtkAccessibleRole
Definition gtkenums.h:1442
GtkAccessibleProperty
Definition gtkenums.h:1644
GtkAccessibleRelation
Definition gtkenums.h:1718
struct _GtkATContext GtkATContext
Definition gtktypes.h:36
#define G_DECLARE_INTERFACE(ModuleObjName, module_obj_name, MODULE, OBJ_NAME, PrerequisiteName)
Definition gtype.h:1797
gsize GType
Definition gtype.h:427
gint gboolean
Definition gtypes.h:56
int value
Definition lsqlite3.c:2155
static const struct @51 priority[]
gboolean(* get_platform_state)(GtkAccessible *self, GtkAccessiblePlatformState state)
gboolean(* get_bounds)(GtkAccessible *self, int *x, int *y, int *width, int *height)