Correct the DEFPACKAGE for GOBJECT to work with recent closer-mop (0.60)
[cl-gtk2.git] / gdk / gdk.drawing-primitives.lisp
blobbdd09c992034960525f14107cb8a4586ee1bf387
1 (in-package :gdk)
3 (defcfun gdk-drawable-get-size :void
4 (drawable (g-object drawable))
5 (width (:pointer :int))
6 (height (:pointer :int)))
8 (defun drawable-get-size (drawable)
9 (with-foreign-objects ((x :int)
10 (y :int))
11 (gdk-drawable-get-size drawable x y)
12 (values (mem-ref x :int) (mem-ref y :int))))
14 (export 'drawable-get-size)
16 (defcfun (draw-point "gdk_draw_point") :void
17 (drawable (g-object drawable))
18 (gc (g-object graphics-context))
19 (x :int)
20 (y :int))
22 (export 'draw-point)
24 (defcfun gdk-draw-points :void
25 (drawable (g-object drawable))
26 (gc (g-object graphics-context))
27 (points :pointer)
28 (n :int))
30 (defun draw-points (drawable gc points)
31 (with-foreign-boxed-array (n points-ptr point points)
32 (gdk-draw-points drawable gc points-ptr n)))
34 (export 'draw-points)
36 (defcfun (draw-line "gdk_draw_line") :void
37 (drawable (g-object drawable))
38 (gc (g-object graphics-context))
39 (x1 :int)
40 (y1 :int)
41 (x2 :int)
42 (y2 :int))
44 (export 'draw-line)
46 (defcfun gdk-draw-lines :void
47 (drawable (g-object drawable))
48 (gc (g-object graphics-context))
49 (points :pointer)
50 (n :int))
52 (defun draw-lines (drawable gc points)
53 (with-foreign-boxed-array (n points-ptr point points)
54 (gdk-draw-lines drawable gc points-ptr n)))
56 (export 'draw-lines)
58 (defcfun (draw-pixbuf "gdk_draw_pixbuf") :void
59 (drawable (g-object drawable))
60 (gc (g-object graphics-context))
61 (pixbuf (g-object pixbuf))
62 (src-x :int)
63 (src-y :int)
64 (dest-x :int)
65 (dest-y :int)
66 (width :int)
67 (height :int)
68 (dither rgb-dither)
69 (x-dither :int)
70 (y-dither :int))
72 (export 'draw-pixbuf)
74 (defcfun gdk-draw-segments :void
75 (drawable (g-object drawable))
76 (gc (g-object graphics-context))
77 (segments :pointer)
78 (n-segments :int))
80 (defun draw-segments (drawable gc segments)
81 (with-foreign-boxed-array (n segments-ptr segment segments)
82 (gdk-draw-segments drawable gc segments-ptr n)))
84 (export 'draw-segments)
86 (defcfun (draw-rectangle "gdk_draw_rectangle") :void
87 (drawable (g-object drawable))
88 (gc (g-object graphics-context))
89 (filled :boolean)
90 (x :int)
91 (y :int)
92 (width :int)
93 (height :int))
95 (defcfun (draw-arc "gdk_draw_arc") :void
96 (drawable (g-object drawable))
97 (gc (g-object graphics-context))
98 (filled :boolean)
99 (x :int)
100 (y :int)
101 (width :int)
102 (height :int)
103 (angle1 :int)
104 (angle2 :int))
106 (export 'draw-arc)
108 (defcfun gdk-draw-polygon :void
109 (drawable (g-object drawable))
110 (gc (g-object graphics-context))
111 (filled :boolean)
112 (points :pointer)
113 (n-points :int))
115 (defun draw-polygon (drawable gc filled points)
116 (with-foreign-boxed-array (n points-ptr point points)
117 (gdk-draw-polygon drawable gc filled points-ptr n)))
119 (export 'draw-polygon)
121 (defcfun gdk-draw-trapezoids :void
122 (drawable (g-object drawable))
123 (gc (g-object graphics-context))
124 (trapezoids :pointer)
125 (n :int))
127 (defun draw-trapezoids (drawable gc trapezoids)
128 (with-foreign-boxed-array (n trapezoids-ptr trapezoid trapezoids)
129 (gdk-draw-trapezoids drawable gc trapezoids-ptr n)))
131 (export 'draw-trapezoids)
133 (defcfun (draw-glyphs "gdk_draw_glyphs") :void
134 (drawable (g-object drawable))
135 (gc (g-object graphics-context))
136 (font (g-object pango-font))
137 (x :int)
138 (y :int)
139 (glyphs (g-boxed-foreign pango-glyph-string)))
141 (export 'draw-glyphs)
143 (defcfun (draw-glyphs-transformed "gdk_draw_glyphs_transformed") :void
144 (drawable (g-object drawable))
145 (gc (g-object graphics-context))
146 (matrix (g-boxed-foreign pango-matrix))
147 (font (g-object pango-font))
148 (x :int)
149 (y :int))
151 (export 'draw-glyphs-transformed)
153 (defcfun (draw-layout-line "gdk_draw_layout_line") :void
154 (drawable (g-object drawable))
155 (gc (g-object graphics-context))
156 (x :int)
157 (y :int)
158 (line (g-boxed-foreign pango-layout-line)))
160 (export 'draw-layout-line)
162 (defcfun (draw-layout-line-with-colors "gdk_draw_layout_line_with_colors") :void
163 (drawable (g-object drawable))
164 (gc (g-object graphics-context))
165 (x :int)
166 (y :int)
167 (line (g-boxed-foreign pango-layout-line))
168 (foreground (g-boxed-foreign color))
169 (background (g-boxed-foreign color)))
171 (export 'draw-layout-line-with-colors)
173 (defcfun (draw-layout "gdk_draw_layout") :void
174 (drawable (g-object drawable))
175 (gc (g-object graphics-context))
176 (x :int)
177 (y :int)
178 (layout (g-object pango-layout)))
180 (export 'draw-layout)
182 (defcfun (draw-layout-with-colors "gdk_draw_layout_with_colors") :void
183 (drawable (g-object drawable))
184 (gc (g-object graphics-context))
185 (x :int)
186 (y :int)
187 (layout (g-object pango-layout))
188 (foreground (g-boxed-foreign color))
189 (background (g-boxed-foreign color)))
191 (export 'draw-layout-with-colors)
193 ;; ignored:
194 ;; void gdk_draw_string (GdkDrawable *drawable,
195 ;; GdkFont *font,
196 ;; GdkGC *gc,
197 ;; gint x,
198 ;; gint y,
199 ;; const gchar *string);
200 ;; void gdk_draw_text (GdkDrawable *drawable,
201 ;; GdkFont *font,
202 ;; GdkGC *gc,
203 ;; gint x,
204 ;; gint y,
205 ;; const gchar *text,
206 ;; gint text_length);
207 ;; void gdk_draw_text_wc (GdkDrawable *drawable,
208 ;; GdkFont *font,
209 ;; GdkGC *gc,
210 ;; gint x,
211 ;; gint y,
212 ;; const GdkWChar *text,
213 ;; gint text_length);
216 (defcfun (draw-drawable "gdk_draw_drawable") :void
217 (drawable (g-object drawable))
218 (gc (g-object graphics-context))
219 (src (g-object drawable))
220 (x-src :int)
221 (y-src :int)
222 (x-dest :int)
223 (y-dest :int)
224 (width :int)
225 (height :int))
227 (export 'draw-drawable)
229 (defcfun (draw-image "gdk_draw_image") :void
230 (drawable (g-object drawable))
231 (gc (g-object graphics-context))
232 (image (g-object gdk-image))
233 (x-src :int)
234 (y-src :int)
235 (x-dest :int)
236 (y-dest :int)
237 (width :int)
238 (height :int))
240 (export 'draw-image)
242 (defcfun (drawable-get-image "gdk_drawable_get_image") (g-object gdk-image)
243 (drawable (g-object drawable))
244 (x :int)
245 (y :int)
246 (width :int)
247 (height :int))
249 (export 'drawable-get-image)
251 (defcfun (drawable-copy-to-image "gdk_drawable_copy_to_image") (g-object gdk-image)
252 (drawable (g-object drawable))
253 (image (g-object gdk-image))
254 (src-x :int)
255 (src-y :int)
256 (dest-x :int)
257 (dest-y :int)
258 (width :int)
259 (height :int))
261 (export 'drawable-copy-to-image)