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

Contents of /mcclim/decls.lisp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.5 - (show annotations)
Sun Apr 28 06:08:02 2002 UTC (11 years, 11 months ago) by gilbert
Branch: MAIN
Changes since 1.4: +94 -4 lines
added a few more declaration to get rid of a couple of undefined function
warnings.
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 ;;; (c) copyright 2001,2002 by Gilbert Baumann
9
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 ;;; License along with this library; if not, write to the
22 ;;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
23 ;;; Boston, MA 02111-1307 USA.
24
25 (in-package :CLIM-INTERNALS)
26
27 ;;;; Changes
28
29 ;;; When Who What
30 ;;; --------------------------------------------------------------------------------------
31 ;;; 2001-08-12 GB created
32 ;;;
33
34 ;; This is just an ad hoc list. Would it be a good idea to include all
35 ;; (exported) generic functions here? --GB
36
37 (defgeneric point-x (point))
38 (defgeneric point-y (point))
39
40 (defgeneric transform-region (transformation region))
41
42 ;;;; 8.3.4 Associating a Medium with a Sheet
43
44 ;;;; 8.3.4.1 Grafting and Degrafting of Mediums
45
46 ;; with-sheet-medium (medium sheet) &body body [Macro]
47 ;; with-sheet-medium-bound (sheet medium) &body body [Macro]
48
49 (defgeneric sheet-medium (sheet))
50 (defgeneric medium-sheet (medium))
51 (defgeneric medium-drawable (medium))
52 (defgeneric port (medium))
53
54 ;;;; 8.3.4.1 Grafting and Degrafting of Mediums
55
56 (defgeneric allocate-medium (port sheet))
57 (defgeneric deallocate-medium (port medium))
58 (defgeneric make-medium (port sheet))
59 (defgeneric engraft-medium (medium port sheet))
60 (defgeneric degraft-medium (medium port sheet))
61
62 ;; 8.4.1 Repaint Protocol Functions
63
64 (defgeneric queue-repaint (sheet repaint-event))
65 (defgeneric handle-repaint (sheet region))
66 (defgeneric repaint-sheet (sheet region))
67
68 ;; 9 Ports, Grafts, and Mirrored Sheets
69
70 ;; (defgeneric portp (object))
71 ;; find-port function
72
73 ;; 9.4.1 Mirror Functions
74
75 (defgeneric sheet-direct-mirror (sheet))
76 (defgeneric sheet-mirrored-ancestor (sheet))
77 (defgeneric sheet-mirror (sheet))
78 (defgeneric realize-mirror (port mirrored-sheet))
79 (defgeneric destroy-mirror (port mirrored-sheet))
80 (defgeneric raise-mirror (port sheet))
81 (defgeneric bury-mirror (port sheet))
82
83 ;; 9.4.2 Internal Interfaces for Native Coordinates
84
85 (defgeneric sheet-native-transformation (sheet))
86 (defgeneric sheet-native-region (sheet))
87 (defgeneric sheet-device-transformation (sheet))
88 (defgeneric sheet-device-region (sheet))
89 (defgeneric invalidate-cached-transformations (sheet))
90 (defgeneric invalidate-cached-regions (sheet))
91
92 ;;; Graphics ops
93
94 (defgeneric medium-draw-point* (medium x y))
95 (defgeneric medium-draw-points* (medium coord-seq))
96 (defgeneric medium-draw-line* (medium x1 y1 x2 y2))
97 (defgeneric medium-draw-lines* (medium coord-seq))
98 (defgeneric medium-draw-polygon* (medium coord-seq closed filled))
99 (defgeneric medium-draw-rectangle* (medium left top right bottom filled))
100 (defgeneric medium-draw-ellipse* (medium center-x center-y
101 radius-1-dx radius-1-dy radius-2-dx radius-2-dy
102 start-angle end-angle filled))
103 (defgeneric medium-draw-oval* (medium center-x center-y radius-x radius-y filled))
104 (defgeneric medium-draw-circle* (medium center-x center-y radius start-angle end-angle filled))
105 (defgeneric medium-draw-text* (medium string x y
106 start end
107 align-x align-y
108 toward-x toward-y transform-glyphs))
109
110 ;;;; 29.2.2 Pane Properties
111
112 (defgeneric pane-frame (pane))
113 (defgeneric pane-name (pane))
114 (defgeneric pane-foreground (pane))
115 (defgeneric pane-background (pane))
116 (defgeneric pane-text-style (pane))
117
118 ;;;; 29.3.3 Scroller Pane Classes
119
120 (defgeneric pane-viewport (pane))
121 (defgeneric pane-viewport-region (pane))
122 (defgeneric pane-scroller (pane))
123 (defgeneric scroll-extent (pane x y))
124
125 ;;;
126
127 (defgeneric medium-foreground (medium))
128 (defgeneric medium-background (medium))
129 (defgeneric medium-ink (medium))
130 (defgeneric medium-transformation (medium))
131 (defgeneric medium-clipping-region (medium))
132 (defgeneric medium-line-style (medium))
133 (defgeneric medium-text-style (medium))
134 (defgeneric medium-default-text-style (medium))
135
136 (defgeneric (setf medium-foreground) (new-value medium))
137 (defgeneric (setf medium-background) (new-value medium))
138 (defgeneric (setf medium-ink) (new-value medium))
139 (defgeneric (setf medium-transformation) (new-value medium))
140 (defgeneric (setf medium-clipping-region) (new-value medium))
141 (defgeneric (setf medium-line-style) (new-value medium))
142 (defgeneric (setf medium-text-style) (new-value medium))
143 (defgeneric (setf medium-default-text-style) (new-value medium))
144
145 ;;;
146
147 (defgeneric sheet-grafted-p (sheet))
148 (defgeneric graft-width (graft &key units))
149 (defgeneric graft-height (graft &key units))
150 (defgeneric graft-units (graft))
151
152 (defgeneric text-style-character-width (text-style medium char))
153
154 (declaim (ftype (function (t t t
155 &key (:filled t) (:ink t) (:clipping-region t) (:transformation t)
156 (:line-style t) (:line-thickness t) (:line-unit t) (:line-dashes t)
157 (:line-joint-shape t))
158 t)
159 draw-rectangle))
160
161 (declaim (ftype (function (t t t t t
162 &key (:filled t) (:ink t) (:clipping-region t) (:transformation t)
163 (:line-style t) (:line-thickness t) (:line-unit t) (:line-dashes t)
164 (:line-joint-shape t))
165 t)
166 draw-rectangle*))
167
168 ;;; "exported" from a port
169
170 (defgeneric mirror-transformation (port mirror))
171 (defgeneric port-set-sheet-region (port sheet region))
172 (defgeneric port-set-sheet-transformation (port sheet region))
173 (defgeneric port-make-font-text-style (port device-font-name))
174 (defgeneric port-lookup-mirror (port sheet))
175 (defgeneric port-register-mirror (port sheet mirror))
176 (defgeneric port-allocate-pixmap (port sheet width height))
177 (defgeneric port-deallocate-pixmap (port pixmap))
178 (defgeneric port-mirror-width (port sheet))
179 (defgeneric port-mirror-height (port sheet))
180
181 ;;;
182
183 (defmacro with-special-choices ((sheet) &body body)
184 "Macro for optimizing drawing with graphical system dependant mechanisms."
185 (let ((fn (gensym "FN.")))
186 `(labels ((,fn (,sheet)
187 ,@body))
188 (declare (dynamic-extent #',fn))
189 (invoke-with-special-choices #',fn ,sheet))))
190
191 (defgeneric invoke-with-special-choices (continuation sheet))
192
193 ;; fall back, where to put this?
194
195 (defmethod invoke-with-special-choices (continuation (sheet T))
196 (funcall continuation sheet))
197
198
199 #||
200
201 Further undeclared functions
202
203 FRAME-EVENT-QUEUE FRAME-EXIT PANE-FRAME
204 ALLOCATE-SPACE COMPOSE-SPACE FIND-INNERMOST-APPLICABLE-PRESENTATION
205 HIGHLIGHT-PRESENTATION-1 PANE-DISPLAY-FUNCTION PANE-DISPLAY-TIME PANE-NAME
206 PRESENTATION-OBJECT PRESENTATION-TYPE SPACE-REQUIREMENT-HEIGHT
207 SPACE-REQUIREMENT-WIDTH THROW-HIGHLIGHTED-PRESENTATION WINDOW-CLEAR
208
209 (SETF GADGET-MAX-VALUE) (SETF GADGET-MIN-VALUE) (SETF SCROLL-BAR-THUMB-SIZE)
210 SLOT-ACCESSOR-NAME::|CLIM-INTERNALS CLIENT slot READER| DRAW-EDGES-LINES*
211 FORMAT-CHILDREN GADGET-VALUE MAKE-MENU-BAR TABLE-PANE-NUMBER
212 TEXT-STYLE-CHARACTER-WIDTH
213 MEDIUM WITH-GRAPHICS-STATE
214 PORT-MIRROR-HEIGHT PORT-MIRROR-WIDTH TEXT-STYLE-CHARACTER-WIDTH
215 FIND-INNERMOST-APPLICABLE-PRESENTATION HIGHLIGHT-PRESENTATION-1
216 PRESENTATION-OBJECT PRESENTATION-TYPE THROW-HIGHLIGHTED-PRESENTATION
217 FORMAT-CHILDREN TABLE-PANE-NUMBER TEXT-STYLE-CHARACTER-WIDTH
218 PORT-MIRROR-HEIGHT PORT-MIRROR-WIDTH SCROLL-EXTENT TEXT-STYLE-CHARACTER-WIDTH
219 FRAME-EVENT-QUEUE FRAME-EXIT PANE-FRAME
220 ALLOCATE-SPACE COMPOSE-SPACE FIND-INNERMOST-APPLICABLE-PRESENTATION
221 HIGHLIGHT-PRESENTATION-1 PANE-DISPLAY-FUNCTION PANE-DISPLAY-TIME PANE-NAME
222 PRESENTATION-OBJECT PRESENTATION-TYPE SPACE-REQUIREMENT-HEIGHT
223 SPACE-REQUIREMENT-WIDTH THROW-HIGHLIGHTED-PRESENTATION WINDOW-CLEAR
224 (SETF GADGET-MAX-VALUE) (SETF GADGET-MIN-VALUE) (SETF SCROLL-BAR-THUMB-SIZE)
225 SLOT-ACCESSOR-NAME::|CLIM-INTERNALS CLIENT slot READER| DRAW-EDGES-LINES*
226 FORMAT-CHILDREN GADGET-VALUE MAKE-MENU-BAR TABLE-PANE-NUMBER
227 TEXT-STYLE-CHARACTER-WIDTH
228
229 ||#

  ViewVC Help
Powered by ViewVC 1.1.5