@@ -9,7 +9,7 @@ import { IDeleteEvent, IInsertEvent } from 'common/CircularList';
9
9
import { IParams } from 'common/parser/Types' ;
10
10
import { ICoreMouseService , ICoreService , IOptionsService , IUnicodeService } from 'common/services/Services' ;
11
11
import { IBufferSet } from 'common/buffer/Types' ;
12
- import { UnderlineStyle } from 'common/buffer/Constants' ;
12
+ import { Attributes , UnderlineStyle } from 'common/buffer/Constants' ;
13
13
14
14
export interface ICoreTerminal {
15
15
coreMouseService : ICoreMouseService ;
@@ -133,10 +133,24 @@ export interface IOscLinkData {
133
133
uri : string ;
134
134
}
135
135
136
- /** Attribute data */
136
+ /**
137
+ * An object that represents all attributes of a cell.
138
+ */
137
139
export interface IAttributeData {
140
+ /**
141
+ * "fg" is a 32-bit unsigned integer that stores the foreground color of the cell in the 24 least
142
+ * significant bits and additional flags in the remaining 8 bits.
143
+ */
138
144
fg : number ;
145
+ /**
146
+ * "bg" is a 32-bit unsigned integer that stores the background color of the cell in the 24 least
147
+ * significant bits and additional flags in the remaining 8 bits.
148
+ */
139
149
bg : number ;
150
+ /**
151
+ * "extended", aka "ext", stores extended attributes beyond those available in fg and bg. This
152
+ * data is optional on a cell and encodes less common data.
153
+ */
140
154
extended : IExtendedAttrs ;
141
155
142
156
clone ( ) : IAttributeData ;
@@ -152,8 +166,17 @@ export interface IAttributeData {
152
166
isStrikethrough ( ) : number ;
153
167
isProtected ( ) : number ;
154
168
155
- // color modes
169
+ /**
170
+ * The color mode of the foreground color which determines how to decode {@link getFgColor},
171
+ * possible values include {@link Attributes.CM_DEFAULT}, {@link Attributes.CM_P16},
172
+ * {@link Attributes.CM_P256} and {@link Attributes.CM_RGB}.
173
+ */
156
174
getFgColorMode ( ) : number ;
175
+ /**
176
+ * The color mode of the background color which determines how to decode {@link getBgColor},
177
+ * possible values include {@link Attributes.CM_DEFAULT}, {@link Attributes.CM_P16},
178
+ * {@link Attributes.CM_P256} and {@link Attributes.CM_RGB}.
179
+ */
157
180
getBgColorMode ( ) : number ;
158
181
isFgRGB ( ) : boolean ;
159
182
isBgRGB ( ) : boolean ;
@@ -163,8 +186,15 @@ export interface IAttributeData {
163
186
isBgDefault ( ) : boolean ;
164
187
isAttributeDefault ( ) : boolean ;
165
188
166
- // colors
189
+ /**
190
+ * Gets an integer representation of the foreground color, how to decode the color depends on the
191
+ * color mode {@link getFgColorMode}.
192
+ */
167
193
getFgColor ( ) : number ;
194
+ /**
195
+ * Gets an integer representation of the background color, how to decode the color depends on the
196
+ * color mode {@link getBgColorMode}.
197
+ */
168
198
getBgColor ( ) : number ;
169
199
170
200
// extended attrs
0 commit comments