[glade/glade-3-20] GladeWidgetAdaptor: add GWA_GET_PARENT() macro



commit bdd2925b8e81d0b59fd3ea8627cb5a3f2fb9bbda
Author: Juan Pablo Ugarte <juanpablougarte gmail com>
Date:   Wed Feb 28 20:47:29 2018 -0300

    GladeWidgetAdaptor: add GWA_GET_PARENT() macro

 gladeui/glade-widget-adaptor.h |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)
---
diff --git a/gladeui/glade-widget-adaptor.h b/gladeui/glade-widget-adaptor.h
index 7461c42..b613472 100644
--- a/gladeui/glade-widget-adaptor.h
+++ b/gladeui/glade-widget-adaptor.h
@@ -132,6 +132,16 @@ typedef struct _GladeWidgetAdaptorClass   GladeWidgetAdaptorClass;
    GLADE_WIDGET_ADAPTOR_GET_CLASS (glade_widget_adaptor_get_by_type(type)))
 
 /**
+ * GWA_GET_PARENT:
+ * @adaptor: A #GladeWidgetAdaptor
+ *
+ * Shorthand for referencing glade adaptor parent class from
+ * the plugin eg. GWA_GET_PARENT (adaptor)->post_create (adaptor...
+ */
+#define GWA_GET_PARENT(adaptor)                                                      \
+  (GLADE_WIDGET_ADAPTOR_GET_CLASS (glade_widget_adaptor_get_parent_adaptor(adaptor)))
+
+/**
  * GWA_GET_OCLASS:
  * @type: A #GType.
  *


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]