2017-06-21 00:41:34 -04:00
|
|
|
/*
|
2023-01-06 15:36:05 -05:00
|
|
|
* 86Box A hypervisor and IBM PC system emulator that specializes in
|
|
|
|
|
* running old operating systems and software designed for IBM
|
|
|
|
|
* PC systems and compatibles from 1981 through fairly recent
|
|
|
|
|
* system designs based on the PCI bus.
|
2017-06-21 00:41:34 -04:00
|
|
|
*
|
2023-01-06 15:36:05 -05:00
|
|
|
* This file is part of the 86Box distribution.
|
2017-06-21 00:41:34 -04:00
|
|
|
*
|
2023-01-06 15:36:05 -05:00
|
|
|
* Definitions for the mouse driver.
|
2017-06-21 00:41:34 -04:00
|
|
|
*
|
2020-03-25 00:46:02 +02:00
|
|
|
*
|
2017-06-21 00:41:34 -04:00
|
|
|
*
|
2023-01-06 15:36:05 -05:00
|
|
|
* Authors: Miran Grca, <mgrca8@gmail.com>
|
|
|
|
|
* Fred N. van Kempen, <decwiz@yahoo.com>
|
2017-10-23 05:20:18 -04:00
|
|
|
*
|
2023-01-06 15:36:05 -05:00
|
|
|
* Copyright 2016-2019 Miran Grca.
|
|
|
|
|
* Copyright 2017-2019 Fred N. van Kempen.
|
2017-06-21 00:41:34 -04:00
|
|
|
*/
|
2022-02-18 19:42:21 -05:00
|
|
|
|
2017-06-04 02:11:19 -04:00
|
|
|
#ifndef EMU_MOUSE_H
|
2022-07-27 17:00:34 -04:00
|
|
|
#define EMU_MOUSE_H
|
2016-06-26 00:34:39 +02:00
|
|
|
|
2022-07-27 17:00:34 -04:00
|
|
|
#define MOUSE_TYPE_NONE 0 /* no mouse configured */
|
|
|
|
|
#define MOUSE_TYPE_INTERNAL 1 /* machine has internal mouse */
|
|
|
|
|
#define MOUSE_TYPE_LOGIBUS 2 /* Logitech/ATI Bus Mouse */
|
|
|
|
|
#define MOUSE_TYPE_INPORT 3 /* Microsoft InPort Mouse */
|
2017-07-24 12:04:39 +02:00
|
|
|
#if 0
|
2022-07-27 17:00:34 -04:00
|
|
|
# define MOUSE_TYPE_GENIBUS 4 /* Genius Bus Mouse */
|
2017-07-24 12:04:39 +02:00
|
|
|
#endif
|
2022-07-27 17:00:34 -04:00
|
|
|
#define MOUSE_TYPE_MSYSTEMS 5 /* Mouse Systems mouse */
|
|
|
|
|
#define MOUSE_TYPE_MICROSOFT 6 /* Microsoft 2-button Serial Mouse */
|
|
|
|
|
#define MOUSE_TYPE_MS3BUTTON 7 /* Microsoft 3-button Serial Mouse */
|
|
|
|
|
#define MOUSE_TYPE_MSWHEEL 8 /* Microsoft Serial Wheel Mouse */
|
|
|
|
|
#define MOUSE_TYPE_LOGITECH 9 /* Logitech 2-button Serial Mouse */
|
|
|
|
|
#define MOUSE_TYPE_LT3BUTTON 10 /* Logitech 3-button Serial Mouse */
|
|
|
|
|
#define MOUSE_TYPE_PS2 11 /* PS/2 series Bus Mouse */
|
2023-01-03 15:42:57 +06:00
|
|
|
#define MOUSE_TYPE_WACOM 12 /* WACOM tablet */
|
2023-03-04 11:35:10 +06:00
|
|
|
#define MOUSE_TYPE_WACOMARTP 13 /* WACOM tablet (ArtPad) */
|
2019-09-27 14:07:57 +02:00
|
|
|
|
2022-07-27 17:00:34 -04:00
|
|
|
#define MOUSE_TYPE_ONBOARD 0x80 /* Mouse is an on-board version of one of the above. */
|
2016-12-23 03:16:24 +01:00
|
|
|
|
2017-12-04 11:59:26 -05:00
|
|
|
#ifdef __cplusplus
|
|
|
|
|
extern "C" {
|
|
|
|
|
#endif
|
2017-05-05 01:49:42 +02:00
|
|
|
|
2023-06-26 12:47:04 -04:00
|
|
|
extern int mouse_type;
|
|
|
|
|
extern int mouse_x;
|
|
|
|
|
extern int mouse_y;
|
|
|
|
|
extern int mouse_z;
|
|
|
|
|
extern int mouse_mode; /* 1 = Absolute, 0 = Relative */
|
|
|
|
|
extern int mouse_tablet_in_proximity;
|
2023-05-11 03:02:36 -04:00
|
|
|
extern double mouse_x_abs;
|
|
|
|
|
extern double mouse_y_abs;
|
2023-06-26 12:47:04 -04:00
|
|
|
extern int mouse_buttons;
|
|
|
|
|
extern int tablet_tool_type;
|
2017-05-05 01:49:42 +02:00
|
|
|
|
2017-12-04 11:59:26 -05:00
|
|
|
#ifdef EMU_DEVICE_H
|
2022-07-27 17:00:34 -04:00
|
|
|
extern const device_t *mouse_get_device(int mouse);
|
|
|
|
|
extern void *mouse_ps2_init(const device_t *);
|
2017-12-10 02:08:37 -05:00
|
|
|
|
2022-07-27 17:00:34 -04:00
|
|
|
extern const device_t mouse_logibus_device;
|
|
|
|
|
extern const device_t mouse_logibus_onboard_device;
|
|
|
|
|
extern const device_t mouse_msinport_device;
|
|
|
|
|
# if 0
|
2018-03-19 01:02:04 +01:00
|
|
|
extern const device_t mouse_genibus_device;
|
2022-07-27 17:00:34 -04:00
|
|
|
# endif
|
|
|
|
|
extern const device_t mouse_mssystems_device;
|
|
|
|
|
extern const device_t mouse_msserial_device;
|
|
|
|
|
extern const device_t mouse_ltserial_device;
|
|
|
|
|
extern const device_t mouse_ps2_device;
|
2023-01-03 15:42:57 +06:00
|
|
|
extern const device_t mouse_wacom_device;
|
2023-03-04 11:35:10 +06:00
|
|
|
extern const device_t mouse_wacom_artpad_device;
|
2017-12-04 11:59:26 -05:00
|
|
|
#endif
|
2017-08-03 14:07:03 -04:00
|
|
|
|
2022-07-27 17:00:34 -04:00
|
|
|
extern void mouse_init(void);
|
|
|
|
|
extern void mouse_close(void);
|
|
|
|
|
extern void mouse_reset(void);
|
|
|
|
|
extern void mouse_set_buttons(int buttons);
|
2022-12-30 06:05:57 +01:00
|
|
|
extern void mouse_set_poll_ex(void (*poll_ex)(void));
|
2022-07-27 17:00:34 -04:00
|
|
|
extern void mouse_process(void);
|
|
|
|
|
extern void mouse_set_poll(int (*f)(int, int, int, int, void *), void *);
|
|
|
|
|
extern void mouse_poll(void);
|
2019-09-27 14:07:57 +02:00
|
|
|
|
2022-07-27 17:00:34 -04:00
|
|
|
extern void mouse_bus_set_irq(void *priv, int irq);
|
2019-09-27 14:07:57 +02:00
|
|
|
|
2023-04-26 01:42:23 +02:00
|
|
|
extern void mouse_set_sample_rate(double new_rate);
|
|
|
|
|
|
2022-07-27 17:00:34 -04:00
|
|
|
extern char *mouse_get_name(int mouse);
|
|
|
|
|
extern char *mouse_get_internal_name(int mouse);
|
|
|
|
|
extern int mouse_get_from_internal_name(char *s);
|
|
|
|
|
extern int mouse_has_config(int mouse);
|
|
|
|
|
extern int mouse_get_type(int mouse);
|
|
|
|
|
extern int mouse_get_ndev(void);
|
|
|
|
|
extern int mouse_get_buttons(void);
|
2017-05-05 01:49:42 +02:00
|
|
|
|
2022-07-27 17:00:34 -04:00
|
|
|
extern void mouse_clear_data(void *priv);
|
2018-07-15 01:41:53 +02:00
|
|
|
|
2017-12-04 11:59:26 -05:00
|
|
|
#ifdef __cplusplus
|
|
|
|
|
}
|
|
|
|
|
#endif
|
|
|
|
|
|
2022-07-27 17:00:34 -04:00
|
|
|
#endif /*EMU_MOUSE_H*/
|