Package: gtk
Function gtk:file-filter-add-custom
Lambda Listgtk:file-filter-add-custom (filter needed func) ArgumentsDetails        
    Adds rule to a filter that allows files based on a custom callback function.  
  The bitfield needed which is passed in provides information about what sorts
  of information that the filter function needs. This allows GTK to avoid
  retrieving expensive information when it is not needed by the filter.   Examples
(defun custom-file-filter (filter-info)
  ;; Select files with upcase characters in the display name
  (let ((display-name (gtk:file-filter-info-display-name filter-info)))
    (string= display-name
             (string-upcase display-name))))
...
(let ((filter-custom (gtk:file-filter-new)))
  ;; Add a custom file filter
  (setf (gtk:file-filter-name filter-custom) "Custom Filter")
  (gtk:file-filter-add-custom filter-custom
                              :display-name
                              #'custom-file-filter)
  (gtk:file-chooser-add-filter chooser filter-custom)
  ... )           | See also | 
#2025-07-04