[vte] widget: Don't make is_word_char public
- From: Christian Persch <chpe src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vte] widget: Don't make is_word_char public
- Date: Sun, 6 Apr 2014 17:11:42 +0000 (UTC)
commit ec01c93c9b1f7d2f64c7887c28c82c6c10226be9
Author: Christian Persch <chpe gnome org>
Date: Sat Jun 11 23:28:05 2011 +0200
widget: Don't make is_word_char public
Conflicts:
doc/reference/vte-sections.txt
src/vte-private.h
src/vte.c
doc/reference/vte-sections.txt | 1 -
src/vte-private.h | 2 ++
src/vte.c | 11 +++++------
src/vte.h | 1 -
src/vteaccess.c | 32 ++++++++++++++++----------------
5 files changed, 23 insertions(+), 24 deletions(-)
---
diff --git a/doc/reference/vte-sections.txt b/doc/reference/vte-sections.txt
index 2c1a91d..2eb1049 100644
--- a/doc/reference/vte-sections.txt
+++ b/doc/reference/vte-sections.txt
@@ -48,7 +48,6 @@ vte_terminal_set_font
vte_terminal_get_font
vte_terminal_get_has_selection
vte_terminal_set_word_chars
-vte_terminal_is_word_char
vte_terminal_set_backspace_binding
vte_terminal_set_delete_binding
vte_terminal_set_mouse_autohide
diff --git a/src/vte-private.h b/src/vte-private.h
index 3a67155..3c7cd17 100644
--- a/src/vte-private.h
+++ b/src/vte-private.h
@@ -490,6 +490,8 @@ gboolean _vte_terminal_size_to_grid_size(VteTerminal *terminal,
long *cols,
long *rows);
+gboolean _vte_terminal_is_word_char(VteTerminal *terminal, gunichar c);
+
G_END_DECLS
#endif
diff --git a/src/vte.c b/src/vte.c
index 787e31f..5a9effb 100644
--- a/src/vte.c
+++ b/src/vte.c
@@ -5208,8 +5208,8 @@ vte_terminal_key_release(GtkWidget *widget, GdkEventKey *event)
&& gtk_im_context_filter_keypress (terminal->pvt->im_context, event);
}
-/**
- * vte_terminal_is_word_char:
+/*
+ * __vte_terminal_is_word_char:
* @terminal: a #VteTerminal
* @c: a candidate Unicode code point
*
@@ -5219,11 +5219,10 @@ vte_terminal_key_release(GtkWidget *widget, GdkEventKey *event)
* Returns: %TRUE if the character is considered to be part of a word
*/
gboolean
-vte_terminal_is_word_char(VteTerminal *terminal, gunichar c)
+_vte_terminal_is_word_char(VteTerminal *terminal, gunichar c)
{
guint i;
VteWordCharRange *range;
- g_return_val_if_fail(VTE_IS_TERMINAL(terminal), FALSE);
if (terminal->pvt->word_chars != NULL) {
/* Go through each range and check if c is included. */
@@ -5256,7 +5255,7 @@ vte_same_class(VteTerminal *terminal, glong acol, glong arow,
const VteCell *pcell = NULL;
gboolean word_char;
if ((pcell = vte_terminal_find_charcell(terminal, acol, arow)) != NULL && pcell->c != 0) {
- word_char = vte_terminal_is_word_char(terminal, _vte_unistr_get_base (pcell->c));
+ word_char = _vte_terminal_is_word_char(terminal, _vte_unistr_get_base (pcell->c));
/* Lets not group non-wordchars together (bug #25290) */
if (!word_char)
@@ -5266,7 +5265,7 @@ vte_same_class(VteTerminal *terminal, glong acol, glong arow,
if (pcell == NULL || pcell->c == 0) {
return FALSE;
}
- if (word_char != vte_terminal_is_word_char(terminal, _vte_unistr_get_base (pcell->c))) {
+ if (word_char != _vte_terminal_is_word_char(terminal, _vte_unistr_get_base (pcell->c))) {
return FALSE;
}
return TRUE;
diff --git a/src/vte.h b/src/vte.h
index 9729bc0..b8cd561 100644
--- a/src/vte.h
+++ b/src/vte.h
@@ -288,7 +288,6 @@ gboolean vte_terminal_get_has_selection(VteTerminal *terminal);
* (to get a hyphen, place it first), and check if a character is in the
* range. */
void vte_terminal_set_word_chars(VteTerminal *terminal, const char *spec);
-gboolean vte_terminal_is_word_char(VteTerminal *terminal, gunichar c);
/* Set what happens when the user strikes backspace or delete. */
void vte_terminal_set_backspace_binding(VteTerminal *terminal,
diff --git a/src/vteaccess.c b/src/vteaccess.c
index 9f77530..551197a 100644
--- a/src/vteaccess.c
+++ b/src/vteaccess.c
@@ -930,7 +930,7 @@ vte_terminal_accessible_get_text_somewhere(AtkText *text,
/* Back up to the previous non-word-word transition. */
while (offset > 0) {
prev = vte_terminal_accessible_get_character_at_offset(text, offset - 1);
- if (vte_terminal_is_word_char(terminal, prev)) {
+ if (_vte_terminal_is_word_char(terminal, prev)) {
offset--;
} else {
break;
@@ -944,7 +944,7 @@ vte_terminal_accessible_get_text_somewhere(AtkText *text,
if (direction == direction_previous) {
while (offset > 0) {
prev = vte_terminal_accessible_get_character_at_offset(text, offset -
1);
- if (!vte_terminal_is_word_char(terminal, prev)) {
+ if (!_vte_terminal_is_word_char(terminal, prev)) {
offset--;
} else {
break;
@@ -952,7 +952,7 @@ vte_terminal_accessible_get_text_somewhere(AtkText *text,
}
while (offset > 0) {
prev = vte_terminal_accessible_get_character_at_offset(text, offset -
1);
- if (vte_terminal_is_word_char(terminal, prev)) {
+ if (_vte_terminal_is_word_char(terminal, prev)) {
offset--;
} else {
break;
@@ -967,7 +967,7 @@ vte_terminal_accessible_get_text_somewhere(AtkText *text,
if (direction == direction_next) {
while (offset < (int) priv->snapshot_characters->len) {
next = vte_terminal_accessible_get_character_at_offset(text, offset);
- if (vte_terminal_is_word_char(terminal, next)) {
+ if (_vte_terminal_is_word_char(terminal, next)) {
offset++;
} else {
break;
@@ -975,7 +975,7 @@ vte_terminal_accessible_get_text_somewhere(AtkText *text,
}
while (offset < (int) priv->snapshot_characters->len) {
next = vte_terminal_accessible_get_character_at_offset(text, offset);
- if (!vte_terminal_is_word_char(terminal, next)) {
+ if (!_vte_terminal_is_word_char(terminal, next)) {
offset++;
} else {
break;
@@ -986,7 +986,7 @@ vte_terminal_accessible_get_text_somewhere(AtkText *text,
/* Now find the end of this word. */
while (offset < (int) priv->snapshot_characters->len) {
current = vte_terminal_accessible_get_character_at_offset(text, offset);
- if (vte_terminal_is_word_char(terminal, current)) {
+ if (_vte_terminal_is_word_char(terminal, current)) {
offset++;
} else {
break;
@@ -996,7 +996,7 @@ vte_terminal_accessible_get_text_somewhere(AtkText *text,
/* Now find the next non-word-word transition */
while (offset < (int) priv->snapshot_characters->len) {
next = vte_terminal_accessible_get_character_at_offset(text, offset);
- if (!vte_terminal_is_word_char(terminal, next)) {
+ if (!_vte_terminal_is_word_char(terminal, next)) {
offset++;
} else {
break;
@@ -1009,8 +1009,8 @@ vte_terminal_accessible_get_text_somewhere(AtkText *text,
current = vte_terminal_accessible_get_character_at_offset(text, offset);
while (offset > 0) {
prev = vte_terminal_accessible_get_character_at_offset(text, offset - 1);
- if (vte_terminal_is_word_char(terminal, prev) &&
- !vte_terminal_is_word_char(terminal, current)) {
+ if (_vte_terminal_is_word_char(terminal, prev) &&
+ !_vte_terminal_is_word_char(terminal, current)) {
break;
} else {
offset--;
@@ -1025,7 +1025,7 @@ vte_terminal_accessible_get_text_somewhere(AtkText *text,
if (direction == direction_previous) {
while (offset > 0) {
prev = vte_terminal_accessible_get_character_at_offset(text, offset -
1);
- if (vte_terminal_is_word_char(terminal, prev)) {
+ if (_vte_terminal_is_word_char(terminal, prev)) {
offset--;
} else {
break;
@@ -1034,8 +1034,8 @@ vte_terminal_accessible_get_text_somewhere(AtkText *text,
current = vte_terminal_accessible_get_character_at_offset(text, offset);
while (offset > 0) {
prev = vte_terminal_accessible_get_character_at_offset(text, offset -
1);
- if (vte_terminal_is_word_char(terminal, prev) &&
- !vte_terminal_is_word_char(terminal, current)) {
+ if (_vte_terminal_is_word_char(terminal, prev) &&
+ !_vte_terminal_is_word_char(terminal, current)) {
break;
} else {
offset--;
@@ -1051,7 +1051,7 @@ vte_terminal_accessible_get_text_somewhere(AtkText *text,
if (direction == direction_next) {
while (offset < (int) priv->snapshot_characters->len) {
current = vte_terminal_accessible_get_character_at_offset(text,
offset);
- if (!vte_terminal_is_word_char(terminal, current)) {
+ if (!_vte_terminal_is_word_char(terminal, current)) {
offset++;
} else {
break;
@@ -1059,7 +1059,7 @@ vte_terminal_accessible_get_text_somewhere(AtkText *text,
}
while (offset < (int) priv->snapshot_characters->len) {
current = vte_terminal_accessible_get_character_at_offset(text,
offset);
- if (vte_terminal_is_word_char(terminal, current)) {
+ if (_vte_terminal_is_word_char(terminal, current)) {
offset++;
} else {
break;
@@ -1070,7 +1070,7 @@ vte_terminal_accessible_get_text_somewhere(AtkText *text,
/* Now find the next word end. */
while (offset < (int) priv->snapshot_characters->len) {
current = vte_terminal_accessible_get_character_at_offset(text, offset);
- if (!vte_terminal_is_word_char(terminal, current)) {
+ if (!_vte_terminal_is_word_char(terminal, current)) {
offset++;
} else {
break;
@@ -1078,7 +1078,7 @@ vte_terminal_accessible_get_text_somewhere(AtkText *text,
}
while (offset < (int) priv->snapshot_characters->len) {
current = vte_terminal_accessible_get_character_at_offset(text, offset);
- if (vte_terminal_is_word_char(terminal, current)) {
+ if (_vte_terminal_is_word_char(terminal, current)) {
offset++;
} else {
break;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]