mirror of
https://github.com/pulseaudio/pulseaudio.git
synced 2024-11-23 09:53:32 +08:00
vala: move GLibMainLoop class into separate file to fix linker errors
Vala uses the name of the *.vapi file to determine the libraries to link against. Since the pa_glib_mainloop_*() functions are in a separate library (libpulse-mainloop-glib.so) the corresponding objects in the Vala bindings have to be in a separate *.vapi file. If you are compiling an app without the GLib integration you could use: $ valac --pkg=libpulse test.vala but if you do use GLib you can use: $ valac --pkg=libpulse-mainloop-glib test.vala (libpulse is a dep of the libpulse-mainloop-glib so no need to specify it explicitly)
This commit is contained in:
parent
8dc0df0538
commit
9defe846e7
@ -29,7 +29,9 @@ EXTRA_DIST = \
|
||||
README \
|
||||
todo \
|
||||
vala/libpulse.deps \
|
||||
vala/libpulse.vapi
|
||||
vala/libpulse.vapi \
|
||||
vala/libpulse-mainloop-glib.deps \
|
||||
vala/libpulse-mainloop-glib.vapi
|
||||
|
||||
SUBDIRS = src doxygen man po
|
||||
|
||||
@ -37,7 +39,9 @@ MAINTAINERCLEANFILES =
|
||||
noinst_DATA =
|
||||
|
||||
vapidir = $(datadir)/vala/vapi
|
||||
vapi_DATA = vala/libpulse.deps vala/libpulse.vapi
|
||||
vapi_DATA = \
|
||||
vala/libpulse.deps vala/libpulse.vapi \
|
||||
libpulse-mainloop-glib.deps libpulse-mainloop-glib.vapi
|
||||
|
||||
pkgconfigdir = $(libdir)/pkgconfig
|
||||
pkgconfig_DATA = libpulse.pc libpulse-simple.pc
|
||||
|
1
vala/libpulse-mainloop-glib.deps
Normal file
1
vala/libpulse-mainloop-glib.deps
Normal file
@ -0,0 +1 @@
|
||||
libpulse
|
13
vala/libpulse-mainloop-glib.vapi
Normal file
13
vala/libpulse-mainloop-glib.vapi
Normal file
@ -0,0 +1,13 @@
|
||||
using GLib;
|
||||
|
||||
namespace PulseAudio {
|
||||
[Compact]
|
||||
[CCode (cheader_filename="pulse/glib-mainloop.h", cname="pa_glib_mainloop", cprefix="pa_glib_mainloop_", free_function="pa_glib_mainloop_free")]
|
||||
public class GLibMainLoop {
|
||||
|
||||
[CCode (cname="pa_glib_mainloop_new")]
|
||||
public GLibMainLoop(MainContext? c = null);
|
||||
|
||||
public unowned MainLoopApi get_api();
|
||||
}
|
||||
}
|
@ -878,16 +878,6 @@ namespace PulseAudio {
|
||||
public bool in_thread();
|
||||
}
|
||||
|
||||
[Compact]
|
||||
[CCode (cheader_filename="pulse/glib-mainloop.h", cname="pa_glib_mainloop", cprefix="pa_glib_mainloop_", free_function="pa_glib_mainloop_free")]
|
||||
public class GLibMainLoop {
|
||||
|
||||
[CCode (cname="pa_glib_mainloop_new")]
|
||||
public GLibMainLoop(MainContext? c = null);
|
||||
|
||||
public unowned MainLoopApi get_api();
|
||||
}
|
||||
|
||||
[Compact]
|
||||
[CCode (cname="pa_operation", cprefix="pa_operation_", unref_function="pa_operation_unref", ref_function="pa_operation_ref")]
|
||||
public class Operation {
|
||||
|
Loading…
Reference in New Issue
Block a user