mirror of
https://github.com/MaaAssistantArknights/MaaAssistantArknights.git
synced 2026-07-19 02:23:01 +08:00
31 lines
535 B
C++
31 lines
535 B
C++
#pragma once
|
|
|
|
#include <string>
|
|
#include <random>
|
|
#include <Windows.h>
|
|
#include <opencv2/opencv.hpp>
|
|
|
|
#include "AssDef.h"
|
|
|
|
namespace MeoAssistance {
|
|
class WinMacro
|
|
{
|
|
public:
|
|
WinMacro(HandleType type);
|
|
~WinMacro() = default;
|
|
|
|
bool findHandle();
|
|
bool resizeWindow(int Width, int Height);
|
|
bool click(Point p);
|
|
bool clickRange(Rect rect);
|
|
cv::Mat getImage(Rect rect);
|
|
Rect getWindowRect();
|
|
double getScreenScale();
|
|
private:
|
|
|
|
HandleType m_handle_type;
|
|
HWND m_handle = NULL;
|
|
std::minstd_rand m_rand_engine;
|
|
};
|
|
}
|