Skip to content

Commit

Permalink
[windows] html fullscreen support
Browse files Browse the repository at this point in the history
  • Loading branch information
leaanthony committed Oct 23, 2023
1 parent f8250fb commit ff08a5c
Show file tree
Hide file tree
Showing 8 changed files with 303 additions and 51 deletions.
71 changes: 21 additions & 50 deletions mkdocs-website/docs/development/status.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Status of features in v3.
Application interface methods

| Method | Windows | Linux | Mac | Notes |
| ------------------------------------------------------------- | ------- | ----- | --- | ----- |
|---------------------------------------------------------------|---------|-------|-----|-------|
| run() error | Y | Y | Y | |
| destroy() | | Y | Y | |
| setApplicationMenu(menu \*Menu) | Y | Y | Y | |
Expand All @@ -36,7 +36,7 @@ Application interface methods
Webview Window Interface Methods

| Method | Windows | Linux | Mac | Notes |
| -------------------------------------------------- | ------- | ----- | --- | ---------------------------------------- |
|----------------------------------------------------|---------|-------|-----|------------------------------------------|
| center() | Y | Y | Y | |
| close() | y | Y | Y | |
| destroy() | | Y | Y | |
Expand Down Expand Up @@ -90,15 +90,15 @@ Webview Window Interface Methods
### Application

| Feature | Windows | Linux | Mac | Notes |
| ------- | ------- | ----- | --- | ----- |
|---------|---------|-------|-----|-------|
| Quit | Y | Y | Y | |
| Hide | Y | | Y | |
| Show | Y | | Y | |

### Dialogs

| Feature | Windows | Linux | Mac | Notes |
| -------- | ------- | ----- | --- | ----- |
|----------|---------|-------|-----|-------|
| Info | Y | Y | Y | |
| Warning | Y | Y | Y | |
| Error | Y | Y | Y | |
Expand All @@ -109,14 +109,14 @@ Webview Window Interface Methods
### Clipboard

| Feature | Windows | Linux | Mac | Notes |
| ------- | ------- | ----- | --- | ----- |
|---------|---------|-------|-----|-------|
| SetText | Y | | Y | |
| Text | Y | | Y | |

### ContextMenu

| Feature | Windows | Linux | Mac | Notes |
| ---------------- | ------- | ----- | --- | ----- |
|------------------|---------|-------|-----|-------|
| OpenContextMenu | Y | | Y | |
| On By Default | | | | |
| Control via HTML | Y | | | |
Expand All @@ -134,15 +134,15 @@ show the context menu unless it is explicitly set with
### Screens

| Feature | Windows | Linux | Mac | Notes |
| ---------- | ------- | ----- | --- | ----- |
|------------|---------|-------|-----|-------|
| GetAll | Y | Y | Y | |
| GetPrimary | Y | Y | Y | |
| GetCurrent | Y | Y | Y | |

### System

| Feature | Windows | Linux | Mac | Notes |
| ---------- | ------- | ----- | --- | ----- |
|------------|---------|-------|-----|-------|
| IsDarkMode | | | Y | |

### Window
Expand All @@ -152,7 +152,7 @@ Y = Supported U = Untested
- = Not available

| Feature | Windows | Linux | Mac | Notes |
| ------------------- | ------- | ----- | --- | ------------------------------------------------------------------------------------ |
|---------------------|---------|-------|-----|--------------------------------------------------------------------------------------|
| Center | Y | Y | Y | |
| Focus | Y | Y | | |
| FullScreen | Y | Y | Y | |
Expand All @@ -165,7 +165,7 @@ Y = Supported U = Untested
| Screen | Y | Y | Y | Get screen for window |
| SetAlwaysOnTop | Y | Y | Y | |
| SetBackgroundColour | Y | Y | Y | https://github.com/MicrosoftEdge/WebView2Feedback/issues/1621#issuecomment-938234294 |
| SetEnabled | Y | U | U | Set the window to be enabled/disabled |
| SetEnabled | Y | U | - | Set the window to be enabled/disabled |
| SetMaxSize | Y | Y | Y | |
| SetMinSize | Y | Y | Y | |
| SetRelativePosition | Y | Y | Y | |
Expand All @@ -190,7 +190,7 @@ applied when the window is created. An 'X' indicates that the option is not
supported by the platform.

| Feature | Windows | Linux | Mac | Notes |
| ------------------------------- | ------- | ----- | --- | ------------------------------------------ |
|---------------------------------|---------|-------|-----|--------------------------------------------|
| AlwaysOnTop | Y | | | |
| BackgroundColour | Y | Y | | |
| BackgroundType | | | | Acrylic seems to work but the others don't |
Expand Down Expand Up @@ -230,13 +230,13 @@ To log or not to log? System logger vs custom logger.
## Menu

| Event | Windows | Linux | Mac | Notes |
| ------------------------ | ------- | ----- | --- | ----- |
|--------------------------|---------|-------|-----|-------|
| Default Application Menu | Y | Y | Y | |

## Tray Menus

| Feature | Windows | Linux | Mac | Notes |
| ------------------ | ------- | ----- | --- | -------------------------------------------------------------------- |
|--------------------|---------|-------|-----|----------------------------------------------------------------------|
| Icon | Y | | Y | Windows has default icons for light/dark mode & supports PNG or ICO. |
| Label | - | | Y | |
| Label (ANSI Codes) | - | | | |
Expand All @@ -245,7 +245,7 @@ To log or not to log? System logger vs custom logger.
### Methods

| Method | Windows | Linux | Mac | Notes |
| ----------------------------- | ------- | ----- | --- | ----- |
|-------------------------------|---------|-------|-----|-------|
| setLabel(label string) | - | | Y | |
| run() | Y | | Y | |
| setIcon(icon []byte) | Y | | Y | |
Expand All @@ -260,7 +260,7 @@ To log or not to log? System logger vs custom logger.
Mapping native events to cross-platform events.

| Event | Windows | Linux | Mac | Notes |
| ------------------------ | ------- | ----- | --------------- | ----- |
|--------------------------|---------|-------|-----------------|-------|
| WindowWillClose | | | WindowWillClose | |
| WindowDidClose | | | | |
| WindowDidResize | | | | |
Expand All @@ -284,7 +284,7 @@ Contains a lot needed for development.
## Theme

| Mode | Windows | Linux | Mac | Notes |
| ------ | ------- | ----- | --- | ----- |
|--------|---------|-------|-----|-------|
| Dark | Y | | | |
| Light | Y | | | |
| System | Y | | | |
Expand All @@ -302,7 +302,7 @@ All templates are working.
Built-in plugin support:

| Plugin | Windows | Linux | Mac | Notes |
| --------------- | ------- | ----- | --- | ----- |
|-----------------|---------|-------|-----|-------|
| Browser | Y | | Y | |
| KV Store | Y | Y | Y | |
| Log | Y | Y | Y | |
Expand All @@ -318,7 +318,7 @@ TODO:
## Packaging

| | Windows | Linux | Mac | Notes |
| --------------- | ------- | ----- | --- | ----- |
|-----------------|---------|-------|-----|-------|
| Icon Generation | Y | | Y | |
| Icon Embedding | Y | | Y | |
| Info.plist | - | | Y | |
Expand All @@ -329,7 +329,7 @@ TODO:
## Frameless Windows

| Feature | Windows | Linux | Mac | Notes |
| ------- | ------- | ----- | --- | ---------------------------------------------- |
|---------|---------|-------|-----|------------------------------------------------|
| Resize | Y | | Y | |
| Drag | Y | Y | Y | Linux - can always drag with `Meta`+left mouse |

Expand All @@ -340,7 +340,7 @@ TODO:
### Mac Options

| Feature | Default | Notes |
| ----------------------- | ----------------- | ---------------------------------------------------- |
|-------------------------|-------------------|------------------------------------------------------|
| Backdrop | MacBackdropNormal | Standard solid window |
| DisableShadow | false | |
| TitleBar | | Standard window decorations by default |
Expand All @@ -356,7 +356,7 @@ TODO:
### Windows Options

| Feature | Default | Notes |
| --------------------------------- | ------------- | ------------------------------------------- |
|-----------------------------------|---------------|---------------------------------------------|
| BackdropType | Solid | |
| DisableIcon | false | |
| Theme | SystemDefault | |
Expand Down Expand Up @@ -386,32 +386,3 @@ The examples can be compiled using the following command:

Note: things are currently not working after the refactor

## Examples

| Example | Windows | Linux | Mac |
| ------------ | -------------------- | ----- | --- |
| binding | NO | | |
| build | Yes (Debug + Prod) | | |
| clipboard | Yes | | |
| contextmenus | Yes | | |
| dialogs | Almost | | |
| drag-n-drop | NO | | |
| events | NO | | |
| frameless | Yes | | |
| kitchensink | Yes | | |
| menu | Yes | | |
| plain | Yes | | |
| plugins | Yes | | |
| screen | Yes | | |
| systray | Yes | | Yes |
| window | Yes | | |
| windowjs | Example not complete | | |
| wml | Yes | | |

# Alpha Release TODO

- [ ] Check all runtime methods are available in the JS runtime

# Beta Release TODO

- [ ] Make better looking examples
3 changes: 2 additions & 1 deletion mkdocs-website/docs/roadmap.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,15 @@ The main goal is to get most of the examples working on all platforms.
| plain | W | W | |
| screen | W | W | |
| systray | W | W | |
| video | | W | |
| window | P | W | |
| wml | | W | |

- Mac Dialogs work, however the file dialogs issue a warning that needs to be fixed.

#### TODO:

- [ ] Fix `+[CATransaction synchronize] called within transaction` warnings on mac
- [ ] Fix `+[CATransaction synchronize] called within transaction` warnings on Mac
- [ ] When hiding window, application terminates

### Alpha 2
Expand Down
19 changes: 19 additions & 0 deletions v3/examples/video/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Video Example

This example shows support for HTML5 video.

## Running the example

To run the example, simply run the following command:

```bash
go run .
```

# Status

| Platform | Status |
|----------|---------|
| Mac | |
| Windows | Working |
| Linux | |
51 changes: 51 additions & 0 deletions v3/examples/video/go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
module frameless

go 1.21

toolchain go1.21.0

require (
github.com/wailsapp/go-webview2 v1.0.9
github.com/wailsapp/wails/v3 v3.0.0-alpha.0
)

require (
github.com/Microsoft/go-winio v0.4.16 // indirect
github.com/bep/debounce v1.2.1 // indirect
github.com/ebitengine/purego v0.4.0-alpha.4 // indirect
github.com/emirpasic/gods v1.12.0 // indirect
github.com/go-git/gcfg v1.5.0 // indirect
github.com/go-git/go-billy/v5 v5.2.0 // indirect
github.com/go-git/go-git/v5 v5.3.0 // indirect
github.com/go-ole/go-ole v1.2.6 // indirect
github.com/godbus/dbus/v5 v5.1.0 // indirect
github.com/google/uuid v1.3.0 // indirect
github.com/imdario/mergo v0.3.12 // indirect
github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect
github.com/jchv/go-winloader v0.0.0-20210711035445-715c2860da7e // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/kevinburke/ssh_config v0.0.0-20201106050909-4977a11b4351 // indirect
github.com/leaanthony/go-ansi-parser v1.6.1 // indirect
github.com/leaanthony/u v1.1.0 // indirect
github.com/lmittmann/tint v1.0.0 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-isatty v0.0.19 // indirect
github.com/mitchellh/go-homedir v1.1.0 // indirect
github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421 // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8 // indirect
github.com/rivo/uniseg v0.4.4 // indirect
github.com/samber/lo v1.38.1 // indirect
github.com/sergi/go-diff v1.2.0 // indirect
github.com/wailsapp/mimetype v1.4.1 // indirect
github.com/xanzy/ssh-agent v0.3.0 // indirect
golang.org/x/crypto v0.9.0 // indirect
golang.org/x/exp v0.0.0-20230626212559-97b1e661b5df // indirect
golang.org/x/net v0.10.0 // indirect
golang.org/x/sys v0.13.0 // indirect
gopkg.in/warnings.v0 v0.1.2 // indirect
)

replace github.com/wailsapp/wails/v3 => ../..

replace github.com/wailsapp/go-webview2 => D:\GolandProjects\go-webview2
Loading

0 comments on commit ff08a5c

Please sign in to comment.