2 * CDE - Common Desktop Environment
4 * Copyright (c) 1993-2012, The Open Group. All rights reserved.
6 * These libraries and programs are free software; you can
7 * redistribute them and/or modify them under the terms of the GNU
8 * Lesser General Public License as published by the Free Software
9 * Foundation; either version 2 of the License, or (at your option)
12 * These libraries and programs are distributed in the hope that
13 * they will be useful, but WITHOUT ANY WARRANTY; without even the
14 * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15 * PURPOSE. See the GNU Lesser General Public License for more
18 * You should have received a copy of the GNU Lesser General Public
19 * License along with these librararies and programs; if not, write
20 * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
21 * Floor, Boston, MA 02110-1301 USA
23 /* $XConsortium: constants.h /main/3 1995/11/02 14:03:35 rswiston $ */
24 /*********************************************************************
25 * (c) Copyright 1993, 1994 Hewlett-Packard Company
26 * (c) Copyright 1993, 1994 International Business Machines Corp.
27 * (c) Copyright 1993, 1994 Sun Microsystems, Inc.
28 * (c) Copyright 1993, 1994 Unix System Labs, Inc., a subsidiary of
30 **********************************************************************/
37 #define CLASS_NAME "Dticon"
40 * This is the linked list of Help dialogs, which
41 * will be created dynamically, as needed.
44 typedef struct _helpStruct {
45 struct _helpStruct *pNext;
46 struct _helpStruct *pPrev;
58 Boolean useFileFilter;
60 } ApplicationData, *ApplicationDataPtr;
66 Dimension width, height;
67 } SessionData, *SessionDataPtr;
70 XColor xcolor; /* pixel #, red, blue, green, etc. */
71 Pixel mono; /* black or white pixel for mono */
72 Pixel newCell; /* new color cell for grab-screen */
76 int pixelTableSize; /* number of allocated table items */
77 int numItems; /* number of items in the table */
78 int lastFound; /* last lookup result, check first */
79 PixelTableItem *item; /* array of actual table entries */
82 #define PIXEL_TABLE_MONO(i) pixelTable.item[i].mono
83 #define PIXEL_TABLE_NEW_CELL(i) pixelTable.item[i].newCell
84 #define PIXEL_TABLE_INC 20 /* size to increase table by each time */
90 /* Maximum icon demensions */
91 #define MAX_ICON_WIDTH 256
92 #define MAX_ICON_HEIGHT 256
94 /* Maximum icon demensions */
97 #define min(a, b) ((a < b) ? a : b)
98 #define max(a, b) ((a > b) ? a : b)
101 #define abs(a) (((a) < 0) ? -(a) : (a))
104 #define mag(a,b) ((a-b) < 0 ? (b-a) : (a-b))
109 /* rotation direction */
114 #define READ_FLAGS (XpmColorSymbols)
115 #define WRITE_FLAGS (XpmSize|XpmHotspot|XpmCharsPerPixel|XpmInfos)
117 /* State flags for Init_Icons() */
118 #define DO_NOT_SAVE 0
121 /* Graphics Ops. tools */
133 /* Secondary Graphics Ops. */
134 #define S_WAIT_RELEASE 99
137 #define S_SCALE_1 102
138 #define S_SCALE_2 103
139 #define S_HOTSPOT 104
142 /* Interrupt flags for SELECT Ops. */
146 #define NUM_GFX_OPS 11 /* number of Graphics Ops. tools + 1*/
147 #define DEFAULT_MAG 8 /* default magnification factor */
148 #define GAMMA_CUTOFF 150 /* x-over pt. for black/white fg color */
149 #define NUM_STATICS 16 /* number of static colors */
150 #define NUM_DYNAMICS 6 /* number of dynamic colors */
151 #define NUM_PENS (NUM_STATICS+NUM_DYNAMICS)
153 /* max. points for polylines/polygons */
156 /* dialog state flag values */
166 /* Transfer_Back_Image() state flag values */
170 /* File I/O state flag values */
174 /* output file format flags */
177 #define FORMAT_NONE 2
179 /* which color block? */
180 #define STATIC_COLOR 0
181 #define DYNAMIC_COLOR 1
183 /* static color flags */
201 /* dynamic color flags */
206 #define SELECT_COLOR 104
207 #define TRANS_COLOR 105
209 /* flip orientation flags */
213 /* magnification factor flags */
223 /* command-line parameter flags */