3 (define-g-boxed-cstruct gc-values nil
4 (foregound color
:initform
(make-color) :inline t
)
5 (background color
:initform
(make-color) :inline t
)
6 (font (g-boxed-foreign font
) :initform nil
)
7 (function gdk-function
:initform
:copy
)
8 (fill gdk-fill
:initform
:solid
)
9 (tile (g-object pixmap
) :initform nil
)
10 (stipple (g-object pixmap
) :initform nil
)
11 (clip-mask (g-object pixmap
) :initform nil
)
12 (subwindow-mode subwindow-mode
:initform
:clip-by-children
)
13 (ts-x-origin :int
:initform
0)
14 (ts-y-origin :int
:initform
0)
15 (clip-x-origin :int
:initform
0)
16 (clip-y-origin :int
:initform
0)
17 (graphics-exposures :boolean
:initform t
)
18 (line-width :int
:initform
0)
19 (line-style line-style
:initform
:solid
)
20 (cap-style cap-style
:initform
:butt
)
21 (join-style join-style
:initform
:miter
))
23 (export (boxed-related-symbols 'gc-values
))
25 (defcfun (graphics-context-new "gdk_gc_new") (g-object graphics-context
:already-referenced
)
26 (drawable (g-object drawable
)))
28 (export 'graphics-context-new
)
30 (defcfun (graphics-context-new-with-values "gdk_gc_new_with_values") (g-object graphics-context
:already-referenced
)
31 (drawable (g-object drawable
))
32 (values (g-boxed-foreign gc-values
))
33 (values-mask gc-values-mask
))
35 (export 'graphics-context-new-with-values
)
37 (defcfun (graphics-context-set-values "gdk_gc_set_values") :void
38 (graphics-context (g-object graphics-context
))
39 (values (g-boxed-foreign gc-values
))
40 (values-mask gc-values-mask
))
42 (export 'graphics-context-set-values
)
44 (defcfun gdk-gc-get-values
:void
45 (gc (g-object graphics-context
))
46 (values (g-boxed-foreign gc-values
)))
48 (defun graphics-context-get-values (graphics-context)
49 (let ((values (make-gc-values)))
50 (gdk-gc-get-values graphics-context values
)
53 (export 'graphics-context-get-values
)
55 (defcfun (graphics-context-set-ts-origin "gdk_gc_set_ts_origin") :void
56 (graphics-context (g-object graphics-context
))
60 (export 'graphics-context-set-ts-origin
)
62 (defcfun (graphics-context-set-clip-origin "gdk_gc_set_clip_origin") :void
63 (graphics-context (g-object graphics-context
))
67 (export 'graphics-context-set-clip-origin
)
69 (defcfun (graphics-context-set-line-attributes "gdk_gc_set_line_attributes") :void
70 (graphics-context (g-object graphics-context
))
72 (line-style line-style
)
74 (join-style join-style
))
76 (export 'graphics-context-set-line-attributes
)
78 (defcfun gdk-gc-set-dashes
:void
79 (graphics-context (g-object graphics-context
))
84 (defun graphics-context-set-dashes (graphics-context dash-offset dash-list
)
85 (let ((n (length dash-list
)))
86 (with-foreign-object (dash-list-ptr :int8 n
)
90 (setf (mem-aref dash-list-ptr
:int8 i
) dash
)
93 (gdk-gc-set-dashes graphics-context dash-offset dash-list n
))))
95 (export 'graphics-context-set-dashes
)
97 (defcfun (graphics-context-copy "gdk_gc_copy") :void
98 (dst-gc (g-object graphics-context
))
99 (src-gc (g-object graphics-context
)))
101 (export 'graphics-context-copy
)
103 (defcfun (graphics-context-offset "gdk_gc_offset") :void
104 (graphics-context (g-object graphics-context
))
108 (export 'graphic-context-offset
)