[gnome-shell/wip/sass] Generate GDBus proxy object for org.gtk.Application



commit 9de348067b65ea54652b76624f8e0b66f74e2fc1
Author: Phillip Wood <phillip wood dunelm org uk>
Date:   Thu Sep 18 12:15:06 2014 +0100

    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

 configure.ac                |    6 ++++++
 src/Makefile.am             |   14 +++++++++++++-
 src/org.gtk.Application.xml |   19 +++++++++++++++++++
 3 files changed, 38 insertions(+), 1 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index ba173ce..b392f49 100644
--- a/configure.ac
+++ b/configure.ac
@@ -237,6 +237,12 @@ if test -z "${BROWSER_PLUGIN_DIR}"; then
 fi
 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([
   Makefile
   data/Makefile
diff --git a/src/Makefile.am b/src/Makefile.am
index a73eaae..dda1061 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -51,6 +51,12 @@ gnome-shell-extension-tool: gnome-shell-extension-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 $@
 
+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)
 
 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
 
 shell_built_sources = \
+       org-gtk-application.h \
+       org-gtk-application.c \
        shell-enum-types.h \
        shell-enum-types.c
 
@@ -178,8 +186,12 @@ libgnome_shell_built_sources =             \
 libgnome_shell_la_SOURCES = $(libgnome_shell_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 = \
-       $(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_CPPFLAGS = \
diff --git a/src/org.gtk.Application.xml b/src/org.gtk.Application.xml
new file mode 100644
index 0000000..161aa1d
--- /dev/null
+++ b/src/org.gtk.Application.xml
@@ -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>


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