open-axiom repository from github
/*1Copyright (C) 1991-2002, The Numerical ALgorithms Group Ltd.2All rights reserved.3Copyright (C) 2007-2008, Gabriel Dos Reis.4All rights reserved.56Redistribution and use in source and binary forms, with or without7modification, are permitted provided that the following conditions are8met:910- Redistributions of source code must retain the above copyright11notice, this list of conditions and the following disclaimer.1213- Redistributions in binary form must reproduce the above copyright14notice, this list of conditions and the following disclaimer in15the documentation and/or other materials provided with the16distribution.1718- Neither the name of The Numerical ALgorithms Group Ltd. nor the19names of its contributors may be used to endorse or promote products20derived from this software without specific prior written permission.2122THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS23IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED24TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A25PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER26OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,27EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,28PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR29PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF30LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING31NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS32SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.33*/343536/*37to be included in control.c for drawing the colormap and38process.c for getting the mouse input39*/4041#define controlMASK (ButtonPressMask + ButtonReleaseMask + ExposureMask)42#define potMASK (ButtonPressMask + ButtonReleaseMask + ButtonMotionMask + LeaveWindowMask)43#define buttonMASK (ButtonPressMask + ButtonReleaseMask + ButtonMotionMask + LeaveWindowMask)44#define colorMASK (ButtonPressMask + ButtonReleaseMask + ButtonMotionMask + LeaveWindowMask)454647#define mouseWait 5048/* make mouse grab for stationary mouse on a potentiometer slower */4950#define controlCreateMASK CWBackPixel | CWBorderPixel | CWEventMask |CWCursor |CWColormap | CWOverrideRedirect51#define buttonCreateMASK CWEventMask52#define messageCreateMASK 053#define colormapCreateMASK CWEventMask5455#define controlWidth 30056#define controlHeight 40057#define quitWidth 6358#define quitHeight 10759#define saveWidth 6360#define saveHeight 10761#define borderWidth 2262#define borderHeight 45636465#define controlCursorForeground monoColor(4)66#define controlCursorBackground monoColor(54)67#define controlTitleColor monoColor(36)68#define controlPotHeaderColor monoColor(52)69#define controlColorColor monoColor(13)70#define controlColorSignColor monoColor(22)7172#define headerHeight headerFont->max_bounds.ascent73#define controlMessageHeight globalFont->max_bounds.ascent +globalFont->max_bounds.descent+47475#define potA 25 /* y coordinate of line dividing76potentiometers from stuff above it */77#define potB 173 /* y coordinate of line dividing78potentiometers from title */7980#define cmapA 233 /* y coordinate of line dividing81colormap from stuff above it */8283#define butA ((cp->buttonQueue[render]).buttonY - 5)8485#define closeL ((cp->buttonQueue[closeAll]).buttonX - 5)86#define closeA ((cp->buttonQueue[closeAll]).buttonY - 5)8788#define controlMessageY 18189#define controlMessageColor monoColor(68)9091#define offColor 1392#define onColor 9893#define modeColor 449495#define colormapX 2196#define colormapY 24097#define colormapW 29098#define colormapH 4899#define colorWidth 8100#define colorHeight 8101#define colorOffset 3102#define colorOffsetX 24103#define colorOffsetY 16104#define colorPointer 16105106107