2
// ----------------------------------------------
4
// $Date: 2003/06/23 14:47:23 $
5
// $Revision: 1.1.1.1 $
6
// $Source: /cvsroot/miwm/miwm/miwm/mipix.cc,v $
7
// $Id: mipix.cc,v 1.1.1.1 2003/06/23 14:47:23 bwise837 Exp $
8
// $RCSfile: mipix.cc,v $
9
// ----------------------------------------------
10
// Copyright by Ben Paul Wise.
11
// -------------------------------------------
12
// This program is free software; you can redistribute it and/or modify
13
// it under the terms of the GNU General Public License as published by
14
// the Free Software Foundation; either version 2 of the License, or
15
// (at your option) any later version.
17
// This program is distributed in the hope that it will be useful,
18
// but WITHOUT ANY WARRANTY; without even the implied warranty of
19
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20
// GNU General Public License for more details.
22
// You should have received a copy of the GNU General Public License
23
// along with this program; if not, write to the Free Software
24
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
25
// ----------------------------------------------
30
// ----------------------------------------------
32
// returns a Pixmap, loaded from the given data, relative to the
33
// display of the given Widget. The closest colours are used. Exit
34
// is called given an error
35
void loadPixmap(char **dname, Pixmap *xpm) {
41
attr.valuemask = XpmReturnPixels | XpmCloseness;
42
attr.closeness = 20000;
43
status = XpmCreatePixmapFromData(dpy, root,
44
dname,xpm,&mask,&attr);
45
if (status != XpmSuccess)
47
fprintf(stderr,"Pixmap error: %s\n",XpmGetErrorString(status));
55
// ----------------------------------------------
57
// ----------------------------------------------