Commits

rride_a  committed 65a25dd

window created

  • Participants
  • Parent commits 18d382e

Comments (0)

Files changed (2)

 // (c) Aliaksandr Ivaniuk, 2010
 #include "Precompiled.h"
 
+gboolean on_window_deleted( GtkWidget* widget, GdkEvent* event, gpointer user_data )
+{
+	gtk_main_quit();
+	return TRUE;	
+}
+
+GtkWidget* init_window()
+{
+	GtkWidget* mainWindow = gtk_window_new(GTK_WINDOW_TOPLEVEL);
+	gtk_signal_connect( GTK_OBJECT(mainWindow), "delete_event", GTK_SIGNAL_FUNC(on_window_deleted), NULL );
+	gtk_widget_show(mainWindow);
+
+	return mainWindow;
+}
+
 int ENTRY_POINT()
 {
 	CREATE_ARGS();
+	gtk_init (&argc, &argv);
 
+	GtkWidget* mainWindow = init_window();
+
+	gtk_main();
 
 	return 0;
 }

File Precompiled.h

 #include <stdlib.h>
 
 //////////////////////////////////////////////////////////////////////////
+// GTK stuff
+#include <gtk/gtk.h>
+#include <gtk/gtktree.h>
+
+//////////////////////////////////////////////////////////////////////////
 // my stuff
 #include "GlobalDefs.h"