This repository was archived by the owner on Feb 25, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6k
Use a AT-SPI socket/plug to export the Flutter accessibility state. #52355
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
d6e45f2
Don't emit a11y signal until table is updated
robert-ancell 5b3bc6a
Use a AT-SPI socket/plug to export the Flutter accessibility state.
robert-ancell fdf4021
Add a constant for the root semantics node ID
robert-ancell dce81f4
Add whitespace between C/C++ includes
robert-ancell File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,57 @@ | ||
| // Copyright 2013 The Flutter Authors. All rights reserved. | ||
| // Use of this source code is governed by a BSD-style license that can be | ||
| // found in the LICENSE file. | ||
|
|
||
| #include "flutter/shell/platform/linux/fl_socket_accessible.h" | ||
|
|
||
| // This is a copy of GtkSocketAccessible, which requires GTK 3.24.30 | ||
|
|
||
| struct _FlSocketAccessible { | ||
| GtkContainerAccessible parent; | ||
| AtkObject* accessible_socket; | ||
| }; | ||
|
|
||
| G_DEFINE_TYPE(FlSocketAccessible, | ||
| fl_socket_accessible, | ||
| GTK_TYPE_CONTAINER_ACCESSIBLE) | ||
|
|
||
| static AtkObject* fl_socket_accessible_ref_child(AtkObject* object, int i) { | ||
| FlSocketAccessible* self = FL_SOCKET_ACCESSIBLE(object); | ||
| return i == 0 ? ATK_OBJECT(g_object_ref(self->accessible_socket)) : nullptr; | ||
| } | ||
|
|
||
| static int fl_socket_accessible_get_n_children(AtkObject* object) { | ||
| return 1; | ||
| } | ||
|
|
||
| static void fl_socket_accessible_finalize(GObject* object) { | ||
| FlSocketAccessible* self = FL_SOCKET_ACCESSIBLE(object); | ||
|
|
||
| g_clear_object(&self->accessible_socket); | ||
|
|
||
| G_OBJECT_CLASS(fl_socket_accessible_parent_class)->finalize(object); | ||
| } | ||
|
|
||
| static void fl_socket_accessible_initialize(AtkObject* object, gpointer data) { | ||
| FlSocketAccessible* self = FL_SOCKET_ACCESSIBLE(object); | ||
|
|
||
| ATK_OBJECT_CLASS(fl_socket_accessible_parent_class)->initialize(object, data); | ||
|
|
||
| self->accessible_socket = atk_socket_new(); | ||
| } | ||
|
|
||
| static void fl_socket_accessible_class_init(FlSocketAccessibleClass* klass) { | ||
| GObjectClass* object_class = G_OBJECT_CLASS(klass); | ||
| object_class->finalize = fl_socket_accessible_finalize; | ||
|
|
||
| AtkObjectClass* atk_class = ATK_OBJECT_CLASS(klass); | ||
| atk_class->initialize = fl_socket_accessible_initialize; | ||
| atk_class->get_n_children = fl_socket_accessible_get_n_children; | ||
| atk_class->ref_child = fl_socket_accessible_ref_child; | ||
| } | ||
|
|
||
| static void fl_socket_accessible_init(FlSocketAccessible* self) {} | ||
|
|
||
| void fl_socket_accessible_embed(FlSocketAccessible* self, gchar* id) { | ||
| atk_socket_embed(ATK_SOCKET(self->accessible_socket), id); | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| // Copyright 2013 The Flutter Authors. All rights reserved. | ||
| // Use of this source code is governed by a BSD-style license that can be | ||
| // found in the LICENSE file. | ||
|
|
||
| #ifndef FLUTTER_SHELL_PLATFORM_LINUX_FL_SOCKET_ACCESSIBLE_H_ | ||
| #define FLUTTER_SHELL_PLATFORM_LINUX_FL_SOCKET_ACCESSIBLE_H_ | ||
|
|
||
| #include <gtk/gtk-a11y.h> | ||
|
|
||
| G_BEGIN_DECLS | ||
|
|
||
| G_DECLARE_FINAL_TYPE(FlSocketAccessible, | ||
| fl_socket_accessible, | ||
| FL, | ||
| SOCKET_ACCESSIBLE, | ||
| GtkContainerAccessible); | ||
|
|
||
| void fl_socket_accessible_embed(FlSocketAccessible* self, gchar* id); | ||
|
|
||
| G_END_DECLS | ||
|
|
||
| #endif // FLUTTER_SHELL_PLATFORM_LINUX_FL_SOCKET_ACCESSIBLE_H_ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.