2 * CDE - Common Desktop Environment
4 * Copyright (c) 1993-2012, The Open Group. All rights reserved.
6 * These libraries and programs are free software; you can
7 * redistribute them and/or modify them under the terms of the GNU
8 * Lesser General Public License as published by the Free Software
9 * Foundation; either version 2 of the License, or (at your option)
12 * These libraries and programs are distributed in the hope that
13 * they will be useful, but WITHOUT ANY WARRANTY; without even the
14 * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15 * PURPOSE. See the GNU Lesser General Public License for more
18 * You should have received a copy of the GNU Lesser General Public
19 * License along with these libraries and programs; if not, write
20 * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
21 * Floor, Boston, MA 02110-1301 USA
24 ** $XConsortium: TermBuffer.h /main/1 1996/04/21 19:15:26 drk $
28 * (c) Copyright 1993, 1994 Hewlett-Packard Company *
29 * (c) Copyright 1993, 1994 International Business Machines Corp. *
30 * (c) Copyright 1993, 1994 Sun Microsystems, Inc. *
31 * (c) Copyright 1993, 1994 Novell, Inc. *
34 #ifndef _Dt_TermBuffer_h
35 #define _Dt_TermBuffer_h
36 #include <TermPrimBuffer.h>
39 ** Defines for video enhancements
42 #define SECURE (1 << 4)
43 #define HALF_BRIGHT (1 << 3)
44 #define UNDERLINE (1 << 2)
45 #define INVERSE (1 << 1)
46 #define BLINK (1 << 0)
47 #define VIDEO_MASK (BOLD | SECURE | HALF_BRIGHT | UNDERLINE | INVERSE | BLINK)
49 #define IS_BOLD(flags) ((flags) & BOLD)
50 #define IS_SECURE(flags) ((flags) & SECURE)
51 #define IS_HALF_BRIGHT(flags) ((flags) & HALF_BRIGHT)
52 #define IS_UNDERLINE(flags) ((flags) & UNDERLINE)
53 #define IS_INVERSE(flags) ((flags) & INVERSE)
54 #define IS_BLINK(flags) ((flags) & BLINK)
57 ** Defines for field types
59 #define FIELD_UNPROTECT 0
60 #define FIELD_PROTECT 1
61 #define FIELD_TRANSMIT 2
65 #define COLOR_MASK 0x0F
68 ** Defines for font ID
71 #define FONT_LINEDRAW 1
76 enhVideo = 0, enhField = 1, enhFont = 3, enhFgColor = 4, enhBgColor = 5
78 #define NUM_ENHANCEMENT_FIELDS 6
81 ** enumerate the different erase modes...
83 typedef enum _DtEraseMode
85 eraseFromCol0, /* from col 0 to cursor */
86 eraseCharCount, /* "count" characters from cursor */
87 eraseLineCount, /* "count" lines from cursor */
88 eraseToEOL, /* from cursor to end-of-line */
89 eraseLine, /* the entire line the cursor is on */
90 eraseBuffer, /* the entire buffer */
91 eraseFromRow0Col0, /* from row 0, col 0 to the cursor */
92 eraseToEOB /* from the cursor to the end of the buffer */
97 ** This may be useful for debugging purposes.
99 #if (defined(DEBUG) | defined(__CODECENTER__))
100 typedef enum _videoFlags
102 b_i_h_u_s = 0x00, b_i_h_u_S = 0x01, b_i_h_U_s = 0x02, b_i_h_U_S = 0x03,
103 b_i_H_u_s = 0x04, b_i_H_u_S = 0x05, b_i_H_U_s = 0x06, b_i_H_U_S = 0x07,
104 b_I_h_u_s = 0x08, b_I_h_u_S = 0x09, b_I_h_U_s = 0x0A, b_I_h_U_S = 0x0B,
105 b_I_H_u_s = 0x0C, b_I_H_u_S = 0x0D, b_I_H_U_s = 0x0E, b_I_H_U_S = 0x0F,
106 B_i_h_u_s = 0x10, B_i_h_u_S = 0x11, B_i_h_U_s = 0x12, B_i_h_U_S = 0x13,
107 B_i_H_u_s = 0x14, B_i_H_u_S = 0x15, B_i_H_U_s = 0x16, B_i_H_U_S = 0x17,
108 B_I_h_u_s = 0x18, B_I_h_u_S = 0x19, B_I_h_U_s = 0x1A, B_I_h_U_S = 0x1B,
109 B_I_H_u_s = 0x1C, B_I_H_u_S = 0x1D, B_I_H_U_s = 0x1E, B_I_H_U_S = 0x1F,
111 #endif /* (defined(DEBUG) | defined(__CODECENTER__)) */
116 #endif /* __cplusplus */
119 _DtTermBufferCreateBuffer
124 const short sizeOfBuffer,
125 const short sizeOfLine,
126 const short sizeOfEnh
130 _DtTermBufferFreeBuffer
136 ** Delete enough characters from the specified line such that the
137 ** width of the characters deleted equal or exceeds the desired
138 ** width. The actual width deleted is returned in "width".
156 DtEraseMode eraseSwitch
160 } /* close scope of 'extern "C"'... */
161 #endif /* __cplusplus */
163 #endif /* _Dt_TermBuffer_h */
164 /* DON'T ADD ANYTHING AFTER THIS #endif... */