2022-12-11 03:01:52 +00:00
|
|
|
#pragma once
|
|
|
|
#include <windows.h>
|
|
|
|
|
|
|
|
#include <stdbool.h>
|
|
|
|
#include <stdint.h>
|
|
|
|
|
2023-05-31 08:54:38 +00:00
|
|
|
#pragma pack(push, 1)
|
|
|
|
|
2022-12-11 03:01:52 +00:00
|
|
|
struct touch_config {
|
|
|
|
bool enable;
|
|
|
|
};
|
|
|
|
|
2023-04-28 08:25:47 +00:00
|
|
|
// Always starts with 0x01, always ends with 0x0D
|
2022-12-11 03:01:52 +00:00
|
|
|
struct touch_req {
|
2023-04-28 08:25:47 +00:00
|
|
|
uint8_t sync; // Always 0x01
|
|
|
|
uint8_t cmd[256]; // rest of the data goes here
|
|
|
|
uint8_t tail; // Always 0x0D
|
|
|
|
size_t data_len; // length of data
|
2022-12-11 03:01:52 +00:00
|
|
|
};
|
|
|
|
|
2023-05-31 08:54:38 +00:00
|
|
|
struct touch_report {
|
|
|
|
uint8_t status;
|
|
|
|
uint8_t touch_id;
|
|
|
|
uint16_t x;
|
|
|
|
uint16_t y;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct touch_auto_resp {
|
|
|
|
uint8_t rep_id;
|
|
|
|
struct touch_report touches[10];
|
|
|
|
uint8_t count;
|
|
|
|
uint16_t scan_time;
|
|
|
|
//uint8_t padding[456];
|
|
|
|
};
|
|
|
|
|
|
|
|
#pragma pack(pop)
|
|
|
|
|
2022-12-11 03:01:52 +00:00
|
|
|
HRESULT touch_hook_init(const struct touch_config *cfg);
|