Add more features to the patterns arg for file dialogs. #1567
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Here's the new docstring for it:
patterns
: A string containing newline separated sets of patterns to match.A pattern is either a shell-style glob pattern (e.g.
"*.txt"
) or a MIMEtype (e.g.
"image/png"
). Not all platforms support both (and some don'teven support globs), so a portable solution is to specify a MIME type and
simple style globs which Allegro will pick from to match what the platform
supports (e.g. do
"image/png;*.png"
). Multiple patterns are separatedusing a semicolon. If the platform does not provide support for patterns,
this parameter is ignored. Here are some example patterns:
"*.txt"
-- defines a single filter, matching*.txt
files."*.txt;*.md"
-- like above, but matching two types of files."Text files (*.txt, *.md) *.txt;*.md"
-- like above, but with a customdescription (separated from the patterns using a space).
"Text files *.txt\nPNG images image/png;*.png"
-- defines two filters,with the second filter using a MIME type and extension at the same time.