[libgd/wip/rishi/main-box: 4/9] build: Add a _box-common flag to LIBGD_INIT
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgd/wip/rishi/main-box: 4/9] build: Add a _box-common flag to LIBGD_INIT
- Date: Mon, 19 Dec 2016 20:31:21 +0000 (UTC)
commit b373553bd9aa29b19a5d51c1d236b2ab7608196c
Author: Debarshi Ray <debarshir gnome org>
Date: Thu Dec 1 16:37:03 2016 +0100
build: Add a _box-common flag to LIBGD_INIT
This includes GdMainBoxChild, GdMainBoxGeneric, and GdMainBoxItem
interfaces. It is meant to be used by those that implement these
interfaces.
https://bugzilla.gnome.org/show_bug.cgi?id=774914
Makefile.am | 14 ++++++++++++++
libgd.m4 | 6 ++++++
libgd/gd-types-catalog.c | 12 ++++++++++++
libgd/gd.h | 6 ++++++
4 files changed, 38 insertions(+), 0 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index 5d22871..f8530b3 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -47,6 +47,20 @@ nodist_libgd_la_SOURCES += $(gtk_hacks_sources)
EXTRA_DIST += $(gtk_hacks_sources)
endif
+if LIBGD__BOX_COMMON
+box_common_sources = \
+ libgd/gd-main-box-child.c \
+ libgd/gd-main-box-child.h \
+ libgd/gd-main-box-generic.c \
+ libgd/gd-main-box-generic.h \
+ libgd/gd-main-box-item.c \
+ libgd/gd-main-box-item.h \
+ $(NULL)
+
+nodist_libgd_la_SOURCES += $(box_common_sources)
+EXTRA_DIST += $(box_common_sources)
+endif
+
if LIBGD__VIEW_COMMON
view_common_sources = \
libgd/gd-main-view-generic.c \
diff --git a/libgd.m4 b/libgd.m4
index 2ce3571..c543861 100644
--- a/libgd.m4
+++ b/libgd.m4
@@ -106,6 +106,12 @@ AC_DEFUN([LIBGD_INIT], [
GOBJECT_INTROSPECTION_REQUIRE([0.9.6])
])
+ # _box-common:
+ AM_CONDITIONAL([LIBGD__BOX_COMMON],[_LIBGD_IF_OPTION_SET([_box-common],[true],[false])])
+ _LIBGD_IF_OPTION_SET([_box-common],[
+ AC_DEFINE([LIBGD__BOX_COMMON], [1], [Description])
+ ])
+
# _view-common:
AM_CONDITIONAL([LIBGD__VIEW_COMMON],[_LIBGD_IF_OPTION_SET([_view-common],[true],[false])])
_LIBGD_IF_OPTION_SET([_view-common],[
diff --git a/libgd/gd-types-catalog.c b/libgd/gd-types-catalog.c
index 2ba467a..9959a61 100644
--- a/libgd/gd-types-catalog.c
+++ b/libgd/gd-types-catalog.c
@@ -23,6 +23,12 @@
#include "gd-types-catalog.h"
+#ifdef LIBGD__BOX_COMMON
+# include "gd-main-box-child.h"
+# include "gd-main-box-generic.h"
+# include "gd-main-box-item.h"
+#endif
+
#ifdef LIBGD__VIEW_COMMON
# include "gd-main-view-generic.h"
# include "gd-styled-text-renderer.h"
@@ -63,6 +69,12 @@
void
gd_ensure_types (void)
{
+#ifdef LIBGD__BOX_COMMON
+ g_type_ensure (GD_TYPE_MAIN_BOX_CHILD);
+ g_type_ensure (GD_TYPE_MAIN_BOX_GENERIC);
+ g_type_ensure (GD_TYPE_MAIN_BOX_ITEM);
+#endif
+
#ifdef LIBGD__VIEW_COMMON
g_type_ensure (GD_TYPE_MAIN_VIEW_GENERIC);
g_type_ensure (GD_TYPE_STYLED_TEXT_RENDERER);
diff --git a/libgd/gd.h b/libgd/gd.h
index 4805027..6725abc 100644
--- a/libgd/gd.h
+++ b/libgd/gd.h
@@ -35,6 +35,12 @@ G_BEGIN_DECLS
# include <libgd/gd-entry-focus-hack.h>
#endif
+#ifdef LIBGD__BOX_COMMON
+# include <libgd/gd-main-box-child.h>
+# include <libgd/gd-main-box-generic.h>
+# include <libgd/gd-main-box-item.h>
+#endif
+
#ifdef LIBGD__VIEW_COMMON
# include <libgd/gd-main-view-generic.h>
# include <libgd/gd-styled-text-renderer.h>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]