From 430020b1d323df229967b005d7fde6023ecc2600 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Corentin=20No=C3=ABl?= Date: Tue, 10 Apr 2018 17:56:05 +0100 Subject: [PATCH] vala: install dependency files and a different .vapi file for each GTK+ version --- Makefile.am | 13 ++++++++++--- vala/libcanberra-gtk.deps | 3 +++ vala/libcanberra-gtk3.deps | 3 +++ vala/libcanberra-gtk3.vapi | 37 +++++++++++++++++++++++++++++++++++++ 4 files changed, 53 insertions(+), 3 deletions(-) create mode 100644 vala/libcanberra-gtk.deps create mode 100644 vala/libcanberra-gtk3.deps create mode 100644 vala/libcanberra-gtk3.vapi diff --git a/Makefile.am b/Makefile.am index 42a56e5..efff07e 100644 --- a/Makefile.am +++ b/Makefile.am @@ -26,7 +26,9 @@ EXTRA_DIST = \ autogen.sh \ LGPL \ vala/libcanberra.vapi \ - vala/libcanberra-gtk.vapi + vala/libcanberra-gtk3.vapi \ + vala/libcanberra-gtk.deps \ + vala/libcanberra-gtk3.deps SUBDIRS = src gtkdoc doc @@ -45,13 +47,18 @@ if HAVE_GTK_ANY if HAVE_GTK pkgconfig_DATA += libcanberra-gtk.pc +vapi_DATA += \ + vala/libcanberra-gtk.vapi \ + vala/libcanberra-gtk.deps endif if HAVE_GTK3 pkgconfig_DATA += libcanberra-gtk3.pc -endif +vapi_DATA += \ + vala/libcanberra-gtk3.vapi \ + vala/libcanberra-gtk3.deps -vapi_DATA += vala/libcanberra-gtk.vapi +endif endif diff --git a/vala/libcanberra-gtk.deps b/vala/libcanberra-gtk.deps new file mode 100644 index 0000000..dfbb132 --- /dev/null +++ b/vala/libcanberra-gtk.deps @@ -0,0 +1,3 @@ +gtk-2.0 +gdk-2.0 +libcanberra diff --git a/vala/libcanberra-gtk3.deps b/vala/libcanberra-gtk3.deps new file mode 100644 index 0000000..437f617 --- /dev/null +++ b/vala/libcanberra-gtk3.deps @@ -0,0 +1,3 @@ +gtk-3.0 +gdk-2.0 +libcanberra diff --git a/vala/libcanberra-gtk3.vapi b/vala/libcanberra-gtk3.vapi new file mode 100644 index 0000000..f788f8e --- /dev/null +++ b/vala/libcanberra-gtk3.vapi @@ -0,0 +1,37 @@ +/*** + This file is part of libcanberra. + + Copyright 2009 Lennart Poettering + + libcanberra is free software; you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation, either version 2.1 of the + License, or (at your option) any later version. + + libcanberra is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with libcanberra. If not, see + . +***/ + +using Canberra; +using Gdk; +using Gtk; + +[CCode (cprefix = "CA_GTK_", lower_case_cprefix = "ca_gtk_", cheader_filename = "canberra-gtk.h")] +namespace CanberraGtk { + + public unowned Context? context_get(); + public unowned Context? context_get_for_screen(Gdk.Screen? screen); + + public int proplist_set_for_widget(Proplist p, Gtk.Widget w); + public int play_for_widget(Gtk.Widget w, uint32 id, ...); + public int proplist_set_for_event(Proplist p, Gdk.Event e); + public int play_for_event(Gdk.Event e, uint32 id, ...); + + public void widget_disable_sounds(Gtk.Widget w, bool enable = false); +} -- 2.15.1