{"id":18014860,"url":"https://github.com/zevv/libuilua","last_synced_at":"2025-03-26T18:30:51.378Z","repository":{"id":40643525,"uuid":"59328136","full_name":"zevv/libuilua","owner":"zevv","description":"Lua binding for libui, a simple and portable native UI library for unix, macos and windows","archived":false,"fork":false,"pushed_at":"2022-06-27T08:52:46.000Z","size":22,"stargazers_count":50,"open_issues_count":5,"forks_count":5,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-03-25T21:03:40.912Z","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":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zevv.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}},"created_at":"2016-05-20T21:43:18.000Z","updated_at":"2024-11-20T22:19:54.000Z","dependencies_parsed_at":"2022-09-18T15:21:10.122Z","dependency_job_id":null,"html_url":"https://github.com/zevv/libuilua","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/zevv%2Flibuilua","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zevv%2Flibuilua/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zevv%2Flibuilua/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zevv%2Flibuilua/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zevv","download_url":"https://codeload.github.com/zevv/libuilua/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245712512,"owners_count":20660249,"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-30T04:11:24.827Z","updated_at":"2025-03-26T18:30:51.077Z","avatar_url":"https://github.com/zevv.png","language":"C","funding_links":[],"categories":["C"],"sub_categories":[],"readme":"\nLua binding for libui: https://github.com/andlabs/libui\n\n\n- All top level functions are in the table returned by `require`\n\n- New objects are created with ui.NewType()\n\n- All uiTypeMethod() functions are accessible as object:Method() calls\n\n- Set() methods return the object itself, which allow for chaining like\n  `s = ui.NewSlider(0, 10):SetValue(5):OnChanged(fn)`\n\n- Append() methods take a variable number of arguments, allowing things\n  like `ui.NewRadioButtons():Append(\"One\", \"Two\", \"Three\")\n\nBelow is the Lua-equivalent of libui's example/controlgallery:\n\n```lua\n#!/usr/bin/lua\n\nui = require \"libuilua\"\n\nui.Init()\n\nlocal spinbox, slider, progressbar\n\nlocal function update(control)\n\tlocal v = control:Value()\n\tspinbox:SetValue(v)\n\tslider:SetValue(v)\n\tprogressbar:SetValue(v)\nend\n\nspinbox = ui.NewSpinbox(0, 100):OnChanged(update)\nslider = ui.NewSlider(0, 100):OnChanged(update)\nprogressbar = ui.NewProgressBar(0, 100)\n\nlocal win = ui.NewWindow(\"Hello\", 320, 200, false):SetMargined(1):SetChild(\n\tui.NewVerticalBox():Append(\n\t\tui.NewHorizontalBox():Append(\n\t\t\tui.NewGroup(\"Basic Controls\"):SetMargined(1):SetChild(\n\t\t\t\tui.NewVerticalBox():SetPadded(1):Append(\n\t\t\t\t\tui.NewButton(\"Button\"),\n\t\t\t\t\tui.NewCheckbox(\"Checkbox\"),\n\t\t\t\t\tui.NewLabel(\"Label\"),\n\t\t\t\t\tui.NewHorizontalSeparator(),\n\t\t\t\t\tui.NewDatePicker(),\n\t\t\t\t\tui.NewDateTimePicker(),\n\t\t\t\t\tui.NewTimePicker()\n\t\t\t\t)\n\t\t\t),\n\t\t\tui.NewVerticalBox():Append(\n\t\t\t\tui.NewGroup(\"Numbers\"):SetMargined(1):SetChild(\n\t\t\t\t\tui.NewVerticalBox():SetPadded(1):Append(spinbox, slider, progressbar)\n\t\t\t\t)\n\t\t\t):Append(\n\t\t\t\tui.NewGroup(\"Lists\"):SetMargined(1):SetChild(\n\t\t\t\t\tui.NewVerticalBox():SetPadded(1):Append(\n\t\t\t\t\t\tui.NewCombobox():Append(\n\t\t\t\t\t\t\t\"Combobox Item 1\",\n\t\t\t\t\t\t\t\"Combobox Item 2\",\n\t\t\t\t\t\t\t\"Combobox Item 3\"\n\t\t\t\t\t\t),\n\t\t\t\t\t\tui.NewEditableCombobox():Append(\n\t\t\t\t\t\t\t\"Editable Item 1\",\n\t\t\t\t\t\t\t\"Editable Item 2\",\n\t\t\t\t\t\t\t\"Editable Item 3\"\n\t\t\t\t\t\t),\n\t\t\t\t\t\tui.NewRadioButtons():Append(\n\t\t\t\t\t\t\t\"Radio Button 1\",\n\t\t\t\t\t\t\t\"Radio Button 2\",\n\t\t\t\t\t\t\t\"Radio Button 3\"\n\t\t\t\t\t\t)\n\t\t\t\t\t):Append(\n\t\t\t\t\t\tui.NewTab():Append(\n\t\t\t\t\t\t\t\"Page 1\", ui.NewHorizontalBox(),\n\t\t\t\t\t\t\t\"Page 2\", ui.NewHorizontalBox(),\n\t\t\t\t\t\t\t\"Page 3\", ui.NewHorizontalBox()\n\t\t\t\t\t\t), true\n\t\t\t\t\t)\n\t\t\t\t), true\n\t\t\t), true\n\t\t), true\n\t)\n)\n\n\nui.Main()\n\n```lua\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzevv%2Flibuilua","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzevv%2Flibuilua","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzevv%2Flibuilua/lists"}