#include <stdio.h>

#include <gtk/gtk.h>
#include <gtk/gtkx.h>

static gboolean
plugremoved(GtkSocket *s, gpointer dummy)
{
	return TRUE;
}

int
main(int argc, char *argv[])
{
	GtkWidget *win, *gsock;

	gtk_init(&argc, &argv);

	gsock = gtk_socket_new();
	g_signal_connect(gsock, "plug-removed", G_CALLBACK(plugremoved), NULL);
	win = gtk_window_new(GTK_WINDOW_TOPLEVEL);
	gtk_container_add(GTK_CONTAINER(win), gsock);

	gtk_widget_show_all(win);
	fprintf(stderr, "gtk socket: %#lx\n",
	        gtk_socket_get_id(GTK_SOCKET(gsock)));

	gtk_main();

	return 0;
}
