
// gcc -o workarea -std=gnu99 `pkg-config --libs --cflags gtk+-3.0` workarea.c 

#include <gtk/gtk.h>

int main (int argc, char **argv)
{
	gtk_init (&argc, &argv);

	GdkScreen *screen = gdk_screen_get_default ();
	int monitors = gdk_screen_get_n_monitors (screen);
	for (int i = 0; i < monitors; i++) {
		GdkRectangle rectangle;
		gdk_screen_get_monitor_workarea (screen, i, &rectangle);
		g_message ("Workarea for monitor %d rectangle %dx%d (at %d,%d)",
			   i, rectangle.width, rectangle.height, rectangle.x, rectangle.y);

	}

	return 0;
}
