diff --git a/meson.build b/meson.build index 8d747a069..d897df945 100644 --- a/meson.build +++ b/meson.build @@ -141,6 +141,17 @@ if mutter48_dep.found() vala_flags = ['--define', 'HAS_MUTTER43', '--define', 'HAS_MUTTER44', '--define', 'HAS_MUTTER45', '--define', 'HAS_MUTTER46', '--define', 'HAS_MUTTER47', '--define', 'HAS_MUTTER48'] endif +mutter49_dep = dependency('libmutter-17', version: ['>= 49', '< 50'], required: false) +if mutter49_dep.found() + libmutter_dep = dependency('libmutter-17', version: '>= 49') + mutter_dep = [ + libmutter_dep, + dependency('mutter-mtk-17'), dependency('mutter-cogl-17'), + dependency('mutter-clutter-17') + ] + vala_flags = ['--define', 'HAS_MUTTER43', '--define', 'HAS_MUTTER44', '--define', 'HAS_MUTTER45', '--define', 'HAS_MUTTER46', '--define', 'HAS_MUTTER47', '--define', 'HAS_MUTTER48', '--define', 'HAS_MUTTER49'] +endif + if mutter_dep.length() == 0 error ('No supported mutter library found!') endif diff --git a/src/DaemonManager.vala b/src/DaemonManager.vala index bd10cdb9b..7303efca3 100644 --- a/src/DaemonManager.vala +++ b/src/DaemonManager.vala @@ -62,7 +62,9 @@ public class Gala.DaemonManager : GLib.Object { break; case "MODAL": -#if HAS_MUTTER46 +#if HAS_MUTTER49 + window.set_type (Meta.WindowType.DOCK); +#elif HAS_MUTTER46 client.wayland_client.make_dock (window); #endif window.move_frame (false, 0, 0); diff --git a/src/DesktopIntegration.vala b/src/DesktopIntegration.vala index b70b44fb7..a186b2928 100644 --- a/src/DesktopIntegration.vala +++ b/src/DesktopIntegration.vala @@ -203,7 +203,11 @@ public class Gala.DesktopIntegration : GLib.Object { wm.get_display ().get_sound_player ().play_from_theme ("bell", _("Window has already focus"), null); +#if HAS_MUTTER49 + if (window.is_maximized ()) { +#else if (window.get_maximized () == BOTH) { +#endif notifying = false; return; } diff --git a/src/KeyboardManager.vala b/src/KeyboardManager.vala index c8b7f4be6..c73414868 100644 --- a/src/KeyboardManager.vala +++ b/src/KeyboardManager.vala @@ -14,6 +14,9 @@ public class Gala.KeyboardManager : Object { public Meta.Display display { construct; private get; } private GLib.Settings settings; +#if HAS_MUTTER49 + private GLib.Cancellable? cancellable = null; +#endif public KeyboardManager (Meta.Display display) { Object (display: display); @@ -104,13 +107,49 @@ public class Gala.KeyboardManager : Object { var variant = string.joinv (",", variants); var options = string.joinv (",", xkb_options); -#if HAS_MUTTER46 +#if HAS_MUTTER49 + if (cancellable != null) { + cancellable.cancel (); + cancellable = new GLib.Cancellable (); + } + + backend.set_keymap_async.begin (layout, variant, options, settings.get_string ("xkb-model"), cancellable, (obj, res) => { + try { + ((Meta.Backend) obj).set_keymap_async.end (res); + } catch (Error e) { + if (e is GLib.IOError.CANCELLED) { + // ignore + } else { + cancellable = null; + } + } + }); +#elif HAS_MUTTER46 backend.set_keymap (layout, variant, options, settings.get_string ("xkb-model")); #else backend.set_keymap (layout, variant, options); #endif } else if (key == "current") { +#if HAS_MUTTER49 + if (cancellable != null) { + cancellable.cancel (); + cancellable = new GLib.Cancellable (); + } + + backend.set_keymap_layout_group_async.begin (settings.get_uint ("current"), cancellable, (obj, res) => { + try { + ((Meta.Backend) obj).set_keymap_layout_group_async.end (res); + } catch (Error e) { + if (e is GLib.IOError.CANCELLED) { + // ignore + } else { + cancellable = null; + } + } + }); +#else backend.lock_layout_group (settings.get_uint ("current")); +#endif } } } diff --git a/src/ShellClients/HideTracker.vala b/src/ShellClients/HideTracker.vala index 233deaaa7..90dc2b809 100644 --- a/src/ShellClients/HideTracker.vala +++ b/src/ShellClients/HideTracker.vala @@ -183,7 +183,7 @@ public class Gala.HideTracker : Object { } focus_overlap = true; - focus_maximized_overlap = VERTICAL in window.get_maximized (); + focus_maximized_overlap = window.maximized_vertically; } update_hidden (); diff --git a/src/ShellClients/ManagedClient.vala b/src/ShellClients/ManagedClient.vala index 8e9d2dfce..caa4c88d2 100644 --- a/src/ShellClients/ManagedClient.vala +++ b/src/ShellClients/ManagedClient.vala @@ -50,8 +50,13 @@ public class Gala.ManagedClient : Object { private async void start_wayland () { var subprocess_launcher = new GLib.SubprocessLauncher (INHERIT_FDS); try { +#if HAS_MUTTER49 + wayland_client = new Meta.WaylandClient.subprocess (display.get_context (), subprocess_launcher, args); + subprocess = wayland_client.get_subprocess (); +#else wayland_client = new Meta.WaylandClient (display.get_context (), subprocess_launcher); subprocess = wayland_client.spawnv (display, args); +#endif yield subprocess.wait_async (); diff --git a/src/ShellClients/NotificationsClient.vala b/src/ShellClients/NotificationsClient.vala index 173d16446..573bce0a2 100644 --- a/src/ShellClients/NotificationsClient.vala +++ b/src/ShellClients/NotificationsClient.vala @@ -21,7 +21,9 @@ public class Gala.NotificationsClient : Object { window.set_data (NOTIFICATION_DATA_KEY, true); window.make_above (); window.stick (); -#if HAS_MUTTER46 +#if HAS_MUTTER49 + window.set_type (Meta.WindowType.DOCK); +#elif HAS_MUTTER46 client.wayland_client.make_dock (window); #endif }); diff --git a/src/ShellClients/ShellClientsManager.vala b/src/ShellClients/ShellClientsManager.vala index 61daa1a1f..b18691cf0 100644 --- a/src/ShellClients/ShellClientsManager.vala +++ b/src/ShellClients/ShellClientsManager.vala @@ -108,13 +108,18 @@ public class Gala.ShellClientsManager : Object, GestureTarget { } public void make_dock (Meta.Window window) { +#if HAS_MUTTER49 + window.set_type (Meta.WindowType.DOCK); +#else if (Meta.Util.is_wayland_compositor ()) { make_dock_wayland (window); } else { make_dock_x11 (window); } +#endif } +#if !HAS_MUTTER49 private void make_dock_wayland (Meta.Window window) requires (Meta.Util.is_wayland_compositor ()) { foreach (var client in protocol_clients) { if (client.wayland_client.owns_window (window)) { @@ -144,6 +149,7 @@ public class Gala.ShellClientsManager : Object, GestureTarget { // 0 means replace xdisplay.change_property (x_window, atom, (X.Atom) 4, 32, 0, (uchar[]) dock_atom, 1); } +#endif public void set_anchor (Meta.Window window, Pantheon.Desktop.Anchor anchor) { if (window in panel_windows) { diff --git a/src/Widgets/SessionLocker.vala b/src/Widgets/SessionLocker.vala index 1e3dcedd7..37796d1b6 100644 --- a/src/Widgets/SessionLocker.vala +++ b/src/Widgets/SessionLocker.vala @@ -330,7 +330,11 @@ public class Gala.SessionLocker : Clutter.Actor { #else unowned var tracker = wm.get_display ().get_cursor_tracker (); #endif +#if HAS_MUTTER49 + tracker.inhibit_cursor_visibility (); +#else tracker.set_pointer_visible (false); +#endif visible = true; grab_key_focus (); modal_proxy = wm.push_modal (this, true); @@ -398,7 +402,11 @@ public class Gala.SessionLocker : Clutter.Actor { #else unowned var tracker = wm.get_display ().get_cursor_tracker (); #endif +#if HAS_MUTTER49 + tracker.uninhibit_cursor_visibility (); +#else tracker.set_pointer_visible (true); +#endif visible = false; activation_time = 0; diff --git a/src/WindowManager.vala b/src/WindowManager.vala index 4d7b4b3ab..0ab8e0968 100644 --- a/src/WindowManager.vala +++ b/src/WindowManager.vala @@ -767,11 +767,19 @@ namespace Gala { if (current == null || current.window_type != Meta.WindowType.NORMAL || !current.can_maximize ()) break; +#if HAS_MUTTER49 + if (current.is_maximized ()) { + current.unmaximize (); + } else { + current.maximize (); + } +#else var maximize_flags = current.get_maximized (); if (Meta.MaximizeFlags.VERTICAL in maximize_flags || Meta.MaximizeFlags.HORIZONTAL in maximize_flags) current.unmaximize (Meta.MaximizeFlags.HORIZONTAL | Meta.MaximizeFlags.VERTICAL); else current.maximize (Meta.MaximizeFlags.HORIZONTAL | Meta.MaximizeFlags.VERTICAL); +#endif break; case ActionType.HIDE_CURRENT: if (current != null && current.window_type == Meta.WindowType.NORMAL) @@ -887,6 +895,13 @@ namespace Gala { if (window.can_maximize ()) flags |= WindowFlags.CAN_MAXIMIZE; +#if HAS_MUTTER49 + if (window.is_maximized ()) + flags |= WindowFlags.IS_MAXIMIZED; + + if (window.maximized_vertically && !window.maximized_horizontally) + flags |= WindowFlags.IS_TILED; +#else var maximize_flags = window.get_maximized (); if (maximize_flags > 0) { flags |= WindowFlags.IS_MAXIMIZED; @@ -895,6 +910,7 @@ namespace Gala { flags |= WindowFlags.IS_TILED; } } +#endif if (window.allows_move ()) flags |= WindowFlags.ALLOWS_MOVE; diff --git a/vapi/Clutter-17.metadata b/vapi/Clutter-17.metadata new file mode 100644 index 000000000..4b7be62e7 --- /dev/null +++ b/vapi/Clutter-17.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 + +// 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" + +Focus skip +KeyFocus skip +Sprite skip + +// 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-17-custom.vala b/vapi/Cogl-17-custom.vala new file mode 100644 index 000000000..90d46b330 --- /dev/null +++ b/vapi/Cogl-17-custom.vala @@ -0,0 +1,66 @@ +namespace Cogl { + 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 = {}; + if (color.init_from_string (str)) + return color; + + return null; + } + } + [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-17.metadata b/vapi/Cogl-17.metadata new file mode 100644 index 000000000..ac4447133 --- /dev/null +++ b/vapi/Cogl-17.metadata @@ -0,0 +1,42 @@ +* 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" + +Context.free_timestamp_query.query owned + +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[]" + +Texture2D + .new_from_data skip=false + +Texture.error_quark parent="Cogl.TextureError" name="quark" + +RendererError errordomain +SystemError errordomain +TextureError errordomain +FramebufferError errordomain +ScanoutError errordomain + +Onscreen + .add_frame_callback unowned + +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-17.metadata b/vapi/Meta-17.metadata new file mode 100644 index 000000000..fd6ca63e3 --- /dev/null +++ b/vapi/Meta-17.metadata @@ -0,0 +1,193 @@ +* 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" +CompositorType cheader_filename="meta/meta-enums.h" +Cursor cheader_filename="meta/common.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" +MultiTextureAlphaMode.n_meta_multi_texture_alpha_modes name="N_MODES" +MultiTextureAlphaMode.meta_multi_texture_alpha_mode_* name="meta_multi_texture_alpha_mode_(.+)" +MultiTextureAlphaMode cheader_filename="meta/meta-multi-texture-format.h" cprefix="META_MULTI_TEXTURE_ALPHA_MODE_" +MultiTextureCoefficients.n_meta_multi_texture_coefficients name="N_COEFFICIENTS" +MultiTextureCoefficients.meta_multi_texture_coefficients_* name="meta_multi_texture_coefficients_(.+)" +MultiTextureCoefficients cheader_filename="meta/meta-multi-texture-format.h" cprefix="META_MULTI_TEXTURE_COEFFICIENTS_" +MultiTextureFormat.n_meta_multi_texture_formats name="N_FORMATS" +MultiTextureFormat.meta_multi_texture_format_* name="meta_multi_texture_format_(.+)" +MultiTextureFormat cheader_filename="meta/meta-multi-texture-format.h" cprefix="META_MULTI_TEXTURE_FORMAT_" +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 +X11Display.set_stage_input_region.rects type="X.Xrectangle[]" array_length_idx=1 + +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" + +// MetaXEvent is a shadow type of X.Event +Plugin.xevent_filter.event type="X.Event" + +_Monitor skip + +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" +is_wayland_compositor 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-17.metadata b/vapi/Mtk-17.metadata new file mode 100644 index 000000000..f804d1bc0 --- /dev/null +++ b/vapi/Mtk-17.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-17.deps b/vapi/libmutter-17.deps new file mode 120000 index 000000000..7855258cf --- /dev/null +++ b/vapi/libmutter-17.deps @@ -0,0 +1 @@ +libmutter-16.deps \ No newline at end of file diff --git a/vapi/libmutter-17.vapi b/vapi/libmutter-17.vapi new file mode 120000 index 000000000..76cd538e2 --- /dev/null +++ b/vapi/libmutter-17.vapi @@ -0,0 +1 @@ +libmutter-16.vapi \ No newline at end of file diff --git a/vapi/libmutter.vapi b/vapi/libmutter.vapi index 302b780f7..967dd1613 100644 --- a/vapi/libmutter.vapi +++ b/vapi/libmutter.vapi @@ -132,6 +132,9 @@ namespace Meta { public Meta.BackendCapabilities get_capabilities (); public unowned Meta.Context get_context (); public unowned Meta.IdleMonitor get_core_idle_monitor (); +#if HAS_MUTTER49 + public unowned Meta.LogicalMonitor? get_current_logical_monitor (); +#endif #if HAS_MUTTER48 public unowned Meta.CursorTracker get_cursor_tracker (); #endif @@ -145,12 +148,19 @@ namespace Meta { public unowned Clutter.Actor get_stage (); public bool is_headless (); public bool is_rendering_hardware_accelerated (); +#if !HAS_MUTTER49 public void lock_layout_group (uint idx); +#endif #if HAS_MUTTER48 public void renderdoc_capture (); #endif #if HAS_MUTTER46 +#if HAS_MUTTER49 + public async bool set_keymap_async (string layouts, string variants, string options, string model, GLib.Cancellable? cancellable) throws GLib.Error; + public async bool set_keymap_layout_group_async (uint32 idx, GLib.Cancellable? cancellable) throws GLib.Error; +#else public void set_keymap (string layouts, string variants, string options, string model); +#endif public void unfreeze_keyboard (uint32 timestamp); public void ungrab_keyboard (uint32 timestamp); #else @@ -260,6 +270,25 @@ namespace Meta { public Meta.BackgroundImage load (GLib.File file); public void purge (GLib.File file); } +#if HAS_MUTTER49 + [CCode (cheader_filename = "meta/main.h", type_id = "meta_backlight_get_type ()")] + public abstract class Backlight : GLib.Object { + [CCode (has_construct_function = false)] + protected Backlight (); + public int get_brightness (); + public void get_brightness_info (out int brightness_min_out, out int brightness_max_out); + public void set_brightness (int brightness); + [NoAccessorMethod] + public Meta.Backend backend { owned get; construct; } + public int brightness { get; set; } + [NoAccessorMethod] + public int brightness_max { get; construct; } + [NoAccessorMethod] + public int brightness_min { get; construct; } + [NoAccessorMethod] + public string name { owned get; construct; } + } +#endif [CCode (cheader_filename = "meta/barrier.h", type_id = "meta_barrier_get_type ()")] public class Barrier : GLib.Object, GLib.Initable { [CCode (has_construct_function = false)] @@ -373,7 +402,12 @@ namespace Meta { public bool get_pointer_visible (); public float get_scale (); public unowned Cogl.Texture? get_sprite (); +#if HAS_MUTTER49 + public void inhibit_cursor_visibility (); + public void uninhibit_cursor_visibility (); +#else public void set_pointer_visible (bool visible); +#endif [NoAccessorMethod] public Meta.Backend backend { owned get; construct; } public signal void cursor_changed (); @@ -598,6 +632,30 @@ namespace Meta { [NoAccessorMethod] public Meta.Workspace workspace { owned get; set; } } +#if HAS_MUTTER49 + [CCode (cheader_filename = "meta/main.h", type_id = "meta_logical_monitor_get_type ()")] + public class LogicalMonitor : GLib.Object { + [CCode (has_construct_function = false)] + protected LogicalMonitor (); + public unowned GLib.List get_monitors (); + public int get_number (); + } + [CCode (cheader_filename = "meta/main.h", type_id = "meta_monitor_get_type ()")] + public class Monitor : GLib.Object { + [CCode (has_construct_function = false)] + protected Monitor (); + public unowned Meta.Backlight? get_backlight (); + 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 (); + public bool is_builtin (); + public bool is_primary (); + public bool is_virtual (); + } +#endif [CCode (cheader_filename = "meta/meta-monitor-manager.h", type_id = "meta_monitor_manager_get_type ()")] public class MonitorManager : GLib.Object { [CCode (has_construct_function = false)] @@ -605,7 +663,13 @@ namespace Meta { public bool can_switch_config (); public int get_display_configuration_timeout (); public bool get_is_builtin_display_on (); +#if HAS_MUTTER49 + public unowned GLib.List? get_logical_monitors (); +#endif public int get_monitor_for_connector (string connector); +#if HAS_MUTTER49 + public unowned GLib.List? get_monitors (); +#endif public bool get_panel_orientation_managed (); public Meta.MonitorSwitchConfigType get_switch_config (); public void switch_config (Meta.MonitorSwitchConfigType config_type); @@ -623,12 +687,18 @@ namespace Meta { public signal void confirm_display_change (); public signal void monitors_changed (); public signal void monitors_changed_internal (); +#if HAS_MUTTER49 + public signal void monitors_changing (); +#endif public signal void power_save_mode_changed (Meta.PowerSaveChangeReason object); } [CCode (cheader_filename = "meta/meta-multi-texture.h", type_id = "meta_multi_texture_get_type ()")] public class MultiTexture : GLib.Object { [CCode (has_construct_function = false)] public MultiTexture (Meta.MultiTextureFormat format, owned Cogl.Texture planes, int n_planes); +#if HAS_MUTTER49 + public void add_pipeline_sampling (Meta.MultiTextureCoefficients coeffs, Meta.MultiTextureAlphaMode premult, Cogl.Pipeline pipeline); +#endif public Meta.MultiTextureFormat get_format (); public int get_height (); public int get_n_planes (); @@ -712,7 +782,10 @@ namespace Meta { [NoWrapper] public virtual bool xevent_filter ([CCode (type = "XEvent*")] ref X.Event event); #endif -#if HAS_MUTTER48 +#if HAS_MUTTER49 + [NoWrapper] + public virtual bool xevent_filter ([CCode (type = "MetaXEvent*")] X.Event event); +#elif HAS_MUTTER48 [NoWrapper] public virtual bool xevent_filter (X.Event event); #endif @@ -864,16 +937,26 @@ namespace Meta { [CCode (cheader_filename = "meta/meta-wayland-client.h", type_id = "meta_wayland_client_get_type ()")] public sealed class WaylandClient : GLib.Object { [CCode (has_construct_function = false)] +#if HAS_MUTTER49 + protected WaylandClient (); + public unowned GLib.Subprocess get_subprocess (); +#else public WaylandClient (Meta.Context context, GLib.SubprocessLauncher launcher) throws GLib.Error; public void hide_from_window_list (Meta.Window window); public void make_desktop (Meta.Window window); #if HAS_MUTTER46 public void make_dock (Meta.Window window); +#endif #endif public bool owns_window (Meta.Window window); +#if HAS_MUTTER49 + [CCode (has_construct_function = false)] + public WaylandClient.subprocess (Meta.Context context, GLib.SubprocessLauncher launcher, [CCode (array_length = false, array_null_terminated = true)] string[] argv) throws GLib.Error; +#else public void show_in_window_list (Meta.Window window); public GLib.Subprocess spawn (Meta.Display display, GLib.Error? error, string argv0, ...); public GLib.Subprocess spawnv (Meta.Display display, [CCode (array_length = false, array_null_terminated = true)] string[] argv) throws GLib.Error; +#endif public signal void client_destroyed (); } [CCode (cheader_filename = "meta/meta-wayland-compositor.h", type_id = "meta_wayland_compositor_get_type ()")] @@ -965,7 +1048,9 @@ namespace Meta { public bool get_icon_geometry (out Mtk.Rectangle rect); public uint64 get_id (); public Meta.StackLayer get_layer (); +#if !HAS_MUTTER49 public Meta.MaximizeFlags get_maximized (); +#endif public int get_monitor (); public unowned string? get_mutter_hints (); #if VALA_0_56_17 @@ -977,6 +1062,9 @@ namespace Meta { public unowned string? get_sandboxed_app_id (); public uint get_stable_sequence (); public unowned string? get_startup_id (); +#if HAS_MUTTER49 + public unowned string? get_tag (); +#endif public unowned Meta.Window? get_tile_match (); public unowned string get_title (); public unowned Meta.Window? get_transient_for (); @@ -995,6 +1083,9 @@ namespace Meta { public bool has_attached_dialogs (); public bool has_focus (); public bool has_pointer (); +#if HAS_MUTTER49 + public void hide_from_window_list (); +#endif public bool is_above (); public bool is_always_on_all_workspaces (); public bool is_ancestor_of_transient (Meta.Window transient); @@ -1004,6 +1095,9 @@ namespace Meta { #endif public bool is_fullscreen (); public bool is_hidden (); +#if HAS_MUTTER49 + public bool is_maximized (); +#endif public bool is_monitor_sized (); public bool is_on_all_workspaces (); public bool is_on_primary_monitor (); @@ -1017,7 +1111,11 @@ namespace Meta { public void lower_with_transients (uint32 timestamp); public void make_above (); public void make_fullscreen (); +#if HAS_MUTTER49 + public void maximize (); +#else public void maximize (Meta.MaximizeFlags directions); +#endif public void minimize (); public void move_frame (bool user_op, int root_x_nw, int root_y_nw); public void move_resize_frame (bool user_op, int root_x_nw, int root_y_nw, int w, int h); @@ -1034,6 +1132,10 @@ namespace Meta { public void set_compositor_private (GLib.Object priv); public void set_demands_attention (); public void set_icon_geometry (Mtk.Rectangle? rect); +#if HAS_MUTTER49 + public void set_type (Meta.WindowType type); + public void show_in_window_list (); +#endif #if !HAS_MUTTER47 public void shove_titlebar_onscreen (); #endif @@ -1050,7 +1152,11 @@ namespace Meta { #endif public void unmake_above (); public void unmake_fullscreen (); +#if HAS_MUTTER49 + public void unmaximize (); +#else public void unmaximize (Meta.MaximizeFlags directions); +#endif public void unminimize (); public void unset_demands_attention (); public void unstick (); @@ -1106,6 +1212,9 @@ namespace Meta { public bool resizeable { get; } [NoAccessorMethod] public bool skip_taskbar { get; } +#if HAS_MUTTER49 + public string tag { get; } +#endif public string title { get; } [NoAccessorMethod] public bool urgent { get; } @@ -1797,6 +1906,35 @@ namespace Meta { DOWN_LEFT, DOWN_RIGHT } +#if HAS_MUTTER49 + [CCode (cheader_filename = "meta/meta-multi-texture-format.h", cprefix = "META_MULTI_TEXTURE_ALPHA_MODE_", type_id = "meta_multi_texture_alpha_mode_get_type ()")] + public enum MultiTextureAlphaMode { + NONE, + PREMULT_ELECTRICAL, + STRAIGHT, + [CCode (cname = "N_META_MULTI_TEXTURE_ALPHA_MODES")] + N_MODES + } + [CCode (cheader_filename = "meta/main.h", cprefix = "META_MULTI_TEXTURE_CHROMA_LOC_", type_id = "meta_multi_texture_chroma_loc_get_type ()")] + public enum MultiTextureChromaLoc { + NONE, + DEFINED + } + [CCode (cheader_filename = "meta/meta-multi-texture-format.h", cprefix = "META_MULTI_TEXTURE_COEFFICIENTS_", type_id = "meta_multi_texture_coefficients_get_type ()")] + public enum MultiTextureCoefficients { + NONE, + IDENTITY_FULL, + IDENTITY_LIMITED, + BT709_FULL, + BT709_LIMITED, + BT601_FULL, + BT601_LIMITED, + BT2020_FULL, + BT2020_LIMITED, + [CCode (cname = "N_META_MULTI_TEXTURE_COEFFICIENTS")] + N_COEFFICIENTS + } +#endif [CCode (cheader_filename = "meta/meta-multi-texture-format.h", cprefix = "META_MULTI_TEXTURE_FORMAT_", type_id = "meta_multi_texture_format_get_type ()")] public enum MultiTextureFormat { INVALID, @@ -1805,6 +1943,21 @@ namespace Meta { NV12, #if HAS_MUTTER46 P010, +#endif +#if HAS_MUTTER49 + YUV422, + YUV444, + S010, + S210, + S410, + S012, + S212, + S412, + S016, + S216, + S416, + [CCode (cname = "N_META_MULTI_TEXTURE_FORMATS")] + N_FORMATS, #endif YUV420 } @@ -1829,6 +1982,9 @@ namespace Meta { [CCode (cheader_filename = "meta/display.h", cprefix = "META_PAD_FEATURE_", type_id = "meta_pad_feature_type_get_type ()")] public enum PadFeatureType { RING, +#if HAS_MUTTER49 + DIAL, +#endif STRIP } [CCode (cheader_filename = "meta/meta-monitor-manager.h", cprefix = "META_POWER_SAVE_CHANGE_REASON_", type_id = "meta_power_save_change_reason_get_type ()")] @@ -1902,8 +2058,8 @@ namespace Meta { MAXIMIZE, UNMAXIMIZE, FULLSCREEN, - MONITOR_MOVE, - UNFULLSCREEN + UNFULLSCREEN, + MONITOR_MOVE } [CCode (cheader_filename = "meta/common.h", cprefix = "META_LAYER_", type_id = "meta_stack_layer_get_type ()")] public enum StackLayer { diff --git a/vapi/meson.build b/vapi/meson.build index dd3df5a79..408feaec0 100644 --- a/vapi/meson.build +++ b/vapi/meson.build @@ -343,3 +343,74 @@ if mutter48_dep.found() output: 'libmutter-16.vapi' ) endif +if mutter49_dep.found() + mtk_target = custom_target('mutter-mtk-17', + command: [ + vapigen, + mutter_typelib_dir / 'Mtk-17.gir', + '--library=mutter-mtk-17', + '--pkg=gobject-2.0', + '--pkg=gio-2.0', + '--pkg=cairo', + '--pkg=graphene-gobject-1.0', + vapigen_args + ], + output: 'mutter-mtk-17.vapi' + ) + cogl_target = custom_target('mutter-cogl-17', + command: [ + vapigen, + mutter_typelib_dir / 'Cogl-17.gir', + '--library=mutter-cogl-17', + '--pkg=mutter-mtk-17', + '--pkg=gobject-2.0', + '--pkg=gio-2.0', + '--pkg=cairo', + '--pkg=graphene-gobject-1.0', + '--pkg=x11', + vapigen_args, + files('Cogl-17-custom.vala') + ], + depends: mtk_target, + output: 'mutter-cogl-17.vapi' + ) + + clutter_target = custom_target('mutter-clutter-17', + command: [ + vapigen, + mutter_typelib_dir / 'Clutter-17.gir', + '--library=mutter-clutter-17', + '--pkg=graphene-gobject-1.0', + '--pkg=mutter-mtk-17', + '--pkg=mutter-cogl-17', + '--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-17.vapi' + ) + + libmutter_target = custom_target('libmutter-17', + command: [ + vapigen, + mutter_typelib_dir / 'Meta-17.gir', + '--library=libmutter-17', + '--pkg=graphene-gobject-1.0', + '--pkg=mutter-cogl-17', + '--pkg=mutter-clutter-17', + '--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-17.vapi' + ) +endif diff --git a/vapi/mutter-clutter-17.deps b/vapi/mutter-clutter-17.deps new file mode 100644 index 000000000..449ef8007 --- /dev/null +++ b/vapi/mutter-clutter-17.deps @@ -0,0 +1,6 @@ +atk +cairo +pango +json-glib-1.0 +mutter-cogl-17 +graphene-gobject-1.0 diff --git a/vapi/mutter-clutter-17.vapi b/vapi/mutter-clutter-17.vapi new file mode 120000 index 000000000..09552d93b --- /dev/null +++ b/vapi/mutter-clutter-17.vapi @@ -0,0 +1 @@ +mutter-clutter-16.vapi \ No newline at end of file diff --git a/vapi/mutter-clutter.vapi b/vapi/mutter-clutter.vapi index 046c1ee4c..b87669553 100644 --- a/vapi/mutter-clutter.vapi +++ b/vapi/mutter-clutter.vapi @@ -5876,7 +5876,17 @@ namespace Clutter { #endif public void add_pipeline_transform (Clutter.ColorState target_color_state, Cogl.Pipeline pipeline); #if HAS_MUTTER48 - public virtual void do_transform (Clutter.ColorState target_color_state, float input, float output, int n_samples); +#if HAS_MUTTER49 + [NoWrapper] + public virtual void append_transform_snippet (Clutter.ColorState target_color_state, GLib.StringBuilder snippet_globals, GLib.StringBuilder snippet_source, string snippet_color_var); + public void do_transform (Clutter.ColorState target_color_state, [CCode (array_length = false)] float[] data, int n_samples); + [NoWrapper] + public virtual void do_transform_from_XYZ ([CCode (array_length = false)] float[] data, int n_samples); + [NoWrapper] + 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, [CCode (array_length = false)] float[] input, [CCode (array_length = false)] float[] output, int n_samples); +#endif public virtual bool equals (Clutter.ColorState other_color_state); public virtual Clutter.ColorState get_blending (bool force); #else @@ -5896,6 +5906,9 @@ namespace Clutter { #if HAS_MUTTER48 [NoWrapper] public virtual void init_color_transform_key (Clutter.ColorState target_color_state, Clutter.ColorTransformKey key); +#if HAS_MUTTER49 + public void params_do_tone_mapping (Clutter.ColorState other_color_state, [CCode (array_length = false)] float[] data, int n_samples); +#endif public virtual Clutter.EncodingRequiredFormat required_format (); public virtual string to_string (); public virtual void update_uniforms (Clutter.ColorState target_color_state, Cogl.Pipeline pipeline); @@ -5924,11 +5937,23 @@ namespace Clutter { #endif #endif } +#if HAS_MUTTER49 + [CCode (cheader_filename = "clutter/clutter.h", type_id = "clutter_color_state_icc_get_type ()")] + public class ColorStateIcc : Clutter.ColorState { + [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 (); + } +#endif #if HAS_MUTTER48 [CCode (cheader_filename = "clutter/clutter.h", type_id = "clutter_color_state_params_get_type ()")] public class ColorStateParams : Clutter.ColorState { [CCode (has_construct_function = false, type = "ClutterColorState*")] public ColorStateParams (Clutter.Context context, Clutter.Colorspace colorspace, Clutter.TransferFunction transfer_function); +#if HAS_MUTTER49 + [CCode (has_construct_function = false, type = "ClutterColorState*")] + public ColorStateParams.from_cicp (Clutter.Context context, Clutter.Cicp cicp) throws GLib.Error; +#endif [CCode (has_construct_function = false, type = "ClutterColorState*")] public ColorStateParams.from_primitives (Clutter.Context context, Clutter.Colorimetry colorimetry, Clutter.EOTF eotf, Clutter.Luminance luminance); [CCode (has_construct_function = false, type = "ClutterColorState*")] @@ -6100,6 +6125,9 @@ namespace Clutter { public void get_scroll_delta (out double dx, out double dy); public Clutter.ScrollDirection get_scroll_direction (); public Clutter.ScrollFinishFlags get_scroll_finish_flags (); +#if HAS_MUTTER49 + public Clutter.ScrollFlags get_scroll_flags (); +#endif public Clutter.ScrollSource get_scroll_source (); #if !HAS_MUTTER46 public unowned Clutter.Actor get_source (); @@ -6198,7 +6226,13 @@ namespace Clutter { public void add_future_time (int64 when_us); #endif public void add_timeline (Clutter.Timeline timeline); +#if HAS_MUTTER49 + public Clutter.FrameResult dispatch (int64 time_us); +#endif public GLib.StringBuilder get_max_render_time_debug_info (); +#if HAS_MUTTER49 + public int get_priority (); +#endif public float get_refresh_rate (); public void inhibit (); public void notify_ready (); @@ -6209,11 +6243,23 @@ namespace Clutter { #if HAS_MUTTER47 public void set_deadline_evasion (int64 deadline_evasion_us); public void set_mode (Clutter.FrameClockMode mode); +#endif +#if HAS_MUTTER49 + public void set_passive (Clutter.FrameClockDriver driver); #endif public void uninhibit (); [HasEmitter] public signal void destroy (); } +#if HAS_MUTTER49 + [CCode (cheader_filename = "clutter/clutter.h", type_id = "clutter_frame_clock_driver_get_type ()")] + public abstract class FrameClockDriver : GLib.Object { + [CCode (has_construct_function = false)] + protected FrameClockDriver (); + [NoWrapper] + public virtual void schedule_update (); + } +#endif #if HAS_MUTTER47 [CCode (cheader_filename = "clutter/clutter.h", type_id = "clutter_gesture_get_type ()")] public abstract class Gesture : Clutter.Action { @@ -6343,6 +6389,9 @@ namespace Clutter { public class InputDevice : GLib.Object { [CCode (has_construct_function = false)] protected InputDevice (); +#if HAS_MUTTER49 + public uint get_bus_type (); +#endif public Clutter.InputCapabilities get_capabilities (); public Clutter.InputMode get_device_mode (); public unowned string get_device_name (); @@ -6353,30 +6402,54 @@ namespace Clutter { public bool get_has_cursor (); public int get_mode_switch_button_group (uint button); public int get_n_buttons (); +#if HAS_MUTTER49 + public int get_n_dials (); +#endif public int get_n_mode_groups (); public int get_n_rings (); public int get_n_strips (); public virtual int get_pad_feature_group (Clutter.InputDevicePadFeature feature, int n_feature); - +#if HAS_MUTTER49 + public uint get_product_id (); +#else public unowned string get_product_id (); +#endif public unowned Clutter.Seat get_seat (); +#if HAS_MUTTER49 + public uint get_vendor_id (); +#else public unowned string get_vendor_id (); +#endif public virtual bool is_grouped (Clutter.InputDevice other_device); public virtual bool is_mode_switch_button (uint group, uint button); +#if HAS_MUTTER49 + public uint bus_type { get; construct; } +#endif public Clutter.InputCapabilities capabilities { get; construct; } public Clutter.InputMode device_mode { get; construct; } public string device_node { get; construct; } public Clutter.InputDeviceType device_type { get; construct; } public bool has_cursor { get; construct; } public int n_buttons { get; construct; } +#if HAS_MUTTER49 + public int n_dials { get; construct; } +#endif public int n_mode_groups { get; construct; } public int n_rings { get; construct; } public int n_strips { get; construct; } [NoAccessorMethod] public string name { owned get; construct; } +#if HAS_MUTTER49 + public uint product_id { get; construct; } +#else public string product_id { get; construct; } +#endif public Clutter.Seat seat { get; construct; } +#if HAS_MUTTER49 + public uint vendor_id { get; construct; } +#else public string vendor_id { get; construct; } +#endif } [CCode (cheader_filename = "clutter/clutter.h", type_id = "clutter_input_device_tool_get_type ()")] public abstract class InputDeviceTool : GLib.Object { @@ -6632,6 +6705,10 @@ namespace Clutter { } [CCode (cheader_filename = "clutter/clutter.h", has_type_id = false)] [Compact] + public class PadDialEvent : Clutter.Event { + } + [CCode (cheader_filename = "clutter/clutter.h", has_type_id = false)] + [Compact] public class PadRingEvent : Clutter.Event { } [CCode (cheader_filename = "clutter/clutter.h", has_type_id = false)] @@ -7728,6 +7805,15 @@ namespace Clutter { #endif } #endif +#if HAS_MUTTER49 + [CCode (cheader_filename = "clutter/clutter.h", has_type_id = false)] + public struct Cicp { + public Clutter.CicpPrimaries primaries; + public Clutter.CicpTransfer transfer; + public uint8 matrix_coefficients; + public uint8 video_full_range_flag; + } +#endif #if HAS_MUTTER48 [CCode (cheader_filename = "clutter/clutter.h", has_type_id = false)] public struct Colorimetry { @@ -8048,6 +8134,30 @@ namespace Clutter { RELEASED, PRESSED } +#if HAS_MUTTER49 + [CCode (cheader_filename = "clutter/clutter.h", cprefix = "CLUTTER_CICP_PRIMARIES_", type_id = "clutter_cicp_primaries_get_type ()")] + public enum CicpPrimaries { + SRGB, + PAL, + NTSC, + NTSC_2, + BT2020, + P3 + } + [CCode (cheader_filename = "clutter/clutter.h", cprefix = "CLUTTER_CICP_TRANSFER_", type_id = "clutter_cicp_transfer_get_type ()")] + public enum CicpTransfer { + BT709, + GAMMA22, + GAMMA28, + BT601, + LINEAR, + SRGB, + BT2020, + BT2020_2, + PQ, + HLG + } +#endif #if HAS_MUTTER48 [CCode (cheader_filename = "clutter/clutter.h", cprefix = "CLUTTER_COLORIMETRY_TYPE_", type_id = "clutter_colorimetry_type_get_type ()")] public enum ColorimetryType { @@ -8065,6 +8175,10 @@ namespace Clutter { SRGB, #if HAS_MUTTER48 BT2020, +#if HAS_MUTTER49 + PAL, + P3, +#endif NTSC; public unowned Clutter.Primaries? to_primaries (); #else @@ -8239,6 +8353,9 @@ namespace Clutter { [CCode (cheader_filename = "clutter/clutter.h", cprefix = "CLUTTER_FRAME_CLOCK_MODE_", type_id = "clutter_frame_clock_mode_get_type ()")] public enum FrameClockMode { FIXED, +#if HAS_MUTTER49 + PASSIVE, +#endif VARIABLE } #endif @@ -8253,6 +8370,9 @@ namespace Clutter { [CCode (cheader_filename = "clutter/clutter.h", cprefix = "CLUTTER_FRAME_RESULT_", type_id = "clutter_frame_result_get_type ()")] public enum FrameResult { PENDING_PRESENTED, +#if HAS_MUTTER49 + IGNORED, +#endif IDLE } #if HAS_MUTTER47 @@ -8368,6 +8488,9 @@ namespace Clutter { public enum InputDevicePadFeature { BUTTON, RING, +#if HAS_MUTTER49 + DIAL, +#endif STRIP } [CCode (cheader_filename = "clutter/clutter.h", cprefix = "CLUTTER_INPUT_DEVICE_PAD_SOURCE_", type_id = "clutter_input_device_pad_source_get_type ()")] @@ -8602,6 +8725,14 @@ namespace Clutter { HORIZONTAL, VERTICAL } +#if HAS_MUTTER49 + [CCode (cheader_filename = "clutter/clutter.h", cprefix = "CLUTTER_SCROLL_", type_id = "clutter_scroll_flags_get_type ()")] + [Flags] + public enum ScrollFlags { + NONE, + INVERTED + } +#endif #if !HAS_MUTTER47 [CCode (cheader_filename = "clutter/clutter.h", cprefix = "CLUTTER_SCROLL_", type_id = "clutter_scroll_mode_get_type ()")] [Flags] diff --git a/vapi/mutter-cogl-14.vapi b/vapi/mutter-cogl-14.vapi index b35195332..fb26e8571 100644 --- a/vapi/mutter-cogl-14.vapi +++ b/vapi/mutter-cogl-14.vapi @@ -121,6 +121,9 @@ namespace Cogl { #else [CCode (cheader_filename = "cogl/cogl.h", cname = "cogl_foreach_feature")] public void foreach_feature (Cogl.FeatureCallback callback); +#endif +#if HAS_MUTTER49 + public bool format_supports_upload (Cogl.PixelFormat format); #endif public void free_timestamp_query (owned Cogl.TimestampQuery query); public unowned Cogl.Display get_display (); @@ -210,13 +213,21 @@ namespace Cogl { [CCode (has_construct_function = false)] protected FrameInfo (); public int64 get_frame_counter (); +#if !HAS_MUTTER49 public int64 get_global_frame_counter (); +#endif public bool get_is_symbolic (); public int64 get_presentation_time_us (); public float get_refresh_rate (); public int64 get_rendering_duration_ns (); public uint get_sequence (); +#if HAS_MUTTER49 + public int64 get_target_presentation_time_us (); +#endif public int64 get_time_before_buffer_swap_us (); +#if HAS_MUTTER49 + public int64 get_view_frame_counter (); +#endif #if HAS_MUTTER47 public bool has_valid_gpu_rendering_duration (); #endif @@ -613,6 +624,9 @@ namespace Cogl { public bool check_onscreen_template (Cogl.OnscreenTemplate onscreen_template) throws GLib.Error; #endif public bool connect () throws GLib.Error; +#if HAS_MUTTER49 + public void* get_custom_winsys_data (); +#endif #if !HAS_MUTTER47 public void foreach_output (Cogl.OutputCallback callback); #endif @@ -624,6 +638,9 @@ namespace Cogl { #endif #if HAS_MUTTER47 public void* get_proc_address (string name); +#endif +#if HAS_MUTTER49 + public void* get_winsys (); #endif public Cogl.WinsysID get_winsys_id (); public bool is_dma_buf_supported (); @@ -638,6 +655,10 @@ namespace Cogl { #endif #if !HAS_MUTTER47 public void set_winsys_id (Cogl.WinsysID winsys_id); +#endif +#if HAS_MUTTER49 + public void set_driver (Cogl.DriverId driver); + public void set_winsys (void* winsys); #endif } [CCode (cheader_filename = "cogl/cogl.h", type_id = "cogl_scanout_get_type ()")] @@ -697,7 +718,9 @@ namespace Cogl { public sealed class SubTexture : Cogl.Texture { [CCode (has_construct_function = false, type = "CoglTexture*")] public SubTexture (Cogl.Context ctx, Cogl.Texture parent_texture, int sub_x, int sub_y, int sub_width, int sub_height); +#if !HAS_MUTTER49 public unowned Cogl.Texture get_parent (); +#endif } #if !HAS_MUTTER47 [CCode (cheader_filename = "cogl/cogl.h", type_id = "cogl_swap_chain_get_type ()")] @@ -736,7 +759,7 @@ namespace Cogl { public uint get_width (); public bool is_get_data_supported (); public bool is_sliced (); -#if HAS_MUTTER47 +#if HAS_MUTTER47 && !HAS_MUTTER49 public void set_auto_mipmap (bool value); #endif public void set_components (Cogl.TextureComponents components); @@ -1122,7 +1145,7 @@ namespace Cogl { PURGED_CONTEXT_RESET } #if HAS_MUTTER48 - [CCode (cheader_filename = "cogl/cogl.h", cprefix = "COGL_INDICES_TYPE_UNSIGNED_", type_id = "cogl_indices_type_get_type ()")] + [CCode (cheader_filename = "cogl/cogl.h", cprefix = "COGL_INDICES_TYPE_UNSIGNED_", type_id = "cogl_indices_type_get_type ()")] #else [CCode (cheader_filename = "cogl/cogl.h", cprefix = "COGL_INDICES_TYPE_UNSIGNED_", has_type_id = false)] #endif @@ -1382,7 +1405,10 @@ namespace Cogl { #endif public errordomain RendererError { XLIB_DISPLAY_OPEN, - BAD_CONSTRAINT + BAD_CONSTRAINT; +#if HAS_MUTTER49 + public static uint32 quark (); +#endif } #if HAS_MUTTER48 [CCode (cheader_filename = "cogl/cogl.h", cprefix = "COGL_SCANOUT_ERROR_", type_id = "cogl_scanout_error_get_type ()")] diff --git a/vapi/mutter-cogl-17.deps b/vapi/mutter-cogl-17.deps new file mode 100644 index 000000000..09e7c1609 --- /dev/null +++ b/vapi/mutter-cogl-17.deps @@ -0,0 +1,5 @@ +pango +glib-2.0 +gio-2.0 +mutter-mtk-17 +x11 diff --git a/vapi/mutter-cogl-17.vapi b/vapi/mutter-cogl-17.vapi new file mode 120000 index 000000000..05e3c719b --- /dev/null +++ b/vapi/mutter-cogl-17.vapi @@ -0,0 +1 @@ +mutter-cogl-16.vapi \ No newline at end of file diff --git a/vapi/mutter-mtk-13.vapi b/vapi/mutter-mtk-13.vapi index 528605b52..dc6416e2c 100644 --- a/vapi/mutter-mtk-13.vapi +++ b/vapi/mutter-mtk-13.vapi @@ -2,6 +2,12 @@ [CCode (cprefix = "Mtk", gir_namespace = "Mtk", gir_version = "13", lower_case_cprefix = "mtk_")] namespace Mtk { +#if HAS_MUTTER49 + [CCode (cheader_filename = "mtk/mtk.h", has_type_id = false)] + [Compact] + public class AnonymousFile { + } +#endif #if HAS_MUTTER46 [CCode (cheader_filename = "mtk/mtk.h", ref_function = "mtk_region_ref", type_id = "mtk_region_get_type ()", unref_function = "mtk_region_unref")] [Compact] @@ -68,6 +74,9 @@ namespace Mtk { public bool intersect (Mtk.Rectangle src2, out Mtk.Rectangle dest); #if HAS_MUTTER46 public bool is_adjacent_to (Mtk.Rectangle other); +#endif +#if HAS_MUTTER49 + public bool is_empty (); #endif public bool overlap (Mtk.Rectangle rect2); #if HAS_MUTTER46 @@ -103,6 +112,13 @@ namespace Mtk { public void init (Mtk.Region region); public void next (); } +#if HAS_MUTTER49 + [CCode (cheader_filename = "mtk/mtk.h", cprefix = "MTK_ANONYMOUS_FILE_MAPMODE_", has_type_id = false)] + public enum AnonymousFileMapmode { + PRIVATE, + SHARED + } +#endif #if HAS_MUTTER47 [CCode (cheader_filename = "mtk/mtk.h", cprefix = "MTK_MONITOR_TRANSFORM_", has_type_id = false)] public enum MonitorTransform { @@ -144,6 +160,10 @@ namespace Mtk { #if HAS_MUTTER48 [CCode (cheader_filename = "mtk/mtk.h")] public static void compute_viewport_matrix (Graphene.Matrix matrix, int width, int height, float scale, Mtk.MonitorTransform transform, Graphene.Rect src_rect); +#endif +#if HAS_MUTTER49 + [CCode (cheader_filename = "mtk/mtk.h")] + public static int64 extrapolate_next_interval_boundary (int64 base_us, int64 interval_us); #endif [CCode (cheader_filename = "mtk/mtk.h")] [Version (replacement = "Rectangle.from_graphene_rect")] diff --git a/vapi/mutter-mtk-17.vapi b/vapi/mutter-mtk-17.vapi new file mode 120000 index 000000000..0ca3d1de3 --- /dev/null +++ b/vapi/mutter-mtk-17.vapi @@ -0,0 +1 @@ +mutter-mtk-16.vapi \ No newline at end of file