diff --git a/vapi/Clutter-51.metadata b/vapi/Clutter-51.metadata new file mode 100644 index 00000000..2175e9d2 --- /dev/null +++ b/vapi/Clutter-51.metadata @@ -0,0 +1,150 @@ +// Non mini-object +ActorBox struct +Margin struct +PaintVolume struct +Perspective struct + +*.ref unowned +* cheader_filename="clutter/clutter.h" + +// Fix the few clutter-pango headers +Text cheader_filename="clutter/clutter-pango.h" +TextBuffer cheader_filename="clutter/clutter-pango.h" +TextNode cheader_filename="clutter/clutter-pango.h" +Actor + .get_pango_context cheader_filename="clutter/clutter-pango.h" + .create_pango_context cheader_filename="clutter/clutter-pango.h" + .create_pango_layout cheader_filename="clutter/clutter-pango.h" + + +Actor + .apply_transform.matrix ref + .get_abs_allocation_vertices.verts out=false +Event.type#method name="get_type" + +// ??? +Actor.has_pointer#method name="get_has_pointer" + +// Not all backing symbols are deprecated +Actor.pick deprecated=false + +// Nullable return values +Actor + .get_parent nullable + +// The original CType has been overridden by the annotations +Actor + .allocate.box ctype="const ClutterActorBox *" + .get_stage ctype="ClutterActor *" +Action.handle_event.event ctype="const ClutterEvent *" + +// method/virtual-method/signal don't match +Actor + .event#method name="emit_event" + .get_paint_volume#virtual_method name="get_paint_volume_vfunc" + .get_paint_volume#virtual_method.volume out +Text + .activate#method name="try_activate" + .insert_text#signal skip +TextBuffer.get_text#virtual_method name="get_text_with_length" + +// Default values +Stage.read_pixels + .width default=-1 + .height default=-1 +Stage.paint_to_buffer + .data type="uint8[]" +Text + .position_to_coords.line_height default=null + +// Skipped by g-i for unknown reasons +LayoutManager + .create_child_meta skip=false + +// It gets skiped for some reason +PaintContext + .get_stage_view skip=false + +// We can use static strings +PaintNode + .set_static_name skip=false + +// Variadic arguments +Backend + .get_cogl_context skip=false +Interval + .new skip=false + .get_interval skip=false + .set_final skip=false + .set_initial skip=false + .set_interval skip=false +LayoutManager + .child_get skip=false + .child_set skip=false + +// Skipped upstream for unknown reasons +Interval.register_progress_func skip=false + +// struct/class confusion +ActorBox + .new skip + .from_vertices skip +Margin + .new skip + +// Upstream +Event + .get_position.position out + +FrameListenerIface skip +FrameClock.new skip + +// Remove for clutter-2.0 +///////////////////////// + +StageView.layout skip + +Stage + .paint_view.redraw_clip type="Cairo.Region" + +// *Event should be compact classes derived from Clutter.Event +Event.type skip=false +AnyEvent struct=false base_type="Clutter.Event" +ButtonEvent struct=false base_type="Clutter.Event" +CrossingEvent struct=false base_type="Clutter.Event" +DeviceEvent struct=false base_type="Clutter.Event" +IMEvent struct=false base_type="Clutter.Event" +KeyEvent struct=false base_type="Clutter.Event" +MotionEvent struct=false base_type="Clutter.Event" +PadButtonEvent struct=false base_type="Clutter.Event" +PadDialEvent struct=false base_type="Clutter.Event" +PadRingEvent struct=false base_type="Clutter.Event" +PadStripEvent struct=false base_type="Clutter.Event" +ProximityEvent struct=false base_type="Clutter.Event" +ScrollEvent struct=false base_type="Clutter.Event" +TouchEvent struct=false base_type="Clutter.Event" +TouchpadHoldEvent struct=false base_type="Clutter.Event" +TouchpadPinchEvent struct=false base_type="Clutter.Event" +TouchpadSwipeEvent struct=false base_type="Clutter.Event" + +// Keysyms used to be CLUTTER_X instead of CLUTTER_KEY_X +*#constant skip +CURRENT_TIME skip=false +PRIORITY_REDRAW skip=false + +// Clutter devs don't like us creating nested namespaces +value_* name="value_(.+)" parent="Clutter.Value" +threads_* name="threads_(.+)" parent="Clutter.Threads" + +// There is no way to know sealed classes before GLib 2.70 +ColorState sealed +FrameClock sealed +TextureContent sealed + +TextureContent.new_from_texture symbol_type="constructor" + +// Possibly keep +KEY_* skip=false name="KEY_(.+)" type="uint" parent="Clutter.Key" +BUTTON_* skip=false name="BUTTON_(.+)" type="uint32" parent="Clutter.Button" +EVENT_STOP skip=false type="bool" +EVENT_PROPAGATE skip=false type="bool" diff --git a/vapi/Cogl-51-custom.vala b/vapi/Cogl-51-custom.vala new file mode 100644 index 00000000..4501ff7e --- /dev/null +++ b/vapi/Cogl-51-custom.vala @@ -0,0 +1,66 @@ +namespace Cogl { + public class Texture2D : Cogl.Texture { + } + public struct Color { + [CCode (cname="cogl_color_init_from_4f")] + public Color.from_4f (float red, float green, float blue, float alpha); + [CCode (cname="cogl_color_init_from_hsl")] + public Color.from_hsl (float hue, float saturation, float luminance); + [CCode (cname = "_vala_cogl_color_from_string")] + public static Cogl.Color? from_string (string str) { + Cogl.Color color = {}; + color.init_from_string (str); + return color; + } + } + [CCode (cheader_filename = "cogl/cogl.h", has_type_id = false)] + public struct VertexP2 { + public float x; + public float y; + } + [CCode (cheader_filename = "cogl/cogl.h", has_type_id = false)] + public struct VertexP2C4 { + public float x; + public float y; + public uint8 r; + public uint8 g; + public uint8 b; + public uint8 a; + } + [CCode (cheader_filename = "cogl/cogl.h", has_type_id = false)] + public struct VertexP2T2 { + public float x; + public float y; + public float s; + public float t; + } + [CCode (cheader_filename = "cogl/cogl.h", has_type_id = false)] + public struct VertexP2T2C4 { + public float x; + public float y; + public float s; + public float t; + public uint8 r; + public uint8 g; + public uint8 b; + public uint8 a; + } + [CCode (cheader_filename = "cogl/cogl.h", has_type_id = false)] + public struct VertexP3 { + public float x; + public float y; + public float z; + } + [CCode (cheader_filename = "cogl/cogl.h", has_type_id = false)] + public struct VertexP3T2 { + public float x; + public float y; + public float z; + public float s; + public float t; + } + [CCode (cheader_filename = "cogl/cogl.h", cprefix = "COGL_PIXEL_FORMAT_", type_id = "cogl_pixel_format_get_type ()")] + public enum PixelFormat { + CAIRO_ARGB32_COMPAT; + } +} diff --git a/vapi/Cogl-51.metadata b/vapi/Cogl-51.metadata new file mode 100644 index 00000000..6e88c8ce --- /dev/null +++ b/vapi/Cogl-51.metadata @@ -0,0 +1,41 @@ +* cheader_filename="cogl/cogl.h" + +Color struct + +Color.equal.v1 type="Cogl.Color" +Color.equal.v2 type="Cogl.Color" +Color.from_string name="init_from_string" + +Bitmap.* skip=false +Bitmap.new_for_data.data type="owned uint8[]" +Bitmap.get_buffer type="unowned Cogl.Buffer?" + +Primitive.new skip=false + +Texture + .get_data.data type="uint8[]" + .set_data.data type="uint8[]" + .set_region.data type="uint8[]" + +Texture.error_quark parent="Cogl.TextureError" name="quark" + +RendererError errordomain +SystemError errordomain +TextureError errordomain +FramebufferError errordomain +ScanoutError errordomain + +Onscreen + .add_frame_callback unowned + .swap_buffers_with_damage#virtual_method name="swap_buffers_with_damage_vfunc" + .swap_region#virtual_method name="swap_region_vfunc" + +FramebufferState skip + +A_BIT parent="Cogl.Bits" name="A" +BGR_BIT parent="Cogl.Bits" name="BGR" +AFIRST_BIT parent="Cogl.Bits" name="AFIRST" +PREMULT_BIT parent="Cogl.Bits" name="PREMULT" +DEPTH_BIT parent="Cogl.Bits" name="DEPTH" +STENCIL_BIT parent="Cogl.Bits" name="STENCIL" +PIXEL_FORMAT_MAX_PLANES parent = "Cogl.PixelFormat" name="MAX_PLANES" diff --git a/vapi/Meta-51.metadata b/vapi/Meta-51.metadata new file mode 100644 index 00000000..04355e74 --- /dev/null +++ b/vapi/Meta-51.metadata @@ -0,0 +1,176 @@ +* skip=false +*.* skip=false +* cheader_filename="meta/main.h" + +Backend cheader_filename="meta/meta-backend.h" +Backend.gpu_added skip +Background cheader_filename="meta/meta-background.h" +Background.set_file.file nullable +BackgroundContent.new symbol_type="constructor" +BackgroundActor cheader_filename="meta/meta-background-actor.h" +BackgroundContent cheader_filename="meta/meta-background-content.h" +BackgroundGroup cheader_filename="meta/meta-background-group.h" +BackgroundImage cheader_filename="meta/meta-background-image.h" +BackgroundImageCache cheader_filename="meta/meta-background-image.h" +Barrier cheader_filename="meta/barrier.h" +BarrierDirection cheader_filename="meta/barrier.h" +BarrierEvent cheader_filename="meta/barrier.h" +BarrierFlags cheader_filename="meta/barrier.h" +ButtonFunction cheader_filename="meta/common.h" +ButtonLayout cheader_filename="meta/common.h" +Compositor cheader_filename="meta/compositor.h" +CompEffect cheader_filename="meta/compositor.h" +CloseDialog cheader_filename="meta/meta-close-dialog.h" +CloseDialogResponse cheader_filename="meta/meta-close-dialog.h" +Context cheader_filename="meta/meta-context.h" +CursorTracker cheader_filename="meta/meta-cursor-tracker.h" +CursorTracker.get_pointer.mods out +DebugControl cheader_filename="meta/meta-debug-control.h" +DebugTopic cheader_filename="meta/util.h" +DebugPaintFlag cheader_filename="meta/util.h" +Direction cheader_filename="meta/common.h" +Display cheader_filename="meta/display.h" +Display.focus_window#signal name="do_focus_window" +DisplayCorner cheader_filename="meta/display.h" +DisplayDirection cheader_filename="meta/display.h" +Dnd cheader_filename="meta/meta-dnd.h" +EdgeType cheader_filename="meta/boxes.h" +Edge cheader_filename="meta/boxes.h" +FrameBorders cheader_filename="meta/common.h" +FrameType cheader_filename="meta/common.h" +GrabOp cheader_filename="meta/common.h" +Gravity cheader_filename="meta/common.h" +Group cheader_filename="meta/meta-x11-types.h" +IdleMonitor cheader_filename="meta/meta-idle-monitor.h" +IdleMonitorWatchFunc cheader_filename="meta/meta-idle-monitor.h" +InhibitShortcutsDialog cheader_filename="meta/meta-inhibit-shortcuts-dialog.h" +InhibitShortcutsDialogResponse cheader_filename="meta/meta-inhibit-shortcuts-dialog.h" +KeyboardA11yFlags cheader_filename="meta/meta-enums.h" +KeyBinding cheader_filename="meta/keybindings.h" +keybindings_set_custom_handler parent="Meta.KeyBinding" name="set_custom_handler" cheader_filename="meta/keybindings.h" +KeyBindingAction cheader_filename="meta/prefs.h" +KeyBindingFlags cheader_filename="meta/prefs.h" +KeyHandlerFunc cheader_filename="meta/prefs.h" +KeyHandlerFunc.event type="Clutter.KeyEvent?" +KeyHandlerFunc.window nullable +LaunchContext cheader_filename="meta/meta-launch-context.h" +Laters cheader_filename="meta/types.h" +LaterType cheader_filename="meta/util.h" +MaximizeFlags cheader_filename="meta/window.h" +MultiTexture cheader_filename="meta/meta-multi-texture.h" +MultiTextureFormat cheader_filename="meta/meta-multi-texture-format.h" +MonitorManager cheader_filename="meta/meta-monitor-manager.h" +MonitorSwitchConfigType cheader_filename="meta/meta-monitor-manager.h" +MotionDirection cheader_filename="meta/common.h" +Orientation cheader_filename="meta/meta-orientation-manager.h" +OrientationManager cheader_filename="meta/meta-orientation-manager.h" +PadDirection cheader_filename="meta/display.h" +PadFeatureType cheader_filename="meta/display.h" +Plugin cheader_filename="meta/meta-plugin.h" +PowerSaveChangeReason cheader_filename="meta/meta-monitor-manager.h" +Preference cheader_filename="meta/prefs.h" +PrefsChangedFunc cheader_filename="meta/prefs.h" +RemoteAccessController cheader_filename="meta/meta-remote-access-controller.h" +RemoteAccessHandle cheader_filename="meta/meta-remote-access-controller.h" +Selection cheader_filename="meta/meta-selection.h" +SelectionSource cheader_filename="meta/meta-selection-source.h" +SelectionSourceMemory cheader_filename="meta/meta-selection-source-memory.h" +SelectionType cheader_filename="meta/meta-selection-source.h" +Settings cheader_filename="meta/meta-settings.h" +ShapedTexture cheader_filename="meta/meta-shaped-texture.h" +Side cheader_filename="meta/common.h" +SizeChange cheader_filename="meta/compositor.h" +SoundPlayer cheader_filename="meta/meta-sound-player.h" +StartupNotification cheader_filename="meta/meta-startup-notification.h" +StartupNotification.changed.object type="Meta.StartupSequence" +StartupNotification.get_sequences type_arguments="Meta.StartupSequence" +StartupSequence cheader_filename="meta/meta-startup-notification.h" +StackLayer cheader_filename="meta/common.h" +Stage cheader_filename="meta/meta-stage.h" +Strut cheader_filename="meta/boxes.h" +TabList cheader_filename="meta/display.h" +TabShowType cheader_filename="meta/display.h" +WaylandClient cheader_filename="meta/meta-wayland-client.h" +WaylandCompositor cheader_filename="meta/meta-wayland-compositor.h" +Workspace cheader_filename="meta/workspace.h" +WorkspaceManager cheader_filename="meta/meta-workspace-manager.h" +Window cheader_filename="meta/window.h" +Window.focus#signal name="focused" +Window.suspend_state skip +Window.main_monitor skip +WindowActor cheader_filename="meta/meta-window-actor.h" +WindowClientType cheader_filename="meta/window.h" +WindowForeachFunc cheader_filename="meta/window.h" +WindowGroup cheader_filename="meta/meta-window-group.h" +WindowMenuType cheader_filename="meta/compositor.h" +WindowType cheader_filename="meta/window.h" +X11Display cheader_filename="meta/meta-x11-display.h" +X11Display.add_event_func skip +X11DisplayEventFunc skip + +WaylandSurface.scanout_candidate skip +WaylandSurface.main_monitor skip + +// As per https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2287 +MonitorManager.monitor_privacy_screen_changed skip + +prefs_* parent="Meta.Prefs" name="prefs_(.+)" cheader_filename="meta/prefs.h" + +g_utf8_strndup skip + +preference_to_string cheader_filename="meta/prefs.h" +frame_type_to_string cheader_filename="meta/util.h" +topic_to_string parent="Meta.DebugTopic" name="to_string" cheader_filename="meta/util.h" + +CURRENT_TIME cheader_filename="meta/common.h" +PRIORITY_RESIZE cheader_filename="meta/common.h" +PRIORITY_BEFORE_REDRAW cheader_filename="meta/common.h" +PRIORITY_REDRAW cheader_filename="meta/common.h" +PRIORITY_PREFS_NOTIFY cheader_filename="meta/common.h" +VIRTUAL_CORE_POINTER_ID cheader_filename="meta/common.h" +VIRTUAL_CORE_KEYBOARD_ID cheader_filename="meta/common.h" + +Display.window_visibility_updated + .object name="unplaced" type="GLib.List" + .p0 name="should_show" type="GLib.List" + .p1 name="should_hide" type="GLib.List" + +Compositor.get_window_actors type_arguments="Meta.WindowActor" + +add_verbose_topic parent="Meta.Util" cheader_filename="meta/util.h" +bug parent="Meta.Util" cheader_filename="meta/util.h" +external_binding_name_for_action parent="Meta.Util" cheader_filename="meta/util.h" +fatal parent="Meta.Util" cheader_filename="meta/util.h" +is_verbose parent="Meta.Util" cheader_filename="meta/util.h" +pop_no_msg_prefix parent="Meta.Util" cheader_filename="meta/util.h" +push_no_msg_prefix parent="Meta.Util" cheader_filename="meta/util.h" +remove_verbose_topic parent="Meta.Util" cheader_filename="meta/util.h" +unsigned_long_equal parent="Meta.Util" name="ulong_equal" cheader_filename="meta/util.h" +unsigned_long_equal.v1 type="ulong?" +unsigned_long_equal.v2 type="ulong?" +unsigned_long_hash parent="Meta.Util" name="ulong_hash" cheader_filename="meta/util.h" +unsigned_long_hash.v type="ulong?" +create_context parent="Meta.Context" name="new" symbol_type="constructor" cheader_filename="meta/meta-context.h" + +Plugin.create_close_dialog unowned=false nullable +Plugin.create_inhibit_shortcuts_dialog unowned=false + +BackgroundActor sealed +BackgroundContent sealed +BackgroundImage sealed +BackgroundImageCache sealed +Background sealed +Dnd sealed +IdleMonitor sealed +LaunchContext sealed +RemoteAccessController sealed +SelectionSourceMemory sealed +Selection sealed +ShapedTexture sealed +SoundPlayer sealed +Stage sealed +StartupNotification sealed +WaylandClient sealed +WindowGroup sealed +WorkspaceManager sealed +X11Display sealed diff --git a/vapi/Mtk-51.metadata b/vapi/Mtk-51.metadata new file mode 100644 index 00000000..f804d1bc --- /dev/null +++ b/vapi/Mtk-51.metadata @@ -0,0 +1,6 @@ +Rectangle struct +RECTANGLE_MAX_STACK_RECTS parent="Mtk.Rectangle" name="MAX_STACK_RECTS" +REGION_BUILDER_MAX_LEVELS parent="Mtk.RegionBuilder" name="MAX_LEVELS" + +MONITOR_ALL_TRANSFORMS parent="Mtk.MonitorTransform" name="ALL" +MONITOR_N_TRANSFORMS skip diff --git a/vapi/libmutter-51.deps b/vapi/libmutter-51.deps new file mode 120000 index 00000000..18c721de --- /dev/null +++ b/vapi/libmutter-51.deps @@ -0,0 +1 @@ +libmutter-17.deps \ No newline at end of file diff --git a/vapi/libmutter-51.vapi b/vapi/libmutter-51.vapi new file mode 120000 index 00000000..ff0e578a --- /dev/null +++ b/vapi/libmutter-51.vapi @@ -0,0 +1 @@ +libmutter-17.vapi \ No newline at end of file diff --git a/vapi/libmutter.vapi b/vapi/libmutter.vapi index 056f994c..b36a252b 100644 --- a/vapi/libmutter.vapi +++ b/vapi/libmutter.vapi @@ -29,8 +29,10 @@ namespace Meta { public static bool get_center_new_windows (); [CCode (cheader_filename = "meta/prefs.h")] public static uint get_check_alive_timeout (); +#if !HAS_MUTTER51 [CCode (cheader_filename = "meta/prefs.h")] public static bool get_compositing_manager (); +#endif [CCode (cheader_filename = "meta/prefs.h")] public static int get_cursor_size (); [CCode (cheader_filename = "meta/prefs.h")] @@ -109,10 +111,12 @@ namespace Meta { [CCode (cheader_filename = "meta/util.h", cname = "meta_is_wayland_compositor")] public static bool is_wayland_compositor (); #endif +#if !HAS_MUTTER51 [CCode (cheader_filename = "meta/util.h", cname = "meta_pop_no_msg_prefix")] public static void pop_no_msg_prefix (); [CCode (cheader_filename = "meta/util.h", cname = "meta_push_no_msg_prefix")] public static void push_no_msg_prefix (); +#endif [CCode (cheader_filename = "meta/util.h", cname = "meta_remove_verbose_topic")] public static void remove_verbose_topic (Meta.DebugTopic topic); [CCode (cheader_filename = "meta/util.h", cname = "meta_unsigned_long_equal")] @@ -124,7 +128,9 @@ namespace Meta { public abstract class Backend : GLib.Object, GLib.Initable { [CCode (has_construct_function = false)] protected Backend (); +#if !HAS_MUTTER51 public void freeze_keyboard (uint32 timestamp); +#endif public Meta.BackendCapabilities get_capabilities (); public unowned Meta.Context get_context (); public unowned Meta.IdleMonitor get_core_idle_monitor (); @@ -137,6 +143,9 @@ namespace Meta { public unowned Meta.Dnd get_dnd (); #if HAS_MUTTER50 public unowned Meta.KeymapDescription get_keymap_description (); +#endif +#if HAS_MUTTER51 + public unowned Clutter.InputDevice? get_last_input_device (); #endif public unowned Meta.MonitorManager get_monitor_manager (); #if HAS_MUTTER47 @@ -171,6 +180,9 @@ namespace Meta { #endif public Meta.BackendCapabilities capabilities { get; } public Meta.Context context { get; construct; } +#if HAS_MUTTER51 + public Clutter.InputDevice last_input_device { get; } +#endif public signal void keymap_changed (); public signal void keymap_layout_group_changed (uint object); public signal void last_device_changed (Clutter.InputDevice object); @@ -192,18 +204,27 @@ namespace Meta { public sealed class Background : GLib.Object { [CCode (has_construct_function = false)] public Background (Meta.Display display); +#if HAS_MUTTER51 + public void set_blend_textures (Cogl.Texture? texture1, Cogl.Texture? texture2, double blend_factor, GDesktop.BackgroundStyle style, Clutter.ColorState? color_state); +#else public static void refresh_all (); public void set_blend (GLib.File file1, GLib.File file2, double blend_factor, GDesktop.BackgroundStyle style); +#endif #if HAS_MUTTER47 public void set_color (Cogl.Color color); #else public void set_color (Clutter.Color color); #endif +#if !HAS_MUTTER51 public void set_file (GLib.File? file, GDesktop.BackgroundStyle style); +#endif #if HAS_MUTTER47 public void set_gradient (GDesktop.BackgroundShading shading_direction, Cogl.Color color, Cogl.Color second_color); #else public void set_gradient (GDesktop.BackgroundShading shading_direction, Clutter.Color color, Clutter.Color second_color); +#endif +#if HAS_MUTTER51 + public void set_texture (Cogl.Texture? texture, GDesktop.BackgroundStyle style, Clutter.ColorState? color_state); #endif [NoAccessorMethod] public Meta.Display meta_display { owned get; construct; } @@ -253,6 +274,7 @@ namespace Meta { [CCode (has_construct_function = false, type = "ClutterActor*")] public BackgroundGroup (); } +#if !HAS_MUTTER51 [CCode (cheader_filename = "meta/meta-background-image.h", type_id = "meta_background_image_get_type ()")] public sealed class BackgroundImage : GLib.Object { [CCode (has_construct_function = false)] @@ -270,6 +292,7 @@ namespace Meta { public Meta.BackgroundImage load (GLib.File file); public void purge (GLib.File file); } +#endif #if HAS_MUTTER49 [CCode (cheader_filename = "meta/main.h", type_id = "meta_backlight_get_type ()")] public abstract class Backlight : GLib.Object { @@ -335,14 +358,23 @@ namespace Meta { public void disable_unredirect (); public void enable_unredirect (); public unowned Meta.Backend get_backend (); +#endif +#if HAS_MUTTER51 + public void get_background_blur_params (out float blur_radius, out float saturation, out float noise); #endif public unowned Clutter.Actor get_feedback_group (); +#if HAS_MUTTER51 + public unowned Clutter.Actor get_input_panel_group (); +#endif public unowned Meta.Laters get_laters (); #if HAS_MUTTER48 public unowned Clutter.Stage get_stage (); public unowned Clutter.Actor get_top_window_group (); public unowned GLib.List get_window_actors (); public unowned Clutter.Actor get_window_group (); +#if HAS_MUTTER51 + public void set_background_blur_params (float blur_radius, float saturation, float noise); +#endif public Meta.Backend backend { get; construct; } #else [NoAccessorMethod] @@ -393,6 +425,22 @@ namespace Meta { public signal void prepare_shutdown (); public signal void started (); } +#if HAS_MUTTER51 + [CCode (cheader_filename = "meta/meta-cursor.h", type_id = "meta_cursor_get_type ()")] + public abstract class Cursor : Clutter.Cursor { + [CCode (has_construct_function = false)] + protected Cursor (); + public unowned Meta.Backend get_backend (); + public uint get_size (); + public unowned string get_theme_name (); + [NoAccessorMethod] + public Meta.Backend backend { construct; } + [NoAccessorMethod] + public uint size { construct; } + [NoAccessorMethod] + public string theme_name { construct; } + } +#endif [CCode (cheader_filename = "meta/meta-cursor-tracker.h", type_id = "meta_cursor_tracker_get_type ()")] public class CursorTracker : GLib.Object { [CCode (has_construct_function = false)] @@ -514,8 +562,14 @@ namespace Meta { #endif [CCode (cname = "focus-window")] public signal void do_focus_window (Meta.Window object, int64 p0); +#if !HAS_MUTTER51 public signal void gl_video_memory_purged (); +#endif +#if HAS_MUTTER51 + public signal void grab_op_begin (Meta.Window object, Meta.GrabOp p0, Clutter.Sprite p1); +#else public signal void grab_op_begin (Meta.Window object, Meta.GrabOp p0); +#endif public signal void grab_op_end (Meta.Window object, Meta.GrabOp p0); public signal void in_fullscreen_changed (); public signal bool init_xserver (GLib.Task object); @@ -654,12 +708,18 @@ namespace Meta { [CCode (has_construct_function = false)] protected Monitor (); public unowned Meta.Backlight? get_backlight (); +#if HAS_MUTTER51 + public unowned string get_color_mode_string (); +#endif public unowned string get_connector (); public unowned string get_display_name (); public unowned string get_product (); public unowned string get_serial (); public unowned string get_vendor (); public bool is_active (); +#if HAS_MUTTER51 + public bool is_available (); +#endif public bool is_builtin (); public bool is_primary (); public bool is_virtual (); @@ -884,8 +944,13 @@ namespace Meta { public sealed class ShapedTexture : GLib.Object, Clutter.Content { [CCode (has_construct_function = false)] protected ShapedTexture (); +#if !HAS_MUTTER51 public Cairo.Surface? get_image (Mtk.Rectangle? clip); +#endif public unowned Meta.MultiTexture get_texture (); +#if HAS_MUTTER51 + public Cogl.Bitmap? paint_to_bitmap (Mtk.Rectangle? clip, Cogl.PixelFormat format); +#endif public void set_create_mipmaps (bool create_mipmaps); public void set_mask_texture (Cogl.Texture mask_texture); #if HAS_MUTTER47 @@ -1039,16 +1104,24 @@ namespace Meta { public unowned string? get_gtk_application_id (); public unowned string? get_gtk_application_object_path (); public unowned string? get_gtk_menubar_object_path (); +#if !HAS_MUTTER51 public unowned string? get_gtk_theme_variant (); +#endif public unowned string? get_gtk_unique_bus_name (); public unowned string? get_gtk_window_object_path (); public bool get_icon_geometry (out Mtk.Rectangle rect); public uint64 get_id (); public Meta.StackLayer get_layer (); +#if HAS_MUTTER51 + public bool get_max_size (out int width, out int height); +#endif #if HAS_MUTTER49 public Meta.MaximizeFlags get_maximize_flags (); #else public Meta.MaximizeFlags get_maximized (); +#endif +#if HAS_MUTTER51 + public bool get_min_size (out int width, out int height); #endif public int get_monitor (); public unowned string? get_mutter_hints (); @@ -1241,11 +1314,19 @@ namespace Meta { [CCode (has_construct_function = false)] protected WindowActor (); public void freeze (); +#if !HAS_MUTTER51 public Cairo.Surface? get_image (Mtk.Rectangle? clip); +#endif public unowned Meta.Window? get_meta_window (); public unowned Meta.ShapedTexture? get_texture (); public bool is_destroyed (); +#if HAS_MUTTER51 + public Cogl.Bitmap? paint_to_bitmap (Mtk.Rectangle? clip, Cogl.PixelFormat format); +#endif public Clutter.Content? paint_to_content (Mtk.Rectangle? clip) throws GLib.Error; +#if HAS_MUTTER51 + public Clutter.Content? paint_to_content_full (Mtk.Rectangle? clip, Cogl.PixelFormat format, Clutter.ColorState? color_state) throws GLib.Error; +#endif public void sync_visibility (); public void thaw (); public Meta.Window meta_window { get; construct; } @@ -1261,13 +1342,22 @@ namespace Meta { public WindowConfig (); public bool get_is_fullscreen (); public bool get_is_initial (); +#if HAS_MUTTER51 + public Meta.MaximizeFlags get_maximize_flags (); +#endif public void get_position (int x, int y); public Mtk.Rectangle? get_rect (); public void get_size (int width, int height); public void set_is_fullscreen (bool is_fullscreen); +#if HAS_MUTTER51 + public void set_maximize_flags (Meta.MaximizeFlags flags); +#endif public void set_position (int x, int y); public void set_rect (Mtk.Rectangle rect); public void set_size (int width, int height); +#if HAS_MUTTER51 + public void unset_maximize_flags (Meta.MaximizeFlags flags); +#endif public bool is_fullscreen { get; set; } public Mtk.Rectangle rect { owned get; set; } } @@ -1911,6 +2001,9 @@ namespace Meta { [CCode (cheader_filename = "meta/window.h", cprefix = "META_MAXIMIZE_", type_id = "meta_maximize_flags_get_type ()")] [Flags] public enum MaximizeFlags { +#if HAS_MUTTER51 + NONE, +#endif HORIZONTAL, VERTICAL, BOTH @@ -2172,6 +2265,10 @@ namespace Meta { public delegate bool WindowForeachFunc (Meta.Window window); [CCode (cheader_filename = "meta/common.h", cname = "META_CURRENT_TIME")] public const int CURRENT_TIME; +#if HAS_MUTTER51 + [CCode (cheader_filename = "meta/main.h", cname = "META_CURSOR_EXTENSION_POINT_NAME")] + public const string CURSOR_EXTENSION_POINT_NAME; +#endif #if HAS_MUTTER48 [CCode (cheader_filename = "meta/main.h", cname = "META_N_ORIENTATIONS")] public const int N_ORIENTATIONS; diff --git a/vapi/meson.build b/vapi/meson.build index cce93c6c..35443ee5 100644 --- a/vapi/meson.build +++ b/vapi/meson.build @@ -398,3 +398,74 @@ if mutter50_dep.found() output: 'libmutter-18.vapi' ) endif +if mutter51_dep.found() + mtk_target = custom_target('mutter-mtk-51', + command: [ + vapigen, + mutter_typelib_dir / 'Mtk-51.gir', + '--library=mutter-mtk-51', + '--pkg=gobject-2.0', + '--pkg=gio-2.0', + '--pkg=cairo', + '--pkg=graphene-gobject-1.0', + vapigen_args + ], + output: 'mutter-mtk-51.vapi' + ) + cogl_target = custom_target('mutter-cogl-51', + command: [ + vapigen, + mutter_typelib_dir / 'Cogl-51.gir', + '--library=mutter-cogl-51', + '--pkg=mutter-mtk-51', + '--pkg=gobject-2.0', + '--pkg=gio-2.0', + '--pkg=cairo', + '--pkg=graphene-gobject-1.0', + '--pkg=x11', + vapigen_args, + files('Cogl-51-custom.vala') + ], + depends: mtk_target, + output: 'mutter-cogl-51.vapi' + ) + + clutter_target = custom_target('mutter-clutter-51', + command: [ + vapigen, + mutter_typelib_dir / 'Clutter-51.gir', + '--library=mutter-clutter-51', + '--pkg=graphene-gobject-1.0', + '--pkg=mutter-mtk-51', + '--pkg=mutter-cogl-51', + '--pkg=atk', + '--pkg=gio-2.0', + '--pkg=json-glib-1.0', + '--pkg=pango', + '--pkg=x11', + vapigen_args, + ], + depends: [ cogl_target, mtk_target ], + output: 'mutter-clutter-51.vapi' + ) + + libmutter_target = custom_target('libmutter-51', + command: [ + vapigen, + mutter_typelib_dir / 'Meta-51.gir', + '--library=libmutter-51', + '--pkg=graphene-gobject-1.0', + '--pkg=mutter-cogl-51', + '--pkg=mutter-clutter-51', + '--pkg=atk', + '--pkg=gio-2.0', + '--pkg=json-glib-1.0', + '--pkg=pango', + '--pkg=x11', + '--pkg=xfixes-4.0', + vapigen_args + ], + depends: [ cogl_target, clutter_target ], + output: 'libmutter-51.vapi' + ) +endif diff --git a/vapi/mutter-clutter-51.deps b/vapi/mutter-clutter-51.deps new file mode 100644 index 00000000..9549905d --- /dev/null +++ b/vapi/mutter-clutter-51.deps @@ -0,0 +1,6 @@ +atk +cairo +pango +json-glib-1.0 +mutter-cogl-51 +graphene-gobject-1.0 diff --git a/vapi/mutter-clutter-51.vapi b/vapi/mutter-clutter-51.vapi new file mode 120000 index 00000000..ee388ea5 --- /dev/null +++ b/vapi/mutter-clutter-51.vapi @@ -0,0 +1 @@ +mutter-clutter-17.vapi \ No newline at end of file diff --git a/vapi/mutter-clutter.vapi b/vapi/mutter-clutter.vapi index 9d9e7cfe..5257f7f3 100644 --- a/vapi/mutter-clutter.vapi +++ b/vapi/mutter-clutter.vapi @@ -5157,7 +5157,9 @@ namespace Clutter { public uint32 flags; [CCode (has_construct_function = false)] public Actor (); +#if HAS_MUTTER50 public void add_accessible_state (Atk.StateType state); +#endif public void add_action (Clutter.Action action); public void add_action_full (string name, Clutter.EventPhase phase, Clutter.Action action); public void add_action_with_name (string name, Clutter.Action action); @@ -5209,6 +5211,10 @@ namespace Clutter { public Cogl.Color get_background_color (); #else public Clutter.Color get_background_color (); +#endif +#if HAS_MUTTER51 + [CCode (cname = "clutter_actor_class_get_binding_pool")] + public class unowned Clutter.BindingPool get_binding_pool (); #endif public unowned Clutter.Actor? get_child_at_index (int index_); public Graphene.Matrix get_child_transform (); @@ -5594,6 +5600,9 @@ namespace Clutter { public virtual signal void pick (Clutter.PickContext pick_context); [HasEmitter] public virtual signal void queue_relayout (); +#if HAS_MUTTER51 + public signal void real_resource_scale_changed (); +#endif [HasEmitter] [Version (deprecated = true, deprecated_since = "1.16")] public virtual signal void realize (); @@ -5603,6 +5612,9 @@ namespace Clutter { public virtual signal void show (); public signal void stage_views_changed (); public virtual signal bool touch_event (Clutter.Event event); +#if HAS_MUTTER51 + public signal void transition_removed (Clutter.Transition transition, bool is_finished); +#endif public signal void transition_stopped (string name, bool is_finished); public signal void transitions_completed (); [HasEmitter] @@ -5662,6 +5674,9 @@ namespace Clutter { [CCode (has_construct_function = false)] protected Backend (); public unowned Cogl.Context get_cogl_context (); +#if HAS_MUTTER51 + public Clutter.Cursor get_cursor (Clutter.CursorType cursor_type); +#endif public unowned Clutter.Seat get_default_seat (); #if !HAS_MUTTER48 public unowned Cairo.FontOptions get_font_options (); @@ -5845,6 +5860,119 @@ namespace Clutter { public ColorNode (Clutter.Color? color); #endif } +#if HAS_MUTTER51 + [CCode (cheader_filename = "clutter/clutter.h", type_id = "clutter_color_op_get_type ()")] + public abstract class ColorOp : GLib.Object { + [CCode (has_construct_function = false)] + protected ColorOp (); + public void @3d_lut_get_data (uint32 out_size, float out_data); + public bool can_lower_to_3d_lut (); + public bool can_lower_to_curve_1d (size_t n_samples); + public bool can_lower_to_matrix_4x4 (); + public void curve_1d_get_data (size_t out_size, float out_r, float out_g, float out_b, float out_a); + public virtual void do_transform (float data, size_t n_samples); + public virtual float do_transform_one (float input); + public float gamma_power_get_power (); + public virtual bool get_clamps_input (); + public virtual bool get_clamps_output (); + public virtual bool get_transforms_alpha (); + public Clutter.ColorOp? lower_to_3d_lut (uint32 size); + public Clutter.ColorOp? lower_to_curve_1d (size_t n_samples); + public Clutter.ColorOp? lower_to_matrix_4x4 (); + public unowned Graphene.Matrix? matrix_4x4_get_matrix (); + public float multiply_get_value (); + public bool srgb_piecewise_eotf_get_unit_range_only (); + public bool srgb_piecewise_inv_eotf_get_unit_range_only (); + public virtual string to_string (); + public Clutter.ColorOp? try_combine (Clutter.ColorOp b); + public Clutter.YcbcrCoefficients ycbcr_matrix_get_coeffs (); + public unowned Graphene.Matrix? ycbcr_matrix_get_matrix (); + } + [CCode (cheader_filename = "clutter/clutter.h", lower_case_csuffix = "color_op_3d_lut", type_id = "clutter_color_op_3d_lut_get_type ()")] + public class ColorOp3DLut : Clutter.ColorOp { + [CCode (has_construct_function = false, type = "ClutterColorOp*")] + public ColorOp3DLut (uint32 size, float data); + } + [CCode (cheader_filename = "clutter/clutter.h", type_id = "clutter_color_op_clamp_unit_get_type ()")] + public class ColorOpClampUnit : Clutter.ColorOp { + [CCode (has_construct_function = false, type = "ClutterColorOp*")] + public ColorOpClampUnit (); + } + [CCode (cheader_filename = "clutter/clutter.h", lower_case_csuffix = "color_op_curve_1d", type_id = "clutter_color_op_curve_1d_get_type ()")] + public class ColorOpCurve1D : Clutter.ColorOp { + [CCode (has_construct_function = false, type = "ClutterColorOp*")] + public ColorOpCurve1D (size_t size, float r, float g, float b, float a); + [CCode (has_construct_function = false, type = "ClutterColorOp*")] + public ColorOpCurve1D.rgb (size_t size, float v); + } + [CCode (cheader_filename = "clutter/clutter.h", type_id = "clutter_color_op_gamma_power_get_type ()")] + public class ColorOpGammaPower : Clutter.ColorOp { + [CCode (has_construct_function = false, type = "ClutterColorOp*")] + public ColorOpGammaPower (float power); + } + [CCode (cheader_filename = "clutter/clutter.h", lower_case_csuffix = "color_op_matrix_4x4", type_id = "clutter_color_op_matrix_4x4_get_type ()")] + public class ColorOpMatrix4x4 : Clutter.ColorOp { + [CCode (has_construct_function = false, type = "ClutterColorOp*")] + public ColorOpMatrix4x4 (Graphene.Matrix matrix); + } + [CCode (cheader_filename = "clutter/clutter.h", type_id = "clutter_color_op_multiply_get_type ()")] + public class ColorOpMultiply : Clutter.ColorOp { + [CCode (has_construct_function = false, type = "ClutterColorOp*")] + public ColorOpMultiply (float value); + } + [CCode (cheader_filename = "clutter/clutter.h", type_id = "clutter_color_op_pq_eotf_get_type ()")] + public class ColorOpPqEotf : Clutter.ColorOp { + [CCode (has_construct_function = false, type = "ClutterColorOp*")] + public ColorOpPqEotf (); + } + [CCode (cheader_filename = "clutter/clutter.h", type_id = "clutter_color_op_pq_inv_eotf_get_type ()")] + public class ColorOpPqInvEotf : Clutter.ColorOp { + [CCode (has_construct_function = false, type = "ClutterColorOp*")] + public ColorOpPqInvEotf (); + } + [CCode (cheader_filename = "clutter/clutter.h", type_id = "clutter_color_op_premultiply_get_type ()")] + public class ColorOpPremultiply : Clutter.ColorOp { + [CCode (has_construct_function = false, type = "ClutterColorOp*")] + public ColorOpPremultiply (); + } + [CCode (cheader_filename = "clutter/clutter.h", type_id = "clutter_color_op_srgb_piecewise_eotf_get_type ()")] + public class ColorOpSrgbPiecewiseEotf : Clutter.ColorOp { + [CCode (has_construct_function = false, type = "ClutterColorOp*")] + public ColorOpSrgbPiecewiseEotf (bool unit_range_only); + } + [CCode (cheader_filename = "clutter/clutter.h", type_id = "clutter_color_op_srgb_piecewise_inv_eotf_get_type ()")] + public class ColorOpSrgbPiecewiseInvEotf : Clutter.ColorOp { + [CCode (has_construct_function = false, type = "ClutterColorOp*")] + public ColorOpSrgbPiecewiseInvEotf (bool unit_range_only); + } + [CCode (cheader_filename = "clutter/clutter.h", type_id = "clutter_color_op_unpremultiply_get_type ()")] + public class ColorOpUnpremultiply : Clutter.ColorOp { + [CCode (has_construct_function = false, type = "ClutterColorOp*")] + public ColorOpUnpremultiply (); + } + [CCode (cheader_filename = "clutter/clutter.h", type_id = "clutter_color_op_ycbcr_matrix_get_type ()")] + public class ColorOpYcbcrMatrix : Clutter.ColorOp { + [CCode (has_construct_function = false, type = "ClutterColorOp*")] + public ColorOpYcbcrMatrix (Clutter.YcbcrCoefficients coeffs, Graphene.Matrix matrix); + } + [CCode (cheader_filename = "clutter/clutter.h", type_id = "clutter_color_pipeline_get_type ()")] + public class ColorPipeline : GLib.Object { + [CCode (has_construct_function = false)] + protected ColorPipeline (); + public void add_op (Clutter.ColorOp op); + public void append (Clutter.ColorPipeline other); + public void combine (); + public void do_transform (float data, size_t n_samples); + public unowned GLib.List get_ops (); + public bool is_empty (); + public void shader_add_transform (Cogl.Pipeline cogl_pipeline); + public static bool shader_needs_color_state (Clutter.ColorState source_color_state, Clutter.ColorState target_color_state, Clutter.ColorStateTransformFlags flags); + public static void shader_set_color_state (Cogl.Pipeline cogl_pipeline, Clutter.ColorState source_color_state, Clutter.ColorState target_color_state, Clutter.ColorStateTransformFlags flags); + public void simplify (); + public void take_op (Clutter.ColorOp op); + public string to_string (); + } +#endif [CCode (cheader_filename = "clutter/clutter.h", type_id = "clutter_color_state_get_type ()")] public sealed class ColorState : GLib.Object { [CCode (has_construct_function = false)] @@ -5854,6 +5982,7 @@ namespace Clutter { #else public ColorState (Clutter.Context context, Clutter.Colorspace colorspace, Clutter.TransferFunction transfer_function); #endif +#if !HAS_MUTTER51 #if HAS_MUTTER49 public void add_pipeline_transform (Clutter.ColorState target_color_state, Cogl.Pipeline pipeline, Clutter.ColorStateTransformFlags flags); [NoWrapper] @@ -5861,7 +5990,9 @@ namespace Clutter { #else public void add_pipeline_transform (Clutter.ColorState target_color_state, Cogl.Pipeline pipeline); #endif +#endif #if HAS_MUTTER48 +#if !HAS_MUTTER51 #if HAS_MUTTER49 public void do_transform (Clutter.ColorState target_color_state, [CCode (array_length = false)] float[] data, int n_samples); [NoWrapper] @@ -5870,9 +6001,13 @@ namespace Clutter { public virtual void do_transform_to_XYZ ([CCode (array_length = false)] float[] data, int n_samples); #else public virtual void do_transform (Clutter.ColorState target_color_state, float input, float output, int n_samples); +#endif #endif public virtual bool equals (Clutter.ColorState other_color_state); public virtual Clutter.ColorState get_blending (bool force); +#if HAS_MUTTER51 + public unowned Clutter.Context get_context (); +#endif #else public bool equals (Clutter.ColorState other_color_state); [CCode (has_construct_function = false)] @@ -5887,7 +6022,12 @@ namespace Clutter { #endif #if HAS_MUTTER47 public uint get_id (); -#if HAS_MUTTER48 +#if HAS_MUTTER51 + public virtual unowned Clutter.Luminance? get_luminance (); + public virtual uint hash (); + public virtual Clutter.EncodingRequiredFormat required_format (); + public virtual string to_string (); +#elif HAS_MUTTER48 [NoWrapper] #if HAS_MUTTER50 public virtual void init_color_transform_key (Clutter.ColorState target_color_state, Clutter.ColorStateTransformFlags flags, Clutter.ColorTransformKey key); @@ -5924,6 +6064,9 @@ namespace Clutter { public float ref_luminance { get; construct; } public Clutter.TransferFunction transfer_function { get; construct; } #endif +#endif +#if HAS_MUTTER50 + public signal void destroyed (); #endif } #if HAS_MUTTER49 @@ -5932,6 +6075,10 @@ namespace Clutter { [CCode (has_construct_function = false, type = "ClutterColorState*")] public ColorStateIcc (Clutter.Context context, uint8 icc_bytes, uint32 icc_length) throws GLib.Error; public unowned Mtk.AnonymousFile get_file (); +#if HAS_MUTTER51 + public void* get_profile (); + public bool is_linearized (); +#endif } #endif #if HAS_MUTTER48 @@ -5955,10 +6102,18 @@ namespace Clutter { public unowned Clutter.EOTF? get_eotf (); public unowned Clutter.Luminance? get_luminance (); } +#if HAS_MUTTER51 + [CCode (cheader_filename = "clutter/clutter.h", type_id = "clutter_color_transform_get_type ()")] + public sealed class ColorTransform : GLib.Object { + [CCode (has_construct_function = false)] + protected ColorTransform (); + } +#else [CCode (cheader_filename = "clutter/clutter.h", has_type_id = false)] [Compact] public class ColorTransformKey { } +#endif #endif [CCode (cheader_filename = "clutter/clutter.h", type_id = "clutter_colorize_effect_get_type ()")] public class ColorizeEffect : Clutter.OffscreenEffect { @@ -5989,7 +6144,11 @@ namespace Clutter { protected Context (); public unowned Clutter.Backend get_backend (); #if HAS_MUTTER47 +#if HAS_MUTTER51 + public unowned Clutter.ColorState get_default_color_state (); +#else public unowned Clutter.ColorManager get_color_manager (); +#endif public unowned Clutter.Settings get_settings (); #endif public Clutter.TextDirection get_text_direction (); @@ -6003,21 +6162,49 @@ namespace Clutter { public abstract class Cursor : GLib.Object { [CCode (has_construct_function = false)] protected Cursor (); +#if HAS_MUTTER51 + public void emit_image_changed (); +#endif [NoWrapper] public virtual uint get_current_frame_time (); +#if HAS_MUTTER51 + public Clutter.CursorType get_cursor_type (); + [NoWrapper] + public virtual uint8 get_data (int out_stride); + [NoWrapper] + public virtual void get_geometry (int width, int height, int hot_x, int hot_y); +#endif [NoWrapper] public virtual void invalidate (); [NoWrapper] public virtual bool is_animated (); [NoWrapper] +#if HAS_MUTTER51 + public virtual void prepare_at (float best_scale, float x, float y); +#else public virtual void prepare_at (float best_scale, int x, int y); +#endif +#if !HAS_MUTTER51 [NoWrapper] public virtual bool realize_texture (); +#endif +#if HAS_MUTTER51 + public void reset_viewport_dst_size (); + public void set_viewport_dst_size (int dst_width, int dst_height); +#endif [NoWrapper] public virtual void tick_frame (); [NoAccessorMethod] public Clutter.ColorState color_state { construct; } +#if HAS_MUTTER51 + [NoAccessorMethod] + public Clutter.CursorType cursor_type { construct; } +#endif +#if HAS_MUTTER51 + public signal void image_changed (); +#else public signal void texture_changed (); +#endif } #endif [CCode (cheader_filename = "clutter/clutter.h", type_id = "clutter_deform_effect_get_type ()")] @@ -6110,6 +6297,9 @@ namespace Clutter { public double get_gesture_pinch_scale (); public uint32 get_im_delete_length (); public bool get_im_location (int32 offset, int32 anchor); +#if HAS_MUTTER50 + public bool get_im_preedit_hints (Clutter.PreeditAttribute preedit_hints, uint n_preedit_hints); +#endif public Clutter.PreeditResetMode get_im_preedit_reset_mode (); public unowned string get_im_text (); public uint16 get_key_code (); @@ -6129,6 +6319,9 @@ namespace Clutter { #endif public Clutter.ScrollSource get_scroll_source (); public unowned Clutter.InputDevice get_source_device (); +#if HAS_MUTTER51 + public unowned Clutter.Actor get_source (); +#endif public Clutter.ModifierType get_state (); public uint32 get_time (); public int64 get_time_us (); @@ -6203,6 +6396,9 @@ namespace Clutter { [CCode (cheader_filename = "clutter/clutter.h", ref_function = "clutter_frame_ref", type_id = "clutter_frame_get_type ()", unref_function = "clutter_frame_unref")] [Compact] public class Frame { +#if HAS_MUTTER51 + public unowned Cogl.FrameInfo get_cogl_frame_info (); +#endif public int64 get_count (); #if HAS_MUTTER50 public bool get_expected_presentation_time (int64 expected_presentation_time_us); @@ -6212,6 +6408,9 @@ namespace Clutter { public bool has_result (); public unowned Clutter.Frame @ref (); public void set_result (Clutter.FrameResult result); +#if HAS_MUTTER51 + public void take_cogl_frame_info (Cogl.FrameInfo frame_info); +#endif public void unref (); } [CCode (cheader_filename = "clutter/clutter.h", type_id = "clutter_frame_clock_get_type ()")] @@ -6234,8 +6433,14 @@ namespace Clutter { public void notify_ready (); public void record_flip_time (int64 flip_time_us); public void remove_timeline (Clutter.Timeline timeline); +#if HAS_MUTTER50 + public void schedule_flush_update (); +#endif public void schedule_update (); public void schedule_update_now (); +#if HAS_MUTTER51 + public void schedule_update_throttled (); +#endif #if HAS_MUTTER47 public void set_deadline_evasion (int64 deadline_evasion_us); #if HAS_MUTTER49 @@ -6452,10 +6657,18 @@ namespace Clutter { [CCode (has_construct_function = false)] protected InputDeviceTool (); public Clutter.InputAxisFlags get_axes (); +#if HAS_MUTTER51 + public uint get_eraser_button (); +#endif public uint64 get_id (); public uint64 get_serial (); public Clutter.InputDeviceToolType get_tool_type (); public Clutter.InputAxisFlags axes { get; construct; } +#if HAS_MUTTER51 + public uint eraser_button { get; construct; } + [NoAccessorMethod] + public bool has_eraser_button { get; construct; } +#endif public uint64 id { get; construct; } public uint64 serial { get; construct; } [NoAccessorMethod] @@ -6465,6 +6678,10 @@ namespace Clutter { public abstract class InputFocus : GLib.Object { [CCode (has_construct_function = false)] protected InputFocus (); +#if HAS_MUTTER51 + [NoWrapper] + public virtual void action (Clutter.InputAction action); +#endif [NoWrapper] public virtual void commit_text (string text); [NoWrapper] @@ -6483,9 +6700,16 @@ namespace Clutter { public void set_content_hints (Clutter.InputContentHintFlags hint); public void set_content_purpose (Clutter.InputContentPurpose purpose); public void set_cursor_location (Graphene.Rect rect); +#if HAS_MUTTER51 + public void set_handled_actions (Clutter.InputActionFlags actions); +#endif public void set_input_panel_state (Clutter.InputPanelState state); [NoWrapper] +#if HAS_MUTTER51 + public virtual void set_preedit_text (string preedit, uint cursor, uint anchor, Clutter.PreeditAttribute style_hints, uint n_style_hints); +#else public virtual void set_preedit_text (string preedit, uint cursor, uint anchor); +#endif public void set_surrounding (string text, uint cursor, uint anchor); } [CCode (cheader_filename = "clutter/clutter.h", type_id = "clutter_input_method_get_type ()")] @@ -6502,10 +6726,19 @@ namespace Clutter { public virtual void reset (); [NoWrapper] public virtual void set_cursor_location (Graphene.Rect rect); +#if HAS_MUTTER50 + public virtual void set_handled_actions (Clutter.InputActionFlags actions); +#endif public void set_input_panel_state (Clutter.InputPanelState state); public void set_preedit_text (string? preedit, uint cursor, uint anchor, Clutter.PreeditResetMode mode); +#if HAS_MUTTER50 + public void set_preedit_text_with_attrs (string? preedit, uint cursor, uint anchor, Clutter.PreeditResetMode mode, [CCode (array_length_cname = "n_preedit_hints", array_length_pos = 5.1, array_length_type = "guint")] Clutter.PreeditAttribute[]? preedit_hints); +#endif [NoWrapper] public virtual void set_surrounding (string text, uint cursor, uint anchor); +#if HAS_MUTTER50 + public void trigger_action (Clutter.InputAction action); +#endif [NoWrapper] public virtual void update_content_hints (Clutter.InputContentHintFlags hint); [NoWrapper] @@ -6516,6 +6749,9 @@ namespace Clutter { public Clutter.InputContentHintFlags content_hints { get; set; } [NoAccessorMethod] public Clutter.InputContentPurpose content_purpose { get; set; } +#if HAS_MUTTER51 + public Clutter.InputActionFlags handled_actions { set; } +#endif [HasEmitter] public signal void commit (string text); public signal void cursor_location_changed (Graphene.Rect object); @@ -6554,6 +6790,23 @@ namespace Clutter { public GLib.Value initial { owned get; set; } public GLib.Type value_type { get; construct; } } +#if HAS_MUTTER51 + [CCode (cheader_filename = "clutter/clutter.h", type_id = "clutter_key_controller_get_type ()")] + public sealed class KeyController : Clutter.Action { + [CCode (has_construct_function = false, type = "ClutterAction*")] + public KeyController (Clutter.InputFocus? im_focus); + public bool get_key (out uint32 key_symbol, out uint32 key_code, out unichar unicode); + public bool get_state (out Clutter.ModifierType pressed, out Clutter.ModifierType latched, out Clutter.ModifierType locked); + public bool get_trigger_keybindings (); + public void set_trigger_keybindings (bool trigger_keybindings); + [NoAccessorMethod] + public Clutter.InputFocus im_focus { construct; } + public bool trigger_keybindings { get; set; } + public signal bool key_press (); + public signal bool key_release (); + public signal void modifier_change (); + } +#endif [CCode (cheader_filename = "clutter/clutter.h", has_type_id = false)] [Compact] public class KeyEvent : Clutter.Event { @@ -6640,6 +6893,16 @@ namespace Clutter { [CCode (has_construct_function = false, type = "ClutterAction*")] public LongPressGesture (); } +#endif +#if HAS_MUTTER51 + [CCode (cheader_filename = "clutter/clutter.h", type_id = "clutter_motion_controller_get_type ()")] + public class MotionController : Clutter.Action { + [CCode (has_construct_function = false, type = "ClutterAction*")] + public MotionController (); + public signal void enter (Clutter.Sprite sprite, float x, float y); + public signal void leave (Clutter.Sprite sprite); + public signal void motion (Clutter.Sprite sprite, float x, float y); + } #endif [CCode (cheader_filename = "clutter/clutter.h", has_type_id = false)] [Compact] @@ -6803,7 +7066,12 @@ namespace Clutter { public unowned Clutter.PickContext @ref (); public void unref (); } -#if HAS_MUTTER47 +#if HAS_MUTTER51 + [CCode (cheader_filename = "clutter/clutter.h", has_type_id = false)] + [Compact] + public class PipelineCache { + } +#elif HAS_MUTTER47 [CCode (cheader_filename = "clutter/clutter.h", type_id = "clutter_pipeline_cache_get_type ()")] public class PipelineCache : GLib.Object { [CCode (has_construct_function = false)] @@ -6897,6 +7165,16 @@ namespace Clutter { public void set_scroll_mode (Clutter.ScrollMode mode); public Clutter.ScrollMode scroll_mode { get; set; } } +#endif +#if HAS_MUTTER51 + [CCode (cheader_filename = "clutter/clutter.h", type_id = "clutter_scroll_controller_get_type ()")] + public class ScrollController : Clutter.Action { + [CCode (has_construct_function = false, type = "ClutterAction*")] + public ScrollController (Clutter.ScrollControllerFlags flags); + [NoAccessorMethod] + public Clutter.ScrollControllerFlags flags { get; construct; } + public signal void scroll (Clutter.Sprite sprite, Clutter.ScrollSource source, double dx, double dy); + } #endif [CCode (cheader_filename = "clutter/clutter.h", has_type_id = false)] [Compact] @@ -6975,8 +7253,10 @@ namespace Clutter { public sealed class Settings : GLib.Object { [CCode (has_construct_function = false)] protected Settings (); +#if !HAS_MUTTER51 [Version (deprecated = true)] public static unowned Clutter.Settings get_default (); +#endif [NoAccessorMethod] public int dnd_drag_threshold { get; set; } [NoAccessorMethod] @@ -7016,6 +7296,13 @@ namespace Clutter { } [CCode (cheader_filename = "clutter/clutter.h", type_id = "clutter_shader_effect_get_type ()")] public class ShaderEffect : Clutter.OffscreenEffect { +#if HAS_MUTTER51 + [CCode (has_construct_function = false)] + protected ShaderEffect (); + [NoWrapper] + public virtual Cogl.Snippet get_static_snippet (); + public void set_uniform_float (string name, int n_components, [CCode (array_length_cname = "total_count", array_length_pos = 2.5)] float[] value); +#else [CCode (has_construct_function = false, type = "ClutterEffect*")] #if HAS_MUTTER48 public ShaderEffect (Cogl.ShaderType shader_type); @@ -7027,12 +7314,18 @@ namespace Clutter { [NoWrapper] public virtual string get_static_shader_source (); public bool set_shader_source (string source); +#endif public void set_uniform_value (string name, GLib.Value value); +#if HAS_MUTTER51 + [CCode (has_construct_function = false, type = "ClutterEffect*")] + public ShaderEffect.with_snippet (Cogl.Snippet snippet); +#else [NoAccessorMethod] #if HAS_MUTTER48 public Cogl.ShaderType shader_type { construct; } #else public Clutter.ShaderType shader_type { construct; } +#endif #endif } [CCode (cheader_filename = "clutter/clutter.h", type_id = "clutter_shader_float_get_type ()")] @@ -7123,9 +7416,18 @@ namespace Clutter { #if HAS_MUTTER47 public bool is_active (); #endif +#if HAS_MUTTER50 + public bool paint_to_buffer (Mtk.Rectangle rect, float scale, [CCode (array_length = false)] uint8[] data, int stride, Cogl.PixelFormat format, Clutter.ColorState? color_state, Clutter.PaintFlag paint_flags) throws GLib.Error; + public Clutter.Content paint_to_content (Mtk.Rectangle rect, float scale, Clutter.ColorState? color_state, Clutter.PaintFlag paint_flags) throws GLib.Error; + public void paint_to_framebuffer (Cogl.Framebuffer framebuffer, Mtk.Rectangle rect, float scale, Clutter.ColorState color_state, Clutter.PaintFlag paint_flags); +#else public bool paint_to_buffer (Mtk.Rectangle rect, float scale, [CCode (array_length = false)] uint8[] data, int stride, Cogl.PixelFormat format, Clutter.PaintFlag paint_flags) throws GLib.Error; public Clutter.Content paint_to_content (Mtk.Rectangle rect, float scale, Clutter.PaintFlag paint_flags) throws GLib.Error; public void paint_to_framebuffer (Cogl.Framebuffer framebuffer, Mtk.Rectangle rect, float scale, Clutter.PaintFlag paint_flags); +#endif +#if HAS_MUTTER51 + public void paint_to_framebuffer_clipped (Cogl.Framebuffer framebuffer, Mtk.Rectangle rect, float scale, Clutter.ColorState color_state, Mtk.Region redraw_clip, Clutter.PaintFlag paint_flags); +#endif #if !HAS_MUTTER49 public bool pointing_input_foreach (Clutter.StageInputForeachFunc func); #endif @@ -7139,7 +7441,9 @@ namespace Clutter { public void set_active (bool is_active); #endif public void set_key_focus (Clutter.Actor? actor); +#if !HAS_MUTTER51 public void set_minimum_size (uint width, uint height); +#endif #if !HAS_MUTTER48 public void set_title (string title); public void update_device (Clutter.InputDevice device, Clutter.EventSequence sequence, Clutter.InputDevice source_device, Graphene.Point point, uint32 time, Clutter.Actor new_actor, Mtk.Region region, bool emit_crossing); @@ -7296,9 +7600,15 @@ namespace Clutter { public bool get_cursor_visible (); public bool get_editable (); public Pango.EllipsizeMode get_ellipsize (); +#if HAS_MUTTER51 + public Cogl.Color get_error_color (); +#endif public Pango.FontDescription get_font_description (); public unowned string get_font_name (); public Clutter.InputContentHintFlags get_input_hints (); +#if HAS_MUTTER51 + public unowned Clutter.Actor get_input_interceptor (); +#endif public Clutter.InputContentPurpose get_input_purpose (); public bool get_justify (); public unowned Pango.Layout get_layout (); @@ -7343,9 +7653,15 @@ namespace Clutter { public void set_cursor_visible (bool cursor_visible); public void set_editable (bool editable); public void set_ellipsize (Pango.EllipsizeMode mode); +#if HAS_MUTTER51 + public void set_error_color (Cogl.Color? color); +#endif public void set_font_description (Pango.FontDescription font_desc); public void set_font_name (string? font_name); public void set_input_hints (Clutter.InputContentHintFlags hints); +#if HAS_MUTTER51 + public void set_input_interceptor (Clutter.Actor? input_interceptor); +#endif public void set_input_purpose (Clutter.InputContentPurpose purpose); public void set_justify (bool justify); public void set_line_alignment (Pango.Alignment alignment); @@ -7394,9 +7710,17 @@ namespace Clutter { public bool cursor_visible { get; set; } public bool editable { get; set; } public Pango.EllipsizeMode ellipsize { get; set; } +#if HAS_MUTTER51 + public Cogl.Color error_color { get; set; } + [NoAccessorMethod] + public bool error_color_set { get; } +#endif public Pango.FontDescription font_description { owned get; set; } public string font_name { get; set; } public Clutter.InputContentHintFlags input_hints { get; set; } +#if HAS_MUTTER51 + public Clutter.Actor input_interceptor { get; set; } +#endif public Clutter.InputContentPurpose input_purpose { get; set; } public bool justify { get; set; } public Pango.Alignment line_alignment { get; set; } @@ -7716,13 +8040,27 @@ namespace Clutter { public Clutter.ColorimetryType type; public Clutter.Colorspace colorspace; public Clutter.Primaries primaries; +#if HAS_MUTTER51 + public void clear (); + public bool equal (Clutter.Colorimetry other_colorimetry); + public void from_XYZ (Graphene.Matrix from_XYZ); + public unowned Clutter.Primaries? get_primaries (); + public void to_XYZ (Graphene.Matrix to_XYZ); + public string to_string (); +#endif } [CCode (cheader_filename = "clutter/clutter.h", has_type_id = false)] public struct EOTF { public Clutter.EOTFType type; public Clutter.TransferFunction tf_name; public float gamma_exp; +#if HAS_MUTTER51 + public bool equal (Clutter.EOTF other_eotf); +#endif public unowned Clutter.Luminance? get_default_luminance (); +#if HAS_MUTTER51 + public unowned string to_string (); +#endif } [CCode (cheader_filename = "clutter/clutter.h", has_type_id = false)] public struct Luminance { @@ -7735,6 +8073,10 @@ namespace Clutter { public float @ref; #if HAS_MUTTER50 public float mastering_max; +#endif +#if HAS_MUTTER51 + public bool equal (Clutter.Luminance other_lum); + public static unowned Clutter.Luminance? get_default_sdr (); #endif } #endif @@ -7802,6 +8144,9 @@ namespace Clutter { public float get_height (); public Graphene.Point3D get_origin (); public float get_width (); +#if HAS_MUTTER51 + public void scale (float x_scale, float y_scale, float z_scale); +#endif public void set_depth (float depth); public bool set_from_allocation (Clutter.Actor actor); public void set_height (float height); @@ -7836,6 +8181,14 @@ namespace Clutter { public int dwell_delay; public int dwell_threshold; } +#if HAS_MUTTER50 + [CCode (cheader_filename = "clutter/clutter.h", has_type_id = false)] + public struct PreeditAttribute { + public Clutter.PreeditStyleHint hint; + public uint start; + public uint end; + } +#endif #if HAS_MUTTER48 [CCode (cheader_filename = "clutter/clutter.h", has_type_id = false)] public struct Primaries { @@ -7848,6 +8201,9 @@ namespace Clutter { public float w_x; public float w_y; public void ensure_normalized_range (); +#if HAS_MUTTER51 + public bool equal (Clutter.Primaries other_primaries); +#endif } #endif #if HAS_MUTTER47 @@ -8015,6 +8371,9 @@ namespace Clutter { #endif NTSC; public unowned Clutter.Primaries? to_primaries (); +#if HAS_MUTTER51 + public unowned string to_string (); +#endif #else BT2020 #endif @@ -8081,7 +8440,10 @@ namespace Clutter { ZOOM_IN, ZOOM_OUT, DND_ASK, - ALL_RESIZE + ALL_RESIZE; +#if HAS_MUTTER51 + public unowned string to_name (); +#endif } #endif #if !HAS_MUTTER48 @@ -8176,6 +8538,9 @@ namespace Clutter { [CCode (cheader_filename = "clutter/clutter.h", cprefix = "CLUTTER_PHASE_", type_id = "clutter_event_phase_get_type ()")] public enum EventPhase { CAPTURE, +#if HAS_MUTTER51 + TARGET, +#endif BUBBLE } [CCode (cheader_filename = "clutter/clutter.h", cprefix = "CLUTTER_", type_id = "clutter_event_type_get_type ()")] @@ -8281,6 +8646,20 @@ namespace Clutter { TOP, BOTTOM } +#if HAS_MUTTER50 + [CCode (cheader_filename = "clutter/clutter.h", cprefix = "CLUTTER_INPUT_ACTION_", type_id = "clutter_input_action_get_type ()")] + public enum InputAction { + SUBMIT, + LAST + } + [CCode (cheader_filename = "clutter/clutter.h", cprefix = "CLUTTER_INPUT_ACTION_FLAG_", type_id = "clutter_input_action_flags_get_type ()")] + [Flags] + public enum InputActionFlags { + NONE, + SUBMIT, + ALL + } +#endif [CCode (cheader_filename = "clutter/clutter.h", cprefix = "CLUTTER_INPUT_AXIS_", type_id = "clutter_input_axis_get_type ()")] public enum InputAxis { IGNORE, @@ -8334,6 +8713,10 @@ namespace Clutter { HIDDEN_TEXT, SENSITIVE_DATA, LATIN, +#if HAS_MUTTER51 + INHIBIT_OSK, + NO_EMOJI, +#endif MULTILINE } [CCode (cheader_filename = "clutter/clutter.h", cprefix = "CLUTTER_INPUT_CONTENT_PURPOSE_", type_id = "clutter_input_content_purpose_get_type ()")] @@ -8510,9 +8893,18 @@ namespace Clutter { ALL } #if HAS_MUTTER47 +#if HAS_MUTTER51 + [CCode (cheader_filename = "clutter/clutter.h", cprefix = "CLUTTER_PIPELINE_CAPABILITY_", type_id = "clutter_pipeline_capability_get_type ()")] +#else [CCode (cheader_filename = "clutter/clutter.h", cprefix = "CLUTTER_PIPELINE_CAPABILITY_COLOR_", type_id = "clutter_pipeline_capability_get_type ()")] +#endif public enum PipelineCapability { +#if HAS_MUTTER51 + COLOR_STATE, + SHADER_EFFECT; +#else STATE; +#endif public static GLib.Quark quark (); } #endif @@ -8555,6 +8947,19 @@ namespace Clutter { CLEAR, COMMIT } +#if HAS_MUTTER50 + [CCode (cheader_filename = "clutter/clutter.h", cprefix = "CLUTTER_PREEDIT_STYLE_", type_id = "clutter_preedit_style_hint_get_type ()")] + public enum PreeditStyleHint { + NONE, + WHOLE, + SELECTION, + PREDICTION, + PREFIX, + SUFFIX, + SPELLING_ERROR, + COMPOSE_ERROR + } +#endif [CCode (cheader_filename = "clutter/clutter.h", cprefix = "CLUTTER_REPAINT_FLAGS_", type_id = "clutter_repaint_flags_get_type ()")] [Flags] public enum RepaintFlags { @@ -8579,6 +8984,17 @@ namespace Clutter { NEAREST, TRILINEAR } +#if HAS_MUTTER51 + [CCode (cheader_filename = "clutter/clutter.h", cprefix = "CLUTTER_SCROLL_CONTROLLER_FLAG_", type_id = "clutter_scroll_controller_flags_get_type ()")] + [Flags] + public enum ScrollControllerFlags { + NONE, + SCROLL_VERTICAL, + SCROLL_HORIZONTAL, + DISCRETE, + PHYSICAL_DIRECTION + } +#endif [CCode (cheader_filename = "clutter/clutter.h", cprefix = "CLUTTER_SCROLL_", type_id = "clutter_scroll_direction_get_type ()")] public enum ScrollDirection { UP, @@ -8680,7 +9096,12 @@ namespace Clutter { #if !HAS_MUTTER50 DEFAULT, #endif +#if HAS_MUTTER51 + SRGB_PIECEWISE, + GAMMA22, +#else SRGB, +#endif PQ, #if HAS_MUTTER48 #if HAS_MUTTER50 @@ -8703,6 +9124,18 @@ namespace Clutter { POINTER, TOUCHSCREEN } +#if HAS_MUTTER51 + [CCode (cheader_filename = "clutter/clutter.h", cprefix = "CLUTTER_YCBCR_COEFFICIENTS_", type_id = "clutter_ycbcr_coefficients_get_type ()")] + public enum YcbcrCoefficients { + IDENTITY_LIMITED, + BT601_FULL, + BT601_LIMITED, + BT709_FULL, + BT709_LIMITED, + BT2020_FULL, + BT2020_LIMITED + } +#endif [CCode (cheader_filename = "clutter/clutter.h", instance_pos = 1.9)] public delegate Clutter.Actor ActorCreateChildFunc (GLib.Object item); [CCode (cheader_filename = "clutter/clutter.h", instance_pos = 2.9)] @@ -8741,6 +9174,14 @@ namespace Clutter { #if HAS_MUTTER50 [Version (replacement = "Colorspace.to_primaries")] public static unowned Clutter.Primaries? colorspace_to_primaries (Clutter.Colorspace colorspace); +#endif +#if HAS_MUTTER51 + [CCode (cheader_filename = "clutter/clutter.h")] + [Version (replacement = "Colorspace.to_string")] + public static unowned string colorspace_to_string (Clutter.Colorspace colorspace); + [CCode (cheader_filename = "clutter/clutter.h")] + [Version (replacement = "CursorType.to_name")] + public static unowned string cursor_type_to_name (Clutter.CursorType cursor); #endif [CCode (cheader_filename = "clutter/clutter.h")] public static void debug_set_max_render_time_constant (int max_render_time_constant_us); @@ -8769,8 +9210,10 @@ namespace Clutter { public static uint32 get_current_event_time (); [CCode (cheader_filename = "clutter/clutter.h")] public static void get_debug_flags (out Clutter.DebugFlag debug_flags, out Clutter.DrawDebugFlag draw_flags, out Clutter.PickDebugFlag pick_flags); +#if !HAS_MUTTER51 [CCode (cheader_filename = "clutter/clutter.h")] public static unowned Clutter.Backend get_default_backend (); +#endif [CCode (cheader_filename = "clutter/clutter.h")] public static Clutter.TextDirection get_default_text_direction (); #if !HAS_MUTTER47 @@ -8785,6 +9228,15 @@ namespace Clutter { public static void keyval_convert_case (uint symbol, out uint lower, out uint upper); [CCode (cheader_filename = "clutter/clutter.h")] public static unowned string? keyval_name (uint keyval); +#if HAS_MUTTER51 + [CCode (cheader_filename = "clutter/clutter.h")] + public static uint keyval_to_lower (uint keyval); + [CCode (cheader_filename = "clutter/clutter.h")] + public static uint keyval_to_upper (uint keyval); + [CCode (cheader_filename = "clutter/clutter.h")] + [Version (replacement = "Luminance.get_default_sdr")] + public static unowned Clutter.Luminance? luminance_get_default_sdr (); +#endif #if HAS_MUTTER50 [CCode (cheader_filename = "clutter/clutter.h")] [Version (replacement = "PipelineCapability.quark")] @@ -8796,4 +9248,8 @@ namespace Clutter { #endif [CCode (cheader_filename = "clutter/clutter.h")] public static uint unicode_to_keysym (uint32 wc); +#if HAS_MUTTER51 + [CCode (cheader_filename = "clutter/clutter.h")] + public static void xyY_to_XYZ (float x, float y, float Y, Graphene.Vec3 XYZ); +#endif } diff --git a/vapi/mutter-cogl-14.vapi b/vapi/mutter-cogl-14.vapi index c234e7b6..9ae10914 100644 --- a/vapi/mutter-cogl-14.vapi +++ b/vapi/mutter-cogl-14.vapi @@ -90,6 +90,12 @@ namespace Cogl { public int get_height (); public int get_rowstride (); public int get_width (); +#if HAS_MUTTER51 + public unowned uint8? map (Cogl.BufferAccess access, Cogl.BufferMapHint hints) throws GLib.Error; + public void unmap (); + [CCode (has_construct_function = false)] + public Bitmap.with_malloc_buffer (Cogl.Context context, uint width, uint height, Cogl.PixelFormat format) throws GLib.Error; +#endif [CCode (has_construct_function = false)] public Bitmap.with_size (Cogl.Context context, uint width, uint height, Cogl.PixelFormat format); } @@ -113,9 +119,17 @@ namespace Cogl { public Cogl.BufferUpdateHint update_hint { set construct; } } [CCode (cheader_filename = "cogl/cogl.h", type_id = "cogl_context_get_type ()")] +#if HAS_MUTTER51 + public abstract class Context : GLib.Object { +#else public sealed class Context : GLib.Object { +#endif [CCode (has_construct_function = false)] +#if HAS_MUTTER51 + protected Context (); +#else public Context (Cogl.Display? display) throws GLib.Error; +#endif #if HAS_MUTTER47 public void flush (); #else @@ -140,7 +154,7 @@ namespace Cogl { #if !HAS_MUTTER50 public Cogl.GraphicsResetStatus get_graphics_reset_status (); #endif -#if HAS_MUTTER48 +#if HAS_MUTTER48 && !HAS_MUTTER51 public int get_latest_sync_fd (); #endif public unowned Cogl.Pipeline get_named_pipeline (Cogl.PipelineKey key); @@ -151,7 +165,9 @@ namespace Cogl { #if !HAS_MUTTER47 [CCode (cheader_filename = "cogl/cogl.h", cname = "cogl_has_feature")] #endif +#if !HAS_MUTTER51 public bool has_feature (Cogl.FeatureID feature); +#endif #if HAS_MUTTER47 public bool has_winsys_feature (Cogl.WinsysFeature feature); #endif @@ -159,14 +175,35 @@ namespace Cogl { public bool is_hardware_accelerated (); #endif public void set_named_pipeline (Cogl.PipelineKey key, Cogl.Pipeline? pipeline); +#if HAS_MUTTER51 + public void set_winsys_feature (Cogl.WinsysFeature feature, bool value); +#endif #if !HAS_MUTTER50 public int64 timestamp_query_get_time_ns (Cogl.TimestampQuery query); #endif +#if HAS_MUTTER51 + public Cogl.Display display { get; construct; } +#endif + } +#if HAS_MUTTER51 + [CCode (cheader_filename = "cogl/cogl.h", type_id = "cogl_context_egl_get_type ()")] + public class ContextEGL : Cogl.Context { + [CCode (has_construct_function = false, type = "CoglContext*")] + public ContextEGL (Cogl.Display display) throws GLib.Error; } +#endif [CCode (cheader_filename = "cogl/cogl.h", type_id = "cogl_display_get_type ()")] +#if HAS_MUTTER51 + public abstract class Display : GLib.Object { +#else public sealed class Display : GLib.Object { +#endif [CCode (has_construct_function = false)] -#if HAS_MUTTER47 +#if HAS_MUTTER51 + protected Display (); + [NoWrapper] + public virtual void destroy (); +#elif HAS_MUTTER47 public Display (Cogl.Renderer renderer); #else public Display (Cogl.Renderer renderer, Cogl.OnscreenTemplate onscreen_template); @@ -175,8 +212,24 @@ namespace Cogl { #if !HAS_MUTTER47 public void set_onscreen_template (Cogl.OnscreenTemplate onscreen_template); #endif +#if HAS_MUTTER51 + public virtual bool setup () throws GLib.Error; + public Cogl.Renderer renderer { get; construct; } +#else public bool setup () throws GLib.Error; +#endif + } +#if HAS_MUTTER51 + [CCode (cheader_filename = "cogl/cogl.h", type_id = "cogl_display_egl_get_type ()")] + public class DisplayEGL : Cogl.Display { + [CCode (has_construct_function = false)] + public DisplayEGL (Cogl.Renderer renderer); + [NoWrapper] + public virtual void cleanup_context (); + [NoWrapper] + public virtual bool context_created () throws GLib.Error; } +#endif [CCode (cheader_filename = "cogl/cogl.h", free_function = "cogl_dma_buf_handle_free", has_type_id = false)] [Compact] public class DmaBufHandle { @@ -214,10 +267,22 @@ namespace Cogl { public Cogl.GraphicsResetStatus get_graphics_reset_status (); public unowned string get_vendor (); public bool has_feature (Cogl.FeatureID feature); +#if !HAS_MUTTER51 public bool is_hardware_accelerated (); +#endif public void set_feature (Cogl.FeatureID feature, bool value); } #endif +#if HAS_MUTTER51 + [CCode (cheader_filename = "cogl/cogl.h", type_id = "cogl_driver_gl_get_type ()")] + public class DriverGL : Cogl.Driver { + [CCode (has_construct_function = false)] + protected DriverGL (); + public uint get_gl_error (); + [CCode (array_length = false, array_null_terminated = true)] + public string[] get_gl_extensions (Cogl.Renderer renderer); + } +#endif #if !HAS_MUTTER47 [CCode (cheader_filename = "cogl/cogl.h", has_type_id = false)] [Compact] @@ -244,6 +309,9 @@ namespace Cogl { public bool get_is_symbolic (); #if HAS_MUTTER50 public int64 get_kms_ready_time_us (); +#endif +#if HAS_MUTTER51 + public unowned Cogl.Onscreen get_onscreen (); #endif public int64 get_presentation_time_us (); public float get_refresh_rate (); @@ -277,10 +345,16 @@ namespace Cogl { public unowned Cogl.FenceClosure? add_fence_callback ([CCode (scope = "async")] Cogl.FenceCallback callback); #endif public virtual bool allocate () throws GLib.Error; +#if HAS_MUTTER51 + public void bind_renderbuffers (Cogl.Renderbuffers renderbuffers); +#endif #if !HAS_MUTTER48 [CCode (cheader_filename = "cogl/cogl.h", cname = "cogl_blit_framebuffer")] #endif public bool blit (Cogl.Framebuffer dst, int src_x, int src_y, int dst_x, int dst_y, int width, int height) throws GLib.Error; +#if HAS_MUTTER51 + public bool blit_region (Cogl.Framebuffer dst, Mtk.Region src_region, int dst_x_offset, int dst_y_offset) throws GLib.Error; +#endif #if !HAS_MUTTER47 public void cancel_fence_callback (Cogl.FenceClosure closure); #endif @@ -328,6 +402,9 @@ namespace Cogl { [NoWrapper] public virtual bool is_y_flipped (); public void orthographic (float x_1, float y_1, float x_2, float y_2, float near, float far); +#if HAS_MUTTER51 + public unowned Cogl.Renderbuffers peek_renderbuffers (); +#endif public void perspective (float fov_y, float aspect, float z_near, float z_far); public void pop_clip (); public void pop_matrix (); @@ -454,7 +531,9 @@ namespace Cogl { public unowned Cogl.OnscreenDirtyClosure add_dirty_callback (owned Cogl.OnscreenDirtyCallback callback); #endif public unowned Cogl.FrameClosure add_frame_callback (owned Cogl.FrameCallback callback); +#if !HAS_MUTTER51 public void add_frame_info (owned Cogl.FrameInfo info); +#endif [NoWrapper] public virtual void bind (); public virtual bool direct_scanout (Cogl.Scanout scanout, Cogl.FrameInfo info) throws GLib.Error; @@ -476,8 +555,19 @@ namespace Cogl { #if !HAS_MUTTER47 public void show (); #endif +#if !HAS_MUTTER51 public void swap_buffers (Cogl.FrameInfo frame_info, void* user_data); -#if HAS_MUTTER48 +#endif +#if HAS_MUTTER51 + public void swap_buffers_with_damage (Mtk.Region region, Cogl.FrameInfo info, void* user_data); + [CCode (vfunc_name = "swap_buffers_with_damage")] + [NoWrapper] + public virtual bool swap_buffers_with_damage_vfunc (Mtk.Region region, Cogl.FrameInfo info); + public void swap_region (Mtk.Region region, Cogl.FrameInfo info, void* user_data); + [CCode (vfunc_name = "swap_region")] + [NoWrapper] + public virtual bool swap_region_vfunc (Mtk.Region region, Cogl.FrameInfo info); +#elif HAS_MUTTER48 public virtual void swap_buffers_with_damage (Mtk.Region region, Cogl.FrameInfo info); public virtual void swap_region (Mtk.Region region, Cogl.FrameInfo info); #else @@ -522,6 +612,9 @@ namespace Cogl { public sealed class Pipeline : GLib.Object { [CCode (has_construct_function = false)] public Pipeline (Cogl.Context context); +#if HAS_MUTTER51 + public void add_capability (GLib.Quark domain, uint capability); +#endif public void add_layer_snippet (int layer, Cogl.Snippet snippet); public void add_snippet (Cogl.Snippet snippet); public Cogl.Pipeline copy (); @@ -529,6 +622,9 @@ namespace Cogl { public Cogl.PipelineAlphaFunc get_alpha_test_function (); public float get_alpha_test_reference (); public Cogl.Color get_color (); +#if HAS_MUTTER51 + public unowned Cogl.Context get_context (); +#endif public Cogl.PipelineCullFaceMode get_cull_face_mode (); public Cogl.DepthState get_depth_state (); public Cogl.Winding get_front_face_winding (); @@ -544,7 +640,9 @@ namespace Cogl { public bool get_per_vertex_point_size (); public float get_point_size (); public int get_uniform_location (string uniform_name); +#if !HAS_MUTTER51 public unowned Cogl.Program get_user_program (); +#endif #if HAS_MUTTER48 public bool has_capability (GLib.Quark domain, uint capability); #endif @@ -583,7 +681,9 @@ namespace Cogl { public void set_uniform_int (int uniform_location, int n_components, int count, int value); public void set_uniform_matrix (int uniform_location, int dimensions, int count, bool transpose, float value); #endif +#if !HAS_MUTTER51 public void set_user_program (Cogl.Program program); +#endif } [CCode (cheader_filename = "cogl/cogl.h", type_id = "cogl_pixel_buffer_get_type ()")] public sealed class PixelBuffer : Cogl.Buffer { @@ -640,6 +740,7 @@ namespace Cogl { [CCode (has_construct_function = false)] public Primitive.with_attributes (Cogl.VerticesMode mode, int n_vertices, [CCode (array_length_cname = "n_attributes", array_length_pos = 3.1)] Cogl.Attribute[] attributes); } +#if !HAS_MUTTER51 [CCode (cheader_filename = "cogl/cogl.h", type_id = "cogl_program_get_type ()")] public sealed class Program : GLib.Object { [CCode (has_construct_function = false)] @@ -667,30 +768,61 @@ namespace Cogl { [Version (deprecated = true, deprecated_since = "1.16")] public void set_uniform_matrix (int uniform_location, int dimensions, bool transpose, [CCode (array_length_cname = "count", array_length_pos = 2.5)] float[] value); } +#endif +#if HAS_MUTTER51 + [CCode (cheader_filename = "cogl/cogl.h", has_type_id = false)] + [Compact] + public class Renderbuffers { + } +#endif [CCode (cheader_filename = "cogl/cogl.h", type_id = "cogl_renderer_get_type ()")] +#if HAS_MUTTER51 + public abstract class Renderer : GLib.Object { + [CCode (has_construct_function = false)] + protected Renderer (); +#else public sealed class Renderer : GLib.Object { [CCode (has_construct_function = false)] public Renderer (); +#endif #if !HAS_MUTTER47 public void add_constraint (Cogl.RendererConstraint constraint); #endif +#if HAS_MUTTER51 + public virtual void bind_api (); +#else public void bind_api (); +#endif #if !HAS_MUTTER47 public bool check_onscreen_template (Cogl.OnscreenTemplate onscreen_template) throws GLib.Error; #endif +#if HAS_MUTTER51 + public virtual bool connect () throws GLib.Error; +#else public bool connect () throws GLib.Error; +#endif #if !HAS_MUTTER47 public void foreach_output (Cogl.OutputCallback callback); #endif #if HAS_MUTTER48 public Cogl.DriverId get_driver_id (); +#if HAS_MUTTER51 + public virtual uint64 get_implicit_drm_modifier (); + public int get_latest_sync_fd (); +#else public uint64 get_implicit_drm_modifier (); +#endif #else public Cogl.Driver get_driver (); #endif #if HAS_MUTTER47 public void* get_proc_address (string name); #endif +#if HAS_MUTTER51 + [NoWrapper] + public virtual int get_sync_fd (); +#endif +#if !HAS_MUTTER51 #if HAS_MUTTER50 public unowned Cogl.Winsys get_winsys (); #elif HAS_MUTTER49 @@ -701,7 +833,13 @@ namespace Cogl { #else public Cogl.WinsysID get_winsys_id (); #endif +#endif +#if HAS_MUTTER51 + public virtual bool is_dma_buf_supported (); + public virtual bool is_hardware_accelerated (); +#else public bool is_dma_buf_supported (); +#endif #if HAS_MUTTER48 public bool is_implicit_drm_modifier (uint64 modifier); #endif @@ -714,6 +852,15 @@ namespace Cogl { #if !HAS_MUTTER47 public void set_winsys_id (Cogl.WinsysID winsys_id); #endif +#if HAS_MUTTER51 + [NoWrapper] + public virtual bool load_driver (Cogl.DriverId driver_id) throws GLib.Error; + public void set_driver_id (Cogl.DriverId driver); + [NoWrapper] + public virtual void update_sync (); + [NoAccessorMethod] + public Cogl.Driver driver { owned get; construct; } +#else #if HAS_MUTTER50 public void set_custom_winsys (Cogl.Winsys winsys); #endif @@ -724,8 +871,19 @@ namespace Cogl { #else public void set_winsys (void* winsys); #endif +#endif #endif } +#if HAS_MUTTER51 + [CCode (cheader_filename = "cogl/cogl.h", type_id = "cogl_renderer_egl_get_type ()")] + public class RendererEGL : Cogl.Renderer { + [CCode (has_construct_function = false)] + public RendererEGL (); + public bool has_feature (Cogl.EGLWinsysFeature feature); + public bool has_set_damage_region (); + public bool has_swap_buffers_with_damage (); + } +#endif [CCode (cheader_filename = "cogl/cogl.h", type_id = "cogl_scanout_get_type ()")] public sealed class Scanout : GLib.Object { [CCode (has_construct_function = false)] @@ -749,6 +907,7 @@ namespace Cogl { public void set_src_rect (Graphene.Rect rect); public signal void scanout_failed (Cogl.Onscreen object); } +#if !HAS_MUTTER51 [CCode (cheader_filename = "cogl/cogl.h", type_id = "cogl_shader_get_type ()")] public sealed class Shader : GLib.Object { [CCode (has_construct_function = false)] @@ -766,10 +925,14 @@ namespace Cogl { [Version (deprecated = true, deprecated_since = "1.16")] public void source (string source); } +#endif [CCode (cheader_filename = "cogl/cogl.h", type_id = "cogl_snippet_get_type ()")] public sealed class Snippet : GLib.Object { [CCode (has_construct_function = false)] public Snippet (Cogl.SnippetHook hook, string? declarations, string? post); +#if HAS_MUTTER51 + public bool get_capability (out GLib.Quark domain, out uint capability); +#endif public unowned string get_declarations (); public Cogl.SnippetHook get_hook (); public unowned string get_post (); @@ -848,7 +1011,11 @@ namespace Cogl { public int width { construct; } } [CCode (cheader_filename = "cogl/cogl.h", lower_case_csuffix = "texture_2d", type_id = "cogl_texture_2d_get_type ()")] +#if HAS_MUTTER51 + public class Texture2D : Cogl.Texture { +#else public sealed class Texture2D : Cogl.Texture { +#endif [CCode (has_construct_function = false)] protected Texture2D (); [CCode (has_construct_function = false, type = "CoglTexture*")] @@ -876,6 +1043,7 @@ namespace Cogl { [CCode (has_construct_function = false, type = "CoglTexture*")] public Texture2DSliced.with_size (Cogl.Context ctx, int width, int height, int max_waste); } +#if !HAS_MUTTER51 #if HAS_MUTTER50 [CCode (cheader_filename = "cogl/cogl.h", type_id = "cogl_winsys_get_type ()")] public abstract class Winsys : GLib.Object { @@ -916,6 +1084,7 @@ namespace Cogl { [Compact] public class TimestampQuery { } +#endif #endif [CCode (cheader_filename = "cogl/cogl.h", type_cname = "CoglScanoutBufferInterface", type_id = "cogl_scanout_buffer_get_type ()")] public interface ScanoutBuffer : GLib.Object { @@ -986,7 +1155,7 @@ namespace Cogl { public void set_test_function (Cogl.DepthTestFunction function); public void set_write_enabled (bool enable); } -#if HAS_MUTTER50 +#if HAS_MUTTER50 && !HAS_MUTTER51 [CCode (cheader_filename = "cogl/cogl.h", has_type_id = false)] public struct DisplayEGL { public void* platform; @@ -1020,7 +1189,7 @@ namespace Cogl { public Cogl.Color color; } #endif -#if HAS_MUTTER50 +#if HAS_MUTTER50 && !HAS_MUTTER51 [CCode (cheader_filename = "cogl/cogl.h", has_type_id = false)] public struct RendererEGL { public Cogl.EGLWinsysFeature private_features; @@ -1237,8 +1406,10 @@ namespace Cogl { OGL_FEATURE_ID_MAP_BUFFER_FOR_READ, [CCode (cname = "COGL_FEATURE_ID_MAP_BUFFER_FOR_WRITE")] OGL_FEATURE_ID_MAP_BUFFER_FOR_WRITE, +#if !HAS_MUTTER51 [CCode (cname = "COGL_FEATURE_ID_FENCE")] OGL_FEATURE_ID_FENCE, +#endif [CCode (cname = "COGL_FEATURE_ID_TEXTURE_RG")] OGL_FEATURE_ID_TEXTURE_RG, [CCode (cname = "COGL_FEATURE_ID_TEXTURE_RGBA1010102")] @@ -1251,8 +1422,10 @@ namespace Cogl { [CCode (cname = "COGL_FEATURE_ID_BUFFER_AGE")] OGL_FEATURE_ID_BUFFER_AGE, #endif +#if !HAS_MUTTER51 [CCode (cname = "COGL_FEATURE_ID_TEXTURE_EGL_IMAGE_EXTERNAL")] OGL_FEATURE_ID_TEXTURE_EGL_IMAGE_EXTERNAL, +#endif [CCode (cname = "COGL_FEATURE_ID_BLIT_FRAMEBUFFER")] OGL_FEATURE_ID_BLIT_FRAMEBUFFER, #if HAS_MUTTER47 && !HAS_MUTTER50 @@ -1292,8 +1465,10 @@ namespace Cogl { OGL_FEATURE_ID_TEXTURE_MAX_LEVEL, [CCode (cname = "COGL_FEATURE_ID_TEXTURE_LOD_BIAS")] OGL_FEATURE_ID_TEXTURE_LOD_BIAS, +#if !HAS_MUTTER51 [CCode (cname = "COGL_FEATURE_ID_OES_EGL_SYNC")] OGL_FEATURE_ID_OES_EGL_SYNC, +#endif [CCode (cname = "COGL_FEATURE_ID_QUIRK_GENERATE_MIPMAP_NEEDS_FLUSH")] OGL_FEATURE_ID_QUIRK_GENERATE_MIPMAP_NEEDS_FLUSH, #endif @@ -1370,7 +1545,11 @@ namespace Cogl { } [CCode (cheader_filename = "cogl/cogl.h", cprefix = "COGL_PIXEL_FORMAT_", type_id = "cogl_pixel_format_get_type ()")] public enum PixelFormat { +#if HAS_MUTTER51 + ARGB32_NATIVE, +#else CAIRO_ARGB32_COMPAT, +#endif ANY, A_8, RGB_565, @@ -1464,6 +1643,7 @@ namespace Cogl { EGL } #endif +#if !HAS_MUTTER51 #if HAS_MUTTER48 [CCode (cheader_filename = "cogl/cogl.h", cprefix = "COGL_SHADER_TYPE_", type_id = "cogl_shader_type_get_type ()")] #else @@ -1473,6 +1653,7 @@ namespace Cogl { VERTEX, FRAGMENT } +#endif [CCode (cheader_filename = "cogl/cogl.h", cprefix = "COGL_SNIPPET_HOOK_", has_type_id = false)] public enum SnippetHook { VERTEX, @@ -1560,7 +1741,11 @@ namespace Cogl { SWAP_REGION_SYNCHRONIZED, #endif BUFFER_AGE, +#if HAS_MUTTER51 + SYNC_FD, +#else SYNC_AND_COMPLETE_EVENT, +#endif N_FEATURES } #if !HAS_MUTTER50 @@ -1623,8 +1808,15 @@ namespace Cogl { [CCode (cheader_filename = "cogl/cogl.h", cprefix = "COGL_SYSTEM_ERROR_", has_type_id = false)] #endif public errordomain SystemError { +#if HAS_MUTTER51 + [CCode (cname = "COGL_SYSTEM_ERROR_UNSUPPORTED")] + COGL_SYSTEM_ERROR_UNSUPPORTED, + [CCode (cname = "COGL_SYSTEM_ERROR_NO_MEMORY")] + COGL_SYSTEM_ERROR_NO_MEMORY +#else UNSUPPORTED, NO_MEMORY +#endif } [CCode (cheader_filename = "cogl/cogl.h", cprefix = "COGL_TEXTURE_ERROR_", has_type_id = false)] public errordomain TextureError { @@ -1679,6 +1871,10 @@ namespace Cogl { #if HAS_MUTTER50 [CCode (cheader_filename = "cogl/cogl.h")] public static bool can_blit_between_formats (Cogl.PixelFormat src_format, Cogl.PixelFormat dst_format); +#if HAS_MUTTER51 + [CCode (cheader_filename = "cogl/cogl.h")] + public static bool check_extension (string name, string ext); +#endif [CCode (cheader_filename = "cogl/cogl.h")] [Version (replacement = "Color.from_string")] public static bool color_from_string (out Cogl.Color color, string str); diff --git a/vapi/mutter-cogl-51.deps b/vapi/mutter-cogl-51.deps new file mode 100644 index 00000000..35fbfd0a --- /dev/null +++ b/vapi/mutter-cogl-51.deps @@ -0,0 +1,5 @@ +pango +glib-2.0 +gio-2.0 +mutter-mtk-51 +x11 diff --git a/vapi/mutter-cogl-51.vapi b/vapi/mutter-cogl-51.vapi new file mode 120000 index 00000000..dca44a1c --- /dev/null +++ b/vapi/mutter-cogl-51.vapi @@ -0,0 +1 @@ +mutter-cogl-17.vapi \ No newline at end of file diff --git a/vapi/mutter-mtk-14.vapi b/vapi/mutter-mtk-14.vapi index 2ae3a298..cf0a0a17 100644 --- a/vapi/mutter-mtk-14.vapi +++ b/vapi/mutter-mtk-14.vapi @@ -170,6 +170,16 @@ namespace Mtk { #if HAS_MUTTER50 [CCode (cheader_filename = "mtk/mtk.h")] public static int64 find_nearest_interval_boundary (int64 boundary_us, int64 base_us, int64 interval_us); +#endif +#if HAS_MUTTER51 + [CCode (cheader_filename = "mtk/mtk.h")] + public static uint idle_add (GLib.SourceFunc function); + [CCode (cheader_filename = "mtk/mtk.h")] + public static uint idle_add_full (int priority, owned GLib.SourceFunc function); + [CCode (cheader_filename = "mtk/mtk.h")] + public static uint idle_add_once (GLib.SourceOnceFunc function); + [CCode (cheader_filename = "mtk/mtk.h")] + public static bool is_fd_readable (int fd); #endif [CCode (cheader_filename = "mtk/mtk.h")] [Version (replacement = "Rectangle.from_graphene_rect")] @@ -183,6 +193,24 @@ namespace Mtk { [CCode (cheader_filename = "mtk/mtk.h")] [Version (replacement = "Region.create_rectangles")] public static Mtk.Region region_create_rectangles (Mtk.Rectangle rects, int n_rects); +#if HAS_MUTTER51 + [CCode (cheader_filename = "mtk/mtk.h")] + public static bool source_remove (uint tag); + [CCode (cheader_filename = "mtk/mtk.h")] + public static void source_set_name_by_id (uint tag, string name); + [CCode (cheader_filename = "mtk/mtk.h")] + public static uint timeout_add (uint interval, GLib.SourceFunc function); + [CCode (cheader_filename = "mtk/mtk.h")] + public static uint timeout_add_full (int priority, uint interval, owned GLib.SourceFunc function); + [CCode (cheader_filename = "mtk/mtk.h")] + public static uint timeout_add_once (uint interval, GLib.SourceOnceFunc function); + [CCode (cheader_filename = "mtk/mtk.h")] + public static uint timeout_add_seconds (uint interval, GLib.SourceFunc function); + [CCode (cheader_filename = "mtk/mtk.h")] + public static uint timeout_add_seconds_full (int priority, uint interval, owned GLib.SourceFunc function); + [CCode (cheader_filename = "mtk/mtk.h")] + public static uint timeout_add_seconds_once (uint interval, GLib.SourceOnceFunc function); +#endif [CCode (cheader_filename = "mtk/mtk.h")] public static void x11_errors_deinit (); } diff --git a/vapi/mutter-mtk-51.vapi b/vapi/mutter-mtk-51.vapi new file mode 120000 index 00000000..efd075ab --- /dev/null +++ b/vapi/mutter-mtk-51.vapi @@ -0,0 +1 @@ +mutter-mtk-17.vapi \ No newline at end of file diff --git a/wingpanel-interface/FocusManager.vala b/wingpanel-interface/FocusManager.vala index 124279b1..8ce7a0ff 100644 --- a/wingpanel-interface/FocusManager.vala +++ b/wingpanel-interface/FocusManager.vala @@ -129,14 +129,22 @@ public class WingpanelInterface.FocusManager : Object { var dx = start_x - current_x; var dy = start_y - current_y; +#if HAS_MUTTER51 + var drag_threshold = Main.wm.stage.get_context ().get_settings ().dnd_drag_threshold; +#else var drag_threshold = Clutter.Settings.get_default ().dnd_drag_threshold; +#endif if (dx * dx + dy * dy < drag_threshold * drag_threshold) { return Clutter.EVENT_PROPAGATE; } #if HAS_MUTTER49 window.begin_grab_op ( Meta.GrabOp.MOVING, +#if HAS_MUTTER51 + Main.wm.stage.get_context ().get_backend ().get_sprite (Main.wm.stage, event), +#else Clutter.get_default_backend ().get_sprite (Main.wm.stage, event), +#endif event.get_time (), { x, y } ); diff --git a/wingpanel-interface/meson.build b/wingpanel-interface/meson.build index 9eb31806..e0c3c6b4 100644 --- a/wingpanel-interface/meson.build +++ b/wingpanel-interface/meson.build @@ -60,6 +60,17 @@ if mutter50_dep.found() vala_flags = ['--define', 'HAS_MUTTER47', '--define', 'HAS_MUTTER48', '--define', 'HAS_MUTTER49', '--define', 'HAS_MUTTER50'] endif +mutter51_dep = dependency('libmutter-51', version: ['>= 51', '< 52'], required: false) +if mutter51_dep.found() + libmutter_dep = dependency('libmutter-51', version: '>= 51') + mutter_dep = [ + libmutter_dep, + dependency('mutter-mtk-51'), dependency('mutter-cogl-51'), + dependency('mutter-clutter-51') + ] + vala_flags = ['--define', 'HAS_MUTTER43', '--define', 'HAS_MUTTER44', '--define', 'HAS_MUTTER45', '--define', 'HAS_MUTTER46', '--define', 'HAS_MUTTER47', '--define', 'HAS_MUTTER48', '--define', 'HAS_MUTTER49', '--define', 'HAS_MUTTER50', '--define', 'HAS_MUTTER51'] +endif + if mutter_dep.length() == 0 error ('No supported mutter library found!') endif