Skip to content

Commit

Permalink
feat: expose tray feature flag (#256)
Browse files Browse the repository at this point in the history
* feat: expose tray feature flag

* Add changefile

* Update default flag

* Update documentation
  • Loading branch information
lemarier authored May 10, 2021
1 parent bdb13cb commit 093c25e
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 5 deletions.
5 changes: 5 additions & 0 deletions .changes/feature-flags.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"wry": patch
---

Add `tray` feature flag from tao.
3 changes: 2 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,12 @@ targets = [
]

[features]
default = [ "file-drop", "protocol", "win32", "menu" ]
default = [ "file-drop", "protocol", "win32", "tray" ]
file-drop = [ ]
protocol = [ ]
dox = [ "tao/dox" ]
menu = [ "tao/menu" ]
tray = [ "tao/tray" ]
winrt = [ "windows-webview2", "windows" ]
win32 = [ "webview2", "winapi", "webview2-sys" ]

Expand Down
12 changes: 8 additions & 4 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,16 +46,20 @@
//! ## Feature flags
//!
//! Wry uses a set of feature flags to toggle several advanced features. `file-drop`, `protocol`,
//! `menu`, and `win32` are enabled by default.
//! `tray`, and `win32` are enabled by default.
//!
//! - `file-drop`: Enables [`with_file_drop_handler`] to control the behaviour when there are files
//! interacting with the window.
//! - `protocol`: Enables [`with_custom_protocol`] to define custom URL scheme for handling tasks like
//! loading assets.
//! - `menu`: Enables system tray and more menu item variants on **Linux**. You can still create
//! - `tray`: Enables system tray and more menu item variants on **Linux**. You can still create
//! those types if you disable it. They just don't create the actual objects. We set this flag
//! because some implementations require more installed packages. Disable this if you don't want to
//! install those additional packages.
//! because some implementations require more installed packages. Disable this if you don't want
//! to install `libappindicator` and `sourceview` package.
//! - `menu`: Enables menu item variants on **Linux**. You can still create those types if you
//! you disable it. They just don't create the actual objects. We set this flag because some
//! implementations require more installed packages. Disable this if you don't want to install
//! `sourceview` package.
//! - `win32`: Enables purely Win32 APIs to build the WebView on **Windows**. This makes backward
//! compatibility down to Windows 7 possible.
//! - `winrt`: Enables up-to-date Windows Runtime support to build the WebView on **Windows**. WinRT
Expand Down

0 comments on commit 093c25e

Please sign in to comment.