Skip to content

Commit

Permalink
Merge pull request #40 from ayangweb/v2
Browse files Browse the repository at this point in the history
docs: updated `README.md` to support tauri v2 usage
  • Loading branch information
lucasfernog-crabnebula authored Oct 22, 2024
2 parents 1f7818e + c62a984 commit b513335
Showing 1 changed file with 29 additions and 1 deletion.
30 changes: 29 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Start a drag operation out of a window on macOS, Windows and Linux (via GTK).

Tested for [tao](https://github.com/tauri-apps/tao) (latest), [winit](https://github.com/rust-windowing/winit) (latest), [wry](https://github.com/tauri-apps/wry) (v0.24) and [tauri](https://github.com/tauri-apps/tauri) (v1) windows.
Tested for [tao](https://github.com/tauri-apps/tao) (latest), [winit](https://github.com/rust-windowing/winit) (latest), [wry](https://github.com/tauri-apps/wry) (v0.46) and [tauri](https://github.com/tauri-apps/tauri) (v2) windows.
Due to the GTK-based implementation, winit currently cannot leverage this crate on Linux yet.

This project also includes a Tauri plugin for simplified usage on Tauri apps.
Expand Down Expand Up @@ -120,6 +120,20 @@ fn main() {
}
```

- Add permissions

`capabilities/default.json`

```json
{
...
"permissions": [
...
"drag:default"
]
}
```

- Afterwards all the plugin's APIs are available through the JavaScript guest bindings:

```javascript
Expand Down Expand Up @@ -156,6 +170,20 @@ fn main() {
}
```

- Add permissions

`capabilities/default.json`

```json
{
...
"permissions": [
...
"drag-as-window:default"
]
}
```

- Afterwards all the plugin's APIs are available through the JavaScript guest bindings:

```javascript
Expand Down

0 comments on commit b513335

Please sign in to comment.