This commit is contained in:
Matthias Clasen
2004-11-12 22:35:30 +00:00
parent 4114ad2c02
commit 7428dc5c67
2 changed files with 38 additions and 17 deletions

View File

@ -1,5 +1,7 @@
2004-11-12 Matthias Clasen <mclasen@redhat.com> 2004-11-12 Matthias Clasen <mclasen@redhat.com>
* gtk/tmpl/gtkfilefilter.sgml: Add docs.
* === Released 2.5.5 === * === Released 2.5.5 ===
* gtk/Makefile.am (content_files): Add migrating-GtkColorButton.sgml * gtk/Makefile.am (content_files): Add migrating-GtkColorButton.sgml

View File

@ -6,49 +6,68 @@ A filter for selecting a file subset
<!-- ##### SECTION Long_Description ##### --> <!-- ##### SECTION Long_Description ##### -->
<para> <para>
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()).
</para>
<para>
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().
</para> </para>
<!-- ##### SECTION See_Also ##### --> <!-- ##### SECTION See_Also ##### -->
<para> <para>
#GtkFileChooser
</para> </para>
<!-- ##### STRUCT GtkFileFilter ##### --> <!-- ##### STRUCT GtkFileFilter ##### -->
<para> <para>
The <structname>GtkFileFilter</structname> struct contains
only private fields and should not be directly accessed.
</para> </para>
<!-- ##### STRUCT GtkFileFilterInfo ##### --> <!-- ##### STRUCT GtkFileFilterInfo ##### -->
<para> <para>
A <structname>GtkFileFilterInfo</structname> struct is used
to pass information about the tested file to
gtk_file_filter_filter().
</para> </para>
@contains: @contains: Flags indicating which of the following fields need
@filename: are filled
@uri: @filename: the filename of the file being tested
@display_name: @uri: the URI for the file being tested
@mime_type: @display_name: the string that will be used to display the file
in the file chooser
@mime_type: the mime type of the file
<!-- ##### ENUM GtkFileFilterFlags ##### --> <!-- ##### ENUM GtkFileFilterFlags ##### -->
<para> <para>
These flags indicate what parts of a #GtkFileFilterInfo struct
are filled or need to be filled.
</para> </para>
@GTK_FILE_FILTER_FILENAME: @GTK_FILE_FILTER_FILENAME: the filename of the file being tested
@GTK_FILE_FILTER_URI: @GTK_FILE_FILTER_URI: the URI for the file being tested
@GTK_FILE_FILTER_DISPLAY_NAME: @GTK_FILE_FILTER_DISPLAY_NAME: the string that will be used to
@GTK_FILE_FILTER_MIME_TYPE: display the file in the file chooser
@GTK_FILE_FILTER_MIME_TYPE: the mime type of the file
<!-- ##### USER_FUNCTION GtkFileFilterFunc ##### --> <!-- ##### USER_FUNCTION GtkFileFilterFunc ##### -->
<para> <para>
The type of function that is used with custom filters,
see gtk_file_filter_add_custom().
</para> </para>
@filter_info: @filter_info: a #GtkFileFilterInfo that is filled according
@data: to the @needed flags passed to gtk_file_filter_add_custom()
@Returns: @data: user data passed to gtk_file_filter_add_custom()
@Returns: %TRUE if the file should be displayed
<!-- ##### FUNCTION gtk_file_filter_new ##### --> <!-- ##### FUNCTION gtk_file_filter_new ##### -->