1 // Generated by gmmproc 2.60.0 -- DO NOT MODIFY!
2 
3 
4 #include <glibmm.h>
5 
6 #include <gtkmm/gesturepan.h>
7 #include <gtkmm/private/gesturepan_p.h>
8 
9 
10 /* Copyright (C) 2014 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 Lesser General Public
14  * License as published by the Free Software Foundation; either
15  * version 2.1 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  * Lesser General Public License for more details.
21  *
22  * You should have received a copy of the GNU Lesser General Public
23  * License along with this library. If not, see <http://www.gnu.org/licenses/>.
24  */
25 
26 #include <gtk/gtk.h>
27 
28 namespace
29 {
30 
31 
GesturePan_signal_pan_callback(GtkGesturePan * self,GtkPanDirection p0,gdouble p1,void * data)32 static void GesturePan_signal_pan_callback(GtkGesturePan* self, GtkPanDirection p0,gdouble p1,void* data)
33 {
34   using namespace Gtk;
35   using SlotType = sigc::slot< void,PanDirection,double >;
36 
37   auto obj = dynamic_cast<GesturePan*>(Glib::ObjectBase::_get_current_wrapper((GObject*) self));
38   // Do not try to call a signal on a disassociated wrapper.
39   if(obj)
40   {
41     try
42     {
43       if(const auto slot = Glib::SignalProxyNormal::data_to_slot(data))
44         (*static_cast<SlotType*>(slot))(((PanDirection)(p0))
45 , p1
46 );
47     }
48     catch(...)
49     {
50        Glib::exception_handlers_invoke();
51     }
52   }
53 }
54 
55 static const Glib::SignalProxyInfo GesturePan_signal_pan_info =
56 {
57   "pan",
58   (GCallback) &GesturePan_signal_pan_callback,
59   (GCallback) &GesturePan_signal_pan_callback
60 };
61 
62 
63 } // anonymous namespace
64 
65 // static
value_type()66 GType Glib::Value<Gtk::PanDirection>::value_type()
67 {
68   return gtk_pan_direction_get_type();
69 }
70 
71 
72 namespace Glib
73 {
74 
wrap(GtkGesturePan * object,bool take_copy)75 Glib::RefPtr<Gtk::GesturePan> wrap(GtkGesturePan* object, bool take_copy)
76 {
77   return Glib::RefPtr<Gtk::GesturePan>( dynamic_cast<Gtk::GesturePan*> (Glib::wrap_auto ((GObject*)(object), take_copy)) );
78   //We use dynamic_cast<> in case of multiple inheritance.
79 }
80 
81 } /* namespace Glib */
82 
83 
84 namespace Gtk
85 {
86 
87 
88 /* The *_Class implementation: */
89 
init()90 const Glib::Class& GesturePan_Class::init()
91 {
92   if(!gtype_) // create the GType if necessary
93   {
94     // Glib::Class has to know the class init function to clone custom types.
95     class_init_func_ = &GesturePan_Class::class_init_function;
96 
97     // This is actually just optimized away, apparently with no harm.
98     // Make sure that the parent type has been created.
99     //CppClassParent::CppObjectType::get_type();
100 
101     // Create the wrapper type, with the same class/instance size as the base type.
102     register_derived_type(gtk_gesture_pan_get_type());
103 
104     // Add derived versions of interfaces, if the C type implements any interfaces:
105 
106   }
107 
108   return *this;
109 }
110 
111 
class_init_function(void * g_class,void * class_data)112 void GesturePan_Class::class_init_function(void* g_class, void* class_data)
113 {
114   const auto klass = static_cast<BaseClassType*>(g_class);
115   CppClassParent::class_init_function(klass, class_data);
116 
117 
118 }
119 
120 
wrap_new(GObject * object)121 Glib::ObjectBase* GesturePan_Class::wrap_new(GObject* object)
122 {
123   return new GesturePan((GtkGesturePan*)object);
124 }
125 
126 
127 /* The implementation: */
128 
gobj_copy()129 GtkGesturePan* GesturePan::gobj_copy()
130 {
131   reference();
132   return gobj();
133 }
134 
GesturePan(const Glib::ConstructParams & construct_params)135 GesturePan::GesturePan(const Glib::ConstructParams& construct_params)
136 :
137   GestureDrag(construct_params)
138 {
139 
140 }
141 
GesturePan(GtkGesturePan * castitem)142 GesturePan::GesturePan(GtkGesturePan* castitem)
143 :
144   GestureDrag((GtkGestureDrag*)(castitem))
145 {}
146 
147 
GesturePan(GesturePan && src)148 GesturePan::GesturePan(GesturePan&& src) noexcept
149 : GestureDrag(std::move(src))
150 {}
151 
operator =(GesturePan && src)152 GesturePan& GesturePan::operator=(GesturePan&& src) noexcept
153 {
154   GestureDrag::operator=(std::move(src));
155   return *this;
156 }
157 
158 
~GesturePan()159 GesturePan::~GesturePan() noexcept
160 {}
161 
162 
163 GesturePan::CppClassType GesturePan::gesturepan_class_; // initialize static member
164 
get_type()165 GType GesturePan::get_type()
166 {
167   return gesturepan_class_.init().get_type();
168 }
169 
170 
get_base_type()171 GType GesturePan::get_base_type()
172 {
173   return gtk_gesture_pan_get_type();
174 }
175 
176 
GesturePan()177 GesturePan::GesturePan()
178 :
179   // Mark this class as non-derived to allow C++ vfuncs to be skipped.
180   Glib::ObjectBase(nullptr),
181   GestureDrag(Glib::ConstructParams(gesturepan_class_.init()))
182 {
183 
184 
185 }
186 
GesturePan(Widget & widget,Orientation orientation)187 GesturePan::GesturePan(Widget& widget, Orientation orientation)
188 :
189   // Mark this class as non-derived to allow C++ vfuncs to be skipped.
190   Glib::ObjectBase(nullptr),
191   GestureDrag(Glib::ConstructParams(gesturepan_class_.init(), "widget", (widget).gobj(), "orientation", ((GtkOrientation)(orientation)), nullptr))
192 {
193 
194 
195 }
196 
create(Widget & widget,Orientation orientation)197 Glib::RefPtr<GesturePan> GesturePan::create(Widget& widget, Orientation orientation)
198 {
199   return Glib::RefPtr<GesturePan>( new GesturePan(widget, orientation) );
200 }
201 
get_orientation() const202 Orientation GesturePan::get_orientation() const
203 {
204   return ((Orientation)(gtk_gesture_pan_get_orientation(const_cast<GtkGesturePan*>(gobj()))));
205 }
206 
set_orientation(Orientation orientation)207 void GesturePan::set_orientation(Orientation orientation)
208 {
209   gtk_gesture_pan_set_orientation(gobj(), ((GtkOrientation)(orientation)));
210 }
211 
212 
signal_pan()213 Glib::SignalProxy< void,PanDirection,double > GesturePan::signal_pan()
214 {
215   return Glib::SignalProxy< void,PanDirection,double >(this, &GesturePan_signal_pan_info);
216 }
217 
218 
property_orientation()219 Glib::PropertyProxy< Orientation > GesturePan::property_orientation()
220 {
221   return Glib::PropertyProxy< Orientation >(this, "orientation");
222 }
223 
property_orientation() const224 Glib::PropertyProxy_ReadOnly< Orientation > GesturePan::property_orientation() const
225 {
226   return Glib::PropertyProxy_ReadOnly< Orientation >(this, "orientation");
227 }
228 
229 
230 } // namespace Gtk
231 
232 
233