2 * Copyright 2003, The libsigc++ Development Team
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 #ifndef SIGCXX_SIGCXX_H
21 #define SIGCXX_SIGCXX_H
23 /** @mainpage libsigc++ Reference Manual
25 * @section description Description
27 * libsigc++ provides a typesafe (at compile time) callback system for standard
28 * C++. It allows you to define signals and to connect those signals to any
29 * callback function, either a global or a member function, regardless of whether
30 * it is static or virtual. It also contains adaptor classes for connection of
31 * dissimilar callbacks.
33 * For instance, see the @ref signal "Signals", @ref sigcfunctors "Functors",
34 * @ref slot "Slots" and @ref adaptors "Adaptors".
37 * <a href="https://developer.gnome.org/libsigc++-tutorial/2.10/">libsigc++ tutorial</a>,
38 * the <a href="https://libsigcplusplus.github.io/libsigcplusplus/">libsigc++ website</a>, and
39 * the <a href="https://developer.gnome.org/gtkmm-tutorial/3.24/chapter-signals.html">Signals appendix of the Programming with gtkmm book</a>.
41 * @section features Features
43 * - Compile-time typesafe callbacks (also faster than run time checks)
44 * - Type-safety violations report the line number correctly with template names
45 * (no tracing template failures into headers)
46 * - No compiler extensions or meta compilers required
47 * - Proper handling of dynamic objects and signals (deleted objects will not
49 * - Extendable API at any level: signal, slot, connection and trackable
50 * - Extensions do not require alteration of basic components
51 * - User-definable accumulators
52 * - A variety of adaptors to change the callback signature: bind, hide,
55 * @section basics Basic Usage
57 * Include the libsigc++ header:
59 * #include <sigc++/sigc++.h>
61 * (You may include individual headers, such as @c sigc++/bind.h instead.)
63 * If your source file is @c program.cc, you can compile it with:
65 * g++ program.cc -o program `pkg-config --cflags --libs sigc++-2.0`
67 * If your version of g++ is not C++11-compliant by default,
68 * add the @c -std=c++11 option.
70 * @subsection meson Using Meson
72 * If using <a href="https://mesonbuild.com/">Meson</a>, include the following
75 * sigc_dep = dependency('sigc++-2.0')
76 * program_name = 'program'
77 * cpp_sources = [ 'program.cc' ]
78 * executable(program_name,
80 * dependencies: sigc_dep
84 * Your @c dependencies: keyword argument should also mention any other libraries
85 * that you need to use.
87 * @subsection autotools Using Autotools
89 * Alternatively, if using autoconf, use the following in @c configure.ac:
91 * PKG_CHECK_MODULES([DEPS], [sigc++-2.0])
93 * Then use the generated @c DEPS_CFLAGS and @c DEPS_LIBS variables
94 * in the project @c Makefile.am files. For example:
96 * yourprogram_CPPFLAGS = $(DEPS_CFLAGS)
97 * yourprogram_LDADD = $(DEPS_LIBS)
100 * Your @c PKG_CHECK_MODULES() call should also mention any other libraries that
101 * you need to use via pkg-config.
103 * @subsection cmake Using CMake
105 * If using CMake, use the following in @c CMakeList.txt:
107 * include(FindPkgConfig)
108 * pkg_check_modules(DEPS REQUIRED sigc++-2.0)
109 * include_directories(${DEPS_INCLUDE_DIRS})
110 * target_link_libraries(yourprogram ${DEPS_LIBRARIES})
113 * Your @c pkg_check_modules() call should also mention any other libraries that
114 * you need to use via pkg-config.
116 * @section scope Scope of Documentation
118 * libsigc++ contains many template functions and template classes/structs,
119 * some with many specializations. This reference manual does not show all
120 * specializations of those templates that hardly any user will use directly.
123 #include <sigc++/signal.h>
124 #include <sigc++/connection.h>
125 #include <sigc++/trackable.h>
126 #include <sigc++/adaptors/adaptors.h>
127 #include <sigc++/functors/functors.h>
129 #endif /* SIGCXX_SIGCXX_H */