but i don't know the parameter of gtk_cell_layout_get_cells (). the parameter of this function is GtkCellLayout *cell_layout, but i don't find the definition of GtkCellLayout structure. In .h file there is a statement: typedef struct _GtkCellLayout GtkCellLayout; /* dummy typedef */
GtkCellLayout is an interface, implemented by widgets that can render content using cell renderers. GtkTreeViewColumn, GtkCellView and GtkComboBox implement GtkCellLayout.
by reading the reference, i think the way:
GList *list = NULL;
column = gtk_tree_view_get_column(GTK_TREE_VIEW(treeview), column_id);
list = gtk_cell_layout_get_cells(GTK_CELL_LAYOUT(column));
but it seems to do not work. The treeview has 6 lines. by debugging, i found list->next is NULL, list->prev also, just list->data is allocated memory. but i do not know the content of list->data.
i do not know if the upper two lines codes are correct.
This is all correct. And based on results, you only have one GtkCellRenderer packed inside this column (this cell renderer is pointed to by list->data parameter). What do you expect to get here?