From 71be227f36f058baf812f68deea3f368b27b3b98 Mon Sep 17 00:00:00 2001 From: Christian Persch Date: Fri, 2 Oct 2015 20:46:11 +0200 Subject: widget: Deprecate vte_terminal_match_check Instead of trying to calculate the row and column from event coordinates, vte_terminal_match_check_event() should be used directly. Coordinate translation will fail in future with sub-row scrolling; and this function may be changed to just return NULL ("no match") then. --- src/vte.cc | 2 ++ src/vte/vtedeprecated.h | 5 +++++ src/vte/vteterminal.h | 3 --- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/vte.cc b/src/vte.cc index 40a19360..70c1e557 100644 --- a/src/vte.cc +++ b/src/vte.cc @@ -2056,6 +2056,8 @@ rowcol_inside_match (VteTerminal *terminal, glong row, glong col) * * Returns: (transfer full): a newly allocated string which matches one of the previously * set regular expressions + * + * Deprecated: 0.44: Use vte_terminal_match_check_event() instead. */ char * vte_terminal_match_check(VteTerminal *terminal, glong column, glong row, diff --git a/src/vte/vtedeprecated.h b/src/vte/vtedeprecated.h index 0d41e48d..fcd928f4 100644 --- a/src/vte/vtedeprecated.h +++ b/src/vte/vtedeprecated.h @@ -41,6 +41,11 @@ void vte_terminal_match_set_cursor(VteTerminal *terminal, int tag, GdkCursor *cursor) _VTE_GNUC_NONNULL(1); +_VTE_DEPRECATED +char *vte_terminal_match_check(VteTerminal *terminal, + glong column, glong row, + int *tag) _VTE_GNUC_NONNULL(1) G_GNUC_MALLOC; + _VTE_DEPRECATED void vte_terminal_search_set_gregex (VteTerminal *terminal, GRegex *gregex, diff --git a/src/vte/vteterminal.h b/src/vte/vteterminal.h index fae0f23f..8f8a1e52 100644 --- a/src/vte/vteterminal.h +++ b/src/vte/vteterminal.h @@ -307,9 +307,6 @@ void vte_terminal_match_remove_all(VteTerminal *terminal) _VTE_GNUC_NONNULL(1); /* Check if a given cell on the screen contains part of a matched string. If * it does, return the string, and store the match tag in the optional tag * argument. */ -char *vte_terminal_match_check(VteTerminal *terminal, - glong column, glong row, - int *tag) _VTE_GNUC_NONNULL(1) G_GNUC_MALLOC; char *vte_terminal_match_check_event(VteTerminal *terminal, GdkEvent *event, int *tag) _VTE_GNUC_NONNULL(1) _VTE_GNUC_NONNULL(2) G_GNUC_MALLOC; -- cgit v1.2.1