Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
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"},
62 {static_cast<FlutterSemanticsAction>(0), nullptr}};
63
65 AtkObject parent_instance;
66
67 // Weak reference to the engine this node is created for.
68 FlEngine* engine;
69
70 // Weak reference to the parent node of this one or %NULL.
71 AtkObject* parent;
72
73 int32_t id;
74 gchar* name;
75 gint index;
76 gint x, y, width, height;
77 GPtrArray* actions;
79 GPtrArray* children;
81};
82
84
85#define FL_ACCESSIBLE_NODE_GET_PRIVATE(node) \
86 ((FlAccessibleNodePrivate*)fl_accessible_node_get_instance_private( \
87 FL_ACCESSIBLE_NODE(node)))
88
90 AtkComponentIface* iface);
91static void fl_accessible_node_action_interface_init(AtkActionIface* iface);
92
94 FlAccessibleNode,
95 fl_accessible_node,
96 ATK_TYPE_OBJECT,
97 G_ADD_PRIVATE(FlAccessibleNode)
98 G_IMPLEMENT_INTERFACE(ATK_TYPE_COMPONENT,
100 G_IMPLEMENT_INTERFACE(ATK_TYPE_ACTION,
102
103// Returns TRUE if [flag] has changed between [old_flags] and [flags].
104static gboolean flag_is_changed(FlutterSemanticsFlag old_flags,
107 return (old_flags & flag) != (flags & flag);
108}
109
110// Returns TRUE if [flag] is set in [flags].
113 return (flags & flag) != 0;
114}
115
116// Returns TRUE if [action] is set in [actions].
117static gboolean has_action(FlutterSemanticsAction actions,
119 return (actions & action) != 0;
120}
121
122// Gets the nth action.
124 if (index < 0 || static_cast<guint>(index) >= priv->actions->len) {
125 return nullptr;
126 }
127 return static_cast<ActionData*>(g_ptr_array_index(priv->actions, index));
128}
129
130// Checks if [object] is in [children].
131static gboolean has_child(GPtrArray* children, AtkObject* object) {
132 for (guint i = 0; i < children->len; i++) {
133 if (g_ptr_array_index(children, i) == object) {
134 return TRUE;
135 }
136 }
137
138 return FALSE;
139}
140
141static void fl_accessible_node_set_property(GObject* object,
142 guint prop_id,
143 const GValue* value,
144 GParamSpec* pspec) {
146 switch (prop_id) {
147 case kPropEngine:
148 g_assert(priv->engine == nullptr);
149 priv->engine = FL_ENGINE(g_value_get_object(value));
151 reinterpret_cast<gpointer*>(&priv->engine));
152 break;
153 case kPropId:
154 priv->id = g_value_get_int(value);
155 break;
156 default:
157 G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec);
158 break;
159 }
160}
161
162static void fl_accessible_node_dispose(GObject* object) {
164
165 if (priv->engine != nullptr) {
166 g_object_remove_weak_pointer(object,
167 reinterpret_cast<gpointer*>(&(priv->engine)));
168 priv->engine = nullptr;
169 }
170 if (priv->parent != nullptr) {
171 g_object_remove_weak_pointer(object,
172 reinterpret_cast<gpointer*>(&(priv->parent)));
173 priv->parent = nullptr;
174 }
175 g_clear_pointer(&priv->name, g_free);
176 g_clear_pointer(&priv->actions, g_ptr_array_unref);
177 g_clear_pointer(&priv->children, g_ptr_array_unref);
178
179 G_OBJECT_CLASS(fl_accessible_node_parent_class)->dispose(object);
180}
181
182// Implements AtkObject::get_name.
183static const gchar* fl_accessible_node_get_name(AtkObject* accessible) {
185 return priv->name;
186}
187
188// Implements AtkObject::get_parent.
189static AtkObject* fl_accessible_node_get_parent(AtkObject* accessible) {
191 return priv->parent;
192}
193
194// Implements AtkObject::get_index_in_parent.
195static gint fl_accessible_node_get_index_in_parent(AtkObject* accessible) {
197 return priv->index;
198}
199
200// Implements AtkObject::get_n_children.
201static gint fl_accessible_node_get_n_children(AtkObject* accessible) {
203 return priv->children->len;
204}
205
206// Implements AtkObject::ref_child.
207static AtkObject* fl_accessible_node_ref_child(AtkObject* accessible, gint i) {
209
210 if (i < 0 || static_cast<guint>(i) >= priv->children->len) {
211 return nullptr;
212 }
213
214 return ATK_OBJECT(g_object_ref(g_ptr_array_index(priv->children, i)));
215}
216
217// Implements AtkObject::get_role.
218static AtkRole fl_accessible_node_get_role(AtkObject* accessible) {
220 if ((priv->flags & kFlutterSemanticsFlagIsButton) != 0) {
221 return ATK_ROLE_PUSH_BUTTON;
222 }
225 return ATK_ROLE_RADIO_BUTTON;
226 }
227 if ((priv->flags & kFlutterSemanticsFlagHasCheckedState) != 0) {
228 return ATK_ROLE_CHECK_BOX;
229 }
230 if ((priv->flags & kFlutterSemanticsFlagHasToggledState) != 0) {
231 return ATK_ROLE_TOGGLE_BUTTON;
232 }
233 if ((priv->flags & kFlutterSemanticsFlagIsSlider) != 0) {
234 return ATK_ROLE_SLIDER;
235 }
236 if ((priv->flags & kFlutterSemanticsFlagIsTextField) != 0 &&
237 (priv->flags & kFlutterSemanticsFlagIsObscured) != 0) {
238 return ATK_ROLE_PASSWORD_TEXT;
239 }
240 if ((priv->flags & kFlutterSemanticsFlagIsTextField) != 0) {
241 return ATK_ROLE_TEXT;
242 }
243 if ((priv->flags & kFlutterSemanticsFlagIsHeader) != 0) {
244 return ATK_ROLE_HEADER;
245 }
246 if ((priv->flags & kFlutterSemanticsFlagIsLink) != 0) {
247 return ATK_ROLE_LINK;
248 }
249 if ((priv->flags & kFlutterSemanticsFlagIsImage) != 0) {
250 return ATK_ROLE_IMAGE;
251 }
252
253 return ATK_ROLE_PANEL;
254}
255
256// Implements AtkObject::ref_state_set.
257static AtkStateSet* fl_accessible_node_ref_state_set(AtkObject* accessible) {
259
260 AtkStateSet* state_set = atk_state_set_new();
261
262 for (int i = 0; flag_mapping[i].state != ATK_STATE_INVALID; i++) {
263 gboolean enabled = has_flag(priv->flags, flag_mapping[i].flag);
264 if (flag_mapping[i].invert) {
265 enabled = !enabled;
266 }
267 if (enabled) {
268 atk_state_set_add_state(state_set, flag_mapping[i].state);
269 }
270 }
271
272 return state_set;
273}
274
275// Implements AtkComponent::get_extents.
276static void fl_accessible_node_get_extents(AtkComponent* component,
277 gint* x,
278 gint* y,
279 gint* width,
280 gint* height,
281 AtkCoordType coord_type) {
283
284 *x = 0;
285 *y = 0;
286 if (priv->parent != nullptr) {
287 atk_component_get_extents(ATK_COMPONENT(priv->parent), x, y, nullptr,
288 nullptr, coord_type);
289 }
290
291 *x += priv->x;
292 *y += priv->y;
293 *width = priv->width;
294 *height = priv->height;
295}
296
297// Implements AtkComponent::get_layer.
298static AtkLayer fl_accessible_node_get_layer(AtkComponent* component) {
299 return ATK_LAYER_WIDGET;
300}
301
302// Implements AtkAction::do_action.
303static gboolean fl_accessible_node_do_action(AtkAction* action, gint i) {
305
306 if (priv->engine == nullptr) {
307 return FALSE;
308 }
309
310 ActionData* data = get_action(priv, i);
311 if (data == nullptr) {
312 return FALSE;
313 }
314
315 fl_accessible_node_perform_action(FL_ACCESSIBLE_NODE(action), data->action,
316 nullptr);
317 return TRUE;
318}
319
320// Implements AtkAction::get_n_actions.
323 return priv->actions->len;
324}
325
326// Implements AtkAction::get_name.
327static const gchar* fl_accessible_node_get_name(AtkAction* action, gint i) {
329
330 ActionData* data = get_action(priv, i);
331 if (data == nullptr) {
332 return nullptr;
333 }
334
335 return data->name;
336}
337
338// Implements FlAccessibleNode::set_name.
339static void fl_accessible_node_set_name_impl(FlAccessibleNode* self,
340 const gchar* name) {
342 g_free(priv->name);
343 priv->name = g_strdup(name);
344}
345
346// Implements FlAccessibleNode::set_extents.
347static void fl_accessible_node_set_extents_impl(FlAccessibleNode* self,
348 gint x,
349 gint y,
350 gint width,
351 gint height) {
353 priv->x = x;
354 priv->y = y;
355 priv->width = width;
356 priv->height = height;
357}
358
359// Implements FlAccessibleNode::set_flags.
360static void fl_accessible_node_set_flags_impl(FlAccessibleNode* self,
363
364 FlutterSemanticsFlag old_flags = priv->flags;
365 priv->flags = flags;
366
367 for (int i = 0; flag_mapping[i].state != ATK_STATE_INVALID; i++) {
368 if (flag_is_changed(old_flags, flags, flag_mapping[i].flag)) {
369 gboolean enabled = has_flag(flags, flag_mapping[i].flag);
370 if (flag_mapping[i].invert) {
371 enabled = !enabled;
372 }
373
374 atk_object_notify_state_change(ATK_OBJECT(self), flag_mapping[i].state,
375 enabled);
376 }
377 }
378}
379
380// Implements FlAccessibleNode::set_actions.
382 FlAccessibleNode* self,
383 FlutterSemanticsAction actions) {
385
386 // NOTE(robert-ancell): It appears that AtkAction doesn't have a method of
387 // notifying that actions have changed, and even if it did an ATK client
388 // might access the old IDs before checking for new ones. Keep an eye
389 // out for a case where Flutter changes the actions on an item and see
390 // if we can resolve this in another way.
391 g_ptr_array_remove_range(priv->actions, 0, priv->actions->len);
392 for (int i = 0; action_mapping[i].name != nullptr; i++) {
393 if (has_action(actions, action_mapping[i].action)) {
394 g_ptr_array_add(priv->actions, &action_mapping[i]);
395 }
396 }
397}
398
399// Implements FlAccessibleNode::set_value.
400static void fl_accessible_node_set_value_impl(FlAccessibleNode* self,
401 const gchar* value) {}
402
403// Implements FlAccessibleNode::set_text_selection.
405 gint base,
406 gint extent) {}
407
408// Implements FlAccessibleNode::set_text_direction.
410 FlAccessibleNode* self,
411 FlutterTextDirection direction) {}
412
413// Implements FlAccessibleNode::perform_action.
421
422static void fl_accessible_node_class_init(FlAccessibleNodeClass* klass) {
423 G_OBJECT_CLASS(klass)->set_property = fl_accessible_node_set_property;
424 G_OBJECT_CLASS(klass)->dispose = fl_accessible_node_dispose;
425 ATK_OBJECT_CLASS(klass)->get_name = fl_accessible_node_get_name;
426 ATK_OBJECT_CLASS(klass)->get_parent = fl_accessible_node_get_parent;
427 ATK_OBJECT_CLASS(klass)->get_index_in_parent =
429 ATK_OBJECT_CLASS(klass)->get_n_children = fl_accessible_node_get_n_children;
430 ATK_OBJECT_CLASS(klass)->ref_child = fl_accessible_node_ref_child;
431 ATK_OBJECT_CLASS(klass)->get_role = fl_accessible_node_get_role;
432 ATK_OBJECT_CLASS(klass)->ref_state_set = fl_accessible_node_ref_state_set;
433 FL_ACCESSIBLE_NODE_CLASS(klass)->set_name = fl_accessible_node_set_name_impl;
434 FL_ACCESSIBLE_NODE_CLASS(klass)->set_extents =
436 FL_ACCESSIBLE_NODE_CLASS(klass)->set_flags =
438 FL_ACCESSIBLE_NODE_CLASS(klass)->set_actions =
440 FL_ACCESSIBLE_NODE_CLASS(klass)->set_value =
442 FL_ACCESSIBLE_NODE_CLASS(klass)->set_text_selection =
444 FL_ACCESSIBLE_NODE_CLASS(klass)->set_text_direction =
446 FL_ACCESSIBLE_NODE_CLASS(klass)->perform_action =
448
449 g_object_class_install_property(
450 G_OBJECT_CLASS(klass), kPropEngine,
451 g_param_spec_object(
452 "engine", "engine", "Flutter engine", fl_engine_get_type(),
453 static_cast<GParamFlags>(G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY |
454 G_PARAM_STATIC_STRINGS)));
455 g_object_class_install_property(
456 G_OBJECT_CLASS(klass), kPropId,
457 g_param_spec_int(
458 "id", "id", "Accessibility node ID", 0, G_MAXINT, 0,
459 static_cast<GParamFlags>(G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY |
460 G_PARAM_STATIC_STRINGS)));
461}
462
464 AtkComponentIface* iface) {
465 iface->get_extents = fl_accessible_node_get_extents;
466 iface->get_layer = fl_accessible_node_get_layer;
467}
468
469static void fl_accessible_node_action_interface_init(AtkActionIface* iface) {
470 iface->do_action = fl_accessible_node_do_action;
471 iface->get_n_actions = fl_accessible_node_get_n_actions;
472 iface->get_name = fl_accessible_node_get_name;
473}
474
475static void fl_accessible_node_init(FlAccessibleNode* self) {
477 priv->actions = g_ptr_array_new();
478 priv->children = g_ptr_array_new_with_free_func(g_object_unref);
479}
480
481FlAccessibleNode* fl_accessible_node_new(FlEngine* engine, int32_t id) {
482 FlAccessibleNode* self = FL_ACCESSIBLE_NODE(g_object_new(
483 fl_accessible_node_get_type(), "engine", engine, "id", id, nullptr));
484 return self;
485}
486
487void fl_accessible_node_set_parent(FlAccessibleNode* self,
488 AtkObject* parent,
489 gint index) {
490 g_return_if_fail(FL_IS_ACCESSIBLE_NODE(self));
492 priv->parent = parent;
493 priv->index = index;
495 reinterpret_cast<gpointer*>(&(priv->parent)));
496}
497
499 GPtrArray* children) {
500 g_return_if_fail(FL_IS_ACCESSIBLE_NODE(self));
502
503 // Remove nodes that are no longer required.
504 for (guint i = 0; i < priv->children->len;) {
505 AtkObject* object = ATK_OBJECT(g_ptr_array_index(priv->children, i));
506 if (has_child(children, object)) {
507 i++;
508 } else {
509 g_signal_emit_by_name(self, "children-changed::remove", i, object,
510 nullptr);
511 g_ptr_array_remove_index(priv->children, i);
512 }
513 }
514
515 // Add new nodes.
516 for (guint i = 0; i < children->len; i++) {
517 AtkObject* object = ATK_OBJECT(g_ptr_array_index(children, i));
518 if (!has_child(priv->children, object)) {
519 g_ptr_array_add(priv->children, g_object_ref(object));
520 g_signal_emit_by_name(self, "children-changed::add", i, object, nullptr);
521 }
522 }
523}
524
525void fl_accessible_node_set_name(FlAccessibleNode* self, const gchar* name) {
526 g_return_if_fail(FL_IS_ACCESSIBLE_NODE(self));
527
528 return FL_ACCESSIBLE_NODE_GET_CLASS(self)->set_name(self, name);
529}
530
532 gint x,
533 gint y,
534 gint width,
535 gint height) {
536 g_return_if_fail(FL_IS_ACCESSIBLE_NODE(self));
537
538 return FL_ACCESSIBLE_NODE_GET_CLASS(self)->set_extents(self, x, y, width,
539 height);
540}
541
542void fl_accessible_node_set_flags(FlAccessibleNode* self,
544 g_return_if_fail(FL_IS_ACCESSIBLE_NODE(self));
545
546 return FL_ACCESSIBLE_NODE_GET_CLASS(self)->set_flags(self, flags);
547}
548
550 FlutterSemanticsAction actions) {
551 g_return_if_fail(FL_IS_ACCESSIBLE_NODE(self));
552
553 return FL_ACCESSIBLE_NODE_GET_CLASS(self)->set_actions(self, actions);
554}
555
556void fl_accessible_node_set_value(FlAccessibleNode* self, const gchar* value) {
557 g_return_if_fail(FL_IS_ACCESSIBLE_NODE(self));
558
559 return FL_ACCESSIBLE_NODE_GET_CLASS(self)->set_value(self, value);
560}
561
563 gint base,
564 gint extent) {
565 g_return_if_fail(FL_IS_ACCESSIBLE_NODE(self));
566
567 return FL_ACCESSIBLE_NODE_GET_CLASS(self)->set_text_selection(self, base,
568 extent);
569}
570
572 FlutterTextDirection direction) {
573 g_return_if_fail(FL_IS_ACCESSIBLE_NODE(self));
574
575 return FL_ACCESSIBLE_NODE_GET_CLASS(self)->set_text_direction(self,
576 direction);
577}
578
581 GBytes* data) {
582 g_return_if_fail(FL_IS_ACCESSIBLE_NODE(self));
583
584 return FL_ACCESSIBLE_NODE_GET_CLASS(self)->perform_action(self, action, data);
585}
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
@ 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:246
FlutterSemanticsFlag
Definition embedder.h:170
@ kFlutterSemanticsFlagIsHidden
Whether the semantics node is considered hidden.
Definition embedder.h:201
@ kFlutterSemanticsFlagIsHeader
Whether a semantic node is a header that divides content into sections.
Definition embedder.h:192
@ kFlutterSemanticsFlagIsSlider
Whether the semantics node represents a slider.
Definition embedder.h:234
@ kFlutterSemanticsFlagHasToggledState
The semantics node has the quality of either being "on" or "off".
Definition embedder.h:207
@ kFlutterSemanticsFlagIsSelected
Whether a semantics node is selected.
Definition embedder.h:177
@ kFlutterSemanticsFlagIsInMutuallyExclusiveGroup
Whether a semantic node is in a mutually exclusive group.
Definition embedder.h:190
@ kFlutterSemanticsFlagIsChecked
Whether a semantics node is checked.
Definition embedder.h:175
@ kFlutterSemanticsFlagIsToggled
Definition embedder.h:210
@ kFlutterSemanticsFlagIsButton
Whether the semantic node represents a button.
Definition embedder.h:179
@ kFlutterSemanticsFlagIsObscured
Whether the value of the semantics node is obscured.
Definition embedder.h:194
@ kFlutterSemanticsFlagIsReadOnly
Definition embedder.h:228
@ kFlutterSemanticsFlagIsLink
Whether the semantics node represents a link.
Definition embedder.h:232
@ kFlutterSemanticsFlagIsFocused
Whether the semantic node currently holds the user's focus.
Definition embedder.h:183
@ kFlutterSemanticsFlagIsEnabled
Whether a semantic node that hasEnabledState is currently enabled.
Definition embedder.h:188
@ kFlutterSemanticsFlagIsImage
Whether the semantics node represents an image.
Definition embedder.h:203
@ kFlutterSemanticsFlagIsFocusable
Whether the semantic node can hold the user's focus.
Definition embedder.h:230
@ kFlutterSemanticsFlagIsTextField
Whether the semantic node represents a text field.
Definition embedder.h:181
@ kFlutterSemanticsFlagHasCheckedState
Definition embedder.h:173
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
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:852
FlPixelBufferTexturePrivate * priv
uint8_t value
guint const GValue GParamSpec * pspec
g_object_add_weak_pointer(G_OBJECT(self), reinterpret_cast< gpointer * >(&self->engine))
const char * name
Definition fuchsia.cc:50
return FALSE
double y
double x
int32_t height
int32_t width
const gchar * name
FlutterSemanticsAction action
FlutterSemanticsFlag flags