aboutsummaryrefslogtreecommitdiff
path: root/external/pd.cs
diff options
context:
space:
mode:
Diffstat (limited to 'external/pd.cs')
-rwxr-xr-xexternal/pd.cs49
1 files changed, 49 insertions, 0 deletions
diff --git a/external/pd.cs b/external/pd.cs
new file mode 100755
index 0000000..c844195
--- /dev/null
+++ b/external/pd.cs
@@ -0,0 +1,49 @@
+using System;
+using System.Runtime.CompilerServices;
+
+namespace PureData
+{
+ public enum ParametersType {None = 0, Float=1, Symbol=2, List=3};
+
+ public class pd
+ {
+ [MethodImplAttribute (MethodImplOptions.InternalCall)]
+ private extern static void RegisterSelector (IntPtr x, string sel, string met, int type);
+ // function called by the user
+ public static void AddSelector(IntPtr x, string sel, string met, ParametersType type)
+ {
+ RegisterSelector (x, sel, met, (int) type);
+ }
+
+ // TODO
+ // send stuff to an outlet
+ [MethodImplAttribute (MethodImplOptions.InternalCall)]
+ public extern static void ToOutlet (IntPtr x, int outlet, int type /*, ? array of values */);
+
+ // create an outlet
+ [MethodImplAttribute (MethodImplOptions.InternalCall)]
+ private extern static void CreateOutlet (IntPtr x, int type);
+ // function called by the user
+ public static void AddOutlet(IntPtr x, ParametersType type)
+ {
+ CreateOutlet (x, (int) type);
+ }
+
+ // create an inlet
+ [MethodImplAttribute (MethodImplOptions.InternalCall)]
+ private extern static void CreateInlet (IntPtr x, string selector, int type);
+ // function called by the user
+ public static void AddInlet(IntPtr x, string selector, ParametersType type)
+ {
+ CreateInlet (x, selector, (int) type);
+ }
+
+ [MethodImplAttribute (MethodImplOptions.InternalCall)]
+ public extern static void PostMessage (string message);
+
+ [MethodImplAttribute (MethodImplOptions.InternalCall)]
+ public extern static void ErrorMessage (string message);
+
+
+ }
+}