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

Contents of /tables.lisp

Parent Directory Parent Directory | Revision Log Revision Log


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

  ViewVC Help
Powered by ViewVC 1.1.5