34dab4963e4444e94276ea01fee8b9f1d339c6d3
[cl-gtk2.git] / generating.lisp
1 (defpackage :gtk-generation
2   (:use :cl :gobject :cffi :glib)
3   (:export #:gtk-generate
4            #:gtk-generate-child-properties))
5
6 (in-package :gtk-generation)
7
8 (load-foreign-library "libgtk-x11-2.0.so")
9
10 (defcfun gtk-init-check :boolean
11   (argc (:pointer :int))
12   (argv (:pointer (:pointer :string))))
13
14 (defun gtk-init ()
15   (gtk-init-check (foreign-alloc :int :initial-element 0)
16                   (foreign-alloc :string :initial-contents '("/usr/bin/sbcl")))
17   #+nil(with-foreign-objects ((argc :int)
18                          (argv '(:pointer :string) 1))
19     (setf (mem-ref argc :int) 0
20           (mem-ref argv '(:pointer :string)) (foreign-alloc :string :count 1
21                                                             :initial-element "/usr/bin/sbcl"))
22     (unwind-protect
23          (unless (gtk-init-check argc argv)
24            (error "Cannot initialize Gtk+"))
25       (foreign-free (mem-ref argv '(:pointer :string))))))
26
27 (gtk-init)
28
29 (defcfun gtk-test-register-all-types :void)
30
31 (gtk-test-register-all-types)
32
33 (defun gtk-generate (filename)
34   (with-open-file (stream filename :direction :output :if-exists :supersede)
35     (generate-types-hierarchy-to-file
36      stream
37      "GtkObject"
38      :include-referenced t
39      :prefix "Gtk"
40      :package (or (find-package :gtk) (make-package :gtk))
41      :exceptions `(("GObject" gobject:g-object)
42                    ("GtkObject" ,(intern "GTK-OBJECT" (find-package :gtk)))
43                    ("GInitiallyUnowned" gobject::g-initially-unowned)
44                    ("GtkWindow" ,(intern "GTK-WINDOW" (find-package :gtk)))
45                    ("GtkUIManager" ,(intern "UI-MANAGER" (find-package :gtk)))
46                    ("GtkUIManagerItemType" ,(intern "UI-MANAGER-ITEM-TYPE" (find-package :gtk))))
47      :prologue (format nil "(in-package :gtk)")
48      :interfaces '("GtkBuildable"
49                    "GtkCellEditable"
50                    "GtkCellLayout"
51                    "GtkEditable"
52                    "GtkFileChooser"
53                    "GtkFileChooserEmbed"
54                    "GtkTreeModel"
55                    "GtkTreeDragSource"
56                    "GtkTreeDragDest"
57                    "GtkTreeSortable"
58                    "GtkPrintOperationPreview"
59                    "GtkRecentChooser"
60                    "GtkToolShell"
61                    "GtkOrientable"
62                    "GtkActivatable"
63                    "AtkImplementorIface")
64      :objects '("GtkSettings" "GtkRcStyle" "GtkStyle" "GtkTooltip" "GtkAccelGroup"
65                 "GtkAccelMap" "GtkAction" "GtkActionGroup" "GtkBuilder" "GtkClipboard"
66                 "GtkEntryCompletion" "GtkIconFactory" "GtkIconTheme" "GtkIMContext"
67                 "GtkListStore" "GtkPageSetup" "GtkPrintContext" "GtkPrintOperation"
68                 "GtkPrintSettings" "GtkRecentManager" "GtkSizeGroup" "GtkStatusIcon"
69                 "GtkTextBuffer" "GtkTextChildAnchor" "GtkTextMark" "GtkTextTag"
70                 "GtkTextTagTable" "GtkTreeModelFilter" "GtkTreeModelSort"
71                 "GtkTreeSelection" "GtkTreeStore" "GtkUIManager" "GtkWindowGroup"
72                 "GtkToggleAction" "GtkRecentAction" "GtkRadioAction" "GtkItemFactory"
73                 "GtkPageSetupUnixDialog" "GtkPrintUnixDialog")
74      :flags '("GtkTextSearchFlags" "GtkAccelFlags" "GtkArgFlags" "GtkAttachOptions"
75               "GtkButtonAction" "GtkCalendarDisplayOptions" "GtkCellRendererState"
76               "GtkDebugFlag" "GtkDestDefaults" "GtkDialogFlags" "GtkFileFilterFlags"
77               "GtkIconLookupFlags" "GtkObjectFlags" "GtkPrivateFlags" "GtkRcFlags"
78               "GtkRecentFilterFlags" "GtkSignalRunType" "GtkTargetFlags"
79               "GtkTreeModelFlags" "GtkUIManagerItemType" "GtkWidgetFlags")
80      :enums '("GtkTextDirection" "GtkSizeGroupMode" "GtkUnit" "GtkPrintStatus"
81               "GtkRecentSortType" "GtkFileChooserAction" "GtkCellRendererAccelMode"
82               "GtkCellRendererMode" "GtkTreeViewColumnSizing"
83               "GtkProgressBarOrientation" "GtkProgressBarStyle" "GtkUpdateType"
84               "GtkMetricType" "GtkSpinButtonUpdatePolicy" "GtkCurveType" "GtkImageType"
85               "GtkArrowType" "GtkSortType" "GtkToolbarStyle" "GtkWrapMode"
86               "GtkJustification" "GtkButtonBoxStyle" "GtkSelectionMode"
87               "GtkTreeViewGridLines" "GtkPackDirection" "GtkPolicyType" "GtkCornerType"
88               "GtkSensitivityType" "GtkShadowType" "GtkIconSize" "GtkOrientation"
89               "GtkPositionType" "GtkReliefStyle" "GtkMessageType" "GtkButtonsType"
90               "GtkWindowType" "GtkWindowPosition" "GtkResizeMode"
91               "GtkTextBufferTargetInfo" "GtkStateType" "GtkDirectionType"
92               "GtkDragResult" "GtkWidgetHelpType" "GtkPackType" "GtkNotebookTab"
93               "GtkMovementStep" "GtkAnchorType" "GtkAssistantPageType"
94               "GtkBuilderError" "GtkCellType" "GtkCListDragPos" "GtkCTreeExpanderStyle"
95               "GtkCTreeExpansionType" "GtkCTreeLineStyle" "GtkCTreePos" "GtkDeleteType"
96               "GtkExpanderStyle" "GtkFileChooserConfirmation" "GtkFileChooserError"
97               "GtkIconThemeError" "GtkIconViewDropPosition" "GtkIMPreeditStyle"
98               "GtkIMStatusStyle" "GtkMatchType" "GtkMenuDirectionType"
99               "GtkNumberUpLayout" "GtkPageOrientation" "GtkPageSet"
100               "GtkPathPriorityType" "GtkPathType" "GtkPreviewType" "GtkPrintDuplex"
101               "GtkPrintError" "GtkPrintOperationAction" "GtkPrintOperationResult"
102               "GtkPrintPages" "GtkPrintQuality" "GtkRcTokenType"
103               "GtkRecentChooserError" "GtkRecentManagerError" "GtkResponseType"
104               "GtkScrollStep" "GtkScrollType" "GtkSideType" "GtkSpinType"
105               "GtkSubmenuDirection" "GtkSubmenuPlacement" "GtkTextWindowType"
106               "GtkToolbarChildType" "GtkToolbarSpaceStyle" "GtkTreeViewDropPosition"
107               "GtkTreeViewMode" "GtkVisibility" "GtkEntryIconPosition")
108      :exclusions '("PangoStretch" "PangoVariant" "PangoStyle" "PangoUnderline" "GtkGLDrawingArea"
109                    "GtkCList" "GtkCTree" "GtkCombo" "GtkFileSelection" "GtkItemFactory" "GtkList"
110                    "GtkListItem" "GtkOldEditable" "GtkOptionMenu" "GtkPixmap" "GtkPreview"
111                    "GtkText" "GtkTooltips" "GtkTipsQuery" "GtkTree" "GtkTreeItem")
112      :additional-properties
113      '(("GtkWindow"
114         (:cffi gtk::focus gtk::gtk-window-focus (g-object gtk::widget)
115          "gtk_window_get_focus" "gtk_window_set_focus")
116         (:cffi gtk::default-widget gtk::gtk-window-default-widget (g-object gtk::widget)
117          "gtk_window_get_default_widget" "gtk_window_set_default")
118         (:cffi gtk::has-frame gtk::gtk-window-has-frame :boolean
119          "gtk_window_get_has_frame" "gtk_window_set_has_frame")
120         (:cffi gtk::mnemonic-modifier gtk::gtk-window-mnemonic-modifier (g-object gdk::modifier-type)
121          "gtk_window_get_mnemonic_modifier" "gtk_window_set_mnemonic_modifier")
122         (:cffi gtk::icon-list gtk::gtk-window-icon-list (glist gtk::pixbuf :free-from-foreign t :free-to-foreign t)
123          "gtk_window_get_icon_list" "gtk_window_set_icon_list")
124         (:cffi gtk::group gtk::gtk-window-group (g-object gtk::window-group)
125          "gtk_window_get_group" nil)
126         (:cffi gtk::keep-above gtk::gtk-window-keep-above :boolean
127          nil "gtk_window_set_keep_above")
128         (:cffi gtk::keep-below gtk::gtk-window-keep-below :boolean
129          nil "gtk_window_set_keep_below"))
130        ("GtkTreeViewColumn"
131         (:cffi gtk::tree-view gtk::tree-view-column-tree-view g-object
132          "gtk_tree_view_column_get_tree_view" nil)
133         (:cffi gtk::sort-column-id gtk::tree-view-column-sort-column-id :int
134          "gtk_tree_view_column_get_sort_column_id" "gtk_tree_view_column_set_sort_column_id")
135         (:cffi gtk::cell-renderers gtk::tree-view-column-cell-renderers (glist g-object  :free-from-foreign t)
136          "gtk_tree_view_column_get_cell_renderers" nil))
137        ("GtkTreeSelection"
138         (:cffi gtk::mode gtk::tree-selection-mode gtk::selection-mode
139          "gtk_tree_selection_get_mode" "gtk_tree_selection_set_mode")
140         (:cffi gtk::select-function gtk::tree-selection-select-function nil
141          gtk::tree-selection-get-selection-function gtk::tree-selection-set-select-function)
142         (:cffi gtk::tree-view gtk::tree-selection-tree-view (g-object gtk::tree-view)
143          "gtk_tree_selection_get_tree_view" nil))
144        ("GtkTreeView"
145         (:cffi gtk::selection gtk::tree-view-selection g-object
146          "gtk_tree_view_get_selection" nil)
147         (:cffi gtk::column-drag-function gtk::tree-view-column-drag-function nil
148          nil gtk::tree-view-set-column-drag-function)
149         (:cffi gtk::bin-window gtk::tree-view-bin-window g-object
150          "gtk_tree_view_get_bin_window" nil)
151         (:cffi gtk::search-equal-func gtk::tree-view-search-equal-func nil
152          nil gtk::tree-view-set-search-equal-func)
153         (:cffi gtk::search-entry gtk::tree-view-search-entry g-object
154          "gtk_tree_view_get_search_entry" "gtk_tree_view_set_search_entry")
155         (:cffi gtk::search-position-func gtk::tree-view-search-position-func nil
156          nil gtk::tree-view-set-search-position-func)
157         (:cffi gtk::row-separator-func gtk::tree-view-row-separator-func nil
158          nil gtk::tree-view-set-row-separartor-func))
159        ("GtkCellView"
160         (:cffi gtk::displayed-row gtk::cell-view-displayed-row (g-boxed-foreign gtk::tree-path)
161          "gtk_cell_view_get_displayed_row" "gtk_cell_view_set_displayed_row")
162         (:cffi gtk::cell-renderers gtk::cell-view-cell-renderers (glist (g-object gtk::cell-renderer) :free-from-foreign t)
163          "gtk_cell_view_get_cell_renderers" nil))
164        ("GtkComboBox"
165         (:cffi gtk::active-iter gtk::combo-box-active-iter (g-boxed-foreign gtk::tree-iter)
166          gtk::combo-box-get-active-iter "gtk_combo_box_set_active_iter")
167         (:cffi gtk::row-separator-func gtk::combo-box-separator-func nil
168          nil gtk::combo-box-set-separator-func)
169         (:cffi gtk::title gtk::combo-box-title (:string :free-from-foreign nil :free-to-foreign t)
170          "gtk_combo_box_get_title" "gtk_combo_box_set_title"))
171        ("GtkMenu"
172         (:cffi gtk::screen gtk::menu-screen g-object
173          nil "gtk_menu_set_screen")
174         (:cffi gtk::title gtk::menu-title (:string :free-from-foreign nil :free-to-foreign t)
175          "gtk_menu_get_title" "gtk_menu_set_title"))
176        ("GtkToolItem"
177         (:cffi gtk::expand gtk::tool-item-expand :boolean
178          "gtk_tool_item_get_expand" "gtk_tool_item_set_expand")
179         (:cffi gtk::use-drag-window gtk::tool-item-use-drag-window :boolean
180          "gtk_tool_item_get_use_drag_window" "gtk_tool_item_set_use_drag_window")
181         (:cffi gtk::icon-size gtk::tool-item-icon-size gtk::icon-size
182          "gtk_tool_item_get_icon_size" nil)
183         (:cffi gtk::orientation gtk::tool-item-orientation gtk::orientation
184          "gtk_tool_item_get_orientation" nil)
185         (:cffi gtk::toolbar-style gtk::tool-item-toolbar-style gtk::toolbar-style
186          "gtk_tool_item_get_toolbar_style" nil)
187         (:cffi gtk::relief-style gtk::tool-item-relief-style gtk::relief-style
188          "gtk_tool_item_get_relief_style" nil))
189        ("GtkMenuToolButton"
190         (:cffi gtk::arrow-tooltip-text gtk::menu-tool-button-arrow-tooltip-text :string
191          nil "gtk_menu_tool_button_set_arrow_tooltip_text")
192         (:cffi gtk::arrow-tooltip-markup gtk::menu-tool-button-arrow-tooltip-markup :string
193          nil "gtk_menu_tool_button_set_arrow_tooltip_markup"))
194        ("GtkRadioButton"
195         (:cffi gtk::group gtk::radio-button-group (gslist gtk::radio-button :free-from-foreign nil :free-to-foreign nil)
196          nil "gtk_radio_button_set_group"))
197        ("GtkUIManager"
198         (:cffi gtk::accel-group gtk::ui-manager-accel-group g-object
199          "gtk_ui_manager_get_accel_group" nil))
200        ("GtkActionGroup"
201         (:cffi gtk::translate-function gtk::action-group-translate-function nil
202          nil gtk::action-group-set-translate-func)
203         (:cffi gtk::translation-domain gtk::action-group-translation-domain nil
204          nil gtk::gtk-action-group-set-translation-domain))
205        ("GtkAction"
206         (:cffi gtk::accel-path gtk::action-accel-path (:string :free-from-foreign nil :free-to-foreign t)
207          "gtk_action_get_accel_path" "gtk_action_set_accel_path")
208         (:cffi gtk::accel-group gtk::action-accel-group g-object
209          nil "gtk_action_set_accel_group"))
210        ("GtkFileChooser"
211         (:cffi gtk::current-name gtk::file-chooser-current-name (:string :free-to-foreign t :encoding :utf-8)
212          nil "gtk_file_chooser_set_current_name")
213         (:cond :+win32
214          :cffi gtk::filename gtk::file-chooser-filename (glib:g-string :free-from-foreign t :free-to-foreign t)
215          "gtk_file_chooser_get_filename_utf8" "gtk_file_chooser_set_filename_utf8")
216         (:cond :-win32
217          :cffi gtk::filename gtk::file-chooser-filename (glib:g-string :free-from-foreign t :free-to-foreign t)
218          "gtk_file_chooser_get_filename" "gtk_file_chooser_set_filename")
219         (:cond :+win32
220          :cffi gtk::current-folder gtk::file-chooser-current-folder (glib:g-string :free-from-foreign t :free-to-foreign t)
221          "gtk_file_chooser_get_current_folder_utf8" "gtk_file_chooser_set_current_folder_utf8")
222         (:cond :-win32
223          :cffi gtk::current-folder gtk::file-chooser-current-folder (glib:g-string :free-from-foreign t :free-to-foreign t)
224          "gtk_file_chooser_get_current_folder" "gtk_file_chooser_set_current_folder")
225         (:cffi gtk::uri gtk::file-chooser-uri (glib:g-string :free-from-foreign t :free-to-foreign t)
226          "gtk_file_chooser_get_uri" "gtk_file_chooser_set_uri")
227         (:cffi gtk::current-folder-uri gtk::file-chooser-current-folder-uri (glib:g-string :free-from-foreign t :free-to-foreign t)
228          "gtk_file_chooser_get_current_folder_uri" "gtk_file_chooser_set_current_folder_uri")
229         (:cond :+win32
230          :cffi gtk::preview-filename gtk::file-chooser-preview-filename (glib:g-string :free-from-foreign t :free-to-foreign t)
231          "gtk_file_chooser_get_preview_filename_utf8" nil)
232         (:cond :-win32
233          :cffi gtk::preview-filename gtk::file-chooser-preview-filename (glib:g-string :free-from-foreign t :free-to-foreign t)
234          "gtk_file_chooser_get_preview_filename" nil)
235         (:cffi gtk::preview-uri gtk::file-chooser-preview-uri (glib:g-string :free-from-foreign t :free-to-foreign t)
236          "gtk_file_chooser_get_preview_uri" nil))
237        ("GtkFileFilter"
238         (:cffi gtk::name gtk::file-filter-name :string
239          "gtk_file_filter_get_name" "gtk_file_filter_set_name"))
240        ("GtkFontSelectionDialog"
241         (:cffi gtk::font-name gtk::font-selection-dialog-font-name (glib:g-string :free-from-foreign t :free-to-foreign t)
242          "gtk_font_selection_dialog_get_font_name" "gtk_font_selection_dialog_set_font_name")
243         (:cffi gtk::preview-text gtk::font-selection-dialog-preview-text :string
244          "gtk_font_selection_dialog_get_preview_text" "gtk_font_selection_dialog_set_preview_text")
245         (:cffi gtk::apply-button gtk::font-selection-dialog-apply-button g-object
246          "gtk_font_selection_dialog_get_apply_button" nil)
247         (:cffi gtk::cancel-button gtk::font-selection-dialog-cancel-button g-object
248          "gtk_font_selection_dialog_get_cancel_button" nil)
249         (:cffi gtk::ok-button gtk::font-selection-dialog-ok-button g-object
250          "gtk_font_selection_dialog_get_ok_button" nil))
251        ("GtkFixed"
252         (:cffi gtk::has-window gtk::fixed-has-window :boolean
253          "gtk_fixed_get_has_window" "gtk_fixed_set_has_window"))
254        ("GtkLayout"
255         (:cffi gtk::bin-window gtk::layout-bin-window g-object
256          "gtk_layout_get_bin_window" nil))
257        ("GtkCalendar"
258         (:cffi gtk::detail-function gtk::calendar-detail-function nil
259          nil gtk::calendar-set-detail-function)
260         (:cffi gtk::display-options gtk::calendar-display-options gtk::calendar-display-options
261          "gtk_calendar_get_display_options" "gtk_calendar_set_display_options"))
262        ("GtkContainer"
263         (:cffi gtk::focus-child gtk::container-focus-child g-object
264          "gtk_container_get_focus_child" "gtk_container_set_focus_child")
265         (:cffi gtk::focus-vadjustment gtk::container-focus-vadjustment g-object
266          "gtk_container_get_focus_vadjustment" "gtk_container_set_focus_vadjustment")
267         (:cffi gtk::focus-hadjustment gtk::container-focus-hadjustment g-object
268          "gtk_container_get_focus_hadjustment" "gtk_container_set_focus_hadjustment")
269         (:cffi gtk::reallocate-redraws gtk::container-reallocate-redraws :boolean
270          nil "gtk_container_set_reallocate_redraws"))
271        ("GtkWidget"
272         (:cffi gtk::parent-window gtk::widget-parent-window (g-object gdk::gdk-window)
273          "gtk_widget_get_parent_window" "gtk_widget_set_parent_window")
274         (:cffi gtk::toplevel gtk::widget-toplevel (g-object gtk::widget)
275          "gtk_widget_get_toplevel" nil)
276         (:cffi gtk::colormap gtk::widget-colormap (g-object gdk::gdk-colormap)
277          "gtk_widget_get_colormap" "gtk_widget_set_colormap")
278         (:cffi gtk::visual gtk::widget-visual (g-object gdk::visual)
279          "gtk_widget_get_visual" nil)
280         (:cffi gtk::modifier-style gtk::widget-modifier-style (g-object gtk::rc-style)
281          "gtk_widget_get_modifier_style" "gtk_widget_modify_style")
282         (:cffi gtk::pango-context gtk::widget-pango-context g-object
283          "gtk_widget_get_pango_context" nil)
284         (:cffi gtk::child-visible gtk::widget-child-visible :boolean
285          "gtk_widget_get_child_visible" "gtk_widget_set_child_visible")
286         (:cffi gtk::direction gtk::widget-direction gtk::text-direction
287          "gtk_widget_get_direction" "gtk_widget_set_direction")
288         (:cffi gtk::composite-name gtk::widget-composite-name (glib:g-string :free-from-foreign t :free-to-foreign t)
289          "gtk_widget_get_composite_name" "gtk_widget_set_composite_name")
290         (:cffi gtk::redraw-on-allocate gtk::widget-redraw-on-allocate :boolean
291          nil "gtk_widget_set_redraw_on_allocate")
292         (:cffi gtk::accessible gtk::widget-accessible g-object
293          "gtk_widget_get_accessible" nil)
294         (:cffi gtk::tooltip-window gtk::widget-tooltip-window g-object
295          "gtk_widget_get_tooltip_window" "gtk_widget_set_tooltip_window")
296         (:cffi gtk::style gtk::widget-style (g-object gtk::style)
297          "gtk_widget_get_style" "gtk_widget_set_style"))
298        ("GtkWindowGroup"
299         (:cffi gtk::windows gtk::window-group-windows (glist (g-object gtk::gtk-window))
300          "gtk_window_group_list_windows" nil))
301        ("GtkTextTag"
302         (:cffi gtk::priority gtk::text-tag-priority :int
303          "gtk_text_tag_get_priority" "gtk_text_tag_set_priority"))
304        ("GtkDialog"
305         (:cffi gtk::content-area gtk::dialog-content-area (g-object gtk::v-box)
306          "gtk_dialog_get_content_area" nil)
307         (:cffi gtk::action-area gtk::dialog-action-area (g-object gtk::widget)
308          "gtk_dialog_get_action_area" nil)
309         (:cffi gtk::default-response gtk::dialog-default-response gtk::response-type
310          nil "gtk_dialog_set_default_response"))
311        ("GtkAssistant"
312         (:cffi gtk::current-page gtk::assistant-current-page :int
313          "gtk_assistant_get_current_page" "gtk_assistant_set_current_page")
314         (:cffi gtk::n-pages gtk::assistant-n-pages :int
315          "gtk_assistant_get_n_pages" nil)
316         (:cffi gtk::forward-page-function gtk::assistant-forward-page-function nil
317          nil gtk::set-assistant-forward-page-function))
318        ("GtkLabel"
319         (:cffi gtk::line-wrap gtk::label-line-wrap :boolean
320          "gtk_label_get_line_wrap" "gtk_label_set_line_wrap")
321         (:cffi gtk::line-wrap-mode gtk::label-line-wrap-mode gtk::pango-wrap-mode
322          "gtk_label_get_line_wrap_mode" "gtk_label_set_line_wrap_mode")
323         (:cffi gtk::layout gtk::label-layout g-object
324          "gtk_label_get_layout" nil)
325         (:cffi gtk::selection-bounds gtk::label-selection-bounds nil
326          gtk::gtk-label-get-selection-bounds nil)
327         (:cffi gtk::layout-offsets gtk::label-layout-offsets nil
328          gtk::gtk-label-get-layout-offsets nil))
329        ("GtkEntry"
330         (:cffi gtk::layout gtk::entry-layout g-object
331          "gtk_entry_get_layout" nil)
332         (:cffi gtk::completion gtk::entry-completion (g-object gtk::entry-completion)
333          "gtk_entry_get_completion" "gtk_entry_set_completion")
334         (:cffi gtk::cursor-hadjustment gtk::entry-cursor-hadjustment (g-object gtk::adjustment)
335          "gtk_entry_get_cursor_hadjustment" "gtk_entry_set_cursor_hadjustment")
336         (:cffi gtk::layout-offset gtk::entry-layout-offset nil
337          gtk::gtk-entry-layout-offset nil))
338        ("GtkPageSetupUnixDialog"
339         (:cffi gtk::page-setup gtk::page-setup-unix-dialog-page-setup (g-object gtk::page-setup)
340          "gtk_page_setup_unix_dialog_get_page_setup" "gtk_page_setup_unix_dialog_set_page_setup")
341         (:cffi gtk::print-settings gtk::page-setup-unix-dialog-print-settings (g-object gtk::print-settings)
342          "gtk_page_setup_unix_dialog_get_print_settings" "gtk_page_setup_unix_dialog_set_print_settings"))
343        ("GtkEntryCompletion"
344         (:cffi gtk::entry gtk::entry-completion-entry (g-object gtk::entry)
345          "gtk_entry_completion_get_entry" nil)
346         (:cffi gtk::match-function gtk::entry-completion-match-function nil
347          nil gtk::gtk-entry-completion-set-match-function))
348        ("GtkEditable"
349         (:cffi gtk::position gtk::editable-position :int
350          "gtk_editable_get_position" "gtk_editable_set_position")
351         (:cffi gtk::editable gtk::editable-editable :boolean
352          "gtk_editable_get_editable" "gtk_editable_set_editable"))
353        ("GtkTextMark"
354         (:cffi gtk::visible gtk::text-mark-visible :boolean
355          "gtk_text_mark_get_visible" "gtk_text_mark_set_visible")
356         (:cffi gtk::deleted gtk::text-mark-deleted :boolean
357          "gtk_text_mark_get_deleted" nil)
358         (:cffi gtk::buffer gtk::text-mark-buffer (g-object gtk::text-buffer)
359          "gtk_text_mark_get_buffer" nil))
360        ("GtkTextBuffer"
361         (:cffi gtk::modified gtk::text-buffer-modified :boolean
362          "gtk_text_buffer_get_modified" "gtk_text_buffer_set_modified"))
363        ("GtkToolShell"
364         (:cffi gtk::icon-size gtk::tool-shell-icon-size gtk::icon-size
365          "gtk_tool_shell_get_icon_size" nil)
366         (:cffi gtk::orientation gtk::tool-shell-orientation gtk::orientation
367          "gtk_tool_shell_get_orientation" nil)
368         (:cffi gtk::relief-style gtk::tool-shell-relief-style gtk::relief-style
369          "gtk_tool_shell_get_relief_style" nil)
370         (:cffi gtk::style gtk::tool-shell-style gtk::toolbar-style
371          "gtk_tool_shell_get_style" nil))
372        ("GtkColorSelection"
373         (:cffi gtk::previous-alpha gtk::color-selection-previous-alpha :uint16
374          "gtk_color_selection_get_previous_alpha" "gtk_color_selection_set_previous_alpha")
375         (:cffi gtk::previous-color gtk::color-selection-previous-color (g-boxed-foreign gdk::color)
376          gtk::gtk-color-selection-get-previous-color gtk::gtk-color-selection-set-previous-color))
377        ("GtkScrolledWindow"
378         (:cffi gtk::hscrollbar gtk::scrolled-window-hscrollbar (g-object gtk::widget)
379          "gtk_scrolled_window_get_hscrollbar" nil)
380         (:cffi gtk::vscrollbar gtk::scrolled-window-vscrollbar (g-object gtk::widget)
381          "gtk_scrolled_window_get_vscrollbar" nil))
382        ("GtkBin"
383         (:cffi gtk::child gtk::bin-child (g-object gtk::widget)
384          "gtk_bin_get_child" nil))
385        ("GtkTextChildAnchor"
386         (:cffi gtk::deleted-p gtk::text-child-anchor-deleted-p :boolean
387          "gtk_text_child_anchor_get_deleted" nil))))))
388
389 (defun gtk-generate-child-properties (filename)
390   (with-open-file (stream filename :direction :output :if-exists :supersede)
391     (let ((*package* (find-package :gtk))
392           (*print-case* :downcase))
393      (write-string "(in-package :gtk)" stream)
394      (terpri stream)
395      (format stream "~{~S~%~%~}" (gtk:generate-child-properties)))))