[gtk/wip/ebassi/constraint-layout] Add GtkConstraintTarget
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/ebassi/constraint-layout] Add GtkConstraintTarget
- Date: Thu, 27 Jun 2019 17:52:43 +0000 (UTC)
commit 02f4e1a5aed0c6d15e71214ee3289179745ed7e2
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 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 ())
/**
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]