Gtk设置窗体的背景图片

http://www.cnblogs.com/coolattt/articles/751756.html

 

#include <gtk/gtk.h>

int main(int argc,char *argv[]){

GtkWidget *win;

GtkWidget *image;

GtkWidget *frame;

gtk_init(&argc,&argv);

win=gtk_window_new(GTK_WINDOW_TOPLEVEL);

gtk_signal_connect(GTK_OBJECT(window),"destroy",G_CALLBACK(gtk_main_quit),NULL);

image=gtk_image_new_from_file("your pictrue");

frame=gtk_frame_new(NULL);

gtk_container_add(GTK_CONTAINER(frame),image);

gtk_container_add(GTK_CONTAINER(window),frame);

gtk_widget_show_all(window);

gtk_main();

return 0;

}

你可能感兴趣的:(image,object,null,callback,Signal,gtk)