mirror of
https://github.com/wailsapp/wails.git
synced 2026-03-14 14:45:49 +01:00
1.5 KiB
1.5 KiB
Window
The Window API has largely remained the same, however the methods are now on an instance of a window rather than the runtime. Some notable differences are:
- Windows now have a Name that identifies them. This is used to identify the window when emitting events.
- Windows have even more methods that were previously unavailable, such
as
SetFramelessandToggleDevTools. - Windows can now accept files via native drag and drop. See the Drag and Drop section for more details.
BackgroundColour
In v2, this was a pointer to an RGBA struct. In v3, this is an RGBA struct
value.
WindowIsTranslucent
This flag has been removed. Now there is a BackgroundType flag that can be
used to set the type of background the window should have. This flag can be set
to any of the following values:
BackgroundTypeSolid- The window will have a solid backgroundBackgroundTypeTransparent- The window will have a transparent backgroundBackgroundTypeTranslucent- The window will have a translucent background
On Windows, if the BackgroundType is set to BackgroundTypeTranslucent, the
type of translucency can be set using the BackdropType flag in the
WindowsWindow options. This can be set to any of the following values:
Auto- The window will use an effect determined by the systemNone- The window will have no backgroundMica- The window will use the Mica effectAcrylic- The window will use the acrylic effectTabbed- The window will use the tabbed effect