概要
A small C library for opening a file dialog
開発ツール計測したスター増加
- 24時間
- 0
- 7日間
- 0
- 15日間
- 0
- 1か月
- 履歴を収集中
期間ごとの純増数です。期間は重複しており、日別の値ではありません。未計測の値は空欄です。スター数は注目度の指標であり、品質の保証ではありません。
README.md
オリジナルSimple File Dialog
A small C library for opening a file dialog on Windows and Linux.
Usage
sfd.c and sfd.h should be dropped
into an existing project and compiled along with it — on Windows comdlg32
should be linked.
The library provides a function for open dialogs and one for save dialogs:
sfd_Options opt = {
.title = "Open Image File",
.filter_name = "Image File",
.filter = "*.png|*.jpg",
};
const char *filename = sfd_open_dialog(&opt);
if (filename) {
printf("Got file: '%s'\n", filename);
} else {
printf("Open canceled\n");
}
Both functions accept a sfd_Options struct pointer with settings for
the file dialog — All fields of the sfd_Options struct are optional.
| Field | Description |
|---|---|
.title |
Title for the file dialog window |
.path |
Default directory |
.filter_name |
Name used to describe the file filter |
.filter |
File filters separated by | |
If the file dialog is canceled or an error occurs NULL is returned.
sfd_get_error() will return an error string in the case of an error.
License
This library is free software; you can redistribute it and/or modify it under the terms of the MIT license. See LICENSE for details.
関連プロジェクトを探す
読み込み中…