GTK additional arguments for signals
I'm new to GTK (in c++), but I have experience in GTK for python, any ways.
I'm trying to figure out a way to pass more than one argument through signals. Say for instance I'm trying to do this: Code:
static void cellfunc(GtkTreeViewColumn *col, GtkCellRenderer *cell, GtkTreeModel *model, GtkTreeIter *iter, gpointer entry, string format) Given the above code, How would I go about setting up the: gtk_tree_view_column_set_cell_data_func() Right now I have it setup like this, but it don't work: gtk_tree_view_column_set_cell_data_func(GTK_TREE_VIEW_COLUMN(col), GTK_CELL_RENDERER(cell), cellfunc(dataformat), GTK_ENTRY(direntry), NULL); Basically I'm trying to pass additional arguments to the 'cellfunc' function. Does anyone know how I would go about this. Thanks in advance, Bendeco |
Yes:
1. You can make your argument a pointer to a struct (a struct that contains your multiple items) ... or ... 2. You can declare a global variable (optionally making your argument an index for your global). |
Quote:
I will read into creating a struct. Thanks for the reply. Bendeco I try to be as professional as possible on these forums, BUT... I just noticed that I said "I'm currently doing #2". HAHAHAHA:eek: |
All times are GMT -5. The time now is 08:19 PM. |