summaryrefslogtreecommitdiff
path: root/tests/gir/class.gir
blob: 8ee9fc010ddc3bb10d52c96651828b8b994e6433 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
<?xml version="1.0"?>
<repository version="1.2" xmlns="http://www.gtk.org/introspection/core/1.0" xmlns:c="http://www.gtk.org/introspection/c/1.0" xmlns:glib="http://www.gtk.org/introspection/glib/1.0">
<include name="GObject" version="2.0"/>
<include name="GLib" version="2.0"/>
<include name="Gio" version="2.0"/>
<package name="test"/>
<c:include name="test.h"/>
<namespace name="Test" version="1.0" shared-library="test" c:prefix="Test" c:identifier-prefixes="Test" c:symbol-prefixes="test">
<alias name="Bar" c:type="TestBar">
  <type name="Foo" c:type="TestFoo"/>
</alias>
<alias name="IBar" c:type="TestIBar">
  <type name="IFoo" c:type="TestIFoo"/>
</alias>
<class name="Foo" c:type="TestFoo" glib:type-name="TestFoo" glib:get-type="test_foo_get_type" glib:type-struct="FooClass" parent="GObject.Object">
  <implements name="Test.IFoo"/>
  <method name="method_virtual" c:identifier="test_foo_method_virtual" throws="1">
    <return-value transfer-ownership="full">
      <type name="none"/>
    </return-value>
  </method>
  <virtual-method name="method_virtual" invoker="method_virtual" throws="1">
    <return-value transfer-ownership="full">
      <type name="none"/>
    </return-value>
  </virtual-method>
  <method name="method_async" c:identifier="test_foo_method_async">
    <return-value transfer-ownership="none">
      <type name="none"/>
    </return-value>
    <parameters>
      <parameter name="input" transfer-ownership="none">
        <type name="utf8" c:type="const gchar*"/>
      </parameter>
      <parameter name="_callback_" transfer-ownership="none" allow-none="1" closure="2" scope="async">
        <type name="Gio.AsyncReadyCallback" c:type="GAsyncReadyCallback"/>
      </parameter>
      <parameter name="_callback__target" transfer-ownership="none" allow-none="1">
        <type name="gpointer" c:type="void*"/>
      </parameter>
    </parameters>
  </method>
  <method name="method_finish" c:identifier="test_foo_method_finish" throws="1">
    <return-value transfer-ownership="full">
      <type name="none"/>
    </return-value>
    <parameters>
      <parameter name="_res_" transfer-ownership="none">
        <type name="Gio.AsyncResult" c:type="GAsyncResult*"/>
      </parameter>
      <parameter name="output" direction="out" transfer-ownership="full">
        <type name="utf8" c:type="gchar**"/>
      </parameter>
    </parameters>
  </method>
  <constructor name="new" c:identifier="test_foo_new">
    <return-value transfer-ownership="full">
      <type name="Test.Foo" c:type="TestFoo*"/>
    </return-value>
  </constructor>
  <constructor name="bar" c:identifier="test_foo_new_bar">
    <return-value transfer-ownership="full">
      <type name="Test.Foo" c:type="TestFoo*"/>
    </return-value>
  </constructor>
  <property name="prop" writable="1" construct="1">
    <type name="utf8" c:type="gchar*"/>
  </property>
  <method name="get_prop" c:identifier="test_foo_get_prop">
    <return-value transfer-ownership="full">
      <type name="utf8" c:type="gchar*"/>
    </return-value>
  </method>
  <method name="set_prop" c:identifier="test_foo_set_prop">
    <return-value transfer-ownership="none">
      <type name="none"/>
    </return-value>
    <parameters>
      <parameter name="value" transfer-ownership="none">
        <type name="utf8" c:type="const gchar*"/>
      </parameter>
    </parameters>
  </method>
  <glib:signal name="sig">
    <return-value transfer-ownership="full">
      <type name="none"/>
    </return-value>
    <parameters>
      <parameter name="arg" transfer-ownership="none">
        <type name="utf8" c:type="const gchar*"/>
      </parameter>
    </parameters>
  </glib:signal>
</class>
<record name="FooClass" c:type="TestFooClass" glib:is-gtype-struct-for="Foo">
  <field name="method_virtual">
    <callback name="method_virtual" c:type="method_virtual" throws="1">
      <return-value transfer-ownership="full">
        <type name="none"/>
      </return-value>
      <parameters>
        <parameter name="self" transfer-ownership="none">
          <type name="Test.Foo" c:type="TestFoo*"/>
        </parameter>
      </parameters>
    </callback>
  </field>
</record>
<record name="FooPrivate" c:type="TestFooPrivate" disguised="1"/>
<interface name="IFoo" c:type="TestIFoo" glib:type-name="TestIFoo" glib:get-type="test_ifoo_get_type" glib:type-struct="IFooIface">
  <prerequisite name="GObject.Object"/>
  <method name="method" c:identifier="test_ifoo_method" throws="1">
    <return-value transfer-ownership="full">
      <type name="none"/>
    </return-value>
  </method>
  <virtual-method name="method" invoker="method" throws="1">
    <return-value transfer-ownership="full">
      <type name="none"/>
    </return-value>
  </virtual-method>
</interface>
<record name="IFooIface" c:type="TestIFooIface" glib:is-gtype-struct-for="IFoo">
  <field name="method">
    <callback name="method" c:type="method" throws="1">
      <return-value transfer-ownership="full">
        <type name="none"/>
      </return-value>
      <parameters>
        <parameter name="self" transfer-ownership="none">
          <type name="Test.IFoo" c:type="TestIFoo*"/>
        </parameter>
      </parameters>
    </callback>
  </field>
</record>
</namespace>
</repository>