Skip to content

Instantly share code, notes, and snippets.

@cprieto
Created May 12, 2017 06:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cprieto/98a168c5428b9d08f1e9267a0b8eee84 to your computer and use it in GitHub Desktop.
Save cprieto/98a168c5428b9d08f1e9267a0b8eee84 to your computer and use it in GitHub Desktop.
#include <gtk/gtk.h>
static void activate (GtkApplication* app, gpointer user_data) {
GtkWidget *window = gtk_application_window_new (app);
gtk_window_set_title (GTK_WINDOW (window), "Window");
gtk_window_set_default_size (GTK_WINDOW (window), 200, 200);
gtk_widget_show_all (window);
}
int main (int argc, char **argv) {
GtkApplication *app = gtk_application_new ("org.gtk.example", G_APPLICATION_FLAGS_NONE);
g_signal_connect (app, "activate", G_CALLBACK (activate), NULL);
int status = g_application_run (G_APPLICATION (app), argc, argv);
g_object_unref (app);
return status;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment