@computer-use/provider-interfaces
Version:
Public provider interfaces for @computer-use/nut-js
25 lines (24 loc) • 1.05 kB
TypeScript
import { ColorQuery, MatchRequest, MatchResult, Point } from "@computer-use/shared";
/**
* A WindowFinder should provide an abstraction layer to perform window searches
*
* @interface ColorFinderInterface
*/
export interface ColorFinderInterface {
/**
* findMatch should provide an abstraction to search for a color on screen
*
* @param {ColorQuery} query A {@link ColorQuery} containing needed data
* @returns {Promise<number>} A single window handle
* @memberof WindowFinderInterface
*/
findMatch<PROVIDER_DATA_TYPE>(query: MatchRequest<ColorQuery, PROVIDER_DATA_TYPE>): Promise<MatchResult<Point>>;
/**
* findMatches should provide an abstraction to search for a window on screen
*
* @param {ColorQuery} query A {@link ColorQuery} containing needed data
* @returns {Promise<number[]>} A list of window handles
* @memberof WindowFinderInterface
*/
findMatches<PROVIDER_DATA_TYPE>(query: MatchRequest<ColorQuery, PROVIDER_DATA_TYPE>): Promise<MatchResult<Point>[]>;
}