carb/input/InputProvider.h

File members: carb/input/InputProvider.h

// Copyright (c) 2018-2023, NVIDIA CORPORATION. All rights reserved.
//
// NVIDIA CORPORATION and its licensors retain all intellectual property
// and proprietary rights in and to this software, related documentation
// and any modifications thereto. Any use, reproduction, disclosure or
// distribution of this software and related documentation without an express
// license agreement from NVIDIA CORPORATION is strictly prohibited.
//

#pragma once
#include "../Defines.h"

#include "InputTypes.h"

namespace carb
{
namespace input
{

struct InputProvider
{
    Keyboard*(CARB_ABI* createKeyboard)(const char* name);

    void(CARB_ABI* destroyKeyboard)(Keyboard* keyboard);

    void(CARB_ABI* updateKeyboard)(Keyboard* keyboard);

    void(CARB_ABI* bufferKeyboardEvent)(const KeyboardEvent& evt);

    Mouse*(CARB_ABI* createMouse)(const char* name);

    void(CARB_ABI* destroyMouse)(Mouse* mouse);

    void(CARB_ABI* updateMouse)(Mouse* mouse);

    void(CARB_ABI* bufferMouseEvent)(const MouseEvent& evt);

    Gamepad*(CARB_ABI* createGamepad)(const char* name, const char* guid);

    void(CARB_ABI* setGamepadConnected)(Gamepad* gamepad, bool connected);

    void(CARB_ABI* destroyGamepad)(Gamepad* gamepad);

    void(CARB_ABI* updateGamepad)(Gamepad* gamepad);

    void(CARB_ABI* bufferGamepadEvent)(const GamepadEvent& evt);

    void(CARB_ABI* bufferInputEvent)(const InputEvent& evt);
};
} // namespace input
} // namespace carb