diff options
author | Davide Morelli <morellid@users.sourceforge.net> | 2006-01-12 09:24:23 +0000 |
---|---|---|
committer | Davide Morelli <morellid@users.sourceforge.net> | 2006-01-12 09:24:23 +0000 |
commit | 20854f57a1617b4f662516445d20778ddbd6552d (patch) | |
tree | 25f1ced623d1de1af74d6fc1d78d5dcb8332ef46 /external/pd.cs | |
parent | 70fd0fd73aaa002d4d7e9841d8af105c4c80ddf4 (diff) |
checking in the c sharp part
svn path=/trunk/externals/clr/; revision=4388
Diffstat (limited to 'external/pd.cs')
-rwxr-xr-x | external/pd.cs | 49 |
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);
+
+
+ }
+}
|