Http://hi.baidu.com/netadabiao/blog/item/799d2cd9abd7412e11df9b37.html
/* Example start-one-wheeled trolley, wheelbarrow. C */
# Include <GTK/GTK. h>
/* XPM */
Staticchar * wheelbarrowfull_xpm [] = {
"4848641 ",
"Cnone ",
". C # df7dcf3cc71b ",
"XC #965875d669a6 ",
"Oc #71c671c671c6 ",
"Oc # a699a289a699 ",
& Quot; + C #965892489658 & quot ",
"@ C #8e38410330c2 ",
"# C # d75c7df769a6 ",
"$ C # f7decf3cc71b ",
"% C #96588a288e38 ",
"& C # a69992489e79 ",
"* C #8e3886178e38 ",
"= C #104008200820 ",
"-C #596510401040 ",
"; C # c71b30c230c2 ",
": C # c71b9a699658 ",
"> C #618561856185 ",
", C #20811c712081 ",
"<C #104000000000 ",
& Quot; 1C #861720812081 & quot ",
"2C # df7d4d344103 ",
"3C #79e769a671c6 ",
& Quot; 4C #861782078617 & quot ",
"5c #201733cf34103 ",
"6C #000000000000 ",
"7C #20171c711040 ",
"8C #492445144924 ",
"9C #082008200820 ",
"0C #69a618611861 ",
"QC # b6da71c65144 ",
"WC #410330c238e3 ",
"EC # cf3cbaeab6da ",
"RC #71c6451430c2 ",
"TC # efbedb6cd75c ",
"YC #28a208200820 ",
"UC #186110401040 ",
"Ic #596528a21861 ",
"PC #71c661855965 ",
"AC # a69996589658 ",
"SC #30c228a230c2 ",
"DC # befba289aeba ",
"FC #596545145144 ",
"GC #30c230c230c2 ",
"HC #8e3882078617 ",
& Quot; JC #208118612081 & quot ",
"KC #38e30c300820 ",
"LC #30c2208128a2 ",
"ZC #38e328a238e3 ",
"XC #514438e34924 ",
"HTTP #618555555965 ",
"VC #30c2208130c2 ",
"BC #38e328a230c2 ",
"NC #28a228a228a2 ",
"Mc #41032cb228a2 ",
"Mc #104010401040 ",
"NC #201738e34103 ",
"BC #28a2208128a2 ",
"VC # a699596538e3 ",
"CC #30c21c711040 ",
"ZC #30c218611040 ",
& Quot; AC #965865955965 & quot ",
"SC #618534d32081 ",
"DC #38e31c711040 ",
"FC #082000000820 ",
"",
". Xoo ",
"+ @ # $ % O &",
"* =-; #: O + ",
">,< 12 #: 34 ",
"45671 #: X3 ",
"+ 89 <02qwo ",
"E *>, 67; RO ",
"Ty> 459 @> + &&",
"$ 2u +> <ipas8 *",
"% $; = ** 3:. Xa. dfg> ",
"Oh $; ya * 3D. a8j, Xe. d1_8 + ",
"Oh $; Ka * 3D $ a8lz, xxc:. e000054 ",
"Oh $; Ko * PD $ % svbzz, sxxxxfx... & wn> ",
"Oh $ @ mo * 3dthwlsslszjzxxxxxxx3: td8m4 ",
"Oh $ @ g & * 3D $ xnlvvvlllm, mnwxxxxxxxfa.:, B *",
"Oh $ @, OD. czlllzlmmqv @ V # V @ fxxxxxxxf: % J5 &",
"Oh $ 1hd5lllslllcczrv # R #: # 2axxxxxxxxxcdwm *",
"Oxq6c. % 8 vvvllzziqqapa: MQ: xxcpcxxxxxfdc9 *",
"2R <6gde3bllzzrvi7s @ sv77a: qapxxxxxxfdcm ",
":, Q-6MN.dfmZZrrSS: # riirdsax @ af5xxxxxfevo ",
"+ A26jguxtazzzc7idiccrvvii7cmmxxxxxx % 3G ",
"* # 16jszn .. 3dzzzzrcvsa2rzrv7dmmwxxxx & en ",
"P2yfvzssxe: fczzciid7iizdidsszwwxx8e *> ",
"Oa1 <jzxwwc: $ d % ndzzzzccczcczzcmxxfd. B ",
"3206 bwxxszx % et. eaap77m77mmmf3 & eeeg *",
"@ 26mvzxnzvlbwfpdettttttttttt. C, N &",
"*; 16 = lsnwwnwgsvslbwwvccc3pcfu <O ",
"P; <69 bvwwsszslllbblllllllu <5 + ",
"Os0y6fblvvvzvzss, u = blllj = 54 ",
"C1-699Blvlllllu7k96MMMg4 ",
"* 10y8n6fjvllllb <166668 ",
"S-kg +> 666 <m <996-y6n <8 *",
"P71 = 4m69996kd8z-66698 &&",
"& I0ycm6n4ogk17, 0 <6666G ",
"N-k-<>>= 01-kuu666> ",
", 6ky & 46-10ul, 66 ,",
"Ou0 <> o66y <ulw <66 &",
"* Kk5> 66by7 = xu664 ",
"<M4466lj <mxu66o ",
"*> + 66uv, zn666 *",
"566, xxj669 ",
"4666ff666> ",
"> 966666 m ",
"Om6668 + ",
"* 4 ",
"",
""};
/* Terminate the application when calling this function (through the delete_event signal */
Voidclose_application (gtkwidget * widget,
Gdkevent * event, gpointerdata)
{
Gtk_main_quit ();
}
Intmain (intargc, char * argv [])
{
/* The Component Storage type is gtkwidget */
Gtkwidget * window, * pixmap, * fixed;
Gdkpixmap * gdk_pixmap;
Gdkbitmap * mask;
Gtkstyle * style;
Gdkgc * GC;
/* Create the main window and set the callback function for the delete_event signal to terminate the application.
* Note that there is no title bar in the main window, because we make it a pop-up window */
Gtk_init (& argc, & argv );
Window = gtk_window_new (gtk_window_popup );
Gtk_signal_connect (gtk_object (window), "delete_event ",
Gtk_signal_func (close_application), null );
Gtk_widget_show (window );
/* Create the pixmap image and pixmap component below */
Style = gtk_widget_get_default_style ();
GC = style-> black_gc;
Gdk_pixmap = gdk_pixmap_create_from_xpm_d (window-> window, & mask,
& Style-> BG [gtk_state_normal],
Wheelbarrowfull_xpm );
Pixmap = gtk_pixmap_new (gdk_pixmap, mask );
Gtk_widget_show (pixmap );
/* To display the pixmap image, place the pixmap component on the gtkfixed component */
Fixed = gtk_fixed_new ();
Gtk_widget_set_usize (fixed, 200,200 );
Gtk_fixed_put (gtk_fixed (fixed), pixmap, 0, 0 );
Gtk_container_add (gtk_container (window), fixed );
Gtk_widget_show (fixed );
/* The following function shields everything except the image itself */
Gtk_widget_shape_combine_mask (window, mask, 0, 0 );
/* Display window */
Gtk_widget_set_uposition (window, 20,400 );
Gtk_widget_show (window );
Gtk_main ();
Return (0 );
}