summaryrefslogtreecommitdiff
path: root/Build/source/texk/web2c/window/trap.c
blob: 79dda11cb3c0fa4eadd8ce41334a097cfe9544f0 (plain)
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
/* trap.c -- generate output for the trap test.  See comments in
   lib/texmf.c for what each routine does.  */

#define EXTERN extern
#include "../mfd.h"


/* No #ifdef for the whole file, because we always want to support this.  */

boolean mf_trap_initscreen(void);
void mf_trap_updatescreen(void);
void mf_trap_blankrectangle(screencol left,
                            screencol right,
                            screenrow top,
                            screenrow bottom);
void mf_trap_paintrow(screenrow row,
                      pixelcolor init_color,
                      transspec transition_vector,
                      screencol vector_size);

/* This returns true if we can do window operations, else false.  */

boolean
mf_trap_initscreen(void)
{
  return 1;
}

void
mf_trap_updatescreen(void)
{
  fputs ("Calling UPDATESCREEN\n", logfile);
}

void
mf_trap_blankrectangle(screencol left,
                       screencol right,
                       screenrow top,
                       screenrow bottom)
{
  fprintf (logfile, "\nCalling BLANKRECTANGLE(%ld,%ld,%ld,%ld)\n",
           (long)left, (long)right, (long)top, (long)bottom);
}

void
mf_trap_paintrow(screenrow row,
                 pixelcolor init_color,
                 transspec transition_vector,
                 screencol vector_size)
{
  unsigned k;

  fprintf (logfile, "Calling PAINTROW(%ld,%ld;", (long)row, (long)init_color);
  for (k = 0; k <= vector_size; k++) {
    fprintf (logfile, "%ld", (long)transition_vector[k]);
    if (k != vector_size)
      putc (',', logfile);
    }
  fputs (")\n", logfile);
}