pointerconv

package
v1.17.11 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 22, 2026 License: BSD-3-Clause Imports: 1 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package pointerconv is the converter of the pointer events of a platform that reports them raw, as Flutter's engine has one (Converter): it keeps the state of each device and synthesizes the events that the framework expects in between.

Flutter: lib/ui/window/pointer_data_packet_converter.cc

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Converter

type Converter struct {
	// contains filtered or unexported fields
}

Converter turns the raw pointer data of a touch input (Android, iOS) (change, kind, device, position, no identifier and no delta) into the data the framework needs: it gives each contact a pointer identifier, works out the deltas, and keeps the order the framework checks by synthesizing the add before a hover or a down, the hover before a down at another place, the move before an up at another place, the cancel and remove before a second add, and the hover or move before a signal at another place.

down -> move -> up   becomes   add(synthesized) -> down -> move -> up

Deviation: Flutter's converter is built over a delegate that tells which views exist; here the converter has the function viewExists, which is nil (every view exists) as long as the platform has only the implicit view. The converter does not log the FML_DCHECKs: a change for a pointer that is in a state the checks forbid is handled as the release build of C++ handles it, and a move, up, pan update or pan end for a device the converter has not seen is dropped.

Flutter: lib/ui/window/pointer_data_packet_converter.cc PointerDataPacketConverter

func New

func New() *Converter

New makes a converter that has seen no pointer.

Flutter: lib/ui/window/pointer_data_packet_converter.cc PointerDataPacketConverter.PointerDataPacketConverter

func (*Converter) Convert

func (c *Converter) Convert(in []ui.PointerData) []ui.PointerData

Convert converts a packet of raw data to the data for the framework, in order.

Flutter: lib/ui/window/pointer_data_packet_converter.cc PointerDataPacketConverter.Convert

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL