• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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_COMMON_CPP_PUBLIC_FLUTTER_PLUGIN_REGISTRAR_H_
6 #define FLUTTER_SHELL_PLATFORM_COMMON_CPP_PUBLIC_FLUTTER_PLUGIN_REGISTRAR_H_
7 
8 #include <stddef.h>
9 #include <stdint.h>
10 
11 #include "flutter_export.h"
12 #include "flutter_messenger.h"
13 
14 #if defined(__cplusplus)
15 extern "C" {
16 #endif
17 
18 // Opaque reference to a plugin registrar.
19 typedef struct FlutterDesktopPluginRegistrar* FlutterDesktopPluginRegistrarRef;
20 
21 // Returns the engine messenger associated with this registrar.
22 FLUTTER_EXPORT FlutterDesktopMessengerRef
23 FlutterDesktopRegistrarGetMessenger(FlutterDesktopPluginRegistrarRef registrar);
24 
25 // Enables input blocking on the given channel.
26 //
27 // If set, then the Flutter window will disable input callbacks
28 // while waiting for the handler for messages on that channel to run. This is
29 // useful if handling the message involves showing a modal window, for instance.
30 //
31 // This must be called after FlutterDesktopSetMessageHandler, as setting a
32 // handler on a channel will reset the input blocking state back to the
33 // default of disabled.
34 FLUTTER_EXPORT void FlutterDesktopRegistrarEnableInputBlocking(
35     FlutterDesktopPluginRegistrarRef registrar,
36     const char* channel);
37 
38 #if defined(__cplusplus)
39 }  // extern "C"
40 #endif
41 
42 #endif  // FLUTTER_SHELL_PLATFORM_COMMON_CPP_PUBLIC_FLUTTER_PLUGIN_REGISTRAR_H_
43