{"id":26942472,"url":"https://github.com/aspschn/swingby","last_synced_at":"2025-04-02T16:49:11.265Z","repository":{"id":228936972,"uuid":"775291285","full_name":"aspschn/swingby","owner":"aspschn","description":"A small GUI library for Wayland client programming - rendered with Skia","archived":false,"fork":false,"pushed_at":"2025-04-01T22:27:15.000Z","size":697,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-01T23:28:33.668Z","etag":null,"topics":["linux","skia","wayland"],"latest_commit_sha":null,"homepage":"","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/aspschn.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":"2024-03-21T05:30:57.000Z","updated_at":"2025-03-26T20:11:48.000Z","dependencies_parsed_at":"2024-10-06T15:56:20.830Z","dependency_job_id":"26dc7d5f-676e-429b-99d5-de0671e1f263","html_url":"https://github.com/aspschn/swingby","commit_stats":null,"previous_names":["hardboiled65/foundation","hardboiled65/swingby","aspschn/swingby"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aspschn%2Fswingby","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aspschn%2Fswingby/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aspschn%2Fswingby/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aspschn%2Fswingby/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aspschn","download_url":"https://codeload.github.com/aspschn/swingby/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246855550,"owners_count":20844950,"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":["linux","skia","wayland"],"created_at":"2025-04-02T16:49:10.755Z","updated_at":"2025-04-02T16:49:11.241Z","avatar_url":"https://github.com/aspschn.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Swingby\n\nA minimal GUI library written in C, rendered with [Skia](https://skia.org/).\n\nSwingby is the first cross-platform GUI library that prioritizes Wayland first.\n\nSwingby is not a full-featured framework. It is a library for minimal GUI.\n\n\n## Features\n\nSwingby not provide a window directly. But you can build your own window (that\nclient-side decorated).\n\nThe event system makes easier to make the event driven GUI programs.\n\nIt is based on OpenGL 4.6 (the latest version) for easier buffer management.\n\n\n## Build\n\nSwingby is a Wayland based library. Therefore your system must suppport Wayland\nbefore building the project.\n\nWe are using the latest version of OpenGL for rendering. The version 4.6 was\nreleased in 2017.\n\nHere is the details of the requirements.\n\n1. Wayland and protocols. `wayland-scanner` command also required.\n2. OpenGL and EGL. Wayland using EGL. ¹\n3. CMake.\n\n- ¹. EGL is similar to GLX in X11, or GLFW however it provides very small features.\nIt is unusual to use EGL in desktop development except Wayland client.\nIt seems this mainly used by Android with GLES programming. We are looking for\nexpert of this library.\n\n### Build Steps\n\nThere are two scripts in the project's root. One is `gen-shaders.py`, it simply\nconverts shader source code to the C string literals. The generated code will\nbe committed so you don't need to use this script.\n\nThe other one is `gen-protocols.sh`. This script generate the Wayland interface\ncode which are not included in the core of Wayland protocol.\nI'm not sure that these must be committed or not. Therefore you must generate\nthe C code with this script.\n\nAdditionally, since it uses Skia, you need to build Skia first.\n\nTo build Skia, follow the below commands.\n\n```sh\n$ git submodule update --init --recursive\n$ make build-skia\n```\n\nThe core is `libskia.a` file.\n\n```sh\n$ file skia/out/Static/libskia.a\n```\n\nYou can now build Swingby using CMake.\n\n```sh\n$ mkdir build\n$ cd build\n$ cmake ..\n$ make\n```\n\nYou can test Swingby with the examples.\n\n```sh\n$ make example\n```\nThe examples are in the `examples/` directory with begin of two digit numbers.\n\n\n#### Debug Logs\n\nIf you want to show debug logs, pass `SWINGBY_DEBUG` macro to CMake.\n\n```sh\n$ cmake .. -DSWINGBY_DEBUG=ON\n```\n\n\n## Terms\n\n### Application\n\nAn application is a global object that manage the event loop, the platform\ndependent global objects and an application's lifecycle.\n\n### Surface\n\nA surface is a rectangular region that something to be drawn. It contains real\nrenderig code. But a surface alone does not just appear on the screen.\n\n### Desktop Surface\n\nA desktop surface (this name is from XDG surface) make the surface visible on the\ncompositor (maybe the desktop environment).\n\n### View\n\nThe views are the elements that rendered in a surface. A view has it's parent (except\nthe root-view), and contain the children. A view can listen a pointer (mouse) enter,\nleave, move, click event and etc.\n\nPerhaps this could be called a widget. In Swingby however not privide real controls.\nBut you can make your own buttons, inputs and others with the views.\n\n\n## Contribute\n\nTo make a Wayland client is a very difficult and challenging work.\n\nAny advice, ideas, or suggestions are all welcome.\n\nPlease don't hesitate to open any issues, as they drive development forward.\n\n\n## License\n\nSwingby is developing under MIT License. For the detail, see the LICENSE file.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faspschn%2Fswingby","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faspschn%2Fswingby","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faspschn%2Fswingby/lists"}