1. 07 4月, 2020 1 次提交
    • S
      Improve C++ plugin lifetime handling (#17489) · faf44fed
      stuartmorgan 提交于
      This makes two changes:
      - Adds a way to register a callback for when a FlutterDesktopPluginRegistrarRef is destroyed, and implements the logic to call it in the Windows and Linux embeddings.
      - Adds a class to the C++ wrapper that handles making a singleton owning PluginRegistrar wrappers, and destroying them when the underlying reference goes away, to avoid needing that boilerplate code in every plugin's source.
      
      Fixes https://github.com/flutter/flutter/issues/53496
      faf44fed
  2. 24 3月, 2020 1 次提交
    • S
      Add DartProject for Windows embedding API (#17210) · 33a21d1f
      stuartmorgan 提交于
      This is a step toward aligning the API with macOS, and will make it easier to add the precompiled library later for release mode (since it can just be added to the project directory, without any code changes required for wrapper clients).
      
      At the C API, uses a struct instead of individual arguments, mirroring a change that was already made on the Linux side to make the C API cleaner.
      
      Functional changes in addition to the restructuring:
      
      adds relative path support, as was recently added for GLFW
      Uses wstring, rather than string, for paths; the conversion to UTF-8 is actually a potential problem on Windows, so pushing it into the embedding allows us the possibility of removing it later (if we can figure out a good solution at the embedder.h layer) without API breakage.
      The old APIs used by the standard runner are left in place for now to avoid breaking the template on an engine roll. Once the framework template has been updated, the old API paths will be removed.
      33a21d1f
  3. 12 2月, 2020 1 次提交
  4. 06 2月, 2020 1 次提交
  5. 14 1月, 2020 1 次提交
    • S
      Implement HWND access for Windows plugins (#15378) · b454251f
      stuartmorgan 提交于
      plugin_registrar_windows.h was never fully updated for the Win32 switch,
      and didn't actually compile. This introduces FlutterView (parallel to
      the GLFW wrapper's FlutterWindow) as a ways of holding view-specific
      functionality to expose via the plugin registrar, and moves HWND access
      from the FlutterViewController to the FlutterView so that it's
      available to plugins. This allows the implementation of plugins that need
      access to the native HWND (e.g., moving or resizing the top-level window).
      
      Adds simple unit tests of the new wrapper functionality, ensuring that the
      files actually compile, and that the passthroughs work as expected.
      
      This is a breaking change for Windows runners due to moving
      GetNativeWindow() in the wrapper. It's not being done as a multi-stage
      change (addition + deprecation + later removal) since this API is explicitly
      unstable.
      b454251f
  6. 17 10月, 2019 1 次提交
    • S
      Add a task runner for the Win32 embedding (#13043) · 508146f0
      stuartmorgan 提交于
      Adds a task runner, and exposes API to allow application-level runloops to know when they need to next call the API to process engine events. Internally, sends null events to wake up the app runloop when new events are scheduled to ensure the wait time is updated accordingly.
      
      Fixes #36420
      508146f0
  7. 05 9月, 2019 1 次提交
  8. 03 9月, 2019 1 次提交
    • J
      [Windows] Update API for alternative Windows shell platform implementation (#11327) · 51a376d7
      James Clarke 提交于
      * Begin API evolution to a more native win32 API
      
      * Child-window based hosting
      
      * Plumb through an initial size for child window to avoid reallocated surface on start
      
      * Windows API cleanup part 1
      
      * Fix wrapper tests
      
      * Ensure flutter's HWND resources are destroyed
      
      * Final API cleanup
      
      * Fix dynamic DPI handling
      
      * Cleanup
      
      * Fix a bug that was causing engine to not be shutdown correctly
      
      * CR feedback
      
      * auto format
      
      * CR feedback: combine FlutterView and FlutterViewController
      
      * The one that clang-format seems to always get wrong
      
      * expletive
      
      * fix sources for licesnse file
      
      * CR Feedback
      
      * cleanup
      
      * Update GetNativeWindow() to return an HWND rather than a long
      
      * fix formatting
      51a376d7
  9. 15 8月, 2019 1 次提交
    • J
      [Windows] Alternative Windows shell platform implementation (#9835) · ff484d4f
      James Clarke 提交于
      Start work on flutter/flutter#30726 by adding an alternative win32 shell platform implementation for Windows that is not based on GLFW and that uses LIBANGLE for rendering and native win32 windowing and input. This change does not replace the GLFW implementation but rather runs side by side with it producing a secondary flutter_windows_win32.dll artifact. The following items must be added to attain parity with the GLFW implementation:
      - Custom task scheduling
      - Support for keyboard modifier keys
      - Async texture uploads
      - Correct high DPI handling on Windows versions < 1703
      and will be added in subsequent changes.
      ff484d4f