{"id":20572855,"url":"https://github.com/zlgopen/awtk-cpp","last_synced_at":"2025-04-14T17:23:29.714Z","repository":{"id":76747655,"uuid":"229350153","full_name":"zlgopen/awtk-cpp","owner":"zlgopen","description":"awtk cpp wrapper","archived":false,"fork":false,"pushed_at":"2024-10-29T07:56:32.000Z","size":25872,"stargazers_count":9,"open_issues_count":2,"forks_count":1,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-10-29T08:32:49.140Z","etag":null,"topics":["awtk","cpp"],"latest_commit_sha":null,"homepage":null,"language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-2.1","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zlgopen.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":"2019-12-20T23:20:52.000Z","updated_at":"2024-10-29T07:56:37.000Z","dependencies_parsed_at":"2023-12-11T03:33:46.113Z","dependency_job_id":null,"html_url":"https://github.com/zlgopen/awtk-cpp","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/zlgopen%2Fawtk-cpp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zlgopen%2Fawtk-cpp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zlgopen%2Fawtk-cpp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zlgopen%2Fawtk-cpp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zlgopen","download_url":"https://codeload.github.com/zlgopen/awtk-cpp/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224878988,"owners_count":17385083,"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":["awtk","cpp"],"created_at":"2024-11-16T05:24:17.242Z","updated_at":"2024-11-16T05:24:17.889Z","avatar_url":"https://github.com/zlgopen.png","language":"C++","readme":"# awtk-cpp\n\nZLG 开源 GUI 引擎 [awtk](https://github.com/zlgopen/awtk) 针对 C++ 的绑定。\n\n## 准备\n\n1. 获取 awtk 并编译\n\n```\ngit clone https://github.com/zlgopen/awtk.git\ncd awtk; scons; cd -\n```\n\n2. 获取 awtk-cpp 并编译\n\n```\ngit clone https://github.com/zlgopen/awtk-cpp.git\ncd awtk-cpp\nscons\n```\n\n* 生成资源\n\n```\npython ./scripts/update_res.py all\n```\n\n\u003e 或者通过 designer 生成资源\n\n\n* 编译PC版本\n\n```\nscons\n```\n\n* 编译LINUX FB版本\n\n```\nscons LINUX_FB=true\n```\n\n\u003e 完整编译选项请参考[编译选项](https://github.com/zlgopen/awtk-widget-generator/blob/master/docs/build_options.md)\n\n\n## 运行\n\n```\n./bin/demo_basic\n```\n\n## 更新绑定（由本项目的维护人员完成）\n\n```\n./sync.sh\n```\n\n\u003e 在非 bash 终端（如 Windows 平台的 cmd.exe)，需要根据 sync.sh 的内容手工执行相应的命令。\n\n## 代码示例\n\n```cpp\n  TWidget win = TWindow::CreateDefault();\n  TWidget ok = TButton::Create(win, 0, 0, 0, 0);\n\n  ok.SetText(\"quit\");\n  ok.SetSelfLayoutParams(\"center\", \"middle\", \"50%\", \"30\");\n\n  ok.On(EVT_CLICK, ClickToQuit, NULL);\n```\n\n## 文档\n\n[AWTK 脚本绑定原理](https://github.com/zlgopen/awtk/blob/master/docs/script_binding.md)\n\n\u003e 本文以 Linux/MacOS 为例，Windows 可能会微妙差异，请酌情处理。\n\n## C++应用程序框架\n\n请参考：hello目录。\n\n\u003e 感谢staunchheart(QQ:36380047)兄提供C++框架(包括代码生成)的思路和各种建议。\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzlgopen%2Fawtk-cpp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzlgopen%2Fawtk-cpp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzlgopen%2Fawtk-cpp/lists"}