summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMichael Catanzaro <mcatanzaro@gnome.org>2019-08-05 21:33:31 -0500
committerMichael Catanzaro <mcatanzaro@gnome.org>2019-08-05 21:33:52 -0500
commitd893a7b753b0f5151831e5af0536e9af6ffee65d (patch)
tree029d56a815ad1c1341bb2129e1b76d07846b2535 /src
parente585119934c7afbcce5aaabab097305ce1f59576 (diff)
downloadcheese-d893a7b753b0f5151831e5af0536e9af6ffee65d.tar.gz
I hate libcanberra!
It's the only library where the pkg-config name doesn't match the vapi, and meson does NOT like this. This commit allows us to build without requiring and linking to libcanberra-gtk (the GTK 2 version). The proper solution is to stop using libcanberra and use gsound instead.
Diffstat (limited to 'src')
-rw-r--r--src/meson.build3
-rw-r--r--src/vapi/libcanberra-gtk3.vapi38
2 files changed, 40 insertions, 1 deletions
diff --git a/src/meson.build b/src/meson.build
index b1800127..74f62b16 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -8,6 +8,7 @@ sources = files(
'thumbview/cheese-thumbnail.c',
'thumbview/cheese-thumb-view.c',
'thumbview/eog-thumb-nav.c',
+ 'vapi/libcanberra-gtk3.vapi'
)
deps = [
@@ -17,7 +18,7 @@ deps = [
gnome_desktop_dep,
eogthumbnav_dep,
libcanberra_dep,
- libcanberra_gtk_dep,
+ libcanberra_gtk3_dep,
libcheese_gtk_dep,
posix_dep,
]
diff --git a/src/vapi/libcanberra-gtk3.vapi b/src/vapi/libcanberra-gtk3.vapi
new file mode 100644
index 00000000..94add4ea
--- /dev/null
+++ b/src/vapi/libcanberra-gtk3.vapi
@@ -0,0 +1,38 @@
+/***
+ 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
+ <http://www.gnu.org/licenses/>.
+***/
+
+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);
+}
+