Mercurial > vba-linux
view src/gtk/sigccompat.h @ 3:b05d00f19d80
fix some formatting
author | Robert McIntyre <rlm@mit.edu> |
---|---|
date | Sat, 03 Mar 2012 10:33:11 -0600 |
parents | f9f4f1b99eed |
children |
line wrap: on
line source
1 // -*- C++ -*-2 // VisualBoyAdvance - Nintendo Gameboy/GameboyAdvance (TM) emulator.3 // Copyright (C) 1999-2003 Forgotten4 // Copyright (C) 2004 Forgotten and the VBA development team6 // This program is free software; you can redistribute it and/or modify7 // it under the terms of the GNU General Public License as published by8 // the Free Software Foundation; either version 2, or(at your option)9 // any later version.10 //11 // This program is distributed in the hope that it will be useful,12 // but WITHOUT ANY WARRANTY; without even the implied warranty of13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the14 // GNU General Public License for more details.15 //16 // You should have received a copy of the GNU General Public License17 // along with this program; if not, write to the Free Software Foundation,18 // Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.20 #ifndef __VBA_SIGCCOMPAT_H__21 #define __VBA_SIGCCOMPAT_H__23 #undef LIBSIGC_DISABLE_DEPRECATED24 #include <sigc++/bind.h>25 #include <sigc++/connection.h>27 #include <sigc++/slot.h>28 #include <sigc++/object.h>29 #include <sigc++/functors/mem_fun.h>31 namespace SigC32 {34 using namespace sigc;36 template <class T_return, class T_obj1, class T_obj2>37 inline slot0<T_return>38 slot( T_obj1& _A_obj, T_return (T_obj2::*_A_func)() )39 { return ::sigc::bound_mem_functor0<T_return, T_obj2>40 (dynamic_cast< T_obj1&>(_A_obj), _A_func); }42 template <class T_return, class T_arg1, class T_obj1, class T_obj2>43 inline slot1<T_return, T_arg1>44 slot( T_obj1& _A_obj, T_return (T_obj2::*_A_func)(T_arg1) )45 { return ::sigc::bound_mem_functor1<T_return, T_obj2, T_arg1>46 (dynamic_cast< T_obj1&>(_A_obj), _A_func); }48 template <class T_return, class T_arg1,class T_arg2, class T_obj1, class T_obj2>49 inline slot2<T_return, T_arg1,T_arg2>50 slot( T_obj1& _A_obj, T_return (T_obj2::*_A_func)(T_arg1,T_arg2) )51 { return ::sigc::bound_mem_functor2<T_return, T_obj2, T_arg1,T_arg2>52 (dynamic_cast< T_obj1&>(_A_obj), _A_func); }54 } // namespace SigC57 #endif // __VBA_SIGCCOMPAT_H__