pulseaudio: fix dependencies for openssl-3
[oi-userland.git] / components / x11 / cmap_compact / src / cmcutil.h
blob7057410167dd7b9dd213a32a94b85ba39210a7f0
1 /*
2 * Copyright (c) 1990, 2015, Oracle and/or its affiliates. All rights reserved.
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
11 * The above copyright notice and this permission notice (including the next
12 * paragraph) shall be included in all copies or substantial portions of the
13 * Software.
15 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
18 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
20 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
21 * DEALINGS IN THE SOFTWARE.
27 ** Definitions shared between several Workspace Color operations
30 #ifndef CMCUTIL_INCLUDE
31 #define CMCUTIL_INCLUDE
33 #include <stdio.h>
36 ** Symbols
39 #define COUNT_PROP_NAME "XA_COMPACTED_COLORS_COUNT"
40 #define RETAIN_PROP_NAME "XA_COMPACTED_COLORS_XID"
42 /*
43 ** Note: if you change these, you must also change it in
44 ** server/cscript/cs_cmap.c.
46 #define COMPACTED_COLORS_FILE ".owcolors"
47 #define CMC_MAGIC 0xb0f0
48 #define CMC_VERSION 0
53 ** Macros
56 #define WHITE(c)\
57 ((c)->red == (c)->green && \
58 (c)->red == (c)->blue && \
59 (c)->red == 0xffff)
61 #define BLACK(c)\
62 ((c)->red == (c)->green && \
63 (c)->red == (c)->blue && \
64 (c)->red == 0x0)
67 ** Types
70 typedef unsigned long Pixel;
74 ** External Functions
77 extern void fatal_error(const char *format, ...)
78 _X_ATTRIBUTE_PRINTF(1,2) _X_NORETURN;
79 extern void warning(const char *format, ...)
80 _X_ATTRIBUTE_PRINTF(1,2);
81 extern Display *open_display(const char *dpyname);
82 extern int dynamic_indexed_default_visual(Screen *screen);
83 extern const char * comp_colors_filename(const char *);
84 extern int cmc_write(FILE *f, int scr_num,
85 int ncolors, XColor *colors);
86 extern int cmc_read(FILE *f, int *scr_num,
87 int *ncolors, XColor **colors);
88 extern void cmc_header_write(FILE *f);
89 extern void cmc_header_test(FILE *f);
90 extern void resource_preserve(Display *dpy);
91 extern void resource_discard(Display *dpy);
92 extern void prop_update(Display *dpy, Window w, const char *name,
93 Atom type, int format, int data, int nelem);
95 #endif /* !CMCUTIL_INCLUDE */