toolkit

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2024 License: LGPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FindWindow

func FindWindow(className, windowName string) uint64

FindWindow finds a win32 window by class name and window name. Return the number of windows found that match the criteria. To get the corresponding window handle, use GetWindow.

This function finds the function by exact match. See also SearchWindow.

func GetCursorWindow

func GetCursorWindow() unsafe.Pointer

GetCursorWindow returns the window handle of the window under the cursor. This uses the WindowFromPoint() system API.

func GetDesktopWindow

func GetDesktopWindow() unsafe.Pointer

GetDesktopWindow returns the desktop window handle. This uses the GetDesktopWindow() system API.

func GetDeviceAdbConfig

func GetDeviceAdbConfig(index uint64) string

GetDeviceAdbConfig returns the device ADB config by index.

func GetDeviceAdbControllerType

func GetDeviceAdbControllerType(index uint64) maa.AdbControllerType

GetDeviceAdbControllerType returns the device ADB controller type by index.

func GetDeviceAdbPath

func GetDeviceAdbPath(index uint64) string

GetDeviceAdbPath returns the device ADB path by index.

func GetDeviceAdbSerial

func GetDeviceAdbSerial(index uint64) string

GetDeviceAdbSerial returns the device ADB serial by index.

func GetDeviceCount

func GetDeviceCount() uint64

GetDeviceCount returns the number of devices found.

func GetDeviceName

func GetDeviceName(index uint64) string

GetDeviceName returns the device name by index.

func GetForegroundWindow

func GetForegroundWindow() unsafe.Pointer

GetForegroundWindow returns the foreground window handle. This uses the GetForegroundWindow() system API.

func GetWindow

func GetWindow(index uint64) unsafe.Pointer

GetWindow returns the window handle by index.

func GetWindowClassName

func GetWindowClassName(hwnd unsafe.Pointer) (string, bool)

GetWindowClassName returns the window class name by window handle.

func GetWindowWindowName

func GetWindowWindowName(hwnd unsafe.Pointer) (string, bool)

GetWindowWindowName returns the window window name by window handle.

func InitOption

func InitOption(userPath, defaultJson string) bool

InitOption inits the toolkit option config.

func IsFindDeviceCompleted

func IsFindDeviceCompleted() bool

IsFindDeviceCompleted checks if the find device request is completed.

func ListWindows

func ListWindows() uint64

ListWindows lists all windows. Return the number of windows found. To get the corresponding window handle, use GetWindow.

func PostFindDevice

func PostFindDevice() bool

PostFindDevice posts a request to find all ADB devices.

func PostFindDeviceWithAdb

func PostFindDeviceWithAdb(adbPath string) bool

PostFindDeviceWithAdb posts a request to find all ADB devices with a given ADB path.

func SearchWindow

func SearchWindow(className, windowName string) uint64

SearchWindow regex search a win32 window by class name and window name. Return the number of windows found that match the criteria. To get the corresponding window handle, use GetWindow.

func WaitForFindDeviceToComplete

func WaitForFindDeviceToComplete() uint64

WaitForFindDeviceToComplete waits for the find device request to complete. Return the number of devices found.

Types

type AdbDevice

type AdbDevice struct {
	Name           string
	AdbPath        string
	Address        string
	ControllerType maa.AdbControllerType
	Config         string
}

func AdbDevices

func AdbDevices() []AdbDevice

AdbDevices returns the adb devices.

Jump to

Keyboard shortcuts

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