finish conversion to g_signal_* functions by using G_OBJECT and G_CALLBACK

2002-02-19  Sven Neumann  <sven@gimp.org>

	* examples/*/*.c: finish conversion to g_signal_* functions by
	using G_OBJECT and G_CALLBACK and other assorted changes.
This commit is contained in:
Sven Neumann
2002-02-19 19:47:16 +00:00
committed by Sven Neumann
parent 601302c7a3
commit 6dea3cae13
52 changed files with 439 additions and 427 deletions

View File

@ -24,8 +24,8 @@ int main( int argc,
gtk_init (&argc, &argv);
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
g_signal_connect (GTK_OBJECT (window), "delete_event",
GTK_SIGNAL_FUNC (close_application), NULL);
g_signal_connect (G_OBJECT (window), "delete_event",
G_CALLBACK (close_application), NULL);
gtk_container_set_border_width (GTK_CONTAINER (window), 10);
/* Create a table for placing the ruler and the drawing area */
@ -45,9 +45,9 @@ int main( int argc,
hrule = gtk_hruler_new ();
gtk_ruler_set_metric (GTK_RULER (hrule), GTK_PIXELS);
gtk_ruler_set_range (GTK_RULER (hrule), 7, 13, 0, 20);
g_signal_connect_swapped (GTK_OBJECT (area), "motion_notify_event",
GTK_SIGNAL_FUNC (EVENT_METHOD (hrule, motion_notify_event)),
GTK_OBJECT (hrule));
g_signal_connect_swapped (G_OBJECT (area), "motion_notify_event",
G_CALLBACK (EVENT_METHOD (hrule, motion_notify_event)),
hrule);
gtk_table_attach (GTK_TABLE (table), hrule, 1, 2, 0, 1,
GTK_EXPAND|GTK_SHRINK|GTK_FILL, GTK_FILL, 0, 0);
@ -57,9 +57,9 @@ int main( int argc,
vrule = gtk_vruler_new ();
gtk_ruler_set_metric (GTK_RULER (vrule), GTK_PIXELS);
gtk_ruler_set_range (GTK_RULER (vrule), 0, YSIZE, 10, YSIZE );
g_signal_connect_swapped (GTK_OBJECT (area), "motion_notify_event",
GTK_SIGNAL_FUNC (EVENT_METHOD (vrule, motion_notify_event)),
GTK_OBJECT (vrule));
g_signal_connect_swapped (G_OBJECT (area), "motion_notify_event",
G_CALLBACK (EVENT_METHOD (vrule, motion_notify_event)),
vrule);
gtk_table_attach (GTK_TABLE (table), vrule, 0, 1, 1, 2,
GTK_FILL, GTK_EXPAND|GTK_SHRINK|GTK_FILL, 0, 0);