{"id":16856407,"url":"https://github.com/vallentin/glfw-ext","last_synced_at":"2025-07-22T17:36:06.371Z","repository":{"id":169460016,"uuid":"645451194","full_name":"vallentin/glfw-ext","owner":"vallentin","description":null,"archived":false,"fork":false,"pushed_at":"2023-05-25T17:27:09.000Z","size":4,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-28T13:31:20.806Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","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/vallentin.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":"2023-05-25T17:23:16.000Z","updated_at":"2023-05-25T17:27:13.000Z","dependencies_parsed_at":"2024-07-18T17:31:52.650Z","dependency_job_id":null,"html_url":"https://github.com/vallentin/glfw-ext","commit_stats":null,"previous_names":["vallentin/glfw-ext"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vallentin%2Fglfw-ext","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vallentin%2Fglfw-ext/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vallentin%2Fglfw-ext/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vallentin%2Fglfw-ext/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vallentin","download_url":"https://codeload.github.com/vallentin/glfw-ext/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244207746,"owners_count":20416109,"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-10-13T14:04:08.967Z","updated_at":"2025-07-22T17:36:06.354Z","avatar_url":"https://github.com/vallentin.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# glfw-ext\n\n[![Latest Version](https://img.shields.io/crates/v/glfw-ext.svg)](https://crates.io/crates/glfw-ext)\n[![Docs](https://docs.rs/glfw-ext/badge.svg)](https://docs.rs/glfw-ext)\n[![License](https://img.shields.io/github/license/vallentin/glfw-ext.svg)](https://github.com/vallentin/glfw-ext)\n\n\u003c!-- cargo-rdme start --\u003e\n\nUtilities and extension methods for [`glfw`].\n\n*The version of [`glfw-ext`] follows the version of [`glfw`].*\n\nCenter window on the dominant monitor.\n\n```rust\nuse glfw_ext::WindowExt;\n\n// Center the window on the dominant monitor, i.e. if\n// the window is 20% on monitor A and 80% on monitor B,\n// then the window is centered onto monitor B\nwnd.try_center();\n```\n\nCenter window on primary monitor:\n\n```rust\nuse glfw_ext::WindowExt;\n\n// Center the window on the primary monitor\nglfw.with_primary_monitor(|_glfw, monitor| {\n    if let Some(monitor) = monitor {\n        wnd.try_center_on_monitor(monitor);\n    }\n});\n```\n\nSee [examples/center_window.rs] for a complete example.\n\n[`glfw`]: https://crates.io/crates/glfw\n[`glfw-ext`]: https://crates.io/crates/glfw-ext\n\n[examples/center_window.rs]: https://github.com/vallentin/glfw-ext/blob/master/examples/center_window.rs\n\n\u003c!-- cargo-rdme end --\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvallentin%2Fglfw-ext","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvallentin%2Fglfw-ext","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvallentin%2Fglfw-ext/lists"}