[gnome-builder] build: start on introspectable libgnome-builder.la



commit 7a930296c07b72b9f7534b80717346b90ba2b0c7
Author: Christian Hergert <christian hergert me>
Date:   Wed Sep 2 01:25:15 2015 -0700

    build: start on introspectable libgnome-builder.la
    
    This private library will let us get started on allowing dynamic language
    plugins to extend UI features not defined in libIDE.

 Makefile.am                 |    8 +++---
 src/Makefile.am             |   63 ++++++++++++++++++++++++++++++++++--------
 src/app/gb-application.c    |    7 +++++
 src/documents/gb-document.c |    7 ++++-
 src/views/gb-view.c         |    5 +++
 5 files changed, 73 insertions(+), 17 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index e1af8f8..3a8725d 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -72,26 +72,26 @@ dist-hook:
 
 run:
        GB_IN_TREE_PLUGINS=1 \
-       GI_TYPELIB_PATH=libide \
+       GI_TYPELIB_PATH="libide:src" \
        GOBJECT_DEBUG=instance-count \
        $(LIBTOOL) --mode=execute gdb -ex run --args src/gnome-builder -vvvv -s
 
 strace:
        GB_IN_TREE_PLUGINS=1 \
-       GI_TYPELIB_PATH=libide \
+       GI_TYPELIB_PATH="libide:src" \
        GOBJECT_DEBUG=instance-count \
        $(LIBTOOL) --mode=execute strace -T src/gnome-builder -vvvv -s
 
 debug:
        GB_IN_TREE_PLUGINS=1 \
-       GI_TYPELIB_PATH=libide \
+       GI_TYPELIB_PATH="libide:src" \
        G_DEBUG=fatal-criticals \
        GOBJECT_DEBUG=instance-count \
        $(LIBTOOL) --mode=execute gdb -ex run --args src/gnome-builder -vvvv -s
 
 valgrind:
        GB_IN_TREE_PLUGINS=1 \
-       GI_TYPELIB_PATH=libide \
+       GI_TYPELIB_PATH="libide:src" \
        G_DEBUG=fatal-criticals \
        G_SLICE=always-malloc \
        $(LIBTOOL) --mode=execute valgrind src/gnome-builder -vvvv -s
diff --git a/src/Makefile.am b/src/Makefile.am
index 1ebdad3..1b5fa99 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -8,24 +8,34 @@ bin_PROGRAMS = gnome-builder
 pkglibdir = $(libdir)/gnome-builder
 pkglib_LTLIBRARIES = libgnome-builder.la
 
+libgnome_builder_public_sources = \
+       app/gb-application.c \
+       app/gb-application.h \
+       app/gb-application-addin.c \
+       app/gb-application-addin.h \
+       documents/gb-document.c \
+       documents/gb-document.h \
+       editor/gb-editor-view.c \
+       editor/gb-editor-view.h \
+       editor/gb-editor-view-addin.c \
+       editor/gb-editor-view-addin.h \
+       views/gb-view.c \
+       views/gb-view.h \
+       $(NULL)
+
 libgnome_builder_la_SOURCES = \
        $(gnome_builder_built_sources) \
+       $(libgnome_builder_public_sources) \
        app/gb-application-actions.c \
        app/gb-application-actions.h \
-       app/gb-application-addin.c \
-       app/gb-application-addin.h \
        app/gb-application-credits.h \
        app/gb-application-private.h \
-       app/gb-application.c \
-       app/gb-application.h \
        dialogs/gb-new-project-dialog.c \
        dialogs/gb-new-project-dialog.h \
        dialogs/gb-projects-dialog.c \
        dialogs/gb-projects-dialog.h \
        dialogs/gb-recent-project-row.c \
        dialogs/gb-recent-project-row.h \
-       documents/gb-document.c \
-       documents/gb-document.h \
        editor/gb-editor-document.c \
        editor/gb-editor-document.h \
        editor/gb-editor-frame-actions.c \
@@ -43,11 +53,7 @@ libgnome_builder_la_SOURCES = \
        editor/gb-editor-tweak-widget.h \
        editor/gb-editor-view-actions.c \
        editor/gb-editor-view-actions.h \
-       editor/gb-editor-view-addin.c \
-       editor/gb-editor-view-addin.h \
        editor/gb-editor-view-private.h \
-       editor/gb-editor-view.c \
-       editor/gb-editor-view.h \
        greeter/gb-greeter-pill-box.c \
        greeter/gb-greeter-pill-box.h \
        greeter/gb-greeter-project-row.c \
@@ -160,8 +166,6 @@ libgnome_builder_la_SOURCES = \
        views/gb-view-stack-private.h \
        views/gb-view-stack.c \
        views/gb-view-stack.h \
-       views/gb-view.c \
-       views/gb-view.h \
        workbench/gb-workbench-actions.c \
        workbench/gb-workbench-actions.h \
        workbench/gb-workbench-addin.c \
@@ -272,4 +276,39 @@ glib_resources_namespace = gb
 include $(top_srcdir)/build/autotools/Makefile.am.gresources
 
 
+-include $(INTROSPECTION_MAKEFILE)
+
+INTROSPECTION_GIRS =
+INTROSPECTION_SCANNER_ARGS = --add-include-path=$(srcdir) --warn-all
+INTROSPECTION_COMPILER_ARGS = --includedir=$(srcdir)
+
+if HAVE_INTROSPECTION
+introspection_sources = \
+       $(libgnome_builder_public_sources) \
+       $(NULL)
+
+Builder-1.0.gir: libgnome-builder.la
+Builder_1_0_gir_INCLUDES = Gio-2.0 GtkSource-3.0 Ide-1.0 Peas-1.0
+Builder_1_0_gir_CFLAGS = $(libgnome_builder_la_CFLAGS)
+Builder_1_0_gir_LIBS = libgnome-builder.la
+Builder_1_0_gir_FILES = $(introspection_sources)
+Builder_1_0_gir_SCANNERFLAGS = \
+       --include-uninstalled=$(top_builddir)/libide/Ide-1.0.gir \
+       -n Builder \
+       --identifier-prefix=Gb \
+       --symbol-prefix=gb_ \
+       --nsversion 1.0 \
+       $(NULL)
+INTROSPECTION_GIRS += Builder-1.0.gir
+
+girdir = $(datadir)/gir-1.0
+gir_DATA = $(INTROSPECTION_GIRS)
+
+typelibdir = $(pkglibdir)/girepository-1.0
+typelib_DATA = $(INTROSPECTION_GIRS:.gir=.typelib)
+
+CLEANFILES += $(gir_DATA) $(typelib_DATA)
+endif
+
+
 -include $(top_srcdir)/git.mk
diff --git a/src/app/gb-application.c b/src/app/gb-application.c
index d4adad5..806e2c2 100644
--- a/src/app/gb-application.c
+++ b/src/app/gb-application.c
@@ -301,6 +301,13 @@ cleanup:
   g_application_release (G_APPLICATION (self));
 }
 
+/**
+ * gb_application_open_project_async:
+ * @self: A #GbApplication.
+ * @file: A #GFile.
+ * @additional_files: (element-type GFile) (nullable): A #GPtrArray of #GFile or %NULL.
+ *
+ */
 void
 gb_application_open_project_async (GbApplication       *self,
                                    GFile               *file,
diff --git a/src/documents/gb-document.c b/src/documents/gb-document.c
index c8085fd..00b6b14 100644
--- a/src/documents/gb-document.c
+++ b/src/documents/gb-document.c
@@ -104,6 +104,11 @@ gb_document_get_title (GbDocument *document)
   return GB_DOCUMENT_GET_IFACE (document)->get_title (document);
 }
 
+/**
+ * gb_document_create_view:
+ *
+ * Returns: (transfer full): A newly created #GbView.
+ */
 GtkWidget *
 gb_document_create_view (GbDocument *document)
 {
@@ -213,7 +218,7 @@ gb_document_default_init (GbDocumentInterface *iface)
    *
    * Creates a new view for the document.
    *
-   * Returns: (ctype GbView*) (transfer full): A #GbView.
+   * Returns: (type GbView) (transfer full): A #GbView.
    */
   gSignals [CREATE_VIEW] =
     g_signal_new ("create-view",
diff --git a/src/views/gb-view.c b/src/views/gb-view.c
index 0a43ed1..bb98d7d 100644
--- a/src/views/gb-view.c
+++ b/src/views/gb-view.c
@@ -325,6 +325,11 @@ buildable_iface_init (GtkBuildableIface *iface)
   iface->get_internal_child = gb_view_get_internal_child;
 }
 
+/**
+ * gb_view_get_menu:
+ *
+ * Returns: (transfer none): A #GMenu that may be modified.
+ */
 GMenu *
 gb_view_get_menu (GbView *self)
 {


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