Flutter Engine
The Flutter Engine
fl_accessible_node.cc
Go to the documentation of this file.
1// Copyright 2013 The Flutter Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#include "flutter/shell/platform/linux/fl_accessible_node.h"
6#include "flutter/shell/platform/linux/fl_engine_private.h"
7
8// Maps Flutter semantics flags to ATK flags.
9static struct {
10 AtkStateType state;
12 gboolean invert;
13} flag_mapping[] = {
14 {ATK_STATE_SHOWING, kFlutterSemanticsFlagIsObscured, TRUE},
15 {ATK_STATE_VISIBLE, kFlutterSemanticsFlagIsHidden, TRUE},
16 {ATK_STATE_CHECKABLE, kFlutterSemanticsFlagHasCheckedState, FALSE},
17 {ATK_STATE_FOCUSABLE, kFlutterSemanticsFlagIsFocusable, FALSE},
18 {ATK_STATE_FOCUSED, kFlutterSemanticsFlagIsFocused, FALSE},
19 {ATK_STATE_CHECKED,
22 FALSE},
23 {ATK_STATE_SELECTED, kFlutterSemanticsFlagIsSelected, FALSE},
24 {ATK_STATE_ENABLED, kFlutterSemanticsFlagIsEnabled, FALSE},
25 {ATK_STATE_SENSITIVE, kFlutterSemanticsFlagIsEnabled, FALSE},
26 {ATK_STATE_READ_ONLY, kFlutterSemanticsFlagIsReadOnly, FALSE},
27 {ATK_STATE_EDITABLE, kFlutterSemanticsFlagIsTextField, FALSE},
28 {ATK_STATE_INVALID, static_cast<FlutterSemanticsFlag>(0), FALSE},
29};
30
31// Maps Flutter semantics actions to ATK actions.
32typedef struct {
34 const gchar* name;
47 "MoveCursorForwardByCharacter"},
49 "MoveCursorBackwardByCharacter"},
54 "DidGainAccessibilityFocus"},
56 "DidLoseAccessibilityFocus"},
59 {kFlutterSemanticsActionMoveCursorForwardByWord, "MoveCursorForwardByWord"},
61 "MoveCursorBackwardByWord"},
63 {static_cast<FlutterSemanticsAction>(0), nullptr}};
64
66 AtkObject parent_instance;
67
68 // Weak reference to the engine this node is created for.
69 FlEngine* engine;
70
71 // Weak reference to the parent node of this one or %NULL.
72 AtkObject* parent;
73
74 int32_t id;
75 gchar* name;
76 gint index;
77 gint x, y, width, height;
78 GPtrArray* actions;
80 GPtrArray* children;
82};
83
85
86#define FL_ACCESSIBLE_NODE_GET_PRIVATE(node) \
87 ((FlAccessibleNodePrivate*)fl_accessible_node_get_instance_private( \
88 FL_ACCESSIBLE_NODE(node)))
89
91 AtkComponentIface* iface);
92static void fl_accessible_node_action_interface_init(AtkActionIface* iface);
93
95 FlAccessibleNode,
96 fl_accessible_node,
97 ATK_TYPE_OBJECT,
98 G_ADD_PRIVATE(FlAccessibleNode)
99 G_IMPLEMENT_INTERFACE(ATK_TYPE_COMPONENT,
101 G_IMPLEMENT_INTERFACE(ATK_TYPE_ACTION,
103
104// Returns TRUE if [flag] has changed between [old_flags] and [flags].
105static gboolean flag_is_changed(FlutterSemanticsFlag old_flags,
108 return (old_flags & flag) != (flags & flag);
109}
110
111// Returns TRUE if [flag] is set in [flags].
114 return (flags & flag) != 0;
115}
116
117// Returns TRUE if [action] is set in [actions].
118static gboolean has_action(FlutterSemanticsAction actions,
120 return (actions & action) != 0;
121}
122
123// Gets the nth action.
125 if (index < 0 || static_cast<guint>(index) >= priv->actions->len) {
126 return nullptr;
127 }
128 return static_cast<ActionData*>(g_ptr_array_index(priv->actions, index));
129}
130
131// Checks if [object] is in [children].
132static gboolean has_child(GPtrArray* children, AtkObject* object) {
133 for (guint i = 0; i < children->len; i++) {
134 if (g_ptr_array_index(children, i) == object) {
135 return TRUE;
136 }
137 }
138
139 return FALSE;
140}
141
142static void fl_accessible_node_set_property(GObject* object,
143 guint prop_id,
144 const GValue* value,
145 GParamSpec* pspec) {
147 switch (prop_id) {
148 case kPropEngine:
149 g_assert(priv->engine == nullptr);
150 priv->engine = FL_ENGINE(g_value_get_object(value));
151 g_object_add_weak_pointer(object,
152 reinterpret_cast<gpointer*>(&priv->engine));
153 break;
154 case kPropId:
155 priv->id = g_value_get_int(value);
156 break;
157 default:
158 G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec);
159 break;
160 }
161}
162
163static void fl_accessible_node_dispose(GObject* object) {
165
166 if (priv->engine != nullptr) {
167 g_object_remove_weak_pointer(object,
168 reinterpret_cast<gpointer*>(&(priv->engine)));
169 priv->engine = nullptr;
170 }
171 if (priv->parent != nullptr) {
172 g_object_remove_weak_pointer(object,
173 reinterpret_cast<gpointer*>(&(priv->parent)));
174 priv->parent = nullptr;
175 }
176 g_clear_pointer(&priv->name, g_free);
177 g_clear_pointer(&priv->actions, g_ptr_array_unref);
178 g_clear_pointer(&priv->children, g_ptr_array_unref);
179
180 G_OBJECT_CLASS(fl_accessible_node_parent_class)->dispose(object);
181}
182
183// Implements AtkObject::get_name.
184static const gchar* fl_accessible_node_get_name(AtkObject* accessible) {
186 return priv->name;
187}
188
189// Implements AtkObject::get_parent.
190static AtkObject* fl_accessible_node_get_parent(AtkObject* accessible) {
192 return priv->parent;
193}
194
195// Implements AtkObject::get_index_in_parent.
196static gint fl_accessible_node_get_index_in_parent(AtkObject* accessible) {
198 return priv->index;
199}
200
201// Implements AtkObject::get_n_children.
202static gint fl_accessible_node_get_n_children(AtkObject* accessible) {
204 return priv->children->len;
205}
206
207// Implements AtkObject::ref_child.
208static AtkObject* fl_accessible_node_ref_child(AtkObject* accessible, gint i) {
210
211 if (i < 0 || static_cast<guint>(i) >= priv->children->len) {
212 return nullptr;
213 }
214
215 return ATK_OBJECT(g_object_ref(g_ptr_array_index(priv->children, i)));
216}
217
218// Implements AtkObject::get_role.
219static AtkRole fl_accessible_node_get_role(AtkObject* accessible) {
221 if ((priv->flags & kFlutterSemanticsFlagIsButton) != 0) {
222 return ATK_ROLE_PUSH_BUTTON;
223 }
226 return ATK_ROLE_RADIO_BUTTON;
227 }
228 if ((priv->flags & kFlutterSemanticsFlagHasCheckedState) != 0) {
229 return ATK_ROLE_CHECK_BOX;
230 }
231 if ((priv->flags & kFlutterSemanticsFlagHasToggledState) != 0) {
232 return ATK_ROLE_TOGGLE_BUTTON;
233 }
234 if ((priv->flags & kFlutterSemanticsFlagIsSlider) != 0) {
235 return ATK_ROLE_SLIDER;
236 }
237 if ((priv->flags & kFlutterSemanticsFlagIsTextField) != 0 &&
238 (priv->flags & kFlutterSemanticsFlagIsObscured) != 0) {
239 return ATK_ROLE_PASSWORD_TEXT;
240 }
241 if ((priv->flags & kFlutterSemanticsFlagIsTextField) != 0) {
242 return ATK_ROLE_TEXT;
243 }
244 if ((priv->flags & kFlutterSemanticsFlagIsHeader) != 0) {
245 return ATK_ROLE_HEADER;
246 }
247 if ((priv->flags & kFlutterSemanticsFlagIsLink) != 0) {
248 return ATK_ROLE_LINK;
249 }
250 if ((priv->flags & kFlutterSemanticsFlagIsImage) != 0) {
251 return ATK_ROLE_IMAGE;
252 }
253
254 return ATK_ROLE_PANEL;
255}
256
257// Implements AtkObject::ref_state_set.
258static AtkStateSet* fl_accessible_node_ref_state_set(AtkObject* accessible) {
260
261 AtkStateSet* state_set = atk_state_set_new();
262
263 for (int i = 0; flag_mapping[i].state != ATK_STATE_INVALID; i++) {
264 gboolean enabled = has_flag(priv->flags, flag_mapping[i].flag);
265 if (flag_mapping[i].invert) {
266 enabled = !enabled;
267 }
268 if (enabled) {
269 atk_state_set_add_state(state_set, flag_mapping[i].state);
270 }
271 }
272
273 return state_set;
274}
275
276// Implements AtkComponent::get_extents.
277static void fl_accessible_node_get_extents(AtkComponent* component,
278 gint* x,
279 gint* y,
280 gint* width,
281 gint* height,
282 AtkCoordType coord_type) {
284
285 *x = 0;
286 *y = 0;
287 if (priv->parent != nullptr) {
288 atk_component_get_extents(ATK_COMPONENT(priv->parent), x, y, nullptr,
289 nullptr, coord_type);
290 }
291
292 *x += priv->x;
293 *y += priv->y;
294 *width = priv->width;
295 *height = priv->height;
296}
297
298// Implements AtkComponent::get_layer.
299static AtkLayer fl_accessible_node_get_layer(AtkComponent* component) {
300 return ATK_LAYER_WIDGET;
301}
302
303// Implements AtkAction::do_action.
304static gboolean fl_accessible_node_do_action(AtkAction* action, gint i) {
306
307 if (priv->engine == nullptr) {
308 return FALSE;
309 }
310
312 if (data == nullptr) {
313 return FALSE;
314 }
315
316 fl_accessible_node_perform_action(FL_ACCESSIBLE_NODE(action), data->action,
317 nullptr);
318 return TRUE;
319}
320
321// Implements AtkAction::get_n_actions.
324 return priv->actions->len;
325}
326
327// Implements AtkAction::get_name.
328static const gchar* fl_accessible_node_get_name(AtkAction* action, gint i) {
330
332 if (data == nullptr) {
333 return nullptr;
334 }
335
336 return data->name;
337}
338
339// Implements FlAccessibleNode::set_name.
340static void fl_accessible_node_set_name_impl(FlAccessibleNode* self,
341 const gchar* name) {
343 g_free(priv->name);
344 priv->name = g_strdup(name);
345}
346
347// Implements FlAccessibleNode::set_extents.
348static void fl_accessible_node_set_extents_impl(FlAccessibleNode* self,
349 gint x,
350 gint y,
351 gint width,
352 gint height) {
354 priv->x = x;
355 priv->y = y;
356 priv->width = width;
357 priv->height = height;
358}
359
360// Implements FlAccessibleNode::set_flags.
361static void fl_accessible_node_set_flags_impl(FlAccessibleNode* self,
364
365 FlutterSemanticsFlag old_flags = priv->flags;
366 priv->flags = flags;
367
368 for (int i = 0; flag_mapping[i].state != ATK_STATE_INVALID; i++) {
369 if (flag_is_changed(old_flags, flags, flag_mapping[i].flag)) {
370 gboolean enabled = has_flag(flags, flag_mapping[i].flag);
371 if (flag_mapping[i].invert) {
372 enabled = !enabled;
373 }
374
375 atk_object_notify_state_change(ATK_OBJECT(self), flag_mapping[i].state,
376 enabled);
377 }
378 }
379}
380
381// Implements FlAccessibleNode::set_actions.
383 FlAccessibleNode* self,
384 FlutterSemanticsAction actions) {
386
387 // NOTE(robert-ancell): It appears that AtkAction doesn't have a method of
388 // notifying that actions have changed, and even if it did an ATK client
389 // might access the old IDs before checking for new ones. Keep an eye
390 // out for a case where Flutter changes the actions on an item and see
391 // if we can resolve this in another way.
392 g_ptr_array_remove_range(priv->actions, 0, priv->actions->len);
393 for (int i = 0; action_mapping[i].name != nullptr; i++) {
394 if (has_action(actions, action_mapping[i].action)) {
395 g_ptr_array_add(priv->actions, &action_mapping[i]);
396 }
397 }
398}
399
400// Implements FlAccessibleNode::set_value.
401static void fl_accessible_node_set_value_impl(FlAccessibleNode* self,
402 const gchar* value) {}
403
404// Implements FlAccessibleNode::set_text_selection.
406 gint base,
407 gint extent) {}
408
409// Implements FlAccessibleNode::set_text_direction.
411 FlAccessibleNode* self,
412 FlutterTextDirection direction) {}
413
414// Implements FlAccessibleNode::perform_action.
416 FlAccessibleNode* self,
418 GBytes* data) {
421}
422
423static void fl_accessible_node_class_init(FlAccessibleNodeClass* klass) {
424 G_OBJECT_CLASS(klass)->set_property = fl_accessible_node_set_property;
425 G_OBJECT_CLASS(klass)->dispose = fl_accessible_node_dispose;
426 ATK_OBJECT_CLASS(klass)->get_name = fl_accessible_node_get_name;
427 ATK_OBJECT_CLASS(klass)->get_parent = fl_accessible_node_get_parent;
428 ATK_OBJECT_CLASS(klass)->get_index_in_parent =
430 ATK_OBJECT_CLASS(klass)->get_n_children = fl_accessible_node_get_n_children;
431 ATK_OBJECT_CLASS(klass)->ref_child = fl_accessible_node_ref_child;
432 ATK_OBJECT_CLASS(klass)->get_role = fl_accessible_node_get_role;
433 ATK_OBJECT_CLASS(klass)->ref_state_set = fl_accessible_node_ref_state_set;
434 FL_ACCESSIBLE_NODE_CLASS(klass)->set_name = fl_accessible_node_set_name_impl;
435 FL_ACCESSIBLE_NODE_CLASS(klass)->set_extents =
437 FL_ACCESSIBLE_NODE_CLASS(klass)->set_flags =
439 FL_ACCESSIBLE_NODE_CLASS(klass)->set_actions =
441 FL_ACCESSIBLE_NODE_CLASS(klass)->set_value =
443 FL_ACCESSIBLE_NODE_CLASS(klass)->set_text_selection =
445 FL_ACCESSIBLE_NODE_CLASS(klass)->set_text_direction =
447 FL_ACCESSIBLE_NODE_CLASS(klass)->perform_action =
449
450 g_object_class_install_property(
451 G_OBJECT_CLASS(klass), kPropEngine,
452 g_param_spec_object(
453 "engine", "engine", "Flutter engine", fl_engine_get_type(),
454 static_cast<GParamFlags>(G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY |
455 G_PARAM_STATIC_STRINGS)));
456 g_object_class_install_property(
457 G_OBJECT_CLASS(klass), kPropId,
458 g_param_spec_int(
459 "id", "id", "Accessibility node ID", 0, G_MAXINT, 0,
460 static_cast<GParamFlags>(G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY |
461 G_PARAM_STATIC_STRINGS)));
462}
463
465 AtkComponentIface* iface) {
466 iface->get_extents = fl_accessible_node_get_extents;
467 iface->get_layer = fl_accessible_node_get_layer;
468}
469
470static void fl_accessible_node_action_interface_init(AtkActionIface* iface) {
471 iface->do_action = fl_accessible_node_do_action;
472 iface->get_n_actions = fl_accessible_node_get_n_actions;
473 iface->get_name = fl_accessible_node_get_name;
474}
475
476static void fl_accessible_node_init(FlAccessibleNode* self) {
478 priv->actions = g_ptr_array_new();
479 priv->children = g_ptr_array_new_with_free_func(g_object_unref);
480}
481
482FlAccessibleNode* fl_accessible_node_new(FlEngine* engine, int32_t id) {
483 FlAccessibleNode* self = FL_ACCESSIBLE_NODE(g_object_new(
484 fl_accessible_node_get_type(), "engine", engine, "id", id, nullptr));
485 return self;
486}
487
488void fl_accessible_node_set_parent(FlAccessibleNode* self,
489 AtkObject* parent,
490 gint index) {
491 g_return_if_fail(FL_IS_ACCESSIBLE_NODE(self));
493 priv->parent = parent;
494 priv->index = index;
495 g_object_add_weak_pointer(G_OBJECT(self),
496 reinterpret_cast<gpointer*>(&(priv->parent)));
497}
498
500 GPtrArray* children) {
501 g_return_if_fail(FL_IS_ACCESSIBLE_NODE(self));
503
504 // Remove nodes that are no longer required.
505 for (guint i = 0; i < priv->children->len;) {
506 AtkObject* object = ATK_OBJECT(g_ptr_array_index(priv->children, i));
507 if (has_child(children, object)) {
508 i++;
509 } else {
510 g_signal_emit_by_name(self, "children-changed::remove", i, object,
511 nullptr);
512 g_ptr_array_remove_index(priv->children, i);
513 }
514 }
515
516 // Add new nodes.
517 for (guint i = 0; i < children->len; i++) {
518 AtkObject* object = ATK_OBJECT(g_ptr_array_index(children, i));
519 if (!has_child(priv->children, object)) {
520 g_ptr_array_add(priv->children, g_object_ref(object));
521 g_signal_emit_by_name(self, "children-changed::add", i, object, nullptr);
522 }
523 }
524}
525
526void fl_accessible_node_set_name(FlAccessibleNode* self, const gchar* name) {
527 g_return_if_fail(FL_IS_ACCESSIBLE_NODE(self));
528
529 return FL_ACCESSIBLE_NODE_GET_CLASS(self)->set_name(self, name);
530}
531
533 gint x,
534 gint y,
535 gint width,
536 gint height) {
537 g_return_if_fail(FL_IS_ACCESSIBLE_NODE(self));
538
539 return FL_ACCESSIBLE_NODE_GET_CLASS(self)->set_extents(self, x, y, width,
540 height);
541}
542
543void fl_accessible_node_set_flags(FlAccessibleNode* self,
545 g_return_if_fail(FL_IS_ACCESSIBLE_NODE(self));
546
547 return FL_ACCESSIBLE_NODE_GET_CLASS(self)->set_flags(self, flags);
548}
549
551 FlutterSemanticsAction actions) {
552 g_return_if_fail(FL_IS_ACCESSIBLE_NODE(self));
553
554 return FL_ACCESSIBLE_NODE_GET_CLASS(self)->set_actions(self, actions);
555}
556
557void fl_accessible_node_set_value(FlAccessibleNode* self, const gchar* value) {
558 g_return_if_fail(FL_IS_ACCESSIBLE_NODE(self));
559
560 return FL_ACCESSIBLE_NODE_GET_CLASS(self)->set_value(self, value);
561}
562
564 gint base,
565 gint extent) {
566 g_return_if_fail(FL_IS_ACCESSIBLE_NODE(self));
567
568 return FL_ACCESSIBLE_NODE_GET_CLASS(self)->set_text_selection(self, base,
569 extent);
570}
571
573 FlutterTextDirection direction) {
574 g_return_if_fail(FL_IS_ACCESSIBLE_NODE(self));
575
576 return FL_ACCESSIBLE_NODE_GET_CLASS(self)->set_text_direction(self,
577 direction);
578}
579
582 GBytes* data) {
583 g_return_if_fail(FL_IS_ACCESSIBLE_NODE(self));
584
585 return FL_ACCESSIBLE_NODE_GET_CLASS(self)->perform_action(self, action, data);
586}
FlutterSemanticsAction
Definition: embedder.h:113
@ kFlutterSemanticsActionMoveCursorForwardByCharacter
Move the cursor forward by one character.
Definition: embedder.h:140
@ kFlutterSemanticsActionDidLoseAccessibilityFocus
Indicate that the node has lost accessibility focus.
Definition: embedder.h:154
@ kFlutterSemanticsActionDecrease
Decrease the value represented by the semantics node.
Definition: embedder.h:136
@ kFlutterSemanticsActionScrollDown
Definition: embedder.h:132
@ kFlutterSemanticsActionMoveCursorBackwardByCharacter
Move the cursor backward by one character.
Definition: embedder.h:142
@ kFlutterSemanticsActionMoveCursorForwardByWord
Move the cursor forward by one word.
Definition: embedder.h:160
@ kFlutterSemanticsActionLongPress
Definition: embedder.h:119
@ kFlutterSemanticsActionScrollRight
Definition: embedder.h:126
@ kFlutterSemanticsActionShowOnScreen
A request to fully show the semantics node on screen.
Definition: embedder.h:138
@ kFlutterSemanticsActionDismiss
A request that the node should be dismissed.
Definition: embedder.h:158
@ kFlutterSemanticsActionFocus
Request that the respective focusable widget gain input focus.
Definition: embedder.h:166
@ kFlutterSemanticsActionPaste
Paste the current content of the clipboard.
Definition: embedder.h:150
@ kFlutterSemanticsActionScrollUp
Definition: embedder.h:129
@ kFlutterSemanticsActionCut
Cut the current selection and place it in the clipboard.
Definition: embedder.h:148
@ kFlutterSemanticsActionCustomAction
Indicate that the user has invoked a custom accessibility action.
Definition: embedder.h:156
@ kFlutterSemanticsActionCopy
Copy the current selection to the clipboard.
Definition: embedder.h:146
@ kFlutterSemanticsActionMoveCursorBackwardByWord
Move the cursor backward by one word.
Definition: embedder.h:162
@ kFlutterSemanticsActionIncrease
Increase the value represented by the semantics node.
Definition: embedder.h:134
@ kFlutterSemanticsActionScrollLeft
Definition: embedder.h:122
@ kFlutterSemanticsActionDidGainAccessibilityFocus
Indicate that the node has gained accessibility focus.
Definition: embedder.h:152
@ kFlutterSemanticsActionTap
Definition: embedder.h:116
FlutterTextDirection
Definition: embedder.h:248
FlutterSemanticsFlag
Definition: embedder.h:172
@ kFlutterSemanticsFlagIsHidden
Whether the semantics node is considered hidden.
Definition: embedder.h:203
@ kFlutterSemanticsFlagIsHeader
Whether a semantic node is a header that divides content into sections.
Definition: embedder.h:194
@ kFlutterSemanticsFlagIsSlider
Whether the semantics node represents a slider.
Definition: embedder.h:236
@ kFlutterSemanticsFlagHasToggledState
The semantics node has the quality of either being "on" or "off".
Definition: embedder.h:209
@ kFlutterSemanticsFlagIsSelected
Whether a semantics node is selected.
Definition: embedder.h:179
@ kFlutterSemanticsFlagIsInMutuallyExclusiveGroup
Whether a semantic node is in a mutually exclusive group.
Definition: embedder.h:192
@ kFlutterSemanticsFlagIsChecked
Whether a semantics node is checked.
Definition: embedder.h:177
@ kFlutterSemanticsFlagIsToggled
Definition: embedder.h:212
@ kFlutterSemanticsFlagIsButton
Whether the semantic node represents a button.
Definition: embedder.h:181
@ kFlutterSemanticsFlagIsObscured
Whether the value of the semantics node is obscured.
Definition: embedder.h:196
@ kFlutterSemanticsFlagIsReadOnly
Definition: embedder.h:230
@ kFlutterSemanticsFlagIsLink
Whether the semantics node represents a link.
Definition: embedder.h:234
@ kFlutterSemanticsFlagIsFocused
Whether the semantic node currently holds the user's focus.
Definition: embedder.h:185
@ kFlutterSemanticsFlagIsEnabled
Whether a semantic node that hasEnabledState is currently enabled.
Definition: embedder.h:190
@ kFlutterSemanticsFlagIsImage
Whether the semantics node represents an image.
Definition: embedder.h:205
@ kFlutterSemanticsFlagIsFocusable
Whether the semantic node can hold the user's focus.
Definition: embedder.h:232
@ kFlutterSemanticsFlagIsTextField
Whether the semantic node represents a text field.
Definition: embedder.h:183
@ kFlutterSemanticsFlagHasCheckedState
Definition: embedder.h:175
FlutterEngine engine
Definition: main.cc:68
static gboolean has_child(GPtrArray *children, AtkObject *object)
static void fl_accessible_node_set_property(GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec)
void fl_accessible_node_set_name(FlAccessibleNode *self, const gchar *name)
static gboolean fl_accessible_node_do_action(AtkAction *action, gint i)
static void fl_accessible_node_action_interface_init(AtkActionIface *iface)
static void fl_accessible_node_set_text_direction_impl(FlAccessibleNode *self, FlutterTextDirection direction)
FlutterSemanticsFlag flag
void fl_accessible_node_set_text_direction(FlAccessibleNode *self, FlutterTextDirection direction)
void fl_accessible_node_perform_action(FlAccessibleNode *self, FlutterSemanticsAction action, GBytes *data)
@ kPropEngine
@ kPropLast
@ kPropId
@ kProp0
static AtkStateSet * fl_accessible_node_ref_state_set(AtkObject *accessible)
static AtkRole fl_accessible_node_get_role(AtkObject *accessible)
static void fl_accessible_node_set_value_impl(FlAccessibleNode *self, const gchar *value)
void fl_accessible_node_set_text_selection(FlAccessibleNode *self, gint base, gint extent)
static AtkObject * fl_accessible_node_get_parent(AtkObject *accessible)
static void fl_accessible_node_class_init(FlAccessibleNodeClass *klass)
G_DEFINE_TYPE_WITH_CODE(FlAccessibleNode, fl_accessible_node, ATK_TYPE_OBJECT, G_IMPLEMENT_INTERFACE(ATK_TYPE_COMPONENT, fl_accessible_node_component_interface_init) G_IMPLEMENT_INTERFACE(ATK_TYPE_ACTION, fl_accessible_node_action_interface_init)) static gboolean flag_is_changed(FlutterSemanticsFlag old_flags
static void fl_accessible_node_set_actions_impl(FlAccessibleNode *self, FlutterSemanticsAction actions)
static void fl_accessible_node_component_interface_init(AtkComponentIface *iface)
void fl_accessible_node_set_actions(FlAccessibleNode *self, FlutterSemanticsAction actions)
static void fl_accessible_node_dispose(GObject *object)
void fl_accessible_node_set_children(FlAccessibleNode *self, GPtrArray *children)
static void fl_accessible_node_set_flags_impl(FlAccessibleNode *self, FlutterSemanticsFlag flags)
void fl_accessible_node_set_extents(FlAccessibleNode *self, gint x, gint y, gint width, gint height)
static AtkLayer fl_accessible_node_get_layer(AtkComponent *component)
void fl_accessible_node_set_value(FlAccessibleNode *self, const gchar *value)
static void fl_accessible_node_get_extents(AtkComponent *component, gint *x, gint *y, gint *width, gint *height, AtkCoordType coord_type)
static gint fl_accessible_node_get_n_actions(AtkAction *action)
AtkStateType state
FlutterSemanticsFlag flags
static ActionData * get_action(FlAccessibleNodePrivate *priv, gint index)
void fl_accessible_node_set_flags(FlAccessibleNode *self, FlutterSemanticsFlag flags)
static const gchar * fl_accessible_node_get_name(AtkObject *accessible)
static gboolean has_action(FlutterSemanticsAction actions, FlutterSemanticsAction action)
static gint fl_accessible_node_get_index_in_parent(AtkObject *accessible)
static void fl_accessible_node_init(FlAccessibleNode *self)
void fl_accessible_node_set_parent(FlAccessibleNode *self, AtkObject *parent, gint index)
static struct @68 flag_mapping[]
static void fl_accessible_node_perform_action_impl(FlAccessibleNode *self, FlutterSemanticsAction action, GBytes *data)
gboolean invert
static ActionData action_mapping[]
static void fl_accessible_node_set_text_selection_impl(FlAccessibleNode *self, gint base, gint extent)
static gint fl_accessible_node_get_n_children(AtkObject *accessible)
static void fl_accessible_node_set_extents_impl(FlAccessibleNode *self, gint x, gint y, gint width, gint height)
static gboolean has_flag(FlutterSemanticsFlag flags, FlutterSemanticsFlag flag)
#define FL_ACCESSIBLE_NODE_GET_PRIVATE(node)
FlAccessibleNode * fl_accessible_node_new(FlEngine *engine, int32_t id)
static void fl_accessible_node_set_name_impl(FlAccessibleNode *self, const gchar *name)
static AtkObject * fl_accessible_node_ref_child(AtkObject *accessible, gint i)
void fl_engine_dispatch_semantics_action(FlEngine *self, uint64_t id, FlutterSemanticsAction action, GBytes *data)
Definition: fl_engine.cc:873
FlPixelBufferTexturePrivate * priv
uint8_t value
guint prop_id
guint const GValue GParamSpec * pspec
return FALSE
double y
double x
DEF_SWITCHES_START aot vmservice shared library name
Definition: switches.h:32
int32_t height
int32_t width
const gchar * name
FlutterSemanticsAction action
FlutterSemanticsFlag flags
std::shared_ptr< const fml::Mapping > data
Definition: texture_gles.cc:63