rustdesk/vendor/tao/examples
2024-10-11 18:43:02 +03:00
..
control_flow.rs Performed vendorization 2024-10-11 18:43:02 +03:00
cursor_grab.rs Performed vendorization 2024-10-11 18:43:02 +03:00
cursor.rs Performed vendorization 2024-10-11 18:43:02 +03:00
custom_events.rs Performed vendorization 2024-10-11 18:43:02 +03:00
drag_window.rs Performed vendorization 2024-10-11 18:43:02 +03:00
fullscreen.rs Performed vendorization 2024-10-11 18:43:02 +03:00
handling_close.rs Performed vendorization 2024-10-11 18:43:02 +03:00
min_max_size.rs Performed vendorization 2024-10-11 18:43:02 +03:00
minimize.rs Performed vendorization 2024-10-11 18:43:02 +03:00
monitor_list.rs Performed vendorization 2024-10-11 18:43:02 +03:00
mouse_wheel.rs Performed vendorization 2024-10-11 18:43:02 +03:00
multithreaded.rs Performed vendorization 2024-10-11 18:43:02 +03:00
multiwindow.rs Performed vendorization 2024-10-11 18:43:02 +03:00
parentwindow.rs Performed vendorization 2024-10-11 18:43:02 +03:00
progress_bar.rs Performed vendorization 2024-10-11 18:43:02 +03:00
README.md Performed vendorization 2024-10-11 18:43:02 +03:00
request_redraw_threaded.rs Performed vendorization 2024-10-11 18:43:02 +03:00
request_redraw.rs Performed vendorization 2024-10-11 18:43:02 +03:00
resizable.rs Performed vendorization 2024-10-11 18:43:02 +03:00
set_ime_position.rs Performed vendorization 2024-10-11 18:43:02 +03:00
theme.rs Performed vendorization 2024-10-11 18:43:02 +03:00
timer.rs Performed vendorization 2024-10-11 18:43:02 +03:00
transparent.rs Performed vendorization 2024-10-11 18:43:02 +03:00
video_modes.rs Performed vendorization 2024-10-11 18:43:02 +03:00
window_debug.rs Performed vendorization 2024-10-11 18:43:02 +03:00
window_icon.rs Performed vendorization 2024-10-11 18:43:02 +03:00
window_run_return.rs Performed vendorization 2024-10-11 18:43:02 +03:00
window.rs Performed vendorization 2024-10-11 18:43:02 +03:00

Examples

Run the cargo run --example <file_name> to see how each example works.

  • control_flow: tell event loop what to do in the next iteration, after the current one's finished.
  • custom_events: user can create custom events and emit or listen to them through tao.
  • fullscreen: example for configuring different screen sizes, and video modes.
  • handling_close: close window with a warning.
  • request_redraw_threaded: same as request_redraw but multithreaded.
  • request_redraw: an event emitted when it's needed to redraw (when resizing window for example).
  • timer: an example that makes a timer which suspend the thread for some time.
  • window_run_return: similar to run function of EventLoop, but accept non-move closures and returns control flow to the caller when exit.
  • window_debug: example that debugs with eprintln.

Quite self-explainatory examples.

  • cursor_grab: prevent the cursor from going outside the window.
  • cursor: set different cursor icons.
  • drag_window: allow dragging window when hold left mouse and move.
  • min_max_size: set smallest/largest window size you can zoom.
  • minimize: minimize window.
  • monitor_list: list all available monitors.
  • mouse_wheel: get the difference in scrolling state (MouseScrollDelta) in pixel or line.
  • multithreaded: same as multiwindow but multithreaded.
  • multiwindow: create multiple windows
  • parentwindow: a window inside another window.
  • resizable: allow resizing window or not.
  • set_ime_position: set IME (input method editor) position when click.
  • transparent: make a transparent window.
  • video_modes: example that lists all video modes of primary monitor
  • window_icon: add window icon.
  • window: example that makes a window.