Skip to content

[linux/windows] Separate out a C channel API #259

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jan 31, 2019

Conversation

stuartmorgan-g
Copy link
Collaborator

Eliminates PluginRegistrar and BinaryMessenger from the embedder.h API
surface, moving them up to the FlutterWindowController level. In their
place, adds new low-level messaging APIs, which are based closely on
the Flutter engine embedder APIs (including an equivalent message
struct), in some cases wrapping them directly. Unlike the engine APIs,
they allow per-channel callbacks, so individual plugins can use the API.

Since PluginHandler is no longer the source of truth for callback
registration, only an adaptor, it's now fine to have multiple instances
of them, all passing through to the underlying C API.

Part of #230

Eliminates PluginRegistrar and BinaryMessenger from the embedder.h API
surface, moving them up to the FlutterWindowController level. In their
place, adds new low-level messaging APIs, which are based closely on
the Flutter engine embedder APIs (including an equivalent message
struct), in some cases wrapping them directly. Unlike the engine APIs,
they allow per-channel callbacks, so individual plugins can use the API.

Since PluginHandler is no longer the source of truth for callback
registration, only an adaptor, it's now fine to have multiple instances
of them, all passing through to the underlying C API.

Part of google#230
@stuartmorgan-g
Copy link
Collaborator Author

I'll need to add the new file to Windows, which I'll do tomorrow, but that won't affect the code (unless there are Windows-specific build issues, but I'm not expecting that) so it can be reviewed before then.

@stuartmorgan-g stuartmorgan-g merged commit 0400b5d into google:master Jan 31, 2019
@stuartmorgan-g stuartmorgan-g deleted the message-c-api branch January 31, 2019 21:37
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 9, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants