#include <gtk/gtk.h>

static void destroy(GtkWidget *widget, gpointer data)
{
    gtk_main_quit();
}

int main(int argc, char *argv[])
{
    gtk_init(&argc, &argv);
    GtkWidget *window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
    gtk_window_set_title (GTK_WINDOW(window), "Window");
    g_signal_connect (window, "destroy", G_CALLBACK(destroy), NULL);

    gchar css[] = "list > row:first-child { background: red; }";

    GtkCssProvider *css_provider = gtk_css_provider_new ();
    gtk_css_provider_load_from_data (css_provider, css, -1, NULL);

    GdkScreen *screen = gdk_screen_get_default ();
    GtkStyleContext *context = gtk_widget_get_style_context (window);
    gtk_style_context_add_provider_for_screen (screen, GTK_STYLE_PROVIDER (css_provider), GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);

    GtkWidget *list = gtk_list_box_new();
    gtk_list_box_set_selection_mode (GTK_LIST_BOX (list), GTK_SELECTION_NONE);

    GtkWidget *label1 = gtk_label_new("Label1");
    GtkWidget *label2 = gtk_label_new("Label2");

    //gtk_container_add (GTK_CONTAINER (list), label1);
    gtk_list_box_insert (GTK_LIST_BOX (list), label1, 0);
    gtk_list_box_insert (GTK_LIST_BOX (list), label2, 0);

    gtk_container_add(GTK_CONTAINER (window), list);
    gtk_widget_show_all (window);
    gtk_main ();
    return 0;
}
