diff options
author | Emmanuele Bassi <ebassi@gnome.org> | 2019-04-09 14:05:48 +0100 |
---|---|---|
committer | Emmanuele Bassi <ebassi@gnome.org> | 2019-06-30 23:42:44 +0100 |
commit | 6b308cd71e1c6d37cd32a3b99d21e729e181aa8d (patch) | |
tree | a741e62656b9685662b1775a3d30bfca55ebf54e /gtk/gtkenums.h | |
parent | 3b6ee32f83882c8c2c736c7bb504a47bf1fdf407 (diff) | |
download | gtk+-6b308cd71e1c6d37cd32a3b99d21e729e181aa8d.tar.gz |
Add constraint solver
GtkConstraintSolver is an implementation of the Cassowary constraint
solving algorithm:
http://constraints.cs.washington.edu/cassowary/
The Cassowary method allows to incrementally solve a tableau of linear
equations, in the form of:
x = y × coefficient + constant
with different weights, or strengths, applied to each one.
These equations can be used to describe constraints applied to a layout
of UI elements, which allows layout managers using the Cassowary method
to quickly, and efficiently, lay out widgets in complex relations
between themselves and their parent container.
Diffstat (limited to 'gtk/gtkenums.h')
-rw-r--r-- | gtk/gtkenums.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/gtk/gtkenums.h b/gtk/gtkenums.h index 6d1bf81295..468adcdc81 100644 --- a/gtk/gtkenums.h +++ b/gtk/gtkenums.h @@ -1053,4 +1053,18 @@ typedef enum { GTK_PICK_NON_TARGETABLE = 1 << 1 } GtkPickFlags; +/** + * GtkConstraintRelation: + * @GTK_CONSTRAINT_RELATION_EQ: Equal + * @GTK_CONSTRAINT_RELATION_LE: Less than, or equal + * @GTK_CONSTRAINT_RELATION_GE: Greater than, or equal + * + * The relation between two terms of a constraint. + */ +typedef enum { + GTK_CONSTRAINT_RELATION_LE = -1, + GTK_CONSTRAINT_RELATION_EQ = 0, + GTK_CONSTRAINT_RELATION_GE = 1 +} GtkConstraintRelation; + #endif /* __GTK_ENUMS_H__ */ |