pike.git / src / post_modules / GTK2 / source / gladexml.pre

version» Context lines:

pike.git/src/post_modules/GTK2/source/gladexml.pre:19:    gboolean after,    gpointer args)   {    struct mapping *callbacks;    struct svalue *data;    int id;    struct signal_data *b;    struct svalue *cb;    struct pike_string *funname;    guint signal_id; +  GClosure *gc;   #ifdef GLADE_CONNECT_DEBUG    fprintf(stderr,"Connecting handler %s, signal %s,\n data %s, "    "after: %d\n",    handler_name,signal_name,signal_data,after);   #endif    get_all_args("GTK2.GladeXML->_signal_connect",*(INT32 *)args,    "%m%*",&callbacks,&data);   /*    funname=make_shared_string(handler_name);    cb=low_mapping_string_lookup(callbacks,funname);
pike.git/src/post_modules/GTK2/source/gladexml.pre:54:    assign_svalue_no_free(&b->cb,cb);    assign_svalue_no_free(&b->args,data);    b->signal_id=g_signal_lookup(signal_name,G_TYPE_FROM_INSTANCE(object));    if (!b->signal_id) {    g_free(b);    fprintf(stderr,    "** WARNING **; Signal \"%s\" not defined in the '%s' "    "class ancestry.\n",    signal_name,g_type_name(G_TYPE_FROM_INSTANCE(object)));    } + /*    id=g_signal_connect_data(G_OBJECT(object),signal_name,    G_CALLBACK(pgtk2_signal_func_wrapper),b,    (GClosureNotify)pgtk2_free_signal_data,    G_CONNECT_SWAPPED); -  + */ +  gc=g_cclosure_new_swap(G_CALLBACK(pgtk2_signal_func_wrapper),b, +  (GClosureNotify)pgtk2_free_signal_data); +  g_closure_set_marshal(gc,pgtk2_marshaller); +  id=g_signal_connect_closure(G_OBJECT(object),signal_name,gc,1);   }   %}      //! Glade is a free GUI builder for GTK2+ and Gnome. It's normally used to   //! create C-code, but can also produce code for other languages. Libglade   //! is a utility library that builds the GI from the Glade XML save files.   //! This module uses libglade and allows you to easily make GUI designs to be   //! used with your Pike applications.      void create(string filename_or_buffer, ?int size, ?string root, ?string domain)
pike.git/src/post_modules/GTK2/source/gladexml.pre:99:    else if ((size < 0) || (size > fname->len))    gl=glade_xml_new_from_buffer(fname->str,fname->len,root,dom);    else    gl=glade_xml_new_from_buffer(fname->str,size,root,dom);    THIS->obj=G_OBJECT(gl);    }    pgtk2_pop_n_elems(args);    pgtk2__init_this_object();   }    - GTK2.Widget get_widget(string name) + +GTK2.Widget get_widget(string name)   //! This function is used to get the widget corresponding to name in the   //! interface description. You would use this if you have to do anything to   //! the widget after loading.   {    pgtk2_verify_inited();    {    char *name;    GtkWidget *widget;    get_all_args("get_widget",args,"%s",&name);    widget=glade_xml_get_widget(GLADE_XML(THIS->obj),name);