renew get_text APIs
@chpe
Submitted by Christian Persch Link to original bug (#758723)
Description
The vte_terminal_get_text* APIs are bad. They take a callback that is once called for each! cell in the range. Not only is this bad API, but it doesn't really translate well into where I want to go with the internals C++ification.
I proposed to deprecate these APIs and add a new call like this:
char *vte_terminal_get_text2(VteTerminal *terminal, long start_row, long start_column, long end_row, long end_column, gboolean block, gboolean wrap, gboolean include_trailing_whitespace, GArray *attributes, gsize *out_len);
and possibly a shorter variant vte_terminal_get_text_selected() that uses the selection range.
The deprecated functions would call this new one, without ever calling the provided callback.
Looking at codesearch.debian.net, the callback isn't really used for anything (outside being bound by bindings), with all instances being either NULL, a callback always returning TRUE, or something that is replaceable with a range (the one instance in gnome-terminal).
(The GArray parameter for the attributes is also bad, but fixing that requires a much larger effort.)
Thoughts?
Version: 0.40.x