diff --git a/.flatpak-builder/cache/.lock b/.flatpak-builder/cache/.lock deleted file mode 100644 index e69de29..0000000 diff --git a/.flatpak-builder/cache/config b/.flatpak-builder/cache/config deleted file mode 100644 index 7dfbc01..0000000 --- a/.flatpak-builder/cache/config +++ /dev/null @@ -1,4 +0,0 @@ -[core] -repo_version=1 -mode=bare-user-only -min-free-space-percent=0 diff --git a/.flatpak-builder/cache/objects/02/1f9d83c3986c4be4eda7bafa258db7211627ac15f847ecfcf35243cd583e3e.dirtree b/.flatpak-builder/cache/objects/02/1f9d83c3986c4be4eda7bafa258db7211627ac15f847ecfcf35243cd583e3e.dirtree deleted file mode 100644 index 2d01def..0000000 Binary files a/.flatpak-builder/cache/objects/02/1f9d83c3986c4be4eda7bafa258db7211627ac15f847ecfcf35243cd583e3e.dirtree and /dev/null differ diff --git a/.flatpak-builder/cache/objects/03/68686429d0934a691fac484acebbcc480461e78bd96656df333590b1ac0fab.file b/.flatpak-builder/cache/objects/03/68686429d0934a691fac484acebbcc480461e78bd96656df333590b1ac0fab.file deleted file mode 100644 index 116a25a..0000000 --- a/.flatpak-builder/cache/objects/03/68686429d0934a691fac484acebbcc480461e78bd96656df333590b1ac0fab.file +++ /dev/null @@ -1,53 +0,0 @@ -/*-*- Mode: C; c-basic-offset: 8 -*-*/ - -#ifndef foocanberracommonh -#define foocanberracommonh - -/*** - This file is part of libcanberra. - - Copyright 2008 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 - . -***/ - -#include "canberra.h" -#include "macro.h" -#include "mutex.h" - -struct ca_context { - ca_bool_t opened; - ca_mutex *mutex; - - ca_proplist *props; - - char *driver; - char *device; - - void *private; -#ifdef HAVE_DSO - void *private_dso; -#endif -}; - -typedef enum ca_cache_control { - CA_CACHE_CONTROL_NEVER, - CA_CACHE_CONTROL_PERMANENT, - CA_CACHE_CONTROL_VOLATILE -} ca_cache_control_t; - -int ca_parse_cache_control(ca_cache_control_t *control, const char *c); - -#endif diff --git a/.flatpak-builder/cache/objects/03/d19b318015f476853eefd32e8390e3d9f2ed227d1bdeeed339bb59d4a9361d.dirtree b/.flatpak-builder/cache/objects/03/d19b318015f476853eefd32e8390e3d9f2ed227d1bdeeed339bb59d4a9361d.dirtree deleted file mode 100644 index e6b0c66..0000000 Binary files a/.flatpak-builder/cache/objects/03/d19b318015f476853eefd32e8390e3d9f2ed227d1bdeeed339bb59d4a9361d.dirtree and /dev/null differ diff --git a/.flatpak-builder/cache/objects/04/3308ffa7df27518740c27e87322b1639e411ca1ca476699ca4cf755dacf5b7.dirtree b/.flatpak-builder/cache/objects/04/3308ffa7df27518740c27e87322b1639e411ca1ca476699ca4cf755dacf5b7.dirtree deleted file mode 100644 index f70852d..0000000 Binary files a/.flatpak-builder/cache/objects/04/3308ffa7df27518740c27e87322b1639e411ca1ca476699ca4cf755dacf5b7.dirtree and /dev/null differ diff --git a/.flatpak-builder/cache/objects/04/82ed9cbf588906c85f94f6078c8d8f7369d03132a7ac34286dee0508c8cf41.dirtree b/.flatpak-builder/cache/objects/04/82ed9cbf588906c85f94f6078c8d8f7369d03132a7ac34286dee0508c8cf41.dirtree deleted file mode 100644 index 2ce1ba0..0000000 Binary files a/.flatpak-builder/cache/objects/04/82ed9cbf588906c85f94f6078c8d8f7369d03132a7ac34286dee0508c8cf41.dirtree and /dev/null differ diff --git a/.flatpak-builder/cache/objects/05/a6d5f9721d1b25357a3ab340e969333eb96f47d899c6706b357dde8669e2f7.file b/.flatpak-builder/cache/objects/05/a6d5f9721d1b25357a3ab340e969333eb96f47d899c6706b357dde8669e2f7.file deleted file mode 100644 index 20ee1ab..0000000 --- a/.flatpak-builder/cache/objects/05/a6d5f9721d1b25357a3ab340e969333eb96f47d899c6706b357dde8669e2f7.file +++ /dev/null @@ -1,54 +0,0 @@ -/*-*- Mode: C; c-basic-offset: 8 -*-*/ - -/*** - 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 - . -***/ - -#ifdef HAVE_CONFIG_H -#include -#endif - -#include -#include - -#include "fork-detect.h" - -int ca_detect_fork(void) { - static volatile pid_t pid = (pid_t) -1; - pid_t v, we; - - /* Some really stupid applications (Hey, vim, that means you!) - * love to fork after initializing gtk/libcanberra. This is really - * bad style. We however have to deal with this cleanly, so we try - * to detect the forks making sure all our calls fail cleanly - * after the fork. */ - - /* Ideally we'd use atomic operations here, but we don't have them - * and this is not exactly crucial, so we don't care */ - - v = pid; - we = getpid(); - - if (v == we || v == (pid_t) -1) { - pid = we; - return 0; - } - - return 1; -} diff --git a/.flatpak-builder/cache/objects/06/2ebfb75a2d9f51996bc768b7dd42a1482b0fd897168b88da4b1fbf16f836f6.dirtree b/.flatpak-builder/cache/objects/06/2ebfb75a2d9f51996bc768b7dd42a1482b0fd897168b88da4b1fbf16f836f6.dirtree deleted file mode 100644 index 9669382..0000000 Binary files a/.flatpak-builder/cache/objects/06/2ebfb75a2d9f51996bc768b7dd42a1482b0fd897168b88da4b1fbf16f836f6.dirtree and /dev/null differ diff --git a/.flatpak-builder/cache/objects/0a/89c1f9a595f09814bd7994c153472cc428ff12ecb21d6029ed24f08d9b47b2.file b/.flatpak-builder/cache/objects/0a/89c1f9a595f09814bd7994c153472cc428ff12ecb21d6029ed24f08d9b47b2.file deleted file mode 100644 index 9582b00..0000000 --- a/.flatpak-builder/cache/objects/0a/89c1f9a595f09814bd7994c153472cc428ff12ecb21d6029ed24f08d9b47b2.file +++ /dev/null @@ -1,587 +0,0 @@ -/*-*- Mode: C; c-basic-offset: 8 -*-*/ - -/*** - This file is part of libcanberra. - - Copyright 2008 Nokia Corporation and/or its subsidiary(-ies). - - Author: Marc-Andre Lureau - - 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 - . -***/ - -#ifdef HAVE_CONFIG_H -#include -#endif - -#include -#include -#include -#include -#include -#include -#include -#include - -#include - -#include "canberra.h" -#include "common.h" -#include "driver.h" -#include "llist.h" -#include "read-sound-file.h" -#include "sound-theme-spec.h" -#include "malloc.h" - -struct outstanding { - CA_LLIST_FIELDS(struct outstanding); - ca_bool_t dead; - uint32_t id; - int err; - ca_finish_callback_t callback; - void *userdata; - GstElement *pipeline; - struct ca_context *context; -}; - -struct private { - ca_theme_data *theme; - ca_bool_t signal_semaphore; - sem_t semaphore; - - GstBus *mgr_bus; - - /* Everything below protected by the outstanding_mutex */ - ca_mutex *outstanding_mutex; - ca_bool_t mgr_thread_running; - ca_bool_t semaphore_allocated; - CA_LLIST_HEAD(struct outstanding, outstanding); -}; - -#define PRIVATE(c) ((struct private *) ((c)->private)) - -static void* thread_func(void *userdata); -static void send_eos_msg(struct outstanding *out, int err); -static void send_mgr_exit_msg (struct private *p); - -static void outstanding_free(struct outstanding *o) { - GstBus *bus; - - ca_assert(o); - - if (o->pipeline) { - bus = gst_pipeline_get_bus(GST_PIPELINE (o->pipeline)); - if (bus != NULL) { - gst_bus_set_sync_handler(bus, NULL, NULL, NULL); - gst_object_unref(bus); - } - - gst_object_unref(GST_OBJECT(o->pipeline)); - } - - ca_free(o); -} - -int driver_open(ca_context *c) { - GError *error = NULL; - struct private *p; - pthread_t thread; - - ca_return_val_if_fail(c, CA_ERROR_INVALID); - ca_return_val_if_fail(!PRIVATE(c), CA_ERROR_INVALID); - ca_return_val_if_fail(!c->driver || ca_streq(c->driver, "gstreamer"), CA_ERROR_NODRIVER); - - gst_init_check(NULL, NULL, &error); - if (error != NULL) { - g_warning("gst_init: %s ", error->message); - g_error_free(error); - return CA_ERROR_INVALID; - } - - if (!(p = ca_new0(struct private, 1))) - return CA_ERROR_OOM; - c->private = p; - - if (!(p->outstanding_mutex = ca_mutex_new())) { - driver_destroy(c); - return CA_ERROR_OOM; - } - - if (sem_init(&p->semaphore, 0, 0) < 0) { - driver_destroy(c); - return CA_ERROR_OOM; - } - p->semaphore_allocated = TRUE; - - p->mgr_bus = gst_bus_new(); - if (p->mgr_bus == NULL) { - driver_destroy(c); - return CA_ERROR_OOM; - } - gst_bus_set_flushing(p->mgr_bus, FALSE); - - /* Give a reference to the bus to the mgr thread */ - if (pthread_create(&thread, NULL, thread_func, p) < 0) { - driver_destroy(c); - return CA_ERROR_OOM; - } - p->mgr_thread_running = TRUE; - - return CA_SUCCESS; -} - -int driver_destroy(ca_context *c) { - struct private *p; - struct outstanding *out; - - ca_return_val_if_fail(c, CA_ERROR_INVALID); - ca_return_val_if_fail(PRIVATE(c), CA_ERROR_STATE); - - p = PRIVATE(c); - - if (p->outstanding_mutex) { - ca_mutex_lock(p->outstanding_mutex); - - /* Tell all player threads to terminate */ - out = p->outstanding; - while (out) { - if (!out->dead) - send_eos_msg(out, CA_ERROR_DESTROYED); - out = out->next; - } - - /* Now that we've sent EOS for all pending players, append a - * message to wait for the mgr thread to exit */ - if (p->mgr_thread_running && p->semaphore_allocated) { - send_mgr_exit_msg(p); - - p->signal_semaphore = TRUE; - while (p->mgr_thread_running) { - ca_mutex_unlock(p->outstanding_mutex); - sem_wait(&p->semaphore); - ca_mutex_lock(p->outstanding_mutex); - } - } - - ca_mutex_unlock(p->outstanding_mutex); - ca_mutex_free(p->outstanding_mutex); - } - - if (p->mgr_bus) - g_object_unref(p->mgr_bus); - - if (p->theme) - ca_theme_data_free(p->theme); - - if (p->semaphore_allocated) - sem_destroy(&p->semaphore); - - ca_free(p); - - /* no gst_deinit(), see doc */ - - return CA_SUCCESS; -} - -int driver_change_device(ca_context *c, const char *device) { - ca_return_val_if_fail(c, CA_ERROR_INVALID); - ca_return_val_if_fail(PRIVATE(c), CA_ERROR_STATE); - - return CA_SUCCESS; -} - -int driver_change_props(ca_context *c, ca_proplist *changed, ca_proplist *merged) { - ca_return_val_if_fail(c, CA_ERROR_INVALID); - ca_return_val_if_fail(changed, CA_ERROR_INVALID); - ca_return_val_if_fail(merged, CA_ERROR_INVALID); - ca_return_val_if_fail(PRIVATE(c), CA_ERROR_STATE); - - return CA_SUCCESS; -} - -static void -send_eos_msg(struct outstanding *out, int err) { - struct private *p; - GstMessage *m; - GstStructure *s; - - out->dead = TRUE; - out->err = err; - - p = PRIVATE(out->context); - s = gst_structure_new("application/eos", "info", G_TYPE_POINTER, out, NULL); - m = gst_message_new_application (GST_OBJECT (out->pipeline), s); - - gst_bus_post (p->mgr_bus, m); -} - -static GstBusSyncReply -bus_cb(GstBus *bus, GstMessage *message, gpointer data) { - int err; - struct outstanding *out; - struct private *p; - - ca_return_val_if_fail(bus, GST_BUS_DROP); - ca_return_val_if_fail(message, GST_BUS_DROP); - ca_return_val_if_fail(data, GST_BUS_DROP); - - out = data; - p = PRIVATE(out->context); - - switch (GST_MESSAGE_TYPE(message)) { - /* for all elements */ - case GST_MESSAGE_ERROR: - err = CA_ERROR_SYSTEM; - break; - case GST_MESSAGE_EOS: - /* only respect EOS from the toplevel pipeline */ - if (GST_OBJECT(out->pipeline) != GST_MESSAGE_SRC(message)) - return GST_BUS_PASS; - - err = CA_SUCCESS; - break; - default: - return GST_BUS_PASS; - } - - /* Bin finished playback: ask the manager thread to shut it - * down, since we can't from the sync message handler */ - ca_mutex_lock(p->outstanding_mutex); - if (!out->dead) - send_eos_msg(out, err); - ca_mutex_unlock(p->outstanding_mutex); - - return GST_BUS_PASS; -} - -struct ca_sound_file { - GstElement *fdsrc; -}; - -static int ca_gst_sound_file_open(ca_sound_file **_f, const char *fn) { - int fd; - ca_sound_file *f; - - ca_return_val_if_fail(_f, CA_ERROR_INVALID); - ca_return_val_if_fail(fn, CA_ERROR_INVALID); - - if ((fd = open(fn, O_RDONLY)) == -1) - return errno == ENOENT ? CA_ERROR_NOTFOUND : CA_ERROR_SYSTEM; - - if (!(f = ca_new0(ca_sound_file, 1))) { - close(fd); - return CA_ERROR_OOM; - } - - if (!(f->fdsrc = gst_element_factory_make("fdsrc", NULL))) { - close(fd); - ca_free(f); - return CA_ERROR_OOM; - } - - g_object_set(GST_OBJECT(f->fdsrc), "fd", fd, NULL); - *_f = f; - - return CA_SUCCESS; -} - -static void on_pad_added(GstElement *element, GstPad *pad, gboolean arg1, gpointer data) -{ - GstStructure *structure; - GstElement *sinkelement; - GstCaps *caps; - GstPad *vpad; - const char *type; - - sinkelement = GST_ELEMENT(data); - - caps = gst_pad_query_caps(pad, NULL); - if (gst_caps_is_empty(caps) || gst_caps_is_any(caps)) { - gst_caps_unref(caps); - return; - } - - structure = gst_caps_get_structure(caps, 0); - type = gst_structure_get_name(structure); - if (g_str_has_prefix(type, "audio/x-raw") == TRUE) { - vpad = gst_element_get_static_pad(sinkelement, "sink"); - gst_pad_link(pad, vpad); - gst_object_unref(vpad); - } - gst_caps_unref(caps); -} - -static void -send_mgr_exit_msg (struct private *p) { - GstMessage *m; - GstStructure *s; - - s = gst_structure_new("application/mgr-exit", NULL); - m = gst_message_new_application (NULL, s); - - gst_bus_post (p->mgr_bus, m); -} - -/* Global manager thread that shuts down GStreamer pipelines when ordered */ -static void* thread_func(void *userdata) { - struct private *p = userdata; - GstBus *bus = g_object_ref(p->mgr_bus); - - pthread_detach(pthread_self()); - - /* Pop messages from the manager bus until we see an exit command */ - do { - GstMessage *m = gst_bus_timed_pop(bus, GST_CLOCK_TIME_NONE); - const GstStructure *s; - const GValue *v; - struct outstanding *out; - - if (m == NULL) - break; - if (GST_MESSAGE_TYPE(m) != GST_MESSAGE_APPLICATION) { - gst_message_unref (m); - break; - } - - s = gst_message_get_structure(m); - if (gst_structure_has_name(s, "application/mgr-exit")) { - gst_message_unref (m); - break; - } - - /* Otherwise, this must be an EOS message for an outstanding pipe */ - ca_assert(gst_structure_has_name(s, "application/eos")); - v = gst_structure_get_value(s, "info"); - ca_assert(v); - out = g_value_get_pointer(v); - ca_assert(out); - - /* Set pipeline back to NULL to close things. By the time this - * completes, we can be sure bus_cb won't be called */ - if (gst_element_set_state(out->pipeline, GST_STATE_NULL) == - GST_STATE_CHANGE_FAILURE) { - gst_message_unref (m); - break; - } - if (out->callback) - out->callback(out->context, out->id, out->err, out->userdata); - - ca_mutex_lock(p->outstanding_mutex); - CA_LLIST_REMOVE(struct outstanding, p->outstanding, out); - outstanding_free(out); - ca_mutex_unlock(p->outstanding_mutex); - - gst_message_unref(m); - } while (TRUE); - - /* Signal the semaphore and exit */ - ca_mutex_lock(p->outstanding_mutex); - if (p->signal_semaphore) - sem_post(&p->semaphore); - p->mgr_thread_running = FALSE; - ca_mutex_unlock(p->outstanding_mutex); - - gst_bus_set_flushing(bus, TRUE); - g_object_unref (bus); - return NULL; -} - - -int driver_play(ca_context *c, uint32_t id, ca_proplist *proplist, ca_finish_callback_t cb, void *userdata) { - struct private *p; - struct outstanding *out; - ca_sound_file *f; - GstElement *decodebin, *sink, *audioconvert, *audioresample, *abin; - GstBus *bus; - GstPad *audiopad; - int ret; - - ca_return_val_if_fail(c, CA_ERROR_INVALID); - ca_return_val_if_fail(proplist, CA_ERROR_INVALID); - ca_return_val_if_fail(!userdata || cb, CA_ERROR_INVALID); - - out = NULL; - f = NULL; - sink = NULL; - decodebin = NULL; - audioconvert = NULL; - audioresample = NULL; - abin = NULL; - p = PRIVATE(c); - - if ((ret = ca_lookup_sound_with_callback(&f, ca_gst_sound_file_open, NULL, &p->theme, c->props, proplist)) < 0) - goto fail; - - if (!(out = ca_new0(struct outstanding, 1))) - return CA_ERROR_OOM; - - out->id = id; - out->callback = cb; - out->userdata = userdata; - out->context = c; - - if (!(out->pipeline = gst_pipeline_new(NULL)) - || !(decodebin = gst_element_factory_make("decodebin2", NULL)) - || !(audioconvert = gst_element_factory_make("audioconvert", NULL)) - || !(audioresample = gst_element_factory_make("audioresample", NULL)) - || !(sink = gst_element_factory_make("autoaudiosink", NULL)) - || !(abin = gst_bin_new ("audiobin"))) { - - /* At this point, if there is a failure, free each plugin separately. */ - if (out->pipeline != NULL) - g_object_unref (out->pipeline); - if (decodebin != NULL) - g_object_unref(decodebin); - if (audioconvert != NULL) - g_object_unref(audioconvert); - if (audioresample != NULL) - g_object_unref(audioresample); - if (sink != NULL) - g_object_unref(sink); - if (abin != NULL) - g_object_unref(abin); - - ca_free(out); - - ret = CA_ERROR_OOM; - goto fail; - } - - bus = gst_pipeline_get_bus(GST_PIPELINE (out->pipeline)); - gst_bus_set_sync_handler(bus, bus_cb, out, NULL); - gst_object_unref(bus); - - g_signal_connect(decodebin, "new-decoded-pad", - G_CALLBACK (on_pad_added), abin); - gst_bin_add_many(GST_BIN (abin), audioconvert, audioresample, sink, NULL); - gst_element_link_many(audioconvert, audioresample, sink, NULL); - - audiopad = gst_element_get_static_pad(audioconvert, "sink"); - gst_element_add_pad(abin, gst_ghost_pad_new("sink", audiopad)); - gst_object_unref(audiopad); - - gst_bin_add_many(GST_BIN (out->pipeline), - f->fdsrc, decodebin, abin, NULL); - if (!gst_element_link(f->fdsrc, decodebin)) { - /* Bin now owns the fdsrc... */ - f->fdsrc = NULL; - - outstanding_free(out); - ret = CA_ERROR_OOM; - goto fail; - } - /* Bin now owns the fdsrc... */ - f->fdsrc = NULL; - - ca_free(f); - f = NULL; - - ca_mutex_lock(p->outstanding_mutex); - CA_LLIST_PREPEND(struct outstanding, p->outstanding, out); - ca_mutex_unlock(p->outstanding_mutex); - - if (gst_element_set_state(out->pipeline, - GST_STATE_PLAYING) == GST_STATE_CHANGE_FAILURE) { - ret = CA_ERROR_NOTAVAILABLE; - goto fail; - } - - return CA_SUCCESS; - -fail: - if (f && f->fdsrc) - gst_object_unref(f->fdsrc); - - if (f) - ca_free(f); - - return ret; -} - -int driver_cancel(ca_context *c, uint32_t id) { - struct private *p; - struct outstanding *out = NULL; - - ca_return_val_if_fail(c, CA_ERROR_INVALID); - ca_return_val_if_fail(PRIVATE(c), CA_ERROR_STATE); - - p = PRIVATE(c); - - ca_mutex_lock(p->outstanding_mutex); - - for (out = p->outstanding; out;/* out = out->next*/) { - struct outstanding *next; - - if (out->id != id || out->pipeline == NULL || out->dead == TRUE) { - out = out->next; - continue; - } - - if (gst_element_set_state(out->pipeline, GST_STATE_NULL) == - GST_STATE_CHANGE_FAILURE) - goto error; - - if (out->callback) - out->callback(c, out->id, CA_ERROR_CANCELED, out->userdata); - next = out->next; - CA_LLIST_REMOVE(struct outstanding, p->outstanding, out); - outstanding_free(out); - out = next; - } - - ca_mutex_unlock(p->outstanding_mutex); - - return CA_SUCCESS; - -error: - ca_mutex_unlock(p->outstanding_mutex); - return CA_ERROR_SYSTEM; -} - -int driver_cache(ca_context *c, ca_proplist *proplist) { - ca_return_val_if_fail(c, CA_ERROR_INVALID); - ca_return_val_if_fail(proplist, CA_ERROR_INVALID); - ca_return_val_if_fail(PRIVATE(c), CA_ERROR_STATE); - - return CA_ERROR_NOTSUPPORTED; -} - -int driver_playing(ca_context *c, uint32_t id, int *playing) { - struct private *p; - struct outstanding *out; - - ca_return_val_if_fail(c, CA_ERROR_INVALID); - ca_return_val_if_fail(c->private, CA_ERROR_STATE); - ca_return_val_if_fail(playing, CA_ERROR_INVALID); - - p = PRIVATE(c); - - *playing = 0; - - ca_mutex_lock(p->outstanding_mutex); - - for (out = p->outstanding; out; out = out->next) { - - if (out->id != id || out->pipeline == NULL || out->dead == TRUE) - continue; - - *playing = 1; - break; - } - - ca_mutex_unlock(p->outstanding_mutex); - - return CA_SUCCESS; -} diff --git a/.flatpak-builder/cache/objects/0a/9a3d41045781386266d859969ea5dd0414b52b7facf1763c035c2aabe1588a.file b/.flatpak-builder/cache/objects/0a/9a3d41045781386266d859969ea5dd0414b52b7facf1763c035c2aabe1588a.file deleted file mode 100644 index a7c2c01..0000000 Binary files a/.flatpak-builder/cache/objects/0a/9a3d41045781386266d859969ea5dd0414b52b7facf1763c035c2aabe1588a.file and /dev/null differ diff --git a/.flatpak-builder/cache/objects/0e/6514edd67b43765a825ae93d1afdf4541d02cfc87b16b51e57c4cf540739a4.file b/.flatpak-builder/cache/objects/0e/6514edd67b43765a825ae93d1afdf4541d02cfc87b16b51e57c4cf540739a4.file deleted file mode 100755 index 02461a7..0000000 Binary files a/.flatpak-builder/cache/objects/0e/6514edd67b43765a825ae93d1afdf4541d02cfc87b16b51e57c4cf540739a4.file and /dev/null differ diff --git a/.flatpak-builder/cache/objects/0e/a33ce048b315e8b44ff7738dfa4e3fbb35bac33293485db49eb9da45b0be2d.dirtree b/.flatpak-builder/cache/objects/0e/a33ce048b315e8b44ff7738dfa4e3fbb35bac33293485db49eb9da45b0be2d.dirtree deleted file mode 100644 index b3832f8..0000000 Binary files a/.flatpak-builder/cache/objects/0e/a33ce048b315e8b44ff7738dfa4e3fbb35bac33293485db49eb9da45b0be2d.dirtree and /dev/null differ diff --git a/.flatpak-builder/cache/objects/0f/259da148fc25760fb65df46b50374ae4f10168d2c8cfad898e1da443252ea4.dirtree b/.flatpak-builder/cache/objects/0f/259da148fc25760fb65df46b50374ae4f10168d2c8cfad898e1da443252ea4.dirtree deleted file mode 100644 index bc45188..0000000 Binary files a/.flatpak-builder/cache/objects/0f/259da148fc25760fb65df46b50374ae4f10168d2c8cfad898e1da443252ea4.dirtree and /dev/null differ diff --git a/.flatpak-builder/cache/objects/0f/ef5c2f1f682bf248196044e4c8be393efd7c4654559d36a27bbd251324560a.dirtree b/.flatpak-builder/cache/objects/0f/ef5c2f1f682bf248196044e4c8be393efd7c4654559d36a27bbd251324560a.dirtree deleted file mode 100644 index 618c7ff..0000000 Binary files a/.flatpak-builder/cache/objects/0f/ef5c2f1f682bf248196044e4c8be393efd7c4654559d36a27bbd251324560a.dirtree and /dev/null differ diff --git a/.flatpak-builder/cache/objects/12/7910892cb8a53ddd959656c35612b0d557cadc2e4d688c7f190b6b13193904.file b/.flatpak-builder/cache/objects/12/7910892cb8a53ddd959656c35612b0d557cadc2e4d688c7f190b6b13193904.file deleted file mode 100644 index c5ad86b..0000000 Binary files a/.flatpak-builder/cache/objects/12/7910892cb8a53ddd959656c35612b0d557cadc2e4d688c7f190b6b13193904.file and /dev/null differ diff --git a/.flatpak-builder/cache/objects/13/57aae3b85c95c13479b9c03cdfa2f1a0363f6485e89fd56927f9be9fc6607f.file b/.flatpak-builder/cache/objects/13/57aae3b85c95c13479b9c03cdfa2f1a0363f6485e89fd56927f9be9fc6607f.file deleted file mode 120000 index f8d263d..0000000 --- a/.flatpak-builder/cache/objects/13/57aae3b85c95c13479b9c03cdfa2f1a0363f6485e89fd56927f9be9fc6607f.file +++ /dev/null @@ -1 +0,0 @@ -device-removed.oga \ No newline at end of file diff --git a/.flatpak-builder/cache/objects/14/7b4f559abc1a26ae85fc06898e5e5d2fe4aa336edd5e25730c70130cc3fbb4.dirtree b/.flatpak-builder/cache/objects/14/7b4f559abc1a26ae85fc06898e5e5d2fe4aa336edd5e25730c70130cc3fbb4.dirtree deleted file mode 100644 index f7f9beb..0000000 Binary files a/.flatpak-builder/cache/objects/14/7b4f559abc1a26ae85fc06898e5e5d2fe4aa336edd5e25730c70130cc3fbb4.dirtree and /dev/null differ diff --git a/.flatpak-builder/cache/objects/15/12acdd8f9ce15458e00ac06b17486913057de05c5c238aa217a7898355dc36.file b/.flatpak-builder/cache/objects/15/12acdd8f9ce15458e00ac06b17486913057de05c5c238aa217a7898355dc36.file deleted file mode 100644 index fcd2c3b..0000000 --- a/.flatpak-builder/cache/objects/15/12acdd8f9ce15458e00ac06b17486913057de05c5c238aa217a7898355dc36.file +++ /dev/null @@ -1,221 +0,0 @@ -# Makefile for program source directory in GNU NLS utilities package. -# Copyright (C) 1995, 1996, 1997 by Ulrich Drepper -# Copyright (C) 2004-2008 Rodney Dawes -# -# This file may be copied and used freely without restrictions. It may -# be used in projects which are not available under a GNU Public License, -# but which still want to provide support for the GNU gettext functionality. -# -# - Modified by Owen Taylor to use GETTEXT_PACKAGE -# instead of PACKAGE and to look for po2tbl in ./ not in intl/ -# -# - Modified by jacob berkman to install -# Makefile.in.in and po2tbl.sed.in for use with glib-gettextize -# -# - Modified by Rodney Dawes for use with intltool -# -# We have the following line for use by intltoolize: -# INTLTOOL_MAKEFILE - -GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ -PACKAGE = @PACKAGE@ -VERSION = @VERSION@ - -SHELL = @SHELL@ - -srcdir = @srcdir@ -top_srcdir = @top_srcdir@ -top_builddir = @top_builddir@ -VPATH = @srcdir@ - -prefix = @prefix@ -exec_prefix = @exec_prefix@ -datadir = @datadir@ -datarootdir = @datarootdir@ -libdir = @libdir@ -localedir = @localedir@ -subdir = po -install_sh = @install_sh@ -# Automake >= 1.8 provides @mkdir_p@. -# Until it can be supposed, use the safe fallback: -mkdir_p = $(install_sh) -d - -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ - -GMSGFMT = @GMSGFMT@ -MSGFMT = @MSGFMT@ -XGETTEXT = @XGETTEXT@ -INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ -INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ -MSGMERGE = INTLTOOL_EXTRACT="$(INTLTOOL_EXTRACT)" XGETTEXT="$(XGETTEXT)" srcdir=$(srcdir) $(INTLTOOL_UPDATE) --gettext-package $(GETTEXT_PACKAGE) --dist -GENPOT = INTLTOOL_EXTRACT="$(INTLTOOL_EXTRACT)" XGETTEXT="$(XGETTEXT)" srcdir=$(srcdir) $(INTLTOOL_UPDATE) --gettext-package $(GETTEXT_PACKAGE) --pot - -ALL_LINGUAS = @ALL_LINGUAS@ - -PO_LINGUAS=$(shell if test -r $(srcdir)/LINGUAS; then grep -v "^\#" $(srcdir)/LINGUAS; else echo "$(ALL_LINGUAS)"; fi) - -USER_LINGUAS=$(shell if test -n "$(LINGUAS)"; then LLINGUAS="$(LINGUAS)"; ALINGUAS="$(ALL_LINGUAS)"; for lang in $$LLINGUAS; do if test -n "`grep \^$$lang$$ $(srcdir)/LINGUAS 2>/dev/null`" -o -n "`echo $$ALINGUAS|tr ' ' '\n'|grep \^$$lang$$`"; then printf "$$lang "; fi; done; fi) - -USE_LINGUAS=$(shell if test -n "$(USER_LINGUAS)" -o -n "$(LINGUAS)"; then LLINGUAS="$(USER_LINGUAS)"; else if test -n "$(PO_LINGUAS)"; then LLINGUAS="$(PO_LINGUAS)"; else LLINGUAS="$(ALL_LINGUAS)"; fi; fi; for lang in $$LLINGUAS; do printf "$$lang "; done) - -POFILES=$(shell LINGUAS="$(PO_LINGUAS)"; for lang in $$LINGUAS; do printf "$$lang.po "; done) - -DISTFILES = Makefile.in.in POTFILES.in $(POFILES) -EXTRA_DISTFILES = ChangeLog POTFILES.skip Makevars LINGUAS - -POTFILES = \ -# This comment gets stripped out - -CATALOGS=$(shell LINGUAS="$(USE_LINGUAS)"; for lang in $$LINGUAS; do printf "$$lang.gmo "; done) - -.SUFFIXES: -.SUFFIXES: .po .pox .gmo .mo .msg .cat - -AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ -INTLTOOL_V_MSGFMT = $(INTLTOOL__v_MSGFMT_$(V)) -INTLTOOL__v_MSGFMT_= $(INTLTOOL__v_MSGFMT_$(AM_DEFAULT_VERBOSITY)) -INTLTOOL__v_MSGFMT_0 = @echo " MSGFMT" $@; - -.po.pox: - $(MAKE) $(GETTEXT_PACKAGE).pot - $(MSGMERGE) $* $(GETTEXT_PACKAGE).pot -o $*.pox - -.po.mo: - $(INTLTOOL_V_MSGFMT)$(MSGFMT) -o $@ $< - -.po.gmo: - $(INTLTOOL_V_MSGFMT)file=`echo $* | sed 's,.*/,,'`.gmo \ - && rm -f $$file && $(GMSGFMT) -o $$file $< - -.po.cat: - sed -f ../intl/po2msg.sed < $< > $*.msg \ - && rm -f $@ && gencat $@ $*.msg - - -all: all-@USE_NLS@ - -all-yes: $(CATALOGS) -all-no: - -$(GETTEXT_PACKAGE).pot: $(POTFILES) - $(GENPOT) - -install: install-data -install-data: install-data-@USE_NLS@ -install-data-no: all -install-data-yes: all - linguas="$(USE_LINGUAS)"; \ - for lang in $$linguas; do \ - dir=$(DESTDIR)$(localedir)/$$lang/LC_MESSAGES; \ - $(mkdir_p) $$dir; \ - if test -r $$lang.gmo; then \ - $(INSTALL_DATA) $$lang.gmo $$dir/$(GETTEXT_PACKAGE).mo; \ - echo "installing $$lang.gmo as $$dir/$(GETTEXT_PACKAGE).mo"; \ - else \ - $(INSTALL_DATA) $(srcdir)/$$lang.gmo $$dir/$(GETTEXT_PACKAGE).mo; \ - echo "installing $(srcdir)/$$lang.gmo as" \ - "$$dir/$(GETTEXT_PACKAGE).mo"; \ - fi; \ - if test -r $$lang.gmo.m; then \ - $(INSTALL_DATA) $$lang.gmo.m $$dir/$(GETTEXT_PACKAGE).mo.m; \ - echo "installing $$lang.gmo.m as $$dir/$(GETTEXT_PACKAGE).mo.m"; \ - else \ - if test -r $(srcdir)/$$lang.gmo.m ; then \ - $(INSTALL_DATA) $(srcdir)/$$lang.gmo.m \ - $$dir/$(GETTEXT_PACKAGE).mo.m; \ - echo "installing $(srcdir)/$$lang.gmo.m as" \ - "$$dir/$(GETTEXT_PACKAGE).mo.m"; \ - else \ - true; \ - fi; \ - fi; \ - done - -# Empty stubs to satisfy archaic automake needs -dvi info ctags tags CTAGS TAGS ID: - -# Define this as empty until I found a useful application. -install-exec installcheck: - -uninstall: - linguas="$(USE_LINGUAS)"; \ - for lang in $$linguas; do \ - rm -f $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE).mo; \ - rm -f $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE).mo.m; \ - done - -check: all $(GETTEXT_PACKAGE).pot - rm -f missing notexist - srcdir=$(srcdir) $(INTLTOOL_UPDATE) -m - if [ -r missing -o -r notexist ]; then \ - exit 1; \ - fi - -mostlyclean: - rm -f *.pox $(GETTEXT_PACKAGE).pot *.old.po cat-id-tbl.tmp - rm -f .intltool-merge-cache - -clean: mostlyclean - -distclean: clean - rm -f Makefile Makefile.in POTFILES stamp-it - rm -f *.mo *.msg *.cat *.cat.m *.gmo - -maintainer-clean: distclean - @echo "This command is intended for maintainers to use;" - @echo "it deletes files that may require special tools to rebuild." - rm -f Makefile.in.in - -distdir = ../$(PACKAGE)-$(VERSION)/$(subdir) -dist distdir: $(DISTFILES) - dists="$(DISTFILES)"; \ - extra_dists="$(EXTRA_DISTFILES)"; \ - for file in $$extra_dists; do \ - test -f $(srcdir)/$$file && dists="$$dists $(srcdir)/$$file"; \ - done; \ - for file in $$dists; do \ - test -f $$file || file="$(srcdir)/$$file"; \ - ln $$file $(distdir) 2> /dev/null \ - || cp -p $$file $(distdir); \ - done - -update-po: Makefile - $(MAKE) $(GETTEXT_PACKAGE).pot - tmpdir=`pwd`; \ - linguas="$(USE_LINGUAS)"; \ - for lang in $$linguas; do \ - echo "$$lang:"; \ - result="`$(MSGMERGE) -o $$tmpdir/$$lang.new.po $$lang`"; \ - if $$result; then \ - if cmp $(srcdir)/$$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \ - rm -f $$tmpdir/$$lang.new.po; \ - else \ - if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \ - :; \ - else \ - echo "msgmerge for $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \ - rm -f $$tmpdir/$$lang.new.po; \ - exit 1; \ - fi; \ - fi; \ - else \ - echo "msgmerge for $$lang.gmo failed!"; \ - rm -f $$tmpdir/$$lang.new.po; \ - fi; \ - done - -Makefile POTFILES: stamp-it - @if test ! -f $@; then \ - rm -f stamp-it; \ - $(MAKE) stamp-it; \ - fi - -stamp-it: Makefile.in.in $(top_builddir)/config.status POTFILES.in - cd $(top_builddir) \ - && CONFIG_FILES=$(subdir)/Makefile.in CONFIG_HEADERS= CONFIG_LINKS= \ - $(SHELL) ./config.status - -# Tell versions [3.59,3.63) of GNU make not to export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/.flatpak-builder/cache/objects/15/45213dc4b818c24b3f7afc0f68183f2e3edc86670dbe37275f60d1f2abf337.file b/.flatpak-builder/cache/objects/15/45213dc4b818c24b3f7afc0f68183f2e3edc86670dbe37275f60d1f2abf337.file deleted file mode 100644 index e6bdd7a..0000000 Binary files a/.flatpak-builder/cache/objects/15/45213dc4b818c24b3f7afc0f68183f2e3edc86670dbe37275f60d1f2abf337.file and /dev/null differ diff --git a/.flatpak-builder/cache/objects/15/7c82ca03ad272cf645d5e81588a699b19ae7436a09180f1f649dc76dd64282.dirtree b/.flatpak-builder/cache/objects/15/7c82ca03ad272cf645d5e81588a699b19ae7436a09180f1f649dc76dd64282.dirtree deleted file mode 100644 index febd6bb..0000000 Binary files a/.flatpak-builder/cache/objects/15/7c82ca03ad272cf645d5e81588a699b19ae7436a09180f1f649dc76dd64282.dirtree and /dev/null differ diff --git a/.flatpak-builder/cache/objects/15/99bad39e62c4f19635184b299ad65e62628ec14a892e04cd22b44d0cfe9a37.file b/.flatpak-builder/cache/objects/15/99bad39e62c4f19635184b299ad65e62628ec14a892e04cd22b44d0cfe9a37.file deleted file mode 100644 index 856feb8..0000000 --- a/.flatpak-builder/cache/objects/15/99bad39e62c4f19635184b299ad65e62628ec14a892e04cd22b44d0cfe9a37.file +++ /dev/null @@ -1,9 +0,0 @@ -[Desktop Entry] -Type=Application -Name=GNOME Login Sound -Comment=Plays a sound whenever you log in -Exec=/app/bin/canberra-gtk-play --id="desktop-login" --description="GNOME Login" -OnlyShowIn=GNOME; -AutostartCondition=GSettings org.gnome.desktop.sound event-sounds -X-GNOME-Autostart-Phase=Application -X-GNOME-Provides=login-sound diff --git a/.flatpak-builder/cache/objects/15/af5fc52d6bc247d1bc1c4dd2a9e717fe997bfa232305829f00c1cd835cabd7.file b/.flatpak-builder/cache/objects/15/af5fc52d6bc247d1bc1c4dd2a9e717fe997bfa232305829f00c1cd835cabd7.file deleted file mode 100644 index 293c071..0000000 --- a/.flatpak-builder/cache/objects/15/af5fc52d6bc247d1bc1c4dd2a9e717fe997bfa232305829f00c1cd835cabd7.file +++ /dev/null @@ -1,251 +0,0 @@ -/*-*- Mode: C; c-basic-offset: 8 -*-*/ - -#ifndef foocanberramacrohfoo -#define foocanberramacrohfoo - -/*** - This file is part of libcanberra. - - Copyright 2008 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 - . -***/ - -#include -#include - -#ifndef PACKAGE -#error "Please include config.h before including this file!" -#endif - -#if defined (__GNUC__) && __GNUC__ >= 3 -#define CA_LIKELY(x) (__builtin_expect(!!(x),1)) -#define CA_UNLIKELY(x) (__builtin_expect((x),0)) -#else -#define CA_LIKELY(x) (x) -#define CA_UNLIKELY(x) (x) -#endif - -#ifdef __GNUC__ -#define CA_PRETTY_FUNCTION __PRETTY_FUNCTION__ -#else -#define CA_PRETTY_FUNCTION "" -#endif - -#define ca_return_if_fail(expr) \ - do { \ - if (CA_UNLIKELY(!(expr))) { \ - if (ca_debug()) \ - fprintf(stderr, "Assertion '%s' failed at %s:%u, function %s().\n", #expr , __FILE__, __LINE__, CA_PRETTY_FUNCTION); \ - return; \ - } \ - } while(FALSE) - -#define ca_return_val_if_fail(expr, val) \ - do { \ - if (CA_UNLIKELY(!(expr))) { \ - if (ca_debug()) \ - fprintf(stderr, "Assertion '%s' failed at %s:%u, function %s().\n", #expr , __FILE__, __LINE__, CA_PRETTY_FUNCTION); \ - return (val); \ - } \ - } while(FALSE) - -#define ca_return_null_if_fail(expr) ca_return_val_if_fail(expr, NULL) - -#define ca_return_if_fail_unlock(expr, mutex) \ - do { \ - if (CA_UNLIKELY(!(expr))) { \ - if (ca_debug()) \ - fprintf(stderr, "Assertion '%s' failed at %s:%u, function %s().\n", #expr , __FILE__, __LINE__, CA_PRETTY_FUNCTION); \ - ca_mutex_unlock(mutex); \ - return; \ - } \ - } while(FALSE) - -#define ca_return_val_if_fail_unlock(expr, val, mutex) \ - do { \ - if (CA_UNLIKELY(!(expr))) { \ - if (ca_debug()) \ - fprintf(stderr, "Assertion '%s' failed at %s:%u, function %s().\n", #expr , __FILE__, __LINE__, CA_PRETTY_FUNCTION); \ - ca_mutex_unlock(mutex); \ - return (val); \ - } \ - } while(FALSE) - -#define ca_return_null_if_fail_unlock(expr, mutex) ca_return_val_if_fail_unlock(expr, NULL, mutex) - -/* An assert which guarantees side effects of x, i.e. is never - * optimized away */ -#define ca_assert_se(expr) \ - do { \ - if (CA_UNLIKELY(!(expr))) { \ - fprintf(stderr, "Assertion '%s' failed at %s:%u, function %s(). Aborting.\n", #expr , __FILE__, __LINE__, CA_PRETTY_FUNCTION); \ - abort(); \ - } \ - } while (FALSE) - -/* An assert that may be optimized away by defining NDEBUG */ -#ifdef NDEBUG -#define ca_assert(expr) do {} while (FALSE) -#else -#define ca_assert(expr) ca_assert_se(expr) -#endif - -#define ca_assert_not_reached() \ - do { \ - fprintf(stderr, "Code should not be reached at %s:%u, function %s(). Aborting.\n", __FILE__, __LINE__, CA_PRETTY_FUNCTION); \ - abort(); \ - } while (FALSE) - -#define CA_ELEMENTSOF(x) (sizeof(x)/sizeof((x)[0])) - -#ifdef __GNUC__ -#define CA_MAX(a,b) \ - __extension__ ({ typeof(a) _a = (a); \ - typeof(b) _b = (b); \ - _a > _b ? _a : _b; \ - }) -#else -#define CA_MAX(a, b) ((a) > (b) ? (a) : (b)) -#endif - -#ifdef __GNUC__ -#define CA_MIN(a,b) \ - __extension__ ({ typeof(a) _a = (a); \ - typeof(b) _b = (b); \ - _a < _b ? _a : _b; \ - }) -#else -#define CA_MIN(a, b) ((a) < (b) ? (a) : (b)) -#endif - -#ifdef __GNUC__ -#define CA_CLAMP(x, low, high) \ - __extension__ ({ typeof(x) _x = (x); \ - typeof(low) _low = (low); \ - typeof(high) _high = (high); \ - ((_x > _high) ? _high : ((_x < _low) ? _low : _x)); \ - }) -#else -#define CA_CLAMP(x, low, high) (((x) > (high)) ? (high) : (((x) < (low)) ? (low) : (x))) -#endif - -#ifndef FALSE -#define FALSE (0) -#endif - -#ifndef TRUE -#define TRUE (!FALSE) -#endif - -#define CA_PTR_TO_UINT(p) ((unsigned int) (unsigned long) (p)) -#define CA_UINT_TO_PTR(u) ((void*) (unsigned long) (u)) - -#define CA_PTR_TO_UINT32(p) ((uint32_t) CA_PTR_TO_UINT(p)) -#define CA_UINT32_TO_PTR(u) CA_UINT_TO_PTR((uint32_t) u) - -#define CA_PTR_TO_INT(p) ((int) CA_PTR_TO_UINT(p)) -#define CA_INT_TO_PTR(u) CA_UINT_TO_PTR((int) u) - -#define CA_PTR_TO_INT32(p) ((int32_t) CA_PTR_TO_UINT(p)) -#define CA_INT32_TO_PTR(u) CA_UINT_TO_PTR((int32_t) u) - -typedef int ca_bool_t; - -ca_bool_t ca_debug(void); - -static inline size_t ca_align(size_t l) { - return (((l + sizeof(void*) - 1) / sizeof(void*)) * sizeof(void*)); -} - -#define CA_ALIGN(x) (ca_align(x)) - -typedef void (*ca_free_cb_t)(void *); - -#ifdef HAVE_BYTESWAP_H -#include -#endif - -#ifdef HAVE_BYTESWAP_H - #define CA_INT16_SWAP(x) ((int16_t) bswap_16((uint16_t) x)) - #define CA_UINT16_SWAP(x) ((uint16_t) bswap_16((uint16_t) x)) - #define CA_INT32_SWAP(x) ((int32_t) bswap_32((uint32_t) x)) - #define CA_UINT32_SWAP(x) ((uint32_t) bswap_32((uint32_t) x)) -#else - #define CA_INT16_SWAP(x) ( (int16_t) ( ((uint16_t) x >> 8) | ((uint16_t) x << 8) ) ) - #define CA_UINT16_SWAP(x) ( (uint16_t) ( ((uint16_t) x >> 8) | ((uint16_t) x << 8) ) ) - #define CA_INT32_SWAP(x) ( (int32_t) ( ((uint32_t) x >> 24) | ((uint32_t) x << 24) | (((uint32_t) x & 0xFF00) << 8) | ((((uint32_t) x) >> 8) & 0xFF00) ) ) - #define CA_UINT32_SWAP(x) ( (uint32_t) ( ((uint32_t) x >> 24) | ((uint32_t) x << 24) | (((uint32_t) x & 0xFF00) << 8) | ((((uint32_t) x) >> 8) & 0xFF00) ) ) -#endif - -#ifdef WORDS_BIGENDIAN - #define CA_INT16_FROM_LE(x) CA_INT16_SWAP(x) - #define CA_INT16_FROM_BE(x) ((int16_t)(x)) - - #define CA_INT16_TO_LE(x) CA_INT16_SWAP(x) - #define CA_INT16_TO_BE(x) ((int16_t)(x)) - - #define CA_UINT16_FROM_LE(x) CA_UINT16_SWAP(x) - #define CA_UINT16_FROM_BE(x) ((uint16_t)(x)) - - #define CA_UINT16_TO_LE(x) CA_UINT16_SWAP(x) - #define CA_UINT16_TO_BE(x) ((uint16_t)(x)) - - #define CA_INT32_FROM_LE(x) CA_INT32_SWAP(x) - #define CA_INT32_FROM_BE(x) ((int32_t)(x)) - - #define CA_INT32_TO_LE(x) CA_INT32_SWAP(x) - #define CA_INT32_TO_BE(x) ((int32_t)(x)) - - #define CA_UINT32_FROM_LE(x) CA_UINT32_SWAP(x) - #define CA_UINT32_FROM_BE(x) ((uint32_t)(x)) - - #define CA_UINT32_TO_LE(x) CA_UINT32_SWAP(x) - #define CA_UINT32_TO_BE(x) ((uint32_t)(x)) -#else - #define CA_INT16_FROM_LE(x) ((int16_t)(x)) - #define CA_INT16_FROM_BE(x) CA_INT16_SWAP(x) - - #define CA_INT16_TO_LE(x) ((int16_t)(x)) - #define CA_INT16_TO_BE(x) CA_INT16_SWAP(x) - - #define CA_UINT16_FROM_LE(x) ((uint16_t)(x)) - #define CA_UINT16_FROM_BE(x) CA_UINT16_SWAP(x) - - #define CA_UINT16_TO_LE(x) ((uint16_t)(x)) - #define CA_UINT16_TO_BE(x) CA_UINT16_SWAP(x) - - #define CA_INT32_FROM_LE(x) ((int32_t)(x)) - #define CA_INT32_FROM_BE(x) CA_INT32_SWAP(x) - - #define CA_INT32_TO_LE(x) ((int32_t)(x)) - #define CA_INT32_TO_BE(x) CA_INT32_SWAP(x) - - #define CA_UINT32_FROM_LE(x) ((uint32_t)(x)) - #define CA_UINT32_FROM_BE(x) CA_UINT32_SWAP(x) - - #define CA_UINT32_TO_LE(x) ((uint32_t)(x)) - #define CA_UINT32_TO_BE(x) CA_UINT32_SWAP(x) -#endif - -#define ca_streq(a, b) (strcmp((a),(b)) == 0) - -#ifdef __GNUC__ -#define CA_GCC_DESTRUCTOR __attribute__ ((destructor)) -#else -#undef CA_GCC_DESTRUCTOR -#endif - -#endif diff --git a/.flatpak-builder/cache/objects/16/34065eff50376b63f4ce0241d16fb104997392099ab17b39ef9b690c25bd09.dirtree b/.flatpak-builder/cache/objects/16/34065eff50376b63f4ce0241d16fb104997392099ab17b39ef9b690c25bd09.dirtree deleted file mode 100644 index 7fd3493..0000000 Binary files a/.flatpak-builder/cache/objects/16/34065eff50376b63f4ce0241d16fb104997392099ab17b39ef9b690c25bd09.dirtree and /dev/null differ diff --git a/.flatpak-builder/cache/objects/16/d6d71ec7b8c0b385602550e267a27fd25c088a6690b4873b84887cb41a5919.dirtree b/.flatpak-builder/cache/objects/16/d6d71ec7b8c0b385602550e267a27fd25c088a6690b4873b84887cb41a5919.dirtree deleted file mode 100644 index 819d1ce..0000000 Binary files a/.flatpak-builder/cache/objects/16/d6d71ec7b8c0b385602550e267a27fd25c088a6690b4873b84887cb41a5919.dirtree and /dev/null differ diff --git a/.flatpak-builder/cache/objects/18/de0c81f5ee5024dbeeb6a8739b96a3abfaa5027504ded5032d071c89eee8f4.file b/.flatpak-builder/cache/objects/18/de0c81f5ee5024dbeeb6a8739b96a3abfaa5027504ded5032d071c89eee8f4.file deleted file mode 100644 index 62c96ec..0000000 --- a/.flatpak-builder/cache/objects/18/de0c81f5ee5024dbeeb6a8739b96a3abfaa5027504ded5032d071c89eee8f4.file +++ /dev/null @@ -1,40 +0,0 @@ -/*-*- Mode: C; c-basic-offset: 8 -*-*/ - -#ifndef foocanberradriverhfoo -#define foocanberradriverhfoo - -/*** - This file is part of libcanberra. - - Copyright 2008 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 - . -***/ - -#include "canberra.h" - -int driver_open(ca_context *c); -int driver_destroy(ca_context *c); - -int driver_change_device(ca_context *c, const char *device); -int driver_change_props(ca_context *c, ca_proplist *changed, ca_proplist *merged); - -int driver_play(ca_context *c, uint32_t id, ca_proplist *p, ca_finish_callback_t cb, void *userdata); -int driver_cancel(ca_context *c, uint32_t id); -int driver_cache(ca_context *c, ca_proplist *p); - -int driver_playing(ca_context *c, uint32_t id, int *playing); - -#endif diff --git a/.flatpak-builder/cache/objects/1b/483e677e03d117be8c8afb031abfc7f40d0958f844fe26d5fea5ec24c0791c.dirtree b/.flatpak-builder/cache/objects/1b/483e677e03d117be8c8afb031abfc7f40d0958f844fe26d5fea5ec24c0791c.dirtree deleted file mode 100644 index e990773..0000000 Binary files a/.flatpak-builder/cache/objects/1b/483e677e03d117be8c8afb031abfc7f40d0958f844fe26d5fea5ec24c0791c.dirtree and /dev/null differ diff --git a/.flatpak-builder/cache/objects/1e/f575920d15e4802d8419046b233c31b767906027bd9c9e17b9d7cba5b61851.file b/.flatpak-builder/cache/objects/1e/f575920d15e4802d8419046b233c31b767906027bd9c9e17b9d7cba5b61851.file deleted file mode 100644 index 0e3ecc1..0000000 --- a/.flatpak-builder/cache/objects/1e/f575920d15e4802d8419046b233c31b767906027bd9c9e17b9d7cba5b61851.file +++ /dev/null @@ -1,4 +0,0 @@ -[Application] -name=io.gitlab.idevecore.Pomodoro -runtime=org.gnome.Platform/x86_64/44 -sdk=org.gnome.Sdk/x86_64/44 diff --git a/.flatpak-builder/cache/objects/1f/c3119c6415d6d6b51e9ef5e502022f5b1fee98e6e8d871b84da0efa8b618b0.dirtree b/.flatpak-builder/cache/objects/1f/c3119c6415d6d6b51e9ef5e502022f5b1fee98e6e8d871b84da0efa8b618b0.dirtree deleted file mode 100644 index 6562754..0000000 Binary files a/.flatpak-builder/cache/objects/1f/c3119c6415d6d6b51e9ef5e502022f5b1fee98e6e8d871b84da0efa8b618b0.dirtree and /dev/null differ diff --git a/.flatpak-builder/cache/objects/1f/d4d89931b81b4d99a286c626095ea6634a9e9d734238e1bb7607b9ece07746.file b/.flatpak-builder/cache/objects/1f/d4d89931b81b4d99a286c626095ea6634a9e9d734238e1bb7607b9ece07746.file deleted file mode 100644 index 622a897..0000000 --- a/.flatpak-builder/cache/objects/1f/d4d89931b81b4d99a286c626095ea6634a9e9d734238e1bb7607b9ece07746.file +++ /dev/null @@ -1,292 +0,0 @@ - libcanberra 0.30 - - Copyright 2008-2012 Lennart Poettering - * [1]License - * [2]News - * [3]Overview - * [4]Current Status - * [5]Documentation - * [6]Requirements - * [7]Installation - * [8]Acknowledgements - * [9]Download - -License - - This program 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. - - This program 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. - -News - - Tue 25 Sep 2012: - - [10]Version 0.30 released; Port to GStreamer 1.0. - - Tue 15 May 2012: - - [11]Version 0.29 released; A couple of bugfixes, drop GConf usage. - - Thu 24 Feb 2011: - - [12]Version 0.28 released; Hook properly into GNOME 3.0 sessions; this - drops support for GNOME 2.0 sessions, but not applications. - - Fri 18 Feb 2011: - - [13]Version 0.27 released; Gtk+ 3.x fixes; add new tool to implement - boot-up sounds when used with systemd; other fixes - - Mon 4 Oct 2010: - - [14]Version 0.26 released; Gtk+ 3.x fixes. - - Sun 13 Jun 2010: - - [15]Version 0.25 released; Optionally build with Gtk+ 3.x in addition - to Gtk+ 2.x. - - Mon 19 Apr 2010: - - [16]Version 0.24 released; GTK code is now fine with GSEAL. Minor fixes - in the PulseAudio backend, other fixes. - - Sat 20 Feb 2010: - - [17]Version 0.23 released; various minor fixes in the pulse and - gstreamer backends as well in the Vala API. Support for the recently - standardized Vorbis 6.1/7.1 multichannel modes. - - Tue 20 Oct 2009: - - [18]Version 0.22 released; small fix to make sure we don't dereference - a null pointer. - - Fri 16 Oct 2009: - - [19]Version 0.21 released; suppress casting warning - - Thu 15 Oct 2009: - - [20]Version 0.20 released; minor casting fix - - Wed 14 Oct 2009: - - [21]Version 0.19 released; some important fixes for the Gtk support - - Sun 20 Sep 2009: - - [22]Version 0.18 released; numerous updates for the Gtk support - - Fri 12 Sep 2009: - - [23]Version 0.17 released; add vala vapi file; numerous updates to Gtk - support - - Thu 27 Aug 2009: - - [24]Version 0.16 released; add new ca_context_playing() call - - Wed 5 Aug 2009: - - [25]Version 0.15 released; bug fixes - - Thu 2 Jul 2009: - - [26]Version 0.14 released; bug fixes - - Tue 23 Jun 2009: - - [27]Version 0.13 released; multichannel support; gtk multihead support; - bug fixes - - Mon 13 Apr 2009: - - [28]Version 0.12 released; changes include: various fixes and updates - for the PulseAudio backend; detect forks and return an error for all - functions in that case - - Wed 21 Jan 2009: - - [29]Version 0.11 released; changes include: major GStreamer backend - fixes; update to libtool 2.2; a few other fixes - - Mon 6 Oct 2008: - - [30]Version 0.10 released; changes include: install Gtk+ module using - GConf; a few other fixes - - Tue 9 Sep 2008: - - [31]Version 0.9 released; changes include: GStreamer fixes, include - (optional) libtdb based lookup cache. - - Thu 28 Aug 2008: - - [32]Version 0.8 released; changes include: new OSS and GStreamer - backend; portability fixes for FreeBSD/Solaris; the multi backend works - now - - Thu 14 Aug 2008: - - [33]Version 0.7 released; changes include: documentation updates; - various bug fixes; add this web site/README; allow playback of event - sounds with only a sound file path specified; other changes - -Overview - - libcanberra is an implementation of the [34]XDG Sound Theme and Name - Specifications, for generating event sounds on free desktops, such as - [35]GNOME. It comes with several backends ([36]ALSA, [37]PulseAudio, - OSS, [38]GStreamer, null) and is designed to be portable. It consists - of the following parts: - 1. libcanberra: the main library - 2. libcanberra-gtk: some glue code to make it easier to use - libcanberra from Gtk+ applications - 3. libcanberra-gtk-module: a Gtk+ module that uses libcanberra-gtk to - trigger input feedback event sounds - - For more information see [39]the original announcement. - -Current Status - - libcanberra is mostly feature complete. For now however it includes - backends only for ALSA, PulseAudio, OSS and GStreamer. - - libcanberra has been declared [40]a blessed GNOME dependency. - - The OSS driver is incomplete: only sound files that are in a format - natively understood by the sound card are supported. If the sample - type, channel map or sampling rate of the sound file are not supported - by the sound card no automatic conversion will take place and the file - will not be played. Also note that the OSS backend is most likely - incompatible with OSS4, due to subtle incompatibilities between OSS4 - and the OSS 3.x. - - It is recommended to always take the "shortest" path from libcanberra - to the audio device. I.e. don't use the GStreamer plugin if libcanberra - supports the final output target natively. Besides being more - resource-friendly and less error-prone, some advanced functionality - might get lost with each layer you add to your stack. For example: - while you could use libcanberra's Gstreamer backend to output to a - PulseAudio server this will not be able to make use of sample cacheing - or will be able to attach additional meta data to the sounds played, - which might be necessary for effects like positional event sounds. - -Documentation - - You may browse the [41]gtkdoc generated [42]programing documentation of - the API. - -Requirements - - Currently, libcanberra is tested on Linux only. - - libcanberra was developed and tested on Fedora Rawhide from August - 2008, it should work on most other Linux distributions (and maybe Unix - versions) since it uses GNU autoconf and GNU libtool for source code - configuration and shared library management. - - libcanberra has no dependencies besides the OGG Vorbis development - headers and whatever the selected backends require. Gtk+ support is - optional. An optional lookup cache can be used if Samba's tdb trivial - database is available. - -Installation - - As this package is made with the GNU autotools you should run - ./configure inside the distribution directory for configuring the - source tree. After that you should run make for compilation and make - install (as root) for installation of libcanberra. - -Acknowledgements - - Marc-André Lureau and Brian Cameron for the GStreamer backend. - - Joe Marcus Clarke for the OSS backend. - - Diego Elio Pettenò for various build system fixes. - -Download - - The newest release is always available from - [43]http://0pointer.de/lennart/projects/libcanberra/ - - The current release is [44]0.30 - - Get libcanberra's development sources from the [45]GIT [46]repository - ([47]gitweb): -git clone git://git.0pointer.de/libcanberra - - If you want to report bugs, have questions or want to be notified about - new releases, please join the [48]libcanberra-discuss mailing list. - - If you want to be notified about new git commits, please join the - [49]libcanberra-commits mailing list. - - libcanberra's bugs are tracked at [50]bugs.freedesktop.org. - __________________________________________________________________ - - - Lennart Poettering , September - 2012 - -References - - 1. README#license - 2. README#news - 3. README#overview - 4. README#status - 5. README#documentation - 6. README#requirements - 7. README#installation - 8. README#acks - 9. README#download - 10. http://0pointer.de/lennart/projects/libcanberra/libcanberra-0.30.tar.xz - 11. http://0pointer.de/lennart/projects/libcanberra/libcanberra-0.29.tar.xz - 12. http://0pointer.de/lennart/projects/libcanberra/libcanberra-0.28.tar.gz - 13. http://0pointer.de/lennart/projects/libcanberra/libcanberra-0.27.tar.gz - 14. http://0pointer.de/lennart/projects/libcanberra/libcanberra-0.26.tar.gz - 15. http://0pointer.de/lennart/projects/libcanberra/libcanberra-0.25.tar.gz - 16. http://0pointer.de/lennart/projects/libcanberra/libcanberra-0.24.tar.gz - 17. http://0pointer.de/lennart/projects/libcanberra/libcanberra-0.23.tar.gz - 18. http://0pointer.de/lennart/projects/libcanberra/libcanberra-0.22.tar.gz - 19. http://0pointer.de/lennart/projects/libcanberra/libcanberra-0.21.tar.gz - 20. http://0pointer.de/lennart/projects/libcanberra/libcanberra-0.20.tar.gz - 21. http://0pointer.de/lennart/projects/libcanberra/libcanberra-0.19.tar.gz - 22. http://0pointer.de/lennart/projects/libcanberra/libcanberra-0.18.tar.gz - 23. http://0pointer.de/lennart/projects/libcanberra/libcanberra-0.17.tar.gz - 24. http://0pointer.de/lennart/projects/libcanberra/libcanberra-0.16.tar.gz - 25. http://0pointer.de/lennart/projects/libcanberra/libcanberra-0.15.tar.gz - 26. http://0pointer.de/lennart/projects/libcanberra/libcanberra-0.14.tar.gz - 27. http://0pointer.de/lennart/projects/libcanberra/libcanberra-0.13.tar.gz - 28. http://0pointer.de/lennart/projects/libcanberra/libcanberra-0.12.tar.gz - 29. http://0pointer.de/lennart/projects/libcanberra/libcanberra-0.11.tar.gz - 30. http://0pointer.de/lennart/projects/libcanberra/libcanberra-0.10.tar.gz - 31. http://0pointer.de/lennart/projects/libcanberra/libcanberra-0.9.tar.gz - 32. http://0pointer.de/lennart/projects/libcanberra/libcanberra-0.8.tar.gz - 33. http://0pointer.de/lennart/projects/libcanberra/libcanberra-0.7.tar.gz - 34. http://freedesktop.org/wiki/Specifications/sound-theme-spec - 35. http://www.gnome.org/ - 36. http://alsa-project.org/ - 37. http://pulseaudio.org/ - 38. http://gstreamer.org/ - 39. http://0pointer.de/blog/projects/sixfold-announcement.html - 40. http://mail.gnome.org/archives/devel-announce-list/2008-August/msg00001.html - 41. http://www.gtk.org/gtk-doc/ - 42. http://0pointer.de/lennart/projects/libcanberra/gtkdoc/ - 43. http://0pointer.de/lennart/projects/libcanberra/ - 44. http://0pointer.de/lennart/projects/libcanberra/libcanberra-0.30.tar.xz - 45. http://git-scm.com/ - 46. git://git.0pointer.de/libcanberra - 47. http://git.0pointer.de/?p=libcanberra.git - 48. https://tango.0pointer.de/mailman/listinfo/libcanberra-discuss/ - 49. https://tango.0pointer.de/mailman/listinfo/libcanberra-commits/ - 50. http://bugs.freedesktop.org/buglist.cgi?bug_status=__open__&product=libcanberra diff --git a/.flatpak-builder/cache/objects/1f/d8d0097f3af4e70d208e58fbb543a095bbb789c8496f16c1a80ec24d982213.dirtree b/.flatpak-builder/cache/objects/1f/d8d0097f3af4e70d208e58fbb543a095bbb789c8496f16c1a80ec24d982213.dirtree deleted file mode 100644 index 92d993b..0000000 Binary files a/.flatpak-builder/cache/objects/1f/d8d0097f3af4e70d208e58fbb543a095bbb789c8496f16c1a80ec24d982213.dirtree and /dev/null differ diff --git a/.flatpak-builder/cache/objects/21/339c491f5f7ab2ca45b122c59284a9ae58d79079460c15e44fb57de2710d6c.file b/.flatpak-builder/cache/objects/21/339c491f5f7ab2ca45b122c59284a9ae58d79079460c15e44fb57de2710d6c.file deleted file mode 100644 index 7c8e97e..0000000 Binary files a/.flatpak-builder/cache/objects/21/339c491f5f7ab2ca45b122c59284a9ae58d79079460c15e44fb57de2710d6c.file and /dev/null differ diff --git a/.flatpak-builder/cache/objects/21/6d44bd2eb937fe660dee88f643607fb81c3fe7be6ff3407cf870fb11eaf29e.file b/.flatpak-builder/cache/objects/21/6d44bd2eb937fe660dee88f643607fb81c3fe7be6ff3407cf870fb11eaf29e.file deleted file mode 100644 index 1896185..0000000 Binary files a/.flatpak-builder/cache/objects/21/6d44bd2eb937fe660dee88f643607fb81c3fe7be6ff3407cf870fb11eaf29e.file and /dev/null differ diff --git a/.flatpak-builder/cache/objects/21/97358bfc75cbca39fbbccdb1ac631f25bed3f5407500871a37e4b68b08ba5f.dirtree b/.flatpak-builder/cache/objects/21/97358bfc75cbca39fbbccdb1ac631f25bed3f5407500871a37e4b68b08ba5f.dirtree deleted file mode 100644 index 7597018..0000000 Binary files a/.flatpak-builder/cache/objects/21/97358bfc75cbca39fbbccdb1ac631f25bed3f5407500871a37e4b68b08ba5f.dirtree and /dev/null differ diff --git a/.flatpak-builder/cache/objects/24/71bdb8a0e1c92f5b01cb119bd1c2958d9ca38d2db932792ccc165e4d830e91.file b/.flatpak-builder/cache/objects/24/71bdb8a0e1c92f5b01cb119bd1c2958d9ca38d2db932792ccc165e4d830e91.file deleted file mode 100644 index 5e16455..0000000 Binary files a/.flatpak-builder/cache/objects/24/71bdb8a0e1c92f5b01cb119bd1c2958d9ca38d2db932792ccc165e4d830e91.file and /dev/null differ diff --git a/.flatpak-builder/cache/objects/24/acbb915c6ac43f3ece67dedf1ad4c4500de87a4533b0a2090cb1c535560586.dirtree b/.flatpak-builder/cache/objects/24/acbb915c6ac43f3ece67dedf1ad4c4500de87a4533b0a2090cb1c535560586.dirtree deleted file mode 100644 index ab50609..0000000 Binary files a/.flatpak-builder/cache/objects/24/acbb915c6ac43f3ece67dedf1ad4c4500de87a4533b0a2090cb1c535560586.dirtree and /dev/null differ diff --git a/.flatpak-builder/cache/objects/26/45cf015e1ed26960ce55fd2850d8cdfba6a09636b9815750961302afdb5022.file b/.flatpak-builder/cache/objects/26/45cf015e1ed26960ce55fd2850d8cdfba6a09636b9815750961302afdb5022.file deleted file mode 100755 index 070e758..0000000 --- a/.flatpak-builder/cache/objects/26/45cf015e1ed26960ce55fd2850d8cdfba6a09636b9815750961302afdb5022.file +++ /dev/null @@ -1,41 +0,0 @@ -# libcanberra.la - a libtool library file -# Generated by libtool (GNU libtool) 2.4.2 -# -# Please DO NOT delete this file! -# It is necessary for linking the library. - -# The name that we can dlopen(3). -dlname='libcanberra.so.0' - -# Names of this library. -library_names='libcanberra.so.0.2.5 libcanberra.so.0 libcanberra.so' - -# The name of the static archive. -old_library='' - -# Linker flags that can not go in dependency_libs. -inherited_linker_flags='' - -# Libraries that this one depends upon. -dependency_libs=' -L/app/lib -lvorbisfile -lltdl -lm' - -# Names of additional weak libraries provided by this library -weak_library_names='' - -# Version information for libcanberra. -current=2 -age=2 -revision=5 - -# Is this an already installed library? -installed=yes - -# Should we warn about portability when linking against -modules? -shouldnotlink=no - -# Files to dlopen/dlpreopen -dlopen='' -dlpreopen='' - -# Directory that this library needs to be installed in: -libdir='/app/lib' diff --git a/.flatpak-builder/cache/objects/26/5dcc0b8858a90a492af2f104e918deb6fd10bc57a976c844748148bd040c5b.file b/.flatpak-builder/cache/objects/26/5dcc0b8858a90a492af2f104e918deb6fd10bc57a976c844748148bd040c5b.file deleted file mode 100644 index 85b3e2a..0000000 Binary files a/.flatpak-builder/cache/objects/26/5dcc0b8858a90a492af2f104e918deb6fd10bc57a976c844748148bd040c5b.file and /dev/null differ diff --git a/.flatpak-builder/cache/objects/28/97a1fad5f0e1d3ce00744b29771a59d8f2e42ed8d8c5c49fbe1e78e86aa900.dirtree b/.flatpak-builder/cache/objects/28/97a1fad5f0e1d3ce00744b29771a59d8f2e42ed8d8c5c49fbe1e78e86aa900.dirtree deleted file mode 100644 index 1d04d37..0000000 Binary files a/.flatpak-builder/cache/objects/28/97a1fad5f0e1d3ce00744b29771a59d8f2e42ed8d8c5c49fbe1e78e86aa900.dirtree and /dev/null differ diff --git a/.flatpak-builder/cache/objects/2a/426e8b9582aaba7a8f9acde9a96e345178a82168afaed4606027cb5dcc2307.file b/.flatpak-builder/cache/objects/2a/426e8b9582aaba7a8f9acde9a96e345178a82168afaed4606027cb5dcc2307.file deleted file mode 100644 index 3702847..0000000 --- a/.flatpak-builder/cache/objects/2a/426e8b9582aaba7a8f9acde9a96e345178a82168afaed4606027cb5dcc2307.file +++ /dev/null @@ -1,28 +0,0 @@ -/*-*- Mode: C; c-basic-offset: 8 -*-*/ - -#ifndef foocanberradriverorderhfoo -#define foocanberradriverorderhfoo - -/*** - This file is part of libcanberra. - - Copyright 2008 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 - . -***/ - -extern const char* const ca_driver_order[]; - -#endif diff --git a/.flatpak-builder/cache/objects/2b/3b7c120be6441e51b5f01a3ad764c2a67599685face359fb8de9f4cd1fea81.file b/.flatpak-builder/cache/objects/2b/3b7c120be6441e51b5f01a3ad764c2a67599685face359fb8de9f4cd1fea81.file deleted file mode 100644 index a0ff221..0000000 Binary files a/.flatpak-builder/cache/objects/2b/3b7c120be6441e51b5f01a3ad764c2a67599685face359fb8de9f4cd1fea81.file and /dev/null differ diff --git a/.flatpak-builder/cache/objects/2c/00909b380d1b972a01e5fe831679ad340655c8d153ada016300ba79d8961b9.file b/.flatpak-builder/cache/objects/2c/00909b380d1b972a01e5fe831679ad340655c8d153ada016300ba79d8961b9.file deleted file mode 100644 index 8ffc13c..0000000 Binary files a/.flatpak-builder/cache/objects/2c/00909b380d1b972a01e5fe831679ad340655c8d153ada016300ba79d8961b9.file and /dev/null differ diff --git a/.flatpak-builder/cache/objects/2c/36d952804a534d3caa8766486ec99d5371483226e375db5ed6ab3f9376231f.dirtree b/.flatpak-builder/cache/objects/2c/36d952804a534d3caa8766486ec99d5371483226e375db5ed6ab3f9376231f.dirtree deleted file mode 100644 index 2dca295..0000000 Binary files a/.flatpak-builder/cache/objects/2c/36d952804a534d3caa8766486ec99d5371483226e375db5ed6ab3f9376231f.dirtree and /dev/null differ diff --git a/.flatpak-builder/cache/objects/2f/adcf20adb6539d0f566b720cd1b202a604d300096c2f75de410e3ef4f6c19c.file b/.flatpak-builder/cache/objects/2f/adcf20adb6539d0f566b720cd1b202a604d300096c2f75de410e3ef4f6c19c.file deleted file mode 100644 index c702406..0000000 --- a/.flatpak-builder/cache/objects/2f/adcf20adb6539d0f566b720cd1b202a604d300096c2f75de410e3ef4f6c19c.file +++ /dev/null @@ -1,9 +0,0 @@ -[Desktop Entry] -Type=Application -Name=GNOME System Ready Sound -Comment=Plays a sound whenever your system is ready for login -Exec=/app/bin/canberra-gtk-play --id="system-ready" --description="GNOME System Ready" -OnlyShowIn=GNOME; -AutostartCondition=GSettings org.gnome.desktop.sound event-sounds -X-GNOME-Autostart-Phase=Application -X-GNOME-Provides=login-sound diff --git a/.flatpak-builder/cache/objects/30/c2f21ba219d7566918f21ac56cde1413f288d7e4f3bb8dfba31adc2bb6c438.file b/.flatpak-builder/cache/objects/30/c2f21ba219d7566918f21ac56cde1413f288d7e4f3bb8dfba31adc2bb6c438.file deleted file mode 120000 index f97f468..0000000 --- a/.flatpak-builder/cache/objects/30/c2f21ba219d7566918f21ac56cde1413f288d7e4f3bb8dfba31adc2bb6c438.file +++ /dev/null @@ -1 +0,0 @@ -camera-shutter.oga \ No newline at end of file diff --git a/.flatpak-builder/cache/objects/34/915d0b4a1024c29c86f38a0763f30ed3d2a387fa82e26c7e37e51b0e9828a9.dirtree b/.flatpak-builder/cache/objects/34/915d0b4a1024c29c86f38a0763f30ed3d2a387fa82e26c7e37e51b0e9828a9.dirtree deleted file mode 100644 index 89fc870..0000000 Binary files a/.flatpak-builder/cache/objects/34/915d0b4a1024c29c86f38a0763f30ed3d2a387fa82e26c7e37e51b0e9828a9.dirtree and /dev/null differ diff --git a/.flatpak-builder/cache/objects/35/d649cd4dcbb9516cb9a6101aa6bf55b0cf195a35b3cc770066d2a0ddba4d26.file b/.flatpak-builder/cache/objects/35/d649cd4dcbb9516cb9a6101aa6bf55b0cf195a35b3cc770066d2a0ddba4d26.file deleted file mode 100755 index 5ef08c3..0000000 --- a/.flatpak-builder/cache/objects/35/d649cd4dcbb9516cb9a6101aa6bf55b0cf195a35b3cc770066d2a0ddba4d26.file +++ /dev/null @@ -1,1108 +0,0 @@ -#!/usr/bin/perl -w -# -*- Mode: perl; indent-tabs-mode: nil; c-basic-offset: 4 -*- - -# -# The Intltool Message Extractor -# -# Copyright (C) 2000-2001, 2003 Free Software Foundation. -# -# Intltool is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License as -# published by the Free Software Foundation; either version 2 of the -# License, or (at your option) any later version. -# -# Intltool 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 -# General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -# -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. -# -# Authors: Kenneth Christiansen -# Darin Adler -# - -## Release information -my $PROGRAM = "intltool-extract"; -my $PACKAGE = "intltool"; -my $VERSION = "0.51.0"; - -## Loaded modules -use strict; -use File::Basename; -use Getopt::Long; - -## Scalars used by the option stuff -my $TYPE_ARG = "0"; -my $LOCAL_ARG = "0"; -my $HELP_ARG = "0"; -my $VERSION_ARG = "0"; -my $UPDATE_ARG = "0"; -my $QUIET_ARG = "0"; -my $SRCDIR_ARG = "."; -my $NOMSGCTXT_ARG = "0"; - -my $FILE; -my $OUTFILE; - -my $gettext_type = ""; -my $input; -my %messages = (); -my @messages_sorted = (); -my %loc = (); -my %count = (); -my %comments = (); -my $strcount = 0; - -my $XMLCOMMENT = ""; - -## Use this instead of \w for XML files to handle more possible characters. -my $w = "[-A-Za-z0-9._:]"; - -## Always print first -$| = 1; - -## Handle options -GetOptions ( - "type=s" => \$TYPE_ARG, - "local|l" => \$LOCAL_ARG, - "help|h" => \$HELP_ARG, - "version|v" => \$VERSION_ARG, - "update" => \$UPDATE_ARG, - "quiet|q" => \$QUIET_ARG, - "srcdir=s" => \$SRCDIR_ARG, - "nomsgctxt" => \$NOMSGCTXT_ARG, - ) or &error; - -&split_on_argument; - - -## Check for options. -## This section will check for the different options. - -sub split_on_argument { - - if ($VERSION_ARG) { - &version; - - } elsif ($HELP_ARG) { - &help; - - } elsif ($LOCAL_ARG) { - &place_local; - &extract; - - } elsif ($UPDATE_ARG) { - &place_normal; - &extract; - - } elsif (@ARGV > 0) { - &place_normal; - &message; - &extract; - - } else { - &help; - - } -} - -sub place_normal { - $FILE = $ARGV[0]; - $OUTFILE = "$FILE.h"; - - my $dirname = dirname ($OUTFILE); - if (! -d "$dirname" && $dirname ne "") { - system ("mkdir -p $dirname"); - } -} - -sub place_local { - $FILE = $ARGV[0]; - $OUTFILE = fileparse($FILE, ()); - if (!-e "tmp/") { - system("mkdir tmp/"); - } - $OUTFILE = "./tmp/$OUTFILE.h" -} - -sub determine_type { - if ($TYPE_ARG =~ /^gettext\/(.*)/) { - $gettext_type=$1 - } -} - -## Sub for printing release information -sub version{ - print <<_EOF_; -${PROGRAM} (${PACKAGE}) $VERSION -Copyright (C) 2000, 2003 Free Software Foundation, Inc. -Written by Kenneth Christiansen, 2000. - -This is free software; see the source for copying conditions. There is NO -warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -_EOF_ - exit; -} - -## Sub for printing usage information -sub help { - print <<_EOF_; -Usage: ${PROGRAM} [OPTION]... [FILENAME] -Generates a header file from an XML source file. - -It grabs all strings between <_translatable_node> and its end tag in -XML files. Read manpage (man ${PROGRAM}) for more info. - - --type=TYPE Specify the file type of FILENAME. Currently supports: - "gettext/glade", "gettext/ini", "gettext/keys" - "gettext/rfc822deb", "gettext/schemas", - "gettext/gsettings", "gettext/xml", "gettext/quoted", - "gettext/quotedxml", "gettext/tlk", "gettext/qtdesigner" - -l, --local Writes output into current working directory - (conflicts with --update) - --update Writes output into the same directory the source file - reside (conflicts with --local) - --srcdir Root of the source tree - -v, --version Output version information and exit - -h, --help Display this help and exit - -q, --quiet Quiet mode - -Report bugs to http://bugs.launchpad.net/intltool -_EOF_ - exit; -} - -## Sub for printing error messages -sub error{ - print STDERR "Try `${PROGRAM} --help' for more information.\n"; - exit; -} - -sub message { - print "Generating C format header file for translation.\n" unless $QUIET_ARG; -} - -sub extract { - &determine_type; - - &convert; - - open OUT, ">$OUTFILE"; - binmode (OUT) if $^O eq 'MSWin32'; - &msg_write; - close OUT; - - print "Wrote $OUTFILE\n" unless $QUIET_ARG; -} - -sub convert { - - ## Reading the file - { - local (*IN); - local $/; #slurp mode - open (IN, "<$SRCDIR_ARG/$FILE") || die "can't open $SRCDIR_ARG/$FILE: $!"; - binmode (IN); - $input = ; - close IN; - } - - &type_ini if $gettext_type eq "ini"; - &type_keys if $gettext_type eq "keys"; - &type_xml if $gettext_type eq "xml"; - &type_glade if $gettext_type eq "glade"; - &type_gsettings if $gettext_type eq "gsettings"; - &type_schemas if $gettext_type eq "schemas"; - &type_rfc822deb if $gettext_type eq "rfc822deb"; - &type_quoted if $gettext_type eq "quoted"; - &type_quotedxml if $gettext_type eq "quotedxml"; - &type_tlk if $gettext_type eq "tlk"; - &type_qtdesigner if $gettext_type eq "qtdesigner"; -} - -sub entity_decode_minimal -{ - local ($_) = @_; - - s/'/'/g; # ' - s/"/"/g; # " - s/&/&/g; - - return $_; -} - -sub entity_decode -{ - local ($_) = @_; - - s/'/'/g; # ' - s/"/"/g; # " - s/<//g; - s/&/&/g; - - return $_; -} - -sub escape_char -{ - return '\"' if $_ eq '"'; - return '\n' if $_ eq "\n"; - return '\\\\' if $_ eq '\\'; - - return $_; -} - -sub escape -{ - my ($string) = @_; - return join "", map &escape_char, split //, $string; -} - -sub add_message -{ - my ($string) = @_; - push @messages_sorted, $string if !defined $messages{$string}; - $messages{$string} = []; -} - -sub type_ini { - ### For generic translatable desktop files ### - while ($input =~ /^(#(.+)\n)?^_[A-Za-z0-9\-]+\s*=\s*(.*)$/mg) { - if (defined($2)) { - $comments{$3} = $2; - } - add_message($3); - } -} - -sub type_keys { - ### For generic translatable mime/keys files ### - while ($input =~ /^\s*_\w+=(.*)$/mg) { - add_message($1); - } -} - -sub type_xml { - ### For generic translatable XML files ### - my $tree = readXml($input); - parseTree(0, $tree); -} - -sub print_var { - my $var = shift; - my $vartype = ref $var; - - if ($vartype =~ /ARRAY/) { - my @arr = @{$var}; - print "[ "; - foreach my $el (@arr) { - print_var($el); - print ", "; - } - print "] "; - } elsif ($vartype =~ /HASH/) { - my %hash = %{$var}; - print "{ "; - foreach my $key (keys %hash) { - print "$key => "; - print_var($hash{$key}); - print ", "; - } - print "} "; - } else { - print $var; - } -} - -# Same syntax as getAttributeString in intltool-merge.in.in, similar logic (look for ## differences comment) -sub getAttributeString -{ - my $sub = shift; - my $do_translate = shift || 1; - my $language = shift || ""; - my $translate = shift; - my $result = ""; - foreach my $e (reverse(sort(keys %{ $sub }))) { - my $key = $e; - my $string = $sub->{$e}; - my $quote = '"'; - - $string =~ s/^[\s]+//; - $string =~ s/[\s]+$//; - - if ($string =~ /^'.*'$/) - { - $quote = "'"; - } - $string =~ s/^['"]//g; - $string =~ s/['"]$//g; - - ## differences from intltool-merge.in.in - if ($key =~ /^_/) { - $comments{entity_decode($string)} = $XMLCOMMENT if $XMLCOMMENT; - add_message(entity_decode($string)); - $$translate = 2; - } - ## differences end here from intltool-merge.in.in - $result .= " $key=$quote$string$quote"; - } - return $result; -} - -# Verbatim copy from intltool-merge.in.in -sub getXMLstring -{ - my $ref = shift; - my $spacepreserve = shift || 0; - my @list = @{ $ref }; - my $result = ""; - - my $count = scalar(@list); - my $attrs = $list[0]; - my $index = 1; - - $spacepreserve = 1 if ((exists $attrs->{"xml:space"}) && ($attrs->{"xml:space"} =~ /^["']?preserve["']?$/)); - $spacepreserve = 0 if ((exists $attrs->{"xml:space"}) && ($attrs->{"xml:space"} =~ /^["']?default["']?$/)); - - while ($index < $count) { - my $type = $list[$index]; - my $content = $list[$index+1]; - if (! $type ) { - # We've got CDATA - if ($content) { - # lets strip the whitespace here, and *ONLY* here - $content =~ s/\s+/ /gs if (!$spacepreserve); - $result .= $content; - } - } elsif ( "$type" ne "1" ) { - # We've got another element - $result .= "<$type"; - $result .= getAttributeString(@{$content}[0], 0); # no nested translatable elements - if ($content) { - my $subresult = getXMLstring($content, $spacepreserve); - if ($subresult) { - $result .= ">".$subresult . ""; - } else { - $result .= "/>"; - } - } else { - $result .= "/>"; - } - } - $index += 2; - } - return $result; -} - -# Verbatim copy from intltool-merge.in.in, except for MULTIPLE_OUTPUT handling removed -# Translate list of nodes if necessary -sub translate_subnodes -{ - my $fh = shift; - my $content = shift; - my $language = shift || ""; - my $singlelang = shift || 0; - my $spacepreserve = shift || 0; - - my @nodes = @{ $content }; - - my $count = scalar(@nodes); - my $index = 0; - while ($index < $count) { - my $type = $nodes[$index]; - my $rest = $nodes[$index+1]; - traverse($fh, $type, $rest, $language, $spacepreserve); - $index += 2; - } -} - -# Based on traverse() in intltool-merge.in.in -sub traverse -{ - my $fh = shift; # unused, to allow us to sync code between -merge and -extract - my $nodename = shift; - my $content = shift; - my $language = shift || ""; - my $spacepreserve = shift || 0; - - if ($nodename && "$nodename" eq "1") { - $XMLCOMMENT = $content; - } elsif ($nodename) { - # element - my @all = @{ $content }; - my $attrs = shift @all; - my $translate = 0; - my $outattr = getAttributeString($attrs, 1, $language, \$translate); - - if ($nodename =~ /^_/) { - $translate = 1; - $nodename =~ s/^_//; - } - my $lookup = ''; - - $spacepreserve = 0 if ((exists $attrs->{"xml:space"}) && ($attrs->{"xml:space"} =~ /^["']?default["']?$/)); - $spacepreserve = 1 if ((exists $attrs->{"xml:space"}) && ($attrs->{"xml:space"} =~ /^["']?preserve["']?$/)); - - if ($translate) { - $lookup = getXMLstring($content, $spacepreserve); - if (!$spacepreserve) { - $lookup =~ s/^\s+//s; - $lookup =~ s/\s+$//s; - } - if (exists $attrs->{"msgctxt"}) { - my $context = entity_decode ($attrs->{"msgctxt"}); - $context =~ s/^["'](.*)["']/$1/; - $lookup = "$context\004$lookup"; - } - - if ($lookup && $translate != 2) { - $comments{$lookup} = $XMLCOMMENT if $XMLCOMMENT; - add_message($lookup); - } elsif ($translate == 2) { - translate_subnodes($fh, \@all, $language, 1, $spacepreserve); - } - } else { - $XMLCOMMENT = ""; - my $count = scalar(@all); - if ($count > 0) { - my $index = 0; - while ($index < $count) { - my $type = $all[$index]; - my $rest = $all[$index+1]; - traverse($fh, $type, $rest, $language, $spacepreserve); - $index += 2; - } - } - } - $XMLCOMMENT = ""; - } -} - - -# Verbatim copy from intltool-merge.in.in, $fh for compatibility -sub parseTree -{ - my $fh = shift; - my $ref = shift; - my $language = shift || ""; - - my $name = shift @{ $ref }; - my $cont = shift @{ $ref }; - - while (!$name || "$name" eq "1") { - $name = shift @{ $ref }; - $cont = shift @{ $ref }; - } - - my $spacepreserve = 0; - my $attrs = @{$cont}[0]; - $spacepreserve = 1 if ((exists $attrs->{"xml:space"}) && ($attrs->{"xml:space"} =~ /^["']?preserve["']?$/)); - - traverse($fh, $name, $cont, $language, $spacepreserve); -} - -# Verbatim copy from intltool-merge.in.in -sub intltool_tree_comment -{ - my $expat = shift; - my $data = $expat->original_string(); - my $clist = $expat->{Curlist}; - my $pos = $#$clist; - - $data =~ s/^$//s; - push @$clist, 1 => $data; -} - -# Verbatim copy from intltool-merge.in.in -sub intltool_tree_cdatastart -{ - my $expat = shift; - my $clist = $expat->{Curlist}; - my $pos = $#$clist; - - push @$clist, 0 => $expat->original_string(); -} - -# Verbatim copy from intltool-merge.in.in -sub intltool_tree_cdataend -{ - my $expat = shift; - my $clist = $expat->{Curlist}; - my $pos = $#$clist; - - $clist->[$pos] .= $expat->original_string(); -} - -# Verbatim copy from intltool-merge.in.in -sub intltool_tree_char -{ - my $expat = shift; - my $text = shift; - my $clist = $expat->{Curlist}; - my $pos = $#$clist; - - # Use original_string so that we retain escaped entities - # in CDATA sections. - # - if ($pos > 0 and $clist->[$pos - 1] eq '0') { - $clist->[$pos] .= $expat->original_string(); - } else { - push @$clist, 0 => $expat->original_string(); - } -} - -# Verbatim copy from intltool-merge.in.in -sub intltool_tree_start -{ - my $expat = shift; - my $tag = shift; - my @origlist = (); - - # Use original_string so that we retain escaped entities - # in attribute values. We must convert the string to an - # @origlist array to conform to the structure of the Tree - # Style. - # - my @original_array = split /\x/, $expat->original_string(); - my $source = $expat->original_string(); - - # Remove leading tag. - # - $source =~ s|^\s*<\s*(\S+)||s; - - # Grab attribute key/value pairs and push onto @origlist array. - # - while ($source) - { - if ($source =~ /^\s*([\w:-]+)\s*[=]\s*["]/) - { - $source =~ s|^\s*([\w:-]+)\s*[=]\s*["]([^"]*)["]||s; - push @origlist, $1; - push @origlist, '"' . $2 . '"'; - } - elsif ($source =~ /^\s*([\w:-]+)\s*[=]\s*[']/) - { - $source =~ s|^\s*([\w:-]+)\s*[=]\s*[']([^']*)[']||s; - push @origlist, $1; - push @origlist, "'" . $2 . "'"; - } - else - { - last; - } - } - - my $ol = [ { @origlist } ]; - - push @{ $expat->{Lists} }, $expat->{Curlist}; - push @{ $expat->{Curlist} }, $tag => $ol; - $expat->{Curlist} = $ol; -} - -# Copied from intltool-merge.in.in and added comment handler. -sub readXml -{ - my $xmldoc = shift || return; - my $ret = eval 'require XML::Parser'; - if(!$ret) { - die "You must have XML::Parser installed to run $0\n\n"; - } - my $xp = new XML::Parser(Style => 'Tree'); - $xp->setHandlers(Char => \&intltool_tree_char); - $xp->setHandlers(Start => \&intltool_tree_start); - $xp->setHandlers(CdataStart => \&intltool_tree_cdatastart); - $xp->setHandlers(CdataEnd => \&intltool_tree_cdataend); - - ## differences from intltool-merge.in.in - $xp->setHandlers(Comment => \&intltool_tree_comment); - ## differences end here from intltool-merge.in.in - - my $tree = $xp->parse($xmldoc); - -# Hello thereHowdydo -# would be: -# [foo, [{}, 1, "comment", head, [{id => "a"}, 0, "Hello ", em, [{}, 0, "there"]], bar, -# [{}, 0, "Howdy", ref, [{}]], 0, "do" ] ] - - return $tree; -} - -sub type_schemas { - ### For schemas XML files ### - - # FIXME: We should handle escaped < (less than) - while ($input =~ / - \s* - (\s*(?:\s*)?(.*?)\s*<\/default>\s*)? - (\s*(?:\s*)?(.*?)\s*<\/short>\s*)? - (\s*(?:\s*)?(.*?)\s*<\/long>\s*)? - <\/locale> - /sgx) { - my @totranslate = ($3,$6,$9); - my @eachcomment = ($2,$5,$8); - foreach (@totranslate) { - my $currentcomment = shift @eachcomment; - next if !$_; - s/\s+/ /g; - add_message(entity_decode_minimal($_)); - $comments{entity_decode_minimal($_)} = $currentcomment if (defined($currentcomment)); - } - } -} - -# Parse the tree as returned by readXml() for gschema.xml files. -sub traverse_gsettings { - sub cleanup { - s/^\s+//; - s/\s+$//; - s/\s+/ /g; - return $_; - } - - my $nodename = shift; - my $content = shift; - my $comment = shift || 0; - my @list = @{ $content }; - my $attrs_ref = shift @list; - my %attrs = %{ $attrs_ref }; - if (($nodename eq 'default' and $attrs{'l10n'}) or - ($nodename eq 'summary') or ($nodename eq 'description')) { - # preserve whitespace. deal with it ourselves, below. - my $message = getXMLstring($content, 1); - - if ($nodename eq 'default') { - # for we strip leading and trailing whitespace but - # preserve (possibly quoted) whitespace within - $message =~ s/^\s+//; - $message =~ s/\s+$//; - } else { - # for and , we normalise all - # whitespace while preserving paragraph boundaries - $message = join "\n\n", map &cleanup, split/\n\s*\n+/, $message; - } - - my $context = $attrs{'context'}; - $context =~ s/^["'](.*)["']/$1/ if $context; - $message = $context . "\004" . $message if $context; - add_message($message); - $comments{$message} = $comment if $comment; - } else { - my $index = 0; - my $comment; - while (scalar(@list) > 1) { - my $type = shift @list; - my $content = shift @list; - if (!$type || "$type" eq "1") { - if ($type == 1) { - $comment = $content; - } - next; - } else { - traverse_gsettings($type, $content, $comment); - $comment = 0; - } - } - } -} - -sub type_gsettings { - my $tree = readXml($input); - my @tree_nodes = @{ $tree }; - my $node = shift @tree_nodes; - while (!$node || "$node" eq "1") { - shift @tree_nodes; - $node = shift @tree_nodes; - } - my $content = shift @tree_nodes; - traverse_gsettings($node, $content); -} - -sub type_rfc822deb { - ### For rfc822-style Debian configuration files ### - - my $lineno = 1; - my $type = ''; - while ($input =~ /\G(.*?)(^|\n)(_+)([^:]+):[ \t]*(.*?)(?=\n\S|$)/sg) - { - my ($pre, $newline, $underscore, $tag, $text) = ($1, $2, $3, $4, $5); - while ($pre =~ m/\n/g) - { - $lineno ++; - } - $lineno += length($newline); - my @str_list = rfc822deb_split(length($underscore), $text); - for my $str (@str_list) - { - $strcount++; - add_message($str); - $loc{$str} = $lineno; - $count{$str} = $strcount; - my $usercomment = ''; - while($pre =~ s/(^|\n)#([^\n]*)$//s) - { - $usercomment = "\n" . $2 . $usercomment; - } - $comments{$str} = $tag . $usercomment; - } - $lineno += ($text =~ s/\n//g); - } -} - -sub rfc822deb_split { - # Debian defines a special way to deal with rfc822-style files: - # when a value contain newlines, it consists of - # 1. a short form (first line) - # 2. a long description, all lines begin with a space, - # and paragraphs are separated by a single dot on a line - # This routine returns an array of all paragraphs, and reformat - # them. - # When first argument is 2, the string is a comma separated list of - # values. - my $type = shift; - my $text = shift; - $text =~ s/^[ \t]//mg; - return (split(/, */, $text, 0)) if $type ne 1; - return ($text) if $text !~ /\n/; - - $text =~ s/([^\n]*)\n//; - my @list = ($1); - my $str = ''; - for my $line (split (/\n/, $text)) - { - chomp $line; - if ($line =~ /^\.\s*$/) - { - # New paragraph - $str =~ s/\s*$//; - push(@list, $str); - $str = ''; - } - elsif ($line =~ /^\s/) - { - # Line which must not be reformatted - $str .= "\n" if length ($str) && $str !~ /\n$/; - $line =~ s/\s+$//; - $str .= $line."\n"; - } - else - { - # Continuation line, remove newline - $str .= " " if length ($str) && $str !~ /\n$/; - $str .= $line; - } - } - $str =~ s/\s*$//; - push(@list, $str) if length ($str); - return @list; -} - -sub type_quoted { - while ($input =~ /\"(([^\"]|\\\")*[^\\\"])\"/g) { - my $message = $1; - my $before = $`; - $message =~ s/\\\"/\"/g; - $before =~ s/[^\n]//g; - add_message($message); - $loc{$message} = length ($before) + 2; - } -} - -sub type_quotedxml { - while ($input =~ /\"(([^\"]|\\\")*[^\\\"])\"/g) { - my $message = $1; - my $before = $`; - $message =~ s/\\\"/\"/g; - $message = entity_decode($message); - $before =~ s/[^\n]//g; - add_message($message); - $loc{$message} = length ($before) + 2; - } -} - -# Parse the tree as returned by readXml() for Qt Designer .ui files. -sub traverse_qtdesigner { - my $nodename = shift; - my $content = shift; - my @list = @{ $content }; - my $attrs_ref = shift @list; - my %attrs = %{ $attrs_ref }; - if ($nodename eq 'string' and !exists $attrs{"notr"}) { - # Preserve whitespace. Deal with it ourselves, below. - my $message = getXMLstring($content, 1); - - # We strip leading and trailing whitespace but - # preserve whitespace within (e.g. newlines) - $message =~ s/^\s+//; - $message =~ s/\s+$//; - - my $context = $attrs{'comment'}; - # Remove enclosing quotes from msgctxt - $context =~ s/^["'](.*)["']/$1/ if $context; - $message = $context . "\004" . $message if $context; - add_message($message); - my $comment = $attrs{'extracomment'}; - # Remove enclosing quotes from developer comments - $comment =~ s/^["'](.*)["']/$1/ if $comment; - $comments{$message} = $comment if $comment; - } else { - my $index = 0; - while (scalar(@list) > 1) { - my $type = shift @list; - my $content = shift @list; - if (!$type || "$type" eq "1") { - next; - } else { - traverse_qtdesigner($type, $content); - } - } - } -} - -sub type_qtdesigner { - ### For translatable Qt Designer XML files ### - # - # Specs: - # - # - http://qt-project.org/doc/qt-5.0/qtlinguist/linguist-ts-file-format.html - # - http://qt-project.org/doc/qt-5.0/qtdesigner/designer-ui-file-format.html - # - # tag attributes: - # - # notr="true" means the string is not translatable - # extracomment maps to a developer comment in gettext - # comment corresponds to "disambiguation" in the Qt Linguist API, and maps - # to msgctxt in gettext - # - # Example: - # - # Ok - - my $tree = readXml($input); - my @tree_nodes = @{ $tree }; - my $node = shift @tree_nodes; - while (!$node || "$node" eq "1") { - shift @tree_nodes; - $node = shift @tree_nodes; - } - my $content = shift @tree_nodes; - traverse_qtdesigner($node, $content); - -} - -sub type_glade { - ### For translatable Glade XML files ### - - my $tags = "label|title|text|format|copyright|comments|preview_text|tooltip|message"; - - while ($input =~ /<($tags)>([^<]+)<\/($tags)>/sg) { - # Glade sometimes uses tags that normally mark translatable things for - # little bits of non-translatable content. We work around this by not - # translating strings that only includes something like label4 or window1. - add_message(entity_decode($2)) unless $2 =~ /^(window|label|dialog)[0-9]+$/; - } - - while ($input =~ /(..[^<]*)<\/items>/sg) { - for my $item (split (/\n/, $1)) { - add_message(entity_decode($item)); - } - } - - ## handle new glade files - while ($input =~ /<(\w+)\s+[^>]*translatable\s*=\s*["']yes["'](?:\s+[^>]*context\s*=\s*["']([^"']*)["'])?(?:\s+[^>]*comments\s*=\s*["']([^"']*)["'])?[^>]*>([^<]+)<\/\1>/sg) { - if (!($4 =~ /^(window|label)[0-9]+$/)) { - my $message = entity_decode($4); - if (defined($2)) { - $message = entity_decode($2) . "\004" . $message; - } - add_message($message); - if (defined($3)) { - $comments{$message} = entity_decode($3) ; - } - } - } - while ($input =~ /]*)"\s+description="([^>]+)"\/>/sg) { - add_message(entity_decode_minimal($2)); - } -} - -sub type_tlk { - my ($ftype, $fvers, $langid, $strcount, $stroff); - my $count = 0; - my $pos = 0; - my @inputa = split (//, $input, 21); - my $foo; - my $strdata; - - $ftype = substr ($input, 0, 3); - $fvers = substr ($input, 4, 7); - $langid = unpack ("L", $inputa[8] . $inputa[9] . - $inputa[10] . $inputa[11]); - $strcount = unpack ("L", $inputa[12] . $inputa[13] . - $inputa[14] . $inputa[15]); - $stroff = unpack ("L", $inputa[16] . $inputa[17] . - $inputa[18] . $inputa[19]); - - use bytes; - $strdata = bytes::substr ($input, $stroff); - - my $sinpos = 20; - - $foo = $inputa[$sinpos]; - $sinpos = 40 * 2000; - @inputa = split (//, $foo, $sinpos + 1); - - $pos = 0; - while ($count < $strcount) { - my ($flags, $soundref, $volvar, $pitch, $offset, $strsize, $sndlen) = 0; - - if ($count > 0 && $count % 2000 == 0) { - $foo = $inputa[$sinpos]; - my $numleft = ($strcount - $count); - if ($numleft > 2000) { - $sinpos = 40 * 2000; - } else { - $sinpos = 40 * $numleft; - } - @inputa = split (//, $foo, $sinpos + 1); - my $numbytes = @inputa; - $pos = 0; - } - - - $flags = unpack ("L", $inputa[$pos] . $inputa[$pos + 1] . - $inputa[$pos + 2] . $inputa[$pos + 3]); - $pos += 4; - if ($flags & 0x0002) { - $soundref = join ('', @inputa[$pos..$pos + 15]); - $soundref =~ s/\0//g; - } - $pos += 16; -# According to the Bioware Aurora Talk Table Format documentation -# the VolumeVariance and PitchVariance DWORDs are not used -# We increment the pos counter, but do not read the data, here -# $volvar = unpack ("L", $inputa[$pos] . $inputa[$pos + 1] . -# $inputa[$pos + 2] . $inputa[$pos + 3]); - $pos += 4; -# $pitch = unpack ("L", $inputa[$pos] . $inputa[$pos + 1] . -# $inputa[$pos + 2] . $inputa[$pos + 3]); - $pos += 4; - $offset = unpack ("L", $inputa[$pos] . $inputa[$pos + 1] . - $inputa[$pos + 2] . $inputa[$pos + 3]) - if ($flags & 0x0001); - $pos += 4; - $strsize = unpack ("L", $inputa[$pos] . $inputa[$pos + 1] . - $inputa[$pos + 2] . $inputa[$pos + 3]) - if ($flags & 0x0001); - $pos += 4; - $sndlen = unpack ("d", $inputa[$pos] . $inputa[$pos + 1] . - $inputa[$pos + 2] . $inputa[$pos + 3]) - if ($flags & 0x0004); - $pos += 4; - - if (defined $strsize && $strsize > 0) { - my $message = substr ($strdata, $offset, $strsize); - if (defined $message) { - use Encode; - Encode::from_to ($message, "iso-8859-1", "UTF-8"); - add_message($message); - if ($message =~ /^Bad Strref$/ ) { - $comments{$message} = "DO NOT Translate this Entry."; - $comments{$message} .= "\nTLK:position=$count"; - } else { - $comments{$message} = "TLK:position=$count"; - $comments{$message} .= "; TLK:sndresref=$soundref" - if (defined $soundref && $soundref ne ""); - $comments{$message} .= "; TLK:sndlen=$sndlen" - if (defined $sndlen && $sndlen != 0); - } - } else { - print STDERR "Missing message? ID: $count\n"; - } - } - $count++; - } -} - -sub msg_write { - my @msgids; - if (%count) - { - @msgids = sort { $count{$a} <=> $count{$b} } keys %count; - } - else - { - @msgids = @messages_sorted; - } - for my $message (@msgids) - { - my $offsetlines = 1; - my $context = undef; - $offsetlines++ if $message =~ /%/; - if (defined ($comments{$message})) - { - while ($comments{$message} =~ m/\n/g) - { - $offsetlines++; - } - } - print OUT "# ".($loc{$message} - $offsetlines). " \"$FILE\"\n" - if defined $loc{$message}; - print OUT "/* ".$comments{$message}." */\n" - if defined $comments{$message}; - print OUT "/* xgettext:no-c-format */\n" if $message =~ /%/; - - if ($message =~ /(.*)\004(.*)/s) { - $context = $1; - $message = $2; - } - my @lines = split (/\n/, $message, -1); - for (my $n = 0; $n < @lines; $n++) - { - if ($n == 0) - { - if (defined $context) - { - if ($NOMSGCTXT_ARG) - { - print OUT "char *s = N_(\"", $context, "|"; - } - else - { - print OUT "char *s = C_(\"", $context, "\", \""; - } - } - else - { - print OUT "char *s = N_(\""; - } - } - else - { - print OUT " \""; - } - - print OUT escape($lines[$n]); - - if ($n < @lines - 1) - { - print OUT "\\n\"\n"; - } - else - { - print OUT "\");\n"; - } - } - } -} - diff --git a/.flatpak-builder/cache/objects/36/2fe1fb0adc76f787e858284a23507b8c47bf83844300ed14bd1403d2199185.file b/.flatpak-builder/cache/objects/36/2fe1fb0adc76f787e858284a23507b8c47bf83844300ed14bd1403d2199185.file deleted file mode 100644 index 6ee06a9..0000000 --- a/.flatpak-builder/cache/objects/36/2fe1fb0adc76f787e858284a23507b8c47bf83844300ed14bd1403d2199185.file +++ /dev/null @@ -1,363 +0,0 @@ -/*-*- Mode: C; c-basic-offset: 8 -*-*/ - -/*** - This file is part of libcanberra. - - Copyright 2008 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 - . -***/ - -#ifdef HAVE_CONFIG_H -#include -#endif - -#include "driver.h" -#include "llist.h" -#include "malloc.h" -#include "common.h" -#include "driver-order.h" - -struct backend { - CA_LLIST_FIELDS(struct backend); - ca_context *context; -}; - -struct private { - ca_context *context; - CA_LLIST_HEAD(struct backend, backends); -}; - -#define PRIVATE(c) ((struct private *) ((c)->private)) - -static int add_backend(struct private *p, const char *name) { - struct backend *b, *last; - int ret; - - ca_assert(p); - ca_assert(name); - - if (ca_streq(name, "multi")) - return CA_ERROR_NOTAVAILABLE; - - for (b = p->backends; b; b = b->next) - if (ca_streq(b->context->driver, name)) - return CA_ERROR_NOTAVAILABLE; - - if (!(b = ca_new0(struct backend, 1))) - return CA_ERROR_OOM; - - if ((ret = ca_context_create(&b->context)) < 0) - goto fail; - - if ((ret = ca_context_change_props_full(b->context, p->context->props)) < 0) - goto fail; - - if ((ret = ca_context_set_driver(b->context, name)) < 0) - goto fail; - - if ((ret = ca_context_open(b->context)) < 0) - goto fail; - - for (last = p->backends; last; last = last->next) - if (!last->next) - break; - - CA_LLIST_INSERT_AFTER(struct backend, p->backends, last, b); - - return CA_SUCCESS; - -fail: - - if (b->context) - ca_context_destroy(b->context); - - ca_free(b); - - return ret; -} - -static int remove_backend(struct private *p, struct backend *b) { - int ret; - - ca_assert(p); - ca_assert(b); - - ret = ca_context_destroy(b->context); - CA_LLIST_REMOVE(struct backend, p->backends, b); - ca_free(b); - - return ret; -} - -int driver_open(ca_context *c) { - struct private *p; - int ret = CA_SUCCESS; - - ca_return_val_if_fail(c, CA_ERROR_INVALID); - ca_return_val_if_fail(c->driver, CA_ERROR_NODRIVER); - ca_return_val_if_fail(!strncmp(c->driver, "multi", 5), CA_ERROR_NODRIVER); - ca_return_val_if_fail(!PRIVATE(c), CA_ERROR_STATE); - - if (!(c->private = p = ca_new0(struct private, 1))) - return CA_ERROR_OOM; - - p->context = c; - - if (c->driver) { - char *e, *k; - - if (!(e = ca_strdup(c->driver))) { - driver_destroy(c); - return CA_ERROR_OOM; - } - - k = e; - for (;;) { - size_t n; - ca_bool_t last; - - n = strcspn(k, ",:"); - last = k[n] == 0; - k[n] = 0; - - if (n > 0) { - int r; - - r = add_backend(p, k); - - if (ret == CA_SUCCESS) - ret = r; - } - - if (last) - break; - - k += n+1 ; - } - - ca_free(e); - - } else { - - const char *const *e; - - for (e = ca_driver_order; *e; e++) { - int r; - - r = add_backend(p, *e); - - /* We return the error code of the first module that fails only */ - if (ret == CA_SUCCESS) - ret = r; - } - } - - if (!p->backends) { - driver_destroy(c); - return ret == CA_SUCCESS ? CA_ERROR_NODRIVER : ret; - } - - return CA_SUCCESS; -} - - -int driver_destroy(ca_context *c) { - int ret = CA_SUCCESS; - struct private *p; - - ca_return_val_if_fail(c, CA_ERROR_INVALID); - ca_return_val_if_fail(c->private, CA_ERROR_STATE); - - p = PRIVATE(c); - - while (p->backends) { - int r; - - r = remove_backend(p, p->backends); - - if (ret == CA_SUCCESS) - ret = r; - } - - ca_free(p); - - c->private = NULL; - - return ret; -} - -int driver_change_device(ca_context *c, const char *device) { - ca_return_val_if_fail(c, CA_ERROR_INVALID); - ca_return_val_if_fail(c->private, CA_ERROR_STATE); - - return CA_ERROR_NOTSUPPORTED; -} - -int driver_change_props(ca_context *c, ca_proplist *changed, ca_proplist *merged) { - int ret = CA_SUCCESS; - struct private *p; - struct backend *b; - - ca_return_val_if_fail(c, CA_ERROR_INVALID); - ca_return_val_if_fail(changed, CA_ERROR_INVALID); - ca_return_val_if_fail(merged, CA_ERROR_INVALID); - ca_return_val_if_fail(c->private, CA_ERROR_STATE); - - p = PRIVATE(c); - - for (b = p->backends; b; b = b->next) { - int r; - - r = ca_context_change_props_full(b->context, changed); - - /* We only return the first failure */ - if (ret == CA_SUCCESS) - ret = r; - } - - return ret; -} - -struct closure { - ca_context *context; - ca_finish_callback_t callback; - void *userdata; -}; - -static void call_closure(ca_context *c, uint32_t id, int error_code, void *userdata) { - struct closure *closure = userdata; - - closure->callback(closure->context, id, error_code, closure->userdata); - ca_free(closure); -} - -int driver_play(ca_context *c, uint32_t id, ca_proplist *proplist, ca_finish_callback_t cb, void *userdata) { - int ret = CA_SUCCESS; - struct private *p; - struct backend *b; - struct closure *closure; - - ca_return_val_if_fail(c, CA_ERROR_INVALID); - ca_return_val_if_fail(proplist, CA_ERROR_INVALID); - ca_return_val_if_fail(!userdata || cb, CA_ERROR_INVALID); - ca_return_val_if_fail(c->private, CA_ERROR_STATE); - - p = PRIVATE(c); - - if (cb) { - if (!(closure = ca_new(struct closure, 1))) - return CA_ERROR_OOM; - - closure->context = c; - closure->callback = cb; - closure->userdata = userdata; - } else - closure = NULL; - - /* The first backend that can play this, takes it */ - for (b = p->backends; b; b = b->next) { - int r; - - if ((r = ca_context_play_full(b->context, id, proplist, closure ? call_closure : NULL, closure)) == CA_SUCCESS) - return r; - - /* We only return the first failure */ - if (ret == CA_SUCCESS) - ret = r; - } - - ca_free(closure); - - return ret; -} - -int driver_cancel(ca_context *c, uint32_t id) { - int ret = CA_SUCCESS; - struct private *p; - struct backend *b; - - ca_return_val_if_fail(c, CA_ERROR_INVALID); - ca_return_val_if_fail(c->private, CA_ERROR_STATE); - - p = PRIVATE(c); - - for (b = p->backends; b; b = b->next) { - int r; - - r = ca_context_cancel(b->context, id); - - /* We only return the first failure */ - if (ret == CA_SUCCESS) - ret = r; - } - - return ret; -} - -int driver_cache(ca_context *c, ca_proplist *proplist) { - int ret = CA_SUCCESS; - struct private *p; - struct backend *b; - - ca_return_val_if_fail(c, CA_ERROR_INVALID); - ca_return_val_if_fail(proplist, CA_ERROR_INVALID); - ca_return_val_if_fail(c->private, CA_ERROR_STATE); - - p = PRIVATE(c); - - /* The first backend that can cache this, takes it */ - for (b = p->backends; b; b = b->next) { - int r; - - if ((r = ca_context_cache_full(b->context, proplist)) == CA_SUCCESS) - return r; - - /* We only return the first failure */ - if (ret == CA_SUCCESS) - ret = r; - } - - return ret; -} - -int driver_playing(ca_context *c, uint32_t id, int *playing) { - int ret = CA_SUCCESS; - struct private *p; - struct backend *b; - - ca_return_val_if_fail(c, CA_ERROR_INVALID); - ca_return_val_if_fail(playing, CA_ERROR_INVALID); - ca_return_val_if_fail(c->private, CA_ERROR_STATE); - - p = PRIVATE(c); - - *playing = 0; - - for (b = p->backends; b; b = b->next) { - int r, _playing = 0; - - r = ca_context_playing(b->context, id, &_playing); - - /* We only return the first failure */ - if (ret == CA_SUCCESS) - ret = r; - - if (_playing) - *playing = 1; - } - - return ret; -} diff --git a/.flatpak-builder/cache/objects/39/741efefb7e39c766799d24a7a1beddd4c00bc709c6c630c21992699efddae3.file b/.flatpak-builder/cache/objects/39/741efefb7e39c766799d24a7a1beddd4c00bc709c6c630c21992699efddae3.file deleted file mode 100755 index b2efabf..0000000 Binary files a/.flatpak-builder/cache/objects/39/741efefb7e39c766799d24a7a1beddd4c00bc709c6c630c21992699efddae3.file and /dev/null differ diff --git a/.flatpak-builder/cache/objects/39/88db6545d4758ae05a624bb42ffa67b5606c4a6414d652edfafba71a7cf188.file b/.flatpak-builder/cache/objects/39/88db6545d4758ae05a624bb42ffa67b5606c4a6414d652edfafba71a7cf188.file deleted file mode 120000 index 23eeced..0000000 --- a/.flatpak-builder/cache/objects/39/88db6545d4758ae05a624bb42ffa67b5606c4a6414d652edfafba71a7cf188.file +++ /dev/null @@ -1 +0,0 @@ -libcanberra.so.0.2.5 \ No newline at end of file diff --git a/.flatpak-builder/cache/objects/39/9df962366c831c6af1662cfac320df6be253bd02b4d8d7a5fabdf4bebb7974.file b/.flatpak-builder/cache/objects/39/9df962366c831c6af1662cfac320df6be253bd02b4d8d7a5fabdf4bebb7974.file deleted file mode 100644 index 80a087b..0000000 --- a/.flatpak-builder/cache/objects/39/9df962366c831c6af1662cfac320df6be253bd02b4d8d7a5fabdf4bebb7974.file +++ /dev/null @@ -1,6 +0,0 @@ -[GTK Module] -Name=canberra-gtk-module -Description=Event Sound Module -X-GTK-Module-Name=canberra-gtk-module -X-GTK-Module-Enabled-Schema=org.gnome.desktop.sound -X-GTK-Module-Enabled-Key=event-sounds diff --git a/.flatpak-builder/cache/objects/3b/b2cca34c9b51265aa9dbb7778bc41d4ab30da1726dba9d00aa1a2120c7e9e9.file b/.flatpak-builder/cache/objects/3b/b2cca34c9b51265aa9dbb7778bc41d4ab30da1726dba9d00aa1a2120c7e9e9.file deleted file mode 100755 index fc5e46f..0000000 Binary files a/.flatpak-builder/cache/objects/3b/b2cca34c9b51265aa9dbb7778bc41d4ab30da1726dba9d00aa1a2120c7e9e9.file and /dev/null differ diff --git a/.flatpak-builder/cache/objects/3b/b789aa985183ec31394ab3cf5c1a720d5690395c0d0dba0bb0366efe3395b5.file b/.flatpak-builder/cache/objects/3b/b789aa985183ec31394ab3cf5c1a720d5690395c0d0dba0bb0366efe3395b5.file deleted file mode 100644 index 7d931b7..0000000 Binary files a/.flatpak-builder/cache/objects/3b/b789aa985183ec31394ab3cf5c1a720d5690395c0d0dba0bb0366efe3395b5.file and /dev/null differ diff --git a/.flatpak-builder/cache/objects/3f/0ff3d63ba57273848e19eaa708590f8232835dae375f278ed822d6e90473fe.dirtree b/.flatpak-builder/cache/objects/3f/0ff3d63ba57273848e19eaa708590f8232835dae375f278ed822d6e90473fe.dirtree deleted file mode 100644 index eac01fc..0000000 Binary files a/.flatpak-builder/cache/objects/3f/0ff3d63ba57273848e19eaa708590f8232835dae375f278ed822d6e90473fe.dirtree and /dev/null differ diff --git a/.flatpak-builder/cache/objects/3f/7f5322dd69ba7ba80ea7b02aed10e42ce9ca564cfe078bacb67bfd028d1046.file b/.flatpak-builder/cache/objects/3f/7f5322dd69ba7ba80ea7b02aed10e42ce9ca564cfe078bacb67bfd028d1046.file deleted file mode 100644 index d4db059..0000000 --- a/.flatpak-builder/cache/objects/3f/7f5322dd69ba7ba80ea7b02aed10e42ce9ca564cfe078bacb67bfd028d1046.file +++ /dev/null @@ -1,2 +0,0 @@ -gobject-2.0 -gio-2.0 diff --git a/.flatpak-builder/cache/objects/40/5f203e5b56ef569fe4d37343e1dcbf202ae5f9baa9d16957597a0e59c1db88.dirtree b/.flatpak-builder/cache/objects/40/5f203e5b56ef569fe4d37343e1dcbf202ae5f9baa9d16957597a0e59c1db88.dirtree deleted file mode 100644 index c3a90d2..0000000 Binary files a/.flatpak-builder/cache/objects/40/5f203e5b56ef569fe4d37343e1dcbf202ae5f9baa9d16957597a0e59c1db88.dirtree and /dev/null differ diff --git a/.flatpak-builder/cache/objects/41/0b6b677af2e56c461d47b0ebdd6539d3fc022df431bb793a91390ecd53c1b9.file b/.flatpak-builder/cache/objects/41/0b6b677af2e56c461d47b0ebdd6539d3fc022df431bb793a91390ecd53c1b9.file deleted file mode 100644 index 67791f0..0000000 --- a/.flatpak-builder/cache/objects/41/0b6b677af2e56c461d47b0ebdd6539d3fc022df431bb793a91390ecd53c1b9.file +++ /dev/null @@ -1,990 +0,0 @@ -/*-*- Mode: C; c-basic-offset: 8 -*-*/ - -/*** - This file is part of libcanberra. - - Copyright 2008 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 - . -***/ - -#ifdef HAVE_CONFIG_H -#include -#endif - -#include -#include -#include - -#include "canberra-gtk.h" - -typedef struct { - guint signal_id; - gboolean arg1_is_set; - GObject *object; - GValue arg1; - GdkEvent *event; -} SoundEventData; - -/* - We generate these sounds: - - dialog-error - dialog-warning - dialog-information - dialog-question - window-new - window-close - window-minimized - window-unminimized - window-maximized - window-unmaximized - notebook-tab-changed - dialog-ok - dialog-cancel - item-selected - link-pressed - link-released - button-pressed - button-released - menu-click - button-toggle-on - button-toggle-off - menu-popup - menu-popdown - menu-replace - tooltip-popup - tooltip-popdown - drag-start - drag-accept - drag-fail - expander-toggle-on - expander-toggle-off - - TODO: - scroll-xxx - window-switch - window-resize-xxx - window-move-xxx - -*/ - -static gboolean disabled = FALSE; - -static GQueue sound_event_queue = G_QUEUE_INIT; - -static guint idle_id = 0; - -static guint - signal_id_dialog_response, - signal_id_widget_show, - signal_id_widget_hide, - signal_id_check_menu_item_toggled, - signal_id_menu_item_activate, - signal_id_toggle_button_toggled, - signal_id_button_pressed, - signal_id_button_released, - signal_id_widget_window_state_event, - signal_id_notebook_switch_page, - signal_id_tree_view_cursor_changed, - signal_id_icon_view_selection_changed, - signal_id_widget_drag_begin, - signal_id_widget_drag_failed, - signal_id_widget_drag_drop, - signal_id_expander_activate; - -static GQuark - disable_sound_quark, - was_iconized_quark, - is_xembed_quark; - -/* Make sure GCC doesn't warn us about a missing prototype for this - * exported function */ -void gtk_module_init(gint *argc, gchar ***argv[]); - -static const char *translate_message_tye(GtkMessageType mt) { - static const char *const message_type_table[] = { - [GTK_MESSAGE_INFO] = "dialog-information", - [GTK_MESSAGE_WARNING] = "dialog-warning", - [GTK_MESSAGE_QUESTION] = "dialog-question", - [GTK_MESSAGE_ERROR] = "dialog-error", - [GTK_MESSAGE_OTHER] = NULL - }; - - if (mt >= G_N_ELEMENTS(message_type_table)) - return NULL; - - return message_type_table[mt]; -} - -static const char *translate_response(int response) { - static const char *const response_table[] = { - [-GTK_RESPONSE_NONE] = NULL, - [-GTK_RESPONSE_REJECT] = "dialog-cancel", - [-GTK_RESPONSE_DELETE_EVENT] = "dialog-cancel", - [-GTK_RESPONSE_ACCEPT] = "dialog-ok", - [-GTK_RESPONSE_OK] = "dialog-ok", - [-GTK_RESPONSE_CANCEL] = "dialog-cancel", - [-GTK_RESPONSE_CLOSE] = "dialog-ok", - [-GTK_RESPONSE_YES] = "dialog-ok", - [-GTK_RESPONSE_NO] = "dialog-cancel", - [-GTK_RESPONSE_APPLY] = "dialog-ok", - [-GTK_RESPONSE_HELP] = NULL, - }; - - if (response >= 0) - return NULL; - - if ((unsigned) -response >= G_N_ELEMENTS(response_table)) - return NULL; - - return response_table[-response]; -} - -static gboolean is_child_of_combo_box(GtkWidget *w) { - - while (w) { - - if (GTK_IS_COMBO_BOX(w)) - return TRUE; - - w = gtk_widget_get_parent(w); - } - - return FALSE; -} - -static GtkDialog* find_parent_dialog(GtkWidget *w) { - - while (w) { - - if (GTK_IS_DIALOG(w)) - return GTK_DIALOG(w); - - w = gtk_widget_get_parent(w); - } - - return NULL; -} - -static void free_sound_event(SoundEventData *d) { - - g_object_unref(d->object); - - if (d->arg1_is_set) - g_value_unset(&d->arg1); - - if (d->event) - gdk_event_free(d->event); - - g_slice_free(SoundEventData, d); -} - -static gboolean is_menu_hint(GdkWindowTypeHint hint) { - return - hint == GDK_WINDOW_TYPE_HINT_POPUP_MENU || - hint == GDK_WINDOW_TYPE_HINT_DROPDOWN_MENU || - hint == GDK_WINDOW_TYPE_HINT_MENU; -} - -static SoundEventData* filter_sound_event(SoundEventData *d) { - GList *i, *n; - - do { - - for (i = sound_event_queue.head; i; i = n) { - SoundEventData *j; - - j = i->data; - n = i->next; - - if (d->object == j->object) { - - /* Let's drop a show event immediately followed by a - * hide event */ - - if (d->signal_id == signal_id_widget_show && - j->signal_id == signal_id_widget_hide) { - - free_sound_event(d); - free_sound_event(j); - g_queue_delete_link(&sound_event_queue, i); - - return NULL; - } - - /* Let's drop widget hide events in favour of dialog - * response. - * - * Let's drop widget window state events in favour of - * widget hide/show. - * - * Let's drop double events */ - - if ((d->signal_id == signal_id_widget_hide && - j->signal_id == signal_id_dialog_response) || - - (d->signal_id == signal_id_widget_window_state_event && - j->signal_id == signal_id_widget_hide) || - - (d->signal_id == signal_id_widget_window_state_event && - j->signal_id == signal_id_widget_show)) { - - free_sound_event(d); - d = j; - g_queue_delete_link(&sound_event_queue, i); - break; - } - - if ((d->signal_id == signal_id_dialog_response && - j->signal_id == signal_id_widget_hide) || - - (d->signal_id == signal_id_widget_show && - j->signal_id == signal_id_widget_window_state_event) || - - (d->signal_id == signal_id_widget_hide && - j->signal_id == signal_id_widget_window_state_event) || - - (d->signal_id == j->signal_id)) { - - free_sound_event(j); - g_queue_delete_link(&sound_event_queue, i); - } - - } else if (GTK_IS_WINDOW(d->object) && GTK_IS_WINDOW(j->object)) { - - GdkWindowTypeHint dhint, jhint; - - dhint = gtk_window_get_type_hint(GTK_WINDOW(d->object)); - jhint = gtk_window_get_type_hint(GTK_WINDOW(j->object)); - - if (is_menu_hint(dhint) && is_menu_hint(jhint)) { - - if (d->signal_id == signal_id_widget_hide && - j->signal_id == signal_id_widget_show) { - free_sound_event(d); - d = j; - g_queue_delete_link(&sound_event_queue, i); - break; - } - - if (d->signal_id == signal_id_widget_show && - j->signal_id == signal_id_widget_hide) { - - free_sound_event(j); - g_queue_delete_link(&sound_event_queue, i); - } - } - } - } - - /* If we exited the iteration early, let's retry. */ - - } while (i); - - /* FIXME: Filter menu hide on menu show */ - - return d; -} - -static gint window_get_desktop(GdkDisplay *d, GdkWindow *w) { - Atom type_return; - gint format_return; - gulong nitems_return; - gulong bytes_after_return; - guchar *data = NULL; - gint ret = -1; - - if (XGetWindowProperty(GDK_DISPLAY_XDISPLAY(d), GDK_WINDOW_XID(w), - gdk_x11_get_xatom_by_name_for_display(d, "_NET_WM_DESKTOP"), - 0, G_MAXLONG, False, XA_CARDINAL, &type_return, - &format_return, &nitems_return, &bytes_after_return, - &data) != Success) - return -1; - - if (type_return == XA_CARDINAL && format_return == 32 && data) { - guint32 desktop = *(guint32*) data; - - if (desktop != 0xFFFFFFFF) - ret = (gint) desktop; - } - - if (type_return != None && data != NULL) - XFree(data); - - return ret; -} - -static gint display_get_desktop(GdkDisplay *d) { - Atom type_return; - gint format_return; - gulong nitems_return; - gulong bytes_after_return; - guchar *data = NULL; - gint ret = -1; - - if (XGetWindowProperty(GDK_DISPLAY_XDISPLAY(d), DefaultRootWindow(GDK_DISPLAY_XDISPLAY(d)), - gdk_x11_get_xatom_by_name_for_display(d, "_NET_CURRENT_DESKTOP"), - 0, G_MAXLONG, False, XA_CARDINAL, &type_return, - &format_return, &nitems_return, &bytes_after_return, - &data) != Success) - return -1; - - if (type_return == XA_CARDINAL && format_return == 32 && data) { - - guint32 desktop = *(guint32*) data; - - if (desktop != 0xFFFFFFFF) - ret = (gint) desktop; - } - - if (type_return != None && data != NULL) - XFree(data); - - return ret; -} - -static gboolean window_is_xembed(GdkDisplay *d, GdkWindow *w) { - Atom type_return; - gint format_return; - gulong nitems_return; - gulong bytes_after_return; - guchar *data = NULL; - gboolean ret = FALSE; - Atom xembed; - - /* Gnome Panel applets are XEMBED windows. We need to make sure we - * ignore them */ - - xembed = gdk_x11_get_xatom_by_name_for_display(d, "_XEMBED_INFO"); - - /* be robust against not existing XIDs (LP: #834403) */ - gdk_error_trap_push(); - if (XGetWindowProperty(GDK_DISPLAY_XDISPLAY(d), GDK_WINDOW_XID(w), - xembed, - 0, 2, False, xembed, &type_return, - &format_return, &nitems_return, &bytes_after_return, - &data) != Success) { - return FALSE; - } - -#if GTK_CHECK_VERSION(3,0,0) - gdk_error_trap_pop_ignored(); -#else - gdk_flush(); - gdk_error_trap_pop(); -#endif - - if (type_return == xembed && format_return == 32 && data) - ret = TRUE; - - if (type_return != None && data != NULL) - XFree(data); - - return ret; -} - -static void dispatch_sound_event(SoundEventData *d) { - int ret = CA_SUCCESS; - static gboolean menu_is_popped_up = FALSE; - - if (g_object_get_qdata(d->object, disable_sound_quark)) - return; - - /* The GdkWindow of the the widget might have changed while this - * event was queued for us. Make sure to update it from the - * current one if necessary. */ - if (d->event && d->event->any.window) { - GdkWindow *window; - - g_object_unref(G_OBJECT(d->event->any.window)); - - if ((window = gtk_widget_get_window(GTK_WIDGET(d->object)))) - d->event->any.window = GDK_WINDOW(g_object_ref(G_OBJECT(window))); - else - d->event->any.window = NULL; - } - - if (d->signal_id == signal_id_widget_show) { - GdkWindowTypeHint hint; - - /* Show/hide signals for non-windows have already been filtered out - * by the emission hook! */ - - hint = gtk_window_get_type_hint(GTK_WINDOW(d->object)); - - if (is_menu_hint(hint)) { - - if (!menu_is_popped_up) { - - ret = ca_gtk_play_for_widget(GTK_WIDGET(d->object), 0, - CA_PROP_EVENT_ID, "menu-popup", - CA_PROP_EVENT_DESCRIPTION, "Menu popped up", - CA_PROP_CANBERRA_CACHE_CONTROL, "permanent", - NULL); - } else { - ret = ca_gtk_play_for_widget(GTK_WIDGET(d->object), 0, - CA_PROP_EVENT_ID, "menu-replace", - CA_PROP_EVENT_DESCRIPTION, "Menu replaced", - CA_PROP_CANBERRA_CACHE_CONTROL, "permanent", - NULL); - } - - menu_is_popped_up = TRUE; - - } else if (hint == GDK_WINDOW_TYPE_HINT_TOOLTIP) { - - ret = ca_gtk_play_for_widget(GTK_WIDGET(d->object), 0, - CA_PROP_EVENT_ID, "tooltip-popup", - CA_PROP_EVENT_DESCRIPTION, "Tooltip popped up", - CA_PROP_CANBERRA_CACHE_CONTROL, "permanent", - NULL); - - } else if (hint == GDK_WINDOW_TYPE_HINT_NORMAL || - hint == GDK_WINDOW_TYPE_HINT_DIALOG) { - - gboolean played_sound = FALSE; - gboolean is_xembed; - - is_xembed = - gtk_widget_get_realized(GTK_WIDGET(d->object)) && - window_is_xembed( - gtk_widget_get_display(GTK_WIDGET(d->object)), - gtk_widget_get_window(GTK_WIDGET(d->object))); - - g_object_set_qdata(d->object, is_xembed_quark, GINT_TO_POINTER(is_xembed)); - - if (GTK_IS_MESSAGE_DIALOG(d->object)) { - GtkMessageType mt; - const char *id; - - g_object_get(d->object, "message_type", &mt, NULL); - - if ((id = translate_message_tye(mt))) { - - ret = ca_gtk_play_for_widget(GTK_WIDGET(d->object), 0, - CA_PROP_EVENT_ID, id, - CA_PROP_EVENT_DESCRIPTION, "Message dialog shown", - CA_PROP_CANBERRA_CACHE_CONTROL, "permanent", - NULL); - played_sound = TRUE; - } - - } - - if (!played_sound && - !is_xembed && - gtk_window_get_decorated(GTK_WINDOW(d->object))) { - - ret = ca_gtk_play_for_widget(GTK_WIDGET(d->object), 0, - CA_PROP_EVENT_ID, "window-new", - CA_PROP_EVENT_DESCRIPTION, "Window shown", - CA_PROP_CANBERRA_CACHE_CONTROL, "permanent", - NULL); - - } - } - } - - if (GTK_IS_DIALOG(d->object) && d->signal_id == signal_id_dialog_response) { - - int response; - const char *id; - - response = g_value_get_int(&d->arg1); - - if ((id = translate_response(response))) { - - ret = ca_gtk_play_for_widget(GTK_WIDGET(d->object), 0, - CA_PROP_EVENT_ID, id, - CA_PROP_EVENT_DESCRIPTION, "Dialog closed", - CA_PROP_CANBERRA_CACHE_CONTROL, "permanent", - NULL); - } else { - ret = ca_gtk_play_for_widget(GTK_WIDGET(d->object), 0, - CA_PROP_EVENT_ID, "window-close", - CA_PROP_EVENT_DESCRIPTION, "Window closed", - CA_PROP_CANBERRA_CACHE_CONTROL, "permanent", - NULL); - } - - } else if (d->signal_id == signal_id_widget_hide) { - GdkWindowTypeHint hint; - - hint = gtk_window_get_type_hint(GTK_WINDOW(d->object)); - - if (is_menu_hint(hint)) { - - if (GTK_IS_MENU(gtk_bin_get_child(GTK_BIN(d->object)))) { - - ret = ca_gtk_play_for_widget(GTK_WIDGET(d->object), 0, - CA_PROP_EVENT_ID, "menu-popdown", - CA_PROP_EVENT_DESCRIPTION, "Menu popped down", - CA_PROP_CANBERRA_CACHE_CONTROL, "permanent", - NULL); - } - - menu_is_popped_up = FALSE; - - } else if (hint == GDK_WINDOW_TYPE_HINT_TOOLTIP) { - - ret = ca_gtk_play_for_widget(GTK_WIDGET(d->object), 0, - CA_PROP_EVENT_ID, "tooltip-popdown", - CA_PROP_EVENT_DESCRIPTION, "Tooltip popped down", - CA_PROP_CANBERRA_CACHE_CONTROL, "permanent", - NULL); - - } else if ((hint == GDK_WINDOW_TYPE_HINT_NORMAL || - hint == GDK_WINDOW_TYPE_HINT_DIALOG)) { - - gboolean is_xembed; - - is_xembed = !!g_object_get_qdata(d->object, is_xembed_quark); - - if (!is_xembed && - gtk_window_get_decorated(GTK_WINDOW(d->object))) - ret = ca_gtk_play_for_widget(GTK_WIDGET(d->object), 0, - CA_PROP_EVENT_ID, "window-close", - CA_PROP_EVENT_DESCRIPTION, "Window closed", - CA_PROP_CANBERRA_CACHE_CONTROL, "permanent", - NULL); - } - } - - if (GTK_IS_WINDOW(d->object) && d->signal_id == signal_id_widget_window_state_event) { - GdkEventWindowState *e; - gint w_desktop = -1, c_desktop = -1; - - e = (GdkEventWindowState*) d->event; - - /* Unfortunately GDK_WINDOW_STATE_ICONIFIED is used both for - * proper minimizing and when a window becomes invisible - * because the desktop was switched. To handle this we check - * if the window becoming invisible is actually on the current - * desktop, and only if that's the case we assume it is being - * minimized. We then store this information, so that we know - * later on when the window is unminimized again. */ - - if (gtk_widget_get_realized(GTK_WIDGET(d->object))) { - GdkDisplay *display; - - display = gtk_widget_get_display(GTK_WIDGET(d->object)); - w_desktop = window_get_desktop(display, gtk_widget_get_window(GTK_WIDGET(d->object))); - c_desktop = display_get_desktop(display); - } - - if ((e->changed_mask & GDK_WINDOW_STATE_ICONIFIED) && - (e->new_window_state & GDK_WINDOW_STATE_ICONIFIED) && - (w_desktop == c_desktop || w_desktop < 0)) { - - ret = ca_gtk_play_for_widget(GTK_WIDGET(d->object), 0, - CA_PROP_EVENT_ID, "window-minimized", - CA_PROP_EVENT_DESCRIPTION, "Window minimized", - CA_PROP_CANBERRA_CACHE_CONTROL, "permanent", - NULL); - - g_object_set_qdata(d->object, was_iconized_quark, GINT_TO_POINTER(1)); - - } else if ((e->changed_mask & (GDK_WINDOW_STATE_MAXIMIZED|GDK_WINDOW_STATE_FULLSCREEN)) && - (e->new_window_state & (GDK_WINDOW_STATE_MAXIMIZED|GDK_WINDOW_STATE_FULLSCREEN))) { - - ret = ca_gtk_play_for_widget(GTK_WIDGET(d->object), 0, - CA_PROP_EVENT_ID, "window-maximized", - CA_PROP_EVENT_DESCRIPTION, "Window maximized", - CA_PROP_CANBERRA_CACHE_CONTROL, "permanent", - NULL); - - g_object_set_qdata(d->object, was_iconized_quark, GINT_TO_POINTER(0)); - - } else if ((e->changed_mask & GDK_WINDOW_STATE_ICONIFIED) && - !(e->new_window_state & GDK_WINDOW_STATE_ICONIFIED) && - g_object_get_qdata(d->object, was_iconized_quark)) { - - ret = ca_gtk_play_for_widget(GTK_WIDGET(d->object), 0, - CA_PROP_EVENT_ID, "window-unminimized", - CA_PROP_EVENT_DESCRIPTION, "Window unminimized", - CA_PROP_CANBERRA_CACHE_CONTROL, "permanent", - NULL); - - g_object_set_qdata(d->object, was_iconized_quark, GINT_TO_POINTER(0)); - - } else if ((e->changed_mask & (GDK_WINDOW_STATE_MAXIMIZED|GDK_WINDOW_STATE_FULLSCREEN)) && - !(e->new_window_state & (GDK_WINDOW_STATE_MAXIMIZED|GDK_WINDOW_STATE_FULLSCREEN))) { - - ret = ca_gtk_play_for_widget(GTK_WIDGET(d->object), 0, - CA_PROP_EVENT_ID, "window-unmaximized", - CA_PROP_EVENT_DESCRIPTION, "Window unmaximized", - CA_PROP_CANBERRA_CACHE_CONTROL, "permanent", - NULL); - } - } - - if (GTK_IS_CHECK_MENU_ITEM(d->object) && d->signal_id == signal_id_check_menu_item_toggled) { - - if (gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(d->object))) - ret = ca_gtk_play_for_event(d->event, 0, - CA_PROP_EVENT_ID, "button-toggle-on", - CA_PROP_EVENT_DESCRIPTION, "Check menu item checked", - CA_PROP_CANBERRA_CACHE_CONTROL, "permanent", - NULL); - else - ret = ca_gtk_play_for_event(d->event, 0, - CA_PROP_EVENT_ID, "button-toggle-off", - CA_PROP_EVENT_DESCRIPTION, "Check menu item unchecked", - CA_PROP_CANBERRA_CACHE_CONTROL, "permanent", - NULL); - - } else if (GTK_IS_MENU_ITEM(d->object) && d->signal_id == signal_id_menu_item_activate) { - - if (!gtk_menu_item_get_submenu(GTK_MENU_ITEM(d->object))) - ret = ca_gtk_play_for_event(d->event, 0, - CA_PROP_EVENT_ID, "menu-click", - CA_PROP_EVENT_DESCRIPTION, "Menu item clicked", - CA_PROP_CANBERRA_CACHE_CONTROL, "permanent", - NULL); - } - - if (GTK_IS_TOGGLE_BUTTON(d->object)) { - - if (d->signal_id == signal_id_toggle_button_toggled) { - - if (!is_child_of_combo_box(GTK_WIDGET(d->object))) { - - /* We don't want to play this sound if this is a toggle - * button belonging to combo box. */ - - if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(d->object))) - ret = ca_gtk_play_for_event(d->event, 0, - CA_PROP_EVENT_ID, "button-toggle-on", - CA_PROP_EVENT_DESCRIPTION, "Toggle button checked", - CA_PROP_CANBERRA_CACHE_CONTROL, "permanent", - NULL); - else - ret = ca_gtk_play_for_event(d->event, 0, - CA_PROP_EVENT_ID, "button-toggle-off", - CA_PROP_EVENT_DESCRIPTION, "Toggle button unchecked", - CA_PROP_CANBERRA_CACHE_CONTROL, "permanent", - NULL); - } - } - - } else if (GTK_IS_LINK_BUTTON(d->object)) { - - if (d->signal_id == signal_id_button_pressed) { - ret = ca_gtk_play_for_event(d->event, 0, - CA_PROP_EVENT_ID, "link-pressed", - CA_PROP_EVENT_DESCRIPTION, "Link pressed", - CA_PROP_CANBERRA_CACHE_CONTROL, "permanent", - NULL); - - } else if (d->signal_id == signal_id_button_released) { - - ret = ca_gtk_play_for_event(d->event, 0, - CA_PROP_EVENT_ID, "link-released", - CA_PROP_EVENT_DESCRIPTION, "Link released", - CA_PROP_CANBERRA_CACHE_CONTROL, "permanent", - NULL); - } - - } else if (GTK_IS_BUTTON(d->object) && !GTK_IS_TOGGLE_BUTTON(d->object)) { - - if (d->signal_id == signal_id_button_pressed) { - ret = ca_gtk_play_for_event(d->event, 0, - CA_PROP_EVENT_ID, "button-pressed", - CA_PROP_EVENT_DESCRIPTION, "Button pressed", - CA_PROP_CANBERRA_CACHE_CONTROL, "permanent", - NULL); - - } else if (d->signal_id == signal_id_button_released) { - GtkDialog *dialog; - gboolean dont_play = FALSE; - - if ((dialog = find_parent_dialog(GTK_WIDGET(d->object)))) { - int response; - - /* Don't play the click sound if this is a response widget - * we will generate a dialog-xxx event sound anyway. */ - - response = gtk_dialog_get_response_for_widget(dialog, GTK_WIDGET(d->object)); - dont_play = !!translate_response(response); - } - - if (!dont_play) - ret = ca_gtk_play_for_event(d->event, 0, - CA_PROP_EVENT_ID, "button-released", - CA_PROP_EVENT_DESCRIPTION, "Button released", - CA_PROP_CANBERRA_CACHE_CONTROL, "permanent", - NULL); - } - } - - if (GTK_IS_NOTEBOOK(d->object) && d->signal_id == signal_id_notebook_switch_page) { - ret = ca_gtk_play_for_event(d->event, 0, - CA_PROP_EVENT_ID, "notebook-tab-changed", - CA_PROP_EVENT_DESCRIPTION, "Tab changed", - CA_PROP_CANBERRA_CACHE_CONTROL, "permanent", - NULL); - goto finish; - } - - if (GTK_IS_TREE_VIEW(d->object) && d->signal_id == signal_id_tree_view_cursor_changed) { - ret = ca_gtk_play_for_event(d->event, 0, - CA_PROP_EVENT_ID, "item-selected", - CA_PROP_EVENT_DESCRIPTION, "Item selected", - CA_PROP_CANBERRA_CACHE_CONTROL, "permanent", - NULL); - goto finish; - } - - if (GTK_IS_ICON_VIEW(d->object) && d->signal_id == signal_id_icon_view_selection_changed) { - ret = ca_gtk_play_for_event(d->event, 0, - CA_PROP_EVENT_ID, "item-selected", - CA_PROP_EVENT_DESCRIPTION, "Item selected", - CA_PROP_CANBERRA_CACHE_CONTROL, "permanent", - NULL); - goto finish; - } - - if (GTK_IS_EXPANDER(d->object) && d->signal_id == signal_id_expander_activate) { - - if (gtk_expander_get_expanded(GTK_EXPANDER(d->object))) - ret = ca_gtk_play_for_event(d->event, 0, - CA_PROP_EVENT_ID, "expander-toggle-on", - CA_PROP_EVENT_DESCRIPTION, "Expander expanded", - CA_PROP_CANBERRA_CACHE_CONTROL, "permanent", - NULL); - else - ret = ca_gtk_play_for_event(d->event, 0, - CA_PROP_EVENT_ID, "expander-toggle-off", - CA_PROP_EVENT_DESCRIPTION, "Expander unexpanded", - CA_PROP_CANBERRA_CACHE_CONTROL, "permanent", - NULL); - - goto finish; - } - - if (GTK_IS_WIDGET(d->object)) { - - if (d->signal_id == signal_id_widget_drag_begin) { - - ret = ca_gtk_play_for_event(d->event, 0, - CA_PROP_EVENT_ID, "drag-start", - CA_PROP_EVENT_DESCRIPTION, "Drag started", - CA_PROP_CANBERRA_CACHE_CONTROL, "permanent", - NULL); - goto finish; - - } else if (d->signal_id == signal_id_widget_drag_drop) { - - ret = ca_gtk_play_for_event(d->event, 0, - CA_PROP_EVENT_ID, "drag-accept", - CA_PROP_EVENT_DESCRIPTION, "Drag accepted", - CA_PROP_CANBERRA_CACHE_CONTROL, "permanent", - NULL); - goto finish; - - } else if (d->signal_id == signal_id_widget_drag_failed) { - - ret = ca_gtk_play_for_event(d->event, 0, - CA_PROP_EVENT_ID, "drag-fail", - CA_PROP_EVENT_DESCRIPTION, "Drag failed", - CA_PROP_CANBERRA_CACHE_CONTROL, "permanent", - NULL); - goto finish; - } - } - -finish: - - ; - /* if (ret != CA_SUCCESS) */ - /* g_warning("Failed to play event sound: %s", ca_strerror(ret)); */ -} - -static void dispatch_queue(void) { - SoundEventData *d; - - while ((d = g_queue_pop_head(&sound_event_queue))) { - - if (!(d = filter_sound_event(d))) - continue; - - dispatch_sound_event(d); - free_sound_event(d); - } -} - -static gboolean idle_cb(void *userdata) { - idle_id = 0; - - dispatch_queue(); - - return FALSE; -} - -static void connect_settings(void); - -static gboolean emission_hook_cb(GSignalInvocationHint *hint, guint n_param_values, const GValue *param_values, gpointer data) { - static SoundEventData *d = NULL; - GdkEvent *e; - GObject *object; - - connect_settings(); - - if (disabled) - return TRUE; - - object = g_value_get_object(¶m_values[0]); - - /* g_message("signal '%s' on object of type '%s' with name '%s'", */ - /* g_signal_name(hint->signal_id), */ - /* G_OBJECT_TYPE_NAME(object), */ - /* gtk_widget_get_name(GTK_WIDGET(object))); */ - - /* if (GTK_IS_WINDOW(object)) */ - /* g_message("window role='%s' title='%s' type='%u'", */ - /* gtk_window_get_role(GTK_WINDOW(object)), */ - /* gtk_window_get_title(GTK_WINDOW(object)), */ - /* gtk_window_get_type_hint(GTK_WINDOW(object))); */ - - /* Filter a few very often occuring signals as quickly as possible */ - if ((hint->signal_id == signal_id_widget_hide || - hint->signal_id == signal_id_widget_show || - hint->signal_id == signal_id_widget_window_state_event) && - !GTK_IS_WINDOW(object)) - return TRUE; - - if (hint->signal_id != signal_id_widget_hide && - hint->signal_id != signal_id_dialog_response && - !gtk_widget_is_drawable(GTK_WIDGET (object))) - return TRUE; - - d = g_slice_new0(SoundEventData); - - d->object = g_object_ref(object); - - d->signal_id = hint->signal_id; - - if (d->signal_id == signal_id_widget_window_state_event) { - d->event = gdk_event_copy(g_value_peek_pointer(¶m_values[1])); - } else if ((e = gtk_get_current_event())) - d->event = gdk_event_copy(e); - - if (n_param_values > 1) { - g_value_init(&d->arg1, G_VALUE_TYPE(¶m_values[1])); - g_value_copy(¶m_values[1], &d->arg1); - d->arg1_is_set = TRUE; - } - - g_queue_push_tail(&sound_event_queue, d); - - if (idle_id == 0) - idle_id = gdk_threads_add_idle_full(GDK_PRIORITY_REDRAW-1, (GSourceFunc) idle_cb, NULL, NULL); - - return TRUE; -} - -static void install_hook(GType type, const char *sig, guint *sn) { - GTypeClass *type_class; - - type_class = g_type_class_ref(type); - - *sn = g_signal_lookup(sig, type); - g_signal_add_emission_hook(*sn, 0, emission_hook_cb, NULL, NULL); - - g_type_class_unref(type_class); -} - -static void read_enable_input_feedback_sounds(GtkSettings *s) { - gboolean enabled = !disabled; - - if (g_getenv("CANBERRA_FORCE_INPUT_FEEDBACK_SOUNDS")) - disabled = FALSE; - else { - g_object_get(G_OBJECT(s), "gtk-enable-input-feedback-sounds", &enabled, NULL); - disabled = !enabled; - } -} - -static void enable_input_feedback_sounds_changed(GtkSettings *s, GParamSpec *arg1, gpointer userdata) { - read_enable_input_feedback_sounds(s); -} - -static void connect_settings(void) { - GtkSettings *s; - static gboolean connected = FALSE; - - if (connected) - return; - - if (!(s = gtk_settings_get_default())) - return; - - if (g_object_class_find_property(G_OBJECT_GET_CLASS(s), "gtk-enable-input-feedback-sounds")) { - g_signal_connect(G_OBJECT(s), "notify::gtk-enable-input-feedback-sounds", G_CALLBACK(enable_input_feedback_sounds_changed), NULL); - read_enable_input_feedback_sounds(s); - } else - g_debug("This Gtk+ version doesn't have the GtkSettings::gtk-enable-input-feedback-sounds property."); - - connected = TRUE; -} - -#if GTK_CHECK_VERSION(3,0,0) -#warning "We really need a quit handler in Gtk 3.0, https://bugzilla.gnome.org/show_bug.cgi?id=639770" -#else -static gboolean quit_handler(gpointer data) { - dispatch_queue(); - return FALSE; -} -#endif - -G_MODULE_EXPORT void gtk_module_init(gint *argc, gchar ***argv[]) { - - /* This is the same quark libgnomeui uses! */ - disable_sound_quark = g_quark_from_string("gnome_disable_sound_events"); - was_iconized_quark = g_quark_from_string("canberra_was_iconized"); - is_xembed_quark = g_quark_from_string("canberra_is_xembed"); - - /* Hook up the gtk setting */ - connect_settings(); - - install_hook(GTK_TYPE_WINDOW, "show", &signal_id_widget_show); - install_hook(GTK_TYPE_WINDOW, "hide", &signal_id_widget_hide); - install_hook(GTK_TYPE_DIALOG, "response", &signal_id_dialog_response); - install_hook(GTK_TYPE_MENU_ITEM, "activate", &signal_id_menu_item_activate); - install_hook(GTK_TYPE_CHECK_MENU_ITEM, "toggled", &signal_id_check_menu_item_toggled); - install_hook(GTK_TYPE_TOGGLE_BUTTON, "toggled", &signal_id_toggle_button_toggled); - install_hook(GTK_TYPE_BUTTON, "pressed", &signal_id_button_pressed); - install_hook(GTK_TYPE_BUTTON, "released", &signal_id_button_released); - install_hook(GTK_TYPE_WIDGET, "window-state-event", &signal_id_widget_window_state_event); - install_hook(GTK_TYPE_NOTEBOOK, "switch-page", &signal_id_notebook_switch_page); - install_hook(GTK_TYPE_TREE_VIEW, "cursor-changed", &signal_id_tree_view_cursor_changed); - install_hook(GTK_TYPE_ICON_VIEW, "selection-changed", &signal_id_icon_view_selection_changed); - install_hook(GTK_TYPE_WIDGET, "drag-begin", &signal_id_widget_drag_begin); - install_hook(GTK_TYPE_WIDGET, "drag-drop", &signal_id_widget_drag_drop); - install_hook(GTK_TYPE_WIDGET, "drag-failed", &signal_id_widget_drag_failed); - install_hook(GTK_TYPE_EXPANDER, "activate", &signal_id_expander_activate); - -#if !GTK_CHECK_VERSION(3,0,0) - gtk_quit_add(1, quit_handler, NULL); -#endif -} - -G_MODULE_EXPORT gchar* g_module_check_init(GModule *module); - -G_MODULE_EXPORT gchar* g_module_check_init(GModule *module) { - g_module_make_resident(module); - return NULL; -} diff --git a/.flatpak-builder/cache/objects/41/19bc893b550fc25e4b40c12553981a8fb500ad2b359fc6e19e8dbb53b6c177.dirtree b/.flatpak-builder/cache/objects/41/19bc893b550fc25e4b40c12553981a8fb500ad2b359fc6e19e8dbb53b6c177.dirtree deleted file mode 100644 index b7f2ead..0000000 Binary files a/.flatpak-builder/cache/objects/41/19bc893b550fc25e4b40c12553981a8fb500ad2b359fc6e19e8dbb53b6c177.dirtree and /dev/null differ diff --git a/.flatpak-builder/cache/objects/41/fcb86ffa9338ce92f0bf1f7687706a2e061098262a1e0a3fca75a8d6895f54.file b/.flatpak-builder/cache/objects/41/fcb86ffa9338ce92f0bf1f7687706a2e061098262a1e0a3fca75a8d6895f54.file deleted file mode 100644 index 51266c6..0000000 Binary files a/.flatpak-builder/cache/objects/41/fcb86ffa9338ce92f0bf1f7687706a2e061098262a1e0a3fca75a8d6895f54.file and /dev/null differ diff --git a/.flatpak-builder/cache/objects/42/c030178049a3611c7d205bfde96604a46125f9ceb3e4232f1eb325f57f3bb5.dirtree b/.flatpak-builder/cache/objects/42/c030178049a3611c7d205bfde96604a46125f9ceb3e4232f1eb325f57f3bb5.dirtree deleted file mode 100644 index 0844ce4..0000000 Binary files a/.flatpak-builder/cache/objects/42/c030178049a3611c7d205bfde96604a46125f9ceb3e4232f1eb325f57f3bb5.dirtree and /dev/null differ diff --git a/.flatpak-builder/cache/objects/43/7b4d156de99165bce4b44d574ce74f01ffddc14dd156b4dbf5cf51a16fcc2b.dirtree b/.flatpak-builder/cache/objects/43/7b4d156de99165bce4b44d574ce74f01ffddc14dd156b4dbf5cf51a16fcc2b.dirtree deleted file mode 100644 index f630a14..0000000 Binary files a/.flatpak-builder/cache/objects/43/7b4d156de99165bce4b44d574ce74f01ffddc14dd156b4dbf5cf51a16fcc2b.dirtree and /dev/null differ diff --git a/.flatpak-builder/cache/objects/43/88d281896c90a035e201d0436029ee6b5329885ac452479f487b7dfc6dbcb1.dirtree b/.flatpak-builder/cache/objects/43/88d281896c90a035e201d0436029ee6b5329885ac452479f487b7dfc6dbcb1.dirtree deleted file mode 100644 index 4c8cf0f..0000000 Binary files a/.flatpak-builder/cache/objects/43/88d281896c90a035e201d0436029ee6b5329885ac452479f487b7dfc6dbcb1.dirtree and /dev/null differ diff --git a/.flatpak-builder/cache/objects/43/8966c390c22e06217b4ad1919539fe6d2bd2b740416ab19376b34807dfd4eb.file b/.flatpak-builder/cache/objects/43/8966c390c22e06217b4ad1919539fe6d2bd2b740416ab19376b34807dfd4eb.file deleted file mode 120000 index d1ef17c..0000000 --- a/.flatpak-builder/cache/objects/43/8966c390c22e06217b4ad1919539fe6d2bd2b740416ab19376b34807dfd4eb.file +++ /dev/null @@ -1 +0,0 @@ -libcanberra-gtk3.so.0.1.9 \ No newline at end of file diff --git a/.flatpak-builder/cache/objects/44/6a0ef11b7cc167f3b603e585c7eeeeb675faa412d5ec73f62988eb0b6c5488.dirmeta b/.flatpak-builder/cache/objects/44/6a0ef11b7cc167f3b603e585c7eeeeb675faa412d5ec73f62988eb0b6c5488.dirmeta deleted file mode 100644 index 6757a41..0000000 Binary files a/.flatpak-builder/cache/objects/44/6a0ef11b7cc167f3b603e585c7eeeeb675faa412d5ec73f62988eb0b6c5488.dirmeta and /dev/null differ diff --git a/.flatpak-builder/cache/objects/44/b91e79061cd9ab47ce498828f630a6df7052185a0ac2fb49b41b5c146ff1ea.file b/.flatpak-builder/cache/objects/44/b91e79061cd9ab47ce498828f630a6df7052185a0ac2fb49b41b5c146ff1ea.file deleted file mode 120000 index 22e1f93..0000000 --- a/.flatpak-builder/cache/objects/44/b91e79061cd9ab47ce498828f630a6df7052185a0ac2fb49b41b5c146ff1ea.file +++ /dev/null @@ -1 +0,0 @@ -dialog-warning.oga \ No newline at end of file diff --git a/.flatpak-builder/cache/objects/46/cba4098f371be36e8b18b652b794904fe509c7b5c2554e47fdea4c39ee387c.dirtree b/.flatpak-builder/cache/objects/46/cba4098f371be36e8b18b652b794904fe509c7b5c2554e47fdea4c39ee387c.dirtree deleted file mode 100644 index 55e4f1a..0000000 Binary files a/.flatpak-builder/cache/objects/46/cba4098f371be36e8b18b652b794904fe509c7b5c2554e47fdea4c39ee387c.dirtree and /dev/null differ diff --git a/.flatpak-builder/cache/objects/4a/978554439c02e7d46720fe528036e34fb03a227e63dc53dcff3f0737801b93.file b/.flatpak-builder/cache/objects/4a/978554439c02e7d46720fe528036e34fb03a227e63dc53dcff3f0737801b93.file deleted file mode 100755 index 13740be..0000000 Binary files a/.flatpak-builder/cache/objects/4a/978554439c02e7d46720fe528036e34fb03a227e63dc53dcff3f0737801b93.file and /dev/null differ diff --git a/.flatpak-builder/cache/objects/4d/4eb1eb0514b4edd5c314d99af754658bdb22858d6c3b02518d89189911b158.file b/.flatpak-builder/cache/objects/4d/4eb1eb0514b4edd5c314d99af754658bdb22858d6c3b02518d89189911b158.file deleted file mode 100644 index 50a6560..0000000 Binary files a/.flatpak-builder/cache/objects/4d/4eb1eb0514b4edd5c314d99af754658bdb22858d6c3b02518d89189911b158.file and /dev/null differ diff --git a/.flatpak-builder/cache/objects/4e/8cc29c5b524fc000621f03f6f9c4a1c6db4ecf16b6af046326b586ecce5bdd.file b/.flatpak-builder/cache/objects/4e/8cc29c5b524fc000621f03f6f9c4a1c6db4ecf16b6af046326b586ecce5bdd.file deleted file mode 100644 index a3beb7c..0000000 --- a/.flatpak-builder/cache/objects/4e/8cc29c5b524fc000621f03f6f9c4a1c6db4ecf16b6af046326b586ecce5bdd.file +++ /dev/null @@ -1,155 +0,0 @@ -.TH INTLTOOL-UPDATE 8 "2003-08-02" "intltool" - -.SH NAME -intltool-update \- updates PO template file and merge translations with it - -.SH SYNOPSIS -.BI intltool-update " [option]..." -.br -.BI intltool-update " LANGCODE" - -.SH DESCRIPTION -.B intltool-update -generates new po file templates from source code, and merges existing -translations with these new po templates. -.PP -You must change working directory to the subdirectory containing translations -(usually "\fIpo/\fR") before running \fBintltool-update\fR. - -.SH OPTIONS -When executing -.B intltool-update -, only one mode of operation is allowed each time. -.\" ------------------------------------------------------- -.SS "Mode of operation" -.\" ------------------------------------------------------- -.IP "\fB\-p\fR" 4 -.PD 0 -.IP "\fB\-\-pot\fR" 4 -.PD -Generate po template (.pot) only. -.IP "\fB\-s\fR" 4 -.PD 0 -.IP "\fB\-\-headers\fR" 4 -.PD -Executes \fBintltool-extract\fR(8) to extract strings inside XML/INI -style files listed in \fBPOTFILES.in\fR, and writes the extracted -strings into header files, so that the strings can be recognised -by \fBxgettext\fR(1). -.IP "\fB\-m\fR" 4 -.PD 0 -.IP "\fB\-\-maintain\fR" 4 -.PD -Search for left out files, which should have been listed in -.B POTFILES.in -or -.BR POTFILES.skip "." -A list of all these files are written into another file called -"\fBmissing\fR". -.IP "\fB\-r\fR" 4 -.PD 0 -.IP "\fB\-\-report\fR" 4 -.PD -Display a status report for all translations in the software. -.IP "\fB\-d \fILANGCODE\fR" 4 -.PD 0 -.IP "\fB\-\-dist \fILANGCODE\fR" 4 -.PD -Merge -.BR LANGCODE .po -with existing PO template. -.\" ------------------------------------------------------- -.SS "Other options" -.\" ------------------------------------------------------- -. -.IP "\fB\-g \fINAME\fR" 4 -.PD 0 -.IP "\fB\-\-gettext-package\fR=\fINAME\fR" 4 -.PD -Manually specify PO template file name, instead of determining the -name automatically from source. Useful with -.BR \-p / \-\-pot -option. This option has an additional effect: the name of current working -directory is no more limited to "po" or "po-*". -.IP "\fB\-o \fIFILENAME\fR" 4 -.PD 0 -.IP "\fB\-\-output-file\fR=\fIFILENAME\fR" 4 -.PD -Manually specify output \fIFILENAME\fR after merging old translation with -PO template. Useful either with -.BR \-d / \-\-dist -option or without any option. -.IP "\fB\-x\fR" 4 -.PD 0 -.IP "\fB\-\-verbose\fR" 4 -.PD -Display lots of feedback. -.IP "\fB\-\-version\fR" 4 -Show version information. -.IP "\fB\-\-help\fR" 4 -Show usage and basic help information. - -.SH EXAMPLES -Creates a new PO template from source code, and name it foo.pot: -.PP -.RS 2 -.nf -.ft CW -.ne 1 -intltool-update \-\-pot \-\-gettext-package=foo -.ft R -.fi -.RE -.PP -Updates translation file xy.po using existing po template called -"bar.pot", and writes output into "xy1.po": -.PP -.RS 2 -.nf -.ft CW -.ne 1 -intltool-update \-\-dist \-\-gettext-package=bar \-\-output-file=xy1.po xy -.ft R -.fi -.RE -.PP -Creates new PO template and updates translation file xy.po -(xy.po is overwritten with new content): -.PP -.RS 2 -.nf -.ft CW -.ne 1 -intltool-update xy -.ft R -.fi -(same as \fBintltool-update \-\-pot && intltool-update \-\-dist xy\fR) -.RE - -.SH FILES -.IP "\fBpo/POTFILES.in\fR" -Contains list of source files which contain translatable strings, -one file per line. -.IP "\fBpo/POTFILES.skip\fR" -.PD 0 -.IP "\fBpo/POTFILES.ignore\fR (obsolete)" -.PD -Contains list of source files which should be ignored when searching -for translatable strings. - -.SH REPORTING BUGS -Report bugs to http://bugs.launchpad.net/intltool - -.SH AUTHOR -Darin Adler -.br -Kenneth Christiansen -.br -Maciej Stachowiak - -.SH SEE ALSO -.BR intltoolize (8), -.BR intltool-prepare (8), -.BR intltool-extract (8), -.BR intltool-merge (8), -.BR xgettext (1) diff --git a/.flatpak-builder/cache/objects/4e/8daf41df5e397e80edd19b5289c724c229026fd97c73ccbf7a3af9df285a87.file b/.flatpak-builder/cache/objects/4e/8daf41df5e397e80edd19b5289c724c229026fd97c73ccbf7a3af9df285a87.file deleted file mode 100644 index a253702..0000000 Binary files a/.flatpak-builder/cache/objects/4e/8daf41df5e397e80edd19b5289c724c229026fd97c73ccbf7a3af9df285a87.file and /dev/null differ diff --git a/.flatpak-builder/cache/objects/51/3150f72d317ddeeb0655dc4131302bcdffe2220ef8ad4b5eb3afce4f28b35b.file b/.flatpak-builder/cache/objects/51/3150f72d317ddeeb0655dc4131302bcdffe2220ef8ad4b5eb3afce4f28b35b.file deleted file mode 100755 index 43314b4..0000000 --- a/.flatpak-builder/cache/objects/51/3150f72d317ddeeb0655dc4131302bcdffe2220ef8ad4b5eb3afce4f28b35b.file +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh - -/app/bin/canberra-gtk-play --id="desktop-logout" --description="GNOME Logout" diff --git a/.flatpak-builder/cache/objects/52/5f5d1d43447474e1067cc0f210c6c4a71475b59e48a66680670bf6aa58addd.file b/.flatpak-builder/cache/objects/52/5f5d1d43447474e1067cc0f210c6c4a71475b59e48a66680670bf6aa58addd.file deleted file mode 100644 index 8155605..0000000 --- a/.flatpak-builder/cache/objects/52/5f5d1d43447474e1067cc0f210c6c4a71475b59e48a66680670bf6aa58addd.file +++ /dev/null @@ -1,6 +0,0 @@ -[Sound Theme] -Name=Default -Directories=stereo - -[stereo] -OutputProfile=stereo diff --git a/.flatpak-builder/cache/objects/52/63ae876e11fe680f62b458ddb395813826b43615c181640927c6976a53a1d0.file b/.flatpak-builder/cache/objects/52/63ae876e11fe680f62b458ddb395813826b43615c181640927c6976a53a1d0.file deleted file mode 100644 index e96c3a1..0000000 Binary files a/.flatpak-builder/cache/objects/52/63ae876e11fe680f62b458ddb395813826b43615c181640927c6976a53a1d0.file and /dev/null differ diff --git a/.flatpak-builder/cache/objects/53/6f843bab718bc875f73d08c420db9087f9177981ac47b6c1fe7e18270a0dcd.dirtree b/.flatpak-builder/cache/objects/53/6f843bab718bc875f73d08c420db9087f9177981ac47b6c1fe7e18270a0dcd.dirtree deleted file mode 100644 index 5aeda2e..0000000 Binary files a/.flatpak-builder/cache/objects/53/6f843bab718bc875f73d08c420db9087f9177981ac47b6c1fe7e18270a0dcd.dirtree and /dev/null differ diff --git a/.flatpak-builder/cache/objects/54/0b065be1a13b83df6026b98e0747d7982720e29186a182f0330ae8f2c5533c.file b/.flatpak-builder/cache/objects/54/0b065be1a13b83df6026b98e0747d7982720e29186a182f0330ae8f2c5533c.file deleted file mode 100644 index 5544188..0000000 --- a/.flatpak-builder/cache/objects/54/0b065be1a13b83df6026b98e0747d7982720e29186a182f0330ae8f2c5533c.file +++ /dev/null @@ -1,217 +0,0 @@ -/*-*- Mode: C; c-basic-offset: 8 -*-*/ - -/*** - This file is part of libcanberra. - - Copyright 2008 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 - . -***/ - -#ifdef HAVE_CONFIG_H -#include -#endif - -#include - -#include "read-sound-file.h" -#include "read-wav.h" -#include "read-vorbis.h" -#include "macro.h" -#include "malloc.h" -#include "canberra.h" - -struct ca_sound_file { - ca_wav *wav; - ca_vorbis *vorbis; - char *filename; - - unsigned nchannels; - unsigned rate; - ca_sample_type_t type; -}; - -int ca_sound_file_open(ca_sound_file **_f, const char *fn) { - FILE *file; - ca_sound_file *f; - int ret; - - ca_return_val_if_fail(_f, CA_ERROR_INVALID); - ca_return_val_if_fail(fn, CA_ERROR_INVALID); - - if (!(f = ca_new0(ca_sound_file, 1))) - return CA_ERROR_OOM; - - if (!(f->filename = ca_strdup(fn))) { - ret = CA_ERROR_OOM; - goto fail; - } - - if (!(file = fopen(fn, "r"))) { - ret = errno == ENOENT ? CA_ERROR_NOTFOUND : CA_ERROR_SYSTEM; - goto fail; - } - - if ((ret = ca_wav_open(&f->wav, file)) == CA_SUCCESS) { - f->nchannels = ca_wav_get_nchannels(f->wav); - f->rate = ca_wav_get_rate(f->wav); - f->type = ca_wav_get_sample_type(f->wav); - *_f = f; - return CA_SUCCESS; - } - - if (ret == CA_ERROR_CORRUPT) { - - if (fseek(file, 0, SEEK_SET) < 0) { - ret = CA_ERROR_SYSTEM; - goto fail; - } - - if ((ret = ca_vorbis_open(&f->vorbis, file)) == CA_SUCCESS) { - f->nchannels = ca_vorbis_get_nchannels(f->vorbis); - f->rate = ca_vorbis_get_rate(f->vorbis); - f->type = CA_SAMPLE_S16NE; - *_f = f; - return CA_SUCCESS; - } - } - -fail: - - ca_free(f->filename); - ca_free(f); - - return ret; -} - -void ca_sound_file_close(ca_sound_file *f) { - ca_assert(f); - - if (f->wav) - ca_wav_close(f->wav); - if (f->vorbis) - ca_vorbis_close(f->vorbis); - - ca_free(f->filename); - ca_free(f); -} - -unsigned ca_sound_file_get_nchannels(ca_sound_file *f) { - ca_assert(f); - return f->nchannels; -} - -unsigned ca_sound_file_get_rate(ca_sound_file *f) { - ca_assert(f); - return f->rate; -} - -ca_sample_type_t ca_sound_file_get_sample_type(ca_sound_file *f) { - ca_assert(f); - return f->type; -} - -const ca_channel_position_t* ca_sound_file_get_channel_map(ca_sound_file *f) { - ca_assert(f); - - if (f->wav) - return ca_wav_get_channel_map(f->wav); - else - return ca_vorbis_get_channel_map(f->vorbis); -} - -int ca_sound_file_read_int16(ca_sound_file *f, int16_t *d, size_t *n) { - ca_return_val_if_fail(f, CA_ERROR_INVALID); - ca_return_val_if_fail(d, CA_ERROR_INVALID); - ca_return_val_if_fail(n, CA_ERROR_INVALID); - ca_return_val_if_fail(*n > 0, CA_ERROR_INVALID); - ca_return_val_if_fail(f->wav || f->vorbis, CA_ERROR_STATE); - ca_return_val_if_fail(f->type == CA_SAMPLE_S16NE || f->type == CA_SAMPLE_S16RE, CA_ERROR_STATE); - - if (f->wav) - return ca_wav_read_s16le(f->wav, d, n); - else - return ca_vorbis_read_s16ne(f->vorbis, d, n); -} - -int ca_sound_file_read_uint8(ca_sound_file *f, uint8_t *d, size_t *n) { - ca_return_val_if_fail(f, CA_ERROR_INVALID); - ca_return_val_if_fail(d, CA_ERROR_INVALID); - ca_return_val_if_fail(n, CA_ERROR_INVALID); - ca_return_val_if_fail(*n > 0, CA_ERROR_INVALID); - ca_return_val_if_fail(f->wav && !f->vorbis, CA_ERROR_STATE); - ca_return_val_if_fail(f->type == CA_SAMPLE_U8, CA_ERROR_STATE); - - if (f->wav) - return ca_wav_read_u8(f->wav, d, n); - - return CA_ERROR_STATE; -} - -int ca_sound_file_read_arbitrary(ca_sound_file *f, void *d, size_t *n) { - int ret; - - ca_return_val_if_fail(f, CA_ERROR_INVALID); - ca_return_val_if_fail(d, CA_ERROR_INVALID); - ca_return_val_if_fail(n, CA_ERROR_INVALID); - ca_return_val_if_fail(*n > 0, CA_ERROR_INVALID); - - switch (f->type) { - case CA_SAMPLE_S16NE: - case CA_SAMPLE_S16RE: { - size_t k; - - k = *n / sizeof(int16_t); - if ((ret = ca_sound_file_read_int16(f, d, &k)) == CA_SUCCESS) - *n = k * sizeof(int16_t); - - break; - } - - case CA_SAMPLE_U8: { - size_t k; - - k = *n; - if ((ret = ca_sound_file_read_uint8(f, d, &k)) == CA_SUCCESS) - *n = k; - - break; - } - - default: - ca_assert_not_reached(); - } - - return ret; -} - -off_t ca_sound_file_get_size(ca_sound_file *f) { - ca_return_val_if_fail(f, (off_t) -1); - - if (f->wav) - return ca_wav_get_size(f->wav); - else - return ca_vorbis_get_size(f->vorbis); -} - -size_t ca_sound_file_frame_size(ca_sound_file *f) { - unsigned c; - - ca_assert(f); - - c = ca_sound_file_get_nchannels(f); - - return c * (ca_sound_file_get_sample_type(f) == CA_SAMPLE_U8 ? 1U : 2U); -} diff --git a/.flatpak-builder/cache/objects/54/2b14975bb28ba3a0b02b1145c19f9a4ee911e95e586e3b6897687530139e5f.file b/.flatpak-builder/cache/objects/54/2b14975bb28ba3a0b02b1145c19f9a4ee911e95e586e3b6897687530139e5f.file deleted file mode 120000 index f35003d..0000000 --- a/.flatpak-builder/cache/objects/54/2b14975bb28ba3a0b02b1145c19f9a4ee911e95e586e3b6897687530139e5f.file +++ /dev/null @@ -1 +0,0 @@ -/run \ No newline at end of file diff --git a/.flatpak-builder/cache/objects/55/7b632616bee0acffe8d49513645fc59d5adfe21a796f926795276c95789b3c.file b/.flatpak-builder/cache/objects/55/7b632616bee0acffe8d49513645fc59d5adfe21a796f926795276c95789b3c.file deleted file mode 100644 index 235e257..0000000 --- a/.flatpak-builder/cache/objects/55/7b632616bee0acffe8d49513645fc59d5adfe21a796f926795276c95789b3c.file +++ /dev/null @@ -1,24 +0,0 @@ -/* gsound.h - * - * Copyright (C) 2014 Tristan Brindle - * - * This file 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. - * - * This file 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 General Public License - * along with this program. If not, see . - */ - -#ifndef GSOUND_H -#define GSOUND_H - -#include "gsound-context.h" - -#endif /* GSOUND_H */ diff --git a/.flatpak-builder/cache/objects/56/26de7463e706b1f5dce5bfbb7eec671ff56cda3bd62cfbdba1b3568a9038f6.file b/.flatpak-builder/cache/objects/56/26de7463e706b1f5dce5bfbb7eec671ff56cda3bd62cfbdba1b3568a9038f6.file deleted file mode 100755 index 0f82051..0000000 --- a/.flatpak-builder/cache/objects/56/26de7463e706b1f5dce5bfbb7eec671ff56cda3bd62cfbdba1b3568a9038f6.file +++ /dev/null @@ -1,342 +0,0 @@ -#!/usr/bin/perl -w -# -*- Mode: perl; indent-tabs-mode: nil; c-basic-offset: 4 -*- - -# Intltool .desktop, .directory Prepare Tool -# -# Copyright (C) 2001 Free Software Foundation. -# -# Intltool is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License as -# published by the Free Software Foundation; either version 2 of the -# License, or (at your option) any later version. -# -# Intltool 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 -# General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -# -# Author(s): Gediminas Paulauskas -# Kenneth Christiansen - -## Release information -my $PROGRAM = "intltool-prepare"; -my $PACKAGE = "intltool"; -my $VERSION = "0.51.0"; - -## Loaded modules -use strict; -use Getopt::Long; -use File::Find; - -## Scalars used by the option stuff -my $HELP_ARG = "0"; -my $VERSION_ARG = "0"; -my $VERBOSE = "0"; - -my @languages; -my @desktop_files; -my $new; -my $file; - -my $desktop_extension = "(desktop|soundlist|keys|directory)"; - -my $keywords = "Name|Comment|GenericName|SwallowTitle|description"; - -## Always print as the first thing -$| = 1; - -## Handle options -GetOptions ( - "help|h" => \$HELP_ARG, - "version|v" => \$VERSION_ARG, - "verbose|x" => \$VERBOSE - ) or &invalid_option; - - -## Use the supplied arguments -## Check for options. -## This section will check for the different options. - -sub split_on_argument { - - if ($VERSION_ARG) { - &version; - - } elsif ($HELP_ARG) { - &help; - - } else { - &main; - } -} - -&split_on_argument; - -sub main -{ - print "Working, please wait...\n" if (! $VERBOSE); - &find_desktop_files; - &append_keywords; - &add_to_potfiles; - &perform_rescue; - &add_to_cvsignore; - &fix_makefiles; - &generate_empty; -} - -sub version { - print <<_EOF_; -${PROGRAM} ${PACKAGE} $VERSION -Written by Gediminas Paulauskas , 2000. - -Copyright (C) 2000 Free Software Foundation, Inc. -This is free software; see the source for copying conditions. There is NO -warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -_EOF_ - exit; -} - -sub help -{ - print <<_EOF_; -Usage: ${PROGRAM} [OPTION] KEYWORD... -Automates preparation steps before software make use of intltool. -KEYWORD is a list of additional key other than "Name", "Comment" -and "description". - - -h, --help shows this help page - -v, --version shows the version - -x, --verbose show lots of feedback - -Report bugs to http://bugs.launchpad.net/intltool -_EOF_ - exit; -} - -sub invalid_option -{ - ## Handle invalid arguments - ## my $opt = $ARGV[0]; - ## print "$PROGRAM: invalid option -- $opt\n"; - print STDERR "Try `$PROGRAM --help' for more information.\n"; - exit 1; -} - -sub append_keywords -{ - my $arg; - foreach $arg (@ARGV) { - $keywords .= "|$arg"; - } -} - -sub add_to_potfiles -{ - open FILE, ">>po/POTFILES.in"; - my $intro = 0; - foreach my $desktop (@desktop_files) { - next if contains("po/POTFILES.in", "$desktop.in"); - # Print explanation comment only once - unless ($intro) { - print FILE "# files added by intltool-prepare\n"; - $intro = 1; - } - print FILE "$desktop.in\n"; - } - close FILE; -} - -sub perform_rescue -{ - foreach $file (@desktop_files) { - &rescue_file($file); - } -} - -sub rescue_file -{ - my ($filename) = @_; - my ($msgid, $line, $lang); - - print "Rescuing translations from $filename ...\n" if $VERBOSE; - - open ORIG, "<$filename"; - $line = 1; -ENTRY: while () { - chomp; - $line++; - my $entry = $_; - if (($entry =~ /^($keywords)=(.*)$/) || - ($entry =~ /^(\s*description)=(.*)$/)) { - $msgid = $2; - $msgid =~ s/\\/\\\\/g; - $msgid =~ s/\"/\\"/g; - } elsif (($entry =~ /^($keywords)\[(.*?)\]=(.*)$/) || - ($entry =~ /^(\s*\[)(.*?)\]description=(.*)$/)) { - $lang = $2; - - my $msgstr = $3; - $msgstr =~ s/\\/\\\\/g; - $msgstr =~ s/"/\\"/g; - - $line--; - if ((-s "po/$lang.po") && - (contains("po/$lang.po", "msgid \"$msgid\""))) { - next ENTRY; - } - - open POFILE, ">>po/$lang.po"; - - print POFILE "\n#: $filename.in:$line\n"; - print POFILE "msgid \"$msgid\"\n"; - print POFILE "msgstr \"$msgstr\"\n"; - - close POFILE; - } - } -} - -sub generate_empty -{ - my $all = ' '; - foreach my $full (@desktop_files) { - $new = "$full.in"; - $all .= "$new "; - print "Generating empty $new ...\n" if $VERBOSE; - open FULL, "<$full"; - open NEW, ">$new"; - - while () { - unless ( - (/^($keywords)\[.*?\]=.*$/) || - (/^\s*\[(.*?)\]description=.*$/) - ) { - if (/^($keywords)=.*$/) { - print NEW "_$_"; - } elsif (/^(\s*)(description=.*)$/) { - print NEW "$1_$2\n"; - } else { - print NEW; - } - } - } - - close NEW; - } - unless ($all eq ' ') { - print "*** Please add these files to CVS by following command: ***\n" - . "cvs add$all\n"; - } -} - -sub add_to_cvsignore -{ - my $all = ' '; - my $ign; - foreach $file (@desktop_files) { - $file =~ /^(.*\/)?(.+?\.$desktop_extension$)$/; - if ($1) { - $ign = "$1.cvsignore"; - } else { - $ign = ".cvsignore"; - } - my $basename = $2; - - next if contains($ign, $basename); - - print "Appending $basename to $ign\n" if $VERBOSE; - open FILE, ">>$ign"; - print FILE "$basename\n"; - $all .= "$file "; - } - close FILE; - unless ($all eq ' ') { - print "*** Please remove files from CVS by following command: ***\n" - . "cvs remove -f$all\n"; - } -} - -sub fix_makefiles -{ - my $file; - foreach $file (@desktop_files) { - my ($makefile, $line); - - $file =~ /^(.*\/)?(.+?\.$desktop_extension$)$/; - if ($1) { - $makefile = "$1Makefile.am"; - } else { - $makefile = "Makefile.am"; - } - my $basename = $2; - print "Fixing $basename entry in $makefile\n" if $VERBOSE; - - open MAKE, $makefile; - open NEWMAKE, ">$makefile.new"; - my $extra = 0; - while ($line = ) { - $extra = 1 if $line =~ /^EXTRA_DIST/; - if ($extra) { - if (($line =~ /$basename/) && - !($line =~ /$basename\.in/)) { - $line =~ s/$basename/$basename\.in/; - } - $extra = 0 unless $line =~ /\\\s*$/ - } else { - if ($line =~ /^(\w+)_DATA\s*=\s*$basename\s*$/) { - my $name = $1; - $line =~ s/^$name\_DATA/$name\_in_files/; - $line =~ s/$basename/$basename\.in/; - $basename =~ /\.($desktop_extension)$/; - my $ext = $1; - $line .= "$name\_DATA = \$($name\_in_files:.$ext.in=.$ext)\n"; - $ext =~ tr/a-z/A-Z/; - if (!contains($makefile, "\@INTLTOOL_$ext\_RULE\@")) { - $line .= "\@INTLTOOL_$ext\_RULE\@\n"; - } - } - } - print NEWMAKE $line; - } - close NEWMAKE; - rename "$makefile.new", $makefile; - } -} - -sub contains -{ - my ($name, $str) = @_; - open CONT, "<$name"; - while () { - chomp; - return 1 if $_ eq $str; - } - return 0; -} - -sub find_desktop_files -{ - if ($VERBOSE) { - print "Found these interesting files:\n"; - } else { - print "Finding interesting files..."; - } - find (\&wanted, '.'); - print "done\n" unless $VERBOSE; -} - -sub wanted -{ - if (/\.$desktop_extension$/) { - my $file = $File::Find::name; - $file =~ s/\.\///; - push @desktop_files, $file; - print "$file\n" if $VERBOSE; - } -} - -# vim: ts=4 sw=4 expandtab diff --git a/.flatpak-builder/cache/objects/57/8f5b4b0a42e118fc09c8642d32e96499525b56b5844d9c635f6b45e5886149.file b/.flatpak-builder/cache/objects/57/8f5b4b0a42e118fc09c8642d32e96499525b56b5844d9c635f6b45e5886149.file deleted file mode 100644 index 2864ce0..0000000 --- a/.flatpak-builder/cache/objects/57/8f5b4b0a42e118fc09c8642d32e96499525b56b5844d9c635f6b45e5886149.file +++ /dev/null @@ -1,579 +0,0 @@ -/*-*- Mode: C; c-basic-offset: 8 -*-*/ - -#ifndef foocanberrahfoo -#define foocanberrahfoo - -/*** - This file is part of libcanberra. - - Copyright 2008 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 - . -***/ - -#include -#include -#include - -#ifdef __cplusplus -extern "C" { -#endif - -#ifndef __GNUC__ -/* Make sure __attribute__ works on non-gcc systems. Yes, might be a bit ugly */ -#define __attribute__(x) -#endif - -/** - * CA_MAJOR: - * - * Evaluates to the major version number of libcanberra. - */ -#define CA_MAJOR (0) - -/** - * CA_MINOR: - * - * Evaluates to the minor version number of libcanberra. - */ -#define CA_MINOR (30) - -/** - * CA_CHECK_VERSION: - * - * Evaluates to TRUE when the library version is newer than the - * specified parameters. - */ -#define CA_CHECK_VERSION(major,minor) \ - ((CA_MAJOR > (major)) || \ - (CA_MAJOR == (major) && CA_MINOR >= (minor))) - -/** - * CA_PROP_MEDIA_NAME: - * - * A name describing the media being played. Localized if possible and applicable. - */ -#define CA_PROP_MEDIA_NAME "media.name" - -/** - * CA_PROP_MEDIA_TITLE: - * - * A (song) title describing the media being played. Localized if possible and applicable. - */ -#define CA_PROP_MEDIA_TITLE "media.title" - -/** - * CA_PROP_MEDIA_ARTIST: - * - * The artist of this media. Localized if possible and applicable. - */ -#define CA_PROP_MEDIA_ARTIST "media.artist" - -/** - * CA_PROP_MEDIA_LANGUAGE: - * - * The language this media is in, in some standard POSIX locale string, such as "de_DE". - */ -#define CA_PROP_MEDIA_LANGUAGE "media.language" - -/** - * CA_PROP_MEDIA_FILENAME: - * - * The file name this media was or can be loaded from. - */ -#define CA_PROP_MEDIA_FILENAME "media.filename" - -/** - * CA_PROP_MEDIA_ICON: - * - * An icon for this media in binary PNG format. - */ -#define CA_PROP_MEDIA_ICON "media.icon" - -/** - * CA_PROP_MEDIA_ICON_NAME: - * - * An icon name as defined in the XDG icon naming specifcation. - */ -#define CA_PROP_MEDIA_ICON_NAME "media.icon_name" - -/** - * CA_PROP_MEDIA_ROLE: - * - * The "role" this media is played in. For event sounds the string - * "event". For other cases strings like "music", "video", "game", ... - */ -#define CA_PROP_MEDIA_ROLE "media.role" - -/** - * CA_PROP_EVENT_ID: - * - * A textual id for an event sound, as mandated by the XDG sound naming specification. - */ -#define CA_PROP_EVENT_ID "event.id" - -/** - * CA_PROP_EVENT_DESCRIPTION: - * - * A descriptive string for the sound event. Localized if possible and applicable. - */ -#define CA_PROP_EVENT_DESCRIPTION "event.description" - -/** - * CA_PROP_EVENT_MOUSE_X: - * - * If this sound event was triggered by a mouse input event, the X - * position of the mouse cursor on the screen, formatted as string. - */ -#define CA_PROP_EVENT_MOUSE_X "event.mouse.x" - -/** - * CA_PROP_EVENT_MOUSE_Y: - * - * If this sound event was triggered by a mouse input event, the Y - * position of the mouse cursor on the screen, formatted as string. - */ -#define CA_PROP_EVENT_MOUSE_Y "event.mouse.y" - -/** - * CA_PROP_EVENT_MOUSE_HPOS: - * - * If this sound event was triggered by a mouse input event, the X - * position of the mouse cursor as fractional value between 0 and 1, - * formatted as string, 0 reflecting the left side of the screen, 1 - * the right side. - */ -#define CA_PROP_EVENT_MOUSE_HPOS "event.mouse.hpos" - -/** - * CA_PROP_EVENT_MOUSE_VPOS: - * - * If this sound event was triggered by a mouse input event, the Y - * position of the mouse cursor as fractional value between 0 and 1, - * formatted as string, 0 reflecting the top end of the screen, 1 - * the bottom end. - */ -#define CA_PROP_EVENT_MOUSE_VPOS "event.mouse.vpos" - -/** - * CA_PROP_EVENT_MOUSE_BUTTON: - * - * If this sound event was triggered by a mouse input event, the - * number of the mouse button that triggered it, formatted as string. 1 - * for left mouse button, 3 for right, 2 for middle. - */ -#define CA_PROP_EVENT_MOUSE_BUTTON "event.mouse.button" - -/** - * CA_PROP_WINDOW_NAME: - * - * If this sound event was triggered by a window on the screen, the - * name of this window as human readable string. - */ -#define CA_PROP_WINDOW_NAME "window.name" - -/** - * CA_PROP_WINDOW_ID: - * - * If this sound event was triggered by a window on the screen, some - * identification string for this window, so that the sound system can - * recognize specific windows. - */ -#define CA_PROP_WINDOW_ID "window.id" - -/** - * CA_PROP_WINDOW_ICON: - * - * If this sound event was triggered by a window on the screen, binary - * icon data in PNG format for this window. - */ -#define CA_PROP_WINDOW_ICON "window.icon" - -/** - * CA_PROP_WINDOW_ICON_NAME: - * - * If this sound event was triggered by a window on the screen, an - * icon name for this window, as defined in the XDG icon naming - * specification. - */ -#define CA_PROP_WINDOW_ICON_NAME "window.icon_name" - -/** - * CA_PROP_WINDOW_X: - * - * If this sound event was triggered by a window on the screen, the X - * position of the window measured from the top left corner of the - * screen to the top left corner of the window. - * - * Since: 0.17 - */ -#define CA_PROP_WINDOW_X "window.x" - -/** - * CA_PROP_WINDOW_Y: - * - * If this sound event was triggered by a window on the screen, the y - * position of the window measured from the top left corner of the - * screen to the top left corner of the window. - * - * Since: 0.17 - */ -#define CA_PROP_WINDOW_Y "window.y" - -/** - * CA_PROP_WINDOW_WIDTH: - * - * If this sound event was triggered by a window on the screen, the - * pixel width of the window. - * - * Since: 0.17 - */ -#define CA_PROP_WINDOW_WIDTH "window.width" - -/** - * CA_PROP_WINDOW_HEIGHT: - * - * If this sound event was triggered by a window on the screen, the - * pixel height of the window. - * - * Since: 0.17 - */ -#define CA_PROP_WINDOW_HEIGHT "window.height" - -/** - * CA_PROP_WINDOW_HPOS: - * - * If this sound event was triggered by a window on the screen, the X - * position of the center of the window as fractional value between 0 - * and 1, formatted as string, 0 reflecting the left side of the - * screen, 1 the right side. - * - * Since: 0.17 - */ -#define CA_PROP_WINDOW_HPOS "window.hpos" - -/** - * CA_PROP_WINDOW_VPOS: - * - * If this sound event was triggered by a window on the screen, the Y - * position of the center of the window as fractional value between 0 - * and 1, formatted as string, 0 reflecting the top side of the - * screen, 1 the bottom side. - * - * Since: 0.17 - */ -#define CA_PROP_WINDOW_VPOS "window.vpos" - -/** - * CA_PROP_WINDOW_DESKTOP: - * - * If this sound event was triggered by a window on the screen and the - * windowing system supports multiple desktops, a comma seperated list - * of indexes of the desktops this window is visible on. If this - * property is an empty string, it is visible on all desktops - * (i.e. 'sticky'). The first desktop is 0. (e.g. "0,2,3") - * - * Since: 0.18 - */ -#define CA_PROP_WINDOW_DESKTOP "window.desktop" - -/** - * CA_PROP_WINDOW_X11_DISPLAY: - * - * If this sound event was triggered by a window on the screen and the - * windowing system is X11, the X display name of the window (e.g. ":0"). - */ -#define CA_PROP_WINDOW_X11_DISPLAY "window.x11.display" - -/** - * CA_PROP_WINDOW_X11_SCREEN: - * - * If this sound event was triggered by a window on the screen and the - * windowing system is X11, the X screen id of the window formatted as - * string (e.g. "0"). - */ -#define CA_PROP_WINDOW_X11_SCREEN "window.x11.screen" - -/** - * CA_PROP_WINDOW_X11_MONITOR: - * - * If this sound event was triggered by a window on the screen and the - * windowing system is X11, the X monitor id of the window formatted as - * string (e.g. "0"). - */ -#define CA_PROP_WINDOW_X11_MONITOR "window.x11.monitor" - -/** - * CA_PROP_WINDOW_X11_XID: - * - * If this sound event was triggered by a window on the screen and the - * windowing system is X11, the XID of the window formatted as string. - */ -#define CA_PROP_WINDOW_X11_XID "window.x11.xid" - -/** - * CA_PROP_APPLICATION_NAME: - * - * The name of the application this sound event was triggered by as - * human readable string. (e.g. "GNU Emacs") Localized if possible and - * applicable. - */ -#define CA_PROP_APPLICATION_NAME "application.name" - -/** - * CA_PROP_APPLICATION_ID: - * - * An identifier for the program this sound event was triggered - * by. (e.g. "org.gnu.emacs"). - */ -#define CA_PROP_APPLICATION_ID "application.id" - -/** - * CA_PROP_APPLICATION_VERSION: - * - * A version number for the program this sound event was triggered - * by. (e.g. "22.2") - */ -#define CA_PROP_APPLICATION_VERSION "application.version" - -/** - * CA_PROP_APPLICATION_ICON: - * - * Binary icon data in PNG format for the application this sound event - * is triggered by. - */ -#define CA_PROP_APPLICATION_ICON "application.icon" - -/** - * CA_PROP_APPLICATION_ICON_NAME: - * - * An icon name for the application this sound event is triggered by, - * as defined in the XDG icon naming specification. - */ -#define CA_PROP_APPLICATION_ICON_NAME "application.icon_name" - -/** - * CA_PROP_APPLICATION_LANGUAGE: - * - * The locale string the application that is triggering this sound - * event is running in. A POSIX locale string such as de_DE@euro. - */ -#define CA_PROP_APPLICATION_LANGUAGE "application.language" - -/** - * CA_PROP_APPLICATION_PROCESS_ID: - * - * The unix PID of the process that is triggering this sound event, formatted as string. - */ -#define CA_PROP_APPLICATION_PROCESS_ID "application.process.id" - -/** - * CA_PROP_APPLICATION_PROCESS_BINARY: - * - * The path to the process binary of the process that is triggering this sound event. - */ -#define CA_PROP_APPLICATION_PROCESS_BINARY "application.process.binary" - -/** - * CA_PROP_APPLICATION_PROCESS_USER: - * - * The user that owns the process that is triggering this sound event. - */ -#define CA_PROP_APPLICATION_PROCESS_USER "application.process.user" - -/** - * CA_PROP_APPLICATION_PROCESS_HOST: - * - * The host name of the host the process that is triggering this sound event runs on. - */ -#define CA_PROP_APPLICATION_PROCESS_HOST "application.process.host" - -/** - * CA_PROP_CANBERRA_CACHE_CONTROL: - * - * A special property that can be used to control the automatic sound - * caching of sounds in the sound server. One of "permanent", - * "volatile", "never". "permanent" will cause this sample to be - * cached in the server permanently. This is useful for very - * frequently used sound events such as those used for input - * feedback. "volatile" may be used for cacheing sounds in the sound - * server temporarily. They will expire after some time or on cache - * pressure. Finally, "never" may be used for sounds that should never - * be cached, because they are only generated very seldomly or even - * only once at most (such as desktop login sounds). - * - * If this property is not explicitly passed to ca_context_play() it - * will default to "never". If it is not explicitly passed to - * ca_context_cache() it will default to "permanent". - * - * If the list of properties is handed on to the sound server this - * property is stripped from it. - */ -#define CA_PROP_CANBERRA_CACHE_CONTROL "canberra.cache-control" - -/** - * CA_PROP_CANBERRA_VOLUME: - * - * A special property that can be used to control the volume this - * sound event is played in if the backend supports it. A floating - * point value for the decibel multiplier for the sound. 0 dB relates - * to zero gain, and is the default volume these sounds are played in. - * - * If the list of properties is handed on to the sound server this - * property is stripped from it. - */ -#define CA_PROP_CANBERRA_VOLUME "canberra.volume" - -/** - * CA_PROP_CANBERRA_XDG_THEME_NAME: - * - * A special property that can be used to control the XDG sound theme that - * is used for this sample. - * - * If the list of properties is handed on to the sound server this - * property is stripped from it. - */ -#define CA_PROP_CANBERRA_XDG_THEME_NAME "canberra.xdg-theme.name" - -/** - * CA_PROP_CANBERRA_XDG_THEME_OUTPUT_PROFILE: - * - * A special property that can be used to control the XDG sound theme - * output profile that is used for this sample. - * - * If the list of properties is handed on to the sound server this - * property is stripped from it. - */ -#define CA_PROP_CANBERRA_XDG_THEME_OUTPUT_PROFILE "canberra.xdg-theme.output-profile" - -/** - * CA_PROP_CANBERRA_ENABLE: - * - * A special property that can be used to control whether any sounds - * are played at all. If this property is "1" or unset sounds are - * played as normal. However, if it is "0" all calls to - * ca_context_play() will fail with CA_ERROR_DISABLED. - * - * If the list of properties is handed on to the sound server this - * property is stripped from it. - */ -#define CA_PROP_CANBERRA_ENABLE "canberra.enable" - -/** - * CA_PROP_CANBERRA_FORCE_CHANNEL: - * - * A special property that can be used to control on which channel a - * sound is played. The value should be one of mono, front-left, - * front-right, front-center, rear-left, rear-right, rear-center, lfe, - * front-left-of-center, front-right-of-center, side-left, side-right, - * top-center, top-front-left, top-front-right, top-front-center, - * top-rear-left, top-rear-right, top-rear-center. This property is - * only honoured by some backends, other backends may choose to ignore - * it completely. - * - * If the list of properties is handed on to the sound server this - * property is stripped from it. - * - * Since: 0.13 - */ -#define CA_PROP_CANBERRA_FORCE_CHANNEL "canberra.force_channel" - -/** - * ca_context: - * - * A libcanberra context object. - */ -typedef struct ca_context ca_context; - -/** - * ca_finish_callback_t: - * @c: The libcanberra context this callback is called for - * @id: The numerical id passed to the ca_context_play_full() when starting the event sound playback. - * @error_code: A numerical error code describing the reason this callback is called. If CA_SUCCESS is passed in the playback of the event sound was successfully completed. - * @userdata: Some arbitrary user data the caller of ca_context_play_full() passed in. - * - * Playback completion event callback. The context this callback is - * called in is undefined, it might or might not be called from a - * background thread, and from any stack frame. The code implementing - * this function may not call any libcanberra API call from this - * callback -- this might result in a deadlock. Instead it may only be - * used to asynchronously signal some kind of notification object - * (semaphore, message queue, ...). - */ -typedef void (*ca_finish_callback_t)(ca_context *c, uint32_t id, int error_code, void *userdata); - -/** - * Error codes: - * @CA_SUCCESS: Success - * - * Error codes - */ -enum { - CA_SUCCESS = 0, - CA_ERROR_NOTSUPPORTED = -1, - CA_ERROR_INVALID = -2, - CA_ERROR_STATE = -3, - CA_ERROR_OOM = -4, - CA_ERROR_NODRIVER = -5, - CA_ERROR_SYSTEM = -6, - CA_ERROR_CORRUPT = -7, - CA_ERROR_TOOBIG = -8, - CA_ERROR_NOTFOUND = -9, - CA_ERROR_DESTROYED = -10, - CA_ERROR_CANCELED = -11, - CA_ERROR_NOTAVAILABLE = -12, - CA_ERROR_ACCESS = -13, - CA_ERROR_IO = -14, - CA_ERROR_INTERNAL = -15, - CA_ERROR_DISABLED = -16, - CA_ERROR_FORKED = -17, - CA_ERROR_DISCONNECTED = -18, - _CA_ERROR_MAX = -19 -}; - -/** - * ca_proplist: - * - * A canberra property list object. Basically a hashtable. - */ -typedef struct ca_proplist ca_proplist; - -int ca_proplist_create(ca_proplist **p); -int ca_proplist_destroy(ca_proplist *p); -int ca_proplist_sets(ca_proplist *p, const char *key, const char *value); -int ca_proplist_setf(ca_proplist *p, const char *key, const char *format, ...) __attribute__((format(printf, 3, 4))); -int ca_proplist_set(ca_proplist *p, const char *key, const void *data, size_t nbytes); - -int ca_context_create(ca_context **c); -int ca_context_set_driver(ca_context *c, const char *driver); -int ca_context_change_device(ca_context *c, const char *device); -int ca_context_open(ca_context *c); -int ca_context_destroy(ca_context *c); -int ca_context_change_props(ca_context *c, ...) __attribute__((sentinel)); -int ca_context_change_props_full(ca_context *c, ca_proplist *p); -int ca_context_play_full(ca_context *c, uint32_t id, ca_proplist *p, ca_finish_callback_t cb, void *userdata); -int ca_context_play(ca_context *c, uint32_t id, ...) __attribute__((sentinel)); -int ca_context_cache_full(ca_context *c, ca_proplist *p); -int ca_context_cache(ca_context *c, ...) __attribute__((sentinel)); -int ca_context_cancel(ca_context *c, uint32_t id); -int ca_context_playing(ca_context *c, uint32_t id, int *playing); - -const char *ca_strerror(int code); - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/.flatpak-builder/cache/objects/58/b05e0b78c1387068008be2530905bf46fec51debf9dd7c353d5da817507688.file b/.flatpak-builder/cache/objects/58/b05e0b78c1387068008be2530905bf46fec51debf9dd7c353d5da817507688.file deleted file mode 100644 index b779caa..0000000 --- a/.flatpak-builder/cache/objects/58/b05e0b78c1387068008be2530905bf46fec51debf9dd7c353d5da817507688.file +++ /dev/null @@ -1,11 +0,0 @@ -prefix=/app -exec_prefix=${prefix} -libdir=${exec_prefix}/lib -includedir=${prefix}/include - -Name: libcanberra -Description: Event Sound API -Version: 0.30 -Libs: -L${libdir} -lcanberra -Cflags: -D_REENTRANT -I${includedir} -Requires: diff --git a/.flatpak-builder/cache/objects/59/2e0f2e103acca44b913d070dac202f610986c853f0ac2a6ee6ed9624c27eaa.file b/.flatpak-builder/cache/objects/59/2e0f2e103acca44b913d070dac202f610986c853f0ac2a6ee6ed9624c27eaa.file deleted file mode 100644 index c0effd6..0000000 Binary files a/.flatpak-builder/cache/objects/59/2e0f2e103acca44b913d070dac202f610986c853f0ac2a6ee6ed9624c27eaa.file and /dev/null differ diff --git a/.flatpak-builder/cache/objects/59/fac65baf5744d11ff831fc60ac3b358ca10b1d41c7273145a29fee348453c4.dirtree b/.flatpak-builder/cache/objects/59/fac65baf5744d11ff831fc60ac3b358ca10b1d41c7273145a29fee348453c4.dirtree deleted file mode 100644 index 0c0980a..0000000 Binary files a/.flatpak-builder/cache/objects/59/fac65baf5744d11ff831fc60ac3b358ca10b1d41c7273145a29fee348453c4.dirtree and /dev/null differ diff --git a/.flatpak-builder/cache/objects/5a/969185121510f655337e284d7b7eaef0a31bbe6be0747d00594755a93f816c.dirtree b/.flatpak-builder/cache/objects/5a/969185121510f655337e284d7b7eaef0a31bbe6be0747d00594755a93f816c.dirtree deleted file mode 100644 index 4ec46f4..0000000 Binary files a/.flatpak-builder/cache/objects/5a/969185121510f655337e284d7b7eaef0a31bbe6be0747d00594755a93f816c.dirtree and /dev/null differ diff --git a/.flatpak-builder/cache/objects/5b/fc76fd64b7a4898018fe47aa498b5605c9982860daaa91f2945b787540b795.file b/.flatpak-builder/cache/objects/5b/fc76fd64b7a4898018fe47aa498b5605c9982860daaa91f2945b787540b795.file deleted file mode 100644 index ddbf700..0000000 Binary files a/.flatpak-builder/cache/objects/5b/fc76fd64b7a4898018fe47aa498b5605c9982860daaa91f2945b787540b795.file and /dev/null differ diff --git a/.flatpak-builder/cache/objects/5e/34827991bcf7fe97f4885fe8d53abc61dc99d5419cfe38352d2ec6249cbed0.file b/.flatpak-builder/cache/objects/5e/34827991bcf7fe97f4885fe8d53abc61dc99d5419cfe38352d2ec6249cbed0.file deleted file mode 100644 index c25b7b1..0000000 --- a/.flatpak-builder/cache/objects/5e/34827991bcf7fe97f4885fe8d53abc61dc99d5419cfe38352d2ec6249cbed0.file +++ /dev/null @@ -1,212 +0,0 @@ -## intltool.m4 - Configure intltool for the target system. -*-Shell-script-*- -## Copyright (C) 2001 Eazel, Inc. -## Author: Maciej Stachowiak -## Kenneth Christiansen -## -## This program is free software; you can redistribute it and/or modify -## it under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 2 of the License, or -## (at your option) any later version. -## -## This program 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 -## General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with this program; if not, write to the Free Software -## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -## -## As a special exception to the GNU General Public License, if you -## distribute this file as part of a program that contains a -## configuration script generated by Autoconf, you may include it under -## the same distribution terms that you use for the rest of that program. - -dnl IT_PROG_INTLTOOL([MINIMUM-VERSION], [no-xml]) -# serial 42 IT_PROG_INTLTOOL -AC_DEFUN([IT_PROG_INTLTOOL], [ -AC_PREREQ([2.50])dnl -AC_REQUIRE([AM_NLS])dnl - -case "$am__api_version" in - 1.[01234]) - AC_MSG_ERROR([Automake 1.5 or newer is required to use intltool]) - ;; - *) - ;; -esac - -INTLTOOL_REQUIRED_VERSION_AS_INT=`echo $1 | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'` -INTLTOOL_APPLIED_VERSION=`intltool-update --version | head -1 | cut -d" " -f3` -INTLTOOL_APPLIED_VERSION_AS_INT=`echo $INTLTOOL_APPLIED_VERSION | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'` -if test -n "$1"; then - AC_MSG_CHECKING([for intltool >= $1]) - AC_MSG_RESULT([$INTLTOOL_APPLIED_VERSION found]) - test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT" || - AC_MSG_ERROR([Your intltool is too old. You need intltool $1 or later.]) -fi - -AC_PATH_PROG(INTLTOOL_UPDATE, [intltool-update]) -AC_PATH_PROG(INTLTOOL_MERGE, [intltool-merge]) -AC_PATH_PROG(INTLTOOL_EXTRACT, [intltool-extract]) -if test -z "$INTLTOOL_UPDATE" -o -z "$INTLTOOL_MERGE" -o -z "$INTLTOOL_EXTRACT"; then - AC_MSG_ERROR([The intltool scripts were not found. Please install intltool.]) -fi - -if test -z "$AM_DEFAULT_VERBOSITY"; then - AM_DEFAULT_VERBOSITY=1 -fi -AC_SUBST([AM_DEFAULT_VERBOSITY]) - -INTLTOOL_V_MERGE='$(INTLTOOL__v_MERGE_$(V))' -INTLTOOL__v_MERGE_='$(INTLTOOL__v_MERGE_$(AM_DEFAULT_VERBOSITY))' -INTLTOOL__v_MERGE_0='@echo " ITMRG " [$]@;' -AC_SUBST(INTLTOOL_V_MERGE) -AC_SUBST(INTLTOOL__v_MERGE_) -AC_SUBST(INTLTOOL__v_MERGE_0) - -INTLTOOL_V_MERGE_OPTIONS='$(intltool__v_merge_options_$(V))' -intltool__v_merge_options_='$(intltool__v_merge_options_$(AM_DEFAULT_VERBOSITY))' -intltool__v_merge_options_0='-q' -AC_SUBST(INTLTOOL_V_MERGE_OPTIONS) -AC_SUBST(intltool__v_merge_options_) -AC_SUBST(intltool__v_merge_options_0) - - INTLTOOL_DESKTOP_RULE='%.desktop: %.desktop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' -INTLTOOL_DIRECTORY_RULE='%.directory: %.directory.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' - INTLTOOL_KEYS_RULE='%.keys: %.keys.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -k -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' - INTLTOOL_PROP_RULE='%.prop: %.prop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' - INTLTOOL_OAF_RULE='%.oaf: %.oaf.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -o -p $(top_srcdir)/po $< [$]@' - INTLTOOL_PONG_RULE='%.pong: %.pong.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' - INTLTOOL_SERVER_RULE='%.server: %.server.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -o -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' - INTLTOOL_SHEET_RULE='%.sheet: %.sheet.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' -INTLTOOL_SOUNDLIST_RULE='%.soundlist: %.soundlist.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' - INTLTOOL_UI_RULE='%.ui: %.ui.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' - INTLTOOL_XML_RULE='%.xml: %.xml.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' -if test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge 5000; then - INTLTOOL_XML_NOMERGE_RULE='%.xml: %.xml.in $(INTLTOOL_MERGE) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u --no-translations $< [$]@' -else - INTLTOOL_XML_NOMERGE_RULE='%.xml: %.xml.in $(INTLTOOL_MERGE) ; $(INTLTOOL_V_MERGE)_it_tmp_dir=tmp.intltool.[$][$]RANDOM && mkdir [$][$]_it_tmp_dir && LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u [$][$]_it_tmp_dir $< [$]@ && rmdir [$][$]_it_tmp_dir' -fi - INTLTOOL_XAM_RULE='%.xam: %.xml.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' - INTLTOOL_KBD_RULE='%.kbd: %.kbd.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -m -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' - INTLTOOL_CAVES_RULE='%.caves: %.caves.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' - INTLTOOL_SCHEMAS_RULE='%.schemas: %.schemas.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -s -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' - INTLTOOL_THEME_RULE='%.theme: %.theme.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' - INTLTOOL_SERVICE_RULE='%.service: %.service.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' - INTLTOOL_POLICY_RULE='%.policy: %.policy.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' - -_IT_SUBST(INTLTOOL_DESKTOP_RULE) -_IT_SUBST(INTLTOOL_DIRECTORY_RULE) -_IT_SUBST(INTLTOOL_KEYS_RULE) -_IT_SUBST(INTLTOOL_PROP_RULE) -_IT_SUBST(INTLTOOL_OAF_RULE) -_IT_SUBST(INTLTOOL_PONG_RULE) -_IT_SUBST(INTLTOOL_SERVER_RULE) -_IT_SUBST(INTLTOOL_SHEET_RULE) -_IT_SUBST(INTLTOOL_SOUNDLIST_RULE) -_IT_SUBST(INTLTOOL_UI_RULE) -_IT_SUBST(INTLTOOL_XAM_RULE) -_IT_SUBST(INTLTOOL_KBD_RULE) -_IT_SUBST(INTLTOOL_XML_RULE) -_IT_SUBST(INTLTOOL_XML_NOMERGE_RULE) -_IT_SUBST(INTLTOOL_CAVES_RULE) -_IT_SUBST(INTLTOOL_SCHEMAS_RULE) -_IT_SUBST(INTLTOOL_THEME_RULE) -_IT_SUBST(INTLTOOL_SERVICE_RULE) -_IT_SUBST(INTLTOOL_POLICY_RULE) - -# Check the gettext tools to make sure they are GNU -AC_PATH_PROG(XGETTEXT, xgettext) -AC_PATH_PROG(MSGMERGE, msgmerge) -AC_PATH_PROG(MSGFMT, msgfmt) -AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT) -if test -z "$XGETTEXT" -o -z "$MSGMERGE" -o -z "$MSGFMT"; then - AC_MSG_ERROR([GNU gettext tools not found; required for intltool]) -fi -xgversion="`$XGETTEXT --version|grep '(GNU ' 2> /dev/null`" -mmversion="`$MSGMERGE --version|grep '(GNU ' 2> /dev/null`" -mfversion="`$MSGFMT --version|grep '(GNU ' 2> /dev/null`" -if test -z "$xgversion" -o -z "$mmversion" -o -z "$mfversion"; then - AC_MSG_ERROR([GNU gettext tools not found; required for intltool]) -fi - -AC_PATH_PROG(INTLTOOL_PERL, perl) -if test -z "$INTLTOOL_PERL"; then - AC_MSG_ERROR([perl not found]) -fi -AC_MSG_CHECKING([for perl >= 5.8.1]) -$INTLTOOL_PERL -e "use 5.8.1;" > /dev/null 2>&1 -if test $? -ne 0; then - AC_MSG_ERROR([perl 5.8.1 is required for intltool]) -else - IT_PERL_VERSION=`$INTLTOOL_PERL -e "printf '%vd', $^V"` - AC_MSG_RESULT([$IT_PERL_VERSION]) -fi -if test "x$2" != "xno-xml"; then - AC_MSG_CHECKING([for XML::Parser]) - if `$INTLTOOL_PERL -e "require XML::Parser" 2>/dev/null`; then - AC_MSG_RESULT([ok]) - else - AC_MSG_ERROR([XML::Parser perl module is required for intltool]) - fi -fi - -# Substitute ALL_LINGUAS so we can use it in po/Makefile -AC_SUBST(ALL_LINGUAS) - -IT_PO_SUBDIR([po]) - -]) - - -# IT_PO_SUBDIR(DIRNAME) -# --------------------- -# All po subdirs have to be declared with this macro; the subdir "po" is -# declared by IT_PROG_INTLTOOL. -# -AC_DEFUN([IT_PO_SUBDIR], -[AC_PREREQ([2.53])dnl We use ac_top_srcdir inside AC_CONFIG_COMMANDS. -dnl -dnl The following CONFIG_COMMANDS should be executed at the very end -dnl of config.status. -AC_CONFIG_COMMANDS_PRE([ - AC_CONFIG_COMMANDS([$1/stamp-it], [ - if [ ! grep "^# INTLTOOL_MAKEFILE$" "$1/Makefile.in" > /dev/null ]; then - AC_MSG_ERROR([$1/Makefile.in.in was not created by intltoolize.]) - fi - rm -f "$1/stamp-it" "$1/stamp-it.tmp" "$1/POTFILES" "$1/Makefile.tmp" - >"$1/stamp-it.tmp" - [sed '/^#/d - s/^[[].*] *// - /^[ ]*$/d - '"s|^| $ac_top_srcdir/|" \ - "$srcdir/$1/POTFILES.in" | sed '$!s/$/ \\/' >"$1/POTFILES" - ] - [sed '/^POTFILES =/,/[^\\]$/ { - /^POTFILES =/!d - r $1/POTFILES - } - ' "$1/Makefile.in" >"$1/Makefile"] - rm -f "$1/Makefile.tmp" - mv "$1/stamp-it.tmp" "$1/stamp-it" - ]) -])dnl -]) - -# _IT_SUBST(VARIABLE) -# ------------------- -# Abstract macro to do either _AM_SUBST_NOTMAKE or AC_SUBST -# -AC_DEFUN([_IT_SUBST], -[ -AC_SUBST([$1]) -m4_ifdef([_AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE([$1])]) -] -) - -# deprecated macros -AU_ALIAS([AC_PROG_INTLTOOL], [IT_PROG_INTLTOOL]) -# A hint is needed for aclocal from Automake <= 1.9.4: -# AC_DEFUN([AC_PROG_INTLTOOL], ...) - diff --git a/.flatpak-builder/cache/objects/5f/2038d1c2d8733eedd503255ae79974d52d85acd17a92f1448e1d3a73fc2120.file b/.flatpak-builder/cache/objects/5f/2038d1c2d8733eedd503255ae79974d52d85acd17a92f1448e1d3a73fc2120.file deleted file mode 100644 index cb56868..0000000 --- a/.flatpak-builder/cache/objects/5f/2038d1c2d8733eedd503255ae79974d52d85acd17a92f1448e1d3a73fc2120.file +++ /dev/null @@ -1,123 +0,0 @@ -/* gsound-context.h - * - * Copyright (C) 2013 Tristan Brindle - * - * This file 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. - * - * This file 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 General Public License - * along with this program. If not, see . - */ - -#ifndef GSOUND_CONTEXT_H -#define GSOUND_CONTEXT_H - -#include - -#include "gsound-attr.h" - -G_BEGIN_DECLS -#define GSOUND_TYPE_CONTEXT (gsound_context_get_type ()) -#define GSOUND_CONTEXT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GSOUND_TYPE_CONTEXT, GSoundContext)) -#define GSOUND_CONTEXT_CLASS(obj) (G_TYPE_CHECK_CLASS_CAST ((obj), GSOUND_TYPE_CONTEXT, GSoundContextClass)) -#define GSOUND_IS_CONTEXT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GSOUND_TYPE_CONTEXT)) -#define GSOUND_IS_CONTEXT_CLASS(obj) (G_TYPE_CHECK_CLASS_TYPE ((obj), GSOUND_TYPE_CONTEXT)) -#define GSOUND_CONTEXT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GSOUND_TYPE_CONTEXT, GSoundContextClass)) -typedef struct _GSoundContext GSoundContext; -typedef struct _GSoundContextClass GSoundContextClass; - -/** - * GSoundContext: - * ca: the wrapped context - * - * Wrapper for ca_context. - */ - -#define GSOUND_ERROR (gsound_error_quark()) -GQuark gsound_error_quark(void); - -typedef enum -{ - GSOUND_ERROR_NOTSUPPORTED = -1, - GSOUND_ERROR_INVALID = -2, - GSOUND_ERROR_STATE = -3, - GSOUND_ERROR_OOM = -4, - GSOUND_ERROR_NODRIVER = -5, - GSOUND_ERROR_SYSTEM = -6, - GSOUND_ERROR_CORRUPT = -7, - GSOUND_ERROR_TOOBIG = -8, - GSOUND_ERROR_NOTFOUND = -9, - GSOUND_ERROR_DESTROYED = -10, - GSOUND_ERROR_CANCELED = -11, - GSOUND_ERROR_NOTAVAILABLE = -12, - GSOUND_ERROR_ACCESS = -13, - GSOUND_ERROR_IO = -14, - GSOUND_ERROR_INTERNAL = -15, - GSOUND_ERROR_DISABLED = -16, - GSOUND_ERROR_FORKED = -17, - GSOUND_ERROR_DISCONNECTED = -18 -} GSoundError; -GType gsound_context_get_type (void); - -GSoundContext *gsound_context_new (GCancellable *cancellable, - GError **error); - -gboolean gsound_context_open (GSoundContext *context, - GError **error); - -gboolean gsound_context_set_attributes (GSoundContext *context, - GError **error, - ...) G_GNUC_NULL_TERMINATED; - -gboolean gsound_context_set_attributesv (GSoundContext *context, - GHashTable *attrs, - GError **error); - -gboolean gsound_context_set_driver (GSoundContext *context, - const char *driver, - GError **error); - -gboolean gsound_context_play_simple (GSoundContext *context, - GCancellable *cancellable, - GError **error, - ...) G_GNUC_NULL_TERMINATED; - -gboolean gsound_context_play_simplev (GSoundContext *context, - GHashTable *attrs, - GCancellable *cancellable, - GError **error); - -void gsound_context_play_full (GSoundContext *context, - GCancellable *cancellable, - GAsyncReadyCallback callback, - gpointer user_data, - ...) G_GNUC_NULL_TERMINATED; - -void gsound_context_play_fullv (GSoundContext *context, - GHashTable *attrs, - GCancellable *cancellable, - GAsyncReadyCallback callback, - gpointer user_data); - -gboolean gsound_context_play_full_finish (GSoundContext *context, - GAsyncResult *result, - GError **error); - -gboolean gsound_context_cache (GSoundContext *context, - GError **error, - ...) G_GNUC_NULL_TERMINATED; - -gboolean gsound_context_cachev (GSoundContext *context, - GHashTable *attrs, - GError **error); - -G_END_DECLS -#endif /* GSOUND_CONTEXT_H */ - diff --git a/.flatpak-builder/cache/objects/60/f6ba7e3a7185dc43def41d06c82407714043fd3cfee5499e619eec80176150.file b/.flatpak-builder/cache/objects/60/f6ba7e3a7185dc43def41d06c82407714043fd3cfee5499e619eec80176150.file deleted file mode 100644 index df355af..0000000 --- a/.flatpak-builder/cache/objects/60/f6ba7e3a7185dc43def41d06c82407714043fd3cfee5499e619eec80176150.file +++ /dev/null @@ -1,74 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/.flatpak-builder/cache/objects/63/69e61aabed840cf4826a0390370cb4045544e2e7ec1926b75eb9b5ab27e4c2.file b/.flatpak-builder/cache/objects/63/69e61aabed840cf4826a0390370cb4045544e2e7ec1926b75eb9b5ab27e4c2.file deleted file mode 100644 index 9697888..0000000 Binary files a/.flatpak-builder/cache/objects/63/69e61aabed840cf4826a0390370cb4045544e2e7ec1926b75eb9b5ab27e4c2.file and /dev/null differ diff --git a/.flatpak-builder/cache/objects/63/bfcb879547cfdfd7d796baff150169ce882b02fa0d0ce02ca10984be9161e9.dirtree b/.flatpak-builder/cache/objects/63/bfcb879547cfdfd7d796baff150169ce882b02fa0d0ce02ca10984be9161e9.dirtree deleted file mode 100644 index 788a07f..0000000 Binary files a/.flatpak-builder/cache/objects/63/bfcb879547cfdfd7d796baff150169ce882b02fa0d0ce02ca10984be9161e9.dirtree and /dev/null differ diff --git a/.flatpak-builder/cache/objects/64/e2ad6d6ba9d880769dc5d11efbacd8f1e40373f6b212dc42aaa2fc410467cc.file b/.flatpak-builder/cache/objects/64/e2ad6d6ba9d880769dc5d11efbacd8f1e40373f6b212dc42aaa2fc410467cc.file deleted file mode 100644 index cc72e7f..0000000 --- a/.flatpak-builder/cache/objects/64/e2ad6d6ba9d880769dc5d11efbacd8f1e40373f6b212dc42aaa2fc410467cc.file +++ /dev/null @@ -1,10 +0,0 @@ -prefix=/app -includedir=${prefix}/include -libdir=${prefix}/lib - -Name: gsound -Description: GObject wrapper for libcanberra -Version: 1.0.3 -Requires.private: gobject-2.0, gio-2.0, libcanberra -Libs: -L${libdir} -lgsound -Cflags: -I${includedir} diff --git a/.flatpak-builder/cache/objects/65/c39aba45ce515dc8749835938fcb84c9c0f4e9c43a51b1e0f54670be1e143c.file b/.flatpak-builder/cache/objects/65/c39aba45ce515dc8749835938fcb84c9c0f4e9c43a51b1e0f54670be1e143c.file deleted file mode 120000 index a1ce115..0000000 --- a/.flatpak-builder/cache/objects/65/c39aba45ce515dc8749835938fcb84c9c0f4e9c43a51b1e0f54670be1e143c.file +++ /dev/null @@ -1 +0,0 @@ -libcanberra-gtk3-module.so \ No newline at end of file diff --git a/.flatpak-builder/cache/objects/66/5271714217e5b47df3658525aa728772d88bd39f0656b6ce51f9d45e10b64d.file b/.flatpak-builder/cache/objects/66/5271714217e5b47df3658525aa728772d88bd39f0656b6ce51f9d45e10b64d.file deleted file mode 120000 index 1738a0c..0000000 --- a/.flatpak-builder/cache/objects/66/5271714217e5b47df3658525aa728772d88bd39f0656b6ce51f9d45e10b64d.file +++ /dev/null @@ -1 +0,0 @@ -libgsound.so.0.0.2 \ No newline at end of file diff --git a/.flatpak-builder/cache/objects/67/4dd835206fb66c14c6dc06748af89580ceee7341c3d0166bfc2e75549eea55.dirtree b/.flatpak-builder/cache/objects/67/4dd835206fb66c14c6dc06748af89580ceee7341c3d0166bfc2e75549eea55.dirtree deleted file mode 100644 index c8c147e..0000000 Binary files a/.flatpak-builder/cache/objects/67/4dd835206fb66c14c6dc06748af89580ceee7341c3d0166bfc2e75549eea55.dirtree and /dev/null differ diff --git a/.flatpak-builder/cache/objects/68/4bf70cc3ba533d3f9b12577cae4f75d6bb2af456673006ec69527900e4e79e.file b/.flatpak-builder/cache/objects/68/4bf70cc3ba533d3f9b12577cae4f75d6bb2af456673006ec69527900e4e79e.file deleted file mode 100755 index 8a9af0b..0000000 --- a/.flatpak-builder/cache/objects/68/4bf70cc3ba533d3f9b12577cae4f75d6bb2af456673006ec69527900e4e79e.file +++ /dev/null @@ -1,41 +0,0 @@ -# libcanberra-gtk3.la - a libtool library file -# Generated by libtool (GNU libtool) 2.4.2 -# -# Please DO NOT delete this file! -# It is necessary for linking the library. - -# The name that we can dlopen(3). -dlname='libcanberra-gtk3.so.0' - -# Names of this library. -library_names='libcanberra-gtk3.so.0.1.9 libcanberra-gtk3.so.0 libcanberra-gtk3.so' - -# The name of the static archive. -old_library='' - -# Linker flags that can not go in dependency_libs. -inherited_linker_flags=' -pthread' - -# Libraries that this one depends upon. -dependency_libs=' -L/app/lib -lX11 -lgthread-2.0 -lgtk-3 -latk-1.0 -lgio-2.0 -lharfbuzz -lgdk-3 -lz -lpangocairo-1.0 -lpango-1.0 -lgdk_pixbuf-2.0 -lcairo-gobject -lcairo -lgobject-2.0 -lglib-2.0 /app/lib/libcanberra.la -lvorbisfile -lltdl -lm' - -# Names of additional weak libraries provided by this library -weak_library_names='' - -# Version information for libcanberra-gtk3. -current=1 -age=1 -revision=9 - -# Is this an already installed library? -installed=yes - -# Should we warn about portability when linking against -modules? -shouldnotlink=no - -# Files to dlopen/dlpreopen -dlopen='' -dlpreopen='' - -# Directory that this library needs to be installed in: -libdir='/app/lib' diff --git a/.flatpak-builder/cache/objects/68/4e36e2d4195a6b02da2d20cb367ef70964127ade8a734afd9888fadec8b682.dirtree b/.flatpak-builder/cache/objects/68/4e36e2d4195a6b02da2d20cb367ef70964127ade8a734afd9888fadec8b682.dirtree deleted file mode 100644 index d91fb17..0000000 Binary files a/.flatpak-builder/cache/objects/68/4e36e2d4195a6b02da2d20cb367ef70964127ade8a734afd9888fadec8b682.dirtree and /dev/null differ diff --git a/.flatpak-builder/cache/objects/68/a70d32d9c1cd9516daf7a089fe3fe80b67cd688b262b21eb02dbe7315cddc2.file b/.flatpak-builder/cache/objects/68/a70d32d9c1cd9516daf7a089fe3fe80b67cd688b262b21eb02dbe7315cddc2.file deleted file mode 100644 index b44821a..0000000 --- a/.flatpak-builder/cache/objects/68/a70d32d9c1cd9516daf7a089fe3fe80b67cd688b262b21eb02dbe7315cddc2.file +++ /dev/null @@ -1,40 +0,0 @@ -/*-*- Mode: C; c-basic-offset: 8 -*-*/ - -#ifndef foocanberrasoundthemespechfoo -#define foocanberrasoundthemespechfoo - -/*** - This file is part of libcanberra. - - Copyright 2008 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 - . -***/ - -#include "read-sound-file.h" -#include "proplist.h" - -typedef struct ca_theme_data ca_theme_data; - -typedef int (*ca_sound_file_open_callback_t)(ca_sound_file **f, const char *fn); - -int ca_lookup_sound(ca_sound_file **f, char **sound_path, ca_theme_data **t, ca_proplist *cp, ca_proplist *sp); -int ca_lookup_sound_with_callback(ca_sound_file **f, ca_sound_file_open_callback_t sfopen, char **sound_path, ca_theme_data **t, ca_proplist *cp, ca_proplist *sp); -void ca_theme_data_free(ca_theme_data *t); - -int ca_get_data_home(char **e); -const char *ca_get_data_dirs(void); - -#endif diff --git a/.flatpak-builder/cache/objects/69/290b92d01fb48c7b76dc111a4b6ca7e4783368021b034ea29b9d5a3888f161.dirtree b/.flatpak-builder/cache/objects/69/290b92d01fb48c7b76dc111a4b6ca7e4783368021b034ea29b9d5a3888f161.dirtree deleted file mode 100644 index 2cf4ad7..0000000 Binary files a/.flatpak-builder/cache/objects/69/290b92d01fb48c7b76dc111a4b6ca7e4783368021b034ea29b9d5a3888f161.dirtree and /dev/null differ diff --git a/.flatpak-builder/cache/objects/69/4ed53875c0cb5d85e773564cf520f68c11ff18eb9550755c06056ebd413b34.file b/.flatpak-builder/cache/objects/69/4ed53875c0cb5d85e773564cf520f68c11ff18eb9550755c06056ebd413b34.file deleted file mode 100755 index 45af4d5..0000000 --- a/.flatpak-builder/cache/objects/69/4ed53875c0cb5d85e773564cf520f68c11ff18eb9550755c06056ebd413b34.file +++ /dev/null @@ -1,1510 +0,0 @@ -#!/usr/bin/perl -w -# -*- Mode: perl; indent-tabs-mode: nil; c-basic-offset: 4 -*- - -# -# The Intltool Message Merger -# -# Copyright (C) 2000, 2003 Free Software Foundation. -# Copyright (C) 2000, 2001 Eazel, Inc -# -# Intltool is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License -# version 2 published by the Free Software Foundation. -# -# Intltool 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 -# General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -# -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. -# -# Authors: Maciej Stachowiak -# Kenneth Christiansen -# Darin Adler -# -# Proper XML UTF-8'ification written by Cyrille Chepelov -# - -## Release information -my $PROGRAM = "intltool-merge"; -my $PACKAGE = "intltool"; -my $VERSION = "0.51.0"; - -## Loaded modules -use strict; -use Getopt::Long; -use Text::Wrap; -use File::Basename; -use Encode; - -my $must_end_tag = -1; -my $last_depth = -1; -my $translation_depth = -1; -my @tag_stack = (); -my @entered_tag = (); -my @translation_strings = (); -my $leading_space = ""; - -## Scalars used by the option stuff -my $HELP_ARG = 0; -my $VERSION_ARG = 0; -my $BA_STYLE_ARG = 0; -my $XML_STYLE_ARG = 0; -my $KEYS_STYLE_ARG = 0; -my $DESKTOP_STYLE_ARG = 0; -my $SCHEMAS_STYLE_ARG = 0; -my $RFC822DEB_STYLE_ARG = 0; -my $QUOTED_STYLE_ARG = 0; -my $QUOTEDXML_STYLE_ARG = 0; -my $QUIET_ARG = 0; -my $PASS_THROUGH_ARG = 0; -my $UTF8_ARG = 0; -my $MULTIPLE_OUTPUT = 0; -my $NO_TRANSLATIONS_ARG = 0; -my $cache_file; - -## Handle options -GetOptions -( - "help" => \$HELP_ARG, - "version" => \$VERSION_ARG, - "quiet|q" => \$QUIET_ARG, - "oaf-style|o" => \$BA_STYLE_ARG, ## for compatibility - "ba-style|b" => \$BA_STYLE_ARG, - "xml-style|x" => \$XML_STYLE_ARG, - "keys-style|k" => \$KEYS_STYLE_ARG, - "desktop-style|d" => \$DESKTOP_STYLE_ARG, - "schemas-style|s" => \$SCHEMAS_STYLE_ARG, - "rfc822deb-style|r" => \$RFC822DEB_STYLE_ARG, - "quoted-style" => \$QUOTED_STYLE_ARG, - "quotedxml-style" => \$QUOTEDXML_STYLE_ARG, - "pass-through|p" => \$PASS_THROUGH_ARG, - "utf8|u" => \$UTF8_ARG, - "multiple-output|m" => \$MULTIPLE_OUTPUT, - "no-translations" => \$NO_TRANSLATIONS_ARG, - "cache|c=s" => \$cache_file - ) or &error; - -my $PO_DIR; -my $FILE; -my $OUTFILE; - -my %po_files_by_lang = (); -my %translations = (); - -# Use this instead of \w for XML files to handle more possible characters. -my $w = "[-A-Za-z0-9._:]"; - -# XML quoted string contents -my $q = "[^\\\"]*"; - -## Check for options. - -if ($VERSION_ARG) -{ - &print_version; -} -elsif ($HELP_ARG) -{ - &print_help; -} -elsif ($BA_STYLE_ARG && @ARGV > 2) -{ - &utf8_sanity_check; - &preparation; - &print_message; - &ba_merge_translations; - &finalize; -} -elsif ($XML_STYLE_ARG && (@ARGV > 2 || ($NO_TRANSLATIONS_ARG && @ARGV > 1))) -{ - &utf8_sanity_check; - &preparation; - &print_message; - &xml_merge_output; - &finalize; -} -elsif ($KEYS_STYLE_ARG && @ARGV > 2) -{ - &utf8_sanity_check; - &preparation; - &print_message; - &keys_merge_translations; - &finalize; -} -elsif ($DESKTOP_STYLE_ARG && @ARGV > 2) -{ - &utf8_sanity_check; - &preparation; - &print_message; - &desktop_merge_translations; - &finalize; -} -elsif ($SCHEMAS_STYLE_ARG && @ARGV > 2) -{ - &utf8_sanity_check; - &preparation; - &print_message; - &schemas_merge_translations; - &finalize; -} -elsif ($RFC822DEB_STYLE_ARG && @ARGV > 2) -{ - &preparation; - &print_message; - &rfc822deb_merge_translations; - &finalize; -} -elsif (($QUOTED_STYLE_ARG || $QUOTEDXML_STYLE_ARG) && @ARGV > 2) -{ - &utf8_sanity_check; - &preparation; - &print_message; - "ed_merge_translations($QUOTEDXML_STYLE_ARG); - &finalize; -} -else -{ - &print_help; -} - -exit; - -## Sub for printing release information -sub print_version -{ - print <<_EOF_; -${PROGRAM} (${PACKAGE}) ${VERSION} -Written by Maciej Stachowiak, Darin Adler and Kenneth Christiansen. - -Copyright (C) 2000-2003 Free Software Foundation, Inc. -Copyright (C) 2000-2001 Eazel, Inc. -This is free software; see the source for copying conditions. There is NO -warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -_EOF_ - exit; -} - -## Sub for printing usage information -sub print_help -{ - print <<_EOF_; -Usage: ${PROGRAM} [OPTION]... PO_DIRECTORY FILENAME OUTPUT_FILE -Generates an output file that includes some localized attributes from an -untranslated source file. - -Mandatory options: (exactly one must be specified) - -b, --ba-style includes translations in the bonobo-activation style - -d, --desktop-style includes translations in the desktop style - -k, --keys-style includes translations in the keys style - -s, --schemas-style includes translations in the schemas style - -r, --rfc822deb-style includes translations in the RFC822 style - --quoted-style includes translations in the quoted string style - --quotedxml-style includes translations in the quoted xml string style - -x, --xml-style includes translations in the standard xml style - -Other options: - -u, --utf8 convert all strings to UTF-8 before merging - (default for everything except RFC822 style) - -p, --pass-through deprecated, does nothing and issues a warning - -m, --multiple-output output one localized file per locale, instead of - a single file containing all localized elements - --no-translations do not merge any translations: only generates the - unlocalised (English) version -- applies only - to XML merging - -c, --cache=FILE specify cache file name - (usually \$top_builddir/po/.intltool-merge-cache) - -q, --quiet suppress most messages - --help display this help and exit - --version output version information and exit - -Report bugs to http://bugs.launchpad.net/intltool -_EOF_ - exit; -} - - -## Sub for printing error messages -sub print_error -{ - print STDERR "Try `${PROGRAM} --help' for more information.\n"; - exit; -} - - -sub print_message -{ - print "Merging translations into $OUTFILE.\n" unless $QUIET_ARG; -} - - -sub preparation -{ - if (!$XML_STYLE_ARG || !$NO_TRANSLATIONS_ARG) { - $PO_DIR = $ARGV[0]; - $FILE = $ARGV[1]; - $OUTFILE = $ARGV[2]; - - &gather_po_files; - &get_translation_database; - } else { - $FILE = $ARGV[0]; - $OUTFILE = $ARGV[1]; - } -} - -# General-purpose code for looking up translations in .po files - -sub po_file2lang -{ - my ($tmp) = @_; - $tmp =~ s/^.*\/(.*)\.po$/$1/; - return $tmp; -} - -sub gather_po_files -{ - if (my $linguas = $ENV{"LINGUAS"}) - { - for my $lang (split / /, $linguas) { - my $po_file = $PO_DIR . "/" . $lang . ".po"; - if (-e $po_file) { - $po_files_by_lang{$lang} = $po_file; - } - } - } - else - { - if (open LINGUAS_FILE, "$PO_DIR/LINGUAS") - { - while () - { - next if /^#/; - - for my $lang (split) - { - chomp ($lang); - my $po_file = $PO_DIR . "/" . $lang . ".po"; - if (-e $po_file) { - $po_files_by_lang{$lang} = $po_file; - } - } - } - - close LINGUAS_FILE; - } - else - { - for my $po_file (glob "$PO_DIR/*.po") { - $po_files_by_lang{po_file2lang($po_file)} = $po_file; - } - } - } -} - -sub get_po_encoding -{ - my ($in_po_file) = @_; - my $encoding = ""; - - open IN_PO_FILE, $in_po_file or die; - while () - { - ## example: "Content-Type: text/plain; charset=ISO-8859-1\n" - if (/Content-Type\:.*charset=([-a-zA-Z0-9]+)\\n/) - { - $encoding = $1; - last; - } - } - close IN_PO_FILE; - - if (!$encoding) - { - print STDERR "Warning: no encoding found in $in_po_file. Assuming ISO-8859-1\n" unless $QUIET_ARG; - $encoding = "ISO-8859-1"; - } - - return $encoding -} - -sub utf8_sanity_check -{ - print STDERR "Warning: option --pass-through has been removed.\n" if $PASS_THROUGH_ARG; - $UTF8_ARG = 1; -} - -sub get_translation_database -{ - if ($cache_file) { - &get_cached_translation_database; - } else { - &create_translation_database; - } -} - -sub get_newest_po_age -{ - my $newest_age; - - foreach my $file (values %po_files_by_lang) - { - my $file_age = -M $file; - $newest_age = $file_age if !$newest_age || $file_age < $newest_age; - } - - $newest_age = 0 if !$newest_age; - - return $newest_age; -} - -sub create_cache -{ - print "Generating and caching the translation database\n" unless $QUIET_ARG; - - &create_translation_database; - - open CACHE, ">$cache_file" || die; - print CACHE join "\x01", %translations; - close CACHE; -} - -sub load_cache -{ - print "Found cached translation database\n" unless $QUIET_ARG; - - my $contents; - open CACHE, "<$cache_file" || die; - { - local $/; - $contents = ; - } - close CACHE; - %translations = split "\x01", $contents; -} - -sub get_cached_translation_database -{ - my $cache_file_age = -M $cache_file; - if (defined $cache_file_age) - { - if ($cache_file_age <= &get_newest_po_age) - { - &load_cache; - return; - } - print "Found too-old cached translation database\n" unless $QUIET_ARG; - } - - &create_cache; -} - -sub add_translation -{ - my ($lang, $encoding, $msgctxt, $msgid, $msgstr) = @_; - - return if !($msgid && $msgstr); - - if ($msgctxt) { - $msgid = "$msgctxt\004$msgid"; - } - if (uc $encoding ne "UTF-8") { - Encode::from_to ($msgid, $encoding, "UTF-8"); - Encode::from_to ($msgstr, $encoding, "UTF-8"); - } - $translations{$lang, $msgid} = $msgstr; -} - -sub create_translation_database -{ - for my $lang (keys %po_files_by_lang) - { - my $po_file = $po_files_by_lang{$lang}; - my $encoding = "UTF-8"; - - if ($UTF8_ARG) - { - $encoding = get_po_encoding ($po_file); - if (uc $encoding ne "UTF-8") { - print "NOTICE: $po_file is not in UTF-8 but $encoding, converting...\n" unless $QUIET_ARG;; - } - } - open PO_FILE, "<$po_file"; - - my $nextfuzzy = 0; - my $inmsgctxt = 0; - my $inmsgid = 0; - my $inmsgstr = 0; - my $msgctxt = ""; - my $msgid = ""; - my $msgstr = ""; - - while () - { - $nextfuzzy = 1 if /^#, fuzzy/; - - if (/^msgctxt "((\\.|[^\\]+)*)"/ ) - { - if ($inmsgstr) { - add_translation ($lang, $encoding, - $msgctxt, $msgid, $msgstr); - $msgctxt = ""; - $msgid = ""; - $msgstr = ""; - } - - $msgctxt = unescape_po_string($1); - $inmsgctxt = 1; - $inmsgid = 0; - $inmsgstr = 0; - } - - if (/^msgid "((\\.|[^\\]+)*)"/ ) - { - if ($inmsgstr) { - add_translation ($lang, $encoding, - $msgctxt, $msgid, $msgstr); - $msgctxt = ""; - $msgid = ""; - $msgstr = ""; - } - - if ($nextfuzzy) { - $inmsgid = 0; - $nextfuzzy = 0; - } else { - $msgid = unescape_po_string($1); - $inmsgid = 1; - } - $inmsgctxt = 0; - $inmsgstr = 0; - } - - if (/^msgstr "((\\.|[^\\]+)*)"/) - { - $msgstr = unescape_po_string($1); - $inmsgstr = 1; - $inmsgctxt = 0; - $inmsgid = 0; - } - - if (/^"((\\.|[^\\]+)*)"/) - { - $msgctxt .= unescape_po_string($1) if $inmsgctxt; - $msgid .= unescape_po_string($1) if $inmsgid; - $msgstr .= unescape_po_string($1) if $inmsgstr; - } - } - add_translation ($lang, $encoding, $msgctxt, $msgid, $msgstr) - if ($inmsgstr); - } -} - -sub finalize -{ -} - -sub unescape_one_sequence -{ - my ($sequence) = @_; - - return "\\" if $sequence eq "\\\\"; - return "\"" if $sequence eq "\\\""; - return "\n" if $sequence eq "\\n"; - return "\r" if $sequence eq "\\r"; - return "\t" if $sequence eq "\\t"; - return "\b" if $sequence eq "\\b"; - return "\f" if $sequence eq "\\f"; - return "\a" if $sequence eq "\\a"; - return chr(11) if $sequence eq "\\v"; # vertical tab, see ascii(7) - - return chr(hex($1)) if ($sequence =~ /\\x([0-9a-fA-F]{2})/); - return chr(oct($1)) if ($sequence =~ /\\([0-7]{3})/); - - # FIXME: Is \0 supported as well? Kenneth and Rodney don't want it, see bug #48489 - - return $sequence; -} - -sub unescape_po_string -{ - my ($string) = @_; - - $string =~ s/(\\x[0-9a-fA-F]{2}|\\[0-7]{3}|\\.)/unescape_one_sequence($1)/eg; - - return $string; -} - -sub entity_decode -{ - local ($_) = @_; - - s/'/'/g; # ' - s/"/"/g; # " - s/<//g; - s/&/&/g; - - return $_; -} - -# entity_encode: (string) -# -# Encode the given string to XML format (encode '<' etc). - -sub entity_encode -{ - my ($pre_encoded) = @_; - - my @list_of_chars = unpack ('C*', $pre_encoded); - - # with UTF-8 we only encode minimalistic - return join ('', map (&entity_encode_int_minimalist, @list_of_chars)); -} - -sub entity_encode_int_minimalist -{ - return """ if $_ == 34; - return "&" if $_ == 38; - return "'" if $_ == 39; - return "<" if $_ == 60; - return ">" if $_ == 62; - return chr $_; -} - -sub entity_encoded_translation -{ - my ($lang, $string) = @_; - - my $translation = $translations{$lang, $string}; - return $string if !$translation; - return entity_encode ($translation); -} - -## XML (bonobo-activation specific) merge code - -sub ba_merge_translations -{ - my $source; - - { - local $/; # slurp mode - open INPUT, "<$FILE" or die "can't open $FILE: $!"; - $source = ; - close INPUT; - } - - open OUTPUT, ">$OUTFILE" or die "can't open $OUTFILE: $!"; - # Binmode so that selftest works ok if using a native Win32 Perl... - binmode (OUTPUT) if $^O eq 'MSWin32'; - - while ($source =~ s|^(.*?)([ \t]*<\s*$w+\s+($w+\s*=\s*"$q"\s*)+/?>)([ \t]*\n)?||s) - { - print OUTPUT $1; - - my $node = $2 . "\n"; - - my @strings = (); - $_ = $node; - while (s/(\s)_($w+\s*=\s*"($q)")/$1$2/s) { - push @strings, entity_decode($3); - } - print OUTPUT; - - my %langs; - for my $string (@strings) - { - for my $lang (keys %po_files_by_lang) - { - $langs{$lang} = 1 if $translations{$lang, $string}; - } - } - - for my $lang (sort keys %langs) - { - $_ = $node; - s/(\sname\s*=\s*)"($q)"/$1"$2-$lang"/s; - s/(\s)_($w+\s*=\s*")($q)"/$1 . $2 . entity_encoded_translation($lang, $3) . '"'/seg; - print OUTPUT; - } - } - - print OUTPUT $source; - - close OUTPUT; -} - - -## XML (non-bonobo-activation) merge code - - -# Process tag attributes -# Only parameter is a HASH containing attributes -> values mapping -sub getAttributeString -{ - my $sub = shift; - my $do_translate = shift || 0; - my $language = shift || ""; - my $result = ""; - my $translate = shift; - foreach my $e (reverse(sort(keys %{ $sub }))) { - my $key = $e; - my $string = $sub->{$e}; - my $quote = '"'; - - $string =~ s/^[\s]+//; - $string =~ s/[\s]+$//; - - if ($string =~ /^'.*'$/) - { - $quote = "'"; - } - $string =~ s/^['"]//g; - $string =~ s/['"]$//g; - - if ($do_translate && $key =~ /^_/) { - $key =~ s|^_||g; - if ($language) { - # Handle translation - my $decode_string = entity_decode($string); - my $translation = $translations{$language, $decode_string}; - if ($translation) { - $translation = entity_encode($translation); - $string = $translation; - } - $$translate = 2; - } else { - $$translate = 2 if ($translate && (!$$translate)); # watch not to "overwrite" $translate - } - } - - $result .= " $key=$quote$string$quote"; - } - return $result; -} - -# Returns a translatable string from XML node, it works on contents of every node in XML::Parser tree -sub getXMLstring -{ - my $ref = shift; - my $spacepreserve = shift || 0; - my @list = @{ $ref }; - my $result = ""; - - my $count = scalar(@list); - my $attrs = $list[0]; - my $index = 1; - - $spacepreserve = 1 if ((exists $attrs->{"xml:space"}) && ($attrs->{"xml:space"} =~ /^["']?preserve["']?$/)); - $spacepreserve = 0 if ((exists $attrs->{"xml:space"}) && ($attrs->{"xml:space"} =~ /^["']?default["']?$/)); - - while ($index < $count) { - my $type = $list[$index]; - my $content = $list[$index+1]; - if (! $type ) { - # We've got CDATA - if ($content) { - # lets strip the whitespace here, and *ONLY* here - $content =~ s/\s+/ /gs if (!$spacepreserve); - $result .= $content; - } - } elsif ( "$type" ne "1" ) { - # We've got another element - $result .= "<$type"; - $result .= getAttributeString(@{$content}[0], 0); # no nested translatable elements - if ($content) { - my $subresult = getXMLstring($content, $spacepreserve); - if ($subresult) { - $result .= ">".$subresult . ""; - } else { - $result .= "/>"; - } - } else { - $result .= "/>"; - } - } - $index += 2; - } - return $result; -} - -# Translate list of nodes if necessary -sub translate_subnodes -{ - my $fh = shift; - my $content = shift; - my $language = shift || ""; - my $singlelang = shift || 0; - my $spacepreserve = shift || 0; - - my @nodes = @{ $content }; - - my $count = scalar(@nodes); - my $index = 0; - while ($index < $count) { - my $type = $nodes[$index]; - my $rest = $nodes[$index+1]; - if ($singlelang) { - my $oldMO = $MULTIPLE_OUTPUT; - $MULTIPLE_OUTPUT = 1; - traverse($fh, $type, $rest, $language, $spacepreserve); - $MULTIPLE_OUTPUT = $oldMO; - } else { - traverse($fh, $type, $rest, $language, $spacepreserve); - } - $index += 2; - } -} - -sub isWellFormedXmlFragment -{ - my $ret = eval 'require XML::Parser'; - if(!$ret) { - die "You must have XML::Parser installed to run $0\n\n"; - } - - my $fragment = shift; - return 0 if (!$fragment); - - $fragment = "$fragment"; - my $xp = new XML::Parser(Style => 'Tree'); - my $tree = 0; - eval { $tree = $xp->parse($fragment); }; - return $tree; -} - -sub traverse -{ - my $fh = shift; - my $nodename = shift; - my $content = shift; - my $language = shift || ""; - my $spacepreserve = shift || 0; - - if (!$nodename) { - if ($content =~ /^[\s]*$/) { - $leading_space .= $content; - } - print $fh $content; - } else { - # element - my @all = @{ $content }; - my $attrs = shift @all; - my $translate = 0; - my $outattr = getAttributeString($attrs, 1, $language, \$translate); - - if ($nodename =~ /^_/) { - $translate = 1; - $nodename =~ s/^_//; - } - my $lookup = ''; - - $spacepreserve = 0 if ((exists $attrs->{"xml:space"}) && ($attrs->{"xml:space"} =~ /^["']?default["']?$/)); - $spacepreserve = 1 if ((exists $attrs->{"xml:space"}) && ($attrs->{"xml:space"} =~ /^["']?preserve["']?$/)); - - print $fh "<$nodename", $outattr; - if ($translate) { - $content = getXMLstring($content, $spacepreserve); - if (!$spacepreserve) { - $content =~ s/^\s+//s; - $content =~ s/\s+$//s; - } - if (exists $attrs->{"msgctxt"}) { - my $context = entity_decode ($attrs->{"msgctxt"}); - $context =~ s/^["'](.*)["']/$1/; - $lookup = "$context\004$content"; - } else { - $lookup = $content; - } - - if ($lookup || $translate == 2) { - my $translation = $translations{$language, $lookup} if isWellFormedXmlFragment($translations{$language, $lookup}); - if ($MULTIPLE_OUTPUT && ($translation || $translate == 2)) { - $translation = $content if (!$translation); - print $fh " xml:lang=\"", $language, "\"" if $language; - print $fh ">"; - if ($translate == 2) { - translate_subnodes($fh, \@all, $language, 1, $spacepreserve); - } else { - print $fh $translation; - } - print $fh ""; - - return; # this means there will be no same translation with xml:lang="$language"... - # if we want them both, just remove this "return" - } else { - print $fh ">"; - if ($translate == 2) { - translate_subnodes($fh, \@all, $language, 1, $spacepreserve); - } else { - print $fh $content; - } - print $fh ""; - } - } else { - print $fh "/>"; - } - - for my $lang (sort keys %po_files_by_lang) { - if ($MULTIPLE_OUTPUT && $lang ne "$language") { - next; - } - if ($lang) { - # Handle translation - # - my $translate = 0; - my $localattrs = getAttributeString($attrs, 1, $lang, \$translate); - my $translation = $translations{$lang, $lookup} if isWellFormedXmlFragment($translations{$lang, $lookup}); - if ($translate && !$translation) { - $translation = $content; - } - - if ($translation || $translate) { - print $fh "\n"; - $leading_space =~ s/.*\n//g; - print $fh $leading_space; - print $fh "<", $nodename, " xml:lang=\"", $lang, "\"", $localattrs, ">"; - if ($translate == 2) { - translate_subnodes($fh, \@all, $lang, 1, $spacepreserve); - } else { - print $fh $translation; - } - print $fh ""; - } - } - } - - } else { - my $count = scalar(@all); - if ($count > 0) { - print $fh ">"; - my $index = 0; - while ($index < $count) { - my $type = $all[$index]; - my $rest = $all[$index+1]; - traverse($fh, $type, $rest, $language, $spacepreserve); - $index += 2; - } - print $fh ""; - } else { - print $fh "/>"; - } - } - } -} - -sub intltool_tree_comment -{ - my $expat = shift; - my $data = shift; - my $clist = $expat->{Curlist}; - my $pos = $#$clist; - - push @$clist, 1 => $data; -} - -sub intltool_tree_cdatastart -{ - my $expat = shift; - my $clist = $expat->{Curlist}; - my $pos = $#$clist; - - push @$clist, 0 => $expat->original_string(); -} - -sub intltool_tree_cdataend -{ - my $expat = shift; - my $clist = $expat->{Curlist}; - my $pos = $#$clist; - - $clist->[$pos] .= $expat->original_string(); -} - -sub intltool_tree_char -{ - my $expat = shift; - my $text = shift; - my $clist = $expat->{Curlist}; - my $pos = $#$clist; - - # Use original_string so that we retain escaped entities - # in CDATA sections. - # - if ($pos > 0 and $clist->[$pos - 1] eq '0') { - $clist->[$pos] .= $expat->original_string(); - } else { - push @$clist, 0 => $expat->original_string(); - } -} - -sub intltool_tree_start -{ - my $expat = shift; - my $tag = shift; - my @origlist = (); - - # Use original_string so that we retain escaped entities - # in attribute values. We must convert the string to an - # @origlist array to conform to the structure of the Tree - # Style. - # - my @original_array = split /\x/, $expat->original_string(); - my $source = $expat->original_string(); - - # Remove leading tag. - # - $source =~ s|^\s*<\s*(\S+)||s; - - # Grab attribute key/value pairs and push onto @origlist array. - # - while ($source) - { - if ($source =~ /^\s*([\w:-]+)\s*[=]\s*["]/) - { - $source =~ s|^\s*([\w:-]+)\s*[=]\s*["]([^"]*)["]||s; - push @origlist, $1; - push @origlist, '"' . $2 . '"'; - } - elsif ($source =~ /^\s*([\w:-]+)\s*[=]\s*[']/) - { - $source =~ s|^\s*([\w:-]+)\s*[=]\s*[']([^']*)[']||s; - push @origlist, $1; - push @origlist, "'" . $2 . "'"; - } - else - { - last; - } - } - - my $ol = [ { @origlist } ]; - - push @{ $expat->{Lists} }, $expat->{Curlist}; - push @{ $expat->{Curlist} }, $tag => $ol; - $expat->{Curlist} = $ol; -} - -sub readXml -{ - my $filename = shift || return; - if(!-f $filename) { - die "ERROR Cannot find filename: $filename\n"; - } - - my $ret = eval 'require XML::Parser'; - if(!$ret) { - die "You must have XML::Parser installed to run $0\n\n"; - } - my $xp = new XML::Parser(Style => 'Tree'); - $xp->setHandlers(Char => \&intltool_tree_char); - $xp->setHandlers(Start => \&intltool_tree_start); - $xp->setHandlers(CdataStart => \&intltool_tree_cdatastart); - $xp->setHandlers(CdataEnd => \&intltool_tree_cdataend); - my $tree = $xp->parsefile($filename); - -# Hello thereHowdydo -# would be: -# [foo, [{}, head, [{id => "a"}, 0, "Hello ", em, [{}, 0, "there"]], bar, [{}, -# 0, "Howdy", ref, [{}]], 0, "do" ] ] - - return $tree; -} - -sub print_header -{ - my $infile = shift; - my $fh = shift; - my $source; - - if(!-f $infile) { - die "ERROR Cannot find filename: $infile\n"; - } - - print $fh qq{\n}; - { - local $/; - open DOCINPUT, "<${FILE}" or die; - $source = ; - close DOCINPUT; - } - if ($source =~ /()/s) - { - print $fh "$1\n"; - } - elsif ($source =~ /(]*>)/s) - { - print $fh "$1\n"; - } -} - -sub parseTree -{ - my $fh = shift; - my $ref = shift; - my $language = shift || ""; - - my $name = shift @{ $ref }; - my $cont = shift @{ $ref }; - - while (!$name || "$name" eq "1") { - $name = shift @{ $ref }; - $cont = shift @{ $ref }; - } - - my $spacepreserve = 0; - my $attrs = @{$cont}[0]; - $spacepreserve = 1 if ((exists $attrs->{"xml:space"}) && ($attrs->{"xml:space"} =~ /^["']?preserve["']?$/)); - - traverse($fh, $name, $cont, $language, $spacepreserve); -} - -sub xml_merge_output -{ - my $source; - - if ($MULTIPLE_OUTPUT) { - for my $lang (sort keys %po_files_by_lang) { - if ( ! -d $lang ) { - mkdir $lang or -d $lang or die "Cannot create subdirectory $lang: $!\n"; - } - open OUTPUT, ">$lang/$OUTFILE" or die "Cannot open $lang/$OUTFILE: $!\n"; - binmode (OUTPUT) if $^O eq 'MSWin32'; - my $tree = readXml($FILE); - print_header($FILE, \*OUTPUT); - parseTree(\*OUTPUT, $tree, $lang); - close OUTPUT; - print "CREATED $lang/$OUTFILE\n" unless $QUIET_ARG; - } - if ( ! -d "C" ) { - mkdir "C" or -d "C" or die "Cannot create subdirectory C: $!\n"; - } - open OUTPUT, ">C/$OUTFILE" or die "Cannot open C/$OUTFILE: $!\n"; - binmode (OUTPUT) if $^O eq 'MSWin32'; - my $tree = readXml($FILE); - print_header($FILE, \*OUTPUT); - parseTree(\*OUTPUT, $tree); - close OUTPUT; - print "CREATED C/$OUTFILE\n" unless $QUIET_ARG; - } else { - open OUTPUT, ">$OUTFILE" or die "Cannot open $OUTFILE: $!\n"; - binmode (OUTPUT) if $^O eq 'MSWin32'; - my $tree = readXml($FILE); - print_header($FILE, \*OUTPUT); - parseTree(\*OUTPUT, $tree); - close OUTPUT; - print "CREATED $OUTFILE\n" unless $QUIET_ARG; - } -} - -sub keys_merge_translation -{ - my ($lang) = @_; - - if ( ! -d $lang && $MULTIPLE_OUTPUT) - { - mkdir $lang or -d $lang or die "Cannot create subdirectory $lang: $!\n"; - } - - open INPUT, "<${FILE}" or die "Cannot open ${FILE}: $!\n"; - open OUTPUT, ">$lang/$OUTFILE" or die "Cannot open $lang/$OUTFILE: $!\n"; - binmode (OUTPUT) if $^O eq 'MSWin32'; - - while () - { - if (s/^(\s*)_(\w+=(.*))/$1$2/) - { - my $string = $3; - - if (!$MULTIPLE_OUTPUT) - { - print OUTPUT; - - my $non_translated_line = $_; - - for my $lang (sort keys %po_files_by_lang) - { - my $translation = $translations{$lang, $string}; - next if !$translation; - - $_ = $non_translated_line; - s/(\w+)=.*/[$lang]$1=$translation/; - print OUTPUT; - } - } - else - { - my $non_translated_line = $_; - my $translation = $translations{$lang, $string}; - $translation = $string if !$translation; - - $_ = $non_translated_line; - s/(\w+)=.*/$1=$translation/; - print OUTPUT; - } - } - else - { - print OUTPUT; - } - } - - close OUTPUT; - close INPUT; - - print "CREATED $lang/$OUTFILE\n" unless $QUIET_ARG; -} - -sub keys_merge_translations -{ - if ($MULTIPLE_OUTPUT) - { - for my $lang (sort keys %po_files_by_lang) - { - keys_merge_translation ($lang); - } - keys_merge_translation ("C"); - } - else - { - keys_merge_translation ("."); - } -} - -sub desktop_merge_translations -{ - open INPUT, "<${FILE}" or die; - open OUTPUT, ">${OUTFILE}" or die; - binmode (OUTPUT) if $^O eq 'MSWin32'; - - while () - { - if (s/^(\s*)_([A-Za-z0-9\-]+\s*=\s*(.*))/$1$2/) - { - my $string = $3; - - print OUTPUT; - - my $non_translated_line = $_; - - for my $lang (sort keys %po_files_by_lang) - { - my $translation = $translations{$lang, $string}; - next if !$translation; - - $_ = $non_translated_line; - s/(\w+)\s*=\s*.*/${1}[$lang]=$translation/; - print OUTPUT; - } - } - else - { - print OUTPUT; - } - } - - close OUTPUT; - close INPUT; -} - -sub schemas_merge_translations -{ - my $source; - - { - local $/; # slurp mode - open INPUT, "<$FILE" or die "can't open $FILE: $!"; - $source = ; - close INPUT; - } - - open OUTPUT, ">$OUTFILE" or die; - binmode (OUTPUT) if $^O eq 'MSWin32'; - - # FIXME: support attribute translations - - # Empty nodes never need translation, so unmark all of them. - # For example, <_foo/> is just replaced by . - $source =~ s|<\s*_($w+)\s*/>|<$1/>|g; - - while ($source =~ s/ - (.*?) - (\s+)((\s*) - (\s*(?:\s*)?(.*?)\s*<\/default>)?(\s*) - (\s*(?:\s*)?(.*?)\s*<\/short>)?(\s*) - (\s*(?:\s*)?(.*?)\s*<\/long>)?(\s*) - <\/locale>) - //sx) - { - print OUTPUT $1; - - my $locale_start_spaces = $2 ? $2 : ''; - my $default_spaces = $4 ? $4 : ''; - my $short_spaces = $7 ? $7 : ''; - my $long_spaces = $10 ? $10 : ''; - my $locale_end_spaces = $13 ? $13 : ''; - my $c_default_block = $3 ? $3 : ''; - my $default_string = $6 ? $6 : ''; - my $short_string = $9 ? $9 : ''; - my $long_string = $12 ? $12 : ''; - - print OUTPUT "$locale_start_spaces$c_default_block"; - - $default_string =~ s/\s+/ /g; - $default_string = entity_decode($default_string); - $short_string =~ s/\s+/ /g; - $short_string = entity_decode($short_string); - $long_string =~ s/\s+/ /g; - $long_string = entity_decode($long_string); - - for my $lang (sort keys %po_files_by_lang) - { - my $default_translation = $translations{$lang, $default_string}; - my $short_translation = $translations{$lang, $short_string}; - my $long_translation = $translations{$lang, $long_string}; - - next if (!$default_translation && !$short_translation && - !$long_translation); - - print OUTPUT "\n$locale_start_spaces"; - - print OUTPUT "$default_spaces"; - - if ($default_translation) - { - $default_translation = entity_encode($default_translation); - print OUTPUT "$default_translation"; - } - - print OUTPUT "$short_spaces"; - - if ($short_translation) - { - $short_translation = entity_encode($short_translation); - print OUTPUT "$short_translation"; - } - - print OUTPUT "$long_spaces"; - - if ($long_translation) - { - $long_translation = entity_encode($long_translation); - print OUTPUT "$long_translation"; - } - - print OUTPUT "$locale_end_spaces"; - } - } - - print OUTPUT $source; - - close OUTPUT; -} - -sub rfc822deb_merge_translations -{ - my %encodings = (); - for my $lang (keys %po_files_by_lang) { - $encodings{$lang} = ($UTF8_ARG ? 'UTF-8' : get_po_encoding($po_files_by_lang{$lang})); - } - - my $source; - - $Text::Wrap::huge = 'overflow'; - $Text::Wrap::break = qr/\n|\s(?=\S)/; - - { - local $/; # slurp mode - open INPUT, "<$FILE" or die "can't open $FILE: $!"; - $source = ; - close INPUT; - } - - open OUTPUT, ">${OUTFILE}" or die; - binmode (OUTPUT) if $^O eq 'MSWin32'; - - while ($source =~ /(^|\n+)(_*)([^:\s]+)(:[ \t]*)(.*?)(?=\n[\S\n]|$)/sg) - { - my $sep = $1; - my $non_translated_line = $3.$4; - my $string = $5; - my $underscore = length($2); - next if $underscore eq 0 && $non_translated_line =~ /^#/; - # Remove [] dummy strings - my $stripped = $string; - $stripped =~ s/\[\s[^\[\]]*\],/,/g if $underscore eq 2; - $stripped =~ s/\[\s[^\[\]]*\]$//; - $non_translated_line .= $stripped; - - print OUTPUT $sep.$non_translated_line; - - if ($underscore) - { - my @str_list = rfc822deb_split($underscore, $string); - - for my $lang (sort keys %po_files_by_lang) - { - my $is_translated = 1; - my $str_translated = ''; - my $first = 1; - - for my $str (@str_list) - { - my $translation = $translations{$lang, $str}; - - if (!$translation) - { - $is_translated = 0; - last; - } - - # $translation may also contain [] dummy - # strings, mostly to indicate an empty string - $translation =~ s/\[\s[^\[\]]*\]$//; - - if ($first) - { - if ($underscore eq 2) - { - $str_translated .= $translation; - } - else - { - $str_translated .= - Text::Tabs::expand($translation) . - "\n"; - } - } - else - { - if ($underscore eq 2) - { - $str_translated .= ', ' . $translation; - } - else - { - $str_translated .= Text::Tabs::expand( - Text::Wrap::wrap(' ', ' ', $translation)) . - "\n .\n"; - } - } - $first = 0; - - # To fix some problems with Text::Wrap::wrap - $str_translated =~ s/(\n )+\n/\n .\n/g; - } - next unless $is_translated; - - $str_translated =~ s/\n \.\n$//; - $str_translated =~ s/\s+$//; - - $_ = $non_translated_line; - s/^(\w+):\s*.*/$sep${1}-$lang.$encodings{$lang}: $str_translated/s; - print OUTPUT; - } - } - } - print OUTPUT "\n"; - - close OUTPUT; - close INPUT; -} - -sub rfc822deb_split -{ - # Debian defines a special way to deal with rfc822-style files: - # when a value contain newlines, it consists of - # 1. a short form (first line) - # 2. a long description, all lines begin with a space, - # and paragraphs are separated by a single dot on a line - # This routine returns an array of all paragraphs, and reformat - # them. - # When first argument is 2, the string is a comma separated list of - # values. - my $type = shift; - my $text = shift; - $text =~ s/^[ \t]//mg; - return (split(/, */, $text, 0)) if $type ne 1; - return ($text) if $text !~ /\n/; - - $text =~ s/([^\n]*)\n//; - my @list = ($1); - my $str = ''; - - for my $line (split (/\n/, $text)) - { - chomp $line; - if ($line =~ /^\.\s*$/) - { - # New paragraph - $str =~ s/\s*$//; - push(@list, $str); - $str = ''; - } - elsif ($line =~ /^\s/) - { - # Line which must not be reformatted - $str .= "\n" if length ($str) && $str !~ /\n$/; - $line =~ s/\s+$//; - $str .= $line."\n"; - } - else - { - # Continuation line, remove newline - $str .= " " if length ($str) && $str !~ /\n$/; - $str .= $line; - } - } - - $str =~ s/\s*$//; - push(@list, $str) if length ($str); - - return @list; -} - -sub quoted_translation -{ - my ($xml_mode, $lang, $string) = @_; - - $string = entity_decode($string) if $xml_mode; - $string =~ s/\\\"/\"/g; - - my $translation = $translations{$lang, $string}; - $translation = $string if !$translation; - $translation = entity_encode($translation) if $xml_mode; - $translation =~ s/\"/\\\"/g; - return $translation -} - -sub quoted_merge_translations -{ - my ($xml_mode) = @_; - - if (!$MULTIPLE_OUTPUT) { - print "Quoted only supports Multiple Output.\n"; - exit(1); - } - - for my $lang (sort keys %po_files_by_lang) { - if ( ! -d $lang ) { - mkdir $lang or -d $lang or die "Cannot create subdirectory $lang: $!\n"; - } - open INPUT, "<${FILE}" or die; - open OUTPUT, ">$lang/$OUTFILE" or die "Cannot open $lang/$OUTFILE: $!\n"; - binmode (OUTPUT) if $^O eq 'MSWin32'; - while () - { - s/\"(([^\"]|\\\")*[^\\\"])\"/"\"" . "ed_translation($xml_mode, $lang, $1) . "\""/ge; - print OUTPUT; - } - close OUTPUT; - close INPUT; - } -} diff --git a/.flatpak-builder/cache/objects/69/bff954b0c419d76afa231e50ea5ee6e13ca9ee2740960ef521fd7d3a4711bd.file b/.flatpak-builder/cache/objects/69/bff954b0c419d76afa231e50ea5ee6e13ca9ee2740960ef521fd7d3a4711bd.file deleted file mode 100755 index 32d3592..0000000 Binary files a/.flatpak-builder/cache/objects/69/bff954b0c419d76afa231e50ea5ee6e13ca9ee2740960ef521fd7d3a4711bd.file and /dev/null differ diff --git a/.flatpak-builder/cache/objects/6a/0bb8b2f28fd7c7d8b13eb632186915416f768036dce488115c4494a857bf21.dirtree b/.flatpak-builder/cache/objects/6a/0bb8b2f28fd7c7d8b13eb632186915416f768036dce488115c4494a857bf21.dirtree deleted file mode 100644 index 263b65f..0000000 Binary files a/.flatpak-builder/cache/objects/6a/0bb8b2f28fd7c7d8b13eb632186915416f768036dce488115c4494a857bf21.dirtree and /dev/null differ diff --git a/.flatpak-builder/cache/objects/6a/32af478541584bff7f8f0d75fb17694f45fce32a4567f8f2de0f3378393fc8.file b/.flatpak-builder/cache/objects/6a/32af478541584bff7f8f0d75fb17694f45fce32a4567f8f2de0f3378393fc8.file deleted file mode 100644 index 7f504bc..0000000 --- a/.flatpak-builder/cache/objects/6a/32af478541584bff7f8f0d75fb17694f45fce32a4567f8f2de0f3378393fc8.file +++ /dev/null @@ -1,272 +0,0 @@ - - - - -canberra-gtk - - - - - - - - - - - - - - - - - - -
-
-
- - -
-

canberra-gtk

-

canberra-gtk — Gtk+ libcanberra Bindings

-
-
-

Synopsis

-
ca_context *        ca_gtk_context_get                  (void);
-int                 ca_gtk_proplist_set_for_widget      (ca_proplist *p,
-                                                         GtkWidget *w);
-int                 ca_gtk_play_for_widget              (GtkWidget *w,
-                                                         uint32_t id,
-                                                         ...);
-int                 ca_gtk_proplist_set_for_event       (ca_proplist *p,
-                                                         GdkEvent *e);
-int                 ca_gtk_play_for_event               (GdkEvent *e,
-                                                         uint32_t id,
-                                                         ...);
-void                ca_gtk_widget_disable_sounds        (GtkWidget *w,
-                                                         gboolean enable);
-
-
-
-

Description

-

-libcanberra-gtk provides a few functions that simplify libcanberra -usage from Gtk+ programs. It maintains a single ca_context object -per GdkScreen that is made accessible via -ca_gtk_context_get_for_screen(), with a shortcut ca_gtk_context_get() -to get the context for the default screen. More importantly, it provides -a few functions -to compile event sound property lists based on GtkWidget objects or -GdkEvent events. -

-
-
-

Details

-
-

ca_gtk_context_get ()

-
ca_context *        ca_gtk_context_get                  (void);
-

-Gets the single ca_context object for the default screen. See -ca_gtk_context_get_for_screen(). -

-
---- - - - - -

Returns :

a ca_context object. The object is owned by libcanberra-gtk -and must not be destroyed
-
-
-
-

ca_gtk_proplist_set_for_widget ()

-
int                 ca_gtk_proplist_set_for_widget      (ca_proplist *p,
-                                                         GtkWidget *w);
-

-Fill in a ca_proplist object for a sound event that shall originate -from the specified Gtk Widget. This will fill in properties like -CA_PROP_WINDOW_NAME or CA_PROP_WINDOW_X11_DISPLAY for you. -

-
---- - - - - - - - - - - - - - - -

p :

The proplist to store these sound event properties in

w :

The Gtk widget to base these sound event properties on

Returns :

0 on success, negative error code on error.
-
-
-
-

ca_gtk_play_for_widget ()

-
int                 ca_gtk_play_for_widget              (GtkWidget *w,
-                                                         uint32_t id,
-                                                         ...);
-

-Play a sound event for the specified widget. This will internally -call ca_gtk_proplist_set_for_widget() and then merge them with the -properties passed in via the NULL terminated argument -list. Finally, it will call ca_context_play_full() to actually play -the event sound. -

-
---- - - - - - - - - - - - - - - - - - - -

w :

The Gtk widget to base these sound event properties on

id :

The event id that can later be used to cancel this event sound -using ca_context_cancel(). This can be any integer and shall be -chosen be the client program. It is a good idea to pass 0 here if -cancelling the sound later is not needed. If the same id is passed -to multiple sounds they can be canceled with a single -ca_context_cancel() call.

... :

additional event properties as pairs of strings, terminated by NULL.

Returns :

0 on success, negative error code on error.
-
-
-
-

ca_gtk_proplist_set_for_event ()

-
int                 ca_gtk_proplist_set_for_event       (ca_proplist *p,
-                                                         GdkEvent *e);
-

-Fill in a ca_proplist object for a sound event that is being -triggered by the specified Gdk Event. This will fill in properties -like CA_PROP_EVENT_MOUSE_X or CA_PROP_EVENT_MOUSE_BUTTON for -you. This will internally also cal ca_gtk_proplist_set_for_widget() -on the widget this event belongs to. -

-
---- - - - - - - - - - - - - - - -

p :

The proplist to store these sound event properties in

e :

The Gdk event to base these sound event properties on

Returns :

0 on success, negative error code on error.
-
-
-
-

ca_gtk_play_for_event ()

-
int                 ca_gtk_play_for_event               (GdkEvent *e,
-                                                         uint32_t id,
-                                                         ...);
-

-Play a sound event for the specified event. This will internally -call ca_gtk_proplist_set_for_event() and then merge them with the -properties passed in via the NULL terminated argument -list. Finally, it will call ca_context_play_full() to actually play -the event sound. -

-
---- - - - - - - - - - - - - - - - - - - -

e :

The Gdk event to base these sound event properties on

id :

The event id that can later be used to cancel this event sound -using ca_context_cancel(). This can be any integer and shall be -chosen be the client program. It is a good idea to pass 0 here if -cancelling the sound later is not needed. If the same id is passed -to multiple sounds they can be canceled with a single -ca_context_cancel() call.

... :

additional event properties as pairs of strings, terminated by NULL.

Returns :

0 on success, negative error code on error.
-
-
-
-

ca_gtk_widget_disable_sounds ()

-
void                ca_gtk_widget_disable_sounds        (GtkWidget *w,
-                                                         gboolean enable);
-

-By default sound events are automatically generated for all kinds -of input events. Use this function to disable this. This is -intended to be used for widgets which directly generate sound -events. -

-
---- - - - - - - - - - - -

w :

The Gtk widget to disable automatic event sounds for.

enable :

Boolean specifying whether sound events shall be enabled or disabled for this widget.
-
-
-
- - - \ No newline at end of file diff --git a/.flatpak-builder/cache/objects/6a/99c11efdee92254b945408728b4cd860dbcf7182d140cd630d4d02eae5428d.file b/.flatpak-builder/cache/objects/6a/99c11efdee92254b945408728b4cd860dbcf7182d140cd630d4d02eae5428d.file deleted file mode 100644 index f788f8e..0000000 --- a/.flatpak-builder/cache/objects/6a/99c11efdee92254b945408728b4cd860dbcf7182d140cd630d4d02eae5428d.file +++ /dev/null @@ -1,37 +0,0 @@ -/*** - 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); -} diff --git a/.flatpak-builder/cache/objects/6a/aeee17872339d4a22ce7b823e7123ae5c9c8b2843d472239062625cf07cea2.dirtree b/.flatpak-builder/cache/objects/6a/aeee17872339d4a22ce7b823e7123ae5c9c8b2843d472239062625cf07cea2.dirtree deleted file mode 100644 index d14540f..0000000 Binary files a/.flatpak-builder/cache/objects/6a/aeee17872339d4a22ce7b823e7123ae5c9c8b2843d472239062625cf07cea2.dirtree and /dev/null differ diff --git a/.flatpak-builder/cache/objects/6c/796bbe5439d5ebe2df04ca5d63d1b7bb1a1aef7661f8e661b8834cab5d7d3e.file b/.flatpak-builder/cache/objects/6c/796bbe5439d5ebe2df04ca5d63d1b7bb1a1aef7661f8e661b8834cab5d7d3e.file deleted file mode 100644 index 91ab68b..0000000 --- a/.flatpak-builder/cache/objects/6c/796bbe5439d5ebe2df04ca5d63d1b7bb1a1aef7661f8e661b8834cab5d7d3e.file +++ /dev/null @@ -1,54 +0,0 @@ -/*-*- Mode: C; c-basic-offset: 8 -*-*/ - -#ifndef foocanberramallochfoo -#define foocanberramallochfoo - -/*** - This file is part of libcanberra. - - Copyright 2008 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 - . -***/ - -#include -#include - -#include "canberra.h" -#include "macro.h" - -#ifndef PACKAGE -#error "Please include config.h before including this file!" -#endif - -#define ca_malloc malloc -#define ca_free free -#define ca_malloc0(size) calloc(1, (size)) -#define ca_strdup strdup -#ifdef HAVE_STRNDUP -#define ca_strndup strndup -#else -char *ca_strndup(const char *s, size_t n); -#endif - -void* ca_memdup(const void* p, size_t size); - -#define ca_new(t, n) ((t*) ca_malloc(sizeof(t)*(n))) -#define ca_new0(t, n) ((t*) ca_malloc0(sizeof(t)*(n))) -#define ca_newdup(t, p, n) ((t*) ca_memdup(p, sizeof(t)*(n))) - -char *ca_sprintf_malloc(const char *format, ...) __attribute__((format(printf, 1, 2))); - -#endif diff --git a/.flatpak-builder/cache/objects/6d/400d71dfaa1d5dc5eb923c87ac88690fccd738c0af3af4df507bd137ae8cab.file b/.flatpak-builder/cache/objects/6d/400d71dfaa1d5dc5eb923c87ac88690fccd738c0af3af4df507bd137ae8cab.file deleted file mode 100644 index 2bb8a12..0000000 --- a/.flatpak-builder/cache/objects/6d/400d71dfaa1d5dc5eb923c87ac88690fccd738c0af3af4df507bd137ae8cab.file +++ /dev/null @@ -1,624 +0,0 @@ -/* gsound-play.c generated by valac 0.56.8, the Vala compiler - * generated from gsound-play.vala, do not modify */ - -/* gsound-play.vala - * - * Copyright (C) 2014 Tristan Brindle - * - * This file 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. - * - * This file 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 General Public License - * along with this program. If not, see . - */ - -#include -#include -#include -#include -#include -#include "gsound.h" -#include -#include -#include - -#if !defined(VALA_EXTERN) -#if defined(_MSC_VER) -#define VALA_EXTERN __declspec(dllexport) extern -#elif __GNUC__ >= 4 -#define VALA_EXTERN __attribute__((visibility("default"))) extern -#else -#define VALA_EXTERN extern -#endif -#endif - -typedef struct _PlayData PlayData; -#define _g_option_context_free0(var) ((var == NULL) ? NULL : (var = (g_option_context_free (var), NULL))) -#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL))) -#define _g_hash_table_unref0(var) ((var == NULL) ? NULL : (var = (g_hash_table_unref (var), NULL))) -#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL))) -#define _g_main_loop_unref0(var) ((var == NULL) ? NULL : (var = (g_main_loop_unref (var), NULL))) - -struct _PlayData { - int _state_; - GObject* _source_object_; - GAsyncResult* _res_; - GTask* _async_result; - gint _tmp0_; - GSoundContext* _tmp1_; - GHashTable* _tmp2_; - GError* _inner_error0_; -}; - -VALA_EXTERN gchar* event_id; -gchar* event_id = NULL; -VALA_EXTERN gchar* filename; -gchar* filename = NULL; -VALA_EXTERN gchar* desc; -gchar* desc = NULL; -VALA_EXTERN gchar* cache; -gchar* cache = NULL; -VALA_EXTERN gint loops; -gint loops = 0; -VALA_EXTERN gdouble volume; -gdouble volume = 0.0; -VALA_EXTERN gchar* driver; -gchar* driver = NULL; -VALA_EXTERN GMainLoop* main_loop; -GMainLoop* main_loop = NULL; -VALA_EXTERN GSoundContext* gs_ctx; -GSoundContext* gs_ctx = NULL; -VALA_EXTERN GHashTable* attrs; -GHashTable* attrs = NULL; - -static void play_data_free (gpointer _data); -VALA_EXTERN void play (GAsyncReadyCallback _callback_, - gpointer _user_data_); -VALA_EXTERN void play_finish (GAsyncResult* _res_, - GError** error); -static gboolean play_co (PlayData* _data_); -static void play_ready (GObject* source_object, - GAsyncResult* _res_, - gpointer _user_data_); -static gint _vala_main (gchar** args, - gint args_length1); -static void _g_free0_ (gpointer var); -static void ___lambda4_ (GObject* obj, - GAsyncResult* res); -static void ____lambda4__gasync_ready_callback (GObject* source_object, - GAsyncResult* res, - gpointer self); - -const GOptionEntry opts[8] = {{"id", 'i', (gint) 0, G_OPTION_ARG_STRING, &event_id, "Event sound identifier", "STRING"}, {"file", 'f', (gint) 0, G_OPTION_ARG_FILENAME, &filename, "Play file", "PATH"}, {"description", 'd', (gint) 0, G_OPTION_ARG_STRING, &desc, "Event sound description", "STRING"}, {"cache-control", 'c', (gint) 0, G_OPTION_ARG_STRING, &cache, "Cache control (permanent, volatile, never", "STRING"}, {"loop", 'l', (gint) 0, G_OPTION_ARG_INT, &loops, "Loop many times (default: 1)", "INTEGER"}, {"volume", 'V', (gint) 0, G_OPTION_ARG_DOUBLE, &volume, "A floating point dB value for the sample volume (ex: 0.0)", "STRING"}, {"backend", 'b', (gint) 0, G_OPTION_ARG_STRING, &driver, "libcanberra backend to use", "STRING"}, {NULL}}; - -static void -play_data_free (gpointer _data) -{ - PlayData* _data_; - _data_ = _data; - g_slice_free (PlayData, _data_); -} - -void -play (GAsyncReadyCallback _callback_, - gpointer _user_data_) -{ - PlayData* _data_; - _data_ = g_slice_new0 (PlayData); - _data_->_async_result = g_task_new (NULL, NULL, _callback_, _user_data_); - g_task_set_task_data (_data_->_async_result, _data_, play_data_free); - play_co (_data_); -} - -void -play_finish (GAsyncResult* _res_, - GError** error) -{ - PlayData* _data_; - _data_ = g_task_propagate_pointer (G_TASK (_res_), error); - if (NULL == _data_) { - return; - } -} - -static void -play_ready (GObject* source_object, - GAsyncResult* _res_, - gpointer _user_data_) -{ - PlayData* _data_; -#line 52 "../tools/gsound-play.vala" - _data_ = _user_data_; -#line 52 "../tools/gsound-play.vala" - _data_->_source_object_ = source_object; -#line 52 "../tools/gsound-play.vala" - _data_->_res_ = _res_; -#line 52 "../tools/gsound-play.vala" - play_co (_data_); -#line 146 "gsound-play.c" -} - -static gboolean -play_co (PlayData* _data_) -{ -#line 49 "../tools/gsound-play.vala" - switch (_data_->_state_) { -#line 49 "../tools/gsound-play.vala" - case 0: -#line 156 "gsound-play.c" - goto _state_0; -#line 49 "../tools/gsound-play.vala" - case 1: -#line 160 "gsound-play.c" - goto _state_1; - default: -#line 49 "../tools/gsound-play.vala" - g_assert_not_reached (); -#line 165 "gsound-play.c" - } - _state_0: -#line 51 "../tools/gsound-play.vala" - while (TRUE) { -#line 51 "../tools/gsound-play.vala" - _data_->_tmp0_ = loops; -#line 51 "../tools/gsound-play.vala" - loops = _data_->_tmp0_ - 1; -#line 51 "../tools/gsound-play.vala" - if (!(_data_->_tmp0_ > 0)) { -#line 51 "../tools/gsound-play.vala" - break; -#line 178 "gsound-play.c" - } -#line 52 "../tools/gsound-play.vala" - _data_->_tmp1_ = gs_ctx; -#line 52 "../tools/gsound-play.vala" - _data_->_tmp2_ = attrs; -#line 52 "../tools/gsound-play.vala" - _data_->_state_ = 1; -#line 52 "../tools/gsound-play.vala" - gsound_context_play_fullv (_data_->_tmp1_, _data_->_tmp2_, NULL, play_ready, _data_); -#line 52 "../tools/gsound-play.vala" - return FALSE; -#line 190 "gsound-play.c" - _state_1: -#line 52 "../tools/gsound-play.vala" - gsound_context_play_full_finish (_data_->_tmp1_, _data_->_res_, &_data_->_inner_error0_); -#line 52 "../tools/gsound-play.vala" - if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) { -#line 52 "../tools/gsound-play.vala" - g_task_return_error (_data_->_async_result, _data_->_inner_error0_); -#line 52 "../tools/gsound-play.vala" - g_object_unref (_data_->_async_result); -#line 52 "../tools/gsound-play.vala" - return FALSE; -#line 202 "gsound-play.c" - } - } -#line 49 "../tools/gsound-play.vala" - g_task_return_pointer (_data_->_async_result, _data_, NULL); -#line 49 "../tools/gsound-play.vala" - if (_data_->_state_ != 0) { -#line 49 "../tools/gsound-play.vala" - while (!g_task_get_completed (_data_->_async_result)) { -#line 49 "../tools/gsound-play.vala" - g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE); -#line 213 "gsound-play.c" - } - } -#line 49 "../tools/gsound-play.vala" - g_object_unref (_data_->_async_result); -#line 49 "../tools/gsound-play.vala" - return FALSE; -#line 220 "gsound-play.c" -} - -static void -_g_free0_ (gpointer var) -{ -#line 80 "../tools/gsound-play.vala" - var = (g_free (var), NULL); -#line 228 "gsound-play.c" -} - -static gchar* -double_to_string (gdouble self) -{ - gchar* _tmp0_; - gchar* _tmp1_; - gint _tmp1__length1; - const gchar* _tmp2_; - gchar* _tmp3_; - gchar* _tmp4_; - gchar* result; -#line 997 "glib-2.0.vapi" - _tmp0_ = g_new0 (gchar, G_ASCII_DTOSTR_BUF_SIZE); -#line 997 "glib-2.0.vapi" - _tmp1_ = _tmp0_; -#line 997 "glib-2.0.vapi" - _tmp1__length1 = G_ASCII_DTOSTR_BUF_SIZE; -#line 997 "glib-2.0.vapi" - _tmp2_ = g_ascii_dtostr (_tmp1_, (gint) G_ASCII_DTOSTR_BUF_SIZE, self); -#line 997 "glib-2.0.vapi" - _tmp3_ = g_strdup (_tmp2_); -#line 997 "glib-2.0.vapi" - _tmp4_ = _tmp3_; -#line 997 "glib-2.0.vapi" - _tmp1_ = (g_free (_tmp1_), NULL); -#line 997 "glib-2.0.vapi" - result = _tmp4_; -#line 997 "glib-2.0.vapi" - return result; -#line 259 "gsound-play.c" -} - -static void -___lambda4_ (GObject* obj, - GAsyncResult* res) -{ - GError* _inner_error0_ = NULL; -#line 99 "../tools/gsound-play.vala" - g_return_if_fail (res != NULL); -#line 269 "gsound-play.c" - { -#line 101 "../tools/gsound-play.vala" - play_finish (res, &_inner_error0_); -#line 101 "../tools/gsound-play.vala" - if (G_UNLIKELY (_inner_error0_ != NULL)) { -#line 275 "gsound-play.c" - goto __catch0_g_error; - } - } - goto __finally0; - __catch0_g_error: - { - GError* e = NULL; - GError* _tmp0_; - const gchar* _tmp1_; -#line 100 "../tools/gsound-play.vala" - e = _inner_error0_; -#line 100 "../tools/gsound-play.vala" - _inner_error0_ = NULL; -#line 103 "../tools/gsound-play.vala" - _tmp0_ = e; -#line 103 "../tools/gsound-play.vala" - _tmp1_ = _tmp0_->message; -#line 103 "../tools/gsound-play.vala" - g_print ("Error: %s\n", _tmp1_); -#line 100 "../tools/gsound-play.vala" - _g_error_free0 (e); -#line 297 "gsound-play.c" - } - __finally0: - { - GError* _inner_error1_ = NULL; - GMainLoop* _tmp2_; -#line 105 "../tools/gsound-play.vala" - _tmp2_ = main_loop; -#line 105 "../tools/gsound-play.vala" - g_main_loop_quit (_tmp2_); -#line 307 "gsound-play.c" - } -#line 100 "../tools/gsound-play.vala" - if (G_UNLIKELY (_inner_error0_ != NULL)) { -#line 100 "../tools/gsound-play.vala" - g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code); -#line 100 "../tools/gsound-play.vala" - g_clear_error (&_inner_error0_); -#line 100 "../tools/gsound-play.vala" - return; -#line 317 "gsound-play.c" - } -} - -static void -____lambda4__gasync_ready_callback (GObject* source_object, - GAsyncResult* res, - gpointer self) -{ -#line 99 "../tools/gsound-play.vala" - ___lambda4_ (source_object, res); -#line 328 "gsound-play.c" -} - -static gint -_vala_main (gchar** args, - gint args_length1) -{ - GOptionContext* opt_ctx = NULL; - GOptionContext* _tmp0_; - GOptionContext* _tmp1_; - GError* _inner_error0_ = NULL; - gint result; -#line 58 "../tools/gsound-play.vala" - setlocale (LC_ALL, ""); -#line 60 "../tools/gsound-play.vala" - g_set_application_name ("gsound-play"); -#line 62 "../tools/gsound-play.vala" - _tmp0_ = g_option_context_new (NULL); -#line 62 "../tools/gsound-play.vala" - opt_ctx = _tmp0_; -#line 63 "../tools/gsound-play.vala" - _tmp1_ = opt_ctx; -#line 63 "../tools/gsound-play.vala" - g_option_context_add_main_entries (_tmp1_, opts, NULL); -#line 352 "gsound-play.c" - { - GOptionContext* _tmp2_; - gboolean _tmp3_ = FALSE; - const gchar* _tmp4_; - GSoundContext* _tmp6_ = NULL; - GSoundContext* _tmp7_; - GSoundContext* _tmp8_; - GSoundContext* _tmp9_; - const gchar* _tmp10_; - GHashFunc _tmp13_; - GEqualFunc _tmp14_; - GHashTable* _tmp15_; - const gchar* _tmp16_; - const gchar* _tmp21_; - const gchar* _tmp26_; - GMainLoop* _tmp34_; - GMainLoop* _tmp35_; -#line 66 "../tools/gsound-play.vala" - _tmp2_ = opt_ctx; -#line 66 "../tools/gsound-play.vala" - g_option_context_parse (_tmp2_, (gint*) (&args_length1), &args, &_inner_error0_); -#line 66 "../tools/gsound-play.vala" - if (G_UNLIKELY (_inner_error0_ != NULL)) { -#line 376 "gsound-play.c" - goto __catch0_g_error; - } -#line 68 "../tools/gsound-play.vala" - _tmp4_ = event_id; -#line 68 "../tools/gsound-play.vala" - if (_tmp4_ == NULL) { -#line 383 "gsound-play.c" - const gchar* _tmp5_; -#line 68 "../tools/gsound-play.vala" - _tmp5_ = filename; -#line 68 "../tools/gsound-play.vala" - _tmp3_ = _tmp5_ == NULL; -#line 389 "gsound-play.c" - } else { -#line 68 "../tools/gsound-play.vala" - _tmp3_ = FALSE; -#line 393 "gsound-play.c" - } -#line 68 "../tools/gsound-play.vala" - if (_tmp3_) { -#line 69 "../tools/gsound-play.vala" - g_print ("No event id or file specified.\n"); -#line 70 "../tools/gsound-play.vala" - result = 1; -#line 70 "../tools/gsound-play.vala" - _g_option_context_free0 (opt_ctx); -#line 70 "../tools/gsound-play.vala" - return result; -#line 405 "gsound-play.c" - } -#line 73 "../tools/gsound-play.vala" - _tmp7_ = gsound_context_new (NULL, &_inner_error0_); -#line 73 "../tools/gsound-play.vala" - _tmp6_ = _tmp7_; -#line 73 "../tools/gsound-play.vala" - if (G_UNLIKELY (_inner_error0_ != NULL)) { -#line 413 "gsound-play.c" - goto __catch0_g_error; - } -#line 73 "../tools/gsound-play.vala" - _tmp8_ = _tmp6_; -#line 73 "../tools/gsound-play.vala" - _tmp6_ = NULL; -#line 73 "../tools/gsound-play.vala" - _g_object_unref0 (gs_ctx); -#line 73 "../tools/gsound-play.vala" - gs_ctx = _tmp8_; -#line 74 "../tools/gsound-play.vala" - _tmp9_ = gs_ctx; -#line 74 "../tools/gsound-play.vala" - gsound_context_set_attributes (_tmp9_, &_inner_error0_, GSOUND_ATTR_APPLICATION_ID, "org.gnome.gsound-test", NULL); -#line 74 "../tools/gsound-play.vala" - if (G_UNLIKELY (_inner_error0_ != NULL)) { -#line 74 "../tools/gsound-play.vala" - _g_object_unref0 (_tmp6_); -#line 432 "gsound-play.c" - goto __catch0_g_error; - } -#line 76 "../tools/gsound-play.vala" - _tmp10_ = driver; -#line 76 "../tools/gsound-play.vala" - if (_tmp10_ != NULL) { -#line 439 "gsound-play.c" - GSoundContext* _tmp11_; - const gchar* _tmp12_; -#line 77 "../tools/gsound-play.vala" - _tmp11_ = gs_ctx; -#line 77 "../tools/gsound-play.vala" - _tmp12_ = driver; -#line 77 "../tools/gsound-play.vala" - gsound_context_set_driver (_tmp11_, _tmp12_, &_inner_error0_); -#line 77 "../tools/gsound-play.vala" - if (G_UNLIKELY (_inner_error0_ != NULL)) { -#line 77 "../tools/gsound-play.vala" - _g_object_unref0 (_tmp6_); -#line 452 "gsound-play.c" - goto __catch0_g_error; - } - } -#line 80 "../tools/gsound-play.vala" - _tmp13_ = g_str_hash; -#line 80 "../tools/gsound-play.vala" - _tmp14_ = g_str_equal; -#line 80 "../tools/gsound-play.vala" - _tmp15_ = g_hash_table_new_full (_tmp13_, _tmp14_, _g_free0_, _g_free0_); -#line 80 "../tools/gsound-play.vala" - _g_hash_table_unref0 (attrs); -#line 80 "../tools/gsound-play.vala" - attrs = _tmp15_; -#line 82 "../tools/gsound-play.vala" - _tmp16_ = event_id; -#line 82 "../tools/gsound-play.vala" - if (_tmp16_ != NULL) { -#line 470 "gsound-play.c" - GHashTable* _tmp17_; - gchar* _tmp18_; - const gchar* _tmp19_; - gchar* _tmp20_; -#line 83 "../tools/gsound-play.vala" - _tmp17_ = attrs; -#line 83 "../tools/gsound-play.vala" - _tmp18_ = g_strdup (GSOUND_ATTR_EVENT_ID); -#line 83 "../tools/gsound-play.vala" - _tmp19_ = event_id; -#line 83 "../tools/gsound-play.vala" - _tmp20_ = g_strdup (_tmp19_); -#line 83 "../tools/gsound-play.vala" - g_hash_table_insert (_tmp17_, _tmp18_, _tmp20_); -#line 485 "gsound-play.c" - } -#line 85 "../tools/gsound-play.vala" - _tmp21_ = filename; -#line 85 "../tools/gsound-play.vala" - if (_tmp21_ != NULL) { -#line 491 "gsound-play.c" - GHashTable* _tmp22_; - gchar* _tmp23_; - const gchar* _tmp24_; - gchar* _tmp25_; -#line 86 "../tools/gsound-play.vala" - _tmp22_ = attrs; -#line 86 "../tools/gsound-play.vala" - _tmp23_ = g_strdup (GSOUND_ATTR_MEDIA_FILENAME); -#line 86 "../tools/gsound-play.vala" - _tmp24_ = filename; -#line 86 "../tools/gsound-play.vala" - _tmp25_ = g_strdup (_tmp24_); -#line 86 "../tools/gsound-play.vala" - g_hash_table_insert (_tmp22_, _tmp23_, _tmp25_); -#line 506 "gsound-play.c" - } -#line 88 "../tools/gsound-play.vala" - _tmp26_ = cache; -#line 88 "../tools/gsound-play.vala" - if (_tmp26_ != NULL) { -#line 512 "gsound-play.c" - GHashTable* _tmp27_; - gchar* _tmp28_; - const gchar* _tmp29_; - gchar* _tmp30_; -#line 89 "../tools/gsound-play.vala" - _tmp27_ = attrs; -#line 89 "../tools/gsound-play.vala" - _tmp28_ = g_strdup (GSOUND_ATTR_CANBERRA_CACHE_CONTROL); -#line 89 "../tools/gsound-play.vala" - _tmp29_ = cache; -#line 89 "../tools/gsound-play.vala" - _tmp30_ = g_strdup (_tmp29_); -#line 89 "../tools/gsound-play.vala" - g_hash_table_insert (_tmp27_, _tmp28_, _tmp30_); -#line 527 "gsound-play.c" - } -#line 91 "../tools/gsound-play.vala" - if (volume != 0.0) { -#line 531 "gsound-play.c" - GHashTable* _tmp31_; - gchar* _tmp32_; - gchar* _tmp33_; -#line 92 "../tools/gsound-play.vala" - _tmp31_ = attrs; -#line 92 "../tools/gsound-play.vala" - _tmp32_ = g_strdup (GSOUND_ATTR_CANBERRA_VOLUME); -#line 92 "../tools/gsound-play.vala" - _tmp33_ = double_to_string (volume); -#line 92 "../tools/gsound-play.vala" - g_hash_table_insert (_tmp31_, _tmp32_, _tmp33_); -#line 543 "gsound-play.c" - } -#line 95 "../tools/gsound-play.vala" - if (loops == 0) { -#line 96 "../tools/gsound-play.vala" - loops = 1; -#line 549 "gsound-play.c" - } -#line 99 "../tools/gsound-play.vala" - play (____lambda4__gasync_ready_callback, NULL); -#line 109 "../tools/gsound-play.vala" - _tmp34_ = g_main_loop_new (NULL, FALSE); -#line 109 "../tools/gsound-play.vala" - _g_main_loop_unref0 (main_loop); -#line 109 "../tools/gsound-play.vala" - main_loop = _tmp34_; -#line 110 "../tools/gsound-play.vala" - _tmp35_ = main_loop; -#line 110 "../tools/gsound-play.vala" - g_main_loop_run (_tmp35_); -#line 65 "../tools/gsound-play.vala" - _g_object_unref0 (_tmp6_); -#line 565 "gsound-play.c" - } - goto __finally0; - __catch0_g_error: - { - GError* e = NULL; - GError* _tmp36_; - const gchar* _tmp37_; -#line 65 "../tools/gsound-play.vala" - e = _inner_error0_; -#line 65 "../tools/gsound-play.vala" - _inner_error0_ = NULL; -#line 113 "../tools/gsound-play.vala" - _tmp36_ = e; -#line 113 "../tools/gsound-play.vala" - _tmp37_ = _tmp36_->message; -#line 113 "../tools/gsound-play.vala" - g_print ("Error: %s\n", _tmp37_); -#line 114 "../tools/gsound-play.vala" - result = 1; -#line 114 "../tools/gsound-play.vala" - _g_error_free0 (e); -#line 114 "../tools/gsound-play.vala" - _g_option_context_free0 (opt_ctx); -#line 114 "../tools/gsound-play.vala" - return result; -#line 591 "gsound-play.c" - } - __finally0: -#line 65 "../tools/gsound-play.vala" - if (G_UNLIKELY (_inner_error0_ != NULL)) { -#line 596 "gsound-play.c" - gint _tmp38_ = -1; -#line 65 "../tools/gsound-play.vala" - _g_option_context_free0 (opt_ctx); -#line 65 "../tools/gsound-play.vala" - g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code); -#line 65 "../tools/gsound-play.vala" - g_clear_error (&_inner_error0_); -#line 65 "../tools/gsound-play.vala" - return _tmp38_; -#line 606 "gsound-play.c" - } -#line 117 "../tools/gsound-play.vala" - result = 0; -#line 117 "../tools/gsound-play.vala" - _g_option_context_free0 (opt_ctx); -#line 117 "../tools/gsound-play.vala" - return result; -#line 614 "gsound-play.c" -} - -int -main (int argc, - char ** argv) -{ -#line 56 "../tools/gsound-play.vala" - return _vala_main (argv, argc); -#line 623 "gsound-play.c" -} - diff --git a/.flatpak-builder/cache/objects/6e/340b9cffb37a989ca544e6bb780a2c78901d3fb33738768511a30617afa01d.dirtree b/.flatpak-builder/cache/objects/6e/340b9cffb37a989ca544e6bb780a2c78901d3fb33738768511a30617afa01d.dirtree deleted file mode 100644 index f76dd23..0000000 Binary files a/.flatpak-builder/cache/objects/6e/340b9cffb37a989ca544e6bb780a2c78901d3fb33738768511a30617afa01d.dirtree and /dev/null differ diff --git a/.flatpak-builder/cache/objects/6e/a9150d2485798d5c5aa7fdecbcbfcf448e964ce1a9804ea862a000cd3073ed.dirtree b/.flatpak-builder/cache/objects/6e/a9150d2485798d5c5aa7fdecbcbfcf448e964ce1a9804ea862a000cd3073ed.dirtree deleted file mode 100644 index 728c54f..0000000 Binary files a/.flatpak-builder/cache/objects/6e/a9150d2485798d5c5aa7fdecbcbfcf448e964ce1a9804ea862a000cd3073ed.dirtree and /dev/null differ diff --git a/.flatpak-builder/cache/objects/6f/7bee31f1c1d7e0918be69838372ef2a6251e3c7e637eb34c98f2380f35cd7f.dirtree b/.flatpak-builder/cache/objects/6f/7bee31f1c1d7e0918be69838372ef2a6251e3c7e637eb34c98f2380f35cd7f.dirtree deleted file mode 100644 index 63ffd2a..0000000 Binary files a/.flatpak-builder/cache/objects/6f/7bee31f1c1d7e0918be69838372ef2a6251e3c7e637eb34c98f2380f35cd7f.dirtree and /dev/null differ diff --git a/.flatpak-builder/cache/objects/6f/9e5ec6a9a10b0af0472eeedff8646c7a2342b43d9caa1e3c682bad3a7b520b.file b/.flatpak-builder/cache/objects/6f/9e5ec6a9a10b0af0472eeedff8646c7a2342b43d9caa1e3c682bad3a7b520b.file deleted file mode 100644 index 0875c52..0000000 --- a/.flatpak-builder/cache/objects/6f/9e5ec6a9a10b0af0472eeedff8646c7a2342b43d9caa1e3c682bad3a7b520b.file +++ /dev/null @@ -1,80 +0,0 @@ -/*-*- Mode: C; c-basic-offset: 8 -*-*/ - -/*** - This file is part of libcanberra. - - Copyright 2008 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 - . -***/ - -#ifdef HAVE_CONFIG_H -#include -#endif - -#include -#include - -#include "mutex.h" -#include "malloc.h" - -struct ca_mutex { - pthread_mutex_t mutex; -}; - -ca_mutex* ca_mutex_new(void) { - ca_mutex *m; - - if (!(m = ca_new(ca_mutex, 1))) - return NULL; - - if (pthread_mutex_init(&m->mutex, NULL) < 0) { - ca_free(m); - return NULL; - } - - return m; -} - -void ca_mutex_free(ca_mutex *m) { - ca_assert(m); - - ca_assert_se(pthread_mutex_destroy(&m->mutex) == 0); - ca_free(m); -} - -void ca_mutex_lock(ca_mutex *m) { - ca_assert(m); - - ca_assert_se(pthread_mutex_lock(&m->mutex) == 0); -} - -ca_bool_t ca_mutex_try_lock(ca_mutex *m) { - int r; - ca_assert(m); - - if ((r = pthread_mutex_trylock(&m->mutex)) != 0) { - ca_assert(r == EBUSY); - return FALSE; - } - - return TRUE; -} - -void ca_mutex_unlock(ca_mutex *m) { - ca_assert(m); - - ca_assert_se(pthread_mutex_unlock(&m->mutex) == 0); -} diff --git a/.flatpak-builder/cache/objects/6f/e666cb1764ece15dd7d9e782deeff720f94efb4560a647fd7cd46e7761e24c.dirtree b/.flatpak-builder/cache/objects/6f/e666cb1764ece15dd7d9e782deeff720f94efb4560a647fd7cd46e7761e24c.dirtree deleted file mode 100644 index 47f800e..0000000 Binary files a/.flatpak-builder/cache/objects/6f/e666cb1764ece15dd7d9e782deeff720f94efb4560a647fd7cd46e7761e24c.dirtree and /dev/null differ diff --git a/.flatpak-builder/cache/objects/70/9c87ef03b4ca056a3876cddd1d59a33f86f351389999dba74309a15d39adb5.dirtree b/.flatpak-builder/cache/objects/70/9c87ef03b4ca056a3876cddd1d59a33f86f351389999dba74309a15d39adb5.dirtree deleted file mode 100644 index a2a8a56..0000000 Binary files a/.flatpak-builder/cache/objects/70/9c87ef03b4ca056a3876cddd1d59a33f86f351389999dba74309a15d39adb5.dirtree and /dev/null differ diff --git a/.flatpak-builder/cache/objects/70/9cb1e45d18c92c086f9c08c70fee0e6668b71ea9311e857ac3bc94df8898a5.file b/.flatpak-builder/cache/objects/70/9cb1e45d18c92c086f9c08c70fee0e6668b71ea9311e857ac3bc94df8898a5.file deleted file mode 100644 index a19fa34..0000000 --- a/.flatpak-builder/cache/objects/70/9cb1e45d18c92c086f9c08c70fee0e6668b71ea9311e857ac3bc94df8898a5.file +++ /dev/null @@ -1,45 +0,0 @@ -/*-*- Mode: C; c-basic-offset: 8 -*-*/ - -#ifndef foocanberrareadwavhfoo -#define foocanberrareadwavhfoo - -/*** - This file is part of libcanberra. - - Copyright 2008 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 - . -***/ - -#include - -#include "read-sound-file.h" - -typedef struct ca_wav ca_wav; - -int ca_wav_open(ca_wav **v, FILE *f); -void ca_wav_close(ca_wav *f); - -unsigned ca_wav_get_nchannels(ca_wav *f); -unsigned ca_wav_get_rate(ca_wav *f); -ca_sample_type_t ca_wav_get_sample_type(ca_wav *f); -const ca_channel_position_t* ca_wav_get_channel_map(ca_wav *f); - -int ca_wav_read_u8(ca_wav *f, uint8_t *d, size_t *n); -int ca_wav_read_s16le(ca_wav *f, int16_t *d, size_t *n); - -off_t ca_wav_get_size(ca_wav *f); - -#endif diff --git a/.flatpak-builder/cache/objects/74/064ef9c31878d02408b8e6a927fab992765ee3c0ddc532e5a0dab372b7942b.file b/.flatpak-builder/cache/objects/74/064ef9c31878d02408b8e6a927fab992765ee3c0ddc532e5a0dab372b7942b.file deleted file mode 100644 index 0cb24c5..0000000 --- a/.flatpak-builder/cache/objects/74/064ef9c31878d02408b8e6a927fab992765ee3c0ddc532e5a0dab372b7942b.file +++ /dev/null @@ -1,100 +0,0 @@ -/*-*- Mode: C; c-basic-offset: 8 -*-*/ - -/*** - This file is part of libcanberra. - - Copyright 2008 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 - . -***/ - -#ifdef HAVE_CONFIG_H -#include -#endif - -#include -#include -#include - -#include "malloc.h" -#include "macro.h" - -void* ca_memdup(const void* p, size_t size) { - void *r; - - ca_assert(p); - - if (!(r = ca_malloc(size))) - return NULL; - - memcpy(r, p, size); - return r; -} - -char *ca_sprintf_malloc(const char *format, ...) { - size_t size = 100; - char *c = NULL; - - ca_assert(format); - - for(;;) { - int r; - va_list ap; - - ca_free(c); - - if (!(c = ca_new(char, size))) - return NULL; - - va_start(ap, format); - r = vsnprintf(c, size, format, ap); - va_end(ap); - - c[size-1] = 0; - - if (r > -1 && (size_t) r < size) - return c; - - if (r > -1) /* glibc 2.1 */ - size = (size_t) r+1; - else /* glibc 2.0 */ - size *= 2; - } -} - -#ifndef HAVE_STRNDUP -char *ca_strndup(const char *s, size_t n) { - size_t n_avail; - char *p; - - if (!s) - return NULL; - - if (memchr(s, '\0', n)) { - n_avail = strlen(s); - if (n_avail > n) - n_avail = n; - } else - n_avail = n; - - if (!(p = ca_new(char, n_avail + 1))) - return NULL; - - memcpy(p, s, n_avail); - p[n_avail] = '\0'; - - return p; -} -#endif diff --git a/.flatpak-builder/cache/objects/76/170d6c433500ad82d20fb7ee879d19fd241f00c74a368142766d0b15dcbc06.dirtree b/.flatpak-builder/cache/objects/76/170d6c433500ad82d20fb7ee879d19fd241f00c74a368142766d0b15dcbc06.dirtree deleted file mode 100644 index 3eee8c8..0000000 Binary files a/.flatpak-builder/cache/objects/76/170d6c433500ad82d20fb7ee879d19fd241f00c74a368142766d0b15dcbc06.dirtree and /dev/null differ diff --git a/.flatpak-builder/cache/objects/76/2b18bb764c78fba80881a962891ce670ea148a8fcbce1be2225c625b36c680.file b/.flatpak-builder/cache/objects/76/2b18bb764c78fba80881a962891ce670ea148a8fcbce1be2225c625b36c680.file deleted file mode 100644 index 3aa217d..0000000 --- a/.flatpak-builder/cache/objects/76/2b18bb764c78fba80881a962891ce670ea148a8fcbce1be2225c625b36c680.file +++ /dev/null @@ -1,60 +0,0 @@ -.TH INTLTOOLIZE 8 "2003-08-02" "intltool" - -.SH NAME -intltoolize \- copy intltool related files to software package - -.SH SYNOPSIS -.B intltoolize -[\fIoption\fR]... - - -.SH DESCRIPTION -This prepares a package to use intltool by linking or copying -various files needed by intltool into place for use when building. -Note that you must change your working directory to the top -level directory of the package before running -.B intltoolize. - - -.SH OPTIONS -.IP "\fB\-\-automake\fR" 4 -Work silently and assume that \fIautomake\fR is being used in software. -.IP "\fB\-c\fR" 4 -.PD 0 -.IP "\fB\-\-copy\fR" 4 -.PD -Copy files rather than creating symbolic links to them. -.IP "\fB\-\-debug\fR" 4 -Enable verbose shell tracing. -.IP "\fB\-n\fR" 4 -.PD 0 -.IP "\fB\-\-dry-run\fR" 4 -.PD -Print commands only, instead of executing them. -.IP "\fB\-f\fR" 4 -.PD 0 -.IP "\fB\-\-force\fR" 4 -.PD -Replace existing files if they exist. -.IP "\fB\-\-help\fR" 4 -Show usage and basic help information. -.IP "\fB\-\-version\fR" 4 -Show version information. - - -.SH REPORTING BUGS -Report bugs to http://bugs.launchpad.net/intltool - -.SH AUTHOR -Darin Adler -.br -Kenneth Christiansen -.br -Maciej Stachowiak - - -.SH SEE ALSO -.BR intltool-prepare (8), -.BR intltool-extract (8), -.BR intltool-merge (8), -.BR intltool-update (8) diff --git a/.flatpak-builder/cache/objects/76/a8564f01b81fbd1aaba6a852523b8a60eeba6a35763e61cb512705f7b07acb.file b/.flatpak-builder/cache/objects/76/a8564f01b81fbd1aaba6a852523b8a60eeba6a35763e61cb512705f7b07acb.file deleted file mode 100644 index 113287f..0000000 --- a/.flatpak-builder/cache/objects/76/a8564f01b81fbd1aaba6a852523b8a60eeba6a35763e61cb512705f7b07acb.file +++ /dev/null @@ -1,36 +0,0 @@ -/*-*- Mode: C; c-basic-offset: 8 -*-*/ - -/*** - This file is part of libcanberra. - - Copyright 2008 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 - . -***/ - -#ifdef HAVE_CONFIG_H -#include -#endif - -#include "macro.h" - -ca_bool_t ca_debug(void) { - const char *d; - - if ((d = getenv("CANBERRA_DEBUG"))) - return !!*d; - - return FALSE; -} diff --git a/.flatpak-builder/cache/objects/76/c593b12cfcb380390e4873819d8b04de4d0d2a1de12a95e35c6c3a848e07f6.file b/.flatpak-builder/cache/objects/76/c593b12cfcb380390e4873819d8b04de4d0d2a1de12a95e35c6c3a848e07f6.file deleted file mode 100755 index b86b284..0000000 Binary files a/.flatpak-builder/cache/objects/76/c593b12cfcb380390e4873819d8b04de4d0d2a1de12a95e35c6c3a848e07f6.file and /dev/null differ diff --git a/.flatpak-builder/cache/objects/76/d7e523e0fe59ff21ff52deac682e847f1cc2fac50ae794686ee06a33a4c4fb.file b/.flatpak-builder/cache/objects/76/d7e523e0fe59ff21ff52deac682e847f1cc2fac50ae794686ee06a33a4c4fb.file deleted file mode 100644 index 34446f5..0000000 --- a/.flatpak-builder/cache/objects/76/d7e523e0fe59ff21ff52deac682e847f1cc2fac50ae794686ee06a33a4c4fb.file +++ /dev/null @@ -1,544 +0,0 @@ -/*-*- Mode: C; c-basic-offset: 8 -*-*/ - -/*** - This file is part of libcanberra. - - Copyright 2008 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 - . -***/ - -#ifdef HAVE_CONFIG_H -#include -#endif - -#include -#include -#include -#include - -#include "canberra.h" -#include "canberra-gtk.h" -#include "common.h" -#include "malloc.h" -#include "proplist.h" -#include "fork-detect.h" - -/** - * SECTION:canberra-gtk - * @short_description: Gtk+ libcanberra Bindings - * - * libcanberra-gtk provides a few functions that simplify libcanberra - * usage from Gtk+ programs. It maintains a single ca_context object - * per #GdkScreen that is made accessible via - * ca_gtk_context_get_for_screen(), with a shortcut ca_gtk_context_get() - * to get the context for the default screen. More importantly, it provides - * a few functions - * to compile event sound property lists based on GtkWidget objects or - * GdkEvent events. - */ - -static void read_sound_theme_name(ca_context *c, GtkSettings *s) { - gchar *theme_name = NULL; - - g_object_get(G_OBJECT(s), "gtk-sound-theme-name", &theme_name, NULL); - - if (theme_name) { - ca_context_change_props(c, CA_PROP_CANBERRA_XDG_THEME_NAME, theme_name, NULL); - g_free(theme_name); - } -} - -static void read_enable_event_sounds(ca_context *c, GtkSettings *s) { - gboolean enable_event_sounds = TRUE; - - if (!g_getenv("CANBERRA_FORCE_EVENT_SOUNDS")) - g_object_get(G_OBJECT(s), "gtk-enable-event-sounds", &enable_event_sounds, NULL); - - ca_context_change_props(c, CA_PROP_CANBERRA_ENABLE, enable_event_sounds ? "1" : "0", NULL); -} - -static void sound_theme_name_changed(GtkSettings *s, GParamSpec *arg1, ca_context *c) { - read_sound_theme_name(c, s); -} - -static void enable_event_sounds_changed(GtkSettings *s, GParamSpec *arg1, ca_context *c) { - read_enable_event_sounds(c, s); -} - -/** - * ca_gtk_context_get: - * - * Gets the single ca_context object for the default screen. See - * ca_gtk_context_get_for_screen(). - * - * Returns: a ca_context object. The object is owned by libcanberra-gtk - * and must not be destroyed - */ -ca_context *ca_gtk_context_get(void) { - return ca_gtk_context_get_for_screen(NULL); -} - -/** - * ca_gtk_context_get_for_screen: - * @screen: the #GdkScreen to get the context for, or %NULL to use - * the default screen - * - * libcanberra-gtk maintains a single ca_context object for each - * #GdkScreen. Use this function to access it. The - * %CA_PROP_CANBERRA_XDG_THEME_NAME of this context property is - * dynamically bound to the XSETTINGS setting for the XDG theme - * name. CA_PROP_APPLICATION_NAME is bound to - * g_get_application_name(). - * - * Returns: a ca_context object. The object is owned by libcanberra-gtk - * and must not be destroyed - * - * Since: 0.13 - */ -ca_context *ca_gtk_context_get_for_screen(GdkScreen *screen) { - ca_context *c = NULL; - ca_proplist *p = NULL; - const char *name; - GtkSettings *s; - - if (!screen) - screen = gdk_screen_get_default(); - - if ((c = g_object_get_data(G_OBJECT(screen), "canberra::gtk::context"))) - return c; - - if (ca_context_create(&c) != CA_SUCCESS) - return NULL; - - if (ca_proplist_create(&p) != CA_SUCCESS) { - ca_context_destroy(c); - return NULL; - } - - if ((name = g_get_application_name())) - ca_proplist_sets(p, CA_PROP_APPLICATION_NAME, name); - else { - ca_proplist_sets(p, CA_PROP_APPLICATION_NAME, "libcanberra-gtk"); - ca_proplist_sets(p, CA_PROP_APPLICATION_VERSION, PACKAGE_VERSION); - ca_proplist_sets(p, CA_PROP_APPLICATION_ID, "org.freedesktop.libcanberra.gtk"); - } - - if ((name = gtk_window_get_default_icon_name())) - ca_proplist_sets(p, CA_PROP_APPLICATION_ICON_NAME, name); - - if ((name = gdk_display_get_name(gdk_screen_get_display(screen)))) - ca_proplist_sets(p, CA_PROP_WINDOW_X11_DISPLAY, name); - - ca_proplist_setf(p, CA_PROP_WINDOW_X11_SCREEN, "%i", gdk_screen_get_number(screen)); - - ca_context_change_props_full(c, p); - ca_proplist_destroy(p); - - if ((s = gtk_settings_get_for_screen(screen))) { - - if (g_object_class_find_property(G_OBJECT_GET_CLASS(s), "gtk-sound-theme-name")) { - g_signal_connect(G_OBJECT(s), "notify::gtk-sound-theme-name", G_CALLBACK(sound_theme_name_changed), c); - read_sound_theme_name(c, s); - } else - g_debug("This Gtk+ version doesn't have the GtkSettings::gtk-sound-theme-name property."); - - if (g_object_class_find_property(G_OBJECT_GET_CLASS(s), "gtk-enable-event-sounds")) { - g_signal_connect(G_OBJECT(s), "notify::gtk-enable-event-sounds", G_CALLBACK(enable_event_sounds_changed), c); - read_enable_event_sounds(c, s); - } else - g_debug("This Gtk+ version doesn't have the GtkSettings::gtk-enable-event-sounds property."); - } - - g_object_set_data_full(G_OBJECT(screen), "canberra::gtk::context", c, (GDestroyNotify) ca_context_destroy); - - return c; -} - -static GtkWindow* get_toplevel(GtkWidget *w) { - if (!(w = gtk_widget_get_toplevel(w))) - return NULL; - - if (!GTK_IS_WINDOW(w)) - return NULL; - - return GTK_WINDOW(w); -} - -static gint window_get_desktop(GdkDisplay *d, GdkWindow *w) { - Atom type_return; - gint format_return; - gulong nitems_return; - gulong bytes_after_return; - guchar *data = NULL; - gint ret = -1; - - if (XGetWindowProperty(GDK_DISPLAY_XDISPLAY(d), GDK_WINDOW_XID(w), - gdk_x11_get_xatom_by_name_for_display(d, "_NET_WM_DESKTOP"), - 0, G_MAXLONG, False, XA_CARDINAL, &type_return, - &format_return, &nitems_return, &bytes_after_return, - &data) != Success) - return -1; - - if (type_return == XA_CARDINAL && format_return == 32 && data) { - guint32 desktop = *(guint32*) data; - - if (desktop != 0xFFFFFFFF) - ret = (gint) desktop; - } - - if (type_return != None && data != NULL) - XFree(data); - - return ret; -} - -/** - * ca_gtk_proplist_set_for_widget: - * @p: The proplist to store these sound event properties in - * @w: The Gtk widget to base these sound event properties on - * - * Fill in a ca_proplist object for a sound event that shall originate - * from the specified Gtk Widget. This will fill in properties like - * %CA_PROP_WINDOW_NAME or %CA_PROP_WINDOW_X11_DISPLAY for you. - * - * Returns: 0 on success, negative error code on error. - */ - -int ca_gtk_proplist_set_for_widget(ca_proplist *p, GtkWidget *widget) { - GtkWindow *w; - int ret; - const char *t, *role; - - ca_return_val_if_fail(p, CA_ERROR_INVALID); - ca_return_val_if_fail(widget, CA_ERROR_INVALID); - ca_return_val_if_fail(!ca_detect_fork(), CA_ERROR_FORKED); - - if (!(w = get_toplevel(widget))) - return CA_ERROR_INVALID; - - if ((t = gtk_window_get_title(w))) - if ((ret = ca_proplist_sets(p, CA_PROP_WINDOW_NAME, t)) < 0) - return ret; - - if ((role = gtk_window_get_role(w))) { - if (role && t) { - char *id = ca_sprintf_malloc("%s#%s", t, role); - - if ((ret = ca_proplist_sets(p, CA_PROP_WINDOW_ID, id)) < 0) { - ca_free(id); - return ret; - } - - ca_free(id); - } - } else if (t) - if ((ret = ca_proplist_sets(p, CA_PROP_WINDOW_ID, t)) < 0) - return ret; - - if ((t = gtk_window_get_icon_name(w))) - if ((ret = ca_proplist_sets(p, CA_PROP_WINDOW_ICON_NAME, t)) < 0) - return ret; - - if (gtk_widget_get_realized(GTK_WIDGET(w))) { - GdkWindow *dw = NULL; - GdkScreen *screen = NULL; - GdkDisplay *display = NULL; - gint x = -1, y = -1, width = -1, height = -1, screen_width = -1, screen_height = -1; - - if ((dw = gtk_widget_get_window(GTK_WIDGET(w)))) - if ((ret = ca_proplist_setf(p, CA_PROP_WINDOW_X11_XID, "%lu", (unsigned long) GDK_WINDOW_XID(dw))) < 0) - return ret; - - if ((display = gtk_widget_get_display(GTK_WIDGET(w)))) { - if ((t = gdk_display_get_name(display))) - if ((ret = ca_proplist_sets(p, CA_PROP_WINDOW_X11_DISPLAY, t)) < 0) - return ret; - - if (dw) { - gint desktop = window_get_desktop(display, dw); - - if (desktop >= 0) - if ((ret = ca_proplist_setf(p, CA_PROP_WINDOW_DESKTOP, "%i", desktop)) < 0) - return ret; - } - } - - if ((screen = gtk_widget_get_screen(GTK_WIDGET(w)))) { - - if ((ret = ca_proplist_setf(p, CA_PROP_WINDOW_X11_SCREEN, "%i", gdk_screen_get_number(screen))) < 0) - return ret; - - if (dw) - if ((ret = ca_proplist_setf(p, CA_PROP_WINDOW_X11_MONITOR, "%i", gdk_screen_get_monitor_at_window(screen, dw))) < 0) - return ret; - } - - /* FIXME, this might cause a round trip */ - - if (dw) { - gdk_window_get_origin(dw, &x, &y); - - if (x >= 0) - if ((ret = ca_proplist_setf(p, CA_PROP_WINDOW_X, "%i", x)) < 0) - return ret; - if (y >= 0) - if ((ret = ca_proplist_setf(p, CA_PROP_WINDOW_Y, "%i", y)) < 0) - return ret; - } - - gtk_window_get_size(w, &width, &height); - - if (width > 0) - if ((ret = ca_proplist_setf(p, CA_PROP_WINDOW_WIDTH, "%i", width)) < 0) - return ret; - if (height > 0) - if ((ret = ca_proplist_setf(p, CA_PROP_WINDOW_HEIGHT, "%i", height)) < 0) - return ret; - - if (x >= 0 && width > 0) { - screen_width = gdk_screen_get_width(gtk_widget_get_screen(GTK_WIDGET(w))); - - x += width/2; - x = CA_CLAMP(x, 0, screen_width-1); - - /* We use these strange format strings here to avoid that libc - * applies locale information on the formatting of floating - * numbers. */ - - if ((ret = ca_proplist_setf(p, CA_PROP_WINDOW_HPOS, "%i.%03i", - (int) (x/(screen_width-1)), (int) (1000.0*x/(screen_width-1)) % 1000)) < 0) - return ret; - } - - if (y >= 0 && height > 0) { - screen_height = gdk_screen_get_height(gtk_widget_get_screen(GTK_WIDGET(w))); - - y += height/2; - y = CA_CLAMP(y, 0, screen_height-1); - - if ((ret = ca_proplist_setf(p, CA_PROP_WINDOW_VPOS, "%i.%03i", - (int) (y/(screen_height-1)), (int) (1000.0*y/(screen_height-1)) % 1000)) < 0) - return ret; - } - } - - return CA_SUCCESS; -} - -/** - * ca_gtk_proplist_set_for_event: - * @p: The proplist to store these sound event properties in - * @e: The Gdk event to base these sound event properties on - * - * Fill in a ca_proplist object for a sound event that is being - * triggered by the specified Gdk Event. This will fill in properties - * like %CA_PROP_EVENT_MOUSE_X or %CA_PROP_EVENT_MOUSE_BUTTON for - * you. This will internally also cal ca_gtk_proplist_set_for_widget() - * on the widget this event belongs to. - * - * Returns: 0 on success, negative error code on error. - */ - -int ca_gtk_proplist_set_for_event(ca_proplist *p, GdkEvent *e) { - gdouble x, y; - GdkWindow *gw; - GtkWidget *w = NULL; - int ret; - - ca_return_val_if_fail(p, CA_ERROR_INVALID); - ca_return_val_if_fail(e, CA_ERROR_INVALID); - ca_return_val_if_fail(!ca_detect_fork(), CA_ERROR_FORKED); - - if ((gw = e->any.window)) { - gdk_window_get_user_data(gw, (gpointer*) &w); - - if (w) - if ((ret = ca_gtk_proplist_set_for_widget(p, w)) < 0) - return ret; - } - - if (gdk_event_get_root_coords(e, &x, &y)) { - - if ((ret = ca_proplist_setf(p, CA_PROP_EVENT_MOUSE_X, "%0.0f", x)) < 0) - return ret; - - if ((ret = ca_proplist_setf(p, CA_PROP_EVENT_MOUSE_Y, "%0.0f", y)) < 0) - return ret; - - if (w) { - int width, height; - - width = gdk_screen_get_width(gtk_widget_get_screen(w)); - height = gdk_screen_get_height(gtk_widget_get_screen(w)); - - /* We use these strange format strings here to avoid that - * libc applies locale information on the formatting of - * floating numbers. */ - - if ((ret = ca_proplist_setf(p, CA_PROP_EVENT_MOUSE_HPOS, "%i.%03i", - (int) (x/(width-1)), (int) (1000.0*x/(width-1)) % 1000)) < 0) - return ret; - - if ((ret = ca_proplist_setf(p, CA_PROP_EVENT_MOUSE_VPOS, "%i.%03i", - (int) (y/(height-1)), (int) (1000.0*y/(height-1)) % 1000)) < 0) - return ret; - } - } - - if (e->type == GDK_BUTTON_PRESS || - e->type == GDK_2BUTTON_PRESS || - e->type == GDK_3BUTTON_PRESS || - e->type == GDK_BUTTON_RELEASE) { - - if ((ret = ca_proplist_setf(p, CA_PROP_EVENT_MOUSE_BUTTON, "%u", e->button.button)) < 0) - return ret; - } - - return CA_SUCCESS; -} - -/** - * ca_gtk_play_for_widget: - * @w: The Gtk widget to base these sound event properties on - * @id: The event id that can later be used to cancel this event sound - * using ca_context_cancel(). This can be any integer and shall be - * chosen be the client program. It is a good idea to pass 0 here if - * cancelling the sound later is not needed. If the same id is passed - * to multiple sounds they can be canceled with a single - * ca_context_cancel() call. - * @...: additional event properties as pairs of strings, terminated by NULL. - * - * Play a sound event for the specified widget. This will internally - * call ca_gtk_proplist_set_for_widget() and then merge them with the - * properties passed in via the NULL terminated argument - * list. Finally, it will call ca_context_play_full() to actually play - * the event sound. - * - * Returns: 0 on success, negative error code on error. - */ - -int ca_gtk_play_for_widget(GtkWidget *w, uint32_t id, ...) { - va_list ap; - int ret; - ca_proplist *p; - GdkScreen *s; - - ca_return_val_if_fail(w, CA_ERROR_INVALID); - ca_return_val_if_fail(!ca_detect_fork(), CA_ERROR_FORKED); - - if ((ret = ca_proplist_create(&p)) < 0) - return ret; - - if ((ret = ca_gtk_proplist_set_for_widget(p, w)) < 0) - goto fail; - - va_start(ap, id); - ret = ca_proplist_merge_ap(p, ap); - va_end(ap); - - if (ret < 0) - goto fail; - - s = gtk_widget_get_screen(w); - ret = ca_context_play_full(ca_gtk_context_get_for_screen(s), id, p, NULL, NULL); - -fail: - - ca_assert_se(ca_proplist_destroy(p) == 0); - - return ret; -} - -/** - * ca_gtk_play_for_event: - * @e: The Gdk event to base these sound event properties on - * @id: The event id that can later be used to cancel this event sound - * using ca_context_cancel(). This can be any integer and shall be - * chosen be the client program. It is a good idea to pass 0 here if - * cancelling the sound later is not needed. If the same id is passed - * to multiple sounds they can be canceled with a single - * ca_context_cancel() call. - * @...: additional event properties as pairs of strings, terminated by NULL. - * - * Play a sound event for the specified event. This will internally - * call ca_gtk_proplist_set_for_event() and then merge them with the - * properties passed in via the NULL terminated argument - * list. Finally, it will call ca_context_play_full() to actually play - * the event sound. - * - * Returns: 0 on success, negative error code on error. - */ - -int ca_gtk_play_for_event(GdkEvent *e, uint32_t id, ...) { - va_list ap; - int ret; - ca_proplist *p; - GdkScreen *s; - - ca_return_val_if_fail(e, CA_ERROR_INVALID); - ca_return_val_if_fail(!ca_detect_fork(), CA_ERROR_FORKED); - - if ((ret = ca_proplist_create(&p)) < 0) - return ret; - - if ((ret = ca_gtk_proplist_set_for_event(p, e)) < 0) - goto fail; - - va_start(ap, id); - ret = ca_proplist_merge_ap(p, ap); - va_end(ap); - - if (ret < 0) - goto fail; - - if (e->any.window) -#if GTK_CHECK_VERSION (2, 90, 7) - s = gdk_window_get_screen(e->any.window); -#else - s = gdk_drawable_get_screen(GDK_DRAWABLE(e->any.window)); -#endif - else - s = gdk_screen_get_default(); - - ret = ca_context_play_full(ca_gtk_context_get_for_screen(s), id, p, NULL, NULL); - -fail: - - ca_assert_se(ca_proplist_destroy(p) == 0); - - return ret; -} - -/** - * ca_gtk_widget_disable_sounds: - * @w: The Gtk widget to disable automatic event sounds for. - * @enable: Boolean specifying whether sound events shall be enabled or disabled for this widget. - * - * By default sound events are automatically generated for all kinds - * of input events. Use this function to disable this. This is - * intended to be used for widgets which directly generate sound - * events. - */ - -void ca_gtk_widget_disable_sounds(GtkWidget *w, gboolean enable) { - static GQuark disable_sound_quark = 0; - - /* This is the same quark used by libgnomeui! */ - if (!disable_sound_quark) - disable_sound_quark = g_quark_from_static_string("gnome_disable_sound_events"); - - g_object_set_qdata(G_OBJECT(w), disable_sound_quark, GINT_TO_POINTER(!!enable)); -} diff --git a/.flatpak-builder/cache/objects/77/3331d9bfa230f1bec7cdc0b6f85070b1a9b3b1d1a4a1babeab4de836641fc3.dirtree b/.flatpak-builder/cache/objects/77/3331d9bfa230f1bec7cdc0b6f85070b1a9b3b1d1a4a1babeab4de836641fc3.dirtree deleted file mode 100644 index b5d5c71..0000000 Binary files a/.flatpak-builder/cache/objects/77/3331d9bfa230f1bec7cdc0b6f85070b1a9b3b1d1a4a1babeab4de836641fc3.dirtree and /dev/null differ diff --git a/.flatpak-builder/cache/objects/77/825d3055735fe29c5598b5dc7a462bc77c525eecc7747c4c6b6966dc21783d.file b/.flatpak-builder/cache/objects/77/825d3055735fe29c5598b5dc7a462bc77c525eecc7747c4c6b6966dc21783d.file deleted file mode 100755 index 4c15b63..0000000 --- a/.flatpak-builder/cache/objects/77/825d3055735fe29c5598b5dc7a462bc77c525eecc7747c4c6b6966dc21783d.file +++ /dev/null @@ -1,1304 +0,0 @@ -#!/usr/bin/perl -w -# -*- Mode: perl; indent-tabs-mode: nil; c-basic-offset: 4 -*- - -# -# The Intltool Message Updater -# -# Copyright (C) 2000-2003 Free Software Foundation. -# -# Intltool is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License -# version 2 published by the Free Software Foundation. -# -# Intltool 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 -# General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -# -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. -# -# Authors: Kenneth Christiansen -# Maciej Stachowiak -# Darin Adler - -## Release information -my $PROGRAM = "intltool-update"; -my $VERSION = "0.51.0"; -my $PACKAGE = "intltool"; - -## Loaded modules -use strict; -use Getopt::Long; -use Cwd; -use File::Copy; -use File::Find; - -## Scalars used by the option stuff -my $HELP_ARG = 0; -my $VERSION_ARG = 0; -my $DIST_ARG = 0; -my $POT_ARG = 0; -my $HEADERS_ARG = 0; -my $MAINTAIN_ARG = 0; -my $REPORT_ARG = 0; -my $VERBOSE = 0; -my $GETTEXT_PACKAGE = ""; -my $OUTPUT_FILE = ""; - -my @languages; -my %varhash = (); -my %po_files_by_lang = (); - -# Regular expressions to categorize file types. -# FIXME: Please check if the following is correct - -my $xml_support = -"xml(?:\\.in)*|". # http://www.w3.org/XML/ (Note: .in is not required) -"ui|". # Bonobo specific - User Interface desc. files -"lang|". # ? -"glade2?(?:\\.in)*|". # Glade specific - User Interface desc. files (Note: .in is not required) -"oaf(?:\\.in)+|". # DEPRECATED: Replaces by Bonobo .server files -"etspec|". # ? -"server(?:\\.in)+|". # Bonobo specific -"sheet(?:\\.in)+|". # ? -"schemas(?:\\.in)+|". # GConf specific -"gschema.xml|". # GLib schema (ie: GSettings) specific -"pong(?:\\.in)+|". # DEPRECATED: PONG is not used [by GNOME] any longer. -"kbd(?:\\.in)+|". # GOK specific. -"policy(?:\\.in)+"; # PolicyKit files - -my $ini_support = -"icon(?:\\.in)+|". # http://www.freedesktop.org/Standards/icon-theme-spec -"desktop(?:\\.in)+|". # http://www.freedesktop.org/Standards/menu-spec -"caves(?:\\.in)+|". # GNOME Games specific -"directory(?:\\.in)+|". # http://www.freedesktop.org/Standards/menu-spec -"soundlist(?:\\.in)+|". # GNOME specific -"keys(?:\\.in)+|". # GNOME Mime database specific -"theme(?:\\.in)+|". # http://www.freedesktop.org/Standards/icon-theme-spec -"service(?:\\.in)+"; # DBus specific - -my $tlk_support = -"tlk(?:\\.in)+"; # Bioware Aurora Talk Table Format - -my $buildin_gettext_support = -"c|y|cs|cc|cpp|c\\+\\+|h|hh|gob|py|scm(?:\\.in)*"; - -## Always flush buffer when printing -$| = 1; - -## Sometimes the source tree will be rooted somewhere else. -my $SRCDIR = $ENV{"srcdir"} || "."; -my $POTFILES_in; - -$POTFILES_in = "<$SRCDIR/POTFILES.in"; - -my $devnull = ($^O eq 'MSWin32' ? 'NUL:' : '/dev/null'); - -## Handle options -GetOptions -( - "help" => \$HELP_ARG, - "version" => \$VERSION_ARG, - "dist|d" => \$DIST_ARG, - "pot|p" => \$POT_ARG, - "headers|s" => \$HEADERS_ARG, - "maintain|m" => \$MAINTAIN_ARG, - "report|r" => \$REPORT_ARG, - "verbose|x" => \$VERBOSE, - "gettext-package|g=s" => \$GETTEXT_PACKAGE, - "output-file|o=s" => \$OUTPUT_FILE, - ) or &Console_WriteError_InvalidOption; - -&Console_Write_IntltoolHelp if $HELP_ARG; -&Console_Write_IntltoolVersion if $VERSION_ARG; - -my $arg_count = ($DIST_ARG > 0) - + ($POT_ARG > 0) - + ($HEADERS_ARG > 0) - + ($MAINTAIN_ARG > 0) - + ($REPORT_ARG > 0); - -&Console_Write_IntltoolHelp if $arg_count > 1; - -my $MODULE = $GETTEXT_PACKAGE || FindPackageName() || "unknown"; - -if ($POT_ARG) -{ - &GenerateHeaders; - &GeneratePOTemplate; -} -elsif ($HEADERS_ARG) -{ - &GenerateHeaders; -} -elsif ($MAINTAIN_ARG) -{ - &FindLeftoutFiles; -} -elsif ($REPORT_ARG) -{ - &GenerateHeaders; - &GeneratePOTemplate; - &Console_Write_CoverageReport; -} -elsif ((defined $ARGV[0]) && $ARGV[0] =~ /^[a-z]/) -{ - my $lang = $ARGV[0]; - - ## Report error if the language file supplied - ## to the command line is non-existent - &Console_WriteError_NotExisting("$SRCDIR/$lang.po") - if ! -s "$SRCDIR/$lang.po"; - - if (!$DIST_ARG) - { - print "Working, please wait..." if $VERBOSE; - &GenerateHeaders; - &GeneratePOTemplate; - } - &POFile_Update ($lang, $OUTPUT_FILE); - &Console_Write_TranslationStatus ($lang, $OUTPUT_FILE); -} -else -{ - &Console_Write_IntltoolHelp; -} - -exit; - -######### - -sub Console_Write_IntltoolVersion -{ - print <<_EOF_; -${PROGRAM} (${PACKAGE}) $VERSION -Written by Kenneth Christiansen, Maciej Stachowiak, and Darin Adler. - -Copyright (C) 2000-2003 Free Software Foundation, Inc. -This is free software; see the source for copying conditions. There is NO -warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -_EOF_ - exit; -} - -sub Console_Write_IntltoolHelp -{ - print <<_EOF_; -Usage: ${PROGRAM} [OPTION]... LANGCODE -Updates PO template files and merge them with the translations. - -Mode of operation (only one is allowed): - -p, --pot generate the PO template only - -s, --headers generate the header files in POTFILES.in - -m, --maintain search for left out files from POTFILES.in - -r, --report display a status report for the module - -d, --dist merge LANGCODE.po with existing PO template - -Extra options: - -g, --gettext-package=NAME override PO template name, useful with --pot - -o, --output-file=FILE write merged translation to FILE - -x, --verbose display lots of feedback - --help display this help and exit - --version output version information and exit - -Examples of use: -${PROGRAM} --pot just create a new PO template -${PROGRAM} xy create new PO template and merge xy.po with it - -Report bugs to http://bugs.launchpad.net/intltool -_EOF_ - exit; -} - -sub echo_n -{ - my $str = shift; - my $ret = `echo "$str"`; - - $ret =~ s/\n$//; # do we need the "s" flag? - - return $ret; -} - -sub POFile_DetermineType ($) -{ - my $type = $_; - my $gettext_type; - - my $xml_regex = "(?:" . $xml_support . ")"; - my $ini_regex = "(?:" . $ini_support . ")"; - my $tlk_regex = "(?:" . $tlk_support . ")"; - my $buildin_regex = "(?:" . $buildin_gettext_support . ")"; - - if ($type =~ /\[type: gettext\/([^\]].*)]/) - { - $gettext_type=$1; - } - elsif ($type =~ /gschema.xml$/) - { - $gettext_type="gsettings"; - } - elsif ($type =~ /schemas(\.in)+$/) - { - $gettext_type="schemas"; - } - elsif ($type =~ /glade2?(\.in)*$/) - { - $gettext_type="glade"; - } - elsif ($type =~ /scm(\.in)*$/) - { - $gettext_type="scheme"; - } - elsif ($type =~ /keys(\.in)+$/) - { - $gettext_type="keys"; - } - - # bucket types - - elsif ($type =~ /$xml_regex$/) - { - $gettext_type="xml"; - } - elsif ($type =~ /$ini_regex$/) - { - $gettext_type="ini"; - } - elsif ($type =~ /$tlk_regex$/) - { - $gettext_type="tlk"; - } - elsif ($type =~ /$buildin_regex$/) - { - $gettext_type="buildin"; - } - else - { - $gettext_type="unknown"; - } - - return "gettext\/$gettext_type"; -} - -sub TextFile_DetermineEncoding ($) -{ - my $gettext_code="UTF-8"; # All files are UTF-8 by default - my $filetype=`file $_ | cut -d ' ' -f 2`; - - if ($? eq "0") - { - if ($filetype =~ /^(ISO|UTF)/) - { - chomp ($gettext_code = $filetype); - } - elsif ($filetype =~ /^XML/) - { - $gettext_code="UTF-8"; # We asume that .glade and other .xml files are UTF-8 - } - } - - return $gettext_code; -} - -sub isNotValidMissing -{ - my ($file) = @_; - my $package_name = ""; - my $version = ""; - $package_name = $varhash{"PACKAGE"} if (defined $varhash{"PACKAGE"}); - $version = $varhash{"VERSION"} if (defined $varhash{"VERSION"}); - - return if $file =~ /^\{arch\}\/.*$/; - return if $file =~ /^$package_name-$version\/.*$/; -} - -sub removeFromArray -{ - my ($file, @array) = @_; - - my $i = 0; - foreach my $potfile (@array) { - delete $array[$i] if $potfile =~ m/$file/; - $i++; - } -} - -sub AddFileToListIfMissing -{ - my ($file, $list) = @_; - - my $name_pattern; - if ($file =~ /^\.\.\//) { - $name_pattern = "x3 A*"; - } else { - $name_pattern = "A*"; - } - - my $file_name = unpack($name_pattern, $file); - if (defined isNotValidMissing ($file_name)) { - ## Remove the first 3 chars if needed and add newline - push @$list, $file_name . "\n"; - } -} - -sub FindLeftoutFiles -{ - my (@buf_i18n_plain, - @buf_i18n_xml, - @buf_i18n_xml_unmarked, - @buf_i18n_ini, - @buf_potfiles, - @buf_potfiles_ignore, - @buf_allfiles, - @buf_allfiles_sorted, - @buf_potfiles_sorted, - @buf_potfiles_ignore_sorted - ); - - ## Search and find all translatable files - find sub { - # Ignore hidden files - return if "$File::Find::name" =~ /\/\./; - push @buf_i18n_plain, "$File::Find::name" if /\.($buildin_gettext_support)$/; - push @buf_i18n_xml, "$File::Find::name" if /\.($xml_support)$/; - push @buf_i18n_ini, "$File::Find::name" if /\.($ini_support)$/; - push @buf_i18n_xml_unmarked, "$File::Find::name" if /\.(schemas(\.in)+)$/; - }, ".."; - find sub { - # Ignore hidden files - return if "$File::Find::name" =~ /\/\.[^.]/; - push @buf_i18n_plain, "$File::Find::name" if /\.($buildin_gettext_support)$/; - push @buf_i18n_xml, "$File::Find::name" if /\.($xml_support)$/; - push @buf_i18n_ini, "$File::Find::name" if /\.($ini_support)$/; - push @buf_i18n_xml_unmarked, "$File::Find::name" if /\.(schemas(\.in)+)$/; - }, "$SRCDIR/.." if "$SRCDIR" ne "."; - - open POTFILES, $POTFILES_in or die "$PROGRAM: there's no POTFILES.in!\n"; - @buf_potfiles = grep !/^(#|\s*$)/, ; - close POTFILES; - - foreach (@buf_potfiles) { - s/^\[.*]\s*//; - } - - print "Searching for missing translatable files...\n" if $VERBOSE; - - ## Check if we should ignore some found files, when - ## comparing with POTFILES.in - foreach my $ignore ("POTFILES.skip", "POTFILES.ignore") - { - (-s "$SRCDIR/$ignore") or next; - - if ("$ignore" eq "POTFILES.ignore") - { - print "The usage of POTFILES.ignore is deprecated. Please consider moving the\n". - "content of this file to POTFILES.skip.\n"; - } - - print "Found $ignore: Ignoring files...\n" if $VERBOSE; - open FILE, "<$SRCDIR/$ignore" or die "ERROR: Failed to open $SRCDIR/$ignore!\n"; - - while () - { - next if (/^$/); - next if (/^(#|\s*$)/); - - my $skipdir = "../$_"; - $skipdir = "$SRCDIR/../$_" if "$SRCDIR" ne "."; - $skipdir =~ s/\n//g; - - my @dirignored; - - if (-d "$skipdir") - { - find sub { - push @dirignored, "$File::Find::name" if /\.($buildin_gettext_support)$/; - push @dirignored, "$File::Find::name" if /\.($xml_support)$/; - push @dirignored, "$File::Find::name" if /\.($ini_support)$/; - push @dirignored, "$File::Find::name" if /\.(schemas(\.in)+)$/; - }, "$skipdir"; - foreach my $ignored (@dirignored) - { - $ignored =~ s/^$SRCDIR\///g; - $ignored =~ s/^..\///g; - $ignored =~ s/$/\n/g; - - removeFromArray ($ignored, @buf_i18n_plain); - removeFromArray ($ignored, @buf_i18n_xml); - removeFromArray ($ignored, @buf_i18n_ini); - removeFromArray ($ignored, @buf_i18n_xml_unmarked); - push @buf_potfiles_ignore, $ignored; - } - next; - } - removeFromArray ($_, @buf_i18n_plain); - removeFromArray ($_, @buf_i18n_xml); - removeFromArray ($_, @buf_i18n_ini); - removeFromArray ($_, @buf_i18n_xml_unmarked); - push @buf_potfiles_ignore, $_; - } - close FILE; - - @buf_potfiles_ignore_sorted = sort (@buf_potfiles_ignore); - } - - foreach my $file (@buf_i18n_plain) - { - my $in_comment = 0; - my $in_macro = 0; - my $in_string = 0; - my @multiline_quotes; - if ($file =~ /\.scm/) { - @multiline_quotes = ('"'); - } else { - @multiline_quotes = ("'''", '"""'); - } - - open FILE, "<$file"; - while () - { - if ($file =~ /\.scm/) { - # Strip single quotes from .scm files. - s-\'--g; - } - - # Handle continued multi-line comment. - if ($in_comment) - { - next unless s-.*\*/--; - $in_comment = 0; - } - - # Handle continued multi-line string. - if ($in_string) - { - my $pattern = join '|', @multiline_quotes; - if (!s/.*$pattern//) { - s///s; - next; - }; - $in_string = 0; - } - - # Handle continued macro. - if ($in_macro) - { - $in_macro = 0 unless /\\$/; - next; - } - - # Handle start of macro (or any preprocessor directive). - if (/^\s*\#/) - { - $in_macro = 1 if /^([^\\]|\\.)*\\$/; - next; - } - - # Handle comments and quoted text. - while (m-(/\*|//|\'\'\'|\"\"\"|\'|\")-) # \' and \" keep emacs perl mode happy - { - my $match = $1; - if ($match eq "/*") - { - if (!s-/\*.*?\*/--) - { - s-/\*.*--; - $in_comment = 1; - } - } - elsif ($match eq "//") - { - s-//.*--; - } - elsif (grep($match, @multiline_quotes)) - { - if (!s-$match(\\$match|[^$match])*$match-QUOTEDTEXT-g) - { - s-$match.*-QUOTEDTEXT-s; - $in_string = 1; - } - } - else # ' or " - { - s-$match(\\$match|[^$match])*$match-QUOTEDTEXT-g; - - # Handle inline # comments. - s/^([^$match]+)\#.*/$1/; - - if (m-$match-) - { - warn "mismatched quotes at line $. in $file\n"; - s-$match.*--; - } - } - } - - if (/\w\.GetString *\(QUOTEDTEXT/) - { - AddFileToListIfMissing($file, \@buf_allfiles); - last; - } - - ## C_ N_ NC_ Q_ and _ are the macros defined in gi8n.h - if (/(NC_|[NCQ]_|[^_]_|(^|$)[_]) *\(?QUOTEDTEXT/m) - { - AddFileToListIfMissing($file, \@buf_allfiles); - last; - } - - # Check for direct calls to the glib gettext wrappers - if (/g_d[np]?gettext[2]? *\(QUOTEDTEXT/) - { - AddFileToListIfMissing($file, \@buf_allfiles); - last; - } - } - close FILE; - } - - foreach my $file (@buf_i18n_xml) - { - open FILE, "<$file"; - - while () - { - # FIXME: share the pattern matching code with intltool-extract - if (/\s_[-A-Za-z0-9._:]+\s*=\s*\"([^"]+)\"/ || /<_[^>]+>/ || /translatable=\"yes\"/) - { - AddFileToListIfMissing($file, \@buf_allfiles); - last; - } - } - close FILE; - } - - foreach my $file (@buf_i18n_ini) - { - open FILE, "<$file"; - while () - { - if (/_(.*)=/) - { - AddFileToListIfMissing($file, \@buf_allfiles); - last; - } - } - close FILE; - } - - foreach my $file (@buf_i18n_xml_unmarked) - { - AddFileToListIfMissing($file, \@buf_allfiles); - } - - - @buf_allfiles_sorted = sort (@buf_allfiles); - @buf_potfiles_sorted = sort (@buf_potfiles); - - my %in2; - foreach (@buf_potfiles_sorted) - { - s#^$SRCDIR/../##; - s#^$SRCDIR/##; - $in2{$_} = 1; - } - - foreach (@buf_potfiles_ignore_sorted) - { - s#^$SRCDIR/../##; - s#^$SRCDIR/##; - $in2{$_} = 1; - } - - my @result; - - foreach (@buf_allfiles_sorted) - { - my $dummy = $_; - my $srcdir = $SRCDIR; - - $srcdir =~ s#^../##; - $dummy =~ s#^$srcdir/../##; - $dummy =~ s#^$srcdir/##; - $dummy =~ s#_build/##; - if (!exists($in2{$dummy})) - { - push @result, $dummy - } - } - - my @buf_potfiles_notexist; - - foreach (@buf_potfiles_sorted) - { - chomp (my $dummy = $_); - if ("$dummy" ne "" and !(-f "$SRCDIR/../$dummy" or -f "../$dummy")) - { - push @buf_potfiles_notexist, $_; - } - } - - ## Save file with information about the files missing - ## if any, and give information about this procedure. - if (@result + @buf_potfiles_notexist > 0) - { - if (@result) - { - print "\n" if $VERBOSE; - unlink "missing"; - open OUT, ">missing"; - print OUT @result; - close OUT; - warn "The following files contain translations and are currently not in use. Please\n". - "consider adding these to the POTFILES.in file, located in the po/ directory.\n\n"; - print STDERR @result, "\n"; - warn "If some of these files are left out on purpose then please add them to\n". - "POTFILES.skip instead of POTFILES.in. A file 'missing' containing this list\n". - "of left out files has been written in the current directory.\n"; - warn "Please report to ". $varhash{"PACKAGE_BUGREPORT"} ."\n" if (defined $varhash{"PACKAGE_BUGREPORT"}); - } - if (@buf_potfiles_notexist) - { - unlink "notexist"; - open OUT, ">notexist"; - print OUT @buf_potfiles_notexist; - close OUT; - warn "\n" if ($VERBOSE or @result); - warn "The following files do not exist anymore:\n\n"; - warn @buf_potfiles_notexist, "\n"; - warn "Please remove them from POTFILES.in. A file 'notexist'\n". - "containing this list of absent files has been written in the current directory.\n"; - warn "Please report to ". $varhash{"PACKAGE_BUGREPORT"} ."\n" if (defined $varhash{"PACKAGE_BUGREPORT"}); - } - } - - ## If there is nothing to complain about, notify the user - else { - print "\nAll files containing translations are present in POTFILES.in.\n" if $VERBOSE; - } -} - -sub Console_WriteError_InvalidOption -{ - ## Handle invalid arguments - print STDERR "Try `${PROGRAM} --help' for more information.\n"; - exit 1; -} - -sub isProgramInPath -{ - my ($file) = @_; - # If a file is executable (or exists on Windows), - # or when it returns 0 exit status. - return 1 if ( - ((-x $file) or ($^O eq 'MSWin32' and (-e $file))) or - (system("$file --version >$devnull") == 0)); - return 0; -} - -sub isGNUGettextTool -{ - my ($file) = @_; - # Check that we are using GNU gettext tools - if (isProgramInPath ($file)) - { - my $version = `$file --version`; - return 1 if ($version =~ m/.*\(GNU .*\).*/); - } - return 0; -} - -sub GenerateHeaders -{ - my $EXTRACT = $ENV{"INTLTOOL_EXTRACT"} || "intltool-extract"; - - ## Generate the .h header files, so we can allow glade and - ## xml translation support - if (! isProgramInPath ("$EXTRACT")) - { - print STDERR "\n *** The intltool-extract script wasn't found!" - ."\n *** Without it, intltool-update can not generate files.\n"; - exit; - } - else - { - open (FILE, $POTFILES_in) or die "$PROGRAM: POTFILES.in not found.\n"; - - while () - { - chomp; - next if /^\[\s*encoding/; - - ## Find xml files in POTFILES.in and generate the - ## files with help from the extract script - - my $gettext_type= &POFile_DetermineType ($1); - - if (/\.($xml_support|$ini_support|$tlk_support)$/ || /^\[/) - { - s/^\[[^\[].*]\s*//; - - my @cmd = ($EXTRACT, "--update", "--type=$gettext_type", - "--srcdir=$SRCDIR"); - - unshift (@cmd, $^X) if ($^O eq 'MSWin32' && !($EXTRACT =~ /perl/)); - - push (@cmd, "--quiet") if (! $VERBOSE); - push (@cmd, "../$_"); - - system (@cmd); - } - } - close FILE; - } -} - -# -# Generate .pot file from POTFILES.in -# -sub GeneratePOTemplate -{ - my $XGETTEXT = $ENV{"XGETTEXT"} || "xgettext"; - my $XGETTEXT_ARGS = $ENV{"XGETTEXT_ARGS"} || ''; - chomp $XGETTEXT; - - if (! isGNUGettextTool ("$XGETTEXT")) - { - print STDERR " *** GNU xgettext is not found on this system!\n". - " *** Without it, intltool-update can not extract strings.\n"; - exit; - } - - print "Building $MODULE.pot...\n" if $VERBOSE; - - open INFILE, $POTFILES_in; - unlink "POTFILES.in.temp"; - open OUTFILE, ">POTFILES.in.temp" or die("Cannot open POTFILES.in.temp for writing"); - - my $gettext_support_nonascii = 0; - - # checks for GNU gettext >= 0.12 - my $dummy = `$XGETTEXT --version --from-code=UTF-8 >$devnull 2>$devnull`; - if ($? == 0) - { - $gettext_support_nonascii = 1; - } - else - { - # require gnu gettext >= 0.12 - die "$PROGRAM: GNU gettext >= 0.12 is required for intltool\n"; - } - - my $encoding = "UTF-8"; - my $forced_gettext_code; - my @temp_headers; - my $encoding_problem_is_reported = 0; - - while () - { - next if (/^#/ or /^\s*$/); - - chomp; - - my $gettext_code; - - if (/^\[\s*encoding:\s*(.*)\s*\]/) - { - $forced_gettext_code=$1; - } - elsif (/\.($xml_support|$ini_support|$tlk_support)$/ || /^\[/) - { - s/^\[.*]\s*//; - print OUTFILE "../$_.h\n"; - push @temp_headers, "../$_.h"; - $gettext_code = &TextFile_DetermineEncoding ("../$_.h") if ($gettext_support_nonascii and not defined $forced_gettext_code); - } - else - { - print OUTFILE "../$_\n"; - $gettext_code = &TextFile_DetermineEncoding ("$SRCDIR/../$_") if ($gettext_support_nonascii and not defined $forced_gettext_code); - } - - next if (! $gettext_support_nonascii); - - if (defined $forced_gettext_code) - { - $encoding=$forced_gettext_code; - } - elsif (defined $gettext_code and "$encoding" ne "$gettext_code") - { - if ($encoding eq "ASCII") - { - $encoding=$gettext_code; - } - elsif ($gettext_code ne "ASCII") - { - # Only report once because the message is quite long - if (! $encoding_problem_is_reported) - { - print STDERR "WARNING: You should use the same file encoding for all your project files,\n". - " but $PROGRAM thinks that most of the source files are in\n". - " $encoding encoding, while \"$_\" is (likely) in\n". - " $gettext_code encoding. If you are sure that all translatable strings\n". - " are in same encoding (say UTF-8), please *prepend* the following\n". - " line to POTFILES.in:\n\n". - " [encoding: UTF-8]\n\n". - " and make sure that configure.in/ac checks for $PACKAGE >= 0.27 .\n". - "(such warning message will only be reported once.)\n"; - $encoding_problem_is_reported = 1; - } - } - } - } - - close OUTFILE; - close INFILE; - - unlink "$MODULE.pot"; - my @xgettext_argument=("$XGETTEXT", - "--add-comments", - "--directory\=.", - "--directory\=$SRCDIR", - "--default-domain\=$MODULE", - "--flag\=g_strdup_printf:1:c-format", - "--flag\=g_string_printf:2:c-format", - "--flag\=g_string_append_printf:2:c-format", - "--flag\=g_error_new:3:c-format", - "--flag\=g_set_error:4:c-format", - "--flag\=g_markup_printf_escaped:1:c-format", - "--flag\=g_log:3:c-format", - "--flag\=g_print:1:c-format", - "--flag\=g_printerr:1:c-format", - "--flag\=g_printf:1:c-format", - "--flag\=g_fprintf:2:c-format", - "--flag\=g_sprintf:2:c-format", - "--flag\=g_snprintf:3:c-format", - "--flag\=g_scanner_error:2:c-format", - "--flag\=g_scanner_warn:2:c-format", - "--output\=$MODULE\.pot", - "--files-from\=\.\/POTFILES\.in\.temp"); - my $XGETTEXT_KEYWORDS = &FindPOTKeywords; - push @xgettext_argument, $XGETTEXT_KEYWORDS; - my $MSGID_BUGS_ADDRESS = &FindMakevarsBugAddress; - push @xgettext_argument, "--msgid-bugs-address\=\"$MSGID_BUGS_ADDRESS\"" if $MSGID_BUGS_ADDRESS; - push @xgettext_argument, "--from-code\=$encoding" if ($gettext_support_nonascii); - push @xgettext_argument, $XGETTEXT_ARGS if $XGETTEXT_ARGS; - my $xgettext_command = join ' ', @xgettext_argument; - - # intercept xgettext error message - print "Running $xgettext_command\n" if $VERBOSE; - my $xgettext_error_msg = `$xgettext_command 2>\&1`; - my $command_failed = $?; - - unlink "POTFILES.in.temp"; - - print "Removing generated header (.h) files..." if $VERBOSE; - unlink foreach (@temp_headers); - print "done.\n" if $VERBOSE; - - if (! $command_failed) - { - if (! -e "$MODULE.pot") - { - print "None of the files in POTFILES.in contain strings marked for translation.\n" if $VERBOSE; - } - else - { - print "Wrote $MODULE.pot\n" if $VERBOSE; - } - } - else - { - if ($xgettext_error_msg =~ /--from-code/) - { - my $errlocation = "unknown"; - - if ($xgettext_error_msg =~ /Non-ASCII string at (.*)\..*/) - { - $errlocation = $1; - } - print STDERR "ERROR: xgettext failed to generate PO tempalte file because the following \n". - " file contains strings marked for translation, not encoded in UTF-8. \n". - " Please ensure all strings marked for translation are UTF-8 encoded. \n\n". - " $errlocation\n\n"; - } - else - { - print STDERR "$xgettext_error_msg"; - if (-e "$MODULE.pot") - { - # is this possible? - print STDERR "ERROR: xgettext failed but still managed to generate PO template file.\n". - " Please consult error message above if there is any.\n"; - } - else - { - print STDERR "ERROR: xgettext failed to generate PO template file. Please consult\n". - " error message above if there is any.\n"; - } - } - exit (1); - } -} - -sub POFile_Update -{ - -f "$MODULE.pot" or die "$PROGRAM: $MODULE.pot does not exist.\n"; - - my $MSGMERGE = $ENV{"MSGMERGE"} || "msgmerge"; - my ($lang, $outfile) = @_; - - if (! isGNUGettextTool ("$MSGMERGE")) - { - print STDERR " *** GNU msgmerge is not found on this system!\n". - " *** Without it, intltool-update can not extract strings.\n"; - exit; - } - - print "Merging $SRCDIR/$lang.po with $MODULE.pot..." if $VERBOSE; - - my $infile = "$SRCDIR/$lang.po"; - $outfile = "$SRCDIR/$lang.po" if ($outfile eq ""); - - # I think msgmerge won't overwrite old file if merge is not successful - system ("$MSGMERGE", "-o", $outfile, $infile, "$MODULE.pot"); -} - -sub Console_WriteError_NotExisting -{ - my ($file) = @_; - - ## Report error if supplied language file is non-existing - print STDERR "$PROGRAM: $file does not exist!\n"; - print STDERR "Try '$PROGRAM --help' for more information.\n"; - exit; -} - -sub GatherPOFiles -{ - my @po_files = glob ("./*.po"); - - @languages = map (&POFile_GetLanguage, @po_files); - - foreach my $lang (@languages) - { - $po_files_by_lang{$lang} = shift (@po_files); - } -} - -sub POFile_GetLanguage ($) -{ - s/^(.*\/)?(.+)\.po$/$2/; - return $_; -} - -sub Console_Write_TranslationStatus -{ - my ($lang, $output_file) = @_; - my $MSGFMT = $ENV{"MSGFMT"} || "msgfmt"; - - if (! isGNUGettextTool ("$MSGFMT")) - { - print STDERR " *** GNU msgfmt is not found on this system!\n". - " *** Without it, intltool-update can not extract strings.\n"; - exit; - } - - $output_file = "$SRCDIR/$lang.po" if ($output_file eq ""); - - system ("$MSGFMT", "-o", "$devnull", "--verbose", $output_file); -} - -sub Console_Write_CoverageReport -{ - my $MSGFMT = $ENV{"MSGFMT"} || "msgfmt"; - - if (! isGNUGettextTool ("$MSGFMT")) - { - print STDERR " *** GNU msgfmt is not found on this system!\n". - " *** Without it, intltool-update can not extract strings.\n"; - exit; - } - - &GatherPOFiles; - - foreach my $lang (@languages) - { - print STDERR "$lang: "; - &POFile_Update ($lang, ""); - } - - print STDERR "\n\n * Current translation support in $MODULE \n\n"; - - foreach my $lang (@languages) - { - print STDERR "$lang: "; - system ("$MSGFMT", "-o", "$devnull", "--verbose", "$SRCDIR/$lang.po"); - } -} - -sub SubstituteVariable -{ - my ($str) = @_; - - # always need to rewind file whenever it has been accessed - seek (CONF, 0, 0); - - # cache each variable. varhash is global to we can add - # variables elsewhere. - while () - { - if (/^(\w+)=(.*)$/) - { - ($varhash{$1} = $2) =~ s/^["'](.*)["']$/$1/; - } - } - - if ($str =~ /^(.*)\${?([A-Z_]+)}?(.*)$/) - { - my $rest = $3; - my $untouched = $1; - my $sub = ""; - # Ignore recursive definitions of variables - $sub = $varhash{$2} if defined $varhash{$2} and $varhash{$2} !~ /\${?$2}?/; - - return SubstituteVariable ("$untouched$sub$rest"); - } - - # We're using Perl backticks ` and "echo -n" here in order to - # expand any shell escapes (such as backticks themselves) in every variable - return echo_n ($str); -} - -sub CONF_Handle_Open -{ - my $base_dirname = getcwd(); - $base_dirname =~ s@.*/@@; - - my ($conf_in, $src_dir); - - if ($base_dirname =~ /^po(-.+)?$/) - { - if (-f "Makevars") - { - my $makefile_source; - - local (*IN); - open (IN, ") - { - if (/^top_builddir[ \t]*=/) - { - $src_dir = $_; - $src_dir =~ s/^top_builddir[ \t]*=[ \t]*([^ \t\n\r]*)/$1/; - - chomp $src_dir; - if (-f "$src_dir" . "/configure.ac") { - $conf_in = "$src_dir" . "/configure.ac" . "\n"; - } else { - $conf_in = "$src_dir" . "/configure.in" . "\n"; - } - last; - } - } - close IN; - - $conf_in || die "Cannot find top_builddir in Makevars."; - } - elsif (-f "$SRCDIR/../configure.ac") - { - $conf_in = "$SRCDIR/../configure.ac"; - } - elsif (-f "$SRCDIR/../configure.in") - { - $conf_in = "$SRCDIR/../configure.in"; - } - else - { - my $makefile_source; - - local (*IN); - open (IN, ") - { - if (/^top_srcdir[ \t]*=/) - { - $src_dir = $_; - $src_dir =~ s/^top_srcdir[ \t]*=[ \t]*([^ \t\n\r]*)/$1/; - - chomp $src_dir; - $conf_in = "$src_dir" . "/configure.in" . "\n"; - - last; - } - } - close IN; - - $conf_in || die "Cannot find top_srcdir in Makefile."; - } - - open (CONF, "<$conf_in"); - } - else - { - print STDERR "$PROGRAM: Unable to proceed.\n" . - "Make sure to run this script inside the po directory.\n"; - exit; - } -} - -sub FindPackageName -{ - my $version; - my $domain = &FindMakevarsDomain; - my $name = $domain || "untitled"; - my $bugurl; - - &CONF_Handle_Open; - - my $conf_source; { - local (*IN); - open (IN, "<&CONF") || return $name; - seek (IN, 0, 0); - local $/; # slurp mode - $conf_source = ; - close IN; - } - - # priority for getting package name: - # 1. GETTEXT_PACKAGE - # 2. first argument of AC_INIT (with >= 2 arguments) - # 3. first argument of AM_INIT_AUTOMAKE (with >= 2 argument) - - # /^AM_INIT_AUTOMAKE\([\s\[]*([^,\)\s\]]+)/m - # the \s makes this not work, why? - if ($conf_source =~ /^AM_INIT_AUTOMAKE\(([^,\)]+),([^,\)]+)/m) - { - ($name, $version) = ($1, $2); - $name =~ s/[\[\]\s]//g; - $version =~ s/[\[\]\s]//g; - $name =~ s/\(+$//g; - $version =~ s/\(+$//g; - - $varhash{"PACKAGE_NAME"} = $name if (not $name =~ /\${?AC_PACKAGE_NAME}?/); - $varhash{"PACKAGE"} = $name if (not $name =~ /\${?PACKAGE}?/); - $varhash{"PACKAGE_VERSION"} = $version if (not $name =~ /\${?AC_PACKAGE_VERSION}?/); - $varhash{"VERSION"} = $version if (not $name =~ /\${?VERSION}?/); - } - - if ($conf_source =~ /^AC_INIT\(([^,\)]+),([^,\)]+)[,]?([^,\)]+)?/m) - { - ($name, $version) = ($1, $2); - $bugurl = $3 if (defined $3); - - # Handle m4_esyscmd - # FIXME: We should do this in a more generic way that works for all vars - if ($version =~ /m4_esyscmd\([\[]?([^\)\]]+)/) - { - my $cwd = getcwd (); - chdir ("$SRCDIR/.."); - $version = qx($1); - chdir ($cwd); - } - - - $name =~ s/[\[\]\s]//g; - $version =~ s/[\[\]\s]//g; - $bugurl =~ s/[\[\]\s]//g if (defined $bugurl); - $name =~ s/\(+$//g; - $version =~ s/\(+$//g; - $bugurl =~ s/\(+$//g if (defined $bugurl); - - $varhash{"PACKAGE_NAME"} = $name if (not $name =~ /\${?AC_PACKAGE_NAME}?/); - $varhash{"PACKAGE"} = $name if (not $name =~ /\${?PACKAGE}?/); - $varhash{"PACKAGE_VERSION"} = $version if (not $name =~ /\${?AC_PACKAGE_VERSION}?/); - $varhash{"VERSION"} = $version if (not $name =~ /\${?VERSION}?/); - $varhash{"PACKAGE_BUGREPORT"} = $bugurl if (defined $bugurl and not $bugurl =~ /\${?\w+}?/); - } - - # \s makes this not work, why? - $name = $1 if $conf_source =~ /^GETTEXT_PACKAGE=\[?([^\n\]]+)/m; - - # m4 macros AC_PACKAGE_NAME, AC_PACKAGE_VERSION etc. have same value - # as corresponding $PACKAGE_NAME, $PACKAGE_VERSION etc. shell variables. - $name =~ s/\bAC_PACKAGE_/\$PACKAGE_/g; - - $name = $domain if $domain; - - $name = SubstituteVariable ($name); - $name =~ s/^["'](.*)["']$/$1/; - - return $name if $name; -} - - -sub FindPOTKeywords -{ - - my $keywords = "--keyword=_ --keyword=N_ --keyword=C_:1c,2 --keyword=NC_:1c,2 --keyword=Q_ --keyword=g_dgettext:2 --keyword=g_dngettext:2,3 --keyword=g_dpgettext:2 --keyword=g_dpgettext2=2c,3"; - my $varname = "XGETTEXT_OPTIONS"; - my $make_source; { - local (*IN); - open (IN, "; - close IN; - } - - # unwrap lines split with a trailing \ - $make_source =~ s/\\ $ \n/ /mxg; - $keywords = $1 if $make_source =~ /^$varname[ ]*=\[?([^\n\]]+)/m; - - return $keywords; -} - -sub FindMakevarsDomain -{ - - my $domain = ""; - my $makevars_source; { - local (*IN); - open (IN, "; - close IN; - } - - $domain = $1 if $makevars_source =~ /^DOMAIN[ ]*=\[?([^\n\]\$]+)/m; - $domain =~ s/^\s+//; - $domain =~ s/\s+$//; - - return $domain; -} - -sub FindMakevarsBugAddress -{ - - my $address = ""; - my $makevars_source; { - local (*IN); - open (IN, "; - close IN; - } - - $address = $1 if $makevars_source =~ /^MSGID_BUGS_ADDRESS[ ]*=\[?([^\n\]\$]+)/m; - $address =~ s/^\s+//; - $address =~ s/\s+$//; - - return $address; -} diff --git a/.flatpak-builder/cache/objects/7d/98b6a9116c6c4e053f0800448969691f2e4c8aaf8ea3f1549dc476dda91367.dirtree b/.flatpak-builder/cache/objects/7d/98b6a9116c6c4e053f0800448969691f2e4c8aaf8ea3f1549dc476dda91367.dirtree deleted file mode 100644 index 79c0ccb..0000000 Binary files a/.flatpak-builder/cache/objects/7d/98b6a9116c6c4e053f0800448969691f2e4c8aaf8ea3f1549dc476dda91367.dirtree and /dev/null differ diff --git a/.flatpak-builder/cache/objects/7f/ce1d80046e30594109aaee7c9f9943d6432880bc674f40fc0b21649c7ae78a.dirtree b/.flatpak-builder/cache/objects/7f/ce1d80046e30594109aaee7c9f9943d6432880bc674f40fc0b21649c7ae78a.dirtree deleted file mode 100644 index 4da2975..0000000 Binary files a/.flatpak-builder/cache/objects/7f/ce1d80046e30594109aaee7c9f9943d6432880bc674f40fc0b21649c7ae78a.dirtree and /dev/null differ diff --git a/.flatpak-builder/cache/objects/80/2c312f5eecfe339e7c1e009ffa437f50cc4cc36de291f3b78fbc5abc0b326f.dirtree b/.flatpak-builder/cache/objects/80/2c312f5eecfe339e7c1e009ffa437f50cc4cc36de291f3b78fbc5abc0b326f.dirtree deleted file mode 100644 index 06a22a8..0000000 Binary files a/.flatpak-builder/cache/objects/80/2c312f5eecfe339e7c1e009ffa437f50cc4cc36de291f3b78fbc5abc0b326f.dirtree and /dev/null differ diff --git a/.flatpak-builder/cache/objects/81/4a2032618a6e6a45435a819d7bb4b06625b1cb5ac36cb903ecc61758c16e37.dirtree b/.flatpak-builder/cache/objects/81/4a2032618a6e6a45435a819d7bb4b06625b1cb5ac36cb903ecc61758c16e37.dirtree deleted file mode 100644 index e5796c7..0000000 Binary files a/.flatpak-builder/cache/objects/81/4a2032618a6e6a45435a819d7bb4b06625b1cb5ac36cb903ecc61758c16e37.dirtree and /dev/null differ diff --git a/.flatpak-builder/cache/objects/81/ccb2c165ccc90d93f74baa2804986ddde0f7d2bf0789f4c8cdc5c4e0610a72.file b/.flatpak-builder/cache/objects/81/ccb2c165ccc90d93f74baa2804986ddde0f7d2bf0789f4c8cdc5c4e0610a72.file deleted file mode 100644 index f48ab22..0000000 --- a/.flatpak-builder/cache/objects/81/ccb2c165ccc90d93f74baa2804986ddde0f7d2bf0789f4c8cdc5c4e0610a72.file +++ /dev/null @@ -1,58 +0,0 @@ -/*-*- Mode: C; c-basic-offset: 8 -*-*/ - -#ifndef foocanberraproplisthfoo -#define foocanberraproplisthfoo - -/*** - This file is part of libcanberra. - - Copyright 2008 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 - . -***/ - -#include - -#include "canberra.h" -#include "mutex.h" - -#define N_HASHTABLE 31 - -typedef struct ca_prop { - char *key; - size_t nbytes; - struct ca_prop *next_in_slot, *next_item, *prev_item; -} ca_prop; - -#define CA_PROP_DATA(p) ((void*) ((char*) (p) + CA_ALIGN(sizeof(ca_prop)))) - -struct ca_proplist { - ca_mutex *mutex; - - ca_prop *prop_hashtable[N_HASHTABLE]; - ca_prop *first_item; -}; - -int ca_proplist_merge(ca_proplist **_a, ca_proplist *b, ca_proplist *c); -ca_bool_t ca_proplist_contains(ca_proplist *p, const char *key); - -/* Both of the following two functions are not locked! Need manual locking! */ -ca_prop* ca_proplist_get_unlocked(ca_proplist *p, const char *key); -const char* ca_proplist_gets_unlocked(ca_proplist *p, const char *key); - -int ca_proplist_merge_ap(ca_proplist *p, va_list ap); -int ca_proplist_from_ap(ca_proplist **_p, va_list ap); - -#endif diff --git a/.flatpak-builder/cache/objects/82/0785d8b5556b5a32b2e12fde5e3ffd4a5d06274501949a1adea60c12dea33b.file b/.flatpak-builder/cache/objects/82/0785d8b5556b5a32b2e12fde5e3ffd4a5d06274501949a1adea60c12dea33b.file deleted file mode 100755 index 02fe7d1..0000000 Binary files a/.flatpak-builder/cache/objects/82/0785d8b5556b5a32b2e12fde5e3ffd4a5d06274501949a1adea60c12dea33b.file and /dev/null differ diff --git a/.flatpak-builder/cache/objects/83/2793fbedce2985767a2f7752acff952bab8d425357564ae47d65a899008adc.file b/.flatpak-builder/cache/objects/83/2793fbedce2985767a2f7752acff952bab8d425357564ae47d65a899008adc.file deleted file mode 100755 index 077a230..0000000 Binary files a/.flatpak-builder/cache/objects/83/2793fbedce2985767a2f7752acff952bab8d425357564ae47d65a899008adc.file and /dev/null differ diff --git a/.flatpak-builder/cache/objects/85/d15d1b3ebf05f181c60a3b09e5ea78f1bbe81718c3fce72e87fd578b30a18f.file b/.flatpak-builder/cache/objects/85/d15d1b3ebf05f181c60a3b09e5ea78f1bbe81718c3fce72e87fd578b30a18f.file deleted file mode 100755 index b3ac3e7..0000000 --- a/.flatpak-builder/cache/objects/85/d15d1b3ebf05f181c60a3b09e5ea78f1bbe81718c3fce72e87fd578b30a18f.file +++ /dev/null @@ -1,259 +0,0 @@ -#! /bin/sh -# intltoolize - Prepare a package to use intltool. -# intltoolize. Generated from intltoolize.in by configure. -# Copyright (C) 1996-1999 Free Software Foundation, Inc. -# Copyright (C) 2001 Eazel, Inc. -# -# Originally based on libtoolize by Gordon Matzigkeit , 1996 -# -# Modified for xml-i18n-tools by Maciej Stachowiak -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program 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 -# General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -# -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - -# The name of this program. -progname=`echo "$0" | sed 's%^.*/%%'` - -# Constants. -PROGRAM=intltoolize -PACKAGE=intltool -VERSION=0.51.0 - -# Directory names. -prefix=/app - -case "`uname`" in -MINGW32*) - # Assume intltoolize is in $prefix/bin. Strip off the script name and the "bin" - prefix=`dirname $0` - prefix=`dirname $prefix` - ;; -esac - -datarootdir=${prefix}/share -datadir=${datarootdir} -pkgdatadir=${datadir}/intltool - -aclocaldir=${datadir}/aclocal -intltool_m4="${aclocaldir}/intltool.m4" - -dry_run=no -help="Try '$progname --help' for more information." -rm="rm -f" -rm_rec="rm -rf" -ln_s="ln -s" -cp="cp -f" -mkdir="mkdir" -mkinstalldirs="mkinstalldirs" - -# Global variables. -automake= -copy= -force= -status=0 - -for arg -do - case "$arg" in - --help) - cat <&2 - echo "$help" 1>&2 - exit 1 - ;; - - *) - echo "$progname: too many arguments" 1>&2 - echo "$help" 1>&2 - exit 1 - ;; - esac -done - -if test -f configure.ac; then - configure="configure.ac" -else - if test -f configure.in; then - configure="configure.in" - else - echo "$progname: neither 'configure.ac' nor 'configure.in' exists" 1>&2 - echo "$help" 1>&2 - exit 1 - fi -fi - - -files='po/Makefile.in.in' - -if test -z "$automake"; then - if egrep '^(AC|IT)_PROG_INTLTOOL' $configure >/dev/null 2>&1; then : - else - echo "ERROR: 'IT_PROG_INTLTOOL' must appear in $configure for intltool to work." - exit 1 - fi - - if grep 'generated automatically by aclocal' aclocal.m4 >/dev/null 2>&1; then - updatemsg="update your 'aclocal.m4' by running aclocal" - else - updatemsg="add the contents of '$intltool_m4' to 'aclocal.m4'" - fi - - if egrep '^AC_DEFUN\(\[IT_PROG_INTLTOOL\]' aclocal.m4 >/dev/null 2>&1; then - # Check the version number on intltool.m4 and the one used in aclocal.m4. - instserial=`grep '^# serial ' $intltool_m4 | grep 'IT_PROG_INTLTOOL' | sed -e 's/^# serial \([0-9][0-9]*\).*$/\1/; q'` - - if test -z "$instserial"; then - echo "$progname: warning: no serial number on '$intltool_m4'" 1>&2 - else - # If the local macro has no serial number, we assume it's ancient. - localserial=`grep '^# serial ' aclocal.m4 | grep 'IT_PROG_INTLTOOL' | sed -e 's/^# serial \([0-9][0-9]*\).*$/\1/; q'` - - test -z "$localserial" && localserial=0 - - if test "$localserial" -lt "$instserial"; then - echo "You should $updatemsg." - elif test "$localserial" -gt "$instserial"; then - echo "$progname: '$intltool_m4' is serial $instserial, less than $localserial in 'aclocal.m4'" 1>&2 - if test -z "$force"; then - echo "Use '--force' to replace newer intltool files with this version." 1>&2 - exit 1 - fi - echo "To remain compatible, you should $updatemsg." - fi - fi - else - echo "You should $updatemsg." - fi -fi - - -# Copy or symlink the Makefile.in.in -( -for file in $files; do - if test -f "$file" && test -z "$force"; then - test -z "$automake" && echo "$progname: '$file' exists: use '--force' to overwrite" 1>&2 - continue - fi - - $rm $file - if test -n "$ln_s" && $ln_s $pkgdatadir/`basename $file` $file; then : - elif $cp $pkgdatadir/`basename $file` $file; then : - else - echo "$progname: cannot copy '$pkgdatadir/`basename $file`' to '$file'" 1>&2 - status=1 - fi -# Touch script names for backward compatibility - for script in intltool-extract.in intltool-merge.in intltool-update.in; do - # Always remove the script files now - rm -f $script - if egrep $script Makefile.am >/dev/null 2>&1; then - touch $script - fi - done -done - -exit $status -# make sure this subshell exits with the exit value if it failed -) || exit $? - - -# If the AC_CONFIG_MACRO_DIR() macro is used, copy intltool.m4 from our -# prefix to that directory. This makes sure that the M4 macro used -# matches the intltool scripts we install. -# If AC_CONFIG_MACRO_DIR is not used, things will behave as before (aclocal -# will be used to pull in the macro. -m4dir=`cat "$configure" | grep '^AC_CONFIG_MACRO_DIR' | sed -n -e 's/AC_CONFIG_MACRO_DIR(\([^()]*\))/\1/p' | sed -e 's/^\[\(.*\)\]$/\1/' | sed -e 1q` -if test -n "$m4dir"; then - rm -f $m4dir/intltool.m4 - if test -n "$ln_s" && $ln_s $intltool_m4 $m4dir/intltool.m4; then : - elif $cp $intltool_m4 $m4dir/intltool.m4; then : - else - echo "$progname: cannot copy '$intltool_m4' to '$m4dir/intltool.m4'" 1>&2 - exit 1 - fi -fi - - -# FIXME: This probably does not work w/ builddir != srcdir because it -# gets at source files relative to the current directory. - -grep INTLTOOL_MAKEFILE po/Makefile.in.in >/dev/null || { - echo "$progname: 'po/Makefile.in.in' is out of date: use '--force' to overwrite" - exit 1 -} - -exit $status - -# Local Variables: -# mode:shell-script -# sh-indentation:2 -# End: diff --git a/.flatpak-builder/cache/objects/86/f6dfa279c125a269c71b93c589c1f3a1c817f3b507cd3c768611fcc23dfb60.dirtree b/.flatpak-builder/cache/objects/86/f6dfa279c125a269c71b93c589c1f3a1c817f3b507cd3c768611fcc23dfb60.dirtree deleted file mode 100644 index b440d5c..0000000 Binary files a/.flatpak-builder/cache/objects/86/f6dfa279c125a269c71b93c589c1f3a1c817f3b507cd3c768611fcc23dfb60.dirtree and /dev/null differ diff --git a/.flatpak-builder/cache/objects/87/b447815e51b015912ad0c1e4b345429ab7b55ab7fb28f3e65ded2732d7e6c4.dirtree b/.flatpak-builder/cache/objects/87/b447815e51b015912ad0c1e4b345429ab7b55ab7fb28f3e65ded2732d7e6c4.dirtree deleted file mode 100644 index ce800b6..0000000 Binary files a/.flatpak-builder/cache/objects/87/b447815e51b015912ad0c1e4b345429ab7b55ab7fb28f3e65ded2732d7e6c4.dirtree and /dev/null differ diff --git a/.flatpak-builder/cache/objects/88/5dba4803651d3b893fa40372f019a3ccb6c6fc1962a5f35a6e16510f5ac614.file b/.flatpak-builder/cache/objects/88/5dba4803651d3b893fa40372f019a3ccb6c6fc1962a5f35a6e16510f5ac614.file deleted file mode 100644 index 7d34954..0000000 Binary files a/.flatpak-builder/cache/objects/88/5dba4803651d3b893fa40372f019a3ccb6c6fc1962a5f35a6e16510f5ac614.file and /dev/null differ diff --git a/.flatpak-builder/cache/objects/88/85f4ece17df9d811da984e55175d889b5517b9158b0e1efc0596cff76fdcbd.file b/.flatpak-builder/cache/objects/88/85f4ece17df9d811da984e55175d889b5517b9158b0e1efc0596cff76fdcbd.file deleted file mode 100644 index 92832e3..0000000 Binary files a/.flatpak-builder/cache/objects/88/85f4ece17df9d811da984e55175d889b5517b9158b0e1efc0596cff76fdcbd.file and /dev/null differ diff --git a/.flatpak-builder/cache/objects/8a/09798704283756c64d6531dc7a772087191d2eac6971f1f2f4dce53d029bc7.file b/.flatpak-builder/cache/objects/8a/09798704283756c64d6531dc7a772087191d2eac6971f1f2f4dce53d029bc7.file deleted file mode 100755 index 0b715b0..0000000 --- a/.flatpak-builder/cache/objects/8a/09798704283756c64d6531dc7a772087191d2eac6971f1f2f4dce53d029bc7.file +++ /dev/null @@ -1,41 +0,0 @@ -# libcanberra-gtk3-module.la - a libtool library file -# Generated by libtool (GNU libtool) 2.4.2 -# -# Please DO NOT delete this file! -# It is necessary for linking the library. - -# The name that we can dlopen(3). -dlname='libcanberra-gtk3-module.so' - -# Names of this library. -library_names='libcanberra-gtk3-module.so libcanberra-gtk3-module.so libcanberra-gtk3-module.so' - -# The name of the static archive. -old_library='' - -# Linker flags that can not go in dependency_libs. -inherited_linker_flags=' -pthread' - -# Libraries that this one depends upon. -dependency_libs=' -L/app/lib /app/lib/libcanberra-gtk3.la -lX11 -lgthread-2.0 -lgtk-3 -latk-1.0 -lgio-2.0 -lharfbuzz -lgdk-3 -lz -lpangocairo-1.0 -lpango-1.0 -lgdk_pixbuf-2.0 -lcairo-gobject -lcairo -lgobject-2.0 -lglib-2.0 /app/lib/libcanberra.la -lvorbisfile -lltdl -lm' - -# Names of additional weak libraries provided by this library -weak_library_names='' - -# Version information for libcanberra-gtk3-module. -current=0 -age=0 -revision=0 - -# Is this an already installed library? -installed=yes - -# Should we warn about portability when linking against -modules? -shouldnotlink=yes - -# Files to dlopen/dlpreopen -dlopen='' -dlpreopen='' - -# Directory that this library needs to be installed in: -libdir='/app/lib/gtk-3.0/modules' diff --git a/.flatpak-builder/cache/objects/8a/19042b4232a202bcd58f5e82363e0f8de103b0c090aeb3287832a6f487ae79.dirtree b/.flatpak-builder/cache/objects/8a/19042b4232a202bcd58f5e82363e0f8de103b0c090aeb3287832a6f487ae79.dirtree deleted file mode 100644 index 6af8bd5..0000000 Binary files a/.flatpak-builder/cache/objects/8a/19042b4232a202bcd58f5e82363e0f8de103b0c090aeb3287832a6f487ae79.dirtree and /dev/null differ diff --git a/.flatpak-builder/cache/objects/8a/837f9e627b64f1696b91e6e79969c1bb4fbd7f2eb58545fb2458b6df010262.file b/.flatpak-builder/cache/objects/8a/837f9e627b64f1696b91e6e79969c1bb4fbd7f2eb58545fb2458b6df010262.file deleted file mode 100644 index b8297c6..0000000 --- a/.flatpak-builder/cache/objects/8a/837f9e627b64f1696b91e6e79969c1bb4fbd7f2eb58545fb2458b6df010262.file +++ /dev/null @@ -1,11 +0,0 @@ -prefix=/app -exec_prefix=${prefix} -libdir=${exec_prefix}/lib -includedir=${prefix}/include - -Name: libcanberra-gtk3 -Description: Gtk3 Event Sound API -Version: 0.30 -Libs: -L${libdir} -lcanberra-gtk3 -lX11 -Cflags: -D_REENTRANT -I${includedir} -Requires: libcanberra gdk-3.0 gtk+-3.0 diff --git a/.flatpak-builder/cache/objects/8a/a7de17ca3f7ff1074acde72816b498560212ad5dede0de0eff85c29b78ea18.file b/.flatpak-builder/cache/objects/8a/a7de17ca3f7ff1074acde72816b498560212ad5dede0de0eff85c29b78ea18.file deleted file mode 100644 index 926bf56..0000000 --- a/.flatpak-builder/cache/objects/8a/a7de17ca3f7ff1074acde72816b498560212ad5dede0de0eff85c29b78ea18.file +++ /dev/null @@ -1,137 +0,0 @@ -/* gsound.vapi generated by vapigen, do not modify. */ - -[CCode (cprefix = "GSound", gir_namespace = "GSound", gir_version = "1.0", lower_case_cprefix = "gsound_")] -namespace GSound { - namespace Attribute { - [CCode (cheader_filename = "gsound.h", cname = "GSOUND_ATTR_APPLICATION_ICON")] - public const string APPLICATION_ICON; - [CCode (cheader_filename = "gsound.h", cname = "GSOUND_ATTR_APPLICATION_ICON_NAME")] - public const string APPLICATION_ICON_NAME; - [CCode (cheader_filename = "gsound.h", cname = "GSOUND_ATTR_APPLICATION_ID")] - public const string APPLICATION_ID; - [CCode (cheader_filename = "gsound.h", cname = "GSOUND_ATTR_APPLICATION_LANGUAGE")] - public const string APPLICATION_LANGUAGE; - [CCode (cheader_filename = "gsound.h", cname = "GSOUND_ATTR_APPLICATION_NAME")] - public const string APPLICATION_NAME; - [CCode (cheader_filename = "gsound.h", cname = "GSOUND_ATTR_APPLICATION_PROCESS_BINARY")] - public const string APPLICATION_PROCESS_BINARY; - [CCode (cheader_filename = "gsound.h", cname = "GSOUND_ATTR_APPLICATION_PROCESS_HOST")] - public const string APPLICATION_PROCESS_HOST; - [CCode (cheader_filename = "gsound.h", cname = "GSOUND_ATTR_APPLICATION_PROCESS_ID")] - public const string APPLICATION_PROCESS_ID; - [CCode (cheader_filename = "gsound.h", cname = "GSOUND_ATTR_APPLICATION_PROCESS_USER")] - public const string APPLICATION_PROCESS_USER; - [CCode (cheader_filename = "gsound.h", cname = "GSOUND_ATTR_APPLICATION_VERSION")] - public const string APPLICATION_VERSION; - [CCode (cheader_filename = "gsound.h", cname = "GSOUND_ATTR_CANBERRA_CACHE_CONTROL")] - public const string CANBERRA_CACHE_CONTROL; - [CCode (cheader_filename = "gsound.h", cname = "GSOUND_ATTR_CANBERRA_ENABLE")] - public const string CANBERRA_ENABLE; - [CCode (cheader_filename = "gsound.h", cname = "GSOUND_ATTR_CANBERRA_FORCE_CHANNEL")] - public const string CANBERRA_FORCE_CHANNEL; - [CCode (cheader_filename = "gsound.h", cname = "GSOUND_ATTR_CANBERRA_VOLUME")] - public const string CANBERRA_VOLUME; - [CCode (cheader_filename = "gsound.h", cname = "GSOUND_ATTR_CANBERRA_XDG_THEME_NAME")] - public const string CANBERRA_XDG_THEME_NAME; - [CCode (cheader_filename = "gsound.h", cname = "GSOUND_ATTR_CANBERRA_XDG_THEME_OUTPUT_PROFILE")] - public const string CANBERRA_XDG_THEME_OUTPUT_PROFILE; - [CCode (cheader_filename = "gsound.h", cname = "GSOUND_ATTR_EVENT_DESCRIPTION")] - public const string EVENT_DESCRIPTION; - [CCode (cheader_filename = "gsound.h", cname = "GSOUND_ATTR_EVENT_ID")] - public const string EVENT_ID; - [CCode (cheader_filename = "gsound.h", cname = "GSOUND_ATTR_EVENT_MOUSE_BUTTON")] - public const string EVENT_MOUSE_BUTTON; - [CCode (cheader_filename = "gsound.h", cname = "GSOUND_ATTR_EVENT_MOUSE_HPOS")] - public const string EVENT_MOUSE_HPOS; - [CCode (cheader_filename = "gsound.h", cname = "GSOUND_ATTR_EVENT_MOUSE_VPOS")] - public const string EVENT_MOUSE_VPOS; - [CCode (cheader_filename = "gsound.h", cname = "GSOUND_ATTR_EVENT_MOUSE_X")] - public const string EVENT_MOUSE_X; - [CCode (cheader_filename = "gsound.h", cname = "GSOUND_ATTR_EVENT_MOUSE_Y")] - public const string EVENT_MOUSE_Y; - [CCode (cheader_filename = "gsound.h", cname = "GSOUND_ATTR_MEDIA_ARTIST")] - public const string MEDIA_ARTIST; - [CCode (cheader_filename = "gsound.h", cname = "GSOUND_ATTR_MEDIA_FILENAME")] - public const string MEDIA_FILENAME; - [CCode (cheader_filename = "gsound.h", cname = "GSOUND_ATTR_MEDIA_ICON")] - public const string MEDIA_ICON; - [CCode (cheader_filename = "gsound.h", cname = "GSOUND_ATTR_MEDIA_ICON_NAME")] - public const string MEDIA_ICON_NAME; - [CCode (cheader_filename = "gsound.h", cname = "GSOUND_ATTR_MEDIA_LANGUAGE")] - public const string MEDIA_LANGUAGE; - [CCode (cheader_filename = "gsound.h", cname = "GSOUND_ATTR_MEDIA_NAME")] - public const string MEDIA_NAME; - [CCode (cheader_filename = "gsound.h", cname = "GSOUND_ATTR_MEDIA_ROLE")] - public const string MEDIA_ROLE; - [CCode (cheader_filename = "gsound.h", cname = "GSOUND_ATTR_MEDIA_TITLE")] - public const string MEDIA_TITLE; - [CCode (cheader_filename = "gsound.h", cname = "GSOUND_ATTR_WINDOW_DESKTOP")] - public const string WINDOW_DESKTOP; - [CCode (cheader_filename = "gsound.h", cname = "GSOUND_ATTR_WINDOW_HEIGHT")] - public const string WINDOW_HEIGHT; - [CCode (cheader_filename = "gsound.h", cname = "GSOUND_ATTR_WINDOW_HPOS")] - public const string WINDOW_HPOS; - [CCode (cheader_filename = "gsound.h", cname = "GSOUND_ATTR_WINDOW_ICON")] - public const string WINDOW_ICON; - [CCode (cheader_filename = "gsound.h", cname = "GSOUND_ATTR_WINDOW_ICON_NAME")] - public const string WINDOW_ICON_NAME; - [CCode (cheader_filename = "gsound.h", cname = "GSOUND_ATTR_WINDOW_ID")] - public const string WINDOW_ID; - [CCode (cheader_filename = "gsound.h", cname = "GSOUND_ATTR_WINDOW_NAME")] - public const string WINDOW_NAME; - [CCode (cheader_filename = "gsound.h", cname = "GSOUND_ATTR_WINDOW_VPOS")] - public const string WINDOW_VPOS; - [CCode (cheader_filename = "gsound.h", cname = "GSOUND_ATTR_WINDOW_WIDTH")] - public const string WINDOW_WIDTH; - [CCode (cheader_filename = "gsound.h", cname = "GSOUND_ATTR_WINDOW_X")] - public const string WINDOW_X; - [CCode (cheader_filename = "gsound.h", cname = "GSOUND_ATTR_WINDOW_X11_DISPLAY")] - public const string WINDOW_X11_DISPLAY; - [CCode (cheader_filename = "gsound.h", cname = "GSOUND_ATTR_WINDOW_X11_MONITOR")] - public const string WINDOW_X11_MONITOR; - [CCode (cheader_filename = "gsound.h", cname = "GSOUND_ATTR_WINDOW_X11_SCREEN")] - public const string WINDOW_X11_SCREEN; - [CCode (cheader_filename = "gsound.h", cname = "GSOUND_ATTR_WINDOW_X11_XID")] - public const string WINDOW_X11_XID; - [CCode (cheader_filename = "gsound.h", cname = "GSOUND_ATTR_WINDOW_Y")] - public const string WINDOW_Y; - } - [CCode (cheader_filename = "gsound.h", type_id = "gsound_context_get_type ()")] - public class Context : GLib.Object, GLib.Initable { - [CCode (has_construct_function = false)] - public Context (GLib.Cancellable? cancellable = null) throws GLib.Error; - public bool cache (...) throws GLib.Error; - public bool cachev (GLib.HashTable attrs) throws GLib.Error; - public bool open () throws GLib.Error; - public async bool play_full (GLib.Cancellable? cancellable, ...) throws GLib.Error; - [CCode (finish_name = "gsound_context_play_full_finish")] - public async bool play_fullv (GLib.HashTable attrs, GLib.Cancellable? cancellable) throws GLib.Error; - public bool play_simple (GLib.Cancellable? cancellable = null, ...) throws GLib.Error; - public bool play_simplev (GLib.HashTable attrs, GLib.Cancellable? cancellable = null) throws GLib.Error; - public bool set_attributes (...) throws GLib.Error; - public bool set_attributesv (GLib.HashTable attrs) throws GLib.Error; - public bool set_driver (string driver) throws GLib.Error; - } - [CCode (cheader_filename = "gsound.h", cprefix = "GSOUND_ERROR_", has_type_id = false)] - public errordomain Error { - NOTSUPPORTED, - INVALID, - STATE, - OOM, - NODRIVER, - SYSTEM, - CORRUPT, - TOOBIG, - NOTFOUND, - DESTROYED, - CANCELED, - NOTAVAILABLE, - ACCESS, - IO, - INTERNAL, - DISABLED, - FORKED, - DISCONNECTED; - public static GLib.Quark quark (); - } -} diff --git a/.flatpak-builder/cache/objects/8a/b12952c06e156f4909674fdc5866f37ac8bf98248259c5385705a193d9436c.file b/.flatpak-builder/cache/objects/8a/b12952c06e156f4909674fdc5866f37ac8bf98248259c5385705a193d9436c.file deleted file mode 100644 index dd1569e..0000000 --- a/.flatpak-builder/cache/objects/8a/b12952c06e156f4909674fdc5866f37ac8bf98248259c5385705a193d9436c.file +++ /dev/null @@ -1,91 +0,0 @@ -.TH INTLTOOL-EXTRACT 8 "2003-08-02" "intltool" - -.SH NAME -intltool-extract \- generate header files which can be read by gettext - -.SH SYNOPSIS -.B intltool-extract -.I "[options]..." SOURCE_FILE - - -.SH DESCRIPTION -.B intltool-extract -extracts strings in the specified XML/INI type \fISOURCE_FILE\fR and writes -them into a C header file. Then \fBxgettext\fR(1) can merge these strings -inside header file into po template. - -.B intltool-extract -is usually not executed manually, but called from \fBintltool-update\fR(8) -instead. - -.SH OPTIONS -.IP "\fB\-l\fR" 4 -.PD 0 -.IP "\fB\-\-local\fR" 4 -.PD -Creates a subdirectory under current working directory (named "\fBtmp/\fR") -and writes files there. This option can't be used with \fB\-\-update\fR option. -.IP "\fB\-\-update\fR" 4 -.PD -Writes header file into the same directory the source file is in. New file -name is the source file name appending ".h" extension. This option can't be -used with -.BR \-l / \-\-local -option. Besides, this option is the default option if neither \fB\-\-local\fR -nor \fB\-\-update\fR is specified. -.IP "\fB\-\-type\fR=\fITYPE\fR" 4 -.PD -Specify the type of source file. Currently supported types are: -.br -"gettext/glade" (.glade, .glade2) -.br -"gettext/gsettings" (.gschema.xml) -.br -"gettext/ini" (Generic INI file) -.br -"gettext/keys" (.keys) -.br -"gettext/rfc822deb" (RFC 822 format file) -.br -"gettext/quoted" (all strings within "") -.br -"gettext/schemas" (.schemas) -.br -"gettext/scheme" (.scm) -.br -"gettext/xml" (Generic XML file) -.br -"gettext/qtdesigner" (Qt Designer .ui files) -.IP "\fB\-v\fR" 4 -.PD 0 -.IP "\fB\-\-version\fR" 4 -.PD -Show version information. -.IP "\fB\-h\fR" 4 -.PD 0 -.IP "\fB\--help\fR" 4 -.PD -Show usage and basic help information. -.IP "\fB\-q\fR" 4 -.PD 0 -.IP "\fB\-\-quiet\fR" 4 -.PD -Be quiet while running. - -.SH REPORTING BUGS -Report bugs to http://bugs.launchpad.net/intltool - -.SH AUTHOR -Darin Adler -.br -Kenneth Christiansen -.br -Maciej Stachowiak - - -.SH SEE ALSO -.BR intltoolize (8), -.BR intltool-prepare (8), -.BR intltool-merge (8), -.BR intltool-update (8), -.BR xgettext (1) diff --git a/.flatpak-builder/cache/objects/8c/464c62f82966286fe36d854b557e5777b74d93d94a96fecf3ac5c9a648598b.dirtree b/.flatpak-builder/cache/objects/8c/464c62f82966286fe36d854b557e5777b74d93d94a96fecf3ac5c9a648598b.dirtree deleted file mode 100644 index 7a1bc32..0000000 Binary files a/.flatpak-builder/cache/objects/8c/464c62f82966286fe36d854b557e5777b74d93d94a96fecf3ac5c9a648598b.dirtree and /dev/null differ diff --git a/.flatpak-builder/cache/objects/8d/077d28e9f259fb177dbc3e8bb5dd275890a487ca0d575a1a88333a749fa12f.file b/.flatpak-builder/cache/objects/8d/077d28e9f259fb177dbc3e8bb5dd275890a487ca0d575a1a88333a749fa12f.file deleted file mode 100644 index f18f13d..0000000 --- a/.flatpak-builder/cache/objects/8d/077d28e9f259fb177dbc3e8bb5dd275890a487ca0d575a1a88333a749fa12f.file +++ /dev/null @@ -1,722 +0,0 @@ -/*-*- Mode: C; c-basic-offset: 8 -*-*/ - -/*** - This file is part of libcanberra. - - Copyright 2008 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 - . -***/ - -#ifdef HAVE_CONFIG_H -#include -#endif - -#include - -#include "canberra.h" -#include "common.h" -#include "malloc.h" -#include "driver.h" -#include "proplist.h" -#include "macro.h" -#include "fork-detect.h" - -/** - * SECTION:canberra - * @short_description: General libcanberra API - * - * libcanberra defines a simple abstract interface for playing event sounds. - * - * libcanberra relies on the XDG sound naming specification for - * identifying event sounds. On Unix/Linux the right sound to play is - * found via the mechanisms defined in the XDG sound themeing - * specification. On other systems the XDG sound name is translated to - * the native sound id for the operating system. - * - * An event sound is triggered via libcanberra by calling the - * ca_context_play() function on a previously created ca_context - * object. The ca_context_play() takes a list of key-value pairs that - * describe the event sound to generate as closely as possible. The - * most important property is %CA_PROP_EVENT_ID which defines the XDG - * sound name for the sound to play. - * - * libcanberra is not a generic event abstraction system. It's only - * purpose is playing sounds -- however in a very elaborate way. As - * much information about the context the sound is triggered from - * shall be supplied to the sound system as possible, so that it can - * replace the sound with some other kind of feedback for a11y - * cases. Also this additional information can be used to enhance user - * experience (e.g. by positioning sounds in space depending on the - * place on the screen the sound was triggered from, and similar - * uses). - * - * The set of properties defined for event sounds is extensible and - * shared with other audio systems, such as PulseAudio. Some of - * the properties that may be set are specific to an application, to a - * window, to an input event or to the media being played back. - * - * The user can attach a set of properties to the context itself, - * which is than automatically inherited by each sample being played - * back. (ca_context_change_props()). - * - * Some of the properties can be filled in by libcanberra or one of - * its backends automatically and thus need not be be filled in by the - * application (such as %CA_PROP_APPLICATION_PROCESS_ID and - * friends). However the application can always overwrite any of these - * implicit properties. - * - * libcanberra is thread-safe and OOM-safe (as far as the backend - * allows this). It is not async-signal safe. - * - * Most libcanberra functions return an integer that indicates success - * when 0 (%CA_SUCCESS) or an error when negative. In the latter case - * ca_strerror() can be used to convert this code into a human - * readable string. - * - * libcanberra property names need to be in 7bit ASCII, string - * property values UTF8. - * - * Optionally a libcanberra backend can support caching of sounds in a - * sound system. If this functionality is used, the latencies for - * event sound playback can be much smaller and fewer resources are - * needed to start playback. If a backend does not support cacheing, - * the respective functions will return an error code of - * %CA_ERROR_NOTSUPPORTED. - * - * It is highly recommended that the application sets the - * %CA_PROP_APPLICATION_NAME, %CA_PROP_APPLICATION_ID, - * %CA_PROP_APPLICATION_ICON_NAME/%CA_PROP_APPLICATION_ICON properties - * immediately after creating the ca_context, before calling - * ca_context_open() or ca_context_play(). - * - * Its is highly recommended to pass at least %CA_PROP_EVENT_ID, - * %CA_PROP_EVENT_DESCRIPTION to ca_context_play() for each event - * sound generated. For sound events based on mouse inputs events - * %CA_PROP_EVENT_MOUSE_X, %CA_PROP_EVENT_MOUSE_Y, %CA_PROP_EVENT_MOUSE_HPOS, - * %CA_PROP_EVENT_MOUSE_VPOS, %CA_PROP_EVENT_MOUSE_BUTTON should be - * passed. For sound events attached to a widget on the screen, the - * %CA_PROP_WINDOW_xxx properties should be set. - * - * - */ - -/** - * ca_context_create: - * @c: A pointer wheere to fill in the newly created context object. - * - * Create an (unconnected) context object. This call will not connect - * to the sound system, calling this function might even suceed if no - * working driver backend is available. To find out if one is - * available call ca_context_open(). - * - * Returns: 0 on success, negative error code on error. - */ - -int ca_context_create(ca_context **_c) { - ca_context *c; - int ret; - const char *d; - - ca_return_val_if_fail(!ca_detect_fork(), CA_ERROR_FORKED); - ca_return_val_if_fail(_c, CA_ERROR_INVALID); - - if (!(c = ca_new0(ca_context, 1))) - return CA_ERROR_OOM; - - if (!(c->mutex = ca_mutex_new())) { - ca_context_destroy(c); - return CA_ERROR_OOM; - } - - if ((ret = ca_proplist_create(&c->props)) < 0) { - ca_context_destroy(c); - return ret; - } - - if ((d = getenv("CANBERRA_DRIVER"))) { - if ((ret = ca_context_set_driver(c, d)) < 0) { - ca_context_destroy(c); - return ret; - } - } - - if ((d = getenv("CANBERRA_DEVICE"))) { - if ((ret = ca_context_change_device(c, d)) < 0) { - ca_context_destroy(c); - return ret; - } - } - - *_c = c; - return CA_SUCCESS; -} - -/** - * ca_context_destroy: - * @c: the context to destroy. - * - * Destroy a (connected or unconnected) context object. - * - * Returns: 0 on success, negative error code on error. - */ -int ca_context_destroy(ca_context *c) { - int ret = CA_SUCCESS; - - ca_return_val_if_fail(!ca_detect_fork(), CA_ERROR_FORKED); - ca_return_val_if_fail(c, CA_ERROR_INVALID); - - /* There's no locking necessary here, because the application is - * broken anyway if it destructs this object in one thread and - * still is calling a method of it in another. */ - - if (c->opened) - ret = driver_destroy(c); - - if (c->props) - ca_assert_se(ca_proplist_destroy(c->props) == CA_SUCCESS); - - if (c->mutex) - ca_mutex_free(c->mutex); - - ca_free(c->driver); - ca_free(c->device); - ca_free(c); - - return ret; -} - -/** - * ca_context_set_driver: - * @c: the context to change the backend driver for - * @driver: the backend driver to use (e.g. "alsa", "pulse", "null", ...) - * - * Specify the backend driver used. This function may not be called again after - * ca_context_open() suceeded. This function might suceed even when - * the specified driver backend is not available. Use - * ca_context_open() to find out whether the backend is available. - * - * Returns: 0 on success, negative error code on error. - */ -int ca_context_set_driver(ca_context *c, const char *driver) { - char *n; - int ret; - - ca_return_val_if_fail(!ca_detect_fork(), CA_ERROR_FORKED); - ca_return_val_if_fail(c, CA_ERROR_INVALID); - ca_mutex_lock(c->mutex); - ca_return_val_if_fail_unlock(!c->opened, CA_ERROR_STATE, c->mutex); - - if (!driver) - n = NULL; - else if (!(n = ca_strdup(driver))) { - ret = CA_ERROR_OOM; - goto fail; - } - - ca_free(c->driver); - c->driver = n; - - ret = CA_SUCCESS; - -fail: - ca_mutex_unlock(c->mutex); - - return ret; -} - -/** - * ca_context_change_device: - * @c: the context to change the backend device for - * @device: the backend device to use, in a format that is specific to the backend. - * - * Specify the backend device to use. This function may be called not be called after - * ca_context_open() suceeded. This function might suceed even when - * the specified driver backend is not available. Use - * ca_context_open() to find out whether the backend is available - * - * Depending on the backend use this might or might not cause all - * currently playing event sounds to be moved to the new device.. - * - * Returns: 0 on success, negative error code on error. - */ -int ca_context_change_device(ca_context *c, const char *device) { - char *n; - int ret; - - ca_return_val_if_fail(!ca_detect_fork(), CA_ERROR_FORKED); - ca_return_val_if_fail(c, CA_ERROR_INVALID); - ca_mutex_lock(c->mutex); - - if (!device) - n = NULL; - else if (!(n = ca_strdup(device))) { - ret = CA_ERROR_OOM; - goto fail; - } - - ret = c->opened ? driver_change_device(c, n) : CA_SUCCESS; - - if (ret == CA_SUCCESS) { - ca_free(c->device); - c->device = n; - } else - ca_free(n); - -fail: - ca_mutex_unlock(c->mutex); - - return ret; -} - -static int context_open_unlocked(ca_context *c) { - int ret; - - ca_return_val_if_fail(!ca_detect_fork(), CA_ERROR_FORKED); - ca_return_val_if_fail(c, CA_ERROR_INVALID); - - if (c->opened) - return CA_SUCCESS; - - if ((ret = driver_open(c)) == CA_SUCCESS) - c->opened = TRUE; - - return ret; -} - -/** - * ca_context_open: - * @c: the context to connect. - * - * Connect the context to the sound system. This call is implicitly - * called in ca_context_play() or ca_context_cache() if not called - * explicitly. It is recommended to initialize application properties - * with ca_context_change_props() before calling this function. - * - * Returns: 0 on success, negative error code on error. - */ -int ca_context_open(ca_context *c) { - int ret; - - ca_return_val_if_fail(!ca_detect_fork(), CA_ERROR_FORKED); - ca_return_val_if_fail(c, CA_ERROR_INVALID); - ca_mutex_lock(c->mutex); - ca_return_val_if_fail_unlock(!c->opened, CA_ERROR_STATE, c->mutex); - - ret = context_open_unlocked(c); - - ca_mutex_unlock(c->mutex); - - return ret; -} - -/** - * ca_context_change_props: - * @c: the context to set the properties on. - * @...: the list of string pairs for the properties. Needs to be a NULL terminated list. - * - * Write one or more string properties to the context object. Requires - * final NULL sentinel. Properties set like this will be attached to - * both the client object of the sound server and to all event sounds - * played or cached. It is recommended to call this function at least - * once before calling ca_context_open(), so that the initial - * application properties are set properly before the initial - * connection to the sound system. This function can be called both - * before and after the ca_context_open() call. Properties that have - * already been set before will be overwritten. - * - * Returns: 0 on success, negative error code on error. - */ - -int ca_context_change_props(ca_context *c, ...) { - va_list ap; - int ret; - ca_proplist *p = NULL; - - ca_return_val_if_fail(!ca_detect_fork(), CA_ERROR_FORKED); - ca_return_val_if_fail(c, CA_ERROR_INVALID); - - va_start(ap, c); - ret = ca_proplist_from_ap(&p, ap); - va_end(ap); - - if (ret < 0) - return ret; - - ret = ca_context_change_props_full(c, p); - - ca_assert_se(ca_proplist_destroy(p) == 0); - - return ret; -} - -/** - * ca_context_change_props_full: - * @c: the context to set the properties on. - * @p: the property list to set. - * - * Similar to ca_context_change_props(), but takes a ca_proplist - * instead of a variable list of properties. Can be used to set binary - * properties such as %CA_PROP_APPLICATION_ICON. - * - * Returns: 0 on success, negative error code on error. - */ - -int ca_context_change_props_full(ca_context *c, ca_proplist *p) { - int ret; - ca_proplist *merged; - - ca_return_val_if_fail(!ca_detect_fork(), CA_ERROR_FORKED); - ca_return_val_if_fail(c, CA_ERROR_INVALID); - ca_return_val_if_fail(p, CA_ERROR_INVALID); - - ca_mutex_lock(c->mutex); - - if ((ret = ca_proplist_merge(&merged, c->props, p)) < 0) - goto finish; - - ret = c->opened ? driver_change_props(c, p, merged) : CA_SUCCESS; - - if (ret == CA_SUCCESS) { - ca_assert_se(ca_proplist_destroy(c->props) == CA_SUCCESS); - c->props = merged; - } else - ca_assert_se(ca_proplist_destroy(merged) == CA_SUCCESS); - -finish: - - ca_mutex_unlock(c->mutex); - - return ret; -} - -/** - * ca_context_play: - * @c: the context to play the event sound on - * @id: an integer id this sound can later be identified with when calling ca_context_cancel() - * @...: additional properties for this sound event. - * - * Play one event sound. id can be any numeric value which later can - * be used to cancel an event sound that is currently being - * played. You may use the same id twice or more times if you want to - * cancel multiple event sounds with a single ca_context_cancel() call - * at once. It is recommended to pass 0 for the id if the event sound - * shall never be canceled. If the requested sound is not cached in - * the server yet this call might result in the sample being uploaded - * temporarily or permanently (this may be controlled with %CA_PROP_CANBERRA_CACHE_CONTROL). This function will start playback - * in the background. It will not wait until playback - * completed. Depending on the backend used a sound that is started - * shortly before your application terminates might or might not continue to - * play after your application terminated. If you want to make sure - * that all sounds finish to play you need to wait synchronously for - * the callback function of ca_context_play_full() to be called before you - * terminate your application. - * - * The sample to play is identified by the %CA_PROP_EVENT_ID - * property. If it is already cached in the server the cached version - * is played. The properties passed in this call are merged with the - * properties supplied when the sample was cached (if applicable) - * and the context properties as set with ca_context_change_props(). - * - * If %CA_PROP_EVENT_ID is not defined the sound file passed in the - * %CA_PROP_MEDIA_FILENAME is played. - * - * On Linux/Unix the right sound to play is determined according to - * %CA_PROP_EVENT_ID, - * %CA_PROP_APPLICATION_LANGUAGE/%CA_PROP_MEDIA_LANGUAGE, the system - * locale, %CA_PROP_CANBERRA_XDG_THEME_NAME and - * %CA_PROP_CANBERRA_XDG_THEME_OUTPUT_PROFILE, following the XDG Sound - * Theming Specification. On non-Unix systems the native event sound - * that matches the XDG sound name in %CA_PROP_EVENT_ID is played. - * - * Returns: 0 on success, negative error code on error. - */ - -int ca_context_play(ca_context *c, uint32_t id, ...) { - int ret; - va_list ap; - ca_proplist *p = NULL; - - ca_return_val_if_fail(!ca_detect_fork(), CA_ERROR_FORKED); - ca_return_val_if_fail(c, CA_ERROR_INVALID); - - va_start(ap, id); - ret = ca_proplist_from_ap(&p, ap); - va_end(ap); - - if (ret < 0) - return ret; - - ret = ca_context_play_full(c, id, p, NULL, NULL); - - ca_assert_se(ca_proplist_destroy(p) == 0); - - return ret; -} - -/** - * ca_context_play_full: - * @c: the context to play the event sound on - * @id: an integer id this sound can be later be identified with when calling ca_context_cancel() or when the callback is called. - * @p: A property list of properties for this event sound - * @cb: A callback to call when this sound event sucessfully finished playing or when an error occured during playback. - * - * Play one event sound, and call the specified callback function when - * completed. See ca_finish_callback_t for the semantics the callback - * is called in. Also see ca_context_play(). - * - * It is guaranteed that the callback is called exactly once if - * ca_context_play_full() returns CA_SUCCESS. You thus may safely pass - * allocated memory to the callback and assume that it is freed - * properly. - * - * Returns: 0 on success, negative error code on error. - */ - -int ca_context_play_full(ca_context *c, uint32_t id, ca_proplist *p, ca_finish_callback_t cb, void *userdata) { - int ret; - const char *t; - ca_bool_t enabled = TRUE; - - ca_return_val_if_fail(!ca_detect_fork(), CA_ERROR_FORKED); - ca_return_val_if_fail(c, CA_ERROR_INVALID); - ca_return_val_if_fail(p, CA_ERROR_INVALID); - ca_return_val_if_fail(!userdata || cb, CA_ERROR_INVALID); - - ca_mutex_lock(c->mutex); - - ca_return_val_if_fail_unlock(ca_proplist_contains(p, CA_PROP_EVENT_ID) || - ca_proplist_contains(c->props, CA_PROP_EVENT_ID) || - ca_proplist_contains(p, CA_PROP_MEDIA_FILENAME) || - ca_proplist_contains(c->props, CA_PROP_MEDIA_FILENAME), CA_ERROR_INVALID, c->mutex); - - ca_mutex_lock(c->props->mutex); - if ((t = ca_proplist_gets_unlocked(c->props, CA_PROP_CANBERRA_ENABLE))) - enabled = !ca_streq(t, "0"); - ca_mutex_unlock(c->props->mutex); - - ca_mutex_lock(p->mutex); - if ((t = ca_proplist_gets_unlocked(p, CA_PROP_CANBERRA_ENABLE))) - enabled = !ca_streq(t, "0"); - ca_mutex_unlock(p->mutex); - - ca_return_val_if_fail_unlock(enabled, CA_ERROR_DISABLED, c->mutex); - - if ((ret = context_open_unlocked(c)) < 0) - goto finish; - - ca_assert(c->opened); - - ret = driver_play(c, id, p, cb, userdata); - -finish: - - ca_mutex_unlock(c->mutex); - - return ret; -} - -/** - * - * ca_context_cancel: - * @c: the context to cancel the sounds on - * @id: the id that identify the sounds to cancel. - * - * Cancel one or more event sounds that have been started via - * ca_context_play(). If the sound was started with - * ca_context_play_full() and a callback function was passed this - * might cause this function to be called with %CA_ERROR_CANCELED as - * error code. - * - * Returns: 0 on success, negative error code on error. - */ -int ca_context_cancel(ca_context *c, uint32_t id) { - int ret; - - ca_return_val_if_fail(!ca_detect_fork(), CA_ERROR_FORKED); - ca_return_val_if_fail(c, CA_ERROR_INVALID); - ca_mutex_lock(c->mutex); - ca_return_val_if_fail_unlock(c->opened, CA_ERROR_STATE, c->mutex); - - ret = driver_cancel(c, id); - - ca_mutex_unlock(c->mutex); - - return ret; -} - -/** - * ca_context_cache: - * @c: The context to use for uploading. - * @...: The properties for this event sound. Terminated with NULL. - * - * Upload the specified sample into the audio server and attach the - * specified properties to it. This function will only return after - * the sample upload was finished. - * - * The sound to cache is found with the same algorithm that is used to - * find the sounds for ca_context_play(). - * - * If the backend doesn't support caching sound samples this function - * will return %CA_ERROR_NOTSUPPORTED. - * - * Returns: 0 on success, negative error code on error. - */ - -int ca_context_cache(ca_context *c, ...) { - int ret; - va_list ap; - ca_proplist *p = NULL; - - ca_return_val_if_fail(!ca_detect_fork(), CA_ERROR_FORKED); - ca_return_val_if_fail(c, CA_ERROR_INVALID); - - va_start(ap, c); - ret = ca_proplist_from_ap(&p, ap); - va_end(ap); - - if (ret < 0) - return ret; - - ret = ca_context_cache_full(c, p); - - ca_assert_se(ca_proplist_destroy(p) == 0); - - return ret; -} - -/** - * ca_context_cache_full: - * @c: The context to use for uploading. - * @p: The property list for this event sound. - * - * Upload the specified sample into the server and attach the - * specified properties to it. Similar to ca_context_cache() but takes - * a ca_proplist instead of a variable number of arguments. - * - * If the backend doesn't support caching sound samples this function - * will return CA_ERROR_NOTSUPPORTED. - * - * Returns: 0 on success, negative error code on error. - */ -int ca_context_cache_full(ca_context *c, ca_proplist *p) { - int ret; - - ca_return_val_if_fail(!ca_detect_fork(), CA_ERROR_FORKED); - ca_return_val_if_fail(c, CA_ERROR_INVALID); - ca_return_val_if_fail(p, CA_ERROR_INVALID); - - ca_mutex_lock(c->mutex); - - ca_return_val_if_fail_unlock(ca_proplist_contains(p, CA_PROP_EVENT_ID) || - ca_proplist_contains(c->props, CA_PROP_EVENT_ID), CA_ERROR_INVALID, c->mutex); - - if ((ret = context_open_unlocked(c)) < 0) - goto finish; - - ca_assert(c->opened); - - ret = driver_cache(c, p); - -finish: - - ca_mutex_unlock(c->mutex); - - return ret; -} - -/** - * ca_strerror: - * @code: Numerical error code as returned by a libcanberra API function - * - * Converts a numerical error code as returned by most libcanberra API functions into a human readable error string. - * - * Returns: a human readable error string. - */ -const char *ca_strerror(int code) { - - const char * const error_table[-_CA_ERROR_MAX] = { - [-CA_SUCCESS] = "Success", - [-CA_ERROR_NOTSUPPORTED] = "Operation not supported", - [-CA_ERROR_INVALID] = "Invalid argument", - [-CA_ERROR_STATE] = "Invalid state", - [-CA_ERROR_OOM] = "Out of memory", - [-CA_ERROR_NODRIVER] = "No such driver", - [-CA_ERROR_SYSTEM] = "System error", - [-CA_ERROR_CORRUPT] = "File or data corrupt", - [-CA_ERROR_TOOBIG] = "File or data too large", - [-CA_ERROR_NOTFOUND] = "File or data not found", - [-CA_ERROR_DESTROYED] = "Destroyed", - [-CA_ERROR_CANCELED] = "Canceled", - [-CA_ERROR_NOTAVAILABLE] = "Not available", - [-CA_ERROR_ACCESS] = "Access forbidden", - [-CA_ERROR_IO] = "IO error", - [-CA_ERROR_INTERNAL] = "Internal error", - [-CA_ERROR_DISABLED] = "Sound disabled", - [-CA_ERROR_FORKED] = "Process forked", - [-CA_ERROR_DISCONNECTED] = "Disconnected" - }; - - ca_return_val_if_fail(code <= 0, NULL); - ca_return_val_if_fail(code > _CA_ERROR_MAX, NULL); - - return error_table[-code]; -} - -/* Not exported */ -int ca_parse_cache_control(ca_cache_control_t *control, const char *c) { - ca_return_val_if_fail(control, CA_ERROR_INVALID); - ca_return_val_if_fail(c, CA_ERROR_INVALID); - - if (ca_streq(c, "never")) - *control = CA_CACHE_CONTROL_NEVER; - else if (ca_streq(c, "permanent")) - *control = CA_CACHE_CONTROL_PERMANENT; - else if (ca_streq(c, "volatile")) - *control = CA_CACHE_CONTROL_VOLATILE; - else - return CA_ERROR_INVALID; - - return CA_SUCCESS; -} - -/** - * ca_context_playing: - * @c: the context to check if sound is still playing - * @id: the id that identify the sounds to check - * @playing: a pointer to a boolean that will be updated with the play status - * - * Check if at least one sound with the specified id is still - * playing. Returns 0 in *playing if no sound with this id is playing - * anymore or non-zero if there is at least one playing. - * - * Returns: 0 on success, negative error code on error. - * Since: 0.16 - */ -int ca_context_playing(ca_context *c, uint32_t id, int *playing) { - int ret; - - ca_return_val_if_fail(!ca_detect_fork(), CA_ERROR_FORKED); - ca_return_val_if_fail(c, CA_ERROR_INVALID); - ca_return_val_if_fail(playing, CA_ERROR_INVALID); - ca_mutex_lock(c->mutex); - ca_return_val_if_fail_unlock(c->opened, CA_ERROR_STATE, c->mutex); - - ret = driver_playing(c, id, playing); - - ca_mutex_unlock(c->mutex); - - return ret; -} diff --git a/.flatpak-builder/cache/objects/8f/fecc2fcf7107ee8fb4d2f9f9655e55f5bb395b5b9caa22878faf4730fa206a.dirtree b/.flatpak-builder/cache/objects/8f/fecc2fcf7107ee8fb4d2f9f9655e55f5bb395b5b9caa22878faf4730fa206a.dirtree deleted file mode 100644 index 763e923..0000000 Binary files a/.flatpak-builder/cache/objects/8f/fecc2fcf7107ee8fb4d2f9f9655e55f5bb395b5b9caa22878faf4730fa206a.dirtree and /dev/null differ diff --git a/.flatpak-builder/cache/objects/92/8b415e5609156c6f266218a5be85e3144ec21135796f8d056e6bb1ea9dfebd.file b/.flatpak-builder/cache/objects/92/8b415e5609156c6f266218a5be85e3144ec21135796f8d056e6bb1ea9dfebd.file deleted file mode 100644 index e28a517..0000000 --- a/.flatpak-builder/cache/objects/92/8b415e5609156c6f266218a5be85e3144ec21135796f8d056e6bb1ea9dfebd.file +++ /dev/null @@ -1,1344 +0,0 @@ -/*-*- Mode: C; c-basic-offset: 8 -*-*/ - -/*** - This file is part of libcanberra. - - Copyright 2008 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 - . -***/ - -#ifdef HAVE_CONFIG_H -#include -#endif - -/* The locking order needs to be strictly followed! First take the - * mainloop mutex, only then take outstanding_mutex if you need both! - * Not the other way round, beacause we might then enter a - * deadlock! */ - -#include -#include - -#include -#include -#include -#include -#include - -#include "canberra.h" -#include "common.h" -#include "driver.h" -#include "llist.h" -#include "read-sound-file.h" -#include "sound-theme-spec.h" -#include "malloc.h" - -enum outstanding_type { - OUTSTANDING_SAMPLE, - OUTSTANDING_STREAM, - OUTSTANDING_UPLOAD -}; - -struct outstanding { - CA_LLIST_FIELDS(struct outstanding); - enum outstanding_type type; - ca_context *context; - uint32_t id; - uint32_t sink_input; - pa_stream *stream; - pa_operation *drain_operation; - ca_finish_callback_t callback; - void *userdata; - ca_sound_file *file; - int error; - unsigned clean_up:1; /* Handler needs to clean up the outstanding struct */ - unsigned finished:1; /* finished playing */ -}; - -struct private { - pa_threaded_mainloop *mainloop; - pa_context *context; - ca_theme_data *theme; - ca_bool_t subscribed; - ca_bool_t reconnect; - - ca_mutex *outstanding_mutex; - CA_LLIST_HEAD(struct outstanding, outstanding); -}; - -#define PRIVATE(c) ((struct private *) ((c)->private)) - -static void context_state_cb(pa_context *pc, void *userdata); -static void context_subscribe_cb(pa_context *pc, pa_subscription_event_type_t t, uint32_t idx, void *userdata); - -static void outstanding_disconnect(struct outstanding *o) { - ca_assert(o); - - if (o->stream) { - if (o->drain_operation) { - pa_operation_cancel(o->drain_operation); - pa_operation_unref(o->drain_operation); - o->drain_operation = NULL; - } - - pa_stream_set_write_callback(o->stream, NULL, NULL); - pa_stream_set_state_callback(o->stream, NULL, NULL); - pa_stream_disconnect(o->stream); - pa_stream_unref(o->stream); - o->stream = NULL; - } -} - -static void outstanding_free(struct outstanding *o) { - ca_assert(o); - - outstanding_disconnect(o); - - if (o->file) - ca_sound_file_close(o->file); - - ca_free(o); -} - -static int convert_proplist(pa_proplist **_l, ca_proplist *c) { - pa_proplist *l; - ca_prop *i; - - ca_return_val_if_fail(_l, CA_ERROR_INVALID); - ca_return_val_if_fail(c, CA_ERROR_INVALID); - - if (!(l = pa_proplist_new())) - return CA_ERROR_OOM; - - ca_mutex_lock(c->mutex); - - for (i = c->first_item; i; i = i->next_item) - if (pa_proplist_set(l, i->key, CA_PROP_DATA(i), i->nbytes) < 0) { - ca_mutex_unlock(c->mutex); - pa_proplist_free(l); - return CA_ERROR_INVALID; - } - - ca_mutex_unlock(c->mutex); - - *_l = l; - - return CA_SUCCESS; -} - -static pa_proplist *strip_prefix(pa_proplist *l, const char *prefix) { - const char *key; - void *state = NULL; - ca_assert(l); - - while ((key = pa_proplist_iterate(l, &state))) - if (strncmp(key, prefix, strlen(prefix)) == 0) - pa_proplist_unset(l, key); - - return l; -} - -static void add_common(pa_proplist *l) { - ca_assert(l); - - if (!pa_proplist_contains(l, CA_PROP_MEDIA_ROLE)) - pa_proplist_sets(l, CA_PROP_MEDIA_ROLE, "event"); - - if (!pa_proplist_contains(l, CA_PROP_MEDIA_NAME)) { - const char *t; - - if ((t = pa_proplist_gets(l, CA_PROP_EVENT_ID))) - pa_proplist_sets(l, CA_PROP_MEDIA_NAME, t); - else if ((t = pa_proplist_gets(l, CA_PROP_MEDIA_FILENAME))) - pa_proplist_sets(l, CA_PROP_MEDIA_NAME, t); - else - pa_proplist_sets(l, CA_PROP_MEDIA_NAME, "libcanberra"); - } -} - -static int translate_error(int error) { - static const int table[PA_ERR_MAX] = { - [PA_OK] = CA_SUCCESS, - [PA_ERR_ACCESS] = CA_ERROR_ACCESS, - [PA_ERR_COMMAND] = CA_ERROR_IO, - [PA_ERR_INVALID] = CA_ERROR_INVALID, - [PA_ERR_EXIST] = CA_ERROR_IO, - [PA_ERR_NOENTITY] = CA_ERROR_NOTFOUND, - [PA_ERR_CONNECTIONREFUSED] = CA_ERROR_NOTAVAILABLE, - [PA_ERR_PROTOCOL] = CA_ERROR_IO, - [PA_ERR_TIMEOUT] = CA_ERROR_IO, - [PA_ERR_AUTHKEY] = CA_ERROR_ACCESS, - [PA_ERR_INTERNAL] = CA_ERROR_IO, - [PA_ERR_CONNECTIONTERMINATED] = CA_ERROR_IO, - [PA_ERR_KILLED] = CA_ERROR_DESTROYED, - [PA_ERR_INVALIDSERVER] = CA_ERROR_INVALID, - [PA_ERR_MODINITFAILED] = CA_ERROR_NODRIVER, - [PA_ERR_BADSTATE] = CA_ERROR_STATE, - [PA_ERR_NODATA] = CA_ERROR_IO, - [PA_ERR_VERSION] = CA_ERROR_NOTSUPPORTED, - [PA_ERR_TOOLARGE] = CA_ERROR_TOOBIG, -#ifdef PA_ERR_NOTSUPPORTED - [PA_ERR_NOTSUPPORTED] = CA_ERROR_NOTSUPPORTED, -#endif -#ifdef PA_ERR_UNKNOWN - [PA_ERR_UNKNOWN] = CA_ERROR_IO, -#endif -#ifdef PA_ERR_NOEXTENSION - [PA_ERR_NOEXTENSION] = CA_ERROR_NOTSUPPORTED, -#endif -#ifdef PA_ERR_OBSOLETE - [PA_ERR_OBSOLETE] = CA_ERROR_NOTSUPPORTED, -#endif -#ifdef PA_ERR_NOTIMPLEMENTED - [PA_ERR_NOTIMPLEMENTED] = CA_ERROR_NOTSUPPORTED -#endif - }; - - ca_assert(error >= 0); - - if (error >= PA_ERR_MAX || !table[error]) - return CA_ERROR_IO; - - return table[error]; -} - -static int context_connect(ca_context *c, ca_bool_t nofail) { - pa_proplist *l; - struct private *p; - int ret; - - ca_return_val_if_fail(c, CA_ERROR_INVALID); - ca_return_val_if_fail(p = c->private, CA_ERROR_STATE); - ca_return_val_if_fail(p->mainloop, CA_ERROR_STATE); - ca_return_val_if_fail(!p->context, CA_ERROR_STATE); - - /* If this immediate attempt fails, don't try to reconnect. */ - p->reconnect = FALSE; - - if ((ret = convert_proplist(&l, c->props)) < 0) - return ret; - - strip_prefix(l, "canberra."); - - if (!pa_proplist_contains(l, PA_PROP_APPLICATION_NAME)) { - pa_proplist_sets(l, PA_PROP_APPLICATION_NAME, "libcanberra"); - pa_proplist_sets(l, PA_PROP_APPLICATION_VERSION, PACKAGE_VERSION); - - if (!pa_proplist_contains(l, PA_PROP_APPLICATION_ID)) - pa_proplist_sets(l, PA_PROP_APPLICATION_ID, "org.freedesktop.libcanberra"); - - } - - if (!(p->context = pa_context_new_with_proplist(pa_threaded_mainloop_get_api(p->mainloop), NULL, l))) { - pa_proplist_free(l); - return CA_ERROR_OOM; - } - - pa_proplist_free(l); - - pa_context_set_state_callback(p->context, context_state_cb, c); - pa_context_set_subscribe_callback(p->context, context_subscribe_cb, c); - - if (pa_context_connect(p->context, NULL, nofail ? PA_CONTEXT_NOFAIL : 0, NULL) < 0) { - ret = translate_error(p->context ? pa_context_errno(p->context) : PA_ERR_CONNECTIONREFUSED); - - if (p->context) { - pa_context_disconnect(p->context); - pa_context_unref(p->context); - p->context = NULL; - } - - return ret; - } - - return CA_SUCCESS; -} - -static void context_state_cb(pa_context *pc, void *userdata) { - ca_context *c = userdata; - pa_context_state_t state; - struct private *p; - - ca_assert(pc); - ca_assert(c); - - p = PRIVATE(c); - - state = pa_context_get_state(pc); - if (state == PA_CONTEXT_FAILED || state == PA_CONTEXT_TERMINATED) { - struct outstanding *out; - int ret; - - if (state == PA_CONTEXT_TERMINATED) - ret = CA_ERROR_DESTROYED; - else - ret = translate_error(pa_context_errno(pc)); - - ca_mutex_lock(p->outstanding_mutex); - - while ((out = p->outstanding)) { - - outstanding_disconnect(out); - CA_LLIST_REMOVE(struct outstanding, p->outstanding, out); - - ca_mutex_unlock(p->outstanding_mutex); - - if (out->callback) - out->callback(c, out->id, ret, out->userdata); - - outstanding_free(out); - - ca_mutex_lock(p->outstanding_mutex); - } - - ca_mutex_unlock(p->outstanding_mutex); - - if (state == PA_CONTEXT_FAILED && p->reconnect) { - - if (p->context) { - pa_context_disconnect(p->context); - pa_context_unref(p->context); - p->context = NULL; - } - - p->subscribed = FALSE; - - /* If we managed to connect once, then let's try to - * reconnect, and pass NOFAIL */ - context_connect(c, TRUE); - } - - } else if (state == PA_CONTEXT_READY) - /* OK, the connection suceeded once, if it dies now try to - * reconnect */ - p->reconnect = TRUE; - - pa_threaded_mainloop_signal(p->mainloop, FALSE); -} - -static void context_subscribe_cb(pa_context *pc, pa_subscription_event_type_t t, uint32_t idx, void *userdata) { - struct outstanding *out, *n; - CA_LLIST_HEAD(struct outstanding, l); - ca_context *c = userdata; - struct private *p; - - ca_assert(pc); - ca_assert(c); - - if (t != (PA_SUBSCRIPTION_EVENT_SINK_INPUT|PA_SUBSCRIPTION_EVENT_REMOVE)) - return; - - p = PRIVATE(c); - - CA_LLIST_HEAD_INIT(struct outstanding, l); - - ca_mutex_lock(p->outstanding_mutex); - - for (out = p->outstanding; out; out = n) { - n = out->next; - - if (!out->clean_up || out->type != OUTSTANDING_SAMPLE || out->sink_input != idx) - continue; - - outstanding_disconnect(out); - CA_LLIST_REMOVE(struct outstanding, p->outstanding, out); - - CA_LLIST_PREPEND(struct outstanding, l, out); - } - - ca_mutex_unlock(p->outstanding_mutex); - - while (l) { - out = l; - - CA_LLIST_REMOVE(struct outstanding, l, out); - - if (out->callback) - out->callback(c, out->id, CA_SUCCESS, out->userdata); - - outstanding_free(out); - } -} - -int driver_open(ca_context *c) { - struct private *p; - int ret; - - ca_return_val_if_fail(c, CA_ERROR_INVALID); - ca_return_val_if_fail(!c->driver || ca_streq(c->driver, "pulse"), CA_ERROR_NODRIVER); - ca_return_val_if_fail(!PRIVATE(c), CA_ERROR_STATE); - - if (!(c->private = p = ca_new0(struct private, 1))) - return CA_ERROR_OOM; - - if (!(p->outstanding_mutex = ca_mutex_new())) { - driver_destroy(c); - return CA_ERROR_OOM; - } - - if (!(p->mainloop = pa_threaded_mainloop_new())) { - driver_destroy(c); - return CA_ERROR_OOM; - } - - /* The initial connection is without NOFAIL, since we want to have - * this call fail cleanly if we cannot connect. */ - if ((ret = context_connect(c, FALSE)) != CA_SUCCESS) { - driver_destroy(c); - return ret; - } - - pa_threaded_mainloop_lock(p->mainloop); - - if (pa_threaded_mainloop_start(p->mainloop) < 0) { - pa_threaded_mainloop_unlock(p->mainloop); - driver_destroy(c); - return CA_ERROR_OOM; - } - - for (;;) { - pa_context_state_t state; - - if (!p->context) { - ret = translate_error(PA_ERR_CONNECTIONREFUSED); - pa_threaded_mainloop_unlock(p->mainloop); - driver_destroy(c); - return ret; - } - - state = pa_context_get_state(p->context); - - if (state == PA_CONTEXT_READY) - break; - - if (state == PA_CONTEXT_FAILED) { - ret = translate_error(pa_context_errno(p->context)); - pa_threaded_mainloop_unlock(p->mainloop); - driver_destroy(c); - return ret; - } - - ca_assert(state != PA_CONTEXT_TERMINATED); - - pa_threaded_mainloop_wait(p->mainloop); - } - - pa_threaded_mainloop_unlock(p->mainloop); - - return CA_SUCCESS; -} - -int driver_destroy(ca_context *c) { - struct private *p; - - ca_return_val_if_fail(c, CA_ERROR_INVALID); - ca_return_val_if_fail(c->private, CA_ERROR_STATE); - - p = PRIVATE(c); - - if (p->mainloop) - pa_threaded_mainloop_stop(p->mainloop); - - if (p->context) { - pa_context_disconnect(p->context); - pa_context_unref(p->context); - } - - while (p->outstanding) { - struct outstanding *out = p->outstanding; - CA_LLIST_REMOVE(struct outstanding, p->outstanding, out); - - if (out->callback) - out->callback(c, out->id, CA_ERROR_DESTROYED, out->userdata); - - outstanding_free(out); - } - - if (p->mainloop) - pa_threaded_mainloop_free(p->mainloop); - - if (p->theme) - ca_theme_data_free(p->theme); - - if (p->outstanding_mutex) - ca_mutex_free(p->outstanding_mutex); - - ca_free(p); - - c->private = NULL; - - return CA_SUCCESS; -} - -int driver_change_device(ca_context *c, const char *device) { - ca_return_val_if_fail(c, CA_ERROR_INVALID); - ca_return_val_if_fail(c->private, CA_ERROR_STATE); - - /* We're happy with any device change. We might however add code - * here eventually to move all currently played back event sounds - * to the new device. */ - - return CA_SUCCESS; -} - -int driver_change_props(ca_context *c, ca_proplist *changed, ca_proplist *merged) { - struct private *p; - pa_operation *o; - pa_proplist *l; - int ret = CA_SUCCESS; - - ca_return_val_if_fail(c, CA_ERROR_INVALID); - ca_return_val_if_fail(changed, CA_ERROR_INVALID); - ca_return_val_if_fail(merged, CA_ERROR_INVALID); - ca_return_val_if_fail(c->private, CA_ERROR_STATE); - - p = PRIVATE(c); - - ca_return_val_if_fail(p->mainloop, CA_ERROR_STATE); - - pa_threaded_mainloop_lock(p->mainloop); - - if (!p->context) { - pa_threaded_mainloop_unlock(p->mainloop); - return CA_ERROR_STATE; /* can be silently ignored */ - } - - if ((ret = convert_proplist(&l, changed)) < 0) - return ret; - - strip_prefix(l, "canberra."); - - /* We start these asynchronously and don't care about the return - * value */ - - if (!(o = pa_context_proplist_update(p->context, PA_UPDATE_REPLACE, l, NULL, NULL))) - ret = translate_error(pa_context_errno(p->context)); - else - pa_operation_unref(o); - - pa_threaded_mainloop_unlock(p->mainloop); - - pa_proplist_free(l); - - return ret; -} - -static int subscribe(ca_context *c) { - struct private *p; - pa_operation *o; - int ret = CA_SUCCESS; - - ca_return_val_if_fail(c, CA_ERROR_INVALID); - ca_return_val_if_fail(c->private, CA_ERROR_STATE); - p = PRIVATE(c); - - ca_return_val_if_fail(p->mainloop, CA_ERROR_STATE); - - if (p->subscribed) - return CA_SUCCESS; - - pa_threaded_mainloop_lock(p->mainloop); - - if (!p->context) { - pa_threaded_mainloop_unlock(p->mainloop); - return CA_ERROR_STATE; - } - - /* We start these asynchronously and don't care about the return - * value */ - - if (!(o = pa_context_subscribe(p->context, PA_SUBSCRIPTION_MASK_SINK_INPUT, NULL, NULL))) - ret = translate_error(pa_context_errno(p->context)); - else - pa_operation_unref(o); - - pa_threaded_mainloop_unlock(p->mainloop); - - p->subscribed = TRUE; - - return ret; -} - -static void play_sample_cb(pa_context *c, uint32_t idx, void *userdata) { - struct private *p; - struct outstanding *out = userdata; - - ca_assert(c); - ca_assert(out); - - p = PRIVATE(out->context); - - if (idx != PA_INVALID_INDEX) { - out->error = CA_SUCCESS; - out->sink_input = idx; - } else - out->error = translate_error(pa_context_errno(c)); - - pa_threaded_mainloop_signal(p->mainloop, FALSE); -} - -static void stream_state_cb(pa_stream *s, void *userdata) { - struct private *p; - struct outstanding *out = userdata; - pa_stream_state_t state; - - ca_assert(s); - ca_assert(out); - - p = PRIVATE(out->context); - - state = pa_stream_get_state(s); - - switch (state) { - case PA_STREAM_CREATING: - case PA_STREAM_UNCONNECTED: - break; - - case PA_STREAM_READY: - out->sink_input = pa_stream_get_index(out->stream); - break; - - case PA_STREAM_FAILED: - case PA_STREAM_TERMINATED: { - int err; - - err = state == PA_STREAM_FAILED ? translate_error(pa_context_errno(pa_stream_get_context(s))) : CA_ERROR_DESTROYED; - - if (out->clean_up) { - ca_mutex_lock(p->outstanding_mutex); - outstanding_disconnect(out); - CA_LLIST_REMOVE(struct outstanding, p->outstanding, out); - ca_mutex_unlock(p->outstanding_mutex); - - if (out->callback) - out->callback(out->context, out->id, out->error, out->userdata); - - outstanding_free(out); - } else { - out->finished = TRUE; - out->error = err; - } - - break; - } - } - - pa_threaded_mainloop_signal(p->mainloop, FALSE); -} - -static void stream_drain_cb(pa_stream *s, int success, void *userdata) { - struct private *p; - struct outstanding *out = userdata; - int err; - - ca_assert(s); - ca_assert(out); - ca_assert(out->type == OUTSTANDING_STREAM); - - p = PRIVATE(out->context); - err = success ? CA_SUCCESS : translate_error(pa_context_errno(p->context)); - - if (out->clean_up) { - ca_mutex_lock(p->outstanding_mutex); - outstanding_disconnect(out); - CA_LLIST_REMOVE(struct outstanding, p->outstanding, out); - ca_mutex_unlock(p->outstanding_mutex); - - if (out->callback) - out->callback(out->context, out->id, err, out->userdata); - - outstanding_free(out); - - } else { - pa_stream_disconnect(s); - out->error = err; - out->finished = TRUE; - - if (out->drain_operation) { - pa_operation_unref(out->drain_operation); - out->drain_operation = NULL; - } - } - - pa_threaded_mainloop_signal(p->mainloop, FALSE); -} - -static void stream_write_cb(pa_stream *s, size_t bytes, void *userdata) { - struct outstanding *out = userdata; - struct private *p; - void *data; - int ret; - ca_bool_t eof = FALSE; - - ca_assert(s); - ca_assert(bytes > 0); - ca_assert(out); - - p = PRIVATE(out->context); - - while (bytes > 0) { - size_t rbytes = bytes; - - if (!(data = ca_malloc(rbytes))) { - ret = CA_ERROR_OOM; - goto finish; - } - - if ((ret = ca_sound_file_read_arbitrary(out->file, data, &rbytes)) < 0) - goto finish; - - if (rbytes <= 0) { - eof = TRUE; - break; - } - - ca_assert(rbytes <= bytes); - - if ((ret = pa_stream_write(s, data, rbytes, ca_free, 0, PA_SEEK_RELATIVE)) < 0) { - ret = translate_error(ret); - goto finish; - } - - data = NULL; - - bytes -= rbytes; - } - - if (eof || ca_sound_file_get_size(out->file) <= 0) { - - /* We reached EOF */ - - if (out->type == OUTSTANDING_UPLOAD) { - - if (pa_stream_finish_upload(s) < 0) { - ret = translate_error(pa_context_errno(p->context)); - goto finish; - } - - /* Let's just signal driver_cache() which has been waiting for us */ - pa_threaded_mainloop_signal(p->mainloop, FALSE); - - } else { - ca_assert(out->type == OUTSTANDING_STREAM); - - if (out->drain_operation) { - pa_operation_cancel(out->drain_operation); - pa_operation_unref(out->drain_operation); - } - - if (!(out->drain_operation = pa_stream_drain(s, stream_drain_cb, out))) { - ret = translate_error(pa_context_errno(p->context)); - goto finish; - } - } - - pa_stream_set_write_callback(s, NULL, NULL); - } - - ca_free(data); - - return; - -finish: - - ca_free(data); - - if (out->clean_up) { - ca_mutex_lock(p->outstanding_mutex); - outstanding_disconnect(out); - CA_LLIST_REMOVE(struct outstanding, p->outstanding, out); - ca_mutex_unlock(p->outstanding_mutex); - - if (out->callback) - out->callback(out->context, out->id, ret, out->userdata); - - outstanding_free(out); - - } else { - pa_stream_disconnect(s); - out->error = ret; - out->finished = TRUE; - } - - pa_threaded_mainloop_signal(p->mainloop, FALSE); -} - -static const pa_sample_format_t sample_type_table[] = { - [CA_SAMPLE_S16NE] = PA_SAMPLE_S16NE, - [CA_SAMPLE_S16RE] = PA_SAMPLE_S16RE, - [CA_SAMPLE_U8] = PA_SAMPLE_U8 -}; - -static const pa_channel_position_t channel_table[_CA_CHANNEL_POSITION_MAX] = { - [CA_CHANNEL_MONO] = PA_CHANNEL_POSITION_MONO, - [CA_CHANNEL_FRONT_LEFT] = PA_CHANNEL_POSITION_FRONT_LEFT, - [CA_CHANNEL_FRONT_RIGHT] = PA_CHANNEL_POSITION_FRONT_RIGHT, - [CA_CHANNEL_FRONT_CENTER] = PA_CHANNEL_POSITION_FRONT_CENTER, - [CA_CHANNEL_REAR_LEFT] = PA_CHANNEL_POSITION_REAR_LEFT, - [CA_CHANNEL_REAR_RIGHT] = PA_CHANNEL_POSITION_REAR_RIGHT, - [CA_CHANNEL_REAR_CENTER] = PA_CHANNEL_POSITION_REAR_CENTER, - [CA_CHANNEL_LFE] = PA_CHANNEL_POSITION_LFE, - [CA_CHANNEL_FRONT_LEFT_OF_CENTER] = PA_CHANNEL_POSITION_FRONT_LEFT_OF_CENTER, - [CA_CHANNEL_FRONT_RIGHT_OF_CENTER] = PA_CHANNEL_POSITION_FRONT_RIGHT_OF_CENTER, - [CA_CHANNEL_SIDE_LEFT] = PA_CHANNEL_POSITION_SIDE_LEFT, - [CA_CHANNEL_SIDE_RIGHT] = PA_CHANNEL_POSITION_SIDE_RIGHT, - [CA_CHANNEL_TOP_CENTER] = PA_CHANNEL_POSITION_TOP_CENTER, - [CA_CHANNEL_TOP_FRONT_LEFT] = PA_CHANNEL_POSITION_FRONT_LEFT, - [CA_CHANNEL_TOP_FRONT_RIGHT] = PA_CHANNEL_POSITION_FRONT_RIGHT, - [CA_CHANNEL_TOP_FRONT_CENTER] = PA_CHANNEL_POSITION_FRONT_CENTER, - [CA_CHANNEL_TOP_REAR_LEFT] = PA_CHANNEL_POSITION_REAR_LEFT, - [CA_CHANNEL_TOP_REAR_RIGHT] = PA_CHANNEL_POSITION_REAR_RIGHT, - [CA_CHANNEL_TOP_REAR_CENTER] = PA_CHANNEL_POSITION_TOP_REAR_CENTER -}; - -static ca_bool_t convert_channel_map(ca_sound_file *f, pa_channel_map *cm) { - const ca_channel_position_t *positions; - unsigned c; - - ca_assert(f); - ca_assert(cm); - - if (!(positions = ca_sound_file_get_channel_map(f))) - return FALSE; - - cm->channels = ca_sound_file_get_nchannels(f); - for (c = 0; c < cm->channels; c++) - cm->map[c] = channel_table[positions[c]]; - - return TRUE; -} - -int driver_play(ca_context *c, uint32_t id, ca_proplist *proplist, ca_finish_callback_t cb, void *userdata) { - struct private *p; - pa_proplist *l = NULL; - const char *n, *vol, *ct, *channel; - char *name = NULL; -#if defined(PA_MAJOR) && ((PA_MAJOR > 0) || (PA_MAJOR == 0 && PA_MINOR > 9) || (PA_MAJOR == 0 && PA_MINOR == 9 && PA_MICRO >= 15)) - pa_volume_t v = (pa_volume_t) -1; -#else - pa_volume_t v = PA_VOLUME_NORM; -#endif - ca_bool_t volume_set = FALSE; - pa_cvolume cvol; - pa_sample_spec ss; - pa_channel_map cm; - pa_channel_position_t position = PA_CHANNEL_POSITION_INVALID; - ca_bool_t cm_good; - ca_cache_control_t cache_control = CA_CACHE_CONTROL_NEVER; - struct outstanding *out = NULL; - int try = 3; - int ret; - pa_operation *o; - char *sp; - pa_buffer_attr ba; - - ca_return_val_if_fail(c, CA_ERROR_INVALID); - ca_return_val_if_fail(proplist, CA_ERROR_INVALID); - ca_return_val_if_fail(!userdata || cb, CA_ERROR_INVALID); - ca_return_val_if_fail(c->private, CA_ERROR_STATE); - - p = PRIVATE(c); - - ca_return_val_if_fail(p->mainloop, CA_ERROR_STATE); - - if (!(out = ca_new0(struct outstanding, 1))) { - ret = CA_ERROR_OOM; - goto finish_unlocked; - } - - out->type = OUTSTANDING_SAMPLE; - out->context = c; - out->sink_input = PA_INVALID_INDEX; - out->id = id; - out->callback = cb; - out->userdata = userdata; - - if ((ret = convert_proplist(&l, proplist)) < 0) - goto finish_unlocked; - - if ((n = pa_proplist_gets(l, CA_PROP_EVENT_ID))) - if (!(name = ca_strdup(n))) { - ret = CA_ERROR_OOM; - goto finish_unlocked; - } - - if ((vol = pa_proplist_gets(l, CA_PROP_CANBERRA_VOLUME))) { - char *e = NULL; - double dvol; - - errno = 0; - dvol = strtod(vol, &e); - if (errno != 0 || !e || *e) { - ret = CA_ERROR_INVALID; - goto finish_unlocked; - } - - v = pa_sw_volume_from_dB(dvol); - volume_set = TRUE; - } - - if ((ct = pa_proplist_gets(l, CA_PROP_CANBERRA_CACHE_CONTROL))) - if ((ret = ca_parse_cache_control(&cache_control, ct)) < 0) { - ret = CA_ERROR_INVALID; - goto finish_unlocked; - } - - if ((channel = pa_proplist_gets(l, CA_PROP_CANBERRA_FORCE_CHANNEL))) { - pa_channel_map t; - - if (!pa_channel_map_parse(&t, channel) || - t.channels != 1) { - ret = CA_ERROR_INVALID; - goto finish_unlocked; - } - - position = t.map[0]; - - /* We cannot remap cached samples, so let's fail when cacheing - * shall be used */ - if (cache_control != CA_CACHE_CONTROL_NEVER) { - ret = CA_ERROR_NOTSUPPORTED; - goto finish_unlocked; - } - } - - strip_prefix(l, "canberra."); - add_common(l); - - if ((ret = subscribe(c)) < 0) - goto finish_unlocked; - - if (name && cache_control != CA_CACHE_CONTROL_NEVER) { - - /* Ok, this sample has an event id, let's try to play it from the cache */ - - for (;;) { - ca_bool_t canceled; - - pa_threaded_mainloop_lock(p->mainloop); - - if (!p->context) { - ret = CA_ERROR_STATE; - goto finish_locked; - } - - /* Let's try to play the sample */ - if (!(o = pa_context_play_sample_with_proplist(p->context, name, c->device, v, l, play_sample_cb, out))) { - ret = translate_error(pa_context_errno(p->context)); - goto finish_locked; - } - - for (;;) { - pa_operation_state_t state = pa_operation_get_state(o); - - if (state == PA_OPERATION_DONE) { - canceled = FALSE; - break; - } else if (state == PA_OPERATION_CANCELED) { - canceled = TRUE; - break; - } - - pa_threaded_mainloop_wait(p->mainloop); - } - - pa_operation_unref(o); - - if (!canceled && p->context && out->error == CA_SUCCESS) { - ret = CA_SUCCESS; - goto finish_locked; - } - - pa_threaded_mainloop_unlock(p->mainloop); - - /* The operation might have been canceled due to connection termination */ - if (canceled || !p->context) { - ret = CA_ERROR_DISCONNECTED; - goto finish_unlocked; - } - - /* Did some other error occur? */ - if (out->error != CA_ERROR_NOTFOUND) { - ret = out->error; - goto finish_unlocked; - } - - /* Hmm, we need to play it directly */ - if (cache_control != CA_CACHE_CONTROL_PERMANENT) - break; - - /* Don't loop forever */ - if (--try <= 0) - break; - - /* Let's upload the sample and retry playing */ - if ((ret = driver_cache(c, proplist)) < 0) - goto finish_unlocked; - } - } - - out->type = OUTSTANDING_STREAM; - - /* Let's stream the sample directly */ - if ((ret = ca_lookup_sound(&out->file, &sp, &p->theme, c->props, proplist)) < 0) - goto finish_unlocked; - - if (sp) - if (!pa_proplist_contains(l, CA_PROP_MEDIA_FILENAME)) - pa_proplist_sets(l, CA_PROP_MEDIA_FILENAME, sp); - - ca_free(sp); - - ss.format = sample_type_table[ca_sound_file_get_sample_type(out->file)]; - ss.channels = (uint8_t) ca_sound_file_get_nchannels(out->file); - ss.rate = ca_sound_file_get_rate(out->file); - - if (position != PA_CHANNEL_POSITION_INVALID) { - unsigned u; - /* Apply canberra.force_channel */ - - cm.channels = ss.channels; - for (u = 0; u < cm.channels; u++) - cm.map[u] = position; - - cm_good = TRUE; - } else - cm_good = convert_channel_map(out->file, &cm); - - pa_threaded_mainloop_lock(p->mainloop); - - if (!p->context) { - ret = CA_ERROR_STATE; - goto finish_locked; - } - - if (!(out->stream = pa_stream_new_with_proplist(p->context, NULL, &ss, cm_good ? &cm : NULL, l))) { - ret = translate_error(pa_context_errno(p->context)); - goto finish_locked; - } - - pa_stream_set_state_callback(out->stream, stream_state_cb, out); - pa_stream_set_write_callback(out->stream, stream_write_cb, out); - - if (volume_set) - pa_cvolume_set(&cvol, ss.channels, v); - - /* Make sure we get the longest latency possible, to minimize CPU - * consumption */ - ba.maxlength = (uint32_t) -1; - ba.tlength = (uint32_t) -1; - ba.prebuf = (uint32_t) -1; - ba.minreq = (uint32_t) -1; - ba.fragsize = (uint32_t) -1; - - if (pa_stream_connect_playback(out->stream, c->device, &ba, -#ifdef PA_STREAM_FAIL_ON_SUSPEND - PA_STREAM_FAIL_ON_SUSPEND -#else - 0 -#endif - | (position != PA_CHANNEL_POSITION_INVALID ? PA_STREAM_NO_REMIX_CHANNELS : 0) - , volume_set ? &cvol : NULL, NULL) < 0) { - ret = translate_error(pa_context_errno(p->context)); - goto finish_locked; - } - - for (;;) { - pa_stream_state_t state; - - if (!p->context || !out->stream) { - ret = CA_ERROR_STATE; - goto finish_locked; - } - - state = pa_stream_get_state(out->stream); - - /* Stream sucessfully created */ - if (state == PA_STREAM_READY) - break; - - /* Check for failure */ - if (state == PA_STREAM_FAILED) { - ret = translate_error(pa_context_errno(p->context)); - goto finish_locked; - } - - /* Prematurely ended */ - if (state == PA_STREAM_TERMINATED) { - ret = out->error; - goto finish_locked; - } - - pa_threaded_mainloop_wait(p->mainloop); - } - - ret = CA_SUCCESS; - -finish_locked: - - /* We keep the outstanding struct around to clean up later if the sound din't finish yet*/ - if (ret == CA_SUCCESS && !out->finished) { - out->clean_up = TRUE; - - ca_mutex_lock(p->outstanding_mutex); - CA_LLIST_PREPEND(struct outstanding, p->outstanding, out); - ca_mutex_unlock(p->outstanding_mutex); - } else - outstanding_free(out); - - out = NULL; - - pa_threaded_mainloop_unlock(p->mainloop); - -finish_unlocked: - - if (out) - outstanding_free(out); - - if (l) - pa_proplist_free(l); - - ca_free(name); - - return ret; -} - -int driver_cancel(ca_context *c, uint32_t id) { - struct private *p; - pa_operation *o; - int ret = CA_SUCCESS; - struct outstanding *out, *n; - - ca_return_val_if_fail(c, CA_ERROR_INVALID); - ca_return_val_if_fail(c->private, CA_ERROR_STATE); - - p = PRIVATE(c); - - ca_return_val_if_fail(p->mainloop, CA_ERROR_STATE); - - pa_threaded_mainloop_lock(p->mainloop); - - if (!p->context) { - pa_threaded_mainloop_unlock(p->mainloop); - return CA_ERROR_STATE; - } - - ca_mutex_lock(p->outstanding_mutex); - - /* We start these asynchronously and don't care about the return - * value */ - - for (out = p->outstanding; out; out = n) { - int ret2 = CA_SUCCESS; - n = out->next; - - if (out->type == OUTSTANDING_UPLOAD || - out->id != id || - out->sink_input == PA_INVALID_INDEX) - continue; - - if (!(o = pa_context_kill_sink_input(p->context, out->sink_input, NULL, NULL))) - ret2 = translate_error(pa_context_errno(p->context)); - else - pa_operation_unref(o); - - /* We make sure here to kill all streams identified by the id - * here. However, we will return only the first error we - * encounter */ - - if (ret2 && ret == CA_SUCCESS) - ret = ret2; - - if (out->callback) - out->callback(c, out->id, CA_ERROR_CANCELED, out->userdata); - - outstanding_disconnect(out); - CA_LLIST_REMOVE(struct outstanding, p->outstanding, out); - outstanding_free(out); - } - - ca_mutex_unlock(p->outstanding_mutex); - - pa_threaded_mainloop_unlock(p->mainloop); - - return ret; -} - -int driver_cache(ca_context *c, ca_proplist *proplist) { - struct private *p; - pa_proplist *l = NULL; - const char *n, *ct; - pa_sample_spec ss; - pa_channel_map cm; - ca_bool_t cm_good; - ca_cache_control_t cache_control = CA_CACHE_CONTROL_PERMANENT; - struct outstanding *out; - int ret; - char *sp; - - ca_return_val_if_fail(c, CA_ERROR_INVALID); - ca_return_val_if_fail(proplist, CA_ERROR_INVALID); - ca_return_val_if_fail(c->private, CA_ERROR_STATE); - - p = PRIVATE(c); - - ca_return_val_if_fail(p->mainloop, CA_ERROR_STATE); - - if (!(out = ca_new0(struct outstanding, 1))) { - ret = CA_ERROR_OOM; - goto finish_unlocked; - } - - out->type = OUTSTANDING_UPLOAD; - out->context = c; - out->sink_input = PA_INVALID_INDEX; - - if ((ret = convert_proplist(&l, proplist)) < 0) - goto finish_unlocked; - - if (!(n = pa_proplist_gets(l, CA_PROP_EVENT_ID))) { - ret = CA_ERROR_INVALID; - goto finish_unlocked; - } - - if ((ct = pa_proplist_gets(l, CA_PROP_CANBERRA_CACHE_CONTROL))) - if ((ret = ca_parse_cache_control(&cache_control, ct)) < 0) { - ret = CA_ERROR_INVALID; - goto finish_unlocked; - } - - if (cache_control != CA_CACHE_CONTROL_PERMANENT) { - ret = CA_ERROR_INVALID; - goto finish_unlocked; - } - - if ((ct = pa_proplist_gets(l, CA_PROP_CANBERRA_FORCE_CHANNEL))) { - ret = CA_ERROR_NOTSUPPORTED; - goto finish_unlocked; - } - - strip_prefix(l, "canberra."); - strip_prefix(l, "event.mouse."); - strip_prefix(l, "window."); - add_common(l); - - /* Let's stream the sample directly */ - if ((ret = ca_lookup_sound(&out->file, &sp, &p->theme, c->props, proplist)) < 0) - goto finish_unlocked; - - if (sp) - if (!pa_proplist_contains(l, CA_PROP_MEDIA_FILENAME)) - pa_proplist_sets(l, CA_PROP_MEDIA_FILENAME, sp); - - ca_free(sp); - - ss.format = sample_type_table[ca_sound_file_get_sample_type(out->file)]; - ss.channels = (uint8_t) ca_sound_file_get_nchannels(out->file); - ss.rate = ca_sound_file_get_rate(out->file); - - cm_good = convert_channel_map(out->file, &cm); - - pa_threaded_mainloop_lock(p->mainloop); - - if (!p->context) { - ret = CA_ERROR_STATE; - goto finish_locked; - } - - if (!(out->stream = pa_stream_new_with_proplist(p->context, NULL, &ss, cm_good ? &cm : NULL, l))) { - ret = translate_error(pa_context_errno(p->context)); - goto finish_locked; - } - - pa_stream_set_state_callback(out->stream, stream_state_cb, out); - pa_stream_set_write_callback(out->stream, stream_write_cb, out); - - if (pa_stream_connect_upload(out->stream, (size_t) ca_sound_file_get_size(out->file)) < 0) { - ret = translate_error(pa_context_errno(p->context)); - goto finish_locked; - } - - for (;;) { - pa_stream_state_t state; - - if (!p->context || !out->stream) { - ret = CA_ERROR_STATE; - goto finish_locked; - } - - state = pa_stream_get_state(out->stream); - - /* Stream sucessfully created and uploaded */ - if (state == PA_STREAM_TERMINATED) - break; - - /* Check for failure */ - if (state == PA_STREAM_FAILED) { - ret = translate_error(pa_context_errno(p->context)); - goto finish_locked; - } - - pa_threaded_mainloop_wait(p->mainloop); - } - - ret = CA_SUCCESS; - -finish_locked: - outstanding_free(out); - out = NULL; - - pa_threaded_mainloop_unlock(p->mainloop); - -finish_unlocked: - - if (out) - outstanding_free(out); - - if (l) - pa_proplist_free(l); - - return ret; -} - -int driver_playing(ca_context *c, uint32_t id, int *playing) { - struct private *p; - struct outstanding *out; - - ca_return_val_if_fail(c, CA_ERROR_INVALID); - ca_return_val_if_fail(c->private, CA_ERROR_STATE); - ca_return_val_if_fail(playing, CA_ERROR_INVALID); - - p = PRIVATE(c); - - *playing = 0; - - ca_mutex_lock(p->outstanding_mutex); - - for (out = p->outstanding; out; out = out->next) { - - if (out->type == OUTSTANDING_UPLOAD || - out->id != id || - out->sink_input == PA_INVALID_INDEX) - continue; - - *playing = 1; - break; - } - - ca_mutex_unlock(p->outstanding_mutex); - - return CA_SUCCESS; -} diff --git a/.flatpak-builder/cache/objects/93/1cffb52a562d1bc8245e7c2ba39c8f32e1c417c3136fc26364f877f99246db.file b/.flatpak-builder/cache/objects/93/1cffb52a562d1bc8245e7c2ba39c8f32e1c417c3136fc26364f877f99246db.file deleted file mode 100755 index c5b740f..0000000 Binary files a/.flatpak-builder/cache/objects/93/1cffb52a562d1bc8245e7c2ba39c8f32e1c417c3136fc26364f877f99246db.file and /dev/null differ diff --git a/.flatpak-builder/cache/objects/95/4a2a5d95c14278a1ee5e41bca4a7dd5cc1c0a009336b38480b19c12ca44d4a.dirtree b/.flatpak-builder/cache/objects/95/4a2a5d95c14278a1ee5e41bca4a7dd5cc1c0a009336b38480b19c12ca44d4a.dirtree deleted file mode 100644 index 4a16bec..0000000 Binary files a/.flatpak-builder/cache/objects/95/4a2a5d95c14278a1ee5e41bca4a7dd5cc1c0a009336b38480b19c12ca44d4a.dirtree and /dev/null differ diff --git a/.flatpak-builder/cache/objects/96/2716897a1982a5a83a584fac878184b744c88f6f1131ca637f5b5e7b0bca3f.file b/.flatpak-builder/cache/objects/96/2716897a1982a5a83a584fac878184b744c88f6f1131ca637f5b5e7b0bca3f.file deleted file mode 100644 index 33dfeae..0000000 Binary files a/.flatpak-builder/cache/objects/96/2716897a1982a5a83a584fac878184b744c88f6f1131ca637f5b5e7b0bca3f.file and /dev/null differ diff --git a/.flatpak-builder/cache/objects/9a/00551848f59c9fca21c1415015f0bd5c9c2a26ee9cb1971980b358c72a1734.dirtree b/.flatpak-builder/cache/objects/9a/00551848f59c9fca21c1415015f0bd5c9c2a26ee9cb1971980b358c72a1734.dirtree deleted file mode 100644 index 4e28289..0000000 Binary files a/.flatpak-builder/cache/objects/9a/00551848f59c9fca21c1415015f0bd5c9c2a26ee9cb1971980b358c72a1734.dirtree and /dev/null differ diff --git a/.flatpak-builder/cache/objects/9b/c7d41eed7ce622d5bd87e31edc522000fa3fa0f1880afbc745a22ce33785fd.file b/.flatpak-builder/cache/objects/9b/c7d41eed7ce622d5bd87e31edc522000fa3fa0f1880afbc745a22ce33785fd.file deleted file mode 100644 index 9ab5f81..0000000 --- a/.flatpak-builder/cache/objects/9b/c7d41eed7ce622d5bd87e31edc522000fa3fa0f1880afbc745a22ce33785fd.file +++ /dev/null @@ -1,40 +0,0 @@ - - - - -libcanberra Reference Manual - - - - - - - -
-
-
-
-

- The latest version of this documentation can be found on-line at - http://0pointer.de/lennart/projects/libcanberra/gtkdoc/index.html. -

-
-
-
-
-
libcanberra
-
-
-canberra — General libcanberra API -
-
-canberra-gtk — Gtk+ libcanberra Bindings -
-
-
-
- - - \ No newline at end of file diff --git a/.flatpak-builder/cache/objects/9c/2f0d851f4cc2dcc179f802eb69293c4a639719e27078dacfca893b12cacf30.file b/.flatpak-builder/cache/objects/9c/2f0d851f4cc2dcc179f802eb69293c4a639719e27078dacfca893b12cacf30.file deleted file mode 100644 index 32affd0..0000000 --- a/.flatpak-builder/cache/objects/9c/2f0d851f4cc2dcc179f802eb69293c4a639719e27078dacfca893b12cacf30.file +++ /dev/null @@ -1,868 +0,0 @@ -/*-*- Mode: C; c-basic-offset: 8 -*-*/ - -/*** - This file is part of libcanberra. - - Copyright 2008 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 - . -***/ - -#ifdef HAVE_CONFIG_H -#include -#endif - -#include -#include - -#include - -#include "sound-theme-spec.h" -#include "malloc.h" -#include "llist.h" -#include "cache.h" - -#define DEFAULT_THEME "freedesktop" -#define FALLBACK_THEME "freedesktop" -#define DEFAULT_OUTPUT_PROFILE "stereo" -#define N_THEME_DIR_MAX 8 - -typedef struct ca_data_dir ca_data_dir; - -struct ca_data_dir { - CA_LLIST_FIELDS(ca_data_dir); - - char *theme_name; - char *dir_name; - char *output_profile; -}; - -struct ca_theme_data { - char *name; - - CA_LLIST_HEAD(ca_data_dir, data_dirs); - ca_data_dir *last_dir; - - unsigned n_theme_dir; - ca_bool_t loaded_fallback_theme; -}; - -int ca_get_data_home(char **e) { - const char *env, *subdir; - char *r; - ca_return_val_if_fail(e, CA_ERROR_INVALID); - - if ((env = getenv("XDG_DATA_HOME")) && *env == '/') - subdir = ""; - else if ((env = getenv("HOME")) && *env == '/') - subdir = "/.local/share"; - else { - *e = NULL; - return CA_SUCCESS; - } - - if (!(r = ca_new(char, strlen(env) + strlen(subdir) + 1))) - return CA_ERROR_OOM; - - sprintf(r, "%s%s", env, subdir); - *e = r; - - return CA_SUCCESS; -} - -static ca_bool_t data_dir_matches(ca_data_dir *d, const char*output_profile) { - ca_assert(d); - ca_assert(output_profile); - - /* We might want to add more elaborate matching here eventually */ - - if (!d->output_profile) - return TRUE; - - return ca_streq(d->output_profile, output_profile); -} - -static ca_data_dir* find_data_dir(ca_theme_data *t, const char *theme_name, const char *dir_name) { - ca_data_dir *d; - - ca_assert(t); - ca_assert(theme_name); - ca_assert(dir_name); - - for (d = t->data_dirs; d; d = d->next) - if (ca_streq(d->theme_name, theme_name) && - ca_streq(d->dir_name, dir_name)) - return d; - - return NULL; -} - -static int add_data_dir(ca_theme_data *t, const char *theme_name, const char *dir_name) { - ca_data_dir *d; - - ca_return_val_if_fail(t, CA_ERROR_INVALID); - ca_return_val_if_fail(theme_name, CA_ERROR_INVALID); - ca_return_val_if_fail(dir_name, CA_ERROR_INVALID); - - if (find_data_dir(t, theme_name, dir_name)) - return CA_SUCCESS; - - if (!(d = ca_new0(ca_data_dir, 1))) - return CA_ERROR_OOM; - - if (!(d->theme_name = ca_strdup(theme_name))) { - ca_free(d); - return CA_ERROR_OOM; - } - - if (!(d->dir_name = ca_strdup(dir_name))) { - ca_free(d->theme_name); - ca_free(d); - return CA_ERROR_OOM; - } - - CA_LLIST_INSERT_AFTER(ca_data_dir, t->data_dirs, t->last_dir, d); - t->last_dir = d; - - return CA_SUCCESS; -} - -static int load_theme_dir(ca_theme_data *t, const char *name); - -static int load_theme_path(ca_theme_data *t, const char *prefix, const char *name) { - char *fn, *inherits = NULL; - FILE *f; - ca_bool_t in_sound_theme_section = FALSE; - ca_data_dir *current_data_dir = NULL; - int ret; - - ca_return_val_if_fail(t, CA_ERROR_INVALID); - ca_return_val_if_fail(prefix, CA_ERROR_INVALID); - ca_return_val_if_fail(name, CA_ERROR_INVALID); - - if (!(fn = ca_new(char, strlen(prefix) + sizeof("/sounds/")-1 + strlen(name) + sizeof("/index.theme")))) - return CA_ERROR_OOM; - - sprintf(fn, "%s/sounds/%s/index.theme", prefix, name); - f = fopen(fn, "r"); - ca_free(fn); - - if (!f) { - if (errno == ENOENT) - return CA_ERROR_NOTFOUND; - - return CA_ERROR_SYSTEM; - } - - for (;;) { - char ln[1024]; - - if (!(fgets(ln, sizeof(ln), f))) { - - if (feof(f)) - break; - - ca_assert(ferror(f)); - ret = CA_ERROR_SYSTEM; - goto fail; - } - - ln[strcspn(ln, "\n\r#")] = 0; - - if (!ln[0]) - continue; - - if (ca_streq(ln, "[Sound Theme]")) { - in_sound_theme_section = TRUE; - current_data_dir = NULL; - continue; - } - - if (ln[0] == '[' && ln[strlen(ln)-1] == ']') { - char *d; - - if (!(d = ca_strndup(ln+1, strlen(ln)-2))) { - ret = CA_ERROR_OOM; - goto fail; - } - - current_data_dir = find_data_dir(t, name, d); - ca_free(d); - - in_sound_theme_section = FALSE; - continue; - } - - ca_assert(!in_sound_theme_section || !current_data_dir); - ca_assert(!current_data_dir || !in_sound_theme_section); - - if (in_sound_theme_section) { - - if (!strncmp(ln, "Inherits=", 9)) { - - if (inherits) { - ret = CA_ERROR_CORRUPT; - goto fail; - } - - if (!(inherits = ca_strdup(ln + 9))) { - ret = CA_ERROR_OOM; - goto fail; - } - - continue; - } - - if (!strncmp(ln, "Directories=", 12)) { - char *d; - - d = ln+12; - for (;;) { - size_t k = strcspn(d, ", "); - - if (k > 0) { - char *p; - - if (!(p = ca_strndup(d, k))) { - ret = CA_ERROR_OOM; - goto fail; - } - - ret = add_data_dir(t, name, p); - ca_free(p); - - if (ret != CA_SUCCESS) - goto fail; - } - - if (d[k] == 0) - break; - - d += k+1; - } - - continue; - } - } - - if (current_data_dir) { - - if (!strncmp(ln, "OutputProfile=", 14)) { - - if (!current_data_dir->output_profile) { - - if (!(current_data_dir->output_profile = ca_strdup(ln+14))) { - ret = CA_ERROR_OOM; - goto fail; - } - - } else if (!ca_streq(current_data_dir->output_profile, ln+14)) { - ret = CA_ERROR_CORRUPT; - goto fail; - } - - continue; - } - } - } - - t->n_theme_dir ++; - - if (inherits) { - char *i = inherits; - for (;;) { - size_t k = strcspn(i, ", "); - - if (k > 0) { - char *p; - - if (!(p = ca_strndup(i, k))) { - ret = CA_ERROR_OOM; - goto fail; - } - - ret = load_theme_dir(t, p); - ca_free(p); - - if (ret != CA_SUCCESS) - goto fail; - } - - if (i[k] == 0) - break; - - i += k+1; - } - } - - ret = CA_SUCCESS; - -fail: - - ca_free(inherits); - fclose(f); - - return ret; -} - -const char *ca_get_data_dirs(void) { - const char *g; - - if (!(g = getenv("XDG_DATA_DIRS")) || *g == 0) - return "/usr/local/share:/usr/share"; - - return g; -} - -static int load_theme_dir(ca_theme_data *t, const char *name) { - int ret; - char *e; - const char *g; - - ca_return_val_if_fail(t, CA_ERROR_INVALID); - ca_return_val_if_fail(name, CA_ERROR_INVALID); - ca_return_val_if_fail(t->n_theme_dir < N_THEME_DIR_MAX, CA_ERROR_CORRUPT); - - if (ca_streq(name, FALLBACK_THEME)) - t->loaded_fallback_theme = TRUE; - - if ((ret = ca_get_data_home(&e)) < 0) - return ret; - - if (e) { - ret = load_theme_path(t, e, name); - ca_free(e); - - if (ret != CA_ERROR_NOTFOUND) - return ret; - } - - g = ca_get_data_dirs(); - - for (;;) { - size_t k; - - k = strcspn(g, ":"); - - if (g[0] == '/' && k > 0) { - char *p; - - if (!(p = ca_strndup(g, k))) - return CA_ERROR_OOM; - - ret = load_theme_path(t, p, name); - ca_free(p); - - if (ret != CA_ERROR_NOTFOUND) - return ret; - } - - if (g[k] == 0) - break; - - g += k+1; - } - - return CA_ERROR_NOTFOUND; -} - -static int load_theme_data(ca_theme_data **_t, const char *name) { - ca_theme_data *t; - int ret; - - ca_return_val_if_fail(_t, CA_ERROR_INVALID); - ca_return_val_if_fail(name, CA_ERROR_INVALID); - - if (*_t) - if (ca_streq((*_t)->name, name)) - return CA_SUCCESS; - - if (!(t = ca_new0(ca_theme_data, 1))) - return CA_ERROR_OOM; - - if (!(t->name = ca_strdup(name))) { - ret = CA_ERROR_OOM; - goto fail; - } - - if ((ret = load_theme_dir(t, name)) < 0) - goto fail; - - /* The fallback theme may intentionally not exist so ignore failure */ - if (!t->loaded_fallback_theme) - load_theme_dir(t, FALLBACK_THEME); - - if (*_t) - ca_theme_data_free(*_t); - - *_t = t; - - return CA_SUCCESS; - -fail: - - if (t) - ca_theme_data_free(t); - - return ret; -} - -static int find_sound_for_suffix( - ca_sound_file **f, - ca_sound_file_open_callback_t sfopen, - char **sound_path, - const char *theme_name, - const char *name, - const char *path, - const char *suffix, - const char *locale, - const char *subdir) { - - char *fn; - int ret; - - ca_return_val_if_fail(f, CA_ERROR_INVALID); - ca_return_val_if_fail(sfopen, CA_ERROR_INVALID); - ca_return_val_if_fail(name, CA_ERROR_INVALID); - ca_return_val_if_fail(path, CA_ERROR_INVALID); - ca_return_val_if_fail(path[0] == '/', CA_ERROR_INVALID); - - if (!(fn = ca_sprintf_malloc("%s%s%s%s%s%s%s/%s%s", - path, - theme_name ? "/" : "", - theme_name ? theme_name : "", - subdir ? "/" : "", - subdir ? subdir : "", - locale ? "/" : "", - locale ? locale : "", - name, suffix))) - return CA_ERROR_OOM; - - if (ca_streq(suffix, ".disabled")) { - - if (access(fn, F_OK) == 0) - ret = CA_ERROR_DISABLED; - else - ret = errno == ENOENT ? CA_ERROR_NOTFOUND : CA_ERROR_SYSTEM; - - } else - ret = sfopen(f, fn); - - if (ret == CA_SUCCESS && sound_path) - *sound_path = fn; - else - ca_free(fn); - - return ret; -} - -static int find_sound_in_locale( - ca_sound_file **f, - ca_sound_file_open_callback_t sfopen, - char **sound_path, - const char *theme_name, - const char *name, - const char *path, - const char *locale, - const char *subdir) { - - int ret; - char *p; - - ca_return_val_if_fail(f, CA_ERROR_INVALID); - ca_return_val_if_fail(sfopen, CA_ERROR_INVALID); - ca_return_val_if_fail(name && *name, CA_ERROR_INVALID); - ca_return_val_if_fail(path, CA_ERROR_INVALID); - ca_return_val_if_fail(path[0] == '/', CA_ERROR_INVALID); - - if (!(p = ca_new(char, strlen(path) + sizeof("/sounds")))) - return CA_ERROR_OOM; - - sprintf(p, "%s/sounds", path); - - if ((ret = find_sound_for_suffix(f, sfopen, sound_path, theme_name, name, p, ".disabled", locale, subdir)) == CA_ERROR_NOTFOUND) - if ((ret = find_sound_for_suffix(f, sfopen, sound_path,theme_name, name, p, ".oga", locale, subdir)) == CA_ERROR_NOTFOUND) - if ((ret = find_sound_for_suffix(f, sfopen, sound_path,theme_name, name, p, ".ogg", locale, subdir)) == CA_ERROR_NOTFOUND) - ret = find_sound_for_suffix(f, sfopen, sound_path,theme_name, name, p, ".wav", locale, subdir); - - ca_free(p); - - return ret; -} - -static int find_sound_for_locale( - ca_sound_file **f, - ca_sound_file_open_callback_t sfopen, - char **sound_path, - const char *theme_name, - const char *name, - const char *path, - const char *locale, - const char *subdir) { - - const char *e; - int ret; - - ca_return_val_if_fail(f, CA_ERROR_INVALID); - ca_return_val_if_fail(sfopen, CA_ERROR_INVALID); - ca_return_val_if_fail(name && *name, CA_ERROR_INVALID); - ca_return_val_if_fail(path, CA_ERROR_INVALID); - ca_return_val_if_fail(locale, CA_ERROR_INVALID); - - /* First, try the locale def itself */ - if ((ret = find_sound_in_locale(f, sfopen, sound_path, theme_name, name, path, locale, subdir)) != CA_ERROR_NOTFOUND) - return ret; - - /* Then, try to truncate at the @ */ - if ((e = strchr(locale, '@'))) { - char *t; - - if (!(t = ca_strndup(locale, (size_t) (e - locale)))) - return CA_ERROR_OOM; - - ret = find_sound_in_locale(f, sfopen, sound_path, theme_name, name, path, t, subdir); - ca_free(t); - - if (ret != CA_ERROR_NOTFOUND) - return ret; - } - - /* Followed by truncating at the _ */ - if ((e = strchr(locale, '_'))) { - char *t; - - if (!(t = ca_strndup(locale, (size_t) (e - locale)))) - return CA_ERROR_OOM; - - ret = find_sound_in_locale(f, sfopen, sound_path, theme_name, name, path, t, subdir); - ca_free(t); - - if (ret != CA_ERROR_NOTFOUND) - return ret; - } - - /* Then, try "C" as fallback locale */ - if (strcmp(locale, "C")) - if ((ret = find_sound_in_locale(f, sfopen, sound_path, theme_name, name, path, "C", subdir)) != CA_ERROR_NOTFOUND) - return ret; - - /* Try without locale */ - return find_sound_in_locale(f, sfopen, sound_path, theme_name, name, path, NULL, subdir); -} - -static int find_sound_for_name( - ca_sound_file **f, - ca_sound_file_open_callback_t sfopen, - char **sound_path, - const char *theme_name, - const char *name, - const char *path, - const char *locale, - const char *subdir) { - - int ret; - const char *k; - - ca_return_val_if_fail(f, CA_ERROR_INVALID); - ca_return_val_if_fail(sfopen, CA_ERROR_INVALID); - ca_return_val_if_fail(name && *name, CA_ERROR_INVALID); - - if ((ret = find_sound_for_locale(f, sfopen, sound_path, theme_name, name, path, locale, subdir)) != CA_ERROR_NOTFOUND) - return ret; - - k = strchr(name, 0); - for (;;) { - char *n; - - do { - k--; - - if (k <= name) - return CA_ERROR_NOTFOUND; - - } while (*k != '-'); - - if (!(n = ca_strndup(name, (size_t) (k-name)))) - return CA_ERROR_OOM; - - if ((ret = find_sound_for_locale(f, sfopen, sound_path, theme_name, n, path, locale, subdir)) != CA_ERROR_NOTFOUND) { - ca_free(n); - return ret; - } - - ca_free(n); - } -} - -static int find_sound_in_subdir( - ca_sound_file **f, - ca_sound_file_open_callback_t sfopen, - char **sound_path, - const char *theme_name, - const char *name, - const char *locale, - const char *subdir) { - - int ret; - char *e = NULL; - const char *g; - - ca_return_val_if_fail(f, CA_ERROR_INVALID); - ca_return_val_if_fail(sfopen, CA_ERROR_INVALID); - ca_return_val_if_fail(name, CA_ERROR_INVALID); - - if ((ret = ca_get_data_home(&e)) < 0) - return ret; - - if (e) { - ret = find_sound_for_name(f, sfopen, sound_path, theme_name, name, e, locale, subdir); - ca_free(e); - - if (ret != CA_ERROR_NOTFOUND) - return ret; - } - - g = ca_get_data_dirs(); - - for (;;) { - size_t k; - - k = strcspn(g, ":"); - - if (g[0] == '/' && k > 0) { - char *p; - - if (!(p = ca_strndup(g, k))) - return CA_ERROR_OOM; - - ret = find_sound_for_name(f, sfopen, sound_path, theme_name, name, p, locale, subdir); - ca_free(p); - - if (ret != CA_ERROR_NOTFOUND) - return ret; - } - - if (g[k] == 0) - break; - - g += k+1; - } - - return CA_ERROR_NOTFOUND; -} - -static int find_sound_in_profile( - ca_sound_file **f, - ca_sound_file_open_callback_t sfopen, - char **sound_path, - ca_theme_data *t, - const char *name, - const char *locale, - const char *profile) { - - ca_data_dir *d; - - ca_return_val_if_fail(f, CA_ERROR_INVALID); - ca_return_val_if_fail(t, CA_ERROR_INVALID); - ca_return_val_if_fail(sfopen, CA_ERROR_INVALID); - ca_return_val_if_fail(name, CA_ERROR_INVALID); - - for (d = t->data_dirs; d; d = d->next) - if (data_dir_matches(d, profile)) { - int ret; - - if ((ret = find_sound_in_subdir(f, sfopen, sound_path, d->theme_name, name, locale, d->dir_name)) != CA_ERROR_NOTFOUND) - return ret; - } - - return CA_ERROR_NOTFOUND; -} - -static int find_sound_in_theme( - ca_sound_file **f, - ca_sound_file_open_callback_t sfopen, - char **sound_path, - ca_theme_data *t, - const char *name, - const char *locale, - const char *profile) { - - int ret; - - ca_return_val_if_fail(f, CA_ERROR_INVALID); - ca_return_val_if_fail(name, CA_ERROR_INVALID); - ca_return_val_if_fail(sfopen, CA_ERROR_INVALID); - ca_return_val_if_fail(profile, CA_ERROR_INVALID); - - if (t) { - /* First, try the profile def itself */ - if ((ret = find_sound_in_profile(f, sfopen, sound_path, t, name, locale, profile)) != CA_ERROR_NOTFOUND) - return ret; - - /* Then, fall back to stereo */ - if (!ca_streq(profile, DEFAULT_OUTPUT_PROFILE)) - if ((ret = find_sound_in_profile(f, sfopen, sound_path, t, name, locale, DEFAULT_OUTPUT_PROFILE)) != CA_ERROR_NOTFOUND) - return ret; - } - - /* And fall back to no profile */ - return find_sound_in_subdir(f, sfopen, sound_path, t ? t->name : NULL, name, locale, NULL); -} - -static int find_sound_for_theme( - ca_sound_file **f, - ca_sound_file_open_callback_t sfopen, - char **sound_path, - ca_theme_data **t, - const char *theme, - const char *name, - const char *locale, - const char *profile) { - - int ret; - - ca_return_val_if_fail(f, CA_ERROR_INVALID); - ca_return_val_if_fail(t, CA_ERROR_INVALID); - ca_return_val_if_fail(sfopen, CA_ERROR_INVALID); - ca_return_val_if_fail(theme, CA_ERROR_INVALID); - ca_return_val_if_fail(name && *name, CA_ERROR_INVALID); - ca_return_val_if_fail(locale, CA_ERROR_INVALID); - ca_return_val_if_fail(profile, CA_ERROR_INVALID); - - /* First, try in the theme itself, and if that fails the fallback theme */ - if ((ret = load_theme_data(t, theme)) == CA_ERROR_NOTFOUND) - if (!ca_streq(theme, FALLBACK_THEME)) - ret = load_theme_data(t, FALLBACK_THEME); - - if (ret == CA_SUCCESS) - if ((ret = find_sound_in_theme(f, sfopen, sound_path, *t, name, locale, profile)) != CA_ERROR_NOTFOUND) - return ret; - - /* Then, fall back to "unthemed" files */ - return find_sound_in_theme(f, sfopen, sound_path, NULL, name, locale, profile); -} - -int ca_lookup_sound_with_callback( - ca_sound_file **f, - ca_sound_file_open_callback_t sfopen, - char **sound_path, - ca_theme_data **t, - ca_proplist *cp, - ca_proplist *sp) { - int ret = CA_ERROR_INVALID; - const char *name, *fname; - - ca_return_val_if_fail(f, CA_ERROR_INVALID); - ca_return_val_if_fail(t, CA_ERROR_INVALID); - ca_return_val_if_fail(cp, CA_ERROR_INVALID); - ca_return_val_if_fail(sp, CA_ERROR_INVALID); - ca_return_val_if_fail(sfopen, CA_ERROR_INVALID); - - *f = NULL; - - if (sound_path) - *sound_path = NULL; - - ca_mutex_lock(cp->mutex); - ca_mutex_lock(sp->mutex); - - if ((name = ca_proplist_gets_unlocked(sp, CA_PROP_EVENT_ID))) { - const char *theme, *locale, *profile; - - if (!(theme = ca_proplist_gets_unlocked(sp, CA_PROP_CANBERRA_XDG_THEME_NAME))) - if (!(theme = ca_proplist_gets_unlocked(cp, CA_PROP_CANBERRA_XDG_THEME_NAME))) - theme = DEFAULT_THEME; - - if (!(locale = ca_proplist_gets_unlocked(sp, CA_PROP_MEDIA_LANGUAGE))) - if (!(locale = ca_proplist_gets_unlocked(sp, CA_PROP_APPLICATION_LANGUAGE))) - if (!(locale = ca_proplist_gets_unlocked(cp, CA_PROP_MEDIA_LANGUAGE))) - if (!(locale = ca_proplist_gets_unlocked(cp, CA_PROP_APPLICATION_LANGUAGE))) - if (!(locale = setlocale(LC_MESSAGES, NULL))) - locale = "C"; - - if (!(profile = ca_proplist_gets_unlocked(sp, CA_PROP_CANBERRA_XDG_THEME_OUTPUT_PROFILE))) - if (!(profile = ca_proplist_gets_unlocked(cp, CA_PROP_CANBERRA_XDG_THEME_OUTPUT_PROFILE))) - profile = DEFAULT_OUTPUT_PROFILE; - -#ifdef HAVE_CACHE - if ((ret = ca_cache_lookup_sound(f, sfopen, sound_path, theme, name, locale, profile)) >= 0) { - - /* This entry is available in the cache, let's transform - * negative cache entries to CA_ERROR_NOTFOUND */ - - if (!*f) - ret = CA_ERROR_NOTFOUND; - - } else { - char *spath = NULL; - - /* Either this entry was not available in the database, - * neither positive nor negative, or the database was - * corrupt, or it was out-of-date. In all cases try to - * find the entry manually. */ - - if ((ret = find_sound_for_theme(f, sfopen, sound_path ? sound_path : &spath, t, theme, name, locale, profile)) >= 0) - /* Ok, we found it. Let's update the cache */ - ca_cache_store_sound(theme, name, locale, profile, sound_path ? *sound_path : spath); - else if (ret == CA_ERROR_NOTFOUND) - /* Doesn't seem to be around, let's create a negative cache entry */ - ca_cache_store_sound(theme, name, locale, profile, NULL); - - ca_free(spath); - } - -#else - ret = find_sound_for_theme(f, sfopen, sound_path, t, theme, name, locale, profile); -#endif - } - - if (ret == CA_ERROR_NOTFOUND || !name) { - if ((fname = ca_proplist_gets_unlocked(sp, CA_PROP_MEDIA_FILENAME))) - ret = sfopen(f, fname); - } - - ca_mutex_unlock(cp->mutex); - ca_mutex_unlock(sp->mutex); - - return ret; -} - -int ca_lookup_sound( - ca_sound_file **f, - char **sound_path, - ca_theme_data **t, - ca_proplist *cp, - ca_proplist *sp) { - - return ca_lookup_sound_with_callback(f, ca_sound_file_open, sound_path, t, cp, sp); -} - -void ca_theme_data_free(ca_theme_data *t) { - ca_assert(t); - - while (t->data_dirs) { - ca_data_dir *d = t->data_dirs; - - CA_LLIST_REMOVE(ca_data_dir, t->data_dirs, d); - - ca_free(d->theme_name); - ca_free(d->dir_name); - ca_free(d->output_profile); - ca_free(d); - } - - ca_free(t->name); - ca_free(t); -} diff --git a/.flatpak-builder/cache/objects/9d/5db4b9ff9bc68cba89d19935947afa815cf4022d4a656891e4ddbfccef62fa.file b/.flatpak-builder/cache/objects/9d/5db4b9ff9bc68cba89d19935947afa815cf4022d4a656891e4ddbfccef62fa.file deleted file mode 100644 index e243b5e..0000000 Binary files a/.flatpak-builder/cache/objects/9d/5db4b9ff9bc68cba89d19935947afa815cf4022d4a656891e4ddbfccef62fa.file and /dev/null differ diff --git a/.flatpak-builder/cache/objects/9e/6bcf17349a7e39c23eec30ac49e634146705eb165a15b80f2162ed0da7b07a.file b/.flatpak-builder/cache/objects/9e/6bcf17349a7e39c23eec30ac49e634146705eb165a15b80f2162ed0da7b07a.file deleted file mode 100644 index 3e02040..0000000 --- a/.flatpak-builder/cache/objects/9e/6bcf17349a7e39c23eec30ac49e634146705eb165a15b80f2162ed0da7b07a.file +++ /dev/null @@ -1,197 +0,0 @@ -/*-*- Mode: C; c-basic-offset: 8 -*-*/ - -/*** - This file is part of libcanberra. - - Copyright 2008 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 - . -***/ - -#ifdef HAVE_CONFIG_H -#include -#endif - -#include -#include - -#include -#include - -static int ret = 0; -static ca_proplist *proplist = NULL; -static int n_loops = 1; - -static void callback(ca_context *c, uint32_t id, int error, void *userdata); - -static gboolean idle_quit(gpointer userdata) { - gtk_main_quit(); - return FALSE; -} - -static gboolean idle_play(gpointer userdata) { - int r; - - g_assert(n_loops > 1); - - n_loops--; - - r = ca_context_play_full(ca_gtk_context_get(), 1, proplist, callback, NULL); - - if (r < 0) { - g_printerr("Failed to play sound: %s\n", ca_strerror(r)); - ret = 1; - gtk_main_quit(); - } - - return FALSE; -} - -static void callback(ca_context *c, uint32_t id, int error, void *userdata) { - - if (error < 0) { - g_printerr("Failed to play sound (callback): %s\n", ca_strerror(error)); - ret = 1; - - } else if (n_loops > 1) { - /* So, why don't we call ca_context_play_full() here directly? - -- Because the context this callback is called from is - explicitly documented as undefined and no libcanberra function - may be called from it. */ - - g_idle_add(idle_play, NULL); - return; - } - - /* So, why don't we call gtk_main_quit() here directly? -- Because - * otherwise we might end up with a small race condition: this - * callback might get called before the main loop actually started - * running */ - g_idle_add(idle_quit, NULL); -} - -static GQuark error_domain(void) { - return g_quark_from_static_string("canberra-error-quark"); -} - -static gboolean property_callback( - const gchar *option_name, - const gchar *value, - gpointer data, - GError **error) { - - const char *equal; - char *t; - - if (!(equal = strchr(value, '='))) { - g_set_error(error, error_domain(), 0, "Property lacks '='."); - return FALSE; - } - - t = g_strndup(value, equal - value); - - if (ca_proplist_sets(proplist, t, equal + 1) < 0) { - g_set_error(error, error_domain(), 0, "Invalid property."); - g_free(t); - return FALSE; - } - - g_free(t); - return TRUE; -} - -int main (int argc, char *argv[]) { - GOptionContext *oc; - static gchar *event_id = NULL, *filename = NULL, *event_description = NULL, *cache_control = NULL, *volume = NULL; - int r; - static gboolean version = FALSE; - GError *error = NULL; - - static const GOptionEntry options[] = { - { "version", 'v', 0, G_OPTION_ARG_NONE, &version, "Display version number and quit", NULL }, - { "id", 'i', 0, G_OPTION_ARG_STRING, &event_id, "Event sound identifier", "STRING" }, - { "file", 'f', 0, G_OPTION_ARG_STRING, &filename, "Play file", "PATH" }, - { "description", 'd', 0, G_OPTION_ARG_STRING, &event_description, "Event sound description", "STRING" }, - { "cache-control", 'c', 0, G_OPTION_ARG_STRING, &cache_control, "Cache control (permanent, volatile, never)", "STRING" }, - { "loop", 'l', 0, G_OPTION_ARG_INT, &n_loops, "Loop how many times (detault: 1)", "INTEGER" }, - { "volume", 'V', 0, G_OPTION_ARG_STRING, &volume, "A floating point dB value for the sample volume (ex: 0.0)", "STRING" }, - { "property", 0, 0, G_OPTION_ARG_CALLBACK, (void*) property_callback, "An arbitrary property", "STRING" }, - { NULL, 0, 0, 0, NULL, NULL, NULL } - }; - - setlocale(LC_ALL, ""); - - g_type_init(); - - ca_proplist_create(&proplist); - - oc = g_option_context_new("- canberra-gtk-play"); - g_option_context_add_main_entries(oc, options, NULL); - g_option_context_add_group(oc, gtk_get_option_group(TRUE)); - g_option_context_set_help_enabled(oc, TRUE); - - if (!(g_option_context_parse(oc, &argc, &argv, &error))) { - g_print("Option parsing failed: %s\n", error->message); - return 1; - } - g_option_context_free(oc); - - if (version) { - g_print("canberra-gtk-play from %s\n", PACKAGE_STRING); - return 0; - } - - if (!event_id && !filename) { - g_printerr("No event id or file specified.\n"); - return 1; - } - - ca_context_change_props(ca_gtk_context_get(), - CA_PROP_APPLICATION_NAME, "canberra-gtk-play", - CA_PROP_APPLICATION_VERSION, PACKAGE_VERSION, - CA_PROP_APPLICATION_ID, "org.freedesktop.libcanberra.gtk-play", - NULL); - - if (event_id) - ca_proplist_sets(proplist, CA_PROP_EVENT_ID, event_id); - - if (filename) - ca_proplist_sets(proplist, CA_PROP_MEDIA_FILENAME, filename); - - if (cache_control) - ca_proplist_sets(proplist, CA_PROP_CANBERRA_CACHE_CONTROL, cache_control); - - if (event_description) - ca_proplist_sets(proplist, CA_PROP_EVENT_DESCRIPTION, event_description); - - if (volume) - ca_proplist_sets(proplist, CA_PROP_CANBERRA_VOLUME, volume); - - r = ca_context_play_full(ca_gtk_context_get(), 1, proplist, callback, NULL); - - if (r < 0) { - g_printerr("Failed to play sound: %s\n", ca_strerror(r)); - ret = 1; - goto finish; - } - - gtk_main(); - -finish: - - ca_proplist_destroy(proplist); - - return ret; -} diff --git a/.flatpak-builder/cache/objects/9e/8a20c5d74820db56f522f9bec05a1a520e466f0ec616c8d6b66f633e1ca70e.file b/.flatpak-builder/cache/objects/9e/8a20c5d74820db56f522f9bec05a1a520e466f0ec616c8d6b66f633e1ca70e.file deleted file mode 100644 index a02e6c2..0000000 --- a/.flatpak-builder/cache/objects/9e/8a20c5d74820db56f522f9bec05a1a520e466f0ec616c8d6b66f633e1ca70e.file +++ /dev/null @@ -1,37 +0,0 @@ -/*-*- Mode: C; c-basic-offset: 8 -*-*/ - -#ifndef foocanberramutexhfoo -#define foocanberramutexhfoo - -/*** - This file is part of libcanberra. - - Copyright 2008 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 - . -***/ - -#include "macro.h" - -typedef struct ca_mutex ca_mutex; - -ca_mutex* ca_mutex_new(void); -void ca_mutex_free(ca_mutex *m); - -void ca_mutex_lock(ca_mutex *m); -ca_bool_t ca_mutex_try_lock(ca_mutex *m); -void ca_mutex_unlock(ca_mutex *m); - -#endif diff --git a/.flatpak-builder/cache/objects/a0/adb957938594bddb3232ba4d7ca8ce12814c266bced690f6139515b5706317.file b/.flatpak-builder/cache/objects/a0/adb957938594bddb3232ba4d7ca8ce12814c266bced690f6139515b5706317.file deleted file mode 100644 index 03749c8..0000000 --- a/.flatpak-builder/cache/objects/a0/adb957938594bddb3232ba4d7ca8ce12814c266bced690f6139515b5706317.file +++ /dev/null @@ -1,44 +0,0 @@ -/*-*- Mode: C; c-basic-offset: 8 -*-*/ - -#ifndef foocanberrareadvorbishfoo -#define foocanberrareadvorbishfoo - -/*** - This file is part of libcanberra. - - Copyright 2008 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 - . -***/ - -#include -#include - -#include "read-sound-file.h" - -typedef struct ca_vorbis ca_vorbis; - -int ca_vorbis_open(ca_vorbis **v, FILE *f); -void ca_vorbis_close(ca_vorbis *v); - -unsigned ca_vorbis_get_nchannels(ca_vorbis *v); -unsigned ca_vorbis_get_rate(ca_vorbis *v); -const ca_channel_position_t* ca_vorbis_get_channel_map(ca_vorbis *v); - -int ca_vorbis_read_s16ne(ca_vorbis *v, int16_t *d, size_t *n); - -off_t ca_vorbis_get_size(ca_vorbis *f); - -#endif diff --git a/.flatpak-builder/cache/objects/a1/c3f3dd877f031d8562acbf0a2eba807c0a3a9317cb212bdaad2c95d2aff270.file b/.flatpak-builder/cache/objects/a1/c3f3dd877f031d8562acbf0a2eba807c0a3a9317cb212bdaad2c95d2aff270.file deleted file mode 100644 index c87cb9f..0000000 --- a/.flatpak-builder/cache/objects/a1/c3f3dd877f031d8562acbf0a2eba807c0a3a9317cb212bdaad2c95d2aff270.file +++ /dev/null @@ -1,120 +0,0 @@ -.TH INTLTOOL-MERGE 8 "2003-08-02" "intltool" - -.SH NAME -intltool-merge \- merge translated strings into various types of file - -.SH SYNOPSIS -.B "intltool-merge" -.I "[option]..." PO_DIRECTORY FILENAME OUTPUT_FILE - - -.SH DESCRIPTION -.PP -Merge translated strings in po files in \fIPO_DIRECTORY\fR with the original -application file \fIFILENAME\fR, and output the file \fIOUTPUT_FILE\fR -containing both original and localized strings. -.PP -If \fIFILENAME\fR is an XML file, \fIOUTPUT_FILE\fR will contain repeated -xml nodes, where each node contains one of the localized strings with -"xml:lang" attribute. - - -.SH OPTIONS -.\" ------------------------------------------------------- -.SS "Mode of operation" -.\" ------------------------------------------------------- -.IP "\fB\-b\fR" 4 -.PD 0 -.IP "\fB\-\-ba-style\fR" 4 -.PD -Merge files in bonobo-activation style, which is used for bonobo servers. -.IP "\fB\-d\fR" 4 -.PD 0 -.IP "\fB\-\-desktop-style\fR" 4 -.PD -Merge files in desktop style, which is similar to the Windows .ini file format. -.IP "\fB\-k\fR" 4 -.PD 0 -.IP "\fB\-\-keys-style\fR" 4 -.PD -Merge files in keys style, which is used for metadata. -.IP "\fB\-o\fR" 4 -.PD 0 -.IP "\fB\-\-oaf-style\fR" 4 -.PD -(OBSOLETE) Same as -.BR \-b / \-\-ba-style "." -.IP "\fB\-r\fR" 4 -.PD 0 -.IP "\fB\-\-rfc822deb-style\fR" 4 -.PD -Merge files in RFC 822 style, which is usually used in Debian configuration files. -.IP "\fB\-\-quoted-style\fR" 4 -.PD -Merge files in quoted string style, which just translates any strings within "". -.IP "\fB\-x\fR" 4 -.PD 0 -.IP "\fB\-\-xml-style\fR" 4 -.PD -Merge files in standard XML style, both as attributes and as raw pcdata. - -.\" ------------------------------------------------------- -.SS "Other options" -.\" ------------------------------------------------------- -.IP "\fB\-u\fR" 4 -.PD 0 -.IP "\fB\-\-utf8\fR" 4 -.PD -Convert all strings to UTF-8 before merging. -.IP "\fB\-p\fR" 4 -.PD 0 -.IP "\fB\-\-pass-through\fR" 4 -.PD -Use strings as is in .po files without conversion (STRONGLY unrecommended -with \-x). -.IP "\fB\-c\fR" 4 -.PD 0 -.IP "\fB\-\-cache\fR" 4 -.PD -(TBD) -.IP "\fB\-q\fR" 4 -.PD 0 -.IP "\fB\-\-quiet\fR" 4 -.PD -Be quiet while running. -.IP "\fB\-v\fR" 4 -.PD 0 -.IP "\fB\-\-version\fR" 4 -.PD -Show version information. -.IP "\fB\-h\fR" 4 -.PD 0 -.IP "\fB\-\-help\fR" 4 -.PD -Show usage and basic help information. - - -.SH FILES -.IP "\fBpo/.intltool-merge-cache\fR" -Cache file generated by \fBintltool-merge\fR, that contains all strings -in all po files separated by \\01. - - -.SH REPORTING BUGS -Report bugs to http://bugs.launchpad.net/intltool - - -.SH AUTHOR -Darin Adler -.br -Kenneth Christiansen -.br -Maciej Stachowiak - - -.SH SEE ALSO -.BR iconv (1), -.BR intltoolize (8), -.BR intltool-prepare (8), -.BR intltool-extract (8), -.BR intltool-update (8) diff --git a/.flatpak-builder/cache/objects/a3/474de5d8a8b75ce97da78e6227710350dc9efba95f95ce112ec7de076f2e66.file b/.flatpak-builder/cache/objects/a3/474de5d8a8b75ce97da78e6227710350dc9efba95f95ce112ec7de076f2e66.file deleted file mode 100755 index 0b69a59..0000000 Binary files a/.flatpak-builder/cache/objects/a3/474de5d8a8b75ce97da78e6227710350dc9efba95f95ce112ec7de076f2e66.file and /dev/null differ diff --git a/.flatpak-builder/cache/objects/a5/b9fa2cd45c271a8fbe19a4e0105dec9d29a3269bb5a016a38a0a9b622e790d.file b/.flatpak-builder/cache/objects/a5/b9fa2cd45c271a8fbe19a4e0105dec9d29a3269bb5a016a38a0a9b622e790d.file deleted file mode 100644 index e3a5268..0000000 --- a/.flatpak-builder/cache/objects/a5/b9fa2cd45c271a8fbe19a4e0105dec9d29a3269bb5a016a38a0a9b622e790d.file +++ /dev/null @@ -1,119 +0,0 @@ -/* gsound-play.vala - * - * Copyright (C) 2014 Tristan Brindle - * - * This file 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. - * - * This file 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 General Public License - * along with this program. If not, see . - */ - -string event_id; -string filename; -string desc; -string cache; -int loops; -double volume; -string driver; - -MainLoop main_loop; -GSound.Context gs_ctx; -HashTable attrs; - -const OptionEntry[] opts = { - { "id", 'i', 0, OptionArg.STRING, ref event_id, - "Event sound identifier", "STRING" }, - { "file", 'f', 0, OptionArg.FILENAME, ref filename, - "Play file", "PATH" }, - { "description", 'd', 0, OptionArg.STRING, ref desc, - "Event sound description", "STRING" }, - { "cache-control", 'c', 0, OptionArg.STRING, ref cache, - "Cache control (permanent, volatile, never", "STRING" }, - { "loop", 'l', 0, OptionArg.INT, ref loops, - "Loop many times (default: 1)", "INTEGER" }, - { "volume", 'V', 0, OptionArg.DOUBLE, ref volume, - "A floating point dB value for the sample volume (ex: 0.0)", "STRING" }, - { "backend", 'b', 0, OptionArg.STRING, ref driver, - "libcanberra backend to use", "STRING" }, - { null } -}; - -async void play() throws Error -{ - while (loops-- > 0) { - yield gs_ctx.play_fullv(attrs, null); - } -} - -int main(string[] args) -{ - Intl.setlocale (LocaleCategory.ALL, ""); - - Environment.set_application_name("gsound-play"); - - var opt_ctx = new OptionContext(); - opt_ctx.add_main_entries(opts, null); - - try { - opt_ctx.parse(ref args); - - if (event_id == null && filename == null) { - print("No event id or file specified.\n"); - return 1; - } - - gs_ctx = new GSound.Context(); - gs_ctx.set_attributes(GSound.Attribute.APPLICATION_ID, "org.gnome.gsound-test"); - - if (driver != null) { - gs_ctx.set_driver(driver); - } - - attrs = new HashTable(str_hash, str_equal); - - if (event_id != null) { - attrs.insert(GSound.Attribute.EVENT_ID, event_id); - } - if (filename != null) { - attrs.insert(GSound.Attribute.MEDIA_FILENAME, filename); - } - if (cache != null) { - attrs.insert(GSound.Attribute.CANBERRA_CACHE_CONTROL, cache); - } - if (volume != 0.0) { - attrs.insert(GSound.Attribute.CANBERRA_VOLUME, volume.to_string()); - } - - if (loops == 0) { - loops = 1; - } - - play.begin((obj, res) => { - try { - play.end(res); - } catch (Error e) { - print("Error: %s\n", e.message); - } finally { - main_loop.quit(); - } - }); - - main_loop = new MainLoop(); - main_loop.run(); - - } catch (Error e) { - print("Error: %s\n", e.message); - return 1; - } - - return 0; -} - diff --git a/.flatpak-builder/cache/objects/a7/d59f46002effe9ea38dcb265546e1b7e4e215af9db96e6d223fcc4bc56650a.file b/.flatpak-builder/cache/objects/a7/d59f46002effe9ea38dcb265546e1b7e4e215af9db96e6d223fcc4bc56650a.file deleted file mode 100644 index 0d3a62d..0000000 --- a/.flatpak-builder/cache/objects/a7/d59f46002effe9ea38dcb265546e1b7e4e215af9db96e6d223fcc4bc56650a.file +++ /dev/null @@ -1,366 +0,0 @@ -/*-*- Mode: C; c-basic-offset: 8 -*-*/ - -/*** - This file is part of libcanberra. - - Copyright 2008 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 - . -***/ - -#ifdef HAVE_CONFIG_H -#include -#endif - -#include "canberra.h" -#include "read-wav.h" -#include "macro.h" -#include "malloc.h" - -#define FILE_SIZE_MAX (64U*1024U*1024U) - -/* Stores the bit indexes in dwChannelMask */ -enum { - BIT_FRONT_LEFT, - BIT_FRONT_RIGHT, - BIT_FRONT_CENTER, - BIT_LOW_FREQUENCY, - BIT_BACK_LEFT, - BIT_BACK_RIGHT, - BIT_FRONT_LEFT_OF_CENTER, - BIT_FRONT_RIGHT_OF_CENTER, - BIT_BACK_CENTER, - BIT_SIDE_LEFT, - BIT_SIDE_RIGHT, - BIT_TOP_CENTER, - BIT_TOP_FRONT_LEFT, - BIT_TOP_FRONT_CENTER, - BIT_TOP_FRONT_RIGHT, - BIT_TOP_BACK_LEFT, - BIT_TOP_BACK_CENTER, - BIT_TOP_BACK_RIGHT, - _BIT_MAX -}; - -static const ca_channel_position_t channel_table[_BIT_MAX] = { - [BIT_FRONT_LEFT] = CA_CHANNEL_FRONT_LEFT, - [BIT_FRONT_RIGHT] = CA_CHANNEL_FRONT_RIGHT, - [BIT_FRONT_CENTER] = CA_CHANNEL_FRONT_CENTER, - [BIT_LOW_FREQUENCY] = CA_CHANNEL_LFE, - [BIT_BACK_LEFT] = CA_CHANNEL_REAR_LEFT, - [BIT_BACK_RIGHT] = CA_CHANNEL_REAR_RIGHT, - [BIT_FRONT_LEFT_OF_CENTER] = CA_CHANNEL_FRONT_LEFT_OF_CENTER, - [BIT_FRONT_RIGHT_OF_CENTER] = CA_CHANNEL_FRONT_RIGHT_OF_CENTER, - [BIT_BACK_CENTER] = CA_CHANNEL_REAR_CENTER, - [BIT_SIDE_LEFT] = CA_CHANNEL_SIDE_LEFT, - [BIT_SIDE_RIGHT] = CA_CHANNEL_SIDE_RIGHT, - [BIT_TOP_CENTER] = CA_CHANNEL_TOP_CENTER, - [BIT_TOP_FRONT_LEFT] = CA_CHANNEL_TOP_FRONT_LEFT, - [BIT_TOP_FRONT_CENTER] = CA_CHANNEL_TOP_FRONT_CENTER, - [BIT_TOP_FRONT_RIGHT] = CA_CHANNEL_TOP_FRONT_RIGHT, - [BIT_TOP_BACK_LEFT] = CA_CHANNEL_TOP_REAR_LEFT, - [BIT_TOP_BACK_CENTER] = CA_CHANNEL_TOP_REAR_CENTER, - [BIT_TOP_BACK_RIGHT] = CA_CHANNEL_TOP_REAR_RIGHT -}; - -struct ca_wav { - FILE *file; - - off_t data_size; - unsigned nchannels; - unsigned rate; - unsigned depth; - uint32_t channel_mask; - - ca_channel_position_t channel_map[_BIT_MAX]; -}; - -#define CHUNK_ID_DATA 0x61746164U -#define CHUNK_ID_FMT 0x20746d66U - -static const uint8_t pcm_guid[16] = { - 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, - 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71 -}; - -static int skip_to_chunk(ca_wav *w, uint32_t id, uint32_t *size) { - - ca_return_val_if_fail(w, CA_ERROR_INVALID); - ca_return_val_if_fail(size, CA_ERROR_INVALID); - - for (;;) { - uint32_t chunk[2]; - uint32_t s; - - if (fread(chunk, sizeof(uint32_t), CA_ELEMENTSOF(chunk), w->file) != CA_ELEMENTSOF(chunk)) - goto fail_io; - - s = CA_UINT32_FROM_LE(chunk[1]); - - if (s <= 0 || s >= FILE_SIZE_MAX) - return CA_ERROR_TOOBIG; - - if (CA_UINT32_FROM_LE(chunk[0]) == id) { - *size = s; - break; - } - - if (fseek(w->file, (long) s, SEEK_CUR) < 0) - return CA_ERROR_SYSTEM; - } - - return CA_SUCCESS; - -fail_io: - - if (feof(w->file)) - return CA_ERROR_CORRUPT; - else if (ferror(w->file)) - return CA_ERROR_SYSTEM; - - ca_assert_not_reached(); -} - -int ca_wav_open(ca_wav **_w, FILE *f) { - uint32_t header[3], fmt_chunk[10]; - int ret; - ca_wav *w; - uint32_t file_size, fmt_size, data_size; - ca_bool_t extensible; - uint32_t format; - - ca_return_val_if_fail(_w, CA_ERROR_INVALID); - ca_return_val_if_fail(f, CA_ERROR_INVALID); - - if (!(w = ca_new(ca_wav, 1))) - return CA_ERROR_OOM; - - w->file = f; - - if (fread(header, sizeof(uint32_t), CA_ELEMENTSOF(header), f) != CA_ELEMENTSOF(header)) - goto fail_io; - - if (CA_UINT32_FROM_LE(header[0]) != 0x46464952U || - CA_UINT32_FROM_LE(header[2]) != 0x45564157U) { - ret = CA_ERROR_CORRUPT; - goto fail; - } - - file_size = CA_UINT32_FROM_LE(header[1]); - - if (file_size <= 0 || file_size >= FILE_SIZE_MAX) { - ret = CA_ERROR_TOOBIG; - goto fail; - } - - /* Skip to the fmt chunk */ - if ((ret = skip_to_chunk(w, CHUNK_ID_FMT, &fmt_size)) < 0) - goto fail; - - switch (fmt_size) { - - case 14: /* WAVEFORMAT */ - case 16: - case 18: /* WAVEFORMATEX */ - extensible = FALSE; - break; - - case 40: /* WAVEFORMATEXTENSIBLE */ - extensible = TRUE; - break; - - default: - ret = CA_ERROR_NOTSUPPORTED; - goto fail; - } - - if (fread(fmt_chunk, 1, fmt_size, f) != fmt_size) - goto fail_io; - - /* PCM? or WAVEX? */ - format = (CA_UINT32_FROM_LE(fmt_chunk[0]) & 0xFFFF); - if ((!extensible && format != 0x0001) || - (extensible && format != 0xFFFE)) { - ret = CA_ERROR_NOTSUPPORTED; - goto fail; - } - - if (extensible) { - if (memcmp(fmt_chunk + 6, pcm_guid, 16) != 0) { - ret = CA_ERROR_NOTSUPPORTED; - goto fail; - } - - w->channel_mask = CA_UINT32_FROM_LE(fmt_chunk[5]); - } else - w->channel_mask = 0; - - w->nchannels = CA_UINT32_FROM_LE(fmt_chunk[0]) >> 16; - w->rate = CA_UINT32_FROM_LE(fmt_chunk[1]); - w->depth = CA_UINT32_FROM_LE(fmt_chunk[3]) >> 16; - - if (w->nchannels <= 0 || w->rate <= 0) { - ret = CA_ERROR_CORRUPT; - goto fail; - } - - if (w->depth != 16 && w->depth != 8) { - ret = CA_ERROR_NOTSUPPORTED; - goto fail; - } - - /* Skip to the data chunk */ - if ((ret = skip_to_chunk(w, CHUNK_ID_DATA, &data_size)) < 0) - goto fail; - w->data_size = (off_t) data_size; - - if ((w->data_size % (w->depth/8)) != 0) { - ret = CA_ERROR_CORRUPT; - goto fail; - } - - *_w = w; - - return CA_SUCCESS; - -fail_io: - - if (feof(f)) - ret = CA_ERROR_CORRUPT; - else if (ferror(f)) - ret = CA_ERROR_SYSTEM; - else - ca_assert_not_reached(); - -fail: - - ca_free(w); - - return ret; -} - -void ca_wav_close(ca_wav *w) { - ca_assert(w); - - fclose(w->file); - ca_free(w); -} - -unsigned ca_wav_get_nchannels(ca_wav *w) { - ca_assert(w); - - return w->nchannels; -} - -unsigned ca_wav_get_rate(ca_wav *w) { - ca_assert(w); - - return w->rate; -} - -const ca_channel_position_t* ca_wav_get_channel_map(ca_wav *w) { - unsigned c; - ca_channel_position_t *p; - - ca_assert(w); - - if (!w->channel_mask) - return NULL; - - p = w->channel_map; - - for (c = 0; c < _BIT_MAX; c++) - if ((w->channel_mask & (1 << c))) - *(p++) = channel_table[c]; - - ca_assert(p <= w->channel_map + _BIT_MAX); - - if (p != w->channel_map + w->nchannels) - return NULL; - - return w->channel_map; -} - -ca_sample_type_t ca_wav_get_sample_type(ca_wav *w) { - ca_assert(w); - - return w->depth == 16 ? -#ifdef WORDS_BIGENDIAN - CA_SAMPLE_S16RE -#else - CA_SAMPLE_S16NE -#endif - : CA_SAMPLE_U8; -} - -int ca_wav_read_s16le(ca_wav *w, int16_t *d, size_t *n) { - off_t remaining; - - ca_return_val_if_fail(w, CA_ERROR_INVALID); - ca_return_val_if_fail(w->depth == 16, CA_ERROR_INVALID); - ca_return_val_if_fail(d, CA_ERROR_INVALID); - ca_return_val_if_fail(n, CA_ERROR_INVALID); - ca_return_val_if_fail(*n > 0, CA_ERROR_INVALID); - - remaining = w->data_size / (off_t) sizeof(int16_t); - - if ((off_t) *n > remaining) - *n = (size_t) remaining; - - if (*n > 0) { - *n = fread(d, sizeof(int16_t), *n, w->file); - - if (*n <= 0 && ferror(w->file)) - return CA_ERROR_SYSTEM; - - ca_assert(w->data_size >= (off_t) *n * (off_t) sizeof(int16_t)); - w->data_size -= (off_t) *n * (off_t) sizeof(int16_t); - } - - return CA_SUCCESS; -} - -int ca_wav_read_u8(ca_wav *w, uint8_t *d, size_t *n) { - off_t remaining; - - ca_return_val_if_fail(w, CA_ERROR_INVALID); - ca_return_val_if_fail(w->depth == 8, CA_ERROR_INVALID); - ca_return_val_if_fail(d, CA_ERROR_INVALID); - ca_return_val_if_fail(n, CA_ERROR_INVALID); - ca_return_val_if_fail(*n > 0, CA_ERROR_INVALID); - - remaining = w->data_size / (off_t) sizeof(uint8_t); - - if ((off_t) *n > remaining) - *n = (size_t) remaining; - - if (*n > 0) { - *n = fread(d, sizeof(uint8_t), *n, w->file); - - if (*n <= 0 && ferror(w->file)) - return CA_ERROR_SYSTEM; - - ca_assert(w->data_size >= (off_t) *n * (off_t) sizeof(uint8_t)); - w->data_size -= (off_t) *n * (off_t) sizeof(uint8_t); - } - - return CA_SUCCESS; -} - -off_t ca_wav_get_size(ca_wav *v) { - ca_return_val_if_fail(v, (off_t) -1); - - return v->data_size; -} diff --git a/.flatpak-builder/cache/objects/a7/f688cbffb11207db26827ed4797eafe2d1e44d47f5d55f4c105cb3d0e4308f.file b/.flatpak-builder/cache/objects/a7/f688cbffb11207db26827ed4797eafe2d1e44d47f5d55f4c105cb3d0e4308f.file deleted file mode 100644 index de5cc9b..0000000 --- a/.flatpak-builder/cache/objects/a7/f688cbffb11207db26827ed4797eafe2d1e44d47f5d55f4c105cb3d0e4308f.file +++ /dev/null @@ -1,38 +0,0 @@ - - - - -libcanberra - - - - - - - - - - - - - - - - -
-

-libcanberra

-
-
-canberra — General libcanberra API -
-
-canberra-gtk — Gtk+ libcanberra Bindings -
-
-
- - - \ No newline at end of file diff --git a/.flatpak-builder/cache/objects/a9/856529b9a71567b774d6c3ac99c850edb461da081882e744f24a51b330f52b.file b/.flatpak-builder/cache/objects/a9/856529b9a71567b774d6c3ac99c850edb461da081882e744f24a51b330f52b.file deleted file mode 100644 index 64f464d..0000000 --- a/.flatpak-builder/cache/objects/a9/856529b9a71567b774d6c3ac99c850edb461da081882e744f24a51b330f52b.file +++ /dev/null @@ -1,47 +0,0 @@ -/*-*- Mode: C; c-basic-offset: 8 -*-*/ - -/*** - This file is part of libcanberra. - - Copyright 2008 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 - . -***/ - -#ifdef HAVE_CONFIG_H -#include -#endif - -#include - -#include "canberra.h" -#include "driver-order.h" - -const char* const ca_driver_order[] = { -#ifdef HAVE_PULSE - "pulse", -#endif -#ifdef HAVE_ALSA - "alsa", -#endif -#ifdef HAVE_OSS - "oss", -#endif -#ifdef HAVE_GSTREAMER - "gstreamer", -#endif - /* ... */ - NULL -}; diff --git a/.flatpak-builder/cache/objects/a9/93c5f3675843424a64b74154f248a8f661bef822fe24f3e68b3f468cdd37a7.dirtree b/.flatpak-builder/cache/objects/a9/93c5f3675843424a64b74154f248a8f661bef822fe24f3e68b3f468cdd37a7.dirtree deleted file mode 100644 index 943ac9a..0000000 Binary files a/.flatpak-builder/cache/objects/a9/93c5f3675843424a64b74154f248a8f661bef822fe24f3e68b3f468cdd37a7.dirtree and /dev/null differ diff --git a/.flatpak-builder/cache/objects/ac/39678e5f4f80a6c3e6af9ddc3430d5c2a1e2ae96943a30b4800b532ebe4bb0.dirtree b/.flatpak-builder/cache/objects/ac/39678e5f4f80a6c3e6af9ddc3430d5c2a1e2ae96943a30b4800b532ebe4bb0.dirtree deleted file mode 100644 index 0d2b464..0000000 Binary files a/.flatpak-builder/cache/objects/ac/39678e5f4f80a6c3e6af9ddc3430d5c2a1e2ae96943a30b4800b532ebe4bb0.dirtree and /dev/null differ diff --git a/.flatpak-builder/cache/objects/ac/634bbb0cf7b54e7932eaced0e11fbfa01442c49bf032fac88380c245db2740.dirtree b/.flatpak-builder/cache/objects/ac/634bbb0cf7b54e7932eaced0e11fbfa01442c49bf032fac88380c245db2740.dirtree deleted file mode 100644 index cad35d1..0000000 Binary files a/.flatpak-builder/cache/objects/ac/634bbb0cf7b54e7932eaced0e11fbfa01442c49bf032fac88380c245db2740.dirtree and /dev/null differ diff --git a/.flatpak-builder/cache/objects/ac/71496dcf19e2b27c1e670381fbebf420f1e2de996b55b6ef01da373f2dc1a2.file b/.flatpak-builder/cache/objects/ac/71496dcf19e2b27c1e670381fbebf420f1e2de996b55b6ef01da373f2dc1a2.file deleted file mode 100644 index d3fb054..0000000 --- a/.flatpak-builder/cache/objects/ac/71496dcf19e2b27c1e670381fbebf420f1e2de996b55b6ef01da373f2dc1a2.file +++ /dev/null @@ -1,135 +0,0 @@ -/*** - This file is part of libcanberra. - - Copyright (C) 2009 Michael 'Mickey' Lauer - - 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 - . -***/ - -[CCode (cprefix = "CA_", lower_case_cprefix = "ca_", cheader_filename = "canberra.h")] -namespace Canberra { - - public const int MAJOR; - public const int MINOR; - - [CCode (cname="CA_CHECK_VERSION")] - public bool CHECK_VERSION(int major, int minor); - - public const string PROP_MEDIA_NAME; - public const string PROP_MEDIA_TITLE; - public const string PROP_MEDIA_ARTIST; - public const string PROP_MEDIA_LANGUAGE; - public const string PROP_MEDIA_FILENAME; - public const string PROP_MEDIA_ICON; - public const string PROP_MEDIA_ICON_NAME; - public const string PROP_MEDIA_ROLE; - public const string PROP_EVENT_ID; - public const string PROP_EVENT_DESCRIPTION; - public const string PROP_EVENT_MOUSE_X; - public const string PROP_EVENT_MOUSE_Y; - public const string PROP_EVENT_MOUSE_HPOS; - public const string PROP_EVENT_MOUSE_VPOS; - public const string PROP_EVENT_MOUSE_BUTTON; - public const string PROP_WINDOW_NAME; - public const string PROP_WINDOW_ID; - public const string PROP_WINDOW_ICON; - public const string PROP_WINDOW_ICON_NAME; - public const string PROP_WINDOW_X; - public const string PROP_WINDOW_Y; - public const string PROP_WINDOW_WIDTH; - public const string PROP_WINDOW_HEIGHT; - public const string PROP_WINDOW_HPOS; - public const string PROP_WINDOW_VPOS; - public const string PROP_WINDOW_DESKTOP; - public const string PROP_WINDOW_X11_DISPLAY; - public const string PROP_WINDOW_X11_SCREEN; - public const string PROP_WINDOW_X11_MONITOR; - public const string PROP_WINDOW_X11_XID; - public const string PROP_APPLICATION_NAME; - public const string PROP_APPLICATION_ID; - public const string PROP_APPLICATION_VERSION; - public const string PROP_APPLICATION_ICON; - public const string PROP_APPLICATION_ICON_NAME; - public const string PROP_APPLICATION_LANGUAGE; - public const string PROP_APPLICATION_PROCESS_ID; - public const string PROP_APPLICATION_PROCESS_BINARY; - public const string PROP_APPLICATION_PROCESS_USER; - public const string PROP_APPLICATION_PROCESS_HOST; - public const string PROP_CANBERRA_CACHE_CONTROL; - public const string PROP_CANBERRA_VOLUME; - public const string PROP_CANBERRA_XDG_THEME_NAME; - public const string PROP_CANBERRA_XDG_THEME_OUTPUT_PROFILE; - public const string PROP_CANBERRA_ENABLE; - public const string PROP_CANBERRA_FORCE_CHANNEL; - - [CCode (cname = "CA_SUCCESS")] - public const int SUCCESS; - - [CCode (cname = "int", cprefix = "CA_ERROR_")] - public enum Error { - NOTSUPPORTED, - INVALID, - STATE, - OOM, - NODRIVER, - SYSTEM, - CORRUPT, - TOOBIG, - NOTFOUND, - DESTROYED, - CANCELED, - NOTAVAILABLE, - ACCESS, - IO, - INTERNAL, - DISABLED, - FORKED, - DISCONNECTED, - - [CCode (cname = "_CA_ERROR_MAX")] - _MAX - } - - public unowned string? strerror(int code); - - public delegate void FinishCallback(Context c, uint32 id, int code); - - [Compact] - [CCode (cname = "ca_proplist", free_function = "ca_proplist_destroy")] - public class Proplist { - public static int create(out Proplist p); - public int sets(string key, string value); - [PrintfFormat] - public int setf(string key, string format, ...); - public int set(string key, void* data, size_t nbytes); - } - - [Compact] - [CCode (cname = "ca_context", free_function = "ca_context_destroy")] - public class Context { - public static int create(out Context context); - public int set_driver(string? driver = null); - public int change_device(string? device = null); - public int open(); - public int change_props(...); - public int change_props_full(Proplist p); - public int play_full(uint32 id, Proplist p, FinishCallback? cb = null); - public int play(uint32 id, ...); - public int cache_full(Proplist p); - public int cache(...); - public int cancel(uint32 id); - public int playing(uint32 id, out bool playing); - } -} diff --git a/.flatpak-builder/cache/objects/ae/94d634c8af51591a621c9ede65e039a74ef6f4959dfbdfff5898b641c59ece.dirtree b/.flatpak-builder/cache/objects/ae/94d634c8af51591a621c9ede65e039a74ef6f4959dfbdfff5898b641c59ece.dirtree deleted file mode 100644 index ea1a4b3..0000000 Binary files a/.flatpak-builder/cache/objects/ae/94d634c8af51591a621c9ede65e039a74ef6f4959dfbdfff5898b641c59ece.dirtree and /dev/null differ diff --git a/.flatpak-builder/cache/objects/af/3f51ad4c3571efdd179086afb2cc1ee736da19bcab28deeaa3c9fdb351941e.file b/.flatpak-builder/cache/objects/af/3f51ad4c3571efdd179086afb2cc1ee736da19bcab28deeaa3c9fdb351941e.file deleted file mode 100644 index b24a6dd..0000000 --- a/.flatpak-builder/cache/objects/af/3f51ad4c3571efdd179086afb2cc1ee736da19bcab28deeaa3c9fdb351941e.file +++ /dev/null @@ -1,77 +0,0 @@ -/*-*- Mode: C; c-basic-offset: 8 -*-*/ - -#ifndef foocanberrareadsoundfilehfoo -#define foocanberrareadsoundfilehfoo - -/*** - This file is part of libcanberra. - - Copyright 2008 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 - . -***/ - -#include -#include - -typedef enum ca_sample_type { - CA_SAMPLE_S16NE, - CA_SAMPLE_S16RE, - CA_SAMPLE_U8 -} ca_sample_type_t; - -typedef enum ca_channel_position { - CA_CHANNEL_MONO, - CA_CHANNEL_FRONT_LEFT, - CA_CHANNEL_FRONT_RIGHT, - CA_CHANNEL_FRONT_CENTER, - CA_CHANNEL_REAR_LEFT, - CA_CHANNEL_REAR_RIGHT, - CA_CHANNEL_REAR_CENTER, - CA_CHANNEL_LFE, - CA_CHANNEL_FRONT_LEFT_OF_CENTER, - CA_CHANNEL_FRONT_RIGHT_OF_CENTER, - CA_CHANNEL_SIDE_LEFT, - CA_CHANNEL_SIDE_RIGHT, - CA_CHANNEL_TOP_CENTER, - CA_CHANNEL_TOP_FRONT_LEFT, - CA_CHANNEL_TOP_FRONT_RIGHT, - CA_CHANNEL_TOP_FRONT_CENTER, - CA_CHANNEL_TOP_REAR_LEFT, - CA_CHANNEL_TOP_REAR_RIGHT, - CA_CHANNEL_TOP_REAR_CENTER, - _CA_CHANNEL_POSITION_MAX -} ca_channel_position_t; - -typedef struct ca_sound_file ca_sound_file; - -int ca_sound_file_open(ca_sound_file **f, const char *fn); -void ca_sound_file_close(ca_sound_file *f); - -unsigned ca_sound_file_get_nchannels(ca_sound_file *f); -unsigned ca_sound_file_get_rate(ca_sound_file *f); -ca_sample_type_t ca_sound_file_get_sample_type(ca_sound_file *f); -const ca_channel_position_t* ca_sound_file_get_channel_map(ca_sound_file *f); - -off_t ca_sound_file_get_size(ca_sound_file *f); - -int ca_sound_file_read_int16(ca_sound_file *f, int16_t *d, size_t *n); -int ca_sound_file_read_uint8(ca_sound_file *f, uint8_t *d, size_t *n); - -int ca_sound_file_read_arbitrary(ca_sound_file *f, void *d, size_t *n); - -size_t ca_sound_file_frame_size(ca_sound_file *f); - -#endif diff --git a/.flatpak-builder/cache/objects/af/b51d692bfc9aec86824036690b91d10d380b62319b7438018e6e7d64da1a59.file b/.flatpak-builder/cache/objects/af/b51d692bfc9aec86824036690b91d10d380b62319b7438018e6e7d64da1a59.file deleted file mode 100644 index 1700361..0000000 Binary files a/.flatpak-builder/cache/objects/af/b51d692bfc9aec86824036690b91d10d380b62319b7438018e6e7d64da1a59.file and /dev/null differ diff --git a/.flatpak-builder/cache/objects/b0/07f85d1935bf24655780d70117123b44078fc921770ad8384a6dc16d47a1f5.file b/.flatpak-builder/cache/objects/b0/07f85d1935bf24655780d70117123b44078fc921770ad8384a6dc16d47a1f5.file deleted file mode 120000 index ae42002..0000000 --- a/.flatpak-builder/cache/objects/b0/07f85d1935bf24655780d70117123b44078fc921770ad8384a6dc16d47a1f5.file +++ /dev/null @@ -1 +0,0 @@ -libgsound.so.0 \ No newline at end of file diff --git a/.flatpak-builder/cache/objects/b1/45c109ba385863ea4a3883049db805adf9c01f37fe3fa2c2c46df7776f7cbb.file b/.flatpak-builder/cache/objects/b1/45c109ba385863ea4a3883049db805adf9c01f37fe3fa2c2c46df7776f7cbb.file deleted file mode 100644 index d6f6c26..0000000 --- a/.flatpak-builder/cache/objects/b1/45c109ba385863ea4a3883049db805adf9c01f37fe3fa2c2c46df7776f7cbb.file +++ /dev/null @@ -1,266 +0,0 @@ -.synopsis, .classsynopsis -{ - /* tango:aluminium 1/2 */ - background: #eeeeec; - border: solid 1px #d3d7cf; - padding: 0.5em; -} -.programlisting -{ - /* tango:sky blue 0/1 */ - background: #e6f3ff; - border: solid 1px #729fcf; - padding: 0.5em; -} -.variablelist -{ - padding: 4px; - margin-left: 3em; -} -.variablelist td:first-child -{ - vertical-align: top; -} - -@media screen { - sup a.footnote - { - position: relative; - top: 0em ! important; - - } - /* this is needed so that the local anchors are displayed below the naviagtion */ - div.footnote a[name], div.refnamediv a[name], div.refsect1 a[name], div.refsect2 a[name], div.index a[name], div.glossary a[name], div.sect1 a[name] - { - display: inline-block; - position: relative; - top:-5em; - } - /* this seems to be a bug in the xsl style sheets when generating indexes */ - div.index div.index - { - top: 0em; - } - /* make space for the fixed navigation bar and add space at the bottom so that - * link targets appear somewhat close to top - */ - body - { - padding-top: 3.2em; - padding-bottom: 20em; - } - /* style and size the navigation bar */ - table.navigation#top - { - position: fixed; - /* tango:scarlet red 0/1 */ - background: #ffe6e6; - border: solid 1px #ef2929; - margin-top: 0; - margin-bottom: 0; - top: 0; - left: 0; - height: 3em; - z-index: 10; - } - .navigation a, .navigation a:visited - { - /* tango:scarlet red 3 */ - color: #a40000; - } - .navigation a:hover - { - /* tango:scarlet red 1 */ - color: #ef2929; - } - td.shortcuts - { - /* tango:scarlet red 1 */ - color: #ef2929; - font-size: 80%; - white-space: nowrap; - } -} -@media print { - table.navigation { - visibility: collapse; - display: none; - } - div.titlepage table.navigation { - visibility: visible; - display: table; - /* tango:scarlet red 0/1 */ - background: #ffe6e6; - border: solid 1px #ef2929; - margin-top: 0; - margin-bottom: 0; - top: 0; - left: 0; - height: 3em; - } -} - -.navigation .title -{ - font-size: 200%; -} - -div.gallery-float -{ - float: left; - padding: 10px; -} -div.gallery-float img -{ - border-style: none; -} -div.gallery-spacer -{ - clear: both; -} - -a, a:visited -{ - text-decoration: none; - /* tango:sky blue 2 */ - color: #3465a4; -} -a:hover -{ - text-decoration: underline; - /* tango:sky blue 1 */ - color: #729fcf; -} - -div.table table -{ - border-collapse: collapse; - border-spacing: 0px; - /* tango:aluminium 3 */ - border: solid 1px #babdb6; -} - -div.table table td, div.table table th -{ - /* tango:aluminium 3 */ - border: solid 1px #babdb6; - padding: 3px; - vertical-align: top; -} - -div.table table th -{ - /* tango:aluminium 2 */ - background-color: #d3d7cf; -} - -hr -{ - /* tango:aluminium 3 */ - color: #babdb6; - background: #babdb6; - border: none 0px; - height: 1px; - clear: both; -} - -.footer -{ - padding-top: 3.5em; - /* tango:aluminium 3 */ - color: #babdb6; - text-align: center; - font-size: 80%; -} - -.warning -{ - /* tango:orange 0/1 */ - background: #ffeed9; - border-color: #ffb04f; -} -.note -{ - /* tango:chameleon 0/0.5 */ - background: #d8ffb2; - border-color: #abf562; -} -.note, .warning -{ - padding: 0.5em; - border-width: 1px; - border-style: solid; -} -.note h3, .warning h3 -{ - margin-top: 0.0em -} -.note p, .warning p -{ - margin-bottom: 0.0em -} - -/* blob links */ -h2 .extralinks, h3 .extralinks -{ - float: right; - /* tango:aluminium 3 */ - color: #babdb6; - font-size: 80%; - font-weight: normal; -} - -.annotation -{ - /* tango:aluminium 5 */ - color: #555753; - font-size: 80%; - font-weight: normal; -} - -/* code listings */ - -.listing_code .programlisting .cbracket { color: #a40000; } /* tango: scarlet red 3 */ -.listing_code .programlisting .comment { color: #a1a39d; } /* tango: aluminium 4 */ -.listing_code .programlisting .function { color: #000000; font-weight: bold; } -.listing_code .programlisting .function a { color: #11326b; font-weight: bold; } /* tango: sky blue 4 */ -.listing_code .programlisting .keyword { color: #4e9a06; } /* tango: chameleon 3 */ -.listing_code .programlisting .linenum { color: #babdb6; } /* tango: aluminium 3 */ -.listing_code .programlisting .normal { color: #000000; } -.listing_code .programlisting .number { color: #75507b; } /* tango: plum 2 */ -.listing_code .programlisting .preproc { color: #204a87; } /* tango: sky blue 3 */ -.listing_code .programlisting .string { color: #c17d11; } /* tango: chocolate 2 */ -.listing_code .programlisting .type { color: #000000; } -.listing_code .programlisting .type a { color: #11326b; } /* tango: sky blue 4 */ -.listing_code .programlisting .symbol { color: #ce5c00; } /* tango: orange 3 */ - -.listing_frame { - /* tango:sky blue 1 */ - border: solid 1px #729fcf; - padding: 0px; -} - -.listing_lines, .listing_code { - margin-top: 0px; - margin-bottom: 0px; - padding: 0.5em; -} -.listing_lines { - /* tango:sky blue 0.5 */ - background: #a6c5e3; - /* tango:aluminium 6 */ - color: #2e3436; -} -.listing_code { - /* tango:sky blue 0 */ - background: #e6f3ff; -} -.listing_code .programlisting { - /* override from previous */ - border: none 0px; - padding: 0px; -} -.listing_lines pre, .listing_code pre { - margin: 0px; -} - diff --git a/.flatpak-builder/cache/objects/b1/d4ed77bcefa9617ae1071b8f289ecefc3ac5b62ac378940f016846ff7c0169.dirtree b/.flatpak-builder/cache/objects/b1/d4ed77bcefa9617ae1071b8f289ecefc3ac5b62ac378940f016846ff7c0169.dirtree deleted file mode 100644 index ac10357..0000000 Binary files a/.flatpak-builder/cache/objects/b1/d4ed77bcefa9617ae1071b8f289ecefc3ac5b62ac378940f016846ff7c0169.dirtree and /dev/null differ diff --git a/.flatpak-builder/cache/objects/b3/206371aa2c4857c4288b85c81d2720489ba77ce8f167783bf04de58cb8c4c4.dirtree b/.flatpak-builder/cache/objects/b3/206371aa2c4857c4288b85c81d2720489ba77ce8f167783bf04de58cb8c4c4.dirtree deleted file mode 100644 index fe33e3d..0000000 Binary files a/.flatpak-builder/cache/objects/b3/206371aa2c4857c4288b85c81d2720489ba77ce8f167783bf04de58cb8c4c4.dirtree and /dev/null differ diff --git a/.flatpak-builder/cache/objects/b4/56e60aa93685e652108722ae8a51105d9f33dce876196de595c060c85955ab.file b/.flatpak-builder/cache/objects/b4/56e60aa93685e652108722ae8a51105d9f33dce876196de595c060c85955ab.file deleted file mode 100755 index a845acb..0000000 Binary files a/.flatpak-builder/cache/objects/b4/56e60aa93685e652108722ae8a51105d9f33dce876196de595c060c85955ab.file and /dev/null differ diff --git a/.flatpak-builder/cache/objects/b5/0bb66cece5620288e902724f4f1478b83c9f88416463927cd90d647e0f4cc8.file b/.flatpak-builder/cache/objects/b5/0bb66cece5620288e902724f4f1478b83c9f88416463927cd90d647e0f4cc8.file deleted file mode 100755 index 3cd8678..0000000 --- a/.flatpak-builder/cache/objects/b5/0bb66cece5620288e902724f4f1478b83c9f88416463927cd90d647e0f4cc8.file +++ /dev/null @@ -1,41 +0,0 @@ -# libcanberra-multi.la - a libtool library file -# Generated by libtool (GNU libtool) 2.4.2 -# -# Please DO NOT delete this file! -# It is necessary for linking the library. - -# The name that we can dlopen(3). -dlname='libcanberra-multi.so' - -# Names of this library. -library_names='libcanberra-multi.so libcanberra-multi.so libcanberra-multi.so' - -# The name of the static archive. -old_library='' - -# Linker flags that can not go in dependency_libs. -inherited_linker_flags='' - -# Libraries that this one depends upon. -dependency_libs=' -L/app/lib /app/lib/libcanberra.la -lvorbisfile -lltdl -lm' - -# Names of additional weak libraries provided by this library -weak_library_names='' - -# Version information for libcanberra-multi. -current=0 -age=0 -revision=0 - -# Is this an already installed library? -installed=yes - -# Should we warn about portability when linking against -modules? -shouldnotlink=yes - -# Files to dlopen/dlpreopen -dlopen='' -dlpreopen='' - -# Directory that this library needs to be installed in: -libdir='/app/lib/libcanberra-0.30' diff --git a/.flatpak-builder/cache/objects/b5/c4f216ea6fbe6749a71a82ada81e8a1fad04337677fcbf8c25b2f304394a99.file b/.flatpak-builder/cache/objects/b5/c4f216ea6fbe6749a71a82ada81e8a1fad04337677fcbf8c25b2f304394a99.file deleted file mode 100755 index 466fadd..0000000 Binary files a/.flatpak-builder/cache/objects/b5/c4f216ea6fbe6749a71a82ada81e8a1fad04337677fcbf8c25b2f304394a99.file and /dev/null differ diff --git a/.flatpak-builder/cache/objects/b8/4beb1c2dea3a52ee226576ce0fbfadbc40dae02630408013a5134099c76366.file b/.flatpak-builder/cache/objects/b8/4beb1c2dea3a52ee226576ce0fbfadbc40dae02630408013a5134099c76366.file deleted file mode 100644 index d8170d9..0000000 --- a/.flatpak-builder/cache/objects/b8/4beb1c2dea3a52ee226576ce0fbfadbc40dae02630408013a5134099c76366.file +++ /dev/null @@ -1,418 +0,0 @@ -/*-*- Mode: C; c-basic-offset: 8 -*-*/ - -/*** - This file is part of libcanberra. - - Copyright 2008 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 - . -***/ - -#ifdef HAVE_CONFIG_H -#include -#endif - -#include - -#include "canberra.h" -#include "proplist.h" -#include "macro.h" -#include "malloc.h" - -static unsigned calc_hash(const char *c) { - unsigned hash = 0; - - for (; *c; c++) - hash = 31 * hash + (unsigned) *c; - - return hash; -} - -/** - * ca_proplist_create: - * @p: A pointer where to fill in a pointer for the new property list. - * - * Allocate a new empty property list. - * - * Returns: 0 on success, negative error code on error. - */ -int ca_proplist_create(ca_proplist **_p) { - ca_proplist *p; - ca_return_val_if_fail(_p, CA_ERROR_INVALID); - - if (!(p = ca_new0(ca_proplist, 1))) - return CA_ERROR_OOM; - - if (!(p->mutex = ca_mutex_new())) { - ca_free(p); - return CA_ERROR_OOM; - } - - *_p = p; - - return CA_SUCCESS; -} - -static int _unset(ca_proplist *p, const char *key) { - ca_prop *prop, *nprop; - unsigned i; - - ca_return_val_if_fail(p, CA_ERROR_INVALID); - ca_return_val_if_fail(key, CA_ERROR_INVALID); - - i = calc_hash(key) % N_HASHTABLE; - - nprop = NULL; - for (prop = p->prop_hashtable[i]; prop; nprop = prop, prop = prop->next_in_slot) - if (strcmp(prop->key, key) == 0) - break; - - if (prop) { - if (nprop) - nprop->next_in_slot = prop->next_in_slot; - else - p->prop_hashtable[i] = prop->next_in_slot; - - if (prop->prev_item) - prop->prev_item->next_item = prop->next_item; - else - p->first_item = prop->next_item; - - if (prop->next_item) - prop->next_item->prev_item = prop->prev_item; - - ca_free(prop->key); - ca_free(prop); - } - - return CA_SUCCESS; -} - -/** - * ca_proplist_sets: - * @p: The property list to add this key/value pair to - * @key: The key for this key/value pair - * @value: The value for this key/value pair - * - * Add a new string key/value pair to the property list. - * - * Returns: 0 on success, negative error code on error. - */ - -int ca_proplist_sets(ca_proplist *p, const char *key, const char *value) { - ca_return_val_if_fail(p, CA_ERROR_INVALID); - ca_return_val_if_fail(key, CA_ERROR_INVALID); - ca_return_val_if_fail(value, CA_ERROR_INVALID); - - return ca_proplist_set(p, key, value, strlen(value)+1); -} - -/** - * ca_proplist_setf: - * @p: The property list to add this key/value pair to - * @key: The key for this key/value pair - * @format: The format string for the value for this key/value pair - * @...: The parameters for the format string - * - * Much like ca_proplist_sets(): add a new string key/value pair to - * the property list. Takes a standard C format string plus arguments - * and formats a string of it. - * - * Returns: 0 on success, negative error code on error. - */ - -int ca_proplist_setf(ca_proplist *p, const char *key, const char *format, ...) { - int ret; - char *k; - ca_prop *prop; - size_t size = 100; - unsigned h; - - ca_return_val_if_fail(p, CA_ERROR_INVALID); - ca_return_val_if_fail(key, CA_ERROR_INVALID); - ca_return_val_if_fail(format, CA_ERROR_INVALID); - - if (!(k = ca_strdup(key))) - return CA_ERROR_OOM; - - for (;;) { - va_list ap; - int r; - - if (!(prop = ca_malloc(CA_ALIGN(sizeof(ca_prop)) + size))) { - ca_free(k); - return CA_ERROR_OOM; - } - - - va_start(ap, format); - r = vsnprintf(CA_PROP_DATA(prop), size, format, ap); - va_end(ap); - - ((char*) CA_PROP_DATA(prop))[size-1] = 0; - - if (r > -1 && (size_t) r < size) { - prop->nbytes = (size_t) r+1; - break; - } - - if (r > -1) /* glibc 2.1 */ - size = (size_t) r+1; - else /* glibc 2.0 */ - size *= 2; - - ca_free(prop); - } - - prop->key = k; - - ca_mutex_lock(p->mutex); - - if ((ret = _unset(p, key)) < 0) { - ca_free(prop); - ca_free(k); - goto finish; - } - - h = calc_hash(key) % N_HASHTABLE; - - prop->next_in_slot = p->prop_hashtable[h]; - p->prop_hashtable[h] = prop; - - prop->prev_item = NULL; - if ((prop->next_item = p->first_item)) - prop->next_item->prev_item = prop; - p->first_item = prop; - -finish: - - ca_mutex_unlock(p->mutex); - - return ret; -} - -/** - * ca_proplist_set: - * @p: The property list to add this key/value pair to - * @key: The key for this key/value pair - * @data: The binary value for this key value pair - * @nbytes: The size of thebinary value for this key value pair. - * - * Add a new binary key/value pair to the property list. - * - * Returns: 0 on success, negative error code on error. - */ - -int ca_proplist_set(ca_proplist *p, const char *key, const void *data, size_t nbytes) { - int ret; - char *k; - ca_prop *prop; - unsigned h; - - ca_return_val_if_fail(p, CA_ERROR_INVALID); - ca_return_val_if_fail(key, CA_ERROR_INVALID); - ca_return_val_if_fail(!nbytes || data, CA_ERROR_INVALID); - - if (!(k = ca_strdup(key))) - return CA_ERROR_OOM; - - if (!(prop = ca_malloc(CA_ALIGN(sizeof(ca_prop)) + nbytes))) { - ca_free(k); - return CA_ERROR_OOM; - } - - prop->key = k; - prop->nbytes = nbytes; - memcpy(CA_PROP_DATA(prop), data, nbytes); - - ca_mutex_lock(p->mutex); - - if ((ret = _unset(p, key)) < 0) { - ca_free(prop); - ca_free(k); - goto finish; - } - - h = calc_hash(key) % N_HASHTABLE; - - prop->next_in_slot = p->prop_hashtable[h]; - p->prop_hashtable[h] = prop; - - prop->prev_item = NULL; - if ((prop->next_item = p->first_item)) - prop->next_item->prev_item = prop; - p->first_item = prop; - -finish: - - ca_mutex_unlock(p->mutex); - - return ret; -} - -/* Not exported, not self-locking */ -ca_prop* ca_proplist_get_unlocked(ca_proplist *p, const char *key) { - ca_prop *prop; - unsigned i; - - ca_return_val_if_fail(p, NULL); - ca_return_val_if_fail(key, NULL); - - i = calc_hash(key) % N_HASHTABLE; - - for (prop = p->prop_hashtable[i]; prop; prop = prop->next_in_slot) - if (strcmp(prop->key, key) == 0) - return prop; - - return NULL; -} - -/* Not exported, not self-locking */ -const char* ca_proplist_gets_unlocked(ca_proplist *p, const char *key) { - ca_prop *prop; - - ca_return_val_if_fail(p, NULL); - ca_return_val_if_fail(key, NULL); - - if (!(prop = ca_proplist_get_unlocked(p, key))) - return NULL; - - if (!memchr(CA_PROP_DATA(prop), 0, prop->nbytes)) - return NULL; - - return CA_PROP_DATA(prop); -} - -/** - * ca_proplist_destroy: - * @p: The property list to destroy - * - * Destroys a property list that was created with ca_proplist_create() earlier. - * - * Returns: 0 on success, negative error code on error. - */ - -int ca_proplist_destroy(ca_proplist *p) { - ca_prop *prop, *nprop; - - ca_return_val_if_fail(p, CA_ERROR_INVALID); - - for (prop = p->first_item; prop; prop = nprop) { - nprop = prop->next_item; - ca_free(prop->key); - ca_free(prop); - } - - ca_mutex_free(p->mutex); - - ca_free(p); - - return CA_SUCCESS; -} - -static int merge_into(ca_proplist *a, ca_proplist *b) { - int ret = CA_SUCCESS; - ca_prop *prop; - - ca_return_val_if_fail(a, CA_ERROR_INVALID); - ca_return_val_if_fail(b, CA_ERROR_INVALID); - - ca_mutex_lock(b->mutex); - - for (prop = b->first_item; prop; prop = prop->next_item) - if ((ret = ca_proplist_set(a, prop->key, CA_PROP_DATA(prop), prop->nbytes)) < 0) - break; - - ca_mutex_unlock(b->mutex); - - return ret; -} - -int ca_proplist_merge(ca_proplist **_a, ca_proplist *b, ca_proplist *c) { - ca_proplist *a; - int ret; - - ca_return_val_if_fail(_a, CA_ERROR_INVALID); - ca_return_val_if_fail(b, CA_ERROR_INVALID); - ca_return_val_if_fail(c, CA_ERROR_INVALID); - - if ((ret = ca_proplist_create(&a)) < 0) - return ret; - - if ((ret = merge_into(a, b)) < 0 || - (ret = merge_into(a, c)) < 0) { - ca_proplist_destroy(a); - return ret; - } - - *_a = a; - return CA_SUCCESS; -} - -ca_bool_t ca_proplist_contains(ca_proplist *p, const char *key) { - ca_bool_t b; - - ca_return_val_if_fail(p, FALSE); - ca_return_val_if_fail(key, FALSE); - - ca_mutex_lock(p->mutex); - b = !!ca_proplist_get_unlocked(p, key); - ca_mutex_unlock(p->mutex); - - return b; -} - -int ca_proplist_merge_ap(ca_proplist *p, va_list ap) { - int ret; - - ca_return_val_if_fail(p, CA_ERROR_INVALID); - - for (;;) { - const char *key, *value; - - if (!(key = va_arg(ap, const char*))) - break; - - if (!(value = va_arg(ap, const char*))) - return CA_ERROR_INVALID; - - if ((ret = ca_proplist_sets(p, key, value)) < 0) - return ret; - } - - return CA_SUCCESS; -} - -int ca_proplist_from_ap(ca_proplist **_p, va_list ap) { - int ret; - ca_proplist *p; - - ca_return_val_if_fail(_p, CA_ERROR_INVALID); - - if ((ret = ca_proplist_create(&p)) < 0) - return ret; - - if ((ret = ca_proplist_merge_ap(p, ap)) < 0) - goto fail; - - *_p = p; - - return CA_SUCCESS; - -fail: - ca_assert_se(ca_proplist_destroy(p) == CA_SUCCESS); - - return ret; -} diff --git a/.flatpak-builder/cache/objects/b9/83dc8e4979b2ed360dc48be93c8bb7c8e1db3c762b65ac3f0823413bc3d450.file b/.flatpak-builder/cache/objects/b9/83dc8e4979b2ed360dc48be93c8bb7c8e1db3c762b65ac3f0823413bc3d450.file deleted file mode 100644 index c5b6f31..0000000 Binary files a/.flatpak-builder/cache/objects/b9/83dc8e4979b2ed360dc48be93c8bb7c8e1db3c762b65ac3f0823413bc3d450.file and /dev/null differ diff --git a/.flatpak-builder/cache/objects/bb/415e38999520fd37264507717d9e874dd5358f954c310f8ada5f3221657a69.file b/.flatpak-builder/cache/objects/bb/415e38999520fd37264507717d9e874dd5358f954c310f8ada5f3221657a69.file deleted file mode 100755 index 771c952..0000000 Binary files a/.flatpak-builder/cache/objects/bb/415e38999520fd37264507717d9e874dd5358f954c310f8ada5f3221657a69.file and /dev/null differ diff --git a/.flatpak-builder/cache/objects/bc/c868e438c8b164399a446b3aedb9646f53c2db927ed5a8225ed96d3a56e1c9.file b/.flatpak-builder/cache/objects/bc/c868e438c8b164399a446b3aedb9646f53c2db927ed5a8225ed96d3a56e1c9.file deleted file mode 120000 index d04002a..0000000 --- a/.flatpak-builder/cache/objects/bc/c868e438c8b164399a446b3aedb9646f53c2db927ed5a8225ed96d3a56e1c9.file +++ /dev/null @@ -1 +0,0 @@ -device-added.oga \ No newline at end of file diff --git a/.flatpak-builder/cache/objects/bd/9609b88294b50b0573b6d523efe7654d86598ed8e2251350244e94f076afbe.dirtree b/.flatpak-builder/cache/objects/bd/9609b88294b50b0573b6d523efe7654d86598ed8e2251350244e94f076afbe.dirtree deleted file mode 100644 index aa401cd..0000000 Binary files a/.flatpak-builder/cache/objects/bd/9609b88294b50b0573b6d523efe7654d86598ed8e2251350244e94f076afbe.dirtree and /dev/null differ diff --git a/.flatpak-builder/cache/objects/be/0f5608bbf1bbc642396f92f647bf8db32aaf2e3f75c0a8cb3f6671fca02a50.file b/.flatpak-builder/cache/objects/be/0f5608bbf1bbc642396f92f647bf8db32aaf2e3f75c0a8cb3f6671fca02a50.file deleted file mode 100755 index c625cd2..0000000 Binary files a/.flatpak-builder/cache/objects/be/0f5608bbf1bbc642396f92f647bf8db32aaf2e3f75c0a8cb3f6671fca02a50.file and /dev/null differ diff --git a/.flatpak-builder/cache/objects/be/c9153bd9332f347e80cb06509a28f7f3cd2253e4645c9108f5912955097f15.dirtree b/.flatpak-builder/cache/objects/be/c9153bd9332f347e80cb06509a28f7f3cd2253e4645c9108f5912955097f15.dirtree deleted file mode 100644 index 334491c..0000000 Binary files a/.flatpak-builder/cache/objects/be/c9153bd9332f347e80cb06509a28f7f3cd2253e4645c9108f5912955097f15.dirtree and /dev/null differ diff --git a/.flatpak-builder/cache/objects/c1/29967a1ea82f80276153d424ffb42230f9cb4b088e845b8c210ffa7d081402.dirtree b/.flatpak-builder/cache/objects/c1/29967a1ea82f80276153d424ffb42230f9cb4b088e845b8c210ffa7d081402.dirtree deleted file mode 100644 index 811383d..0000000 Binary files a/.flatpak-builder/cache/objects/c1/29967a1ea82f80276153d424ffb42230f9cb4b088e845b8c210ffa7d081402.dirtree and /dev/null differ diff --git a/.flatpak-builder/cache/objects/c2/351cbaea8009b19b5b674f027c1ba1330539c09b8dbfabde298c0e142e6469.dirtree b/.flatpak-builder/cache/objects/c2/351cbaea8009b19b5b674f027c1ba1330539c09b8dbfabde298c0e142e6469.dirtree deleted file mode 100644 index 4e6d905..0000000 Binary files a/.flatpak-builder/cache/objects/c2/351cbaea8009b19b5b674f027c1ba1330539c09b8dbfabde298c0e142e6469.dirtree and /dev/null differ diff --git a/.flatpak-builder/cache/objects/c6/40b5ea70270fe3b2a110ff9567fe893a59964265e562ca87482cd904cc2c5f.file b/.flatpak-builder/cache/objects/c6/40b5ea70270fe3b2a110ff9567fe893a59964265e562ca87482cd904cc2c5f.file deleted file mode 100755 index b176cf2..0000000 Binary files a/.flatpak-builder/cache/objects/c6/40b5ea70270fe3b2a110ff9567fe893a59964265e562ca87482cd904cc2c5f.file and /dev/null differ diff --git a/.flatpak-builder/cache/objects/c7/96429904e66c8f692e56609e9d66ef321a3858ab650c043c1e89854441b98b.file b/.flatpak-builder/cache/objects/c7/96429904e66c8f692e56609e9d66ef321a3858ab650c043c1e89854441b98b.file deleted file mode 100644 index f78a5a6..0000000 Binary files a/.flatpak-builder/cache/objects/c7/96429904e66c8f692e56609e9d66ef321a3858ab650c043c1e89854441b98b.file and /dev/null differ diff --git a/.flatpak-builder/cache/objects/c9/a009bba47af2561243b84da64930b10e4d2bf31e6375a3e4b29144246f1a02.file b/.flatpak-builder/cache/objects/c9/a009bba47af2561243b84da64930b10e4d2bf31e6375a3e4b29144246f1a02.file deleted file mode 100644 index abfd60c..0000000 Binary files a/.flatpak-builder/cache/objects/c9/a009bba47af2561243b84da64930b10e4d2bf31e6375a3e4b29144246f1a02.file and /dev/null differ diff --git a/.flatpak-builder/cache/objects/ca/d176d868e3657ee982f1ec9d690728f3d0285a086f2e1693b0db29974f4e18.dirtree b/.flatpak-builder/cache/objects/ca/d176d868e3657ee982f1ec9d690728f3d0285a086f2e1693b0db29974f4e18.dirtree deleted file mode 100644 index fddbb84..0000000 Binary files a/.flatpak-builder/cache/objects/ca/d176d868e3657ee982f1ec9d690728f3d0285a086f2e1693b0db29974f4e18.dirtree and /dev/null differ diff --git a/.flatpak-builder/cache/objects/cc/193ce822d2f643b86723aba73e26b603e7aa9e398c48c861f882b345f64dfa.file b/.flatpak-builder/cache/objects/cc/193ce822d2f643b86723aba73e26b603e7aa9e398c48c861f882b345f64dfa.file deleted file mode 100644 index d2e6010..0000000 Binary files a/.flatpak-builder/cache/objects/cc/193ce822d2f643b86723aba73e26b603e7aa9e398c48c861f882b345f64dfa.file and /dev/null differ diff --git a/.flatpak-builder/cache/objects/cd/037ed924d1f16d09007fcd0e3053d3610a448b1cf4232ad9543c6fd1e2925a.dirtree b/.flatpak-builder/cache/objects/cd/037ed924d1f16d09007fcd0e3053d3610a448b1cf4232ad9543c6fd1e2925a.dirtree deleted file mode 100644 index 99bf588..0000000 Binary files a/.flatpak-builder/cache/objects/cd/037ed924d1f16d09007fcd0e3053d3610a448b1cf4232ad9543c6fd1e2925a.dirtree and /dev/null differ diff --git a/.flatpak-builder/cache/objects/cd/2c1196bc1fff5b95b4afbfe19135af26d96e7c5f3b7f1af0fb41f8a7a1f5e7.dirtree b/.flatpak-builder/cache/objects/cd/2c1196bc1fff5b95b4afbfe19135af26d96e7c5f3b7f1af0fb41f8a7a1f5e7.dirtree deleted file mode 100644 index cf132c8..0000000 Binary files a/.flatpak-builder/cache/objects/cd/2c1196bc1fff5b95b4afbfe19135af26d96e7c5f3b7f1af0fb41f8a7a1f5e7.dirtree and /dev/null differ diff --git a/.flatpak-builder/cache/objects/d1/c1bb2b16102d8d0df433fc433ef55c23792d985d56bb2f445496f33781c841.dirtree b/.flatpak-builder/cache/objects/d1/c1bb2b16102d8d0df433fc433ef55c23792d985d56bb2f445496f33781c841.dirtree deleted file mode 100644 index 0856611..0000000 Binary files a/.flatpak-builder/cache/objects/d1/c1bb2b16102d8d0df433fc433ef55c23792d985d56bb2f445496f33781c841.dirtree and /dev/null differ diff --git a/.flatpak-builder/cache/objects/d3/ede2ce870286598a62729f71b36bc7735e48f3adaec51d59cb2b3b78a41971.file b/.flatpak-builder/cache/objects/d3/ede2ce870286598a62729f71b36bc7735e48f3adaec51d59cb2b3b78a41971.file deleted file mode 100644 index 144d2b3..0000000 Binary files a/.flatpak-builder/cache/objects/d3/ede2ce870286598a62729f71b36bc7735e48f3adaec51d59cb2b3b78a41971.file and /dev/null differ diff --git a/.flatpak-builder/cache/objects/d5/e18b3b946b9c6838b972d34b0966497df4b9035e3fdfab9ec95ffd981a9a56.dirtree b/.flatpak-builder/cache/objects/d5/e18b3b946b9c6838b972d34b0966497df4b9035e3fdfab9ec95ffd981a9a56.dirtree deleted file mode 100644 index d9a931f..0000000 Binary files a/.flatpak-builder/cache/objects/d5/e18b3b946b9c6838b972d34b0966497df4b9035e3fdfab9ec95ffd981a9a56.dirtree and /dev/null differ diff --git a/.flatpak-builder/cache/objects/d5/e35efbd0f617e59f66c6d81b6f972cea0a7d05d52aaac04a1b305f1a72223f.file b/.flatpak-builder/cache/objects/d5/e35efbd0f617e59f66c6d81b6f972cea0a7d05d52aaac04a1b305f1a72223f.file deleted file mode 100755 index 5114e84..0000000 --- a/.flatpak-builder/cache/objects/d5/e35efbd0f617e59f66c6d81b6f972cea0a7d05d52aaac04a1b305f1a72223f.file +++ /dev/null @@ -1,41 +0,0 @@ -# libcanberra-pulse.la - a libtool library file -# Generated by libtool (GNU libtool) 2.4.2 -# -# Please DO NOT delete this file! -# It is necessary for linking the library. - -# The name that we can dlopen(3). -dlname='libcanberra-pulse.so' - -# Names of this library. -library_names='libcanberra-pulse.so libcanberra-pulse.so libcanberra-pulse.so' - -# The name of the static archive. -old_library='' - -# Linker flags that can not go in dependency_libs. -inherited_linker_flags=' -pthread' - -# Libraries that this one depends upon. -dependency_libs=' -L/app/lib -lpulse /app/lib/libcanberra.la -lvorbisfile -lltdl -lm' - -# Names of additional weak libraries provided by this library -weak_library_names='' - -# Version information for libcanberra-pulse. -current=0 -age=0 -revision=0 - -# Is this an already installed library? -installed=yes - -# Should we warn about portability when linking against -modules? -shouldnotlink=yes - -# Files to dlopen/dlpreopen -dlopen='' -dlpreopen='' - -# Directory that this library needs to be installed in: -libdir='/app/lib/libcanberra-0.30' diff --git a/.flatpak-builder/cache/objects/d6/0b5af76422d74ea320d3398923803bebd762b19607ae7c8f4ff6367b07c5de.dirtree b/.flatpak-builder/cache/objects/d6/0b5af76422d74ea320d3398923803bebd762b19607ae7c8f4ff6367b07c5de.dirtree deleted file mode 100644 index 7cbba91..0000000 Binary files a/.flatpak-builder/cache/objects/d6/0b5af76422d74ea320d3398923803bebd762b19607ae7c8f4ff6367b07c5de.dirtree and /dev/null differ diff --git a/.flatpak-builder/cache/objects/d6/e77c9260ce40ed874acc6ac0354a01c4e0b27dab2a71084686a5fffea41e48.dirtree b/.flatpak-builder/cache/objects/d6/e77c9260ce40ed874acc6ac0354a01c4e0b27dab2a71084686a5fffea41e48.dirtree deleted file mode 100644 index dc445aa..0000000 Binary files a/.flatpak-builder/cache/objects/d6/e77c9260ce40ed874acc6ac0354a01c4e0b27dab2a71084686a5fffea41e48.dirtree and /dev/null differ diff --git a/.flatpak-builder/cache/objects/d6/f494a05376ca8dca032fdf45e7ded18da5f9689f1592f7625eeae1443b6536.file b/.flatpak-builder/cache/objects/d6/f494a05376ca8dca032fdf45e7ded18da5f9689f1592f7625eeae1443b6536.file deleted file mode 100644 index 45beb81..0000000 --- a/.flatpak-builder/cache/objects/d6/f494a05376ca8dca032fdf45e7ded18da5f9689f1592f7625eeae1443b6536.file +++ /dev/null @@ -1,246 +0,0 @@ -/*-*- Mode: C; c-basic-offset: 8 -*-*/ - -/*** - This file is part of libcanberra. - - Copyright 2008 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 - . -***/ - -#ifdef HAVE_CONFIG_H -#include -#endif - -#include -#include - -#include "canberra.h" -#include "read-vorbis.h" -#include "macro.h" -#include "malloc.h" - -#define FILE_SIZE_MAX ((off_t) (64U*1024U*1024U)) - -struct ca_vorbis { - OggVorbis_File ovf; - off_t size; - ca_channel_position_t channel_map[8]; -}; - -static int convert_error(int or) { - switch (or) { - case OV_ENOSEEK: - case OV_EBADPACKET: - case OV_EBADLINK: - case OV_EFAULT: - case OV_EREAD: - case OV_HOLE: - return CA_ERROR_IO; - - case OV_EIMPL: - case OV_EVERSION: - case OV_ENOTAUDIO: - return CA_ERROR_NOTSUPPORTED; - - case OV_ENOTVORBIS: - case OV_EBADHEADER: - case OV_EOF: - return CA_ERROR_CORRUPT; - - case OV_EINVAL: - return CA_ERROR_INVALID; - - default: - return CA_ERROR_IO; - } -} - -int ca_vorbis_open(ca_vorbis **_v, FILE *f) { - int ret, or; - ca_vorbis *v; - int64_t n; - - ca_return_val_if_fail(_v, CA_ERROR_INVALID); - ca_return_val_if_fail(f, CA_ERROR_INVALID); - - if (!(v = ca_new0(ca_vorbis, 1))) - return CA_ERROR_OOM; - - if ((or = ov_open(f, &v->ovf, NULL, 0)) < 0) { - ret = convert_error(or); - goto fail; - } - - if ((n = ov_pcm_total(&v->ovf, -1)) < 0) { - ret = convert_error(or); - ov_clear(&v->ovf); - goto fail; - } - - if (((off_t) n * (off_t) sizeof(int16_t)) > FILE_SIZE_MAX) { - ret = CA_ERROR_TOOBIG; - ov_clear(&v->ovf); - goto fail; - } - - v->size = (off_t) n * (off_t) sizeof(int16_t) * ca_vorbis_get_nchannels(v); - - *_v = v; - - return CA_SUCCESS; - -fail: - - ca_free(v); - return ret; -} - -void ca_vorbis_close(ca_vorbis *v) { - ca_assert(v); - - ov_clear(&v->ovf); - ca_free(v); -} - -unsigned ca_vorbis_get_nchannels(ca_vorbis *v) { - const vorbis_info *vi; - ca_assert(v); - - ca_assert_se(vi = ov_info(&v->ovf, -1)); - - return (unsigned) vi->channels; -} - -unsigned ca_vorbis_get_rate(ca_vorbis *v) { - const vorbis_info *vi; - ca_assert(v); - - ca_assert_se(vi = ov_info(&v->ovf, -1)); - - return (unsigned) vi->rate; -} - -const ca_channel_position_t* ca_vorbis_get_channel_map(ca_vorbis *v) { - - /* See http://www.xiph.org/vorbis/doc/Vorbis_I_spec.html#x1-800004.3.9 */ - - switch (ca_vorbis_get_nchannels(v)) { - case 8: - v->channel_map[0] = CA_CHANNEL_FRONT_LEFT; - v->channel_map[1] = CA_CHANNEL_FRONT_CENTER; - v->channel_map[2] = CA_CHANNEL_FRONT_RIGHT; - v->channel_map[3] = CA_CHANNEL_SIDE_LEFT; - v->channel_map[4] = CA_CHANNEL_SIDE_RIGHT; - v->channel_map[5] = CA_CHANNEL_REAR_LEFT; - v->channel_map[6] = CA_CHANNEL_REAR_RIGHT; - v->channel_map[7] = CA_CHANNEL_LFE; - return v->channel_map; - - case 7: - v->channel_map[0] = CA_CHANNEL_FRONT_LEFT; - v->channel_map[1] = CA_CHANNEL_FRONT_CENTER; - v->channel_map[2] = CA_CHANNEL_FRONT_RIGHT; - v->channel_map[3] = CA_CHANNEL_SIDE_LEFT; - v->channel_map[4] = CA_CHANNEL_SIDE_RIGHT; - v->channel_map[5] = CA_CHANNEL_REAR_CENTER; - v->channel_map[6] = CA_CHANNEL_LFE; - return v->channel_map; - - case 6: - v->channel_map[5] = CA_CHANNEL_LFE; - /* fall through */ - - case 5: - v->channel_map[3] = CA_CHANNEL_REAR_LEFT; - v->channel_map[4] = CA_CHANNEL_REAR_RIGHT; - /* fall through */ - - case 3: - v->channel_map[0] = CA_CHANNEL_FRONT_LEFT; - v->channel_map[1] = CA_CHANNEL_FRONT_CENTER; - v->channel_map[2] = CA_CHANNEL_FRONT_RIGHT; - return v->channel_map; - - case 4: - v->channel_map[2] = CA_CHANNEL_REAR_LEFT; - v->channel_map[3] = CA_CHANNEL_REAR_RIGHT; - /* fall through */ - - case 2: - v->channel_map[0] = CA_CHANNEL_FRONT_LEFT; - v->channel_map[1] = CA_CHANNEL_FRONT_RIGHT; - return v->channel_map; - - case 1: - v->channel_map[0] = CA_CHANNEL_MONO; - return v->channel_map; - } - - return NULL; -} - -int ca_vorbis_read_s16ne(ca_vorbis *v, int16_t *d, size_t *n){ - long r; - int section; - int length; - size_t n_read = 0; - - ca_return_val_if_fail(v, CA_ERROR_INVALID); - ca_return_val_if_fail(d, CA_ERROR_INVALID); - ca_return_val_if_fail(n, CA_ERROR_INVALID); - ca_return_val_if_fail(*n > 0, CA_ERROR_INVALID); - - length = (int) (*n * sizeof(int16_t)); - - do { - - r = ov_read(&v->ovf, (char*) d, length, -#ifdef WORDS_BIGENDIAN - 1, -#else - 0, -#endif - 2, 1, §ion); - - if (r < 0) - return convert_error((int) r); - - if (r == 0) - break; - - /* We only read the first section */ - if (section != 0) - break; - - length -= (int) r; - d += r/sizeof(int16_t); - n_read += (size_t) r; - - } while (length >= 4096); - - ca_assert(v->size >= (off_t) n_read); - v->size -= (off_t) n_read; - - *n = n_read/sizeof(int16_t); - - return CA_SUCCESS; -} - -off_t ca_vorbis_get_size(ca_vorbis *v) { - ca_return_val_if_fail(v, (off_t) -1); - - return v->size; -} diff --git a/.flatpak-builder/cache/objects/d7/dccf41660330dc466e4e5c6d559bf6811bf4f753c489ebcf5127bc81c64647.dirtree b/.flatpak-builder/cache/objects/d7/dccf41660330dc466e4e5c6d559bf6811bf4f753c489ebcf5127bc81c64647.dirtree deleted file mode 100644 index 5cd0657..0000000 Binary files a/.flatpak-builder/cache/objects/d7/dccf41660330dc466e4e5c6d559bf6811bf4f753c489ebcf5127bc81c64647.dirtree and /dev/null differ diff --git a/.flatpak-builder/cache/objects/da/4d8a50c186c18ecef7bd4cd6bf8e87ec41311079aa51c91c755a1dba1483fb.file b/.flatpak-builder/cache/objects/da/4d8a50c186c18ecef7bd4cd6bf8e87ec41311079aa51c91c755a1dba1483fb.file deleted file mode 100755 index 7ff2952..0000000 Binary files a/.flatpak-builder/cache/objects/da/4d8a50c186c18ecef7bd4cd6bf8e87ec41311079aa51c91c755a1dba1483fb.file and /dev/null differ diff --git a/.flatpak-builder/cache/objects/da/637fdd0a83edd87b87f94b9cce7198f62779409ef4807f585e7433c595342d.dirtree b/.flatpak-builder/cache/objects/da/637fdd0a83edd87b87f94b9cce7198f62779409ef4807f585e7433c595342d.dirtree deleted file mode 100644 index 0fdfef2..0000000 Binary files a/.flatpak-builder/cache/objects/da/637fdd0a83edd87b87f94b9cce7198f62779409ef4807f585e7433c595342d.dirtree and /dev/null differ diff --git a/.flatpak-builder/cache/objects/db/5141824565896050ab20c4f0e7bf095bf2b39bb9a4c6b61099669f9f3df6b9.file b/.flatpak-builder/cache/objects/db/5141824565896050ab20c4f0e7bf095bf2b39bb9a4c6b61099669f9f3df6b9.file deleted file mode 100755 index e7055ad..0000000 Binary files a/.flatpak-builder/cache/objects/db/5141824565896050ab20c4f0e7bf095bf2b39bb9a4c6b61099669f9f3df6b9.file and /dev/null differ diff --git a/.flatpak-builder/cache/objects/dc/2a611baef2b3bba8092b71259f0c2ce39fa06959abf90a21e7b66a7673b3fd.file b/.flatpak-builder/cache/objects/dc/2a611baef2b3bba8092b71259f0c2ce39fa06959abf90a21e7b66a7673b3fd.file deleted file mode 100644 index 734cae7..0000000 Binary files a/.flatpak-builder/cache/objects/dc/2a611baef2b3bba8092b71259f0c2ce39fa06959abf90a21e7b66a7673b3fd.file and /dev/null differ diff --git a/.flatpak-builder/cache/objects/dc/67748a1d4036fae25fe87ccc70185606dcb7da66da1a8ddc8419429deb744b.file b/.flatpak-builder/cache/objects/dc/67748a1d4036fae25fe87ccc70185606dcb7da66da1a8ddc8419429deb744b.file deleted file mode 100644 index 21128f9..0000000 --- a/.flatpak-builder/cache/objects/dc/67748a1d4036fae25fe87ccc70185606dcb7da66da1a8ddc8419429deb744b.file +++ /dev/null @@ -1,82 +0,0 @@ -.TH INTLTOOL-PREPARE 8 "2003-08-02" "intltool" - -.SH NAME -intltool-prepare \- Prepare software to make use of intltool - -.SH SYNOPSIS -.B intltool-prepare -[\fIoption\fR] [\fI\s-1KEYWORD\s0\fR]... - - -.SH DESCRIPTION -.PP -For software packages that include some specific type of translatable -files (such as .desktop and .soundlist), before they make use of -\fBintltool\fR, translators have to dig through them one by one, and add -their localization into each file. This process is error prone, since -translators may include typing errors, or add their localization in wrong -encoding. Besides, translators may not alwas know other files (beside .po -files) are translatable. -.PP -.I intltool -avoids all the problems above by extracting strings inside those translatable -files into po template (.pot) file. All translators need to care about is -just translating po files. Afterwards, \fBintltool-merge\fR(8) will merge -localized strings into those files. -.PP -Before your software becomes intltool-aware, a few issues have to be sorted -out, and \fBintltool-prepare\fR tries to take care of all of them. -\fBintltool-prepare\fR will: -.IP \[bu] 2 -Extract all localized strings in .desktop style files (including ".desktop", -".soundlist", ".keys" and ".directory") into corresponding po files. -.IP \[bu] -Convert the translatable files into templates that don't contain any -localization. -.IP \[bu] -Add the list of template files above into \fBPOTFILES.in\fR. -.IP \[bu] -Add the list of old translatable files into \fB.cvsignore\fR (since they -will be generated by \fIintltool\fR later). -.IP \[bu] -Add the rules for generating these files into Makefile.am. -.PP -NOTE: You must change working directory to the top level source directory -before running \fBintltool-prepare\fR. - -.SH OPTIONS -.PP -\fIKEYWORD\fR is a list of additional keywords beside "Name", "Comment" and -"description". \fBintltool-prepare\fR will recognize any line starting with -those \fIKEYWORD\fR and extract localized strings after equal sign ("="). -.IP "\fB\-x\fR" 4 -.PD 0 -.IP "\fB\-\-verbose\fR" 4 -.PD -Be verbose to give user additional feedback. -.IP "\fB\-v\fR" 4 -.PD 0 -.IP "\fB\-\-version\fR" 4 -Show version information. -.IP "\fB\-h\fR" 4 -.PD 0 -.IP "\fB\-\-help\fR" 4 -Show usage and basic help information. - - -.SH REPORTING BUGS -Report bugs to http://bugs.launchpad.net/intltool - -.SH AUTHOR -Darin Adler -.br -Kenneth Christiansen -.br -Maciej Stachowiak - - -.SH SEE ALSO -.BR intltoolize (8), -.BR intltool-update (8), -.BR intltool-extract (8), -.BR intltool-merge (8) diff --git a/.flatpak-builder/cache/objects/df/131a07185c08203c923a2d31986d14c35c6257c65c9ed609bd4b3bd5cbf078.dirtree b/.flatpak-builder/cache/objects/df/131a07185c08203c923a2d31986d14c35c6257c65c9ed609bd4b3bd5cbf078.dirtree deleted file mode 100644 index d7d0444..0000000 Binary files a/.flatpak-builder/cache/objects/df/131a07185c08203c923a2d31986d14c35c6257c65c9ed609bd4b3bd5cbf078.dirtree and /dev/null differ diff --git a/.flatpak-builder/cache/objects/e4/2f419f6bdc8cc6d341926432efcbbd948468f670c8e163d583b47e48ebd649.dirtree b/.flatpak-builder/cache/objects/e4/2f419f6bdc8cc6d341926432efcbbd948468f670c8e163d583b47e48ebd649.dirtree deleted file mode 100644 index 1939b56..0000000 Binary files a/.flatpak-builder/cache/objects/e4/2f419f6bdc8cc6d341926432efcbbd948468f670c8e163d583b47e48ebd649.dirtree and /dev/null differ diff --git a/.flatpak-builder/cache/objects/e4/da831467b42feb93cafe5e1b649deb612805e38da9765f08c039722c219f4a.dirtree b/.flatpak-builder/cache/objects/e4/da831467b42feb93cafe5e1b649deb612805e38da9765f08c039722c219f4a.dirtree deleted file mode 100644 index 00c4c48..0000000 Binary files a/.flatpak-builder/cache/objects/e4/da831467b42feb93cafe5e1b649deb612805e38da9765f08c039722c219f4a.dirtree and /dev/null differ diff --git a/.flatpak-builder/cache/objects/e5/f72d7fc07aa88b875f8e722a619fb80935c839bd974208a8679dcf8f01a808.dirtree b/.flatpak-builder/cache/objects/e5/f72d7fc07aa88b875f8e722a619fb80935c839bd974208a8679dcf8f01a808.dirtree deleted file mode 100644 index febdb4a..0000000 Binary files a/.flatpak-builder/cache/objects/e5/f72d7fc07aa88b875f8e722a619fb80935c839bd974208a8679dcf8f01a808.dirtree and /dev/null differ diff --git a/.flatpak-builder/cache/objects/e8/592f4be5d063f3e5e6aa5adba8eadd5066cd9f59e463a2c58c773912a2086f.file b/.flatpak-builder/cache/objects/e8/592f4be5d063f3e5e6aa5adba8eadd5066cd9f59e463a2c58c773912a2086f.file deleted file mode 100755 index c8d7f14..0000000 Binary files a/.flatpak-builder/cache/objects/e8/592f4be5d063f3e5e6aa5adba8eadd5066cd9f59e463a2c58c773912a2086f.file and /dev/null differ diff --git a/.flatpak-builder/cache/objects/e9/3e8b4743a90076409fee6422d8da6e3316125abe13bf0c5efa739b53e00e94.file b/.flatpak-builder/cache/objects/e9/3e8b4743a90076409fee6422d8da6e3316125abe13bf0c5efa739b53e00e94.file deleted file mode 100644 index 54500dc..0000000 --- a/.flatpak-builder/cache/objects/e9/3e8b4743a90076409fee6422d8da6e3316125abe13bf0c5efa739b53e00e94.file +++ /dev/null @@ -1,380 +0,0 @@ -/*-*- Mode: C; c-basic-offset: 8 -*-*/ - -/*** - This file is part of libcanberra. - - Copyright 2008 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 - . -***/ - -#ifdef HAVE_CONFIG_H -#include -#endif - -#include -#include -#include - -#include "driver.h" -#include "common.h" -#include "malloc.h" -#include "driver-order.h" - -struct private_dso { - lt_dlhandle module; - ca_bool_t ltdl_initialized; - - int (*driver_open)(ca_context *c); - int (*driver_destroy)(ca_context *c); - int (*driver_change_device)(ca_context *c, const char *device); - int (*driver_change_props)(ca_context *c, ca_proplist *changed, ca_proplist *merged); - int (*driver_play)(ca_context *c, uint32_t id, ca_proplist *p, ca_finish_callback_t cb, void *userdata); - int (*driver_cancel)(ca_context *c, uint32_t id); - int (*driver_cache)(ca_context *c, ca_proplist *p); - int (*driver_playing)(ca_context *c, uint32_t id, int *playing); -}; - -#define PRIVATE_DSO(c) ((struct private_dso *) ((c)->private_dso)) - -static int ca_error_from_lt_error(int code) { - - static const int table[] = { - [LT_ERROR_UNKNOWN] = CA_ERROR_INTERNAL, - [LT_ERROR_DLOPEN_NOT_SUPPORTED] = CA_ERROR_NOTSUPPORTED, - [LT_ERROR_INVALID_LOADER] = CA_ERROR_INTERNAL, - [LT_ERROR_INIT_LOADER] = CA_ERROR_INTERNAL, - [LT_ERROR_REMOVE_LOADER] = CA_ERROR_INTERNAL, - [LT_ERROR_FILE_NOT_FOUND] = CA_ERROR_NOTFOUND, - [LT_ERROR_DEPLIB_NOT_FOUND] = CA_ERROR_NOTFOUND, - [LT_ERROR_NO_SYMBOLS] = CA_ERROR_NOTFOUND, - [LT_ERROR_CANNOT_OPEN] = CA_ERROR_ACCESS, - [LT_ERROR_CANNOT_CLOSE] = CA_ERROR_INTERNAL, - [LT_ERROR_SYMBOL_NOT_FOUND] = CA_ERROR_NOTFOUND, - [LT_ERROR_NO_MEMORY] = CA_ERROR_OOM, - [LT_ERROR_INVALID_HANDLE] = CA_ERROR_INVALID, - [LT_ERROR_BUFFER_OVERFLOW] = CA_ERROR_TOOBIG, - [LT_ERROR_INVALID_ERRORCODE] = CA_ERROR_INVALID, - [LT_ERROR_SHUTDOWN] = CA_ERROR_INTERNAL, - [LT_ERROR_CLOSE_RESIDENT_MODULE] = CA_ERROR_INTERNAL, - [LT_ERROR_INVALID_MUTEX_ARGS] = CA_ERROR_INTERNAL, - [LT_ERROR_INVALID_POSITION] = CA_ERROR_INTERNAL -#ifdef LT_ERROR_CONFLICTING_FLAGS - , [LT_ERROR_CONFLICTING_FLAGS] = CA_ERROR_INTERNAL -#endif - }; - - if (code < 0 || code >= (int) CA_ELEMENTSOF(table)) - return CA_ERROR_INTERNAL; - - return table[code]; -} - -static int lt_error_from_string(const char *t) { - - struct lt_error_code { - int code; - const char *text; - }; - - static const struct lt_error_code lt_error_codes[] = { - /* This is so disgustingly ugly, it makes me vomit. But that's - * all ltdl's fault. */ -#define LT_ERROR(u, s) { .code = LT_ERROR_ ## u, .text = s }, - lt_dlerror_table -#undef LT_ERROR - - { .code = 0, .text = NULL } - }; - - const struct lt_error_code *c; - - for (c = lt_error_codes; c->text; c++) - if (ca_streq(t, c->text)) - return c->code; - - return -1; -} - -static int ca_error_from_string(const char *t) { - int err; - - if ((err = lt_error_from_string(t)) < 0) - return CA_ERROR_INTERNAL; - - return ca_error_from_lt_error(err); -} - -static int try_open(ca_context *c, const char *t) { - char *mn; - struct private_dso *p; - - p = PRIVATE_DSO(c); - - if (!(mn = ca_sprintf_malloc(CA_PLUGIN_PATH "/libcanberra-%s", t))) - return CA_ERROR_OOM; - - errno = 0; - p->module = lt_dlopenext(mn); - ca_free(mn); - - if (!p->module) { - int ret; - - if (errno == ENOENT) - ret = CA_ERROR_NOTFOUND; - else - ret = ca_error_from_string(lt_dlerror()); - - if (ret == CA_ERROR_NOTFOUND) - ret = CA_ERROR_NODRIVER; - - return ret; - } - - return CA_SUCCESS; -} - -static void* real_dlsym(lt_module m, const char *name, const char *symbol) { - char sn[256]; - char *s; - void *r; - - ca_return_null_if_fail(m); - ca_return_null_if_fail(name); - ca_return_null_if_fail(symbol); - - snprintf(sn, sizeof(sn), "%s_%s", name, symbol); - sn[sizeof(sn)-1] = 0; - - for (s = sn; *s; s++) { - if (*s >= 'a' && *s <= 'z') - continue; - if (*s >= 'A' && *s <= 'Z') - continue; - if (*s >= '0' && *s <= '9') - continue; - - *s = '_'; - } - - if ((r = lt_dlsym(m, sn))) - return r; - - return lt_dlsym(m, symbol); -} - -#define MAKE_FUNC_PTR(ret, args, x) ((ret (*) args ) (size_t) (x)) -#define GET_FUNC_PTR(module, name, symbol, ret, args) MAKE_FUNC_PTR(ret, args, real_dlsym((module), (name), (symbol))) - -int driver_open(ca_context *c) { - int ret; - struct private_dso *p; - char *driver; - - ca_return_val_if_fail(c, CA_ERROR_INVALID); - ca_return_val_if_fail(!PRIVATE_DSO(c), CA_ERROR_STATE); - - if (!(c->private_dso = p = ca_new0(struct private_dso, 1))) - return CA_ERROR_OOM; - - if (lt_dlinit() != 0) { - ret = ca_error_from_string(lt_dlerror()); - driver_destroy(c); - return ret; - } - - p->ltdl_initialized = TRUE; - - if (c->driver) { - char *e; - size_t n; - - if (!(e = ca_strdup(c->driver))) { - driver_destroy(c); - return CA_ERROR_OOM; - } - - n = strcspn(e, ",:"); - e[n] = 0; - - if (n == 0) { - driver_destroy(c); - ca_free(e); - return CA_ERROR_INVALID; - } - - if ((ret = try_open(c, e)) < 0) { - driver_destroy(c); - ca_free(e); - return ret; - } - - driver = e; - - } else { - const char *const * e; - - for (e = ca_driver_order; *e; e++) { - - if ((ret = try_open(c, *e)) == CA_SUCCESS) - break; - - if (ret != CA_ERROR_NODRIVER && - ret != CA_ERROR_NOTAVAILABLE && - ret != CA_ERROR_NOTFOUND) { - - driver_destroy(c); - return ret; - } - } - - if (!*e) { - driver_destroy(c); - return CA_ERROR_NODRIVER; - } - - if (!(driver = ca_strdup(*e))) { - driver_destroy(c); - return CA_ERROR_OOM; - } - } - - ca_assert(p->module); - - if (!(p->driver_open = GET_FUNC_PTR(p->module, driver, "driver_open", int, (ca_context*))) || - !(p->driver_destroy = GET_FUNC_PTR(p->module, driver, "driver_destroy", int, (ca_context*))) || - !(p->driver_change_device = GET_FUNC_PTR(p->module, driver, "driver_change_device", int, (ca_context*, const char *))) || - !(p->driver_change_props = GET_FUNC_PTR(p->module, driver, "driver_change_props", int, (ca_context *, ca_proplist *, ca_proplist *))) || - !(p->driver_play = GET_FUNC_PTR(p->module, driver, "driver_play", int, (ca_context*, uint32_t, ca_proplist *, ca_finish_callback_t, void *))) || - !(p->driver_cancel = GET_FUNC_PTR(p->module, driver, "driver_cancel", int, (ca_context*, uint32_t))) || - !(p->driver_cache = GET_FUNC_PTR(p->module, driver, "driver_cache", int, (ca_context*, ca_proplist *))) || - !(p->driver_playing = GET_FUNC_PTR(p->module, driver, "driver_playing", int, (ca_context*, uint32_t, int*)))) { - - ca_free(driver); - driver_destroy(c); - return CA_ERROR_CORRUPT; - } - - ca_free(driver); - - if ((ret = p->driver_open(c)) < 0) { - p->driver_destroy = NULL; - driver_destroy(c); - return ret; - } - - return CA_SUCCESS; -} - -int driver_destroy(ca_context *c) { - struct private_dso *p; - int ret = CA_SUCCESS; - - ca_return_val_if_fail(c, CA_ERROR_INVALID); - ca_return_val_if_fail(c->private_dso, CA_ERROR_STATE); - - p = PRIVATE_DSO(c); - - if (p->driver_destroy) - ret = p->driver_destroy(c); - - if (p->module) - lt_dlclose(p->module); - - if (p->ltdl_initialized) { - lt_dlexit(); - p->ltdl_initialized = FALSE; - } - - ca_free(p); - - c->private_dso = NULL; - - return ret; -} - -int driver_change_device(ca_context *c, const char *device) { - struct private_dso *p; - - ca_return_val_if_fail(c, CA_ERROR_INVALID); - ca_return_val_if_fail(c->private_dso, CA_ERROR_STATE); - - p = PRIVATE_DSO(c); - ca_return_val_if_fail(p->driver_change_device, CA_ERROR_STATE); - - return p->driver_change_device(c, device); -} - -int driver_change_props(ca_context *c, ca_proplist *changed, ca_proplist *merged) { - struct private_dso *p; - - ca_return_val_if_fail(c, CA_ERROR_INVALID); - ca_return_val_if_fail(c->private_dso, CA_ERROR_STATE); - - p = PRIVATE_DSO(c); - ca_return_val_if_fail(p->driver_change_props, CA_ERROR_STATE); - - return p->driver_change_props(c, changed, merged); -} - -int driver_play(ca_context *c, uint32_t id, ca_proplist *pl, ca_finish_callback_t cb, void *userdata) { - struct private_dso *p; - - ca_return_val_if_fail(c, CA_ERROR_INVALID); - ca_return_val_if_fail(c->private_dso, CA_ERROR_STATE); - - p = PRIVATE_DSO(c); - ca_return_val_if_fail(p->driver_play, CA_ERROR_STATE); - - return p->driver_play(c, id, pl, cb, userdata); -} - -int driver_cancel(ca_context *c, uint32_t id) { - struct private_dso *p; - - ca_return_val_if_fail(c, CA_ERROR_INVALID); - ca_return_val_if_fail(c->private_dso, CA_ERROR_STATE); - - p = PRIVATE_DSO(c); - ca_return_val_if_fail(p->driver_cancel, CA_ERROR_STATE); - - return p->driver_cancel(c, id); -} - -int driver_cache(ca_context *c, ca_proplist *pl) { - struct private_dso *p; - - ca_return_val_if_fail(c, CA_ERROR_INVALID); - ca_return_val_if_fail(c->private_dso, CA_ERROR_STATE); - - p = PRIVATE_DSO(c); - ca_return_val_if_fail(p->driver_cache, CA_ERROR_STATE); - - return p->driver_cache(c, pl); -} - -int driver_playing(ca_context *c, uint32_t id, int *playing) { - struct private_dso *p; - - ca_return_val_if_fail(c, CA_ERROR_INVALID); - ca_return_val_if_fail(c->private_dso, CA_ERROR_STATE); - ca_return_val_if_fail(playing, CA_ERROR_INVALID); - - p = PRIVATE_DSO(c); - ca_return_val_if_fail(p->driver_playing, CA_ERROR_STATE); - - return p->driver_playing(c, id, playing); -} diff --git a/.flatpak-builder/cache/objects/e9/9129c09d27830f5b17b72e5fca422ebe7613c397f46372f9516a846f040824.file b/.flatpak-builder/cache/objects/e9/9129c09d27830f5b17b72e5fca422ebe7613c397f46372f9516a846f040824.file deleted file mode 100644 index b51a467..0000000 Binary files a/.flatpak-builder/cache/objects/e9/9129c09d27830f5b17b72e5fca422ebe7613c397f46372f9516a846f040824.file and /dev/null differ diff --git a/.flatpak-builder/cache/objects/e9/ca10fec05b11a19cd9f2da6a045b117701e83be98c8cb1e9456c7818adf0b4.file b/.flatpak-builder/cache/objects/e9/ca10fec05b11a19cd9f2da6a045b117701e83be98c8cb1e9456c7818adf0b4.file deleted file mode 100644 index 6acf159..0000000 --- a/.flatpak-builder/cache/objects/e9/ca10fec05b11a19cd9f2da6a045b117701e83be98c8cb1e9456c7818adf0b4.file +++ /dev/null @@ -1,28 +0,0 @@ -/*-*- Mode: C; c-basic-offset: 8 -*-*/ - -#ifndef foocanberraforkdetecth -#define foocanberraforkdetecth - -/*** - 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 - . -***/ - -int ca_detect_fork(void); - -#endif diff --git a/.flatpak-builder/cache/objects/ec/0ef2f96c48dca5a773467aff15908fb0e4a2ef2d385e68f3956cdff6a27411.dirtree b/.flatpak-builder/cache/objects/ec/0ef2f96c48dca5a773467aff15908fb0e4a2ef2d385e68f3956cdff6a27411.dirtree deleted file mode 100644 index 826165e..0000000 Binary files a/.flatpak-builder/cache/objects/ec/0ef2f96c48dca5a773467aff15908fb0e4a2ef2d385e68f3956cdff6a27411.dirtree and /dev/null differ diff --git a/.flatpak-builder/cache/objects/ec/476285f4737766dad480c782fc292a86ef4ae4afee87cc0a1f129214236b35.file b/.flatpak-builder/cache/objects/ec/476285f4737766dad480c782fc292a86ef4ae4afee87cc0a1f129214236b35.file deleted file mode 100644 index 9ee2c11..0000000 --- a/.flatpak-builder/cache/objects/ec/476285f4737766dad480c782fc292a86ef4ae4afee87cc0a1f129214236b35.file +++ /dev/null @@ -1,1278 +0,0 @@ - - - - - - - - - Binary icon data in PNG format for the application this sound event -is triggered by. - - - - - An icon name for the application this sound event is triggered by, -as defined in the XDG icon naming specification. - - - - - An identifier for the program this sound event was triggered -by. (e.g. "org.gnu.emacs"). - -> This attribute will automatically be added to the #GSoundContext with -> the #GApplication:application-id if you are using #GApplication, so you -> normally do not need to supply this yourself. - - - - - The locale string the application that is triggering this sound -event is running in. A POSIX locale string such as de_DE@euro. - - - - - The name of the application this sound event was triggered by as -human readable string. (e.g. "GNU Emacs") Localized if possible and -applicable. - -> This attribute will automatically be added to the #GSoundContext if -> it has previously been set with g_set_application_name(), so you normally -> do not need to supply this yourself. - - - - - The path to the process binary of the process that is triggering this sound event. - - - - - The host name of the host the process that is triggering this sound event runs on. - - - - - The unix PID of the process that is triggering this sound event, formatted as string. - - - - - The user that owns the process that is triggering this sound event. - - - - - A version number for the program this sound event was triggered -by. (e.g. "22.2") - - - - - A special attribute that can be used to control the automatic sound -caching of sounds in the sound server. One of "permanent", -"volatile", "never". "permanent" will cause this sample to be -cached in the server permanently. This is useful for very -frequently used sound events such as those used for input -feedback. "volatile" may be used for cacheing sounds in the sound -server temporarily. They will expire after some time or on cache -pressure. Finally, "never" may be used for sounds that should never -be cached, because they are only generated very seldomly or even -only once at most (such as desktop login sounds). - -If this attribute is not explicitly passed to gsound_context_play_simple() -or gsound_context_play_full() it will default to "never". If it is not -explicitly passed to gsound_context_cache() it will default to "permanent". - -If the list of attributes is handed on to the sound server this -attribute is stripped from it. - - - - - A special attribute that can be used to control whether any sounds -are played at all. If this attribute is "1" or unset sounds are -played as normal. However, if it is "0" all calls to -gsound_context_play_simple() or `play_full()` will fail with -GSOUND_ERROR_DISABLED. - -If the list of attributes is handed on to the sound server this -attribute is stripped from it. - - - - - A special attribute that can be used to control on which channel a -sound is played. The value should be one of mono, front-left, -front-right, front-center, rear-left, rear-right, rear-center, lfe, -front-left-of-center, front-right-of-center, side-left, side-right, -top-center, top-front-left, top-front-right, top-front-center, -top-rear-left, top-rear-right, top-rear-center. This attribute is -only honoured by some backends, other backends may choose to ignore -it completely. - -If the list of attributes is handed on to the sound server this -attribute is stripped from it. - - - - - A special attribute that can be used to control the volume this -sound event is played in if the backend supports it. A floating -point value for the decibel multiplier for the sound. 0 dB relates -to zero gain, and is the default volume these sounds are played in. - -If the list of attributes is handed on to the sound server this -attribute is stripped from it. - - - - - A special attribute that can be used to control the XDG sound theme that -is used for this sample. - -If the list of attributes is handed on to the sound server this -attribute is stripped from it. - - - - - A special attribute that can be used to control the XDG sound theme -output profile that is used for this sample. - -If the list of attributes is handed on to the sound server this -attribute is stripped from it. - - - - - A descriptive string for the sound event. Localized if possible and applicable. - - - - - A textual id for an event sound, as mandated by the XDG sound naming specification. - - - - - If this sound event was triggered by a mouse input event, the -number of the mouse button that triggered it, formatted as string. 1 -for left mouse button, 3 for right, 2 for middle. - - - - - If this sound event was triggered by a mouse input event, the X -position of the mouse cursor as fractional value between 0 and 1, -formatted as string, 0 reflecting the left side of the screen, 1 -the right side. - - - - - If this sound event was triggered by a mouse input event, the Y -position of the mouse cursor as fractional value between 0 and 1, -formatted as string, 0 reflecting the top end of the screen, 1 -the bottom end. - - - - - If this sound event was triggered by a mouse input event, the X -position of the mouse cursor on the screen, formatted as string. - - - - - If this sound event was triggered by a mouse input event, the Y -position of the mouse cursor on the screen, formatted as string. - - - - - The artist of this media. Localized if possible and applicable. - - - - - The file name this media was or can be loaded from. - - - - - An icon for this media in binary PNG format. - - - - - An icon name as defined in the XDG icon naming specifcation. - - - - - The language this media is in, in some standard POSIX locale string, such as "de_DE". - - - - - A name describing the media being played. Localized if possible and applicable. - - - - - The "role" this media is played in. For event sounds the string -"event". For other cases strings like "music", "video", "game", ... - - - - - A (song) title describing the media being played. Localized if possible and applicable. - - - - - If this sound event was triggered by a window on the screen and the -windowing system supports multiple desktops, a comma seperated list -of indexes of the desktops this window is visible on. If this -attribute is an empty string, it is visible on all desktops -(i.e. 'sticky'). The first desktop is 0. (e.g. "0,2,3") - - - - - If this sound event was triggered by a window on the screen, the -pixel height of the window. - - - - - If this sound event was triggered by a window on the screen, the X -position of the center of the window as fractional value between 0 -and 1, formatted as string, 0 reflecting the left side of the -screen, 1 the right side. - - - - - If this sound event was triggered by a window on the screen, binary -icon data in PNG format for this window. - - - - - If this sound event was triggered by a window on the screen, an -icon name for this window, as defined in the XDG icon naming -specification. - - - - - If this sound event was triggered by a window on the screen, some -identification string for this window, so that the sound system can -recognize specific windows. - - - - - If this sound event was triggered by a window on the screen, the -name of this window as human readable string. - - - - - If this sound event was triggered by a window on the screen, the Y -position of the center of the window as fractional value between 0 -and 1, formatted as string, 0 reflecting the top side of the -screen, 1 the bottom side. - - - - - If this sound event was triggered by a window on the screen, the -pixel width of the window. - - - - - If this sound event was triggered by a window on the screen, the X -position of the window measured from the top left corner of the -screen to the top left corner of the window. - - - - - If this sound event was triggered by a window on the screen and the -windowing system is X11, the X display name of the window (e.g. ":0"). - - - - - If this sound event was triggered by a window on the screen and the -windowing system is X11, the X monitor id of the window formatted as -string (e.g. "0"). - - - - - If this sound event was triggered by a window on the screen and the -windowing system is X11, the X screen id of the window formatted as -string (e.g. "0"). - - - - - If this sound event was triggered by a window on the screen and the -windowing system is X11, the XID of the window formatted as string. - - - - - If this sound event was triggered by a window on the screen, the y -position of the window measured from the top left corner of the -screen to the top left corner of the window. - - - - - - - - - - - - - - - - - - - - - - - - - - ca: the wrapped context -Wrapper for ca_context. - - - - Creates and initializes a new #GSoundContext. If the an error occured -during initialization, #NULL is returned and @error will be set -appropriately. - - - A new #GSoundContext - - - - - A #GCancellable, or %NULL - - - - - - Requests that a sound be cached on the server. See [#caching][gsound-GSound-Context#caching]. - - - %TRUE on success - - - - - A #GSoundContext - - - - Return location for error - - - - A %NULL-terminated list of attribute-value pairs - - - - - - Requests that a sound be cached on the server. See [#caching][gsound-GSound-Context#caching]. - -This function is intented to be used by language bindings. - - - - - - - A #GSoundContext - - - - Hash table of attrerties - - - - - - - - - Attempts to open a connection to the backend sound driver. It is recommended -that you set context attributes with gsound_context_set_attributes() before -calling this function. - -> A connection is automatically opened before playing or caching sounds, -> so you rarely need to call this yourself. - - - %TRUE if the output device was opened successfully, or %FALSE - (populating @error) - - - - - A #GSoundContext - - - - - - Asynchronously request a sound to be played. When playback is finished -(or if an error occurs) then @callback will be called, following the -normal GIO async pattern. - -If playback is cancelled via @cancellable, then @callback will be called -with #G_IO_ERROR_CANCELLED. - -If you do not need notification of when playback is complete, you should -use gsound_context_play_simple(). - - - - - - - A #GSoundContext - - - - A #GCancellable, or %NULL - - - - callback - - - - User data passed to @callback - - - - A %NULL-terminated list of attribute-value pairs - - - - - - Finish an async operation started by gsound_context_play_full(). You -must call this function in the callback to free memory and receive any -errors which occurred. - - - %TRUE if playing finished successfully - - - - - A #GSoundContext - - - - Result object passed to the callback of - gsound_context_play_full() - - - - - - Asynchronously request a sound to be played. When playback is finished -(or if an error occurs) then @callback will be called, following the -normal GIO async pattern. - -If playback is cancelled via @cancellable, then @callback will be called -with #G_IO_ERROR_CANCELLED. - -If you do not need notification of when playback is complete, you should -use gsound_context_play_simple(). - -This function is intented to be used by language bindings. - - - - - - - A #GSoundContext - - - - Attributes - - - - - - - A #GCancellable, or %NULL - - - - callback - - - - user_data - - - - - - The basic "fire-and-forget" play command. This function will not block, and -just sends a request to the sound server before immediately returning. - -If you need to know when a sound finishes playing then you should call -gsound_context_play_full() instead. - -You can cancel playback at any time by calling g_cancellable_cancel() on -@cancellable, if supplied. - - - %TRUE on success, or %FALSE, populating @error - - - - - A #GSoundContext - - - - A #GCancellable, or %NULL - - - - Return location for error, or %NULL - - - - A %NULL-terminated list of attribute-value pairs - - - - - - The basic "fire-and-forget" play command. This function will not block, and -just sends a request to the sound server before immediately returning. - -If you need to know when a sound finishes playing then you should call -gsound_context_play_full() instead. - -You can cancel playback at any time by calling g_cancellable_cancel() on -@cancellable, if supplied. - -This function is intented to be used by language bindings. - - - %TRUE on success, %FALSE on error - - - - - A #GSoundContext - - - - Attributes - - - - - - - A #GCancellable - - - - - - Set attributes or change attributes on @context. Subsequent calls to this -function calling the same attributes will override the earlier values. - -Note that GSound will set the #GSOUND_ATTR_APPLICATION_NAME and -#GSOUND_ATTR_APPLICATION_ID for you if using #GApplication, so you do -not normally need to set these yourself. - - - %TRUE if attributes were updated successfully - - - - - A #GSoundContext - - - - Return location for error - - - - %NULL terminated list of attribute name-value pairs - - - - - - Set attributes or change attributes on @context. Subsequent calls to this -function calling the same attributes will override the earlier values. - -Note that GSound will set the #GSOUND_ATTR_APPLICATION_NAME and -#GSOUND_ATTR_APPLICATION_ID for you if using #GApplication, so you do -not normally need to set these yourself. - -This function is intented to be used by language bindings. - - - %TRUE if attributes were updated successfully - - - - - A #GSoundContext - - - - Hash table of attributes to set - - - - - - - - - Sets the libcanberra driver to @driver, for example "pulse", "alsa" or "null". -You normally do not need to set this yourself. - -Note that this function may return %TRUE even if the specified driver is -not available: see the libcanberra documentation for details. - - - %TRUE if the libcanberra driver was set successfully - - - - - A #GSoundContext - - - - libcanberra driver to use - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Attributes which can be applied to a #GSoundContext or passed to one of -the `play()` or `cache()` methods. - - - A #GSoundContext is used for playing system sounds. The typical use pattern -is: - -* Initialize the #GSoundContext -* [Optional] Set any global attributes using gsound_context_set_attributes() -* [Optional] Cache any frequently-used sounds (for example, sound - effects for a game) using gsound_context_cache() -* Play sounds using gsound_context_play_simple() or gsound_context_play_full() -* Close the connection to the sound server and clean up the context using - g_object_unref() - -#GSoundContext implements the #GInitable interface, so if created with -g_object_new() (as typically happens with language bindings) then you must -call the g_initable_init() method before attempting to use it. - -# Simple Examples - -In C: - -|[<!-- language="C" --> -GSoundContext *ctx = NULL; -GCancellable *cancellable = g_cancellable_new(); -GError *error = NULL; - -ctx = gsound_context_new(cancellable, &error); -if (error) { - // handle error -} - -gsound_context_play_simple(ctx, cancellable, &error, - GSOUND_ATTR_EVENT_ID, "phone-incoming-call", - // other attributes... - NULL); -]| - -or, using Python via GObject Introspection: - -|[<!-- language="Python" --> -from gi.repository import GSound - -ctx = GSound.Context() - -try: - ctx.init(); - ctx.play_simple({ GSound.ATTR_EVENT_ID : "phone-incoming-call" }) -except: - # Handle error - pass -]| - -or using Vala: - -|[<!-- language="Vala" --> -try { - var ctx = new GSound.Context(); - ctx.play_simple(null, GSound.Attribute.EVENT_ID, "phone-incoming-call"); -} catch (Error e) { - // handle error -} -]| - -# `play_simple()` versus `play_full()` - -The above examples use the gsound_context_play_simple() method for -playing sounds. This is a "fire and forget" method which returns -immediately and does not block your program, and is suitable for most use -cases. - -If you need to find out when the sound finished (for example to repeat the -sound) then you can use the gsound_context_play_full() version. This -is an asynchronous method using the standard GIO async pattern, which will -run the supplied #GAsyncReadyCallback when the sound server has finished. -It is guaranteed that the callback will be run exactly once. - -Note that calling gsound_context_play_full() with a %NULL callback is not -equivalent to calling gsound_context_play_simple(). When calling -play_simple(), errors which occur before the sound is passed to the sound -server are reported immediately, whereas with `play_full()` these are reported -in the callback. If you pass a %NULL callback to gsound_context_play_full() -you will not be able to receive these errors, so it is strongly recommended -to avoid doing this and use gsound_context_play_simple() in the case when -you don't need to be notified when the sound has finished. - -# Passing Attributes - -GSound supplies information to the sound server by means of attributes. -Attributes can be set on the #GSoundContext itself using -gsound_context_set_attributes(), or supplied in a `play()` call. Attributes -set on the context will automatically applied to any subsequent `play()` -calls, unless overridden by that call. - -In C and Vala, attributes are passed as %NULL-terminated list of -(attribute, value) pairs. When using GObject introspection, attributes are -typically passed using a language-specific associated array, for example -a dict in Python or an object in JavaScript. - -For the list of attributes supported by GSound, see -[GSound Attributes][gsound-GSound-Attributes]. - -# Caching # {#caching} - -If supported by the sound server, frequently-used sounds may be cached. This -may be useful, for example, for sound effects in a game. To cache a sound, -either call gsound_context_cache(), or pass the special -#GSOUND_ATTR_CANBERRA_CACHE_CONTROL attribute to one of the `play()` -functions. - -For example, in the startup code for a game you might include something -like the following (error checking omitted): - -|[ <-- language="C" --> -GSoundContext *ctx = gsound_context_new (NULL, NULL); -gsound_context_cache(ctx, NULL, - GSOUND_ATTR_MEDIA_FILENAME, - "/path/to/player-spaceship-fire-laser.ogg", - NULL); -]| - -There are three caching modes available, "permanent", "volatile" and "never". -The default mode when calling gsound_context_cache() is "permanent", and -the default mode for gsound_context_play_simple() and `play_full()` is -"never". - -See the documentation for #GSOUND_ATTR_CANBERRA_CACHE_CONTROL for more -details. - - - diff --git a/.flatpak-builder/cache/objects/ec/610df5efe51532839ca76b53839dda151b9ffb0a0478c40266536425865068.dirtree b/.flatpak-builder/cache/objects/ec/610df5efe51532839ca76b53839dda151b9ffb0a0478c40266536425865068.dirtree deleted file mode 100644 index 59a0bd0..0000000 Binary files a/.flatpak-builder/cache/objects/ec/610df5efe51532839ca76b53839dda151b9ffb0a0478c40266536425865068.dirtree and /dev/null differ diff --git a/.flatpak-builder/cache/objects/ec/7677417546945648eeaff1ba022a55e111e073a5f096777b8d39066e8607e3.dirtree b/.flatpak-builder/cache/objects/ec/7677417546945648eeaff1ba022a55e111e073a5f096777b8d39066e8607e3.dirtree deleted file mode 100644 index cc5c200..0000000 Binary files a/.flatpak-builder/cache/objects/ec/7677417546945648eeaff1ba022a55e111e073a5f096777b8d39066e8607e3.dirtree and /dev/null differ diff --git a/.flatpak-builder/cache/objects/ec/aa987c53c141fb29daca9bd568e37d0b4e0d6e67ea3e91c6da4453ad0614e0.file b/.flatpak-builder/cache/objects/ec/aa987c53c141fb29daca9bd568e37d0b4e0d6e67ea3e91c6da4453ad0614e0.file deleted file mode 100644 index 6505785..0000000 Binary files a/.flatpak-builder/cache/objects/ec/aa987c53c141fb29daca9bd568e37d0b4e0d6e67ea3e91c6da4453ad0614e0.file and /dev/null differ diff --git a/.flatpak-builder/cache/objects/ed/eae431e33582d4318724ecdbd4dd6d878eee42ce6452e04eec76a2353a97d9.file b/.flatpak-builder/cache/objects/ed/eae431e33582d4318724ecdbd4dd6d878eee42ce6452e04eec76a2353a97d9.file deleted file mode 100644 index b260d4b..0000000 --- a/.flatpak-builder/cache/objects/ed/eae431e33582d4318724ecdbd4dd6d878eee42ce6452e04eec76a2353a97d9.file +++ /dev/null @@ -1,791 +0,0 @@ -/* gsound-context.c - * - * Copyright (C) 2013 Tristan Brindle - * - * This file 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. - * - * This file 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 General Public License - * along with this program. If not, see . - */ -/** - * SECTION: gsound-context - * @title: GSoundContext - * @short_description: GSound context object - * @see_also: #ca_context - * - * A #GSoundContext is used for playing system sounds. The typical use pattern - * is: - * - * * Initialize the #GSoundContext - * * [Optional] Set any global attributes using gsound_context_set_attributes() - * * [Optional] Cache any frequently-used sounds (for example, sound - * effects for a game) using gsound_context_cache() - * * Play sounds using gsound_context_play_simple() or gsound_context_play_full() - * * Close the connection to the sound server and clean up the context using - * g_object_unref() - * - * #GSoundContext implements the #GInitable interface, so if created with - * g_object_new() (as typically happens with language bindings) then you must - * call the g_initable_init() method before attempting to use it. - * - * # Simple Examples - * - * In C: - * - * |[ - * GSoundContext *ctx = NULL; - * GCancellable *cancellable = g_cancellable_new(); - * GError *error = NULL; - * - * ctx = gsound_context_new(cancellable, &error); - * if (error) { - * // handle error - * } - * - * gsound_context_play_simple(ctx, cancellable, &error, - * GSOUND_ATTR_EVENT_ID, "phone-incoming-call", - * // other attributes... - * NULL); - * ]| - * - * or, using Python via GObject Introspection: - * - * |[ - * from gi.repository import GSound - * - * ctx = GSound.Context() - * - * try: - * ctx.init(); - * ctx.play_simple({ GSound.ATTR_EVENT_ID : "phone-incoming-call" }) - * except: - * # Handle error - * pass - * ]| - * - * or using Vala: - * - * |[ - * try { - * var ctx = new GSound.Context(); - * ctx.play_simple(null, GSound.Attribute.EVENT_ID, "phone-incoming-call"); - * } catch (Error e) { - * // handle error - * } - * ]| - * - * # `play_simple()` versus `play_full()` - * - * The above examples use the gsound_context_play_simple() method for - * playing sounds. This is a "fire and forget" method which returns - * immediately and does not block your program, and is suitable for most use - * cases. - * - * If you need to find out when the sound finished (for example to repeat the - * sound) then you can use the gsound_context_play_full() version. This - * is an asynchronous method using the standard GIO async pattern, which will - * run the supplied #GAsyncReadyCallback when the sound server has finished. - * It is guaranteed that the callback will be run exactly once. - * - * Note that calling gsound_context_play_full() with a %NULL callback is not - * equivalent to calling gsound_context_play_simple(). When calling - * play_simple(), errors which occur before the sound is passed to the sound - * server are reported immediately, whereas with `play_full()` these are reported - * in the callback. If you pass a %NULL callback to gsound_context_play_full() - * you will not be able to receive these errors, so it is strongly recommended - * to avoid doing this and use gsound_context_play_simple() in the case when - * you don't need to be notified when the sound has finished. - * - * # Passing Attributes - * - * GSound supplies information to the sound server by means of attributes. - * Attributes can be set on the #GSoundContext itself using - * gsound_context_set_attributes(), or supplied in a `play()` call. Attributes - * set on the context will automatically applied to any subsequent `play()` - * calls, unless overridden by that call. - * - * In C and Vala, attributes are passed as %NULL-terminated list of - * (attribute, value) pairs. When using GObject introspection, attributes are - * typically passed using a language-specific associated array, for example - * a dict in Python or an object in JavaScript. - * - * For the list of attributes supported by GSound, see - * [GSound Attributes][gsound-GSound-Attributes]. - * - * # Caching # {#caching} - * - * If supported by the sound server, frequently-used sounds may be cached. This - * may be useful, for example, for sound effects in a game. To cache a sound, - * either call gsound_context_cache(), or pass the special - * #GSOUND_ATTR_CANBERRA_CACHE_CONTROL attribute to one of the `play()` - * functions. - * - * For example, in the startup code for a game you might include something - * like the following (error checking omitted): - * - * |[ <-- language="C" --> - * GSoundContext *ctx = gsound_context_new (NULL, NULL); - * gsound_context_cache(ctx, NULL, - * GSOUND_ATTR_MEDIA_FILENAME, - * "/path/to/player-spaceship-fire-laser.ogg", - * NULL); - * ]| - * - * There are three caching modes available, "permanent", "volatile" and "never". - * The default mode when calling gsound_context_cache() is "permanent", and - * the default mode for gsound_context_play_simple() and `play_full()` is - * "never". - * - * See the documentation for #GSOUND_ATTR_CANBERRA_CACHE_CONTROL for more - * details. - * - */ - -#include "gsound-context.h" - -#include - -#include - -static void gsound_context_initable_init (GInitableIface *iface); - -struct _GSoundContext -{ - GObject parent; - - ca_context *ca; -}; - -struct _GSoundContextClass -{ - GObjectClass parent_class; -}; - -G_DEFINE_TYPE_WITH_CODE (GSoundContext, gsound_context, G_TYPE_OBJECT, - G_IMPLEMENT_INTERFACE (G_TYPE_INITABLE, - gsound_context_initable_init)) - -G_DEFINE_QUARK (gsound - error - quark, gsound_error); - -static gboolean -test_return (int code, GError **error) -{ - if (code == CA_SUCCESS) - return TRUE; - - g_set_error_literal (error, GSOUND_ERROR, code, ca_strerror (code)); - return FALSE; -} - -static void -hash_table_to_prop_list (GHashTable *ht, ca_proplist *pl) -{ - gpointer key, value; - GHashTableIter iter; - - g_hash_table_ref (ht); - - g_hash_table_iter_init (&iter, ht); - while (g_hash_table_iter_next (&iter, &key, &value)) - ca_proplist_sets (pl, key, value); - - g_hash_table_unref (ht); -} - -static int -var_args_to_prop_list (va_list args, ca_proplist *pl) -{ - while (TRUE) - { - const char *key; - const char *val; - int res; - - key = va_arg (args, const char*); - if (!key) - return CA_SUCCESS; - - val = va_arg (args, const char*); - if (!val) - return CA_ERROR_INVALID; - - res = ca_proplist_sets (pl, key, val); - if (res != CA_SUCCESS) - return res; - } - - return CA_SUCCESS; -} - -static void -on_ca_play_full_finished (ca_context *ca, - guint32 id, - int error_code, - gpointer user_data) -{ - GTask *task = user_data; - - if (error_code != CA_SUCCESS) - { - g_task_return_new_error (task, - GSOUND_ERROR, - error_code, - "%s", - ca_strerror (error_code)); - } - else - g_task_return_boolean (task, TRUE); - - g_object_unref (task); -} - -static void -on_cancellable_cancelled (GCancellable *cancellable, - GSoundContext *self) -{ - ca_context_cancel (self->ca, g_direct_hash (cancellable)); -} - -/** - * gsound_context_new: - * @cancellable: (allow-none): A #GCancellable, or %NULL - * @error: Return location for error - * - * Creates and initializes a new #GSoundContext. If the an error occured - * during initialization, #NULL is returned and @error will be set - * appropriately. - * - * Returns: (transfer full): A new #GSoundContext - */ -GSoundContext * -gsound_context_new (GCancellable *cancellable, GError **error) -{ - return GSOUND_CONTEXT (g_initable_new (GSOUND_TYPE_CONTEXT, - cancellable, - error, - NULL)); -} - -/** - * gsound_context_open: - * @context: A #GSoundContext - * @error: Return location for error - * - * Attempts to open a connection to the backend sound driver. It is recommended - * that you set context attributes with gsound_context_set_attributes() before - * calling this function. - * - * > A connection is automatically opened before playing or caching sounds, - * > so you rarely need to call this yourself. - * - * Returns: %TRUE if the output device was opened successfully, or %FALSE - * (populating @error) - */ -gboolean -gsound_context_open (GSoundContext *self, GError **error) -{ - g_return_val_if_fail (GSOUND_IS_CONTEXT (self), FALSE); - - return test_return (ca_context_open (self->ca), error); -} - -/** - * gsound_context_set_driver: - * @context: A #GSoundContext - * @driver: libcanberra driver to use - * @error: Return location for error, or %NULL - * - * Sets the libcanberra driver to @driver, for example "pulse", "alsa" or "null". - * You normally do not need to set this yourself. - * - * Note that this function may return %TRUE even if the specified driver is - * not available: see the libcanberra documentation for details. - * - * Returns: %TRUE if the libcanberra driver was set successfully - */ -gboolean -gsound_context_set_driver (GSoundContext *self, - const char *driver, - GError **error) -{ - g_return_val_if_fail (GSOUND_IS_CONTEXT (self), FALSE); - - return test_return (ca_context_set_driver (self->ca, driver), error); -} - -/** - * gsound_context_set_attributes: (skip) - * @context: A #GSoundContext - * @error: Return location for error - * @...: %NULL terminated list of attribute name-value pairs - * - * Set attributes or change attributes on @context. Subsequent calls to this - * function calling the same attributes will override the earlier values. - * - * Note that GSound will set the #GSOUND_ATTR_APPLICATION_NAME and - * #GSOUND_ATTR_APPLICATION_ID for you if using #GApplication, so you do - * not normally need to set these yourself. - * - * Returns: %TRUE if attributes were updated successfully - */ -gboolean -gsound_context_set_attributes (GSoundContext *self, - GError **error, - ...) -{ - ca_proplist *pl; - va_list args; - int res; - - g_return_val_if_fail (GSOUND_IS_CONTEXT (self), FALSE); - - if ((res = ca_proplist_create (&pl)) != CA_SUCCESS) - return test_return (res, error); - - va_start (args, error); - var_args_to_prop_list (args, pl); - va_end (args); - - res = ca_context_change_props_full (self->ca, pl); - - g_clear_pointer (&pl, ca_proplist_destroy); - - return test_return (res, error); -} - -/** - * gsound_context_set_attributesv: (rename-to gsound_context_set_attributes) - * @context: A #GSoundContext - * @attrs: (element-type utf8 utf8): Hash table of attributes to set - * @error: Return location for error, or %NULL - * - * Set attributes or change attributes on @context. Subsequent calls to this - * function calling the same attributes will override the earlier values. - * - * Note that GSound will set the #GSOUND_ATTR_APPLICATION_NAME and - * #GSOUND_ATTR_APPLICATION_ID for you if using #GApplication, so you do - * not normally need to set these yourself. - * - * This function is intented to be used by language bindings. - * - * Returns: %TRUE if attributes were updated successfully - */ -gboolean -gsound_context_set_attributesv (GSoundContext *self, - GHashTable *attrs, - GError **error) -{ - ca_proplist *pl; - int res; - - g_return_val_if_fail (GSOUND_IS_CONTEXT (self), FALSE); - - res = ca_proplist_create (&pl); - if (!test_return (res, error)) - return FALSE; - - hash_table_to_prop_list (attrs, pl); - - res = ca_context_change_props_full (self->ca, pl); - - g_clear_pointer (&pl, ca_proplist_destroy); - - return test_return (res, error); -} - -/** - * gsound_context_play_simple: (skip) - * @context: A #GSoundContext - * @cancellable: (allow-none): A #GCancellable, or %NULL - * @error: Return location for error, or %NULL - * @...: A %NULL-terminated list of attribute-value pairs - * - * The basic "fire-and-forget" play command. This function will not block, and - * just sends a request to the sound server before immediately returning. - * - * If you need to know when a sound finishes playing then you should call - * gsound_context_play_full() instead. - * - * You can cancel playback at any time by calling g_cancellable_cancel() on - * @cancellable, if supplied. - * - * Returns: %TRUE on success, or %FALSE, populating @error - */ -gboolean -gsound_context_play_simple (GSoundContext *self, - GCancellable *cancellable, - GError **error, - ...) -{ - ca_proplist *pl; - va_list args; - int res; - - g_return_val_if_fail (GSOUND_IS_CONTEXT (self), FALSE); - - if ((res = ca_proplist_create (&pl)) != CA_SUCCESS) - return test_return (res, error); - - va_start (args, error); - var_args_to_prop_list (args, pl); - va_end (args); - - res = ca_context_play_full (self->ca, - g_direct_hash (cancellable), - pl, NULL, NULL); - - if (cancellable) - g_cancellable_connect (cancellable, - G_CALLBACK (on_cancellable_cancelled), - g_object_ref (self), - g_object_unref); - - g_clear_pointer (&pl, ca_proplist_destroy); - - return test_return (res, error); -} - -/** - * gsound_context_play_simplev: (rename-to gsound_context_play_simple) - * @context: A #GSoundContext - * @attrs: (element-type utf8 utf8): Attributes - * @cancellable: (allow-none): A #GCancellable - * @error: Return location for error - * - * The basic "fire-and-forget" play command. This function will not block, and - * just sends a request to the sound server before immediately returning. - * - * If you need to know when a sound finishes playing then you should call - * gsound_context_play_full() instead. - * - * You can cancel playback at any time by calling g_cancellable_cancel() on - * @cancellable, if supplied. - * - * This function is intented to be used by language bindings. - * - * Returns: %TRUE on success, %FALSE on error - * - */ -gboolean -gsound_context_play_simplev (GSoundContext *self, - GHashTable *attrs, - GCancellable *cancellable, - GError **error) -{ - ca_proplist *pl; - int res = ca_proplist_create (&pl); - - if (!test_return (res, error)) - return FALSE; - - hash_table_to_prop_list (attrs, pl); - - res = ca_context_play_full (self->ca, - g_direct_hash (cancellable), - pl, NULL, NULL); - - if (cancellable) - g_cancellable_connect (cancellable, - G_CALLBACK (on_cancellable_cancelled), - g_object_ref (self), - g_object_unref); - - g_clear_pointer (&pl, ca_proplist_destroy); - - return test_return (res, error); -} - -/** - * gsound_context_play_full: (skip) - * @context: A #GSoundContext - * @cancellable: (allow-none): A #GCancellable, or %NULL - * @callback: (scope async): callback - * @user_data: User data passed to @callback - * @...: A %NULL-terminated list of attribute-value pairs - * - * Asynchronously request a sound to be played. When playback is finished - * (or if an error occurs) then @callback will be called, following the - * normal GIO async pattern. - * - * If playback is cancelled via @cancellable, then @callback will be called - * with #G_IO_ERROR_CANCELLED. - * - * If you do not need notification of when playback is complete, you should - * use gsound_context_play_simple(). - */ -void -gsound_context_play_full (GSoundContext *self, - GCancellable *cancellable, - GAsyncReadyCallback callback, - gpointer user_data, - ...) -{ - GError *inner_error = NULL; - ca_proplist *proplist; - va_list args; - GTask *task; - int res; - - task = g_task_new (self, cancellable, callback, user_data); - - res = ca_proplist_create (&proplist); - if (!test_return (res, &inner_error)) - { - g_task_return_error (task, inner_error); - g_object_unref (task); - return; - } - - va_start (args, user_data); - var_args_to_prop_list (args, proplist); - va_end (args); - - res = ca_context_play_full (self->ca, - g_direct_hash (cancellable), - proplist, - on_ca_play_full_finished, - task); - - if (cancellable) - g_cancellable_connect (cancellable, - G_CALLBACK (on_cancellable_cancelled), - g_object_ref (self), - g_object_unref); - - g_clear_pointer (&proplist, ca_proplist_destroy); - - if (!test_return (res, &inner_error)) - { - g_task_return_error (task, inner_error); - g_object_unref (task); - } -} - -/** - * gsound_context_play_fullv: (rename-to gsound_context_play_full) - * @context: A #GSoundContext - * @attrs: (element-type utf8 utf8): Attributes - * @cancellable: (allow-none): A #GCancellable, or %NULL - * @callback: (scope async): callback - * @user_data: user_data - * - * Asynchronously request a sound to be played. When playback is finished - * (or if an error occurs) then @callback will be called, following the - * normal GIO async pattern. - * - * If playback is cancelled via @cancellable, then @callback will be called - * with #G_IO_ERROR_CANCELLED. - * - * If you do not need notification of when playback is complete, you should - * use gsound_context_play_simple(). - * - * This function is intented to be used by language bindings. - */ -void -gsound_context_play_fullv (GSoundContext *self, - GHashTable *attrs, - GCancellable *cancellable, - GAsyncReadyCallback callback, - gpointer user_data) -{ - GError *inner_error = NULL; - ca_proplist *proplist; - GTask *task; - int res; - - task = g_task_new (self, cancellable, callback, user_data); - - res = ca_proplist_create (&proplist); - if (!test_return (res, &inner_error)) - { - g_task_return_error (task, inner_error); - g_object_unref (task); - return; - } - - hash_table_to_prop_list (attrs, proplist); - - res = ca_context_play_full (self->ca, - g_direct_hash (cancellable), - proplist, - on_ca_play_full_finished, - task); - - if (cancellable) - g_cancellable_connect (cancellable, - G_CALLBACK (on_cancellable_cancelled), - g_object_ref (self), - g_object_unref); - - g_clear_pointer (&proplist, ca_proplist_destroy); - - if (!test_return (res, &inner_error)) - { - g_task_return_error (task, inner_error); - g_object_unref (task); - } -} - -/** - * gsound_context_play_full_finish: - * @context: A #GSoundContext - * @result: Result object passed to the callback of - * gsound_context_play_full() - * @error: Return location for error - * - * Finish an async operation started by gsound_context_play_full(). You - * must call this function in the callback to free memory and receive any - * errors which occurred. - * - * Returns: %TRUE if playing finished successfully - */ -gboolean -gsound_context_play_full_finish (GSoundContext *self, - GAsyncResult *result, - GError **error) -{ - g_return_val_if_fail (g_task_is_valid (result, self), FALSE); - - return g_task_propagate_boolean (G_TASK (result), error); -} - -/** - * gsound_context_cache: (skip) - * @context: A #GSoundContext - * @error: Return location for error - * @...: A %NULL-terminated list of attribute-value pairs - * - * Requests that a sound be cached on the server. See [#caching][gsound-GSound-Context#caching]. - * - * Returns: %TRUE on success - */ -gboolean -gsound_context_cache (GSoundContext *self, - GError **error, - ...) -{ - ca_proplist *pl; - va_list args; - int res; - - g_return_val_if_fail (GSOUND_IS_CONTEXT (self), FALSE); - - if ((res = ca_proplist_create (&pl)) != CA_SUCCESS) - return test_return (res, error); - - va_start (args, error); - var_args_to_prop_list (args, pl); - va_end (args); - - res = ca_context_cache_full (self->ca, pl); - - g_clear_pointer (&pl, ca_proplist_destroy); - - return test_return (res, error); -} - -/** - * gsound_context_cachev: (rename-to gsound_context_cache) - * @context: A #GSoundContext - * @attrs: (element-type utf8 utf8): Hash table of attrerties - * @error: Return location for error, or %NULL - * - * Requests that a sound be cached on the server. See [#caching][gsound-GSound-Context#caching]. - * - * This function is intented to be used by language bindings. - */ -gboolean -gsound_context_cachev (GSoundContext *self, - GHashTable *attrs, - GError **error) -{ - ca_proplist *proplist; - int res = ca_proplist_create (&proplist); - - if (!test_return (res, error)) - return FALSE; - - hash_table_to_prop_list (attrs, proplist); - - res = ca_context_cache_full (self->ca, proplist); - - g_clear_pointer (&proplist, ca_proplist_destroy); - - return test_return (res, error); -} - -static gboolean -gsound_context_real_init (GInitable *initable, - GCancellable *cancellable, - GError **error) -{ - GSoundContext *self = GSOUND_CONTEXT (initable); - int success; - ca_proplist *pl; - - if (self->ca) - return TRUE; - - success = ca_context_create (&self->ca); - - if (!test_return (success, error)) - return FALSE; - - /* Set a couple of attributes here if we can */ - ca_proplist_create (&pl); - - ca_proplist_sets (pl, CA_PROP_APPLICATION_NAME, g_get_application_name ()); - if (g_application_get_default ()) - { - GApplication *app = g_application_get_default (); - ca_proplist_sets (pl, CA_PROP_APPLICATION_ID, - g_application_get_application_id (app)); - } - - success = ca_context_change_props_full (self->ca, pl); - - g_clear_pointer (&pl, ca_proplist_destroy); - - if (!test_return (success, error)) - g_clear_pointer (&self->ca, ca_context_destroy); - - return TRUE; -} - -static void -gsound_context_finalize (GObject *obj) -{ - GSoundContext *self = GSOUND_CONTEXT (obj); - - g_clear_pointer (&self->ca, ca_context_destroy); - - G_OBJECT_CLASS (gsound_context_parent_class)->finalize (obj); -} - -static void -gsound_context_class_init (GSoundContextClass *klass) -{ - GObjectClass *gobject_class = G_OBJECT_CLASS (klass); - - gobject_class->finalize = gsound_context_finalize; -} - -static void -gsound_context_init (GSoundContext *self) -{ -} - -static void -gsound_context_initable_init (GInitableIface *iface) -{ - iface->init = gsound_context_real_init; -} - diff --git a/.flatpak-builder/cache/objects/ee/d1d1a12c68d1338fce2924126b711cafa8c327adfca5907b30cc1c76d44e23.file b/.flatpak-builder/cache/objects/ee/d1d1a12c68d1338fce2924126b711cafa8c327adfca5907b30cc1c76d44e23.file deleted file mode 100644 index 8902e49..0000000 --- a/.flatpak-builder/cache/objects/ee/d1d1a12c68d1338fce2924126b711cafa8c327adfca5907b30cc1c76d44e23.file +++ /dev/null @@ -1,77 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/.flatpak-builder/cache/objects/f0/c2680e9089ef8cd338a2d163a6f489a7e8ca0407c3f56992d6686871de6474.file b/.flatpak-builder/cache/objects/f0/c2680e9089ef8cd338a2d163a6f489a7e8ca0407c3f56992d6686871de6474.file deleted file mode 100644 index f2afe69..0000000 --- a/.flatpak-builder/cache/objects/f0/c2680e9089ef8cd338a2d163a6f489a7e8ca0407c3f56992d6686871de6474.file +++ /dev/null @@ -1,50 +0,0 @@ -/*-*- Mode: C; c-basic-offset: 8 -*-*/ - -#ifndef foocanberragtkhfoo -#define foocanberragtkhfoo - -/*** - This file is part of libcanberra. - - Copyright 2008 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 - . -***/ - -#include -#include -#include - -G_BEGIN_DECLS - -#ifndef GDK_MULTIHEAD_SAFE -ca_context *ca_gtk_context_get(void); -#endif - -ca_context *ca_gtk_context_get_for_screen(GdkScreen *screen); - -int ca_gtk_proplist_set_for_widget(ca_proplist *p, GtkWidget *w); - -int ca_gtk_play_for_widget(GtkWidget *w, uint32_t id, ...) G_GNUC_NULL_TERMINATED; - -int ca_gtk_proplist_set_for_event(ca_proplist *p, GdkEvent *e); - -int ca_gtk_play_for_event(GdkEvent *e, uint32_t id, ...) G_GNUC_NULL_TERMINATED; - -void ca_gtk_widget_disable_sounds(GtkWidget *w, gboolean enable); - -G_END_DECLS - -#endif diff --git a/.flatpak-builder/cache/objects/f1/9781d6c23bd27a86852abed52f243c656ffa1f9c67ce1966183c11072be350.file b/.flatpak-builder/cache/objects/f1/9781d6c23bd27a86852abed52f243c656ffa1f9c67ce1966183c11072be350.file deleted file mode 100644 index e4a33dc..0000000 Binary files a/.flatpak-builder/cache/objects/f1/9781d6c23bd27a86852abed52f243c656ffa1f9c67ce1966183c11072be350.file and /dev/null differ diff --git a/.flatpak-builder/cache/objects/f1/fbe0bb34673e39c47f865d838b2be198c690a4bb4fd4bfda0384ccfcb8fe4b.dirtree b/.flatpak-builder/cache/objects/f1/fbe0bb34673e39c47f865d838b2be198c690a4bb4fd4bfda0384ccfcb8fe4b.dirtree deleted file mode 100644 index 2c94f71..0000000 Binary files a/.flatpak-builder/cache/objects/f1/fbe0bb34673e39c47f865d838b2be198c690a4bb4fd4bfda0384ccfcb8fe4b.dirtree and /dev/null differ diff --git a/.flatpak-builder/cache/objects/f2/616204246e2daf3ba1968c11ef6f10986534232887de0d47f2a4a023dcfc35.file b/.flatpak-builder/cache/objects/f2/616204246e2daf3ba1968c11ef6f10986534232887de0d47f2a4a023dcfc35.file deleted file mode 100644 index 3caf7d0..0000000 Binary files a/.flatpak-builder/cache/objects/f2/616204246e2daf3ba1968c11ef6f10986534232887de0d47f2a4a023dcfc35.file and /dev/null differ diff --git a/.flatpak-builder/cache/objects/f3/45d42b6be66bcd07037db2cd3b43b473765eb23c3721cb805da560b372f97f.file b/.flatpak-builder/cache/objects/f3/45d42b6be66bcd07037db2cd3b43b473765eb23c3721cb805da560b372f97f.file deleted file mode 100644 index 259dae6..0000000 --- a/.flatpak-builder/cache/objects/f3/45d42b6be66bcd07037db2cd3b43b473765eb23c3721cb805da560b372f97f.file +++ /dev/null @@ -1,467 +0,0 @@ -/* gsound-attr.h - * - * Copyright (C) 2014 Tristan Brindle - * - * Adapted from canberra.h, - * - * Copyright 2008 Lennart Poettering - * - * This file 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. - * - * This file 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 General Public License - * along with this program. If not, see . - */ - -#ifndef GSOUND_ATTR_H -#define GSOUND_ATTR_H - -#include - -G_BEGIN_DECLS - -/** - * SECTION:gsound-attr - * @title: GSound Attributes - * @short_description: Attributes recognized by GSound - * @see_also: #GSoundContext - * - * Attributes which can be applied to a #GSoundContext or passed to one of - * the `play()` or `cache()` methods. - */ - -/** - * GSOUND_ATTR_MEDIA_NAME: - * - * A name describing the media being played. Localized if possible and applicable. - */ -#define GSOUND_ATTR_MEDIA_NAME "media.name" - -/** - * GSOUND_ATTR_MEDIA_TITLE: - * - * A (song) title describing the media being played. Localized if possible and applicable. - */ -#define GSOUND_ATTR_MEDIA_TITLE "media.title" - -/** - * GSOUND_ATTR_MEDIA_ARTIST: - * - * The artist of this media. Localized if possible and applicable. - */ -#define GSOUND_ATTR_MEDIA_ARTIST "media.artist" - -/** - * GSOUND_ATTR_MEDIA_LANGUAGE: - * - * The language this media is in, in some standard POSIX locale string, such as "de_DE". - */ -#define GSOUND_ATTR_MEDIA_LANGUAGE "media.language" - -/** - * GSOUND_ATTR_MEDIA_FILENAME: - * - * The file name this media was or can be loaded from. - */ -#define GSOUND_ATTR_MEDIA_FILENAME "media.filename" - -/** - * GSOUND_ATTR_MEDIA_ICON: - * - * An icon for this media in binary PNG format. - */ -#define GSOUND_ATTR_MEDIA_ICON "media.icon" - -/** - * GSOUND_ATTR_MEDIA_ICON_NAME: - * - * An icon name as defined in the XDG icon naming specifcation. - */ -#define GSOUND_ATTR_MEDIA_ICON_NAME "media.icon_name" - -/** - * GSOUND_ATTR_MEDIA_ROLE: - * - * The "role" this media is played in. For event sounds the string - * "event". For other cases strings like "music", "video", "game", ... - */ -#define GSOUND_ATTR_MEDIA_ROLE "media.role" - -/** - * GSOUND_ATTR_EVENT_ID: - * - * A textual id for an event sound, as mandated by the XDG sound naming specification. - */ -#define GSOUND_ATTR_EVENT_ID "event.id" - -/** - * GSOUND_ATTR_EVENT_DESCRIPTION: - * - * A descriptive string for the sound event. Localized if possible and applicable. - */ -#define GSOUND_ATTR_EVENT_DESCRIPTION "event.description" - -/** - * GSOUND_ATTR_EVENT_MOUSE_X: - * - * If this sound event was triggered by a mouse input event, the X - * position of the mouse cursor on the screen, formatted as string. - */ -#define GSOUND_ATTR_EVENT_MOUSE_X "event.mouse.x" - -/** - * GSOUND_ATTR_EVENT_MOUSE_Y: - * - * If this sound event was triggered by a mouse input event, the Y - * position of the mouse cursor on the screen, formatted as string. - */ -#define GSOUND_ATTR_EVENT_MOUSE_Y "event.mouse.y" - -/** - * GSOUND_ATTR_EVENT_MOUSE_HPOS: - * - * If this sound event was triggered by a mouse input event, the X - * position of the mouse cursor as fractional value between 0 and 1, - * formatted as string, 0 reflecting the left side of the screen, 1 - * the right side. - */ -#define GSOUND_ATTR_EVENT_MOUSE_HPOS "event.mouse.hpos" - -/** - * GSOUND_ATTR_EVENT_MOUSE_VPOS: - * - * If this sound event was triggered by a mouse input event, the Y - * position of the mouse cursor as fractional value between 0 and 1, - * formatted as string, 0 reflecting the top end of the screen, 1 - * the bottom end. - */ -#define GSOUND_ATTR_EVENT_MOUSE_VPOS "event.mouse.vpos" - -/** - * GSOUND_ATTR_EVENT_MOUSE_BUTTON: - * - * If this sound event was triggered by a mouse input event, the - * number of the mouse button that triggered it, formatted as string. 1 - * for left mouse button, 3 for right, 2 for middle. - */ -#define GSOUND_ATTR_EVENT_MOUSE_BUTTON "event.mouse.button" - -/** - * GSOUND_ATTR_WINDOW_NAME: - * - * If this sound event was triggered by a window on the screen, the - * name of this window as human readable string. - */ -#define GSOUND_ATTR_WINDOW_NAME "window.name" - -/** - * GSOUND_ATTR_WINDOW_ID: - * - * If this sound event was triggered by a window on the screen, some - * identification string for this window, so that the sound system can - * recognize specific windows. - */ -#define GSOUND_ATTR_WINDOW_ID "window.id" - -/** - * GSOUND_ATTR_WINDOW_ICON: - * - * If this sound event was triggered by a window on the screen, binary - * icon data in PNG format for this window. - */ -#define GSOUND_ATTR_WINDOW_ICON "window.icon" - -/** - * GSOUND_ATTR_WINDOW_ICON_NAME: - * - * If this sound event was triggered by a window on the screen, an - * icon name for this window, as defined in the XDG icon naming - * specification. - */ -#define GSOUND_ATTR_WINDOW_ICON_NAME "window.icon_name" - -/** - * GSOUND_ATTR_WINDOW_X: - * - * If this sound event was triggered by a window on the screen, the X - * position of the window measured from the top left corner of the - * screen to the top left corner of the window. - */ -#define GSOUND_ATTR_WINDOW_X "window.x" - -/** - * GSOUND_ATTR_WINDOW_Y: - * - * If this sound event was triggered by a window on the screen, the y - * position of the window measured from the top left corner of the - * screen to the top left corner of the window. - */ -#define GSOUND_ATTR_WINDOW_Y "window.y" - -/** - * GSOUND_ATTR_WINDOW_WIDTH: - * - * If this sound event was triggered by a window on the screen, the - * pixel width of the window. - */ -#define GSOUND_ATTR_WINDOW_WIDTH "window.width" - -/** - * GSOUND_ATTR_WINDOW_HEIGHT: - * - * If this sound event was triggered by a window on the screen, the - * pixel height of the window. - */ -#define GSOUND_ATTR_WINDOW_HEIGHT "window.height" - -/** - * GSOUND_ATTR_WINDOW_HPOS: - * - * If this sound event was triggered by a window on the screen, the X - * position of the center of the window as fractional value between 0 - * and 1, formatted as string, 0 reflecting the left side of the - * screen, 1 the right side. - */ -#define GSOUND_ATTR_WINDOW_HPOS "window.hpos" - -/** - * GSOUND_ATTR_WINDOW_VPOS: - * - * If this sound event was triggered by a window on the screen, the Y - * position of the center of the window as fractional value between 0 - * and 1, formatted as string, 0 reflecting the top side of the - * screen, 1 the bottom side. - */ -#define GSOUND_ATTR_WINDOW_VPOS "window.vpos" - -/** - * GSOUND_ATTR_WINDOW_DESKTOP: - * - * If this sound event was triggered by a window on the screen and the - * windowing system supports multiple desktops, a comma seperated list - * of indexes of the desktops this window is visible on. If this - * attribute is an empty string, it is visible on all desktops - * (i.e. 'sticky'). The first desktop is 0. (e.g. "0,2,3") - */ -#define GSOUND_ATTR_WINDOW_DESKTOP "window.desktop" - -/** - * GSOUND_ATTR_WINDOW_X11_DISPLAY: - * - * If this sound event was triggered by a window on the screen and the - * windowing system is X11, the X display name of the window (e.g. ":0"). - */ -#define GSOUND_ATTR_WINDOW_X11_DISPLAY "window.x11.display" - -/** - * GSOUND_ATTR_WINDOW_X11_SCREEN: - * - * If this sound event was triggered by a window on the screen and the - * windowing system is X11, the X screen id of the window formatted as - * string (e.g. "0"). - */ -#define GSOUND_ATTR_WINDOW_X11_SCREEN "window.x11.screen" - -/** - * GSOUND_ATTR_WINDOW_X11_MONITOR: - * - * If this sound event was triggered by a window on the screen and the - * windowing system is X11, the X monitor id of the window formatted as - * string (e.g. "0"). - */ -#define GSOUND_ATTR_WINDOW_X11_MONITOR "window.x11.monitor" - -/** - * GSOUND_ATTR_WINDOW_X11_XID: - * - * If this sound event was triggered by a window on the screen and the - * windowing system is X11, the XID of the window formatted as string. - */ -#define GSOUND_ATTR_WINDOW_X11_XID "window.x11.xid" - -/** - * GSOUND_ATTR_APPLICATION_NAME: - * - * The name of the application this sound event was triggered by as - * human readable string. (e.g. "GNU Emacs") Localized if possible and - * applicable. - * - * > This attribute will automatically be added to the #GSoundContext if - * > it has previously been set with g_set_application_name(), so you normally - * > do not need to supply this yourself. - */ -#define GSOUND_ATTR_APPLICATION_NAME "application.name" - -/** - * GSOUND_ATTR_APPLICATION_ID: - * - * An identifier for the program this sound event was triggered - * by. (e.g. "org.gnu.emacs"). - * - * > This attribute will automatically be added to the #GSoundContext with - * > the #GApplication:application-id if you are using #GApplication, so you - * > normally do not need to supply this yourself. - */ -#define GSOUND_ATTR_APPLICATION_ID "application.id" - -/** - * GSOUND_ATTR_APPLICATION_VERSION: - * - * A version number for the program this sound event was triggered - * by. (e.g. "22.2") - */ -#define GSOUND_ATTR_APPLICATION_VERSION "application.version" - -/** - * GSOUND_ATTR_APPLICATION_ICON: - * - * Binary icon data in PNG format for the application this sound event - * is triggered by. - */ -#define GSOUND_ATTR_APPLICATION_ICON "application.icon" - -/** - * GSOUND_ATTR_APPLICATION_ICON_NAME: - * - * An icon name for the application this sound event is triggered by, - * as defined in the XDG icon naming specification. - */ -#define GSOUND_ATTR_APPLICATION_ICON_NAME "application.icon_name" - -/** - * GSOUND_ATTR_APPLICATION_LANGUAGE: - * - * The locale string the application that is triggering this sound - * event is running in. A POSIX locale string such as de_DE@euro. - */ -#define GSOUND_ATTR_APPLICATION_LANGUAGE "application.language" - -/** - * GSOUND_ATTR_APPLICATION_PROCESS_ID: - * - * The unix PID of the process that is triggering this sound event, formatted as string. - */ -#define GSOUND_ATTR_APPLICATION_PROCESS_ID "application.process.id" - -/** - * GSOUND_ATTR_APPLICATION_PROCESS_BINARY: - * - * The path to the process binary of the process that is triggering this sound event. - */ -#define GSOUND_ATTR_APPLICATION_PROCESS_BINARY "application.process.binary" - -/** - * GSOUND_ATTR_APPLICATION_PROCESS_USER: - * - * The user that owns the process that is triggering this sound event. - */ -#define GSOUND_ATTR_APPLICATION_PROCESS_USER "application.process.user" - -/** - * GSOUND_ATTR_APPLICATION_PROCESS_HOST: - * - * The host name of the host the process that is triggering this sound event runs on. - */ -#define GSOUND_ATTR_APPLICATION_PROCESS_HOST "application.process.host" - -/** - * GSOUND_ATTR_CANBERRA_CACHE_CONTROL: - * - * A special attribute that can be used to control the automatic sound - * caching of sounds in the sound server. One of "permanent", - * "volatile", "never". "permanent" will cause this sample to be - * cached in the server permanently. This is useful for very - * frequently used sound events such as those used for input - * feedback. "volatile" may be used for cacheing sounds in the sound - * server temporarily. They will expire after some time or on cache - * pressure. Finally, "never" may be used for sounds that should never - * be cached, because they are only generated very seldomly or even - * only once at most (such as desktop login sounds). - * - * If this attribute is not explicitly passed to gsound_context_play_simple() - * or gsound_context_play_full() it will default to "never". If it is not - * explicitly passed to gsound_context_cache() it will default to "permanent". - * - * If the list of attributes is handed on to the sound server this - * attribute is stripped from it. - */ -#define GSOUND_ATTR_CANBERRA_CACHE_CONTROL "canberra.cache-control" - -/** - * GSOUND_ATTR_CANBERRA_VOLUME: - * - * A special attribute that can be used to control the volume this - * sound event is played in if the backend supports it. A floating - * point value for the decibel multiplier for the sound. 0 dB relates - * to zero gain, and is the default volume these sounds are played in. - * - * If the list of attributes is handed on to the sound server this - * attribute is stripped from it. - */ -#define GSOUND_ATTR_CANBERRA_VOLUME "canberra.volume" - -/** - * GSOUND_ATTR_CANBERRA_XDG_THEME_NAME: - * - * A special attribute that can be used to control the XDG sound theme that - * is used for this sample. - * - * If the list of attributes is handed on to the sound server this - * attribute is stripped from it. - */ -#define GSOUND_ATTR_CANBERRA_XDG_THEME_NAME "canberra.xdg-theme.name" - -/** - * GSOUND_ATTR_CANBERRA_XDG_THEME_OUTPUT_PROFILE: - * - * A special attribute that can be used to control the XDG sound theme - * output profile that is used for this sample. - * - * If the list of attributes is handed on to the sound server this - * attribute is stripped from it. - */ -#define GSOUND_ATTR_CANBERRA_XDG_THEME_OUTPUT_PROFILE "canberra.xdg-theme.output-profile" - -/** - * GSOUND_ATTR_CANBERRA_ENABLE: - * - * A special attribute that can be used to control whether any sounds - * are played at all. If this attribute is "1" or unset sounds are - * played as normal. However, if it is "0" all calls to - * gsound_context_play_simple() or `play_full()` will fail with - * GSOUND_ERROR_DISABLED. - * - * If the list of attributes is handed on to the sound server this - * attribute is stripped from it. - */ -#define GSOUND_ATTR_CANBERRA_ENABLE "canberra.enable" - -/** - * GSOUND_ATTR_CANBERRA_FORCE_CHANNEL: - * - * A special attribute that can be used to control on which channel a - * sound is played. The value should be one of mono, front-left, - * front-right, front-center, rear-left, rear-right, rear-center, lfe, - * front-left-of-center, front-right-of-center, side-left, side-right, - * top-center, top-front-left, top-front-right, top-front-center, - * top-rear-left, top-rear-right, top-rear-center. This attribute is - * only honoured by some backends, other backends may choose to ignore - * it completely. - * - * If the list of attributes is handed on to the sound server this - * attribute is stripped from it. - */ -#define GSOUND_ATTR_CANBERRA_FORCE_CHANNEL "canberra.force_channel" - - - -G_END_DECLS - -#endif /* GSOUND_ATTR_H */ diff --git a/.flatpak-builder/cache/objects/f4/23c67800542470ee47718284b0451a92ead2933055bb370de60f0541ecbcaa.file b/.flatpak-builder/cache/objects/f4/23c67800542470ee47718284b0451a92ead2933055bb370de60f0541ecbcaa.file deleted file mode 100644 index 914ee7a..0000000 --- a/.flatpak-builder/cache/objects/f4/23c67800542470ee47718284b0451a92ead2933055bb370de60f0541ecbcaa.file +++ /dev/null @@ -1,1343 +0,0 @@ - - - - -canberra - - - - - - - - - - - - - - - - - - - -
-
-
- - -
-

canberra

-

canberra — General libcanberra API

-
-
-

Synopsis

-
#define             CA_PROP_MEDIA_NAME
-#define             CA_PROP_MEDIA_TITLE
-#define             CA_PROP_MEDIA_ARTIST
-#define             CA_PROP_MEDIA_LANGUAGE
-#define             CA_PROP_MEDIA_FILENAME
-#define             CA_PROP_MEDIA_ICON
-#define             CA_PROP_MEDIA_ICON_NAME
-#define             CA_PROP_MEDIA_ROLE
-#define             CA_PROP_EVENT_ID
-#define             CA_PROP_EVENT_DESCRIPTION
-#define             CA_PROP_EVENT_MOUSE_X
-#define             CA_PROP_EVENT_MOUSE_Y
-#define             CA_PROP_EVENT_MOUSE_HPOS
-#define             CA_PROP_EVENT_MOUSE_VPOS
-#define             CA_PROP_EVENT_MOUSE_BUTTON
-#define             CA_PROP_WINDOW_NAME
-#define             CA_PROP_WINDOW_ID
-#define             CA_PROP_WINDOW_ICON
-#define             CA_PROP_WINDOW_ICON_NAME
-#define             CA_PROP_WINDOW_X11_DISPLAY
-#define             CA_PROP_WINDOW_X11_SCREEN
-#define             CA_PROP_WINDOW_X11_MONITOR
-#define             CA_PROP_WINDOW_X11_XID
-#define             CA_PROP_APPLICATION_NAME
-#define             CA_PROP_APPLICATION_ID
-#define             CA_PROP_APPLICATION_VERSION
-#define             CA_PROP_APPLICATION_ICON
-#define             CA_PROP_APPLICATION_ICON_NAME
-#define             CA_PROP_APPLICATION_LANGUAGE
-#define             CA_PROP_APPLICATION_PROCESS_ID
-#define             CA_PROP_APPLICATION_PROCESS_BINARY
-#define             CA_PROP_APPLICATION_PROCESS_USER
-#define             CA_PROP_APPLICATION_PROCESS_HOST
-#define             CA_PROP_CANBERRA_CACHE_CONTROL
-#define             CA_PROP_CANBERRA_VOLUME
-#define             CA_PROP_CANBERRA_XDG_THEME_NAME
-#define             CA_PROP_CANBERRA_XDG_THEME_OUTPUT_PROFILE
-
-typedef             ca_context;
-void                (*ca_finish_callback_t)             (ca_context *c,
-                                                         uint32_t id,
-                                                         int error_code,
-                                                         void *userdata);
-int                 ca_context_create                   (ca_context **c);
-int                 ca_context_destroy                  (ca_context *c);
-int                 ca_context_open                     (ca_context *c);
-int                 ca_context_set_driver               (ca_context *c,
-                                                         const char *driver);
-int                 ca_context_change_device            (ca_context *c,
-                                                         const char *device);
-int                 ca_context_change_props             (ca_context *c,
-                                                         ...);
-int                 ca_context_change_props_full        (ca_context *c,
-                                                         ca_proplist *p);
-int                 ca_context_play                     (ca_context *c,
-                                                         uint32_t id,
-                                                         ...);
-int                 ca_context_play_full                (ca_context *c,
-                                                         uint32_t id,
-                                                         ca_proplist *p,
-                                                         ca_finish_callback_t cb,
-                                                         void *userdata);
-int                 ca_context_cancel                   (ca_context *c,
-                                                         uint32_t id);
-int                 ca_context_cache                    (ca_context *c,
-                                                         ...);
-int                 ca_context_cache_full               (ca_context *c,
-                                                         ca_proplist *p);
-int                 ca_context_playing                  (ca_context *c,
-                                                         uint32_t id,
-                                                         int *playing);
-
-const char *        ca_strerror                         (int code);
-
-typedef             ca_proplist;
-int                 ca_proplist_create                  (ca_proplist **p);
-int                 ca_proplist_destroy                 (ca_proplist *p);
-int                 ca_proplist_sets                    (ca_proplist *p,
-                                                         const char *key,
-                                                         const char *value);
-int                 ca_proplist_setf                    (ca_proplist *p,
-                                                         const char *key,
-                                                         const char *format,
-                                                         ...);
-int                 ca_proplist_set                     (ca_proplist *p,
-                                                         const char *key,
-                                                         const void *data,
-                                                         size_t nbytes);
-
-
-
-

Description

-

-libcanberra defines a simple abstract interface for playing event sounds. -

-

-libcanberra relies on the XDG sound naming specification for -identifying event sounds. On Unix/Linux the right sound to play is -found via the mechanisms defined in the XDG sound themeing -specification. On other systems the XDG sound name is translated to -the native sound id for the operating system. -

-

-An event sound is triggered via libcanberra by calling the -ca_context_play() function on a previously created ca_context -object. The ca_context_play() takes a list of key-value pairs that -describe the event sound to generate as closely as possible. The -most important property is CA_PROP_EVENT_ID which defines the XDG -sound name for the sound to play. -

-

-libcanberra is not a generic event abstraction system. It's only -purpose is playing sounds -- however in a very elaborate way. As -much information about the context the sound is triggered from -shall be supplied to the sound system as possible, so that it can -replace the sound with some other kind of feedback for a11y -cases. Also this additional information can be used to enhance user -experience (e.g. by positioning sounds in space depending on the -place on the screen the sound was triggered from, and similar -uses). -

-

-The set of properties defined for event sounds is extensible and -shared with other audio systems, such as PulseAudio. Some of -the properties that may be set are specific to an application, to a -window, to an input event or to the media being played back. -

-

-The user can attach a set of properties to the context itself, -which is than automatically inherited by each sample being played -back. (ca_context_change_props()). -

-

-Some of the properties can be filled in by libcanberra or one of -its backends automatically and thus need not be be filled in by the -application (such as CA_PROP_APPLICATION_PROCESS_ID and -friends). However the application can always overwrite any of these -implicit properties. -

-

-libcanberra is thread-safe and OOM-safe (as far as the backend -allows this). It is not async-signal safe. -

-

-Most libcanberra functions return an integer that indicates success -when 0 (CA_SUCCESS) or an error when negative. In the latter case -ca_strerror() can be used to convert this code into a human -readable string. -

-

-libcanberra property names need to be in 7bit ASCII, string -property values UTF8. -

-

-Optionally a libcanberra backend can support caching of sounds in a -sound system. If this functionality is used, the latencies for -event sound playback can be much smaller and fewer resources are -needed to start playback. If a backend does not support cacheing, -the respective functions will return an error code of -CA_ERROR_NOTSUPPORTED. -

-

-It is highly recommended that the application sets the -CA_PROP_APPLICATION_NAME, CA_PROP_APPLICATION_ID, -CA_PROP_APPLICATION_ICON_NAME/CA_PROP_APPLICATION_ICON properties -immediately after creating the ca_context, before calling -ca_context_open() or ca_context_play(). -

-

-Its is highly recommended to pass at least CA_PROP_EVENT_ID, -CA_PROP_EVENT_DESCRIPTION to ca_context_play() for each event -sound generated. For sound events based on mouse inputs events -CA_PROP_EVENT_MOUSE_X, CA_PROP_EVENT_MOUSE_Y, CA_PROP_EVENT_MOUSE_HPOS, -CA_PROP_EVENT_MOUSE_VPOS, CA_PROP_EVENT_MOUSE_BUTTON should be -passed. For sound events attached to a widget on the screen, the -CA_PROP_WINDOW_xxx properties should be set. -

-
-
-

Details

-
-

CA_PROP_MEDIA_NAME

-
#define CA_PROP_MEDIA_NAME                         "media.name"
-
-

-A name describing the media being played. Localized if possible and applicable. -

-
-
-
-

CA_PROP_MEDIA_TITLE

-
#define CA_PROP_MEDIA_TITLE                        "media.title"
-
-

-A (song) title describing the media being played. Localized if possible and applicable. -

-
-
-
-

CA_PROP_MEDIA_ARTIST

-
#define CA_PROP_MEDIA_ARTIST                       "media.artist"
-
-

-The artist of this media. Localized if possible and applicable. -

-
-
-
-

CA_PROP_MEDIA_LANGUAGE

-
#define CA_PROP_MEDIA_LANGUAGE                     "media.language"
-
-

-The language this media is in, in some standard POSIX locale string, such as "de_DE". -

-
-
-
-

CA_PROP_MEDIA_FILENAME

-
#define CA_PROP_MEDIA_FILENAME                     "media.filename"
-
-

-The file name this media was or can be loaded from. -

-
-
-
-

CA_PROP_MEDIA_ICON

-
#define CA_PROP_MEDIA_ICON                         "media.icon"
-
-

-An icon for this media in binary PNG format. -

-
-
-
-

CA_PROP_MEDIA_ICON_NAME

-
#define CA_PROP_MEDIA_ICON_NAME                    "media.icon_name"
-
-

-An icon name as defined in the XDG icon naming specifcation. -

-
-
-
-

CA_PROP_MEDIA_ROLE

-
#define CA_PROP_MEDIA_ROLE                         "media.role"
-
-

-The "role" this media is played in. For event sounds the string -"event". For other cases strings like "music", "video", "game", ... -

-
-
-
-

CA_PROP_EVENT_ID

-
#define CA_PROP_EVENT_ID                           "event.id"
-
-

-A textual id for an event sound, as mandated by the XDG sound naming specification. -

-
-
-
-

CA_PROP_EVENT_DESCRIPTION

-
#define CA_PROP_EVENT_DESCRIPTION                  "event.description"
-
-

-A descriptive string for the sound event. Localized if possible and applicable. -

-
-
-
-

CA_PROP_EVENT_MOUSE_X

-
#define CA_PROP_EVENT_MOUSE_X                      "event.mouse.x"
-
-

-If this sound event was triggered by a mouse input event, the X -position of the mouse cursor on the screen, formatted as string. -

-
-
-
-

CA_PROP_EVENT_MOUSE_Y

-
#define CA_PROP_EVENT_MOUSE_Y                      "event.mouse.y"
-
-

-If this sound event was triggered by a mouse input event, the Y -position of the mouse cursor on the screen, formatted as string. -

-
-
-
-

CA_PROP_EVENT_MOUSE_HPOS

-
#define CA_PROP_EVENT_MOUSE_HPOS                   "event.mouse.hpos"
-
-

-If this sound event was triggered by a mouse input event, the X -position of the mouse cursor as fractional value between 0 and 1, -formatted as string, 0 reflecting the left side of the screen, 1 -the right side. -

-
-
-
-

CA_PROP_EVENT_MOUSE_VPOS

-
#define CA_PROP_EVENT_MOUSE_VPOS                   "event.mouse.vpos"
-
-

-If this sound event was triggered by a mouse input event, the Y -position of the mouse cursor as fractional value between 0 and 1, -formatted as string, 0 reflecting the top end of the screen, 1 -the bottom end. -

-
-
-
-

CA_PROP_EVENT_MOUSE_BUTTON

-
#define CA_PROP_EVENT_MOUSE_BUTTON                 "event.mouse.button"
-
-

-If this sound event was triggered by a mouse input event, the -number of the mouse button that triggered it, formatted as string. 1 -for left mouse button, 3 for right, 2 for middle. -

-
-
-
-

CA_PROP_WINDOW_NAME

-
#define CA_PROP_WINDOW_NAME                        "window.name"
-
-

-If this sound event was triggered by a window on the screen, the -name of this window as human readable string. -

-
-
-
-

CA_PROP_WINDOW_ID

-
#define CA_PROP_WINDOW_ID                          "window.id"
-
-

-If this sound event was triggered by a window on the screen, some -identification string for this window, so that the sound system can -recognize specific windows. -

-
-
-
-

CA_PROP_WINDOW_ICON

-
#define CA_PROP_WINDOW_ICON                        "window.icon"
-
-

-If this sound event was triggered by a window on the screen, binary -icon data in PNG format for this window. -

-
-
-
-

CA_PROP_WINDOW_ICON_NAME

-
#define CA_PROP_WINDOW_ICON_NAME                   "window.icon_name"
-
-

-If this sound event was triggered by a window on the screen, an -icon name for this window, as defined in the XDG icon naming -specification. -

-
-
-
-

CA_PROP_WINDOW_X11_DISPLAY

-
#define CA_PROP_WINDOW_X11_DISPLAY                 "window.x11.display"
-
-

-If this sound event was triggered by a window on the screen and the -windowing system is X11, the X display name of the window (e.g. ":0"). -

-
-
-
-

CA_PROP_WINDOW_X11_SCREEN

-
#define CA_PROP_WINDOW_X11_SCREEN                  "window.x11.screen"
-
-

-If this sound event was triggered by a window on the screen and the -windowing system is X11, the X screen id of the window formatted as -string (e.g. "0"). -

-
-
-
-

CA_PROP_WINDOW_X11_MONITOR

-
#define CA_PROP_WINDOW_X11_MONITOR                 "window.x11.monitor"
-
-

-If this sound event was triggered by a window on the screen and the -windowing system is X11, the X monitor id of the window formatted as -string (e.g. "0"). -

-
-
-
-

CA_PROP_WINDOW_X11_XID

-
#define CA_PROP_WINDOW_X11_XID                     "window.x11.xid"
-
-

-If this sound event was triggered by a window on the screen and the -windowing system is X11, the XID of the window formatted as string. -

-
-
-
-

CA_PROP_APPLICATION_NAME

-
#define CA_PROP_APPLICATION_NAME                   "application.name"
-
-

-The name of the application this sound event was triggered by as -human readable string. (e.g. "GNU Emacs") Localized if possible and -applicable. -

-
-
-
-

CA_PROP_APPLICATION_ID

-
#define CA_PROP_APPLICATION_ID                     "application.id"
-
-

-An identifier for the program this sound event was triggered -by. (e.g. "org.gnu.emacs"). -

-
-
-
-

CA_PROP_APPLICATION_VERSION

-
#define CA_PROP_APPLICATION_VERSION                "application.version"
-
-

-A version number for the program this sound event was triggered -by. (e.g. "22.2") -

-
-
-
-

CA_PROP_APPLICATION_ICON

-
#define CA_PROP_APPLICATION_ICON                   "application.icon"
-
-

-Binary icon data in PNG format for the application this sound event -is triggered by. -

-
-
-
-

CA_PROP_APPLICATION_ICON_NAME

-
#define CA_PROP_APPLICATION_ICON_NAME              "application.icon_name"
-
-

-An icon name for the application this sound event is triggered by, -as defined in the XDG icon naming specification. -

-
-
-
-

CA_PROP_APPLICATION_LANGUAGE

-
#define CA_PROP_APPLICATION_LANGUAGE               "application.language"
-
-

-The locale string the application that is triggering this sound -event is running in. A POSIX locale string such as de_DEeuro. -

-
-
-
-

CA_PROP_APPLICATION_PROCESS_ID

-
#define CA_PROP_APPLICATION_PROCESS_ID             "application.process.id"
-
-

-The unix PID of the process that is triggering this sound event, formatted as string. -

-
-
-
-

CA_PROP_APPLICATION_PROCESS_BINARY

-
#define CA_PROP_APPLICATION_PROCESS_BINARY         "application.process.binary"
-
-

-The path to the process binary of the process that is triggering this sound event. -

-
-
-
-

CA_PROP_APPLICATION_PROCESS_USER

-
#define CA_PROP_APPLICATION_PROCESS_USER           "application.process.user"
-
-

-The user that owns the process that is triggering this sound event. -

-
-
-
-

CA_PROP_APPLICATION_PROCESS_HOST

-
#define CA_PROP_APPLICATION_PROCESS_HOST           "application.process.host"
-
-

-The host name of the host the process that is triggering this sound event runs on. -

-
-
-
-

CA_PROP_CANBERRA_CACHE_CONTROL

-
#define CA_PROP_CANBERRA_CACHE_CONTROL             "canberra.cache-control"
-
-

-A special property that can be used to control the automatic sound -caching of sounds in the sound server. One of "permanent", -"volatile", "never". "permanent" will cause this sample to be -cached in the server permanently. This is useful for very -frequently used sound events such as those used for input -feedback. "volatile" may be used for cacheing sounds in the sound -server temporarily. They will expire after some time or on cache -pressure. Finally, "never" may be used for sounds that should never -be cached, because they are only generated very seldomly or even -only once at most (such as desktop login sounds). -

-

-If this property is not explicitly passed to ca_context_play() it -will default to "never". If it is not explicitly passed to -ca_context_cache() it will default to "permanent". -

-

-If the list of properties is handed on to the sound server this -property is stripped from it. -

-
-
-
-

CA_PROP_CANBERRA_VOLUME

-
#define CA_PROP_CANBERRA_VOLUME                    "canberra.volume"
-
-

-A special property that can be used to control the volume this -sound event is played in if the backend supports it. A floating -point value for the decibel multiplier for the sound. 0 dB relates -to zero gain, and is the default volume these sounds are played in. -

-

-If the list of properties is handed on to the sound server this -property is stripped from it. -

-
-
-
-

CA_PROP_CANBERRA_XDG_THEME_NAME

-
#define CA_PROP_CANBERRA_XDG_THEME_NAME            "canberra.xdg-theme.name"
-
-

-A special property that can be used to control the XDG sound theme that -is used for this sample. -

-

-If the list of properties is handed on to the sound server this -property is stripped from it. -

-
-
-
-

CA_PROP_CANBERRA_XDG_THEME_OUTPUT_PROFILE

-
#define CA_PROP_CANBERRA_XDG_THEME_OUTPUT_PROFILE  "canberra.xdg-theme.output-profile"
-
-

-A special property that can be used to control the XDG sound theme -output profile that is used for this sample. -

-

-If the list of properties is handed on to the sound server this -property is stripped from it. -

-
-
-
-

ca_context

-
typedef struct ca_context ca_context;
-
-

-A libcanberra context object. -

-
-
-
-

ca_finish_callback_t ()

-
void                (*ca_finish_callback_t)             (ca_context *c,
-                                                         uint32_t id,
-                                                         int error_code,
-                                                         void *userdata);
-

-Playback completion event callback. The context this callback is -called in is undefined, it might or might not be called from a -background thread, and from any stack frame. The code implementing -this function may not call any libcanberra API call from this -callback -- this might result in a deadlock. Instead it may only be -used to asynchronously signal some kind of notification object -(semaphore, message queue, ...). -

-
---- - - - - - - - - - - - - - - - - - - -

c :

The libcanberra context this callback is called for

id :

The numerical id passed to the ca_context_play_full() when starting the event sound playback.

error_code :

A numerical error code describing the reason this callback is called. If CA_SUCCESS is passed in the playback of the event sound was successfully completed.

userdata :

Some arbitrary user data the caller of ca_context_play_full() passed in.
-
-
-
-

ca_context_create ()

-
int                 ca_context_create                   (ca_context **c);
-

-Create an (unconnected) context object. This call will not connect -to the sound system, calling this function might even suceed if no -working driver backend is available. To find out if one is -available call ca_context_open(). -

-
---- - - - - - - - - - - -

c :

A pointer wheere to fill in the newly created context object.

Returns :

0 on success, negative error code on error.
-
-
-
-

ca_context_destroy ()

-
int                 ca_context_destroy                  (ca_context *c);
-

-Destroy a (connected or unconnected) context object. -

-
---- - - - - - - - - - - -

c :

the context to destroy.

Returns :

0 on success, negative error code on error.
-
-
-
-

ca_context_open ()

-
int                 ca_context_open                     (ca_context *c);
-

-Connect the context to the sound system. This call is implicitly -called in ca_context_play() or ca_context_cache() if not called -explicitly. It is recommended to initialize application properties -with ca_context_change_props() before calling this function. -

-
---- - - - - - - - - - - -

c :

the context to connect.

Returns :

0 on success, negative error code on error.
-
-
-
-

ca_context_set_driver ()

-
int                 ca_context_set_driver               (ca_context *c,
-                                                         const char *driver);
-

-Specify the backend driver used. This function may not be called again after -ca_context_open() suceeded. This function might suceed even when -the specified driver backend is not available. Use -ca_context_open() to find out whether the backend is available. -

-
---- - - - - - - - - - - - - - - -

c :

the context to change the backend driver for

driver :

the backend driver to use (e.g. "alsa", "pulse", "null", ...)

Returns :

0 on success, negative error code on error.
-
-
-
-

ca_context_change_device ()

-
int                 ca_context_change_device            (ca_context *c,
-                                                         const char *device);
-

-Specify the backend device to use. This function may be called not be called after -ca_context_open() suceeded. This function might suceed even when -the specified driver backend is not available. Use -ca_context_open() to find out whether the backend is available -

-

-Depending on the backend use this might or might not cause all -currently playing event sounds to be moved to the new device.. -

-
---- - - - - - - - - - - - - - - -

c :

the context to change the backend device for

device :

the backend device to use, in a format that is specific to the backend.

Returns :

0 on success, negative error code on error.
-
-
-
-

ca_context_change_props ()

-
int                 ca_context_change_props             (ca_context *c,
-                                                         ...);
-

-Write one or more string properties to the context object. Requires -final NULL sentinel. Properties set like this will be attached to -both the client object of the sound server and to all event sounds -played or cached. It is recommended to call this function at least -once before calling ca_context_open(), so that the initial -application properties are set properly before the initial -connection to the sound system. This function can be called both -before and after the ca_context_open() call. Properties that have -already been set before will be overwritten. -

-
---- - - - - - - - - - - - - - - -

c :

the context to set the properties on.

... :

the list of string pairs for the properties. Needs to be a NULL terminated list.

Returns :

0 on success, negative error code on error.
-
-
-
-

ca_context_change_props_full ()

-
int                 ca_context_change_props_full        (ca_context *c,
-                                                         ca_proplist *p);
-

-Similar to ca_context_change_props(), but takes a ca_proplist -instead of a variable list of properties. Can be used to set binary -properties such as CA_PROP_APPLICATION_ICON. -

-
---- - - - - - - - - - - - - - - -

c :

the context to set the properties on.

p :

the property list to set.

Returns :

0 on success, negative error code on error.
-
-
-
-

ca_context_play ()

-
int                 ca_context_play                     (ca_context *c,
-                                                         uint32_t id,
-                                                         ...);
-

-Play one event sound. id can be any numeric value which later can -be used to cancel an event sound that is currently being -played. You may use the same id twice or more times if you want to -cancel multiple event sounds with a single ca_context_cancel() call -at once. It is recommended to pass 0 for the id if the event sound -shall never be canceled. If the requested sound is not cached in -the server yet this call might result in the sample being uploaded -temporarily or permanently (this may be controlled with CA_PROP_CANBERRA_CACHE_CONTROL). This function will start playback -in the background. It will not wait until playback -completed. Depending on the backend used a sound that is started -shortly before your application terminates might or might not continue to -play after your application terminated. If you want to make sure -that all sounds finish to play you need to wait synchronously for -the callback function of ca_context_play_full() to be called before you -terminate your application. -

-

-The sample to play is identified by the CA_PROP_EVENT_ID -property. If it is already cached in the server the cached version -is played. The properties passed in this call are merged with the -properties supplied when the sample was cached (if applicable) -and the context properties as set with ca_context_change_props(). -

-

-If CA_PROP_EVENT_ID is not defined the sound file passed in the -CA_PROP_MEDIA_FILENAME is played. -

-

-On Linux/Unix the right sound to play is determined according to -CA_PROP_EVENT_ID, -CA_PROP_APPLICATION_LANGUAGE/CA_PROP_MEDIA_LANGUAGE, the system -locale, CA_PROP_CANBERRA_XDG_THEME_NAME and -CA_PROP_CANBERRA_XDG_THEME_OUTPUT_PROFILE, following the XDG Sound -Theming Specification. On non-Unix systems the native event sound -that matches the XDG sound name in CA_PROP_EVENT_ID is played. -

-
---- - - - - - - - - - - - - - - - - - - -

c :

the context to play the event sound on

id :

an integer id this sound can later be identified with when calling ca_context_cancel() -

... :

additional properties for this sound event.

Returns :

0 on success, negative error code on error.
-
-
-
-

ca_context_play_full ()

-
int                 ca_context_play_full                (ca_context *c,
-                                                         uint32_t id,
-                                                         ca_proplist *p,
-                                                         ca_finish_callback_t cb,
-                                                         void *userdata);
-

-Play one event sound, and call the specified callback function when -completed. See ca_finish_callback_t for the semantics the callback -is called in. Also see ca_context_play(). -

-

-It is guaranteed that the callback is called exactly once if -ca_context_play_full() returns CA_SUCCESS. You thus may safely pass -allocated memory to the callback and assume that it is freed -properly. -

-
---- - - - - - - - - - - - - - - - - - - - - - - -

c :

the context to play the event sound on

id :

an integer id this sound can be later be identified with when calling ca_context_cancel() or when the callback is called.

p :

A property list of properties for this event sound

cb :

A callback to call when this sound event sucessfully finished playing or when an error occured during playback.

Returns :

0 on success, negative error code on error.
-
-
-
-

ca_context_cancel ()

-
int                 ca_context_cancel                   (ca_context *c,
-                                                         uint32_t id);
-

-Cancel one or more event sounds that have been started via -ca_context_play(). If the sound was started with -ca_context_play_full() and a callback function was passed this -might cause this function to be called with CA_ERROR_CANCELED as -error code. -

-
---- - - - - - - - - - - - - - - -

c :

the context to cancel the sounds on

id :

the id that identify the sounds to cancel.

Returns :

0 on success, negative error code on error.
-
-
-
-

ca_context_cache ()

-
int                 ca_context_cache                    (ca_context *c,
-                                                         ...);
-

-Upload the specified sample into the audio server and attach the -specified properties to it. This function will only return after -the sample upload was finished. -

-

-The sound to cache is found with the same algorithm that is used to -find the sounds for ca_context_play(). -

-

-If the backend doesn't support caching sound samples this function -will return CA_ERROR_NOTSUPPORTED. -

-
---- - - - - - - - - - - - - - - -

c :

The context to use for uploading.

... :

The properties for this event sound. Terminated with NULL.

Returns :

0 on success, negative error code on error.
-
-
-
-

ca_context_cache_full ()

-
int                 ca_context_cache_full               (ca_context *c,
-                                                         ca_proplist *p);
-

-Upload the specified sample into the server and attach the -specified properties to it. Similar to ca_context_cache() but takes -a ca_proplist instead of a variable number of arguments. -

-

-If the backend doesn't support caching sound samples this function -will return CA_ERROR_NOTSUPPORTED. -

-
---- - - - - - - - - - - - - - - -

c :

The context to use for uploading.

p :

The property list for this event sound.

Returns :

0 on success, negative error code on error.
-
-
-
-

ca_context_playing ()

-
int                 ca_context_playing                  (ca_context *c,
-                                                         uint32_t id,
-                                                         int *playing);
-

-Check if at least one sound with the specified id is still -playing. Returns 0 in *playing if no sound with this id is playing -anymore or non-zero if there is at least one playing. -

-
---- - - - - - - - - - - - - - - - - - - -

c :

the context to check if sound is still playing

id :

the id that identify the sounds to check

playing :

a pointer to a boolean that will be updated with the play status

Returns :

0 on success, negative error code on error.
-

Since 0.16

-
-
-
-

ca_strerror ()

-
const char *        ca_strerror                         (int code);
-

-Converts a numerical error code as returned by most libcanberra API functions into a human readable error string. -

-
---- - - - - - - - - - - -

code :

Numerical error code as returned by a libcanberra API function

Returns :

a human readable error string.
-
-
-
-

ca_proplist

-
typedef struct ca_proplist ca_proplist;
-
-

-A canberra property list object. Basically a hashtable. -

-
-
-
-

ca_proplist_create ()

-
int                 ca_proplist_create                  (ca_proplist **p);
-

-Allocate a new empty property list. -

-
---- - - - - - - - - - - -

p :

A pointer where to fill in a pointer for the new property list.

Returns :

0 on success, negative error code on error.
-
-
-
-

ca_proplist_destroy ()

-
int                 ca_proplist_destroy                 (ca_proplist *p);
-

-Destroys a property list that was created with ca_proplist_create() earlier. -

-
---- - - - - - - - - - - -

p :

The property list to destroy

Returns :

0 on success, negative error code on error.
-
-
-
-

ca_proplist_sets ()

-
int                 ca_proplist_sets                    (ca_proplist *p,
-                                                         const char *key,
-                                                         const char *value);
-

-Add a new string key/value pair to the property list. -

-
---- - - - - - - - - - - - - - - - - - - -

p :

The property list to add this key/value pair to

key :

The key for this key/value pair

value :

The value for this key/value pair

Returns :

0 on success, negative error code on error.
-
-
-
-

ca_proplist_setf ()

-
int                 ca_proplist_setf                    (ca_proplist *p,
-                                                         const char *key,
-                                                         const char *format,
-                                                         ...);
-

-Much like ca_proplist_sets(): add a new string key/value pair to -the property list. Takes a standard C format string plus arguments -and formats a string of it. -

-
---- - - - - - - - - - - - - - - - - - - - - - - -

p :

The property list to add this key/value pair to

key :

The key for this key/value pair

format :

The format string for the value for this key/value pair

... :

The parameters for the format string

Returns :

0 on success, negative error code on error.
-
-
-
-

ca_proplist_set ()

-
int                 ca_proplist_set                     (ca_proplist *p,
-                                                         const char *key,
-                                                         const void *data,
-                                                         size_t nbytes);
-

-Add a new binary key/value pair to the property list. -

-
---- - - - - - - - - - - - - - - - - - - - - - - -

p :

The property list to add this key/value pair to

key :

The key for this key/value pair

data :

The binary value for this key value pair

nbytes :

The size of thebinary value for this key value pair.

Returns :

0 on success, negative error code on error.
-
-
-
- - - \ No newline at end of file diff --git a/.flatpak-builder/cache/objects/f4/df599c68ccf57c5129d408708728d37c33b3f4c863d730d576fcf9f4ab0cad.file b/.flatpak-builder/cache/objects/f4/df599c68ccf57c5129d408708728d37c33b3f4c863d730d576fcf9f4ab0cad.file deleted file mode 100644 index 2d05b3d..0000000 Binary files a/.flatpak-builder/cache/objects/f4/df599c68ccf57c5129d408708728d37c33b3f4c863d730d576fcf9f4ab0cad.file and /dev/null differ diff --git a/.flatpak-builder/cache/objects/fc/071dcc67602abecac0726c519bddaa8f9aca5ec8ab75c95a8ce8e73505be80.file b/.flatpak-builder/cache/objects/fc/071dcc67602abecac0726c519bddaa8f9aca5ec8ab75c95a8ce8e73505be80.file deleted file mode 100755 index cbbe00a..0000000 --- a/.flatpak-builder/cache/objects/fc/071dcc67602abecac0726c519bddaa8f9aca5ec8ab75c95a8ce8e73505be80.file +++ /dev/null @@ -1,41 +0,0 @@ -# libcanberra-gstreamer.la - a libtool library file -# Generated by libtool (GNU libtool) 2.4.2 -# -# Please DO NOT delete this file! -# It is necessary for linking the library. - -# The name that we can dlopen(3). -dlname='libcanberra-gstreamer.so' - -# Names of this library. -library_names='libcanberra-gstreamer.so libcanberra-gstreamer.so libcanberra-gstreamer.so' - -# The name of the static archive. -old_library='' - -# Linker flags that can not go in dependency_libs. -inherited_linker_flags=' -pthread' - -# Libraries that this one depends upon. -dependency_libs=' -L/app/lib -lgstreamer-1.0 -lgobject-2.0 -lglib-2.0 /app/lib/libcanberra.la -lvorbisfile -lltdl -lm' - -# Names of additional weak libraries provided by this library -weak_library_names='' - -# Version information for libcanberra-gstreamer. -current=0 -age=0 -revision=0 - -# Is this an already installed library? -installed=yes - -# Should we warn about portability when linking against -modules? -shouldnotlink=yes - -# Files to dlopen/dlpreopen -dlopen='' -dlpreopen='' - -# Directory that this library needs to be installed in: -libdir='/app/lib/libcanberra-0.30' diff --git a/.flatpak-builder/ccache/0/CACHEDIR.TAG b/.flatpak-builder/ccache/0/CACHEDIR.TAG deleted file mode 100644 index 874477f..0000000 --- a/.flatpak-builder/ccache/0/CACHEDIR.TAG +++ /dev/null @@ -1,4 +0,0 @@ -Signature: 8a477f597d28d172789f06886806bc55 -# This file is a cache directory tag created by ccache. -# For information about cache directory tags, see: -# http://www.brynosaurus.com/cachedir/ diff --git a/.flatpak-builder/ccache/1/5/stats b/.flatpak-builder/ccache/1/5/stats deleted file mode 100644 index 90eda0b..0000000 --- a/.flatpak-builder/ccache/1/5/stats +++ /dev/null @@ -1,82 +0,0 @@ -0 -0 -1 -0 -1 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -2 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -2 -2 -4 -4 -0 -0 -0 -0 -0 -0 -2 -2 -1 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 diff --git a/.flatpak-builder/ccache/1/CACHEDIR.TAG b/.flatpak-builder/ccache/1/CACHEDIR.TAG deleted file mode 100644 index 874477f..0000000 --- a/.flatpak-builder/ccache/1/CACHEDIR.TAG +++ /dev/null @@ -1,4 +0,0 @@ -Signature: 8a477f597d28d172789f06886806bc55 -# This file is a cache directory tag created by ccache. -# For information about cache directory tags, see: -# http://www.brynosaurus.com/cachedir/ diff --git a/.flatpak-builder/ccache/2/CACHEDIR.TAG b/.flatpak-builder/ccache/2/CACHEDIR.TAG deleted file mode 100644 index 874477f..0000000 --- a/.flatpak-builder/ccache/2/CACHEDIR.TAG +++ /dev/null @@ -1,4 +0,0 @@ -Signature: 8a477f597d28d172789f06886806bc55 -# This file is a cache directory tag created by ccache. -# For information about cache directory tags, see: -# http://www.brynosaurus.com/cachedir/ diff --git a/.flatpak-builder/ccache/3/CACHEDIR.TAG b/.flatpak-builder/ccache/3/CACHEDIR.TAG deleted file mode 100644 index 874477f..0000000 --- a/.flatpak-builder/ccache/3/CACHEDIR.TAG +++ /dev/null @@ -1,4 +0,0 @@ -Signature: 8a477f597d28d172789f06886806bc55 -# This file is a cache directory tag created by ccache. -# For information about cache directory tags, see: -# http://www.brynosaurus.com/cachedir/ diff --git a/.flatpak-builder/ccache/4/CACHEDIR.TAG b/.flatpak-builder/ccache/4/CACHEDIR.TAG deleted file mode 100644 index 874477f..0000000 --- a/.flatpak-builder/ccache/4/CACHEDIR.TAG +++ /dev/null @@ -1,4 +0,0 @@ -Signature: 8a477f597d28d172789f06886806bc55 -# This file is a cache directory tag created by ccache. -# For information about cache directory tags, see: -# http://www.brynosaurus.com/cachedir/ diff --git a/.flatpak-builder/ccache/5/CACHEDIR.TAG b/.flatpak-builder/ccache/5/CACHEDIR.TAG deleted file mode 100644 index 874477f..0000000 --- a/.flatpak-builder/ccache/5/CACHEDIR.TAG +++ /dev/null @@ -1,4 +0,0 @@ -Signature: 8a477f597d28d172789f06886806bc55 -# This file is a cache directory tag created by ccache. -# For information about cache directory tags, see: -# http://www.brynosaurus.com/cachedir/ diff --git a/.flatpak-builder/ccache/6/CACHEDIR.TAG b/.flatpak-builder/ccache/6/CACHEDIR.TAG deleted file mode 100644 index 874477f..0000000 --- a/.flatpak-builder/ccache/6/CACHEDIR.TAG +++ /dev/null @@ -1,4 +0,0 @@ -Signature: 8a477f597d28d172789f06886806bc55 -# This file is a cache directory tag created by ccache. -# For information about cache directory tags, see: -# http://www.brynosaurus.com/cachedir/ diff --git a/.flatpak-builder/ccache/7/CACHEDIR.TAG b/.flatpak-builder/ccache/7/CACHEDIR.TAG deleted file mode 100644 index 874477f..0000000 --- a/.flatpak-builder/ccache/7/CACHEDIR.TAG +++ /dev/null @@ -1,4 +0,0 @@ -Signature: 8a477f597d28d172789f06886806bc55 -# This file is a cache directory tag created by ccache. -# For information about cache directory tags, see: -# http://www.brynosaurus.com/cachedir/ diff --git a/.flatpak-builder/ccache/8/6/stats b/.flatpak-builder/ccache/8/6/stats deleted file mode 100644 index 68c5368..0000000 --- a/.flatpak-builder/ccache/8/6/stats +++ /dev/null @@ -1,82 +0,0 @@ -0 -0 -0 -0 -1 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -1 -1 -0 -2 -0 -0 -0 -0 -0 -0 -2 -0 -1 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 diff --git a/.flatpak-builder/ccache/8/CACHEDIR.TAG b/.flatpak-builder/ccache/8/CACHEDIR.TAG deleted file mode 100644 index 874477f..0000000 --- a/.flatpak-builder/ccache/8/CACHEDIR.TAG +++ /dev/null @@ -1,4 +0,0 @@ -Signature: 8a477f597d28d172789f06886806bc55 -# This file is a cache directory tag created by ccache. -# For information about cache directory tags, see: -# http://www.brynosaurus.com/cachedir/ diff --git a/.flatpak-builder/ccache/9/CACHEDIR.TAG b/.flatpak-builder/ccache/9/CACHEDIR.TAG deleted file mode 100644 index 874477f..0000000 --- a/.flatpak-builder/ccache/9/CACHEDIR.TAG +++ /dev/null @@ -1,4 +0,0 @@ -Signature: 8a477f597d28d172789f06886806bc55 -# This file is a cache directory tag created by ccache. -# For information about cache directory tags, see: -# http://www.brynosaurus.com/cachedir/ diff --git a/.flatpak-builder/ccache/a/CACHEDIR.TAG b/.flatpak-builder/ccache/a/CACHEDIR.TAG deleted file mode 100644 index 874477f..0000000 --- a/.flatpak-builder/ccache/a/CACHEDIR.TAG +++ /dev/null @@ -1,4 +0,0 @@ -Signature: 8a477f597d28d172789f06886806bc55 -# This file is a cache directory tag created by ccache. -# For information about cache directory tags, see: -# http://www.brynosaurus.com/cachedir/ diff --git a/.flatpak-builder/ccache/b/CACHEDIR.TAG b/.flatpak-builder/ccache/b/CACHEDIR.TAG deleted file mode 100644 index 874477f..0000000 --- a/.flatpak-builder/ccache/b/CACHEDIR.TAG +++ /dev/null @@ -1,4 +0,0 @@ -Signature: 8a477f597d28d172789f06886806bc55 -# This file is a cache directory tag created by ccache. -# For information about cache directory tags, see: -# http://www.brynosaurus.com/cachedir/ diff --git a/.flatpak-builder/ccache/bin/c++ b/.flatpak-builder/ccache/bin/c++ deleted file mode 120000 index 2329eb0..0000000 --- a/.flatpak-builder/ccache/bin/c++ +++ /dev/null @@ -1 +0,0 @@ -/usr/bin/ccache \ No newline at end of file diff --git a/.flatpak-builder/ccache/bin/cc b/.flatpak-builder/ccache/bin/cc deleted file mode 120000 index 2329eb0..0000000 --- a/.flatpak-builder/ccache/bin/cc +++ /dev/null @@ -1 +0,0 @@ -/usr/bin/ccache \ No newline at end of file diff --git a/.flatpak-builder/ccache/bin/g++ b/.flatpak-builder/ccache/bin/g++ deleted file mode 120000 index 2329eb0..0000000 --- a/.flatpak-builder/ccache/bin/g++ +++ /dev/null @@ -1 +0,0 @@ -/usr/bin/ccache \ No newline at end of file diff --git a/.flatpak-builder/ccache/bin/gcc b/.flatpak-builder/ccache/bin/gcc deleted file mode 120000 index 2329eb0..0000000 --- a/.flatpak-builder/ccache/bin/gcc +++ /dev/null @@ -1 +0,0 @@ -/usr/bin/ccache \ No newline at end of file diff --git a/.flatpak-builder/ccache/c/9/stats b/.flatpak-builder/ccache/c/9/stats deleted file mode 100644 index 5203da7..0000000 --- a/.flatpak-builder/ccache/c/9/stats +++ /dev/null @@ -1,82 +0,0 @@ -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -1 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 diff --git a/.flatpak-builder/ccache/c/CACHEDIR.TAG b/.flatpak-builder/ccache/c/CACHEDIR.TAG deleted file mode 100644 index 874477f..0000000 --- a/.flatpak-builder/ccache/c/CACHEDIR.TAG +++ /dev/null @@ -1,4 +0,0 @@ -Signature: 8a477f597d28d172789f06886806bc55 -# This file is a cache directory tag created by ccache. -# For information about cache directory tags, see: -# http://www.brynosaurus.com/cachedir/ diff --git a/.flatpak-builder/ccache/d/CACHEDIR.TAG b/.flatpak-builder/ccache/d/CACHEDIR.TAG deleted file mode 100644 index 874477f..0000000 --- a/.flatpak-builder/ccache/d/CACHEDIR.TAG +++ /dev/null @@ -1,4 +0,0 @@ -Signature: 8a477f597d28d172789f06886806bc55 -# This file is a cache directory tag created by ccache. -# For information about cache directory tags, see: -# http://www.brynosaurus.com/cachedir/ diff --git a/.flatpak-builder/ccache/e/CACHEDIR.TAG b/.flatpak-builder/ccache/e/CACHEDIR.TAG deleted file mode 100644 index 874477f..0000000 --- a/.flatpak-builder/ccache/e/CACHEDIR.TAG +++ /dev/null @@ -1,4 +0,0 @@ -Signature: 8a477f597d28d172789f06886806bc55 -# This file is a cache directory tag created by ccache. -# For information about cache directory tags, see: -# http://www.brynosaurus.com/cachedir/ diff --git a/.flatpak-builder/ccache/f/7/stats b/.flatpak-builder/ccache/f/7/stats deleted file mode 100644 index cd47901..0000000 --- a/.flatpak-builder/ccache/f/7/stats +++ /dev/null @@ -1,82 +0,0 @@ -0 -0 -0 -0 -1 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -1 -0 -0 -0 -0 -0 -0 -0 -0 -1 -0 -0 -0 -0 -1 -1 -0 -2 -0 -0 -0 -0 -0 -0 -2 -0 -1 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 -0 diff --git a/.flatpak-builder/ccache/f/CACHEDIR.TAG b/.flatpak-builder/ccache/f/CACHEDIR.TAG deleted file mode 100644 index 874477f..0000000 --- a/.flatpak-builder/ccache/f/CACHEDIR.TAG +++ /dev/null @@ -1,4 +0,0 @@ -Signature: 8a477f597d28d172789f06886806bc55 -# This file is a cache directory tag created by ccache. -# For information about cache directory tags, see: -# http://www.brynosaurus.com/cachedir/ diff --git a/.flatpak-builder/downloads/67c74d94196b153b774ab9f89b2fa6c6ba79352407037c8c14d5aeb334e959cd/intltool-0.51.0.tar.gz b/.flatpak-builder/downloads/67c74d94196b153b774ab9f89b2fa6c6ba79352407037c8c14d5aeb334e959cd/intltool-0.51.0.tar.gz deleted file mode 100644 index 8886050..0000000 Binary files a/.flatpak-builder/downloads/67c74d94196b153b774ab9f89b2fa6c6ba79352407037c8c14d5aeb334e959cd/intltool-0.51.0.tar.gz and /dev/null differ diff --git a/.flatpak-builder/downloads/c2b671e67e0c288a69fc33dc1b6f1b534d07882c2aceed37004bf48c601afa72/libcanberra-0.30.tar.xz b/.flatpak-builder/downloads/c2b671e67e0c288a69fc33dc1b6f1b534d07882c2aceed37004bf48c601afa72/libcanberra-0.30.tar.xz deleted file mode 100644 index b9d5d0d..0000000 Binary files a/.flatpak-builder/downloads/c2b671e67e0c288a69fc33dc1b6f1b534d07882c2aceed37004bf48c601afa72/libcanberra-0.30.tar.xz and /dev/null differ diff --git a/.flatpak-builder/downloads/cb518b20eef05ec2e82dda1fa89a292c1760dc023aba91b8aa69bafac85e8a14/sound-theme-freedesktop-0.8.tar.bz2 b/.flatpak-builder/downloads/cb518b20eef05ec2e82dda1fa89a292c1760dc023aba91b8aa69bafac85e8a14/sound-theme-freedesktop-0.8.tar.bz2 deleted file mode 100644 index 313e466..0000000 Binary files a/.flatpak-builder/downloads/cb518b20eef05ec2e82dda1fa89a292c1760dc023aba91b8aa69bafac85e8a14/sound-theme-freedesktop-0.8.tar.bz2 and /dev/null differ diff --git a/.flatpak-builder/git/https_gitlab.gnome.org_GNOME_gsound.git/FETCH_HEAD b/.flatpak-builder/git/https_gitlab.gnome.org_GNOME_gsound.git/FETCH_HEAD deleted file mode 100644 index 18bd8bf..0000000 --- a/.flatpak-builder/git/https_gitlab.gnome.org_GNOME_gsound.git/FETCH_HEAD +++ /dev/null @@ -1,2 +0,0 @@ -95d36d60cf53e0e7c5d5325e0f1f4fc765a611ae branch 'master' of https://gitlab.gnome.org/GNOME/gsound -258de1316d7aad9dfc3ec1369d607852d3e0b2b7 not-for-merge tag '1.0.3' of https://gitlab.gnome.org/GNOME/gsound diff --git a/.flatpak-builder/git/https_gitlab.gnome.org_GNOME_gsound.git/HEAD b/.flatpak-builder/git/https_gitlab.gnome.org_GNOME_gsound.git/HEAD deleted file mode 100644 index cb089cd..0000000 --- a/.flatpak-builder/git/https_gitlab.gnome.org_GNOME_gsound.git/HEAD +++ /dev/null @@ -1 +0,0 @@ -ref: refs/heads/master diff --git a/.flatpak-builder/git/https_gitlab.gnome.org_GNOME_gsound.git/config b/.flatpak-builder/git/https_gitlab.gnome.org_GNOME_gsound.git/config deleted file mode 100644 index ee8801d..0000000 --- a/.flatpak-builder/git/https_gitlab.gnome.org_GNOME_gsound.git/config +++ /dev/null @@ -1,9 +0,0 @@ -[core] - repositoryformatversion = 0 - filemode = true - bare = true -[remote "origin"] - url = https://gitlab.gnome.org/GNOME/gsound.git - fetch = +refs/*:refs/* -[transfer] - fsckObjects = 1 diff --git a/.flatpak-builder/git/https_gitlab.gnome.org_GNOME_gsound.git/description b/.flatpak-builder/git/https_gitlab.gnome.org_GNOME_gsound.git/description deleted file mode 100644 index 498b267..0000000 --- a/.flatpak-builder/git/https_gitlab.gnome.org_GNOME_gsound.git/description +++ /dev/null @@ -1 +0,0 @@ -Unnamed repository; edit this file 'description' to name the repository. diff --git a/.flatpak-builder/git/https_gitlab.gnome.org_GNOME_gsound.git/hooks/applypatch-msg.sample b/.flatpak-builder/git/https_gitlab.gnome.org_GNOME_gsound.git/hooks/applypatch-msg.sample deleted file mode 100755 index a5d7b84..0000000 --- a/.flatpak-builder/git/https_gitlab.gnome.org_GNOME_gsound.git/hooks/applypatch-msg.sample +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh -# -# An example hook script to check the commit log message taken by -# applypatch from an e-mail message. -# -# The hook should exit with non-zero status after issuing an -# appropriate message if it wants to stop the commit. The hook is -# allowed to edit the commit message file. -# -# To enable this hook, rename this file to "applypatch-msg". - -. git-sh-setup -commitmsg="$(git rev-parse --git-path hooks/commit-msg)" -test -x "$commitmsg" && exec "$commitmsg" ${1+"$@"} -: diff --git a/.flatpak-builder/git/https_gitlab.gnome.org_GNOME_gsound.git/hooks/commit-msg.sample b/.flatpak-builder/git/https_gitlab.gnome.org_GNOME_gsound.git/hooks/commit-msg.sample deleted file mode 100755 index b58d118..0000000 --- a/.flatpak-builder/git/https_gitlab.gnome.org_GNOME_gsound.git/hooks/commit-msg.sample +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/sh -# -# An example hook script to check the commit log message. -# Called by "git commit" with one argument, the name of the file -# that has the commit message. The hook should exit with non-zero -# status after issuing an appropriate message if it wants to stop the -# commit. The hook is allowed to edit the commit message file. -# -# To enable this hook, rename this file to "commit-msg". - -# Uncomment the below to add a Signed-off-by line to the message. -# Doing this in a hook is a bad idea in general, but the prepare-commit-msg -# hook is more suited to it. -# -# SOB=$(git var GIT_AUTHOR_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p') -# grep -qs "^$SOB" "$1" || echo "$SOB" >> "$1" - -# This example catches duplicate Signed-off-by lines. - -test "" = "$(grep '^Signed-off-by: ' "$1" | - sort | uniq -c | sed -e '/^[ ]*1[ ]/d')" || { - echo >&2 Duplicate Signed-off-by lines. - exit 1 -} diff --git a/.flatpak-builder/git/https_gitlab.gnome.org_GNOME_gsound.git/hooks/fsmonitor-watchman.sample b/.flatpak-builder/git/https_gitlab.gnome.org_GNOME_gsound.git/hooks/fsmonitor-watchman.sample deleted file mode 100755 index 23e856f..0000000 --- a/.flatpak-builder/git/https_gitlab.gnome.org_GNOME_gsound.git/hooks/fsmonitor-watchman.sample +++ /dev/null @@ -1,174 +0,0 @@ -#!/usr/bin/perl - -use strict; -use warnings; -use IPC::Open2; - -# An example hook script to integrate Watchman -# (https://facebook.github.io/watchman/) with git to speed up detecting -# new and modified files. -# -# The hook is passed a version (currently 2) and last update token -# formatted as a string and outputs to stdout a new update token and -# all files that have been modified since the update token. Paths must -# be relative to the root of the working tree and separated by a single NUL. -# -# To enable this hook, rename this file to "query-watchman" and set -# 'git config core.fsmonitor .git/hooks/query-watchman' -# -my ($version, $last_update_token) = @ARGV; - -# Uncomment for debugging -# print STDERR "$0 $version $last_update_token\n"; - -# Check the hook interface version -if ($version ne 2) { - die "Unsupported query-fsmonitor hook version '$version'.\n" . - "Falling back to scanning...\n"; -} - -my $git_work_tree = get_working_dir(); - -my $retry = 1; - -my $json_pkg; -eval { - require JSON::XS; - $json_pkg = "JSON::XS"; - 1; -} or do { - require JSON::PP; - $json_pkg = "JSON::PP"; -}; - -launch_watchman(); - -sub launch_watchman { - my $o = watchman_query(); - if (is_work_tree_watched($o)) { - output_result($o->{clock}, @{$o->{files}}); - } -} - -sub output_result { - my ($clockid, @files) = @_; - - # Uncomment for debugging watchman output - # open (my $fh, ">", ".git/watchman-output.out"); - # binmode $fh, ":utf8"; - # print $fh "$clockid\n@files\n"; - # close $fh; - - binmode STDOUT, ":utf8"; - print $clockid; - print "\0"; - local $, = "\0"; - print @files; -} - -sub watchman_clock { - my $response = qx/watchman clock "$git_work_tree"/; - die "Failed to get clock id on '$git_work_tree'.\n" . - "Falling back to scanning...\n" if $? != 0; - - return $json_pkg->new->utf8->decode($response); -} - -sub watchman_query { - my $pid = open2(\*CHLD_OUT, \*CHLD_IN, 'watchman -j --no-pretty') - or die "open2() failed: $!\n" . - "Falling back to scanning...\n"; - - # In the query expression below we're asking for names of files that - # changed since $last_update_token but not from the .git folder. - # - # To accomplish this, we're using the "since" generator to use the - # recency index to select candidate nodes and "fields" to limit the - # output to file names only. Then we're using the "expression" term to - # further constrain the results. - my $last_update_line = ""; - if (substr($last_update_token, 0, 1) eq "c") { - $last_update_token = "\"$last_update_token\""; - $last_update_line = qq[\n"since": $last_update_token,]; - } - my $query = <<" END"; - ["query", "$git_work_tree", {$last_update_line - "fields": ["name"], - "expression": ["not", ["dirname", ".git"]] - }] - END - - # Uncomment for debugging the watchman query - # open (my $fh, ">", ".git/watchman-query.json"); - # print $fh $query; - # close $fh; - - print CHLD_IN $query; - close CHLD_IN; - my $response = do {local $/; }; - - # Uncomment for debugging the watch response - # open ($fh, ">", ".git/watchman-response.json"); - # print $fh $response; - # close $fh; - - die "Watchman: command returned no output.\n" . - "Falling back to scanning...\n" if $response eq ""; - die "Watchman: command returned invalid output: $response\n" . - "Falling back to scanning...\n" unless $response =~ /^\{/; - - return $json_pkg->new->utf8->decode($response); -} - -sub is_work_tree_watched { - my ($output) = @_; - my $error = $output->{error}; - if ($retry > 0 and $error and $error =~ m/unable to resolve root .* directory (.*) is not watched/) { - $retry--; - my $response = qx/watchman watch "$git_work_tree"/; - die "Failed to make watchman watch '$git_work_tree'.\n" . - "Falling back to scanning...\n" if $? != 0; - $output = $json_pkg->new->utf8->decode($response); - $error = $output->{error}; - die "Watchman: $error.\n" . - "Falling back to scanning...\n" if $error; - - # Uncomment for debugging watchman output - # open (my $fh, ">", ".git/watchman-output.out"); - # close $fh; - - # Watchman will always return all files on the first query so - # return the fast "everything is dirty" flag to git and do the - # Watchman query just to get it over with now so we won't pay - # the cost in git to look up each individual file. - my $o = watchman_clock(); - $error = $output->{error}; - - die "Watchman: $error.\n" . - "Falling back to scanning...\n" if $error; - - output_result($o->{clock}, ("/")); - $last_update_token = $o->{clock}; - - eval { launch_watchman() }; - return 0; - } - - die "Watchman: $error.\n" . - "Falling back to scanning...\n" if $error; - - return 1; -} - -sub get_working_dir { - my $working_dir; - if ($^O =~ 'msys' || $^O =~ 'cygwin') { - $working_dir = Win32::GetCwd(); - $working_dir =~ tr/\\/\//; - } else { - require Cwd; - $working_dir = Cwd::cwd(); - } - - return $working_dir; -} diff --git a/.flatpak-builder/git/https_gitlab.gnome.org_GNOME_gsound.git/hooks/post-update.sample b/.flatpak-builder/git/https_gitlab.gnome.org_GNOME_gsound.git/hooks/post-update.sample deleted file mode 100755 index ec17ec1..0000000 --- a/.flatpak-builder/git/https_gitlab.gnome.org_GNOME_gsound.git/hooks/post-update.sample +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/sh -# -# An example hook script to prepare a packed repository for use over -# dumb transports. -# -# To enable this hook, rename this file to "post-update". - -exec git update-server-info diff --git a/.flatpak-builder/git/https_gitlab.gnome.org_GNOME_gsound.git/hooks/pre-applypatch.sample b/.flatpak-builder/git/https_gitlab.gnome.org_GNOME_gsound.git/hooks/pre-applypatch.sample deleted file mode 100755 index 4142082..0000000 --- a/.flatpak-builder/git/https_gitlab.gnome.org_GNOME_gsound.git/hooks/pre-applypatch.sample +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/sh -# -# An example hook script to verify what is about to be committed -# by applypatch from an e-mail message. -# -# The hook should exit with non-zero status after issuing an -# appropriate message if it wants to stop the commit. -# -# To enable this hook, rename this file to "pre-applypatch". - -. git-sh-setup -precommit="$(git rev-parse --git-path hooks/pre-commit)" -test -x "$precommit" && exec "$precommit" ${1+"$@"} -: diff --git a/.flatpak-builder/git/https_gitlab.gnome.org_GNOME_gsound.git/hooks/pre-commit.sample b/.flatpak-builder/git/https_gitlab.gnome.org_GNOME_gsound.git/hooks/pre-commit.sample deleted file mode 100755 index e144712..0000000 --- a/.flatpak-builder/git/https_gitlab.gnome.org_GNOME_gsound.git/hooks/pre-commit.sample +++ /dev/null @@ -1,49 +0,0 @@ -#!/bin/sh -# -# An example hook script to verify what is about to be committed. -# Called by "git commit" with no arguments. The hook should -# exit with non-zero status after issuing an appropriate message if -# it wants to stop the commit. -# -# To enable this hook, rename this file to "pre-commit". - -if git rev-parse --verify HEAD >/dev/null 2>&1 -then - against=HEAD -else - # Initial commit: diff against an empty tree object - against=$(git hash-object -t tree /dev/null) -fi - -# If you want to allow non-ASCII filenames set this variable to true. -allownonascii=$(git config --type=bool hooks.allownonascii) - -# Redirect output to stderr. -exec 1>&2 - -# Cross platform projects tend to avoid non-ASCII filenames; prevent -# them from being added to the repository. We exploit the fact that the -# printable range starts at the space character and ends with tilde. -if [ "$allownonascii" != "true" ] && - # Note that the use of brackets around a tr range is ok here, (it's - # even required, for portability to Solaris 10's /usr/bin/tr), since - # the square bracket bytes happen to fall in the designated range. - test $(git diff --cached --name-only --diff-filter=A -z $against | - LC_ALL=C tr -d '[ -~]\0' | wc -c) != 0 -then - cat <<\EOF -Error: Attempt to add a non-ASCII file name. - -This can cause problems if you want to work with people on other platforms. - -To be portable it is advisable to rename the file. - -If you know what you are doing you can disable this check using: - - git config hooks.allownonascii true -EOF - exit 1 -fi - -# If there are whitespace errors, print the offending file names and fail. -exec git diff-index --check --cached $against -- diff --git a/.flatpak-builder/git/https_gitlab.gnome.org_GNOME_gsound.git/hooks/pre-merge-commit.sample b/.flatpak-builder/git/https_gitlab.gnome.org_GNOME_gsound.git/hooks/pre-merge-commit.sample deleted file mode 100755 index 399eab1..0000000 --- a/.flatpak-builder/git/https_gitlab.gnome.org_GNOME_gsound.git/hooks/pre-merge-commit.sample +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/sh -# -# An example hook script to verify what is about to be committed. -# Called by "git merge" with no arguments. The hook should -# exit with non-zero status after issuing an appropriate message to -# stderr if it wants to stop the merge commit. -# -# To enable this hook, rename this file to "pre-merge-commit". - -. git-sh-setup -test -x "$GIT_DIR/hooks/pre-commit" && - exec "$GIT_DIR/hooks/pre-commit" -: diff --git a/.flatpak-builder/git/https_gitlab.gnome.org_GNOME_gsound.git/hooks/pre-push.sample b/.flatpak-builder/git/https_gitlab.gnome.org_GNOME_gsound.git/hooks/pre-push.sample deleted file mode 100755 index 4ce688d..0000000 --- a/.flatpak-builder/git/https_gitlab.gnome.org_GNOME_gsound.git/hooks/pre-push.sample +++ /dev/null @@ -1,53 +0,0 @@ -#!/bin/sh - -# An example hook script to verify what is about to be pushed. Called by "git -# push" after it has checked the remote status, but before anything has been -# pushed. If this script exits with a non-zero status nothing will be pushed. -# -# This hook is called with the following parameters: -# -# $1 -- Name of the remote to which the push is being done -# $2 -- URL to which the push is being done -# -# If pushing without using a named remote those arguments will be equal. -# -# Information about the commits which are being pushed is supplied as lines to -# the standard input in the form: -# -# -# -# This sample shows how to prevent push of commits where the log message starts -# with "WIP" (work in progress). - -remote="$1" -url="$2" - -zero=$(git hash-object --stdin &2 "Found WIP commit in $local_ref, not pushing" - exit 1 - fi - fi -done - -exit 0 diff --git a/.flatpak-builder/git/https_gitlab.gnome.org_GNOME_gsound.git/hooks/pre-rebase.sample b/.flatpak-builder/git/https_gitlab.gnome.org_GNOME_gsound.git/hooks/pre-rebase.sample deleted file mode 100755 index 6cbef5c..0000000 --- a/.flatpak-builder/git/https_gitlab.gnome.org_GNOME_gsound.git/hooks/pre-rebase.sample +++ /dev/null @@ -1,169 +0,0 @@ -#!/bin/sh -# -# Copyright (c) 2006, 2008 Junio C Hamano -# -# The "pre-rebase" hook is run just before "git rebase" starts doing -# its job, and can prevent the command from running by exiting with -# non-zero status. -# -# The hook is called with the following parameters: -# -# $1 -- the upstream the series was forked from. -# $2 -- the branch being rebased (or empty when rebasing the current branch). -# -# This sample shows how to prevent topic branches that are already -# merged to 'next' branch from getting rebased, because allowing it -# would result in rebasing already published history. - -publish=next -basebranch="$1" -if test "$#" = 2 -then - topic="refs/heads/$2" -else - topic=`git symbolic-ref HEAD` || - exit 0 ;# we do not interrupt rebasing detached HEAD -fi - -case "$topic" in -refs/heads/??/*) - ;; -*) - exit 0 ;# we do not interrupt others. - ;; -esac - -# Now we are dealing with a topic branch being rebased -# on top of master. Is it OK to rebase it? - -# Does the topic really exist? -git show-ref -q "$topic" || { - echo >&2 "No such branch $topic" - exit 1 -} - -# Is topic fully merged to master? -not_in_master=`git rev-list --pretty=oneline ^master "$topic"` -if test -z "$not_in_master" -then - echo >&2 "$topic is fully merged to master; better remove it." - exit 1 ;# we could allow it, but there is no point. -fi - -# Is topic ever merged to next? If so you should not be rebasing it. -only_next_1=`git rev-list ^master "^$topic" ${publish} | sort` -only_next_2=`git rev-list ^master ${publish} | sort` -if test "$only_next_1" = "$only_next_2" -then - not_in_topic=`git rev-list "^$topic" master` - if test -z "$not_in_topic" - then - echo >&2 "$topic is already up to date with master" - exit 1 ;# we could allow it, but there is no point. - else - exit 0 - fi -else - not_in_next=`git rev-list --pretty=oneline ^${publish} "$topic"` - /usr/bin/perl -e ' - my $topic = $ARGV[0]; - my $msg = "* $topic has commits already merged to public branch:\n"; - my (%not_in_next) = map { - /^([0-9a-f]+) /; - ($1 => 1); - } split(/\n/, $ARGV[1]); - for my $elem (map { - /^([0-9a-f]+) (.*)$/; - [$1 => $2]; - } split(/\n/, $ARGV[2])) { - if (!exists $not_in_next{$elem->[0]}) { - if ($msg) { - print STDERR $msg; - undef $msg; - } - print STDERR " $elem->[1]\n"; - } - } - ' "$topic" "$not_in_next" "$not_in_master" - exit 1 -fi - -<<\DOC_END - -This sample hook safeguards topic branches that have been -published from being rewound. - -The workflow assumed here is: - - * Once a topic branch forks from "master", "master" is never - merged into it again (either directly or indirectly). - - * Once a topic branch is fully cooked and merged into "master", - it is deleted. If you need to build on top of it to correct - earlier mistakes, a new topic branch is created by forking at - the tip of the "master". This is not strictly necessary, but - it makes it easier to keep your history simple. - - * Whenever you need to test or publish your changes to topic - branches, merge them into "next" branch. - -The script, being an example, hardcodes the publish branch name -to be "next", but it is trivial to make it configurable via -$GIT_DIR/config mechanism. - -With this workflow, you would want to know: - -(1) ... if a topic branch has ever been merged to "next". Young - topic branches can have stupid mistakes you would rather - clean up before publishing, and things that have not been - merged into other branches can be easily rebased without - affecting other people. But once it is published, you would - not want to rewind it. - -(2) ... if a topic branch has been fully merged to "master". - Then you can delete it. More importantly, you should not - build on top of it -- other people may already want to - change things related to the topic as patches against your - "master", so if you need further changes, it is better to - fork the topic (perhaps with the same name) afresh from the - tip of "master". - -Let's look at this example: - - o---o---o---o---o---o---o---o---o---o "next" - / / / / - / a---a---b A / / - / / / / - / / c---c---c---c B / - / / / \ / - / / / b---b C \ / - / / / / \ / - ---o---o---o---o---o---o---o---o---o---o---o "master" - - -A, B and C are topic branches. - - * A has one fix since it was merged up to "next". - - * B has finished. It has been fully merged up to "master" and "next", - and is ready to be deleted. - - * C has not merged to "next" at all. - -We would want to allow C to be rebased, refuse A, and encourage -B to be deleted. - -To compute (1): - - git rev-list ^master ^topic next - git rev-list ^master next - - if these match, topic has not merged in next at all. - -To compute (2): - - git rev-list master..topic - - if this is empty, it is fully merged to "master". - -DOC_END diff --git a/.flatpak-builder/git/https_gitlab.gnome.org_GNOME_gsound.git/hooks/pre-receive.sample b/.flatpak-builder/git/https_gitlab.gnome.org_GNOME_gsound.git/hooks/pre-receive.sample deleted file mode 100755 index a1fd29e..0000000 --- a/.flatpak-builder/git/https_gitlab.gnome.org_GNOME_gsound.git/hooks/pre-receive.sample +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/sh -# -# An example hook script to make use of push options. -# The example simply echoes all push options that start with 'echoback=' -# and rejects all pushes when the "reject" push option is used. -# -# To enable this hook, rename this file to "pre-receive". - -if test -n "$GIT_PUSH_OPTION_COUNT" -then - i=0 - while test "$i" -lt "$GIT_PUSH_OPTION_COUNT" - do - eval "value=\$GIT_PUSH_OPTION_$i" - case "$value" in - echoback=*) - echo "echo from the pre-receive-hook: ${value#*=}" >&2 - ;; - reject) - exit 1 - esac - i=$((i + 1)) - done -fi diff --git a/.flatpak-builder/git/https_gitlab.gnome.org_GNOME_gsound.git/hooks/prepare-commit-msg.sample b/.flatpak-builder/git/https_gitlab.gnome.org_GNOME_gsound.git/hooks/prepare-commit-msg.sample deleted file mode 100755 index 10fa14c..0000000 --- a/.flatpak-builder/git/https_gitlab.gnome.org_GNOME_gsound.git/hooks/prepare-commit-msg.sample +++ /dev/null @@ -1,42 +0,0 @@ -#!/bin/sh -# -# An example hook script to prepare the commit log message. -# Called by "git commit" with the name of the file that has the -# commit message, followed by the description of the commit -# message's source. The hook's purpose is to edit the commit -# message file. If the hook fails with a non-zero status, -# the commit is aborted. -# -# To enable this hook, rename this file to "prepare-commit-msg". - -# This hook includes three examples. The first one removes the -# "# Please enter the commit message..." help message. -# -# The second includes the output of "git diff --name-status -r" -# into the message, just before the "git status" output. It is -# commented because it doesn't cope with --amend or with squashed -# commits. -# -# The third example adds a Signed-off-by line to the message, that can -# still be edited. This is rarely a good idea. - -COMMIT_MSG_FILE=$1 -COMMIT_SOURCE=$2 -SHA1=$3 - -/usr/bin/perl -i.bak -ne 'print unless(m/^. Please enter the commit message/..m/^#$/)' "$COMMIT_MSG_FILE" - -# case "$COMMIT_SOURCE,$SHA1" in -# ,|template,) -# /usr/bin/perl -i.bak -pe ' -# print "\n" . `git diff --cached --name-status -r` -# if /^#/ && $first++ == 0' "$COMMIT_MSG_FILE" ;; -# *) ;; -# esac - -# SOB=$(git var GIT_COMMITTER_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p') -# git interpret-trailers --in-place --trailer "$SOB" "$COMMIT_MSG_FILE" -# if test -z "$COMMIT_SOURCE" -# then -# /usr/bin/perl -i.bak -pe 'print "\n" if !$first_line++' "$COMMIT_MSG_FILE" -# fi diff --git a/.flatpak-builder/git/https_gitlab.gnome.org_GNOME_gsound.git/hooks/push-to-checkout.sample b/.flatpak-builder/git/https_gitlab.gnome.org_GNOME_gsound.git/hooks/push-to-checkout.sample deleted file mode 100755 index af5a0c0..0000000 --- a/.flatpak-builder/git/https_gitlab.gnome.org_GNOME_gsound.git/hooks/push-to-checkout.sample +++ /dev/null @@ -1,78 +0,0 @@ -#!/bin/sh - -# An example hook script to update a checked-out tree on a git push. -# -# This hook is invoked by git-receive-pack(1) when it reacts to git -# push and updates reference(s) in its repository, and when the push -# tries to update the branch that is currently checked out and the -# receive.denyCurrentBranch configuration variable is set to -# updateInstead. -# -# By default, such a push is refused if the working tree and the index -# of the remote repository has any difference from the currently -# checked out commit; when both the working tree and the index match -# the current commit, they are updated to match the newly pushed tip -# of the branch. This hook is to be used to override the default -# behaviour; however the code below reimplements the default behaviour -# as a starting point for convenient modification. -# -# The hook receives the commit with which the tip of the current -# branch is going to be updated: -commit=$1 - -# It can exit with a non-zero status to refuse the push (when it does -# so, it must not modify the index or the working tree). -die () { - echo >&2 "$*" - exit 1 -} - -# Or it can make any necessary changes to the working tree and to the -# index to bring them to the desired state when the tip of the current -# branch is updated to the new commit, and exit with a zero status. -# -# For example, the hook can simply run git read-tree -u -m HEAD "$1" -# in order to emulate git fetch that is run in the reverse direction -# with git push, as the two-tree form of git read-tree -u -m is -# essentially the same as git switch or git checkout that switches -# branches while keeping the local changes in the working tree that do -# not interfere with the difference between the branches. - -# The below is a more-or-less exact translation to shell of the C code -# for the default behaviour for git's push-to-checkout hook defined in -# the push_to_deploy() function in builtin/receive-pack.c. -# -# Note that the hook will be executed from the repository directory, -# not from the working tree, so if you want to perform operations on -# the working tree, you will have to adapt your code accordingly, e.g. -# by adding "cd .." or using relative paths. - -if ! git update-index -q --ignore-submodules --refresh -then - die "Up-to-date check failed" -fi - -if ! git diff-files --quiet --ignore-submodules -- -then - die "Working directory has unstaged changes" -fi - -# This is a rough translation of: -# -# head_has_history() ? "HEAD" : EMPTY_TREE_SHA1_HEX -if git cat-file -e HEAD 2>/dev/null -then - head=HEAD -else - head=$(git hash-object -t tree --stdin &2 - echo " (if you want, you could supply GIT_DIR then run" >&2 - echo " $0 )" >&2 - exit 1 -fi - -if [ -z "$refname" -o -z "$oldrev" -o -z "$newrev" ]; then - echo "usage: $0 " >&2 - exit 1 -fi - -# --- Config -allowunannotated=$(git config --type=bool hooks.allowunannotated) -allowdeletebranch=$(git config --type=bool hooks.allowdeletebranch) -denycreatebranch=$(git config --type=bool hooks.denycreatebranch) -allowdeletetag=$(git config --type=bool hooks.allowdeletetag) -allowmodifytag=$(git config --type=bool hooks.allowmodifytag) - -# check for no description -projectdesc=$(sed -e '1q' "$GIT_DIR/description") -case "$projectdesc" in -"Unnamed repository"* | "") - echo "*** Project description file hasn't been set" >&2 - exit 1 - ;; -esac - -# --- Check types -# if $newrev is 0000...0000, it's a commit to delete a ref. -zero=$(git hash-object --stdin &2 - echo "*** Use 'git tag [ -a | -s ]' for tags you want to propagate." >&2 - exit 1 - fi - ;; - refs/tags/*,delete) - # delete tag - if [ "$allowdeletetag" != "true" ]; then - echo "*** Deleting a tag is not allowed in this repository" >&2 - exit 1 - fi - ;; - refs/tags/*,tag) - # annotated tag - if [ "$allowmodifytag" != "true" ] && git rev-parse $refname > /dev/null 2>&1 - then - echo "*** Tag '$refname' already exists." >&2 - echo "*** Modifying a tag is not allowed in this repository." >&2 - exit 1 - fi - ;; - refs/heads/*,commit) - # branch - if [ "$oldrev" = "$zero" -a "$denycreatebranch" = "true" ]; then - echo "*** Creating a branch is not allowed in this repository" >&2 - exit 1 - fi - ;; - refs/heads/*,delete) - # delete branch - if [ "$allowdeletebranch" != "true" ]; then - echo "*** Deleting a branch is not allowed in this repository" >&2 - exit 1 - fi - ;; - refs/remotes/*,commit) - # tracking branch - ;; - refs/remotes/*,delete) - # delete tracking branch - if [ "$allowdeletebranch" != "true" ]; then - echo "*** Deleting a tracking branch is not allowed in this repository" >&2 - exit 1 - fi - ;; - *) - # Anything else (is there anything else?) - echo "*** Update hook: unknown type of update to ref $refname of type $newrev_type" >&2 - exit 1 - ;; -esac - -# --- Finished -exit 0 diff --git a/.flatpak-builder/git/https_gitlab.gnome.org_GNOME_gsound.git/info/exclude b/.flatpak-builder/git/https_gitlab.gnome.org_GNOME_gsound.git/info/exclude deleted file mode 100644 index a5196d1..0000000 --- a/.flatpak-builder/git/https_gitlab.gnome.org_GNOME_gsound.git/info/exclude +++ /dev/null @@ -1,6 +0,0 @@ -# git ls-files --others --exclude-from=.git/info/exclude -# Lines that start with '#' are comments. -# For a project mostly in C, the following would be a good set of -# exclude patterns (uncomment them if you want to use them): -# *.[oa] -# *~ diff --git a/.flatpak-builder/git/https_gitlab.gnome.org_GNOME_gsound.git/objects/pack/pack-054351548b4d7e5f9035547ca12049f427439aa5.idx b/.flatpak-builder/git/https_gitlab.gnome.org_GNOME_gsound.git/objects/pack/pack-054351548b4d7e5f9035547ca12049f427439aa5.idx deleted file mode 100644 index a19b37a..0000000 Binary files a/.flatpak-builder/git/https_gitlab.gnome.org_GNOME_gsound.git/objects/pack/pack-054351548b4d7e5f9035547ca12049f427439aa5.idx and /dev/null differ diff --git a/.flatpak-builder/git/https_gitlab.gnome.org_GNOME_gsound.git/objects/pack/pack-054351548b4d7e5f9035547ca12049f427439aa5.pack b/.flatpak-builder/git/https_gitlab.gnome.org_GNOME_gsound.git/objects/pack/pack-054351548b4d7e5f9035547ca12049f427439aa5.pack deleted file mode 100644 index b2ec2cc..0000000 Binary files a/.flatpak-builder/git/https_gitlab.gnome.org_GNOME_gsound.git/objects/pack/pack-054351548b4d7e5f9035547ca12049f427439aa5.pack and /dev/null differ diff --git a/.flatpak-builder/git/https_gitlab.gnome.org_GNOME_gsound.git/refs/heads/master b/.flatpak-builder/git/https_gitlab.gnome.org_GNOME_gsound.git/refs/heads/master deleted file mode 100644 index 4a4bb76..0000000 --- a/.flatpak-builder/git/https_gitlab.gnome.org_GNOME_gsound.git/refs/heads/master +++ /dev/null @@ -1 +0,0 @@ -95d36d60cf53e0e7c5d5325e0f1f4fc765a611ae diff --git a/.flatpak-builder/git/https_gitlab.gnome.org_GNOME_gsound.git/refs/tags/1.0.3 b/.flatpak-builder/git/https_gitlab.gnome.org_GNOME_gsound.git/refs/tags/1.0.3 deleted file mode 100644 index 42c3bab..0000000 --- a/.flatpak-builder/git/https_gitlab.gnome.org_GNOME_gsound.git/refs/tags/1.0.3 +++ /dev/null @@ -1 +0,0 @@ -258de1316d7aad9dfc3ec1369d607852d3e0b2b7 diff --git a/.flatpak-builder/git/https_gitlab.gnome.org_GNOME_gsound.git/shallow b/.flatpak-builder/git/https_gitlab.gnome.org_GNOME_gsound.git/shallow deleted file mode 100644 index 4a4bb76..0000000 --- a/.flatpak-builder/git/https_gitlab.gnome.org_GNOME_gsound.git/shallow +++ /dev/null @@ -1 +0,0 @@ -95d36d60cf53e0e7c5d5325e0f1f4fc765a611ae diff --git a/troll b/troll new file mode 160000 index 0000000..e7933a0 --- /dev/null +++ b/troll @@ -0,0 +1 @@ +Subproject commit e7933a083681d23fce0078b0246fcff244af5ac3