-// register our type with the GObject type system if we haven't done so yet.
-// Everything else is done in the callbacks.
-GType custom_list_get_type()
-{
- static GType type = 0;
-
- if (type)
- return type;
-
- if (1) {
- static const GTypeInfo cell_info =
- {
- sizeof (CustomListClass),
- NULL,
- NULL,
- (GClassInitFunc)custom_list_class_init,
- NULL,
- NULL,
- sizeof (CustomList),
- 0,
- (GInstanceInitFunc)custom_list_init,
- };
-
- // Derive from GtkCellRenderer
- type = g_type_register_static(GTK_TYPE_CELL_RENDERER, "CustomList", &cell_info, 0);
- }
-
- return type;
-}
-
-
-// klass initialisation
-// - override the parent's functions that we need to implement.
-// - declare our property
-// - If you want cells that are editable, you need to override 'activate' and 'start_editing'.
-static void custom_list_class_init(CustomListClass *klass)
-{
- GtkCellRendererClass *cell_class = GTK_CELL_RENDERER_CLASS(klass);
- GObjectClass *object_class = G_OBJECT_CLASS(klass);
-
-printf("custom_list_class_init : deb\n");
- parent_class = g_type_class_peek_parent (klass);
-
- cell_class->render = custom_list_render;
- cell_class->get_size = custom_list_get_size;
- object_class->get_property = custom_list_get_property;
- object_class->set_property = custom_list_set_property;
- object_class->finalize = custom_list_finalize;
-
- // Install our very own properties
- g_object_class_install_property(object_class, PROP_PERCENTAGE, g_param_spec_double("percentage", "Percentage", "The fractional progress to display", 0.0, 1.0, 0.0, G_PARAM_READWRITE));
- g_object_class_install_property(object_class, PROP_THEME, g_param_spec_string("theme", "Theme", "Theme file name", NULL, G_PARAM_READWRITE));
- g_object_class_install_property(object_class, PROP_SNAPSHOT, g_param_spec_string("snapshot", "Snapshot", "Snapshot file name", NULL, G_PARAM_READWRITE));
-}
-