diff options
author | Matthias Clasen <mclasen@redhat.com> | 2019-06-25 15:04:05 -0400 |
---|---|---|
committer | Emmanuele Bassi <ebassi@gnome.org> | 2019-06-30 23:42:44 +0100 |
commit | 04562a76e3233a7cf69b98eca89059e66f55c713 (patch) | |
tree | 11a9f115549d437f4d1faba8949a61bfa0c93942 | |
parent | b6781e06c160142ce9ff089962d3a038f1a548ab (diff) | |
download | gtk+-04562a76e3233a7cf69b98eca89059e66f55c713.tar.gz |
Add GtkConstraintTarget
This is an marker interface that we will
use to accept other things that widgets
in constraints.
-rw-r--r-- | gtk/gtkconstraint.c | 14 | ||||
-rw-r--r-- | gtk/gtkconstraint.h | 15 |
2 files changed, 29 insertions, 0 deletions
diff --git a/gtk/gtkconstraint.c b/gtk/gtkconstraint.c index d0c152b56d..d7bf3e0a08 100644 --- a/gtk/gtkconstraint.c +++ b/gtk/gtkconstraint.c @@ -581,3 +581,17 @@ gtk_constraint_detach (GtkConstraint *constraint) constraint->constraint_ref = NULL; constraint->solver = NULL; } + +typedef struct _GtkConstraintTargetInterface GtkConstraintTargetInterface; + +struct _GtkConstraintTargetInterface +{ + GTypeInterface g_iface; +}; + +G_DEFINE_INTERFACE (GtkConstraintTarget, gtk_constraint_target, G_TYPE_OBJECT) + +static void +gtk_constraint_target_default_init (GtkConstraintTargetInterface *iface) +{ +} diff --git a/gtk/gtkconstraint.h b/gtk/gtkconstraint.h index 1ca9fd7f5e..1467c86d9c 100644 --- a/gtk/gtkconstraint.h +++ b/gtk/gtkconstraint.h @@ -24,6 +24,21 @@ G_BEGIN_DECLS +typedef struct _GtkConstraintTarget GtkConstraintTarget; + +#define GTK_TYPE_CONSTRAINT_TARGET (gtk_constraint_target_get_type ()) + +/** + * GtkConstraintTarget: + * + * The GtkConstraintTarget interface is implemented by objects that + * can be used as source or target in #GtkConstraints. Besides + * #GtkWidget, it is also implemented by #GtkConstraintGuide. + */ + +GDK_AVAILABLE_IN_ALL +G_DECLARE_INTERFACE (GtkConstraintTarget, gtk_constraint_target, GTK, CONSTRAINT_TARGET, GObject) + #define GTK_TYPE_CONSTRAINT (gtk_constraint_get_type ()) /** |