~ubuntu-branches/ubuntu/utopic/gridengine/utopic

« back to all changes in this revision

Viewing changes to source/3rdparty/qmon/Xmt310/Xmt/Xpm.h

  • Committer: Bazaar Package Importer
  • Author(s): Mark Hymers
  • Date: 2008-06-25 22:36:13 UTC
  • Revision ID: james.westby@ubuntu.com-20080625223613-tvd9xlhuoct9kyhm
Tags: upstream-6.2~beta2
ImportĀ upstreamĀ versionĀ 6.2~beta2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* 
 
2
 * Motif Tools Library, Version 3.1
 
3
 * $Id$
 
4
 * 
 
5
 * Written by David Flanagan.
 
6
 * Copyright (c) 1992-2001 by David Flanagan.
 
7
 * All Rights Reserved.  See the file COPYRIGHT for details.
 
8
 * This is open source software.  See the file LICENSE for details.
 
9
 * There is no warranty for this software.  See NO_WARRANTY for details.
 
10
 *
 
11
 * $Log$
 
12
 * Revision 1.1.1.1  2001/07/18 11:06:03  root
 
13
 * Initial checkin.
 
14
 *
 
15
 * Revision 1.2  2001/06/12 16:25:28  andre
 
16
 * *** empty log message ***
 
17
 *
 
18
 *
 
19
 */
 
20
 
 
21
/*
 
22
 * This file is derived in part from the XPM 3.0 distribution by
 
23
 * Arnaud Le Hors.  See the file COPYRIGHT for the Groupe Bull copyright.
 
24
 */
 
25
 
 
26
#ifndef _XmtXpm_h
 
27
#define _XmtXpm_h
 
28
 
 
29
#include <Xmt/Color.h>
 
30
 
 
31
/*
 
32
 * the visual types we recognize colors for.
 
33
 */
 
34
typedef enum {
 
35
    Mono=0, Gray4=1, Gray=2, Color=3
 
36
} XmtXpmVisualClass;
 
37
 
 
38
#define NVISUALS 4
 
39
 
 
40
typedef struct {
 
41
    String symbolic_name;    /* a symbolic name for this color, quarkified */
 
42
    String default_colors[NVISUALS];  /* a color string for each Visual type */
 
43
} XmtXpmColor, *XmtXpmColorTable;
 
44
 
 
45
/*
 
46
 * structure containing data related to an Xpm pixmap.
 
47
 * Each pixel of the image is stored as a byte in the data field.
 
48
 * The values in this char array are indexes into the color table.
 
49
 * We use chars to conserve space, which means that images cannot
 
50
 * contain more than 256 colors.  Since this package is intended for
 
51
 * use for UI icons and the like, this is not an unreasonable
 
52
 * restriction.
 
53
 */
 
54
typedef struct {
 
55
    unsigned short width;
 
56
    unsigned short  height;
 
57
    XPoint hotspot;
 
58
    Boolean has_hotspot;
 
59
    unsigned short ncolors;
 
60
    XmtXpmColorTable color_table;
 
61
    unsigned char *data;
 
62
} XmtImage;
 
63
 
 
64
_XFUNCPROTOBEGIN
 
65
#if NeedFunctionPrototypes
 
66
extern XmtImage *XmtParseXpmFile(StringConst);
 
67
extern XmtImage *XmtParseXpmData(String *);
 
68
extern XmtImage *XmtParseXpmString(StringConst);
 
69
extern void XmtFreeXmtImage(XmtImage *);
 
70
extern Boolean XmtCreateXImageFromXmtImage(Widget, Visual *, Colormap,
 
71
                                    unsigned int, XmtColorTable, XmtImage *,
 
72
                                    XImage **, XImage **, Pixel **, int *);
 
73
extern Boolean XmtCreatePixmapFromXmtImage(Widget, Drawable, Visual *,
 
74
                                    Colormap, unsigned int, XmtColorTable,
 
75
                                    XmtImage *, Pixmap *, Pixmap *,
 
76
                                    Pixel **, int *);
 
77
#else
 
78
extern XmtImage *XmtParseXpmFile();
 
79
extern XmtImage *XmtParseXpmData();
 
80
extern XmtImage *XmtParseXpmString();
 
81
extern void XmtFreeXmtImage();
 
82
extern Boolean XmtCreateXImageFromXmtImage();
 
83
extern Boolean XmtCreatePixmapFromXmtImage();
 
84
#endif
 
85
_XFUNCPROTOEND
 
86
 
 
87
#endif  /* _XmtXpm_h */