aboutsummaryrefslogtreecommitdiff
path: root/hidio.h
diff options
context:
space:
mode:
Diffstat (limited to 'hidio.h')
-rw-r--r--hidio.h30
1 files changed, 24 insertions, 6 deletions
diff --git a/hidio.h b/hidio.h
index 7b709ad..3a2a670 100644
--- a/hidio.h
+++ b/hidio.h
@@ -8,7 +8,22 @@
#include <linux/types.h>
#endif /* __linux__ */
+#ifdef PD
#include <m_pd.h>
+#else
+#include "ext.h"
+#include "ext_obex.h"
+#include "commonsyms.h"
+/* some Pd specific types need definition in Max */
+typedef long t_int;
+typedef double t_float;
+typedef double t_floatarg;
+typedef void t_outlet;
+typedef void t_clock;
+#define MAXPDSTRING 512
+#define pd_error(x, b) error(b)
+#define SETSYMBOL SETSYM
+#endif
/*
* this is automatically generated from linux/input.h by
@@ -19,7 +34,7 @@
#define HIDIO_MAJOR_VERSION 0
#define HIDIO_MINOR_VERSION 0
-/* static char *version = "$Revision: 1.1 $"; */
+/* static char *version = "$Revision: 1.2 $"; */
/*------------------------------------------------------------------------------
* GLOBAL DEFINES
@@ -44,6 +59,9 @@ typedef struct _hidio
{
t_object x_obj;
+#ifndef PD
+ void *x_obex;
+#endif
t_int x_fd;
void *x_ff_device;
short x_device_number;
@@ -66,10 +84,10 @@ typedef struct _hidio
/* count the number of instances of this object so that certain free()
* functions can be called only after the final instance is detroyed.
*/
-t_int hidio_instance_count;
+extern t_int hidio_instance_count;
/* this is used to test for the first instance to execute */
-double last_execute_time[MAX_DEVICES];
+extern double last_execute_time[MAX_DEVICES];
extern unsigned short global_debug_level;
@@ -99,12 +117,12 @@ typedef struct _hid_element
} t_hid_element;
/* mostly for status querying */
-unsigned short device_count;
+extern unsigned short device_count;
/* store element structs to eliminate symbol table lookups, etc. */
-t_hid_element *element[MAX_DEVICES][MAX_ELEMENTS];
+extern t_hid_element *element[MAX_DEVICES][MAX_ELEMENTS];
/* number of active elements per device */
-unsigned short element_count[MAX_DEVICES];
+extern unsigned short element_count[MAX_DEVICES];
/*------------------------------------------------------------------------------
* FUNCTION PROTOTYPES FOR DIFFERENT PLATFORMS