Changeset 12320


Ignore:
Timestamp:
Jun 28, 2009, 9:52:07 AM (10 years ago)
Author:
gb
Message:

Add a "reading-line" slot to cocoa-listener-input-stream; define
a STREAM-READ-LINE method for cocoa-listener-input-stream that binds
that slot.

HEMLOCK-EXT:TOP-LISTENER-INPUT-STREAM.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/cocoa-ide/cocoa-listener.lisp

    r12264 r12320  
    4040   (cur-string-pos :initform 0)
    4141   (cur-env :initform nil)
    42    (cur-sstream :initform nil)))
     42   (cur-sstream :initform nil)
     43   (reading-line :initform nil :accessor hi:input-stream-reading-line)))
     44
     45
     46
    4347
    4448
     
    137141  (with-slots (queue-lock cur-string cur-string-pos cur-sstream cur-env) stream
    138142    (with-lock-grabbed (queue-lock)
     143      (setf (hi::input-stream-reading-line stream) nil)
    139144      (setf cur-string nil cur-string-pos 0 cur-sstream nil cur-env nil))))
     145
     146(defmethod stream-read-line ((stream cocoa-listener-input-stream))
     147  (let* ((old-reading-line (hi:input-stream-reading-line stream)))
     148    (unwind-protect
     149         (progn
     150           (setf (hi::input-stream-reading-line stream) t)
     151           (call-next-method))
     152      (setf (hi:input-stream-reading-line stream) old-reading-line))))
    140153
    141154(defparameter $listener-flush-limit 100)
     
    264277(declaim (special hemlock-listener-frame))
    265278
     279(objc:defmethod (#/setDocumentEdited: :void) ((w hemlock-listener-frame)
     280                                              (edited #>BOOL))
     281  (declare (ignorable edited)))
     282
    266283
    267284(defclass hemlock-listener-window-controller (hemlock-editor-window-controller)
     
    348365      (setq process (require-type process 'cocoa-listener-process))
    349366      (cocoa-listener-process-output-stream process))))
     367
     368(defun hemlock-ext:top-listener-input-stream ()
     369  (let* ((process (hemlock-document-process (#/topListener hemlock-listener-document))))
     370    (when process
     371      (setq process (require-type process 'cocoa-listener-process))
     372      (cocoa-listener-process-input-stream process))))
    350373
    351374
Note: See TracChangeset for help on using the changeset viewer.