2 * Copyright (C) 1996 Lorens Younes
4 * Permission is hereby granted, free of charge, to any person obtaining a copy
5 * of this software and associated documentation files (the "Software"), to
6 * deal in the Software without restriction, including without limitation the
7 * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
8 * sell copies of the Software, and to permit persons to whom the Software is
9 * furnished to do so, subject to the following conditions:
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * Lorens Younes BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
18 * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21 * Except as contained in this notice, the name of Lorens Younes shall not be
22 * used in advertising or otherwise to promote the sale, use or other dealings
23 * in this Software without prior written authorization from Lorens Younes.
26 /*****************************************************************************\
30 * Emulates some Xlib functionality for Amiga. *
32 * Developed by Lorens Younes (d93-hyo@nada.kth.se) 7/95 *
34 \*****************************************************************************/
40 #include <intuition/screens.h>
42 #include <proto/exec.h>
43 #include <proto/graphics.h>
48 /* really never used */
56 typedef struct ColorMap *Colormap;
67 unsigned short red, green, blue;
70 typedef struct Screen Display;
73 #define XGrabServer(dpy) (Forbid ())
74 #define XUngrabServer(dpy) (Permit ())
76 #define XDefaultScreen(dpy) (0)
77 #define XDefaultVisual(dpy, scr) (NULL)
78 #define XDefaultColormap(dpy, scr) (dpy->ViewPort.ColorMap)
79 #define XDefaultDepth(dpy, scr) (dpy->RastPort.BitMap->Depth)
81 #define XCreateImage(dpy, vi, depth, format, offset, data, width, height, pad, bpl) \
82 (AllocXImage (width, height, depth))
83 #define XDestroyImage(img) (FreeXImage (img))
85 #define XAllocColor(dpy, cm, xc) \
86 (AllocBestPen (cm, xc, PRECISION_EXACT, True))
87 #define XFreeColors(dpy, cm, pixels, npixels, planes) \
88 (FreePens (cm, pixels, npixels))
89 #define XParseColor(dpy, cm, spec, exact_def_return) \
90 (ParseColor (spec, exact_def_return))
91 #define XQueryColor(dpy, cm, def_in_out) \
92 (QueryColor(cm, def_in_out))
93 #define XQueryColors(dpy, cm, defs_in_out, ncolors) \
94 (QueryColors(cm, defs_in_out, ncolors))
114 unsigned long pixel);
120 XColor *screen_in_out,
121 unsigned long precision,
128 unsigned long *pixels,
135 XColor *exact_def_return);