UNIXworkcode

1 /******************************************************************************* 2 * * 3 * colorprofile.h -- Nirvana Editor Text Diplay Header File * 4 * * 5 * Copyright 2003 The NEdit Developers * 6 * * 7 * This is free software; you can redistribute it and/or modify it under the * 8 * terms of the GNU General Public License as published by the Free Software * 9 * Foundation; either version 2 of the License, or (at your option) any later * 10 * version. In addition, you may distribute versions of this program linked to * 11 * Motif or Open Motif. See README for details. * 12 * * 13 * This software is distributed in the hope that it will be useful, but WITHOUT * 14 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * 15 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for * 16 * more details. * 17 * * 18 * You should have received a copy of the GNU General Public License along with * 19 * software; if not, write to the Free Software Foundation, Inc., 59 Temple * 20 * Place, Suite 330, Boston, MA 02111-1307 USA * 21 * * 22 * Nirvana Text Editor * 23 * July 31, 2001 * 24 * * 25 * colorprofile.h: * 26 * Author: Olaf Wintermann * 27 * * 28 *******************************************************************************/ 29 30 #ifndef XNEDIT_COLORPROFILE_H 31 #define XNEDIT_COLORPROFILE_H 32 33 #include <X11/Xft/Xft.h> 34 #include <X11/Intrinsic.h> 35 #include <X11/Xlib.h> 36 37 typedef struct { 38 char *name; 39 char *color; 40 char *bgColor; 41 int font; 42 } highlightStyleRec; 43 44 typedef struct _ColorProfile { 45 char *name; 46 47 char *textFg; 48 char *textBg; 49 char *selectFg; 50 char *selectBg; 51 char *hiliteFg; 52 char *hiliteBg; 53 char *lineNoFg; 54 char *lineNoBg; 55 char *cursorFg; 56 char *lineHiBg; 57 char *ansiColorList; 58 char *rainbowColorList; 59 60 Boolean colorsLoaded; 61 Boolean stylesLoaded; 62 Boolean resDBLoaded; 63 64 XftColor textFgColor; 65 XftColor textBgColor; 66 XftColor selectFgColor; 67 XftColor selectBgColor; 68 XftColor hiliteFgColor; 69 XftColor hiliteBgColor; 70 XftColor lineNoFgColor; 71 XftColor lineNoBgColor; 72 XftColor cursorFgColor; 73 XftColor lineHiBgColor; 74 75 XftColor *ansiColors; 76 size_t numAnsiColors; 77 XftColor *rainbowColors; 78 size_t numRainbowColors; 79 80 int styleType; // 0: default styles points to default text styles 81 // 1: lightened lightened default colors (styles allocated) 82 // 2: custom custom color profile text styles (styles allocated) 83 highlightStyleRec **styles; 84 size_t numStyles; 85 size_t stylesAlloc; 86 87 char *resourceFile; 88 int windowThemeVariant; // 0: undefined, 1: light, 2: dark 89 XrmDatabase db; 90 91 Boolean modified; 92 Boolean removed; 93 struct _ColorProfile *orig; 94 95 struct _ColorProfile *next; 96 } ColorProfile; 97 98 #endif /* XNEDIT_COLORPROFILE_H */ 99