From 3d09c9a8678a760387512d8da2cc0a8e4a307bb8 Mon Sep 17 00:00:00 2001 From: Fernando Herrera Date: Mon, 21 Mar 2011 13:56:42 -0700 Subject: [PATCH] BGO#638377: Add text_insert, text_remove, and text_update signals --- atk/atkmarshal.list | 2 ++ atk/atktext.c | 35 ++++++++++++++++++++++++++++++++++- 2 files changed, 36 insertions(+), 1 deletion(-) diff --git a/atk/atkmarshal.list b/atk/atkmarshal.list index 649049b..0763ae8 100644 --- a/atk/atkmarshal.list +++ b/atk/atkmarshal.list @@ -23,4 +23,6 @@ # BOOL deprecated alias for BOOLEAN VOID:INT,INT +VOID:INT,INT,STRING +VOID:INT,INT,INT,STRING VOID:STRING,BOOLEAN diff --git a/atk/atktext.c b/atk/atktext.c index 76b36d9..800cba5 100755 --- a/atk/atktext.c +++ b/atk/atktext.c @@ -30,6 +30,9 @@ enum { TEXT_CARET_MOVED, TEXT_SELECTION_CHANGED, TEXT_ATTRIBUTES_CHANGED, + TEXT_INSERT, + TEXT_REMOVE, + TEXT_UPDATE, LAST_SIGNAL }; @@ -168,7 +171,37 @@ atk_text_base_init (AtkTextIface *class) atk_marshal_VOID__INT_INT, G_TYPE_NONE, 2, G_TYPE_INT, G_TYPE_INT); - + + atk_text_signals[TEXT_INSERT] = + g_signal_new ("text_insert", + ATK_TYPE_TEXT, + G_SIGNAL_RUN_LAST | G_SIGNAL_DETAILED, + 0, + (GSignalAccumulator) NULL, NULL, + atk_marshal_VOID__INT_INT_STRING, + G_TYPE_NONE, + 3, G_TYPE_INT, G_TYPE_INT, G_TYPE_STRING); + + atk_text_signals[TEXT_REMOVE] = + g_signal_new ("text_remove", + ATK_TYPE_TEXT, + G_SIGNAL_RUN_LAST | G_SIGNAL_DETAILED, + 0, + (GSignalAccumulator) NULL, NULL, + atk_marshal_VOID__INT_INT_STRING, + G_TYPE_NONE, + 3, G_TYPE_INT, G_TYPE_INT, G_TYPE_STRING); + + atk_text_signals[TEXT_UPDATE] = + g_signal_new ("text_update", + ATK_TYPE_TEXT, + G_SIGNAL_RUN_LAST | G_SIGNAL_DETAILED, + 0, + (GSignalAccumulator) NULL, NULL, + atk_marshal_VOID__INT_INT_INT_STRING, + G_TYPE_NONE, + 4, G_TYPE_INT, G_TYPE_INT, G_TYPE_INT, G_TYPE_STRING); + atk_text_signals[TEXT_CARET_MOVED] = g_signal_new ("text_caret_moved", ATK_TYPE_TEXT, -- 2.7.4