diff --git a/vapi/Clutter-14-custom.vala b/vapi/Clutter-14-custom.vala new file mode 100644 index 00000000..e5c71c2d --- /dev/null +++ b/vapi/Clutter-14-custom.vala @@ -0,0 +1,53 @@ +namespace Clutter { + public struct Color { + [CCode (cname = "_vala_clutter_color_from_hls")] + public static Clutter.Color? from_hls (float hue, float luminance, float saturation) { + var color = Clutter.Color.alloc (); + color.init_from_hls (hue, luminance, saturation); + return color; + } + [CCode (cname = "_vala_clutter_color_from_pixel")] + public static Clutter.Color? from_pixel (uint32 pixel) { + var color = Clutter.Color.alloc (); + color.init_from_pixel (pixel); + return color; + } + [CCode (cname = "_vala_clutter_color_from_string")] + public static Clutter.Color? from_string (string str) { + var color = Clutter.Color.alloc (); + color.init_from_string (str); + return color; + } + [CCode (cname = "clutter_color_from_string")] + public bool parse_string (string str); + } + + public interface Container : GLib.Object { + public void add (params Clutter.Actor[] actors); + [CCode (cname = "clutter_container_class_find_child_property")] + public class unowned GLib.ParamSpec find_child_property (string property_name); + [CCode (cname = "clutter_container_class_list_child_properties")] + public class unowned GLib.ParamSpec[] list_child_properties (); + } + + public struct Units { + [CCode (cname = "clutter_units_from_cm")] + public Units.from_cm (float cm); + [CCode (cname = "clutter_units_from_em")] + public Units.from_em (float em); + [CCode (cname = "clutter_units_from_em_for_font")] + public Units.from_em_for_font (string font_name, float em); + [CCode (cname = "clutter_units_from_mm")] + public Units.from_mm (float mm); + [CCode (cname = "clutter_units_from_pixels")] + public Units.from_pixels (int px); + [CCode (cname = "clutter_units_from_pt")] + public Units.from_pt (float pt); + [CCode (cname = "clutter_units_from_string")] + public Units.from_string (string str); + } + + [CCode (cheader_filename = "clutter/clutter.h", has_copy_function = false, has_destroy_function = false, has_type_id = false)] + public struct Capture { + } +} diff --git a/vapi/Clutter-14.metadata b/vapi/Clutter-14.metadata new file mode 100644 index 00000000..21cb052e --- /dev/null +++ b/vapi/Clutter-14.metadata @@ -0,0 +1,155 @@ +// Non mini-object +ActorBox struct +Color struct +Margin struct +PaintVolume struct +Perspective struct + +*.ref unowned + +Actor + .apply_transform.matrix ref + .get_abs_allocation_vertices.verts out=false +Event.type#method name="get_type" +Image + .new symbol_type="constructor" + +// ??? +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 +value_get_color nullable + +// 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 + +// 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 +threads_add_idle skip=false +threads_add_idle_full skip=false +threads_add_timeout skip=false +threads_add_timeout_full 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" +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" +threads_add_idle name="add" parent="Clutter.Threads.Idle" +threads_add_idle_full name="add_full" parent="Clutter.Threads.Idle" +threads_add_timeout name="add" parent="Clutter.Threads.Timeout" +threads_add_timeout_full name="add_full" parent="Clutter.Threads.Timeout" + +// 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" + +// Backwards compatibility +Color.alloc symbol_type="function" + +Color.from_hls name="init_from_hls" +Color.from_pixel name="init_from_pixel" +Color.from_string name="init_from_string" + +Color.new name="from_rgba" symbol_type="function" + .alpha default=0 + .blue default=0 + .green default=0 + .red default=0 + +Color.init + .alpha default=0 + .blue default=0 + .green default=0 + .red default=0 + +// 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-14-custom.vala b/vapi/Cogl-14-custom.vala new file mode 100644 index 00000000..6e81e067 --- /dev/null +++ b/vapi/Cogl-14-custom.vala @@ -0,0 +1,93 @@ +namespace Cogl { + public struct Color { + [Version (since = "1.4")] + [CCode (cname="cogl_color_init_from_4f")] + public Color.from_4f (float red, float green, float blue, float alpha); + [Version (since = "1.4")] + [CCode (cname="cogl_color_init_from_4fv")] + public Color.from_4fv (float color_array); + [Version (since = "1.16")] + [CCode (cname="cogl_color_init_from_hsl")] + public Color.from_hsl (float hue, float saturation, float luminance); + } + [CCode (cheader_filename = "cogl/cogl.h", has_type_id = false)] + [Version (since = "1.6")] + public struct VertexP2 { + public float x; + public float y; + } + [CCode (cheader_filename = "cogl/cogl.h", has_type_id = false)] + [Version (since = "1.6")] + 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)] + [Version (since = "1.6")] + 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)] + [Version (since = "1.6")] + 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)] + [Version (since = "1.6")] + public struct VertexP3 { + public float x; + public float y; + public float z; + } + [CCode (cheader_filename = "cogl/cogl.h", has_type_id = false)] + [Version (since = "1.6")] + public struct VertexP3C4 { + public float x; + public float y; + public float z; + public uint8 r; + public uint8 g; + public uint8 b; + public uint8 a; + } + [CCode (cheader_filename = "cogl/cogl.h", has_type_id = false)] + [Version (since = "1.6")] + public struct VertexP3T2 { + public float x; + public float y; + public float z; + public float s; + public float t; + } + [CCode (cheader_filename = "cogl/cogl.h", has_type_id = false)] + [Version (since = "1.6")] + public struct VertexP3T2C4 { + public float x; + public float y; + public float z; + public float s; + public float t; + public uint8 r; + public uint8 g; + public uint8 b; + public uint8 a; + } + [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-14.metadata b/vapi/Cogl-14.metadata new file mode 100644 index 00000000..b76f95c6 --- /dev/null +++ b/vapi/Cogl-14.metadata @@ -0,0 +1,49 @@ +* cheader_filename="cogl/cogl.h" + +Color struct + +Color.equal.v1 type="Cogl.Color" +Color.equal.v2 type="Cogl.Color" +color_equal skip + +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 + +create_program type="Cogl.Program" name="create" parent="Cogl.Program" +create_shader type="Cogl.Shader" name="create" parent="Cogl.Shader" + +foreach_feature parent="Cogl.Context" symbol_type="method" instance_idx=0 +get_graphics_reset_status parent="Cogl.Context" symbol_type="method" instance_idx=0 +has_feature parent="Cogl.Context" symbol_type="method" instance_idx=0 + +Bitmap.error_quark parent="Cogl.BitmapError" name="quark" +Texture.error_quark parent="Cogl.TextureError" name="quark" +Scanout.error_quark parent="Cogl.ScanoutError" name="quark" + +BitmapError errordomain +BlendStringError errordomain +RendererError errordomain +SystemError errordomain +TextureError errordomain +FramebufferError errordomain +ScanoutError errordomain + +is_framebuffer skip +blit_framebuffer parent="Cogl.Framebuffer" symbol_type="method" instance_idx=0 name="blit" + +Onscreen + .add_dirty_callback unowned + .add_frame_callback unowned diff --git a/vapi/Meta-14.metadata b/vapi/Meta-14.metadata new file mode 100644 index 00000000..a066790e --- /dev/null +++ b/vapi/Meta-14.metadata @@ -0,0 +1,190 @@ +* 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" +get_stage_for_display parent="Meta.Display" symbol_type="method" name="get_stage" instance_idx=0 cheader_filename="meta/compositor-mutter.h" +get_top_window_group_for_display parent="Meta.Display" symbol_type="method" name="get_top_window_group" instance_idx=0 cheader_filename="meta/compositor-mutter.h" +get_window_group_for_display parent="Meta.Display" symbol_type="method" name="get_window_group" instance_idx=0 cheader_filename="meta/compositor-mutter.h" +disable_unredirect_for_display parent="Meta.Display" symbol_type="method" name="disable_unredirect" instance_idx=0 cheader_filename="meta/compositor-mutter.h" +enable_unredirect_for_display parent="Meta.Display" symbol_type="method" name="enable_unredirect" instance_idx=0 cheader_filename="meta/compositor-mutter.h" + +get_window_actors parent="Meta.Display" symbol_type="method" instance_idx=0 cheader_filename="meta/compositor-mutter.h" type_arguments="Meta.WindowActor" + +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_for_display parent="Meta.Display" symbol_type="method" instance_idx=0 name="get_cursor_tracker" +CursorTracker.get_pointer.mods out +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" +Frame cheader_filename="meta/types.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/group.h" +Group.property_notify.event type="X.Event" ref +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" +LocaleDirection 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" +PadDirection cheader_filename="meta/display.h" +PadFeatureType cheader_filename="meta/display.h" +Plugin cheader_filename="meta/meta-plugin.h" +PluginInfo 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" +Shadow cheader_filename="meta/meta-shadow-factory.h" +ShadowFactory cheader_filename="meta/meta-shadow-factory.h" +ShadowMode cheader_filename="meta/meta-window-actor.h" +ShadowParams cheader_filename="meta/meta-shadow-factory.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 +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" +WindowShape cheader_filename="meta/meta-window-shape.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 + +// 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" + +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" +get_locale_direction 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?" +warning parent="Meta.Util" cheader_filename="meta/util.h" +create_context parent="Meta.Context" name="new" symbol_type="constructor" cheader_filename="meta/meta-context.h" + +BackgroundActor sealed +BackgroundContent sealed +BackgroundImage sealed +BackgroundImageCache sealed +Background sealed +Dnd sealed +IdleMonitor sealed +LaunchContext sealed +RemoteAccessController sealed +SelectionSourceMemory sealed +Selection sealed +ShadowFactory sealed +ShapedTexture sealed +SoundPlayer sealed +Stage sealed +StartupNotification sealed +WaylandClient sealed +WindowGroup sealed +WorkspaceManager sealed +X11Display sealed diff --git a/vapi/Mtk-14.metadata b/vapi/Mtk-14.metadata new file mode 100644 index 00000000..95a62dde --- /dev/null +++ b/vapi/Mtk-14.metadata @@ -0,0 +1,3 @@ +Rectangle struct +RECTANGLE_MAX_STACK_RECTS parent="Mtk.Rectangle" name="MAX_STACK_RECTS" +REGION_BUILDER_MAX_LEVELS parent="Mtk.RegionBuilder" name="MAX_LEVELS" diff --git a/vapi/libmutter-14.deps b/vapi/libmutter-14.deps new file mode 120000 index 00000000..e19fc39f --- /dev/null +++ b/vapi/libmutter-14.deps @@ -0,0 +1 @@ +libmutter-13.deps \ No newline at end of file diff --git a/vapi/libmutter-14.vapi b/vapi/libmutter-14.vapi new file mode 120000 index 00000000..25c1d15b --- /dev/null +++ b/vapi/libmutter-14.vapi @@ -0,0 +1 @@ +libmutter-13.vapi \ No newline at end of file diff --git a/vapi/libmutter.vapi b/vapi/libmutter.vapi index a6829a98..0f420548 100644 --- a/vapi/libmutter.vapi +++ b/vapi/libmutter.vapi @@ -146,6 +146,9 @@ namespace Meta { public abstract class Backend : GLib.Object, GLib.Initable { [CCode (has_construct_function = false)] protected Backend (); +#if HAS_MUTTER46 + public void freeze_keyboard (uint32 timestamp); +#endif #if !HAS_MUTTER44 [CCode (cheader_filename = "meta/meta-backend.h", cname = "meta_get_backend")] public static unowned Meta.Backend get_backend (); @@ -163,7 +166,13 @@ namespace Meta { public bool is_headless (); public bool is_rendering_hardware_accelerated (); public void lock_layout_group (uint idx); +#if HAS_MUTTER46 + public void set_keymap (string layouts, string variants, string options, string model); + public void unfreeze_keyboard (uint32 timestamp); + public void ungrab_keyboard (uint32 timestamp); +#else public void set_keymap (string layouts, string variants, string options); +#endif #if HAS_MUTTER43 public Meta.BackendCapabilities capabilities { get; } #endif @@ -188,7 +197,11 @@ namespace Meta { public signal void changed (); } [CCode (cheader_filename = "meta/meta-background-actor.h", type_id = "meta_background_actor_get_type ()")] +#if HAS_MUTTER46 + public sealed class BackgroundActor : Clutter.Actor, Atk.Implementor, Clutter.Animatable { +#else public sealed class BackgroundActor : Clutter.Actor, Atk.Implementor, Clutter.Animatable, Clutter.Container, Clutter.Scriptable { +#endif [CCode (has_construct_function = false, type = "ClutterActor*")] public BackgroundActor (Meta.Display display, int monitor); [NoAccessorMethod] @@ -227,7 +240,11 @@ namespace Meta { public double vignette_sharpness { get; set; } } [CCode (cheader_filename = "meta/meta-background-group.h", type_id = "meta_background_group_get_type ()")] +#if HAS_MUTTER46 + public class BackgroundGroup : Clutter.Actor, Atk.Implementor, Clutter.Animatable { +#else public class BackgroundGroup : Clutter.Actor, Atk.Implementor, Clutter.Animatable, Clutter.Container, Clutter.Scriptable { +#endif [CCode (has_construct_function = false, type = "ClutterActor*")] public BackgroundGroup (); } @@ -271,8 +288,10 @@ namespace Meta { #endif [NoAccessorMethod] public Meta.BarrierDirection directions { get; construct; } +#if !HAS_MUTTER46 [NoAccessorMethod] public Meta.Display display { owned get; construct; } +#endif #if HAS_MUTTER45 [NoAccessorMethod] public Meta.BarrierFlags flags { get; construct; } @@ -411,9 +430,11 @@ namespace Meta { public void end_grab_op (uint32 timestamp); #endif public void focus_default_window (uint32 timestamp); +#if !HAS_MUTTER46 [CCode (cheader_filename = "meta/compositor-mutter.h", cname = "meta_focus_stage_window")] public void focus_stage_window (uint32 timestamp); public void freeze_keyboard (uint32 timestamp); +#endif public unowned Meta.Compositor get_compositor (); public Clutter.ModifierType get_compositor_modifiers (); public unowned Meta.Context get_context (); @@ -422,8 +443,10 @@ namespace Meta { public uint32 get_current_time_roundtrip (); [CCode (cname = "meta_cursor_tracker_get_for_display")] public unowned Meta.CursorTracker get_cursor_tracker (); +#if !HAS_MUTTER46 [CCode (cheader_filename = "meta/compositor-mutter.h", cname = "meta_get_feedback_group_for_display")] public unowned Clutter.Actor get_feedback_group (); +#endif public unowned Meta.Window get_focus_window (); #if !HAS_MUTTER44 public Meta.GrabOp get_grab_op (); @@ -477,14 +500,22 @@ namespace Meta { public bool remove_keybinding (string name); public void request_pad_osd (Clutter.InputDevice pad, bool edition_mode); public void set_cursor (Meta.Cursor cursor); +#if HAS_MUTTER46 + public void set_input_focus (Meta.Window window, uint32 timestamp); +#else public void set_input_focus (Meta.Window window, bool focus_frame, uint32 timestamp); +#endif public GLib.SList sort_windows_by_stacking (GLib.SList windows); +#if !HAS_MUTTER46 [CCode (cheader_filename = "meta/compositor-mutter.h", cname = "meta_stage_is_focused")] public bool stage_is_focused (); public bool supports_extended_barriers (); public void unfreeze_keyboard (uint32 timestamp); +#endif public bool ungrab_accelerator (uint action_id); +#if !HAS_MUTTER46 public void ungrab_keyboard (uint32 timestamp); +#endif public void unset_input_focus (uint32 timestamp); public bool xserver_time_is_before (uint32 time1, uint32 time2); public Clutter.ModifierType compositor_modifiers { get; } @@ -492,6 +523,8 @@ namespace Meta { public signal void accelerator_activated (uint object, Clutter.InputDevice p0, uint p1); public signal void closing (); public signal void cursor_updated (); + [CCode (cname = "focus-window")] + public signal void do_focus_window (Meta.Window object, int64 p0); public signal void gl_video_memory_purged (); public signal void grab_op_begin (Meta.Window object, Meta.GrabOp p0); public signal void grab_op_end (Meta.Window object, Meta.GrabOp p0); @@ -713,8 +746,10 @@ namespace Meta { [NoWrapper] public virtual void unminimize (Meta.WindowActor actor); public void unminimize_completed (Meta.WindowActor actor); +#if !HAS_MUTTER46 [NoWrapper] public virtual bool xevent_filter ([CCode (type = "XEvent*")] ref X.Event event); +#endif } [CCode (cheader_filename = "meta/meta-remote-access-controller.h", type_id = "meta_remote_access_controller_get_type ()")] public sealed class RemoteAccessController : GLib.Object { @@ -773,7 +808,11 @@ namespace Meta { #else public void get_bounds (int window_x, int window_y, int window_width, int window_height, Cairo.RectangleInt bounds); #endif +#if HAS_MUTTER46 + public void paint (Cogl.Framebuffer framebuffer, int window_x, int window_y, int window_width, int window_height, uint8 opacity, Mtk.Region? clip, bool clip_strictly); +#else public void paint (Cogl.Framebuffer framebuffer, int window_x, int window_y, int window_width, int window_height, uint8 opacity, Cairo.Region? clip, bool clip_strictly); +#endif public Meta.Shadow @ref (); public void unref (); } @@ -810,7 +849,11 @@ namespace Meta { public void play_from_theme (string name, string description, GLib.Cancellable? cancellable = null); } [CCode (cheader_filename = "meta/meta-stage.h", type_id = "meta_stage_get_type ()")] +#if HAS_MUTTER46 + public sealed class Stage : Clutter.Stage, Atk.Implementor, Clutter.Animatable { +#else public sealed class Stage : Clutter.Stage, Atk.Implementor, Clutter.Animatable, Clutter.Container, Clutter.Scriptable { +#endif [CCode (has_construct_function = false)] protected Stage (); #if !HAS_MUTTER45 @@ -874,6 +917,10 @@ namespace Meta { public WaylandClient (GLib.SubprocessLauncher launcher) throws GLib.Error; #endif public void hide_from_window_list (Meta.Window window); +#if HAS_MUTTER46 + public void make_desktop (Meta.Window window); + public void make_dock (Meta.Window window); +#endif public bool owns_window (Meta.Window window); public void show_in_window_list (Meta.Window window); public GLib.Subprocess spawn (Meta.Display display, GLib.Error? error, string argv0, ...); @@ -890,6 +937,23 @@ namespace Meta { public void* get_wayland_display (); public signal void prepare_shutdown (); } +#endif +#if HAS_MUTTER46 + [CCode (cheader_filename = "meta/main.h", type_id = "meta_wayland_surface_get_type ()")] + public class WaylandSurface : GLib.Object { + [CCode (has_construct_function = false)] + protected WaylandSurface (); + public unowned Meta.Window? get_window (); + public Meta.Window window { get; } + public signal void actor_changed (); + public signal void configure (); + public signal void destroy (); + public signal void geometry_changed (); + public signal void pre_state_applied (); + public signal void shortcuts_inhibited (); + public signal void shortcuts_restored (); + public signal void unmapped (); + } #endif [CCode (cheader_filename = "meta/window.h", type_id = "meta_window_get_type ()")] #if HAS_MUTTER44 @@ -903,7 +967,9 @@ namespace Meta { public void activate_with_workspace (uint32 current_time, Meta.Workspace workspace); public bool allows_move (); public bool allows_resize (); -#if HAS_MUTTER44 +#if HAS_MUTTER46 + public bool begin_grab_op (Meta.GrabOp op, Clutter.InputDevice? device, Clutter.EventSequence? sequence, uint32 timestamp, Graphene.Point? pos_hint); +#elif HAS_MUTTER44 public bool begin_grab_op (Meta.GrabOp op, Clutter.InputDevice? device, Clutter.EventSequence? sequence, uint32 timestamp); #else public void begin_grab_op (Meta.GrabOp op, bool frame_action, uint32 timestamp); @@ -922,7 +988,9 @@ namespace Meta { #else public Meta.Rectangle client_rect_to_frame_rect (Meta.Rectangle client_rect); #endif +#if !HAS_MUTTER46 public void compute_group (); +#endif public void @delete (uint32 timestamp); public unowned Meta.Window find_root_ancestor (); public void focus (uint32 timestamp); @@ -935,20 +1003,28 @@ namespace Meta { public Meta.Rectangle frame_rect_to_client_rect (Meta.Rectangle frame_rect); public Meta.Rectangle get_buffer_rect (); #endif +#if !HAS_MUTTER46 public unowned string? get_client_machine (); +#endif public Meta.WindowClientType get_client_type (); public unowned GLib.Object get_compositor_private (); public unowned string get_description (); public unowned Meta.Display get_display (); public unowned Meta.Frame get_frame (); +#if HAS_MUTTER46 + public unowned Mtk.Region? get_frame_bounds (); +#else public unowned Cairo.Region? get_frame_bounds (); +#endif #if HAS_MUTTER45 public Mtk.Rectangle get_frame_rect (); #else public Meta.Rectangle get_frame_rect (); #endif public Meta.FrameType get_frame_type (); +#if !HAS_MUTTER46 public unowned Meta.Group? get_group (); +#endif public unowned string? get_gtk_app_menu_object_path (); public unowned string? get_gtk_application_id (); public unowned string? get_gtk_application_object_path (); @@ -988,8 +1064,10 @@ namespace Meta { public Meta.Rectangle get_work_area_for_monitor (int which_monitor); #endif public unowned Meta.Workspace get_workspace (); +#if !HAS_MUTTER46 public X.Window get_xwindow (); public void group_leader_changed (); +#endif public bool has_attached_dialogs (); public bool has_focus (); #if HAS_MUTTER45 @@ -1024,7 +1102,9 @@ namespace Meta { public void move_resize_frame (bool user_op, int root_x_nw, int root_y_nw, int w, int h); public void move_to_monitor (int monitor); public void raise (); -#if HAS_MUTTER45 +#if HAS_MUTTER46 + public void raise_and_make_recent_on_workspace (Meta.Workspace workspace); +#elif HAS_MUTTER45 public void raise_and_make_recent (); #endif public void set_compositor_private (GLib.Object priv); @@ -1037,7 +1117,9 @@ namespace Meta { #endif public void shove_titlebar_onscreen (); public bool showing_on_its_workspace (); +#if !HAS_MUTTER46 public void shutdown_group (); +#endif public void stick (); public bool titlebar_is_onscreen (); public void unmake_above (); @@ -1049,6 +1131,9 @@ namespace Meta { public void unshade (uint32 timestamp); #endif public void unstick (); +#if HAS_MUTTER46 + public unowned Meta.Group? x11_get_group (); +#endif [NoAccessorMethod] public bool above { get; } [NoAccessorMethod] @@ -1070,16 +1155,20 @@ namespace Meta { public string gtk_menubar_object_path { get; } public string gtk_unique_bus_name { get; } public string gtk_window_object_path { get; } +#if !HAS_MUTTER46 [NoAccessorMethod] public Cairo.Surface icon { owned get; } +#endif [NoAccessorMethod] public bool is_alive { get; } [NoAccessorMethod] public bool maximized_horizontally { get; } [NoAccessorMethod] public bool maximized_vertically { get; } +#if !HAS_MUTTER46 [NoAccessorMethod] public Cairo.Surface mini_icon { owned get; } +#endif [NoAccessorMethod] public bool minimized { get; } public string mutter_hints { get; } @@ -1112,7 +1201,11 @@ namespace Meta { public signal void workspace_changed (); } [CCode (cheader_filename = "meta/meta-window-actor.h", type_id = "meta_window_actor_get_type ()")] +#if HAS_MUTTER46 + public abstract class WindowActor : Clutter.Actor, Atk.Implementor, Clutter.Animatable { +#else public abstract class WindowActor : Clutter.Actor, Atk.Implementor, Clutter.Animatable, Clutter.Container, Clutter.Scriptable { +#endif [CCode (has_construct_function = false)] protected WindowActor (); public void freeze (); @@ -1138,7 +1231,11 @@ namespace Meta { public signal void thawed (); } [CCode (cheader_filename = "meta/meta-window-group.h", type_id = "meta_window_group_get_type ()")] +#if HAS_MUTTER46 + public sealed class WindowGroup : Clutter.Actor, Atk.Implementor, Clutter.Animatable { +#else public sealed class WindowGroup : Clutter.Actor, Atk.Implementor, Clutter.Animatable, Clutter.Container, Clutter.Scriptable { +#endif [CCode (has_construct_function = false)] protected WindowGroup (); } @@ -1146,12 +1243,20 @@ namespace Meta { [Compact] public class WindowShape { [CCode (has_construct_function = false)] +#if HAS_MUTTER46 + public WindowShape (Mtk.Region region); +#else public WindowShape (Cairo.Region region); +#endif public bool equal (Meta.WindowShape shape_b); public void get_borders (int border_top, int border_right, int border_bottom, int border_left); public uint hash (); public Meta.WindowShape @ref (); +#if HAS_MUTTER46 + public Mtk.Region to_region (int center_width, int center_height); +#else public Cairo.Region to_region (int center_width, int center_height); +#endif public void unref (); } [CCode (cheader_filename = "meta/workspace.h", type_id = "meta_workspace_get_type ()")] @@ -1188,15 +1293,23 @@ namespace Meta { public unowned Meta.Workspace append_new_workspace (bool activate, uint32 timestamp); public unowned Meta.Workspace get_active_workspace (); public int get_active_workspace_index (); +#if HAS_MUTTER46 + public int get_layout_columns (); + public int get_layout_rows (); +#endif public int get_n_workspaces (); public unowned Meta.Workspace? get_workspace_by_index (int index); public unowned GLib.List get_workspaces (); public void override_workspace_layout (Meta.DisplayCorner starting_corner, bool vertical_layout, int n_rows, int n_columns); public void remove_workspace (Meta.Workspace workspace, uint32 timestamp); public void reorder_workspace (Meta.Workspace workspace, int new_index); +#if !HAS_MUTTER46 [NoAccessorMethod] +#endif public int layout_columns { get; } +#if !HAS_MUTTER46 [NoAccessorMethod] +#endif public int layout_rows { get; } public int n_workspaces { get; } public signal void active_workspace_changed (); @@ -1233,6 +1346,9 @@ namespace Meta { public bool has_shape (); #endif public unowned Meta.Group lookup_group (X.Window group_leader); +#if HAS_MUTTER46 + public X.Window lookup_xwindow (Meta.Window window); +#endif #if HAS_MUTTER45 public void redirect_windows (Meta.Display display); public void remove_event_func (uint id); @@ -1777,6 +1893,9 @@ namespace Meta { SIMPLE, YUYV, NV12, +#if HAS_MUTTER46 + P010, +#endif YUV420 } [CCode (cheader_filename = "meta/display.h", cprefix = "META_PAD_DIRECTION_", type_id = "meta_pad_direction_get_type ()")] @@ -1900,6 +2019,7 @@ namespace Meta { ICON, INSTANTLY } +#if !HAS_MUTTER46 [CCode (cheader_filename = "meta/common.h", cprefix = "META_VIRTUAL_", type_id = "meta_virtual_modifier_get_type ()")] [Flags] public enum VirtualModifier { @@ -1914,6 +2034,7 @@ namespace Meta { MOD4_MASK, MOD5_MASK } +#endif [CCode (cheader_filename = "meta/window.h", cprefix = "META_WINDOW_CLIENT_TYPE_", type_id = "meta_window_client_type_get_type ()")] public enum WindowClientType { WAYLAND, @@ -1946,23 +2067,13 @@ namespace Meta { [CCode (cheader_filename = "meta/meta-idle-monitor.h", instance_pos = 2.9)] public delegate void IdleMonitorWatchFunc (Meta.IdleMonitor monitor, uint watch_id); [CCode (cheader_filename = "meta/prefs.h", instance_pos = 4.9)] - public delegate void KeyHandlerFunc (Meta.Display display, Meta.Window? window, [CCode (type = "ClutterKeyEvent*")] Clutter.KeyEvent? event, Meta.KeyBinding binding); + public delegate void KeyHandlerFunc (Meta.Display display, Meta.Window? window, [CCode (type = "const ClutterKeyEvent*")] Clutter.KeyEvent? event, Meta.KeyBinding binding); [CCode (cheader_filename = "meta/prefs.h", instance_pos = 1.9)] public delegate void PrefsChangedFunc (Meta.Preference pref); [CCode (cheader_filename = "meta/window.h", instance_pos = 1.9)] public delegate bool WindowForeachFunc (Meta.Window window); [CCode (cheader_filename = "meta/common.h", cname = "META_CURRENT_TIME")] public const int CURRENT_TIME; - [CCode (cheader_filename = "meta/common.h", cname = "META_DEFAULT_ICON_NAME")] - public const string DEFAULT_ICON_NAME; - [CCode (cheader_filename = "meta/common.h", cname = "META_ICON_HEIGHT")] - public const int ICON_HEIGHT; - [CCode (cheader_filename = "meta/common.h", cname = "META_ICON_WIDTH")] - public const int ICON_WIDTH; - [CCode (cheader_filename = "meta/common.h", cname = "META_MINI_ICON_HEIGHT")] - public const int MINI_ICON_HEIGHT; - [CCode (cheader_filename = "meta/common.h", cname = "META_MINI_ICON_WIDTH")] - public const int MINI_ICON_WIDTH; [CCode (cheader_filename = "meta/common.h", cname = "META_PRIORITY_BEFORE_REDRAW")] public const int PRIORITY_BEFORE_REDRAW; [CCode (cheader_filename = "meta/common.h", cname = "META_PRIORITY_PREFS_NOTIFY")] @@ -1983,8 +2094,10 @@ namespace Meta { public static void add_clutter_debug_flags (Clutter.DebugFlag debug_flags, Clutter.DrawDebugFlag draw_flags, Clutter.PickDebugFlag pick_flags); [CCode (cheader_filename = "meta/main.h")] public static void add_debug_paint_flag (Meta.DebugPaintFlag flag); +#if !HAS_MUTTER46 [CCode (cheader_filename = "meta/main.h")] public static void clutter_init (); +#endif [CCode (cheader_filename = "meta/main.h")] public static void exit (Meta.ExitCode code); #if HAS_MUTTER44 @@ -2012,3 +2125,4 @@ namespace Meta { public static void restart (string? message); #endif } + diff --git a/vapi/meson.build b/vapi/meson.build index b917c8d1..3f3ee61c 100644 --- a/vapi/meson.build +++ b/vapi/meson.build @@ -304,3 +304,91 @@ if mutter45_dep.found() output: 'libmutter-13.vapi' ) endif +if mutter46_dep.found() + mtk_target = custom_target('mutter-mtk-14', + command: [ + vapigen, + mutter_typelib_dir / 'Mtk-14.gir', + '--library=mutter-mtk-14', + '--pkg=gobject-2.0', + '--pkg=gio-2.0', + '--pkg=cairo', + '--pkg=graphene-gobject-1.0', + vapigen_args + ], + output: 'mutter-mtk-14.vapi' + ) + cogl_target = custom_target('mutter-cogl-14', + command: [ + vapigen, + mutter_typelib_dir / 'Cogl-14.gir', + '--library=mutter-cogl-14', + '--pkg=mutter-mtk-14', + '--pkg=gobject-2.0', + '--pkg=gio-2.0', + '--pkg=cairo', + '--pkg=graphene-gobject-1.0', + vapigen_args, + files('Cogl-14-custom.vala') + ], + depends: mtk_target, + output: 'mutter-cogl-14.vapi' + ) + + cogl_pango_target = custom_target('mutter-cogl-pango-14', + command: [ + vapigen, + mutter_typelib_dir / 'CoglPango-14.gir', + '--library=mutter-cogl-pango-14', + '--pkg=mutter-mtk-14', + '--pkg=mutter-cogl-14', + '--pkg=pangocairo', + '--pkg=gio-2.0', + '--pkg=glib-2.0', + vapigen_args + ], + depends: [mtk_target, cogl_target], + output: 'mutter-cogl-pango-14.vapi' + ) + + clutter_target = custom_target('mutter-clutter-14', + command: [ + vapigen, + mutter_typelib_dir / 'Clutter-14.gir', + '--library=mutter-clutter-14', + '--pkg=graphene-gobject-1.0', + '--pkg=mutter-mtk-14', + '--pkg=mutter-cogl-14', + '--pkg=mutter-cogl-pango-14', + '--pkg=atk', + '--pkg=gio-2.0', + '--pkg=json-glib-1.0', + '--pkg=pangocairo', + vapigen_args, + files('Clutter-14-custom.vala') + ], + depends: [ cogl_target, cogl_pango_target, mtk_target ], + output: 'mutter-clutter-14.vapi' + ) + + libmutter_target = custom_target('libmutter-14', + command: [ + vapigen, + mutter_typelib_dir / 'Meta-14.gir', + '--library=libmutter-14', + '--pkg=graphene-gobject-1.0', + '--pkg=mutter-cogl-14', + '--pkg=mutter-cogl-pango-14', + '--pkg=mutter-clutter-14', + '--pkg=atk', + '--pkg=gio-2.0', + '--pkg=json-glib-1.0', + '--pkg=pangocairo', + '--pkg=x11', + '--pkg=xfixes-4.0', + vapigen_args + ], + depends: [ cogl_target, cogl_pango_target, clutter_target ], + output: 'libmutter-14.vapi' + ) +endif diff --git a/vapi/mutter-clutter-14.deps b/vapi/mutter-clutter-14.deps new file mode 100644 index 00000000..ecb47482 --- /dev/null +++ b/vapi/mutter-clutter-14.deps @@ -0,0 +1,6 @@ +atk +cairo +pango +json-glib-1.0 +mutter-cogl-14 +graphene-gobject-1.0 diff --git a/vapi/mutter-clutter-14.vapi b/vapi/mutter-clutter-14.vapi new file mode 120000 index 00000000..7958fe70 --- /dev/null +++ b/vapi/mutter-clutter-14.vapi @@ -0,0 +1 @@ +mutter-clutter-13.vapi \ No newline at end of file diff --git a/vapi/mutter-clutter.vapi b/vapi/mutter-clutter.vapi index dc6f2f7c..aca0c6a6 100644 --- a/vapi/mutter-clutter.vapi +++ b/vapi/mutter-clutter.vapi @@ -4606,9 +4606,11 @@ namespace Clutter { [CCode (array_length_pos = 1.1, array_length_type = "gsize", cheader_filename = "clutter/clutter.h")] [Version (since = "0.8")] public static unowned float[] get_shader_matrix (GLib.Value value); +#if !HAS_MUTTER46 [CCode (cheader_filename = "clutter/clutter.h")] [Version (since = "0.8")] public static unowned Clutter.Units? get_units (GLib.Value value); +#endif [CCode (cheader_filename = "clutter/clutter.h")] [Version (since = "0.8")] public static void set_color (GLib.Value value, Clutter.Color color); @@ -4645,7 +4647,11 @@ namespace Clutter { #endif } [CCode (cheader_filename = "clutter/clutter.h", type_id = "clutter_actor_get_type ()")] +#if HAS_MUTTER46 + public class Actor : GLib.InitiallyUnowned, Atk.Implementor, Clutter.Animatable { +#else public class Actor : GLib.InitiallyUnowned, Atk.Implementor, Clutter.Animatable, Clutter.Container, Clutter.Scriptable { +#endif public uint32 flags; [CCode (has_construct_function = false)] [Version (since = "1.10")] @@ -4700,6 +4706,9 @@ namespace Clutter { public Pango.Context create_pango_context (); [Version (since = "1.0")] public Pango.Layout create_pango_layout (string? text); +#if HAS_MUTTER46 + public Clutter.PaintNode create_texture_paint_node (Cogl.Texture texture); +#endif [Version (since = "1.10")] public void destroy_all_children (); [CCode (cname = "clutter_actor_event")] @@ -4727,7 +4736,7 @@ namespace Clutter { [Version (since = "1.4")] public bool get_clip_to_allocation (); #if HAS_MUTTER43 - public Clutter.ColorState get_color_state (); + public unowned Clutter.ColorState get_color_state (); #endif [Version (since = "1.4")] public unowned Clutter.Constraint? get_constraint (string name); @@ -4772,6 +4781,10 @@ namespace Clutter { public unowned Clutter.Actor? get_last_child (); [Version (since = "1.10")] public unowned Clutter.LayoutManager? get_layout_manager (); +#if HAS_MUTTER46 + [CCode (cname = "clutter_actor_class_get_layout_manager_type")] + public class GLib.Type get_layout_manager_type (); +#endif [Version (since = "1.10")] public Clutter.Margin get_margin (); [Version (since = "1.10")] @@ -4844,7 +4857,7 @@ namespace Clutter { public Graphene.Matrix get_transform (); public Graphene.Rect get_transformed_extents (); [Version (since = "1.6")] - public unowned Clutter.PaintVolume? get_transformed_paint_volume (Clutter.Actor relative_to_ancestor); + public Clutter.PaintVolume? get_transformed_paint_volume (Clutter.Actor relative_to_ancestor); [Version (since = "0.8")] public void get_transformed_position (out float x, out float y); [Version (since = "0.8")] @@ -4973,7 +4986,7 @@ namespace Clutter { [Version (since = "1.4")] public void set_clip_to_allocation (bool clip_set); #if HAS_MUTTER43 - public void set_color_state (Clutter.ColorState color_state); + public void set_color_state (Clutter.ColorState? color_state); #endif [Version (since = "1.10")] public void set_content (Clutter.Content? content); @@ -4997,6 +5010,10 @@ namespace Clutter { public void set_height (float height); [Version (since = "1.10")] public void set_layout_manager (Clutter.LayoutManager? manager); +#if HAS_MUTTER46 + [CCode (cname = "clutter_actor_class_set_layout_manager_type")] + public class void set_layout_manager_type (GLib.Type type); +#endif [Version (since = "1.10")] public void set_margin (Clutter.Margin margin); [Version (since = "1.10")] @@ -5080,7 +5097,7 @@ namespace Clutter { [Version (since = "1.0")] public bool clip_to_allocation { get; set; } #if HAS_MUTTER43 - public Clutter.ColorState color_state { owned get; set construct; } + public Clutter.ColorState color_state { get; set construct; } #endif [NoAccessorMethod] [Version (since = "1.4")] @@ -5240,6 +5257,12 @@ namespace Clutter { #endif [Version (since = "0.6")] public virtual signal bool captured_event (Clutter.Event event); +#if HAS_MUTTER46 + public virtual signal void child_added (Clutter.Actor child); + public virtual signal void child_removed (Clutter.Actor child); + public signal void cloned (Clutter.Clone object); + public signal void decloned (Clutter.Clone object); +#endif [HasEmitter] [Version (since = "0.2")] public virtual signal void destroy (); @@ -5328,7 +5351,7 @@ namespace Clutter { } [CCode (cheader_filename = "clutter/clutter.h", type_id = "clutter_align_constraint_get_type ()")] [Version (since = "1.4")] - public class AlignConstraint : Clutter.Constraint { + public sealed class AlignConstraint : Clutter.Constraint { [CCode (has_construct_function = false, type = "ClutterConstraint*")] public AlignConstraint (Clutter.Actor? source, Clutter.AlignAxis axis, float factor); public Clutter.AlignAxis get_align_axis (); @@ -5384,6 +5407,9 @@ namespace Clutter { [Version (since = "1.2")] public class BinLayout : Clutter.LayoutManager { [CCode (has_construct_function = false, type = "ClutterLayoutManager*")] +#if HAS_MUTTER46 + public BinLayout (); +#else public BinLayout (Clutter.BinAlignment x_align = Clutter.BinAlignment.START, Clutter.BinAlignment y_align = Clutter.BinAlignment.START); [NoAccessorMethod] [Version (deprecated = true, deprecated_since = "1.12", since = "1.2")] @@ -5391,10 +5417,11 @@ namespace Clutter { [NoAccessorMethod] [Version (deprecated = true, deprecated_since = "1.12", since = "1.2")] public Clutter.BinAlignment y_align { get; set; } +#endif } [CCode (cheader_filename = "clutter/clutter.h", type_id = "clutter_bind_constraint_get_type ()")] [Version (since = "1.4")] - public class BindConstraint : Clutter.Constraint { + public sealed class BindConstraint : Clutter.Constraint { [CCode (has_construct_function = false, type = "ClutterConstraint*")] public BindConstraint (Clutter.Actor? source, Clutter.BindCoordinate coordinate, float offset); public Clutter.BindCoordinate get_coordinate (); @@ -5409,7 +5436,7 @@ namespace Clutter { } [CCode (cheader_filename = "clutter/clutter.h", type_id = "clutter_binding_pool_get_type ()")] [Version (since = "1.0")] - public class BindingPool : GLib.Object { + public sealed class BindingPool : GLib.Object { [CCode (has_construct_function = false)] public BindingPool (string name); public bool activate (uint key_val, Clutter.ModifierType modifiers, GLib.Object gobject); @@ -5417,7 +5444,11 @@ namespace Clutter { public static unowned Clutter.BindingPool find (string name); public unowned string find_action (uint key_val, Clutter.ModifierType modifiers); public static unowned Clutter.BindingPool get_for_class (void* klass); +#if HAS_MUTTER46 + public void install_action (string action_name, uint key_val, Clutter.ModifierType modifiers, owned GLib.Callback callback); +#else public void install_action (string action_name, uint key_val, Clutter.ModifierType modifiers, owned Clutter.BindingActionFunc callback); +#endif public void install_closure (string action_name, uint key_val, Clutter.ModifierType modifiers, GLib.Closure closure); public void override_action (uint key_val, Clutter.ModifierType modifiers, owned GLib.Callback callback); public void override_closure (uint key_val, Clutter.ModifierType modifiers, GLib.Closure closure); @@ -5441,7 +5472,7 @@ namespace Clutter { [CCode (cheader_filename = "clutter/clutter.h", type_id = "clutter_blur_node_get_type ()")] public class BlurNode : Clutter.LayerNode { [CCode (has_construct_function = false, type = "ClutterPaintNode*")] - public BlurNode (uint width, uint height, float sigma); + public BlurNode (uint width, uint height, float radius); } [CCode (cheader_filename = "clutter/clutter.h", type_id = "clutter_box_layout_get_type ()")] [Version (since = "1.2")] @@ -5513,6 +5544,7 @@ namespace Clutter { public float y; #endif } +#if !HAS_MUTTER46 [CCode (cheader_filename = "clutter/clutter.h", type_id = "clutter_canvas_get_type ()")] [Version (since = "1.10")] public class Canvas : GLib.Object, Clutter.Content { @@ -5538,6 +5570,7 @@ namespace Clutter { public Clutter.Actor actor { get; construct; } public Clutter.Container container { get; construct; } } +#endif [CCode (cheader_filename = "clutter/clutter.h", type_id = "clutter_click_action_get_type ()")] [Version (since = "1.4")] public class ClickAction : Clutter.Action { @@ -5571,7 +5604,11 @@ namespace Clutter { } [CCode (cheader_filename = "clutter/clutter.h", type_id = "clutter_clone_get_type ()")] [Version (since = "1.0")] +#if HAS_MUTTER46 + public class Clone : Clutter.Actor, Atk.Implementor, Clutter.Animatable { +#else public class Clone : Clutter.Actor, Atk.Implementor, Clutter.Animatable, Clutter.Container, Clutter.Scriptable { +#endif [CCode (has_construct_function = false, type = "ClutterActor*")] public Clone (Clutter.Actor source); public unowned Clutter.Actor get_source (); @@ -5611,10 +5648,20 @@ namespace Clutter { public virtual void update_allocation (Clutter.Actor actor, Clutter.ActorBox allocation); public virtual void update_preferred_size (Clutter.Actor actor, Clutter.Orientation direction, float for_size, ref float minimum_size, ref float natural_size); } +#if HAS_MUTTER46 + [CCode (cheader_filename = "clutter/clutter.h", type_id = "clutter_context_get_type ()")] + public class Context : GLib.Object { + [CCode (has_construct_function = false)] + protected Context (); +#else [CCode (cheader_filename = "clutter/clutter.h", has_type_id = false)] [Compact] public class Context { +#endif public unowned Clutter.Backend get_backend (); +#if HAS_MUTTER46 + public Clutter.TextDirection get_text_direction (); +#endif } [CCode (cheader_filename = "clutter/clutter.h", has_type_id = false)] [Compact] @@ -5642,11 +5689,22 @@ namespace Clutter { protected DeformEffect (); [NoWrapper] public virtual void deform_vertex (float width, float height, Cogl.TextureVertex vertex); +#if HAS_MUTTER46 + public unowned Cogl.Pipeline get_back_material (); +#else public unowned Cogl.Handle get_back_material (); +#endif public void get_n_tiles (out uint x_tiles, out uint y_tiles); public void invalidate (); +#if HAS_MUTTER46 + public void set_back_material (Cogl.Pipeline? material); +#else public void set_back_material (Cogl.Handle? material); +#endif public void set_n_tiles (uint x_tiles, uint y_tiles); +#if HAS_MUTTER46 + public Cogl.Pipeline back_material { get; set; } +#endif [NoAccessorMethod] public uint x_tiles { get; set; } [NoAccessorMethod] @@ -5702,8 +5760,10 @@ namespace Clutter { #if !HAS_MUTTER45 public Clutter.EventType type; #endif +#if !HAS_MUTTER46 [CCode (has_construct_function = false)] public Event (Clutter.EventType type); +#endif [Version (since = "1.18")] public static uint add_filter (Clutter.Stage? stage, [CCode (delegate_target_pos = 2.2, destroy_notify_pos = 2.1)] owned Clutter.EventFilterFunc func); public Clutter.Event copy (); @@ -5747,6 +5807,9 @@ namespace Clutter { #endif [Version (since = "1.0")] public uint16 get_key_code (); +#if HAS_MUTTER46 + public void get_key_state (out Clutter.ModifierType pressed, out Clutter.ModifierType latched, out Clutter.ModifierType locked); +#endif [Version (since = "1.0")] public uint get_key_symbol (); public unichar get_key_unicode (); @@ -5773,8 +5836,10 @@ namespace Clutter { public Clutter.ScrollFinishFlags get_scroll_finish_flags (); [Version (since = "1.26")] public Clutter.ScrollSource get_scroll_source (); +#if !HAS_MUTTER46 [Version (since = "0.6")] public unowned Clutter.Actor get_source (); +#endif [Version (since = "1.6")] public unowned Clutter.InputDevice get_source_device (); #if !HAS_MUTTER45 @@ -5853,13 +5918,21 @@ namespace Clutter { } [CCode (cheader_filename = "clutter/clutter.h", type_id = "clutter_flow_layout_get_type ()")] [Version (since = "1.2")] - public class FlowLayout : Clutter.LayoutManager { + public sealed class FlowLayout : Clutter.LayoutManager { [CCode (has_construct_function = false, type = "ClutterLayoutManager*")] +#if HAS_MUTTER46 + public FlowLayout (Clutter.Orientation orientation); +#else public FlowLayout (Clutter.FlowOrientation orientation); +#endif public float get_column_spacing (); public void get_column_width (out float min_width, out float max_width); public bool get_homogeneous (); +#if HAS_MUTTER46 + public Clutter.Orientation get_orientation (); +#else public Clutter.FlowOrientation get_orientation (); +#endif public void get_row_height (out float min_height, out float max_height); public float get_row_spacing (); [Version (since = "1.16")] @@ -5867,7 +5940,11 @@ namespace Clutter { public void set_column_spacing (float spacing); public void set_column_width (float min_width, float max_width); public void set_homogeneous (bool homogeneous); +#if HAS_MUTTER46 + public void set_orientation (Clutter.Orientation orientation); +#else public void set_orientation (Clutter.FlowOrientation orientation); +#endif public void set_row_height (float min_height, float max_height); public void set_row_spacing (float spacing); [Version (since = "1.16")] @@ -5882,7 +5959,11 @@ namespace Clutter { public float min_column_width { get; set; } [NoAccessorMethod] public float min_row_height { get; set; } +#if HAS_MUTTER46 + public Clutter.Orientation orientation { get; set construct; } +#else public Clutter.FlowOrientation orientation { get; set construct; } +#endif public float row_spacing { get; set; } [Version (since = "1.16")] public bool snap_to_grid { get; set; } @@ -5896,7 +5977,9 @@ namespace Clutter { public class Frame { #if HAS_MUTTER44 public int64 get_count (); -#if HAS_MUTTER45 +#if HAS_MUTTER46 + public bool get_frame_deadline (int64 frame_deadline_us); +#elif HAS_MUTTER45 public bool get_min_render_time_allowed (int64 min_render_time_allowed_us); #endif public bool get_target_presentation_time (int64 target_presentation_time_us); @@ -5955,8 +6038,10 @@ namespace Clutter { public void get_threshold_trigger_distance (out float x, out float y); [Version (since = "1.20")] public Clutter.GestureTriggerEdge get_threshold_trigger_edge (); +#if !HAS_MUTTER46 [Version (deprecated = true, deprecated_since = "1.20", since = "1.18")] public Clutter.GestureTriggerEdge get_threshold_trigger_egde (); +#endif [Version (since = "1.12")] public float get_velocity (uint point, out float velocity_x, out float velocity_y); [Version (since = "1.12")] @@ -5980,17 +6065,30 @@ namespace Clutter { public virtual signal void gesture_end (Clutter.Actor actor); public virtual signal bool gesture_progress (Clutter.Actor actor); } +#if HAS_MUTTER46 + [CCode (cheader_filename = "clutter/clutter.h", type_id = "clutter_grab_get_type ()")] + public sealed class Grab : GLib.Object { + [CCode (has_construct_function = false)] + protected Grab (); +#else [CCode (cheader_filename = "clutter/clutter.h", ref_function = "clutter_grab_ref", type_id = "clutter_grab_get_type ()", unref_function = "clutter_grab_unref")] [Compact] public class Grab { +#endif public void dismiss (); public Clutter.GrabState get_seat_state (); +#if HAS_MUTTER46 + public bool is_revoked (); + [NoAccessorMethod] + public bool revoked { get; } +#else public unowned Clutter.Grab @ref (); public void unref (); +#endif } [CCode (cheader_filename = "clutter/clutter.h", type_id = "clutter_grid_layout_get_type ()")] [Version (since = "1.12")] - public class GridLayout : Clutter.LayoutManager { + public sealed class GridLayout : Clutter.LayoutManager { [CCode (has_construct_function = false, type = "ClutterLayoutManager*")] public GridLayout (); public void attach (Clutter.Actor child, int left, int top, int width, int height); @@ -6207,7 +6305,11 @@ namespace Clutter { } [CCode (cheader_filename = "clutter/clutter.h", type_id = "clutter_interval_get_type ()")] [Version (since = "1.0")] +#if HAS_MUTTER46 + public class Interval : GLib.InitiallyUnowned { +#else public class Interval : GLib.InitiallyUnowned, Clutter.Scriptable { +#endif [CCode (has_construct_function = false)] public Interval (GLib.Type gtype, ...); public Clutter.Interval clone (); @@ -6263,7 +6365,11 @@ namespace Clutter { } [CCode (cheader_filename = "clutter/clutter.h", type_id = "clutter_keyframe_transition_get_type ()")] [Version (since = "1.12")] +#if HAS_MUTTER46 + public class KeyframeTransition : Clutter.PropertyTransition { +#else public class KeyframeTransition : Clutter.PropertyTransition, Clutter.Scriptable { +#endif [CCode (has_construct_function = false, type = "ClutterTransition*")] public KeyframeTransition (string property_name); public void clear (); @@ -6279,7 +6385,11 @@ namespace Clutter { [CCode (has_construct_function = false)] protected Keymap (); public bool get_caps_lock_state (); +#if HAS_MUTTER46 + public virtual Clutter.TextDirection get_direction (); +#else public virtual Pango.Direction get_direction (); +#endif public bool get_num_lock_state (); public bool caps_lock_state { get; } public bool num_lock_state { get; } @@ -6287,8 +6397,13 @@ namespace Clutter { } [CCode (cheader_filename = "clutter/clutter.h", type_id = "clutter_layer_node_get_type ()")] public class LayerNode : Clutter.PaintNode { +#if HAS_MUTTER46 + [CCode (has_construct_function = false)] + protected LayerNode (); +#else [CCode (has_construct_function = false, type = "ClutterPaintNode*")] public LayerNode (Graphene.Matrix projection, Cairo.Rectangle viewport, float width, float height, uint8 opacity); +#endif [CCode (has_construct_function = false, type = "ClutterPaintNode*")] public LayerNode.to_framebuffer (Cogl.Framebuffer framebuffer, Cogl.Pipeline pipeline); } @@ -6297,6 +6412,15 @@ namespace Clutter { public abstract class LayoutManager : GLib.InitiallyUnowned { [CCode (has_construct_function = false)] protected LayoutManager (); +#if HAS_MUTTER46 + public virtual void allocate (Clutter.Actor container, Clutter.ActorBox allocation); + public void child_get (Clutter.Actor container, Clutter.Actor actor, ...); + public void child_get_property (Clutter.Actor container, Clutter.Actor actor, string property_name, GLib.Value value); + public void child_set (Clutter.Actor container, Clutter.Actor actor, ...); + public void child_set_property (Clutter.Actor container, Clutter.Actor actor, string property_name, GLib.Value value); + [NoWrapper] + public virtual unowned Clutter.LayoutMeta create_child_meta (Clutter.Actor container, Clutter.Actor actor); +#else public virtual void allocate (Clutter.Container container, Clutter.ActorBox allocation); public void child_get (Clutter.Container container, Clutter.Actor actor, ...); public void child_get_property (Clutter.Container container, Clutter.Actor actor, string property_name, GLib.Value value); @@ -6304,25 +6428,52 @@ namespace Clutter { public void child_set_property (Clutter.Container container, Clutter.Actor actor, string property_name, GLib.Value value); [NoWrapper] public virtual unowned Clutter.LayoutMeta create_child_meta (Clutter.Container container, Clutter.Actor actor); +#endif public unowned GLib.ParamSpec find_child_property (string name); [Version (since = "1.0")] +#if HAS_MUTTER46 + public unowned Clutter.LayoutMeta get_child_meta (Clutter.Actor container, Clutter.Actor actor); +#else public unowned Clutter.LayoutMeta get_child_meta (Clutter.Container container, Clutter.Actor actor); +#endif [NoWrapper] public virtual GLib.Type get_child_meta_type (); +#if HAS_MUTTER46 + public virtual void get_preferred_height (Clutter.Actor container, float for_width, out float min_height_p, out float nat_height_p); + public virtual void get_preferred_width (Clutter.Actor container, float for_height, out float min_width_p, out float nat_width_p); +#else public virtual void get_preferred_height (Clutter.Container container, float for_width, out float min_height_p, out float nat_height_p); public virtual void get_preferred_width (Clutter.Container container, float for_height, out float min_width_p, out float nat_width_p); +#endif [CCode (array_length_pos = 0.1, array_length_type = "guint")] public GLib.ParamSpec[] list_child_properties (); +#if HAS_MUTTER46 + public virtual void set_container (Clutter.Actor? container); +#else public virtual void set_container (Clutter.Container? container); +#endif [HasEmitter] public virtual signal void layout_changed (); } [CCode (cheader_filename = "clutter/clutter.h", type_id = "clutter_layout_meta_get_type ()")] [Version (since = "1.2")] +#if HAS_MUTTER46 + public abstract class LayoutMeta : GLib.Object { +#else public abstract class LayoutMeta : Clutter.ChildMeta { +#endif [CCode (has_construct_function = false)] protected LayoutMeta (); +#if HAS_MUTTER46 + public unowned Clutter.Actor get_actor (); + public unowned Clutter.Actor get_container (); +#endif public unowned Clutter.LayoutManager get_manager (); +#if HAS_MUTTER46 + public bool is_for (Clutter.LayoutManager manager, Clutter.Actor container, Clutter.Actor actor); + public Clutter.Actor actor { get; construct; } + public Clutter.Actor container { get; construct; } +#endif public Clutter.LayoutManager manager { get; construct; } } [CCode (cheader_filename = "clutter/clutter.h", has_type_id = false)] @@ -6354,12 +6505,20 @@ namespace Clutter { public abstract class OffscreenEffect : Clutter.Effect { [CCode (has_construct_function = false)] protected OffscreenEffect (); +#if HAS_MUTTER46 + public virtual Cogl.Texture create_texture (float width, float height); +#else public virtual Cogl.Handle create_texture (float width, float height); +#endif public unowned Cogl.Pipeline? get_pipeline (); [Version (deprecated = true, deprecated_since = "1.14", since = "1.8")] public bool get_target_size (out float width, out float height); [Version (since = "1.10")] +#if HAS_MUTTER46 + public unowned Cogl.Texture get_texture (); +#else public unowned Cogl.Handle get_texture (); +#endif public virtual void paint_target (Clutter.PaintNode node, Clutter.PaintContext paint_context); } [CCode (cheader_filename = "clutter/clutter.h", has_type_id = false)] @@ -6437,7 +6596,11 @@ namespace Clutter { public class PaintContext { public void destroy (); public unowned Cogl.Framebuffer get_framebuffer (); +#if HAS_MUTTER46 + public unowned Mtk.Region get_redraw_clip (); +#else public unowned Cairo.Region get_redraw_clip (); +#endif public void pop_framebuffer (); public void push_framebuffer (Cogl.Framebuffer framebuffer); public unowned Clutter.PaintContext @ref (); @@ -6488,6 +6651,7 @@ namespace Clutter { public signal bool pan (Clutter.Actor actor, bool is_interpolated); public virtual signal void pan_stopped (Clutter.Actor actor); } +#if !HAS_MUTTER46 [CCode (cheader_filename = "clutter/clutter.h", lower_case_csuffix = "param_units", type_id = "clutter_param_units_get_type ()")] public class ParamSpecUnit : GLib.ParamSpec { [CCode (has_construct_function = false)] @@ -6543,6 +6707,7 @@ namespace Clutter { public Clutter.Path path { get; set; } public signal void node_reached (Clutter.Actor actor, uint index); } +#endif [CCode (cheader_filename = "clutter/clutter.h", ref_function = "clutter_pick_context_ref", type_id = "clutter_pick_context_get_type ()", unref_function = "clutter_pick_context_unref")] [Compact] public class PickContext { @@ -6565,7 +6730,11 @@ namespace Clutter { } [CCode (cheader_filename = "clutter/clutter.h", type_id = "clutter_property_transition_get_type ()")] [Version (since = "1.10")] +#if HAS_MUTTER46 + public class PropertyTransition : Clutter.Transition { +#else public class PropertyTransition : Clutter.Transition, Clutter.Scriptable { +#endif [CCode (has_construct_function = false, type = "ClutterTransition*")] public PropertyTransition (string? property_name); [CCode (has_construct_function = false, type = "ClutterTransition*")] @@ -6601,6 +6770,7 @@ namespace Clutter { public RotateAction (); public signal bool rotate (Clutter.Actor actor, double angle); } +#if !HAS_MUTTER46 [CCode (cheader_filename = "clutter/clutter.h", type_id = "clutter_script_get_type ()")] [Version (since = "0.6")] public class Script : GLib.Object { @@ -6634,9 +6804,14 @@ namespace Clutter { [Version (since = "1.10")] public string translation_domain { get; set; } } +#endif [CCode (cheader_filename = "clutter/clutter.h", type_id = "clutter_scroll_actor_get_type ()")] [Version (since = "1.12")] +#if HAS_MUTTER46 + public class ScrollActor : Clutter.Actor, Atk.Implementor, Clutter.Animatable { +#else public class ScrollActor : Clutter.Actor, Atk.Implementor, Clutter.Animatable, Clutter.Container, Clutter.Scriptable { +#endif [CCode (has_construct_function = false, type = "ClutterActor*")] public ScrollActor (); public Clutter.ScrollMode get_scroll_mode (); @@ -6714,7 +6889,7 @@ namespace Clutter { } [CCode (cheader_filename = "clutter/clutter.h", type_id = "clutter_settings_get_type ()")] [Version (since = "1.4")] - public class Settings : GLib.Object { + public sealed class Settings : GLib.Object { [CCode (has_construct_function = false)] protected Settings (); public static unowned Clutter.Settings get_default (); @@ -6752,18 +6927,25 @@ namespace Clutter { [NoAccessorMethod] public int unscaled_font_dpi { set; } } +#if !HAS_MUTTER46 [CCode (cheader_filename = "clutter/clutter.h", has_type_id = false)] [Compact] public class Shader { } +#endif [CCode (cheader_filename = "clutter/clutter.h", type_id = "clutter_shader_effect_get_type ()")] [Version (since = "1.4")] public class ShaderEffect : Clutter.OffscreenEffect { [CCode (has_construct_function = false, type = "ClutterEffect*")] [Version (since = "1.8")] public ShaderEffect (Clutter.ShaderType shader_type); +#if HAS_MUTTER46 + public unowned Cogl.Program get_program (); + public unowned Cogl.Shader get_shader (); +#else public unowned Cogl.Handle get_program (); public unowned Cogl.Handle get_shader (); +#endif [NoWrapper] public virtual string get_static_shader_source (); public bool set_shader_source (string source); @@ -6788,7 +6970,7 @@ namespace Clutter { } [CCode (cheader_filename = "clutter/clutter.h", type_id = "clutter_snap_constraint_get_type ()")] [Version (since = "1.6")] - public class SnapConstraint : Clutter.Constraint { + public sealed class SnapConstraint : Clutter.Constraint { [CCode (has_construct_function = false, type = "ClutterConstraint*")] public SnapConstraint (Clutter.Actor? source, Clutter.SnapEdge from_edge, Clutter.SnapEdge to_edge, float offset); public void get_edges (out Clutter.SnapEdge from_edge, out Clutter.SnapEdge to_edge); @@ -6806,7 +6988,11 @@ namespace Clutter { } [CCode (cheader_filename = "clutter/clutter.h", type_id = "clutter_stage_get_type ()")] [Version (since = "0.2")] +#if HAS_MUTTER46 + public class Stage : Clutter.Actor, Atk.Implementor, Clutter.Animatable { +#else public class Stage : Clutter.Actor, Atk.Implementor, Clutter.Animatable, Clutter.Container, Clutter.Scriptable { +#endif [CCode (has_construct_function = false)] protected Stage (); #if HAS_MUTTER45 @@ -6871,7 +7057,9 @@ namespace Clutter { #endif [Version (since = "0.4")] public void set_title (string title); -#if HAS_MUTTER44 +#if HAS_MUTTER46 + 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); +#elif HAS_MUTTER44 public void update_device (Clutter.InputDevice device, Clutter.EventSequence sequence, Clutter.InputDevice source_device, Graphene.Point point, uint32 time, Clutter.Actor new_actor, Cairo.Region region, bool emit_crossing); #else public void update_device (Clutter.InputDevice device, Clutter.EventSequence sequence, Graphene.Point point, uint32 time, Clutter.Actor new_actor, Cairo.Region region, bool emit_crossing); @@ -6964,7 +7152,11 @@ namespace Clutter { public void schedule_update_now (); #endif [NoWrapper] +#if HAS_MUTTER46 + public virtual void setup_offscreen_transform (Cogl.Pipeline pipeline); +#else public virtual void setup_offscreen_blit_pipeline (Cogl.Pipeline pipeline); +#endif [NoWrapper] #if HAS_MUTTER45 public virtual void transform_rect_to_onscreen (Mtk.Rectangle src_rect, int dst_width, int dst_height, Mtk.Rectangle dst_rect); @@ -6997,10 +7189,16 @@ namespace Clutter { public class SwipeAction : Clutter.GestureAction { [CCode (has_construct_function = false, type = "ClutterAction*")] public SwipeAction (); +#if !HAS_MUTTER46 [Version (deprecated = true, deprecated_since = "1.14", since = "1.8")] public virtual signal void swept (Clutter.Actor actor, Clutter.SwipeDirection direction); +#endif [Version (since = "1.14")] +#if HAS_MUTTER46 + public virtual signal bool swipe (Clutter.Actor actor, Clutter.SwipeDirection direction); +#else public signal bool swipe (Clutter.Actor actor, Clutter.SwipeDirection direction); +#endif } [CCode (cheader_filename = "clutter/clutter.h", type_id = "clutter_tap_action_get_type ()")] [Version (since = "1.14")] @@ -7011,7 +7209,11 @@ namespace Clutter { } [CCode (cheader_filename = "clutter/clutter.h", type_id = "clutter_text_get_type ()")] [Version (since = "1.0")] +#if HAS_MUTTER46 + public class Text : Clutter.Actor, Atk.Implementor, Clutter.Animatable { +#else public class Text : Clutter.Actor, Atk.Implementor, Clutter.Animatable, Clutter.Container, Clutter.Scriptable { +#endif [CCode (has_construct_function = false, type = "ClutterActor*")] public Text (); [Version (since = "1.10")] @@ -7128,9 +7330,11 @@ namespace Clutter { public Pango.WrapMode line_wrap_mode { get; set; } public int max_length { get; set; } public uint password_char { get; set; } +#if !HAS_MUTTER46 [NoAccessorMethod] [Version (deprecated = true, deprecated_since = "1.12", since = "1.0")] public int position { get; set; } +#endif public bool selectable { get; set; } [Version (since = "1.8")] public Clutter.Color selected_text_color { get; set; } @@ -7147,8 +7351,10 @@ namespace Clutter { public virtual signal void activate (); [Version (since = "1.16")] public virtual signal void cursor_changed (); +#if !HAS_MUTTER46 [Version (deprecated = true, deprecated_since = "1.16", since = "1.0")] public virtual signal void cursor_event (Graphene.Rect rect); +#endif [HasEmitter] [Version (since = "1.2")] public signal void delete_text (int start_pos, int end_pos); @@ -7206,10 +7412,18 @@ namespace Clutter { } [CCode (cheader_filename = "clutter/clutter.h", type_id = "clutter_timeline_get_type ()")] [Version (since = "0.2")] +#if HAS_MUTTER46 + public class Timeline : GLib.Object { +#else public class Timeline : GLib.Object, Clutter.Scriptable { +#endif [CCode (has_construct_function = false)] [Version (since = "0.6")] +#if HAS_MUTTER46 + protected Timeline (); +#else public Timeline (uint duration_ms); +#endif [Version (since = "1.14")] public void add_marker (string marker_name, double progress); [Version (since = "0.8")] @@ -7394,7 +7608,11 @@ namespace Clutter { } [CCode (cheader_filename = "clutter/clutter.h", type_id = "clutter_transition_get_type ()")] [Version (since = "1.10")] +#if HAS_MUTTER46 + public abstract class Transition : Clutter.Timeline { +#else public abstract class Transition : Clutter.Timeline, Clutter.Scriptable { +#endif [CCode (has_construct_function = false)] protected Transition (); [NoWrapper] @@ -7419,7 +7637,11 @@ namespace Clutter { } [CCode (cheader_filename = "clutter/clutter.h", type_id = "clutter_transition_group_get_type ()")] [Version (since = "1.12")] +#if HAS_MUTTER46 + public sealed class TransitionGroup : Clutter.Transition { +#else public class TransitionGroup : Clutter.Transition, Clutter.Scriptable { +#endif [CCode (has_construct_function = false, type = "ClutterTransition*")] public TransitionGroup (); public void add_transition (Clutter.Transition transition); @@ -7466,10 +7688,15 @@ namespace Clutter { [Version (since = "1.4")] public abstract void set_final_state (string property_name, GLib.Value value); } +#if HAS_MUTTER46 + [CCode (cheader_filename = "clutter/clutter.h")] +#else [CCode (cheader_filename = "clutter/clutter.h", type_id = "clutter_container_get_type ()")] [Version (since = "0.4")] +#endif public interface Container : GLib.Object { public void add (params Clutter.Actor[] actors); +#if !HAS_MUTTER46 [CCode (vfunc_name = "add")] [Version (deprecated = true, deprecated_since = "1.10", since = "0.4")] public abstract void add_actor (Clutter.Actor actor); @@ -7487,12 +7714,16 @@ namespace Clutter { public virtual void destroy_child_meta (Clutter.Actor actor); [Version (since = "0.6")] public unowned Clutter.Actor find_child_by_name (string child_name); +#endif [CCode (cname = "clutter_container_class_find_child_property")] public class unowned GLib.ParamSpec find_child_property (string property_name); +#if !HAS_MUTTER46 [Version (since = "0.8")] public virtual unowned Clutter.ChildMeta get_child_meta (Clutter.Actor actor); +#endif [CCode (cname = "clutter_container_class_list_child_properties")] public class unowned GLib.ParamSpec[] list_child_properties (); +#if !HAS_MUTTER46 [Version (deprecated = true, deprecated_since = "1.10", since = "0.4")] public void remove (...); [CCode (vfunc_name = "remove")] @@ -7503,6 +7734,7 @@ namespace Clutter { [HasEmitter] [Version (since = "0.8")] public virtual signal void child_notify (Clutter.Actor child, GLib.ParamSpec pspec); +#endif } [CCode (cheader_filename = "clutter/clutter.h", type_cname = "ClutterContentInterface", type_id = "clutter_content_get_type ()")] public interface Content : GLib.Object { @@ -7514,6 +7746,7 @@ namespace Clutter { public virtual signal void attached (Clutter.Actor actor); public virtual signal void detached (Clutter.Actor actor); } +#if !HAS_MUTTER46 [CCode (cheader_filename = "clutter/clutter.h", type_id = "clutter_scriptable_get_type ()")] [Version (since = "0.6")] public interface Scriptable : GLib.Object { @@ -7522,6 +7755,7 @@ namespace Clutter { public abstract void set_custom_property (Clutter.Script script, string name, GLib.Value value); public abstract void set_id (string id_); } +#endif [CCode (cheader_filename = "clutter/clutter.h", copy_function = "g_boxed_copy", free_function = "g_boxed_free", type_id = "clutter_actor_box_get_type ()")] public struct ActorBox { public float x1; @@ -7583,11 +7817,13 @@ namespace Clutter { } [CCode (cheader_filename = "clutter/clutter.h", has_copy_function = false, has_destroy_function = false, has_type_id = false)] public struct Capture { +#if !HAS_MUTTER46 public Cairo.ImageSurface image; #if HAS_MUTTER45 public Mtk.Rectangle rect; #else public Cairo.RectangleInt rect; +#endif #endif } [CCode (cheader_filename = "clutter/clutter.h", copy_function = "g_boxed_copy", free_function = "g_boxed_free", type_id = "clutter_color_get_type ()")] @@ -7596,12 +7832,16 @@ namespace Clutter { public uint8 green; public uint8 blue; public uint8 alpha; +#if !HAS_MUTTER46 public Clutter.Color add (Clutter.Color b); +#endif [Version (since = "1.12")] public static Clutter.Color? alloc (); [Version (since = "0.2")] public Clutter.Color? copy (); +#if !HAS_MUTTER46 public Clutter.Color darken (); +#endif [Version (since = "0.2")] public bool equal (Clutter.Color v2); [Version (since = "0.2")] @@ -7627,8 +7867,10 @@ namespace Clutter { color.init_from_string (str); return color; } +#if !HAS_MUTTER46 [Version (since = "1.6")] public static unowned Clutter.Color? get_static (Clutter.StaticColor color); +#endif [Version (since = "1.0")] public uint hash (); [Version (since = "1.12")] @@ -7642,16 +7884,21 @@ namespace Clutter { public bool init_from_string (string str); [Version (since = "1.6")] public Clutter.Color interpolate (Clutter.Color final, double progress); +#if !HAS_MUTTER46 public Clutter.Color lighten (); +#endif [CCode (cname = "clutter_color_from_string")] public bool parse_string (string str); +#if !HAS_MUTTER46 public Clutter.Color shade (double factor); public Clutter.Color subtract (Clutter.Color b); +#endif public void to_hls (out float hue, out float luminance, out float saturation); public uint32 to_pixel (); [Version (since = "0.2")] public string to_string (); } +#if !HAS_MUTTER46 [CCode (cheader_filename = "clutter/clutter.h", copy_function = "g_boxed_copy", free_function = "g_boxed_free", type_id = "clutter_knot_get_type ()")] [Version (since = "0.2")] public struct Knot { @@ -7661,6 +7908,7 @@ namespace Clutter { public bool equal (Clutter.Knot knot_b); public void free (); } +#endif [CCode (cheader_filename = "clutter/clutter.h", copy_function = "g_boxed_copy", free_function = "g_boxed_free", type_id = "clutter_margin_get_type ()")] [Version (since = "1.10")] public struct Margin { @@ -7701,6 +7949,7 @@ namespace Clutter { [Version (since = "1.10")] public void union_box (Clutter.ActorBox box); } +#if !HAS_MUTTER46 [CCode (cheader_filename = "clutter/clutter.h", copy_function = "g_boxed_copy", free_function = "g_boxed_free", type_id = "clutter_path_node_get_type ()")] [Version (since = "1.0")] public struct PathNode { @@ -7711,6 +7960,7 @@ namespace Clutter { public bool equal (Clutter.PathNode node_b); public void free (); } +#endif [CCode (cheader_filename = "clutter/clutter.h", copy_function = "g_boxed_copy", free_function = "g_boxed_free", type_id = "clutter_perspective_get_type ()")] [Version (since = "0.4")] public struct Perspective { @@ -7732,11 +7982,17 @@ namespace Clutter { public int dwell_delay; public int dwell_threshold; } +#if HAS_MUTTER46 + [CCode (cheader_filename = "clutter/clutter.h")] +#else [CCode (cheader_filename = "clutter/clutter.h", copy_function = "g_boxed_copy", free_function = "g_boxed_free", type_id = "clutter_units_get_type ()")] [Version (since = "1.0")] +#endif public struct Units { +#if !HAS_MUTTER46 public Clutter.Units? copy (); public void free (); +#endif [CCode (cname = "clutter_units_from_cm")] public Units.from_cm (float cm); [CCode (cname = "clutter_units_from_em")] @@ -7751,10 +8007,12 @@ namespace Clutter { public Units.from_pt (float pt); [CCode (cname = "clutter_units_from_string")] public Units.from_string (string str); +#if !HAS_MUTTER46 public Clutter.UnitType get_unit_type (); public float get_unit_value (); public float to_pixels (); public string to_string (); +#endif } [CCode (cheader_filename = "clutter/clutter.h", cprefix = "CLUTTER_ACTOR_ALIGN_", type_id = "clutter_actor_align_get_type ()")] [Version (since = "1.10")] @@ -7825,6 +8083,7 @@ namespace Clutter { EASE_IN_OUT, ANIMATION_LAST } +#if !HAS_MUTTER46 [CCode (cheader_filename = "clutter/clutter.h", cprefix = "CLUTTER_BIN_ALIGNMENT_", type_id = "clutter_bin_alignment_get_type ()")] [Version (since = "1.2")] public enum BinAlignment { @@ -7838,6 +8097,7 @@ namespace Clutter { [Version (deprecated = true)] CENTER } +#endif [CCode (cheader_filename = "clutter/clutter.h", cprefix = "CLUTTER_BIND_", type_id = "clutter_bind_coordinate_get_type ()")] [Version (since = "1.4")] public enum BindCoordinate { @@ -7849,6 +8109,7 @@ namespace Clutter { SIZE, ALL } +#if !HAS_MUTTER46 [CCode (cheader_filename = "clutter/clutter.h", cprefix = "CLUTTER_BOX_ALIGNMENT_", type_id = "clutter_box_alignment_get_type ()")] [Version (since = "1.2")] public enum BoxAlignment { @@ -7856,6 +8117,7 @@ namespace Clutter { END, CENTER } +#endif [CCode (cheader_filename = "clutter/clutter.h", cprefix = "CLUTTER_BUTTON_STATE_", type_id = "clutter_button_state_get_type ()")] public enum ButtonState { RELEASED, @@ -7893,6 +8155,14 @@ namespace Clutter { Y_AXIS, BOTH } +#if HAS_MUTTER46 + [CCode (cheader_filename = "clutter/clutter.h", cprefix = "CLUTTER_CONTEXT_FLAG_", type_id = "clutter_context_flags_get_type ()")] + [Flags] + public enum ContextFlags { + NONE, + NO_A11Y + } +#endif [CCode (cheader_filename = "clutter/clutter.h", cprefix = "CLUTTER_DEBUG_", type_id = "clutter_debug_flag_get_type ()")] [Flags] public enum DebugFlag { @@ -7920,6 +8190,7 @@ namespace Clutter { #endif DETAILED_TRACE } +#if !HAS_MUTTER46 [CCode (cheader_filename = "clutter/clutter.h", cprefix = "CLUTTER_DRAG_", type_id = "clutter_drag_axis_get_type ()")] [Version (since = "1.4")] public enum DragAxis { @@ -7927,6 +8198,7 @@ namespace Clutter { X_AXIS, Y_AXIS } +#endif [CCode (cheader_filename = "clutter/clutter.h", cprefix = "CLUTTER_DEBUG_", type_id = "clutter_draw_debug_flag_get_type ()")] [Flags] public enum DrawDebugFlag { @@ -8007,12 +8279,21 @@ namespace Clutter { SHADERS_GLSL } #endif +#if !HAS_MUTTER46 [CCode (cheader_filename = "clutter/clutter.h", cprefix = "CLUTTER_FLOW_", type_id = "clutter_flow_orientation_get_type ()")] [Version (since = "1.2")] public enum FlowOrientation { HORIZONTAL, VERTICAL } +#endif +#if HAS_MUTTER46 + [CCode (cheader_filename = "clutter/clutter.h", cprefix = "CLUTTER_FRAME_CLOCK_MODE_", type_id = "clutter_frame_clock_mode_get_type ()")] + public enum FrameClockMode { + FIXED, + VARIABLE + } +#endif [CCode (cheader_filename = "clutter/clutter.h", cprefix = "CLUTTER_FRAME_INFO_FLAG_", type_id = "clutter_frame_info_flag_get_type ()")] [Flags] public enum FrameInfoFlag { @@ -8280,6 +8561,7 @@ namespace Clutter { Y_AXIS, AXIS_AUTO } +#if !HAS_MUTTER46 [CCode (cheader_filename = "clutter/clutter.h", cprefix = "CLUTTER_PATH_", type_id = "clutter_path_node_type_get_type ()")] [Version (since = "1.0")] public enum PathNodeType { @@ -8291,6 +8573,7 @@ namespace Clutter { REL_LINE_TO, REL_CURVE_TO } +#endif [CCode (cheader_filename = "clutter/clutter.h", cprefix = "CLUTTER_DEBUG_NOP_", type_id = "clutter_pick_debug_flag_get_type ()")] [Flags] public enum PickDebugFlag { @@ -8426,6 +8709,7 @@ namespace Clutter { BOTTOM, LEFT } +#if !HAS_MUTTER46 [CCode (cheader_filename = "clutter/clutter.h", cprefix = "CLUTTER_COLOR_", type_id = "clutter_static_color_get_type ()")] [Version (since = "1.6")] public enum StaticColor { @@ -8475,6 +8759,7 @@ namespace Clutter { ALUMINIUM_6, TRANSPARENT } +#endif [CCode (cheader_filename = "clutter/clutter.h", cprefix = "CLUTTER_STEP_MODE_", type_id = "clutter_step_mode_get_type ()")] [Version (since = "1.12")] public enum StepMode { @@ -8529,6 +8814,7 @@ namespace Clutter { END, CANCEL } +#if !HAS_MUTTER46 [CCode (cheader_filename = "clutter/clutter.h", cprefix = "CLUTTER_UNIT_", type_id = "clutter_unit_type_get_type ()")] [Version (since = "1.0")] public enum UnitType { @@ -8538,6 +8824,7 @@ namespace Clutter { POINT, CM } +#endif [CCode (cheader_filename = "clutter/clutter.h", cprefix = "CLUTTER_VIRTUAL_DEVICE_TYPE_", type_id = "clutter_virtual_device_type_get_type ()")] [Flags] public enum VirtualDeviceType { @@ -8554,6 +8841,7 @@ namespace Clutter { public static GLib.Quark quark (); } #endif +#if !HAS_MUTTER46 [CCode (cheader_filename = "clutter/clutter.h", cprefix = "CLUTTER_SCRIPT_ERROR_INVALID_", type_id = "clutter_script_error_get_type ()")] [Version (since = "0.6")] public errordomain ScriptError { @@ -8562,14 +8850,17 @@ namespace Clutter { VALUE; public static GLib.Quark quark (); } +#endif [CCode (cheader_filename = "clutter/clutter.h", instance_pos = 1.9)] [Version (since = "1.24")] public delegate Clutter.Actor ActorCreateChildFunc (GLib.Object item); +#if !HAS_MUTTER46 [CCode (cheader_filename = "clutter/clutter.h", instance_pos = 4.9)] [Version (since = "1.0")] public delegate bool BindingActionFunc (GLib.Object gobject, string action_name, uint key_val, Clutter.ModifierType modifiers); [CCode (cheader_filename = "clutter/clutter.h", instance_pos = 1.9)] public delegate void Callback (Clutter.Actor actor); +#endif #if HAS_MUTTER43 [CCode (cheader_filename = "clutter/clutter.h", instance_pos = 2.9)] [Version (since = "1.18")] @@ -8579,15 +8870,19 @@ namespace Clutter { [Version (since = "1.18")] public delegate bool EventFilterFunc (Clutter.Event event); #endif +#if !HAS_MUTTER46 [CCode (cheader_filename = "clutter/clutter.h", instance_pos = 1.9)] [Version (since = "1.0")] public delegate void PathCallback (Clutter.PathNode node); +#endif [CCode (cheader_filename = "clutter/clutter.h", has_target = false)] [Version (since = "1.0")] public delegate bool ProgressFunc (GLib.Value a, GLib.Value b, double progress, GLib.Value retval); +#if !HAS_MUTTER46 [CCode (cheader_filename = "clutter/clutter.h", instance_pos = 6.9)] [Version (since = "0.6")] public delegate void ScriptConnectFunc (Clutter.Script script, GLib.Object object, string signal_name, string handler_name, GLib.Object connect_object, GLib.ConnectFlags flags); +#endif #if HAS_MUTTER45 [CCode (cheader_filename = "clutter/clutter.h", instance_pos = 3.9)] public delegate bool StageInputForeachFunc (Clutter.Stage stage, Clutter.InputDevice device, Clutter.EventSequence sequence); @@ -8614,17 +8909,21 @@ namespace Clutter { [Version (deprecated = true, deprecated_since = "1.10", since = "0.4")] public const string FLAVOUR; #endif +#if !HAS_MUTTER46 [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_PATH_RELATIVE")] public const int PATH_RELATIVE; +#endif [CCode (cheader_filename = "clutter/clutter.h", cname = "CLUTTER_PRIORITY_REDRAW")] [Version (since = "0.8")] public const int PRIORITY_REDRAW; +#if !HAS_MUTTER46 [CCode (cheader_filename = "clutter/clutter.h")] [Version (since = "1.12")] public static void cairo_clear (Cairo.Context cr); [CCode (cheader_filename = "clutter/clutter.h")] [Version (since = "1.0")] public static void cairo_set_source_color (Cairo.Context cr, Clutter.Color color); +#endif [CCode (cheader_filename = "clutter/clutter.h")] public static void debug_set_max_render_time_constant (int max_render_time_constant_us); [CCode (cheader_filename = "clutter/clutter.h")] @@ -8658,9 +8957,11 @@ namespace Clutter { [CCode (cheader_filename = "clutter/clutter.h")] [Version (since = "1.0")] public static unowned Pango.FontMap get_font_map (); +#if !HAS_MUTTER46 [CCode (cheader_filename = "clutter/clutter.h")] [Version (since = "0.6")] public static unowned string get_script_id (GLib.Object gobject); +#endif #if HAS_MUTTER44 [CCode (cheader_filename = "clutter/clutter.h")] public static Clutter.TextDirection get_text_direction (); @@ -8671,7 +8972,7 @@ namespace Clutter { [CCode (cheader_filename = "clutter/clutter.h")] public static void keyval_convert_case (uint symbol, out uint lower, out uint upper); [CCode (cheader_filename = "clutter/clutter.h")] - public static string? keyval_name (uint keyval); + public static unowned string? keyval_name (uint keyval); #endif [CCode (cheader_filename = "clutter/clutter.h")] [Version (since = "1.10")] diff --git a/vapi/mutter-cogl-14.deps b/vapi/mutter-cogl-14.deps new file mode 100644 index 00000000..d73ec164 --- /dev/null +++ b/vapi/mutter-cogl-14.deps @@ -0,0 +1,4 @@ +pango +glib-2.0 +gio-2.0 +mutter-mtk-14 diff --git a/vapi/mutter-cogl-14.vapi b/vapi/mutter-cogl-14.vapi new file mode 100644 index 00000000..2aa709a5 --- /dev/null +++ b/vapi/mutter-cogl-14.vapi @@ -0,0 +1,1168 @@ +/* mutter-cogl-14.vapi generated by vapigen, do not modify. */ + +[CCode (cprefix = "Cogl", gir_namespace = "Cogl", gir_version = "14", lower_case_cprefix = "cogl_")] +namespace Cogl { + [CCode (cheader_filename = "cogl/cogl.h", type_id = "cogl_atlas_texture_get_type ()")] + public sealed class AtlasTexture : Cogl.Texture { + [CCode (has_construct_function = false)] + protected AtlasTexture (); + [CCode (has_construct_function = false, type = "CoglTexture*")] + public AtlasTexture.from_bitmap (Cogl.Bitmap bmp); + [CCode (has_construct_function = false, type = "CoglTexture*")] + public AtlasTexture.from_data (Cogl.Context ctx, int width, int height, Cogl.PixelFormat format, int rowstride, uint8 data) throws GLib.Error; + [CCode (has_construct_function = false, type = "CoglTexture*")] + public AtlasTexture.with_size (Cogl.Context ctx, int width, int height); + } + [CCode (cheader_filename = "cogl/cogl.h", type_id = "cogl_attribute_get_type ()")] + public class Attribute : GLib.Object { + [CCode (has_construct_function = false)] + public Attribute (Cogl.AttributeBuffer attribute_buffer, string name, size_t stride, size_t offset, int components, Cogl.AttributeType type); + [CCode (has_construct_function = false)] + public Attribute.const_1f (Cogl.Context context, string name, float value); + [CCode (has_construct_function = false)] + public Attribute.const_2f (Cogl.Context context, string name, float component0, float component1); + [CCode (has_construct_function = false)] + public Attribute.const_2fv (Cogl.Context context, string name, float value); + [CCode (has_construct_function = false)] + public Attribute.const_2x2fv (Cogl.Context context, string name, float matrix2x2, bool transpose); + [CCode (has_construct_function = false)] + public Attribute.const_3f (Cogl.Context context, string name, float component0, float component1, float component2); + [CCode (has_construct_function = false)] + public Attribute.const_3fv (Cogl.Context context, string name, float value); + [CCode (has_construct_function = false)] + public Attribute.const_3x3fv (Cogl.Context context, string name, float matrix3x3, bool transpose); + [CCode (has_construct_function = false)] + public Attribute.const_4f (Cogl.Context context, string name, float component0, float component1, float component2, float component3); + [CCode (has_construct_function = false)] + public Attribute.const_4fv (Cogl.Context context, string name, float value); + [CCode (has_construct_function = false)] + public Attribute.const_4x4fv (Cogl.Context context, string name, float matrix4x4, bool transpose); + public unowned Cogl.AttributeBuffer get_buffer (); + public bool get_normalized (); + public void set_buffer (Cogl.AttributeBuffer attribute_buffer); + public void set_normalized (bool normalized); + } + [CCode (cheader_filename = "cogl/cogl.h", type_id = "cogl_attribute_buffer_get_type ()")] + public sealed class AttributeBuffer : Cogl.Buffer { + [CCode (has_construct_function = false)] + public AttributeBuffer (Cogl.Context context, [CCode (array_length_cname = "bytes", array_length_pos = 1.5, array_length_type = "gsize")] uint8[] data); + [CCode (has_construct_function = false)] + public AttributeBuffer.with_size (Cogl.Context context, size_t bytes); + } + [CCode (cheader_filename = "cogl/cogl.h", type_id = "cogl_bitmap_get_type ()")] + public class Bitmap : GLib.Object { + [CCode (has_construct_function = false)] + protected Bitmap (); + [CCode (has_construct_function = false)] + public Bitmap.for_data (Cogl.Context context, int width, int height, Cogl.PixelFormat format, int rowstride, [CCode (array_length = false)] owned uint8[] data); + [CCode (has_construct_function = false)] + public Bitmap.from_buffer (Cogl.Buffer buffer, Cogl.PixelFormat format, int width, int height, int rowstride, int offset); + public unowned Cogl.Buffer? get_buffer (); + public Cogl.PixelFormat get_format (); + public int get_height (); + public int get_rowstride (); + public int get_width (); + [CCode (has_construct_function = false)] + public Bitmap.with_size (Cogl.Context context, uint width, uint height, Cogl.PixelFormat format); + } + [CCode (cheader_filename = "cogl/cogl.h", type_id = "cogl_buffer_get_type ()")] + public abstract class Buffer : GLib.Object { + [CCode (has_construct_function = false)] + protected Buffer (); + public uint get_size (); + public Cogl.BufferUpdateHint get_update_hint (); + public void* map (Cogl.BufferAccess access, Cogl.BufferMapHint hints); + public void* map_range (size_t offset, size_t size, Cogl.BufferAccess access, Cogl.BufferMapHint hints) throws GLib.Error; + public bool set_data (size_t offset, [CCode (array_length = false)] uint8[] data, size_t size); + public void set_update_hint (Cogl.BufferUpdateHint hint); + public void unmap (); + [NoAccessorMethod] + public Cogl.Context context { construct; } + [NoAccessorMethod] + public Cogl.BufferBindTarget default_target { construct; } + [NoAccessorMethod] + public uint64 size { construct; } + public Cogl.BufferUpdateHint update_hint { set construct; } + } + [CCode (cheader_filename = "cogl/cogl.h", type_id = "cogl_context_get_type ()")] + public class Context : GLib.Object { + [CCode (has_construct_function = false)] + public Context (Cogl.Display? display) throws GLib.Error; + [CCode (cheader_filename = "cogl/cogl.h", cname = "cogl_foreach_feature")] + public void foreach_feature (Cogl.FeatureCallback callback); + public void free_timestamp_query (owned Cogl.TimestampQuery query); + public unowned Cogl.Display get_display (); + public int64 get_gpu_time_ns (); + [CCode (cheader_filename = "cogl/cogl.h", cname = "cogl_get_graphics_reset_status")] + public Cogl.GraphicsResetStatus get_graphics_reset_status (); + public unowned Cogl.Pipeline get_named_pipeline (Cogl.PipelineKey key); + public unowned Cogl.Renderer get_renderer (); + [CCode (cheader_filename = "cogl/cogl.h", cname = "cogl_has_feature")] + public bool has_feature (Cogl.FeatureID feature); + public bool is_hardware_accelerated (); + public void set_named_pipeline (Cogl.PipelineKey key, Cogl.Pipeline? pipeline); + public int64 timestamp_query_get_time_ns (Cogl.TimestampQuery query); + } + [CCode (cheader_filename = "cogl/cogl.h", type_id = "cogl_display_get_type ()")] + public class Display : GLib.Object { + [CCode (has_construct_function = false)] + public Display (Cogl.Renderer renderer, Cogl.OnscreenTemplate onscreen_template); + public unowned Cogl.Renderer get_renderer (); + public void set_onscreen_template (Cogl.OnscreenTemplate onscreen_template); + public bool setup () throws GLib.Error; + } + [CCode (cheader_filename = "cogl/cogl.h", free_function = "cogl_dma_buf_handle_free", has_type_id = false)] + [Compact] + public class DmaBufHandle { + [DestroysInstance] + public void free (); + public int get_bpp (); + public int get_fd (); + public unowned Cogl.Framebuffer get_framebuffer (); + public int get_height (); + public int get_offset (); + public int get_stride (); + public int get_width (); + public void* mmap () throws GLib.Error; + public bool munmap (void* data) throws GLib.Error; + public bool sync_read_end () throws GLib.Error; + public bool sync_read_start () throws GLib.Error; + } + [CCode (cheader_filename = "cogl/cogl.h", has_type_id = false)] + [Compact] + public class Fence { + } + [CCode (cheader_filename = "cogl/cogl.h", has_type_id = false)] + [Compact] + public class FenceClosure { + public void* get_user_data (); + } + [CCode (cheader_filename = "cogl/cogl.h", copy_function = "g_boxed_copy", free_function = "g_boxed_free", type_id = "cogl_frame_closure_get_type ()")] + [Compact] + public class FrameClosure { + } + [CCode (cheader_filename = "cogl/cogl.h", type_id = "cogl_frame_info_get_type ()")] + public class FrameInfo : GLib.Object { + [CCode (has_construct_function = false)] + protected FrameInfo (); + public int64 get_frame_counter (); + public int64 get_global_frame_counter (); + 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 (); + public int64 get_time_before_buffer_swap_us (); + public bool is_hw_clock (); + public bool is_vsync (); + public bool is_zero_copy (); + } + [CCode (cheader_filename = "cogl/cogl.h", type_id = "cogl_framebuffer_get_type ()")] + public abstract class Framebuffer : GLib.Object { + [CCode (has_construct_function = false)] + protected Framebuffer (); + public unowned Cogl.FenceClosure? add_fence_callback ([CCode (scope = "async")] Cogl.FenceCallback callback); + public virtual bool allocate () throws GLib.Error; + [CCode (cheader_filename = "cogl/cogl.h", cname = "cogl_blit_framebuffer")] + 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; + public void cancel_fence_callback (Cogl.FenceClosure closure); + public void clear (ulong buffers, Cogl.Color color); + public void clear4f (ulong buffers, float red, float green, float blue, float alpha); + public void discard_buffers (ulong buffers); + public void draw_multitextured_rectangle (Cogl.Pipeline pipeline, float x_1, float y_1, float x_2, float y_2, [CCode (array_length = false)] float[] tex_coords, int tex_coords_len); + public void draw_rectangle (Cogl.Pipeline pipeline, float x_1, float y_1, float x_2, float y_2); + public void draw_rectangles (Cogl.Pipeline pipeline, [CCode (array_length = false)] float[] coordinates, uint n_rectangles); + public void draw_textured_rectangle (Cogl.Pipeline pipeline, float x_1, float y_1, float x_2, float y_2, float s_1, float t_1, float s_2, float t_2); + public void draw_textured_rectangles (Cogl.Pipeline pipeline, [CCode (array_length = false)] float[] coordinates, uint n_rectangles); + public static uint32 error_quark (); + public void finish (); + public void flush (); + public void frustum (float left, float right, float bottom, float top, float z_near, float z_far); + public int get_alpha_bits (); + public int get_blue_bits (); + public unowned Cogl.Context get_context (); + public int get_depth_bits (); + public bool get_depth_write_enabled (); + public bool get_dither_enabled (); + public int get_green_bits (); + public int get_height (); + public bool get_is_stereo (); + public Graphene.Matrix get_modelview_matrix (); + public Graphene.Matrix get_projection_matrix (); + public int get_red_bits (); + public int get_samples_per_pixel (); + public Cogl.StereoMode get_stereo_mode (); + public void get_viewport4fv ([CCode (array_length = false)] out unowned float viewport[4]); + public float get_viewport_height (); + public float get_viewport_width (); + public float get_viewport_x (); + public float get_viewport_y (); + public int get_width (); + public void identity_matrix (); + [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); + public void perspective (float fov_y, float aspect, float z_near, float z_far); + public void pop_clip (); + public void pop_matrix (); + public void push_matrix (); + public void push_primitive_clip (Cogl.Primitive primitive, float bounds_x1, float bounds_y1, float bounds_x2, float bounds_y2); + public void push_rectangle_clip (float x_1, float y_1, float x_2, float y_2); + public void push_region_clip (Mtk.Region region); + public bool read_pixels (int x, int y, int width, int height, Cogl.PixelFormat format, uint8 pixels); + public bool read_pixels_into_bitmap (int x, int y, Cogl.ReadPixelsFlags source, Cogl.Bitmap bitmap); + public void resolve_samples (); + public void resolve_samples_region (int x, int y, int width, int height); + public void rotate (float angle, float x, float y, float z); + public void rotate_euler (Graphene.Euler euler); + public void scale (float x, float y, float z); + public void set_depth_write_enabled (bool depth_write_enabled); + public void set_dither_enabled (bool dither_enabled); + public void set_modelview_matrix (Graphene.Matrix matrix); + public void set_projection_matrix (Graphene.Matrix matrix); + public void set_samples_per_pixel (int samples_per_pixel); + public void set_stereo_mode (Cogl.StereoMode stereo_mode); + public void set_viewport (float x, float y, float width, float height); + public void transform (Graphene.Matrix matrix); + public void translate (float x, float y, float z); + public Cogl.Context context { get; construct; } + [NoAccessorMethod] + public void* driver_config { get; construct; } + [NoAccessorMethod] + public int height { get; set construct; } + [NoAccessorMethod] + public int width { get; set construct; } + public signal void destroy (); + } + [CCode (cheader_filename = "cogl/cogl.h", has_type_id = false)] + [Compact] + public class FramebufferDriverConfig { + } + [CCode (cheader_filename = "cogl/cogl.h", type_id = "cogl_index_buffer_get_type ()")] + public sealed class IndexBuffer : Cogl.Buffer { + [CCode (has_construct_function = false)] + public IndexBuffer (Cogl.Context context, size_t bytes); + } + [CCode (cheader_filename = "cogl/cogl.h", type_id = "cogl_indices_get_type ()")] + public class Indices : GLib.Object { + [CCode (has_construct_function = false)] + public Indices (Cogl.Context context, Cogl.IndicesType type, void* indices_data, int n_indices); + [CCode (has_construct_function = false)] + public Indices.for_buffer (Cogl.IndicesType type, Cogl.IndexBuffer buffer, size_t offset); + public unowned Cogl.IndexBuffer get_buffer (); + public Cogl.IndicesType get_indices_type (); + public size_t get_offset (); + public void set_offset (size_t offset); + } + [CCode (cheader_filename = "cogl/cogl.h", ref_function = "cogl_matrix_entry_ref", type_id = "cogl_matrix_entry_get_type ()", unref_function = "cogl_matrix_entry_unref")] + [Compact] + public class MatrixEntry { + public bool calculate_translation (Cogl.MatrixEntry entry1, out float x, out float y, out float z); + public bool equal (Cogl.MatrixEntry entry1); + public Graphene.Matrix? @get (out Graphene.Matrix matrix); + public bool is_identity (); + public Cogl.MatrixEntry @ref (); + public void unref (); + } + [CCode (cheader_filename = "cogl/cogl.h", type_id = "cogl_matrix_stack_get_type ()")] + public class MatrixStack : GLib.Object { + [CCode (has_construct_function = false)] + public MatrixStack (Cogl.Context ctx); + public void frustum (float left, float right, float bottom, float top, float z_near, float z_far); + public Graphene.Matrix? @get (out Graphene.Matrix matrix); + public unowned Cogl.MatrixEntry get_entry (); + public bool get_inverse (out Graphene.Matrix inverse); + public void load_identity (); + public void multiply (Graphene.Matrix matrix); + public void orthographic (float x_1, float y_1, float x_2, float y_2, float near, float far); + public void perspective (float fov_y, float aspect, float z_near, float z_far); + public void pop (); + public void push (); + public void rotate (float angle, float x, float y, float z); + public void rotate_euler (Graphene.Euler euler); + public void scale (float x, float y, float z); + public void @set (Graphene.Matrix matrix); + public void translate (float x, float y, float z); + } + [CCode (cheader_filename = "cogl/cogl.h", type_id = "cogl_offscreen_get_type ()")] + public class Offscreen : Cogl.Framebuffer { + [CCode (has_construct_function = false)] + protected Offscreen (); + public unowned Cogl.Texture get_texture (); + [CCode (has_construct_function = false)] + public Offscreen.with_texture (Cogl.Texture texture); + } + [CCode (cheader_filename = "cogl/cogl.h", type_id = "cogl_onscreen_get_type ()")] + public class Onscreen : Cogl.Framebuffer { + [CCode (has_construct_function = false)] + protected Onscreen (); + public unowned Cogl.OnscreenDirtyClosure add_dirty_callback (owned Cogl.OnscreenDirtyCallback callback); + public unowned Cogl.FrameClosure add_frame_callback (owned Cogl.FrameCallback callback); + public void add_frame_info (owned Cogl.FrameInfo info); + [NoWrapper] + public virtual void bind (); + public virtual bool direct_scanout (Cogl.Scanout scanout, Cogl.FrameInfo info) throws GLib.Error; + public virtual int get_buffer_age (); + public int64 get_frame_counter (); + public void hide (); + public virtual void queue_damage_region ([CCode (array_length_cname = "n_rectangles", array_length_pos = 1.1)] int[] rectangles); + public void remove_dirty_callback (Cogl.OnscreenDirtyClosure closure); + public void remove_frame_callback (Cogl.FrameClosure closure); + public void show (); + public void swap_buffers (Cogl.FrameInfo frame_info, void* user_data); + public virtual void swap_buffers_with_damage ([CCode (array_length_cname = "n_rectangles", array_length_pos = 1.5)] int[] rectangles, Cogl.FrameInfo info); + public virtual void swap_region ([CCode (array_length_cname = "n_rectangles", array_length_pos = 1.5)] int[] rectangles, Cogl.FrameInfo info); + } + [CCode (cheader_filename = "cogl/cogl.h", copy_function = "g_boxed_copy", free_function = "g_boxed_free", type_id = "cogl_onscreen_dirty_closure_get_type ()")] + [Compact] + public class OnscreenDirtyClosure { + } + [CCode (cheader_filename = "cogl/cogl.h", type_id = "cogl_onscreen_template_get_type ()")] + public class OnscreenTemplate : GLib.Object { + [CCode (has_construct_function = false)] + public OnscreenTemplate (Cogl.SwapChain swap_chain); + public void set_samples_per_pixel (int n); + public void set_stereo_enabled (bool enabled); + } + [CCode (cheader_filename = "cogl/cogl.h", type_id = "cogl_output_get_type ()")] + public class Output : GLib.Object { + [CCode (has_construct_function = false)] + protected Output (); + public int get_height (); + public int get_mm_height (); + public int get_mm_width (); + public float get_refresh_rate (); + public Cogl.SubpixelOrder get_subpixel_order (); + public int get_width (); + public int get_x (); + public int get_y (); + } + [CCode (cheader_filename = "cogl/cogl.h", type_id = "cogl_pipeline_get_type ()")] + public sealed class Pipeline : GLib.Object { + [CCode (has_construct_function = false)] + public Pipeline (Cogl.Context context); + public void add_layer_snippet (int layer, Cogl.Snippet snippet); + public void add_snippet (Cogl.Snippet snippet); + public Cogl.Pipeline copy (); + public void foreach_layer (Cogl.PipelineLayerCallback callback); + public Cogl.PipelineAlphaFunc get_alpha_test_function (); + public float get_alpha_test_reference (); + public Cogl.Color get_color (); + public Cogl.PipelineCullFaceMode get_cull_face_mode (); + public Cogl.DepthState get_depth_state (); + public Cogl.Winding get_front_face_winding (); + public void get_layer_filters (int layer_index, out Cogl.PipelineFilter min_filter, out Cogl.PipelineFilter mag_filter); + public bool get_layer_point_sprite_coords_enabled (int layer_index); + public unowned Cogl.Texture get_layer_texture (int layer_index); + public Cogl.PipelineWrapMode get_layer_wrap_mode_s (int layer_index); + public Cogl.PipelineWrapMode get_layer_wrap_mode_t (int layer_index); + public int get_n_layers (); + public bool get_per_vertex_point_size (); + public float get_point_size (); + public int get_uniform_location (string uniform_name); + public unowned Cogl.Program get_user_program (); + public void remove_layer (int layer_index); + public void set_alpha_test_function (Cogl.PipelineAlphaFunc alpha_func, float alpha_reference); + public bool set_blend (string blend_string) throws GLib.Error; + public void set_blend_constant (Cogl.Color constant_color); + public void set_color (Cogl.Color color); + public void set_cull_face_mode (Cogl.PipelineCullFaceMode cull_face_mode); + public bool set_depth_state (Cogl.DepthState state) throws GLib.Error; + public void set_front_face_winding (Cogl.Winding front_winding); + public bool set_layer_combine (int layer_index, string blend_string) throws GLib.Error; + public void set_layer_combine_constant (int layer_index, Cogl.Color constant); + public void set_layer_filters (int layer_index, Cogl.PipelineFilter min_filter, Cogl.PipelineFilter mag_filter); + public void set_layer_matrix (int layer_index, Graphene.Matrix matrix); + public void set_layer_max_mipmap_level (int layer, int max_level); + public void set_layer_null_texture (int layer_index); + public bool set_layer_point_sprite_coords_enabled (int layer_index, bool enable) throws GLib.Error; + public void set_layer_texture (int layer_index, Cogl.Texture texture); + public void set_layer_wrap_mode (int layer_index, Cogl.PipelineWrapMode mode); + public void set_layer_wrap_mode_s (int layer_index, Cogl.PipelineWrapMode mode); + public void set_layer_wrap_mode_t (int layer_index, Cogl.PipelineWrapMode mode); + public bool set_per_vertex_point_size (bool enable) throws GLib.Error; + public void set_point_size (float point_size); + public void set_uniform_1f (int uniform_location, float value); + public void set_uniform_1i (int uniform_location, int value); + public void set_uniform_float (int uniform_location, int n_components, int count, float value); + 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); + public void set_user_program (Cogl.Program program); + } + [CCode (cheader_filename = "cogl/cogl.h", type_id = "cogl_pixel_buffer_get_type ()")] + public sealed class PixelBuffer : Cogl.Buffer { + [CCode (has_construct_function = false)] + public PixelBuffer (Cogl.Context context, [CCode (array_length_cname = "size", array_length_pos = 1.5, array_length_type = "gsize")] uint8[] data); + } + [CCode (cheader_filename = "cogl/cogl.h", type_id = "cogl_primitive_get_type ()")] + public class Primitive : GLib.Object { + [CCode (has_construct_function = false)] + public Primitive (Cogl.VerticesMode mode, int n_vertices, ...); + public Cogl.Primitive copy (); + public void draw (Cogl.Framebuffer framebuffer, Cogl.Pipeline pipeline); + public void foreach_attribute (Cogl.PrimitiveAttributeCallback callback); + public int get_first_vertex (); + [CCode (array_length = false)] + public unowned Cogl.Indices[]? get_indices (); + public Cogl.VerticesMode get_mode (); + public int get_n_vertices (); + [CCode (has_construct_function = false)] + public Primitive.p2 (Cogl.Context context, Cogl.VerticesMode mode, [CCode (array_length_cname = "n_vertices", array_length_pos = 2.5)] Cogl.VertexP2[] data); + [CCode (has_construct_function = false)] + public Primitive.p2c4 (Cogl.Context context, Cogl.VerticesMode mode, [CCode (array_length_cname = "n_vertices", array_length_pos = 2.5)] Cogl.VertexP2C4[] data); + [CCode (has_construct_function = false)] + public Primitive.p2t2 (Cogl.Context context, Cogl.VerticesMode mode, [CCode (array_length_cname = "n_vertices", array_length_pos = 2.5)] Cogl.VertexP2T2[] data); + [CCode (has_construct_function = false)] + public Primitive.p2t2c4 (Cogl.Context context, Cogl.VerticesMode mode, [CCode (array_length_cname = "n_vertices", array_length_pos = 2.5)] Cogl.VertexP2T2C4[] data); + [CCode (has_construct_function = false)] + public Primitive.p3 (Cogl.Context context, Cogl.VerticesMode mode, [CCode (array_length_cname = "n_vertices", array_length_pos = 2.5)] Cogl.VertexP3[] data); + [CCode (has_construct_function = false)] + public Primitive.p3c4 (Cogl.Context context, Cogl.VerticesMode mode, [CCode (array_length_cname = "n_vertices", array_length_pos = 2.5)] Cogl.VertexP3C4[] data); + [CCode (has_construct_function = false)] + public Primitive.p3t2 (Cogl.Context context, Cogl.VerticesMode mode, [CCode (array_length_cname = "n_vertices", array_length_pos = 2.5)] Cogl.VertexP3T2[] data); + [CCode (has_construct_function = false)] + public Primitive.p3t2c4 (Cogl.Context context, Cogl.VerticesMode mode, [CCode (array_length_cname = "n_vertices", array_length_pos = 2.5)] Cogl.VertexP3T2C4[] data); + public void set_first_vertex (int first_vertex); + public void set_indices ([CCode (array_length_cname = "n_indices", array_length_pos = 1.1)] Cogl.Indices[] indices); + public void set_mode (Cogl.VerticesMode mode); + public void set_n_vertices (int n_vertices); + public static void texture_set_auto_mipmap (Cogl.Texture primitive_texture, bool value); + [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); + } + [CCode (cheader_filename = "cogl/cogl.h", type_id = "cogl_program_get_type ()")] + public class Program : GLib.Object { + [CCode (has_construct_function = false)] + protected Program (); + [Version (deprecated = true, deprecated_since = "1.16")] + public void attach_shader (Cogl.Shader shader); + [CCode (cheader_filename = "cogl/cogl.h", cname = "cogl_create_program")] + [Version (deprecated = true, deprecated_since = "1.16")] + public static Cogl.Program create (); + [Version (deprecated = true, deprecated_since = "1.16")] + public int get_uniform_location (string uniform_name); + [Version (deprecated = true, deprecated_since = "1.16")] + public void link (); + [Version (deprecated = true, deprecated_since = "1.16")] + public void set_uniform_1f (int uniform_location, float value); + [Version (deprecated = true, deprecated_since = "1.16")] + public void set_uniform_1i (int uniform_location, int value); + [Version (deprecated = true, deprecated_since = "1.16")] + public void set_uniform_float (int uniform_location, int n_components, [CCode (array_length_cname = "count", array_length_pos = 2.5)] float[] value); + [Version (deprecated = true, deprecated_since = "1.16")] + public void set_uniform_int (int uniform_location, int n_components, [CCode (array_length_cname = "count", array_length_pos = 2.5)] int[] value); + [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); + } + [CCode (cheader_filename = "cogl/cogl.h", type_id = "cogl_renderer_get_type ()")] + public class Renderer : GLib.Object { + [CCode (has_construct_function = false)] + public Renderer (); + public void add_constraint (Cogl.RendererConstraint constraint); + public void bind_api (); + public bool check_onscreen_template (Cogl.OnscreenTemplate onscreen_template) throws GLib.Error; + public bool connect () throws GLib.Error; + public static uint32 error_quark (); + public void foreach_output (Cogl.OutputCallback callback); + public Cogl.Driver get_driver (); + public Cogl.WinsysID get_winsys_id (); + public bool is_dma_buf_supported (); + public void remove_constraint (Cogl.RendererConstraint constraint); + public void set_driver (Cogl.Driver driver); + public void set_winsys_id (Cogl.WinsysID winsys_id); + } + [CCode (cheader_filename = "cogl/cogl.h", type_id = "cogl_scanout_get_type ()")] + public sealed class Scanout : GLib.Object { + [CCode (has_construct_function = false)] + public Scanout (Cogl.ScanoutBuffer scanout_buffer); + public bool blit_to_framebuffer (Cogl.Framebuffer framebuffer, int x, int y) throws GLib.Error; + public unowned Cogl.ScanoutBuffer get_buffer (); + public void get_dst_rect (Mtk.Rectangle rect); + public void get_src_rect (Graphene.Rect rect); + public void notify_failed (Cogl.Onscreen onscreen); + public void set_dst_rect (Mtk.Rectangle rect); + public void set_src_rect (Graphene.Rect rect); + public signal void scanout_failed (Cogl.Onscreen object); + } + [CCode (cheader_filename = "cogl/cogl.h", type_id = "cogl_shader_get_type ()")] + public class Shader : GLib.Object { + [CCode (has_construct_function = false)] + protected Shader (); + [CCode (cheader_filename = "cogl/cogl.h", cname = "cogl_create_shader")] + [Version (deprecated = true, deprecated_since = "1.16")] + public static Cogl.Shader create (Cogl.ShaderType shader_type); + [Version (deprecated = true, deprecated_since = "1.16")] + public Cogl.ShaderType get_shader_type (); + [Version (deprecated = true, deprecated_since = "1.16")] + public void source (string source); + } + [CCode (cheader_filename = "cogl/cogl.h", type_id = "cogl_snippet_get_type ()")] + public class Snippet : GLib.Object { + [CCode (has_construct_function = false)] + public Snippet (Cogl.SnippetHook hook, string? declarations, string? post); + public unowned string get_declarations (); + public Cogl.SnippetHook get_hook (); + public unowned string get_post (); + public unowned string get_pre (); + public unowned string get_replace (); + public void set_declarations (string declarations); + public void set_post (string post); + public void set_pre (string pre); + public void set_replace (string replace); + } + [CCode (cheader_filename = "cogl/cogl.h", type_id = "cogl_sub_texture_get_type ()")] + 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); + public unowned Cogl.Texture get_parent (); + } + [CCode (cheader_filename = "cogl/cogl.h", type_id = "cogl_swap_chain_get_type ()")] + public class SwapChain : GLib.Object { + [CCode (has_construct_function = false)] + public SwapChain (); + public void set_has_alpha (bool has_alpha); + public void set_length (int length); + } + [CCode (cheader_filename = "cogl/cogl.h", type_id = "cogl_texture_get_type ()")] + public abstract class Texture : GLib.Object { + [CCode (has_construct_function = false)] + protected Texture (); + public bool allocate () throws GLib.Error; + public Cogl.TextureComponents get_components (); + public int get_data (Cogl.PixelFormat format, uint rowstride, [CCode (array_length = false)] uint8[] data); + public bool get_gl_texture (out uint out_gl_handle, out uint out_gl_target); + public uint get_height (); + public int get_max_waste (); + public bool get_premultiplied (); + public uint get_width (); + public bool is_get_data_supported (); + public bool is_sliced (); + public void set_components (Cogl.TextureComponents components); + public bool set_data (Cogl.PixelFormat format, int rowstride, [CCode (array_length = false)] uint8[] data, int level) throws GLib.Error; + public void set_premultiplied (bool premultiplied); + public bool set_region (int src_x, int src_y, int dst_x, int dst_y, uint dst_width, uint dst_height, int width, int height, Cogl.PixelFormat format, uint rowstride, [CCode (array_length = false)] uint8[] data); + public bool set_region_from_bitmap (int src_x, int src_y, int dst_x, int dst_y, uint dst_width, uint dst_height, Cogl.Bitmap bitmap); + [NoAccessorMethod] + public Cogl.Context context { construct; } + [NoAccessorMethod] + public Cogl.PixelFormat format { construct; } + [NoAccessorMethod] + public int height { construct; } + [NoAccessorMethod] + public void* loader { construct; } + [NoAccessorMethod] + public int width { construct; } + } + [CCode (cheader_filename = "cogl/cogl.h", lower_case_csuffix = "texture_2d", type_id = "cogl_texture_2d_get_type ()")] + public sealed class Texture2D : Cogl.Texture { + [CCode (has_construct_function = false)] + protected Texture2D (); + [CCode (has_construct_function = false, type = "CoglTexture*")] + public Texture2D.from_bitmap (Cogl.Bitmap bitmap); + [CCode (has_construct_function = false, type = "CoglTexture*")] + public Texture2D.from_data (Cogl.Context ctx, int width, int height, Cogl.PixelFormat format, int rowstride, [CCode (array_length = false)] uint8[] data) throws GLib.Error; + [CCode (has_construct_function = false, type = "CoglTexture*")] + [Version (since = "2.0")] + public Texture2D.with_format (Cogl.Context ctx, int width, int height, Cogl.PixelFormat format); + [CCode (has_construct_function = false, type = "CoglTexture*")] + public Texture2D.with_size (Cogl.Context ctx, int width, int height); + } + [CCode (cheader_filename = "cogl/cogl.h", lower_case_csuffix = "texture_2d_sliced", type_id = "cogl_texture_2d_sliced_get_type ()")] + public sealed class Texture2DSliced : Cogl.Texture { + [CCode (has_construct_function = false)] + protected Texture2DSliced (); + [CCode (has_construct_function = false, type = "CoglTexture*")] + public Texture2DSliced.from_bitmap (Cogl.Bitmap bmp, int max_waste); + [CCode (has_construct_function = false, type = "CoglTexture*")] + public Texture2DSliced.from_data (Cogl.Context ctx, int width, int height, int max_waste, Cogl.PixelFormat format, int rowstride, [CCode (array_length = false)] uint8[] data) throws GLib.Error; + [CCode (has_construct_function = false, type = "CoglTexture*")] + public Texture2DSliced.with_size (Cogl.Context ctx, int width, int height, int max_waste); + } + [CCode (cheader_filename = "cogl/cogl.h", has_type_id = false)] + [Compact] + public class TimestampQuery { + } + [CCode (cheader_filename = "cogl/cogl.h", type_cname = "CoglScanoutBufferInterface", type_id = "cogl_scanout_buffer_get_type ()")] + public interface ScanoutBuffer : GLib.Object { + public abstract int get_height (); + public abstract int get_width (); + } + [CCode (cheader_filename = "cogl/cogl.h", copy_function = "g_boxed_copy", free_function = "g_boxed_free", type_id = "cogl_color_get_type ()")] + public struct Color { + public Cogl.Color? copy (); + public bool equal ([CCode (type = "void*")] Cogl.Color v2); + public void free (); + [CCode (cname = "cogl_color_init_from_4f")] + [Version (since = "1.4")] + public Color.from_4f (float red, float green, float blue, float alpha); + [CCode (cname = "cogl_color_init_from_4fv")] + [Version (since = "1.4")] + public Color.from_4fv (float color_array); + [CCode (cname = "cogl_color_init_from_hsl")] + [Version (since = "1.16")] + public Color.from_hsl (float hue, float saturation, float luminance); + public float get_alpha (); + public float get_blue (); + public float get_green (); + public float get_red (); + public void init_from_4f (float red, float green, float blue, float alpha); + public void init_from_hsl (float hue, float saturation, float luminance); + public void premultiply (); + public void to_hsl (out float hue, out float saturation, out float luminance); + } + [CCode (cheader_filename = "cogl/cogl.h", has_type_id = false)] + public struct DepthState { + public void get_range (float near_val, float far_val); + public bool get_test_enabled (); + public Cogl.DepthTestFunction get_test_function (); + public bool get_write_enabled (); + public void init (); + public void set_range (float near_val, float far_val); + public void set_test_enabled (bool enable); + public void set_test_function (Cogl.DepthTestFunction function); + public void set_write_enabled (bool enable); + } + [CCode (cheader_filename = "cogl/cogl.h", has_type_id = false)] + public struct OnscreenDirtyInfo { + public int x; + public int y; + public int width; + public int height; + } + [CCode (cheader_filename = "cogl/cogl.h")] + [SimpleType] + public struct PipelineKey : char { + } + [CCode (cheader_filename = "cogl/cogl.h", has_type_id = false)] + public struct PollFD { + public int fd; + } + [CCode (cheader_filename = "cogl/cogl.h", has_type_id = false)] + public struct TextureVertex { + public float x; + public float y; + public float z; + public float tx; + public float ty; + public Cogl.Color color; + } + [CCode (cheader_filename = "cogl/cogl.h", has_type_id = false)] + [Version (since = "1.6")] + public struct VertexP2 { + public float x; + public float y; + } + [CCode (cheader_filename = "cogl/cogl.h", has_type_id = false)] + [Version (since = "1.6")] + 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)] + [Version (since = "1.6")] + 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)] + [Version (since = "1.6")] + 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)] + [Version (since = "1.6")] + public struct VertexP3 { + public float x; + public float y; + public float z; + } + [CCode (cheader_filename = "cogl/cogl.h", has_type_id = false)] + [Version (since = "1.6")] + public struct VertexP3C4 { + public float x; + public float y; + public float z; + public uint8 r; + public uint8 g; + public uint8 b; + public uint8 a; + } + [CCode (cheader_filename = "cogl/cogl.h", has_type_id = false)] + [Version (since = "1.6")] + public struct VertexP3T2 { + public float x; + public float y; + public float z; + public float s; + public float t; + } + [CCode (cheader_filename = "cogl/cogl.h", has_type_id = false)] + [Version (since = "1.6")] + public struct VertexP3T2C4 { + public float x; + public float y; + public float z; + public float s; + public float t; + public uint8 r; + public uint8 g; + public uint8 b; + public uint8 a; + } + [CCode (cheader_filename = "cogl/cogl.h", cprefix = "COGL_ATTRIBUTE_TYPE_", has_type_id = false)] + public enum AttributeType { + BYTE, + UNSIGNED_BYTE, + SHORT, + UNSIGNED_SHORT, + FLOAT + } + [CCode (cheader_filename = "cogl/cogl.h", cprefix = "COGL_BUFFER_ACCESS_", type_id = "cogl_buffer_access_get_type ()")] + [Flags] + public enum BufferAccess { + READ, + WRITE, + READ_WRITE + } + [CCode (cheader_filename = "cogl/cogl.h", cprefix = "COGL_BUFFER_BIND_TARGET_", type_id = "cogl_buffer_bind_target_get_type ()")] + public enum BufferBindTarget { + PIXEL_PACK, + PIXEL_UNPACK, + ATTRIBUTE_BUFFER, + INDEX_BUFFER, + COUNT + } + [CCode (cheader_filename = "cogl/cogl.h", cprefix = "COGL_BUFFER_BIT_", has_type_id = false)] + [Flags] + public enum BufferBit { + COLOR, + DEPTH, + STENCIL + } + [CCode (cheader_filename = "cogl/cogl.h", cprefix = "COGL_BUFFER_ERROR_", type_id = "cogl_buffer_error_get_type ()")] + public enum BufferError { + MAP + } + [CCode (cheader_filename = "cogl/cogl.h", cprefix = "COGL_BUFFER_MAP_HINT_", type_id = "cogl_buffer_map_hint_get_type ()")] + [Flags] + public enum BufferMapHint { + DISCARD, + DISCARD_RANGE + } + [CCode (cheader_filename = "cogl/cogl.h", cprefix = "COGL_", has_type_id = false)] + [Flags] + public enum BufferTarget { + WINDOW_BUFFER, + OFFSCREEN_BUFFER + } + [CCode (cheader_filename = "cogl/cogl.h", cprefix = "COGL_BUFFER_UPDATE_HINT_", type_id = "cogl_buffer_update_hint_get_type ()")] + public enum BufferUpdateHint { + STATIC, + DYNAMIC, + STREAM + } + [CCode (cheader_filename = "cogl/cogl.h", cprefix = "COGL_DEPTH_TEST_FUNCTION_", has_type_id = false)] + public enum DepthTestFunction { + NEVER, + LESS, + EQUAL, + LEQUAL, + GREATER, + NOTEQUAL, + GEQUAL, + ALWAYS + } + [CCode (cheader_filename = "cogl/cogl.h", cprefix = "COGL_DRIVER_", has_type_id = false)] + public enum Driver { + ANY, + NOP, + GL3, + GLES2 + } + [CCode (cheader_filename = "cogl/cogl.h", cprefix = "COGL_EGL_IMAGE_FLAG_", has_type_id = false)] + [Flags] + public enum EglImageFlags { + NONE, + NO_GET_DATA + } + [CCode (cheader_filename = "cogl/cogl.h", cprefix = "COGL_FEATURE_ID_", has_type_id = false)] + public enum FeatureID { + [CCode (cname = "COGL_FEATURE_ID_UNSIGNED_INT_INDICES")] + OGL_FEATURE_ID_UNSIGNED_INT_INDICES, + [CCode (cname = "COGL_FEATURE_ID_MAP_BUFFER_FOR_READ")] + OGL_FEATURE_ID_MAP_BUFFER_FOR_READ, + [CCode (cname = "COGL_FEATURE_ID_MAP_BUFFER_FOR_WRITE")] + OGL_FEATURE_ID_MAP_BUFFER_FOR_WRITE, + [CCode (cname = "COGL_FEATURE_ID_FENCE")] + OGL_FEATURE_ID_FENCE, + [CCode (cname = "COGL_FEATURE_ID_TEXTURE_RG")] + OGL_FEATURE_ID_TEXTURE_RG, + [CCode (cname = "COGL_FEATURE_ID_TEXTURE_RGBA1010102")] + OGL_FEATURE_ID_TEXTURE_RGBA1010102, + [CCode (cname = "COGL_FEATURE_ID_TEXTURE_HALF_FLOAT")] + OGL_FEATURE_ID_TEXTURE_HALF_FLOAT, + [CCode (cname = "COGL_FEATURE_ID_TEXTURE_NORM16")] + OGL_FEATURE_ID_TEXTURE_NORM16, + [CCode (cname = "COGL_FEATURE_ID_BUFFER_AGE")] + OGL_FEATURE_ID_BUFFER_AGE, + [CCode (cname = "COGL_FEATURE_ID_TEXTURE_EGL_IMAGE_EXTERNAL")] + OGL_FEATURE_ID_TEXTURE_EGL_IMAGE_EXTERNAL, + [CCode (cname = "COGL_FEATURE_ID_BLIT_FRAMEBUFFER")] + OGL_FEATURE_ID_BLIT_FRAMEBUFFER, + [CCode (cname = "COGL_FEATURE_ID_TIMESTAMP_QUERY")] + OGL_FEATURE_ID_TIMESTAMP_QUERY + } + [CCode (cheader_filename = "cogl/cogl.h", cprefix = "COGL_FILTER_", has_type_id = false)] + public enum FilterReturn { + CONTINUE, + REMOVE + } + [CCode (cheader_filename = "cogl/cogl.h", cprefix = "COGL_FRAME_EVENT_", has_type_id = false)] + public enum FrameEvent { + SYNC, + COMPLETE + } + [CCode (cheader_filename = "cogl/cogl.h", cprefix = "COGL_GRAPHICS_RESET_STATUS_", has_type_id = false)] + public enum GraphicsResetStatus { + NO_ERROR, + GUILTY_CONTEXT_RESET, + INNOCENT_CONTEXT_RESET, + UNKNOWN_CONTEXT_RESET, + PURGED_CONTEXT_RESET + } + [CCode (cheader_filename = "cogl/cogl.h", cprefix = "COGL_INDICES_TYPE_UNSIGNED_", has_type_id = false)] + public enum IndicesType { + BYTE, + SHORT, + INT + } + [CCode (cheader_filename = "cogl/cogl.h", cprefix = "COGL_PIPELINE_ALPHA_FUNC_", has_type_id = false)] + public enum PipelineAlphaFunc { + NEVER, + LESS, + EQUAL, + LEQUAL, + GREATER, + NOTEQUAL, + GEQUAL, + ALWAYS + } + [CCode (cheader_filename = "cogl/cogl.h", cprefix = "COGL_PIPELINE_CULL_FACE_MODE_", has_type_id = false)] + public enum PipelineCullFaceMode { + NONE, + FRONT, + BACK, + BOTH + } + [CCode (cheader_filename = "cogl/cogl.h", cprefix = "COGL_PIPELINE_FILTER_", has_type_id = false)] + public enum PipelineFilter { + NEAREST, + LINEAR, + NEAREST_MIPMAP_NEAREST, + LINEAR_MIPMAP_NEAREST, + NEAREST_MIPMAP_LINEAR, + LINEAR_MIPMAP_LINEAR + } + [CCode (cheader_filename = "cogl/cogl.h", cprefix = "COGL_PIPELINE_WRAP_MODE_", has_type_id = false)] + public enum PipelineWrapMode { + REPEAT, + MIRRORED_REPEAT, + CLAMP_TO_EDGE, + AUTOMATIC + } + [CCode (cheader_filename = "cogl/cogl.h", cprefix = "COGL_PIXEL_FORMAT_", type_id = "cogl_pixel_format_get_type ()")] + public enum PixelFormat { + CAIRO_ARGB32_COMPAT, + ANY, + A_8, + RGB_565, + RGBA_4444, + RGBA_5551, + YUV, + R_8, + RG_88, + RGB_888, + BGR_888, + RGBX_8888, + RGBA_8888, + BGRX_8888, + BGRA_8888, + XRGB_8888, + ARGB_8888, + XBGR_8888, + ABGR_8888, + RGBA_8888_PRE, + BGRA_8888_PRE, + ARGB_8888_PRE, + ABGR_8888_PRE, + RGBA_4444_PRE, + RGBA_5551_PRE, + RGBA_1010102, + BGRA_1010102, + XRGB_2101010, + ARGB_2101010, + XBGR_2101010, + ABGR_2101010, + RGBA_1010102_PRE, + BGRA_1010102_PRE, + ARGB_2101010_PRE, + ABGR_2101010_PRE, + RGBX_FP_16161616, + RGBA_FP_16161616, + BGRX_FP_16161616, + BGRA_FP_16161616, + XRGB_FP_16161616, + ARGB_FP_16161616, + XBGR_FP_16161616, + ABGR_FP_16161616, + RGBA_FP_16161616_PRE, + BGRA_FP_16161616_PRE, + ARGB_FP_16161616_PRE, + ABGR_FP_16161616_PRE, + RGBA_FP_32323232, + RGBA_FP_32323232_PRE, + R_16, + RG_1616, + RGBA_16161616, + RGBA_16161616_PRE, + DEPTH_16, + DEPTH_24_STENCIL_8; + public int get_bytes_per_pixel (int plane); + public int get_n_planes (); + public unowned string to_string (); + } + [CCode (cheader_filename = "cogl/cogl.h", cprefix = "COGL_POLL_FD_EVENT_", has_type_id = false)] + public enum PollFDEvent { + IN, + PRI, + OUT, + ERR, + HUP, + NVAL + } + [CCode (cheader_filename = "cogl/cogl.h", cprefix = "COGL_READ_PIXELS_COLOR_", has_type_id = false)] + [Flags] + public enum ReadPixelsFlags { + [CCode (cname = "COGL_READ_PIXELS_COLOR_BUFFER")] + READ_PIXELS_COLOR_BUFFER + } + [CCode (cheader_filename = "cogl/cogl.h", cprefix = "COGL_RENDERER_CONSTRAINT_USES_", has_type_id = false)] + [Flags] + public enum RendererConstraint { + X11, + XLIB, + EGL + } + [CCode (cheader_filename = "cogl/cogl.h", cprefix = "COGL_SHADER_TYPE_", has_type_id = false)] + public enum ShaderType { + VERTEX, + FRAGMENT + } + [CCode (cheader_filename = "cogl/cogl.h", cprefix = "COGL_SNIPPET_HOOK_", has_type_id = false)] + public enum SnippetHook { + VERTEX, + VERTEX_TRANSFORM, + VERTEX_GLOBALS, + POINT_SIZE, + FRAGMENT, + FRAGMENT_GLOBALS, + TEXTURE_COORD_TRANSFORM, + LAYER_FRAGMENT, + TEXTURE_LOOKUP + } + [CCode (cheader_filename = "cogl/cogl.h", cprefix = "COGL_STEREO_", has_type_id = false)] + public enum StereoMode { + BOTH, + LEFT, + RIGHT + } + [CCode (cheader_filename = "cogl/cogl.h", cprefix = "COGL_SUBPIXEL_ORDER_", has_type_id = false)] + public enum SubpixelOrder { + UNKNOWN, + NONE, + HORIZONTAL_RGB, + HORIZONTAL_BGR, + VERTICAL_RGB, + VERTICAL_BGR + } + [CCode (cheader_filename = "cogl/cogl.h", cprefix = "COGL_TEXTURE_COMPONENTS_", has_type_id = false)] + public enum TextureComponents { + A, + RG, + RGB, + RGBA, + DEPTH + } + [CCode (cheader_filename = "cogl/cogl.h", cprefix = "COGL_VERTICES_MODE_", has_type_id = false)] + public enum VerticesMode { + POINTS, + LINES, + LINE_LOOP, + LINE_STRIP, + TRIANGLES, + TRIANGLE_STRIP, + TRIANGLE_FAN + } + [CCode (cheader_filename = "cogl/cogl.h", cprefix = "COGL_WINDING_", has_type_id = false)] + public enum Winding { + CLOCKWISE, + COUNTER_CLOCKWISE + } + [CCode (cheader_filename = "cogl/cogl.h", cprefix = "COGL_WINSYS_FEATURE_", has_type_id = false)] + public enum WinsysFeature { + VBLANK_COUNTER, + VBLANK_WAIT, + TEXTURE_FROM_PIXMAP, + SWAP_BUFFERS_EVENT, + SWAP_REGION, + SWAP_REGION_THROTTLE, + SWAP_REGION_SYNCHRONIZED, + BUFFER_AGE, + SYNC_AND_COMPLETE_EVENT, + N_FEATURES + } + [CCode (cheader_filename = "cogl/cogl.h", cprefix = "COGL_WINSYS_ID_", has_type_id = false)] + public enum WinsysID { + ANY, + STUB, + GLX, + EGL_XLIB, + CUSTOM + } + [CCode (cheader_filename = "cogl/cogl.h", cprefix = "COGL_BITMAP_ERROR_", has_type_id = false)] + public errordomain BitmapError { + FAILED, + UNKNOWN_TYPE, + CORRUPT_IMAGE; + public static uint32 quark (); + } + [CCode (cheader_filename = "cogl/cogl.h", cprefix = "COGL_BLEND_STRING_ERROR_", has_type_id = false)] + public errordomain BlendStringError { + PARSE_ERROR, + ARGUMENT_PARSE_ERROR, + INVALID_ERROR, + GPU_UNSUPPORTED_ERROR; + [CCode (cheader_filename = "cogl/cogl.h")] + public static uint32 quark (); + } + [CCode (cheader_filename = "cogl/cogl.h", cprefix = "COGL_FRAMEBUFFER_ERROR_", has_type_id = false)] + public errordomain FramebufferError { + [CCode (cname = "COGL_FRAMEBUFFER_ERROR_ALLOCATE")] + FRAMEBUFFER_ERROR_ALLOCATE + } + [CCode (cheader_filename = "cogl/cogl.h", cprefix = "COGL_RENDERER_ERROR_", has_type_id = false)] + public errordomain RendererError { + XLIB_DISPLAY_OPEN, + BAD_CONSTRAINT + } + [CCode (cheader_filename = "cogl/cogl.h", cprefix = "COGL_SCANOUT_ERROR_", has_type_id = false)] + public errordomain ScanoutError { + [CCode (cname = "COGL_SCANOUT_ERROR_INHIBITED")] + SCANOUT_ERROR_INHIBITED; + public static GLib.Quark quark (); + } + [CCode (cheader_filename = "cogl/cogl.h", cprefix = "COGL_SYSTEM_ERROR_", has_type_id = false)] + public errordomain SystemError { + UNSUPPORTED, + NO_MEMORY + } + [CCode (cheader_filename = "cogl/cogl.h", cprefix = "COGL_TEXTURE_ERROR_", has_type_id = false)] + public errordomain TextureError { + SIZE, + FORMAT, + BAD_PARAMETER, + TYPE; + public static uint32 quark (); + } + [CCode (cheader_filename = "cogl/cogl.h", instance_pos = 1.9)] + public delegate void FeatureCallback (Cogl.FeatureID feature); + [CCode (cheader_filename = "cogl/cogl.h", instance_pos = 1.9)] + public delegate void FenceCallback (Cogl.Fence fence); + [CCode (cheader_filename = "cogl/cogl.h", instance_pos = 3.9)] + public delegate void FrameCallback (Cogl.Onscreen onscreen, Cogl.FrameEvent event, Cogl.FrameInfo info); + [CCode (cheader_filename = "cogl/cogl.h", instance_pos = 3.9)] + public delegate void MetaTextureCallback (Cogl.Texture sub_texture, float sub_texture_coords, float meta_coords); + [CCode (cheader_filename = "cogl/cogl.h", instance_pos = 2.9)] + public delegate void OnscreenDirtyCallback (Cogl.Onscreen onscreen, Cogl.OnscreenDirtyInfo info); + [CCode (cheader_filename = "cogl/cogl.h", instance_pos = 1.9)] + public delegate void OutputCallback (Cogl.Output output); + [CCode (cheader_filename = "cogl/cogl.h", instance_pos = 2.9)] + public delegate bool PipelineLayerCallback (Cogl.Pipeline pipeline, int layer_index); + [CCode (cheader_filename = "cogl/cogl.h", instance_pos = 2.9)] + public delegate bool PrimitiveAttributeCallback (Cogl.Primitive primitive, Cogl.Attribute attribute); + [CCode (cheader_filename = "cogl/cogl.h", cname = "COGL_AFIRST_BIT")] + public const int AFIRST_BIT; + [CCode (cheader_filename = "cogl/cogl.h", cname = "COGL_A_BIT")] + public const int A_BIT; + [CCode (cheader_filename = "cogl/cogl.h", cname = "COGL_BGR_BIT")] + public const int BGR_BIT; + [CCode (cheader_filename = "cogl/cogl.h", cname = "COGL_DEPTH_BIT")] + public const int DEPTH_BIT; + [CCode (cheader_filename = "cogl/cogl.h", cname = "COGL_PIXEL_FORMAT_MAX_PLANES")] + public const int PIXEL_FORMAT_MAX_PLANES; + [CCode (cheader_filename = "cogl/cogl.h", cname = "COGL_PREMULT_BIT")] + public const int PREMULT_BIT; + [CCode (cheader_filename = "cogl/cogl.h", cname = "COGL_STENCIL_BIT")] + public const int STENCIL_BIT; + [CCode (cheader_filename = "cogl/cogl.h", cname = "COGL_TEXTURE_MAX_WASTE")] + public const int TEXTURE_MAX_WASTE; + [CCode (cheader_filename = "cogl/cogl.h")] + public static bool clutter_winsys_has_feature (Cogl.WinsysFeature feature); + [CCode (cheader_filename = "cogl/cogl.h")] + [Version (replacement = "Color.init_from_hsl")] + public static void color_init_from_hsl (out Cogl.Color color, float hue, float saturation, float luminance); + [CCode (cheader_filename = "cogl/cogl.h")] + public static void debug_matrix_entry_print (Cogl.MatrixEntry entry); + [CCode (cheader_filename = "cogl/cogl.h")] + public static void flush (); + [CCode (cheader_filename = "cogl/cogl.h")] + public static unowned Cogl.Indices get_rectangle_indices (Cogl.Context context, int n_rectangles); + [CCode (cheader_filename = "cogl/cogl.h")] + public static GLib.Source glib_renderer_source_new (Cogl.Renderer renderer, int priority); + [CCode (cheader_filename = "cogl/cogl.h")] + public static GLib.Source glib_source_new (Cogl.Context context, int priority); + [CCode (cheader_filename = "cogl/cogl.h")] + public static void graphene_matrix_project_point (Graphene.Matrix matrix, ref float x, ref float y, ref float z, ref float w); + [CCode (cheader_filename = "cogl/cogl.h")] + public static void graphene_matrix_project_points (Graphene.Matrix matrix, int n_components, size_t stride_in, void* points_in, size_t stride_out, void* points_out, int n_points); + [CCode (cheader_filename = "cogl/cogl.h")] + public static void graphene_matrix_transform_points (Graphene.Matrix matrix, int n_components, size_t stride_in, void* points_in, size_t stride_out, void* points_out, int n_points); + [CCode (cheader_filename = "cogl/cogl.h")] + public static void meta_texture_foreach_in_region (Cogl.Texture texture, float tx_1, float ty_1, float tx_2, float ty_2, Cogl.PipelineWrapMode wrap_s, Cogl.PipelineWrapMode wrap_t, Cogl.MetaTextureCallback callback); + [CCode (cheader_filename = "cogl/cogl.h")] + [Version (replacement = "PixelFormat.get_bytes_per_pixel")] + public static int pixel_format_get_bytes_per_pixel (Cogl.PixelFormat format, int plane); + [CCode (cheader_filename = "cogl/cogl.h")] + [Version (replacement = "PixelFormat.get_n_planes")] + public static int pixel_format_get_n_planes (Cogl.PixelFormat format); + [CCode (cheader_filename = "cogl/cogl.h")] + [Version (replacement = "PixelFormat.to_string")] + public static unowned string pixel_format_to_string (Cogl.PixelFormat format); + [CCode (cheader_filename = "cogl/cogl.h")] + public static void poll_renderer_dispatch (Cogl.Renderer renderer, Cogl.PollFD poll_fds, int n_poll_fds); + [CCode (cheader_filename = "cogl/cogl.h")] + public static int poll_renderer_get_info (Cogl.Renderer renderer, Cogl.PollFD poll_fds, int n_poll_fds, int64 timeout); + [CCode (cheader_filename = "cogl/cogl.h")] + public static void set_tracing_disabled_on_thread (void* data); + [CCode (cheader_filename = "cogl/cogl.h")] + public static void set_tracing_enabled_on_thread (void* data, string group); + [CCode (cheader_filename = "cogl/cogl.h")] + public static bool start_tracing_with_fd (int fd) throws GLib.Error; + [CCode (cheader_filename = "cogl/cogl.h")] + public static bool start_tracing_with_path (string filename) throws GLib.Error; + [CCode (cheader_filename = "cogl/cogl.h")] + public static void stop_tracing (); +} diff --git a/vapi/mutter-cogl-pango-14.vapi b/vapi/mutter-cogl-pango-14.vapi new file mode 120000 index 00000000..b4bc9c76 --- /dev/null +++ b/vapi/mutter-cogl-pango-14.vapi @@ -0,0 +1 @@ +mutter-cogl-pango-13.vapi \ No newline at end of file diff --git a/vapi/mutter-cogl-pango.vapi b/vapi/mutter-cogl-pango.vapi index 6665f7ab..93be9326 100644 --- a/vapi/mutter-cogl-pango.vapi +++ b/vapi/mutter-cogl-pango.vapi @@ -23,7 +23,7 @@ namespace CoglPango { [CCode (has_construct_function = false)] protected Renderer (); [NoAccessorMethod] - public void* context { construct; } + public Cogl.Context context { construct; } } [CCode (cheader_filename = "cogl-pango.h")] [Version (since = "1.0")] diff --git a/vapi/mutter-cogl.vapi b/vapi/mutter-cogl.vapi index 723eeef7..5858cde7 100644 --- a/vapi/mutter-cogl.vapi +++ b/vapi/mutter-cogl.vapi @@ -1168,3 +1168,4 @@ namespace Cogl { [CCode (cheader_filename = "cogl/cogl.h")] public static void trace_end (Cogl.TraceHead head); } + diff --git a/vapi/mutter-mtk-13.vapi b/vapi/mutter-mtk-13.vapi index df98ff38..e9f393e5 100644 --- a/vapi/mutter-mtk-13.vapi +++ b/vapi/mutter-mtk-13.vapi @@ -2,28 +2,100 @@ [CCode (cprefix = "Mtk", gir_namespace = "Mtk", gir_version = "13", lower_case_cprefix = "mtk_")] namespace Mtk { +#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] + public class Region { + public Mtk.Region apply_matrix_transform_expand (Graphene.Matrix transform); + public bool contains_point (int x, int y); + public Mtk.RegionOverlap contains_rectangle (Mtk.Rectangle rect); + public Mtk.Region copy (); + public static Mtk.Region create (); + public static Mtk.Region create_rectangle (Mtk.Rectangle rect); + public static Mtk.Region create_rectangles (Mtk.Rectangle rects, int n_rects); + public Mtk.Region crop_and_scale (Graphene.Rect src_rect, int dst_width, int dst_height); + public bool equal (Mtk.Region other); + public Mtk.Rectangle? get_extents (); + public Mtk.Rectangle? get_rectangle (int nth); + public void intersect (Mtk.Region other); + public void intersect_rectangle (Mtk.Rectangle rect); + public bool is_empty (); + public int num_rectangles (); + public unowned Mtk.Region @ref (); + public Mtk.Region scale (int scale); + public void subtract (Mtk.Region other); + public void subtract_rectangle (Mtk.Rectangle rect); + public void translate (int dx, int dy); + public void union (Mtk.Region other); + public void union_rectangle (Mtk.Rectangle rect); + public void unref (); + } +#endif [CCode (cheader_filename = "mtk/mtk.h", copy_function = "g_boxed_copy", free_function = "g_boxed_free", type_id = "mtk_rectangle_get_type ()")] public struct Rectangle { public int x; public int y; public int width; public int height; +#if HAS_MUTTER46 + [CCode (cname = "MTK_RECTANGLE_MAX_STACK_RECTS")] + public const int MAX_STACK_RECTS; +#endif [CCode (has_construct_function = false, type = "MtkRectangle*")] public Rectangle (int x, int y, int width, int height); public int area (); public bool contains_rect (Mtk.Rectangle inner_rect); public Mtk.Rectangle? copy (); public bool could_fit_rect (Mtk.Rectangle inner_rect); +#if HAS_MUTTER46 + public void crop_and_scale (Graphene.Rect src_rect, int dst_width, int dst_height, Mtk.Rectangle dest); +#endif public bool equal (Mtk.Rectangle src2); public void free (); public static Mtk.Rectangle from_graphene_rect (Graphene.Rect rect, Mtk.RoundingStrategy rounding_strategy); public bool horiz_overlap (Mtk.Rectangle rect2); public bool intersect (Mtk.Rectangle src2, out Mtk.Rectangle dest); +#if HAS_MUTTER46 + public bool is_adjacent_to (Mtk.Rectangle other); +#endif public bool overlap (Mtk.Rectangle rect2); +#if HAS_MUTTER46 + public void scale_double (double scale, Mtk.RoundingStrategy rounding_strategy, Mtk.Rectangle dest); +#endif public Graphene.Rect? to_graphene_rect (); public Mtk.Rectangle union (Mtk.Rectangle rect2); public bool vert_overlap (Mtk.Rectangle rect2); } +#if HAS_MUTTER46 + [CCode (cheader_filename = "mtk/mtk.h", has_type_id = false)] + public struct RegionBuilder { + [CCode (array_length_cname = "n_levels")] + public weak Mtk.Region levels[16]; + public int n_levels; + [CCode (cname = "MTK_REGION_BUILDER_MAX_LEVELS")] + public const int MAX_LEVELS; + public void add_rectangle (int x, int y, int width, int height); + public Mtk.Region finish (); + public void init (); + } + [CCode (cheader_filename = "mtk/mtk.h", has_type_id = false)] + public struct RegionIterator { + public weak Mtk.Region region; + public Mtk.Rectangle rectangle; + public bool line_start; + public bool line_end; + public int i; + public bool at_end (); + public void init (Mtk.Region region); + public void next (); + } + [CCode (cheader_filename = "mtk/mtk.h", cprefix = "MTK_REGION_OVERLAP_", has_type_id = false)] + public enum RegionOverlap { + OUT, + IN, + PART + } +#endif [CCode (cheader_filename = "mtk/mtk.h", cprefix = "MTK_ROUNDING_STRATEGY_", has_type_id = false)] public enum RoundingStrategy { SHRINK, @@ -33,6 +105,17 @@ namespace Mtk { [CCode (cheader_filename = "mtk/mtk.h")] [Version (replacement = "Rectangle.from_graphene_rect")] public static Mtk.Rectangle rectangle_from_graphene_rect (Graphene.Rect rect, Mtk.RoundingStrategy rounding_strategy); +#if HAS_MUTTER46 + [CCode (cheader_filename = "mtk/mtk.h")] + [Version (replacement = "Region.create")] + public static Mtk.Region region_create (); + [CCode (cheader_filename = "mtk/mtk.h")] + [Version (replacement = "Region.create_rectangle")] + public static Mtk.Region region_create_rectangle (Mtk.Rectangle rect); + [CCode (cheader_filename = "mtk/mtk.h")] + [Version (replacement = "Region.create_rectangles")] + public static Mtk.Region region_create_rectangles (Mtk.Rectangle rects, int n_rects); +#endif [CCode (cheader_filename = "mtk/mtk.h")] public static void x11_errors_deinit (); } diff --git a/vapi/mutter-mtk-14.vapi b/vapi/mutter-mtk-14.vapi new file mode 120000 index 00000000..7aeabe79 --- /dev/null +++ b/vapi/mutter-mtk-14.vapi @@ -0,0 +1 @@ +mutter-mtk-13.vapi \ No newline at end of file diff --git a/wingpanel-interface/FocusManager.vala b/wingpanel-interface/FocusManager.vala index 21583e59..80853687 100644 --- a/wingpanel-interface/FocusManager.vala +++ b/wingpanel-interface/FocusManager.vala @@ -110,7 +110,11 @@ public class WingpanelInterface.FocusManager : Object { } if (window != null) { -#if HAS_MUTTER44 + +#if HAS_MUTTER46 + Graphene.Point pos_hint = {x, y}; + window.begin_grab_op (Meta.GrabOp.MOVING, null, null, time, pos_hint); +#elif HAS_MUTTER44 window.begin_grab_op (Meta.GrabOp.MOVING, null, null, time); #else display.begin_grab_op (window, Meta.GrabOp.MOVING, false, true, button, state, time, x, y); diff --git a/wingpanel-interface/meson.build b/wingpanel-interface/meson.build index 4ea04312..b4530222 100644 --- a/wingpanel-interface/meson.build +++ b/wingpanel-interface/meson.build @@ -49,6 +49,17 @@ if mutter45_dep.found() vala_flags = ['--define', 'HAS_MUTTER43', '--define', 'HAS_MUTTER44', '--define', 'HAS_MUTTER45'] endif +mutter46_dep = dependency('libmutter-14', version: ['>= 46', '< 47'], required: false) +if mutter46_dep.found() + libmutter_dep = dependency('libmutter-14', version: '>= 46') + mutter_dep = [ + libmutter_dep, + dependency('mutter-mtk-14'), dependency('mutter-cogl-14'), + dependency('mutter-cogl-pango-14'), dependency('mutter-clutter-14') + ] + vala_flags = ['--define', 'HAS_MUTTER43', '--define', 'HAS_MUTTER44', '--define', 'HAS_MUTTER45', '--define', 'HAS_MUTTER46'] +endif + if mutter_dep.length() == 0 error ('No supported mutter library found!') endif