{"id":13442903,"url":"https://github.com/buggins/dlangui","last_synced_at":"2025-03-20T15:31:36.603Z","repository":{"id":14645888,"uuid":"17363774","full_name":"buggins/dlangui","owner":"buggins","description":"Cross Platform GUI for D programming language","archived":false,"fork":false,"pushed_at":"2024-12-08T10:48:57.000Z","size":44988,"stargazers_count":820,"open_issues_count":95,"forks_count":122,"subscribers_count":56,"default_branch":"master","last_synced_at":"2024-12-08T11:27:00.391Z","etag":null,"topics":["cross-platform-gui","d","dlangui","linux","opengl","sdl","widget"],"latest_commit_sha":null,"homepage":"","language":"D","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsl-1.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/buggins.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","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":"2014-03-03T11:18:51.000Z","updated_at":"2024-12-08T10:49:01.000Z","dependencies_parsed_at":"2023-02-15T10:31:48.616Z","dependency_job_id":"7515e765-a69e-4579-af49-4cb7a590fc61","html_url":"https://github.com/buggins/dlangui","commit_stats":null,"previous_names":[],"tags_count":670,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/buggins%2Fdlangui","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/buggins%2Fdlangui/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/buggins%2Fdlangui/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/buggins%2Fdlangui/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/buggins","download_url":"https://codeload.github.com/buggins/dlangui/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244640063,"owners_count":20485978,"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":["cross-platform-gui","d","dlangui","linux","opengl","sdl","widget"],"created_at":"2024-07-31T03:01:53.053Z","updated_at":"2025-03-20T15:31:35.380Z","avatar_url":"https://github.com/buggins.png","language":"D","funding_links":["https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick\u0026hosted_button_id=KPSNU8TYF6M5N"],"categories":["D","GUI Libs"],"sub_categories":["XML"],"readme":"Dlang UI\n========\n[![PayPayl donate button](https://img.shields.io/badge/paypal-donate-yellow.svg)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick\u0026hosted_button_id=KPSNU8TYF6M5N \"Donate once-off to this project using Paypal\")\n\nCross platform GUI for D. Widgets, layouts, styles, themes, unicode, i18n, OpenGL based acceleration.\n\n![screenshot](http://buggins.github.io/dlangui/screenshots/screenshot-example1-windows.png \"Screenshot of widgets demo app example1\")\n\n\nGitHub page: [https://github.com/buggins/dlangui](https://github.com/buggins/dlangui)\n\nProject site: [http://buggins.github.io/dlangui](http://buggins.github.io/dlangui)\n\nAPI Documentation: [http://buggins.github.io/dlangui/ddox](http://buggins.github.io/dlangui/ddox)\n\nWiki: [https://github.com/buggins/dlangui/wiki/Home](https://github.com/buggins/dlangui/wiki/Home)\n\nGetting Started Tutorial: [https://github.com/buggins/dlangui/wiki/Getting-Started](https://github.com/buggins/dlangui/wiki/Getting-Started)\n\nScreenshots: [http://buggins.github.io/dlangui/screenshots.html](http://buggins.github.io/dlangui/screenshots.html)\n\nCoding style: [https://github.com/buggins/dlangui/blob/master/CODING_STYLE.md](https://github.com/buggins/dlangui/blob/master/CODING_STYLE.md)\n\nMain features:\n\n* Crossplatform (Win32, OSX, Linux and Android are supported in current version)\n* Mostly inspired by Android UI API (layouts, styles, two phase layout, ...)\n* Supports highly customizable UI themes and styles\n* Supports internationalization\n* Hardware acceleration using OpenGL (when built with version USE_OPENGL)\n* Fallback to pure Win32 API / SDL / X11 when OpenGL is not available (e.g. opengl dynamic library cannot be loaded)\n* Actually it's a port (with major refactoring) of GUI library for cross platform OpenGL based implementation of Cool Reader app project from C++.\n* Non thread safe - all UI operations should be preformed in single thread\n* Simple 3d engine - allows to embed 3D scenes within GUI\n\nD compiler versions supported\n-----------------------------\n\nNeeds DMD frontend 2.100.2 or newer to build\n\nWidgets\n-------\n\nList of widgets, layouts and other is available in the [Wiki](https://github.com/buggins/dlangui/wiki#widgets)\n\nResources\n---------\n\nResources like fonts and images use reference counting. For proper resource freeing, always destroy widgets implicitly.\n\n* FontManager: provides access to fonts\n* Images: .png or .jpg images; if filename ends with .9.png, it's autodetected as nine-patch image (see Android drawables description)\n* StateDrawables: .xml file can describe list of other drawables to choose based on widget's State (.xml files from android themes can be used directly)\n* imageCache allows to cache unpacked images\n* drawableCache provides access by resource id (string, usually filename w/o extension) to drawables located in specified list of resource directories.\n\nStyles and Themes\n-----------------\n\nStyles and themes are a bit similar to ones in Android API.\n\n* Theme is a container for styles. Can be load from XML theme resource file.\n* Styles are accessible in theme by string ID.\n* Styles can be nested to form hierarchy - when some attribute is missing in style, value from base style will be used.\n* State substyles are supported: allow to change widget appearance dynamically based on its state.\n* Widgets use style attributes directly from assigned style. When some attribute is being changed in widget, it creates its own copy of base style,\nwhich allows to modify some of attributes, while getting base style attributes if they are not changed in widget. This trick can minimize memory usage for widget attributes when\nstandard values are used.\n* Current default theme is similar to one in MS Visual Studio 2013\n* Resources can be either embedded into executable or loaded from external resource directory in runtime\n\nImportant notice\n================\n\nIf build of your app is failed due to dlangui or its dependencies, probably you have not upgraded dependencies.\n\nTry following:\n```sh\ndub upgrade --force-remove\ndub build --force\n```\nAs well, sometimes removing of dub.json.selections can help.\n\n\nWin32 builds\n------------\n\n* Under windows, uses SDL2 or Win32 API as backend.\n* Optionally, may use OpenGL acceleration\n* Uses Win32 API for font rendering.\n* Optinally can use FreeType for font rendering.\n* Executable size for release Win32 API based build is 830K.\n\n\nBuild and run demo app using DUB:\n```sh\ngit clone --recursive https://github.com/buggins/dlangui.git\ncd dlangui/examples/example1\ndub run --build=release\n```\n\nTo avoid showing console window add win_app.def file to your package source directory and add line to your dub.json.\n\nwin_app.def:\n```json\n\"sourceFiles\": [\"$PACKAGE_DIR/src/win_app.def\"]\n```\ndub.json:\n```json\n\"sourceFiles-windows\": [\"$PACKAGE_DIR/src/win_app.def\"],\n```\n\nLinux builds (DUB)\n------------------\n\n* Uses SDL2 as a backend.\n* Uses FreeType for font rendering.\n* Uses FontConfig to get list of available fonts.\n* OpenGL can be optionally used for better drawing performance.\n\n        libsdl2, libfreetype, libfontconfig\n\nE.g. in Ubuntu, you can use following command to enable SDL2 backend builds:\n```sh\nsudo apt-get install libsdl2-dev\n```\nIn runtime, .so for following libraries are being loaded (binary packages required):\n```\nfreetype, opengl, fontconfig\n```\n\nBuild and run on Linux using DUB:\n```sh\ncd examples/example1\ndub run dlangui:example1\n```\nMacOS builds (DUB)\n------------------\nDlangUI theoretically supports MacOS, but I have no way of testing if it actually work.\nThe support is **not guaranteed**.\n\nOther platforms\n---------------\n\n* Other platforms support may be added easy\n\n\nThird party components used\n---------------------------\n\n* `binbc-opengl` - for OpenGL support\n* `bindbc-freetype` + FreeType library support under linux and optionally under Windows.\n* `bindbc-sdl` + SDL2 for cross platform support\n* X11 binding when SDL2 is not used\n* `arsd-official` For image reading and XML parsing\n\n\nHello World\n--------------------------------------------------------------\n\nPlease refer to the [Wiki](https://github.com/buggins/dlangui/wiki#hello-world) for a hello world example.\n\nDlangIDE project\n------------------------------------------------------------\n\nIt is a project to build D language IDE using DlangUI library.\n\nBut it already can open DUB based projects, edit, build and run them.\n\nSimple syntax highlight.\n\nDCD integration: go to definition and autocompletion for D source code.\n\nProject page: [https://github.com/buggins/dlangide](https://github.com/buggins/dlangide)\n\nHow to build and run using DUB:\n```sh\ngit clone https://github.com/buggins/dlangide.git\ncd dlangide\ndub run\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbuggins%2Fdlangui","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbuggins%2Fdlangui","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbuggins%2Fdlangui/lists"}