summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBill Haneman <billh@src.gnome.org>2001-04-27 17:30:22 +0000
committerBill Haneman <billh@src.gnome.org>2001-04-27 17:30:22 +0000
commit1218da95d14a1e75ae9e13f553ebc74790b2fd07 (patch)
treeaf1f1028d5c264a587af37ccdabc4c17da81b6b1
parentb1852f9daf1c8a315c554a6d8a729b741313e8e9 (diff)
downloadatk-1218da95d14a1e75ae9e13f553ebc74790b2fd07.tar.gz
Why did that last commit still build? ;-) Fixed goofs in set_selection_bounds
and set_caret_offset.
-rwxr-xr-xatk/atktext.c23
-rwxr-xr-xatk/atktext.h4
2 files changed, 24 insertions, 3 deletions
diff --git a/atk/atktext.c b/atk/atktext.c
index a273436..d3959e6 100755
--- a/atk/atktext.c
+++ b/atk/atktext.c
@@ -289,7 +289,7 @@ atk_text_get_selection_bounds (AtkText *text,
}
}
-void
+gboolean
atk_text_set_selection_bounds (AtkText *text,
gint start_offset,
gint end_offset)
@@ -310,3 +310,24 @@ atk_text_set_selection_bounds (AtkText *text,
return FALSE;
}
}
+
+gboolean
+atk_text_set_selection_bounds (AtkText *text,
+ gint offset)
+{
+ AtkTextIface *iface;
+
+ g_return_val_if_fail (text != NULL, FALSE);
+ g_return_val_if_fail (ATK_IS_TEXT (text), FALSE);
+
+ iface = ATK_TEXT_GET_IFACE (text);
+
+ if (iface->set_caret_offset)
+ {
+ return (*(iface->set_caret_offset)) (text, offset);
+ }
+ else
+ {
+ return FALSE;
+ }
+}
diff --git a/atk/atktext.h b/atk/atktext.h
index 51d27c1..5387593 100755
--- a/atk/atktext.h
+++ b/atk/atktext.h
@@ -91,7 +91,7 @@ struct _AtkTextIface
void (* get_selection_bounds) (AtkText *text,
gint *start_offset,
gint *end_offset);
- void (* set_selection_bounds) (AtkText *text,
+ gboolean (* set_selection_bounds) (AtkText *text,
gint start_offset,
gint end_offset);
gboolean (* set_caret_offset) (AtkText *text,
@@ -143,7 +143,7 @@ gchar* atk_text_get_selected_text (AtkText *tex
void atk_text_get_selection_bounds (AtkText *text,
gint *start_offset,
gint *end_offset);
-void atk_text_set_selection_bounds (AtkText *text,
+gboolean atk_text_set_selection_bounds (AtkText *text,
gint start_offset,
gint end_offset);
gboolean atk_text_set_caret_offset (AtkText *text,