Generate GDBus proxy object for org.gtk.Application

Having a proxy object will make it easier to monitor the application's
busy state.

This adds a dependency on gdbus-codegen

https://bugzilla.gnome.org/show_bug.cgi?id=736492
This commit is contained in:
Phillip Wood 2014-09-18 12:15:06 +01:00
parent dbf16d6ea3
commit 943f6c9d28
3 changed files with 38 additions and 1 deletions

View File

@ -237,6 +237,12 @@ if test -z "${BROWSER_PLUGIN_DIR}"; then
fi fi
AC_ARG_VAR([BROWSER_PLUGIN_DIR],[Where to install the plugin to]) AC_ARG_VAR([BROWSER_PLUGIN_DIR],[Where to install the plugin to])
AC_ARG_VAR([GDBUS_CODEGEN],[the gdbus-codegen programme])
AC_PATH_PROG([GDBUS_CODEGEN],[gdbus-codegen],[])
if test -z "$GDBUS_CODEGEN"; then
AC_MSG_ERROR([gdbus-codegen not found])
fi
AC_CONFIG_FILES([ AC_CONFIG_FILES([
Makefile Makefile
data/Makefile data/Makefile

View File

@ -51,6 +51,12 @@ gnome-shell-extension-tool: gnome-shell-extension-tool.in Makefile
gnome-shell-perf-tool: gnome-shell-perf-tool.in Makefile gnome-shell-perf-tool: gnome-shell-perf-tool.in Makefile
$(AM_V_GEN) sed $(generated_script_substitutions) $< > $@.tmp && mv $@.tmp $@ && chmod a+x $@ $(AM_V_GEN) sed $(generated_script_substitutions) $< > $@.tmp && mv $@.tmp $@ && chmod a+x $@
org-gtk-application.c org-gtk-application.h: org.gtk.Application.xml Makefile
$(AM_V_GEN) $(GDBUS_CODEGEN) \
--generate-c-code org-gtk-application \
--c-namespace Shell \
$<
CLEANFILES += gnome-shell $(bin_SCRIPTS) CLEANFILES += gnome-shell $(bin_SCRIPTS)
include Makefile-st.am include Makefile-st.am
@ -75,6 +81,8 @@ privlib_LTLIBRARIES = libgnome-shell-js.la libgnome-shell-menu.la libgnome-shell
noinst_LTLIBRARIES += libgnome-shell-base.la noinst_LTLIBRARIES += libgnome-shell-base.la
shell_built_sources = \ shell_built_sources = \
org-gtk-application.h \
org-gtk-application.c \
shell-enum-types.h \ shell-enum-types.h \
shell-enum-types.c shell-enum-types.c
@ -178,8 +186,12 @@ libgnome_shell_built_sources = \
libgnome_shell_la_SOURCES = $(libgnome_shell_sources) libgnome_shell_la_SOURCES = $(libgnome_shell_sources)
nodist_libgnome_shell_la_SOURCES = $(libgnome_shell_built_sources) nodist_libgnome_shell_la_SOURCES = $(libgnome_shell_built_sources)
shell_no_gir_sources = \
org-gtk-application.h \
org-gtk-application.c
libgnome_shell_la_gir_sources = \ libgnome_shell_la_gir_sources = \
$(filter-out %-private.h $(shell_private_sources), $(shell_public_headers_h) $(libgnome_shell_base_la_SOURCES) $(libgnome_shell_sources) $(libgnome_shell_built_sources)) $(filter-out %-private.h $(shell_private_sources) $(shell_no_gir_sources), $(shell_public_headers_h) $(libgnome_shell_base_la_SOURCES) $(libgnome_shell_sources) $(libgnome_shell_built_sources))
gnome_shell_SOURCES = main.c gnome_shell_SOURCES = main.c
gnome_shell_CPPFLAGS = \ gnome_shell_CPPFLAGS = \

View File

@ -0,0 +1,19 @@
<node>
<interface name='org.gtk.Application'>
<method name='Activate'>
<arg type='a{sv}' name='platform_data' direction='in'/>
</method>
<method name='Open'>
<arg type='as' name='uris' direction='in'/>
<arg type='s' name='hint' direction='in'/>
<arg type='a{sv}' name='platform_data' direction='in'/>
</method>
<method name='CommandLine'>
<arg type='o' name='path' direction='in'/>
<arg type='aay' name='arguments' direction='in'/>
<arg type='a{sv}' name='platform_data' direction='in'/>
<arg type='i' name='exit_status' direction='out'/>
</method>
<property name='Busy' type='b' access='read'/>
</interface>
</node>