Back to index

plt-scheme  4.2.1
Classes | Defines | Typedefs | Functions | Variables
wx_imgx.h File Reference
#include <stdio.h>
#include <math.h>
#include <ctype.h>
#include <string.h>
#include <memory.h>
#include <stdlib.h>
#include <X11/Xos.h>
#include <X11/Xlib.h>
#include <X11/Xutil.h>
#include <X11/cursorfont.h>
#include <X11/keysym.h>
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  SCRL
struct  BUTT
struct  LIST
struct  rbutt
struct  colorbox
struct  CCELL
struct  PICINFO

Defines

#define HOLD_SIG   sigblock(sigmask(SIGALRM))
#define RELEASE_SIG   sigblock(0)
#define PAUSE_SIG   sigpause(0)
#define UNCOMPRESS   "/usr/ucb/uncompress" /* for uncompressing .Z files */
#define PROGNAME   "xv" /* used in resource database */
#define DEFINFOGEOM   "-10+10" /* default position of info window */
#define DEFDIRGEOM   "-10-10" /* default position of directory window */
#define DEFCTRLGEOM   "+400+400" /* default position of ctrl window */
#define DEFGAMGEOM   "+10-10" /* default position of gamma window */
#define INFOWIDE   500 /* (fixed) size of info window */
#define INFOHIGH   250
#define CTRLWIDE   440 /* (fixed) size of control window */
#define CTRLHIGH   295
#define DIRWIDE   300 /* (fixed) size of directory window */
#define DIRHIGH   420
#define GAMWIDE   366 /* (fixed) size of Gamma window */
#define GAMHIGH   356
#define MAXNAMES   1024 /* max # of files (more than this? Get REAL!) */
#define NISTR   9 /* number of ISTRs */
#define ISTR_INFO   0
#define ISTR_WARNING   1
#define ISTR_FILENAME   2
#define ISTR_FORMAT   3
#define ISTR_RES   4
#define ISTR_CROP   5
#define ISTR_EXPAND   6
#define ISTR_COLOR   7
#define ISTR_COLOR2   8
#define INF_NONE   0 /* empty box */
#define INF_STR   1 /* just ISTR_INFO */
#define INF_PART   2 /* filename, format, size and infostr */
#define INF_FULL   3 /* INF_PART + clipping, expansion, colorinfo */
#define NBUTTS   20
#define BNEXT   0
#define BPREV   1
#define BCROP   2
#define BUNCROP   3
#define BNORM   4
#define BMAX   5
#define BUP2   6
#define BDN2   7
#define BUP10   8
#define BDN10   9
#define BQUIT   10
#define B4BY3   11
#define BSAVE   12
#define BROTL   13
#define BINFO   14
#define BGAMMA   15
#define BASPECT   16
#define BROTR   17
#define BMAXPECT   18
#define BACROP   19
#define S_NBUTTS   4
#define S_BOPEN   0
#define S_BSAVE   1
#define S_BCANC   2
#define S_BQUIT   3
#define G_NBUTTS   17
#define G_BAPPLY   0
#define G_BNOGAM   1
#define G_BRESET   2
#define G_BDEF   3
#define G_BGTYPE   4
#define G_BCLOSE   5
#define G_BUP_BR   6
#define G_BDN_BR   7
#define G_BUP_CN   8
#define G_BDN_CN   9
#define G_BHSVRGB   10
#define G_B1   11
#define G_B2   12
#define G_B3   13
#define G_B4   14
#define G_BSET   15
#define G_BUNDO   16
#define C_FIFO   'f' /* FIFO special file */
#define C_CHR   'c' /* character special file */
#define C_DIR   'd' /* directory */
#define C_BLK   'b' /* block special file */
#define C_LNK   'l' /* symbolic link */
#define C_SOCK   's' /* socket */
#define C_REG   ' ' /* regular file */
#define SPACING   3 /* vertical space between strings */
#define ASCENT   (mfinfo->ascent)
#define DESCENT   (mfinfo->descent)
#define CHIGH   (ASCENT + DESCENT)
#define LINEHIGH   (CHIGH + SPACING)
#define STDINSTR   "<stdin>"
#define MAX_CMAP_SIZE   256
#define COLOR_DEPTH   8
#define MAX_COLOR   256
#define B_DEPTH   5 /* # bits/pixel to use */
#define B_LEN   (1<<B_DEPTH)
#define C_DEPTH   2
#define C_LEN   (1<<C_DEPTH) /* # cells/color to use */
#define CENTERX(f, x, str)   ((x)-XTextWidth(f,str,strlen(str))/2)
#define CENTERY(f, y)   ((y)-((f->ascent+f->descent)/2)+f->ascent)
#define RANGE(a, b, c)   { if (a<b) a=b; if (a>c) a=c; }
#define PTINRECT(x, y, rx, ry, rw, rh)   ((x)>=(rx) && (y)>=(ry) && (x)<=(rx)+(rw) && (y)<=(ry)+(rh))
#define MONO(rd, gn, bl)   (((rd)*11 + (gn)*16 + (bl)*5) >> 5) /*.33R+ .5G+ .17B*/
#define F_COLORS   0
#define F_FORMAT   1
#define F_FULLCOLOR   0
#define F_GREYSCALE   1
#define F_BWDITHER   2
#define F_REDUCED   3
#define F_GIF   0
#define F_PM   1
#define F_PBMRAW   2
#define F_PBMASCII   3
#define F_XBM   4
#define F_SUNRAS   5
#define F_BMP   6
#define F_PS   7
#define F_IRIS   8
#define CONV24_8BIT   0
#define CONV24_24BIT   1
#define CONV24_SEP1   2
#define CONV24_LOCK   3
#define CONV24_SEP2   4
#define CONV24_FAST   5
#define CONV24_SLOW   6
#define CONV24_BEST   7
#define CONV24_MAX   8
#define PIC8   CONV24_8BIT
#define PIC24   CONV24_24BIT

Typedefs

typedef unsigned char byte
typedef struct rbutt RBUTT
typedef struct colorbox CBOX

Functions

void InitFSDTables (void)
void xvDestroyImage (XImage *image)
void xvbzero (char *s, int len)

Variables

byte gamcr []
byte fsgamcr []
XPoint ghand []

Class Documentation

struct BUTT

Definition at line 267 of file wx_imgx.h.

Class Members
int active
unsigned long bg
unsigned long fg
int h
int lit
char * str
int toggle
int w
Window win
int x
int y
struct LIST

Definition at line 277 of file wx_imgx.h.

Collaboration diagram for LIST:
Class Members
unsigned long bg
int dirsonly
unsigned long fg
int filetypes
int h
int nlines
int nstr
SCRL scrl
int selected
char ** str
int w
Window win
int x
int y
struct rbutt

Definition at line 290 of file wx_imgx.h.

Collaboration diagram for rbutt:
Class Members
int active
unsigned long bg
unsigned long fg
struct rbutt * next
int selected
char * str
Window win
int x
int y
struct colorbox

Definition at line 308 of file wx_imgx.h.

Collaboration diagram for colorbox:
Class Members
int bmax
int bmin
int gmax
int gmin
struct colorbox * next
struct colorbox * prev
int rmax
int rmin
int total
struct CCELL

Definition at line 314 of file wx_imgx.h.

Class Members
int entries
int num_ents
struct PICINFO

Definition at line 337 of file wx_imgx.h.

Class Members
byte b
int colType
char * comment
int frmType
char fullInfo
byte g
int h
int numpages
char pagebname
byte * pic
byte r
char shrtInfo
int type
int w

Define Documentation

#define ASCENT   (mfinfo->ascent)

Definition at line 242 of file wx_imgx.h.

#define B4BY3   11

Definition at line 191 of file wx_imgx.h.

#define B_DEPTH   5 /* # bits/pixel to use */

Definition at line 303 of file wx_imgx.h.

#define B_LEN   (1<<B_DEPTH)

Definition at line 304 of file wx_imgx.h.

#define BACROP   19

Definition at line 199 of file wx_imgx.h.

#define BASPECT   16

Definition at line 196 of file wx_imgx.h.

#define BCROP   2

Definition at line 182 of file wx_imgx.h.

#define BDN10   9

Definition at line 189 of file wx_imgx.h.

#define BDN2   7

Definition at line 187 of file wx_imgx.h.

#define BGAMMA   15

Definition at line 195 of file wx_imgx.h.

#define BINFO   14

Definition at line 194 of file wx_imgx.h.

#define BMAX   5

Definition at line 185 of file wx_imgx.h.

#define BMAXPECT   18

Definition at line 198 of file wx_imgx.h.

#define BNEXT   0

Definition at line 180 of file wx_imgx.h.

#define BNORM   4

Definition at line 184 of file wx_imgx.h.

#define BPREV   1

Definition at line 181 of file wx_imgx.h.

#define BQUIT   10

Definition at line 190 of file wx_imgx.h.

#define BROTL   13

Definition at line 193 of file wx_imgx.h.

#define BROTR   17

Definition at line 197 of file wx_imgx.h.

#define BSAVE   12

Definition at line 192 of file wx_imgx.h.

#define BUNCROP   3

Definition at line 183 of file wx_imgx.h.

#define BUP10   8

Definition at line 188 of file wx_imgx.h.

#define BUP2   6

Definition at line 186 of file wx_imgx.h.

#define C_BLK   'b' /* block special file */

Definition at line 234 of file wx_imgx.h.

#define C_CHR   'c' /* character special file */

Definition at line 232 of file wx_imgx.h.

#define C_DEPTH   2

Definition at line 305 of file wx_imgx.h.

#define C_DIR   'd' /* directory */

Definition at line 233 of file wx_imgx.h.

#define C_FIFO   'f' /* FIFO special file */

Definition at line 231 of file wx_imgx.h.

#define C_LEN   (1<<C_DEPTH) /* # cells/color to use */

Definition at line 306 of file wx_imgx.h.

#define C_LNK   'l' /* symbolic link */

Definition at line 235 of file wx_imgx.h.

#define C_REG   ' ' /* regular file */

Definition at line 237 of file wx_imgx.h.

#define C_SOCK   's' /* socket */

Definition at line 236 of file wx_imgx.h.

#define CENTERX (   f,
  x,
  str 
)    ((x)-XTextWidth(f,str,strlen(str))/2)

Definition at line 324 of file wx_imgx.h.

#define CENTERY (   f,
  y 
)    ((y)-((f->ascent+f->descent)/2)+f->ascent)

Definition at line 325 of file wx_imgx.h.

#define CHIGH   (ASCENT + DESCENT)

Definition at line 244 of file wx_imgx.h.

#define COLOR_DEPTH   8

Definition at line 301 of file wx_imgx.h.

#define CONV24_24BIT   1

Definition at line 387 of file wx_imgx.h.

#define CONV24_8BIT   0

Definition at line 386 of file wx_imgx.h.

#define CONV24_BEST   7

Definition at line 393 of file wx_imgx.h.

#define CONV24_FAST   5

Definition at line 391 of file wx_imgx.h.

#define CONV24_LOCK   3

Definition at line 389 of file wx_imgx.h.

#define CONV24_MAX   8

Definition at line 394 of file wx_imgx.h.

#define CONV24_SEP1   2

Definition at line 388 of file wx_imgx.h.

#define CONV24_SEP2   4

Definition at line 390 of file wx_imgx.h.

#define CONV24_SLOW   6

Definition at line 392 of file wx_imgx.h.

#define CTRLHIGH   295

Definition at line 149 of file wx_imgx.h.

#define CTRLWIDE   440 /* (fixed) size of control window */

Definition at line 148 of file wx_imgx.h.

#define DEFCTRLGEOM   "+400+400" /* default position of ctrl window */

Definition at line 142 of file wx_imgx.h.

#define DEFDIRGEOM   "-10-10" /* default position of directory window */

Definition at line 141 of file wx_imgx.h.

#define DEFGAMGEOM   "+10-10" /* default position of gamma window */

Definition at line 143 of file wx_imgx.h.

#define DEFINFOGEOM   "-10+10" /* default position of info window */

Definition at line 140 of file wx_imgx.h.

#define DESCENT   (mfinfo->descent)

Definition at line 243 of file wx_imgx.h.

#define DIRHIGH   420

Definition at line 152 of file wx_imgx.h.

#define DIRWIDE   300 /* (fixed) size of directory window */

Definition at line 151 of file wx_imgx.h.

#define F_BMP   6

Definition at line 369 of file wx_imgx.h.

#define F_BWDITHER   2

Definition at line 360 of file wx_imgx.h.

#define F_COLORS   0

Definition at line 355 of file wx_imgx.h.

#define F_FORMAT   1

Definition at line 356 of file wx_imgx.h.

#define F_FULLCOLOR   0

Definition at line 358 of file wx_imgx.h.

#define F_GIF   0

Definition at line 363 of file wx_imgx.h.

#define F_GREYSCALE   1

Definition at line 359 of file wx_imgx.h.

#define F_IRIS   8

Definition at line 371 of file wx_imgx.h.

#define F_PBMASCII   3

Definition at line 366 of file wx_imgx.h.

#define F_PBMRAW   2

Definition at line 365 of file wx_imgx.h.

#define F_PM   1

Definition at line 364 of file wx_imgx.h.

#define F_PS   7

Definition at line 370 of file wx_imgx.h.

#define F_REDUCED   3

Definition at line 361 of file wx_imgx.h.

#define F_SUNRAS   5

Definition at line 368 of file wx_imgx.h.

#define F_XBM   4

Definition at line 367 of file wx_imgx.h.

#define G_B1   11

Definition at line 222 of file wx_imgx.h.

#define G_B2   12

Definition at line 223 of file wx_imgx.h.

#define G_B3   13

Definition at line 224 of file wx_imgx.h.

#define G_B4   14

Definition at line 225 of file wx_imgx.h.

#define G_BAPPLY   0

Definition at line 211 of file wx_imgx.h.

#define G_BCLOSE   5

Definition at line 216 of file wx_imgx.h.

#define G_BDEF   3

Definition at line 214 of file wx_imgx.h.

#define G_BDN_BR   7

Definition at line 218 of file wx_imgx.h.

#define G_BDN_CN   9

Definition at line 220 of file wx_imgx.h.

#define G_BGTYPE   4

Definition at line 215 of file wx_imgx.h.

#define G_BHSVRGB   10

Definition at line 221 of file wx_imgx.h.

#define G_BNOGAM   1

Definition at line 212 of file wx_imgx.h.

#define G_BRESET   2

Definition at line 213 of file wx_imgx.h.

#define G_BSET   15

Definition at line 226 of file wx_imgx.h.

#define G_BUNDO   16

Definition at line 227 of file wx_imgx.h.

#define G_BUP_BR   6

Definition at line 217 of file wx_imgx.h.

#define G_BUP_CN   8

Definition at line 219 of file wx_imgx.h.

#define G_NBUTTS   17

Definition at line 210 of file wx_imgx.h.

#define GAMHIGH   356

Definition at line 155 of file wx_imgx.h.

#define GAMWIDE   366 /* (fixed) size of Gamma window */

Definition at line 154 of file wx_imgx.h.

#define HOLD_SIG   sigblock(sigmask(SIGALRM))

Definition at line 120 of file wx_imgx.h.

#define INF_FULL   3 /* INF_PART + clipping, expansion, colorinfo */

Definition at line 175 of file wx_imgx.h.

#define INF_NONE   0 /* empty box */

Definition at line 172 of file wx_imgx.h.

#define INF_PART   2 /* filename, format, size and infostr */

Definition at line 174 of file wx_imgx.h.

#define INF_STR   1 /* just ISTR_INFO */

Definition at line 173 of file wx_imgx.h.

#define INFOHIGH   250

Definition at line 146 of file wx_imgx.h.

#define INFOWIDE   500 /* (fixed) size of info window */

Definition at line 145 of file wx_imgx.h.

#define ISTR_COLOR   7

Definition at line 168 of file wx_imgx.h.

#define ISTR_COLOR2   8

Definition at line 169 of file wx_imgx.h.

#define ISTR_CROP   5

Definition at line 166 of file wx_imgx.h.

#define ISTR_EXPAND   6

Definition at line 167 of file wx_imgx.h.

#define ISTR_FILENAME   2

Definition at line 163 of file wx_imgx.h.

#define ISTR_FORMAT   3

Definition at line 164 of file wx_imgx.h.

#define ISTR_INFO   0

Definition at line 161 of file wx_imgx.h.

#define ISTR_RES   4

Definition at line 165 of file wx_imgx.h.

#define ISTR_WARNING   1

Definition at line 162 of file wx_imgx.h.

#define LINEHIGH   (CHIGH + SPACING)

Definition at line 245 of file wx_imgx.h.

#define MAX_CMAP_SIZE   256

Definition at line 300 of file wx_imgx.h.

#define MAX_COLOR   256

Definition at line 302 of file wx_imgx.h.

#define MAXNAMES   1024 /* max # of files (more than this? Get REAL!) */

Definition at line 157 of file wx_imgx.h.

#define MONO (   rd,
  gn,
  bl 
)    (((rd)*11 + (gn)*16 + (bl)*5) >> 5) /*.33R+ .5G+ .17B*/

Definition at line 335 of file wx_imgx.h.

#define NBUTTS   20

Definition at line 179 of file wx_imgx.h.

#define NISTR   9 /* number of ISTRs */

Definition at line 160 of file wx_imgx.h.

#define PAUSE_SIG   sigpause(0)

Definition at line 122 of file wx_imgx.h.

#define PIC24   CONV24_24BIT

Definition at line 398 of file wx_imgx.h.

#define PIC8   CONV24_8BIT

Definition at line 397 of file wx_imgx.h.

#define PROGNAME   "xv" /* used in resource database */

Definition at line 138 of file wx_imgx.h.

#define PTINRECT (   x,
  y,
  rx,
  ry,
  rw,
  rh 
)    ((x)>=(rx) && (y)>=(ry) && (x)<=(rx)+(rw) && (y)<=(ry)+(rh))

Definition at line 331 of file wx_imgx.h.

#define RANGE (   a,
  b,
 
)    { if (a<b) a=b; if (a>c) a=c; }

Definition at line 328 of file wx_imgx.h.

#define RELEASE_SIG   sigblock(0)

Definition at line 121 of file wx_imgx.h.

#define S_BCANC   2

Definition at line 205 of file wx_imgx.h.

#define S_BOPEN   0

Definition at line 203 of file wx_imgx.h.

#define S_BQUIT   3

Definition at line 206 of file wx_imgx.h.

#define S_BSAVE   1

Definition at line 204 of file wx_imgx.h.

#define S_NBUTTS   4

Definition at line 202 of file wx_imgx.h.

#define SPACING   3 /* vertical space between strings */

Definition at line 241 of file wx_imgx.h.

#define STDINSTR   "<stdin>"

Definition at line 248 of file wx_imgx.h.

#define UNCOMPRESS   "/usr/ucb/uncompress" /* for uncompressing .Z files */

Definition at line 135 of file wx_imgx.h.


Typedef Documentation

typedef unsigned char byte

Definition at line 250 of file wx_imgx.h.

typedef struct colorbox CBOX
typedef struct rbutt RBUTT

Function Documentation

Definition at line 870 of file wx_24to8.cc.

{
  int i;
  for (i=0; i<256; i++) {     /* initialize Floyd-Steinberg division tables */
    tbl1[i] = i/16;
    tbl3[i] = (3*i)/16;
    tbl5[i] = (5*i)/16;
    tbl7[i] = (7*i)/16;
  }
}
void xvbzero ( char *  s,
int  len 
)

Definition at line 1094 of file wx_img.cc.

{
  for ( ; len>0; len--) {
    *s++ = 0;
  }
}
void xvDestroyImage ( XImage *  image)

Definition at line 1080 of file wx_img.cc.

{
  /* called in place of XDestroyImage().  Explicitly destroys *BOTH* the
     data and the structure.  XDestroyImage() doesn't seem to do this on all
     systems.  Also, can be called with a NULL image pointer */

  if (image) {
    /* free data by hand, since XDestroyImage is vague about it */
    if (image->data) free(image->data);
    image->data = NULL;
    XDestroyImage(image);
  }
}

Variable Documentation

Definition at line 47 of file wx_gam.cc.

Definition at line 46 of file wx_gam.cc.

XPoint ghand[]

Definition at line 50 of file wx_gam.cc.