rollback to 3428, before the mysterious removal of libs/* at 3431/3432
[ardour.git] / libs / glibmm2 / glib / glibmm / signalproxy_connectionnode.h
1 // -*- c++ -*-
2 #ifndef _GLIBMM_SIGNALPROXY_CONNECTIONNODE_H
3 #define _GLIBMM_SIGNALPROXY_CONNECTIONNODE_H
4
5 /* $Id: signalproxy_connectionnode.h 446 2007-09-26 15:10:44Z murrayc $ */
6
7 /* signalproxy_connectionnode.h
8  *
9  * Copyright (C) 2002 The gtkmm Development Team
10  *
11  * This library is free software; you can redistribute it and/or
12  * modify it under the terms of the GNU Library General Public
13  * License as published by the Free Software Foundation; either
14  * version 2 of the License, or (at your option) any later version.
15  *
16  * This library is distributed in the hope that it will be useful,
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
19  * Library General Public License for more details.
20  *
21  * You should have received a copy of the GNU Library General Public
22  * License along with this library; if not, write to the Free
23  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
24  */
25
26 #include <sigc++/sigc++.h>
27 #include <glib/gtypes.h>
28
29 #ifndef DOXYGEN_SHOULD_SKIP_THIS
30 typedef struct _GObject GObject;
31 typedef struct _GClosure GClosure;
32 #endif //DOXYGEN_SHOULD_SKIP_THIS
33
34 namespace Glib
35 {
36
37 #ifndef DOXYGEN_SHOULD_SKIP_THIS
38
39 /** SignalProxyConnectionNode is a connection node for use with SignalProxy.
40   * It lives between the layer of Gtk+ and libsigc++.
41   * It is very much an internal class.
42   */
43 class SignalProxyConnectionNode
44 {
45 public:
46
47   /** @param slot The signal handler for the glib signal.
48    *  @param gobject The GObject that might emit this glib signal
49    */
50   SignalProxyConnectionNode(const sigc::slot_base& slot, GObject* gobject);
51
52   /** Callback that is executed when the slot becomes invalid.
53    * This callback is registered in the slot.
54    * @param data The SignalProxyConnectionNode object (@p this).
55    */
56   static void* notify(void* data);
57
58   /** Callback that is executed when the glib closure is destroyed.
59    * @param data The SignalProxyConnectionNode object (@p this).
60    * @param closure The glib closure object.
61    */
62   static void destroy_notify_handler(gpointer data, GClosure* closure);
63
64   gulong connection_id_;
65   sigc::slot_base slot_;
66
67 protected:
68   GObject* object_;
69 };
70
71 #endif //DOXYGEN_SHOULD_SKIP_THIS
72
73 } /* namespace Glib */
74
75
76 #endif /* _GLIBMM_SIGNALPROXY_CONNECTIONNODE_H */
77