1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196
|
/* $Header: /home/yav/catty/fkiss/RCS/work.c,v 1.23 2000/09/28 07:54:00 yav Exp $
* fkiss global work
* written by yav <yav@bigfoot.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
char id_work[] = "$Id: work.c,v 1.23 2000/09/28 07:54:00 yav Exp $";
#include <X11/Xlib.h>
#include <stdio.h>
#include "config.h"
#include "headers.h"
#include "fkiss.h"
#include "version.h"
char str_fullname[] = "French-KISS!";
char str_version[] = FKISS_VERSION;
char str_author[] = "yav <yav@bigfoot.com>";
char *coptions[] = {
#ifdef __STDC__
"__STDC__",
#endif
#ifdef _POSIX_SOURCE
"_POSIX_SOURCE",
#endif
#ifdef _BSD_SOURCE
"_BSD_SOURCE",
#endif
#ifdef _GNU_SOURCE
"_GNU_SOURCE",
#endif
#ifdef __STRICT_ANSI__
"__STRICT_ANSI__",
#endif
#ifdef __GNUC__
"__GNUC__",
#endif
#ifdef __FreeBSD__
"__FreeBSD__",
#endif
#ifdef linux
"linux",
#endif
#include "coptions"
#ifdef USE_STDARG
# if USE_STDARG
"USE_STDARG",
# else
"!USE_STDARG",
# endif
#endif
#ifdef USE_VARARGS
# if USE_VARARGS
"USE_VARARGS",
# else
"!USE_VARARGS",
# endif
#endif
#ifdef USE_BSD_DIRLIB
# if USE_BSD_DIRLIB
"USE_BSD_DIRLIB",
# else
"!USE_BSD_DIRLIB",
# endif
#endif
NULL};
char kiss_magic_number[] = KISS_MAGIC_NUMBER;
int oargc;
char **oargv;
Display *dsp = NULL;
int scr;
int screen_depth;
Visual *vis = NULL;
Window rootwin;
unsigned long spx[SPX_MAX]; /* System pixel */
GC sysgc[SGC_MAX]; /* System GC */
int debug_mode = 0;
int test_mode = 0;
char *extract_dir = NULL;
char *conf_dir = NULL;
char *conf_file = NULL;
char *str_font = NULL;
char *str_font8 = NULL;
char *str_font16 = NULL;
Pixmap iconp = None;
int iconw, iconh;
Window topwin;
int topw, toph; /* topwin width, height */
XFontStruct *fsp = NULL;
XFontStruct *fsp8 = NULL;
XFontStruct *fsp16 = NULL;
int font_ascent = 11;
int font_descent = 2;
int font8_ascent = 16;
int font8_descent = 0;
int font16_ascent = 16;
int font16_descent = 0;
Window viewwin;
int vieww, viewh;
Window mnwin;
int mnx = 0;
int mny;
int mnw;
int mnh = 24;
int mnbw = 1; /* menu bar window border width */
int setcnt = 0; /* set count */
int palcnt = 0; /* palette group count */
Bool quit_flag = False;
int cset = -1; /* current set (0...MAXSET-1) */
int cpal = -1; /* current col (0...MAXPAL-1) */
char *str_geometry = "";
int imgw0 = KISS_WIDTH_DEFAULT;
int imgh0 = KISS_HEIGHT_DEFAULT;
int imgx, imgy, imgw, imgh;
int imgbw = 1; /* image window border width */
int scrdx, scrdy; /* imgx, imgy add value */
int celcnt;
int objcnt; /* object mark max value */
int objcnt2; /* effective object count */
int motion_compress = 1; /* 0:trace smooth 1:compress pointer motion */
unsigned char hatch_ptrn[] = { /* 8x8 cross hatch pattern */
0xaa, 0x55, 0xaa, 0x55, 0xaa, 0x55, 0xaa, 0x55};
int arcfilecnt = 0; /* archive file count */
char **arcfilelist = NULL; /* archive filename pointer */
int verbose_mode = 1; /* bit0:warning bit1:message */
int sound_mode = 1; /* 0:no use 1:internal 2:external */
char active_set[MAXSET]; /* 0:no use 1:active */
int border_color = -1; /* KISS border area color */
int max_fix = 0;
CELL *cell = NULL; /* cell data structures list */
OBJECT *object = NULL;
int colorfilecnt; /* color file count described in cnf */
COLOR *kcflist = NULL; /* [colorfilecnt] */
SETINFO kset[MAXSET]; /* set color and object positions */
Colormap cmap; /* default colormap */
int gray_mode = 0; /* 0:Color 1:GrayScale 2:1plane-mono */
int colcnt = 0; /* loaded color count */
XColor *xcol[MAXPAL];
KISSCOLOR *kcol[MAXPAL];
short *colindex = NULL; /* [loaded_colfcnt] */
char *str_curs_fore = NULL; /* cursor fore color */
char *str_curs_back = NULL; /* cursor back color */
int cursor_mode = 3; /* cursor font control mode
* bit0:hand
* bit1:grip
*/
int event_mode = 1; /* != 0 Event extension enable */
Bool event_detect; /* True: Found event extension in cnf */
int sleep_tick = 16; /* 16.666...ms = 1/60 sec. */
int private_color_mode = 0; /* != 0 use private color cells */
int private_colormap_mode = 1; /* == 0 disable to use private color map */
char infostr0[256] = "Pointed: ";
char infostr[256] = "(None)";
int cnf_comment_cnt; /* number of hold comment strings */
char **cnf_comment = NULL; /* comment strings holding buffer list */
int coding_type = CODING_UNKNOWN; /* cnf comment Kanji coding system */
int objpos_first_align = 0; /* adjust object position by first set value */
/* now, under construction */
int oldcnf_comaptible = 0; /* Old style single line set info. */
char *hes_keyword = "open sesame";
Window infowin;
int evn = 0; /* registrated event number (<= MAXEVENT) */
int enable_event_shell = 0; /* != 0 enable to execute event shell */
char *evid = ";@EventHandler"; /* event extension identifier */
int randseed = 0; /* seed for pseudo-random numbers */
char *str_sound_cache_limit = NULL;
long sound_cache_limit = 256*1024L; /* sound cache buffer limit */
int wkiss_bug_emulation = 0; /* event extension DOS filename */
int transparency_mode = 1; /* 0:none 1:static 2:realtime */
Window comwin; /* comment window */
int combw = 1; /* comment window border width (pixel) */
int comment_mode = 2; /* comment mode
* 0: None
* 1: One cel
* 2: All cel
*/
int comment_linenum = 0; /* 0:without line# 1:with line# */
int auto_adjust = 4; /* Auto adjust pixel */
/* End of file */
|