can anybody help with a little displaying program?
- From: "guo li" <liguo503 hotmail com>
- To: gtk-list gnome org
- Subject: can anybody help with a little displaying program?
- Date: Mon, 18 Mar 2002 23:46:34 +0000
#include <gtk/gtk.h>
#include <gdk-pixbuf/gdk-pixbuf.h>
void delete_event( GtkWidget *widget,
GdkEvent *event,
gpointer data )
{
gtk_main_quit ();
}
int main( int argc,char *argv[] )
{
GtkWidget *window;
GdkPixbuf *pixbuf;
GtkWidget *widget;
gtk_init (&argc, &argv);
window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
gtk_signal_connect (GTK_OBJECT (window),
"delete_event",
GTK_SIGNAL_FUNC (delete_event), NULL);
widget = gtk_event_box_new();
gtk_window_set_title (GTK_WINDOW (window),"hello!!guo
guo");
gtk_container_set_border_width (GTK_CONTAINER (window),
200);
pixbuf = gdk_pixbuf_new_from_file("rose");
gtk_widget_set_usize(widget,
gdk_pixbuf_get_width(pixbuf),gdk_pixbuf_get_height(pixbuf));
gtk_container_add(GTK_CONTAINER(window), widget);
gtk_widget_show(widget);
gtk_widget_show (window);
gtk_main ();
return 0;
}
_________________________________________________________________
Send and receive Hotmail on your mobile device: http://mobile.msn.com
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]