Thanks I found from a site the API named
gtk_icon_theme_load_icon, more or less my final code:
Code:
const gchar *categories[][2] =
{
{"applications-multimedia", "AudioVideo"},
{"applications-multimedia", "Audio"},
{"applications-multimedia", "Video"},
{"applications-development", "Development"},
{"applications-science", "Education"},
{"applications-games", "Game"},
{"applications-graphics", "Graphics"},
{"applications-internet", "Network"},
{"applications-office", "Office"},
{"applications-accessories", "Settings"},
{"applications-system", "System"},
{"applications-utilities", "Utility"}
};
model = gtk_list_store_new (2, GDK_TYPE_PIXBUF, G_TYPE_STRING);
n_items = G_N_ELEMENTS (categories);
icon_theme = gtk_icon_theme_get_default ();
for (pos = 0; pos != n_items; pos++) {
GdkPixbuf *pixbuf;
GtkTreeIter iter;
gtk_list_store_append (model, &iter);
pixbuf = gtk_icon_theme_load_icon (icon_theme, categories[pos][0], 32, 0, NULL);
gtk_list_store_set (model, &iter, 0, pixbuf, 1, categories[pos][1], -1);
g_object_unref (pixbuf);
}
ptr->combo1 = gtk_combo_box_new_with_model (GTK_TREE_MODEL (model));
render_pixbuf = gtk_cell_renderer_pixbuf_new ();
render_text = gtk_cell_renderer_text_new ();
gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (ptr->combo1), render_pixbuf, FALSE);
gtk_cell_layout_add_attribute (GTK_CELL_LAYOUT (ptr->combo1), render_pixbuf, "pixbuf", 0);
gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (ptr->combo1), render_text, FALSE);
gtk_cell_layout_add_attribute (GTK_CELL_LAYOUT (ptr->combo1), render_text, "text", 1);
gtk_combo_box_set_active (GTK_COMBO_BOX (ptr->combo1), 0);
g_object_unref (model);