Load a background image in a Gtk Window

FROM: http://www.gtkforums.com/about446.html For completeness heres a copy of the routine I used to create windows with a background image… You probably need to customise it a little, Im working on an embedded device that supports only 640x480. GtkWidget *SetupWindow(gchar *data,gboolean Transient) { GdkPixmap *background; GdkPixbuf *pixbuf; GdkScreen *ourscreen; GdkColormap *colormap; GtkStyle *style; GdkColor fg; GdkColor bg; GError *error = NULL; GdkRectangle *rect; GtkWidget *window; pixbuf = gdk_pixbuf_new_from_file ("pics/fb.png",&error); if (error != NULL) { if (error->domain == GDK_PIXBUF_ERROR) { g_print ("Pixbuf Related Error:\n"); } if (error->domain == G_FILE_ERROR) { g_print ("File Error: Check file permissions and state:\n"); } g_printerr ("%s\n", error[0].message); exit(1); } gdk_pixbuf_render_pixmap_and_mask (pixbuf, &background, NULL, 0); style = gtk_style_new (); style->bg_pixmap[0] = background; window = gtk_window_new (GTK_WINDOW_TOPLEVEL); gtk_window_set_title (GTK_WINDOW (window), data); // gtk_window_maximize(GTK_WINDOW(window)); gtk_window_set_modal (GTK_WINDOW (window),TRUE); gtk_window_set_default_size(GTK_WINDOW(window),640,480); gtk_widget_set_style (GTK_WIDGET(window), GTK_STYLE(style)); gtk_window_set_position(GTK_WINDOW(window),GTK_WIN_POS_CENTER_ALWAYS); gtk_container_set_border_width(GTK_CONTAINER(window), 14); if(Transient==TRUE) gtk_window_set_transient_for(GTK_WINDOW (window),GTK_WINDOW(mainwindow)); gtk_widget_show (window); return(window); }

2007-07-19 · wuan

failed to write cache

执行fc-cache -v时得到错误信息: [/sun/home]# fc-cache -v /usr/share/fonts: caching, 0 fonts, 4 dirs /usr/share/fonts: failed to write cache /usr/share/fonts/X11: caching, 0 fonts, 6 dirs /usr/share/fonts/X11: failed to write cache /usr/share/fonts/X11/100dpi: caching, 0 fonts, 0 dirs /usr/share/fonts/X11/100dpi: failed to write cache /usr/share/fonts/X11/75dpi: caching, 0 fonts, 0 dirs /usr/share/fonts/X11/75dpi: failed to write cache /usr/share/fonts/X11/Type1: caching, 8 fonts, 0 dirs /usr/share/fonts/X11/Type1: failed to write cache /usr/share/fonts/X11/encodings: caching, 0 fonts, 1 dirs /usr/share/fonts/X11/encodings: failed to write cache /usr/share/fonts/X11/encodings/large: caching, 0 fonts, 0 dirs /usr/share/fonts/X11/encodings/large: failed to write cache /usr/share/fonts/X11/misc: caching, 0 fonts, 0 dirs /usr/share/fonts/X11/misc: failed to write cache /usr/share/fonts/X11/util: caching, 0 fonts, 0 dirs /usr/share/fonts/X11/util: failed to write cache /usr/share/fonts/truetype: caching, 0 fonts, 22 dirs /usr/share/fonts/truetype: failed to write cache /usr/share/fonts/truetype/arphic: caching, 2 fonts, 0 dirs /usr/share/fonts/truetype/arphic:...

2007-07-18 · wuan

好莱坞最经典男星 阿尔 帕西诺

FROM: http://bbs.cctv.com/forumthread.jsp?id=5114871&agMode=1 今天去天涯逛逛,刚好看到一篇关于帕西诺的帖子,写得怎样暂且不说,但我觉得作者是用纯粹的感情写成的,所以很是喜欢,特此收藏。 “不怒自威,大智慧,方法派演技大师,令人感激的神话。“我在太多的影评中读到了对这位演技大师的赞誉。 1940年4月25日出生的阿尔....

2007-06-26 · wuan

电视卡 realtek声卡

调节Rear Blue In的音量,电视卡Audio Out – 声卡Audio Input 声卡驱动V1.53

2007-06-20 · wuan

阿迪 武藤兰的故事

hi, 我是 AV 女优. 武藤兰, 这是我的故事. 我刚进 AV 界的时候, 拍片生涯的前 40 场戏, 我是在床上度过的, 他们觉得我就是个 0, 一无私处. 我没有躺在那里怨天尤人, 而是不停的做爱, 做爱. 这已经不是我能否坐上沙发 SM 的问题. 我要证明, 他们是错误的. 为什么我的片子是无码, 因为我要提醒自己, 每天我都要全力奋...

2007-06-19 · wuan