Skip to main content

tauri_plugin_drag_as_window/
lib.rs

1// Copyright 2023-2023 CrabNebula Ltd.
2// SPDX-License-Identifier: Apache-2.0
3// SPDX-License-Identifier: MIT
4
5use tauri::{
6    plugin::{Builder, TauriPlugin},
7    Runtime,
8};
9
10mod commands;
11
12/// Initializes the plugin.
13pub fn init<R: Runtime>() -> TauriPlugin<R> {
14    Builder::new("drag-as-window")
15        .invoke_handler(tauri::generate_handler![
16            commands::drag_new_window,
17            commands::drag_back,
18            commands::on_drop
19        ])
20        .build()
21}