platform

package
v0.0.0-...-0e5d3d6 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2026 License: MIT Imports: 2 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

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MDNSHostname

func MDNSHostname(name string) string

MDNSHostname returns the hostname advertised for a service name.

The responder matches queried names exactly, while browsers lowercase hostnames before resolving them — so a mixed-case name would advertise a host that the browser then fails to look up. Lowercasing here means any capitalization works: --name Android is reachable at android.local.

Types

type Platform

type Platform string

Platform names the operating system of the target device. Roadie cannot discover it — nothing about a capture stream or a USB HID link identifies the far end — but it changes how the target behaves, so it is worth stating once at launch rather than working around per symptom.

const (
	PlatformAndroid Platform = "android"
	PlatformIOS     Platform = "ios"
	PlatformMac     Platform = "mac"
	PlatformWindows Platform = "windows"
	PlatformLinux   Platform = "linux"
)

func ParsePlatform

func ParsePlatform(s string) (Platform, error)

ParsePlatform normalizes a --platform value. Empty stays empty, meaning unspecified: Roadie then behaves exactly as it did before the flag existed.

func (Platform) DefaultInputMode

func (p Platform) DefaultInputMode() string

DefaultInputMode is the pointer mode that suits the platform, used when --input is not given. Empty means "no opinion", leaving the viewer to decide as before.

func (Platform) PointerSpace

func (p Platform) PointerSpace() string

PointerSpace reports which coordinate space the target's absolute pointer addresses — the only place a wrong answer is silently destructive.

"screen" means 0-32767 spans the target's own display; "frame" means it spans the whole captured frame, letterbox bars included.

This is measured, not assumed. An iPhone mirroring into 1920x1080 maps the range across its own screen: sweeping X put the pointer at 25%, 50% and 75% of the phone's display, with no clamping at the pillarbox edges. A Pixel mirroring into the same frame does the opposite — a tap aimed with the frame mapping opened the app under it, while the screen mapping landed on empty wallpaper 35% away.

Everything unverified keeps "frame", which is what Roadie has always done.

func (Platform) TouchAsPointer

func (p Platform) TouchAsPointer() bool

TouchAsPointer reports whether touch has to reach the target as its pointer. iOS takes no external touchscreen, but a held mouse button is a finger to it, so a script, agent or viewer that touches still taps, presses and swipes.

Jump to

Keyboard shortcuts

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