MIDI branch becomes trunk
[ardour.git] / libs / gtkmm2 / gtk / gtkmm / targetlist.h
1 // -*- c++ -*-
2 // Generated by gtkmmproc -- DO NOT MODIFY!
3 #ifndef _GTKMM_TARGETLIST_H
4 #define _GTKMM_TARGETLIST_H
5
6 #include <glibmm.h>
7
8 /* Copyright(C) 2002 The gtkmm Development Team
9  *
10  * This library is free software, ) you can redistribute it and/or
11  * modify it under the terms of the GNU Library General Public
12  * License as published by the Free Software Foundation, ) either
13  * version 2 of the License, or(at your option) any later version.
14  *
15  * This library is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY, ) without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
18  * Library General Public License for more details.
19  *
20  * You should have received a copy of the GNU Library General Public
21  * License along with this library, ) if not, write to the Free
22  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
23  */
24
25
26 #include <gtkmm/enums.h>
27 #include <gtkmm/targetentry.h>
28 #include <gdkmm/types.h>
29
30
31 namespace Gtk
32 {
33
34 class TargetList
35 {
36   public:
37 #ifndef DOXYGEN_SHOULD_SKIP_THIS
38   typedef TargetList CppObjectType;
39   typedef GtkTargetList BaseObjectType;
40 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
41
42
43   // For use with Glib::RefPtr<> only.
44   void reference()   const;
45   void unreference() const;
46
47   ///Provides access to the underlying C instance.
48   GtkTargetList*       gobj();
49
50   ///Provides access to the underlying C instance.
51   const GtkTargetList* gobj() const;
52
53   ///Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.
54   GtkTargetList* gobj_copy() const;
55
56 protected:
57   // Do not derive this.  Gtk::TargetList can neither be constructed nor deleted.
58   TargetList();
59   void operator delete(void*, size_t);
60
61 private:
62   // noncopyable
63   TargetList(const TargetList&);
64   TargetList& operator=(const TargetList&);
65
66
67 public:
68   static Glib::RefPtr<Gtk::TargetList> create(const ArrayHandle_TargetEntry& targets);
69   
70  
71   void add(const Glib::ustring& target, TargetFlags flags = TargetFlags(0), guint info = 0);
72   void add(const ArrayHandle_TargetEntry& targets);
73   
74   void remove(const Glib::ustring& target);
75   
76   bool find(const Glib::ustring& target, guint* info) const;
77
78
79 };
80
81 } // namespace Gtk
82
83
84 namespace Glib
85 {
86
87   /** @relates Gtk::TargetList
88    * @param object The C instance
89    * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
90    * @result A C++ instance that wraps this C instance.
91    */
92   Glib::RefPtr<Gtk::TargetList> wrap(GtkTargetList* object, bool take_copy = false);
93
94 } // namespace Glib
95
96 #endif /* _GTKMM_TARGETLIST_H */
97