Skip to content

Commit 8bc5eeb

Browse files
garaevdidanirabbit
andauthored
Update vapi for Mutter50 (#679)
Co-authored-by: Danielle Foré <danielle@elementary.io>
1 parent b702242 commit 8bc5eeb

18 files changed

+1107
-12
lines changed

vapi/Clutter-18.metadata

Lines changed: 145 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,145 @@
1+
// Non mini-object
2+
ActorBox struct
3+
Margin struct
4+
PaintVolume struct
5+
Perspective struct
6+
7+
*.ref unowned
8+
* cheader_filename="clutter/clutter.h"
9+
10+
// Fix the few clutter-pango headers
11+
Text cheader_filename="clutter/clutter-pango.h"
12+
TextBuffer cheader_filename="clutter/clutter-pango.h"
13+
TextNode cheader_filename="clutter/clutter-pango.h"
14+
Actor
15+
.get_pango_context cheader_filename="clutter/clutter-pango.h"
16+
.create_pango_context cheader_filename="clutter/clutter-pango.h"
17+
.create_pango_layout cheader_filename="clutter/clutter-pango.h"
18+
19+
20+
Actor
21+
.apply_transform.matrix ref
22+
.get_abs_allocation_vertices.verts out=false
23+
Event.type#method name="get_type"
24+
25+
// ???
26+
Actor.has_pointer#method name="get_has_pointer"
27+
28+
// Not all backing symbols are deprecated
29+
Actor.pick deprecated=false
30+
31+
// Nullable return values
32+
Actor
33+
.get_parent nullable
34+
35+
// The original CType has been overridden by the annotations
36+
Actor
37+
.allocate.box ctype="const ClutterActorBox *"
38+
.get_stage ctype="ClutterActor *"
39+
Action.handle_event.event ctype="const ClutterEvent *"
40+
41+
// method/virtual-method/signal don't match
42+
Actor
43+
.event#method name="emit_event"
44+
.get_paint_volume#virtual_method name="get_paint_volume_vfunc"
45+
.get_paint_volume#virtual_method.volume out
46+
Text
47+
.activate#method name="try_activate"
48+
.insert_text#signal skip
49+
TextBuffer.get_text#virtual_method name="get_text_with_length"
50+
51+
// Default values
52+
Stage.read_pixels
53+
.width default=-1
54+
.height default=-1
55+
Stage.paint_to_buffer
56+
.data type="uint8[]"
57+
Text
58+
.position_to_coords.line_height default=null
59+
60+
// Skipped by g-i for unknown reasons
61+
LayoutManager
62+
.create_child_meta skip=false
63+
64+
// We can use static strings
65+
PaintNode
66+
.set_static_name skip=false
67+
68+
// Variadic arguments
69+
Backend
70+
.get_cogl_context skip=false
71+
Interval
72+
.new skip=false
73+
.get_interval skip=false
74+
.set_final skip=false
75+
.set_initial skip=false
76+
.set_interval skip=false
77+
LayoutManager
78+
.child_get skip=false
79+
.child_set skip=false
80+
81+
// Skipped upstream for unknown reasons
82+
Interval.register_progress_func skip=false
83+
84+
// struct/class confusion
85+
ActorBox
86+
.new skip
87+
.from_vertices skip
88+
Margin
89+
.new skip
90+
91+
// Upstream
92+
Event
93+
.get_position.position out
94+
95+
FrameListenerIface skip
96+
FrameClock.new skip
97+
98+
// Remove for clutter-2.0
99+
/////////////////////////
100+
101+
StageView.layout skip
102+
103+
Stage
104+
.paint_view.redraw_clip type="Cairo.Region"
105+
106+
// *Event should be compact classes derived from Clutter.Event
107+
Event.type skip=false
108+
AnyEvent struct=false base_type="Clutter.Event"
109+
ButtonEvent struct=false base_type="Clutter.Event"
110+
CrossingEvent struct=false base_type="Clutter.Event"
111+
DeviceEvent struct=false base_type="Clutter.Event"
112+
IMEvent struct=false base_type="Clutter.Event"
113+
KeyEvent struct=false base_type="Clutter.Event"
114+
MotionEvent struct=false base_type="Clutter.Event"
115+
PadButtonEvent struct=false base_type="Clutter.Event"
116+
PadRingEvent struct=false base_type="Clutter.Event"
117+
PadStripEvent struct=false base_type="Clutter.Event"
118+
ProximityEvent struct=false base_type="Clutter.Event"
119+
ScrollEvent struct=false base_type="Clutter.Event"
120+
TouchEvent struct=false base_type="Clutter.Event"
121+
TouchpadHoldEvent struct=false base_type="Clutter.Event"
122+
TouchpadPinchEvent struct=false base_type="Clutter.Event"
123+
TouchpadSwipeEvent struct=false base_type="Clutter.Event"
124+
125+
// Keysyms used to be CLUTTER_X instead of CLUTTER_KEY_X
126+
*#constant skip
127+
CURRENT_TIME skip=false
128+
PRIORITY_REDRAW skip=false
129+
130+
// Clutter devs don't like us creating nested namespaces
131+
value_* name="value_(.+)" parent="Clutter.Value"
132+
threads_* name="threads_(.+)" parent="Clutter.Threads"
133+
134+
// There is no way to know sealed classes before GLib 2.70
135+
ColorState sealed
136+
FrameClock sealed
137+
TextureContent sealed
138+
139+
TextureContent.new_from_texture symbol_type="constructor"
140+
141+
// Possibly keep
142+
KEY_* skip=false name="KEY_(.+)" type="uint" parent="Clutter.Key"
143+
BUTTON_* skip=false name="BUTTON_(.+)" type="uint32" parent="Clutter.Button"
144+
EVENT_STOP skip=false type="bool"
145+
EVENT_PROPAGATE skip=false type="bool"

vapi/Cogl-18-custom.vala

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
namespace Cogl {
2+
public struct Color {
3+
[CCode (cname="cogl_color_init_from_4f")]
4+
public Color.from_4f (float red, float green, float blue, float alpha);
5+
[CCode (cname="cogl_color_init_from_hsl")]
6+
public Color.from_hsl (float hue, float saturation, float luminance);
7+
[CCode (cname = "_vala_cogl_color_from_string")]
8+
public static Cogl.Color? from_string (string str) {
9+
Cogl.Color color = {};
10+
if (color.init_from_string (str))
11+
return color;
12+
13+
return null;
14+
}
15+
}
16+
[CCode (cheader_filename = "cogl/cogl.h", has_type_id = false)]
17+
public struct VertexP2 {
18+
public float x;
19+
public float y;
20+
}
21+
[CCode (cheader_filename = "cogl/cogl.h", has_type_id = false)]
22+
public struct VertexP2C4 {
23+
public float x;
24+
public float y;
25+
public uint8 r;
26+
public uint8 g;
27+
public uint8 b;
28+
public uint8 a;
29+
}
30+
[CCode (cheader_filename = "cogl/cogl.h", has_type_id = false)]
31+
public struct VertexP2T2 {
32+
public float x;
33+
public float y;
34+
public float s;
35+
public float t;
36+
}
37+
[CCode (cheader_filename = "cogl/cogl.h", has_type_id = false)]
38+
public struct VertexP2T2C4 {
39+
public float x;
40+
public float y;
41+
public float s;
42+
public float t;
43+
public uint8 r;
44+
public uint8 g;
45+
public uint8 b;
46+
public uint8 a;
47+
}
48+
[CCode (cheader_filename = "cogl/cogl.h", has_type_id = false)]
49+
public struct VertexP3 {
50+
public float x;
51+
public float y;
52+
public float z;
53+
}
54+
[CCode (cheader_filename = "cogl/cogl.h", has_type_id = false)]
55+
public struct VertexP3T2 {
56+
public float x;
57+
public float y;
58+
public float z;
59+
public float s;
60+
public float t;
61+
}
62+
[CCode (cheader_filename = "cogl/cogl.h", cprefix = "COGL_PIXEL_FORMAT_", type_id = "cogl_pixel_format_get_type ()")]
63+
public enum PixelFormat {
64+
CAIRO_ARGB32_COMPAT;
65+
}
66+
}

vapi/Cogl-18.metadata

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
* cheader_filename="cogl/cogl.h"
2+
3+
Color struct
4+
5+
Color.equal.v1 type="Cogl.Color"
6+
Color.equal.v2 type="Cogl.Color"
7+
Color.from_string name="init_from_string"
8+
9+
Bitmap.* skip=false
10+
Bitmap.new_for_data.data type="owned uint8[]"
11+
Bitmap.get_buffer type="unowned Cogl.Buffer?"
12+
13+
Primitive.new skip=false
14+
15+
Texture
16+
.get_data.data type="uint8[]"
17+
.set_data.data type="uint8[]"
18+
.set_region.data type="uint8[]"
19+
20+
Texture2D
21+
.new_from_data skip=false
22+
23+
Texture.error_quark parent="Cogl.TextureError" name="quark"
24+
25+
RendererError errordomain
26+
SystemError errordomain
27+
TextureError errordomain
28+
FramebufferError errordomain
29+
ScanoutError errordomain
30+
31+
Onscreen
32+
.add_frame_callback unowned
33+
34+
A_BIT parent="Cogl.Bits" name="A"
35+
BGR_BIT parent="Cogl.Bits" name="BGR"
36+
AFIRST_BIT parent="Cogl.Bits" name="AFIRST"
37+
PREMULT_BIT parent="Cogl.Bits" name="PREMULT"
38+
DEPTH_BIT parent="Cogl.Bits" name="DEPTH"
39+
STENCIL_BIT parent="Cogl.Bits" name="STENCIL"
40+
PIXEL_FORMAT_MAX_PLANES parent = "Cogl.PixelFormat" name="MAX_PLANES"

0 commit comments

Comments
 (0)