#pragma once
#ifndef _VIGEM_CLIENT_H_
#define _VIGEM_CLIENT_H_
#ifndef WIN32_LEAN_AND_MEAN
#define WIN32_LEAN_AND_MEAN
#endif
#include "rust/cxx.h"
#include <memory>
#include <windows.h>
#include <Xinput.h>
#include "ViGEm/Client.h"
struct XINPUT_GAMEPAD_SHARED;
struct XINPUT_STATE_SHARED;
enum class GamepadType : std::uint8_t;
class vigem_client
{
public:
vigem_client() noexcept;
~vigem_client();
bool reset_driver() const;
int32_t add_gamepad_controller(const GamepadType& pGameType) const;
bool send_xbox360_input(
const uint32_t& pGamePadIndex,
const XINPUT_STATE_SHARED& pXInput) const;
bool clear_gamepad_state(int pGamePadIndex);
uint32_t get_number_of_gamepads() const noexcept;
rust::String get_last_error() const;
private:
vigem_client(const vigem_client &) = delete;
vigem_client &operator=(const vigem_client &) = delete;
class impl;
std::unique_ptr<impl> _impl;
};
std::unique_ptr<vigem_client> New();
#endif