Fix some minor issues and re-enable building of DE, ES, FR, and IT locale data (help...
[oweals/cde.git] / cde / programs / dtstyle / ColorMain.h
1 /*
2  * CDE - Common Desktop Environment
3  *
4  * Copyright (c) 1993-2012, The Open Group. All rights reserved.
5  *
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)
10  * any later version.
11  *
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
16  * details.
17  *
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
22  */
23 /* $XConsortium: ColorMain.h /main/5 1995/10/30 13:08:51 rswiston $ */
24 /************************************<+>*************************************
25  ****************************************************************************
26  **
27  **   File:        ColorMain.h
28  **
29  **   Project:     DT 3.0
30  **
31  **  This file contains function definitions for the corresponding .c
32  **  file
33  **
34  **
35  **  (c) Copyright Hewlett-Packard Company, 1990.  
36  **
37  **
38  **
39  ****************************************************************************
40  ************************************<+>*************************************/
41 #ifndef _colormain_h
42 #define _colormain_h
43
44 #include <Xm/ColorObjP.h>
45
46 /*  #defines  */
47 #define PALETTE_SUFFIX       ".dp"
48
49 /* defines for foreground colors */
50 #define DYNAMIC    0
51 #define BLACK      1
52 #define WHITE      2
53
54 /* selections */
55 #define GET_TYPE_MONITOR         1
56 #define GET_PALETTE_NAME         2
57 #define GET_UPDATE               3
58
59
60 /* typedef statements */
61
62 /* ColorSet data structure */
63
64 typedef struct {
65     XColor fg;
66     XColor bg;
67     XColor ts;
68     XColor bs;
69     XColor sc;
70 } ColorSet;
71
72
73 /*  Palette info */
74
75 typedef struct _palette {
76       char *name;
77       char *desc;
78       char *directory;
79       int item_position;
80       int num_of_colors;
81       ColorSet color[XmCO_MAX_NUM_COLORS];
82       struct _palette *next;
83       short active;
84       short inactive;
85       short primary;
86       short secondary;
87 } palette;
88
89
90 /* External variable definitions */
91
92 /*  Palettes exist in a linked list  */
93
94 extern palette *pHeadPalette;
95 extern palette *pCurrentPalette;
96 extern palette *pOldPalette;
97
98 /* atoms used in selection communication with color server */
99
100 extern Atom     XA_CUSTOMIZE;
101 extern Atom     XA_PALETTE_NAME;
102 extern Atom     XA_TYPE_MONITOR;
103 extern Atom     XA_UPDATE;
104
105 extern Widget   modifyColorButton;
106 extern int      TypeOfMonitor;
107 extern Bool     UsePixmaps;
108 extern int      FgColor;
109 extern Widget   paletteList;
110 extern char     *defaultName;
111 extern Bool     WaitSelection;
112
113 extern int NumOfPalettes;
114 extern XColor saved_color[2];
115
116
117 /* External Interface */
118
119
120 extern void _DtTurnOnHourGlass( Widget );
121 extern void _DtTurnOffHourGlass( Widget );
122 extern void Customize( Widget shell) ;
123 extern void CreatePaletteButtons( Widget parent) ;
124 extern Boolean InitializePaletteList( 
125                         Widget shell,
126                         Widget list,
127 #if NeedWidePrototypes
128                         int startup) ;
129 #else
130                         Boolean startup) ;
131 #endif
132 extern void DeletePaletteFromLinkList( Widget list) ;
133 extern void CopyPixel( ColorSet srcPixels[XmCO_MAX_NUM_COLORS],
134                        ColorSet dstPixels[XmCO_MAX_NUM_COLORS],
135                        int numOfColors) ;
136 extern void SaveOrgPalette( void ) ;
137 extern void RestoreOrgPalette( void ) ;
138 extern void UpdateDefaultPalette( void ) ;
139 extern void show_selection( 
140                         Widget w,
141                         XtPointer client_data,
142                         Atom *selection,
143                         Atom *type,
144                         XtPointer value,
145                         unsigned long *length,
146                         int *format) ;
147 extern void restoreColor( Widget shell, XrmDatabase db) ;
148 extern void saveColor( int fd) ;
149 extern void SameName( 
150                         Widget w,
151                         struct _palette *tmpPalette,
152                         char *name) ;
153 extern void InitializeAtoms( void ) ;
154 extern void GetDefaultPal( Widget shell) ;
155 extern void CreateDialogBoxD( Widget parent) ;
156 extern void AddToDialogBox( void ) ;
157 extern void CreateTopColor1( void ) ;
158 extern void CreateTopColor2( void ) ;
159 extern void CreateBottomColor( void ) ;
160
161
162 #endif /* _colormain_h */
163 /* DON'T ADD ANYTHING AFTER THIS #endif */