aboutsummaryrefslogtreecommitdiff
path: root/hidio.h
diff options
context:
space:
mode:
authorOlaf Matthes <olafmatt@users.sourceforge.net>2006-12-01 15:07:46 +0000
committerOlaf Matthes <olafmatt@users.sourceforge.net>2006-12-01 15:07:46 +0000
commitcb484de796b5e6b9ecfa36111390e9b2086bdd13 (patch)
treefb1e15f2a0664e8ec999b78c81c95a806ed89681 /hidio.h
parent5a32858b29f80e804ca2744661ecf3395ddd316d (diff)
initial Max port for Max 4.5 on OS
svn path=/trunk/externals/io/hidio/; revision=6558
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