Install ardour as a binary, a script and a set of shared
[ardour.git] / libs / gtkmm2 / gtk / gtkmm / accelmap.cc
1 // -*- c++ -*-
2 /* $Id$ */
3
4 /* Copyright (C) 2002 The gtkmm Development Team
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Library General Public
8  * License as published by the Free Software Foundation; either
9  * version 2 of the License, or (at your option) any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14  * Library General Public License for more details.
15  *
16  * You should have received a copy of the GNU Library General Public
17  * License along with this library; if not, write to the Free
18  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
19  */
20
21 #include <gtkmm/accelmap.h>
22 #include <gtk/gtkaccelmap.h>
23
24 namespace Gtk
25 {
26
27 namespace AccelMap
28 {
29
30 void add_entry(const std::string& accel_path, 
31                guint accel_key, 
32                Gdk::ModifierType accel_mods)
33 {
34     gtk_accel_map_add_entry(accel_path.c_str(), accel_key,
35                             (GdkModifierType)accel_mods);
36 }
37
38 bool change_entry(const std::string& accel_path, 
39                   guint accel_key, 
40                   Gdk::ModifierType accel_mods,
41                   bool replace)
42 {
43     return gtk_accel_map_change_entry(accel_path.c_str(), accel_key,
44                                       (GdkModifierType)accel_mods, replace);
45 }
46
47 void load(const std::string& filename)
48 {
49   gtk_accel_map_load(filename.c_str());
50 }
51
52 void save(const std::string& filename)
53 {
54   gtk_accel_map_save(filename.c_str());
55 }
56
57 void lock_path(const std::string& accel_path)
58 {
59   gtk_accel_map_lock_path(accel_path.c_str());
60 }
61
62 void unlock_path(const std::string& accel_path)
63 {
64   gtk_accel_map_unlock_path(accel_path.c_str());
65 }
66
67 } // namespace AccelMap
68
69 } // namespace Gtk
70