async fn new_handler(
        configuration_proxy: pointerinjector_config::SetupProxy,
        injector_registry_proxy: pointerinjector::RegistryProxy,
        display_size: Size,
    ) -> Result<Rc<Self>, Error> {
        // Get the context and target views to inject into.
        let (context_view_ref, target_view_ref) = configuration_proxy.get_view_refs().await?;

        let handler = Rc::new(Self {
            inner: RefCell::new(TouchInjectorHandlerInner {
                viewport: None,
                injectors: HashMap::new(),
            }),
            context_view_ref,
            target_view_ref,
            display_size,
            injector_registry_proxy,
            configuration_proxy,
        });

        Ok(handler)
    }
/// Creates a new touch handler that holds touch pointer injectors.
/// The caller is expected to spawn a task to continually watch for updates to the viewport.
/// Example:
/// let handler = TouchInjectorHandler::new_handler(None, None, display_size).await?;
/// fasync::Task::local(handler.clone().watch_viewport()).detach();
///
/// # Parameters
/// - `configuration_proxy`: A proxy used to get configuration details for pointer
///    injection.
/// - `injector_registry_proxy`: A proxy used to register new pointer injectors.  If
///    none is provided, connect to protocol routed to this component.
/// - `display_size`: The size of the associated touch display.
///
/// # Errors
/// If unable to get injection view refs from `configuration_proxy`.
Creates a new touch handler that holds touch pointer injectors.
The caller is expected to spawn a task to continually watch for updates to the viewport.
Creates a new touch handler that holds touch pointer injectors . The caller is expected to spawn a task to continually watch for updates to the viewport .
async fn new_handler(
        configuration_proxy: pointerinjector_config::SetupProxy,
        injector_registry_proxy: pointerinjector::RegistryProxy,
        display_size: Size,
    ) -> Result<Rc<Self>, Error> {
        // Get the context and target views to inject into.
        let (context_view_ref, target_view_ref) = configuration_proxy.get_view_refs().await?;
        let handler = Rc::new(Self {
            inner: RefCell::new(TouchInjectorHandlerInner {
                viewport: None,
                injectors: HashMap::new(),
            }),
            context_view_ref,
            target_view_ref,
            display_size,
            injector_registry_proxy,
            configuration_proxy,
        });
        Ok(handler)
    }
async fn new_handler ( configuration_proxy : pointerinjector_config :: SetupProxy , injector_registry_proxy : pointerinjector :: RegistryProxy , display_size : Size , ) -> Result < Rc < Self > , Error > { // Get the context and target views to inject into. let ( context_view_ref , target_view_ref ) = configuration_proxy . get_view_refs ( ) . await ? ; let handler = Rc :: new ( Self { inner : RefCell :: new ( TouchInjectorHandlerInner { viewport : None , injectors : HashMap :: new ( ) , } ) , context_view_ref , target_view_ref , display_size , injector_registry_proxy , configuration_proxy , } ) ; Ok ( handler ) }
Creates a new touch handler that holds touch pointer injectors.
Creates a new touch handler that holds touch pointer injectors .
configuration_proxy
pointerinjector_config::SetupProxy
injector_registry_proxy
pointerinjector::RegistryProxy
display_size
Size
configuration_proxy
pointerinjector_config::SetupProxy
A proxy used to get configuration details for pointer
injection.
A proxy used to get configuration details for pointer injection .
injector_registry_proxy
pointerinjector::RegistryProxy
A proxy used to register new pointer injectors.  If
none is provided, connect to protocol routed to this component.
A proxy used to register new pointer injectors . If none is provided connect to protocol routed to this component .
display_size
Size
The size of the associated touch display.
The size of the associated touch display .
errors
If unable to get injection view refs from `configuration_proxy`.
If unable to get injection view refs from ` configuration_proxy ` .