forked from AuroraMiddleware/gtk
Marshallers for C_CALLBACK parameters now pass "func, func_data," instead
Marshallers for C_CALLBACK parameters now pass "func, func_data," instead of "func,".
This commit is contained in:
parent
d154bfafd9
commit
5f8748c53e
@ -9,9 +9,9 @@
|
||||
"DOUBLE"=>"gdouble", "STRING"=>"gpointer",
|
||||
"ENUM"=>"gint", "FLAGS"=>"gint",
|
||||
"BOXED"=>"gpointer", "FOREIGN"=>"gpointer",
|
||||
"CALLBACK"=>"gpointer", "POINTER"=>"gpointer",
|
||||
"C_CALLBACK"=>"C_CALLBACK", "POINTER"=>"gpointer",
|
||||
"ARGS"=>"gpointer", "SIGNAL"=>"gpointer",
|
||||
"C_CALLBACK"=>"gpointer", "OBJECT"=>"gpointer",
|
||||
"OBJECT"=>"gpointer",
|
||||
"STYLE"=>"gpointer", "GDK_EVENT"=>"gpointer");
|
||||
|
||||
$srcdir = $ENV{'srcdir'} || '.';
|
||||
@ -98,7 +98,12 @@ EOT
|
||||
print OS "typedef $trans{$retval} (*GtkSignal_$funcname) (GtkObject *object, \n";
|
||||
$argn = 1;
|
||||
for (@params) {
|
||||
print OS "$trans{$_} arg".$argn++.",\n" unless $_ eq "NONE";
|
||||
if($_ eq "C_CALLBACK") {
|
||||
print OS "gpointer arg".$argn."a,\n";
|
||||
print OS "gpointer arg".$argn++."b,\n";
|
||||
} else {
|
||||
print OS "$trans{$_} arg".$argn++.",\n" unless $_ eq "NONE";
|
||||
}
|
||||
}
|
||||
print OS "gpointer user_data);\n";
|
||||
|
||||
@ -120,8 +125,14 @@ EOT
|
||||
print OS " (* rfunc) (object,\n";
|
||||
|
||||
for($i = 0; $i < (scalar @params); $i++) {
|
||||
if ($params[$i] ne "NONE") {
|
||||
print OS " GTK_VALUE_$params[$i](args[$i]),\n";
|
||||
if($params[$i] eq "C_CALLBACK") {
|
||||
print OS <<EOT;
|
||||
GTK_VALUE_C_CALLBACK(args[$i]).func,
|
||||
GTK_VALUE_C_CALLBACK(args[$i]).func_data,
|
||||
EOT
|
||||
} elsif ($params[$i] eq "NONE") {
|
||||
} else {
|
||||
print OS " GTK_VALUE_$params[$i](args[$i]),\n";
|
||||
}
|
||||
}
|
||||
|
||||
|
144
gtk/gtkmarshal.c
144
gtk/gtkmarshal.c
@ -58,6 +58,30 @@ gtk_marshal_BOOL__POINTER_POINTER_INT_INT (GtkObject * object,
|
||||
func_data);
|
||||
}
|
||||
|
||||
typedef gboolean (*GtkSignal_BOOL__POINTER_POINTER_POINTER_POINTER) (GtkObject * object,
|
||||
gpointer arg1,
|
||||
gpointer arg2,
|
||||
gpointer arg3,
|
||||
gpointer arg4,
|
||||
gpointer user_data);
|
||||
void
|
||||
gtk_marshal_BOOL__POINTER_POINTER_POINTER_POINTER (GtkObject * object,
|
||||
GtkSignalFunc func,
|
||||
gpointer func_data,
|
||||
GtkArg * args)
|
||||
{
|
||||
GtkSignal_BOOL__POINTER_POINTER_POINTER_POINTER rfunc;
|
||||
gboolean *return_val;
|
||||
return_val = GTK_RETLOC_BOOL (args[4]);
|
||||
rfunc = (GtkSignal_BOOL__POINTER_POINTER_POINTER_POINTER) func;
|
||||
*return_val = (*rfunc) (object,
|
||||
GTK_VALUE_POINTER (args[0]),
|
||||
GTK_VALUE_POINTER (args[1]),
|
||||
GTK_VALUE_POINTER (args[2]),
|
||||
GTK_VALUE_POINTER (args[3]),
|
||||
func_data);
|
||||
}
|
||||
|
||||
typedef gint (*GtkSignal_INT__INT) (GtkObject * object,
|
||||
gint arg1,
|
||||
gpointer user_data);
|
||||
@ -116,6 +140,22 @@ gtk_marshal_INT__POINTER_CHAR_CHAR (GtkObject * object,
|
||||
func_data);
|
||||
}
|
||||
|
||||
typedef void (*GtkSignal_NONE__BOOL) (GtkObject * object,
|
||||
gboolean arg1,
|
||||
gpointer user_data);
|
||||
void
|
||||
gtk_marshal_NONE__BOOL (GtkObject * object,
|
||||
GtkSignalFunc func,
|
||||
gpointer func_data,
|
||||
GtkArg * args)
|
||||
{
|
||||
GtkSignal_NONE__BOOL rfunc;
|
||||
rfunc = (GtkSignal_NONE__BOOL) func;
|
||||
(*rfunc) (object,
|
||||
GTK_VALUE_BOOL (args[0]),
|
||||
func_data);
|
||||
}
|
||||
|
||||
typedef void (*GtkSignal_NONE__POINTER) (GtkObject * object,
|
||||
gpointer arg1,
|
||||
gpointer user_data);
|
||||
@ -132,21 +172,43 @@ gtk_marshal_NONE__POINTER (GtkObject * object,
|
||||
func_data);
|
||||
}
|
||||
|
||||
typedef void (*GtkSignal_NONE__POINTER_POINTER) (GtkObject * object,
|
||||
gpointer arg1,
|
||||
gpointer arg2,
|
||||
gpointer user_data);
|
||||
typedef void (*GtkSignal_NONE__C_CALLBACK) (GtkObject * object,
|
||||
gpointer arg1a,
|
||||
gpointer arg1b,
|
||||
gpointer user_data);
|
||||
void
|
||||
gtk_marshal_NONE__POINTER_POINTER (GtkObject * object,
|
||||
GtkSignalFunc func,
|
||||
gpointer func_data,
|
||||
GtkArg * args)
|
||||
gtk_marshal_NONE__C_CALLBACK (GtkObject * object,
|
||||
GtkSignalFunc func,
|
||||
gpointer func_data,
|
||||
GtkArg * args)
|
||||
{
|
||||
GtkSignal_NONE__POINTER_POINTER rfunc;
|
||||
rfunc = (GtkSignal_NONE__POINTER_POINTER) func;
|
||||
GtkSignal_NONE__C_CALLBACK rfunc;
|
||||
rfunc = (GtkSignal_NONE__C_CALLBACK) func;
|
||||
(*rfunc) (object,
|
||||
GTK_VALUE_POINTER (args[0]),
|
||||
GTK_VALUE_POINTER (args[1]),
|
||||
GTK_VALUE_C_CALLBACK (args[0]).func,
|
||||
GTK_VALUE_C_CALLBACK (args[0]).func_data,
|
||||
func_data);
|
||||
}
|
||||
|
||||
typedef void (*GtkSignal_NONE__C_CALLBACK_C_CALLBACK) (GtkObject * object,
|
||||
gpointer arg1a,
|
||||
gpointer arg1b,
|
||||
gpointer arg2a,
|
||||
gpointer arg2b,
|
||||
gpointer user_data);
|
||||
void
|
||||
gtk_marshal_NONE__C_CALLBACK_C_CALLBACK (GtkObject * object,
|
||||
GtkSignalFunc func,
|
||||
gpointer func_data,
|
||||
GtkArg * args)
|
||||
{
|
||||
GtkSignal_NONE__C_CALLBACK_C_CALLBACK rfunc;
|
||||
rfunc = (GtkSignal_NONE__C_CALLBACK_C_CALLBACK) func;
|
||||
(*rfunc) (object,
|
||||
GTK_VALUE_C_CALLBACK (args[0]).func,
|
||||
GTK_VALUE_C_CALLBACK (args[0]).func_data,
|
||||
GTK_VALUE_C_CALLBACK (args[1]).func,
|
||||
GTK_VALUE_C_CALLBACK (args[1]).func_data,
|
||||
func_data);
|
||||
}
|
||||
|
||||
@ -274,6 +336,24 @@ gtk_marshal_NONE__POINTER_INT (GtkObject * object,
|
||||
func_data);
|
||||
}
|
||||
|
||||
typedef void (*GtkSignal_NONE__POINTER_POINTER) (GtkObject * object,
|
||||
gpointer arg1,
|
||||
gpointer arg2,
|
||||
gpointer user_data);
|
||||
void
|
||||
gtk_marshal_NONE__POINTER_POINTER (GtkObject * object,
|
||||
GtkSignalFunc func,
|
||||
gpointer func_data,
|
||||
GtkArg * args)
|
||||
{
|
||||
GtkSignal_NONE__POINTER_POINTER rfunc;
|
||||
rfunc = (GtkSignal_NONE__POINTER_POINTER) func;
|
||||
(*rfunc) (object,
|
||||
GTK_VALUE_POINTER (args[0]),
|
||||
GTK_VALUE_POINTER (args[1]),
|
||||
func_data);
|
||||
}
|
||||
|
||||
typedef void (*GtkSignal_NONE__POINTER_POINTER_POINTER) (GtkObject * object,
|
||||
gpointer arg1,
|
||||
gpointer arg2,
|
||||
@ -384,46 +464,6 @@ gtk_marshal_NONE__INT_POINTER_INT_INT_INT (GtkObject * object,
|
||||
func_data);
|
||||
}
|
||||
|
||||
typedef void (*GtkSignal_NONE__BOOL) (GtkObject * object,
|
||||
gboolean arg1,
|
||||
gpointer user_data);
|
||||
void
|
||||
gtk_marshal_NONE__BOOL (GtkObject * object,
|
||||
GtkSignalFunc func,
|
||||
gpointer func_data,
|
||||
GtkArg * args)
|
||||
{
|
||||
GtkSignal_NONE__BOOL rfunc;
|
||||
rfunc = (GtkSignal_NONE__BOOL) func;
|
||||
(*rfunc) (object,
|
||||
GTK_VALUE_BOOL (args[0]),
|
||||
func_data);
|
||||
}
|
||||
|
||||
typedef gboolean (*GtkSignal_BOOL__POINTER_POINTER_POINTER_POINTER) (GtkObject * object,
|
||||
gpointer arg1,
|
||||
gpointer arg2,
|
||||
gpointer arg3,
|
||||
gpointer arg4,
|
||||
gpointer user_data);
|
||||
void
|
||||
gtk_marshal_BOOL__POINTER_POINTER_POINTER_POINTER (GtkObject * object,
|
||||
GtkSignalFunc func,
|
||||
gpointer func_data,
|
||||
GtkArg * args)
|
||||
{
|
||||
GtkSignal_BOOL__POINTER_POINTER_POINTER_POINTER rfunc;
|
||||
gboolean *return_val;
|
||||
return_val = GTK_RETLOC_BOOL (args[4]);
|
||||
rfunc = (GtkSignal_BOOL__POINTER_POINTER_POINTER_POINTER) func;
|
||||
*return_val = (*rfunc) (object,
|
||||
GTK_VALUE_POINTER (args[0]),
|
||||
GTK_VALUE_POINTER (args[1]),
|
||||
GTK_VALUE_POINTER (args[2]),
|
||||
GTK_VALUE_POINTER (args[3]),
|
||||
func_data);
|
||||
}
|
||||
|
||||
typedef void (*GtkSignal_NONE__INT_POINTER) (GtkObject * object,
|
||||
gint arg1,
|
||||
gpointer arg2,
|
||||
|
@ -29,6 +29,13 @@ extern "C"
|
||||
gpointer func_data,
|
||||
GtkArg * args);
|
||||
|
||||
#define gtk_marshal_BOOL__POINTER_STRING_STRING_POINTER gtk_marshal_BOOL__POINTER_POINTER_POINTER_POINTER
|
||||
|
||||
void gtk_marshal_BOOL__POINTER_POINTER_POINTER_POINTER (GtkObject * object,
|
||||
GtkSignalFunc func,
|
||||
gpointer func_data,
|
||||
GtkArg * args);
|
||||
|
||||
#define gtk_marshal_ENUM__ENUM gtk_marshal_INT__INT
|
||||
|
||||
void gtk_marshal_INT__INT (GtkObject * object,
|
||||
@ -46,6 +53,11 @@ extern "C"
|
||||
gpointer func_data,
|
||||
GtkArg * args);
|
||||
|
||||
void gtk_marshal_NONE__BOOL (GtkObject * object,
|
||||
GtkSignalFunc func,
|
||||
gpointer func_data,
|
||||
GtkArg * args);
|
||||
|
||||
#define gtk_marshal_NONE__BOXED gtk_marshal_NONE__POINTER
|
||||
|
||||
void gtk_marshal_NONE__POINTER (GtkObject * object,
|
||||
@ -53,12 +65,15 @@ extern "C"
|
||||
gpointer func_data,
|
||||
GtkArg * args);
|
||||
|
||||
#define gtk_marshal_NONE__C_CALLBACK_C_CALLBACK gtk_marshal_NONE__POINTER_POINTER
|
||||
void gtk_marshal_NONE__C_CALLBACK (GtkObject * object,
|
||||
GtkSignalFunc func,
|
||||
gpointer func_data,
|
||||
GtkArg * args);
|
||||
|
||||
void gtk_marshal_NONE__POINTER_POINTER (GtkObject * object,
|
||||
GtkSignalFunc func,
|
||||
gpointer func_data,
|
||||
GtkArg * args);
|
||||
void gtk_marshal_NONE__C_CALLBACK_C_CALLBACK (GtkObject * object,
|
||||
GtkSignalFunc func,
|
||||
gpointer func_data,
|
||||
GtkArg * args);
|
||||
|
||||
#define gtk_marshal_NONE__ENUM gtk_marshal_NONE__INT
|
||||
|
||||
@ -103,11 +118,20 @@ extern "C"
|
||||
gpointer func_data,
|
||||
GtkArg * args);
|
||||
|
||||
void gtk_marshal_NONE__POINTER_POINTER (GtkObject * object,
|
||||
GtkSignalFunc func,
|
||||
gpointer func_data,
|
||||
GtkArg * args);
|
||||
|
||||
void gtk_marshal_NONE__POINTER_POINTER_POINTER (GtkObject * object,
|
||||
GtkSignalFunc func,
|
||||
gpointer func_data,
|
||||
GtkArg * args);
|
||||
|
||||
#define gtk_marshal_NONE__POINTER_STRING_STRING gtk_marshal_NONE__POINTER_POINTER_POINTER
|
||||
|
||||
#define gtk_marshal_NONE__POINTER_UINT gtk_marshal_NONE__POINTER_INT
|
||||
|
||||
#define gtk_marshal_NONE__POINTER_UINT_ENUM gtk_marshal_NONE__POINTER_INT_INT
|
||||
|
||||
void gtk_marshal_NONE__POINTER_INT_INT (GtkObject * object,
|
||||
@ -115,6 +139,8 @@ extern "C"
|
||||
gpointer func_data,
|
||||
GtkArg * args);
|
||||
|
||||
#define gtk_marshal_NONE__POINTER_UINT_UINT gtk_marshal_NONE__POINTER_INT_INT
|
||||
|
||||
#define gtk_marshal_NONE__STRING gtk_marshal_NONE__POINTER
|
||||
|
||||
#define gtk_marshal_NONE__STRING_INT_POINTER gtk_marshal_NONE__POINTER_INT_POINTER
|
||||
@ -135,8 +161,6 @@ extern "C"
|
||||
gpointer func_data,
|
||||
GtkArg * args);
|
||||
|
||||
#define gtk_marshal_NONE__POINTER_UINT_UINT gtk_marshal_NONE__POINTER_INT_INT
|
||||
|
||||
#define gtk_marshal_NONE__UINT_POINTER_UINT_UINT_ENUM gtk_marshal_NONE__INT_POINTER_INT_INT_INT
|
||||
|
||||
void gtk_marshal_NONE__INT_POINTER_INT_INT_INT (GtkObject * object,
|
||||
@ -144,24 +168,6 @@ extern "C"
|
||||
gpointer func_data,
|
||||
GtkArg * args);
|
||||
|
||||
#define gtk_marshal_NONE__C_CALLBACK gtk_marshal_NONE__POINTER
|
||||
|
||||
void gtk_marshal_NONE__BOOL (GtkObject * object,
|
||||
GtkSignalFunc func,
|
||||
gpointer func_data,
|
||||
GtkArg * args);
|
||||
|
||||
#define gtk_marshal_NONE__POINTER_UINT gtk_marshal_NONE__POINTER_INT
|
||||
|
||||
#define gtk_marshal_NONE__POINTER_STRING_STRING gtk_marshal_NONE__POINTER_POINTER_POINTER
|
||||
|
||||
#define gtk_marshal_BOOL__POINTER_STRING_STRING_POINTER gtk_marshal_BOOL__POINTER_POINTER_POINTER_POINTER
|
||||
|
||||
void gtk_marshal_BOOL__POINTER_POINTER_POINTER_POINTER (GtkObject * object,
|
||||
GtkSignalFunc func,
|
||||
gpointer func_data,
|
||||
GtkArg * args);
|
||||
|
||||
#define gtk_marshal_NONE__UINT_STRING gtk_marshal_NONE__INT_POINTER
|
||||
|
||||
void gtk_marshal_NONE__INT_POINTER (GtkObject * object,
|
||||
|
Loading…
Reference in New Issue
Block a user