Mercurial > dwindows
comparison gtk3/dw.c @ 1327:e4ef8d86dfc4
Added support for GdkPixbuf inline data in GTK.
author | bsmith@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Thu, 10 Nov 2011 03:46:01 +0000 |
parents | 3f1ac800bf65 |
children | c63069148357 |
comparison
equal
deleted
inserted
replaced
1326:03f0a57c9e87 | 1327:e4ef8d86dfc4 |
---|---|
1729 } | 1729 } |
1730 } | 1730 } |
1731 | 1731 |
1732 if(data) | 1732 if(data) |
1733 { | 1733 { |
1734 GdkPixbuf *icon_pixbuf = gdk_pixbuf_new_from_xpm_data((const char **)data); | 1734 GdkPixbuf *icon_pixbuf; |
1735 | |
1736 if(data[0] == 'G' && data[1] == 'd' && data[2] == 'k' && data[3] == 'P') | |
1737 icon_pixbuf = gdk_pixbuf_new_from_inline(-1, (const guint8 *)data, FALSE, NULL); | |
1738 else | |
1739 icon_pixbuf = gdk_pixbuf_new_from_xpm_data((const char **)data); | |
1735 | 1740 |
1736 if(userwidth) | 1741 if(userwidth) |
1737 *userwidth = gdk_pixbuf_get_width(icon_pixbuf); | 1742 *userwidth = gdk_pixbuf_get_width(icon_pixbuf); |
1738 if(userheight) | 1743 if(userheight) |
1739 *userheight = gdk_pixbuf_get_height(icon_pixbuf); | 1744 *userheight = gdk_pixbuf_get_height(icon_pixbuf); |