Release 0.40.3
[vala-gnome.git] / vapi / orc-0.4.vapi
blob1c252c4c949c49457b5fcd46b332aad0f923231c
1 [CCode (lower_case_cprefix = "orc_", cheader_filename = "orc/orc.h")]
2 namespace Orc {
3         [Compact]
4         public class Program {
5                 public Program ();
6                 public Program.dss (int size1, int size2, int size3);
8                 public unowned string get_name ();
10                 public void add_temporary (int size, owned string name);
11                 public void add_source (int size, owned string name);
12                 public void add_destination (int size, owned string name);
13                 public void add_constant (int size, owned string name);
14                 public void add_accumulator (int size, owned string name);
15                 public void add_parameter (int size, owned string name);
17                 public void append (string opcode, int arg0, int arg1, int arg2);
18                 public void append_str (string opcode, string arg0, string arg1, string arg2);
19                 public void append_ds (string opcode, int arg0, int arg1);
20                 public void append_ds_str (string opcode, string arg0, string arg1);
22                 public Orc.CompileResult compile ();
24                 public string get_asm_code ();
25                 public int find_var_by_name (string name);
27                 public void set_2d();
28         }
30         [Compact]
31         public class Compiler {
32         }
34         [CCode (has_type_id = false)]
35         public enum CompileResult {
36                 OK,
37                 UNKNOWN_COMPILE,
38                 MISSING_RULE,
39                 UNKNOWN_PARSE,
40                 PARSE,
41                 VARIABLE;
43                 [CCode (cname = "ORC_COMPILE_RESULT_IS_SUCCESSFUL")]
44                 public bool is_successful ();
45                 [CCode (cname = "ORC_COMPILE_RESULT_IS_FATAL")]
46                 public bool is_fatal ();
47         }
49         [Compact]
50         public class Executor {
51                 [CCode (cname = "orc_executor_new")]
52                 public Executor (Orc.Program p);
54                 public void set_array (int _var, void* ptr);
55                 public void set_array_str (string _var, void* ptr);
57                 public void set_n (int n);
59                 public void emulate ();
60                 public void run ();
62                 public int get_accumulator (int n);
63                 public int get_accumulator_str (string name);
64                 public int set_param (int n, int val);
65                 public int set_param_str (string name, int val);
67                 public void set_program (Orc.Program p);
69                 public void set_2d ();
70                 public void set_m (int n);
71                 public void set_stride (int _var, int stride);
72         }
74         [CCode (cprefix = "ORC_DEBUG_", has_type_id = false)]
75         public enum DebugLevel {
76                 NONE,
77                 ERROR,
78                 WARNING,
79                 INFO,
80                 DEBUG,
81                 LOG
82         }
84         namespace Debug {
85                 public void set_level (Orc.DebugLevel l);
86         }
88         public static void init ();