/* $Id$ */ /* * Cantus Tag Editor * Copyright © 2002-2004 by Samuel Abels * Copyright © 2007 by Tim Huetz * * 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 3 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, see **/ #ifdef HAVE_CONFIG_H # include #endif #define HAVE_PLUGINWRAPPERS_C #include extern Controller controller; /****************************************************************************** * EventBus functions. ******************************************************************************/ glong eventbus_add_listener(const gchar *pattern, GClosure *closure) { return controller.eventbus->add_listener(pattern, closure); } glong eventbus_add_listener_sigc(const gchar *pattern, sigc::slot slot) { return controller.eventbus->add_listener_sigc(pattern, slot); } void eventbus_remove_listener(gint id) { controller.eventbus->remove_listener(id); } void eventbus_emit(const gchar *name, const GValue *value) { controller.eventbus->emit_event(name, value); } /****************************************************************************** * Preferences functions. ******************************************************************************/ void preferences_set_int(const gchar *key, gint value) { controller.preferences->set_int(key, value); } gint preferences_get_int(const gchar *key) { return controller.preferences->get_int(key); } void preferences_set_bool(const gchar *key, gboolean value) { controller.preferences->set_bool(key, value); } gboolean preferences_get_bool(const gchar *key) { return controller.preferences->get_bool(key); } void preferences_set_char(const gchar *key, const gchar *value) { controller.preferences->set_char(key, value); } const gchar *preferences_get_char(const gchar *key) { return controller.preferences->get_char(key).c_str(); } /****************************************************************************** * FileInfoManager functions. ******************************************************************************/ CantusHash *fileinfomanager_get_info(const gchar *filename) { return controller.fileinfomanager->get_info_locked(filename); } void fileinfomanager_unlock_info(const gchar *filename) { controller.fileinfomanager->unlock(filename); }