rxi/sfd
소개
A small C library for opening a file dialog
개발 도구측정된 스타 증가
- in 24h
- 0
- in 7 days
- 0
- in 15 days
- 0
- in 1 month
- 기록 수집 중
서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.
README.md
OriginalSimple 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.
관련 프로젝트 살펴보기
불러오는 중…