// -*- c++ -*-
/* This is a generated file, do not edit.  Generated from proxy.h.m4 */

#ifndef SIGCXX_PROXY_H
#define SIGCXX_PROXY_H
#include <sigc++/signal_system.h>
#include <sigc++/bind.h>
#include <sigc++/convert.h>
#include <gtk--config.h>
#include <gtk/gtkobject.h>
#include <gtk/gtksignal.h>

namespace Gtk
{

using SigC::Connection;
using SigC::manage;

//using SigC::slot;
//using SigC::convert;
//using SigC::bind;
//using SigC::Slot0;
//using SigC::Slot1;
//using SigC::Slot2;
//using SigC::Slot3;
//using SigC::Slot4;
//using SigC::Slot5;
//using SigC::Slot6;
//using SigC::Callback0;
//using SigC::Callback1;
//using SigC::Callback2;
//using SigC::Callback3;
//using SigC::Callback4;
//using SigC::Callback5;
//using SigC::Callback6;

// Forward declarations
class Object;

struct ProxyNode : public SigC::SlotNode
  {
   static void connect(Object*,
                       const char*,
                       GtkSignalFunc,
                       SigC::SlotData*,
                       bool);
   static void notify(gpointer);

   GtkObject *obj_;
   SigC::SlotData* slot_;
   void* callback_;
   int connid_;

   ProxyNode() {}
   virtual ~ProxyNode();
  };



/****************************************************************
***** Gtk Proxy Signal 0
****************************************************************/

template <class R,
          class Obj,class gObj,int index>
class ProxySignal0
  {
    public:
      typedef SigC::Callback0<R> Callback;
      typedef SigC::Slot0<R> SlotType;

#ifndef GTKMM_CXX_GAUB
    protected:
      Obj *obj;
#else
      Obj *obj;
    protected:
#endif

#ifdef SIGC_CXX_PARTIAL_SPEC
      typedef R RType;
#else
      typedef SigC::Trait<R>::type RType;
#endif

      static RType gtk_callback(GtkObject*,void *d)
        {
          ProxyNode *node=(ProxyNode*)d;
          Callback* data=(Callback*)(node->callback_);
          return data->call();
        }

    public:

      Connection connect(const SlotType &s)
        {
         SigC::SlotData* d=s.data();
         ProxyNode::connect(obj,
                            obj->signal_names[index],
			    (GtkSignalFunc)gtk_callback,
                            d,
			    false);
         return d;
        }

      Connection connect_after(const SlotType &s)
        {
         SigC::SlotData* d=s.data();
         ProxyNode::connect(obj,
                            obj->signal_names[index],
			    (GtkSignalFunc)gtk_callback,
			    d,
			    true);
         return d;
        }

  };

template <class R,
          class Obj,class gObj,int index,
          R (*emit_func)(gObj*)>
class EmitProxySignal0
  : public ProxySignal0 
    <R,Obj,gObj,index>
  {
    public:
      typedef EmitProxySignal0<R,Obj,gObj,index,emit_func> Self;
      typedef SigC::Slot0<R> SlotType;
      typedef SigC::CallDataObj2<typename SlotType::Func,Self> Data;

    private:

#ifdef SIGC_CXX_PARTIAL_SPEC
      typedef R RType;
#else
      typedef SigC::Trait<R>::type RType;
#endif

      static RType callback(void* d)
        {
          Data* data=(Data*)d;
          return data->obj->emit();
        }

    public:
      SlotType slot()
        {
          SigC::SlotData* tmp=manage(new SigC::SlotData());
          Data& data=reinterpret_cast<Data&>(tmp->data_);
          data.callback=&callback;
          data.obj=this;
          SigC::ScopeNode* node=tmp->receiver();
          this->obj->register_data(node);
          return tmp;
        }

      RType emit()
        {
          return reinterpret_cast<RType (*)(gObj*)>
            (emit_func) (this->obj->gtkobj());
        }

      RType operator()()
        {
          return reinterpret_cast<RType (*)(gObj*)>
            (emit_func) (this->obj->gtkobj());
        }

  };


/****************************************************************
***** Gtk Proxy Signal 1
****************************************************************/

template <class R,class P1,
          class Obj,class gObj,int index>
class ProxySignal1
  {
    public:
      typedef SigC::Callback1<R,P1> Callback;
      typedef SigC::Slot1<R,P1> SlotType;

#ifndef GTKMM_CXX_GAUB
    protected:
      Obj *obj;
#else
      Obj *obj;
    protected:
#endif

#ifdef SIGC_CXX_PARTIAL_SPEC
      typedef R RType;
#else
      typedef SigC::Trait<R>::type RType;
#endif

      static RType gtk_callback(GtkObject*,P1 p1,void *d)
        {
          ProxyNode *node=(ProxyNode*)d;
          Callback* data=(Callback*)(node->callback_);
          return data->call(p1);
        }

    public:

      Connection connect(const SlotType &s)
        {
         SigC::SlotData* d=s.data();
         ProxyNode::connect(obj,
                            obj->signal_names[index],
			    (GtkSignalFunc)gtk_callback,
                            d,
			    false);
         return d;
        }

      Connection connect_after(const SlotType &s)
        {
         SigC::SlotData* d=s.data();
         ProxyNode::connect(obj,
                            obj->signal_names[index],
			    (GtkSignalFunc)gtk_callback,
			    d,
			    true);
         return d;
        }

  };

template <class R,class P1,
          class Obj,class gObj,int index,
          R (*emit_func)(gObj*,P1)>
class EmitProxySignal1
  : public ProxySignal1 
    <R,P1,Obj,gObj,index>
  {
    public:
      typedef EmitProxySignal1<R,P1,Obj,gObj,index,emit_func> Self;
      typedef SigC::Slot1<R,P1> SlotType;
      typedef SigC::CallDataObj2<typename SlotType::Func,Self> Data;

    private:

#ifdef SIGC_CXX_PARTIAL_SPEC
      typedef R RType;
#else
      typedef SigC::Trait<R>::type RType;
#endif

      static RType callback(void* d,P1 p1)
        {
          Data* data=(Data*)d;
          return data->obj->emit(p1);
        }

    public:
      SlotType slot()
        {
          SigC::SlotData* tmp=manage(new SigC::SlotData());
          Data& data=reinterpret_cast<Data&>(tmp->data_);
          data.callback=&callback;
          data.obj=this;
          SigC::ScopeNode* node=tmp->receiver();
          this->obj->register_data(node);
          return tmp;
        }

      RType emit(P1 p1)
        {
          return reinterpret_cast<RType (*)(gObj*,P1)>
            (emit_func) (this->obj->gtkobj(),p1);
        }

      RType operator()(P1 p1)
        {
          return reinterpret_cast<RType (*)(gObj*,P1)>
            (emit_func) (this->obj->gtkobj(),p1);
        }

  };


/****************************************************************
***** Gtk Proxy Signal 2
****************************************************************/

template <class R,class P1,class P2,
          class Obj,class gObj,int index>
class ProxySignal2
  {
    public:
      typedef SigC::Callback2<R,P1,P2> Callback;
      typedef SigC::Slot2<R,P1,P2> SlotType;

#ifndef GTKMM_CXX_GAUB
    protected:
      Obj *obj;
#else
      Obj *obj;
    protected:
#endif

#ifdef SIGC_CXX_PARTIAL_SPEC
      typedef R RType;
#else
      typedef SigC::Trait<R>::type RType;
#endif

      static RType gtk_callback(GtkObject*,P1 p1,P2 p2,void *d)
        {
          ProxyNode *node=(ProxyNode*)d;
          Callback* data=(Callback*)(node->callback_);
          return data->call(p1,p2);
        }

    public:

      Connection connect(const SlotType &s)
        {
         SigC::SlotData* d=s.data();
         ProxyNode::connect(obj,
                            obj->signal_names[index],
			    (GtkSignalFunc)gtk_callback,
                            d,
			    false);
         return d;
        }

      Connection connect_after(const SlotType &s)
        {
         SigC::SlotData* d=s.data();
         ProxyNode::connect(obj,
                            obj->signal_names[index],
			    (GtkSignalFunc)gtk_callback,
			    d,
			    true);
         return d;
        }

  };

template <class R,class P1,class P2,
          class Obj,class gObj,int index,
          R (*emit_func)(gObj*,P1,P2)>
class EmitProxySignal2
  : public ProxySignal2 
    <R,P1,P2,Obj,gObj,index>
  {
    public:
      typedef EmitProxySignal2<R,P1,P2,Obj,gObj,index,emit_func> Self;
      typedef SigC::Slot2<R,P1,P2> SlotType;
      typedef SigC::CallDataObj2<typename SlotType::Func,Self> Data;

    private:

#ifdef SIGC_CXX_PARTIAL_SPEC
      typedef R RType;
#else
      typedef SigC::Trait<R>::type RType;
#endif

      static RType callback(void* d,P1 p1,P2 p2)
        {
          Data* data=(Data*)d;
          return data->obj->emit(p1,p2);
        }

    public:
      SlotType slot()
        {
          SigC::SlotData* tmp=manage(new SigC::SlotData());
          Data& data=reinterpret_cast<Data&>(tmp->data_);
          data.callback=&callback;
          data.obj=this;
          SigC::ScopeNode* node=tmp->receiver();
          this->obj->register_data(node);
          return tmp;
        }

      RType emit(P1 p1,P2 p2)
        {
          return reinterpret_cast<RType (*)(gObj*,P1,P2)>
            (emit_func) (this->obj->gtkobj(),p1,p2);
        }

      RType operator()(P1 p1,P2 p2)
        {
          return reinterpret_cast<RType (*)(gObj*,P1,P2)>
            (emit_func) (this->obj->gtkobj(),p1,p2);
        }

  };


/****************************************************************
***** Gtk Proxy Signal 3
****************************************************************/

template <class R,class P1,class P2,class P3,
          class Obj,class gObj,int index>
class ProxySignal3
  {
    public:
      typedef SigC::Callback3<R,P1,P2,P3> Callback;
      typedef SigC::Slot3<R,P1,P2,P3> SlotType;

#ifndef GTKMM_CXX_GAUB
    protected:
      Obj *obj;
#else
      Obj *obj;
    protected:
#endif

#ifdef SIGC_CXX_PARTIAL_SPEC
      typedef R RType;
#else
      typedef SigC::Trait<R>::type RType;
#endif

      static RType gtk_callback(GtkObject*,P1 p1,P2 p2,P3 p3,void *d)
        {
          ProxyNode *node=(ProxyNode*)d;
          Callback* data=(Callback*)(node->callback_);
          return data->call(p1,p2,p3);
        }

    public:

      Connection connect(const SlotType &s)
        {
         SigC::SlotData* d=s.data();
         ProxyNode::connect(obj,
                            obj->signal_names[index],
			    (GtkSignalFunc)gtk_callback,
                            d,
			    false);
         return d;
        }

      Connection connect_after(const SlotType &s)
        {
         SigC::SlotData* d=s.data();
         ProxyNode::connect(obj,
                            obj->signal_names[index],
			    (GtkSignalFunc)gtk_callback,
			    d,
			    true);
         return d;
        }

  };

template <class R,class P1,class P2,class P3,
          class Obj,class gObj,int index,
          R (*emit_func)(gObj*,P1,P2,P3)>
class EmitProxySignal3
  : public ProxySignal3 
    <R,P1,P2,P3,Obj,gObj,index>
  {
    public:
      typedef EmitProxySignal3<R,P1,P2,P3,Obj,gObj,index,emit_func> Self;
      typedef SigC::Slot3<R,P1,P2,P3> SlotType;
      typedef SigC::CallDataObj2<typename SlotType::Func,Self> Data;

    private:

#ifdef SIGC_CXX_PARTIAL_SPEC
      typedef R RType;
#else
      typedef SigC::Trait<R>::type RType;
#endif

      static RType callback(void* d,P1 p1,P2 p2,P3 p3)
        {
          Data* data=(Data*)d;
          return data->obj->emit(p1,p2,p3);
        }

    public:
      SlotType slot()
        {
          SigC::SlotData* tmp=manage(new SigC::SlotData());
          Data& data=reinterpret_cast<Data&>(tmp->data_);
          data.callback=&callback;
          data.obj=this;
          SigC::ScopeNode* node=tmp->receiver();
          this->obj->register_data(node);
          return tmp;
        }

      RType emit(P1 p1,P2 p2,P3 p3)
        {
          return reinterpret_cast<RType (*)(gObj*,P1,P2,P3)>
            (emit_func) (this->obj->gtkobj(),p1,p2,p3);
        }

      RType operator()(P1 p1,P2 p2,P3 p3)
        {
          return reinterpret_cast<RType (*)(gObj*,P1,P2,P3)>
            (emit_func) (this->obj->gtkobj(),p1,p2,p3);
        }

  };


/****************************************************************
***** Gtk Proxy Signal 4
****************************************************************/

template <class R,class P1,class P2,class P3,class P4,
          class Obj,class gObj,int index>
class ProxySignal4
  {
    public:
      typedef SigC::Callback4<R,P1,P2,P3,P4> Callback;
      typedef SigC::Slot4<R,P1,P2,P3,P4> SlotType;

#ifndef GTKMM_CXX_GAUB
    protected:
      Obj *obj;
#else
      Obj *obj;
    protected:
#endif

#ifdef SIGC_CXX_PARTIAL_SPEC
      typedef R RType;
#else
      typedef SigC::Trait<R>::type RType;
#endif

      static RType gtk_callback(GtkObject*,P1 p1,P2 p2,P3 p3,P4 p4,void *d)
        {
          ProxyNode *node=(ProxyNode*)d;
          Callback* data=(Callback*)(node->callback_);
          return data->call(p1,p2,p3,p4);
        }

    public:

      Connection connect(const SlotType &s)
        {
         SigC::SlotData* d=s.data();
         ProxyNode::connect(obj,
                            obj->signal_names[index],
			    (GtkSignalFunc)gtk_callback,
                            d,
			    false);
         return d;
        }

      Connection connect_after(const SlotType &s)
        {
         SigC::SlotData* d=s.data();
         ProxyNode::connect(obj,
                            obj->signal_names[index],
			    (GtkSignalFunc)gtk_callback,
			    d,
			    true);
         return d;
        }

  };

template <class R,class P1,class P2,class P3,class P4,
          class Obj,class gObj,int index,
          R (*emit_func)(gObj*,P1,P2,P3,P4)>
class EmitProxySignal4
  : public ProxySignal4 
    <R,P1,P2,P3,P4,Obj,gObj,index>
  {
    public:
      typedef EmitProxySignal4<R,P1,P2,P3,P4,Obj,gObj,index,emit_func> Self;
      typedef SigC::Slot4<R,P1,P2,P3,P4> SlotType;
      typedef SigC::CallDataObj2<typename SlotType::Func,Self> Data;

    private:

#ifdef SIGC_CXX_PARTIAL_SPEC
      typedef R RType;
#else
      typedef SigC::Trait<R>::type RType;
#endif

      static RType callback(void* d,P1 p1,P2 p2,P3 p3,P4 p4)
        {
          Data* data=(Data*)d;
          return data->obj->emit(p1,p2,p3,p4);
        }

    public:
      SlotType slot()
        {
          SigC::SlotData* tmp=manage(new SigC::SlotData());
          Data& data=reinterpret_cast<Data&>(tmp->data_);
          data.callback=&callback;
          data.obj=this;
          SigC::ScopeNode* node=tmp->receiver();
          this->obj->register_data(node);
          return tmp;
        }

      RType emit(P1 p1,P2 p2,P3 p3,P4 p4)
        {
          return reinterpret_cast<RType (*)(gObj*,P1,P2,P3,P4)>
            (emit_func) (this->obj->gtkobj(),p1,p2,p3,p4);
        }

      RType operator()(P1 p1,P2 p2,P3 p3,P4 p4)
        {
          return reinterpret_cast<RType (*)(gObj*,P1,P2,P3,P4)>
            (emit_func) (this->obj->gtkobj(),p1,p2,p3,p4);
        }

  };


/****************************************************************
***** Gtk Proxy Signal 5
****************************************************************/

template <class R,class P1,class P2,class P3,class P4,class P5,
          class Obj,class gObj,int index>
class ProxySignal5
  {
    public:
      typedef SigC::Callback5<R,P1,P2,P3,P4,P5> Callback;
      typedef SigC::Slot5<R,P1,P2,P3,P4,P5> SlotType;

#ifndef GTKMM_CXX_GAUB
    protected:
      Obj *obj;
#else
      Obj *obj;
    protected:
#endif

#ifdef SIGC_CXX_PARTIAL_SPEC
      typedef R RType;
#else
      typedef SigC::Trait<R>::type RType;
#endif

      static RType gtk_callback(GtkObject*,P1 p1,P2 p2,P3 p3,P4 p4,P5 p5,void *d)
        {
          ProxyNode *node=(ProxyNode*)d;
          Callback* data=(Callback*)(node->callback_);
          return data->call(p1,p2,p3,p4,p5);
        }

    public:

      Connection connect(const SlotType &s)
        {
         SigC::SlotData* d=s.data();
         ProxyNode::connect(obj,
                            obj->signal_names[index],
			    (GtkSignalFunc)gtk_callback,
                            d,
			    false);
         return d;
        }

      Connection connect_after(const SlotType &s)
        {
         SigC::SlotData* d=s.data();
         ProxyNode::connect(obj,
                            obj->signal_names[index],
			    (GtkSignalFunc)gtk_callback,
			    d,
			    true);
         return d;
        }

  };

template <class R,class P1,class P2,class P3,class P4,class P5,
          class Obj,class gObj,int index,
          R (*emit_func)(gObj*,P1,P2,P3,P4,P5)>
class EmitProxySignal5
  : public ProxySignal5 
    <R,P1,P2,P3,P4,P5,Obj,gObj,index>
  {
    public:
      typedef EmitProxySignal5<R,P1,P2,P3,P4,P5,Obj,gObj,index,emit_func> Self;
      typedef SigC::Slot5<R,P1,P2,P3,P4,P5> SlotType;
      typedef SigC::CallDataObj2<typename SlotType::Func,Self> Data;

    private:

#ifdef SIGC_CXX_PARTIAL_SPEC
      typedef R RType;
#else
      typedef SigC::Trait<R>::type RType;
#endif

      static RType callback(void* d,P1 p1,P2 p2,P3 p3,P4 p4,P5 p5)
        {
          Data* data=(Data*)d;
          return data->obj->emit(p1,p2,p3,p4,p5);
        }

    public:
      SlotType slot()
        {
          SigC::SlotData* tmp=manage(new SigC::SlotData());
          Data& data=reinterpret_cast<Data&>(tmp->data_);
          data.callback=&callback;
          data.obj=this;
          SigC::ScopeNode* node=tmp->receiver();
          this->obj->register_data(node);
          return tmp;
        }

      RType emit(P1 p1,P2 p2,P3 p3,P4 p4,P5 p5)
        {
          return reinterpret_cast<RType (*)(gObj*,P1,P2,P3,P4,P5)>
            (emit_func) (this->obj->gtkobj(),p1,p2,p3,p4,p5);
        }

      RType operator()(P1 p1,P2 p2,P3 p3,P4 p4,P5 p5)
        {
          return reinterpret_cast<RType (*)(gObj*,P1,P2,P3,P4,P5)>
            (emit_func) (this->obj->gtkobj(),p1,p2,p3,p4,p5);
        }

  };


/****************************************************************
***** Gtk Proxy Signal 6
****************************************************************/

template <class R,class P1,class P2,class P3,class P4,class P5,class P6,
          class Obj,class gObj,int index>
class ProxySignal6
  {
    public:
      typedef SigC::Callback6<R,P1,P2,P3,P4,P5,P6> Callback;
      typedef SigC::Slot6<R,P1,P2,P3,P4,P5,P6> SlotType;

#ifndef GTKMM_CXX_GAUB
    protected:
      Obj *obj;
#else
      Obj *obj;
    protected:
#endif

#ifdef SIGC_CXX_PARTIAL_SPEC
      typedef R RType;
#else
      typedef SigC::Trait<R>::type RType;
#endif

      static RType gtk_callback(GtkObject*,P1 p1,P2 p2,P3 p3,P4 p4,P5 p5,P6 p6,void *d)
        {
          ProxyNode *node=(ProxyNode*)d;
          Callback* data=(Callback*)(node->callback_);
          return data->call(p1,p2,p3,p4,p5,p6);
        }

    public:

      Connection connect(const SlotType &s)
        {
         SigC::SlotData* d=s.data();
         ProxyNode::connect(obj,
                            obj->signal_names[index],
			    (GtkSignalFunc)gtk_callback,
                            d,
			    false);
         return d;
        }

      Connection connect_after(const SlotType &s)
        {
         SigC::SlotData* d=s.data();
         ProxyNode::connect(obj,
                            obj->signal_names[index],
			    (GtkSignalFunc)gtk_callback,
			    d,
			    true);
         return d;
        }

  };

template <class R,class P1,class P2,class P3,class P4,class P5,class P6,
          class Obj,class gObj,int index,
          R (*emit_func)(gObj*,P1,P2,P3,P4,P5,P6)>
class EmitProxySignal6
  : public ProxySignal6 
    <R,P1,P2,P3,P4,P5,P6,Obj,gObj,index>
  {
    public:
      typedef EmitProxySignal6<R,P1,P2,P3,P4,P5,P6,Obj,gObj,index,emit_func> Self;
      typedef SigC::Slot6<R,P1,P2,P3,P4,P5,P6> SlotType;
      typedef SigC::CallDataObj2<typename SlotType::Func,Self> Data;

    private:

#ifdef SIGC_CXX_PARTIAL_SPEC
      typedef R RType;
#else
      typedef SigC::Trait<R>::type RType;
#endif

      static RType callback(void* d,P1 p1,P2 p2,P3 p3,P4 p4,P5 p5,P6 p6)
        {
          Data* data=(Data*)d;
          return data->obj->emit(p1,p2,p3,p4,p5,p6);
        }

    public:
      SlotType slot()
        {
          SigC::SlotData* tmp=manage(new SigC::SlotData());
          Data& data=reinterpret_cast<Data&>(tmp->data_);
          data.callback=&callback;
          data.obj=this;
          SigC::ScopeNode* node=tmp->receiver();
          this->obj->register_data(node);
          return tmp;
        }

      RType emit(P1 p1,P2 p2,P3 p3,P4 p4,P5 p5,P6 p6)
        {
          return reinterpret_cast<RType (*)(gObj*,P1,P2,P3,P4,P5,P6)>
            (emit_func) (this->obj->gtkobj(),p1,p2,p3,p4,p5,p6);
        }

      RType operator()(P1 p1,P2 p2,P3 p3,P4 p4,P5 p5,P6 p6)
        {
          return reinterpret_cast<RType (*)(gObj*,P1,P2,P3,P4,P5,P6)>
            (emit_func) (this->obj->gtkobj(),p1,p2,p3,p4,p5,p6);
        }

  };




}

#endif // SIGCXX_PROXY_H


