pike.git / src / post_modules / GTK2 / source / support.c

version» Context lines:

pike.git/src/post_modules/GTK2/source/support.c:1:   /*   || 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.21 2009/11/13 13:50:26 per Exp $ + || $Id: support.c,v 1.22 2009/11/16 14:00:32 per Exp $   */      #include <version.h>   #include <bignum.h>   #include <stdarg.h>      #ifndef INIT_VARIABLES   extern struct program *image_color_program;   extern struct program *image_program;   #endif
pike.git/src/post_modules/GTK2/source/support.c:760:    const GValue *param_values,    GValue *return_value) {    unsigned int i;       if (!last_used_callback)    build_push_callbacks();    push_gobject(G_OBJECT(go));    for (i=0; i<n_params; i++) {    pgtk2_push_gvalue_rt(&(param_values[i]));    } - /* if (n_params) */ - /* f_aggregate(n_params); */ +     push_svalue(&d->args);    apply_svalue(&d->cb,2+n_params); -  if (return_value) { +  if (return_value && G_VALUE_TYPE(return_value) != 0 )    pgtk2_set_value(return_value,&Pike_sp[-1]);    pop_stack();   } - } +       void pgtk2_free_signal_data(struct signal_data *s, GClosure *gcl) {    free_svalue(&s->cb);    free_svalue(&s->args);    g_free(s);   }      void pgtk2_push_gchar(const gchar *s) {    push_text(s);    push_int(1);
pike.git/src/post_modules/GTK2/source/support.c:1235:    } else    g_value_set_object(gv,NULL);    break;    case G_TYPE_POINTER:    if (sv->type==PIKE_T_OBJECT) {    g_value_set_pointer(gv,sv->u.object);    add_ref(sv->u.object);    } else    g_value_set_pointer(gv,NULL);    break; +  case 0: // void +  break;    default: -  Pike_error("Unable to handle type %d - %s.\n",gt,g_type_name(gt)); +  Pike_error("Unable to handle type %d - %s.\n",gt,g_type_name(gt) ?g_type_name(gt): "unnamed" );    }   }      int pgtk2_tree_sortable_callback(GtkTreeModel *model, GtkTreeIter *a,    GtkTreeIter *b, struct signal_data *d) {    int res;   /* push_gobjectclass(model,pgtk2_tree_model_program); */    push_gobject(model);    push_pgdk2object(a,pgtk2_tree_iter_program,0);    push_pgdk2object(b,pgtk2_tree_iter_program,0);
pike.git/src/post_modules/GTK2/source/support.c:1331:    int res;    push_gobject(model);    push_gobjectclass(iter,pgtk2_tree_iter_program);    push_svalue(&d->args);    apply_svalue(&d->cb,3);    res=Pike_sp[-1].u.integer;    pop_stack();    return res;   }    +  + int pgtk2_entry_completion_match_func( GtkEntryCompletion *x, +  const gchar *key, +  GtkTreeIter *iter, +  struct signal_data *d) + { +  int res; +  push_gobject(x); +  pgtk2_push_gchar( key ); +  push_gobjectclass(iter,pgtk2_tree_iter_program); +  apply_svalue( &d->cb, 3 ); +  res = Pike_sp[-1].u.integer; +  pop_stack(); +  return res; + }