2010-10-15 15:04:27 +00:00
|
|
|
#include <gtk/gtk.h>
|
|
|
|
|
2015-01-28 11:39:01 +00:00
|
|
|
static void
|
|
|
|
activate (GtkApplication* app,
|
|
|
|
gpointer user_data)
|
2010-10-15 15:04:27 +00:00
|
|
|
{
|
|
|
|
GtkWidget *window;
|
|
|
|
|
2015-01-28 11:39:01 +00:00
|
|
|
window = gtk_application_window_new (app);
|
2013-07-17 13:36:00 +00:00
|
|
|
gtk_window_set_title (GTK_WINDOW (window), "Window");
|
2015-01-28 11:39:01 +00:00
|
|
|
gtk_window_set_default_size (GTK_WINDOW (window), 200, 200);
|
2017-01-19 09:02:04 +00:00
|
|
|
gtk_widget_show (window);
|
2015-01-28 11:39:01 +00:00
|
|
|
}
|
2010-10-15 15:04:27 +00:00
|
|
|
|
2015-01-28 11:39:01 +00:00
|
|
|
int
|
|
|
|
main (int argc,
|
|
|
|
char **argv)
|
|
|
|
{
|
|
|
|
GtkApplication *app;
|
|
|
|
int status;
|
2010-10-15 15:04:27 +00:00
|
|
|
|
2015-01-28 11:39:01 +00:00
|
|
|
app = gtk_application_new ("org.gtk.example", G_APPLICATION_FLAGS_NONE);
|
|
|
|
g_signal_connect (app, "activate", G_CALLBACK (activate), NULL);
|
|
|
|
status = g_application_run (G_APPLICATION (app), argc, argv);
|
|
|
|
g_object_unref (app);
|
2010-10-15 15:04:27 +00:00
|
|
|
|
2015-01-28 11:39:01 +00:00
|
|
|
return status;
|
2010-10-15 15:04:27 +00:00
|
|
|
}
|