From 6abb70e6eda5ec70597eed435f8fbee324a4d0e2 Mon Sep 17 00:00:00 2001 From: Loic Sharma Date: Fri, 12 Jan 2024 15:44:41 -0800 Subject: [PATCH 1/6] [Windows] Add README --- shell/platform/windows/README.md | 38 ++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 shell/platform/windows/README.md diff --git a/shell/platform/windows/README.md b/shell/platform/windows/README.md new file mode 100644 index 0000000000000..ed4c6962689de --- /dev/null +++ b/shell/platform/windows/README.md @@ -0,0 +1,38 @@ +# Windows Platform Embedder + +This code is the glue between the Flutter engine and the Windows platform. +It is responsible for: + +1. Launching the Flutter engine. +2. Providing a view for the Flutter engine to render into. +3. Dispatching events to the Flutter engine. + +> [!CAUTION] +> This is a best effort attempt to document the Windows embedder. It is not +> guaranteed to be up to date or complete. If you find a discrepancy, please +> [send a pull request](https://github.com/flutter/engine/compare)! + +See also: + +1. [Flutter tool's Windows logic](https://github.com/flutter/flutter/tree/master/packages/flutter_tools/lib/src/windows) - Builds and runs Flutter Windows apps on +the command line. +1. [Windows app template](https://github.com/flutter/flutter/tree/master/packages/flutter_tools/templates/app_shared/windows.tmpl) - The entrypoint for Flutter Windows app. This +launches the Windows embedder. +1. [`#hackers-desktop` Discord channel](https://discord.com/channels/608014603317936148/608020180177780791) + +## Developing + +See: + +1. [Setting up the Engine development environment](https://github.com/flutter/flutter/wiki/Setting-up-the-Engine-development-environment) +2. [Compiling for Windows](https://github.com/flutter/flutter/wiki/Compiling-the-engine#compiling-for-windows) +3. [Debugging Windows builds with Visual Studio](https://github.com/flutter/flutter/wiki/Debugging-the-engine#debugging-windows-builds-with-visual-studio) + +### Notable files + +Some notable files include: + +1. [`flutter_windows_engine.h`](https://github.com/flutter/engine/blob/main/shell/platform/windows/flutter_windows_engine.h) - Connects the Windows embedder to the Flutter engine. +1. [`flutter_windows_view.h`](https://github.com/flutter/engine/blob/main/shell/platform/windows/flutter_windows_view.h) - The logic that for a Flutter view +1. [`flutter_window.h`](https://github.com/flutter/engine/blob/main/shell/platform/windows/flutter_window.h) - Integrates a Flutter view with Windows (using a win32 child window). +1. [`//shell/platform/embedder/embedder.h`](https://github.com/flutter/engine/blob/main/shell/platform/embedder/embedder.h) - The API boundary between the Windows embedder and the Flutter engine. From d040b130f64abc8ef2e42352294a02539d2213d7 Mon Sep 17 00:00:00 2001 From: Loic Sharma Date: Fri, 12 Jan 2024 15:48:56 -0800 Subject: [PATCH 2/6] Fix --- shell/platform/windows/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/shell/platform/windows/README.md b/shell/platform/windows/README.md index ed4c6962689de..ed22db26a03ea 100644 --- a/shell/platform/windows/README.md +++ b/shell/platform/windows/README.md @@ -33,6 +33,6 @@ See: Some notable files include: 1. [`flutter_windows_engine.h`](https://github.com/flutter/engine/blob/main/shell/platform/windows/flutter_windows_engine.h) - Connects the Windows embedder to the Flutter engine. -1. [`flutter_windows_view.h`](https://github.com/flutter/engine/blob/main/shell/platform/windows/flutter_windows_view.h) - The logic that for a Flutter view -1. [`flutter_window.h`](https://github.com/flutter/engine/blob/main/shell/platform/windows/flutter_window.h) - Integrates a Flutter view with Windows (using a win32 child window). +1. [`flutter_windows_view.h`](https://github.com/flutter/engine/blob/main/shell/platform/windows/flutter_windows_view.h) - The logic for a Flutter view +1. [`flutter_window.h`](https://github.com/flutter/engine/blob/main/shell/platform/windows/flutter_window.h) - Integrates a Flutter view with Windows (using a win32 child window). 1. [`//shell/platform/embedder/embedder.h`](https://github.com/flutter/engine/blob/main/shell/platform/embedder/embedder.h) - The API boundary between the Windows embedder and the Flutter engine. From 0412b30afda1bb27a45d6a840262d69d00d28108 Mon Sep 17 00:00:00 2001 From: Loic Sharma Date: Tue, 16 Jan 2024 08:57:50 -0800 Subject: [PATCH 3/6] Update licenses --- ci/licenses_golden/excluded_files | 1 + 1 file changed, 1 insertion(+) diff --git a/ci/licenses_golden/excluded_files b/ci/licenses_golden/excluded_files index 8feec5940738a..1f985f2932fc4 100644 --- a/ci/licenses_golden/excluded_files +++ b/ci/licenses_golden/excluded_files @@ -366,6 +366,7 @@ ../../../flutter/shell/platform/glfw/client_wrapper/plugin_registrar_glfw_unittests.cc ../../../flutter/shell/platform/glfw/client_wrapper/testing ../../../flutter/shell/platform/linux/testing +../../../flutter/shell/platform/windows/README.md ../../../flutter/shell/platform/windows/accessibility_bridge_windows_unittests.cc ../../../flutter/shell/platform/windows/client_wrapper/dart_project_unittests.cc ../../../flutter/shell/platform/windows/client_wrapper/flutter_engine_unittests.cc From 18ed2800a51c03c9b3eaaf189439f683eb6dff8a Mon Sep 17 00:00:00 2001 From: Loic Sharma Date: Tue, 16 Jan 2024 08:59:44 -0800 Subject: [PATCH 4/6] Link to GitHub issues --- shell/platform/windows/README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/shell/platform/windows/README.md b/shell/platform/windows/README.md index ed22db26a03ea..46d659d19e352 100644 --- a/shell/platform/windows/README.md +++ b/shell/platform/windows/README.md @@ -18,6 +18,7 @@ See also: the command line. 1. [Windows app template](https://github.com/flutter/flutter/tree/master/packages/flutter_tools/templates/app_shared/windows.tmpl) - The entrypoint for Flutter Windows app. This launches the Windows embedder. +1. [`platform-windows` GitHub issues label](https://github.com/flutter/flutter/issues?q=is%3Aopen+label%3Aplatform-windows+sort%3Aupdated-desc) 1. [`#hackers-desktop` Discord channel](https://discord.com/channels/608014603317936148/608020180177780791) ## Developing From 2cd4a1a8f848dbd13ba65e8ac0b7f8c203c91e3e Mon Sep 17 00:00:00 2001 From: Loic Sharma Date: Tue, 16 Jan 2024 09:04:34 -0800 Subject: [PATCH 5/6] Link to architectural overview --- shell/platform/windows/README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/shell/platform/windows/README.md b/shell/platform/windows/README.md index 46d659d19e352..80d697125bf25 100644 --- a/shell/platform/windows/README.md +++ b/shell/platform/windows/README.md @@ -7,6 +7,9 @@ It is responsible for: 2. Providing a view for the Flutter engine to render into. 3. Dispatching events to the Flutter engine. +For more information on embedders, see the +[Flutter architectural overview](https://docs.flutter.dev/resources/architectural-overview). + > [!CAUTION] > This is a best effort attempt to document the Windows embedder. It is not > guaranteed to be up to date or complete. If you find a discrepancy, please From 108927d5dd2889678b6b996c261dbca1e1486125 Mon Sep 17 00:00:00 2001 From: Loic Sharma Date: Tue, 16 Jan 2024 09:05:52 -0800 Subject: [PATCH 6/6] Add missing period --- shell/platform/windows/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shell/platform/windows/README.md b/shell/platform/windows/README.md index 80d697125bf25..56c8d596f9259 100644 --- a/shell/platform/windows/README.md +++ b/shell/platform/windows/README.md @@ -37,6 +37,6 @@ See: Some notable files include: 1. [`flutter_windows_engine.h`](https://github.com/flutter/engine/blob/main/shell/platform/windows/flutter_windows_engine.h) - Connects the Windows embedder to the Flutter engine. -1. [`flutter_windows_view.h`](https://github.com/flutter/engine/blob/main/shell/platform/windows/flutter_windows_view.h) - The logic for a Flutter view +1. [`flutter_windows_view.h`](https://github.com/flutter/engine/blob/main/shell/platform/windows/flutter_windows_view.h) - The logic for a Flutter view. 1. [`flutter_window.h`](https://github.com/flutter/engine/blob/main/shell/platform/windows/flutter_window.h) - Integrates a Flutter view with Windows (using a win32 child window). 1. [`//shell/platform/embedder/embedder.h`](https://github.com/flutter/engine/blob/main/shell/platform/embedder/embedder.h) - The API boundary between the Windows embedder and the Flutter engine.