2 * Copyright (c) 1993, 1994
3 * The Regents of the University of California. All rights reserved.
4 * Copyright (c) 1993, 1994, 1995, 1996
5 * Keith Bostic. All rights reserved.
7 * See the LICENSE file for redistribution information.
9 * @(#)tki.h 8.6 (Berkeley) 4/27/96
15 typedef struct _tk_private
{
16 Tcl_Interp
*interp
;/* Tcl interpreter cookie. */
18 /* Shared variables. */
19 int tk_cursor_row
; /* Current cursor row. */
20 int tk_cursor_col
; /* Current cursor col. */
21 int tk_ssize_row
; /* Screen rows. */
22 int tk_ssize_col
; /* Screen columns. */
24 struct termios orig
; /* Original terminal values. */
26 CHAR_T ibuf
[64]; /* Input keys. */
27 int ibuf_cnt
; /* Number of input keys. */
30 TAILQ_HEAD(_eventh
, _event
) evq
;
32 int killersig
; /* Killer signal. */
37 #define INDX_MAX 4 /* Original signal information. */
38 struct sigaction oact
[INDX_MAX
];
40 #define TK_LLINE_IV 0x0001 /* Last line is in inverse video. */
41 #define TK_SCR_VI_INIT 0x0002 /* Vi screen initialized. */
42 #define TK_SIGHUP 0x0004 /* SIGHUP arrived. */
43 #define TK_SIGINT 0x0008 /* SIGINT arrived. */
44 #define TK_SIGTERM 0x0010 /* SIGTERM arrived. */
45 #define TK_SIGWINCH 0x0020 /* SIGWINCH arrived. */
49 extern GS
*__global_list
;
50 #define TKP(sp) ((TK_PRIVATE *)((sp)->gp->tk_private))
51 #define GTKP(gp) ((TK_PRIVATE *)gp->tk_private)
53 /* Return possibilities from the keyboard read routine. */
54 typedef enum { INP_OK
=0, INP_EOF
, INP_ERR
, INP_INTR
, INP_TIMEOUT
} input_t
;
56 /* The screen line relative to a specific window. */
57 #define RLNO(sp, lno) (sp)->woff + (lno)
59 /* Some functions can be safely ignored until the screen is running. */
60 #define VI_INIT_IGNORE(sp) \
61 if (F_ISSET(sp, SC_VI) && !F_ISSET(TKP(sp), TK_SCR_VI_INIT)) \
64 #include "tk_extern.h"