From 35c50459f5f93afcb6fbb3a5a6c158b7f15656eb Mon Sep 17 00:00:00 2001 From: Robert Carr Date: Tue, 13 Jan 2009 06:31:48 -0500 Subject: Add pkgconfig file. --- configure.ac | 1 + libindicate/Makefile.am | 6 ++++-- libindicate/indicate.pc.in | 14 ++++++++++++++ 3 files changed, 19 insertions(+), 2 deletions(-) create mode 100644 libindicate/indicate.pc.in diff --git a/configure.ac b/configure.ac index eeca255..cff6775 100644 --- a/configure.ac +++ b/configure.ac @@ -69,6 +69,7 @@ AC_OUTPUT([ Makefile src/Makefile libindicate/Makefile +libindicate/indicate.pc libindicate/tests/Makefile data/Makefile data/icons/Makefile diff --git a/libindicate/Makefile.am b/libindicate/Makefile.am index 86ef22a..3dd211d 100644 --- a/libindicate/Makefile.am +++ b/libindicate/Makefile.am @@ -1,6 +1,5 @@ -SUBDIRS = \ - tests +SUBDIRS = tests INCLUDES= \ -DG_LOG_DOMAIN=\"libindicate\" @@ -46,3 +45,6 @@ dbus-indicate-server.h: indicate-server.xml --mode=glib-server \ --output=dbus-indicate-server.h \ $(srcdir)/indicate-server.xml + +pkgconfig_DATA = indicate.pc +pkgconfigdir = $(libdir)/pkgconfig diff --git a/libindicate/indicate.pc.in b/libindicate/indicate.pc.in new file mode 100644 index 0000000..cdc79b6 --- /dev/null +++ b/libindicate/indicate.pc.in @@ -0,0 +1,14 @@ +prefix=@prefix@ +exec_prefix=@exec_prefix@ +libdir=@libdir@ +bindir=@bindir@ +includedir=@includedir@ + +Cflags: -I${includedir}/libindicate-0.1 +Requires: gtk+-2.0 dbus-glib-1 +Libs: -L${libdir} -lindicate + +Name: libindicate +Description: libindicate. +Version: @VERSION@ + -- cgit v1.2.3 From 27a71bbaac3902093a9c1d1fecfadf670c3f2fb8 Mon Sep 17 00:00:00 2001 From: Robert Carr Date: Tue, 13 Jan 2009 06:43:38 -0500 Subject: Use G_BEGIN/END_DECLS, and put the GOBject *_get_type functions in the header file (needed by introspection, but also the normal GLib style). --- libindicate/indicator.h | 5 +++++ libindicate/server.h | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/libindicate/indicator.h b/libindicate/indicator.h index 3c8efc8..2a15e3b 100644 --- a/libindicate/indicator.h +++ b/libindicate/indicator.h @@ -5,6 +5,8 @@ #include #include +G_BEGIN_DECLS + /* Boilerplate */ #define INDICATE_TYPE_INDICATOR (indicate_indicator_get_type ()) #define INDICATE_INDICATOR(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), INDICATE_TYPE_INDICATOR, IndicateIndicator)) @@ -43,6 +45,8 @@ struct _IndicateIndicatorClass { const gchar * (*get_type) (IndicateIndicator * indicator); }; +GType indicate_indicator_get_type(void) G_GNUC_CONST; + IndicateIndicator * indicate_indicator_new (void); /* Should these just be GObject properties? */ @@ -61,6 +65,7 @@ guint indicate_indicator_get_id (IndicateIndicator * indicator); * subclass and exported through this pretty function */ const gchar * indicate_indicator_get_indicator_type (IndicateIndicator * indicator); +G_END_DECLS #endif /* INDICATE_INDICATOR_H_INCLUDED__ */ diff --git a/libindicate/server.h b/libindicate/server.h index 486252c..ef00846 100644 --- a/libindicate/server.h +++ b/libindicate/server.h @@ -5,6 +5,8 @@ #include #include +G_BEGIN_DECLS + /* Boilerplate */ #define INDICATE_TYPE_SERVER (indicate_server_get_type ()) #define INDICATE_SERVER(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), INDICATE_TYPE_SERVER, IndicateServer)) @@ -48,6 +50,8 @@ struct _IndicateServerClass { gboolean (*show_indicator_to_user) (IndicateServer * server, guint id, GError ** error); }; +GType indicate_server_get_type (void) G_GNUC_CONST; + /* Create a new server */ IndicateServer * indicate_server_new (void); @@ -82,6 +86,7 @@ gboolean indicate_server_get_indicator_property_group (IndicateServer * server, gboolean indicate_server_get_indicator_properties (IndicateServer * server, guint id, gchar *** properties, GError **error); gboolean indicate_server_show_indicator_to_user (IndicateServer * server, guint id, GError ** error); +G_END_DECLS #endif /* INDICATE_INDICATOR_H_INCLUDED__ */ -- cgit v1.2.3 From 71820cb18ffb779c39e15e758515c6bcad8ac455 Mon Sep 17 00:00:00 2001 From: Robert Carr Date: Tue, 13 Jan 2009 06:47:42 -0500 Subject: Add script to build GObject-introspection GIR, and boilerplate JavaScript test. --- libindicate/gir.sh | 2 ++ libindicate/tests/test.js | 6 ++++++ 2 files changed, 8 insertions(+) create mode 100644 libindicate/gir.sh create mode 100755 libindicate/tests/test.js diff --git a/libindicate/gir.sh b/libindicate/gir.sh new file mode 100644 index 0000000..e6cdd63 --- /dev/null +++ b/libindicate/gir.sh @@ -0,0 +1,2 @@ +g-ir-scanner -v --namespace Indicate --nsversion=0.1 --add-include-path=. --include=GObject-2.0 --include=GLib-2.0 --library=indicate --pkg indicate --output Indicate-0.1.gir indicator.h server.h +g-ir-compiler --includedir=. Indicate-0.1.gir -o Indicate-0.1.typelib diff --git a/libindicate/tests/test.js b/libindicate/tests/test.js new file mode 100755 index 0000000..45b0d05 --- /dev/null +++ b/libindicate/tests/test.js @@ -0,0 +1,6 @@ +#!/usr/local/bin/seed +Seed.import_namespace("Indicate"); + +var indicator = new Indicate.Indicator(); + +indicator.show(); -- cgit v1.2.3