summaryrefslogtreecommitdiffstatshomepage
path: root/src/osd/interface/inputman.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/osd/interface/inputman.h')
-rw-r--r--src/osd/interface/inputman.h45
1 files changed, 7 insertions, 38 deletions
diff --git a/src/osd/interface/inputman.h b/src/osd/interface/inputman.h
index 223c9a6926d..da4c1b6b9f5 100644
--- a/src/osd/interface/inputman.h
+++ b/src/osd/interface/inputman.h
@@ -4,7 +4,7 @@
inputman.h
- OSD interface to the input manager.
+ OSD interface to the input manager
***************************************************************************/
#ifndef MAME_OSD_INTERFACE_INPUTMAN_H
@@ -13,6 +13,7 @@
#pragma once
#include "inputcode.h"
+#include "inputfwd.h"
#include <string_view>
@@ -20,50 +21,19 @@
namespace osd {
//**************************************************************************
-// CONSTANTS
-//**************************************************************************
-
-// relative devices return ~512 units per on-screen pixel
-constexpr s32 INPUT_RELATIVE_PER_PIXEL = 512;
-
-// absolute devices return values between -65536 and +65536
-constexpr s32 INPUT_ABSOLUTE_MIN = -65'536;
-constexpr s32 INPUT_ABSOLUTE_MAX = 65'536;
-
-// invalid memory value for axis polling
-constexpr s32 INVALID_AXIS_VALUE = 0x7fff'ffff;
-
-
-
-//**************************************************************************
// TYPE DEFINITIONS
//**************************************************************************
-// base for application representation of host input device
-
-class input_device
-{
-public:
- // callback for getting the value of an individual input on a device
- typedef s32 (*item_get_state_func)(void *device_internal, void *item_internal);
-
- virtual ~input_device() = default;
-
- virtual input_item_id add_item(
- std::string_view name,
- input_item_id itemid,
- item_get_state_func getstate,
- void *internal = nullptr) = 0;
-};
-
-
-// base for application input manager
+// interface to application input manager
class input_manager
{
-public:
+protected:
virtual ~input_manager() = default;
+public:
+ virtual bool class_enabled(input_device_class devclass) const = 0;
+
virtual input_device &add_device(
input_device_class devclass,
std::string_view name,
@@ -71,7 +41,6 @@ public:
void *internal = nullptr) = 0;
};
-
} // namespace osd
#endif // MAME_OSD_INTERFACE_INPUTMAN_H