Documentation
¶
Overview ¶
Package adb defines the screencap and input method flags for ADB controllers, with name parsing helpers.
Index ¶
Constants ¶
const ( // ScreencapNone selects no ADB screencap method. ScreencapNone ScreencapMethod = 0 // ScreencapEncodeToFileAndPull selects the EncodeToFileAndPull method: // slow, high compatibility, lossless encoding. ScreencapEncodeToFileAndPull ScreencapMethod = 1 // ScreencapEncode selects the Encode method: // slow, high compatibility, lossless encoding. ScreencapEncode ScreencapMethod = 1 << 1 // ScreencapRawWithGzip selects the RawWithGzip method: // medium speed, high compatibility, lossless encoding. ScreencapRawWithGzip ScreencapMethod = 1 << 2 // ScreencapRawByNetcat selects the RawByNetcat method: // fast, low compatibility, lossless encoding. ScreencapRawByNetcat ScreencapMethod = 1 << 3 // ScreencapMinicapDirect selects the MinicapDirect method: fast, low // compatibility. It uses lossy JPEG encoding, which may significantly // reduce template matching accuracy; not recommended. ScreencapMinicapDirect ScreencapMethod = 1 << 4 // ScreencapMinicapStream selects the MinicapStream method: very fast, // low compatibility. It uses lossy JPEG encoding, which may // significantly reduce template matching accuracy; not recommended. ScreencapMinicapStream ScreencapMethod = 1 << 5 // ScreencapEmulatorExtras selects the EmulatorExtras method: very fast, // low compatibility, lossless encoding. It supports MuMu 12, LDPlayer 9, // and Tencent App Store (Androws) on Windows, and AVD on non-Android // platforms. ScreencapEmulatorExtras ScreencapMethod = 1 << 6 // ScreencapAll selects every ADB screencap method. ScreencapAll = ^ScreencapNone // ScreencapDefault selects every ADB screencap method except // RawByNetcat, MinicapDirect, and MinicapStream. ScreencapDefault = ScreencapAll & (^ScreencapRawByNetcat) & (^ScreencapMinicapDirect) & (^ScreencapMinicapStream) // InputNone selects no ADB input method. InputNone InputMethod = 0 // InputAdbShell selects the AdbShell method: slow, high compatibility. InputAdbShell InputMethod = 1 // InputMinitouchAndAdbKey selects the MinitouchAndAdbKey method: fast, // medium compatibility. Key input still uses AdbShell. InputMinitouchAndAdbKey InputMethod = 1 << 1 // InputMaatouch selects the Maatouch method: fast, medium compatibility. InputMaatouch InputMethod = 1 << 2 // InputEmulatorExtras selects the EmulatorExtras method: fast, low // compatibility. It supports MuMu 12 and Tencent App Store (Androws) on // Windows. InputEmulatorExtras InputMethod = 1 << 3 // InputAll selects every ADB input method. InputAll = ^InputNone // InputDefault selects every ADB input method except EmulatorExtras. InputDefault = InputAll & (^InputEmulatorExtras) )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type InputMethod ¶
type InputMethod uint64
InputMethod defines the ADB input method flags.
Use bitwise OR to set the method you need, MaaFramework will select the available ones according to priority. The priority is: EmulatorExtras > Maatouch > MinitouchAndAdbKey > AdbShell
func ParseInputMethod ¶
func ParseInputMethod(s string) (InputMethod, error)
ParseInputMethod parses an input method name, matched case-insensitively with surrounding whitespace ignored. Unrecognized names fall back to a decimal numeric value; input matching neither returns an error.
func (InputMethod) String ¶
func (m InputMethod) String() string
String returns the input method's canonical name, or its decimal value for unnamed combinations.
type ScreencapMethod ¶
type ScreencapMethod uint64
ScreencapMethod defines the ADB screencap method flags.
Use bitwise OR to set the method you need, MaaFramework will test their speed and use the fastest one.
func ParseScreencapMethod ¶
func ParseScreencapMethod(s string) (ScreencapMethod, error)
ParseScreencapMethod parses a screencap method name, matched case-insensitively with surrounding whitespace ignored. Unrecognized names fall back to a decimal numeric value; input matching neither returns an error.
func (ScreencapMethod) String ¶
func (m ScreencapMethod) String() string
String returns the screencap method's canonical name, or its decimal value for unnamed combinations.