#include <sys/stat.h>
#include <sys/wait.h>
#include <gtk/gtk.h>
+#include <gdk/gdkkeysyms.h>
typedef struct sProperty
{
(void)column;
}
+gboolean key_press(GtkWidget *widget, GdkEvent *event, gpointer user_data)
+{
+ if(event->key.keyval==GDK_KEY_Escape)
+ {
+ gtk_main_quit();
+ return TRUE;
+ }
+
+ (void)widget;
+ (void)user_data;
+
+ return FALSE;
+}
+
int main(int argc, char **argv)
{
GtkWidget *window;
window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
gtk_container_set_border_width(GTK_CONTAINER(window), 5);
g_signal_connect(window, "destroy", G_CALLBACK(>k_main_quit), NULL);
+ g_signal_connect(window, "key-press-event", G_CALLBACK(&key_press), NULL);
viewport = gtk_viewport_new(NULL, NULL);
gtk_viewport_set_shadow_type(GTK_VIEWPORT(viewport), GTK_SHADOW_IN);