/+junk/gjs-vapi

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/%2Bjunk/gjs-vapi

« back to all changes in this revision

Viewing changes to gjs-1.0.vapi

  • Committer: Gustav Hartvigsson
  • Date: 2021-09-13 16:00:35 UTC
  • Revision ID: gustav.hartvigsson@gmail.com-20210913160035-1pyul5jso24apzdb
More code.
* Wrote a simple test.
* fixed the VAPI file so it actually works.

Show diffs side-by-side

added added

removed removed

Lines of Context:
8
8
namespace Gjs {
9
9
  
10
10
  
11
 
  [CCode (cheader_filename = "gjs/error-types.h", cname = "GjsError", prefix = "GJS_ERROR_", lower_case_cprefix = "gjs_error_")]
 
11
  [CCode (cname = "GjsError", cprefix = "GJS_ERROR_", lower_case_cprefix = "gjs_error_")]
12
12
  public errordomain GjsError {
13
13
    FAILED,
14
14
    EXIT,
15
15
  }
16
16
  
17
 
  [CCode (cheader_filename = "gjs/error-types.h", cname = "GjsJSError", prefix = "GJS_JS_ERROR_", lower_case_cprefix = "gjs_js_error_")]
 
17
  [CCode (cname = "GjsJSError", cprefix = "GJS_JS_ERROR_", lower_case_cprefix = "gjs_js_error_")]
18
18
  public errordomain GjsJSError {
19
19
    ERROR,
20
 
    ERROR,
21
20
    EVAL_ERROR,
22
21
    INTERNAL_ERROR,
23
22
    RANGE_ERROR,
32
31
   * Gjs.Context is an opaque datastructure with no outward visible
33
32
   * members.
34
33
   */
35
 
  [CCode (cheader_filename = "gjs/context.h", cname = "GjsContext", type_id = "GJS_TYPE_CONTEXT")]
36
 
  public class Context {
 
34
  [CCode (cname = "GjsContext",
 
35
          type_id = "GJS_TYPE_CONTEXT")]
 
36
  public class Context : GLib.Object {
37
37
    
38
38
    [CCode (cname = "gjs_context_new")]
39
39
    public Context ();
40
40
    
41
41
    [CCode (cname = "gjs_context_new_with_search_path")]
42
 
    public bool Context.with_search_path (string[] search_path);
 
42
    public Context.with_search_path ([CCode (array_length = false)] string[] search_path);
43
43
    
44
 
    [CCode (cname = "gjs_context_file")]
45
 
    public bool eval_file (const string filename,
 
44
    [CCode (cname = "gjs_context_eval_file")]
 
45
    public bool eval_file (string filename,
46
46
                      out int exit_status_p)
47
47
                      throws GLib.Error;
48
48
    
49
49
    [CCode (cname = "gjs_context_eval_module_file")]
50
 
    public bool eval_module_file (const string filename,
 
50
    public bool eval_module_file (string filename,
51
51
                                  out uint8 exit_status_p)
52
52
                                  throws GLib.Error;
53
53
    
54
54
    
55
55
    [CCode (cname = "gjs_context_eval")]
56
 
    public bool eval (const string script,
57
 
                      const string filename,
58
 
                      out exit_status_p)
 
56
    public bool eval (string script,
 
57
                      string filename,
 
58
                      out int exit_status_p)
59
59
                      throws GLib.Error;
60
60
    
61
61
    [CCode (cname = "gjs_context_register_module")]
62
 
    public bool register_module (const string identifier,
63
 
                                 const string uri)
 
62
    public bool register_module (string identifier,
 
63
                                 string uri)
64
64
                                 throws GLib.Error;
65
65
    
66
66
    [CCode (cname = "gjs_context_eval_module")]
67
 
    public bool eval_module (const string identifier,
 
67
    public bool eval_module (string identifier,
68
68
                             out uint8 exit_code)
69
69
                             throws GLib.Error;
70
70
    
71
71
    [CCode (cname = "gjs_context_define_string_array")]
72
 
    public bool define_string_array (const string array_name,
73
 
                                     [CCode array_length_pos = 1.1]
74
 
                                     const string[] array_values)
 
72
    public bool define_string_array (string array_name,
 
73
                                     [CCode (array_length_pos = 1.1)]
 
74
                                     string[] array_values)
75
75
                                     throws GLib.Error;
76
76
    
77
77
    [CCode (cname = "gjs_context_set_argv")]
78
 
    public void set_argv ([CCode array_length_pos = 0.1]
 
78
    public void set_argv ([CCode (array_length_pos = 0.1)]
79
79
                          string[] array_values);
80
80
    
81
81
    [CCode (cname = "gjs_context_get_all")]
88
88
    public void make_current ();
89
89
    
90
90
    [CCode (cname = "gjs_context_get_native_context")]
91
 
    public pointer get_native_context ();
 
91
    public GLib.pointer get_native_context ();
92
92
    
93
93
    [CCode (cname = "gjs_context_print_stack_stderr")]
94
94
    public void print_stack_stderr ();
103
103
    public Profiler get_profiler ();
104
104
    
105
105
    [CCode (cname = "gjs_profiler_chain_sgnal")]
106
 
    public bool profiler_chain_signal (Posix.siginfo_t info)
 
106
    public bool profiler_chain_signal (Posix.siginfo_t info);
107
107
    
108
108
    [CCode (cname = "gjs_context_setup_debugger_console")]
109
109
    public void setup_debugger_console ();
113
113
  public void dump_stack ();
114
114
  
115
115
  [CCode (cheader_filename = "gjs/context.h", cname = "gjs_get_js_version")]
116
 
  public const string get_js_version ();
 
116
  public string get_js_version ();
117
117
  
118
118
  /*
119
119
   * This class has no visible _new function, can only be created from
120
120
   * context.
121
121
   */
122
122
  [CCode (cheader_filename = "gjs/profiler.h", cname = "GjsProfiler", type_id = "GJS_TYPE_PROFILER")]
123
 
  public class Profiler {
 
123
  public class Profiler : GLib.Object {
124
124
    
125
125
    [CCode (cname = "gjs_profiler_set_capture_writer")]
126
 
    set_capture_writer (pointer capture);
 
126
    void set_capture_writer (GLib.pointer capture);
127
127
    
128
128
    [CCode (cname = "gjs_profiler_set_filename")]
129
 
    set_filename (const string filename);
 
129
    void set_filename (string filename);
130
130
    
131
131
    [CCode (cname = "gjs_profiler_set_fd")]
132
 
    set_fd (int fd);
 
132
    void set_fd (int fd);
133
133
    
134
134
    [CCode (cname = "gjs_profiler_start")]
135
 
    start ();
 
135
    void start ();
136
136
    
137
137
    [CCode (cname = "gjs_profiler_stop")]
138
 
    stop ();
 
138
    void stop ();
139
139
  }
140
140
  
141
141
  [CCode (cheader_filename = "gjs/mem.h", cname = "gjs_memory_report")]
142
 
  memory_report (const string where,
 
142
  void memory_report (string where,
143
143
                 bool die_if_fail);
144
144
  
145
145
  [CCode (cheader_filename = "gjs/coverage.h", cname = "GjsProfiler", type_id = "GJS_TYPE_COVERAGE")]
146
 
  public class Coverage {
 
146
  public class Coverage : GLib.Object {
147
147
    
148
148
    [CCode (cname = "gjs_coverage_new")]
149
 
    public Coverage (const string coverage_prefixes
 
149
    public Coverage (string coverage_prefixes,
150
150
                     Context coverage_context,
151
151
                     GLib.File output_dir);
152
152
    
154
154
    public void write_statistics ();
155
155
    
156
156
    [CCode (cname = "gjs_coverage_enable")]
157
 
    public static enable ();
 
157
    public static void enable ();
158
158
  }
159
159
}