{"id":13578951,"url":"https://github.com/rxi/sfd","last_synced_at":"2025-07-08T10:38:15.848Z","repository":{"id":18599969,"uuid":"84729705","full_name":"rxi/sfd","owner":"rxi","description":"A small C library for opening a file dialog","archived":false,"fork":false,"pushed_at":"2024-04-19T10:10:01.000Z","size":11,"stargazers_count":187,"open_issues_count":3,"forks_count":17,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-03-15T22:10:07.158Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rxi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-03-12T13:57:39.000Z","updated_at":"2025-02-01T23:06:24.000Z","dependencies_parsed_at":"2024-08-01T15:30:03.352Z","dependency_job_id":"cf51dfa1-87d8-4eb5-917b-cfde21080023","html_url":"https://github.com/rxi/sfd","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rxi%2Fsfd","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rxi%2Fsfd/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rxi%2Fsfd/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rxi%2Fsfd/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rxi","download_url":"https://codeload.github.com/rxi/sfd/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244056425,"owners_count":20390719,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-01T15:01:35.272Z","updated_at":"2025-03-17T15:12:35.548Z","avatar_url":"https://github.com/rxi.png","language":"C","funding_links":[],"categories":["C","C++"],"sub_categories":[],"readme":"# Simple File Dialog\nA small C library for opening a file dialog on Windows and Linux.\n\n\n## Usage\n**[sfd.c](src/sfd.c?raw=1)** and **[sfd.h](src/sfd.h?raw=1)** should be dropped\ninto an existing project and compiled along with it — on Windows `comdlg32`\nshould be linked.\n\nThe library provides a function for *open* dialogs and one for *save* dialogs:\n\n```c\nsfd_Options opt = {\n  .title        = \"Open Image File\",\n  .filter_name  = \"Image File\",\n  .filter       = \"*.png|*.jpg\",\n};\n\nconst char *filename = sfd_open_dialog(\u0026opt);\n\nif (filename) {\n  printf(\"Got file: '%s'\\n\", filename);\n} else {\n  printf(\"Open canceled\\n\");\n}\n```\n\nBoth functions accept a `sfd_Options` struct pointer with settings for\nthe file dialog — All fields of the `sfd_Options` struct are *optional*.\n\n| Field           | Description\n|-----------------|-------------------------------------------------------------\n| `.title`        | Title for the file dialog window\n| `.path`         | Default directory\n| `.filter_name`  | Name used to describe the file filter\n| `.filter`       | File filters separated by \u003ccode\u003e\u0026#124;\u003c/code\u003e\n\nIf the file dialog is canceled or an error occurs `NULL` is returned.\n`sfd_get_error()` will return an error string in the case of an error.\n\n\n## License\nThis library is free software; you can redistribute it and/or modify it under\nthe terms of the MIT license. See [LICENSE](LICENSE) for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frxi%2Fsfd","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frxi%2Fsfd","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frxi%2Fsfd/lists"}