/[mcclim]/mcclim/decls.lisp
ViewVC logotype

Contents of /mcclim/decls.lisp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.40 - (hide annotations)
Wed Nov 8 01:18:22 2006 UTC (7 years, 5 months ago) by thenriksen
Branch: MAIN
Changes since 1.39: +1 -1 lines
Committed changes necessary to support Drei (and non-Goatee input
editors at all). Also some indirection permitting run-time selection
of editor substrate and the code for :text-editor and :text-field
gadgets.
1 gilbert 1.1 ;;; -*- Mode: Lisp; Syntax: Common-Lisp; Package: CLIM-INTERNALS; -*-
2     ;;; ---------------------------------------------------------------------------
3     ;;; Title: DEFGENERICs and stuff
4     ;;; Created: 2001-08-12
5     ;;; Author: Gilbert Baumann <unk6@rz.uni-karlsruhe.de>
6     ;;; License: LGPL (See file COPYING for details).
7     ;;; ---------------------------------------------------------------------------
8 gilbert 1.5 ;;; (c) copyright 2001,2002 by Gilbert Baumann
9 gilbert 1.1
10     ;;; This library is free software; you can redistribute it and/or
11     ;;; modify it under the terms of the GNU Library General Public
12     ;;; License as published by the Free Software Foundation; either
13     ;;; version 2 of the License, or (at your option) any later version.
14     ;;;
15     ;;; This library is distributed in the hope that it will be useful,
16     ;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
17     ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18     ;;; Library General Public License for more details.
19     ;;;
20     ;;; You should have received a copy of the GNU Library General Public
21 adejneka 1.11 ;;; License along with this library; if not, write to the
22     ;;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
23 gilbert 1.1 ;;; Boston, MA 02111-1307 USA.
24    
25 mikemac 1.25 (in-package :clim-internals)
26 gilbert 1.1
27 moore 1.28 ;;; This is just an ad hoc list. Would it be a good idea to include all
28     ;;; (exported) generic functions here? --GB
29     ;;;
30     ;;; YES! -- CSR
31 tmoore 1.32 ;;; We'll get right on it :) -- moore
32     ;;; Whose numbers are we using here?
33    
34 gbaumann 1.33 ;;; The numbers are section numbers from the spec. --GB
35    
36     ;; Since the declaim form for functions looks clumsy and is
37     ;; syntax-wise different from defun, we define us a new declfun, which
38     ;; fixes this.
39    
40     (defmacro declfun (name lambda-list)
41     `(declaim (ftype (function
42     ,(let ((q lambda-list)
43     res)
44     (do () ((or (null q)
45     (member (car q) '(&optional &rest &key))))
46     (push 't res)
47     (pop q))
48     (when (eq (car q) '&optional)
49     (push '&optional res)
50     (pop q)
51     (do () ((or (null q)
52     (member (car q) '(&rest &key))))
53     (pop q)
54     (push 't res)))
55     (when (eq (car q) '&rest)
56     (push '&rest res)
57     (pop q)
58     (push 't res)
59     (pop q))
60     (when (eq (car q) '&key)
61     (push '&key res)
62     (pop q)
63     (do () ((or (null q)
64     (member (car q) '(&allow-other-keys))))
65     (push (list (intern (string (if (consp (car q))
66     (if (consp (caar q))
67     (caaar q)
68     (caar q))
69     (car q)))
70     :keyword)
71     't)
72     res)
73     (pop q)))
74     (when (eq (car q) '&allow-other-keys)
75     (push '&allow-other-keys res)
76     (pop q))
77     (reverse res))
78     t)
79     ,name)))
80    
81     ;;;; Early special variables
82    
83     (defvar *application-frame* nil)
84    
85 crhodes 1.39 ;;; 3.2.1.1 The Point Protocol
86    
87 gilbert 1.1 (defgeneric point-x (point))
88     (defgeneric point-y (point))
89 tmoore 1.32
90 crhodes 1.39 ;;; 3.2.2.1 The Polygon and Polyline Protocol
91    
92     (defgeneric polygon-points (polygon-or-polyline))
93     (defgeneric map-over-polygon-coordinates (function polygon-or-polyline))
94     (defgeneric map-over-polygon-segments (function polygon-or-polyline))
95     (defgeneric polyline-closed (polyline))
96    
97     ;;; 3.2.3.1 The Line Protocol
98    
99     (defgeneric line-start-point* (line))
100     (defgeneric line-end-point* (line))
101     (defgeneric line-start-point (line))
102     (defgeneric line-end-point (line))
103    
104 tmoore 1.32 ;;; 3.2.4.1
105    
106     (defgeneric rectangle-edges* (rectangle))
107     (defgeneric rectangle-min-point (rectangle))
108     (defgeneric rectangle-max-point (rectangle))
109     (defgeneric rectangle-min-x (rectangle))
110     (defgeneric rectangle-min-y (rectangle))
111     (defgeneric rectangle-max-x (rectangle))
112     (defgeneric rectangle-max-y (rectangle))
113     (defgeneric rectangle-width (rectangle))
114     (defgeneric rectangle-height (rectangle))
115     (defgeneric rectangle-size (rectangle))
116    
117 crhodes 1.39 ;;; 3.2.5.1 The Ellipse and Elliptical Arc Protocol
118    
119     (defgeneric ellipse-center-point* (elliptical-object))
120     (defgeneric ellipse-center-point (elliptical-object))
121     (defgeneric ellipse-radii (elliptical-object))
122     (defgeneric ellipse-start-angle (elliptical-object))
123     (defgeneric ellipse-end-angle (elliptical-object))
124    
125     ;;; 4.1.1 The Bounding Rectangle Protocol
126    
127     (defgeneric bounding-rectangle* (region))
128     (defgeneric bounding-rectangle (region))
129    
130     ;;; 4.1.2 Bounding Rectangle Convenience Functions
131    
132     (defgeneric bounding-rectangle-position (region))
133     (defgeneric bounding-rectangle-min-x (region))
134     (defgeneric bounding-rectangle-min-y (region))
135     (defgeneric bounding-rectangle-max-x (region))
136     (defgeneric bounding-rectangle-max-y (region))
137     (defgeneric bounding-rectangle-width (region))
138     (defgeneric bounding-rectangle-height (region))
139     (defgeneric bounding-rectangle-size (region))
140    
141     ;;; 5.3.1 Transformation Predicates
142    
143     (defgeneric transformation-equal (transformation1 transformation2))
144     (defgeneric identity-transformation-p (transformation))
145     (defgeneric invertible-transformation-p (transformation))
146     (defgeneric translation-transformation-p (transformation))
147     (defgeneric reflection-transformation-p (transformation))
148     (defgeneric rigid-transformation-p (transformation))
149     (defgeneric even-scaling-transformation-p (transformation))
150     (defgeneric scaling-transformation-p (transformation))
151     (defgeneric rectilinear-transformation-p (transformation))
152    
153 gbaumann 1.33 ;;; 5.3.2 Composition of Transformations
154    
155     (defgeneric compose-transformations (transformation1 transformation2))
156     (defgeneric invert-transformation (transformation))
157     (declfun compose-translation-with-transformation (transformation dx dy))
158     (declfun compose-scaling-with-transformation (transformation sx sy &optional origin))
159     (declfun compose-rotation-with-transformation (transformation angle &optional origin))
160     (declfun compose-transformation-with-translation (transformation dx dy))
161     (declfun compose-transformation-with-scaling (transformation sx sy &optional origin))
162     (declfun compose-transformation-with-rotation (transformation angle &optional origin))
163    
164     ;;; 5.3.3 Applying Transformations
165    
166     (defgeneric transform-region (transformation region))
167     (defgeneric untransform-region (transformation region))
168     (defgeneric transform-position (transformation x y))
169     (defgeneric untransform-position (transformation x y))
170     (defgeneric transform-distance (transformation dx dy))
171     (defgeneric untransform-distance (transformation dx dy))
172     (defgeneric transform-rectangle* (transformation x1 y1 x2 y2))
173     (defgeneric untransform-rectangle* (transformation x1 y1 x2 y2))
174    
175 crhodes 1.39 ;;; 7.2.1 Sheet Relationship Functions
176    
177     (defgeneric sheet-parent (sheet))
178     (defgeneric sheet-children (sheet))
179     (defgeneric sheet-adopt-child (sheet child))
180     (defgeneric sheet-disown-child (sheet child &key errorp))
181     (defgeneric sheet-siblings (sheet))
182     (defgeneric sheet-enabled-children (sheet))
183     (defgeneric sheet-ancestor-p (sheet putative-ancestor))
184     (defgeneric raise-sheet (sheet))
185     (defgeneric bury-sheet (sheet))
186     (defgeneric reorder-sheets (sheet new-ordering))
187     (defgeneric sheet-enabled-p (sheet))
188     (defgeneric (setf sheet-enabled-p) (enabled-p sheet))
189     (defgeneric sheet-viewable-p (sheet))
190     (defgeneric sheet-occluding-sheets (sheet child))
191     (defgeneric map-over-sheets (function sheet))
192    
193 gbaumann 1.33 ;;; 7.3.1 Sheet Geometry Functions [complete]
194    
195     (defgeneric sheet-transformation (sheet))
196     (defgeneric (setf sheet-transformation) (transformation sheet))
197     (defgeneric sheet-region (sheet))
198     (defgeneric (setf sheet-region) (region sheet))
199     (defgeneric move-sheet (sheet x y))
200     (defgeneric resize-sheet (sheet width height))
201     (defgeneric move-and-resize-sheet (sheet x y width height))
202     (defgeneric map-sheet-position-to-parent (sheet x y))
203     (defgeneric map-sheet-position-to-child (sheet x y))
204     (defgeneric map-sheet-rectangle*-to-parent (sheet x1 y1 x2 y2))
205     (defgeneric map-sheet-rectangle*-to-child (sheet x1 y1 x2 y2))
206     (defgeneric map-over-sheets-containing-position (function sheet x y))
207     (defgeneric map-over-sheets-overlapping-region (function sheet region))
208     (defgeneric child-containing-position (sheet x y))
209     (defgeneric children-overlapping-region (sheet region))
210     (defgeneric children-overlapping-rectangle* (sheet x1 y1 x2 y2))
211     (defgeneric sheet-delta-transformation (sheet ancestor))
212     (defgeneric sheet-allocated-region (sheet child))
213    
214     ;;; 7.3.2
215    
216     ;; sheet-identity-transformation-mixin [class]
217     ;; sheet-translation-mixin [class]
218     ;; sheet-y-inverting-transformation-mixin [class]
219     ;; sheet-transformation-mixin [class]
220    
221 moore 1.28 ;;;; 8.1
222     (defgeneric process-next-event (port &key wait-function timeout))
223    
224 tmoore 1.36 ;;; 8.2 Standard Device Events
225    
226     (defgeneric event-timestamp (event))
227 crhodes 1.39 (defgeneric event-type (event))
228     (defgeneric event-sheet (device-event))
229     (defgeneric event-modifier-state (device-event))
230     (defgeneric keyboard-event-key-name (keyboard-event))
231     (defgeneric keyboard-event-character (keyboard-event))
232     (defgeneric pointer-event-x (pointer-event))
233     (defgeneric pointer-event-y (pointer-event))
234     (defgeneric pointer-event-native-x (pointer-event))
235     (defgeneric pointer-event-native-y (pointer-event))
236     (defgeneric pointer-event-pointer (pointer-event))
237     (defgeneric pointer-event-button (pointer-button-event))
238     (defgeneric pointer-boundary-event-kind (pointer-boundary-event))
239     (defgeneric window-event-region (window-event))
240     (defgeneric window-event-native-region (window-event))
241     (defgeneric window-event-mirrored-sheet (window-event))
242    
243     ;;; 8.3.1 Output Properties
244    
245     (defgeneric medium-foreground (medium))
246     (defgeneric (setf medium-foreground) (design medium))
247     (defgeneric medium-background (medium))
248     (defgeneric (setf medium-background) (design medium))
249     (defgeneric medium-ink (medium))
250     (defgeneric (setf medium-ink) (design medium))
251     (defgeneric medium-transformation (medium))
252     (defgeneric (setf medium-transformation) (transformation medium))
253     (defgeneric medium-clipping-region (medium))
254     (defgeneric (setf medium-clipping-region) (region medium))
255     (defgeneric medium-line-style (medium))
256     (defgeneric (setf medium-line-style) (line-style medium))
257     (defgeneric medium-text-style (medium))
258     (defgeneric (setf medium-text-style) (text-style medium))
259     (defgeneric medium-default-text-style (medium))
260     (defgeneric (setf medium-default-text-style) (text-style medium))
261     (defgeneric medium-merged-text-style (medium))
262    
263 tmoore 1.36
264 gilbert 1.5 ;;;; 8.3.4 Associating a Medium with a Sheet
265    
266     ;; with-sheet-medium (medium sheet) &body body [Macro]
267     ;; with-sheet-medium-bound (sheet medium) &body body [Macro]
268    
269 adejneka 1.11 (defgeneric sheet-medium (sheet))
270     (defgeneric medium-sheet (medium))
271     (defgeneric medium-drawable (medium))
272 gilbert 1.5
273 gbaumann 1.33 ;;; 8.3.4.1 Grafting and Degrafting of Mediums
274 gilbert 1.2
275     (defgeneric allocate-medium (port sheet))
276     (defgeneric deallocate-medium (port medium))
277     (defgeneric make-medium (port sheet))
278     (defgeneric engraft-medium (medium port sheet))
279     (defgeneric degraft-medium (medium port sheet))
280    
281 gbaumann 1.33 ;;; 8.4.1 Repaint Protocol Functions
282 gilbert 1.2
283     (defgeneric queue-repaint (sheet repaint-event))
284     (defgeneric handle-repaint (sheet region))
285     (defgeneric repaint-sheet (sheet region))
286    
287 gbaumann 1.33 ;;;; 9 Ports, Grafts, and Mirrored Sheets
288 gilbert 1.2
289     ;; (defgeneric portp (object))
290     ;; find-port function
291    
292 crhodes 1.39 ;;; 9.2 Ports
293    
294     (defgeneric port (object))
295     (defgeneric port-server-path (port))
296     (defgeneric port-name (port))
297     (defgeneric port-type (port))
298     (defgeneric port-properties (port indicator))
299     (defgeneric (setf port-properties) (property port indicator))
300     (defgeneric restart-port (port))
301     (defgeneric destroy-port (port))
302    
303 gbaumann 1.33 ;;; 9.3 Grafts
304    
305     (defgeneric sheet-grafted-p (sheet))
306     (declfun find-graft (&key (server-path *default-server-path*)
307     (port (find-port :server-path server-path))
308     (orientation :default)
309     (units :device)))
310     (defgeneric graft (object))
311     (declfun map-over-grafts (function port))
312     ;; with-graft-locked (graft) &body body [macro]
313     (defgeneric graft-orientation (graft))
314     (defgeneric graft-units (graft))
315     (defgeneric graft-width (graft &key units))
316     (defgeneric graft-height (graft &key units))
317     (declfun graft-pixels-per-millimeter (graft))
318     (declfun graft-pixels-per-inch (graft))
319    
320 gilbert 1.2 ;; 9.4.1 Mirror Functions
321    
322     (defgeneric sheet-direct-mirror (sheet))
323     (defgeneric sheet-mirrored-ancestor (sheet))
324     (defgeneric sheet-mirror (sheet))
325     (defgeneric realize-mirror (port mirrored-sheet))
326     (defgeneric destroy-mirror (port mirrored-sheet))
327     (defgeneric raise-mirror (port sheet))
328     (defgeneric bury-mirror (port sheet))
329    
330     ;; 9.4.2 Internal Interfaces for Native Coordinates
331    
332     (defgeneric sheet-native-transformation (sheet))
333     (defgeneric sheet-native-region (sheet))
334     (defgeneric sheet-device-transformation (sheet))
335     (defgeneric sheet-device-region (sheet))
336     (defgeneric invalidate-cached-transformations (sheet))
337     (defgeneric invalidate-cached-regions (sheet))
338    
339     ;;; Graphics ops
340    
341     (defgeneric medium-draw-point* (medium x y))
342     (defgeneric medium-draw-points* (medium coord-seq))
343     (defgeneric medium-draw-line* (medium x1 y1 x2 y2))
344     (defgeneric medium-draw-lines* (medium coord-seq))
345     (defgeneric medium-draw-polygon* (medium coord-seq closed filled))
346     (defgeneric medium-draw-rectangle* (medium left top right bottom filled))
347     (defgeneric medium-draw-ellipse* (medium center-x center-y
348     radius-1-dx radius-1-dy radius-2-dx radius-2-dy
349     start-angle end-angle filled))
350 brian 1.4 (defgeneric medium-draw-circle* (medium center-x center-y radius start-angle end-angle filled))
351 gilbert 1.2 (defgeneric medium-draw-text* (medium string x y
352     start end
353     align-x align-y
354     toward-x toward-y transform-glyphs))
355 moore 1.28
356 crhodes 1.39 ;;; 10.1 Medium Components
357     ;;;
358     ;;; For reasons that are beyond me, many of the medium component
359     ;;; accessors are also specified in section 8.3.1.
360    
361     (defgeneric medium-current-text-style (medium))
362    
363 moore 1.28 ;;;; 10.2
364     (defgeneric invoke-with-drawing-options
365     (medium continuation &rest drawing-options &key &allow-other-keys))
366    
367 tmoore 1.31 ;;;; 10.2.1
368     (defgeneric invoke-with-identity-transformation (medium continuation))
369    
370     ;;;; 10.2.2
371     (defgeneric invoke-with-local-coordinates (medium continuation x y))
372    
373     (defgeneric invoke-with-first-quadrant-coordinates (medium continuation x y))
374 moore 1.28
375 crhodes 1.39 ;;; 11.1.1 Text Style Protocol and Text Style Suboptions
376    
377     (defgeneric text-style-components (text-style))
378     (defgeneric text-style-family (text-style))
379     (defgeneric text-style-face (text-style))
380     (defgeneric text-style-size (text-style))
381     (defgeneric merge-text-styles (style1 style2))
382     (defgeneric text-style-ascent (text-style medium))
383     (defgeneric text-style-descent (text-style medium))
384     (defgeneric text-style-height (text-style medium))
385     (defgeneric text-style-width (text-style medium))
386     (defgeneric text-style-fixed-width-p (text-style medium))
387     (defgeneric text-size (medium string &key text-style start end))
388    
389     ;;; 11.2 Text Style Binding Forms
390    
391     (defgeneric invoke-with-text-style (medium continuation text-style))
392    
393     ;;; 12.7.3 Other Medium-specific Output Functions
394    
395     (defgeneric medium-finish-output (medium))
396     (defgeneric medium-force-output (medium))
397     (defgeneric medium-clear-area (medium left top right bottom))
398     (defgeneric medium-beep (medium))
399    
400 moore 1.28 ;;;; 14.5
401     (defgeneric draw-design
402     (medium design
403     &key ink clipping-region transformation line-style line-thickness
404     line-unit line-dashes line-joint-shape line-cap-shape text-style
405     text-family text-face text-size))
406    
407 gbaumann 1.33 ;;; 15.3 The Text Cursor [complete]
408    
409     ;;; 15.3.1 Text Cursor Protocol [complete]
410    
411     ;; cursor [protocol class]
412     ;; cursorp object [protocol predicate]
413     ;; :sheet [Initarg for cursor]
414     ;; standard-text-cursor [class]
415     (defgeneric cursor-sheet (cursor))
416     (defgeneric cursor-position (cursor))
417     ;;(defgeneric (setf* cursor-position) (x y cursor))
418     (defgeneric cursor-active (cursor))
419     (defgeneric (setf cursor-active) (value cursor))
420     (defgeneric cursor-state (cursor))
421     (defgeneric (setf cursor-state) (value cursor))
422     (defgeneric cursor-focus (cursor))
423     (defgeneric cursor-visibility (cursor))
424     (defgeneric (setf cursor-visibility) (visibility cursor))
425    
426     ;;; 15.3.2 Stream Text Cursor Protocol [complete]
427    
428     (defgeneric stream-text-cursor (stream))
429     (defgeneric (setf stream-text-cursor) (cursor stream))
430     (defgeneric stream-cursor-position (stream))
431     ;; (defgeneric (setf* stream-cursor-position) (x y stream)) unsure how to declare this, can somebody help? --GB
432     (defgeneric stream-increment-cursor-position (stream dx dy))
433    
434     ;;; 15.4 Text Protocol [complete]
435    
436     (defgeneric stream-character-width (stream character &key text-style))
437     (defgeneric stream-string-width (stream character &key start end text-style))
438     (defgeneric stream-text-margin (stream))
439     (defgeneric (setf stream-text-margin) (margin stream))
440     (defgeneric stream-line-height (stream &key text-style))
441     (defgeneric stream-vertical-spacing (stream))
442     (defgeneric stream-baseline (stream))
443    
444     ;;; 15.4.1 Mixing Text and Graphics [complete]
445    
446     ;; with-room-for-graphics (&optional stream &key (first-quadrant t) height (move-cursor t) record-type) &body body [Macro]
447    
448     ;;; 15.4.2 Wrapping of Text Lines [complete]
449    
450     (defgeneric stream-end-of-line-action (stream))
451     (defgeneric (setf stream-end-of-line-action) (action stream))
452     ;; with-end-of-line-action (stream action) &body body [Macro]
453     (defgeneric stream-end-of-page-action (stream))
454     (defgeneric (setf stream-end-of-page-action) (action stream))
455     ;; with-end-of-page-action (stream action) &body body [Macro]
456    
457 crhodes 1.39 ;;; 15.5 Attracting the User's Attention
458    
459     (defgeneric beep (&optional medium))
460    
461     ;;; 15.6 Buffering of Output
462    
463     (defgeneric medium-buffering-output-p (medium))
464     (defgeneric (setf medium-buffering-output-p) (buffer-p medium))
465    
466     ;;; 16.3.3 Text Displayed Output Record
467    
468     (defgeneric add-character-output-to-text-record
469     (text-record character text-style width height baseline))
470 gbaumann 1.33
471 crhodes 1.39 (defgeneric add-string-output-to-text-record
472     (text-record string start end text-style width height baseline))
473    
474     (defgeneric text-displayed-output-record-string (text-record))
475    
476     ;;; 16.4.1. The Output Recording Stream Protocol
477    
478     (defgeneric stream-recording-p (stream))
479     (defgeneric (setf stream-recording-p) (recording-p stream))
480     (defgeneric stream-drawing-p (stream))
481     (defgeneric (setf stream-drawing-p) (drawing-p stream))
482     (defgeneric stream-output-history (stream))
483     (defgeneric stream-current-output-record (stream))
484     (defgeneric (setf stream-current-output-record) (record stream))
485     (defgeneric stream-add-output-record (stream record))
486     (defgeneric stream-replay (stream &optional region))
487     (defgeneric erase-output-record (record stream &optional errorp))
488    
489     ;;; 16.4.3. Text Output Recording
490 gbaumann 1.33 (defgeneric stream-text-output-record (stream text-style))
491     (defgeneric stream-close-text-output-record (stream))
492 crhodes 1.39 (defgeneric stream-add-character-output
493     (stream character text-style width height baseline))
494     (defgeneric stream-add-string-output
495     (stream string start end text-style width height baseline))
496 gbaumann 1.33
497     ;;; 16.4.4 Output Recording Utilities [complete]
498    
499     ;; with-output-recording-options (stream &key record draw) &body body [Macro]
500 crhodes 1.39 (defgeneric invoke-with-output-recording-options
501     (stream continuation record draw))
502    
503     ;;; with-new-output-record (stream &optional record-type record &rest initargs) &body body [Macro]
504    
505     ;;; The 'constructor' arg is absent from the CLIM 2.0 spec but is documented
506     ;;; in the Allegro CLIM 2 User Guide and appears to exist in other 'classic'
507     ;;; CLIM implementations. I'm assuming it's an omission from the spec.
508     (defgeneric invoke-with-new-output-record
509     (stream continuation record-type constructor &key &allow-other-keys))
510    
511     ;;; with-output-to-output-record (stream &optional record-type record &rest initargs)) &body body [Macro]
512     (defgeneric invoke-with-output-to-output-record
513     (stream continuation record-type constructor
514     &rest initargs &key &allow-other-keys))
515    
516 gbaumann 1.33 (defgeneric make-design-from-output-record (record))
517    
518 moore 1.28 ;;;; 21.2
519     (defgeneric invoke-updating-output
520     (stream continuation record-type unique-id id-test cache-value cache-test
521 rstrandh 1.30 &key fixed-position all-new parent-cache))
522 moore 1.28
523 crhodes 1.39 ;;; 22.2.1 The Extended Stream Input Protocol
524    
525     (defgeneric stream-input-buffer (stream))
526     (defgeneric (setf stream-input-buffer) (buffer stream))
527     (defgeneric stream-pointer-position (stream &key pointer))
528     ;; (defgeneric (setf* stream-pointer-position))
529     (defgeneric stream-set-input-focus (stream))
530     (defgeneric stream-read-gesture
531     (stream &key timeout peek-p input-wait-test
532     input-wait-handler pointer-button-press-handler))
533     (defgeneric stream-input-wait (stream &key timeout input-wait-test))
534     (defgeneric stream-unread-gesture (stream gesture))
535    
536     ;;; 22.2.2 Extended Input Stream Conditions
537    
538     (defgeneric abort-gesture-event (condition))
539     (defgeneric accelerator-gesture-event (condition))
540     (defgeneric accelerator-gesture-numeric-argument (condition))
541    
542     ;;; 23.5 Context-dependent (Typed) Input
543    
544     (defgeneric stream-accept
545     (stream
546     type &key view default default-type provide-default insert-default
547     replace-input history active-p prompt prompt-mode display-default
548     query-identifier activation-gestures additional-activation-gestures
549     delimiter-gestures additional-delimiter-gestures))
550     (defgeneric prompt-for-accept (stream type view &rest accept-args &key))
551    
552     ;;; 24.1 The Input Editor
553    
554     (defgeneric input-editor-format (stream format-string &rest args))
555    
556     ;;; 24.1.1 The Input Editing Stream Protocol
557    
558     (defgeneric stream-insertion-pointer (stream))
559     (defgeneric (setf stream-insertion-pointer) (pointer stream))
560     (defgeneric stream-scan-pointer (stream))
561     (defgeneric (setf stream-scan-pointer) (pointer stream))
562     (defgeneric stream-rescanning-p (stream))
563     (defgeneric reset-scan-pointer (stream &optional scan-pointer))
564     (defgeneric immediate-rescan (stream))
565     (defgeneric queue-rescan (stream))
566     (defgeneric rescan-if-necessary (stream &optional inhibit-activation))
567     (defgeneric erase-input-buffer (stream &optional start-position))
568    
569     ;;; McCLIM relies on a text editor class (by default
570 thenriksen 1.40 ;;; DREI-INPUT-EDITING-MIXIN) to perform the user interaction and
571 crhodes 1.39 ;;; display for input editing. Also, that class must update the stream
572     ;;; buffer and the insertion pointer, cause rescans to happen, and
573     ;;; handle activation gestures.
574     (defgeneric stream-process-gesture (stream gesture type))
575    
576     ;;; 24.4 Reading and Writing of Tokens
577    
578     (defgeneric replace-input
579     (stream new-input &key start end buffer-start rescan))
580 moore 1.28 (defgeneric presentation-replace-input
581     (stream object type view
582     &key buffer-start rescan query-identifier for-context-type))
583    
584 crhodes 1.39 ;;; 28.2 Specifying the Panes of a Frame
585    
586     (defgeneric destroy-frame (frame))
587     (defgeneric raise-frame (frame))
588     (defgeneric bury-frame (frame))
589    
590     ;;; 28.3 Application Frame Functions
591    
592     (defgeneric frame-name (frame))
593     (defgeneric frame-pretty-name (frame))
594     (defgeneric (setf frame-pretty-name) (name frame))
595     (defgeneric frame-command-table (frame))
596     (defgeneric (setf frame-command-table) (command-table frame))
597     (defgeneric frame-standard-output (frame))
598     (defgeneric frame-standard-input (frame))
599     (defgeneric frame-query-io (frame))
600     (defgeneric frame-error-output (frame))
601     (defgeneric frame-pointer-documentation-output (frame))
602     (defgeneric frame-calling-frame (frame))
603     (defgeneric frame-parent (frame))
604     (defgeneric frame-panes (frame))
605     (defgeneric frame-top-level-sheet (frame))
606     (defgeneric frame-current-panes (frame))
607     (defgeneric get-frame-pane (frame pane-name))
608     (defgeneric fine-pane-named (frame pane-name))
609     (defgeneric frame-current-layout (frame))
610     (defgeneric (setf frame-current-layout) (layout frame))
611     (defgeneric frame-all-layouts (frame))
612     (defgeneric layout-frame (frame &optional width height))
613     (defgeneric frame-exit-frame (condition))
614     (defgeneric frame-exit (frame))
615     (defgeneric pane-needs-redisplay (pane))
616     (defgeneric (setf pane-needs-redisplay) (value pane))
617     (defgeneric redisplay-frame-pane (frame pane &key force-p))
618     (defgeneric redisplay-frame-panes (frame &key force-p))
619     (defgeneric frame-replay (frame stream &optional region))
620     (defgeneric notify-user (frame message &key associated-window title
621     documentation exit-boxes name style text-style))
622     (defgeneric frame-properties (frame property))
623     (defgeneric (setf frame-properties) (value frame property))
624    
625     ;;; 28.3.1 Interface with Presentation Types
626    
627     (defgeneric frame-maintain-presentation-histories (frame))
628 moore 1.28 (defgeneric frame-find-innermost-applicable-presentation
629     (frame input-context stream x y &key event))
630 crhodes 1.39 (defgeneric frame-input-context-button-press-handler
631     (frame stream button-prees-event))
632     (defgeneric frame-document-highlighted-presentation
633     (frame presentation input-context window-context x y stream))
634     (defgeneric frame-drag-and-drop-feedback
635     (frame presentation stream initial-x initial-y new-x new-y state))
636     (defgeneric frame-drag-and-drop-highlighting
637     (frame presentation stream state))
638 moore 1.28
639     ;;;; 28.4
640     (defgeneric default-frame-top-level
641     (frame &key command-parser command-unparser partial-command-parser prompt))
642     (defgeneric read-frame-command (frame &key stream))
643     (defgeneric run-frame-top-level (frame &key &allow-other-keys))
644 moore 1.29 (defgeneric command-enabled (command-name frame))
645     (defgeneric (setf command-name) (enabled command-name frame))
646    
647 crhodes 1.39 ;;;; 28.5.2 Frame Manager Operations
648    
649     (defgeneric frame-manager (frame))
650     (defgeneric (setf frame-manager) (frame-manager frame))
651     (defgeneric frame-manager-frames (frame-manager))
652     (defgeneric adopt-frame (frame-manager frame))
653     (defgeneric disown-frame (frame-manager frame))
654     (defgeneric frame-state (frame))
655     (defgeneric enable-frame (frame))
656     (defgeneric disable-frame (frame))
657     (defgeneric shrink-frame (frame))
658    
659     (defgeneric note-frame-enabled (frame-manager frame))
660     (defgeneric note-frame-disabled (frame-manager frame))
661     (defgeneric note-frame-iconified (frame-manager frame))
662     (defgeneric note-frame-deiconified (frame-manager frame))
663 moore 1.29 (defgeneric note-command-enabled (frame-manager frame command-name))
664     (defgeneric note-command-disabled (frame-manager frame command-name))
665 moore 1.28
666 crhodes 1.39 (defgeneric frame-manager-notify-user
667     (framem message-string &key frame associated-window title
668     documentation exit-boxes name style text-style))
669     (defgeneric generate-panes (frame-manager frame))
670     (defgeneric find-pane-for-frame (frame-manager frame))
671    
672     ;;; 28.5.3 Frame Manager Settings
673    
674     (defgeneric (setf client-setting) (value frame setting))
675     (defgeneric reset-frame (frame &rest client-settings))
676    
677 moore 1.28 ;;;; 29.2
678     ;;;;
679     ;;;; FIXME: should we have &key &allow-other-keys here, to cause
680     ;;;; initarg checking? Probably.
681     (defgeneric make-pane-1 (realizer frame abstract-class-name &rest initargs))
682 gilbert 1.2
683 gilbert 1.5 ;;;; 29.2.2 Pane Properties
684    
685     (defgeneric pane-frame (pane))
686     (defgeneric pane-name (pane))
687     (defgeneric pane-foreground (pane))
688     (defgeneric pane-background (pane))
689     (defgeneric pane-text-style (pane))
690    
691     ;;;; 29.3.3 Scroller Pane Classes
692    
693     (defgeneric pane-viewport (pane))
694     (defgeneric pane-viewport-region (pane))
695     (defgeneric pane-scroller (pane))
696     (defgeneric scroll-extent (pane x y))
697    
698 gilbert 1.6 ;;;; 29.3.4 The Layout Protocol
699    
700     ;; (define-protocol-class space-requirement ())
701    
702     ;; make-space-requirement &key (width 0) (max-width 0) (min-width 0) (height 0) (max-height 0) (min-height 0) [Function]
703    
704     (defgeneric space-requirement-width (space-req))
705     (defgeneric space-requirement-min-width (space-req))
706     (defgeneric space-requirement-max-width (space-req))
707     (defgeneric space-requirement-height (space-req))
708     (defgeneric space-requirement-min-height (space-req))
709     (defgeneric space-requirement-max-height (space-req))
710     (defgeneric space-requirement-components (space-req))
711    
712     ;; space-requirement-combine function sr1 sr2 [Function]
713     ;; space-requirement+ sr1 sr2 [Function]
714     ;; space-requirement+* space-req &key width min-width max-width height min-height max-height [Function]
715    
716 rgoldman 1.34 (defgeneric compose-space (pane &key width height)
717     (:documentation "During the space composition pass, a composite pane will
718     typically ask each of its children how much space it requires by calling COMPOSE-SPACE.
719     They answer by returning space-requirement objects. The composite will then form
720     its own space requirement by composing the space requirements of its children
721     according to its own rules for laying out its children.
722    
723     Returns a SPACE-REQUIREMENT object."))
724 gilbert 1.6 (defgeneric allocate-space (pane width height))
725 adejneka 1.11 (defgeneric change-space-requirements
726 hefner1 1.27 (pane &rest space-req-keys &key resize-frame width height
727     min-width min-height max-width max-height))
728 gilbert 1.6 (defgeneric note-space-requirements-changed (sheet pane))
729     ;; changing-space-requirements (&key resize-frame layout) &body body [Macro]
730    
731     ;;;; 29.4.4 CLIM Stream Pane Functions
732    
733     (defgeneric window-clear (window))
734     (defgeneric window-refresh (window))
735     (defgeneric window-viewport (window))
736     (defgeneric window-erase-viewport (window))
737     (defgeneric window-viewport-position (window))
738     ;; (defgeneric (setf* window-viewport-position) (x y window))
739    
740 crhodes 1.39 ;;; D.2 Basic Stream Functions
741    
742     ;;; Gray Streamoid functions, but not part of any Gray proposal.
743     (defgeneric stream-pathname (stream))
744     (defgeneric stream-truename (stream))
745    
746 gilbert 1.8 ;;;;
747 gilbert 1.23 (defgeneric gadget-value (gadget))
748     (defgeneric (setf gadget-value) (new-value gadget &key invoke-callback))
749     (defgeneric gadget-min-value (gadget))
750     (defgeneric gadget-max-value (gadget))
751 gilbert 1.8 (defgeneric (setf gadget-max-value) (new-value gadget))
752     (defgeneric (setf gadget-min-value) (new-value gadget))
753     (defgeneric (setf scroll-bar-thumb-size) (new-value scroll-bar))
754     (defgeneric gadget-orientation (gadget))
755     (defgeneric gadget-client (gadget))
756    
757 gilbert 1.2 ;;;
758    
759 adejneka 1.16 (defgeneric text-style-mapping (port text-style &optional character-set))
760    
761     (defgeneric (setf text-style-mapping)
762     (mapping port text-style &optional character-set))
763 adejneka 1.19 (defgeneric medium-miter-limit (medium)
764     (:documentation
765     "If LINE-STYLE-JOINT-SHAPE is :MITER and the angle between two
766     consequent lines is less than the values return by
767     MEDIUM-MITER-LIMIT, :BEVEL is used instead."))
768 adejneka 1.15 (defgeneric line-style-effective-thickness (line-style medium)
769     (:documentation
770     "Returns the thickness in device units of a line,
771     rendered on MEDIUM with the style LINE-STYLE."))
772    
773 gilbert 1.5 ;;;
774    
775     (defgeneric text-style-character-width (text-style medium char))
776 adejneka 1.13 ;; fall back, where to put this?
777     (defmethod text-style-character-width (text-style medium char)
778     (text-size medium char :text-style text-style))
779 gilbert 1.23
780     (declfun draw-rectangle (sheet point1 point2
781     &rest args
782     &key (filled t)
783     ink clipping-region transformation line-style line-thickness
784     line-unit line-dashes line-joint-shape))
785    
786     (declfun draw-rectangle* (sheet x1 y1 x2 y2
787     &rest args
788     &key (filled t)
789     ink clipping-region transformation line-style line-thickness
790     line-unit line-dashes line-joint-shape))
791 gilbert 1.5
792     ;;; "exported" from a port
793    
794     (defgeneric mirror-transformation (port mirror))
795     (defgeneric port-set-sheet-region (port sheet region))
796     (defgeneric port-set-sheet-transformation (port sheet region))
797 adejneka 1.17 (defgeneric port-text-style-mappings (port))
798 gilbert 1.5 (defgeneric port-lookup-mirror (port sheet))
799     (defgeneric port-register-mirror (port sheet mirror))
800     (defgeneric port-allocate-pixmap (port sheet width height))
801     (defgeneric port-deallocate-pixmap (port pixmap))
802     (defgeneric port-mirror-width (port sheet))
803     (defgeneric port-mirror-height (port sheet))
804 gilbert 1.7 (defgeneric port-enable-sheet (port sheet))
805     (defgeneric port-disable-sheet (port sheet))
806 moore 1.22 (defgeneric port-pointer (port))
807 gilbert 1.2
808 tmoore 1.37 (defgeneric pointer-update-state (pointer event)
809     (:documentation "Called by port event dispatching code to update the modifier
810     and button states of the pointer."))
811    
812 gilbert 1.1 ;;;
813    
814 gilbert 1.8 ;; Used in stream-input.lisp, defined in frames.lisp
815     (defgeneric frame-event-queue (frame))
816 gilbert 1.1
817 moore 1.10 ;;; Used in presentations.lisp, defined in commands.lisp
818    
819     (defgeneric presentation-translators (command-table))
820 gilbert 1.1
821 adejneka 1.21 (defgeneric stream-default-view (stream))
822 adejneka 1.20
823 gilbert 1.26 ;;; ----------------------------------------------------------------------
824    
825     (defgeneric output-record-basline (record)
826     (:documentation
827     "Returns two values: the baseline of an output record and a boolean
828     indicating if this baseline is definitive. McCLIM addition."))
829    
830 tmoore 1.36 (defgeneric encapsulating-stream-stream (encapsulating-stream)
831     (:documentation "The stream encapsulated by an encapsulating stream"))
832    
833 gilbert 1.5 #||
834    
835     Further undeclared functions
836    
837     FRAME-EVENT-QUEUE FRAME-EXIT PANE-FRAME
838     ALLOCATE-SPACE COMPOSE-SPACE FIND-INNERMOST-APPLICABLE-PRESENTATION
839     HIGHLIGHT-PRESENTATION-1 PANE-DISPLAY-FUNCTION PANE-DISPLAY-TIME PANE-NAME
840     PRESENTATION-OBJECT PRESENTATION-TYPE SPACE-REQUIREMENT-HEIGHT
841     SPACE-REQUIREMENT-WIDTH THROW-HIGHLIGHTED-PRESENTATION WINDOW-CLEAR
842    
843     (SETF GADGET-MAX-VALUE) (SETF GADGET-MIN-VALUE) (SETF SCROLL-BAR-THUMB-SIZE)
844     SLOT-ACCESSOR-NAME::|CLIM-INTERNALS CLIENT slot READER| DRAW-EDGES-LINES*
845     FORMAT-CHILDREN GADGET-VALUE MAKE-MENU-BAR TABLE-PANE-NUMBER
846     MEDIUM WITH-GRAPHICS-STATE
847     PORT-MIRROR-HEIGHT PORT-MIRROR-WIDTH TEXT-STYLE-CHARACTER-WIDTH
848     FIND-INNERMOST-APPLICABLE-PRESENTATION HIGHLIGHT-PRESENTATION-1
849     PRESENTATION-OBJECT PRESENTATION-TYPE THROW-HIGHLIGHTED-PRESENTATION
850     FORMAT-CHILDREN TABLE-PANE-NUMBER TEXT-STYLE-CHARACTER-WIDTH
851     PORT-MIRROR-HEIGHT PORT-MIRROR-WIDTH SCROLL-EXTENT TEXT-STYLE-CHARACTER-WIDTH
852     FRAME-EVENT-QUEUE FRAME-EXIT PANE-FRAME
853     ALLOCATE-SPACE COMPOSE-SPACE FIND-INNERMOST-APPLICABLE-PRESENTATION
854     HIGHLIGHT-PRESENTATION-1 PANE-DISPLAY-FUNCTION PANE-DISPLAY-TIME PANE-NAME
855     PRESENTATION-OBJECT PRESENTATION-TYPE SPACE-REQUIREMENT-HEIGHT
856     SPACE-REQUIREMENT-WIDTH THROW-HIGHLIGHTED-PRESENTATION WINDOW-CLEAR
857     (SETF GADGET-MAX-VALUE) (SETF GADGET-MIN-VALUE) (SETF SCROLL-BAR-THUMB-SIZE)
858     SLOT-ACCESSOR-NAME::|CLIM-INTERNALS CLIENT slot READER| DRAW-EDGES-LINES*
859     FORMAT-CHILDREN GADGET-VALUE MAKE-MENU-BAR TABLE-PANE-NUMBER
860 gilbert 1.1
861 gilbert 1.23 ||#

  ViewVC Help
Powered by ViewVC 1.1.5