home *** CD-ROM | disk | FTP | other *** search
/ Chip 2004 July / CMCD0704.ISO / Software / Freeware / Utilitare / VisualBoyAdvance-1.7.2 / src / gtk / sigccompat.h < prev    next >
Encoding:
C/C++ Source or Header  |  2004-05-10  |  2.0 KB  |  56 lines

  1. // -*- C++ -*-
  2. // VisualBoyAdvance - Nintendo Gameboy/GameboyAdvance (TM) emulator.
  3. // Copyright (C) 1999-2003 Forgotten
  4. // Copyright (C) 2004 Forgotten and the VBA development team
  5.  
  6. // This program is free software; you can redistribute it and/or modify
  7. // it under the terms of the GNU General Public License as published by
  8. // 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 of
  13. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  14. // GNU General Public License for more details.
  15. //
  16. // You should have received a copy of the GNU General Public License
  17. // along with this program; if not, write to the Free Software Foundation,
  18. // Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  19.  
  20. #ifndef __VBA_SIGCCOMPAT_H__
  21. #define __VBA_SIGCCOMPAT_H__
  22.  
  23. #undef LIBSIGC_DISABLE_DEPRECATED
  24. #include <sigc++/bind.h>
  25. #include <sigc++/connection.h>
  26.  
  27. #include <sigc++/slot.h>
  28. #include <sigc++/object.h>
  29. #include <sigc++/functors/mem_fun.h>
  30.  
  31. namespace SigC
  32. {
  33.  
  34. template <class T_return, class T_obj1, class T_obj2>
  35. inline Slot0<T_return>
  36. slot( T_obj1& _A_obj, T_return (T_obj2::*_A_func)() )
  37. { return ::sigc::bound_mem_functor0<T_return, T_obj2>
  38.              (dynamic_cast< T_obj1&>(_A_obj), _A_func); }
  39.  
  40. template <class T_return, class T_arg1, class T_obj1, class T_obj2>
  41. inline Slot1<T_return, T_arg1>
  42. slot( T_obj1& _A_obj, T_return (T_obj2::*_A_func)(T_arg1) )
  43. { return ::sigc::bound_mem_functor1<T_return, T_obj2, T_arg1>
  44.              (dynamic_cast< T_obj1&>(_A_obj), _A_func); }
  45.  
  46. template <class T_return, class T_arg1,class T_arg2, class T_obj1, class T_obj2>
  47. inline Slot2<T_return, T_arg1,T_arg2>
  48. slot( T_obj1& _A_obj, T_return (T_obj2::*_A_func)(T_arg1,T_arg2) )
  49. { return ::sigc::bound_mem_functor2<T_return, T_obj2, T_arg1,T_arg2>
  50.              (dynamic_cast< T_obj1&>(_A_obj), _A_func); }
  51.  
  52. } // namespace SigC
  53.  
  54.  
  55. #endif // __VBA_SIGCCOMPAT_H__
  56.