| Flutter Linux Embedder |

fl_accessibility_channel.h
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 #ifndef FLUTTER_SHELL_PLATFORM_LINUX_FL_ACCESSIBILITY_CHANNEL_H_
6 #define FLUTTER_SHELL_PLATFORM_LINUX_FL_ACCESSIBILITY_CHANNEL_H_
7
8 #include "flutter/shell/platform/linux/public/flutter_linux/fl_binary_messenger.h"
9
10 G_BEGIN_DECLS
11
12 G_DECLARE_FINAL_TYPE(FlAccessibilityChannel,
13 fl_accessibility_channel,
14 FL,
15 ACCESSIBILITY_CHANNEL,
16 GObject);
17
18 // A direction in which text flows.
19 typedef enum {
20 FL_TEXT_DIRECTION_RTL,
21 FL_TEXT_DIRECTION_LTR,
22 } FlTextDirection;
23
24 // Assertiveness level of an accessibility announcement.
25 typedef enum {
26 FL_ASSERTIVENESS_POLITE,
27 FL_ASSERTIVENESS_ASSERTIVE,
28 } FlAssertiveness;
29
30 /**
31 * FlAccessibilityChannel:
32 *
33 * #FlAccessibilityChannel is a channel that implements the shell side
34 * of SystemChannels.accessibility from the Flutter services library.
35 */
36
37 typedef struct {
38 void (*send_announcement)(int64_t view_id,
39 const char* message,
40 FlTextDirection text_direction,
41 FlAssertiveness assertiveness,
42 gpointer user_data);
43 } FlAccessibilityChannelVTable;
44
45 /**
46 * fl_accessibility_channel_new:
47 * @messenger: an #FlBinaryMessenger
48 * @vtable: callbacks for incoming method calls.
49 * @user_data: data to pass in callbacks.
50 *
51 * Creates a new channel that handles accessibility requests from Dart.
52 *
53 * Returns: a new #FlAccessibilityChannel
54 */
55 FlAccessibilityChannel* fl_accessibility_channel_new(
56 FlBinaryMessenger* messenger,
57 FlAccessibilityChannelVTable* vtable,
58 gpointer user_data);
59
60 G_END_DECLS
61
62 #endif // FLUTTER_SHELL_PLATFORM_LINUX_FL_ACCESSIBILITY_CHANNEL_H_
fl_accessibility_channel_new
FlAccessibilityChannel * fl_accessibility_channel_new(FlBinaryMessenger *messenger, FlAccessibilityChannelVTable *vtable, gpointer user_data)
Definition: fl_accessibility_channel.cc:177
FlTextDirection
FlTextDirection
Definition: fl_accessibility_channel.h:19
FL_TEXT_DIRECTION_LTR
@ FL_TEXT_DIRECTION_LTR
Definition: fl_accessibility_channel.h:21
FL_TEXT_DIRECTION_RTL
@ FL_TEXT_DIRECTION_RTL
Definition: fl_accessibility_channel.h:20
FlAssertiveness
FlAssertiveness
Definition: fl_accessibility_channel.h:25
FL_ASSERTIVENESS_POLITE
@ FL_ASSERTIVENESS_POLITE
Definition: fl_accessibility_channel.h:26
FL_ASSERTIVENESS_ASSERTIVE
@ FL_ASSERTIVENESS_ASSERTIVE
Definition: fl_accessibility_channel.h:27
G_DECLARE_FINAL_TYPE
G_BEGIN_DECLS G_DECLARE_FINAL_TYPE(FlAccessibilityChannel, fl_accessibility_channel, FL, ACCESSIBILITY_CHANNEL, GObject)
message
const char * message
Definition: fl_accessibility_handler.cc:21
text_direction
const char FlTextDirection text_direction
Definition: fl_accessibility_handler.cc:22
assertiveness
const char FlTextDirection FlAssertiveness assertiveness
Definition: fl_accessibility_handler.cc:23
user_data
const char FlTextDirection FlAssertiveness gpointer user_data
Definition: fl_accessibility_handler.cc:24
FL
FL
Definition: fl_binary_messenger.cc:27
fl_binary_messenger.h
view_id
G_BEGIN_DECLS FlutterViewId view_id
Definition: fl_view_accessible.h:49
FlAccessibilityChannelVTable
Definition: fl_accessibility_channel.h:37