Files

388 lines
24 KiB
Markdown
Raw Permalink Normal View History

2023-04-18 18:53:39 +10:00
# Status
2023-09-05 18:26:10 +10:00
Status of features in v3.
2023-04-18 18:53:39 +10:00
2023-09-04 21:27:59 +10:00
!!! note
This list is a mixture of public and internal API support.<br/>
It is not complete and probably not up to date.
2023-09-04 20:50:32 +10:00
## Known Issues
- Linux is not yet up to feature parity with Windows/Mac
2023-06-10 10:19:33 +10:00
2023-04-18 18:53:39 +10:00
## Application
Application interface methods
| Method | Windows | Linux | Mac | Notes |
2023-11-05 18:06:11 +11:00
| ------------------------------------------------------------- | ------- | ----- | --- | ----- |
2023-06-15 14:04:26 -05:00
| run() error | Y | Y | Y | |
| destroy() | | Y | Y | |
2023-09-25 20:56:29 +10:00
| setApplicationMenu(menu \*Menu) | Y | Y | Y | |
2023-06-15 14:04:26 -05:00
| name() string | | Y | Y | |
| getCurrentWindowID() uint | Y | Y | Y | |
| showAboutDialog(name string, description string, icon []byte) | | Y | Y | |
| setIcon(icon []byte) | - | Y | Y | |
| on(id uint) | | | Y | |
2023-06-15 14:04:26 -05:00
| dispatchOnMainThread(fn func()) | Y | Y | Y | |
| hide() | Y | Y | Y | |
| show() | Y | Y | Y | |
2023-09-25 20:56:29 +10:00
| getPrimaryScreen() (\*Screen, error) | | Y | Y | |
| getScreens() ([]\*Screen, error) | | Y | Y | |
2023-04-18 18:53:39 +10:00
## Webview Window
Webview Window Interface Methods
| Method | Windows | Linux | Mac | Notes |
2023-11-05 18:06:11 +11:00
| -------------------------------------------------- | ------- | ----- | --- | ---------------------------------------- |
2023-05-02 16:02:22 -05:00
| center() | Y | Y | Y | |
2023-06-22 19:46:10 +10:00
| close() | y | Y | Y | |
2023-05-02 16:02:22 -05:00
| destroy() | | Y | Y | |
2023-06-22 19:46:10 +10:00
| execJS(js string) | y | Y | Y | |
2023-05-02 16:02:22 -05:00
| focus() | Y | Y | | |
| forceReload() | | Y | Y | |
| fullscreen() | Y | Y | Y | |
2023-09-25 20:56:29 +10:00
| getScreen() (\*Screen, error) | y | Y | Y | |
2023-05-02 16:02:22 -05:00
| getZoom() float64 | | Y | Y | |
| height() int | Y | Y | Y | |
| hide() | Y | Y | Y | |
| isFullscreen() bool | Y | Y | Y | |
| isMaximised() bool | Y | Y | Y | |
| isMinimised() bool | Y | Y | Y | |
| maximise() | Y | Y | Y | |
| minimise() | Y | Y | Y | |
2023-11-02 13:43:35 -05:00
| nativeWindowHandle() (uintptr, error) | Y | Y | Y | |
2023-06-22 19:46:10 +10:00
| on(eventID uint) | y | | Y | |
2023-11-02 13:43:35 -05:00
| openContextMenu(menu *Menu, data *ContextMenuData) | y | Y | Y | |
2023-06-23 20:50:54 +10:00
| relativePosition() (int, int) | Y | Y | Y | |
2023-06-22 19:46:10 +10:00
| reload() | y | Y | Y | |
2023-05-02 16:02:22 -05:00
| run() | Y | Y | Y | |
| setAlwaysOnTop(alwaysOnTop bool) | Y | Y | Y | |
| setBackgroundColour(color RGBA) | Y | Y | Y | |
| setEnabled(bool) | | Y | Y | |
2023-05-02 16:02:22 -05:00
| setFrameless(bool) | | Y | Y | |
| setFullscreenButtonEnabled(enabled bool) | - | Y | Y | There is no fullscreen button in Windows |
2023-06-22 19:46:10 +10:00
| setHTML(html string) | Y | Y | Y | |
2023-05-02 16:02:22 -05:00
| setMaxSize(width, height int) | Y | Y | Y | |
| setMinSize(width, height int) | Y | Y | Y | |
2023-06-23 20:50:54 +10:00
| setRelativePosition(x int, y int) | Y | Y | Y | |
2023-05-02 16:02:22 -05:00
| setResizable(resizable bool) | Y | Y | Y | |
| setSize(width, height int) | Y | Y | Y | |
| setTitle(title string) | Y | Y | Y | |
2023-06-22 19:46:10 +10:00
| setURL(url string) | Y | Y | Y | |
| setZoom(zoom float64) | Y | Y | Y | |
2023-05-02 16:02:22 -05:00
| show() | Y | Y | Y | |
| size() (int, int) | Y | Y | Y | |
2023-06-22 19:46:10 +10:00
| toggleDevTools() | Y | Y | Y | |
2023-05-02 16:02:22 -05:00
| unfullscreen() | Y | Y | Y | |
| unmaximise() | Y | Y | Y | |
| unminimise() | Y | Y | Y | |
| width() int | Y | Y | Y | |
| zoom() | | Y | Y | |
2023-06-22 19:46:10 +10:00
| zoomIn() | Y | Y | Y | |
| zoomOut() | Y | Y | Y | |
| zoomReset() | Y | Y | Y | |
2023-04-18 18:53:39 +10:00
## Runtime
### Application
| Feature | Windows | Linux | Mac | Notes |
2023-11-05 18:06:11 +11:00
| ------- | ------- | ----- | --- | ----- |
| Quit | Y | Y | Y | |
2023-11-02 13:43:35 -05:00
| Hide | Y | Y | Y | |
| Show | Y | | Y | |
2023-04-18 18:53:39 +10:00
### Dialogs
| Feature | Windows | Linux | Mac | Notes |
2023-11-05 18:06:11 +11:00
| -------- | ------- | ----- | --- | ----- |
2023-06-15 14:04:26 -05:00
| Info | Y | Y | Y | |
| Warning | Y | Y | Y | |
| Error | Y | Y | Y | |
| Question | Y | Y | Y | |
2023-11-02 13:43:35 -05:00
| OpenFile | Y | Y | Y | |
| SaveFile | Y | Y | Y | |
2023-04-18 18:53:39 +10:00
### Clipboard
| Feature | Windows | Linux | Mac | Notes |
2023-11-02 13:43:35 -05:00
|---------|---------|-------|-----|-------|
| SetText | Y | Y | Y | |
| Text | Y | Y | Y | |
2023-04-18 18:53:39 +10:00
### ContextMenu
2023-06-20 08:36:39 +10:00
| Feature | Windows | Linux | Mac | Notes |
2023-11-02 13:43:35 -05:00
|------------------|---------|-------|-----|-------|
| OpenContextMenu | Y | Y | Y | |
2023-06-20 08:36:39 +10:00
| On By Default | | | | |
| Control via HTML | Y | | | |
2023-09-25 20:56:29 +10:00
The default context menu is enabled by default for all elements that are
`contentEditable: true`, `<input>` or `<textarea>` tags or have the
`--default-contextmenu: true` style set. The `--default-contextmenu: show` style
will always show the context menu The `--default-contextmenu: hide` style will
always hide the context menu
2023-09-25 20:56:29 +10:00
Anything nested under a tag with `--default-contextmenu: hide` style will not
show the context menu unless it is explicitly set with
`--default-contextmenu: show`.
2023-04-18 18:53:39 +10:00
### Screens
| Feature | Windows | Linux | Mac | Notes |
2023-11-05 18:06:11 +11:00
| ---------- | ------- | ----- | --- | ----- |
2023-06-15 14:04:26 -05:00
| GetAll | Y | Y | Y | |
| GetPrimary | Y | Y | Y | |
| GetCurrent | Y | Y | Y | |
### System
| Feature | Windows | Linux | Mac | Notes |
2023-11-05 18:06:11 +11:00
| ---------- | ------- | ----- | --- | ----- |
| IsDarkMode | | | Y | |
2023-04-18 18:53:39 +10:00
### Window
2023-09-25 20:56:29 +10:00
Y = Supported U = Untested
2023-06-23 20:50:54 +10:00
- = Not available
2023-04-18 21:27:09 +10:00
| Feature | Windows | Linux | Mac | Notes |
2023-11-05 18:06:11 +11:00
| ------------------- | ------- | ----- | --- | ------------------------------------------------------------------------------------ |
| Center | Y | Y | Y | |
2023-05-02 16:02:22 -05:00
| Focus | Y | Y | | |
| FullScreen | Y | Y | Y | |
| GetZoom | Y | Y | Y | Get current view scale |
2023-05-02 16:02:22 -05:00
| Height | Y | Y | Y | |
| Hide | Y | Y | Y | |
| Maximise | Y | Y | Y | |
| Minimise | Y | Y | Y | |
2023-06-23 20:50:54 +10:00
| RelativePosition | Y | Y | Y | |
| 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 |
2023-10-23 20:49:21 +11:00
| SetEnabled | Y | U | - | Set the window to be enabled/disabled |
| SetMaxSize | Y | Y | Y | |
| SetMinSize | Y | Y | Y | |
2023-06-23 20:50:54 +10:00
| SetRelativePosition | Y | Y | Y | |
| SetResizable | Y | Y | Y | |
| SetSize | Y | Y | Y | |
| SetTitle | Y | Y | Y | |
| SetZoom | Y | Y | Y | Set view scale |
| Show | Y | Y | Y | |
| Size | Y | Y | Y | |
| UnFullscreen | Y | Y | Y | |
| UnMaximise | Y | Y | Y | |
| UnMinimise | Y | Y | Y | |
| Width | Y | Y | Y | |
2023-06-22 19:46:10 +10:00
| ZoomIn | Y | Y | Y | Increase view scale |
| ZoomOut | Y | Y | Y | Decrease view scale |
| ZoomReset | Y | Y | Y | Reset view scale |
2023-04-18 18:53:39 +10:00
2023-05-02 23:18:22 +10:00
### Window Options
2023-09-25 20:56:29 +10:00
A 'Y' in the table below indicates that the option has been tested and is
applied when the window is created. An 'X' indicates that the option is not
supported by the platform.
2023-05-02 23:18:22 +10:00
| Feature | Windows | Linux | Mac | Notes |
2023-11-02 13:43:35 -05:00
|---------------------------------|---------|-------|-----|--------------------------------------------|
| AlwaysOnTop | Y | Y | | |
2023-06-15 14:04:26 -05:00
| BackgroundColour | Y | Y | | |
| BackgroundType | | | | Acrylic seems to work but the others don't |
2023-06-15 14:04:26 -05:00
| CSS | Y | Y | | |
| DevToolsEnabled | Y | Y | Y | |
| DisableResize | Y | Y | | |
| EnableDragAndDrop | | Y | | |
| EnableFraudulentWebsiteWarnings | | | | |
2023-06-15 14:04:26 -05:00
| Focused | Y | Y | | |
| Frameless | Y | Y | | |
| FullscreenButtonEnabled | Y | | | |
2023-06-15 14:04:26 -05:00
| Height | Y | Y | | |
| Hidden | Y | Y | | |
| HTML | Y | Y | | |
| JS | Y | Y | | |
| Mac | - | - | | |
2023-06-15 14:04:26 -05:00
| MaxHeight | Y | Y | | |
| MaxWidth | Y | Y | | |
| MinHeight | Y | Y | | |
| MinWidth | Y | Y | | |
| Name | Y | Y | | |
| OpenInspectorOnStartup | | | | |
| StartState | Y | | | |
2023-06-15 14:04:26 -05:00
| Title | Y | Y | | |
| URL | Y | Y | | |
| Width | Y | Y | | |
| Windows | Y | - | - | |
2023-06-15 14:04:26 -05:00
| X | Y | Y | | |
| Y | Y | Y | | |
| Zoom | | | | |
| ZoomControlEnabled | | | | |
2023-05-02 23:18:22 +10:00
2023-04-18 18:53:39 +10:00
### Log
To log or not to log? System logger vs custom logger.
## Menu
| Event | Windows | Linux | Mac | Notes |
2023-11-05 18:06:11 +11:00
| ------------------------ | ------- | ----- | --- | ----- |
| Default Application Menu | Y | Y | Y | |
2023-04-18 18:53:39 +10:00
## Tray Menus
| Feature | Windows | Linux | Mac | Notes |
2023-11-02 13:43:35 -05:00
|--------------------|---------|-------|-----|----------------------------------------------------------------------|
| Icon | Y | Y | Y | Windows has default icons for light/dark mode & supports PNG or ICO. |
| Label | - | Y | Y | |
| Label (ANSI Codes) | - | | | |
2023-11-02 13:43:35 -05:00
| Menu | Y | Y | Y | |
2023-04-18 18:53:39 +10:00
2023-06-06 21:07:28 +10:00
### Methods
| Method | Windows | Linux | Mac | Notes |
2023-11-05 18:06:11 +11:00
| ----------------------------- | ------- | ----- | --- | ----- |
2023-11-02 13:43:35 -05:00
| setLabel(label string) | - | Y | Y | |
| run() | Y | Y | Y | |
| setIcon(icon []byte) | Y | Y | Y | |
| setMenu(menu \*Menu) | Y | Y | Y | |
| setIconPosition(position int) | - | Y | Y | |
| setTemplateIcon(icon []byte) | - | Y | Y | |
| destroy() | Y | Y | Y | |
| setDarkModeIcon(icon []byte) | Y | Y | Y | Darkmode isn't handled yet (linux) |
2023-06-06 21:07:28 +10:00
2023-04-18 18:53:39 +10:00
## Cross Platform Events
Mapping native events to cross-platform events.
| Event | Windows | Linux | Mac | Notes |
2023-11-05 18:06:11 +11:00
| ------------------------ | ------- | ----- | --------------- | ----- |
2023-04-18 18:53:39 +10:00
| WindowWillClose | | | WindowWillClose | |
| WindowDidClose | | | | |
| WindowDidResize | | | | |
| WindowDidHide | | | | |
| ApplicationWillTerminate | | | | |
... Add more
## Bindings Generation
2023-09-04 21:27:59 +10:00
Working well.
2023-04-18 18:53:39 +10:00
## Models Generation
2023-09-04 21:27:59 +10:00
Working well.
2023-04-18 18:53:39 +10:00
## Task file
2023-09-04 21:27:59 +10:00
Contains a lot needed for development.
2023-04-18 18:53:39 +10:00
## Theme
| Mode | Windows | Linux | Mac | Notes |
2023-11-05 18:06:11 +11:00
| ------ | ------- | ----- | --- | ----- |
| Dark | Y | | | |
| Light | Y | | | |
| System | Y | | | |
2023-04-18 18:53:39 +10:00
## NSIS Installer
TBD
## Templates
2023-09-04 21:27:59 +10:00
All templates are working.
2023-04-18 18:53:39 +10:00
## Plugins
Built-in plugin support:
| Plugin | Windows | Linux | Mac | Notes |
2023-11-05 18:06:11 +11:00
| --------------- | ------- | ----- | --- | ----- |
2023-06-09 20:44:24 +10:00
| Browser | Y | | Y | |
2023-06-15 14:04:26 -05:00
| KV Store | Y | Y | Y | |
| Log | Y | Y | Y | |
2023-06-09 20:44:24 +10:00
| Single Instance | Y | | Y | |
2023-06-15 14:04:26 -05:00
| SQLite | Y | Y | Y | |
2023-09-04 21:27:59 +10:00
| Start at login | Y | | Y | |
2023-04-18 18:53:39 +10:00
| Server | | | | |
2023-06-15 14:04:26 -05:00
TODO:
2023-06-10 10:19:33 +10:00
- Ensure each plugin has a JS wrapper that can be injected into the window.
2023-04-18 18:53:39 +10:00
## Packaging
| | Windows | Linux | Mac | Notes |
2023-11-05 18:06:11 +11:00
| --------------- | ------- | ----- | --- | ----- |
2023-06-10 10:19:33 +10:00
| Icon Generation | Y | | Y | |
| Icon Embedding | Y | | Y | |
| Info.plist | - | | Y | |
| NSIS Installer | | | - | |
2023-06-10 10:19:33 +10:00
| Mac bundle | - | | Y | |
| Windows exe | Y | | - | |
2023-04-18 18:53:39 +10:00
## Frameless Windows
| Feature | Windows | Linux | Mac | Notes |
2023-11-05 18:06:11 +11:00
| ------- | ------- | ----- | --- | ---------------------------------------------- |
| Resize | Y | | Y | |
| Drag | Y | Y | Y | Linux - can always drag with `Meta`+left mouse |
2023-05-02 16:02:22 -05:00
2023-04-18 18:53:39 +10:00
## Mac Specific
- [x] Translucency
2023-05-16 18:00:17 +10:00
### Mac Options
2023-05-26 21:20:11 +10:00
| Feature | Default | Notes |
2023-11-05 18:06:11 +11:00
| ----------------------- | ----------------- | ---------------------------------------------------- |
2023-05-26 21:20:11 +10:00
| Backdrop | MacBackdropNormal | Standard solid window |
| DisableShadow | false | |
| TitleBar | | Standard window decorations by default |
| Appearance | DefaultAppearance | |
2023-05-16 18:00:17 +10:00
| InvisibleTitleBarHeight | 0 | Creates an invisible title bar for frameless windows |
2023-06-10 10:19:33 +10:00
| DisableShadow | false | Disables the window drop shadow |
2023-05-16 18:00:17 +10:00
2023-04-18 18:53:39 +10:00
## Windows Specific
2023-09-05 18:26:10 +10:00
- [x] Translucency
- [x] Custom Themes
### Windows Options
2023-09-05 18:26:10 +10:00
| Feature | Default | Notes |
2023-11-05 18:06:11 +11:00
| --------------------------------- | ------------- | ------------------------------------------- |
2023-09-05 18:26:10 +10:00
| BackdropType | Solid | |
| DisableIcon | false | |
| Theme | SystemDefault | |
| CustomTheme | nil | |
| DisableFramelessWindowDecorations | false | |
| WindowMask | nil | Makes the window the contents of the bitmap |
2023-04-18 18:53:39 +10:00
## Linux Specific
2023-09-25 20:56:29 +10:00
Implementation details for the functions utilized by the `*_linux.go` files are
located in the following files:
2023-06-15 14:04:26 -05:00
- linux_cgo.go: CGo implementation
- linux_purego.go: PureGo implementation
### CGO
2023-09-25 20:56:29 +10:00
By default CGO is utilized to compile the Linux port. This prevents easy
cross-compilation and so the PureGo implementation is also being simultaneously
developed.
2023-06-15 14:04:26 -05:00
### Purego
The examples can be compiled using the following command:
CGO_ENABLED=0 go build -tags purego
Note: things are currently not working after the refactor