[gtk/constraint-flexible-space: 1/9] Add GtkConstraintTarget
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/constraint-flexible-space: 1/9] Add GtkConstraintTarget
- Date: Wed, 26 Jun 2019 04:26:31 +0000 (UTC)
commit 44670cf58b156fff036bb707003c61dd6e923fa8
Author: Matthias Clasen <mclasen redhat com>
Date: Tue Jun 25 15:04:05 2019 -0400
Add GtkConstraintTarget
This is an marker interface that we will
use to accept other things that widgets
in constraints.
gtk/gtkconstraint.c | 14 ++++++++++++++
gtk/gtkconstraint.h | 15 +++++++++++++++
2 files changed, 29 insertions(+)
---
diff --git a/gtk/gtkconstraint.c b/gtk/gtkconstraint.c
index b5f2607816..249e2a762a 100644
--- a/gtk/gtkconstraint.c
+++ b/gtk/gtkconstraint.c
@@ -543,3 +543,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 bab922fca3..d2fed0ef02 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 ())
/**
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]