#include
static void destroy(GtkWidget *window,gpointer data){
printf(%s,gtk_label_get_text(data));
gtk_main_quit();
}
static gboolean delete_event(GtkWindow *window,GdkEvent *event,gpointer data){
return FALSE;
}
int main( int argc, char *argv[])
{
GtkWidget *window;
char *markup;
char *str=hello,world;
gtk_init(&argc, &argv);
window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
gtk_window_set_title(GTK_WINDOW(window), 你好);
gtk_container_set_border_width(GTK_CONTAINER(window),10);
gtk_window_set_default_size(GTK_WINDOW(window), 130, 150);
gtk_window_set_position(GTK_WINDOW(window), GTK_WIN_POS_CENTER);
GtkWidget * label=gtk_label_new();
markup = g_markup_printf_escaped (%s,str );
gtk_label_set_markup (GTK_LABEL (label), markup);
gtk_label_set_selectable(GTK_LABEL(label),TRUE);
g_signal_connect(G_OBJECT(window), destroy,G_CALLBACK(destroy),(gpointer)label);
g_signal_connect(G_OBJECT(window), delete _event,G_CALLBACK(delete_event),NULL);
gtk_container_add(GTK_CONTAINER(window),label);
gtk_widget_show_all(window);
gtk_main();
g_free (markup);
return 0;
}