wok diff visualboyadvance/stuff/1.7.2-deprecatedsigc++.patch @ rev 25734
updated sc-im (-> 0.8.4)
author | Hans-G?nter Theisgen |
---|---|
date | Thu Aug 22 14:48:42 2024 +0100 (4 months ago) |
parents | |
children |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/visualboyadvance/stuff/1.7.2-deprecatedsigc++.patch Thu Aug 22 14:48:42 2024 +0100 1.3 @@ -0,0 +1,692 @@ 1.4 +--- src/gtk/sigccompat.h.old 2008-05-02 10:46:45.000000000 +0200 1.5 ++++ src/gtk/sigccompat.h 2008-05-02 10:47:08.000000000 +0200 1.6 +@@ -20,7 +20,7 @@ 1.7 + #ifndef __VBA_SIGCCOMPAT_H__ 1.8 + #define __VBA_SIGCCOMPAT_H__ 1.9 + 1.10 +-#undef LIBSIGC_DISABLE_DEPRECATED 1.11 ++#define LIBSIGC_DISABLE_DEPRECATED 1.12 + #include <sigc++/bind.h> 1.13 + #include <sigc++/connection.h> 1.14 + 1.15 +@@ -28,9 +28,679 @@ 1.16 + #include <sigc++/object.h> 1.17 + #include <sigc++/functors/mem_fun.h> 1.18 + 1.19 +-namespace SigC 1.20 ++ 1.21 ++// From sigc++/bind.h 1.22 ++namespace SigC { 1.23 ++ 1.24 ++template <class T_bound1, class T_functor> 1.25 ++inline ::sigc::bind_functor<-1, T_functor, 1.26 ++ typename ::sigc::unwrap_reference<T_bound1>::type> 1.27 ++bind(const T_functor& _A_functor, T_bound1 _A_b1) 1.28 ++{ return ::sigc::bind_functor<-1, T_functor, 1.29 ++ typename ::sigc::unwrap_reference<T_bound1>::type> 1.30 ++ (_A_functor, _A_b1); 1.31 ++} 1.32 ++ 1.33 ++template <class T_bound1, class T_bound2, class T_functor> 1.34 ++inline ::sigc::bind_functor<-1, T_functor, 1.35 ++ typename ::sigc::unwrap_reference<T_bound1>::type, 1.36 ++ typename ::sigc::unwrap_reference<T_bound2>::type> 1.37 ++bind(const T_functor& _A_functor, T_bound1 _A_b1, T_bound2 _A_b2) 1.38 ++{ return ::sigc::bind_functor<-1, T_functor, 1.39 ++ typename ::sigc::unwrap_reference<T_bound1>::type, 1.40 ++ typename ::sigc::unwrap_reference<T_bound2>::type> 1.41 ++ (_A_functor, _A_b1, _A_b2); 1.42 ++} 1.43 ++ 1.44 ++template <class T_bound1, class T_bound2, class T_bound3, class T_functor> 1.45 ++inline ::sigc::bind_functor<-1, T_functor, 1.46 ++ typename ::sigc::unwrap_reference<T_bound1>::type, 1.47 ++ typename ::sigc::unwrap_reference<T_bound2>::type, 1.48 ++ typename ::sigc::unwrap_reference<T_bound3>::type> 1.49 ++bind(const T_functor& _A_functor, T_bound1 _A_b1, T_bound2 _A_b2,T_bound3 _A_b3) 1.50 ++{ return ::sigc::bind_functor<-1, T_functor, 1.51 ++ typename ::sigc::unwrap_reference<T_bound1>::type, 1.52 ++ typename ::sigc::unwrap_reference<T_bound2>::type, 1.53 ++ typename ::sigc::unwrap_reference<T_bound3>::type> 1.54 ++ (_A_functor, _A_b1, _A_b2, _A_b3); 1.55 ++} 1.56 ++ 1.57 ++} 1.58 ++ 1.59 ++// From sigc++/connection.h 1.60 ++namespace SigC { 1.61 ++ 1.62 ++/** Convinience class for safe disconnection. 1.63 ++ * Iterators must not be used beyond the lifetime of the list 1.64 ++ * they work on. A connection object can be created from a 1.65 ++ * slot list iterator and may safely be used to disconnect 1.66 ++ * the referred slot at any time (disconnect()). If the slot 1.67 ++ * has already been destroyed, disconnect() does nothing. empty() or 1.68 ++ * operator bool() can be used to test whether the connection is 1.69 ++ * still active. The connection can be blocked (block(), unblock()). 1.70 ++ * 1.71 ++ * This is possible because the connection object gets notified 1.72 ++ * when the referred slot dies (notify()). 1.73 ++ * 1.74 ++ * @deprecated Use sigc::connection instead. 1.75 ++ * @ingroup compat 1.76 ++ */ 1.77 ++typedef ::sigc::connection Connection; 1.78 ++ 1.79 ++} 1.80 ++ 1.81 ++// From sigc++/slot.h 1.82 ++namespace SigC { 1.83 ++ 1.84 ++// SlotN 1.85 ++/** Converts an arbitrary functor to a unified type which is opaque. 1.86 ++ * Slot0 itself is a functor or to be more precise a closure. It contains 1.87 ++ * a single, arbitrary functor (or closure) that is executed in operator()(). 1.88 ++ * 1.89 ++ * The template arguments determine the function signature of operator()(): 1.90 ++ * - @e T_return The return type of operator()(). 1.91 ++ * 1.92 ++ * To use simply assign the slot to the desired functor. If the functor 1.93 ++ * is not compatible with the parameter list defined with the template 1.94 ++ * arguments compiler errors are triggered. When called the slot 1.95 ++ * will invoke the functor with minimal copies. 1.96 ++ * block() and unblock() can be used to block the functor's invocation 1.97 ++ * from operator()() temporarily. 1.98 ++ * 1.99 ++ * @par Example: 1.100 ++ * @code 1.101 ++ * #include <sigc++/slot.h> 1.102 ++ * void foo(int) {} 1.103 ++ * SigC::Slot1<void, long> s = SigC::slot(&foo); 1.104 ++ * s(19); 1.105 ++ * @endcode 1.106 ++ * 1.107 ++ * @deprecated Use the unnumbered template sigc::slot instead. 1.108 ++ * @ingroup compat 1.109 ++ */ 1.110 ++template <class T_return> 1.111 ++class Slot0 1.112 ++ : public ::sigc::slot<T_return> 1.113 ++{ 1.114 ++public: 1.115 ++ typedef ::sigc::slot<T_return> parent_type; 1.116 ++ 1.117 ++ /// Constructs an empty slot. 1.118 ++ Slot0() {} 1.119 ++ 1.120 ++ /** Constructs a slot from an arbitrary functor. 1.121 ++ * @param _A_func The desired functor the new slot should be assigned to. 1.122 ++ */ 1.123 ++ template <class T_functor> 1.124 ++ Slot0(const T_functor& _A_func) 1.125 ++ : ::sigc::slot<T_return>(_A_func) {} 1.126 ++ 1.127 ++ /** Constructs a slot, copying an existing one. 1.128 ++ * @param src The existing slot to copy. 1.129 ++ */ 1.130 ++ Slot0(const parent_type& src) 1.131 ++ : parent_type(src) {} 1.132 ++ 1.133 ++ /** Overrides this slot making a copy from another slot. 1.134 ++ * @param src The slot from which to make a copy. 1.135 ++ * @return @p this. 1.136 ++ */ 1.137 ++ Slot0& operator=(const parent_type& src) 1.138 ++ { parent_type::operator=(src); return *this; } 1.139 ++}; 1.140 ++ 1.141 ++/** Converts an arbitrary functor to a unified type which is opaque. 1.142 ++ * Slot1 itself is a functor or to be more precise a closure. It contains 1.143 ++ * a single, arbitrary functor (or closure) that is executed in operator()(). 1.144 ++ * 1.145 ++ * The template arguments determine the function signature of operator()(): 1.146 ++ * - @e T_return The return type of operator()(). 1.147 ++ * - @e T_arg1 Argument type used in the definition of operator()(). 1.148 ++ * 1.149 ++ * To use simply assign the slot to the desired functor. If the functor 1.150 ++ * is not compatible with the parameter list defined with the template 1.151 ++ * arguments compiler errors are triggered. When called the slot 1.152 ++ * will invoke the functor with minimal copies. 1.153 ++ * block() and unblock() can be used to block the functor's invocation 1.154 ++ * from operator()() temporarily. 1.155 ++ * 1.156 ++ * @par Example: 1.157 ++ * @code 1.158 ++ * #include <sigc++/slot.h> 1.159 ++ * void foo(int) {} 1.160 ++ * SigC::Slot1<void, long> s = SigC::slot(&foo); 1.161 ++ * s(19); 1.162 ++ * @endcode 1.163 ++ * 1.164 ++ * @deprecated Use the unnumbered template sigc::slot instead. 1.165 ++ * @ingroup compat 1.166 ++ */ 1.167 ++template <class T_return, class T_arg1> 1.168 ++class Slot1 1.169 ++ : public ::sigc::slot<T_return, T_arg1> 1.170 ++{ 1.171 ++public: 1.172 ++ typedef ::sigc::slot<T_return, T_arg1> parent_type; 1.173 ++ 1.174 ++ /// Constructs an empty slot. 1.175 ++ Slot1() {} 1.176 ++ 1.177 ++ /** Constructs a slot from an arbitrary functor. 1.178 ++ * @param _A_func The desired functor the new slot should be assigned to. 1.179 ++ */ 1.180 ++ template <class T_functor> 1.181 ++ Slot1(const T_functor& _A_func) 1.182 ++ : ::sigc::slot<T_return, T_arg1>(_A_func) {} 1.183 ++ 1.184 ++ /** Constructs a slot, copying an existing one. 1.185 ++ * @param src The existing slot to copy. 1.186 ++ */ 1.187 ++ Slot1(const parent_type& src) 1.188 ++ : parent_type(src) {} 1.189 ++ 1.190 ++ /** Overrides this slot making a copy from another slot. 1.191 ++ * @param src The slot from which to make a copy. 1.192 ++ * @return @p this. 1.193 ++ */ 1.194 ++ Slot1& operator=(const parent_type& src) 1.195 ++ { parent_type::operator=(src); return *this; } 1.196 ++}; 1.197 ++ 1.198 ++/** Converts an arbitrary functor to a unified type which is opaque. 1.199 ++ * Slot2 itself is a functor or to be more precise a closure. It contains 1.200 ++ * a single, arbitrary functor (or closure) that is executed in operator()(). 1.201 ++ * 1.202 ++ * The template arguments determine the function signature of operator()(): 1.203 ++ * - @e T_return The return type of operator()(). 1.204 ++ * - @e T_arg1 Argument type used in the definition of operator()(). 1.205 ++ * - @e T_arg2 Argument type used in the definition of operator()(). 1.206 ++ * 1.207 ++ * To use simply assign the slot to the desired functor. If the functor 1.208 ++ * is not compatible with the parameter list defined with the template 1.209 ++ * arguments compiler errors are triggered. When called the slot 1.210 ++ * will invoke the functor with minimal copies. 1.211 ++ * block() and unblock() can be used to block the functor's invocation 1.212 ++ * from operator()() temporarily. 1.213 ++ * 1.214 ++ * @par Example: 1.215 ++ * @code 1.216 ++ * #include <sigc++/slot.h> 1.217 ++ * void foo(int) {} 1.218 ++ * SigC::Slot1<void, long> s = SigC::slot(&foo); 1.219 ++ * s(19); 1.220 ++ * @endcode 1.221 ++ * 1.222 ++ * @deprecated Use the unnumbered template sigc::slot instead. 1.223 ++ * @ingroup compat 1.224 ++ */ 1.225 ++template <class T_return, class T_arg1,class T_arg2> 1.226 ++class Slot2 1.227 ++ : public ::sigc::slot<T_return, T_arg1,T_arg2> 1.228 ++{ 1.229 ++public: 1.230 ++ typedef ::sigc::slot<T_return, T_arg1,T_arg2> parent_type; 1.231 ++ 1.232 ++ /// Constructs an empty slot. 1.233 ++ Slot2() {} 1.234 ++ 1.235 ++ /** Constructs a slot from an arbitrary functor. 1.236 ++ * @param _A_func The desired functor the new slot should be assigned to. 1.237 ++ */ 1.238 ++ template <class T_functor> 1.239 ++ Slot2(const T_functor& _A_func) 1.240 ++ : ::sigc::slot<T_return, T_arg1,T_arg2>(_A_func) {} 1.241 ++ 1.242 ++ /** Constructs a slot, copying an existing one. 1.243 ++ * @param src The existing slot to copy. 1.244 ++ */ 1.245 ++ Slot2(const parent_type& src) 1.246 ++ : parent_type(src) {} 1.247 ++ 1.248 ++ /** Overrides this slot making a copy from another slot. 1.249 ++ * @param src The slot from which to make a copy. 1.250 ++ * @return @p this. 1.251 ++ */ 1.252 ++ Slot2& operator=(const parent_type& src) 1.253 ++ { parent_type::operator=(src); return *this; } 1.254 ++}; 1.255 ++ 1.256 ++/** Converts an arbitrary functor to a unified type which is opaque. 1.257 ++ * Slot3 itself is a functor or to be more precise a closure. It contains 1.258 ++ * a single, arbitrary functor (or closure) that is executed in operator()(). 1.259 ++ * 1.260 ++ * The template arguments determine the function signature of operator()(): 1.261 ++ * - @e T_return The return type of operator()(). 1.262 ++ * - @e T_arg1 Argument type used in the definition of operator()(). 1.263 ++ * - @e T_arg2 Argument type used in the definition of operator()(). 1.264 ++ * - @e T_arg3 Argument type used in the definition of operator()(). 1.265 ++ * 1.266 ++ * To use simply assign the slot to the desired functor. If the functor 1.267 ++ * is not compatible with the parameter list defined with the template 1.268 ++ * arguments compiler errors are triggered. When called the slot 1.269 ++ * will invoke the functor with minimal copies. 1.270 ++ * block() and unblock() can be used to block the functor's invocation 1.271 ++ * from operator()() temporarily. 1.272 ++ * 1.273 ++ * @par Example: 1.274 ++ * @code 1.275 ++ * #include <sigc++/slot.h> 1.276 ++ * void foo(int) {} 1.277 ++ * SigC::Slot1<void, long> s = SigC::slot(&foo); 1.278 ++ * s(19); 1.279 ++ * @endcode 1.280 ++ * 1.281 ++ * @deprecated Use the unnumbered template sigc::slot instead. 1.282 ++ * @ingroup compat 1.283 ++ */ 1.284 ++template <class T_return, class T_arg1,class T_arg2,class T_arg3> 1.285 ++class Slot3 1.286 ++ : public ::sigc::slot<T_return, T_arg1,T_arg2,T_arg3> 1.287 ++{ 1.288 ++public: 1.289 ++ typedef ::sigc::slot<T_return, T_arg1,T_arg2,T_arg3> parent_type; 1.290 ++ 1.291 ++ /// Constructs an empty slot. 1.292 ++ Slot3() {} 1.293 ++ 1.294 ++ /** Constructs a slot from an arbitrary functor. 1.295 ++ * @param _A_func The desired functor the new slot should be assigned to. 1.296 ++ */ 1.297 ++ template <class T_functor> 1.298 ++ Slot3(const T_functor& _A_func) 1.299 ++ : ::sigc::slot<T_return, T_arg1,T_arg2,T_arg3>(_A_func) {} 1.300 ++ 1.301 ++ /** Constructs a slot, copying an existing one. 1.302 ++ * @param src The existing slot to copy. 1.303 ++ */ 1.304 ++ Slot3(const parent_type& src) 1.305 ++ : parent_type(src) {} 1.306 ++ 1.307 ++ /** Overrides this slot making a copy from another slot. 1.308 ++ * @param src The slot from which to make a copy. 1.309 ++ * @return @p this. 1.310 ++ */ 1.311 ++ Slot3& operator=(const parent_type& src) 1.312 ++ { parent_type::operator=(src); return *this; } 1.313 ++}; 1.314 ++ 1.315 ++/** Converts an arbitrary functor to a unified type which is opaque. 1.316 ++ * Slot4 itself is a functor or to be more precise a closure. It contains 1.317 ++ * a single, arbitrary functor (or closure) that is executed in operator()(). 1.318 ++ * 1.319 ++ * The template arguments determine the function signature of operator()(): 1.320 ++ * - @e T_return The return type of operator()(). 1.321 ++ * - @e T_arg1 Argument type used in the definition of operator()(). 1.322 ++ * - @e T_arg2 Argument type used in the definition of operator()(). 1.323 ++ * - @e T_arg3 Argument type used in the definition of operator()(). 1.324 ++ * - @e T_arg4 Argument type used in the definition of operator()(). 1.325 ++ * 1.326 ++ * To use simply assign the slot to the desired functor. If the functor 1.327 ++ * is not compatible with the parameter list defined with the template 1.328 ++ * arguments compiler errors are triggered. When called the slot 1.329 ++ * will invoke the functor with minimal copies. 1.330 ++ * block() and unblock() can be used to block the functor's invocation 1.331 ++ * from operator()() temporarily. 1.332 ++ * 1.333 ++ * @par Example: 1.334 ++ * @code 1.335 ++ * #include <sigc++/slot.h> 1.336 ++ * void foo(int) {} 1.337 ++ * SigC::Slot1<void, long> s = SigC::slot(&foo); 1.338 ++ * s(19); 1.339 ++ * @endcode 1.340 ++ * 1.341 ++ * @deprecated Use the unnumbered template sigc::slot instead. 1.342 ++ * @ingroup compat 1.343 ++ */ 1.344 ++template <class T_return, class T_arg1,class T_arg2,class T_arg3,class T_arg4> 1.345 ++class Slot4 1.346 ++ : public ::sigc::slot<T_return, T_arg1,T_arg2,T_arg3,T_arg4> 1.347 ++{ 1.348 ++public: 1.349 ++ typedef ::sigc::slot<T_return, T_arg1,T_arg2,T_arg3,T_arg4> parent_type; 1.350 ++ 1.351 ++ /// Constructs an empty slot. 1.352 ++ Slot4() {} 1.353 ++ 1.354 ++ /** Constructs a slot from an arbitrary functor. 1.355 ++ * @param _A_func The desired functor the new slot should be assigned to. 1.356 ++ */ 1.357 ++ template <class T_functor> 1.358 ++ Slot4(const T_functor& _A_func) 1.359 ++ : ::sigc::slot<T_return, T_arg1,T_arg2,T_arg3,T_arg4>(_A_func) {} 1.360 ++ 1.361 ++ /** Constructs a slot, copying an existing one. 1.362 ++ * @param src The existing slot to copy. 1.363 ++ */ 1.364 ++ Slot4(const parent_type& src) 1.365 ++ : parent_type(src) {} 1.366 ++ 1.367 ++ /** Overrides this slot making a copy from another slot. 1.368 ++ * @param src The slot from which to make a copy. 1.369 ++ * @return @p this. 1.370 ++ */ 1.371 ++ Slot4& operator=(const parent_type& src) 1.372 ++ { parent_type::operator=(src); return *this; } 1.373 ++}; 1.374 ++ 1.375 ++/** Converts an arbitrary functor to a unified type which is opaque. 1.376 ++ * Slot5 itself is a functor or to be more precise a closure. It contains 1.377 ++ * a single, arbitrary functor (or closure) that is executed in operator()(). 1.378 ++ * 1.379 ++ * The template arguments determine the function signature of operator()(): 1.380 ++ * - @e T_return The return type of operator()(). 1.381 ++ * - @e T_arg1 Argument type used in the definition of operator()(). 1.382 ++ * - @e T_arg2 Argument type used in the definition of operator()(). 1.383 ++ * - @e T_arg3 Argument type used in the definition of operator()(). 1.384 ++ * - @e T_arg4 Argument type used in the definition of operator()(). 1.385 ++ * - @e T_arg5 Argument type used in the definition of operator()(). 1.386 ++ * 1.387 ++ * To use simply assign the slot to the desired functor. If the functor 1.388 ++ * is not compatible with the parameter list defined with the template 1.389 ++ * arguments compiler errors are triggered. When called the slot 1.390 ++ * will invoke the functor with minimal copies. 1.391 ++ * block() and unblock() can be used to block the functor's invocation 1.392 ++ * from operator()() temporarily. 1.393 ++ * 1.394 ++ * @par Example: 1.395 ++ * @code 1.396 ++ * #include <sigc++/slot.h> 1.397 ++ * void foo(int) {} 1.398 ++ * SigC::Slot1<void, long> s = SigC::slot(&foo); 1.399 ++ * s(19); 1.400 ++ * @endcode 1.401 ++ * 1.402 ++ * @deprecated Use the unnumbered template sigc::slot instead. 1.403 ++ * @ingroup compat 1.404 ++ */ 1.405 ++template <class T_return, class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5> 1.406 ++class Slot5 1.407 ++ : public ::sigc::slot<T_return, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5> 1.408 ++{ 1.409 ++public: 1.410 ++ typedef ::sigc::slot<T_return, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5> parent_type; 1.411 ++ 1.412 ++ /// Constructs an empty slot. 1.413 ++ Slot5() {} 1.414 ++ 1.415 ++ /** Constructs a slot from an arbitrary functor. 1.416 ++ * @param _A_func The desired functor the new slot should be assigned to. 1.417 ++ */ 1.418 ++ template <class T_functor> 1.419 ++ Slot5(const T_functor& _A_func) 1.420 ++ : ::sigc::slot<T_return, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5>(_A_func) {} 1.421 ++ 1.422 ++ /** Constructs a slot, copying an existing one. 1.423 ++ * @param src The existing slot to copy. 1.424 ++ */ 1.425 ++ Slot5(const parent_type& src) 1.426 ++ : parent_type(src) {} 1.427 ++ 1.428 ++ /** Overrides this slot making a copy from another slot. 1.429 ++ * @param src The slot from which to make a copy. 1.430 ++ * @return @p this. 1.431 ++ */ 1.432 ++ Slot5& operator=(const parent_type& src) 1.433 ++ { parent_type::operator=(src); return *this; } 1.434 ++}; 1.435 ++ 1.436 ++/** Converts an arbitrary functor to a unified type which is opaque. 1.437 ++ * Slot6 itself is a functor or to be more precise a closure. It contains 1.438 ++ * a single, arbitrary functor (or closure) that is executed in operator()(). 1.439 ++ * 1.440 ++ * The template arguments determine the function signature of operator()(): 1.441 ++ * - @e T_return The return type of operator()(). 1.442 ++ * - @e T_arg1 Argument type used in the definition of operator()(). 1.443 ++ * - @e T_arg2 Argument type used in the definition of operator()(). 1.444 ++ * - @e T_arg3 Argument type used in the definition of operator()(). 1.445 ++ * - @e T_arg4 Argument type used in the definition of operator()(). 1.446 ++ * - @e T_arg5 Argument type used in the definition of operator()(). 1.447 ++ * - @e T_arg6 Argument type used in the definition of operator()(). 1.448 ++ * 1.449 ++ * To use simply assign the slot to the desired functor. If the functor 1.450 ++ * is not compatible with the parameter list defined with the template 1.451 ++ * arguments compiler errors are triggered. When called the slot 1.452 ++ * will invoke the functor with minimal copies. 1.453 ++ * block() and unblock() can be used to block the functor's invocation 1.454 ++ * from operator()() temporarily. 1.455 ++ * 1.456 ++ * @par Example: 1.457 ++ * @code 1.458 ++ * #include <sigc++/slot.h> 1.459 ++ * void foo(int) {} 1.460 ++ * SigC::Slot1<void, long> s = SigC::slot(&foo); 1.461 ++ * s(19); 1.462 ++ * @endcode 1.463 ++ * 1.464 ++ * @deprecated Use the unnumbered template sigc::slot instead. 1.465 ++ * @ingroup compat 1.466 ++ */ 1.467 ++template <class T_return, class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6> 1.468 ++class Slot6 1.469 ++ : public ::sigc::slot<T_return, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6> 1.470 ++{ 1.471 ++public: 1.472 ++ typedef ::sigc::slot<T_return, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6> parent_type; 1.473 ++ 1.474 ++ /// Constructs an empty slot. 1.475 ++ Slot6() {} 1.476 ++ 1.477 ++ /** Constructs a slot from an arbitrary functor. 1.478 ++ * @param _A_func The desired functor the new slot should be assigned to. 1.479 ++ */ 1.480 ++ template <class T_functor> 1.481 ++ Slot6(const T_functor& _A_func) 1.482 ++ : ::sigc::slot<T_return, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6>(_A_func) {} 1.483 ++ 1.484 ++ /** Constructs a slot, copying an existing one. 1.485 ++ * @param src The existing slot to copy. 1.486 ++ */ 1.487 ++ Slot6(const parent_type& src) 1.488 ++ : parent_type(src) {} 1.489 ++ 1.490 ++ /** Overrides this slot making a copy from another slot. 1.491 ++ * @param src The slot from which to make a copy. 1.492 ++ * @return @p this. 1.493 ++ */ 1.494 ++ Slot6& operator=(const parent_type& src) 1.495 ++ { parent_type::operator=(src); return *this; } 1.496 ++}; 1.497 ++ 1.498 ++/** Converts an arbitrary functor to a unified type which is opaque. 1.499 ++ * Slot7 itself is a functor or to be more precise a closure. It contains 1.500 ++ * a single, arbitrary functor (or closure) that is executed in operator()(). 1.501 ++ * 1.502 ++ * The template arguments determine the function signature of operator()(): 1.503 ++ * - @e T_return The return type of operator()(). 1.504 ++ * - @e T_arg1 Argument type used in the definition of operator()(). 1.505 ++ * - @e T_arg2 Argument type used in the definition of operator()(). 1.506 ++ * - @e T_arg3 Argument type used in the definition of operator()(). 1.507 ++ * - @e T_arg4 Argument type used in the definition of operator()(). 1.508 ++ * - @e T_arg5 Argument type used in the definition of operator()(). 1.509 ++ * - @e T_arg6 Argument type used in the definition of operator()(). 1.510 ++ * - @e T_arg7 Argument type used in the definition of operator()(). 1.511 ++ * 1.512 ++ * To use simply assign the slot to the desired functor. If the functor 1.513 ++ * is not compatible with the parameter list defined with the template 1.514 ++ * arguments compiler errors are triggered. When called the slot 1.515 ++ * will invoke the functor with minimal copies. 1.516 ++ * block() and unblock() can be used to block the functor's invocation 1.517 ++ * from operator()() temporarily. 1.518 ++ * 1.519 ++ * @par Example: 1.520 ++ * @code 1.521 ++ * #include <sigc++/slot.h> 1.522 ++ * void foo(int) {} 1.523 ++ * SigC::Slot1<void, long> s = SigC::slot(&foo); 1.524 ++ * s(19); 1.525 ++ * @endcode 1.526 ++ * 1.527 ++ * @deprecated Use the unnumbered template sigc::slot instead. 1.528 ++ * @ingroup compat 1.529 ++ */ 1.530 ++template <class T_return, class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6,class T_arg7> 1.531 ++class Slot7 1.532 ++ : public ::sigc::slot<T_return, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7> 1.533 + { 1.534 ++public: 1.535 ++ typedef ::sigc::slot<T_return, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7> parent_type; 1.536 ++ 1.537 ++ /// Constructs an empty slot. 1.538 ++ Slot7() {} 1.539 ++ 1.540 ++ /** Constructs a slot from an arbitrary functor. 1.541 ++ * @param _A_func The desired functor the new slot should be assigned to. 1.542 ++ */ 1.543 ++ template <class T_functor> 1.544 ++ Slot7(const T_functor& _A_func) 1.545 ++ : ::sigc::slot<T_return, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7>(_A_func) {} 1.546 ++ 1.547 ++ /** Constructs a slot, copying an existing one. 1.548 ++ * @param src The existing slot to copy. 1.549 ++ */ 1.550 ++ Slot7(const parent_type& src) 1.551 ++ : parent_type(src) {} 1.552 ++ 1.553 ++ /** Overrides this slot making a copy from another slot. 1.554 ++ * @param src The slot from which to make a copy. 1.555 ++ * @return @p this. 1.556 ++ */ 1.557 ++ Slot7& operator=(const parent_type& src) 1.558 ++ { parent_type::operator=(src); return *this; } 1.559 ++}; 1.560 ++ 1.561 ++ 1.562 ++ 1.563 ++#ifndef DOXYGEN_SHOULD_SKIP_THIS 1.564 ++/* gcc 3.2 reports a strange conflict between SigC::slot() and sigc::slot<> 1.565 ++ * when "using namespace SigC" and later using a slot(obj,func) overload 1.566 ++ * without the prefix "SigC::". Probably a compiler bug. I will investigate. 1.567 ++ * 1.568 ++ * This ugly hack avoids the error: 1.569 ++ */ 1.570 ++// #define slot(...) make_slot(__VA_ARGS__) /* only works for gcc */ 1.571 ++#endif 1.572 + 1.573 ++ 1.574 ++// slot() 1.575 ++/** Creates a functor of type SigC::Slot0 that wraps an existing non-member function. 1.576 ++ * 1.577 ++ * @param _A_func Pointer to function that should be wrapped. 1.578 ++ * @return Functor that executes _A_func on invokation. 1.579 ++ * 1.580 ++ * @deprecated Use sigc::ptr_fun() instead. 1.581 ++ * @ingroup compat 1.582 ++ */ 1.583 ++template <class T_return> 1.584 ++inline Slot0<T_return> 1.585 ++slot(T_return (*_A_func)()) 1.586 ++{ return Slot0<T_return>(_A_func); } 1.587 ++ 1.588 ++/** Creates a functor of type SigC::Slot1 that wraps an existing non-member function. 1.589 ++ * 1.590 ++ * @param _A_func Pointer to function that should be wrapped. 1.591 ++ * @return Functor that executes _A_func on invokation. 1.592 ++ * 1.593 ++ * @deprecated Use sigc::ptr_fun() instead. 1.594 ++ * @ingroup compat 1.595 ++ */ 1.596 ++template <class T_return, class T_arg1> 1.597 ++inline Slot1<T_return, T_arg1> 1.598 ++slot(T_return (*_A_func)(T_arg1)) 1.599 ++{ return Slot1<T_return, T_arg1>(_A_func); } 1.600 ++ 1.601 ++/** Creates a functor of type SigC::Slot2 that wraps an existing non-member function. 1.602 ++ * 1.603 ++ * @param _A_func Pointer to function that should be wrapped. 1.604 ++ * @return Functor that executes _A_func on invokation. 1.605 ++ * 1.606 ++ * @deprecated Use sigc::ptr_fun() instead. 1.607 ++ * @ingroup compat 1.608 ++ */ 1.609 ++template <class T_return, class T_arg1,class T_arg2> 1.610 ++inline Slot2<T_return, T_arg1,T_arg2> 1.611 ++slot(T_return (*_A_func)(T_arg1,T_arg2)) 1.612 ++{ return Slot2<T_return, T_arg1,T_arg2>(_A_func); } 1.613 ++ 1.614 ++/** Creates a functor of type SigC::Slot3 that wraps an existing non-member function. 1.615 ++ * 1.616 ++ * @param _A_func Pointer to function that should be wrapped. 1.617 ++ * @return Functor that executes _A_func on invokation. 1.618 ++ * 1.619 ++ * @deprecated Use sigc::ptr_fun() instead. 1.620 ++ * @ingroup compat 1.621 ++ */ 1.622 ++template <class T_return, class T_arg1,class T_arg2,class T_arg3> 1.623 ++inline Slot3<T_return, T_arg1,T_arg2,T_arg3> 1.624 ++slot(T_return (*_A_func)(T_arg1,T_arg2,T_arg3)) 1.625 ++{ return Slot3<T_return, T_arg1,T_arg2,T_arg3>(_A_func); } 1.626 ++ 1.627 ++/** Creates a functor of type SigC::Slot4 that wraps an existing non-member function. 1.628 ++ * 1.629 ++ * @param _A_func Pointer to function that should be wrapped. 1.630 ++ * @return Functor that executes _A_func on invokation. 1.631 ++ * 1.632 ++ * @deprecated Use sigc::ptr_fun() instead. 1.633 ++ * @ingroup compat 1.634 ++ */ 1.635 ++template <class T_return, class T_arg1,class T_arg2,class T_arg3,class T_arg4> 1.636 ++inline Slot4<T_return, T_arg1,T_arg2,T_arg3,T_arg4> 1.637 ++slot(T_return (*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4)) 1.638 ++{ return Slot4<T_return, T_arg1,T_arg2,T_arg3,T_arg4>(_A_func); } 1.639 ++ 1.640 ++/** Creates a functor of type SigC::Slot5 that wraps an existing non-member function. 1.641 ++ * 1.642 ++ * @param _A_func Pointer to function that should be wrapped. 1.643 ++ * @return Functor that executes _A_func on invokation. 1.644 ++ * 1.645 ++ * @deprecated Use sigc::ptr_fun() instead. 1.646 ++ * @ingroup compat 1.647 ++ */ 1.648 ++template <class T_return, class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5> 1.649 ++inline Slot5<T_return, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5> 1.650 ++slot(T_return (*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5)) 1.651 ++{ return Slot5<T_return, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5>(_A_func); } 1.652 ++ 1.653 ++/** Creates a functor of type SigC::Slot6 that wraps an existing non-member function. 1.654 ++ * 1.655 ++ * @param _A_func Pointer to function that should be wrapped. 1.656 ++ * @return Functor that executes _A_func on invokation. 1.657 ++ * 1.658 ++ * @deprecated Use sigc::ptr_fun() instead. 1.659 ++ * @ingroup compat 1.660 ++ */ 1.661 ++template <class T_return, class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6> 1.662 ++inline Slot6<T_return, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6> 1.663 ++slot(T_return (*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6)) 1.664 ++{ return Slot6<T_return, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6>(_A_func); } 1.665 ++ 1.666 ++/** Creates a functor of type SigC::Slot7 that wraps an existing non-member function. 1.667 ++ * 1.668 ++ * @param _A_func Pointer to function that should be wrapped. 1.669 ++ * @return Functor that executes _A_func on invokation. 1.670 ++ * 1.671 ++ * @deprecated Use sigc::ptr_fun() instead. 1.672 ++ * @ingroup compat 1.673 ++ */ 1.674 ++template <class T_return, class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6,class T_arg7> 1.675 ++inline Slot7<T_return, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7> 1.676 ++slot(T_return (*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7)) 1.677 ++{ return Slot7<T_return, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7>(_A_func); } 1.678 ++ 1.679 ++ 1.680 ++ 1.681 ++} 1.682 ++ 1.683 ++// From sigc++/object.h 1.684 ++namespace SigC { 1.685 ++ 1.686 ++// Object 1.687 ++typedef ::sigc::trackable Object; 1.688 ++ 1.689 ++} 1.690 ++ 1.691 ++namespace SigC 1.692 ++{ 1.693 + template <class T_return, class T_obj1, class T_obj2> 1.694 + inline Slot0<T_return> 1.695 + slot( T_obj1& _A_obj, T_return (T_obj2::*_A_func)() )