summaryrefslogtreecommitdiff
path: root/src/dispextern.h
blob: d3dc8941072ee5d79368af5a5438888bae5141ef (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
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
/* Interface definitions for display code.
   Copyright (C) 1985, 1990 Free Software Foundation, Inc.

This file is part of GNU Emacs.

GNU Emacs 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 1, or (at your option)
any later version.

GNU Emacs 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 GNU Emacs; see the file COPYING.  If not, write to
the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */


/* Nonzero means do not assume anything about current
 contents of actual terminal screen */

extern int screen_garbaged;

/* Desired terminal cursor position (to show position of point),
 origin zero.  */

extern int cursor_hpos, cursor_vpos;

/* Nonzero means last display completed
   and cursor is really at cursor_hpos, cursor_vpos.
   Zero means it was preempted. */

extern int display_completed;

/* Nonzero while trying to read keyboard input at main program level.  */

extern int waiting_for_input;

struct matrix
{
  /* Height of this matrix.  */
  int height;
  /* Width of this matrix.  */
  int width;
  /* Vector of used widths of lines, indexed by vertical position.  */
  int *used;
  /* Vector of line contents.
     m->contents[V][H] is the character at position V, H.
     Note that ->contents[...][screen_width] is always 0
     and so is ->contents[...][-1].  */
  unsigned char **contents;
  /* Long vector from which the line contents are taken.  */
  unsigned char *total_contents;
  /* Vector indicating, for each line, whether it is highlighted.  */
  char *highlight;
  /* Vector indicating, for each line, whether its contents mean anything.  */
  char *enable;
};

/* Current screen contents.  */
extern struct matrix *current_screen;
/* Screen contents to be displayed.  */
extern struct matrix *new_screen;
/* Temporary buffer for screen contents.  */
extern struct matrix *temp_screen;

/* Get ready to display on screen line VPOS at column HPOS
   and return the string where the text of that line is stored.  */

unsigned char *get_display_line ();

/* Buffer used by `message' for formatting a message, and by print.c.  */
extern char *message_buf;

/* Nonzero means message_buf is being used by print.  */
extern int message_buf_print;

/* Message to display instead of minibuffer contents
   This is what the functions error and message make,
   and command echoing uses it as well.
   It overrides the minibuf_prompt as well as the buffer.  */
extern char *echo_area_contents;

/* All costs measured in characters.
   So no cost can exceed the area of a screen, measured in characters.
   This should not be more than million.
   Meanwhile, we can add lots of millions together without overflow.  */

#define INFINITY 1000000