Skip to content

Commit 0baabae

Browse files
travreiryonakano
andauthored
Updated To Mutter47 (libmutter-15) (#593)
Co-authored-by: Andrei Esteves <[email protected]> Co-authored-by: Ryo Nakano <[email protected]>
1 parent 1b7fc0b commit 0baabae

22 files changed

+1220
-762
lines changed

.github/workflows/main.yml

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,26 @@ jobs:
3232
ninja -C build
3333
ninja -C build install
3434
35-
lint:
35+
fedora:
36+
runs-on: ubuntu-latest
37+
38+
container:
39+
image: fedora:latest
3640

41+
steps:
42+
- uses: actions/checkout@v4
43+
- name: Install Dependencies
44+
run: |
45+
dnf install -y gala-devel libgee-devel gobject-introspection-devel glib2-devel granite-devel gtk3-devel meson valac
46+
- name: Build
47+
env:
48+
DESTDIR: out
49+
run: |
50+
meson build -Dexample=true
51+
ninja -C build
52+
ninja -C build install
53+
54+
lint:
3755
runs-on: ubuntu-latest
3856

3957
container:

vapi/Clutter-15-custom.vala

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
namespace Clutter {
2+
public interface Container : GLib.Object {
3+
public void add (params Clutter.Actor[] actors);
4+
[CCode (cname = "clutter_container_class_find_child_property")]
5+
public class unowned GLib.ParamSpec find_child_property (string property_name);
6+
[CCode (cname = "clutter_container_class_list_child_properties")]
7+
public class unowned GLib.ParamSpec[] list_child_properties ();
8+
}
9+
10+
public struct Units {
11+
[CCode (cname = "clutter_units_from_cm")]
12+
public Units.from_cm (float cm);
13+
[CCode (cname = "clutter_units_from_em")]
14+
public Units.from_em (float em);
15+
[CCode (cname = "clutter_units_from_em_for_font")]
16+
public Units.from_em_for_font (string font_name, float em);
17+
[CCode (cname = "clutter_units_from_mm")]
18+
public Units.from_mm (float mm);
19+
[CCode (cname = "clutter_units_from_pixels")]
20+
public Units.from_pixels (int px);
21+
[CCode (cname = "clutter_units_from_pt")]
22+
public Units.from_pt (float pt);
23+
[CCode (cname = "clutter_units_from_string")]
24+
public Units.from_string (string str);
25+
}
26+
27+
[CCode (cheader_filename = "clutter/clutter.h", has_copy_function = false, has_destroy_function = false, has_type_id = false)]
28+
public struct Capture {
29+
}
30+
}

vapi/Clutter-15.metadata

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

vapi/Cogl-15-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-15.metadata

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
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+
Context.free_timestamp_query.query owned
10+
11+
Bitmap.* skip=false
12+
Bitmap.new_for_data.data type="owned uint8[]"
13+
Bitmap.get_buffer type="unowned Cogl.Buffer?"
14+
15+
Primitive.new skip=false
16+
17+
Texture
18+
.get_data.data type="uint8[]"
19+
.set_data.data type="uint8[]"
20+
.set_region.data type="uint8[]"
21+
22+
Texture2D
23+
.new_from_data skip=false
24+
25+
Texture.error_quark parent="Cogl.TextureError" name="quark"
26+
Scanout.error_quark parent="Cogl.ScanoutError" name="quark"
27+
28+
RendererError errordomain
29+
SystemError errordomain
30+
TextureError errordomain
31+
FramebufferError errordomain
32+
ScanoutError errordomain
33+
34+
blit_framebuffer parent="Cogl.Framebuffer" symbol_type="method" instance_idx=0 name="blit"
35+
meta_texture_foreach_in_region parent="Cogl.Texture" symbol_type="method" instance_idx=0 name="foreach_in_region"
36+
37+
Onscreen
38+
.add_frame_callback unowned
39+
40+
A_BIT parent="Cogl.Bits" name="A"
41+
BGR_BIT parent="Cogl.Bits" name="BGR"
42+
AFIRST_BIT parent="Cogl.Bits" name="AFIRST"
43+
PREMULT_BIT parent="Cogl.Bits" name="PREMULT"
44+
DEPTH_BIT parent="Cogl.Bits" name="DEPTH"
45+
STENCIL_BIT parent="Cogl.Bits" name="STENCIL"
46+
PIXEL_FORMAT_MAX_PLANES parent = "Cogl.PixelFormat" name="MAX_PLANES"

vapi/Mtk-15.metadata

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
Rectangle struct
2+
RECTANGLE_MAX_STACK_RECTS parent="Mtk.Rectangle" name="MAX_STACK_RECTS"
3+
REGION_BUILDER_MAX_LEVELS parent="Mtk.RegionBuilder" name="MAX_LEVELS"
4+
5+
MONITOR_ALL_TRANSFORMS parent="Mtk.MonitorTransform" name="ALL"
6+
MONITOR_N_TRANSFORMS skip

vapi/config.vapi

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,5 @@ namespace Config
2424
public const string PKGDATADIR;
2525
public const string VERSION;
2626
public const string PLUGINDIR;
27-
public const string SCHEMA;
2827
public const string RESOURCEPATH;
2928
}

vapi/libmutter-15.deps

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
libmutter-14.deps

vapi/libmutter-15.vapi

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
libmutter-14.vapi

0 commit comments

Comments
 (0)