diff options
author | Olaf Matthes <olafmatt@users.sourceforge.net> | 2006-12-04 13:16:33 +0000 |
---|---|---|
committer | Olaf Matthes <olafmatt@users.sourceforge.net> | 2006-12-04 13:16:33 +0000 |
commit | b0fdf347f5f227f755e673b374005644e9752e83 (patch) | |
tree | 572bd2c5bda1a891be40fbf2feb4b435fc973dfc | |
parent | c26a0e0e0f9aaeeda0ea07e51bce0f7eb0b95591 (diff) |
some more changes for Windows compatibility
svn path=/trunk/externals/io/hidio/; revision=6610
-rw-r--r-- | hidio.h | 16 |
1 files changed, 12 insertions, 4 deletions
@@ -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 <sys/syslog.h> @@ -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 |