/* Gtk Front End to PortScanner by Philippe Rivard */

#include <gtk/gtk.h>

int main(int argc, char **argv)
{
	GtkWidget *window;
	GtkWidget *vbox;
	GtkWidget *hbox;
	GtkWidget *button;
	GtkWidget *entry;
	GtkWidget *label;
	GtkWidget *s_window;
	GtkWidget *list;

	gtk_init(&argc, &argv);
	window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
	gtk_widget_set_usize(GTK_WIDGET(window), 300, 110);
	gtk_window_set_title(GTK_WINDOW(window), "xportscan");
	gtk_signal_connect(GTK_OBJECT(window), "delete_event",
				(GtkSignalFunc)gtk_exit, NULL);
	vbox = gtk_vbox_new(FALSE, 0);
	gtk_container_add(GTK_CONTAINER(window), vbox);
	gtk_widget_show(vbox);
	
	hbox = gtk_hbox_new(FALSE, 0);
	gtk_container_add(GTK_CONTAINER(vbox), hbox);
	gtk_widget_show(hbox);

	label = gtk_label_new("Host:");
	gtk_box_pack_start_defaults(GTK_BOX(hbox), label);
	gtk_widget_show(label);

	entry = gtk_entry_new();
	gtk_box_pack_start_defaults(GTK_BOX(hbox), entry);
	gtk_widget_show(entry);

	button = gtk_button_new_with_label("Scan");
	gtk_box_pack_start_defaults(GTK_BOX(hbox), button);
	gtk_widget_show(button);

	s_window = gtk_scrolled_window_new(NULL, NULL);
	gtk_widget_set_usize(s_window, 300, 80);
	gtk_container_add(GTK_CONTAINER(vbox), s_window);
	gtk_widget_show(s_window);

	list = gtk_list_new();
	gtk_container_add(GTK_CONTAINER(s_window), list);
	gtk_widget_show(list);

	gtk_widget_show(window);
	gtk_main();
	return(0);
}
