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

Contents of /mcclim/decls.lisp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.46 - (hide annotations)
Wed Feb 7 12:44:16 2007 UTC (7 years, 2 months ago) by crhodes
Branch: MAIN
Changes since 1.45: +3 -0 lines
New click-to-focus policy for text-editor gadgets and panes, implemented
for the CLX, Null and gtkairo backends (but gtk_window_get_focus()
hand-inserted into gtkairo/ffi.lisp).

PORT-KEYBOARD-INPUT-FOCUS is now a trampoline to
PORT-FRAME-KEYBOARD-INPUT-FOCUS, a per-port function to set the keyboard
focus for a particular frame.  Not implemented for Beagle or OpenGL
backends.

Now Drei / Goatee gadgets don't have to do their own keyboard
focus handling on arm/disarm any more.  Various kludges sprinkled all
over the place to make this so.
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 crhodes 1.46 (defgeneric port-keyboard-input-focus (port))
225     (defgeneric (setf port-keyboard-input-focus) (focus port))
226    
227 tmoore 1.36 ;;; 8.2 Standard Device Events
228    
229     (defgeneric event-timestamp (event))
230 crhodes 1.39 (defgeneric event-type (event))
231     (defgeneric event-sheet (device-event))
232     (defgeneric event-modifier-state (device-event))
233     (defgeneric keyboard-event-key-name (keyboard-event))
234     (defgeneric keyboard-event-character (keyboard-event))
235     (defgeneric pointer-event-x (pointer-event))
236     (defgeneric pointer-event-y (pointer-event))
237     (defgeneric pointer-event-native-x (pointer-event))
238     (defgeneric pointer-event-native-y (pointer-event))
239     (defgeneric pointer-event-pointer (pointer-event))
240     (defgeneric pointer-event-button (pointer-button-event))
241     (defgeneric pointer-boundary-event-kind (pointer-boundary-event))
242     (defgeneric window-event-region (window-event))
243     (defgeneric window-event-native-region (window-event))
244     (defgeneric window-event-mirrored-sheet (window-event))
245    
246     ;;; 8.3.1 Output Properties
247    
248     (defgeneric medium-foreground (medium))
249     (defgeneric (setf medium-foreground) (design medium))
250     (defgeneric medium-background (medium))
251     (defgeneric (setf medium-background) (design medium))
252     (defgeneric medium-ink (medium))
253     (defgeneric (setf medium-ink) (design medium))
254     (defgeneric medium-transformation (medium))
255     (defgeneric (setf medium-transformation) (transformation medium))
256     (defgeneric medium-clipping-region (medium))
257     (defgeneric (setf medium-clipping-region) (region medium))
258     (defgeneric medium-line-style (medium))
259     (defgeneric (setf medium-line-style) (line-style medium))
260     (defgeneric medium-text-style (medium))
261     (defgeneric (setf medium-text-style) (text-style medium))
262     (defgeneric medium-default-text-style (medium))
263     (defgeneric (setf medium-default-text-style) (text-style medium))
264     (defgeneric medium-merged-text-style (medium))
265    
266 tmoore 1.36
267 gilbert 1.5 ;;;; 8.3.4 Associating a Medium with a Sheet
268    
269     ;; with-sheet-medium (medium sheet) &body body [Macro]
270     ;; with-sheet-medium-bound (sheet medium) &body body [Macro]
271    
272 adejneka 1.11 (defgeneric sheet-medium (sheet))
273     (defgeneric medium-sheet (medium))
274     (defgeneric medium-drawable (medium))
275 gilbert 1.5
276 gbaumann 1.33 ;;; 8.3.4.1 Grafting and Degrafting of Mediums
277 gilbert 1.2
278     (defgeneric allocate-medium (port sheet))
279     (defgeneric deallocate-medium (port medium))
280     (defgeneric make-medium (port sheet))
281     (defgeneric engraft-medium (medium port sheet))
282     (defgeneric degraft-medium (medium port sheet))
283    
284 gbaumann 1.33 ;;; 8.4.1 Repaint Protocol Functions
285 gilbert 1.2
286     (defgeneric queue-repaint (sheet repaint-event))
287     (defgeneric handle-repaint (sheet region))
288     (defgeneric repaint-sheet (sheet region))
289    
290 gbaumann 1.33 ;;;; 9 Ports, Grafts, and Mirrored Sheets
291 gilbert 1.2
292     ;; (defgeneric portp (object))
293     ;; find-port function
294    
295 crhodes 1.39 ;;; 9.2 Ports
296    
297     (defgeneric port (object))
298     (defgeneric port-server-path (port))
299     (defgeneric port-name (port))
300     (defgeneric port-type (port))
301     (defgeneric port-properties (port indicator))
302     (defgeneric (setf port-properties) (property port indicator))
303     (defgeneric restart-port (port))
304     (defgeneric destroy-port (port))
305    
306 gbaumann 1.33 ;;; 9.3 Grafts
307    
308     (defgeneric sheet-grafted-p (sheet))
309     (declfun find-graft (&key (server-path *default-server-path*)
310     (port (find-port :server-path server-path))
311     (orientation :default)
312     (units :device)))
313     (defgeneric graft (object))
314     (declfun map-over-grafts (function port))
315     ;; with-graft-locked (graft) &body body [macro]
316     (defgeneric graft-orientation (graft))
317     (defgeneric graft-units (graft))
318     (defgeneric graft-width (graft &key units))
319     (defgeneric graft-height (graft &key units))
320     (declfun graft-pixels-per-millimeter (graft))
321     (declfun graft-pixels-per-inch (graft))
322    
323 gilbert 1.2 ;; 9.4.1 Mirror Functions
324    
325     (defgeneric sheet-direct-mirror (sheet))
326     (defgeneric sheet-mirrored-ancestor (sheet))
327     (defgeneric sheet-mirror (sheet))
328     (defgeneric realize-mirror (port mirrored-sheet))
329     (defgeneric destroy-mirror (port mirrored-sheet))
330     (defgeneric raise-mirror (port sheet))
331     (defgeneric bury-mirror (port sheet))
332    
333     ;; 9.4.2 Internal Interfaces for Native Coordinates
334    
335     (defgeneric sheet-native-transformation (sheet))
336     (defgeneric sheet-native-region (sheet))
337     (defgeneric sheet-device-transformation (sheet))
338     (defgeneric sheet-device-region (sheet))
339     (defgeneric invalidate-cached-transformations (sheet))
340     (defgeneric invalidate-cached-regions (sheet))
341    
342     ;;; Graphics ops
343    
344     (defgeneric medium-draw-point* (medium x y))
345     (defgeneric medium-draw-points* (medium coord-seq))
346     (defgeneric medium-draw-line* (medium x1 y1 x2 y2))
347     (defgeneric medium-draw-lines* (medium coord-seq))
348     (defgeneric medium-draw-polygon* (medium coord-seq closed filled))
349     (defgeneric medium-draw-rectangle* (medium left top right bottom filled))
350     (defgeneric medium-draw-ellipse* (medium center-x center-y
351     radius-1-dx radius-1-dy radius-2-dx radius-2-dy
352     start-angle end-angle filled))
353 brian 1.4 (defgeneric medium-draw-circle* (medium center-x center-y radius start-angle end-angle filled))
354 gilbert 1.2 (defgeneric medium-draw-text* (medium string x y
355     start end
356     align-x align-y
357     toward-x toward-y transform-glyphs))
358 moore 1.28
359 crhodes 1.39 ;;; 10.1 Medium Components
360     ;;;
361     ;;; For reasons that are beyond me, many of the medium component
362     ;;; accessors are also specified in section 8.3.1.
363    
364     (defgeneric medium-current-text-style (medium))
365    
366 moore 1.28 ;;;; 10.2
367     (defgeneric invoke-with-drawing-options
368     (medium continuation &rest drawing-options &key &allow-other-keys))
369    
370 tmoore 1.31 ;;;; 10.2.1
371     (defgeneric invoke-with-identity-transformation (medium continuation))
372    
373     ;;;; 10.2.2
374     (defgeneric invoke-with-local-coordinates (medium continuation x y))
375    
376     (defgeneric invoke-with-first-quadrant-coordinates (medium continuation x y))
377 moore 1.28
378 crhodes 1.39 ;;; 11.1.1 Text Style Protocol and Text Style Suboptions
379    
380     (defgeneric text-style-components (text-style))
381     (defgeneric text-style-family (text-style))
382     (defgeneric text-style-face (text-style))
383     (defgeneric text-style-size (text-style))
384     (defgeneric merge-text-styles (style1 style2))
385     (defgeneric text-style-ascent (text-style medium))
386     (defgeneric text-style-descent (text-style medium))
387     (defgeneric text-style-height (text-style medium))
388     (defgeneric text-style-width (text-style medium))
389     (defgeneric text-style-fixed-width-p (text-style medium))
390     (defgeneric text-size (medium string &key text-style start end))
391    
392     ;;; 11.2 Text Style Binding Forms
393    
394     (defgeneric invoke-with-text-style (medium continuation text-style))
395    
396     ;;; 12.7.3 Other Medium-specific Output Functions
397    
398     (defgeneric medium-finish-output (medium))
399     (defgeneric medium-force-output (medium))
400     (defgeneric medium-clear-area (medium left top right bottom))
401     (defgeneric medium-beep (medium))
402    
403 moore 1.28 ;;;; 14.5
404     (defgeneric draw-design
405     (medium design
406     &key ink clipping-region transformation line-style line-thickness
407     line-unit line-dashes line-joint-shape line-cap-shape text-style
408     text-family text-face text-size))
409    
410 gbaumann 1.33 ;;; 15.3 The Text Cursor [complete]
411    
412     ;;; 15.3.1 Text Cursor Protocol [complete]
413    
414     ;; cursor [protocol class]
415     ;; cursorp object [protocol predicate]
416     ;; :sheet [Initarg for cursor]
417     ;; standard-text-cursor [class]
418     (defgeneric cursor-sheet (cursor))
419     (defgeneric cursor-position (cursor))
420     ;;(defgeneric (setf* cursor-position) (x y cursor))
421     (defgeneric cursor-active (cursor))
422     (defgeneric (setf cursor-active) (value cursor))
423     (defgeneric cursor-state (cursor))
424     (defgeneric (setf cursor-state) (value cursor))
425     (defgeneric cursor-focus (cursor))
426     (defgeneric cursor-visibility (cursor))
427     (defgeneric (setf cursor-visibility) (visibility cursor))
428    
429     ;;; 15.3.2 Stream Text Cursor Protocol [complete]
430    
431     (defgeneric stream-text-cursor (stream))
432     (defgeneric (setf stream-text-cursor) (cursor stream))
433     (defgeneric stream-cursor-position (stream))
434     ;; (defgeneric (setf* stream-cursor-position) (x y stream)) unsure how to declare this, can somebody help? --GB
435 thenriksen 1.43 (defgeneric stream-set-cusor-position (stream x y)) ; This is actually in 19.3.1 in CLIM 2.2
436 gbaumann 1.33 (defgeneric stream-increment-cursor-position (stream dx dy))
437    
438     ;;; 15.4 Text Protocol [complete]
439    
440     (defgeneric stream-character-width (stream character &key text-style))
441     (defgeneric stream-string-width (stream character &key start end text-style))
442     (defgeneric stream-text-margin (stream))
443     (defgeneric (setf stream-text-margin) (margin stream))
444     (defgeneric stream-line-height (stream &key text-style))
445     (defgeneric stream-vertical-spacing (stream))
446     (defgeneric stream-baseline (stream))
447    
448     ;;; 15.4.1 Mixing Text and Graphics [complete]
449    
450     ;; with-room-for-graphics (&optional stream &key (first-quadrant t) height (move-cursor t) record-type) &body body [Macro]
451    
452     ;;; 15.4.2 Wrapping of Text Lines [complete]
453    
454     (defgeneric stream-end-of-line-action (stream))
455     (defgeneric (setf stream-end-of-line-action) (action stream))
456     ;; with-end-of-line-action (stream action) &body body [Macro]
457     (defgeneric stream-end-of-page-action (stream))
458     (defgeneric (setf stream-end-of-page-action) (action stream))
459     ;; with-end-of-page-action (stream action) &body body [Macro]
460    
461 crhodes 1.39 ;;; 15.5 Attracting the User's Attention
462    
463     (defgeneric beep (&optional medium))
464    
465     ;;; 15.6 Buffering of Output
466    
467     (defgeneric medium-buffering-output-p (medium))
468     (defgeneric (setf medium-buffering-output-p) (buffer-p medium))
469    
470     ;;; 16.3.3 Text Displayed Output Record
471    
472     (defgeneric add-character-output-to-text-record
473     (text-record character text-style width height baseline))
474 gbaumann 1.33
475 crhodes 1.39 (defgeneric add-string-output-to-text-record
476     (text-record string start end text-style width height baseline))
477    
478     (defgeneric text-displayed-output-record-string (text-record))
479    
480     ;;; 16.4.1. The Output Recording Stream Protocol
481    
482     (defgeneric stream-recording-p (stream))
483     (defgeneric (setf stream-recording-p) (recording-p stream))
484     (defgeneric stream-drawing-p (stream))
485     (defgeneric (setf stream-drawing-p) (drawing-p stream))
486     (defgeneric stream-output-history (stream))
487     (defgeneric stream-current-output-record (stream))
488     (defgeneric (setf stream-current-output-record) (record stream))
489     (defgeneric stream-add-output-record (stream record))
490     (defgeneric stream-replay (stream &optional region))
491     (defgeneric erase-output-record (record stream &optional errorp))
492    
493     ;;; 16.4.3. Text Output Recording
494 gbaumann 1.33 (defgeneric stream-text-output-record (stream text-style))
495     (defgeneric stream-close-text-output-record (stream))
496 crhodes 1.39 (defgeneric stream-add-character-output
497     (stream character text-style width height baseline))
498     (defgeneric stream-add-string-output
499     (stream string start end text-style width height baseline))
500 gbaumann 1.33
501     ;;; 16.4.4 Output Recording Utilities [complete]
502    
503     ;; with-output-recording-options (stream &key record draw) &body body [Macro]
504 crhodes 1.39 (defgeneric invoke-with-output-recording-options
505     (stream continuation record draw))
506    
507     ;;; with-new-output-record (stream &optional record-type record &rest initargs) &body body [Macro]
508    
509     ;;; The 'constructor' arg is absent from the CLIM 2.0 spec but is documented
510     ;;; in the Allegro CLIM 2 User Guide and appears to exist in other 'classic'
511     ;;; CLIM implementations. I'm assuming it's an omission from the spec.
512     (defgeneric invoke-with-new-output-record
513     (stream continuation record-type constructor &key &allow-other-keys))
514    
515     ;;; with-output-to-output-record (stream &optional record-type record &rest initargs)) &body body [Macro]
516     (defgeneric invoke-with-output-to-output-record
517     (stream continuation record-type constructor
518     &rest initargs &key &allow-other-keys))
519    
520 gbaumann 1.33 (defgeneric make-design-from-output-record (record))
521    
522 moore 1.28 ;;;; 21.2
523     (defgeneric invoke-updating-output
524     (stream continuation record-type unique-id id-test cache-value cache-test
525 rstrandh 1.30 &key fixed-position all-new parent-cache))
526 moore 1.28
527 crhodes 1.39 ;;; 22.2.1 The Extended Stream Input Protocol
528    
529     (defgeneric stream-input-buffer (stream))
530     (defgeneric (setf stream-input-buffer) (buffer stream))
531     (defgeneric stream-pointer-position (stream &key pointer))
532     ;; (defgeneric (setf* stream-pointer-position))
533     (defgeneric stream-set-input-focus (stream))
534     (defgeneric stream-read-gesture
535     (stream &key timeout peek-p input-wait-test
536     input-wait-handler pointer-button-press-handler))
537     (defgeneric stream-input-wait (stream &key timeout input-wait-test))
538     (defgeneric stream-unread-gesture (stream gesture))
539    
540     ;;; 22.2.2 Extended Input Stream Conditions
541    
542     (defgeneric abort-gesture-event (condition))
543     (defgeneric accelerator-gesture-event (condition))
544     (defgeneric accelerator-gesture-numeric-argument (condition))
545    
546     ;;; 23.5 Context-dependent (Typed) Input
547    
548     (defgeneric stream-accept
549     (stream
550     type &key view default default-type provide-default insert-default
551     replace-input history active-p prompt prompt-mode display-default
552     query-identifier activation-gestures additional-activation-gestures
553     delimiter-gestures additional-delimiter-gestures))
554     (defgeneric prompt-for-accept (stream type view &rest accept-args &key))
555    
556     ;;; 24.1 The Input Editor
557    
558     (defgeneric input-editor-format (stream format-string &rest args))
559 thenriksen 1.41 (defgeneric redraw-input-buffer (stream &optional start-from))
560 crhodes 1.39
561     ;;; 24.1.1 The Input Editing Stream Protocol
562    
563     (defgeneric stream-insertion-pointer (stream))
564     (defgeneric (setf stream-insertion-pointer) (pointer stream))
565     (defgeneric stream-scan-pointer (stream))
566     (defgeneric (setf stream-scan-pointer) (pointer stream))
567     (defgeneric stream-rescanning-p (stream))
568     (defgeneric reset-scan-pointer (stream &optional scan-pointer))
569     (defgeneric immediate-rescan (stream))
570     (defgeneric queue-rescan (stream))
571     (defgeneric rescan-if-necessary (stream &optional inhibit-activation))
572     (defgeneric erase-input-buffer (stream &optional start-position))
573    
574     ;;; McCLIM relies on a text editor class (by default
575 thenriksen 1.40 ;;; DREI-INPUT-EDITING-MIXIN) to perform the user interaction and
576 crhodes 1.39 ;;; display for input editing. Also, that class must update the stream
577     ;;; buffer and the insertion pointer, cause rescans to happen, and
578     ;;; handle activation gestures.
579     (defgeneric stream-process-gesture (stream gesture type))
580    
581     ;;; 24.4 Reading and Writing of Tokens
582    
583     (defgeneric replace-input
584     (stream new-input &key start end buffer-start rescan))
585 moore 1.28 (defgeneric presentation-replace-input
586     (stream object type view
587     &key buffer-start rescan query-identifier for-context-type))
588    
589 thenriksen 1.44 ;;; 27.3 Command Menus
590    
591     (defgeneric display-command-table-menu (command-table stream &key max-width
592     max-height n-rows n-columns x-spacing
593     y-spacing initial-spacing row-wise
594     cell-align-x cell-align-y move-cursor)
595     (:documentation "Display a menu of the commands accessible in
596     `command-table' to `stream'.
597    
598     `max-width', `max-height', `n-rows', `n-columns', `x-spacing',
599     `y-spacing', `row-wise', `initial-spacing', `cell-align-x',
600     `cell-align-y', and `move-cursor' are as for
601     `formatting-item-list'."))
602    
603 crhodes 1.39 ;;; 28.2 Specifying the Panes of a Frame
604    
605     (defgeneric destroy-frame (frame))
606     (defgeneric raise-frame (frame))
607     (defgeneric bury-frame (frame))
608    
609     ;;; 28.3 Application Frame Functions
610    
611     (defgeneric frame-name (frame))
612     (defgeneric frame-pretty-name (frame))
613     (defgeneric (setf frame-pretty-name) (name frame))
614     (defgeneric frame-command-table (frame))
615     (defgeneric (setf frame-command-table) (command-table frame))
616     (defgeneric frame-standard-output (frame))
617     (defgeneric frame-standard-input (frame))
618     (defgeneric frame-query-io (frame))
619     (defgeneric frame-error-output (frame))
620     (defgeneric frame-pointer-documentation-output (frame))
621     (defgeneric frame-calling-frame (frame))
622     (defgeneric frame-parent (frame))
623     (defgeneric frame-panes (frame))
624     (defgeneric frame-top-level-sheet (frame))
625     (defgeneric frame-current-panes (frame))
626     (defgeneric get-frame-pane (frame pane-name))
627     (defgeneric fine-pane-named (frame pane-name))
628     (defgeneric frame-current-layout (frame))
629     (defgeneric (setf frame-current-layout) (layout frame))
630     (defgeneric frame-all-layouts (frame))
631     (defgeneric layout-frame (frame &optional width height))
632     (defgeneric frame-exit-frame (condition))
633     (defgeneric frame-exit (frame))
634     (defgeneric pane-needs-redisplay (pane))
635     (defgeneric (setf pane-needs-redisplay) (value pane))
636     (defgeneric redisplay-frame-pane (frame pane &key force-p))
637     (defgeneric redisplay-frame-panes (frame &key force-p))
638     (defgeneric frame-replay (frame stream &optional region))
639     (defgeneric notify-user (frame message &key associated-window title
640     documentation exit-boxes name style text-style))
641     (defgeneric frame-properties (frame property))
642     (defgeneric (setf frame-properties) (value frame property))
643    
644     ;;; 28.3.1 Interface with Presentation Types
645    
646     (defgeneric frame-maintain-presentation-histories (frame))
647 moore 1.28 (defgeneric frame-find-innermost-applicable-presentation
648     (frame input-context stream x y &key event))
649 crhodes 1.39 (defgeneric frame-input-context-button-press-handler
650     (frame stream button-prees-event))
651     (defgeneric frame-document-highlighted-presentation
652     (frame presentation input-context window-context x y stream))
653     (defgeneric frame-drag-and-drop-feedback
654     (frame presentation stream initial-x initial-y new-x new-y state))
655     (defgeneric frame-drag-and-drop-highlighting
656     (frame presentation stream state))
657 moore 1.28
658     ;;;; 28.4
659     (defgeneric default-frame-top-level
660     (frame &key command-parser command-unparser partial-command-parser prompt))
661     (defgeneric read-frame-command (frame &key stream))
662     (defgeneric run-frame-top-level (frame &key &allow-other-keys))
663 moore 1.29 (defgeneric command-enabled (command-name frame))
664     (defgeneric (setf command-name) (enabled command-name frame))
665 thenriksen 1.45 (defgeneric display-command-menu (frame stream &key command-table
666     initial-spacing row-wise max-width
667     max-height n-rows n-columns
668     cell-align-x cell-align-y)
669     (:documentation "Display the command table associated with
670     `command-table' on `stream' by calling
671     `display-command-table-menu'. If no command table is
672     provided, (frame-command-table frame) will be used.
673    
674     The arguments `initial-spacing', `row-wise',
675     `max-width', `max-height', `n-rows', `n-columns', `cell-align-x',
676     and `cell-align-y' are as for `formatting-item-list'."))
677 moore 1.29
678 crhodes 1.39 ;;;; 28.5.2 Frame Manager Operations
679    
680     (defgeneric frame-manager (frame))
681     (defgeneric (setf frame-manager) (frame-manager frame))
682     (defgeneric frame-manager-frames (frame-manager))
683     (defgeneric adopt-frame (frame-manager frame))
684     (defgeneric disown-frame (frame-manager frame))
685     (defgeneric frame-state (frame))
686     (defgeneric enable-frame (frame))
687     (defgeneric disable-frame (frame))
688     (defgeneric shrink-frame (frame))
689    
690     (defgeneric note-frame-enabled (frame-manager frame))
691     (defgeneric note-frame-disabled (frame-manager frame))
692     (defgeneric note-frame-iconified (frame-manager frame))
693     (defgeneric note-frame-deiconified (frame-manager frame))
694 moore 1.29 (defgeneric note-command-enabled (frame-manager frame command-name))
695     (defgeneric note-command-disabled (frame-manager frame command-name))
696 moore 1.28
697 crhodes 1.39 (defgeneric frame-manager-notify-user
698     (framem message-string &key frame associated-window title
699     documentation exit-boxes name style text-style))
700     (defgeneric generate-panes (frame-manager frame))
701     (defgeneric find-pane-for-frame (frame-manager frame))
702    
703     ;;; 28.5.3 Frame Manager Settings
704    
705     (defgeneric (setf client-setting) (value frame setting))
706     (defgeneric reset-frame (frame &rest client-settings))
707    
708 moore 1.28 ;;;; 29.2
709     ;;;;
710     ;;;; FIXME: should we have &key &allow-other-keys here, to cause
711     ;;;; initarg checking? Probably.
712     (defgeneric make-pane-1 (realizer frame abstract-class-name &rest initargs))
713 gilbert 1.2
714 gilbert 1.5 ;;;; 29.2.2 Pane Properties
715    
716     (defgeneric pane-frame (pane))
717     (defgeneric pane-name (pane))
718     (defgeneric pane-foreground (pane))
719     (defgeneric pane-background (pane))
720     (defgeneric pane-text-style (pane))
721    
722     ;;;; 29.3.3 Scroller Pane Classes
723    
724     (defgeneric pane-viewport (pane))
725     (defgeneric pane-viewport-region (pane))
726     (defgeneric pane-scroller (pane))
727     (defgeneric scroll-extent (pane x y))
728    
729 thenriksen 1.42 (deftype scroll-bar-spec () '(member t :both :vertical :horizontal nil))
730    
731 gilbert 1.6 ;;;; 29.3.4 The Layout Protocol
732    
733     ;; (define-protocol-class space-requirement ())
734    
735     ;; make-space-requirement &key (width 0) (max-width 0) (min-width 0) (height 0) (max-height 0) (min-height 0) [Function]
736    
737     (defgeneric space-requirement-width (space-req))
738     (defgeneric space-requirement-min-width (space-req))
739     (defgeneric space-requirement-max-width (space-req))
740     (defgeneric space-requirement-height (space-req))
741     (defgeneric space-requirement-min-height (space-req))
742     (defgeneric space-requirement-max-height (space-req))
743     (defgeneric space-requirement-components (space-req))
744    
745     ;; space-requirement-combine function sr1 sr2 [Function]
746     ;; space-requirement+ sr1 sr2 [Function]
747     ;; space-requirement+* space-req &key width min-width max-width height min-height max-height [Function]
748    
749 rgoldman 1.34 (defgeneric compose-space (pane &key width height)
750     (:documentation "During the space composition pass, a composite pane will
751     typically ask each of its children how much space it requires by calling COMPOSE-SPACE.
752     They answer by returning space-requirement objects. The composite will then form
753     its own space requirement by composing the space requirements of its children
754     according to its own rules for laying out its children.
755    
756     Returns a SPACE-REQUIREMENT object."))
757 gilbert 1.6 (defgeneric allocate-space (pane width height))
758 adejneka 1.11 (defgeneric change-space-requirements
759 hefner1 1.27 (pane &rest space-req-keys &key resize-frame width height
760     min-width min-height max-width max-height))
761 gilbert 1.6 (defgeneric note-space-requirements-changed (sheet pane))
762     ;; changing-space-requirements (&key resize-frame layout) &body body [Macro]
763    
764     ;;;; 29.4.4 CLIM Stream Pane Functions
765    
766     (defgeneric window-clear (window))
767     (defgeneric window-refresh (window))
768     (defgeneric window-viewport (window))
769     (defgeneric window-erase-viewport (window))
770     (defgeneric window-viewport-position (window))
771     ;; (defgeneric (setf* window-viewport-position) (x y window))
772    
773 crhodes 1.39 ;;; D.2 Basic Stream Functions
774    
775     ;;; Gray Streamoid functions, but not part of any Gray proposal.
776     (defgeneric stream-pathname (stream))
777     (defgeneric stream-truename (stream))
778    
779 gilbert 1.8 ;;;;
780 gilbert 1.23 (defgeneric gadget-value (gadget))
781     (defgeneric (setf gadget-value) (new-value gadget &key invoke-callback))
782     (defgeneric gadget-min-value (gadget))
783     (defgeneric gadget-max-value (gadget))
784 gilbert 1.8 (defgeneric (setf gadget-max-value) (new-value gadget))
785     (defgeneric (setf gadget-min-value) (new-value gadget))
786     (defgeneric (setf scroll-bar-thumb-size) (new-value scroll-bar))
787     (defgeneric gadget-orientation (gadget))
788     (defgeneric gadget-client (gadget))
789    
790 gilbert 1.2 ;;;
791    
792 adejneka 1.16 (defgeneric text-style-mapping (port text-style &optional character-set))
793    
794     (defgeneric (setf text-style-mapping)
795     (mapping port text-style &optional character-set))
796 adejneka 1.19 (defgeneric medium-miter-limit (medium)
797     (:documentation
798     "If LINE-STYLE-JOINT-SHAPE is :MITER and the angle between two
799     consequent lines is less than the values return by
800     MEDIUM-MITER-LIMIT, :BEVEL is used instead."))
801 adejneka 1.15 (defgeneric line-style-effective-thickness (line-style medium)
802     (:documentation
803     "Returns the thickness in device units of a line,
804     rendered on MEDIUM with the style LINE-STYLE."))
805    
806 gilbert 1.5 ;;;
807    
808     (defgeneric text-style-character-width (text-style medium char))
809 adejneka 1.13 ;; fall back, where to put this?
810     (defmethod text-style-character-width (text-style medium char)
811     (text-size medium char :text-style text-style))
812 gilbert 1.23
813     (declfun draw-rectangle (sheet point1 point2
814     &rest args
815     &key (filled t)
816     ink clipping-region transformation line-style line-thickness
817     line-unit line-dashes line-joint-shape))
818    
819     (declfun draw-rectangle* (sheet x1 y1 x2 y2
820     &rest args
821     &key (filled t)
822     ink clipping-region transformation line-style line-thickness
823     line-unit line-dashes line-joint-shape))
824 gilbert 1.5
825     ;;; "exported" from a port
826    
827     (defgeneric mirror-transformation (port mirror))
828     (defgeneric port-set-sheet-region (port sheet region))
829     (defgeneric port-set-sheet-transformation (port sheet region))
830 adejneka 1.17 (defgeneric port-text-style-mappings (port))
831 gilbert 1.5 (defgeneric port-lookup-mirror (port sheet))
832     (defgeneric port-register-mirror (port sheet mirror))
833     (defgeneric port-allocate-pixmap (port sheet width height))
834     (defgeneric port-deallocate-pixmap (port pixmap))
835     (defgeneric port-mirror-width (port sheet))
836     (defgeneric port-mirror-height (port sheet))
837 gilbert 1.7 (defgeneric port-enable-sheet (port sheet))
838     (defgeneric port-disable-sheet (port sheet))
839 moore 1.22 (defgeneric port-pointer (port))
840 gilbert 1.2
841 tmoore 1.37 (defgeneric pointer-update-state (pointer event)
842     (:documentation "Called by port event dispatching code to update the modifier
843     and button states of the pointer."))
844    
845 gilbert 1.1 ;;;
846    
847 gilbert 1.8 ;; Used in stream-input.lisp, defined in frames.lisp
848     (defgeneric frame-event-queue (frame))
849 gilbert 1.1
850 moore 1.10 ;;; Used in presentations.lisp, defined in commands.lisp
851    
852     (defgeneric presentation-translators (command-table))
853 gilbert 1.1
854 adejneka 1.21 (defgeneric stream-default-view (stream))
855 adejneka 1.20
856 gilbert 1.26 ;;; ----------------------------------------------------------------------
857    
858     (defgeneric output-record-basline (record)
859     (:documentation
860     "Returns two values: the baseline of an output record and a boolean
861     indicating if this baseline is definitive. McCLIM addition."))
862    
863 tmoore 1.36 (defgeneric encapsulating-stream-stream (encapsulating-stream)
864     (:documentation "The stream encapsulated by an encapsulating stream"))
865    
866 gilbert 1.5 #||
867    
868     Further undeclared functions
869    
870     FRAME-EVENT-QUEUE FRAME-EXIT PANE-FRAME
871     ALLOCATE-SPACE COMPOSE-SPACE FIND-INNERMOST-APPLICABLE-PRESENTATION
872     HIGHLIGHT-PRESENTATION-1 PANE-DISPLAY-FUNCTION PANE-DISPLAY-TIME PANE-NAME
873     PRESENTATION-OBJECT PRESENTATION-TYPE SPACE-REQUIREMENT-HEIGHT
874     SPACE-REQUIREMENT-WIDTH THROW-HIGHLIGHTED-PRESENTATION WINDOW-CLEAR
875    
876     (SETF GADGET-MAX-VALUE) (SETF GADGET-MIN-VALUE) (SETF SCROLL-BAR-THUMB-SIZE)
877     SLOT-ACCESSOR-NAME::|CLIM-INTERNALS CLIENT slot READER| DRAW-EDGES-LINES*
878     FORMAT-CHILDREN GADGET-VALUE MAKE-MENU-BAR TABLE-PANE-NUMBER
879     MEDIUM WITH-GRAPHICS-STATE
880     PORT-MIRROR-HEIGHT PORT-MIRROR-WIDTH TEXT-STYLE-CHARACTER-WIDTH
881     FIND-INNERMOST-APPLICABLE-PRESENTATION HIGHLIGHT-PRESENTATION-1
882     PRESENTATION-OBJECT PRESENTATION-TYPE THROW-HIGHLIGHTED-PRESENTATION
883     FORMAT-CHILDREN TABLE-PANE-NUMBER TEXT-STYLE-CHARACTER-WIDTH
884     PORT-MIRROR-HEIGHT PORT-MIRROR-WIDTH SCROLL-EXTENT TEXT-STYLE-CHARACTER-WIDTH
885     FRAME-EVENT-QUEUE FRAME-EXIT PANE-FRAME
886     ALLOCATE-SPACE COMPOSE-SPACE FIND-INNERMOST-APPLICABLE-PRESENTATION
887     HIGHLIGHT-PRESENTATION-1 PANE-DISPLAY-FUNCTION PANE-DISPLAY-TIME PANE-NAME
888     PRESENTATION-OBJECT PRESENTATION-TYPE SPACE-REQUIREMENT-HEIGHT
889     SPACE-REQUIREMENT-WIDTH THROW-HIGHLIGHTED-PRESENTATION WINDOW-CLEAR
890     (SETF GADGET-MAX-VALUE) (SETF GADGET-MIN-VALUE) (SETF SCROLL-BAR-THUMB-SIZE)
891     SLOT-ACCESSOR-NAME::|CLIM-INTERNALS CLIENT slot READER| DRAW-EDGES-LINES*
892     FORMAT-CHILDREN GADGET-VALUE MAKE-MENU-BAR TABLE-PANE-NUMBER
893 gilbert 1.1
894 gilbert 1.23 ||#

  ViewVC Help
Powered by ViewVC 1.1.5