[Glade-devel] commit -- add_signal signal



I've added a "add_signal" to the GladeEditor widget (the properties
window).

To generate a prototype of the signal, you can do:

static void
glade_editor_add_signal_cb (GladeEditor *editor, const char *widget_id,
                            GType widget_type, guint signal_id,
                            const char *callback_name)
{
        GSignalQuery query;
        unsigned int i;
        
        g_signal_query (signal_id, &query);
        printf ("%s %s(%s widget, ", g_type_name (query.return_type),
callback_name, g_type_name (query.itype));

        for (i = 0; i < query.n_params; i++)
                printf ("%s arg%d, ", g_type_name (query.param_types[i]), i);

        printf ("gpointer data);\n");
}

and hook the glade_editor_add_signal_cb to the "add_signal" of the
GladeEditor widget.

Biswapesh, please take a look at the arguments, and say me if you need
anything else.

Cheers,






[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]