Changeset 695
- Timestamp:
- Mar 22, 2004, 9:34:05 AM (21 years ago)
- File:
-
- 1 edited
-
trunk/ccl/hemlock/src/struct.lisp (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ccl/hemlock/src/struct.lisp
r597 r695 105 105 (external-format :unix) ; Line-termination, for the time being 106 106 process ; Maybe a listener 107 (line-cache-length 200) ; initial/current length of open-chars 108 (open-line nil) ; the current open line 109 (open-chars (make-string 200)) ; gap 110 (left-open-pos 0) 111 (right-open-pos 0) 112 107 113 ) 108 114 … … 199 205 200 206 207 ;#+clx 208 (progn 201 209 ;;;; Windows, dis-lines, and font-changes. 202 210 203 211 ;;; The window object: 204 212 ;;; 205 (defstruct (window (:constructor internal-make-window)206 (:predicate windowp)207 (:copier nil)208 (:print-function %print-hwindow))209 "This structure implements a Hemlock window."210 tick ; The last time this window was updated.211 %buffer ; buffer displayed in this window.212 height ; Height of window in lines.213 width ; Width of the window in characters.214 old-start ; The charpos of the first char displayed.215 first-line ; The head of the list of dis-lines.216 last-line ; The last dis-line displayed.217 first-changed ; The first changed dis-line on last update.218 last-changed ; The last changed dis-line.219 spare-lines ; The head of the list of unused dis-lines220 (old-lines 0) ; Slot used by display to keep state info221 hunk ; The device hunk that displays this window.222 display-start ; first character position displayed223 display-end ; last character displayed224 point ; Where the cursor is in this window.225 modeline-dis-line ; Dis-line for modeline display.226 modeline-buffer ; Complete string of all modeline data.227 modeline-buffer-len ; Valid chars in modeline-buffer.228 display-recentering) ; Tells whether redisplay recenters window229 ; regardless of whether it is current.230 231 (setf (documentation 'windowp 'function)232 "Returns true if its argument is a Hemlock window object, Nil otherwise.")233 (setf (documentation 'window-height 'function)234 "Return the height of a Hemlock window in character positions.")235 (setf (documentation 'window-width 'function)236 "Return the width of a Hemlock window in character positions.")237 (setf (documentation 'window-display-start 'function)238 "Return the mark which points before the first character displayed in213 (defstruct (window (:constructor internal-make-window) 214 (:predicate windowp) 215 (:copier nil) 216 (:print-function %print-hwindow)) 217 "This structure implements a Hemlock window." 218 tick ; The last time this window was updated. 219 %buffer ; buffer displayed in this window. 220 height ; Height of window in lines. 221 width ; Width of the window in characters. 222 old-start ; The charpos of the first char displayed. 223 first-line ; The head of the list of dis-lines. 224 last-line ; The last dis-line displayed. 225 first-changed ; The first changed dis-line on last update. 226 last-changed ; The last changed dis-line. 227 spare-lines ; The head of the list of unused dis-lines 228 (old-lines 0) ; Slot used by display to keep state info 229 hunk ; The device hunk that displays this window. 230 display-start ; first character position displayed 231 display-end ; last character displayed 232 point ; Where the cursor is in this window. 233 modeline-dis-line ; Dis-line for modeline display. 234 modeline-buffer ; Complete string of all modeline data. 235 modeline-buffer-len ; Valid chars in modeline-buffer. 236 display-recentering) ; Tells whether redisplay recenters window 237 ; regardless of whether it is current. 238 239 (setf (documentation 'windowp 'function) 240 "Returns true if its argument is a Hemlock window object, Nil otherwise.") 241 (setf (documentation 'window-height 'function) 242 "Return the height of a Hemlock window in character positions.") 243 (setf (documentation 'window-width 'function) 244 "Return the width of a Hemlock window in character positions.") 245 (setf (documentation 'window-display-start 'function) 246 "Return the mark which points before the first character displayed in 239 247 the supplied window.") 240 (setf (documentation 'window-display-end 'function)241 "Return the mark which points after the last character displayed in248 (setf (documentation 'window-display-end 'function) 249 "Return the mark which points after the last character displayed in 242 250 the supplied window.") 243 (setf (documentation 'window-point 'function)244 "Return the mark that points to where the cursor is displayed in this251 (setf (documentation 'window-point 'function) 252 "Return the mark that points to where the cursor is displayed in this 245 253 window. When the window is made current, the Buffer-Point of this window's 246 254 buffer is moved to this position. While the window is current, redisplay 247 255 makes this mark point to the same position as the Buffer-Point of its 248 256 buffer.") 249 (setf (documentation 'window-display-recentering 'function)250 "This determines whether redisplay recenters window regardless of whether it257 (setf (documentation 'window-display-recentering 'function) 258 "This determines whether redisplay recenters window regardless of whether it 251 259 is current. This is SETF'able.") 252 260 253 ;; Now this is bogus: Both dis-line and window-dis-line use 254 ;; "DIS-LINE-" as conc-name. ACL complains about e.g. DIS-LINE-CHARS 255 ;; being redefined and rightly so. My guess is this is some hangover 256 ;; from elder versions of this fine software. 257 258 ;; Since there also is no constructor for dis-line they can't be 259 ;; possibly created. I'll just do away with dis-line and just offer 260 ;; window-dis-line. 261 262 ;; --GB 2002-11-07 263 264 #|| 265 (defstruct (dis-line (:copier nil) 266 (:constructor nil)) 267 chars ; The line-image to be displayed. 268 (length 0 :type fixnum) ; Length of line-image. 269 font-changes) ; Font-Change structures for changes in this line. 270 271 (defstruct (window-dis-line (:copier nil) 272 (:include dis-line) 273 (:constructor make-window-dis-line (chars)) 274 (:conc-name dis-line-)) 275 old-chars ; Line-Chars of line displayed. 276 line ; Line displayed. 277 (flags 0 :type fixnum) ; Bit flags indicate line status. 278 (delta 0 :type fixnum) ; # lines moved from previous position. 279 (position 0 :type fixnum) ; Line # to be displayed on. 280 (end 0 :type fixnum)) ; Index after last logical character displayed. 281 282 ||# 283 284 (defstruct (window-dis-line (:copier nil) 285 (:constructor make-window-dis-line (chars)) 286 (:conc-name dis-line-)) 287 chars ; The line-image to be displayed. 288 (length 0 :type fixnum) ; Length of line-image. 289 font-changes ; Font-Change structures for changes in this line. 290 old-chars ; Line-Chars of line displayed. 291 line ; Line displayed. 292 (flags 0 :type fixnum) ; Bit flags indicate line status. 293 (delta 0 :type fixnum) ; # lines moved from previous position. 294 (position 0 :type fixnum) ; Line # to be displayed on. 295 (end 0 :type fixnum)) ; Index after last logical character displayed. 296 297 (defstruct (font-change (:copier nil) 298 (:constructor make-font-change (next))) 299 x ; X position that change takes effect. 300 font ; Index into font-map of font to use. 301 next ; The next Font-Change on this dis-line. 302 mark) ; Font-Mark responsible for this change. 261 (defstruct (window-dis-line (:copier nil) 262 (:constructor make-window-dis-line (chars)) 263 (:conc-name dis-line-)) 264 chars ; The line-image to be displayed. 265 (length 0 :type fixnum) ; Length of line-image. 266 font-changes ; Font-Change structures for changes in this line. 267 old-chars ; Line-Chars of line displayed. 268 line ; Line displayed. 269 (flags 0 :type fixnum) ; Bit flags indicate line status. 270 (delta 0 :type fixnum) ; # lines moved from previous position. 271 (position 0 :type fixnum) ; Line # to be displayed on. 272 (end 0 :type fixnum)) ; Index after last logical character displayed. 273 274 (defstruct (font-change (:copier nil) 275 (:constructor make-font-change (next))) 276 x ; X position that change takes effect. 277 font ; Index into font-map of font to use. 278 next ; The next Font-Change on this dis-line. 279 mark) ; Font-Mark responsible for this change. 303 280 304 281 … … 307 284 ;;;; Font family. 308 285 309 (defstruct font-family 310 map ; Font-map for hunk. 311 height ; Height of char box includung VSP. 312 width ; Width of font. 313 baseline ; Pixels from top of char box added to Y. 314 cursor-width ; Pixel width of cursor. 315 cursor-height ; Pixel height of cursor. 316 cursor-x-offset ; Added to pos of UL corner of char box to get 317 cursor-y-offset) ; UL corner of cursor blotch. 318 286 (defstruct font-family 287 map ; Font-map for hunk. 288 height ; Height of char box includung VSP. 289 width ; Width of font. 290 baseline ; Pixels from top of char box added to Y. 291 cursor-width ; Pixel width of cursor. 292 cursor-height ; Pixel height of cursor. 293 cursor-x-offset ; Added to pos of UL corner of char box to get 294 cursor-y-offset) ; UL corner of cursor blotch. 295 296 ) 319 297 320 298
Note:
See TracChangeset
for help on using the changeset viewer.
