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

Contents of /mcclim/decls.lisp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations)
Sun Feb 10 01:02:36 2002 UTC (12 years, 2 months ago) by gilbert
Branch: MAIN
Changes since 1.1: +79 -0 lines
More random DEFGENERIC forms.
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 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.1 Grafting and Degrafting of Mediums
43
44 (defgeneric allocate-medium (port sheet))
45 (defgeneric deallocate-medium (port medium))
46 (defgeneric make-medium (port sheet))
47 (defgeneric engraft-medium (medium port sheet))
48 (defgeneric degraft-medium (medium port sheet))
49
50 ;; 8.4.1 Repaint Protocol Functions
51
52 (defgeneric queue-repaint (sheet repaint-event))
53 (defgeneric handle-repaint (sheet region))
54 (defgeneric repaint-sheet (sheet region))
55
56 ;; 9 Ports, Grafts, and Mirrored Sheets
57
58 ;; (defgeneric portp (object))
59 ;; find-port function
60
61 ;; 9.4.1 Mirror Functions
62
63 (defgeneric sheet-direct-mirror (sheet))
64 (defgeneric sheet-mirrored-ancestor (sheet))
65 (defgeneric sheet-mirror (sheet))
66 (defgeneric realize-mirror (port mirrored-sheet))
67 (defgeneric destroy-mirror (port mirrored-sheet))
68 (defgeneric raise-mirror (port sheet))
69 (defgeneric bury-mirror (port sheet))
70 (defgeneric port (object))
71
72 ;; 9.4.2 Internal Interfaces for Native Coordinates
73
74 (defgeneric sheet-native-transformation (sheet))
75 (defgeneric sheet-native-region (sheet))
76 (defgeneric sheet-device-transformation (sheet))
77 (defgeneric sheet-device-region (sheet))
78 (defgeneric invalidate-cached-transformations (sheet))
79 (defgeneric invalidate-cached-regions (sheet))
80
81 ;;; Graphics ops
82
83 (defgeneric medium-draw-point* (medium x y))
84 (defgeneric medium-draw-points* (medium coord-seq))
85 (defgeneric medium-draw-line* (medium x1 y1 x2 y2))
86 (defgeneric medium-draw-lines* (medium coord-seq))
87 (defgeneric medium-draw-polygon* (medium coord-seq closed filled))
88 (defgeneric medium-draw-rectangle* (medium left top right bottom filled))
89 (defgeneric medium-draw-ellipse* (medium center-x center-y
90 radius-1-dx radius-1-dy radius-2-dx radius-2-dy
91 start-angle end-angle filled))
92 (defgeneric medium-draw-text* (medium string x y
93 start end
94 align-x align-y
95 toward-x toward-y transform-glyphs))
96
97 ;;;
98
99 (defgeneric medium-foreground (medium))
100 (defgeneric medium-background (medium))
101 (defgeneric medium-ink (medium))
102 (defgeneric medium-transformation (medium))
103 (defgeneric medium-clipping-region (medium))
104 (defgeneric medium-line-style (medium))
105 (defgeneric medium-line-style (medium))
106 (defgeneric medium-text-style (medium))
107 (defgeneric medium-default-text-style (medium))
108
109 (defgeneric (setf medium-foreground) (new-value medium))
110 (defgeneric (setf medium-background) (new-value medium))
111 (defgeneric (setf medium-ink) (new-value medium))
112 (defgeneric (setf medium-transformation) (new-value medium))
113 (defgeneric (setf medium-clipping-region) (new-value medium))
114 (defgeneric (setf medium-line-style) (new-value medium))
115 (defgeneric (setf medium-line-style) (new-value medium))
116 (defgeneric (setf medium-text-style) (new-value medium))
117 (defgeneric (setf medium-default-text-style) (new-value medium))
118
119 (defgeneric medium-sheet (medium))
120
121 ;;;
122
123 (defmacro with-special-choices ((sheet) &body body)
124 "Macro for optimizing drawing with graphical system dependant mechanisms."
125 (let ((fn (gensym "FN.")))
126 `(labels ((,fn (,sheet)
127 ,@body))
128 (declare (dynamic-extent #',fn))
129 (invoke-with-special-choices #',fn ,sheet))))
130
131 (defgeneric invoke-with-special-choices (continuation sheet))
132
133 ;; fall back, where to put this?
134
135 (defmethod invoke-with-special-choices (continuation (sheet T))
136 (funcall continuation sheet))
137
138
139

  ViewVC Help
Powered by ViewVC 1.1.5