[gnome-builder] widget: add template helper macro
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] widget: add template helper macro
- Date: Sun, 14 Dec 2014 11:50:26 +0000 (UTC)
commit 74d75ebe6b07d06f281c23dfc726ab4601a01fcf
Author: Christian Hergert <christian hergert me>
Date: Sun Dec 14 03:50:08 2014 -0800
widget: add template helper macro
otherwise things are so damn long, they dont fit in 80 chars
src/util/gb-widget.h | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/src/util/gb-widget.h b/src/util/gb-widget.h
index ed445e9..904d874 100644
--- a/src/util/gb-widget.h
+++ b/src/util/gb-widget.h
@@ -25,6 +25,13 @@
G_BEGIN_DECLS
+#define GB_WIDGET_CLASS_TEMPLATE(klass, name) \
+ gtk_widget_class_set_template_from_resource((GtkWidgetClass*)klass, \
+ "/org/gnome/builder/ui/"name)
+#define GB_WIDGET_CLASS_BIND(klass, TN, field) \
+ gtk_widget_class_bind_template_child_private ((GtkWidgetClass*)klass, \
+ TN, field)
+
void gb_widget_add_style_class (gpointer widget,
const gchar *class_name);
cairo_surface_t *gb_widget_snapshot (GtkWidget *widget,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]