Ticket #67280: gtk-entry-test.c

File gtk-entry-test.c, 521 bytes (added by Akkiesoft (Akira Ouchi), 19 months ago)
Line 
1#include <gtk/gtk.h>
2
3/*
4 * Based on: https://trac.macports.org/ticket/64484
5 *
6 * gcc $(pkg-config --libs --cflags gtk+-3.0) -o gtk-test gtk-test.c
7 */
8
9int main(int argc, char *argv[])
10{
11    GtkWidget *window, *entry;
12    gtk_init(&argc, &argv);
13    window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
14    entry = gtk_entry_new();
15    gtk_container_add(GTK_CONTAINER(window), entry); 
16    g_signal_connect(window, "destroy", G_CALLBACK (gtk_main_quit), NULL);
17    gtk_widget_show_all(window);
18    gtk_main();
19    return 0;
20}