[vala] Add orc-0.4 binding



commit 6a4b1da2371d873d38a63e538ab1dacb53a61c77
Author: Fabian Deutsch <fabian deutsch gmx de>
Date:   Sat May 15 19:02:25 2010 -0700

    Add orc-0.4 binding
    
    Fixes bug 618570.

 vapi/Makefile.am  |    1 +
 vapi/orc-0.4.vapi |   89 +++++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 90 insertions(+), 0 deletions(-)
---
diff --git a/vapi/Makefile.am b/vapi/Makefile.am
index b1e6dde..65f54c2 100644
--- a/vapi/Makefile.am
+++ b/vapi/Makefile.am
@@ -163,6 +163,7 @@ dist_vapi_DATA = \
 	loudmouth-1.0.vapi \
 	lua.vapi \
 	mysql.vapi \
+	orc-0.4.vapi \
 	pango.deps \
 	pango.vapi \
 	pangocairo.deps \
diff --git a/vapi/orc-0.4.vapi b/vapi/orc-0.4.vapi
new file mode 100644
index 0000000..b5085d7
--- /dev/null
+++ b/vapi/orc-0.4.vapi
@@ -0,0 +1,89 @@
+[CCode (lower_case_cprefix = "orc_", cheader_filename = "orc/orc.h")]
+namespace Orc {
+	[Compact]
+	public class Program {
+		public Program ();
+		public Program.dss (int size1, int size2, int size3);
+
+		public unowned string get_name ();
+
+		public void add_temporary (int size, owned string name);
+		public void add_source (int size, owned string name);
+		public void add_destination (int size, owned string name);
+		public void add_constant (int size, owned string name);
+		public void add_accumulator (int size, owned string name);
+		public void add_parameter (int size, owned string name);
+
+		public void append (string opcode, int arg0, int arg1, int arg2);
+		public void append_str (string opcode, string arg0, string arg1, string arg2);
+		public void append_ds (string opcode, int arg0, int arg1);
+		public void append_ds_str (string opcode, string arg0, string arg1);
+
+		public Orc.CompileResult compile ();
+
+		public string get_asm_code ();
+		public int find_var_by_name (string name);
+
+		public void set_2d();
+	}
+
+	[Compact]
+	public class Compiler {
+	}
+
+	public enum CompileResult {
+		OK,
+		UNKNOWN_COMPILE,
+		MISSING_RULE,
+		UNKNOWN_PARSE,
+		PARSE,
+		VARIABLE;
+
+		[CCode (cname = "ORC_COMPILE_RESULT_IS_SUCCESSFUL")]
+		public bool is_successful ();
+		[CCode (cname = "ORC_COMPILE_RESULT_IS_FATAL")]
+		public bool is_fatal ();
+	}
+
+	[Compact]
+	public class Executor {
+		[CCode (cname = "orc_executor_new")]
+		public Executor (Orc.Program p);
+
+		public void set_array (int _var, void* ptr);
+		public void set_array_str (string _var, void* ptr);
+
+		public void set_n (int n);
+
+		public void emulate ();
+		public void run ();
+
+		public int get_accumulator (int n);
+		public int get_accumulator_str (string name);
+		public int set_param (int n, int val);
+		public int set_param_str (string name, int val);
+
+		public void set_program (Orc.Program p);
+
+		public void set_2d ();
+		public void set_m (int n);
+		public void set_stride (int _var, int stride);
+	}
+
+	[CCode (cprefix = "ORC_DEBUG_")]
+	public enum DebugLevel {
+		NONE,
+		ERROR,
+		WARNING,
+		INFO,
+		DEBUG,
+		LOG
+	}
+
+	namespace Debug {
+		public void set_level (Orc.DebugLevel l);
+	}
+
+	public static void init ();
+}
+



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]