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 (let ((n (length points
)))
32 (with-foreign-object (points-ptr 'point-cstruct n
)
36 (gobject::copy-slots-to-native
38 (inc-pointer points-ptr
(* i
(foreign-type-size 'point-cstruct
)))
39 (gobject::g-boxed-cstruct-wrapper-info-cstruct-description
(gobject::get-g-boxed-foreign-info
'point
)))
42 (gdk-draw-points drawable gc points-ptr n
))))
46 (defcfun (draw-line "gdk_draw_line") :void
47 (drawable (g-object drawable
))
48 (gc (g-object graphics-context
))
56 (defcfun gdk-draw-lines
:void
57 (drawable (g-object drawable
))
58 (gc (g-object graphics-context
))
62 (defun draw-lines (drawable gc points
)
63 (let ((n (length points
)))
64 (with-foreign-object (points-ptr 'point-cstruct n
)
68 (gobject::copy-slots-to-native
70 (inc-pointer points-ptr
(* i
(foreign-type-size 'point-cstruct
)))
71 (gobject::g-boxed-cstruct-wrapper-info-cstruct-description
(gobject::get-g-boxed-foreign-info
'point
)))
74 (gdk-draw-lines drawable gc points-ptr n
))))
78 (defcfun (draw-pixbuf "gdk_draw_pixbuf") :void
79 (drawable (g-object drawable
))
80 (gc (g-object graphics-context
))
81 (pixbuf (g-object pixbuf
))
94 (defcfun gdk-draw-segments
:void
95 (drawable (g-object drawable
))
96 (gc (g-object graphics-context
))
100 (defun draw-segments (drawable gc segments
)
101 (let ((n (length segments
)))
102 (with-foreign-object (segments-ptr 'segment-cstruct n
)
106 (gobject::copy-slots-to-native
108 (inc-pointer segments-ptr
(* i
(foreign-type-size 'segment-cstruct
)))
109 (gobject::g-boxed-cstruct-wrapper-info-cstruct-description
(gobject::get-g-boxed-foreign-info
'segment
)))
112 (gdk-draw-segments drawable gc segments-ptr n
))))
114 (export 'draw-segments
)
116 (defcfun (draw-rectangle "gdk_draw_rectangle") :void
117 (drawable (g-object drawable
))
118 (gc (g-object graphics-context
))
125 (defcfun (draw-arc "gdk_draw_arc") :void
126 (drawable (g-object drawable
))
127 (gc (g-object graphics-context
))
138 (defcfun gdk-draw-polygon
:void
139 (drawable (g-object drawable
))
140 (gc (g-object graphics-context
))
145 (defun draw-polygon (drawable gc filled points
)
146 (let ((n (length points
)))
147 (with-foreign-object (points-ptr 'point-cstruct n
)
151 (gobject::copy-slots-to-native
153 (inc-pointer points-ptr
(* i
(foreign-type-size 'point-cstruct
)))
154 (gobject::g-boxed-cstruct-wrapper-info-cstruct-description
(gobject::get-g-boxed-foreign-info
'point
)))
157 (gdk-draw-polygon drawable gc filled points-ptr n
))))
159 (export 'draw-polygon
)
161 (defcfun gdk-draw-trapezoids
:void
162 (drawable (g-object drawable
))
163 (gc (g-object graphics-context
))
164 (trapezoids :pointer
)
167 (defun draw-trapezoids (drawable gc trapezoids
)
168 (let ((n (length trapezoids
)))
169 (with-foreign-object (trapezoids-ptr 'trapezoid-cstruct n
)
173 (gobject::copy-slots-to-native
175 (inc-pointer trapezoids-ptr
(* i
(foreign-type-size 'trapezoid-cstruct
)))
176 (gobject::g-boxed-cstruct-wrapper-info-cstruct-description
(gobject::get-g-boxed-foreign-info
'trapezoid
)))
179 (gdk-draw-trapezoids drawable gc trapezoids-ptr n
))))
181 (export 'draw-trapezoids
)
184 ;; void gdk_draw_glyphs (GdkDrawable *drawable,
189 ;; PangoGlyphString *glyphs);
190 ;; void gdk_draw_glyphs_transformed (GdkDrawable *drawable,
192 ;; const PangoMatrix *matrix,
196 ;; PangoGlyphString *glyphs);
197 ;; void gdk_draw_layout_line (GdkDrawable *drawable,
201 ;; PangoLayoutLine *line);
202 ;; void gdk_draw_layout_line_with_colors (GdkDrawable *drawable,
206 ;; PangoLayoutLine *line,
207 ;; const GdkColor *foreground,
208 ;; const GdkColor *background);
210 (defcfun (draw-layout "gdk_draw_layout") :void
211 (drawable (g-object drawable
))
212 (gc (g-object graphics-context
))
215 (layout (g-object pango-layout
)))
217 (export 'draw-layout
)
219 (defcfun (draw-layout-with-colors "gdk_draw_layout_with_colors") :void
220 (drawable (g-object drawable
))
221 (gc (g-object graphics-context
))
224 (layout (g-object pango-layout
))
225 (foreground (g-boxed-foreign color
))
226 (background (g-boxed-foreign color
)))
228 (export 'draw-layout-with-colors
)
231 ;; void gdk_draw_string (GdkDrawable *drawable,
236 ;; const gchar *string);
237 ;; void gdk_draw_text (GdkDrawable *drawable,
242 ;; const gchar *text,
243 ;; gint text_length);
244 ;; void gdk_draw_text_wc (GdkDrawable *drawable,
249 ;; const GdkWChar *text,
250 ;; gint text_length);
253 (defcfun (draw-drawable "gdk_draw_drawable") :void
254 (drawable (g-object drawable
))
255 (gc (g-object graphics-context
))
256 (src (g-object drawable
))
264 (export 'draw-drawable
)
266 (defcfun (draw-image "gdk_draw_image") :void
267 (drawable (g-object drawable
))
268 (gc (g-object graphics-context
))
269 (image (g-object gdk-image
))
279 (defcfun (drawable-get-image "gdk_drawable_get_image") (g-object gdk-image
)
280 (drawable (g-object drawable
))
286 (export 'drawable-get-image
)
288 (defcfun (drawable-copy-to-image "gdk_drawable_copy_to_image") (g-object gdk-image
)
289 (drawable (g-object drawable
))
290 (image (g-object gdk-image
))
298 (export 'drawable-copy-to-image
)