Skip to content

Instantly share code, notes, and snippets.

View medovina's full-sized avatar

Adam Dingle medovina

View GitHub Profile
@medovina
medovina / column_view.c
Created February 12, 2025 12:53
demo GTK 4 program with a GtkColumnView
// This demo GTK 4 program creates a GtkColumnView that shows a list of movies, each with
// a year and title. You can click column headers to sort by year or title. The
// sorting is implemented using GtkCustomSorter objects.
//
// To keep things simple, I haven't bothered to deref or free any allocated objects.
//
// To build, run
// $ gcc -Wall `pkg-config --cflags gtk4` -o column_view column_view.c `pkg-config --libs gtk4`
#include <gtk/gtk.h>