Skip to content
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

gpui: Add WebView support #6

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft

gpui: Add WebView support #6

wants to merge 2 commits into from

Conversation

huacnlee
Copy link
Owner

@huacnlee huacnlee commented Jul 3, 2024

This PR just make a draft, and the gpui-component use this branch for WebView support.

Changes

  • Add WebView example.
  • Use unsafe code to let Windows raw_window_handle workaround.
  • Export raw_window_handle method.
  • Fix window_handle method for X11 and Wayland.

Platform support:

  • macOS
  • Windows
  • Linux x11 (Wayland can't work)
image

Refs

@huacnlee huacnlee force-pushed the export-platform-window branch 2 times, most recently from 996ecaa to 9f2c125 Compare July 3, 2024 13:27
@huacnlee
Copy link
Owner Author

huacnlee commented Jul 3, 2024

image

@huacnlee huacnlee force-pushed the export-platform-window branch from e5f84af to 4df6491 Compare July 18, 2024 04:04
huacnlee added a commit to longbridge/gpui-component that referenced this pull request Jul 18, 2024
@huacnlee huacnlee force-pushed the export-platform-window branch 2 times, most recently from 86db48b to 3ee10bf Compare July 23, 2024 01:41
@huacnlee huacnlee force-pushed the export-platform-window branch 2 times, most recently from e7347fc to d18b49a Compare July 31, 2024 01:37
@huacnlee
Copy link
Owner Author

huacnlee commented Jul 31, 2024

There have a lot of unsafe code for just workaround on Windows, so this version can't push to GPUI upstream.

It only requirement on Windows, if not the window_handle use will crash on start. But macOS is ok.

@huacnlee huacnlee force-pushed the export-platform-window branch 2 times, most recently from 371a680 to dc81926 Compare August 6, 2024 09:41
@huacnlee huacnlee force-pushed the export-platform-window branch from dc81926 to a0bd2bb Compare August 13, 2024 10:10
@huacnlee huacnlee force-pushed the export-platform-window branch 2 times, most recently from f5eecd7 to 1d2c695 Compare August 27, 2024 05:45
@huacnlee huacnlee force-pushed the export-platform-window branch 3 times, most recently from 4f7507e to 8e26a49 Compare September 7, 2024 03:42
@huacnlee huacnlee force-pushed the export-platform-window branch 3 times, most recently from bd896c4 to 3d634ce Compare September 18, 2024 06:24
@huacnlee huacnlee force-pushed the export-platform-window branch from 3d634ce to 82314ac Compare October 4, 2024 01:49
@huacnlee huacnlee force-pushed the export-platform-window branch from 82314ac to fa2a060 Compare October 14, 2024 02:38
@huacnlee huacnlee changed the title gpui: Export raw_window_handle gpui: Add WebView support Oct 14, 2024
@huacnlee huacnlee force-pushed the export-platform-window branch 2 times, most recently from e681a4b to d048d70 Compare October 17, 2024 10:25
@huacnlee
Copy link
Owner Author

@huacnlee huacnlee force-pushed the export-platform-window branch from 21d99d9 to 93adafb Compare October 21, 2024 09:00
@huacnlee
Copy link
Owner Author

huacnlee commented Oct 21, 2024

@huacnlee huacnlee force-pushed the export-platform-window branch 2 times, most recently from 6ee7977 to 543fe4c Compare November 7, 2024 02:18
@huacnlee huacnlee force-pushed the export-platform-window branch from 543fe4c to 0e42c01 Compare November 18, 2024 01:59
@huacnlee huacnlee force-pushed the export-platform-window branch from 0e42c01 to 54853c7 Compare November 26, 2024 13:27
@huacnlee huacnlee force-pushed the export-platform-window branch 2 times, most recently from 64482e7 to 8ad07f4 Compare November 28, 2024 08:34
@huacnlee huacnlee force-pushed the export-platform-window branch 2 times, most recently from 3612f36 to 0ae1603 Compare December 12, 2024 02:06
@huacnlee huacnlee force-pushed the export-platform-window branch from 0ae1603 to 65da76c Compare December 17, 2024 11:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant