Skip to main content

dioxus_desktop/
lib.rs

1#![doc = include_str!("readme.md")]
2#![doc(html_logo_url = "https://avatars.githubusercontent.com/u/79236386")]
3#![doc(html_favicon_url = "https://avatars.githubusercontent.com/u/79236386")]
4#![deny(missing_docs)]
5#![cfg_attr(docsrs, feature(doc_cfg))]
6#![allow(unexpected_cfgs)]
7
8mod android_sync_lock;
9mod app;
10mod assets;
11mod config;
12mod default_icon;
13mod desktop_context;
14mod document;
15mod edits;
16mod element;
17mod event_handlers;
18mod events;
19mod file_upload;
20mod hooks;
21mod ipc;
22mod menubar;
23mod mobile;
24mod protocol;
25mod query;
26mod shortcut;
27mod waker;
28mod webview;
29
30// mobile shortcut is only supported on mobile platforms
31#[cfg(any(target_os = "ios", target_os = "android"))]
32mod mobile_shortcut;
33
34/// The main entrypoint for this crate
35pub mod launch;
36
37// Reexport tao and wry, might want to re-export other important things
38pub use tao;
39pub use tao::dpi::{LogicalPosition, LogicalSize};
40pub use tao::event::WindowEvent;
41pub use tao::window::WindowBuilder;
42pub use wry;
43// Reexport muda only if we are on desktop platforms that support menus
44#[cfg(not(any(target_os = "ios", target_os = "android")))]
45pub use muda;
46
47// Tray icon
48#[cfg(any(target_os = "windows", target_os = "linux", target_os = "macos"))]
49pub mod trayicon;
50
51// Public exports
52pub use assets::AssetRequest;
53pub use config::{Config, WindowCloseBehaviour};
54pub use default_icon::{default_icon, icon_from_memory, icon_from_path};
55pub use desktop_context::{
56    window, DesktopContext, DesktopService, PendingDesktopContext, WeakDesktopContext,
57};
58pub use event_handlers::WryEventHandler;
59pub use hooks::*;
60pub use shortcut::{HotKeyState, ShortcutHandle, ShortcutRegistryError};
61pub use wry::RequestAsyncResponder;