{"id":13728729,"url":"https://github.com/malisipi/mui","last_synced_at":"2025-04-11T04:41:10.380Z","repository":{"id":41219212,"uuid":"508776265","full_name":"malisipi/mui","owner":"malisipi","description":"A Cross-Platform UI Library","archived":false,"fork":false,"pushed_at":"2024-08-18T10:19:20.000Z","size":15767,"stargazers_count":108,"open_issues_count":10,"forks_count":10,"subscribers_count":9,"default_branch":"main","last_synced_at":"2025-03-25T02:43:53.554Z","etag":null,"topics":["c","cpp","gtk3","gtk4","gui","linux","macos","qt","theme","ui","ui-library","v","vlang","vlang-library","vlang-module","wasm","web","widget-toolkit","windows"],"latest_commit_sha":null,"homepage":"https://malisipi.github.io/mui/","language":"V","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/malisipi.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":"2022-06-29T16:56:20.000Z","updated_at":"2025-03-21T07:22:06.000Z","dependencies_parsed_at":"2024-02-18T19:54:11.474Z","dependency_job_id":null,"html_url":"https://github.com/malisipi/mui","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/malisipi%2Fmui","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/malisipi%2Fmui/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/malisipi%2Fmui/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/malisipi%2Fmui/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/malisipi","download_url":"https://codeload.github.com/malisipi/mui/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248345276,"owners_count":21088242,"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":["c","cpp","gtk3","gtk4","gui","linux","macos","qt","theme","ui","ui-library","v","vlang","vlang-library","vlang-module","wasm","web","widget-toolkit","windows"],"created_at":"2024-08-03T02:00:49.137Z","updated_at":"2025-04-11T04:41:10.363Z","avatar_url":"https://github.com/malisipi.png","language":"V","readme":"# ![MUI](./pictures/MUI.png \"MUI\") - A Cross-Platform UI Library _for V \u0026 C_\n\n![MUI Demo](./pictures/MUI_Demo.gif \"MUI Demo\")\n\n\u003e **Supports Windows, Linux, Android\u003csup\u003e1\u003c/sup\u003e** \u0026 Web\u003csup\u003e2\u003c/sup\u003e (Experimental). *Not tested on MacOS\u003csup\u003e3\u003c/sup\u003e.*\n\n\u003e 1: System themes \u0026 map widget not working on Android now. If you interested with compiling for android, look [here](#compile-for-android)\n\n\u003e 2: With Emscripten. System themes \u0026 map widget not working now. If you interested with compiling for web, look [here](#compile-with-emscripten)\n\n\u003e 3: All critical processes (like Widget drawing, click handling etc.) should work on MacOS. But themes and screen reader won't work, and could be include MacOS-only bug.\n\n## Example\n\n```v\nimport malisipi.mui as m\n\nfn increase_count(event_details m.EventDetails,mut app \u0026m.Window, mut app_data voidptr){\n\tunsafe {\n\t\tapp.get_object_by_id(\"count\")[0][\"text\"].str = (app.get_object_by_id(\"count\")[0][\"text\"].str.int() + 1).str()\n\t}\n}\n\nmut app := m.create(title:\"Counter - MUI Example\", height:100, width:400)\n\napp.label(id:\"count\", x:\"5%x\", y:\"5%y\", width:\"45%x\", height:\"90%y\" text:\"0\")\napp.button(id:\"count_button\", x:\"# 5%x\", y:\"5%y\", width:\"45%x\", height:\"90%y\", text:\"Count\", onclick:increase_count)\n\napp.run()\n```\n\n\u003e You can find more examples in `./examples/` folder. Also you can visit [Gallery](./gallery.md \"Gallery\") that lists applications screenshots uses MUI.\n\n\u003e You can test MUI easily from [here](https://malisipi.github.io/mui/).\n\n## Abilities\n\n* C Bindings (Desktop Only \u0026 Experimental)\n* Theme from system accent color, _If couldn't found accent color, use dark/light theme preference. If couldn't found dark/light theme preference, choose light theme_\n![Themes](./pictures/Themes.png \"Themes\")\n* [Webview Window](#how-to-compile-programs-that-use-malisipimuiwebview)\n* Widgets\n    * Slider (Verical \u0026 Horizontal)\n    * Button\n    * Label\n    * Textbox\n    * Password\n    * Group\n    * Rect\n    * Image\n    * Progress\n    * Radio Button\n    * Checkbox\n    * Link\n    * Selectbox\n    * Table\n    * Graphs\n        * Line Graph\n        * Area Graph\n    * Menubar\n    * Map (Desktop Only)\n    * Switch\n    * Textarea\n    * Codefield\n    * Scrollbar (Verical \u0026 Horizontal)\n    * Frames \u0026 Nested-Frames\n    * List View\n    * Spinner (aka UpDown)\n    * Tabbed View\n* Custom/Thirdparty Widget Support (Not Finished Completely Yet)\n* Screen Reader Support (Experimental - Linux \u0026 Windows Only)\n* Emoji Icon Support (Desktop Only)\n* Dialogs\n    * Messagebox (Tinyfiledialogs \u0026 built-in \u0026 web)\n    * Inputbox (Tinyfiledialogs \u0026 built-in \u0026 web)\n    * Passwordbox (Tinyfiledialogs \u0026 built-in \u0026 web)\n    * Color Chooser (Tinyfiledialogs \u0026 built-in \u0026 web)\n    * File Open/Save Dialog (Tinyfiledialogs)\n    * Folder Open Dialog (Tinyfiledialogs)\n    * Notification Support (Tinyfiledialogs)\n    * Custom Dialog Support (Not Finished Completely Yet)\n* Anchor System\n* Transition Animations (Supports Anchors)\n* File Drag-n-Drop (Desktop Only)\n* Z-Index Support\n* Ask Quit Dialog \u0026 Quit Function (Desktop Only)\n* Keybindings _Will be ignored pressed keys/key combinations that used by widgets if the assigned function to the key/key combination._\n* Japanese Input Support (Experimental)\n\n\u003e To see all created and planned features, look up [To-Do List](https://github.com/malisipi/mui/issues/22)\n\n## Thirdparty Widgets/Plugins\n\nYou can make your MUI applications more powerful with plugins.\n\n\u003e Browse [MUI plugin list](./plugins.md)\n\n## Installation\n\n\u003e To install, run `v install https://github.com/malisipi/mui`\n\n\u003e To remove, run `v remove malisipi.mui`\n\n## Compile-Time Flags\n\n| Flags                      | Description                                               |\n|----------------------------|-----------------------------------------------------------|\n| `-d show_fps`              | Show FPS of the window                                    |\n| `-d no_emoji`              | Disable emoji support and font embedding                  |\n| `-d emscripten`            | Compile for emscripten (use with `-os wasm32-emscripten`) |\n| `-d dont_clip`             | For debugging purposes, it disables clipping the widgets area. (Not recommend) |\n| `-d power_save`            | Enables power save mode. It's recommend if your application require more resource or you're running the application on low-hardware computer. Some drawing lags would be appeared with the flag, please report them. |\n| `-d support_japanese_input`| Support basic japanese input                              |\n\n## Compile for android\n\n* You need to use [V Android Bootstrapper](https://github.com/vlang/vab) to compile for Android.\n* Tinyfiledialogs won't work on Android, but you can use built-in dialogs.\n* If you want to working keyboard, you need patch the sokol library that placed into v/thirdparty. You can found the patch file from `./patches`.\n\n## Compile with emscripten\n\nHow to compile demo.v with emscripten:\n```bash\n[~/.vmodules/malisipi/mui/examples]$ v -d emscripten -d no_emoji -gc none -os wasm32-emscripten demo.v -o emscripten_.c\n\n[~/.vmodules/malisipi/mui/examples]$ cat emscripten_.c | sed 's/waitpid(p-\u003epid, \u0026cstatus, 0);/-1;/g' | sed 's/waitpid(p-\u003epid, \u0026cstatus, WNOHANG);/-1;/g' | sed 's/wait(0);/-1;/g' \u0026\u003e emscripten.c\n\n[path/to/dir/v]$ emcc -fPIC -Wimplicit-function-declaration -w  thirdparty/stb_image/stbi.c -I/usr/include/gc/   -Ithirdparty/stb_image -Ithirdparty/fontstash -Ithirdparty/sokol -Ithirdparty/sokol/util    -DSOKOL_GLES2 -DSOKOL_NO_ENTRY   -DNDEBUG -O3   -s ERROR_ON_UNDEFINED_SYMBOLS=0 -s ALLOW_MEMORY_GROWTH -s MODULARIZE -s ASSERTIONS=1 ~/.vmodules/malisipi/mui/examples/emscripten.c -o ~/.vmodules/malisipi/mui/examples/app.js --embed-file ~/.vmodules/malisipi/mui/assets/noto.ttf@/noto.ttf --embed-file ~/.vmodules/malisipi/mui/examples/v-logo.png@v-logo.png\n```\n\n## How to Compile Programs that use malisipi.mui.webview?\n\n* You must to compile webview.o for one time before starting to building your applications.\n\n* For Windows\n    * Requirenments:\n        * GCC (need to be inside Path) \n        * [Microsoft Edge Webview2 Runtime](https://developer.microsoft.com/en-us/microsoft-edge/webview2/) (Pre-installed in latest Windows 10 and Windows 11)\n    * `%USERPROFILE%\\.vmodules\\malisipi\\mui\\webview\u003e build_webview_for_windows.cmd`\n    * `X:\\path\\to\\example\u003e copy \"%USERPROFILE%\\.vmodules\\malisipi\\mui\\webview\\webview2\\runtimes\\win-`\u003cwin_arch\u003e`\\native\\WebView2Loader.dll\"` `\"X:\\path\\to\\example\"`\n    * `X:\\path\\to\\example\u003e v -cc gcc example.v`\n\n* For Linux \n    * Requirenments:\n        * GCC\n        * `libgtk-3-dev` and `libwebkit2gtk-4.0-dev` package (on Debian-based systems)\n    * `[~/.vmodules/malisipi/mui/webview/]$ ./build_webview_for_linux.sh`\n    * You're ready to go!\n\n## Known Bugs\n\nFor Windows;\n* MSVC and TCC (without full-winapi, look below) not works. I strongly suggest GCC to compile your programs. `v -cc gcc ...`\n\n\u003e If you have a problem/question or feature request about MUI, you can create a issue.\n\n## FAQ\n\n\u003cdetails\u003e\u003csummary\u003e\u003cb\u003eHow to use TCC on Windows\u003c/b\u003e\u003c/summary\u003e\n\n* If you're using webview sub-module, TCC never works. Also some functions will be ignored with TCC. But you can still use TCC for Windows to compile faster.\n* You need full winapi for TCC. [winapi-full-for-0.9.27.zip at download-mirror.savannah.gnu.org](https://download-mirror.savannah.gnu.org/releases/tinycc/) Download it and extract.\n* Move ```path\\to\\winapi-full-for-0.9.27\\include\\winapi``` to ```C:\\winapi```.\n* ```v -cc tcc run example.v```\n* And it's works like a charm.\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\u003csummary\u003e\u003cb\u003eMUI is freezing with blank window and crashing with `gg error: WGL: ARB_create_context_profile required!` error (For Windows OS)\u003c/b\u003e\u003c/summary\u003e\n\n\u003e  Probably, it's a issue about your drivers. You will need to ensure that you have downloaded and installed a recent driver for your graphics hardware. If your system does not contain a GPU, or the GPU vendor delivers graphics drivers providing OpenGL support that's so old as to be useless to you, you might want to consider installing the Mesa3D OpenGL library on your system.\n\n[Installing Mesa3D on Windows](https://www.khronos.org/opengl/wiki/Platform_specifics:_Windows#Installing_Mesa3D_on_Windows)\n\n[Also you can download pre-built library from here](https://fdossena.com/?p=mesa/index.frag)\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\u003csummary\u003e\u003cb\u003eMUI not working with old-V versions\u003c/b\u003e\u003c/summary\u003e\n\n\u003e V is still beta and MUI require to break support of V's old versions to supporting latest.\n\n* Update V version\n\nor \n\n* If you need specific V edition, look up commit history and use a commit that released with similar times.\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\u003csummary\u003e\u003cb\u003eWhat is operating system of test devices?\u003c/b\u003e\u003c/summary\u003e\n\n* Windows 11\n* Arch Linux\n* Android 12\n* Windows 7/10 (Sometimes)\n* Wine 8.x (Sometimes)\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\u003csummary\u003e\u003cb\u003eCan I have tray library for MUI?\u003c/b\u003e\u003c/summary\u003e\n\n\u003e [VTray](https://github.com/Ouri028/VTray) library is created for this goal. So we don't require an built-in tray library for MUI. If you see any issue about MUI interoperability with this library, please report it to fix it.\n\n\u003c/details\u003e\n\n## Suggestions\n\n* You should run processes that required more time than 0.2s as concurrent. If you don't, app couldn't response until finish processes.\n    * Also dialogs (specially, built-in dialogs) must to be runned concurrent as different functions than main threads. If don't, app never response.\n    ```v\n    //Don't (App never response when call the function)\n    fn run_dialog(event_details m.EventDetails,mut app \u0026m.Window, app_data voidptr){\n        app.create_dialog(m.Modal{typ:\"messagebox\",message:\"Hello, \"+app.wait_and_get_answer(),title:\"Hi!\"})\n        print(app.wait_and_get_answer())\n    }\n\n    //Do\n    fn do_another_process(mut app \u0026m.Window){\n        app.create_dialog(m.Modal{typ:\"messagebox\",message:\"Hello, \"+app.wait_and_get_answer(),title:\"Hi!\"})\n        print(app.wait_and_get_answer())\n    }\n\n    fn run_dialog(event_details m.EventDetails,mut app \u0026m.Window, app_data voidptr){\n        go do_another_process(mut app)\n    }\n    ```\n\n## License\n\n* **This project licensed by [Apache License 2.0](./LICENSE).**\n* [Tinyfiledialogs](https://sourceforge.net/projects/tinyfiledialogs/) (`./tinyfiledialogs/`) (Patched) licensed by Zlib License.\n* [Noto Emoji Font](https://fonts.google.com/noto/specimen/Noto+Emoji) (`./noto_emoji_font/`) licensed by OFL License.\n* [Noto Font](https://fonts.google.com/noto/specimen/Noto+Sans) (`./assets/noto.ttf`) licensed by OFL License.\n* [Noto (Japanese) Font](https://fonts.google.com/noto/specimen/Noto+Sans+JP) (`./assets/noto_jp.ttf`) licensed by OFL License.\n* [V-logo](https://github.com/vlang/v-logo) (`./examples/v-logo.png`) licensed by MIT License.\n* [Original Sokol](https://github.com/floooh/sokol) and [Sokol Patch](https://github.com/floooh/sokol/pull/503) (`./patches/sokol_android_keyboard.patch`) licensed by Zlib license.\n* [Webview](https://github.com/malisipi/vebview-webview) (`./webview/webview`) (Patched) licensed by MIT License.\n* [Webview2 (1.0.1264.42)](https://www.nuget.org/packages/Microsoft.Web.WebView2/) (`./webview/webview2`) -\u003e [License](./webview/webview2/LICENSE.txt).\n\n## Documentation\n\nYou can read documentation from these links.\n* [mui](./docs_md/mui.md)\n* [mui.webview](./docs_md/webview.md)\n","funding_links":[],"categories":["👓 Alternatives to the [Electron.js](https://electronjs.org) ⚛","Libraries"],"sub_categories":["V","User Interface toolkits"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmalisipi%2Fmui","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmalisipi%2Fmui","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmalisipi%2Fmui/lists"}