summaryrefslogtreecommitdiff
path: root/src/gtkext
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2020-08-18 22:39:43 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2020-08-18 22:39:43 (GMT)
commit81c1646a1eb96a6291b18a5a37f87bf6805b6794 (patch)
treec5093a7f5d535b3169bcce8d3f07c071541366cc /src/gtkext
parent3e9d5cedf701fd8957024f7ddf65238aea9a1eba (diff)
Centralized the macro used to provide callbacks to GtkBuilder easily.
Diffstat (limited to 'src/gtkext')
-rw-r--r--src/gtkext/easygtk.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/gtkext/easygtk.h b/src/gtkext/easygtk.h
index f8335ac..f8c2212 100644
--- a/src/gtkext/easygtk.h
+++ b/src/gtkext/easygtk.h
@@ -21,8 +21,8 @@
*/
-#ifndef _EASYGTK_H
-#define _EASYGTK_H
+#ifndef _GTKEXT_EASYGTK_H
+#define _GTKEXT_EASYGTK_H
#include <gtk/gtk.h>
@@ -34,6 +34,9 @@
/* Transition vers GTK-3.x claire */
#define HAS_H_ORIENTATION(wid) gtk_orientable_get_orientation(GTK_ORIENTABLE(wid)) == GTK_ORIENTATION_HORIZONTAL
+/* Enregistrement des fonctions pour GtkBuilder */
+#define BUILDER_CALLBACK(cb) #cb, G_CALLBACK(cb)
+
/* Définit des bordures extérieures à appliquer à un composant. */
void qck_set_margins(GtkWidget *, guint, guint, guint, guint);
@@ -103,4 +106,4 @@ void scroll_to_treeview_iter(GtkTreeView *, GtkTreeModel *, GtkTreeIter *);
-#endif /* _EASYGTK_H */
+#endif /* _GTKEXT_EASYGTK_H */