1/* gtkconstraintprivate.h: Constraint between two widgets
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
20#pragma once
21
22#include "gtkconstraint.h"
23#include "gtkconstrainttypesprivate.h"
24
25G_BEGIN_DECLS
26
27struct _GtkConstraint
28{
29 GObject parent_instance;
30
31 GtkConstraintAttribute target_attribute;
32 GtkConstraintAttribute source_attribute;
33
34 GtkConstraintTarget *target;
35 GtkConstraintTarget *source;
36
37 GtkConstraintRelation relation;
38
39 double multiplier;
40 double constant;
41
42 int strength;
43
44 /* A reference to the real constraint inside the
45 * GtkConstraintSolver, so we can remove it when
46 * finalizing the GtkConstraint instance
47 */
48 GtkConstraintRef *constraint_ref;
49
50 GtkConstraintSolver *solver;
51
52 guint active : 1;
53};
54
55void gtk_constraint_attach (GtkConstraint *constraint,
56 GtkConstraintSolver *solver,
57 GtkConstraintRef *ref);
58void gtk_constraint_detach (GtkConstraint *constraint);
59
60G_END_DECLS
61

source code of gtk/gtk/gtkconstraintprivate.h