Commit 7c30f2a1 authored by Elliot Lee's avatar Elliot Lee

Use common marshalling routines instead of having widget-private ones. It



Use common marshalling routines instead of having widget-private ones.
It compiles & links.

testgtk segfaults. I'm convinced that is Somebody Else's Problem
(marshalling routine gets func_data=0x0 and blithely passes it on) but the
fact that it happens now & not before makes me wrong :-)
parent cebb7bfc
......@@ -11,18 +11,28 @@
"BOXED"=>"gpointer", "FOREIGN"=>"gpointer",
"CALLBACK"=>"gpointer", "POINTER"=>"gpointer",
"ARGS"=>"gpointer", "SIGNAL"=>"gpointer",
"C_CALLBACK"=>"gpointer", "OBJECT"=>"gpointer");
"C_CALLBACK"=>"gpointer", "OBJECT"=>"gpointer",
"STYLE"=>"gpointer", "GDK_EVENT"=>"gpointer");
open(IL, "<".$ENV{'srcdir'}."/gtkmarshal.list") || die("Open failed: $!");
open(OH, "|indent >".$ENV{'srcdir'}."/gtkmarshal.h") || die("Open failed: $!");
open(OS, "|indent >".$ENV{'srcdir'}."/gtkmarshal.c") || die("Open failed: $!");
$srcdir = $ENV{'srcdir'} || '.';
open(IL, "<$srcdir/gtkmarshal.list") || die("Open failed: $!");
open(OH, "|indent > $srcdir/gtkmarshal.h") || die("Open failed: $!");
open(OS, "|indent > $srcdir/gtkmarshal.c") || die("Open failed: $!");
print OH <<EOT;
#ifndef __GTKMARSHAL_H__
#define __GTKMARSHAL_H__ 1
#include "gtktypeutils.h"
#include "gtkobject.h"
#include <gtk/gtktypeutils.h>
#include <gtk/gtkobject.h>
#ifdef __cplusplus
extern "C" {
#pragma }
#endif /* __cplusplus */
#define gtk_signal_default_marshaller gtk_marshal_NONE__NONE
EOT
......@@ -33,32 +43,46 @@ while(chomp($aline = <IL>)) {
@params = split(/\s*,\s*/, $paramlist);
my $funcname = $retval."__".join("_",@params);
my $defname;
next if (exists $defs{$funcname});
$doequiv = 0;
for (@params, $retval) {
if ($trans{$_} eq "gpointer") {
if ($trans{$_} eq "gpointer" && $_ ne "POINTER") {
$doequiv = 1;
last;
}
}
if($_ eq "ENUM" || $_ eq "UINT" || $_ eq "ULONG") {
$doequiv = 1;
last;
}
}
# Translate all function pointers to gpointer
$defname = "";
$defname = $funcname;
if($doequiv) {
print OH "#define gtk_marshal_$funcname ";
$defs{$defname} = 1;
for (@params, $retval) {
if ($trans{$_} eq "gpointer") {
$_ = "POINTER";
}
if ($trans{$_} eq "gpointer") {
$_ = "POINTER";
}
if($_ eq "ENUM") {
$_ = "UINT";
}
if($_ eq "UINT") {
$_ = "INT"; # Unvalidated assumption - please check
}
if($_ eq "ULONG") {
$_ = "LONG";
}
}
$funcname = $retval."__".join("_",@params);
print OH "gtk_marshal_$funcname\n";
print OH "gtk_marshal_$funcname\n\n";
next if (exists $defs{$funcname});
}
$defs{$funcname} = 1;
......@@ -103,6 +127,13 @@ EOT
print OS " func_data);\n}\n\n";
}
print OH "#endif\n";
print OH <<EOT;
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* __GTKMARSHAL_H__ */
EOT
close(IL); close(OH); close(OS);
......@@ -649,7 +649,7 @@ gtk_accel_group_create_add (GtkType class_type,
signal_flags,
class_type,
handler_offset,
gtk_accel_group_marshal_add,
gtk_marshal_NONE__UINT_POINTER_UINT_UINT_ENUM,
GTK_TYPE_NONE, 5,
GTK_TYPE_UINT,
GTK_TYPE_ACCEL_GROUP,
......@@ -669,49 +669,13 @@ gtk_accel_group_create_remove (GtkType class_type,
signal_flags,
class_type,
handler_offset,
gtk_accel_group_marshal_remove,
gtk_marshal_NONE__POINTER_UINT_UINT,
GTK_TYPE_NONE, 3,
GTK_TYPE_ACCEL_GROUP,
GTK_TYPE_UINT,
GTK_TYPE_GDK_MODIFIER_TYPE);
}
void
gtk_accel_group_marshal_add (GtkObject *object,
GtkSignalFunc func,
gpointer func_data,
GtkArg *args)
{
GtkSignalAddAccelerator signal_func;
signal_func = (GtkSignalAddAccelerator) func;
signal_func (object,
GTK_VALUE_UINT (args[0]),
GTK_VALUE_BOXED (args[1]),
GTK_VALUE_UINT (args[2]),
GTK_VALUE_UINT (args[3]),
GTK_VALUE_ENUM (args[4]),
func_data);
}
void
gtk_accel_group_marshal_remove (GtkObject *object,
GtkSignalFunc func,
gpointer func_data,
GtkArg *args)
{
GtkSignalRemoveAccelerator signal_func;
signal_func = (GtkSignalRemoveAccelerator) func;
signal_func (object,
GTK_VALUE_BOXED (args[0]),
GTK_VALUE_UINT (args[1]),
GTK_VALUE_UINT (args[2]),
func_data);
}
GSList*
gtk_accel_groups_from_object (GtkObject *object)
{
......
......@@ -71,14 +71,14 @@ gtk_adjustment_class_init (GtkAdjustmentClass *class)
GTK_RUN_FIRST | GTK_RUN_NO_RECURSE,
object_class->type,
GTK_SIGNAL_OFFSET (GtkAdjustmentClass, changed),
gtk_signal_default_marshaller,
gtk_marshal_NONE__NONE,
GTK_TYPE_NONE, 0);
adjustment_signals[VALUE_CHANGED] =
gtk_signal_new ("value_changed",
GTK_RUN_FIRST | GTK_RUN_NO_RECURSE,
object_class->type,
GTK_SIGNAL_OFFSET (GtkAdjustmentClass, value_changed),
gtk_signal_default_marshaller,
gtk_marshal_NONE__NONE,
GTK_TYPE_NONE, 0);
gtk_object_class_add_signals (object_class, adjustment_signals, LAST_SIGNAL);
......
......@@ -140,35 +140,35 @@ gtk_button_class_init (GtkButtonClass *klass)
GTK_RUN_FIRST,
object_class->type,
GTK_SIGNAL_OFFSET (GtkButtonClass, pressed),
gtk_signal_default_marshaller,
gtk_marshal_NONE__NONE,
GTK_TYPE_NONE, 0);
button_signals[RELEASED] =
gtk_signal_new ("released",
GTK_RUN_FIRST,
object_class->type,
GTK_SIGNAL_OFFSET (GtkButtonClass, released),
gtk_signal_default_marshaller,
gtk_marshal_NONE__NONE,
GTK_TYPE_NONE, 0);
button_signals[CLICKED] =
gtk_signal_new ("clicked",
GTK_RUN_FIRST,
object_class->type,
GTK_SIGNAL_OFFSET (GtkButtonClass, clicked),
gtk_signal_default_marshaller,
gtk_marshal_NONE__NONE,
GTK_TYPE_NONE, 0);
button_signals[ENTER] =
gtk_signal_new ("enter",
GTK_RUN_FIRST,
object_class->type,
GTK_SIGNAL_OFFSET (GtkButtonClass, enter),
gtk_signal_default_marshaller,
gtk_marshal_NONE__NONE,
GTK_TYPE_NONE, 0);
button_signals[LEAVE] =
gtk_signal_new ("leave",
GTK_RUN_FIRST,
object_class->type,
GTK_SIGNAL_OFFSET (GtkButtonClass, leave),
gtk_signal_default_marshaller,
gtk_marshal_NONE__NONE,
GTK_TYPE_NONE, 0);
gtk_object_class_add_signals (object_class, button_signals, LAST_SIGNAL);
......
......@@ -140,7 +140,7 @@ gtk_check_menu_item_class_init (GtkCheckMenuItemClass *klass)
GTK_RUN_FIRST,
object_class->type,
GTK_SIGNAL_OFFSET (GtkCheckMenuItemClass, toggled),
gtk_signal_default_marshaller,
gtk_marshal_NONE__NONE,
GTK_TYPE_NONE, 0);
gtk_object_class_add_signals (object_class, check_menu_item_signals, LAST_SIGNAL);
......
......@@ -350,31 +350,6 @@ static void extend_selection (GtkCList *clist,
gfloat position,
gboolean auto_start_selection);
/* Signals */
static void gtk_clist_marshal_signal_1 (GtkObject * object,
GtkSignalFunc func,
gpointer func_data,
GtkArg * args);
static void gtk_clist_marshal_signal_2 (GtkObject * object,
GtkSignalFunc func,
gpointer func_data,
GtkArg * args);
static void gtk_clist_marshal_signal_3 (GtkObject * object,
GtkSignalFunc func,
gpointer func_data,
GtkArg * args);
static void gtk_clist_marshal_signal_4 (GtkObject * object,
GtkSignalFunc func,
gpointer func_data,
GtkArg * args);
static void gtk_clist_marshal_signal_5 (GtkObject * object,
GtkSignalFunc func,
gpointer func_data,
GtkArg * args);
/* Fill in data after widget is realized and has style */
static void add_style_data (GtkCList * clist);
......@@ -426,21 +401,24 @@ gtk_clist_class_init (GtkCListClass * klass)
GTK_RUN_FIRST,
object_class->type,
GTK_SIGNAL_OFFSET (GtkCListClass, select_row),
gtk_clist_marshal_signal_1,
GTK_TYPE_NONE, 3, GTK_TYPE_INT, GTK_TYPE_INT, GTK_TYPE_GDK_EVENT);
gtk_marshal_NONE__INT_INT_POINTER,
GTK_TYPE_NONE, 3,
GTK_TYPE_INT,
GTK_TYPE_INT,
GTK_TYPE_GDK_EVENT);
clist_signals[UNSELECT_ROW] =
gtk_signal_new ("unselect_row",
GTK_RUN_FIRST,
object_class->type,
GTK_SIGNAL_OFFSET (GtkCListClass, unselect_row),
gtk_clist_marshal_signal_1,
gtk_marshal_NONE__INT_INT_POINTER,
GTK_TYPE_NONE, 3, GTK_TYPE_INT, GTK_TYPE_INT, GTK_TYPE_GDK_EVENT);
clist_signals[CLICK_COLUMN] =
gtk_signal_new ("click_column",
GTK_RUN_FIRST,
object_class->type,
GTK_SIGNAL_OFFSET (GtkCListClass, click_column),
gtk_clist_marshal_signal_3,
gtk_marshal_NONE__INT,
GTK_TYPE_NONE, 1, GTK_TYPE_INT);
clist_signals[TOGGLE_FOCUS_ROW] =
......@@ -448,56 +426,56 @@ gtk_clist_class_init (GtkCListClass * klass)
GTK_RUN_LAST | GTK_RUN_ACTION,
object_class->type,
GTK_SIGNAL_OFFSET (GtkCListClass, toggle_focus_row),
gtk_clist_marshal_signal_2,
gtk_marshal_NONE__NONE,
GTK_TYPE_NONE, 0);
clist_signals[SELECT_ALL] =
gtk_signal_new ("select_all",
GTK_RUN_LAST | GTK_RUN_ACTION,
object_class->type,
GTK_SIGNAL_OFFSET (GtkCListClass, select_all),
gtk_clist_marshal_signal_2,
gtk_marshal_NONE__NONE,
GTK_TYPE_NONE, 0);
clist_signals[UNSELECT_ALL] =
gtk_signal_new ("unselect_all",
GTK_RUN_LAST | GTK_RUN_ACTION,
object_class->type,
GTK_SIGNAL_OFFSET (GtkCListClass, unselect_all),
gtk_clist_marshal_signal_2,
gtk_marshal_NONE__NONE,
GTK_TYPE_NONE, 0);
clist_signals[UNDO_SELECTION] =
gtk_signal_new ("undo_selection",
GTK_RUN_LAST | GTK_RUN_ACTION,
object_class->type,
GTK_SIGNAL_OFFSET (GtkCListClass, undo_selection),
gtk_clist_marshal_signal_2,
gtk_marshal_NONE__NONE,
GTK_TYPE_NONE, 0);
clist_signals[START_SELECTION] =
gtk_signal_new ("start_selection",
GTK_RUN_LAST | GTK_RUN_ACTION,
object_class->type,
GTK_SIGNAL_OFFSET (GtkCListClass, start_selection),
gtk_clist_marshal_signal_2,
gtk_marshal_NONE__NONE,
GTK_TYPE_NONE, 0);
clist_signals[END_SELECTION] =
gtk_signal_new ("end_selection",
GTK_RUN_LAST | GTK_RUN_ACTION,
object_class->type,
GTK_SIGNAL_OFFSET (GtkCListClass, end_selection),
gtk_clist_marshal_signal_2,
gtk_marshal_NONE__NONE,
GTK_TYPE_NONE, 0);
clist_signals[TOGGLE_ADD_MODE] =
gtk_signal_new ("toggle_add_mode",
GTK_RUN_LAST | GTK_RUN_ACTION,
object_class->type,
GTK_SIGNAL_OFFSET (GtkCListClass, toggle_add_mode),
gtk_clist_marshal_signal_2,
gtk_marshal_NONE__NONE,
GTK_TYPE_NONE, 0);
clist_signals[EXTEND_SELECTION] =
gtk_signal_new ("extend_selection",
GTK_RUN_LAST | GTK_RUN_ACTION,
object_class->type,
GTK_SIGNAL_OFFSET (GtkCListClass, extend_selection),
gtk_clist_marshal_signal_5,
gtk_marshal_NONE__ENUM_FLOAT_BOOL,
GTK_TYPE_NONE, 3,
GTK_TYPE_ENUM, GTK_TYPE_FLOAT, GTK_TYPE_BOOL);
clist_signals[SCROLL_VERTICAL] =
......@@ -505,21 +483,21 @@ gtk_clist_class_init (GtkCListClass * klass)
GTK_RUN_LAST | GTK_RUN_ACTION,
object_class->type,
GTK_SIGNAL_OFFSET (GtkCListClass, scroll_vertical),
gtk_clist_marshal_signal_4,
gtk_marshal_NONE__ENUM_FLOAT,
GTK_TYPE_NONE, 2, GTK_TYPE_ENUM, GTK_TYPE_FLOAT);
clist_signals[SCROLL_HORIZONTAL] =
gtk_signal_new ("scroll_horizontal",
GTK_RUN_LAST | GTK_RUN_ACTION,
object_class->type,
GTK_SIGNAL_OFFSET (GtkCListClass, scroll_horizontal),
gtk_clist_marshal_signal_4,
gtk_marshal_NONE__ENUM_FLOAT,
GTK_TYPE_NONE, 2, GTK_TYPE_ENUM, GTK_TYPE_FLOAT);
clist_signals[ABORT_COLUMN_RESIZE] =
gtk_signal_new ("abort_column_resize",
GTK_RUN_LAST | GTK_RUN_ACTION,
object_class->type,
GTK_SIGNAL_OFFSET (GtkCListClass, abort_column_resize),
gtk_clist_marshal_signal_2,
gtk_marshal_NONE__NONE,
GTK_TYPE_NONE, 0);
......@@ -765,76 +743,6 @@ gtk_clist_class_init (GtkCListClass * klass)
*/
}
static void
gtk_clist_marshal_signal_1 (GtkObject * object,
GtkSignalFunc func,
gpointer func_data,
GtkArg * args)
{
GtkCListSignal1 rfunc;
rfunc = (GtkCListSignal1) func;
(*rfunc) (object, GTK_VALUE_INT (args[0]),
GTK_VALUE_INT (args[1]),
GTK_VALUE_POINTER (args[2]),
func_data);
}
static void
gtk_clist_marshal_signal_2 (GtkObject * object,
GtkSignalFunc func,
gpointer func_data,
GtkArg * args)
{
GtkCListSignal2 rfunc;
rfunc = (GtkCListSignal2) func;
(*rfunc) (object, func_data);
}
static void
gtk_clist_marshal_signal_3 (GtkObject * object,
GtkSignalFunc func,
gpointer func_data,
GtkArg * args)
{
GtkCListSignal3 rfunc;
rfunc = (GtkCListSignal3) func;
(*rfunc) (object, GTK_VALUE_INT (args[0]), func_data);
}
static void
gtk_clist_marshal_signal_4 (GtkObject * object,
GtkSignalFunc func,
gpointer func_data,
GtkArg * args)
{
GtkCListSignal4 rfunc;
rfunc = (GtkCListSignal4) func;
(*rfunc) (object, GTK_VALUE_INT (args[0]),
GTK_VALUE_FLOAT (args[1]), func_data);
}
static void
gtk_clist_marshal_signal_5 (GtkObject * object,
GtkSignalFunc func,
gpointer func_data,
GtkArg * args)
{
GtkCListSignal5 rfunc;
rfunc = (GtkCListSignal5) func;
(*rfunc) (object, GTK_VALUE_INT (args[0]), GTK_VALUE_FLOAT (args[1]),
GTK_VALUE_BOOL (args[2]), func_data);
}
static void
gtk_clist_init (GtkCList * clist)
{
......
......@@ -236,7 +236,7 @@ gtk_color_selection_class_init (GtkColorSelectionClass *klass)
GTK_RUN_FIRST,
object_class->type,
GTK_SIGNAL_OFFSET (GtkColorSelectionClass, color_changed),
gtk_signal_default_marshaller, GTK_TYPE_NONE, 0);
gtk_marshal_NONE__NONE, GTK_TYPE_NONE, 0);
gtk_object_class_add_signals (object_class, color_selection_signals, LAST_SIGNAL);
......
......@@ -51,35 +51,6 @@ struct _GtkChildArgInfo
guint seq_id;
};
typedef void (*GtkContainerSignal1) (GtkObject *object,
gpointer arg1,
gpointer data);
typedef void (*GtkContainerSignal2) (GtkObject *object,
GtkFunction arg1,
gpointer arg2,
gpointer data);
typedef gint (*GtkContainerSignal3) (GtkObject *object,
gint arg1,
gpointer data);
typedef gint (*GtkContainerSignal4) (GtkObject *object,
gpointer data);
static void gtk_container_marshal_signal_1 (GtkObject *object,
GtkSignalFunc func,
gpointer func_data,
GtkArg *args);
static void gtk_container_marshal_signal_2 (GtkObject *object,
GtkSignalFunc func,
gpointer func_data,
GtkArg *args);
static void gtk_container_marshal_signal_3 (GtkObject *object,
GtkSignalFunc func,
gpointer func_data,
GtkArg *args);
static void gtk_container_base_class_init (GtkContainerClass *klass);
static void gtk_container_class_init (GtkContainerClass *klass);
static void gtk_container_init (GtkContainer *container);
......@@ -189,7 +160,7 @@ gtk_container_class_init (GtkContainerClass *class)
GTK_RUN_FIRST,
object_class->type,
GTK_SIGNAL_OFFSET (GtkContainerClass, add),
gtk_container_marshal_signal_1,
gtk_marshal_NONE__POINTER,
GTK_TYPE_NONE, 1,
GTK_TYPE_WIDGET);
container_signals[REMOVE] =
......@@ -197,7 +168,7 @@ gtk_container_class_init (GtkContainerClass *class)
GTK_RUN_FIRST,
object_class->type,
GTK_SIGNAL_OFFSET (GtkContainerClass, remove),
gtk_container_marshal_signal_1,
gtk_marshal_NONE__POINTER,
GTK_TYPE_NONE, 1,
GTK_TYPE_WIDGET);
container_signals[CHECK_RESIZE] =
......@@ -205,14 +176,14 @@ gtk_container_class_init (GtkContainerClass *class)
GTK_RUN_LAST,
object_class->type,
GTK_SIGNAL_OFFSET (GtkContainerClass, check_resize),
gtk_signal_default_marshaller,
gtk_marshal_NONE__NONE,
GTK_TYPE_NONE, 0);
container_signals[FOREACH] =
gtk_signal_new ("foreach",
GTK_RUN_FIRST,
object_class->type,
GTK_SIGNAL_OFFSET (GtkContainerClass, foreach),
gtk_container_marshal_signal_2,
gtk_marshal_NONE__C_CALLBACK,
GTK_TYPE_NONE, 1,
GTK_TYPE_C_CALLBACK);
container_signals[FOCUS] =
......@@ -220,7 +191,7 @@ gtk_container_class_init (GtkContainerClass *class)
GTK_RUN_LAST,
object_class->type,
GTK_SIGNAL_OFFSET (GtkContainerClass, focus),
gtk_container_marshal_signal_3,
gtk_marshal_ENUM__ENUM,
GTK_TYPE_DIRECTION_TYPE, 1,
GTK_TYPE_DIRECTION_TYPE);
container_signals[SET_FOCUS_CHILD] =
......@@ -228,7 +199,7 @@ gtk_container_class_init (GtkContainerClass *class)
GTK_RUN_FIRST,
object_class->type,
GTK_SIGNAL_OFFSET (GtkContainerClass, set_focus_child),
gtk_container_marshal_signal_1,
gtk_marshal_NONE__POINTER,
GTK_TYPE_NONE, 1,
GTK_TYPE_WIDGET);
gtk_object_class_add_signals (object_class, container_signals, LAST_SIGNAL);
......@@ -1303,50 +1274,6 @@ gtk_container_real_set_focus_child (GtkContainer *container,
}
}
static void
gtk_container_marshal_signal_1 (GtkObject *object,
GtkSignalFunc func,
gpointer func_data,
GtkArg *args)
{
GtkContainerSignal1 rfunc;
rfunc = (GtkContainerSignal1) func;
(* rfunc) (object, GTK_VALUE_OBJECT (args[0]), func_data);
}
static void
gtk_container_marshal_signal_2 (GtkObject *object,
GtkSignalFunc func,
gpointer func_data,
GtkArg *args)
{
GtkContainerSignal2 rfunc;
rfunc = (GtkContainerSignal2) func;
(* rfunc) (object,
GTK_VALUE_C_CALLBACK(args[0]).func,
GTK_VALUE_C_CALLBACK(args[0]).func_data,
func_data);
}
static void
gtk_container_marshal_signal_3 (GtkObject *object,
GtkSignalFunc func,
gpointer func_data,
GtkArg *args)
{
GtkContainerSignal3 rfunc;
gint *return_val;
rfunc = (GtkContainerSignal3) func;
return_val = GTK_RETLOC_ENUM (args[1]);
*return_val = (* rfunc) (object, GTK_VALUE_ENUM(args[0]), func_data);
}
static gint
gtk_container_real_focus (GtkContainer *container,
GtkDirectionType direction)
......
......@@ -168,22 +168,6 @@ static void gtk_ctree_unlink (GtkCTree *ctree,
gboolean update_focus_row);
static GList * gtk_ctree_last_visible (GtkCTree *ctree,
GList *node);
static void gtk_ctree_marshal_signal_1 (GtkObject *object,
GtkSignalFunc func,
gpointer func_data,
GtkArg *args);
static void gtk_ctree_marshal_signal_2 (GtkObject *object,
GtkSignalFunc func,
gpointer func_data,
GtkArg *args);
static void gtk_ctree_marshal_signal_3 (GtkObject *object,
GtkSignalFunc func,
gpointer func_data,
GtkArg *args);
static void gtk_ctree_marshal_signal_4 (GtkObject *object,
GtkSignalFunc func,
gpointer func_data,
GtkArg *args);
static gboolean ctree_is_hot_spot (GtkCTree *ctree,
GList *node,
gint row,
......@@ -274,60 +258,6 @@ gtk_ctree_get_type (void)
return ctree_type;
}
static void
gtk_ctree_marshal_signal_1 (GtkObject *object,
GtkSignalFunc func,
gpointer func_data,
GtkArg *args)
{
GtkCTreeSignal1 rfunc;
rfunc = (GtkCTreeSignal1) func;
(*rfunc) (object, GTK_VALUE_POINTER (args[0]), GTK_VALUE_INT (args[1]),
func_data);
}
static void
gtk_ctree_marshal_signal_2 (GtkObject *object,
GtkSignalFunc func,
gpointer func_data,
GtkArg *args)
{
GtkCTreeSignal2 rfunc;
rfunc = (GtkCTreeSignal2) func;
(*rfunc) (object, GTK_VALUE_POINTER (args[0]), GTK_VALUE_POINTER (args[1]),
GTK_VALUE_POINTER (args[2]), func_data);
}
static void
gtk_ctree_marshal_signal_3 (GtkObject *object,
GtkSignalFunc func,
gpointer func_data,
GtkArg *args)
{
GtkCTreeSignal3 rfunc;
rfunc = (GtkCTreeSignal3) func;
(*rfunc) (object, GTK_VALUE_POINTER (args[0]), func_data);
}
static void
gtk_ctree_marshal_signal_4 (GtkObject *object,
GtkSignalFunc func,
gpointer func_data,
GtkArg *args)
{
GtkCTreeSignal4 rfunc;
rfunc = (GtkCTreeSignal4) func;
(*rfunc) (object, GTK_VALUE_ENUM (args[0]), func_data);
}
static void
gtk_ctree_class_init (GtkCTreeClass *klass)
{
......@@ -348,35 +278,35 @@ gtk_ctree_class_init (GtkCTreeClass *klass)
GTK_RUN_FIRST,
object_class->type,
GTK_SIGNAL_OFFSET (GtkCTreeClass, tree_select_row),
gtk_ctree_marshal_signal_1,
gtk_marshal_NONE__POINTER_INT,
GTK_TYPE_NONE, 2, GTK_TYPE_POINTER, GTK_TYPE_INT);
ctree_signals[TREE_UNSELECT_ROW] =
gtk_signal_new ("tree_unselect_row",
GTK_RUN_FIRST,
object_class->type,
GTK_SIGNAL_OFFSET (GtkCTreeClass, tree_unselect_row),
gtk_ctree_marshal_signal_1,
gtk_marshal_NONE__POINTER_INT,
GTK_TYPE_NONE, 2, GTK_TYPE_POINTER, GTK_TYPE_INT);
ctree_signals[TREE_EXPAND] =
gtk_signal_new ("tree_expand",
GTK_RUN_LAST,
object_class->type,
GTK_SIGNAL_OFFSET (GtkCTreeClass, tree_expand),
gtk_ctree_marshal_signal_3,
gtk_marshal_NONE__POINTER,
GTK_TYPE_NONE, 1, GTK_TYPE_POINTER);
ctree_signals[TREE_COLLAPSE] =
gtk_signal_new ("tree_collapse",
GTK_RUN_LAST,
object_class->type,
GTK_SIGNAL_OFFSET (GtkCTreeClass, tree_collapse),
gtk_ctree_marshal_signal_3,
gtk_marshal_NONE__POINTER,
GTK_TYPE_NONE, 1, GTK_TYPE_POINTER);
ctree_signals[TREE_MOVE] =
gtk_signal_new ("tree_move",
GTK_RUN_LAST,
object_class->type,
GTK_SIGNAL_OFFSET (GtkCTreeClass, tree_move),
gtk_ctree_marshal_signal_2,
gtk_marshal_NONE__POINTER_POINTER_POINTER,
GTK_TYPE_NONE, 3, GTK_TYPE_POINTER, GTK_TYPE_POINTER,
GTK_TYPE_POINTER);
ctree_signals[CHANGE_FOCUS_ROW_EXPANSION] =
......@@ -385,7 +315,7 @@ gtk_ctree_class_init (GtkCTreeClass *klass)
object_class->type,
GTK_SIGNAL_OFFSET (GtkCTreeClass,
change_focus_row_expansion),
gtk_ctree_marshal_signal_4,
gtk_marshal_NONE__ENUM,
GTK_TYPE_NONE, 1, GTK_TYPE_ENUM);
gtk_object_class_add_signals (object_class, ctree_signals, LAST_SIGNAL);
......
......@@ -87,7 +87,7 @@ gtk_curve_class_init (GtkCurveClass *class)