Advertisement
Mohamed_AIT_RAMI

Untitled

Jan 12th, 2019
188
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.65 KB | None | 0 0
  1. #include <gtk.h>
  2.  
  3. static void
  4. activate(GtkApplication *app,
  5.          gpointer user_data) {
  6.     GtkWidget *window;
  7.  
  8.     window = gtk_application_window_new(app);
  9.     gtk_window_set_title(GTK_WINDOW(window), "Hello GNOME");
  10.     gtk_widget_show_all(window);
  11. }
  12.  
  13. int
  14. main(int argc, char **argv) {
  15.     GtkApplication *app;
  16.     int status;
  17.  
  18.     app = gtk_application_new("org.gtk.example",
  19.                               G_APPLICATION_FLAGS_NONE);
  20.     g_signal_connect(app, "activate",
  21.                      G_CALLBACK(activate), NULL);
  22.     status = g_application_run(G_APPLICATION(app), argc, argv);
  23.     g_object_unref(app);
  24.     return (status);
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement