add new sigc++2 directory
[ardour.git] / libs / gtkmm2 / gtk / src / targetlist.ccg
1 /* Copyright 2002 The gtkmm Development Team
2  *
3  * This library is free software; you can redistribute it and/or
4  * modify it under the terms of the GNU Library General Public
5  * License as published by the Free Software Foundation; either
6  * version 2 of the License, or (at your option) any later version.
7  *
8  * This library is distributed in the hope that it will be useful,
9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
11  * Library General Public License for more details.
12  *
13  * You should have received a copy of the GNU Library General Public
14  * License along with this library; if not, write to the Free
15  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
16  */
17
18 namespace Gtk
19 {
20
21 Glib::RefPtr<Gtk::TargetList> TargetList::create(const ArrayHandle_TargetEntry& targets)
22 {
23   return Glib::wrap(gtk_target_list_new(targets.data(), targets.size()));
24 }
25
26 void TargetList::add(const ArrayHandle_TargetEntry& targets)
27 {
28   gtk_target_list_add_table(gobj(), targets.data(), targets.size());
29 }
30
31 } // namespace Gtk
32