diff options
author | Hans-Christoph Steiner <eighthave@users.sourceforge.net> | 2004-10-25 06:01:45 +0000 |
---|---|---|
committer | Hans-Christoph Steiner <eighthave@users.sourceforge.net> | 2004-10-25 06:01:45 +0000 |
commit | f54912043ddd9c9737906823d265b69cecaa1fb3 (patch) | |
tree | 69371b50693d74ba902b0b55b522b17748ca0a64 /hid.h | |
parent | a31c391dc384912d8eb511feb62a12aae0ce7005 (diff) |
completed moving GNU/Linux support into the new structure; flushed out Darwin a bit more
svn path=/trunk/externals/hcs/hid/; revision=2154
Diffstat (limited to 'hid.h')
-rw-r--r-- | hid.h | 28 |
1 files changed, 19 insertions, 9 deletions
@@ -1,11 +1,17 @@ #ifndef _HID_H #define _HID_H +#include <stdio.h> + #include <m_pd.h> -#include "hid.h" +/* + * this is automatically generated from linux/input.h by + * make-arrays-from-input.h.pl to be the cross-platform event types and codes + */ +#include "input_arrays.h" -static char *version = "$Revision: 1.3 $"; +static char *version = "$Revision: 1.4 $"; /*------------------------------------------------------------------------------ * CLASS DEF @@ -17,6 +23,7 @@ typedef struct _hid t_object x_obj; t_int x_fd; t_symbol *x_devname; + t_int x_device_number; t_clock *x_clock; t_int x_read_ok; t_int x_started; @@ -31,6 +38,7 @@ typedef struct _hid * GLOBALS */ +/* what are these for again? */ char *deviceList[64]; char *typeList[256]; char *codeList[256]; @@ -39,12 +47,14 @@ char *codeList[256]; * FUNCTION PROTOTYPES FOR DIFFERENT PLATFORMS */ -#ifdef __linux__ -void releaseDevices(void); -void buildDeviceList(void); -void buildTypeList(void); +/* generic, cross-platform functions */ +t_int hid_open_device(t_hid *x, t_int device_number); +t_int hid_close_device(t_hid *x); +t_int hid_devicelist_refresh(t_hid* x); +t_int hid_output_events(t_hid *x) ; + + -#endif #ifdef __APPLE__ @@ -55,12 +65,12 @@ int prHIDGetValue(void); void PushQueueEvents_RawValue(void); void PushQueueEvents_CalibratedValue(void); int prHIDReleaseDeviceList(void); -int prHIDRunEventLoop(void); +//int prHIDRunEventLoop(void); int prHIDQueueDevice(void); int prHIDQueueElement(void); int prHIDDequeueElement(void); int prHIDDequeueDevice(void); -int prHIDStopEventLoop(void); +//int prHIDStopEventLoop(void); #endif /* #ifdef __APPLE__ */ |