</PropertyGroup>
<ItemDefinitionGroup>
<ClCompile>
- <AdditionalIncludeDirectories>.\glibmm;..;..\glib;$(GlibEtcInstallRoot)\include\sigc++-2.0;$(GlibEtcInstallRoot)\lib\sigc++-2.0\include;$(GlibEtcInstallRoot)\include\glib-2.0;$(GlibEtcInstallRoot)\lib\glib-2.0\include;$(GlibEtcInstallRoot)\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>.\glibmm;..;..\glib;$(GlibEtcInstallRoot)\include\sigc++-2.0;$(GlibEtcInstallRoot)\lib\sigc++-2.0\include;$(GlibEtcInstallRoot)\include\gio-win32-2.0;$(GlibEtcInstallRoot)\include\glib-2.0;$(GlibEtcInstallRoot)\lib\glib-2.0\include;$(GlibEtcInstallRoot)\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<ForcedIncludeFiles>msvc_recommended_pragmas.h;%(ForcedIncludeFiles)</ForcedIncludeFiles>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<AdditionalOptions>/d2Zi+ %(AdditionalOptions)</AdditionalOptions>
+2.47.92:
+
+* Adapt to libsigc++-2.0 2.8:
+ - using only the non-deprecated sigc::mem_fun() API.
+ (Kjell Ahlstedt)
+ - using std::ref instead of deprecated sigc::ref.
+ (Murray Cumming)
+ - Correct bad uses of sigc::bind<1>.
+ (Murray Cumming)
+
+
+gmmproc:
+* defs generation: Mark deprecated signals and properties as such in the
+ generated .defs file.
+* gmmproc: Check if signals and properties are deprecated appropriately
+ (Kjell Ahlstedt)
+
+Build:
+* MSVC builds: Look for includes in include/gio-win32-2.0.
+ (Chun-wei Fan)
+
2.47.6:
Glib:
## You should have received a copy of the GNU Lesser General Public License
## along with this library. If not, see <http://www.gnu.org/licenses/>.
-AC_INIT([glibmm], [2.47.6],
+AC_INIT([glibmm], [2.47.92],
[http://bugzilla.gnome.org/enter_bug.cgi?product=glibmm],
[glibmm], [http://www.gtkmm.org/])
AC_PREREQ([2.59])
AC_DEFINE([GIOMM_STATIC_LIB], [1], [Define if giomm is built as a static library])
])
-glibreq='2.0 >= 2.47.6'
+glibreq='2.0 >= 2.47.92'
-GLIBMM_MODULES="sigc++-2.0 >= 2.6.0 glib-$glibreq gobject-$glibreq gmodule-$glibreq"
+GLIBMM_MODULES="sigc++-2.0 >= 2.8.0 glib-$glibreq gobject-$glibreq gmodule-$glibreq"
GIOMM_MODULES="$GLIBMM_MODULES gio-$glibreq"
test "x$glibmm_host_windows" = xyes || GIOMM_MODULES="$GIOMM_MODULES gio-unix-$glibreq"
progress_threads_[i] = progress;
progress->signal_finished().connect(
- sigc::bind<1>(sigc::mem_fun(*this, &Application::on_progress_finished), progress));
+ sigc::bind(sigc::mem_fun(*this, &Application::on_progress_finished), progress));
}
}
catch (...)
for (auto c = 'a'; c <= 'z'; ++c)
{
- pool.push(sigc::bind<1>(sigc::ptr_fun(&print_char), c));
+ pool.push(sigc::bind(sigc::ptr_fun(&print_char), c));
}
pool.shutdown();
class ObjectBase;
-/// Use the connect() method, with sigc::ptr_fun() or sig::mem_fun() to connect signals to signal
+/// Use the connect() method, with sigc::ptr_fun() or sigc::mem_fun() to connect signals to signal
/// handlers.
class SignalProxyProperty : public SignalProxyBase
{
*/
tstring.clear();
- root->traverse(sigc::bind(sigc::ptr_fun(node_build_string), sigc::ref(tstring)),
+ root->traverse(sigc::bind(sigc::ptr_fun(node_build_string), std::ref(tstring)),
Glib::TRAVERSE_PRE_ORDER, type_nodetree_string::TRAVERSE_ALL, -1);
g_assert(tstring == "ABCDEFGHIJK");
tstring.clear();
- root->traverse(sigc::bind(sigc::ptr_fun(node_build_string), sigc::ref(tstring)),
+ root->traverse(sigc::bind(sigc::ptr_fun(node_build_string), std::ref(tstring)),
Glib::TRAVERSE_POST_ORDER, type_nodetree_string::TRAVERSE_ALL, -1);
g_assert(tstring == "CDEBHIJKGFA");
tstring.clear();
- root->traverse(sigc::bind(sigc::ptr_fun(node_build_string), sigc::ref(tstring)),
+ root->traverse(sigc::bind(sigc::ptr_fun(node_build_string), std::ref(tstring)),
Glib::TRAVERSE_IN_ORDER, type_nodetree_string::TRAVERSE_ALL, -1);
g_assert(tstring == "CBDEAHGIJKF");
tstring.clear();
- root->traverse(sigc::bind(sigc::ptr_fun(node_build_string), sigc::ref(tstring)),
+ root->traverse(sigc::bind(sigc::ptr_fun(node_build_string), std::ref(tstring)),
Glib::TRAVERSE_LEVEL_ORDER, type_nodetree_string::TRAVERSE_ALL, -1);
g_assert(tstring == "ABFCDEGHIJK");
tstring.clear();
- root->traverse(sigc::bind(sigc::ptr_fun(node_build_string), sigc::ref(tstring)),
+ root->traverse(sigc::bind(sigc::ptr_fun(node_build_string), std::ref(tstring)),
Glib::TRAVERSE_LEVEL_ORDER, type_nodetree_string::TRAVERSE_LEAVES, -1);
g_assert(tstring == "CDEHIJK");
tstring.clear();
- root->traverse(sigc::bind(sigc::ptr_fun(node_build_string), sigc::ref(tstring)),
+ root->traverse(sigc::bind(sigc::ptr_fun(node_build_string), std::ref(tstring)),
Glib::TRAVERSE_PRE_ORDER, type_nodetree_string::TRAVERSE_NON_LEAVES, -1);
g_assert(tstring == "ABFG");
tstring.clear();
node_B->reverse_children();
node_G->reverse_children();
- root->traverse(sigc::bind(sigc::ptr_fun(node_build_string), sigc::ref(tstring)),
+ root->traverse(sigc::bind(sigc::ptr_fun(node_build_string), std::ref(tstring)),
Glib::TRAVERSE_LEVEL_ORDER, type_nodetree_string::TRAVERSE_ALL, -1);
g_assert(tstring == "ABFEDCGKJIH");
tstring.clear();
g_assert(root->node_count(type_nodetree_string::TRAVERSE_ALL) ==
node->node_count(type_nodetree_string::TRAVERSE_ALL));
g_assert(root->get_max_height() == node->get_max_height());
- root->traverse(sigc::bind(sigc::ptr_fun(node_build_string), sigc::ref(tstring)),
+ root->traverse(sigc::bind(sigc::ptr_fun(node_build_string), std::ref(tstring)),
Glib::TRAVERSE_IN_ORDER, type_nodetree_string::TRAVERSE_ALL, -1);
- node->traverse(sigc::bind(sigc::ptr_fun(node_build_string), sigc::ref(cstring)),
+ node->traverse(sigc::bind(sigc::ptr_fun(node_build_string), std::ref(cstring)),
Glib::TRAVERSE_IN_ORDER, type_nodetree_string::TRAVERSE_ALL, -1);
g_assert(tstring == cstring);
{
// std::cout << "new Test" << std::endl;
#ifdef ACTIVATE_BUG // See https://bugzilla.gnome.org/show_bug.cgi?id=564005#c15s
- action->signal_sig1().connect(sigc::bind(sigc::mem_fun(this, &Test::on_sig1), action));
+ action->signal_sig1().connect(sigc::bind(sigc::mem_fun(*this, &Test::on_sig1), action));
#else
Glib::RefPtr<Action> action2(new Action);
- action->signal_sig1().connect(sigc::bind(sigc::mem_fun(this, &Test::on_sig1), action2));
+ action->signal_sig1().connect(sigc::bind(sigc::mem_fun(*this, &Test::on_sig1), action2));
#endif
}
-/* $Id$ */
-
/* generate_extra_defs.cc
*
* Copyright (C) 2001 The Free Software Foundation
bool bReadable = (flags & G_PARAM_READABLE) == G_PARAM_READABLE;
bool bWritable = (flags & G_PARAM_WRITABLE) == G_PARAM_WRITABLE;
bool bConstructOnly = (flags & G_PARAM_CONSTRUCT_ONLY) == G_PARAM_CONSTRUCT_ONLY;
+ bool bDeprecated = (flags & G_PARAM_DEPRECATED) == G_PARAM_DEPRECATED;
//#t and #f aren't documented, but I guess that it's correct based on the example in the .defs
// spec.
strResult += " (readable " + (bReadable ? strTrue : strFalse) + ")\n";
strResult += " (writable " + (bWritable ? strTrue : strFalse) + ")\n";
strResult += " (construct-only " + (bConstructOnly ? strTrue : strFalse) + ")\n";
+ if (bDeprecated)
+ strResult += " (deprecated #t)\n"; // Default: not deprecated
strResult += ")\n\n"; // close (strNodeName
strResult += " (when \"" + strWhen + "\")\n";
}
+ bool bDeprecated = (signalQuery.signal_flags & G_SIGNAL_DEPRECATED) == G_SIGNAL_DEPRECATED;
+ if (bDeprecated)
+ strResult += " (deprecated #t)\n"; // Default: not deprecated
// Loop through the list of parameters:
const GType* pParameters = signalQuery.param_types;
# string rettype;
#
# string when. e.g. first, last, or both.
-# string entity_type. e.g. method or signal
+# string entity_type. e.g. vfunc or signal
+# bool deprecated; # optional
# }
# "new" can't have prototype
$$self{rettype} = "void"
}
+ $$self{deprecated} = ($1 eq "#t") if ($def =~ s/\(deprecated (\S+)\)//);
+
# signals always have a parameter
push(@{$$self{param_types}}, "$$self{class}*");
push(@{$$self{param_names}}, "self");
return $self;
}
+# bool get_deprecated()
+sub get_deprecated($)
+{
+ my ($self) = @_;
+ return $$self{deprecated}; # undef, 0 or 1
+}
+
# bool has_same_types($objFunction)
# Compares return types and argument types
sub has_same_types($$)
printf STDERR "Output.pm, $main::source: $format",@_;
}
+# void check_deprecation($file_deprecated, $defs_deprecated, $wrap_deprecated,
+# $entity_name, $entity_type, $wrapper)
+sub check_deprecation($$$$$$)
+{
+ my ($file_deprecated, $defs_deprecated, $wrap_deprecated,
+ $entity_name, $entity_type, $wrapper) = @_;
+
+ # Don't print a warning if the whole .hg file is deprecated.
+ return if ($file_deprecated);
+
+ if ($defs_deprecated && !$wrap_deprecated)
+ {
+ print STDERR "Warning, $main::source: The $entity_name $entity_type" .
+ " is deprecated in the .defs file, but not in _WRAP_$wrapper.\n";
+ }
+ # Uncomment the following lines some time in the future, when most
+ # signal.defs files have been updated with deprecation information.
+ # generate_extra_defs.cc was updated to generate this info soon after
+ # glibmm 2.47.6.
+ #elsif (!$defs_deprecated && $wrap_deprecated)
+ #{
+ # print STDERR "Warning, $main::source: The $entity_name $entity_type" .
+ # " is deprecated in _WRAP_$wrapper, but not in the .defs file.\n";
+ #}
+}
+
sub ifdef($$)
{
my ($self, $ifdef) = @_;
}
# _PROPERTY_PROXY(name, cpp_type)
-# void output_wrap_property($filename, $line_num, $name, $cpp_type, $deprecated, $deprecation_docs)
-sub output_wrap_property($$$$$$$$)
+# void output_wrap_property($filename, $line_num, $name, $cpp_type, $file_deprecated,
+# $deprecated, $deprecation_docs)
+sub output_wrap_property($$$$$$$$$$)
{
- my ($self, $filename, $line_num, $name, $cpp_type, $c_class, $deprecated,
- $deprecation_docs, $newin) = @_;
+ my ($self, $filename, $line_num, $name, $cpp_type, $c_class, $file_deprecated,
+ $deprecated, $deprecation_docs, $newin) = @_;
my $objProperty = GtkDefs::lookup_property($c_class, $name);
if($objProperty eq 0) #If the lookup failed:
}
else
{
+ Output::check_deprecation($file_deprecated, $objProperty->get_deprecated(),
+ $deprecated, $name, "property", "PROPERTY");
+
$self->output_wrap_any_property($filename, $line_num, $name, $cpp_type, $c_class,
$deprecated, $deprecation_docs, $newin, $objProperty, "_PROPERTY_PROXY");
}
}
# _CHILD_PROPERTY_PROXY(name, cpp_type)
-# void output_wrap_child_property($filename, $line_num, $name, $cpp_type, $deprecated, $deprecation_docs)
-sub output_wrap_child_property($$$$$$$$)
+# void output_wrap_child_property($filename, $line_num, $name, $cpp_type, $file_deprecated,
+# $deprecated, $deprecation_docs)
+sub output_wrap_child_property($$$$$$$$$$)
{
- my ($self, $filename, $line_num, $name, $cpp_type, $c_class, $deprecated,
- $deprecation_docs, $newin) = @_;
+ my ($self, $filename, $line_num, $name, $cpp_type, $c_class, $file_deprecated,
+ $deprecated, $deprecation_docs, $newin) = @_;
my $objChildProperty = GtkDefs::lookup_child_property($c_class, $name);
if($objChildProperty eq 0) #If the lookup failed:
}
else
{
+ Output::check_deprecation($file_deprecated, $objChildProperty->get_deprecated(),
+ $deprecated, $name, "child property", "CHILD_PROPERTY");
+
$self->output_wrap_any_property($filename, $line_num, $name, $cpp_type, $c_class,
$deprecated, $deprecation_docs, $newin, $objChildProperty, "_CHILD_PROPERTY_PROXY");
}
# bool readable;
# bool writable;
# bool construct_only;
+# bool deprecated; # optional
# string docs;
# }
$$self{readable} = ($1 eq "#t") if ($def =~ s/\(readable (\S+)\)//);
$$self{writable} = ($1 eq "#t") if ($def =~ s/\(writable (\S+)\)//);
$$self{construct_only} = ($1 eq "#t") if ($def =~ s/\(construct-only (\S+)\)//);
+ $$self{deprecated} = ($1 eq "#t") if ($def =~ s/\(deprecated (\S+)\)//);
$$self{entity_type} = 'property';
# Property documentation:
return $$self{writable};
}
+sub get_deprecated($)
+{
+ my ($self) = @_;
+ return $$self{deprecated}; # undef, 0 or 1
+}
+
sub get_docs($$)
{
my ($self, $deprecation_docs, $newin) = @_;
# _CLASS_OPAQUE_REFCOUNTED
}
- if ($token eq "namespace") { $self->on_namespace() };
+ if ($token eq "namespace") { $self->on_namespace(); }
+ if ($token eq "_IS_DEPRECATED") { $$self{deprecated} = 1; }
# After all token manipulations
if($bAppend)
$deprecation_docs, $newin) = $self->on_wrap_any_property();
$objOutputter->output_wrap_property($filename, $line_num, $argPropertyName,
- $argCppType, $$self{c_class}, $argDeprecated, $deprecation_docs, $newin);
+ $argCppType, $$self{c_class}, $$self{deprecated}, $argDeprecated, $deprecation_docs, $newin);
}
sub on_wrap_child_property($)
$deprecation_docs, $newin) = $self->on_wrap_any_property();
$objOutputter->output_wrap_child_property($filename, $line_num, $argPropertyName,
- $argCppType, $$self{c_class}, $argDeprecated, $deprecation_docs, $newin);
+ $argCppType, $$self{c_class}, $$self{deprecated}, $argDeprecated, $deprecation_docs, $newin);
}
sub output_wrap_check($$$$$$)
}
}
+ Output::check_deprecation($$self{deprecated}, $objCSignal->get_deprecated(),
+ $deprecated, $signal_name, "signal", "SIGNAL");
+
$objOutputter->output_wrap_sig_decl($filename, $line_num, $objCSignal, $objCppSignal,
$signal_name, $bCustomCCallback, $ifdef, $commentblock,
$deprecated, $deprecation_docs, $newin, $exceptionHandler,