Commit 76b50bf4 authored by Jonathan Matthew's avatar Jonathan Matthew

Generate gobject-introspection data and allow it to be loaded

parent f6849f83
......@@ -32,6 +32,10 @@ rhythmbox.pc
#
bindings/python/rb.c
bindings/python/rhythmdb.c
bindings/gi/MPID-0.13.gir
bindings/gi/MPID-0.13.typelib
bindings/gi/RB-0.13.gir
bindings/gi/RB-0.13.typelib
#
org.gnome.Rhythmbox.service
......
......@@ -4,7 +4,9 @@ DISTCHECK_CONFIGURE_FLAGS = --disable-schemas-install --enable-gtk-doc --disable
distuninstallcheck_listfiles = find . -type f -print | grep -v '^\./var/scrollkeeper'
SUBDIRS = macros lib metadata rhythmdb widgets sources podcast \
backends bindings shell plugins remote data po help tests doc
backends shell bindings plugins remote data po help tests doc
INCLUDES = rhythmbox.h
EXTRA_DIST = \
autogen.sh \
......
SUBDIRS =
SUBDIRS = gi
if ENABLE_VALA
SUBDIRS += vala
......
-include $(INTROSPECTION_MAKEFILE)
INTROSPECTION_GIRS =
INTROSPECTION_SCANNER_ARGS = --add-include-path=$(top_srcdir) --add-include-path=$(top_builddir)/bindings/gi --c-include=rhythmbox.h --warn-all
INTROSPECTION_COMPILER_ARGS = --includedir=$(top_srcdir)
mpid_introspection_sources = \
lib/libmediaplayerid/mediaplayerid.h \
lib/libmediaplayerid/mpid-device.c
rb_introspection_sources = \
backends/rb-encoder.h \
backends/rb-encoder.c \
backends/rb-player-gst-filter.h \
backends/rb-player-gst-filter.c \
backends/rb-player-gst-tee.h \
backends/rb-player-gst-tee.c \
backends/rb-player.h \
backends/rb-player.c \
lib/rb-builder-helpers.h \
lib/rb-builder-helpers.c \
lib/rb-debug.h \
lib/rb-debug.c \
lib/rb-file-helpers.h \
lib/rb-file-helpers.c \
lib/rb-preferences.h \
lib/rb-stock-icons.h \
lib/rb-stock-icons.c \
lib/rb-string-value-map.h \
lib/rb-string-value-map.c \
lib/rb-util.h \
lib/rb-util.c \
metadata/rb-metadata.h \
metadata/rb-metadata-dbus-client.c \
podcast/rb-podcast-manager.h \
podcast/rb-podcast-manager.c \
podcast/rb-podcast-parse.h \
podcast/rb-podcast-parse.c \
rhythmdb/rhythmdb.h \
rhythmdb/rhythmdb.c \
rhythmdb/rhythmdb-entry.h \
rhythmdb/rhythmdb-entry-type.h \
rhythmdb/rhythmdb-entry-type.c \
rhythmdb/rhythmdb-property-model.h \
rhythmdb/rhythmdb-property-model.c \
rhythmdb/rhythmdb-query.c \
rhythmdb/rhythmdb-query-model.h \
rhythmdb/rhythmdb-query-model.c \
rhythmdb/rhythmdb-query-results.h \
rhythmdb/rhythmdb-query-results.c \
rhythmdb/rhythmdb-import-job.h \
rhythmdb/rhythmdb-import-job.c \
rhythmdb/rhythmdb-song-entry-types.c \
rhythmdb/rb-refstring.h \
rhythmdb/rb-refstring.c \
shell/rb-shell.h \
shell/rb-shell.c \
shell/rb-shell-player.h \
shell/rb-shell-player.c \
shell/rb-shell-preferences.h \
shell/rb-shell-preferences.c \
shell/rb-playlist-manager.h \
shell/rb-playlist-manager.c \
shell/rb-removable-media-manager.h \
shell/rb-removable-media-manager.c \
shell/rb-history.h \
shell/rb-history.c \
shell/rb-play-order.h \
shell/rb-play-order.c \
shell/rb-plugin.h \
shell/rb-plugin.c \
shell/rb-track-transfer-batch.c \
shell/rb-track-transfer-batch.h \
shell/rb-track-transfer-queue.c \
shell/rb-track-transfer-queue.h \
sources/rb-display-page.h \
sources/rb-display-page.c \
sources/rb-display-page-group.h \
sources/rb-display-page-group.c \
sources/rb-display-page-model.h \
sources/rb-display-page-model.c \
sources/rb-display-page-tree.h \
sources/rb-display-page-tree.c \
sources/rb-source.h \
sources/rb-source.c \
sources/rb-streaming-source.h \
sources/rb-streaming-source.c \
sources/rb-source-search.h \
sources/rb-source-search.c \
sources/rb-browser-source.h \
sources/rb-browser-source.c \
sources/rb-removable-media-source.h \
sources/rb-removable-media-source.c \
sources/rb-media-player-source.h \
sources/rb-media-player-source.c \
sources/rb-playlist-source.h \
sources/rb-playlist-source.c \
sources/rb-playlist-xml.h \
sources/rb-auto-playlist-source.h \
sources/rb-auto-playlist-source.c \
sources/rb-static-playlist-source.h \
sources/rb-static-playlist-source.c \
sources/rb-source-search-basic.h \
sources/rb-source-search-basic.c \
widgets/rb-entry-view.h \
widgets/rb-entry-view.c \
widgets/rb-property-view.h \
widgets/rb-property-view.c \
widgets/rb-dialog.h \
widgets/rb-dialog.c \
widgets/rb-cell-renderer-pixbuf.h \
widgets/rb-cell-renderer-pixbuf.c \
widgets/rb-cell-renderer-rating.h \
widgets/rb-cell-renderer-rating.c \
widgets/rb-rating.h \
widgets/rb-rating.c \
widgets/rb-library-browser.h \
widgets/rb-library-browser.c \
widgets/rb-segmented-bar.h \
widgets/rb-segmented-bar.c \
widgets/rb-song-info.h \
widgets/rb-song-info.c \
widgets/rb-uri-dialog.h \
widgets/rb-uri-dialog.c
MPID-0.13.gir: $(top_builddir)/shell/librhythmbox-core.la
MPID_0_13_gir_INCLUDES = GObject-2.0
MPID_0_13_gir_CFLAGS = $(RHYTHMBOX_CFLAGS_NOWARN) $(GUDEV_CFLAGS) -I../..
MPID_0_13_gir_LIBS = $(top_builddir)/shell/librhythmbox-core.la
MPID_0_13_gir_FILES = $(addprefix $(top_srcdir)/,$(mpid_introspection_sources))
MPID_0_13_gir_PACKAGES = gobject-2.0
MPID_0_13_gir_SCANNERFLAGS = --symbol-prefix mpid_
RB-0.13.gir: $(top_builddir)/shell/librhythmbox-core.la MPID-0.13.gir
RB_0_13_gir_INCLUDES = GObject-2.0 Gio-2.0 Gtk-3.0 Gst-0.10 libxml2-2.0
RB_0_13_gir_CFLAGS = $(RHYTHMBOX_CFLAGS_NOWARN) $(TOTEM_PLPARSER_CFLAGS) $(DBUS_CFLAGS) $(GUDEV_CFLAGS) -I../..
RB_0_13_gir_LIBS = $(top_builddir)/shell/librhythmbox-core.la
RB_0_13_gir_FILES = $(addprefix $(top_srcdir)/,$(rb_introspection_sources))
RB_0_13_gir_PACKAGES = gobject-2.0 gio-2.0 gtk+-3.0 gstreamer-0.10 libxml-2.0
RB_0_13_gir_SCANNERFLAGS = --symbol-prefix rb_ --identifier-prefix RB --accept-unprefixed --include-uninstalled=$(builddir)/MPID-0.13.gir
INTROSPECTION_GIRS += MPID-0.13.gir RB-0.13.gir
girdir = $(datadir)/gir-1.0
dist_gir_DATA = $(INTROSPECTION_GIRS)
typelibdir = $(libdir)/girepository-1.0
typelib_DATA = $(INTROSPECTION_GIRS:.gir=.typelib)
CLEANFILES = $(dist_gir_DATA) $(typelib_DATA)
......@@ -30,6 +30,9 @@ dnl XXXX hack to kill off all the libtool tags ...
dnl it isn't like we are using C++ or Fortran.
m4_define([_LT_AC_TAGCONFIG],[])
GOBJECT_INTROSPECTION_REQS=0.10.0
GOBJECT_INTROSPECTION_REQUIRE([$GOBJECT_INTROSPECTION_REQS])
IT_PROG_INTLTOOL([0.35.0])
AC_ISC_POSIX
......@@ -92,6 +95,7 @@ PKG_CHECK_MODULES(RB_CLIENT, glib-2.0 >= $GLIB_REQS gio-2.0 >= $GLIB_REQS gio-un
dnl note: gio-unix-2.0 is here for libmediaplayerid
PKG_CHECK_MODULES(RHYTHMBOX, \
gobject-introspection-1.0 >= $GOBJECT_INTROSPECTION_REQS \
gtk+-3.0 >= $GTK_REQS \
gdk-pixbuf-2.0 >= $GDK_PIXBUF_REQS \
glib-2.0 >= $GLIB_REQS \
......@@ -546,6 +550,8 @@ else
set_more_warnings=no
fi
])
RHYTHMBOX_CFLAGS_NOWARN=$RHYTHMBOX_CFLAGS
AC_SUBST(RHYTHMBOX_CFLAGS_NOWARN)
AC_MSG_CHECKING(for more warnings, including -Werror)
if test "$GCC" = "yes" -a "$set_more_warnings" != "no"; then
AC_MSG_RESULT(yes)
......@@ -930,6 +936,7 @@ plugins/dbus-media-server/Makefile
plugins/rbzeitgeist/Makefile
bindings/Makefile
bindings/vala/Makefile
bindings/gi/Makefile
help/Makefile
po/Makefile.in
tests/Makefile
......
/*
* Copyright (C) 2010 Jonathan Matthew <jonathan@d14n.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2, or (at your option)
* any later version.
*
* The Rhythmbox authors hereby grant permission for non-GPL compatible
* GStreamer plugins to be used and distributed together with GStreamer
* and Rhythmbox. This permission is above and beyond the permissions granted
* by the GPL license by which Rhythmbox is covered. If you modify this code
* you may extend this exception to your version of the code, but you are not
* obligated to do so. If you do not wish to do so, delete this exception
* statement from your version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
*/
#ifndef __RHYTHMBOX_H
#define __RHYTHMBOX_H
#include <backends/rb-encoder.h>
#include <backends/rb-player-gst-filter.h>
#include <backends/rb-player-gst-tee.h>
#include <backends/rb-player.h>
#include <lib/rb-builder-helpers.h>
#include <lib/rb-debug.h>
#include <lib/rb-file-helpers.h>
#include <lib/rb-preferences.h>
#include <lib/rb-stock-icons.h>
#include <lib/rb-util.h>
#include <lib/libmediaplayerid/mediaplayerid.h>
#include <metadata/rb-metadata.h>
#include <podcast/rb-podcast-manager.h>
#include <podcast/rb-podcast-parse.h>
#include <shell/rb-shell.h>
#include <shell/rb-shell-player.h>
#include <shell/rb-shell-preferences.h>
#include <shell/rb-playlist-manager.h>
#include <shell/rb-removable-media-manager.h>
#include <shell/rb-history.h>
#include <shell/rb-play-order.h>
#include <shell/rb-plugin.h>
#include <sources/rb-display-page.h>
#include <sources/rb-display-page-group.h>
#include <sources/rb-display-page-model.h>
#include <sources/rb-display-page-tree.h>
#include <sources/rb-source.h>
#include <sources/rb-streaming-source.h>
#include <sources/rb-source-search.h>
#include <sources/rb-browser-source.h>
#include <sources/rb-removable-media-source.h>
#include <sources/rb-media-player-source.h>
#include <sources/rb-playlist-source.h>
#include <sources/rb-playlist-xml.h>
#include <sources/rb-auto-playlist-source.h>
#include <sources/rb-static-playlist-source.h>
#include <sources/rb-source-search-basic.h>
#include <widgets/rb-entry-view.h>
#include <widgets/rb-property-view.h>
#include <widgets/rb-dialog.h>
#include <widgets/rb-cell-renderer-pixbuf.h>
#include <widgets/rb-cell-renderer-rating.h>
#include <widgets/rb-rating.h>
#include <widgets/rb-library-browser.h>
#include <widgets/rb-segmented-bar.h>
#include <widgets/rb-song-info.h>
#include <widgets/rb-uri-dialog.h>
#include <lib/rb-string-value-map.h>
#include <rhythmdb/rhythmdb.h>
#include <rhythmdb/rhythmdb-property-model.h>
#include <rhythmdb/rhythmdb-query-model.h>
#include <rhythmdb/rhythmdb-query-results.h>
#include <rhythmdb/rhythmdb-import-job.h>
#include <rhythmdb/rb-refstring.h>
#endif /* __RHYTHMBOX_H */
......@@ -162,7 +162,8 @@ rhythmbox_LDADD = \
librhythmbox-core.la \
$(TOTEM_PLPARSER_LIBS) \
$(RHYTHMBOX_LIBS) \
$(DBUS_LIBS)
$(DBUS_LIBS) \
$(INTROSPECTION_LIBS)
rhythmbox_LDFLAGS = -export-dynamic -no-undefined
......@@ -170,7 +171,6 @@ if ENABLE_PYTHON
rhythmbox_LDADD += $(PYTHON_LIBS)
endif
BUILT_SOURCES += $(tab_files)
CLEANFILES += $(BUILT_SOURCES)
......@@ -60,6 +60,8 @@
#include <libgda/libgda.h>
#endif
#include <gobject-introspection-1.0/girepository.h>
#include "rb-refstring.h"
#include "rb-shell.h"
#include "rb-shell-player.h"
......@@ -179,6 +181,10 @@ main (int argc, char **argv)
rb_debug_init (debug);
rb_debug ("initializing Rhythmbox %s", VERSION);
#if defined(USE_UNINSTALLED_DIRS)
g_irepository_prepend_search_path (SHARE_UNINSTALLED_BUILDDIR "/../bindings/gi");
#endif
/* TODO: kill this function */
rb_threads_init ();
gdk_threads_enter ();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment