mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-10-29 05:40:23 -04:00
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)
13 lines
426 B
Vala
13 lines
426 B
Vala
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();
|
|
}
|
|
}
|