summaryrefslogtreecommitdiffstats
path: root/subprojects/libhandy/glade/glade-hdy-utils.h
diff options
context:
space:
mode:
Diffstat (limited to 'subprojects/libhandy/glade/glade-hdy-utils.h')
-rw-r--r--subprojects/libhandy/glade/glade-hdy-utils.h36
1 files changed, 36 insertions, 0 deletions
diff --git a/subprojects/libhandy/glade/glade-hdy-utils.h b/subprojects/libhandy/glade/glade-hdy-utils.h
new file mode 100644
index 0000000..11870d1
--- /dev/null
+++ b/subprojects/libhandy/glade/glade-hdy-utils.h
@@ -0,0 +1,36 @@
+/*
+ * Copyright (C) 2020 Alexander Mikhaylenko <alexm@gnome.org>
+ *
+ * SPDX-License-Identifier: LGPL-2.1+
+ */
+
+#pragma once
+
+#include <gladeui/glade.h>
+
+#include <handy.h>
+
+#define ONLY_THIS_GOES_IN_THAT_MSG _("Only objects of type %s can be added to objects of type %s.")
+
+/* Guess whether we are using a Glade version older than 3.36.
+ *
+ * If yes, redefine some symbols which got renamed.
+ */
+#ifndef GLADE_PROPERTY_DEF_OBJECT_DELIMITER
+#define GLADE_PROPERTY_DEF_OBJECT_DELIMITER GPC_OBJECT_DELIMITER
+#define glade_widget_action_get_def glade_widget_action_get_class
+#endif
+
+void glade_hdy_init (const gchar *name);
+
+void glade_hdy_sync_child_positions (GtkContainer *container);
+
+gint glade_hdy_get_child_index (GtkContainer *container,
+ GtkWidget *child);
+
+void glade_hdy_reorder_child (GtkContainer *container,
+ GtkWidget *child,
+ gint index);
+
+GtkWidget *glade_hdy_get_nth_child (GtkContainer *container,
+ gint n);