fix typos in function names
[cl-gtk2.git] / gtk / gtk.layout-containers.lisp
1 (in-package :gtk)
2
3 (defcfun (fixed-put "gtk_fixed_put") :void
4   (fixed g-object)
5   (widget g-object)
6   (x :int)
7   (y :int))
8
9 (export 'fixed-put)
10
11 (defcfun (fixed-move "gtk_fixed_move") :void
12   (fixed g-object)
13   (widget g-object)
14   (x :int)
15   (y :int))
16
17 (export 'fixed-move)
18
19 (defcfun (layout-put "gtk_layout_put") :void
20   (layout g-object)
21   (widget g-object)
22   (x :int)
23   (y :int))
24
25 (export 'layout-put)
26
27 (defcfun (layout-move "gtk_layout_move") :void
28   (layout g-object)
29   (widget g-object)
30   (x :int)
31   (y :int))
32
33 (export 'layout-move)
34
35 (defcfun gtk-notebook-append-page :int
36   (notebook g-object)
37   (child g-object)
38   (tab-label g-object))
39
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))
45
46 (defcfun gtk-notebook-prepend-page :int
47   (notebook g-object)
48   (child g-object)
49   (tab-label g-object))
50
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))
56
57 (defcfun gtk-notebook-insert-page :int
58   (notebook g-object)
59   (child g-object)
60   (tab-label g-object)
61   (position :int))
62
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))
69
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)))))
83
84 (export 'notebook-add-page)
85
86 (defcfun (notebook-remove-page "gtk_notebook_remove_page") :void
87   (notebook g-object)
88   (child g-object))
89
90 (export 'notebook-remove-page)
91
92 (defcfun (notebook-next-page "gtk_notebook_next_page") :void
93   (notebook g-object))
94
95 (export 'notebook-next-page)
96
97 (defcfun (notebook-prev-page "gtk_notebook_prev_page") :void
98   (notebook g-object))
99
100 (export 'notebook-prev-page)
101
102 (defcfun (notebook-reorder-child "gtk_notebook_reorder_child") :void
103   (notebook g-object)
104   (child g-object)
105   (position :int))
106
107 (export 'notebook-reorder-child)
108
109 (defcfun (notebook-menu-label-widget "gtk_notebook_get_menu_label") g-object
110   (notebook g-object)
111   (child g-object))
112
113 (export 'notebook-menu-label-widget)
114
115 (defcfun (notebook-nth-page "gtk_notebook_get_nth_page") g-object
116   (notebook g-object)
117   (page-num :int))
118
119 (export 'notebook-nth-page)
120
121 (defcfun (notebook-n-pages "gtk_notebook_get_n_pages") :int
122   (notebook g-object))
123
124 (export 'notebook-n-pages)
125
126 (defcfun (notebook-tab-label-widget "gtk_notebook_get_tab_label") g-object
127   (notebook g-object)
128   (child g-object))
129
130 (export 'notebook-tab-label-widget)
131
132 (defcfun (gtk-notebook-set-menu-label-widget "gtk_notebook_set_menu_label") :void
133   (notebook g-object)
134   (child g-object)
135   (menu-label g-object))
136
137 (defun (setf notebook-menu-label-widget) (new-value notebook child)
138   (gtk-notebook-set-menu-label-widget notebook child new-value)
139   new-value)
140
141 (defcfun (gtk-notebook-set-tab-label-widget "gtk_notebook_set_tab_label") :void
142   (notebook g-object)
143   (child g-object)
144   (tab-label g-object))
145
146 (defun (setf notebook-tab-label-widget) (new-value notebook child)
147   (gtk-notebook-set-tab-label-widget notebook child new-value)
148   new-value)
149
150 (defcallback gtk-notebook-window-creation-func-callback g-object
151     ((source g-object) (page g-object) (x :int) (y :int) (data :pointer))
152   (restart-case
153       (funcall (get-stable-pointer-value data)
154                source page x y)
155     (return-null () nil)))
156
157 (defcfun gtk-notebook-set-window-creation-hook :void
158   (func :pointer)
159   (data :pointer)
160   (destroy-notify :pointer))
161
162 (defun notebook-set-window-creation-hook (function)
163   (gtk-notebook-set-window-creation-hook (callback gtk-notebook-window-creation-func-callback)
164                                          (allocate-stable-pointer function)
165                                          (callback stable-pointer-free-destroy-notify-callback)))
166
167 (export 'notebook-set-window-creation-hook)
168
169 (defcfun gtk-table-attach :void
170   (table (g-object table))
171   (child (g-object widget))
172   (left-attach :uint)
173   (right-attach :uint)
174   (top-attach :uint)
175   (bottom-attach :uint)
176   (x-options attach-options)
177   (y-options attach-options)
178   (x-padding :uint)
179   (y-padding :uint))
180
181 (defun table-attach (table widget left right top bottom &key (x-options '(:expand :fill)) (y-options '(:expand :fill)) (x-padding 0) (y-padding 0))
182   (gtk-table-attach table widget left right top bottom x-options y-options x-padding y-padding))
183
184 (export 'table-attach)
185
186 (defcfun (table-row-spacing-for-row "gtk_table_get_row_spacing") :uint
187   (table g-object)
188   (row :uint))
189
190 (defcfun gtk-table-set-row-spacing :void
191   (table g-object)
192   (row :uint)
193   (spacing :uint))
194
195 (defun (setf table-row-spacing-for-row) (new-value table row)
196   (gtk-table-set-row-spacing table row new-value))
197
198 (export 'table-row-spacing-for-row)
199
200 (defcfun (table-col-spacing-for-col "gtk_table_get_col_spacing") :uint
201   (table g-object)
202   (col :uint))
203
204 (defcfun gtk-table-set-col-spacing :void
205   (table g-object)
206   (col :uint)
207   (spacing :uint))
208
209 (defun (setf table-col-spacing-for-col) (new-value table col)
210   (gtk-table-set-col-spacing table col new-value))
211
212 (export 'table-col-spacing-for-col)