1
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/loose.dtd">
5
>I need to add a new signal to a GTK+ widget. Any
9
CONTENT="Modular DocBook HTML Stylesheet Version 1.79"><LINK
12
HREF="book1.html"><LINK
14
TITLE="Development with GTK+: general questions"
15
HREF="c466.html"><LINK
17
TITLE="I have my signal connected to the the (whatever) event,
18
but it seems I don't catch it. What's wrong?"
19
HREF="x563.html"><LINK
21
TITLE="Is it possible to get some text displayed which is
22
truncated to fit inside its allocation?"
23
HREF="x581.html"></HEAD
34
SUMMARY="Header navigation table"
53
><<< Previous</A
59
>Development with GTK+: general questions</TD
67
>Next >>></A
80
>I need to add a new signal to a GTK+ widget. Any
84
>If the signal you want to add may be beneficial for
85
other GTK+ users, you may want to submit a patch that
86
presents your changes. Check the tutorial for more
87
information about adding signals to a widget class.</P
89
>If you don't think it is the case or if your patch is
90
not applied you'll have to use the
93
>gtk_object_class_user_signal_new</TT
97
>gtk_object_class_user_signal_new</TT
99
to add a new signal to a predefined GTK+ widget without any
100
modification of the GTK+ source code. The new signal can be
105
handled in the same way as other signals.</P
107
>Tim Janik posted this code snippet:</P
115
CLASS="PROGRAMLISTING"
116
>static guint signal_user_action = 0;
119
gtk_object_class_user_signal_new (gtk_type_class (GTK_TYPE_WIDGET),
121
GTK_RUN_LAST | GTK_RUN_ACTION,
122
gtk_marshal_NONE__POINTER,
127
gtk_widget_user_action (GtkWidget *widget,
130
g_return_if_fail (GTK_IS_WIDGET (widget));
132
gtk_signal_emit (GTK_OBJECT (widget), signal_user_action, act_data);
138
>If you want your new signal to have more than the
139
classical gpointer parameter, you'll have to play with GTK+
147
SUMMARY="Footer navigation table"
160
><<< Previous</A
178
>Next >>></A
186
>I have my signal connected to the the (whatever) event,
187
but it seems I don't catch it. What's wrong?</TD
201
>Is it possible to get some text displayed which is
202
truncated to fit inside its allocation?</TD
b'\\ No newline at end of file'