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