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)
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))
24 (defcfun gdk-draw-points :void
25 (drawable (g-object drawable))
26 (gc (g-object graphics-context))
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)))
36 (defcfun (draw-line "gdk_draw_line") :void
37 (drawable (g-object drawable))
38 (gc (g-object graphics-context))
46 (defcfun gdk-draw-lines :void
47 (drawable (g-object drawable))
48 (gc (g-object graphics-context))
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)))
58 (defcfun (draw-pixbuf "gdk_draw_pixbuf") :void
59 (drawable (g-object drawable))
60 (gc (g-object graphics-context))
61 (pixbuf (g-object pixbuf))
74 (defcfun gdk-draw-segments :void
75 (drawable (g-object drawable))
76 (gc (g-object graphics-context))
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))
95 (defcfun (draw-arc "gdk_draw_arc") :void
96 (drawable (g-object drawable))
97 (gc (g-object graphics-context))
108 (defcfun gdk-draw-polygon :void
109 (drawable (g-object drawable))
110 (gc (g-object graphics-context))
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)
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))
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))
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))
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))
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))
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))
187 (layout (g-object pango-layout))
188 (foreground (g-boxed-foreign color))
189 (background (g-boxed-foreign color)))
191 (export 'draw-layout-with-colors)
194 ;; void gdk_draw_string (GdkDrawable *drawable,
199 ;; const gchar *string);
200 ;; void gdk_draw_text (GdkDrawable *drawable,
205 ;; const gchar *text,
206 ;; gint text_length);
207 ;; void gdk_draw_text_wc (GdkDrawable *drawable,
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))
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))
242 (defcfun (drawable-get-image "gdk_drawable_get_image") (g-object gdk-image)
243 (drawable (g-object drawable))
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))
261 (export 'drawable-copy-to-image)