Branch: Tag:

2006-09-05

2006-09-05 14:18:19 by Lance Dillon <riffraff169@yahoo.com>

signals (and others) can now push a few boxed types, such as GdkColor and GtkTreePath

Rev: src/post_modules/GTK2/source/support.c:1.14

2:   || This file is part of Pike. For copyright information see COPYRIGHT.   || Pike is distributed under GPL, LGPL and MPL. See the file COPYING   || for more information. - || $Id: support.c,v 1.13 2006/08/03 16:49:49 ldillon Exp $ + || $Id: support.c,v 1.14 2006/09/05 14:18:19 ldillon Exp $   */      #include <version.h>
566:   }      static int pgtk2_push_object_param(const GValue *a) { -  GObject *obj=g_value_get_object(a); +  GObject *obj; +  gpointer *gp; +  if (g_type_is_a(G_VALUE_TYPE(a),G_TYPE_BOXED)) { +  gp=g_value_get_boxed(a); +  if (G_VALUE_HOLDS(a,g_type_from_name("GdkColor"))) { +  push_gdkobject(gp,color); +  } else if (G_VALUE_HOLDS(a,g_type_from_name("GtkTreePath"))) { +  pgtk2_push_gobjectclass(gp,pgtk2_tree_path_program); +  } else if (G_VALUE_HOLDS(a,g_type_from_name("GdkRectangle"))) { +  push_gdkobject(gp,rectangle); +  } else if (G_VALUE_HOLDS(a,g_type_from_name("GdkRegion"))) { +  push_gdkobject(gp,region); +  } +  } else { +  obj=g_value_get_object(a);    if (obj) - /* push_gobject(((void *)g_value_get_object(a))); */ +     push_gobject(obj); -  +  }    return PUSHED_VALUE;   }   
645:    CB( G_TYPE_POINTER, pgtk2_push_pike_object_param );       CB( G_TYPE_PARAM, pgtk2_push_gparamspec_param ); +  CB( G_TYPE_BOXED, pgtk2_push_object_param );   /*    CB( GTK_TYPE_SIGNAL, NULL );    CB( GTK_TYPE_INVALID, NULL );
1260:    data1=g_value_peek_pointer(param_values+0);    data2=closure->data;    } + /* fprintf(stderr,"marshaller: before: nvals==%d\n",n_params-1); */    callback=(pgtk2_marshal_func)(marshal_data?marshal_data:cc->callback);    callback(data1,data2,n_params-1,param_values+1,return_value); -  + /* fprintf(stderr,"marshaller: after: nvals==%d\n",n_params-1); */   }      int pgtk2_tree_view_row_separator_func(GtkTreeModel *model,