{"id":13800597,"url":"https://github.com/lolgab/scalaui","last_synced_at":"2025-09-24T17:30:50.091Z","repository":{"id":25258345,"uuid":"103572043","full_name":"lolgab/scalaui","owner":"lolgab","description":"Scala Native GUI framework based on libui","archived":false,"fork":false,"pushed_at":"2024-07-18T16:14:34.000Z","size":123,"stargazers_count":70,"open_issues_count":0,"forks_count":6,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-01-08T14:32:31.204Z","etag":null,"topics":["cocoa","gtk","gui","libui","scala","scala-native","win32"],"latest_commit_sha":null,"homepage":"","language":"Scala","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/lolgab.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-09-14T19:16:31.000Z","updated_at":"2025-01-08T07:03:25.000Z","dependencies_parsed_at":"2024-10-15T09:21:33.489Z","dependency_job_id":"650a197b-225a-47ac-a32c-cada38648a6b","html_url":"https://github.com/lolgab/scalaui","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lolgab%2Fscalaui","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lolgab%2Fscalaui/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lolgab%2Fscalaui/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lolgab%2Fscalaui/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lolgab","download_url":"https://codeload.github.com/lolgab/scalaui/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":234100825,"owners_count":18779809,"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":["cocoa","gtk","gui","libui","scala","scala-native","win32"],"created_at":"2024-08-04T00:01:14.121Z","updated_at":"2025-09-24T17:30:49.733Z","avatar_url":"https://github.com/lolgab.png","language":"Scala","funding_links":[],"categories":["Bindings"],"sub_categories":[],"readme":"# scalaui\nScala Native GUI framework based on [libui](https://github.com/andlabs/libui)\n\n## Example text editor\n![How it looks like in elementary](https://image.ibb.co/cMVcgw/editor.png)\n\n[scalaui-texteditor](https://github.com/lolgab/scalaui-texteditor/)\n\n## Getting Started\nOnce you have setup your Scala Native project and enviroment, you have to compile [libui](https://github.com/andlabs/libui) and, on linux, copy the `libui.so.0` and `libui.so` files to /usr/lib (probably you need to change their permissions too).\n\nThen you have to add the following to your build.sbt:\n\n ```scala\nlibraryDependencies += \"com.github.lolgab\" %%% \"scalaui\" % \"0.0.1\"\n ```\n(there is no release yet, you have to publishLocal the library to let it work!)\n\nThen you can import scalaui:\n\n```scala\nimport scalaui._\n```\n\nWe want to create a simple window with a button that prints \"Hello World!\" on the console when clicked.\n\nFirst you have to define a method which will be executed everytime the button is clicked:\n\n```scala\ndef greeting(): Unit = println(\"Hello World!\")\n```\n\nThen you create a button in your `Main` object, passing a name and the method name followed by a `_`:\n```scala\nval button = new Button(\"My Button\", greeting _)\n```\n\nThen you create a window passing the button as content:\n\n```scala\nval window = new Window(\"My Window\", width = 200, height = 200, content = button)\n```\n\nThen you can actually trigger the creation of the window with all its components in your main method:\n\n```scala\ndef main(args: Array[String]) = {\n  scalaui.render(window)\n}\n```\nYou now should see a nice window with a button, let's click it:\n\n![](https://image.ibb.co/bWFa1w/scalaui.png)\n\n### It works! :tada::tada::tada:\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flolgab%2Fscalaui","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flolgab%2Fscalaui","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flolgab%2Fscalaui/lists"}