/[cl-cairo2]/tables.lisp
ViewVC logotype

Contents of /tables.lisp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 8 - (show annotations)
Sat Jul 21 13:41:55 2007 UTC (6 years, 9 months ago) by tpapp
File size: 4703 byte(s)
changed to longer property names to avoid name clashes
1 (in-package :cl-cairo2)
2
3 (defmacro exporting-table (name definition)
4 `(progn
5 (defparameter ,name ,definition)
6 (export ',name)
7 (dolist (i ,name)
8 ; (export (car i))
9 (export (cdr i)))))
10
11 (exporting-table table-format
12 '((:CAIRO_FORMAT_ARGB32 . format-argb32)
13 (:CAIRO_FORMAT_RGB24 . format-rgb24)
14 (:CAIRO_FORMAT_A8 . format-a8)
15 (:CAIRO_FORMAT_A1 . format-a1)))
16
17 (exporting-table table-antialias
18 '((:CAIRO_ANTIALIAS_DEFAULT . antialias-default)
19 (:CAIRO_ANTIALIAS_NONE . antialias-none)
20 (:CAIRO_ANTIALIAS_GRAY . antialias-gray)
21 (:CAIRO_ANTIALIAS_SUBPIXEL . antialias-subpixel)))
22
23 (exporting-table table-fill-rule
24 '((:CAIRO_FILL_RULE_WINDING . fill-rule-winding)
25 (:CAIRO_FILL_RULE_EVEN_ODD . fill-rule-odd)))
26
27 (exporting-table table-line-cap
28 '((:CAIRO_LINE_CAP_BUTT . line-cap-butt)
29 (:CAIRO_LINE_CAP_ROUND . line-cap-round)
30 (:CAIRO_LINE_CAP_SQUARE . line-cap-square)))
31
32 (exporting-table table-line-join
33 '((:CAIRO_LINE_JOIN_MITER . line-join-miter)
34 (:CAIRO_LINE_JOIN_ROUND . line-join-round)
35 (:CAIRO_LINE_JOIN_BEVEL . line-join-bevel)))
36
37 (exporting-table table-operator
38 '((:CAIRO_OPERATOR_CLEAR . operator-clear)
39 (:CAIRO_OPERATOR_SOURCE . operator-source)
40 (:CAIRO_OPERATOR_OVER . operator-over)
41 (:CAIRO_OPERATOR_IN . operator-in)
42 (:CAIRO_OPERATOR_OUT . operator-out)
43 (:CAIRO_OPERATOR_ATOP . operator-atop)
44 (:CAIRO_OPERATOR_DEST . operator-dest)
45 (:CAIRO_OPERATOR_DEST_OVER . operator-dest-over)
46 (:CAIRO_OPERATOR_DEST_IN . operator-dest-in)
47 (:CAIRO_OPERATOR_DEST_OUT . operator-dest-out)
48 (:CAIRO_OPERATOR_DEST_ATOP . operator-dest-atop)
49 (:CAIRO_OPERATOR_XOR . operator-xor)
50 (:CAIRO_OPERATOR_ADD . operator-add)
51 (:CAIRO_OPERATOR_SATURATE . operator-saturate)))
52
53 (exporting-table table-font-slant
54 '((:CAIRO_FONT_SLANT_NORMAL . font-slant-normal)
55 (:CAIRO_FONT_SLANT_ITALIC . font-slant-italic)
56 (:CAIRO_FONT_SLANT_OBLIQUE . font-slant-oblique)))
57
58 (exporting-table table-font-weight
59 '((:CAIRO_FONT_WEIGHT_NORMAL . font-weight-normal)
60 (:CAIRO_FONT_WEIGHT_BOLD . font-weight-bold)))
61
62 (exporting-table table-subpixel-order
63 '((:CAIRO_SUBPIXEL_ORDER_DEFAULT . subpixel-order-default)
64 (:CAIRO_SUBPIXEL_ORDER_RGB . subpixel-order-rgb)
65 (:CAIRO_SUBPIXEL_ORDER_BGR . subpixel-order-bgr)
66 (:CAIRO_SUBPIXEL_ORDER_VRGB . subpixel-order-vrgb)
67 (:CAIRO_SUBPIXEL_ORDER_VBGR . subpixel-order-vbgr)))
68
69 (exporting-table table-hint-style
70 '((:CAIRO_HINT_STYLE_DEFAULT . hint-style-default)
71 (:CAIRO_HINT_STYLE_NONE . hint-style-none)
72 (:CAIRO_HINT_STYLE_SLIGHT . hint-style-slight)
73 (:CAIRO_HINT_STYLE_MEDIUM . hint-style-medium)
74 (:CAIRO_HINT_STYLE_FULL . hint-style-full)))
75
76 (exporting-table table-hint-metrics
77 '((:CAIRO_HINT_METRICS_DEFAULT . hint-metrics-default)
78 (:CAIRO_HINT_METRICS_OFF . hint-metrics-off)
79 (:CAIRO_HINT_METRICS_ON . hint-metrics-on)))
80
81 (exporting-table table-status
82 '((:CAIRO_STATUS_SUCCESS . status-success)
83 (:CAIRO_STATUS_NO_MEMORY . status-no-memory)
84 (:CAIRO_STATUS_INVALID_RESTORE . status-invalid-restore)
85 (:CAIRO_STATUS_INVALID_POP_GROUP . status-invalid-pop-group)
86 (:CAIRO_STATUS_NO_CURRENT_POINT . status-no-current-point)
87 (:CAIRO_STATUS_INVALID_MATRIX . status-invalid-matrix)
88 (:CAIRO_STATUS_INVALID_STATUS . status-invalid-status)
89 (:CAIRO_STATUS_NULL_POINTER . status-null-pointer)
90 (:CAIRO_STATUS_INVALID_STRING . status-invalid-string)
91 (:CAIRO_STATUS_INVALID_PATH_DATA . status-invalid-path-data)
92 (:CAIRO_STATUS_READ_ERROR . status-read-error)
93 (:CAIRO_STATUS_WRITE_ERROR . status-write-error)
94 (:CAIRO_STATUS_SURFACE_FINISHED . status-surface-finished)
95 (:CAIRO_STATUS_SURFACE_TYPE_MISMATCH . status-surface-type-mismatch)
96 (:CAIRO_STATUS_PATTERN_TYPE_MISMATCH . status-pattern-type-mismatch)
97 (:CAIRO_STATUS_INVALID_CONTENT . status-invalid-content)
98 (:CAIRO_STATUS_INVALID_FORMAT . status-invalid-format)
99 (:CAIRO_STATUS_INVALID_VISUAL . status-invalid-visual)
100 (:CAIRO_STATUS_FILE_NOT_FOUND . status-file-not-found)
101 (:CAIRO_STATUS_INVALID_DASH . status-invalid-dash)
102 (:CAIRO_STATUS_INVALID_DSC_COMMENT . status-invalid-dsc-comment)
103 (:CAIRO_STATUS_INVALID_INDEX . status-invalid-index)
104 (:CAIRO_STATUS_CLIP_NOT_REPRESENTABLE . status-clip-not-representable)))
105
106 (defun lookup-cairo-enum (cairo-enum table)
107 (let ((enum (cdr (assoc cairo-enum table))))
108 (unless enum
109 (error "Could not find ~a in ~a." cairo-enum table))
110 enum))
111
112 (defun lookup-enum (enum table)
113 (let ((cairo-enum (car (rassoc enum table))))
114 (unless cairo-enum
115 (error "Could not find ~a in ~a." cairo-enum table))
116 cairo-enum))

  ViewVC Help
Powered by ViewVC 1.1.5