Kodi Development 23.0
for Binary and Script based Add-Ons
 
Loading...
Searching...
No Matches
peripheral.h
1/*
2 * Copyright (C) 2014-2018 Team Kodi
3 * This file is part of Kodi - https://kodi.tv
4 *
5 * SPDX-License-Identifier: GPL-2.0-or-later
6 * See LICENSES/README.md for more information.
7 */
8
9#ifndef C_API_ADDONINSTANCE_PERIPHERAL_H
10#define C_API_ADDONINSTANCE_PERIPHERAL_H
11
12#include "../addon_base.h"
13
14/* indicates a joystick has no preference for port number */
15#define NO_PORT_REQUESTED (-1)
16
17/* joystick's driver button/hat/axis index is unknown */
18#define DRIVER_INDEX_UNKNOWN (-1)
19
20#ifdef __cplusplus
21extern "C"
22{
23#endif /* __cplusplus */
24
25 //============================================================================
59 //----------------------------------------------------------------------------
60
61 // @name Peripheral types
62 //{
63
64 //============================================================================
85 //----------------------------------------------------------------------------
86
90 typedef struct PERIPHERAL_INFO
91 {
93 char* name;
94 uint16_t vendor_id;
95 uint16_t product_id;
96 unsigned int index;
97 } ATTR_PACKED PERIPHERAL_INFO;
98
103 {
105 bool provides_joystick_rumble;
106 bool provides_joystick_power_off;
108 } ATTR_PACKED PERIPHERAL_CAPABILITIES;
109
110 //}
111
112 // @name Event types
113 //{
114
115 //============================================================================
139 //----------------------------------------------------------------------------
140
141 //============================================================================
156 //----------------------------------------------------------------------------
157
158 //============================================================================
194 //----------------------------------------------------------------------------
195
196 //============================================================================
204 typedef float JOYSTICK_STATE_AXIS;
205 //----------------------------------------------------------------------------
206
207 //============================================================================
210 typedef float JOYSTICK_STATE_MOTOR;
211 //----------------------------------------------------------------------------
212
216 typedef struct PERIPHERAL_EVENT
217 {
219 unsigned int peripheral_index;
220
223
225 unsigned int driver_index;
226
227 JOYSTICK_STATE_BUTTON driver_button_state;
228 JOYSTICK_STATE_HAT driver_hat_state;
229 JOYSTICK_STATE_AXIS driver_axis_state;
230 JOYSTICK_STATE_MOTOR motor_state;
231 } ATTR_PACKED PERIPHERAL_EVENT;
232
233 //}
234
235 // @name Joystick types
236 //{
237
241 typedef struct JOYSTICK_INFO
242 {
244 char* provider;
246 unsigned int button_count;
247 unsigned int hat_count;
248 unsigned int axis_count;
249 unsigned int motor_count;
251 } ATTR_PACKED JOYSTICK_INFO;
252
253 //============================================================================
281 //----------------------------------------------------------------------------
282
286 typedef struct JOYSTICK_BATTERY
287 {
290
292 int level;
293 } ATTR_PACKED JOYSTICK_BATTERY;
294
295 //============================================================================
335 //----------------------------------------------------------------------------
336
341 {
342 int index;
343 } ATTR_PACKED JOYSTICK_DRIVER_BUTTON;
344
345 //============================================================================
369 //----------------------------------------------------------------------------
370
374 typedef struct JOYSTICK_DRIVER_HAT
375 {
376 int index;
378 } ATTR_PACKED JOYSTICK_DRIVER_HAT;
379
380 //============================================================================
398 //----------------------------------------------------------------------------
399
404 {
405 int index;
406 int center;
408 unsigned int range;
409 } ATTR_PACKED JOYSTICK_DRIVER_SEMIAXIS;
410
415 {
416 int index;
417 } ATTR_PACKED JOYSTICK_DRIVER_MOTOR;
418
422 typedef struct JOYSTICK_DRIVER_KEY
423 {
424 char keycode[16];
425 } ATTR_PACKED JOYSTICK_DRIVER_KEY;
426
427 //============================================================================
466 //----------------------------------------------------------------------------
467
475
476 //============================================================================
500 //----------------------------------------------------------------------------
501
509
514 {
516 union
517 {
518 struct JOYSTICK_DRIVER_BUTTON button;
519 struct JOYSTICK_DRIVER_HAT hat;
520 struct JOYSTICK_DRIVER_SEMIAXIS semiaxis;
521 struct JOYSTICK_DRIVER_MOTOR motor;
522 struct JOYSTICK_DRIVER_KEY key;
523 struct JOYSTICK_DRIVER_MOUSE_BUTTON mouse;
524 struct JOYSTICK_DRIVER_RELPOINTER relpointer;
525 };
526 } ATTR_PACKED JOYSTICK_DRIVER_PRIMITIVE;
527
528 //============================================================================
571 //----------------------------------------------------------------------------
572
573 //============================================================================
633 //----------------------------------------------------------------------------
634
638 typedef struct JOYSTICK_FEATURE
639 {
640 char* name;
643 } ATTR_PACKED JOYSTICK_FEATURE;
644 //}
645
647 {
648 const char* user_path;
649 const char* addon_path;
650 } ATTR_PACKED AddonProps_Peripheral;
651
653
655 {
656 KODI_HANDLE kodiInstance;
657
658 void (*trigger_scan)(void* kodiInstance);
659
660 void (*refresh_button_maps)(void* kodiInstance,
661 const char* device_name,
662 const char* controller_id);
663
664 unsigned int (*feature_count)(void* kodiInstance,
665 const char* controller_id,
667
668 JOYSTICK_FEATURE_TYPE(*feature_type)
669 (void* kodiInstance, const char* controller_id, const char* feature_name);
671
673
675 {
676 KODI_HANDLE addonInstance;
677
678 void(__cdecl* get_capabilities)(const struct AddonInstance_Peripheral* addonInstance,
679 struct PERIPHERAL_CAPABILITIES* capabilities);
680
681 PERIPHERAL_ERROR(__cdecl* perform_device_scan)
682 (const struct AddonInstance_Peripheral* addonInstance,
683 unsigned int* peripheral_count,
684 struct PERIPHERAL_INFO** scan_results);
685
686 void(__cdecl* free_scan_results)(const struct AddonInstance_Peripheral* addonInstance,
687 unsigned int peripheral_count,
688 struct PERIPHERAL_INFO* scan_results);
689
690 PERIPHERAL_ERROR(__cdecl* get_events)
691 (const struct AddonInstance_Peripheral* addonInstance,
692 unsigned int* event_count,
693 struct PERIPHERAL_EVENT** events);
694
695 void(__cdecl* free_events)(const struct AddonInstance_Peripheral* addonInstance,
696 unsigned int event_count,
697 struct PERIPHERAL_EVENT* events);
698
699 bool(__cdecl* send_event)(const struct AddonInstance_Peripheral* addonInstance,
700 const struct PERIPHERAL_EVENT* event);
701
704 PERIPHERAL_ERROR(__cdecl* get_joystick_info)
705 (const struct AddonInstance_Peripheral* addonInstance,
706 unsigned int index,
707 struct JOYSTICK_INFO* info);
708
709 void(__cdecl* free_joystick_info)(const struct AddonInstance_Peripheral* addonInstance,
710 struct JOYSTICK_INFO* info);
711
712 PERIPHERAL_ERROR(__cdecl* get_appearance)
713 (const struct AddonInstance_Peripheral* addonInstance,
714 const struct JOYSTICK_INFO* joystick,
715 char* buffer,
716 unsigned int bufferSize);
717
718 PERIPHERAL_ERROR(__cdecl* set_appearance)
719 (const struct AddonInstance_Peripheral* addonInstance,
720 const struct JOYSTICK_INFO* joystick,
721 const char* controller_id);
722
723 PERIPHERAL_ERROR(__cdecl* get_features)
724 (const struct AddonInstance_Peripheral* addonInstance,
725 const struct JOYSTICK_INFO* joystick,
726 const char* controller_id,
727 unsigned int* feature_count,
728 struct JOYSTICK_FEATURE** features);
729
730 void(__cdecl* free_features)(const struct AddonInstance_Peripheral* addonInstance,
731 unsigned int feature_count,
732 struct JOYSTICK_FEATURE* features);
733
734 PERIPHERAL_ERROR(__cdecl* map_features)
735 (const struct AddonInstance_Peripheral* addonInstance,
736 const struct JOYSTICK_INFO* joystick,
737 const char* controller_id,
738 unsigned int feature_count,
739 const struct JOYSTICK_FEATURE* features);
740
741 PERIPHERAL_ERROR(__cdecl* get_ignored_primitives)
742 (const struct AddonInstance_Peripheral* addonInstance,
743 const struct JOYSTICK_INFO* joystick,
744 unsigned int* feature_count,
745 struct JOYSTICK_DRIVER_PRIMITIVE** primitives);
746
747 void(__cdecl* free_primitives)(const struct AddonInstance_Peripheral* addonInstance,
748 unsigned int,
749 struct JOYSTICK_DRIVER_PRIMITIVE* primitives);
750
751 PERIPHERAL_ERROR(__cdecl* set_ignored_primitives)
752 (const struct AddonInstance_Peripheral* addonInstance,
753 const struct JOYSTICK_INFO* joystick,
754 unsigned int primitive_count,
755 const struct JOYSTICK_DRIVER_PRIMITIVE* primitives);
756
757 void(__cdecl* save_button_map)(const struct AddonInstance_Peripheral* addonInstance,
758 const struct JOYSTICK_INFO* joystick);
759
760 void(__cdecl* revert_button_map)(const struct AddonInstance_Peripheral* addonInstance,
761 const struct JOYSTICK_INFO* joystick);
762
763 void(__cdecl* reset_button_map)(const struct AddonInstance_Peripheral* addonInstance,
764 const struct JOYSTICK_INFO* joystick,
765 const char* controller_id);
766
767 void(__cdecl* power_off_joystick)(const struct AddonInstance_Peripheral* addonInstance,
768 unsigned int index);
769
770 PERIPHERAL_ERROR(__cdecl* get_joystick_battery)
771 (const struct AddonInstance_Peripheral* addonInstance,
772 unsigned int index,
773 struct JOYSTICK_BATTERY* battery);
776
778 {
779 struct AddonProps_Peripheral* props;
780 struct AddonToKodiFuncTable_Peripheral* toKodi;
781 struct KodiToAddonFuncTable_Peripheral* toAddon;
783
784#ifdef __cplusplus
785} /* extern "C" */
786#endif /* __cplusplus */
787
788#endif /* !C_API_ADDONINSTANCE_PERIPHERAL_H */
JOYSTICK_STATE_BUTTON
Definition peripheral.h:148
@ JOYSTICK_STATE_BUTTON_UNPRESSED
button is released
Definition peripheral.h:150
@ JOYSTICK_STATE_BUTTON_PRESSED
button is pressed
Definition peripheral.h:153
JOYSTICK_STATE_HAT
Definition peripheral.h:165
@ JOYSTICK_STATE_HAT_DOWN
only down is pressed
Definition peripheral.h:179
@ JOYSTICK_STATE_HAT_RIGHT
only right is pressed
Definition peripheral.h:173
@ JOYSTICK_STATE_HAT_RIGHT_DOWN
right and down is pressed
Definition peripheral.h:191
@ JOYSTICK_STATE_HAT_UNPRESSED
no directions are pressed
Definition peripheral.h:167
@ JOYSTICK_STATE_HAT_LEFT
only left is pressed
Definition peripheral.h:170
@ JOYSTICK_STATE_HAT_UP
only up is pressed
Definition peripheral.h:176
@ JOYSTICK_STATE_HAT_LEFT_UP
left and up is pressed
Definition peripheral.h:182
@ JOYSTICK_STATE_HAT_LEFT_DOWN
left and down is pressed
Definition peripheral.h:185
@ JOYSTICK_STATE_HAT_RIGHT_UP
right and up is pressed
Definition peripheral.h:188
PERIPHERAL_EVENT_TYPE
Definition peripheral.h:122
@ PERIPHERAL_EVENT_TYPE_SET_MOTOR
set the state for joystick rumble motor
Definition peripheral.h:136
@ PERIPHERAL_EVENT_TYPE_DRIVER_HAT
state changed for joystick driver hat
Definition peripheral.h:130
@ PERIPHERAL_EVENT_TYPE_NONE
unknown event
Definition peripheral.h:124
@ PERIPHERAL_EVENT_TYPE_DRIVER_AXIS
state changed for joystick driver axis
Definition peripheral.h:133
@ PERIPHERAL_EVENT_TYPE_DRIVER_BUTTON
state changed for joystick driver button
Definition peripheral.h:127
float JOYSTICK_STATE_AXIS
Axis value in the closed interval [-1.0, 1.0].
Definition peripheral.h:204
float JOYSTICK_STATE_MOTOR
Motor value in the closed interval [0.0, 1.0].
Definition peripheral.h:210
PERIPHERAL_ERROR
Definition peripheral.h:36
@ PERIPHERAL_ERROR_NOT_CONNECTED
-5 : No peripherals are connected
Definition peripheral.h:53
@ PERIPHERAL_ERROR_FAILED
-2 : The command failed
Definition peripheral.h:44
@ PERIPHERAL_ERROR_INVALID_PARAMETERS
-3 : The parameters of the method are invalid for this operation
Definition peripheral.h:47
@ PERIPHERAL_ERROR_UNKNOWN
-1 : An unknown error occurred
Definition peripheral.h:41
@ PERIPHERAL_NO_ERROR
0 : No error occurred
Definition peripheral.h:38
@ PERIPHERAL_ERROR_NOT_IMPLEMENTED
-4 : The method that the frontend called is not implemented
Definition peripheral.h:50
@ PERIPHERAL_ERROR_CONNECTION_FAILED
-6 : Peripherals are connected, but command was interrupted
Definition peripheral.h:56
JOYSTICK_BATTERY_STATE
Definition peripheral.h:261
@ JOYSTICK_BATTERY_STATE_DISCHARGING
Running on its battery.
Definition peripheral.h:272
@ JOYSTICK_BATTERY_STATE_FULL
Plugged in with a full battery.
Definition peripheral.h:278
@ JOYSTICK_BATTERY_STATE_NOT_SUPPORTED
Battery reporting isn't supported.
Definition peripheral.h:266
@ JOYSTICK_BATTERY_STATE_WIRED
Powered by its cable and has no battery.
Definition peripheral.h:269
@ JOYSTICK_BATTERY_STATE_CHARGING
Charging its battery.
Definition peripheral.h:275
@ JOYSTICK_BATTERY_STATE_UNKNOWN
The driver can't tell, or hasn't determined the state yet.
Definition peripheral.h:263
JOYSTICK_DRIVER_HAT_DIRECTION
Definition peripheral.h:352
@ JOYSTICK_DRIVER_HAT_RIGHT
Driver hat right.
Definition peripheral.h:360
@ JOYSTICK_DRIVER_HAT_DOWN
Driver hat down.
Definition peripheral.h:366
@ JOYSTICK_DRIVER_HAT_UNKNOWN
Driver hat unknown.
Definition peripheral.h:354
@ JOYSTICK_DRIVER_HAT_UP
Driver hat up.
Definition peripheral.h:363
@ JOYSTICK_DRIVER_HAT_LEFT
Driver hat left.
Definition peripheral.h:357
JOYSTICK_DRIVER_MOUSE_INDEX
Definition peripheral.h:434
@ JOYSTICK_DRIVER_MOUSE_INDEX_WHEEL_DOWN
Mouse index wheel down.
Definition peripheral.h:457
@ JOYSTICK_DRIVER_MOUSE_INDEX_LEFT
Mouse index left.
Definition peripheral.h:439
@ JOYSTICK_DRIVER_MOUSE_INDEX_BUTTON4
Mouse index button 4.
Definition peripheral.h:448
@ JOYSTICK_DRIVER_MOUSE_INDEX_UNKNOWN
Mouse index unknown.
Definition peripheral.h:436
@ JOYSTICK_DRIVER_MOUSE_INDEX_HORIZ_WHEEL_LEFT
Mouse index horizontal wheel left.
Definition peripheral.h:460
@ JOYSTICK_DRIVER_MOUSE_INDEX_MIDDLE
Mouse index middle.
Definition peripheral.h:445
@ JOYSTICK_DRIVER_MOUSE_INDEX_WHEEL_UP
Mouse index wheel up.
Definition peripheral.h:454
@ JOYSTICK_DRIVER_MOUSE_INDEX_RIGHT
Mouse index right.
Definition peripheral.h:442
@ JOYSTICK_DRIVER_MOUSE_INDEX_HORIZ_WHEEL_RIGHT
Mouse index horizontal wheel right.
Definition peripheral.h:463
@ JOYSTICK_DRIVER_MOUSE_INDEX_BUTTON5
Mouse index button 5.
Definition peripheral.h:451
JOYSTICK_DRIVER_PRIMITIVE_TYPE
Definition peripheral.h:309
@ JOYSTICK_DRIVER_PRIMITIVE_TYPE_MOTOR
Driver input primitive type motor.
Definition peripheral.h:323
@ JOYSTICK_DRIVER_PRIMITIVE_TYPE_MOUSE_BUTTON
Driver input primitive type mouse button.
Definition peripheral.h:329
@ JOYSTICK_DRIVER_PRIMITIVE_TYPE_UNKNOWN
Driver input primitive type unknown.
Definition peripheral.h:311
@ JOYSTICK_DRIVER_PRIMITIVE_TYPE_RELPOINTER_DIRECTION
Driver input primitive type relative pointer direction.
Definition peripheral.h:332
@ JOYSTICK_DRIVER_PRIMITIVE_TYPE_HAT_DIRECTION
Driver input primitive type hat direction.
Definition peripheral.h:317
@ JOYSTICK_DRIVER_PRIMITIVE_TYPE_BUTTON
Driver input primitive type button.
Definition peripheral.h:314
@ JOYSTICK_DRIVER_PRIMITIVE_TYPE_SEMIAXIS
Driver input primitive type semiaxis.
Definition peripheral.h:320
@ JOYSTICK_DRIVER_PRIMITIVE_TYPE_KEY
Driver input primitive type key.
Definition peripheral.h:326
JOYSTICK_DRIVER_RELPOINTER_DIRECTION
Definition peripheral.h:483
@ JOYSTICK_DRIVER_RELPOINTER_RIGHT
Relative pointer direction right.
Definition peripheral.h:491
@ JOYSTICK_DRIVER_RELPOINTER_LEFT
Relative pointer direction left.
Definition peripheral.h:488
@ JOYSTICK_DRIVER_RELPOINTER_UP
Relative pointer direction up.
Definition peripheral.h:494
@ JOYSTICK_DRIVER_RELPOINTER_UNKNOWN
Relative pointer direction unknown.
Definition peripheral.h:485
@ JOYSTICK_DRIVER_RELPOINTER_DOWN
Relative pointer direction down.
Definition peripheral.h:497
JOYSTICK_DRIVER_SEMIAXIS_DIRECTION
Definition peripheral.h:387
@ JOYSTICK_DRIVER_SEMIAXIS_NEGATIVE
negative half of the axis
Definition peripheral.h:389
@ JOYSTICK_DRIVER_SEMIAXIS_UNKNOWN
unknown direction
Definition peripheral.h:392
@ JOYSTICK_DRIVER_SEMIAXIS_POSITIVE
positive half of the axis
Definition peripheral.h:395
JOYSTICK_FEATURE_PRIMITIVE
Definition peripheral.h:581
@ JOYSTICK_THROTTLE_UP
Throttle up.
Definition peripheral.h:610
@ JOYSTICK_WHEEL_LEFT
Wheel left.
Definition peripheral.h:605
@ JOYSTICK_RELPOINTER_DOWN
Relative pointer direction down.
Definition peripheral.h:623
@ JOYSTICK_RELPOINTER_UP
Relative pointer direction up.
Definition peripheral.h:621
@ JOYSTICK_SCALAR_PRIMITIVE
Scalar feature (a button, hat direction or semiaxis)
Definition peripheral.h:583
@ JOYSTICK_ACCELEROMETER_POSITIVE_X
Accelerometer X.
Definition peripheral.h:595
@ JOYSTICK_ACCELEROMETER_POSITIVE_Y
Accelerometer Y.
Definition peripheral.h:597
@ JOYSTICK_ANALOG_STICK_DOWN
Analog stick down.
Definition peripheral.h:588
@ JOYSTICK_THROTTLE_DOWN
Throttle down.
Definition peripheral.h:612
@ JOYSTICK_KEY_PRIMITIVE
Key.
Definition peripheral.h:615
@ JOYSTICK_ANALOG_STICK_UP
Analog stick up.
Definition peripheral.h:586
@ JOYSTICK_RELPOINTER_LEFT
Relative pointer direction left.
Definition peripheral.h:627
@ JOYSTICK_WHEEL_RIGHT
Wheel right.
Definition peripheral.h:607
@ JOYSTICK_PRIMITIVE_MAX
Maximum number of primitives.
Definition peripheral.h:630
@ JOYSTICK_MOTOR_PRIMITIVE
Motor.
Definition peripheral.h:602
@ JOYSTICK_MOUSE_BUTTON
Mouse button.
Definition peripheral.h:618
@ JOYSTICK_RELPOINTER_RIGHT
Relative pointer direction right.
Definition peripheral.h:625
@ JOYSTICK_ANALOG_STICK_LEFT
Analog stick left.
Definition peripheral.h:592
@ JOYSTICK_ANALOG_STICK_RIGHT
Analog stick right.
Definition peripheral.h:590
@ JOYSTICK_ACCELEROMETER_POSITIVE_Z
Accelerometer Z.
Definition peripheral.h:599
JOYSTICK_FEATURE_TYPE
Definition peripheral.h:539
@ JOYSTICK_FEATURE_TYPE_ANALOG_STICK
Type analog stick.
Definition peripheral.h:547
@ JOYSTICK_FEATURE_TYPE_RELPOINTER
Type relative pointer.
Definition peripheral.h:556
@ JOYSTICK_FEATURE_TYPE_ACCELEROMETER
Type accelerometer.
Definition peripheral.h:550
@ JOYSTICK_FEATURE_TYPE_WHEEL
Type wheel.
Definition peripheral.h:562
@ JOYSTICK_FEATURE_TYPE_UNKNOWN
Unknown type.
Definition peripheral.h:541
@ JOYSTICK_FEATURE_TYPE_MOTOR
Type motor.
Definition peripheral.h:553
@ JOYSTICK_FEATURE_TYPE_ABSPOINTER
Type absolute pointer.
Definition peripheral.h:559
@ JOYSTICK_FEATURE_TYPE_KEY
Type key.
Definition peripheral.h:568
@ JOYSTICK_FEATURE_TYPE_THROTTLE
Type throttle.
Definition peripheral.h:565
@ JOYSTICK_FEATURE_TYPE_SCALAR
Type scalar.
Definition peripheral.h:544
PERIPHERAL_TYPE
Definition peripheral.h:71
@ PERIPHERAL_TYPE_UNKNOWN
Type declared as unknown.
Definition peripheral.h:73
@ PERIPHERAL_TYPE_MOUSE
Type declared as mouse.
Definition peripheral.h:82
@ PERIPHERAL_TYPE_JOYSTICK
Type declared as joystick.
Definition peripheral.h:76
@ PERIPHERAL_TYPE_KEYBOARD
Type declared as keyboard.
Definition peripheral.h:79
Definition peripheral.h:778
Definition peripheral.h:647
const char * addon_path
path to this add-on
Definition peripheral.h:649
const char * user_path
path to the user profile
Definition peripheral.h:648
Definition peripheral.h:655
Battery info of a joystick.
Definition peripheral.h:287
int level
Battery charge level in percent (0-100), or -1 if unknown.
Definition peripheral.h:292
JOYSTICK_BATTERY_STATE state
How the joystick is powered.
Definition peripheral.h:289
Button primitive.
Definition peripheral.h:341
Hat direction primitive.
Definition peripheral.h:375
Keyboard key primitive.
Definition peripheral.h:423
Motor primitive.
Definition peripheral.h:415
Mouse button primitive.
Definition peripheral.h:472
Driver primitive struct.
Definition peripheral.h:514
Relative pointer direction primitive.
Definition peripheral.h:506
Semiaxis primitive.
Definition peripheral.h:404
Mapping between higher-level controller feature and its driver primitives.
Definition peripheral.h:639
Info specific to joystick peripherals.
Definition peripheral.h:242
unsigned int motor_count
number of motors reported by the driver
Definition peripheral.h:249
unsigned int axis_count
number of axes reported by the driver
Definition peripheral.h:248
char * provider
name of the driver or interface providing the joystick
Definition peripheral.h:244
unsigned int button_count
number of buttons reported by the driver
Definition peripheral.h:246
bool supports_poweroff
whether the joystick supports being powered off
Definition peripheral.h:250
unsigned int hat_count
number of hats reported by the driver
Definition peripheral.h:247
PERIPHERAL_INFO peripheral
peripheral info for this joystick
Definition peripheral.h:243
int requested_port
requested port number (such as for 360 controllers), or NO_PORT_REQUESTED
Definition peripheral.h:245
Definition peripheral.h:675
Peripheral add-on capabilities.
Definition peripheral.h:103
bool provides_joysticks
Definition peripheral.h:104
bool provides_buttonmaps
Definition peripheral.h:107
Event information.
Definition peripheral.h:217
unsigned int peripheral_index
Index of the peripheral handling/receiving the event.
Definition peripheral.h:219
unsigned int driver_index
The index of the event source.
Definition peripheral.h:225
PERIPHERAL_EVENT_TYPE type
Type of the event used to determine which enum field to access below.
Definition peripheral.h:222
Information shared between peripherals.
Definition peripheral.h:91
uint16_t product_id
Definition peripheral.h:95
unsigned int index
Definition peripheral.h:96
char * name
Definition peripheral.h:93
uint16_t vendor_id
Definition peripheral.h:94
PERIPHERAL_TYPE type
Definition peripheral.h:92