3 (defcfun (default-screen "gdk_screen_get_default") (g-object gdk-screen
))
4 (export 'default-screen
)
6 (defcfun gdk-window-get-events event-mask
7 (window (g-object gdk-window
)))
9 (defcfun gdk-window-set-events
:void
10 (window (g-object gdk-window
))
13 (defun gdk-window-events (window)
14 (gdk-window-get-events window
))
16 (defun (setf gdk-window-events
) (new-value window
)
17 (gdk-window-set-events window new-value
))
19 (export 'gdk-window-events
)
21 (defcfun gdk-gc-new
(g-object graphics-context
:already-referenced
)
22 (drawable (g-object drawable
)))
24 (defcfun gdk-draw-line
:void
25 (drawable (g-object drawable
))
26 (gc (g-object graphics-context
))
32 (defcfun gdk-gc-set-rgb-fg-color
:void
33 (gc (g-object graphics-context
))
34 (color (g-boxed-foreign color
)))
36 (defcfun gdk-drawable-get-size
:void
37 (drawable (g-object drawable
))
38 (width (:pointer
:int
))
39 (height (:pointer
:int
)))
41 (defun drawable-get-size (drawable)
42 (with-foreign-objects ((x :int
)
44 (gdk-drawable-get-size drawable x y
)
45 (values (mem-ref x
:int
) (mem-ref y
:int
))))
47 (export 'drawable-get-size
)
49 (defcfun gdk-draw-layout
:void
50 (drawable (g-object drawable
))
51 (gc (g-object graphics-context
))
54 (layout (g-object pango-layout
)))
56 (defcfun gdk-atom-name
(glib:g-string
:free-from-foreign t
)
59 (defcfun gdk-atom-intern gdk-atom
61 (only-if-exists :boolean
))
63 (export 'drawable-size
)
65 (defcfun gdk-pixbuf-get-from-drawable
(g-object pixbuf
:already-referenced
)
66 (dest (g-object pixbuf
))
67 (src (g-object drawable
))
76 (defun pixbuf-get-from-drawable (pixbuf drawable
&key
(src-x 0) (src-y 0) (dest-x 0) (dest-y 0) (width -
1) (height -
1))
77 (gdk-pixbuf-get-from-drawable pixbuf drawable
(null-pointer) src-x src-y dest-x dest-y width height
))
79 (export 'pixbuf-get-from-drawable
)
81 (defcfun gdk-pixbuf-savev
:boolean
82 (pixbuf (g-object pixbuf
))
85 (option-keys (:pointer
(:pointer
:char
)))
86 (option-values (:pointer
(:pointer
:char
)))
89 (defun pixbuf-save (pixbuf filename type
)
90 (gdk-pixbuf-savev pixbuf
93 (pathname (namestring filename
)))
101 (defcfun gdk-pixbuf-new-from-file
(g-object pixbuf
:already-referenced
)
105 (defun pixbuf-new-from-file (filename)
106 (glib:with-g-error
(err)
107 (gdk-pixbuf-new-from-file filename err
)))
109 (export 'pixbuf-new-from-file
)