mirror of
https://git.pwmt.org/pwmt/zathura.git
synced 2024-12-27 14:06:00 +01:00
Add a header for D-Bus interface definitions
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
This commit is contained in:
parent
2eeaef341c
commit
5a9f53b2b7
3 changed files with 12 additions and 5 deletions
5
Makefile
5
Makefile
|
@ -68,9 +68,10 @@ version.h: version.h.in config.mk
|
|||
$(QUIET)mv version.h.tmp version.h
|
||||
|
||||
dbus-interface-definitions.c: data/org.pwmt.zathura.xml
|
||||
$(QUIET)echo "const char* DBUS_INTERFACE_XML =" > dbus-interface-definitions.c.tmp
|
||||
$(QUIET)echo '#include "dbus-interface-definitions.h"' > dbus-interface-definitions.c.tmp
|
||||
$(QUIET)echo 'const char* DBUS_INTERFACE_XML =' >> dbus-interface-definitions.c.tmp
|
||||
$(QUIET)sed 's/^\(.*\)$$/"\1\\n"/' data/org.pwmt.zathura.xml >> dbus-interface-definitions.c.tmp
|
||||
$(QUIET)echo ";" >> dbus-interface-definitions.c.tmp
|
||||
$(QUIET)echo ';' >> dbus-interface-definitions.c.tmp
|
||||
$(QUIET)mv dbus-interface-definitions.c.tmp dbus-interface-definitions.c
|
||||
|
||||
%.o: %.c
|
||||
|
|
8
dbus-interface-definitions.h
Normal file
8
dbus-interface-definitions.h
Normal file
|
@ -0,0 +1,8 @@
|
|||
/* See LICENSE file for license and copyright information */
|
||||
|
||||
#ifndef ZATHURA_DBUS_INTERFACE_DEFINITIONS
|
||||
#define ZATHURA_DBUS_INTERFACE_DEFINITIONS
|
||||
|
||||
const char* DBUS_INTERFACE_XML;
|
||||
|
||||
#endif
|
|
@ -6,6 +6,7 @@
|
|||
#include "zathura.h"
|
||||
#include "document.h"
|
||||
#include "utils.h"
|
||||
#include "dbus-interface-definitions.h"
|
||||
|
||||
#include <girara/utils.h>
|
||||
#include <gio/gio.h>
|
||||
|
@ -34,9 +35,6 @@ typedef struct private_s {
|
|||
(G_TYPE_INSTANCE_GET_PRIVATE((obj), ZATHURA_TYPE_DBUS, \
|
||||
private_t))
|
||||
|
||||
/* in dbus-interface-definitions.c */
|
||||
extern const char* DBUS_INTERFACE_XML;
|
||||
|
||||
static const GDBusInterfaceVTable interface_vtable;
|
||||
|
||||
static void
|
||||
|
|
Loading…
Reference in a new issue