Skip to main content

Crate asdf_overlay

Crate asdf_overlay 

Source
Expand description

§Asdf Overlay

Asdf overlay let you put overlay infront of existing windows gpu framebuffer.

It hooks various graphics API call to detect graphical windows in the process. Asdf overlay automatically decides which graphics API the window is using, chooses suitable renderer.

It can also capture inputs going through the target window. You can listen them or even block them from reaching application handlers.

§Example

use asdf_overlay::initialize;
use asdf_overlay::event_sink::OverlayEventSink;

let module_handle, window_hwnd;
// Initialize asdf-overlay.
initialize(module_handle).expect("initialization failed");

// Initialize Event sink.
// Without setting it, the overlay will not render.
// This is intended because windows state will be out of sync if you miss any events.
OverlayEventSink::set(move |event| {
    // Do something with events.
});

Backends::with_backend(window_hwnd, |backend| {
    // Do something with overlay window backend.
});

Modules§

event_sink
Provides OverlayEventSink for receiving [OverlayEvent] from overlay system.
interop
surface
Manage window states for rendering overlays. You can access states for specific window using [Backends::with_backend]. This allows you to interact with the overlay state of a window, including its layout and rendering data.

Functions§

initialize
Initialize overlay, hooks.