1/* gtkconstraintlayout.h: Layout manager using constraints
2 * Copyright 2019 GNOME Foundation
3 *
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
8 *
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
13 *
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library. If not, see <http://www.gnu.org/licenses/>.
16 *
17 * Author: Emmanuele Bassi
18 */
19#pragma once
20
21#include <gtk/gtklayoutmanager.h>
22#include <gtk/gtkconstraint.h>
23#include <gtk/gtkconstraintguide.h>
24
25G_BEGIN_DECLS
26
27#define GTK_TYPE_CONSTRAINT_LAYOUT (gtk_constraint_layout_get_type ())
28#define GTK_TYPE_CONSTRAINT_LAYOUT_CHILD (gtk_constraint_layout_child_get_type ())
29#define GTK_CONSTRAINT_VFL_PARSER_ERROR (gtk_constraint_vfl_parser_error_quark ())
30
31GDK_AVAILABLE_IN_ALL
32G_DECLARE_FINAL_TYPE (GtkConstraintLayoutChild, gtk_constraint_layout_child, GTK, CONSTRAINT_LAYOUT_CHILD, GtkLayoutChild)
33
34GDK_AVAILABLE_IN_ALL
35G_DECLARE_FINAL_TYPE (GtkConstraintLayout, gtk_constraint_layout, GTK, CONSTRAINT_LAYOUT, GtkLayoutManager)
36
37GDK_AVAILABLE_IN_ALL
38GQuark gtk_constraint_vfl_parser_error_quark (void);
39
40GDK_AVAILABLE_IN_ALL
41GtkLayoutManager * gtk_constraint_layout_new (void);
42
43GDK_AVAILABLE_IN_ALL
44void gtk_constraint_layout_add_constraint (GtkConstraintLayout *layout,
45 GtkConstraint *constraint);
46GDK_AVAILABLE_IN_ALL
47void gtk_constraint_layout_remove_constraint (GtkConstraintLayout *layout,
48 GtkConstraint *constraint);
49
50GDK_AVAILABLE_IN_ALL
51void gtk_constraint_layout_add_guide (GtkConstraintLayout *layout,
52 GtkConstraintGuide *guide);
53GDK_AVAILABLE_IN_ALL
54void gtk_constraint_layout_remove_guide (GtkConstraintLayout *layout,
55 GtkConstraintGuide *guide);
56GDK_AVAILABLE_IN_ALL
57void gtk_constraint_layout_remove_all_constraints (GtkConstraintLayout *layout);
58
59GDK_AVAILABLE_IN_ALL
60GList * gtk_constraint_layout_add_constraints_from_description (GtkConstraintLayout *layout,
61 const char * const lines[],
62 gsize n_lines,
63 int hspacing,
64 int vspacing,
65 GError **error,
66 const char *first_view,
67 ...) G_GNUC_NULL_TERMINATED;
68GDK_AVAILABLE_IN_ALL
69GList * gtk_constraint_layout_add_constraints_from_descriptionv (GtkConstraintLayout *layout,
70 const char * const lines[],
71 gsize n_lines,
72 int hspacing,
73 int vspacing,
74 GHashTable *views,
75 GError **error);
76
77GDK_AVAILABLE_IN_ALL
78GListModel * gtk_constraint_layout_observe_constraints (GtkConstraintLayout *layout);
79GDK_AVAILABLE_IN_ALL
80GListModel * gtk_constraint_layout_observe_guides (GtkConstraintLayout *layout);
81
82G_END_DECLS
83

source code of gtk/gtk/gtkconstraintlayout.h