2023-08-29 12:37:34 +02:00
|
|
|
/* mutter-mtk-13.vapi generated by vapigen, do not modify. */
|
|
|
|
|
|
|
|
[CCode (cprefix = "Mtk", gir_namespace = "Mtk", gir_version = "13", lower_case_cprefix = "mtk_")]
|
|
|
|
namespace Mtk {
|
2024-01-13 01:03:36 +01:00
|
|
|
#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 {
|
2024-02-17 00:47:04 +01:00
|
|
|
public Mtk.Region apply_matrix_transform_expand (Graphene.Matrix transform);
|
2024-01-13 01:03:36 +01:00
|
|
|
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);
|
2024-02-17 00:47:04 +01:00
|
|
|
public Mtk.Region crop_and_scale (Graphene.Rect src_rect, int dst_width, int dst_height);
|
2024-01-13 01:03:36 +01:00
|
|
|
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 ();
|
2024-02-17 00:47:04 +01:00
|
|
|
public Mtk.Region scale (int scale);
|
2024-01-13 01:03:36 +01:00
|
|
|
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
|
2023-08-29 12:37:34 +02:00
|
|
|
[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;
|
2024-02-17 00:47:04 +01:00
|
|
|
#if HAS_MUTTER46
|
|
|
|
[CCode (cname = "MTK_RECTANGLE_MAX_STACK_RECTS")]
|
|
|
|
public const int MAX_STACK_RECTS;
|
|
|
|
#endif
|
2023-08-29 12:37:34 +02:00
|
|
|
[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);
|
2024-02-17 00:47:04 +01:00
|
|
|
#if HAS_MUTTER46
|
|
|
|
public void crop_and_scale (Graphene.Rect src_rect, int dst_width, int dst_height, Mtk.Rectangle dest);
|
2024-10-15 13:32:05 +02:00
|
|
|
#endif
|
|
|
|
#if HAS_MUTTER47
|
|
|
|
[CCode (has_construct_function = false, type = "MtkRectangle*")]
|
|
|
|
public Rectangle.empty ();
|
2024-02-17 00:47:04 +01:00
|
|
|
#endif
|
2023-08-29 12:37:34 +02:00
|
|
|
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);
|
2024-02-17 00:47:04 +01:00
|
|
|
#if HAS_MUTTER46
|
|
|
|
public bool is_adjacent_to (Mtk.Rectangle other);
|
|
|
|
#endif
|
2023-08-29 12:37:34 +02:00
|
|
|
public bool overlap (Mtk.Rectangle rect2);
|
2024-02-17 00:47:04 +01:00
|
|
|
#if HAS_MUTTER46
|
|
|
|
public void scale_double (double scale, Mtk.RoundingStrategy rounding_strategy, Mtk.Rectangle dest);
|
|
|
|
#endif
|
2023-08-29 12:37:34 +02:00
|
|
|
public Graphene.Rect? to_graphene_rect ();
|
2024-10-15 13:32:05 +02:00
|
|
|
#if HAS_MUTTER47
|
|
|
|
public void transform (Mtk.MonitorTransform transform, int width, int height, Mtk.Rectangle dest);
|
|
|
|
#endif
|
2023-08-29 12:37:34 +02:00
|
|
|
public Mtk.Rectangle union (Mtk.Rectangle rect2);
|
|
|
|
public bool vert_overlap (Mtk.Rectangle rect2);
|
|
|
|
}
|
2024-01-13 01:03:36 +01:00
|
|
|
#if HAS_MUTTER46
|
2024-02-17 00:47:04 +01:00
|
|
|
[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 ();
|
|
|
|
}
|
2024-10-15 13:32:05 +02:00
|
|
|
#if HAS_MUTTER47
|
|
|
|
[CCode (cheader_filename = "mtk/mtk.h", cprefix = "MTK_MONITOR_TRANSFORM_", has_type_id = false)]
|
|
|
|
public enum MonitorTransform {
|
|
|
|
NORMAL,
|
|
|
|
@90,
|
|
|
|
@180,
|
|
|
|
@270,
|
|
|
|
FLIPPED,
|
|
|
|
FLIPPED_90,
|
|
|
|
FLIPPED_180,
|
|
|
|
FLIPPED_270;
|
|
|
|
public Mtk.MonitorTransform invert ();
|
|
|
|
public Mtk.MonitorTransform transform (Mtk.MonitorTransform other);
|
|
|
|
public void transform_matrix (Graphene.Matrix matrix);
|
|
|
|
public void transform_point (int area_width, int area_height, int point_x, int point_y);
|
|
|
|
[CCode (cname = "MTK_MONITOR_ALL_TRANSFORMS")]
|
|
|
|
public const int ALL;
|
|
|
|
}
|
|
|
|
#endif
|
2024-01-13 01:03:36 +01:00
|
|
|
[CCode (cheader_filename = "mtk/mtk.h", cprefix = "MTK_REGION_OVERLAP_", has_type_id = false)]
|
|
|
|
public enum RegionOverlap {
|
|
|
|
OUT,
|
|
|
|
IN,
|
|
|
|
PART
|
|
|
|
}
|
|
|
|
#endif
|
2023-08-29 12:37:34 +02:00
|
|
|
[CCode (cheader_filename = "mtk/mtk.h", cprefix = "MTK_ROUNDING_STRATEGY_", has_type_id = false)]
|
|
|
|
public enum RoundingStrategy {
|
|
|
|
SHRINK,
|
|
|
|
GROW,
|
|
|
|
ROUND
|
|
|
|
}
|
|
|
|
[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);
|
2024-01-13 01:03:36 +01:00
|
|
|
#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
|
2023-08-29 12:37:34 +02:00
|
|
|
[CCode (cheader_filename = "mtk/mtk.h")]
|
|
|
|
public static void x11_errors_deinit ();
|
|
|
|
}
|