gtkFileFilterNew()
gtkFileFilterSetName(object, name)
gtkFileFilterGetName(object)
gtkFileFilterAddMimeType(object, mime.type)
gtkFileFilterAddPattern(object, pattern)
gtkFileFilterAddPixbufFormats(object)
gtkFileFilterAddCustom(object, needed, func, data = NULL)
gtkFileFilterGetNeeded(object)
gtkFileFilterFilter(object, filter.info)
gtkFileFilter()
GObject +----GInitiallyUnowned +----GtkObject +----GtkFileFilter
GtkFileChooser
. Files can be filtered based on their name
(with gtkFileFilterAddPattern
), on their mime type (with
gtkFileFilterAddMimeType
), or by a custom filter function
(with gtkFileFilterAddCustom
). Filtering by mime types handles aliasing and subclassing of mime
types; e.g. a filter for text/plain also matches a file with mime
type application/rtf, since application/rtf is a subclass of
text/plain. Note that GtkFileFilter
allows wildcards for the
subtype of a mime type, so you can e.g. filter for image/*. Normally, filters are used by adding them to a GtkFileChooser
,
see gtkFileChooserAddFilter
, but it is also possible
to manually use a filter on a file with gtkFileFilterFilter
.GtkFileFilter
GtkFileFilter
struct contains
only private fields and should not be directly accessed. GtkFileFilterInfo
GtkFileFilterInfo
struct is used
to pass information about the tested file to
gtkFileFilterFilter
.
GtkFileFilterInfo
is a transparent-type. contains
GtkFileFilterFlags
] Flags indicating which of the following fields need
are filledfilename
uri
displayName
mimeType
gtkFileFilter
is the equivalent of gtkFileFilterNew
.GtkFileChooser