2019-12-03 19:23:33 +00:00
|
|
|
//
|
|
|
|
// Created by loki on 6/20/19.
|
|
|
|
//
|
|
|
|
|
|
|
|
#ifndef SUNSHINE_INPUT_H
|
|
|
|
#define SUNSHINE_INPUT_H
|
|
|
|
|
2021-07-18 09:05:34 +00:00
|
|
|
#include <functional>
|
|
|
|
|
2021-05-11 21:30:56 +00:00
|
|
|
#include "platform/common.h"
|
2021-05-17 19:21:57 +00:00
|
|
|
#include "thread_safe.h"
|
2021-06-24 18:53:19 +00:00
|
|
|
|
2019-12-03 19:23:33 +00:00
|
|
|
namespace input {
|
2020-03-15 20:22:42 +00:00
|
|
|
struct input_t;
|
2019-12-22 20:24:50 +00:00
|
|
|
|
|
|
|
void print(void *input);
|
2021-05-11 16:01:56 +00:00
|
|
|
void reset(std::shared_ptr<input_t> &input);
|
2019-12-22 22:34:12 +00:00
|
|
|
void passthrough(std::shared_ptr<input_t> &input, std::vector<std::uint8_t> &&input_data);
|
2020-03-15 20:22:42 +00:00
|
|
|
|
2021-05-11 21:30:56 +00:00
|
|
|
|
2021-07-21 18:24:23 +00:00
|
|
|
[[nodiscard]] std::unique_ptr<platf::deinit_t> init();
|
2020-03-15 20:22:42 +00:00
|
|
|
|
2021-06-22 20:26:11 +00:00
|
|
|
std::shared_ptr<input_t> alloc(safe::mail_t mail);
|
2021-06-24 18:53:19 +00:00
|
|
|
|
|
|
|
struct touch_port_t : public platf::touch_port_t {
|
|
|
|
int env_width, env_height;
|
|
|
|
|
2021-07-10 21:49:04 +00:00
|
|
|
// Offset x and y coordinates of the client
|
|
|
|
float client_offsetX, client_offsetY;
|
|
|
|
|
2021-06-24 18:53:19 +00:00
|
|
|
float scalar_inv;
|
|
|
|
};
|
2021-05-17 19:21:57 +00:00
|
|
|
} // namespace input
|
2019-12-03 19:23:33 +00:00
|
|
|
|
|
|
|
#endif //SUNSHINE_INPUT_H
|