From b0fdf347f5f227f755e673b374005644e9752e83 Mon Sep 17 00:00:00 2001 From: Olaf Matthes Date: Mon, 4 Dec 2006 13:16:33 +0000 Subject: some more changes for Windows compatibility svn path=/trunk/externals/io/hidio/; revision=6610 --- hidio.h | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'hidio.h') diff --git a/hidio.h b/hidio.h index 7e73fe7..8c15eb4 100644 --- a/hidio.h +++ b/hidio.h @@ -7,6 +7,7 @@ #define LOG_DEBUG 7 #define LOG_INFO 6 #define LOG_WARNING 4 +#define LOG_ERR 3 #define vsnprintf _vsnprintf #else #include @@ -47,7 +48,7 @@ typedef void t_clock; #define HIDIO_MAJOR_VERSION 0 #define HIDIO_MINOR_VERSION 0 -/* static char *version = "$Revision: 1.6 $"; */ +/* static char *version = "$Revision: 1.7 $"; */ /*------------------------------------------------------------------------------ * GLOBAL DEFINES @@ -87,8 +88,13 @@ typedef struct _hidio t_object x_obj; #ifndef PD void *x_obex; +#endif +#ifdef _WINDOWS + HANDLE x_fd; +#endif +#ifdef __linux__ + t_int x_fd; #endif - t_int x_fd; void *x_ff_device; short x_device_number; short x_instance; @@ -131,10 +137,12 @@ typedef struct _hid_element __u16 linux_code; #endif /* __linux__ */ #ifdef _WIN32 - /* this should store the UsagePage and Usage */ + /* this stores the UsagePage and UsageID */ + unsigned short usage_page; + unsigned short usage_id; #endif /* _WIN32 */ #ifdef __APPLE__ - void *pHIDElement; // pRecElement on Mac OS X; ... on Windows + void *pHIDElement; // pRecElement on Mac OS X #endif /* __APPLE__ */ t_symbol *type; // Linux "type"; HID "usagePage", but using the hidio scheme t_symbol *name; // Linux "code"; HID "usage", but using the hidio scheme -- cgit v1.2.1