Add Gdk/DrawingPrimitives
[cl-gtk2.git] / gtk / gtk.layout-containers.lisp
blob24e7129d2cb0e7b0ac81852a0f289a3c5b1dca32
1 (in-package :gtk)
3 (defcfun (fixed-put "gtk_fixed_put") :void
4 (fixed g-object)
5 (widget g-object)
6 (x :int)
7 (y :int))
9 (export 'fixed-put)
11 (defcfun (fixed-move "gtk_fixed_move") :void
12 (fixed g-object)
13 (widget g-object)
14 (x :int)
15 (y :int))
17 (export 'fixed-move)
19 (defcfun (layout-put "gtk_layout_put") :void
20 (layout g-object)
21 (widget g-object)
22 (x :int)
23 (y :int))
25 (export 'layout-put)
27 (defcfun (layout-move "gtk_layout_move") :void
28 (layout g-object)
29 (widget g-object)
30 (x :int)
31 (y :int))
33 (export 'layout-move)
35 (defcfun gtk-notebook-append-page :int
36 (notebook g-object)
37 (child g-object)
38 (tab-label g-object))
40 (defcfun gtk-notebook-append-page-menu :int
41 (notebook g-object)
42 (child g-object)
43 (tab-label g-object)
44 (menu g-object))
46 (defcfun gtk-notebook-prepend-page :int
47 (notebook g-object)
48 (child g-object)
49 (tab-label g-object))
51 (defcfun gtk-notebook-prepend-page-menu :int
52 (notebook g-object)
53 (child g-object)
54 (tab-label g-object)
55 (menu g-object))
57 (defcfun gtk-notebook-insert-page :int
58 (notebook g-object)
59 (child g-object)
60 (tab-label g-object)
61 (position :int))
63 (defcfun gtk-notebook-insert-page-menu :int
64 (notebook g-object)
65 (child g-object)
66 (tab-label g-object)
67 (menu g-object)
68 (position :int))
70 (defun notebook-add-page (notebook child tab-label &key (position :end) menu)
71 (assert (typep position '(or integer (member :start :end))))
72 (assert (typep menu '(or null g-object (member :default))))
73 (case position
74 (:end (if menu
75 (gtk-notebook-append-page-menu notebook child tab-label (if (eq menu :default) (null-pointer) menu))
76 (gtk-notebook-append-page notebook child tab-label)))
77 (:start (if menu
78 (gtk-notebook-prepend-page-menu notebook child tab-label (if (eq menu :default) (null-pointer) menu))
79 (gtk-notebook-prepend-page notebook child tab-label)))
80 (otherwise (if menu
81 (gtk-notebook-insert-page-menu notebook child tab-label (if (eq menu :default) (null-pointer) menu) position)
82 (gtk-notebook-insert-page notebook child tab-label position)))))
84 (export 'notebook-add-page)
86 (defcfun (notebook-page-num "gtk_notebook_page_num") :int
87 (notebook g-object)
88 (child g-object))
90 (export 'notebook-page-num)
92 (defcfun gtk-notebook-remove-page :void
93 (notebook g-object)
94 (page-num :int))
96 (defun notebook-remove-page (notebook page-or-number)
97 (gtk-notebook-remove-page notebook (etypecase page-or-number
98 (integer page-or-number)
99 (widget (notebook-page-num notebook page-or-number)))))
101 (export 'notebook-remove-page)
103 (defcfun (notebook-next-page "gtk_notebook_next_page") :void
104 (notebook g-object))
106 (export 'notebook-next-page)
108 (defcfun (notebook-prev-page "gtk_notebook_prev_page") :void
109 (notebook g-object))
111 (export 'notebook-prev-page)
113 (defcfun (notebook-reorder-child "gtk_notebook_reorder_child") :void
114 (notebook g-object)
115 (child g-object)
116 (position :int))
118 (export 'notebook-reorder-child)
120 (defcfun (notebook-menu-label-widget "gtk_notebook_get_menu_label") g-object
121 (notebook g-object)
122 (child g-object))
124 (export 'notebook-menu-label-widget)
126 (defcfun (notebook-nth-page "gtk_notebook_get_nth_page") g-object
127 (notebook g-object)
128 (page-num :int))
130 (export 'notebook-nth-page)
132 (defcfun (notebook-n-pages "gtk_notebook_get_n_pages") :int
133 (notebook g-object))
135 (export 'notebook-n-pages)
137 (defcfun (notebook-tab-label-widget "gtk_notebook_get_tab_label") g-object
138 (notebook g-object)
139 (child g-object))
141 (export 'notebook-tab-label-widget)
143 (defcfun (gtk-notebook-set-menu-label-widget "gtk_notebook_set_menu_label") :void
144 (notebook g-object)
145 (child g-object)
146 (menu-label g-object))
148 (defun (setf notebook-menu-label-widget) (new-value notebook child)
149 (gtk-notebook-set-menu-label-widget notebook child new-value)
150 new-value)
152 (defcfun (gtk-notebook-set-tab-label-widget "gtk_notebook_set_tab_label") :void
153 (notebook g-object)
154 (child g-object)
155 (tab-label g-object))
157 (defun (setf notebook-tab-label-widget) (new-value notebook child)
158 (gtk-notebook-set-tab-label-widget notebook child new-value)
159 new-value)
161 (defcallback gtk-notebook-window-creation-func-callback g-object
162 ((source g-object) (page g-object) (x :int) (y :int) (data :pointer))
163 (restart-case
164 (funcall (get-stable-pointer-value data)
165 source page x y)
166 (return-null () nil)))
168 (defcfun gtk-notebook-set-window-creation-hook :void
169 (func :pointer)
170 (data :pointer)
171 (destroy-notify :pointer))
173 (defun notebook-set-window-creation-hook (function)
174 (gtk-notebook-set-window-creation-hook (callback gtk-notebook-window-creation-func-callback)
175 (allocate-stable-pointer function)
176 (callback stable-pointer-free-destroy-notify-callback)))
178 (export 'notebook-set-window-creation-hook)
180 (defcfun gtk-table-attach :void
181 (table (g-object table))
182 (child (g-object widget))
183 (left-attach :uint)
184 (right-attach :uint)
185 (top-attach :uint)
186 (bottom-attach :uint)
187 (x-options attach-options)
188 (y-options attach-options)
189 (x-padding :uint)
190 (y-padding :uint))
192 (defun table-attach (table widget left right top bottom &key (x-options '(:expand :fill)) (y-options '(:expand :fill)) (x-padding 0) (y-padding 0))
193 (gtk-table-attach table widget left right top bottom x-options y-options x-padding y-padding))
195 (export 'table-attach)
197 (defcfun (table-row-spacing-for-row "gtk_table_get_row_spacing") :uint
198 (table g-object)
199 (row :uint))
201 (defcfun gtk-table-set-row-spacing :void
202 (table g-object)
203 (row :uint)
204 (spacing :uint))
206 (defun (setf table-row-spacing-for-row) (new-value table row)
207 (gtk-table-set-row-spacing table row new-value))
209 (export 'table-row-spacing-for-row)
211 (defcfun (table-col-spacing-for-col "gtk_table_get_col_spacing") :uint
212 (table g-object)
213 (col :uint))
215 (defcfun gtk-table-set-col-spacing :void
216 (table g-object)
217 (col :uint)
218 (spacing :uint))
220 (defun (setf table-col-spacing-for-col) (new-value table col)
221 (gtk-table-set-col-spacing table col new-value))
223 (export 'table-col-spacing-for-col)