cmcutil.h revision 919
98N/A/*
98N/A* Copyright 1990 Sun Microsystems, Inc. All rights reserved.
380N/A* Use is subject to license terms.
98N/A*
98N/A* Permission is hereby granted, free of charge, to any person obtaining a
98N/A* copy of this software and associated documentation files (the "Software"),
98N/A* to deal in the Software without restriction, including without limitation
98N/A* the rights to use, copy, modify, merge, publish, distribute, sublicense,
98N/A* and/or sell copies of the Software, and to permit persons to whom the
98N/A* Software is furnished to do so, subject to the following conditions:
98N/A*
98N/A* The above copyright notice and this permission notice (including the next
98N/A* paragraph) shall be included in all copies or substantial portions of the
98N/A* Software.
98N/A*
98N/A* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
98N/A* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
98N/A* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
98N/A* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
98N/A* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
98N/A* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
98N/A* DEALINGS IN THE SOFTWARE.
98N/A*
98N/A*/
98N/A
98N/A
98N/A/*
98N/A** Definitions shared between several Workspace Color operations
98N/A*/
98N/A
493N/A#ifndef CMCUTIL_INCLUDE
98N/A#define CMCUTIL_INCLUDE
98N/A
98N/A/*
156N/A** Symbols
98N/A*/
98N/A
98N/A#define COUNT_PROP_NAME "XA_COMPACTED_COLORS_COUNT"
98N/A#define RETAIN_PROP_NAME "XA_COMPACTED_COLORS_XID"
98N/A
156N/A/*
98N/A** Note: if you change these, you must also change it in
98N/A** server/cscript/cs_cmap.c.
156N/A*/
98N/A#define COMPACTED_COLORS_FILE ".owcolors"
98N/A#define CMC_MAGIC 0xb0f0
98N/A#define CMC_VERSION 0
98N/A
98N/A
98N/A
98N/A/*
98N/A** Macros
98N/A*/
98N/A
98N/A#define WHITE(c)\
98N/A ((c)->red == (c)->green && \
98N/A (c)->red == (c)->blue && \
98N/A (c)->red == 0xffff)
98N/A
98N/A#define BLACK(c)\
98N/A ((c)->red == (c)->green && \
98N/A (c)->red == (c)->blue && \
159N/A (c)->red == 0x0)
98N/A
98N/A/*
98N/A** Types
98N/A*/
98N/A
98N/Atypedef unsigned long Pixel;
98N/A
98N/A
98N/A/*
98N/A** External Functions
199N/A*/
98N/A
98N/Aextern void setprogram();
98N/Aextern void fatal_error();
98N/Aextern Display *open_display();
257N/Aextern int dynamic_indexed_default_visual();
98N/Aextern char *comp_colors_filename();
98N/Aextern int cmc_write();
98N/Aextern int cmc_read();
98N/Aextern void cmc_header_write();
98N/Aextern void cmc_header_test();
98N/Aextern void resource_preserve();
98N/Aextern void resource_discard();
98N/Aextern void prop_update();
98N/A
98N/A#endif !CMCUTIL_INCLUDE
98N/A