[gtk+/gtk-2-90: 96/146] Remove GtkSignal completely
- From: Javier Jardón <jjardon src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gtk+/gtk-2-90: 96/146] Remove GtkSignal completely
- Date: Wed, 9 Dec 2009 07:43:03 +0000 (UTC)
commit c0a79495968533f0f1e32b20030e46344fa6ca35
Author: Javier Jardón <jjardon gnome org>
Date: Thu Oct 15 23:54:43 2009 +0200
Remove GtkSignal completely
docs/faq/gtk-faq.sgml | 22 +-
docs/reference/gtk/gtk-sections.txt | 40 --
docs/reference/gtk/tmpl/gtk-unused.sgml | 143 +------
docs/reference/gtk/tmpl/gtksignal.sgml | 759 -------------------------------
gtk/Makefile.am | 2 -
gtk/gtk.symbols | 19 -
gtk/gtkcalendar.h | 3 -
gtk/gtkmain.c | 10 +-
gtk/gtksignal.c | 394 ----------------
gtk/gtksignal.h | 149 ------
gtk/gtktoolbar.h | 1 -
gtk/makefile.msc.in | 4 -
12 files changed, 24 insertions(+), 1522 deletions(-)
---
diff --git a/docs/faq/gtk-faq.sgml b/docs/faq/gtk-faq.sgml
index c940b09..01c71d3 100644
--- a/docs/faq/gtk-faq.sgml
+++ b/docs/faq/gtk-faq.sgml
@@ -1898,7 +1898,7 @@ not applied you'll have to use the
function. <literal>gtk_object_class_user_signal_new</literal> allows you
to add a new signal to a predefined GTK+ widget without any
modification of the GTK+ source code. The new signal can be
-emited with <literal>gtk_signal_emit</literal> and can be
+emited with <literal>g_signal_emit</literal> and can be
handled in the same way as other signals.</para>
<para>Tim Janik posted this code snippet:</para>
@@ -1920,7 +1920,7 @@ gtk_widget_user_action (GtkWidget *widget,
{
g_return_if_fail (GTK_IS_WIDGET (widget));
- gtk_signal_emit (GTK_OBJECT (widget), signal_user_action, act_data);
+ g_signal_emit (widget, signal_user_action, act_data);
}
</programlisting>
@@ -2559,10 +2559,10 @@ into the entry.</para>
signal handler with</para>
<programlisting role="C">
- gtk_signal_connect(GTK_COMBO(cb)->entry,
- "changed",
- GTK_SIGNAL_FUNC(my_cb_change_handler),
- NULL);
+ g_signal_connect(GTK_COMBO(cb)->entry,
+ "changed",
+ G_CALLBACK(my_cb_change_handler),
+ NULL);
</programlisting>
</sect1>
@@ -2864,9 +2864,9 @@ be:</para>
<programlisting role="C">
entry = gtk_entry_new();
- gtk_signal_connect (GTK_OBJECT(entry), "activate",
- GTK_SIGNAL_FUNC(entry_callback),
- NULL);
+ g_signal_connect (entry, "activate",
+ G_CALLBACK(entry_callback),
+ NULL);
</programlisting>
</sect1>
@@ -3044,8 +3044,8 @@ main (int argc, char *argv[])
gtk_container_add (GTK_CONTAINER (window), text);
/* connect after everything else */
- gtk_signal_connect_after (GTK_OBJECT(text), "button_press_event",
- GTK_SIGNAL_FUNC (insert_bar), NULL);
+ g_signal_connect_after (text, "button_press_event",
+ G_CALLBACK (insert_bar), NULL);
gtk_widget_show_all(window);
gtk_main();
diff --git a/docs/reference/gtk/gtk-sections.txt b/docs/reference/gtk/gtk-sections.txt
index 2ed756a..0ac26fe 100644
--- a/docs/reference/gtk/gtk-sections.txt
+++ b/docs/reference/gtk/gtk-sections.txt
@@ -6240,46 +6240,6 @@ gtk_drag_source_add_image_targets
gtk_drag_source_add_uri_targets
</SECTION>
-
-<SECTION>
-<FILE>gtksignal</FILE>
-<TITLE>Signals</TITLE>
-GTK_SIGNAL_OFFSET
-GtkSignalRunType
-gtk_signal_new
-gtk_signal_newv
-gtk_signal_lookup
-gtk_signal_name
-gtk_signal_emit
-gtk_signal_emit_by_name
-gtk_signal_emitv
-gtk_signal_emitv_by_name
-gtk_signal_emit_stop
-gtk_signal_emit_stop_by_name
-gtk_signal_connect
-gtk_signal_connect_after
-gtk_signal_connect_object
-gtk_signal_connect_object_after
-gtk_signal_connect_full
-gtk_signal_connect_while_alive
-gtk_signal_connect_object_while_alive
-gtk_signal_disconnect
-gtk_signal_disconnect_by_func
-gtk_signal_disconnect_by_data
-gtk_signal_handler_block
-gtk_signal_handler_block_by_func
-gtk_signal_handler_block_by_data
-gtk_signal_handler_unblock
-gtk_signal_handler_unblock_by_func
-gtk_signal_handler_unblock_by_data
-gtk_signal_handler_pending
-gtk_signal_handler_pending_by_func
-gtk_signal_default_marshaller
-
-<SUBSECTION Private>
-gtk_signal_compat_matched
-</SECTION>
-
<SECTION>
<FILE>gtktypeutils</FILE>
<TITLE>Types</TITLE>
diff --git a/docs/reference/gtk/tmpl/gtk-unused.sgml b/docs/reference/gtk/tmpl/gtk-unused.sgml
index cc4ef58..2f313dc 100644
--- a/docs/reference/gtk/tmpl/gtk-unused.sgml
+++ b/docs/reference/gtk/tmpl/gtk-unused.sgml
@@ -22,9 +22,9 @@ or gtk_object_get).
they describe <wordasword>signal arguments</wordasword>.
This is a lot less often needed but still useful.
Usually if you are just emitting or creating a particular signal
-it is more convenient to just use gtk_signal_emit() or gtk_signal_new().
+it is more convenient to just use g_signal_emit() or g_signal_new().
However if you are writing a function to emit or create an arbitrary
-signal, you must use gtk_signal_emitv() or gtk_signal_newv().
+signal, you must use g_signal_emitv() or g_signal_newv().
</para>
</listitem>
</itemizedlist>
@@ -133,7 +133,7 @@ gboolean sigfunc(gpointer,gint,gint,guint);
<refsect2>
<title>Writing Custom Marshals</title>
<para>
-Marshals are primarily used as arguments to gtk_signal_new().
+Marshals are primarily used as arguments to g_signal_new().
Sometimes, you may find that a marshaller you need isn't available
in the standard list. Then you have to write your own.
</para>
@@ -1203,7 +1203,7 @@ and swapped when the signal handler is invoked.
This is useful for handlers that are primarily notifying
other objects and could just invoke an already existing function
if the parameters were swapped.
-See gtk_signal_connect_object() for more details.
+See g_signal_connect_swapped() for more details.
</para>
@@ -1215,7 +1215,7 @@ and swapped when the signal handler is invoked,
and so that the handler is invoked after all others.
</para>
<para>
-See gtk_signal_connect_object_after() for more details.
+See g_signal_connect_data() for more details.
</para>
@@ -2899,14 +2899,14 @@ See the signal documentation for more general information.
@klass: the object class to define the signal for.
@name: the name of the signal.
@signal_flags: the default emission behavior for the signal.
-See gtk_signal_new().
+See g_signal_new().
@marshaller: a function that will take an array of GtkArgs
and invoke the appropriate handler with the normal calling
conventions.
@return_val: specify the return-value type for the signal
(or GTK_TYPE_NONE for no return-value).
@nparams: specify the number of parameters the signal
-receives from the caller of gtk_signal_emit().
+receives from the caller of g_signal_emit().
@Varargs: list of nparams #GtkTypes to pass to the signal handlers.
@Returns: the signal id. (See #GtkSignals)
@@ -2919,7 +2919,7 @@ object.
@klass: the object class to define the signal for.
@name: the name of the signal.
@signal_flags: the default emission behavior for the signal.
-See gtk_signal_new().
+See g_signal_new().
@marshaller: takes a GtkObject, a #GtkSignalFunc, and an array
of arguments, and invokes the function using the appropriate
calling conventions. Usually just select a function
@@ -2927,7 +2927,7 @@ out of gtkmarshal.h.
@return_val: specify the return-value type for the signal (possibly
#GTK_TYPE_NONE).
@nparams: specify the number of parameters the signal
-receives from the caller of gtk_signal_emit().
+receives from the caller of g_signal_emit().
@params: array of #GtkTypes the signal handlers for this signal
should have in their prototype (of length nparams).
@Returns: the signal id. (See #GtkSignals)
@@ -3328,131 +3328,6 @@ Internal function.
@Returns:
-<!-- ##### FUNCTION gtk_signal_add_emission_hook ##### -->
-<para>
-Add an emission hook for a type of signal, for any object.
-</para>
-
- signal_id: the type of signal to hook for.
- hook_func: the function to invoke to handle the emission hook.
- data: the user data passed in to hook_func.
- Returns: the id (that you may pass as a parameter
-to gtk_signal_remove_emission_hook()).
- i:
- h:
- d:
-
-<!-- ##### FUNCTION gtk_signal_add_emission_hook_full ##### -->
-<para>
-Add an emission hook for a type of signal, for any object.
-(with control of what happens when the hook is
-destroyed).
-</para>
-
- signal_id: the type of signal add the hook for.
- hook_func: the function to invoke to handle the hook.
- data: the user data passed in to hook_func.
- destroy: a function to invoke when the hook is destroyed,
-to clean up any allocation done just for this
-signal handler.
- Returns: the id (that you may pass as a parameter
-to gtk_signal_remove_emission_hook()).
-
-<!-- ##### FUNCTION gtk_signal_handler_pending_by_id ##### -->
-<para>
-Returns whether a connection id is valid (and optionally not blocked).
-</para>
-
- object: the object to search for the desired handler.
- handler_id: the connection id.
- may_be_blocked: whether it is acceptable to return a blocked
-handler.
- Returns: TRUE if the signal exists and wasn't blocked,
-unless #may_be_blocked was specified. FALSE otherwise.
-
-<!-- ##### FUNCTION gtk_signal_handlers_destroy ##### -->
-<para>
-Destroy all the signal handlers connected to an object.
-This is done automatically when the object is destroyed.
-</para>
-<para>
-This function is labeled private.
-</para>
-
- object: the object whose signal handlers should be destroyed.
-
-<!-- ##### FUNCTION gtk_signal_init ##### -->
-<para>
-
-</para>
-
-
-<!-- ##### FUNCTION gtk_signal_n_emissions ##### -->
-<para>
-Find out the recursion depth of emissions for a particular type
-of signal and object. (So it will
-always return 0 or 1 if #GTK_RUN_NO_RECURSE is specified)
-This is a way to avoid recursion: you can see if
-you are currently running in that signal handler and emit it only
-if you are.
-</para>
-<para>Another way to look at it is that this number increases
-by one when #gtk_signal_emit(), et al, are called,
-and decreases by one when #gtk_signal_emit() returns.
-</para>
-
- object: the object with the signal handler.
- signal_id: the signal id.
- Returns: the recursion depth of emissions of this signal for this
-object.
-
-<!-- ##### FUNCTION gtk_signal_n_emissions_by_name ##### -->
-<para>
-Find out the recursion depth of emissions for a particular type
-of signal and object. Just like gtk_signal_n_emissions()
-except it will lookup the signal id for you.
-</para>
-
- object: the object with the signal handler.
- name: the signal name.
- Returns: the recursion depth of emissions of this signal for this
-object.
-
-<!-- ##### FUNCTION gtk_signal_query ##### -->
-<para>
-Obtain information about a signal.
-</para>
-
- signal_id: the signal type identifier.
- Returns: a pointer to a GtkSignalQuery structure
-which contains all the information, or NULL.
-The pointer is allocated just for you: you must g_free() it.
-
-<!-- ##### FUNCTION gtk_signal_remove_emission_hook ##### -->
-<para>
-Delete an emission hook. (see gtk_signal_add_emission_hook())
-</para>
-
- signal_id: the id of the signal type.
- hook_id: the id of the emission handler, returned by add_emission_hook().
- i:
- h:
-
-<!-- ##### FUNCTION gtk_signal_set_funcs ##### -->
-<para>
-These set default functions to call when the user didn't
-supply a function when connecting. (These are rarely
-used, and probably only for language bindings)
-</para>
-<para>
-By default, there are no such functions.
-</para>
-
- marshal_func: the function to invoke on every handlers for which there
-isn't a function pointer. May be NULL.
- destroy_func: the function to invoke when each hook is destroyed.
-May be NULL.
-
<!-- ##### FUNCTION gtk_spin_button_set_shadow_type ##### -->
<para>
Creates a border around the arrows of a #GtkSpinButton. The type of border is determined by @shadow_type.
diff --git a/gtk/Makefile.am b/gtk/Makefile.am
index 07190a6..577f2d6 100644
--- a/gtk/Makefile.am
+++ b/gtk/Makefile.am
@@ -623,12 +623,10 @@ gtk_base_c_sources = \
gtk_public_h_sources += \
gtkpixmap.h \
gtkprogress.h \
- gtksignal.h \
gtktooltips.h
gtk_base_c_sources += \
gtkpixmap.c \
gtkprogress.c \
- gtksignal.c \
gtktooltips.c
gtk_c_sources = $(gtk_base_c_sources)
diff --git a/gtk/gtk.symbols b/gtk/gtk.symbols
index 192f005..5ab700e 100644
--- a/gtk/gtk.symbols
+++ b/gtk/gtk.symbols
@@ -371,7 +371,6 @@ gtk_scroll_type_get_type G_GNUC_CONST
gtk_selection_mode_get_type G_GNUC_CONST
gtk_shadow_type_get_type G_GNUC_CONST
gtk_side_type_get_type G_GNUC_CONST
-gtk_signal_run_type_get_type G_GNUC_CONST
gtk_size_group_mode_get_type G_GNUC_CONST
gtk_sort_type_get_type G_GNUC_CONST
gtk_spin_type_get_type G_GNUC_CONST
@@ -3362,24 +3361,6 @@ gtk_rc_property_parse_requisition
#endif
#endif
-#if IN_HEADER(__GTK_SIGNAL_H__)
-#if IN_FILE(__GTK_SIGNAL_C__)
-#ifndef GTK_DISABLE_DEPRECATED
-gtk_signal_compat_matched
-gtk_signal_connect_full
-gtk_signal_connect_object_while_alive
-gtk_signal_connect_while_alive
-gtk_signal_emit
-gtk_signal_emit_by_name
-gtk_signal_emit_stop_by_name
-gtk_signal_emitv
-gtk_signal_emitv_by_name
-gtk_signal_new
-gtk_signal_newv
-#endif
-#endif
-#endif
-
#if IN_HEADER(__GTK_SIZE_GROUP_H__)
#if IN_FILE(__GTK_SIZE_GROUP_C__)
gtk_size_group_add_widget
diff --git a/gtk/gtkcalendar.h b/gtk/gtkcalendar.h
index c0eb1a0..57e890b 100644
--- a/gtk/gtkcalendar.h
+++ b/gtk/gtkcalendar.h
@@ -36,9 +36,6 @@
#include <gtk/gtkwidget.h>
-/* Not needed, retained for compatibility -Yosh */
-#include <gtk/gtksignal.h>
-
G_BEGIN_DECLS
diff --git a/gtk/gtkmain.c b/gtk/gtkmain.c
index 5a8a0ef..219c60a 100644
--- a/gtk/gtkmain.c
+++ b/gtk/gtkmain.c
@@ -2474,9 +2474,8 @@ gtk_print (gchar *str)
{
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
- gtk_signal_connect (GTK_OBJECT (window), "destroy",
- G_CALLBACK (gtk_widget_destroyed),
- &window);
+ g_signal_connect (window, "destroy",
+ G_CALLBACK (gtk_widget_destroyed), &window);
gtk_window_set_title (GTK_WINDOW (window), "Messages");
@@ -2525,9 +2524,8 @@ gtk_print (gchar *str)
button = gtk_button_new_with_label ("close");
- gtk_signal_connect_object (GTK_OBJECT (button), "clicked",
- G_CALLBACK (gtk_widget_hide),
- GTK_OBJECT (window));
+ g_signal_connect_swapped (button, "clicked",
+ G_CALLBACK (gtk_widget_hide), window);
gtk_box_pack_start (GTK_BOX (box2), button, TRUE, TRUE, 0);
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
gtk_widget_grab_default (button);
diff --git a/gtk/gtktoolbar.h b/gtk/gtktoolbar.h
index c0f5b65..62d40de 100644
--- a/gtk/gtktoolbar.h
+++ b/gtk/gtktoolbar.h
@@ -45,7 +45,6 @@
/* Not needed, retained for compatibility -Yosh */
#include <gtk/gtkpixmap.h>
-#include <gtk/gtksignal.h>
#endif /* GTK_DISABLE_DEPRECATED */
diff --git a/gtk/makefile.msc.in b/gtk/makefile.msc.in
index bb6ac99..8094d3c 100644
--- a/gtk/makefile.msc.in
+++ b/gtk/makefile.msc.in
@@ -114,7 +114,6 @@ gtk_OBJECTS_deprecated = \
gtkprogress.obj \
gtktipsquery.obj \
gtkshow.obj \
- gtksignal.obj \
gtkpixmap.obj \
gtkpreview.obj \
gtkseparatortoolitem.obj \
@@ -502,7 +501,6 @@ gtk_public_h_sources = \
gtkseparatormenuitem.h \
gtkseparatortoolitem.h \
gtksettings.h \
- gtksignal.h \
gtksizegroup.h \
gtksocket.h \
gtkspinbutton.h \
@@ -618,8 +616,6 @@ gtkmarshal.c : gtkmarshal.list
gtktypefuncs.c : makefile.msc
echo /*none*/ > gtktypefuncs.c
-gtksignal.obj : gtksignal.c gtkmarshal.c gtkmarshal.h
- $(CC) $(CFLAGS) -GD -c -DGTK_COMPILATION -DG_LOG_DOMAIN=\"Gtk\" gtksignal.c
gtk-win32.res : gtk-win32.rc
rc -DBUILDNUMBER=0 -r -fo gtk-win32.res gtk-win32.rc
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]