diff --git a/docs/reference/ChangeLog b/docs/reference/ChangeLog index 1347c88656..865b2469ab 100644 --- a/docs/reference/ChangeLog +++ b/docs/reference/ChangeLog @@ -1,5 +1,7 @@ 2004-11-12 Matthias Clasen + * gtk/tmpl/gtkfilefilter.sgml: Add docs. + * === Released 2.5.5 === * gtk/Makefile.am (content_files): Add migrating-GtkColorButton.sgml diff --git a/docs/reference/gtk/tmpl/gtkfilefilter.sgml b/docs/reference/gtk/tmpl/gtkfilefilter.sgml index 15dfbf5bb2..fbe7130cde 100644 --- a/docs/reference/gtk/tmpl/gtkfilefilter.sgml +++ b/docs/reference/gtk/tmpl/gtkfilefilter.sgml @@ -6,49 +6,68 @@ A filter for selecting a file subset +A GtkFileFilter can be used to restrict the files being shown +in a #GtkFileChooser. Files can be filtered based on their name +(with gtk_file_filter_add_pattern()), on their mime type (with +gtk_file_filter_add_mime_type()), or by a custom filter function +(with gtk_file_filter_add_custom()). + + +Normally, filters are used by adding them to a #GtkFileChooser, +see gtk_file_chooser_add_filter(), but it is also possible +to manually use a filter on a file with gtk_file_filter_filter(). - +#GtkFileChooser - +The GtkFileFilter struct contains +only private fields and should not be directly accessed. - +A GtkFileFilterInfo struct is used +to pass information about the tested file to +gtk_file_filter_filter(). -@contains: -@filename: -@uri: -@display_name: -@mime_type: +@contains: Flags indicating which of the following fields need + are filled +@filename: the filename of the file being tested +@uri: the URI for the file being tested +@display_name: the string that will be used to display the file + in the file chooser +@mime_type: the mime type of the file - +These flags indicate what parts of a #GtkFileFilterInfo struct +are filled or need to be filled. -@GTK_FILE_FILTER_FILENAME: -@GTK_FILE_FILTER_URI: -@GTK_FILE_FILTER_DISPLAY_NAME: -@GTK_FILE_FILTER_MIME_TYPE: +@GTK_FILE_FILTER_FILENAME: the filename of the file being tested +@GTK_FILE_FILTER_URI: the URI for the file being tested +@GTK_FILE_FILTER_DISPLAY_NAME: the string that will be used to + display the file in the file chooser +@GTK_FILE_FILTER_MIME_TYPE: the mime type of the file - +The type of function that is used with custom filters, +see gtk_file_filter_add_custom(). -@filter_info: -@data: -@Returns: +@filter_info: a #GtkFileFilterInfo that is filled according + to the @needed flags passed to gtk_file_filter_add_custom() +@data: user data passed to gtk_file_filter_add_custom() +@Returns: %TRUE if the file should be displayed