-Implemented SetConfigDir API call for glide64
[Glide64.git] / support.c
blob667391075e7a7dbfa6da107ca5af86e61517de2d
1 /***************************************************************************
2 support.c - description
3 -------------------
4 begin : Fri Nov 8 2002
5 copyright : (C) 2002 by blight
6 email : blight@Ashitaka
7 ***************************************************************************/
9 /***************************************************************************
10 * *
11 * This program is free software; you can redistribute it and/or modify *
12 * it under the terms of the GNU General Public License as published by *
13 * the Free Software Foundation; either version 2 of the License, or *
14 * (at your option) any later version. *
15 * *
16 ***************************************************************************/
18 #include "support.h"
20 #include <gtk/gtk.h>
22 // function to create pixmaps from buffers
23 GtkWidget *
24 create_pixmap_d (GtkWidget *widget,
25 gchar **data)
27 GdkColormap *colormap;
28 GdkPixmap *gdkpixmap;
29 GdkBitmap *mask;
30 GtkWidget *pixmap;
32 colormap = gtk_widget_get_colormap (widget);
33 gdkpixmap = gdk_pixmap_colormap_create_from_xpm_d (NULL, colormap, &mask,
34 NULL, data);
35 pixmap = gtk_pixmap_new (gdkpixmap, mask);
36 gdk_pixmap_unref (gdkpixmap);
37 gdk_bitmap_unref (mask);
39 return pixmap;