Fix typo in gl-drawing-area code
[cl-gtk2.git] / gtk / gtk.selectors.lisp
blobc09a509ddf8ed34f7f02b34a4a4b2c5c12004934
1 (in-package :gtk)
3 (defcfun (%gtk-color-selection-get-previous-color "gtk_color_selection_get_previous_color") :void
4 (color-selection (g-object color-selection))
5 (color (g-boxed-foreign color)))
7 (defun gtk-color-selection-get-previous-color (color-selection)
8 (let ((color (make-color)))
9 (%gtk-color-selection-get-previous-color color-selection color)
10 color))
12 (defcfun gtk-color-selection-set-previous-color :void
13 (color-selection (g-object color-selection))
14 (color (g-boxed-foreign color)))
16 (defcfun (color-selection-adjusting-p "gtk_color_selection_is_adjusting") :boolean
17 (color-selection g-object))
19 (export 'color-selection-adjusting-p)
21 (defcfun gtk-color-selection-palette-from-string :boolean
22 (str :string)
23 (colors :pointer)
24 (n-colors :pointer))
26 (defun color-selection-palette-from-string (str)
27 (with-foreign-objects ((colors :pointer) (n-colors :int))
28 (when (gtk-color-selection-palette-from-string str colors n-colors)
29 (iter (with colors-ar = (mem-ref colors :pointer))
30 (for i from 0 below (mem-ref n-colors :int))
31 (for color-ptr =
32 (inc-pointer colors-ar
33 (* i (foreign-type-size 'gdk::color-cstruct))))
34 (for color = (convert-from-foreign color-ptr '(g-boxed-foreign color)))
35 (collect color)
36 (finally (g-free colors-ar))))))
38 (defcfun gtk-color-selection-palette-to-string (g-string :free-from-foreign t)
39 (colors :pointer)
40 (n-colors :int))
42 ; TODO: gtk_color_selection_palette_to_string
44 ; TODO: gtk_color_selection_set_change_palette_with_screen_hook
46 (defcfun (file-chooser-select-filename "gtk_file_chooser_select_filename") :boolean
47 (file-chooser g-object)
48 (filename :string))
50 (export 'file-chooser-select-filename)
52 (defcfun (file-chooser-unselect-filename "gtk_file_chooser_unselect_filename") :void
53 (file-chooser g-object)
54 (filename :string))
56 (export 'file-chooser-unselect-filename)
58 (defcfun (file-chooser-select-all "gtk_file_chooser_select_all") :void
59 (file-chooser g-object))
61 (export 'file-chooser-select-all)
63 (defcfun (file-chooser-unselect-all "gtk_file_chooser_unselect_all") :void
64 (file-chooser g-object))
66 (export 'file-chooser-unselect-all)
68 (defcfun (file-chooser-filenames "gtk_file_chooser_get_filenames") (gslist (g-string :free-from-foreign t))
69 (file-chooser g-object))
71 (export 'file-chooser-filenames)
73 (defcfun (file-chooser-select-uri "gtk_file_chooser_select_uri") :boolean
74 (file-chooser g-object)
75 (uri :string))
77 (export 'file-chooser-select-uri)
79 (defcfun (file-chooser-unselect-uri "gtk_file_chooser_unselect_uri") :void
80 (file-chooser g-object)
81 (uri :string))
83 (export 'file-chooser-unselect-uri)
85 (defcfun (file-chooser-uris "gtk_file_chooser_get_uris") (gslist (g-string :free-from-foreign t) :free-from-foreign t)
86 (file-chooser g-object))
88 (export 'file-chooser-uris)
90 (defcfun (file-chooser-add-filter "gtk_file_chooser_add_filter") :void
91 (chooser (g-object file-chooser))
92 (filter (g-object file-filter)))
94 (export 'file-chooser-add-filter)
96 (defcfun (file-chooser-remove-filter "gtk_file_chooser_remove_filter") :void
97 (chooser (g-object file-chooser))
98 (filter (g-object file-filter)))
100 (export 'file-chooser-remove-filter)
102 (defcfun (file-chooser-filters "gtk_file_chooser_list_filters") (glist (g-string :free-from-foreign t) :free-from-foreign t)
103 (chooser (g-object file-chooser)))
105 (export 'file-chooser-filters)
107 (defcfun gtk-file-chooser-add-shortcut-folder :boolean
108 (file-chooser g-object)
109 (folder :string)
110 (error :pointer))
112 (defun file-chooser-add-shortcut-folder (file-chooser folder)
113 (gtk-file-chooser-add-shortcut-folder file-chooser folder (null-pointer)))
115 (export 'file-chooser-add-shortcut-folder)
117 (defcfun gtk-file-chooser-remove-shortcut-folder :boolean
118 (file-chooser g-object)
119 (folder :string)
120 (error :pointer))
122 (defun file-chooser-remove-shortcut-folder (file-chooser folder)
123 (gtk-file-chooser-remove-shortcut-folder file-chooser folder (null-pointer)))
125 (export 'file-chooser-remove-shortcut-folder)
127 (defcfun (file-chooser-shortcut-folders "gtk_file_chooser_list_shortcut_folders") (gslist (g-string :free-from-foreign t))
128 (file-chooser g-object))
130 (export 'file-chooser-shortcut-folders)
132 (defcfun gtk-file-chooser-add-shortcut-folder-uri :boolean
133 (file-chooser g-object)
134 (folder-uri :string)
135 (error :pointer))
137 (defun file-chooser-add-shortcut-folder-uri (file-chooser folder-uri)
138 (gtk-file-chooser-add-shortcut-folder-uri file-chooser folder-uri (null-pointer)))
140 (export 'file-chooser-add-shortcut-folder-uri)
142 (defcfun gtk-file-chooser-remove-shortcut-folder-uri :boolean
143 (file-chooser g-object)
144 (folder-uri :string)
145 (error :pointer))
147 (defun file-chooser-remove-shortcut-folder-uri (file-chooser folder-uri)
148 (gtk-file-chooser-remove-shortcut-folder-uri file-chooser folder-uri (null-pointer)))
150 (export 'file-chooser-remove-shortcut-folder-uri)
152 (defcfun (file-chooser-shortcut-folder-uris "gtk_file_chooser_list_shortcut_folder_uris") (gslist (g-string :free-from-foreign t))
153 (file-chooser g-object))
155 (export 'file-chooser-shortcut-folder-uris)
157 (defcfun (file-chooser-get-current-folder-file "gtk_file_chooser_get_current_folder_file") g-object
158 (chooser (g-object file-chooser)))
160 (defcfun gtk-file-chooser-set-current-folder-file :boolean
161 (file-chooser (g-object file-chooser))
162 (file g-object)
163 (error :pointer))
165 (defun file-chooser-set-current-folder-file (file-chooser file)
166 (gtk-file-chooser-set-current-folder-file file-chooser file (null-pointer)))
168 (export '(file-chooser-get-current-folder-file file-chooser-set-current-folder-file))
170 (defcfun (file-chooser-get-file "gtk_file_chooser_get_file") g-object
171 (file-chooser (g-object file-chooser)))
173 (defcfun gtk-file-chooser-set-file g-object
174 (file-chooser (g-object file-chooser))
175 (file g-object)
176 (error :pointer))
178 (defun file-chooser-set-file (file-chooser file)
179 (gtk-file-chooser-set-file file-chooser file (null-pointer)))
181 (export '(file-chooser-get-file file-chooser-set-file))
183 (defcfun (file-chooser-unselect-file "gtk_file_chooser_unselect_file") :void
184 (file-chooser (g-object file-chooser))
185 (file g-object))
187 (export 'file-chooser-unselect-file)
189 (defcfun (file-filter-add-pattern "gtk_file_filter_add_pattern") :void
190 (file-filter g-object)
191 (pattern :string))
193 (export 'file-filter-add-pattern)
195 (defcfun (file-filter-add-pixbuf-formats "gtk_file_filter_add_pixbuf_formats") :void
196 (file-filter g-object))
198 (export 'file-filter-add-pixbuf-formats)
200 ; TODO: gtk_file_filter_add_custom
202 ; TODO: gtk_file_filter_get_needed
204 ; TODO: gtk_file_filter_filter
206 (defcfun (font-selection-face "gtk_font_selection_get_face") g-object
207 (font-selection g-object))
209 (export 'font-selection-face)
211 (defcfun (font-selection-face-list "gtk_font_selection_get_face_list") g-object
212 (font-selection g-object))
214 (export 'font-selection-face-list)
216 (defcfun (font-selection-family "gtk_font_selection_get_family") g-object
217 (font-selection g-object))
219 (export 'font-selection-family)
221 (defcfun (font-selection-size "gtk_font_selection_get_size") :int
222 (font-selection g-object))
224 (export 'font-selection-size)
226 (defcfun (font-selection-family-list "gtk_font_selection_get_family_list") g-object
227 (font-selection g-object))
229 (export 'font-selection-family-list)
231 (defcfun (font-selection-preview-entry "gtk_font_selection_get_preview_entry") g-object
232 (font-selection g-object))
234 (export 'font-selection-preview-entry)
236 (defcfun (font-selection-size-entry "gtk_font_selection_get_size_entry") g-object
237 (font-selection g-object))
239 (export 'font-selection-size-entry)
241 (defcfun (font-selection-size-list "gtk_font_selection_get_size_list") g-object
242 (font-selection g-object))
244 (export 'font-selection-size-list)