#include <gtk/gtk.h>
#include <glib.h>
#include <stdio.h>

int main (int argc, char **argv)
{
	#define DEFAULT_HEIGHT	 0

	GtkWidget *window = NULL;
	gint get_val;
	
	gtk_init(&argc, &argv);
	
	window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
	if(window == NULL)
	{
		printf("The gtk_window_new function returns NULL, unable to create a GtkWidget.\n");
	}
	
	gtk_window_set_default_size(GTK_WINDOW(window), DEFAULT_HEIGHT, DEFAULT_HEIGHT);
	//g_object_set(window, "default-height", DEFAULT_HEIGHT, NULL);		функция не работает и в этом случае

	g_object_get(window, "default-height", &get_val, NULL);
	
	if(get_val != DEFAULT_HEIGHT)
	{
		printf("The 'default-height' property should be %d, but it is %d.\n", DEFAULT_HEIGHT, get_val);
	}	

	if(window != NULL)
	{
		gtk_widget_destroy(window);
	}
	
	return 0;
}
