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: ColorMain.h /main/5 1995/10/30 13:08:51 rswiston $ */
24 /************************************<+>*************************************
25 ****************************************************************************
31 ** This file contains function definitions for the corresponding .c
35 ** (c) Copyright Hewlett-Packard Company, 1990.
39 ****************************************************************************
40 ************************************<+>*************************************/
44 #include <Xm/ColorObjP.h>
47 #define PALETTE_SUFFIX ".dp"
49 /* defines for foreground colors */
55 #define GET_TYPE_MONITOR 1
56 #define GET_PALETTE_NAME 2
60 /* typedef statements */
62 /* ColorSet data structure */
75 typedef struct _palette {
81 ColorSet color[XmCO_MAX_NUM_COLORS];
82 struct _palette *next;
90 /* External variable definitions */
92 /* Palettes exist in a linked list */
94 extern palette *pHeadPalette;
95 extern palette *pCurrentPalette;
96 extern palette *pOldPalette;
98 /* atoms used in selection communication with color server */
100 extern Atom XA_CUSTOMIZE;
101 extern Atom XA_PALETTE_NAME;
102 extern Atom XA_TYPE_MONITOR;
103 extern Atom XA_UPDATE;
105 extern Widget modifyColorButton;
106 extern int TypeOfMonitor;
107 extern Bool UsePixmaps;
109 extern Widget paletteList;
110 extern char *defaultName;
111 extern Bool WaitSelection;
113 extern int NumOfPalettes;
114 extern XColor saved_color[2];
117 /* External Interface */
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(
127 #if NeedWidePrototypes
132 extern void DeletePaletteFromLinkList( Widget list) ;
133 extern void CopyPixel( ColorSet srcPixels[XmCO_MAX_NUM_COLORS],
134 ColorSet dstPixels[XmCO_MAX_NUM_COLORS],
136 extern void SaveOrgPalette( void ) ;
137 extern void RestoreOrgPalette( void ) ;
138 extern void UpdateDefaultPalette( void ) ;
139 extern void show_selection(
141 XtPointer client_data,
145 unsigned long *length,
147 extern void restoreColor( Widget shell, XrmDatabase db) ;
148 extern void saveColor( int fd) ;
149 extern void SameName(
151 struct _palette *tmpPalette,
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 ) ;
162 #endif /* _colormain_h */
163 /* DON'T ADD ANYTHING AFTER THIS #endif */