MIDI branch becomes trunk
[ardour.git] / libs / gtkmm2 / gtk / gtkmm / plug.h
1 // -*- c++ -*-
2 // Generated by gtkmmproc -- DO NOT MODIFY!
3 #ifndef _GTKMM_PLUG_H
4 #define _GTKMM_PLUG_H
5
6 #include <glibmm.h>
7
8 /* $Id$ */
9
10 /* Copyright (C) 1998-2002 The gtkmm Development Team
11  *
12  * This library is free software; you can redistribute it and/or
13  * modify it under the terms of the GNU Library General Public
14  * License as published by the Free Software Foundation; either
15  * version 2 of the License, or (at your option) any later version.
16  *
17  * This library is distributed in the hope that it will be useful,
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
20  * Library General Public License for more details.
21  *
22  * You should have received a copy of the GNU Library General Public
23  * License along with this library; if not, write to the Free
24  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
25  */
26
27 #include <gtkmm/window.h>
28
29
30 #ifndef DOXYGEN_SHOULD_SKIP_THIS
31 typedef struct _GtkPlug GtkPlug;
32 typedef struct _GtkPlugClass GtkPlugClass;
33 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
34
35
36 namespace Gtk
37 { class Plug_Class; } // namespace Gtk
38 namespace Gtk
39 {
40
41
42 class Plug : public Window
43 {
44   public:
45 #ifndef DOXYGEN_SHOULD_SKIP_THIS
46   typedef Plug CppObjectType;
47   typedef Plug_Class CppClassType;
48   typedef GtkPlug BaseObjectType;
49   typedef GtkPlugClass BaseClassType;
50 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
51
52   virtual ~Plug();
53
54 #ifndef DOXYGEN_SHOULD_SKIP_THIS
55
56 private:
57   friend class Plug_Class;
58   static CppClassType plug_class_;
59
60   // noncopyable
61   Plug(const Plug&);
62   Plug& operator=(const Plug&);
63
64 protected:
65   explicit Plug(const Glib::ConstructParams& construct_params);
66   explicit Plug(GtkPlug* castitem);
67
68 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
69
70 public:
71 #ifndef DOXYGEN_SHOULD_SKIP_THIS
72   static GType get_type()      G_GNUC_CONST;
73   static GType get_base_type() G_GNUC_CONST;
74 #endif
75
76   ///Provides access to the underlying C GtkObject.
77   GtkPlug*       gobj()       { return reinterpret_cast<GtkPlug*>(gobject_); }
78
79   ///Provides access to the underlying C GtkObject.
80   const GtkPlug* gobj() const { return reinterpret_cast<GtkPlug*>(gobject_); }
81
82
83 public:
84   //C++ methods used to invoke GTK+ virtual functions:
85
86 protected:
87   //GTK+ Virtual Functions (override these to change behaviour):
88
89   //Default Signal Handlers::
90   virtual void on_embedded();
91
92
93 private:
94
95   
96   //This is not available in on Win32.
97 //This source file will not be compiled,
98 //and the class will not be registered in wrap_init.h or wrap_init.cc
99
100 public:
101   Plug();
102   explicit Plug(GdkNativeWindow socket_id);
103   explicit Plug(const Glib::RefPtr<Gdk::Display>& display, GdkNativeWindow socket_id);
104
105   
106   /** Gets the window ID of a Gtk::Plug widget, which can then
107    * be used to embed this window inside another window, for
108    * instance with Gtk::Socket::add_id().
109    * @return The window ID for the plug.
110    */
111   GdkNativeWindow get_id() const;
112
113   
114   Glib::SignalProxy0< void > signal_embedded();
115
116
117 };
118
119 } /* namespace Gtk */
120
121
122 namespace Glib
123 {
124   /** @relates Gtk::Plug
125    * @param object The C instance
126    * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
127    * @result A C++ instance that wraps this C instance.
128    */
129   Gtk::Plug* wrap(GtkPlug* object, bool take_copy = false);
130 }
131 #endif /* _GTKMM_PLUG_H */
132