# Include <GTK/GTK. h>
# Include <stdlib. h>
Int main (INT argc, char * argv [])
{
Gtkwidget * window, * Fix;
Gdkpixbuf * pixbuf = NULL;
Gdkpixmap * pixmap = NULL;
Gtkstyle * style;
// Gtkwidget * fixed;
Gtk_init (& argc, & argv );
Window = gtk_window_new (gtk_window_toplevel );
Gtk_signal_connect (gtk_object (window), "Destroy", gtk_signal_func (gtk_main_quit), null );
// Fixed = gtk_fixed_new ();
// Gtk_fixed_set_has_window (gtk_fixed (fixed), true );
// Gtk_container_add (gtk_container (window), fixed );
Gtk_window_set_default_size (gtk_window (window), 100,200 );
// Gtk_widget_set_app_paintable (window, true );
Pixbuf = gdk_pixbuf_new_from_file ("./tvbutton.png", null); // load the file to the cache
Pixmap = gdk_pixmap_new (window-> window, gdk_pixbuf_get_width (pixbuf), gdk_pixbuf_get_height (pixbuf),-1); // set the display area of the image
Gtk_widget_show_all (window );
Gdk_pixbuf_render_to_drawable (pixbuf, pixmap,
Window-> style-> fg_gc [gtk_state_normal],
0, 0, 0,
Gdk_pixbuf_get_width (pixbuf ),
Gdk_pixbuf_get_height (pixbuf ),
Gdk_rgb_dither_normal, 0, 0); // submit the image to the region. Set the last four or five to-1.
G_object_unref (pixbuf );
/**/
/* Gdk_draw_pixbuf (pixmap, window-> style-> bg_gc [gtk_state_normal],
Pixbuf, 0, 0, 0,-1,-1, gdk_rgb_dither_normal, 0, 0 );*/
/* Gdk_pixbuf_render_pixmap_and_mask (pixbuf, & pixmap, null, 0 );
Style = gtk_style_copy (window-> style );
If (style-> bg_pixmap [gtk_state_normal])
G_object_unref (style-> bg_pixmap [gtk_state_normal]);
Style-> bg_pixmap [gtk_state_normal] = g_object_ref (pixmap );
Style-> bg_pixmap [gtk_state_active] = g_object_ref (pixmap );
Style-> bg_pixmap [gtk_state_prelight] = g_object_ref (pixmap );
Style-> bg_pixmap [gtk_state_selected] = g_object_ref (pixmap );
Style-> bg_pixmap [gtk_state_insensitive] = g_object_ref (pixmap );
Gtk_widget_set_style (window, style );
G_object_unref (style );*/
Gdk_window_set_back_pixmap (window-> window, pixmap, false );
// Gdk_window_clear (window-> window );
/* Fix = gtk_fixed_new ();
Gtk_container_add (gtk_container (window), fix );
Set_widget_bg ("bg1.jpg", fix );
Gtk_widget_show (fix );*/
Gtk_main ();
Return 0;
}