RetroArch
Classes | Typedefs | Functions | Variables
iohidmanager_hid.c File Reference
#include <stdlib.h>
#include <string/stdstring.h>
#include <IOKit/hid/IOHIDManager.h>
#include <IOKit/hid/IOHIDKeys.h>
#include <retro_miscellaneous.h>
#include "../input_defines.h"
#include "../input_driver.h"
#include "../connect/joypad_connection.h"
#include "../../tasks/tasks_internal.h"
#include "../../verbosity.h"
Include dependency graph for iohidmanager_hid.c:

Classes

struct  apple_input_rec
 
struct  apple_hid
 
struct  iohidmanager_hid_adapter
 

Typedefs

typedef struct apple_input_rec apple_input_rec_t
 
typedef struct apple_hid iohidmanager_hid_t
 

Functions

CFComparisonResult iohidmanager_sort_elements (const void *val1, const void *val2, void *context)
 
static bool iohidmanager_check_for_id (apple_input_rec_t *rec, uint32_t id)
 
static void iohidmanager_append_record (apple_input_rec_t *rec, apple_input_rec_t *b)
 
static void iohidmanager_append_record_ordered (apple_input_rec_t **p_rec, apple_input_rec_t *b)
 
static bool iohidmanager_hid_joypad_query (void *data, unsigned pad)
 
static const char * iohidmanager_hid_joypad_name (void *data, unsigned pad)
 
static void iohidmanager_hid_joypad_get_buttons (void *data, unsigned port, input_bits_t *state)
 
static bool iohidmanager_hid_joypad_button (void *data, unsigned port, uint16_t joykey)
 
static bool iohidmanager_hid_joypad_rumble (void *data, unsigned pad, enum retro_rumble_effect effect, uint16_t strength)
 
static int16_t iohidmanager_hid_joypad_axis (void *data, unsigned port, uint32_t joyaxis)
 
static void iohidmanager_hid_device_send_control (void *data, uint8_t *data_buf, size_t size)
 
static void iohidmanager_hid_device_report (void *data, IOReturn result, void *sender, IOHIDReportType type, uint32_t reportID, uint8_t *report, CFIndex reportLength)
 
static void iohidmanager_hid_device_input_callback (void *data, IOReturn result, void *sender, IOHIDValueRef value)
 
static void iohidmanager_hid_device_remove (void *data, IOReturn result, void *sender)
 
static int32_t iohidmanager_hid_device_get_int_property (IOHIDDeviceRef device, CFStringRef key)
 
static uint16_t iohidmanager_hid_device_get_vendor_id (IOHIDDeviceRef device)
 
static uint16_t iohidmanager_hid_device_get_product_id (IOHIDDeviceRef device)
 
static uint32_t iohidmanager_hid_device_get_location_id (IOHIDDeviceRef device)
 
static uint32_t iohidmanager_hid_device_get_unique_id (IOHIDDeviceRef device)
 
static void iohidmanager_hid_device_get_product_string (IOHIDDeviceRef device, char *buf, size_t len)
 
static void iohidmanager_hid_device_add_autodetect (unsigned idx, const char *device_name, const char *driver_name, uint16_t dev_vid, uint16_t dev_pid)
 
static void iohidmanager_hid_device_add_device (IOHIDDeviceRef device, iohidmanager_hid_t *hid)
 
static void iohidmanager_hid_device_add (void *data, IOReturn result, void *sender, IOHIDDeviceRef device)
 
static void iohidmanager_hid_append_matching_dictionary (CFMutableArrayRef array, uint32_t page, uint32_t use)
 
static int iohidmanager_hid_manager_init (iohidmanager_hid_t *hid)
 
static int iohidmanager_hid_manager_free (iohidmanager_hid_t *hid)
 
static int iohidmanager_hid_manager_set_device_matching (iohidmanager_hid_t *hid)
 
static voidiohidmanager_hid_init (void)
 
static void iohidmanager_hid_free (const void *data)
 
static void iohidmanager_hid_poll (void *data)
 

Variables

hid_driver_t iohidmanager_hid
 

Typedef Documentation

◆ apple_input_rec_t

◆ iohidmanager_hid_t

typedef struct apple_hid iohidmanager_hid_t

Function Documentation

◆ iohidmanager_append_record()

static void iohidmanager_append_record ( apple_input_rec_t rec,
apple_input_rec_t b 
)
static
Here is the caller graph for this function:

◆ iohidmanager_append_record_ordered()

static void iohidmanager_append_record_ordered ( apple_input_rec_t **  p_rec,
apple_input_rec_t b 
)
static
Here is the caller graph for this function:

◆ iohidmanager_check_for_id()

static bool iohidmanager_check_for_id ( apple_input_rec_t rec,
uint32_t  id 
)
static
Here is the caller graph for this function:

◆ iohidmanager_hid_append_matching_dictionary()

static void iohidmanager_hid_append_matching_dictionary ( CFMutableArrayRef  array,
uint32_t  page,
uint32_t  use 
)
static
Here is the caller graph for this function:

◆ iohidmanager_hid_device_add()

static void iohidmanager_hid_device_add ( void data,
IOReturn  result,
void sender,
IOHIDDeviceRef  device 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ iohidmanager_hid_device_add_autodetect()

static void iohidmanager_hid_device_add_autodetect ( unsigned  idx,
const char *  device_name,
const char *  driver_name,
uint16_t  dev_vid,
uint16_t  dev_pid 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ iohidmanager_hid_device_add_device()

static void iohidmanager_hid_device_add_device ( IOHIDDeviceRef  device,
iohidmanager_hid_t hid 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ iohidmanager_hid_device_get_int_property()

static int32_t iohidmanager_hid_device_get_int_property ( IOHIDDeviceRef  device,
CFStringRef  key 
)
static
Here is the caller graph for this function:

◆ iohidmanager_hid_device_get_location_id()

static uint32_t iohidmanager_hid_device_get_location_id ( IOHIDDeviceRef  device)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ iohidmanager_hid_device_get_product_id()

static uint16_t iohidmanager_hid_device_get_product_id ( IOHIDDeviceRef  device)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ iohidmanager_hid_device_get_product_string()

static void iohidmanager_hid_device_get_product_string ( IOHIDDeviceRef  device,
char *  buf,
size_t  len 
)
static
Here is the caller graph for this function:

◆ iohidmanager_hid_device_get_unique_id()

static uint32_t iohidmanager_hid_device_get_unique_id ( IOHIDDeviceRef  device)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ iohidmanager_hid_device_get_vendor_id()

static uint16_t iohidmanager_hid_device_get_vendor_id ( IOHIDDeviceRef  device)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ iohidmanager_hid_device_input_callback()

static void iohidmanager_hid_device_input_callback ( void data,
IOReturn  result,
void sender,
IOHIDValueRef  value 
)
static
Here is the caller graph for this function:

◆ iohidmanager_hid_device_remove()

static void iohidmanager_hid_device_remove ( void data,
IOReturn  result,
void sender 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ iohidmanager_hid_device_report()

static void iohidmanager_hid_device_report ( void data,
IOReturn  result,
void sender,
IOHIDReportType  type,
uint32_t  reportID,
uint8_t report,
CFIndex  reportLength 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ iohidmanager_hid_device_send_control()

static void iohidmanager_hid_device_send_control ( void data,
uint8_t data_buf,
size_t  size 
)
static

◆ iohidmanager_hid_free()

static void iohidmanager_hid_free ( const void data)
static
Here is the call graph for this function:

◆ iohidmanager_hid_init()

static void* iohidmanager_hid_init ( void  )
static
Here is the call graph for this function:

◆ iohidmanager_hid_joypad_axis()

static int16_t iohidmanager_hid_joypad_axis ( void data,
unsigned  port,
uint32_t  joyaxis 
)
static
Here is the call graph for this function:

◆ iohidmanager_hid_joypad_button()

static bool iohidmanager_hid_joypad_button ( void data,
unsigned  port,
uint16_t  joykey 
)
static
Here is the call graph for this function:

◆ iohidmanager_hid_joypad_get_buttons()

static void iohidmanager_hid_joypad_get_buttons ( void data,
unsigned  port,
input_bits_t state 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ iohidmanager_hid_joypad_name()

static const char* iohidmanager_hid_joypad_name ( void data,
unsigned  pad 
)
static

◆ iohidmanager_hid_joypad_query()

static bool iohidmanager_hid_joypad_query ( void data,
unsigned  pad 
)
static

◆ iohidmanager_hid_joypad_rumble()

static bool iohidmanager_hid_joypad_rumble ( void data,
unsigned  pad,
enum retro_rumble_effect  effect,
uint16_t  strength 
)
static
Here is the call graph for this function:

◆ iohidmanager_hid_manager_free()

static int iohidmanager_hid_manager_free ( iohidmanager_hid_t hid)
static
Here is the caller graph for this function:

◆ iohidmanager_hid_manager_init()

static int iohidmanager_hid_manager_init ( iohidmanager_hid_t hid)
static
Here is the caller graph for this function:

◆ iohidmanager_hid_manager_set_device_matching()

static int iohidmanager_hid_manager_set_device_matching ( iohidmanager_hid_t hid)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ iohidmanager_hid_poll()

static void iohidmanager_hid_poll ( void data)
static
Here is the call graph for this function:

◆ iohidmanager_sort_elements()

CFComparisonResult iohidmanager_sort_elements ( const void val1,
const void val2,
void context 
)
Here is the caller graph for this function:

Variable Documentation

◆ iohidmanager_hid

hid_driver_t iohidmanager_hid
Initial value:
= {
"iohidmanager",
}
static int16_t iohidmanager_hid_joypad_axis(void *data, unsigned port, uint32_t joyaxis)
Definition: iohidmanager_hid.c:197
static void iohidmanager_hid_joypad_get_buttons(void *data, unsigned port, input_bits_t *state)
Definition: iohidmanager_hid.c:139
static bool iohidmanager_hid_joypad_query(void *data, unsigned pad)
Definition: iohidmanager_hid.c:125
static void iohidmanager_hid_device_send_control(void *data, uint8_t *data_buf, size_t size)
Definition: iohidmanager_hid.c:228
static bool iohidmanager_hid_joypad_button(void *data, unsigned port, uint16_t joykey)
Definition: iohidmanager_hid.c:149
static void * iohidmanager_hid_init(void)
Definition: iohidmanager_hid.c:1091
static const char * iohidmanager_hid_joypad_name(void *data, unsigned pad)
Definition: iohidmanager_hid.c:130
static void iohidmanager_hid_poll(void *data)
Definition: iohidmanager_hid.c:1133
static bool iohidmanager_hid_joypad_rumble(void *data, unsigned pad, enum retro_rumble_effect effect, uint16_t strength)
Definition: iohidmanager_hid.c:188
static void iohidmanager_hid_free(const void *data)
Definition: iohidmanager_hid.c:1119