pub fn with_direct_handlers(
        event_loop: &ActiveEventLoop,
        window: &Window,
        activation_handler: impl 'static + ActivationHandler + Send,
        action_handler: impl 'static + ActionHandler + Send,
        deactivation_handler: impl 'static + DeactivationHandler + Send,
    ) -> Self {
        if window.is_visible() == Some(true) {
            panic!("The AccessKit winit adapter must be created before the window is shown (made visible) for the first time.");
        }

        let inner = platform_impl::Adapter::new(
            event_loop,
            window,
            activation_handler,
            action_handler,
            deactivation_handler,
        );
        Self { inner }
    }
Creates a new AccessKit adapter for a winit window. This must be done
before the window is shown for the first time. This means that you must
use [`winit::window::WindowAttributes::with_visible`] to make the window
initially invisible, then create the adapter, then show the window.

Use this if you want to provide your own AccessKit handler callbacks
rather than dispatching requests through the winit event loop. This is
especially useful for the activation handler, because depending on
your application's architecture, implementing the handler directly may
allow you to return an initial tree synchronously, rather than requiring
some platform adapters to use a placeholder tree until you send
the first update. However, remember that each of these handlers may be
called on any thread, depending on the underlying platform adapter.

# Panics

Panics if the window is already visible.
platforms/winit/src/lib.rs