diff options
-rw-r--r-- | .bzrignore | 4 | ||||
-rw-r--r-- | Makefile.am.marshal | 45 | ||||
-rw-r--r-- | configure.ac | 2 | ||||
-rw-r--r-- | libindicator/Makefile.am | 8 | ||||
-rw-r--r-- | libindicator/indicator-object-marshal.list | 1 | ||||
-rw-r--r-- | libindicator/indicator-object.c | 16 |
6 files changed, 76 insertions, 0 deletions
@@ -143,3 +143,7 @@ tests/service-version-manager tests/service-version-tester tests/service-manager-connect-nostart-tester tests/service-manager-nostart-connect +libindicator/indicator-object-marshal.c +libindicator/indicator-object-marshal.h +libindicator/libindicator_la-indicator-object-marshal.lo +libindicator/stamp-marshal diff --git a/Makefile.am.marshal b/Makefile.am.marshal new file mode 100644 index 0000000..a6ab024 --- /dev/null +++ b/Makefile.am.marshal @@ -0,0 +1,45 @@ +# Rules for generating marshal files using glib-genmarshal +# +# Define: +# glib_marshal_list = marshal list file +# glib_marshal_prefix = prefix for marshal functions +# +# before including Makefile.am.marshal. You will also need to have +# the following targets already defined: +# +# CLEANFILES +# DISTCLEANFILES +# BUILT_SOURCES +# EXTRA_DIST +# +# Author: Emmanuele Bassi <ebassi@linux.intel.com> + +marshal_h = $(glib_marshal_list:.list=.h) +marshal_c = $(glib_marshal_list:.list=.c) + +CLEANFILES += stamp-marshal +DISTCLEANFILES += $(marshal_h) $(marshal_c) +BUILT_SOURCES += $(marshal_h) $(marshal_c) +EXTRA_DIST += $(glib_marshal_list) + +stamp-marshal: $(glib_marshal_list) + $(QUIET_GEN)$(GLIB_GENMARSHAL) \ + --prefix=$(glib_marshal_prefix) \ + --header \ + $(srcdir)/$(glib_marshal_list) > xgen-mh \ + && (cmp -s xgen-mh $(marshal_h) || cp -f xgen-mh $(marshal_h)) \ + && rm -f xgen-mh \ + && echo timestamp > $(@F) + +$(marshal_h): stamp-marshal + @true + +$(marshal_c): $(marshal_h) + $(QUIET_GEN)(echo "#include \"$(marshal_h)\"" ; \ + $(GLIB_GENMARSHAL) \ + --prefix=$(glib_marshal_prefix) \ + --body \ + $(srcdir)/$(glib_marshal_list)) > xgen-mc \ + && cp xgen-mc $(marshal_c) \ + && rm -f xgen-mc + diff --git a/configure.ac b/configure.ac index 676af4e..04d7d38 100644 --- a/configure.ac +++ b/configure.ac @@ -15,6 +15,8 @@ AM_PROG_CC_C_O AC_STDC_HEADERS AC_PROG_LIBTOOL +AC_PATH_PROG([GLIB_GENMARSHAL], [glib-genmarshal]) + AC_SUBST(VERSION) AC_CONFIG_MACRO_DIR([m4]) diff --git a/libindicator/Makefile.am b/libindicator/Makefile.am index 6d5c627..19247ce 100644 --- a/libindicator/Makefile.am +++ b/libindicator/Makefile.am @@ -1,8 +1,11 @@ BUILT_SOURCES = CLEANFILES = +DISTCLEANFILES = EXTRA_DIST = \ indicator.pc.in +include $(top_srcdir)/Makefile.am.marshal + libindicatorincludedir=$(includedir)/libindicator-0.3/libindicator indicator_headers = \ @@ -21,6 +24,8 @@ libindicator_la_SOURCES = \ $(indicator_headers) \ dbus-shared.h \ indicator-object.c \ + indicator-object-marshal.h \ + indicator-object-marshal.c \ indicator-service.c \ indicator-service-manager.c @@ -35,6 +40,9 @@ libindicator_la_LIBADD = \ pkgconfig_DATA = indicator.pc pkgconfigdir = $(libdir)/pkgconfig +glib_marshal_list = indicator-object-marshal.list +glib_marshal_prefix = _indicator_object_marshal + ################################## # DBus Specs ################################## diff --git a/libindicator/indicator-object-marshal.list b/libindicator/indicator-object-marshal.list new file mode 100644 index 0000000..5c11033 --- /dev/null +++ b/libindicator/indicator-object-marshal.list @@ -0,0 +1 @@ +VOID: POINTER, UINT, UINT diff --git a/libindicator/indicator-object.c b/libindicator/indicator-object.c index e87fa5f..8e1edef 100644 --- a/libindicator/indicator-object.c +++ b/libindicator/indicator-object.c @@ -27,6 +27,7 @@ License along with this library. If not, see #include "indicator.h" #include "indicator-object.h" +#include "indicator-object-marshal.h" /** IndicatorObjectPrivate: @@ -54,6 +55,7 @@ struct _IndicatorObjectPrivate { enum { ENTRY_ADDED, ENTRY_REMOVED, + ENTRY_MOVED, LAST_SIGNAL }; @@ -116,6 +118,20 @@ indicator_object_class_init (IndicatorObjectClass *klass) NULL, NULL, g_cclosure_marshal_VOID__POINTER, G_TYPE_NONE, 1, G_TYPE_POINTER, G_TYPE_NONE); + /** + IndicatorObject::entry-moved: + @arg0: The #IndicatorObject object + + Signaled when an entry is removed and should + be removed by the person using this object. + */ + signals[ENTRY_MOVED] = g_signal_new (INDICATOR_OBJECT_SIGNAL_ENTRY_MOVED, + G_TYPE_FROM_CLASS(klass), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (IndicatorObjectClass, entry_moved), + NULL, NULL, + _indicator_object_marshal_VOID__POINTER_UINT_UINT, + G_TYPE_NONE, 3, G_TYPE_POINTER, G_TYPE_UINT, G_TYPE_UINT, G_TYPE_NONE); return; } |