# Adi2: A modern GUI library for Ada: CSS styling, XML UI, SDL3 - released as Open Source

**URL:** https://forum.ada-lang.io/t/adi2-a-modern-gui-library-for-ada-css-styling-xml-ui-sdl3-released-as-open-source/4663
**Category:** Releases
**Created:** [August 24, 2026, 9:55pm UTC](https://forum.ada-lang.io/t/adi2-a-modern-gui-library-for-ada-css-styling-xml-ui-sdl3-released-as-open-source/4663 "2026-08-24T21:55:46Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![ovenpasta](https://forum.ada-lang.io/user_avatar/forum.ada-lang.io/ovenpasta/32/1061_2.png) [@ovenpasta](https://forum.ada-lang.io/u/ovenpasta)
#### Post date: [August 24, 2026, 9:55pm UTC](https://forum.ada-lang.io/t/adi2-a-modern-gui-library-for-ada-css-styling-xml-ui-sdl3-released-as-open-source/4663/1 "2026-08-24T21:55:47Z")

</div>

> **[GitHub - ovenpasta/adi2: A modern GUI library for Ada: CSS styling, XML UI,...](https://github.com/ovenpasta/adi2)**
>
> A modern GUI library for Ada: CSS styling, XML UI, SDL3

---

<div class="post-metadata">

### Author: ![charlie5](https://forum.ada-lang.io/user_avatar/forum.ada-lang.io/charlie5/32/626_2.png) [@charlie5](https://forum.ada-lang.io/u/charlie5)
#### Post date: [August 25, 2026, 3:46am UTC](https://forum.ada-lang.io/t/adi2-a-modern-gui-library-for-ada-css-styling-xml-ui-sdl3-released-as-open-source/4663/2 "2026-08-25T03:46:47Z")

</div>

Project sounds great. I’ve long wished for a native Ada GUI library!

Is there (or will there) be support for rendering openGL into a widget?

---

<div class="post-metadata">

### Author: ![ovenpasta](https://forum.ada-lang.io/user_avatar/forum.ada-lang.io/ovenpasta/32/1061_2.png) [@ovenpasta](https://forum.ada-lang.io/u/ovenpasta)
#### Post date: [August 25, 2026, 9:58pm UTC](https://forum.ada-lang.io/t/adi2-a-modern-gui-library-for-ada-css-styling-xml-ui-sdl3-released-as-open-source/4663/3 "2026-08-25T21:58:48Z")

</div>

Yes, I plan to add some kind of canvas widget, and also opengl can be also a good thing to add. Feel free to add an issue for feature request

---

<div class="post-metadata">

### Author: ![Shuihuzhuan](https://forum.ada-lang.io/letter_avatar_proxy/v4/letter/s/c6cbf5/32.png) [@Shuihuzhuan](https://forum.ada-lang.io/u/Shuihuzhuan)
#### Post date: [August 25, 2026, 10:09pm UTC](https://forum.ada-lang.io/t/adi2-a-modern-gui-library-for-ada-css-styling-xml-ui-sdl3-released-as-open-source/4663/4 "2026-08-25T22:09:19Z")

</div>

Are there plans for accessibility (for screenreaders for example)? Or is this use case already working?

Thanks, the project looks interesting.

Edit: sorry for the noise. It’s in the roadmap 🙂

---

<div class="post-metadata">

### Author: ![JC001](https://forum.ada-lang.io/letter_avatar_proxy/v4/letter/j/e56c9b/32.png) [@JC001](https://forum.ada-lang.io/u/JC001)
#### Post date: [August 26, 2026, 8:57am UTC](https://forum.ada-lang.io/t/adi2-a-modern-gui-library-for-ada-css-styling-xml-ui-sdl3-released-as-open-source/4663/5 "2026-08-26T08:57:13Z")

</div>

> [@charlie5](#):
>
> I’ve long wished for a native Ada GUI library!

There has long been [Gnoga](https://sourceforge.net/projects/gnoga/), a native Ada GUI library! There has less long been the sample implementation of [Ada GUI](https://github.com/jrcarter/Ada_GUI), also a native Ada GUI library.

---

<div class="post-metadata">

### Author: ![dmitry-kazakov](https://forum.ada-lang.io/user_avatar/forum.ada-lang.io/dmitry-kazakov/32/522_2.png) [@dmitry-kazakov](https://forum.ada-lang.io/u/dmitry-kazakov)
#### Post date: [August 26, 2026, 9:32am UTC](https://forum.ada-lang.io/t/adi2-a-modern-gui-library-for-ada-css-styling-xml-ui-sdl3-released-as-open-source/4663/6 "2026-08-26T09:32:15Z")

</div>

Aside. “Native” means using drivers or OS calls for rendering. Browser-based GUI is not native.

Then in my view Ada GUI worth of considerable efforts it would require to develop and maintain should refrain from using anything but Ada language and be **self-contained**. The latter is especially important, because for example GTK is incredibly difficult to deploy because of countless configuration and supplementary files needed to make it work. So, please, no CSS, no XML, no Toml, no JSON (the list is countably infinite).

---

<div class="post-metadata">

### Author: ![sbenitezb](https://forum.ada-lang.io/user_avatar/forum.ada-lang.io/sbenitezb/32/285_2.png) [@sbenitezb](https://forum.ada-lang.io/u/sbenitezb)
#### Post date: [August 26, 2026, 9:35am UTC](https://forum.ada-lang.io/t/adi2-a-modern-gui-library-for-ada-css-styling-xml-ui-sdl3-released-as-open-source/4663/7 "2026-08-26T09:35:54Z")

</div>

Something like VCL or LCL would be nice to have, but with several backends for drawing widgets.

---

<div class="post-metadata">

### Author: ![Lucretia](https://forum.ada-lang.io/user_avatar/forum.ada-lang.io/lucretia/32/17_2.png) [@Lucretia](https://forum.ada-lang.io/u/Lucretia)
#### Post date: [August 26, 2026, 11:43am UTC](https://forum.ada-lang.io/t/adi2-a-modern-gui-library-for-ada-css-styling-xml-ui-sdl3-released-as-open-source/4663/8 "2026-08-26T11:43:20Z")

</div>

I’m wondering if it would be possible to embed web based stuff in adi, i.e. youtube videos.

---

<div class="post-metadata">

### Author: ![ovenpasta](https://forum.ada-lang.io/user_avatar/forum.ada-lang.io/ovenpasta/32/1061_2.png) [@ovenpasta](https://forum.ada-lang.io/u/ovenpasta)
#### Post date: [August 26, 2026, 1:15pm UTC](https://forum.ada-lang.io/t/adi2-a-modern-gui-library-for-ada-css-styling-xml-ui-sdl3-released-as-open-source/4663/9 "2026-08-26T13:15:59Z")

</div>

the html view widget is intended to be for inline documentation, not a fully fledged web browser, if you need that, you can use webview[1], adi2 could adopt it as an extension with a dedicated widget

[1] [GitHub - webview/webview: Tiny cross-platform webview library for C/C++. Uses WebKit (GTK/Cocoa) and Edge WebView2 (Windows). · GitHub](https://github.com/webview/webview)

---

<div class="post-metadata">

### Author: ![Lucretia](https://forum.ada-lang.io/user_avatar/forum.ada-lang.io/lucretia/32/17_2.png) [@Lucretia](https://forum.ada-lang.io/u/Lucretia)
#### Post date: [August 26, 2026, 2:13pm UTC](https://forum.ada-lang.io/t/adi2-a-modern-gui-library-for-ada-css-styling-xml-ui-sdl3-released-as-open-source/4663/10 "2026-08-26T14:13:31Z")

</div>

Yup, having that as an extension would be very useful.

---

<div class="post-metadata">

### Author: ![JC001](https://forum.ada-lang.io/letter_avatar_proxy/v4/letter/j/e56c9b/32.png) [@JC001](https://forum.ada-lang.io/u/JC001)
#### Post date: [August 27, 2026, 9:52am UTC](https://forum.ada-lang.io/t/adi2-a-modern-gui-library-for-ada-css-styling-xml-ui-sdl3-released-as-open-source/4663/11 "2026-08-27T09:52:28Z")

</div>

> [@dmitry-kazakov](#):
>
> “Native” means using drivers or OS calls for rendering. Browser-based GUI is not native.

I use “native” to mean “not a binding”. Note that what you call a “native” implementation of Ada GUI is possible and would be welcomed.

---

<div class="post-metadata">

### Author: ![dmitry-kazakov](https://forum.ada-lang.io/user_avatar/forum.ada-lang.io/dmitry-kazakov/32/522_2.png) [@dmitry-kazakov](https://forum.ada-lang.io/u/dmitry-kazakov)
#### Post date: [August 27, 2026, 10:39am UTC](https://forum.ada-lang.io/t/adi2-a-modern-gui-library-for-ada-css-styling-xml-ui-sdl3-released-as-open-source/4663/12 "2026-08-27T10:39:24Z")

</div>

> [@JC001](#):
>
> I use “native” to mean “not a binding”. Note that what you call a “native” implementation of Ada GUI is possible and would be welcomed.

So long the OS that has no Ada API, any GUI must be bindings. I prefer “native” to refer to the target. If the target is a browser it can be script-based. But for a proper OS the GUI should be binding to that OS rather than binding to some library like Qt, GTK, MFC.

But before all, there must be an idea of the architecture. I find the event-driven approach lacking and insufficient for Ada, especially in the context of tasking. This is tightly related to the choice of decomposition running along the widget hierarchy and containers of, which is proven to be useful by many decades of practice, but leaves the processing to unstructured and untyped event handling. I have no idea how to address this, so I expect someone more clever than me to come up.

---

<div class="post-metadata">

### Author: ![Lucretia](https://forum.ada-lang.io/user_avatar/forum.ada-lang.io/lucretia/32/17_2.png) [@Lucretia](https://forum.ada-lang.io/u/Lucretia)
#### Post date: [August 27, 2026, 12:32pm UTC](https://forum.ada-lang.io/t/adi2-a-modern-gui-library-for-ada-css-styling-xml-ui-sdl3-released-as-open-source/4663/13 "2026-08-27T12:32:05Z")

</div>

I’m trying to add it now.

---

<div class="post-metadata">

### Author: ![Lucretia](https://forum.ada-lang.io/user_avatar/forum.ada-lang.io/lucretia/32/17_2.png) [@Lucretia](https://forum.ada-lang.io/u/Lucretia)
#### Post date: [August 27, 2026, 1:38pm UTC](https://forum.ada-lang.io/t/adi2-a-modern-gui-library-for-ada-css-styling-xml-ui-sdl3-released-as-open-source/4663/14 "2026-08-27T13:38:50Z")

</div>

Looks like webview can only take in a native window pointer, not a surface pointer for a widget. Google says to use cef instead.

---

<div class="post-metadata">

### Author: ![ovenpasta](https://forum.ada-lang.io/user_avatar/forum.ada-lang.io/ovenpasta/32/1061_2.png) [@ovenpasta](https://forum.ada-lang.io/u/ovenpasta)
#### Post date: [August 27, 2026, 1:56pm UTC](https://forum.ada-lang.io/t/adi2-a-modern-gui-library-for-ada-css-styling-xml-ui-sdl3-released-as-open-source/4663/15 "2026-08-27T13:56:57Z")

</div>

You can with [SDL3/SDL\_GetWindowProperties - SDL Wiki](https://wiki.libsdl.org/SDL3/SDL_GetWindowProperties)

---

<div class="post-metadata">

### Author: ![Lucretia](https://forum.ada-lang.io/user_avatar/forum.ada-lang.io/lucretia/32/17_2.png) [@Lucretia](https://forum.ada-lang.io/u/Lucretia)
#### Post date: [August 27, 2026, 2:10pm UTC](https://forum.ada-lang.io/t/adi2-a-modern-gui-library-for-ada-css-styling-xml-ui-sdl3-released-as-open-source/4663/16 "2026-08-27T14:10:37Z")

</div>

You can get the window pointer via that and assign the entire window to have the browser drawn inside, but not a widget because offscreen rendering isn’t in webview.

---

<div class="post-metadata">

### Author: ![ovenpasta](https://forum.ada-lang.io/user_avatar/forum.ada-lang.io/ovenpasta/32/1061_2.png) [@ovenpasta](https://forum.ada-lang.io/u/ovenpasta)
#### Post date: [August 27, 2026, 2:16pm UTC](https://forum.ada-lang.io/t/adi2-a-modern-gui-library-for-ada-css-styling-xml-ui-sdl3-released-as-open-source/4663/17 "2026-08-27T14:16:57Z")

</div>

I will check, because we can also say to webview which region of the window to use for render, so the adi’s webview widget needs to track it’s own area and then we need only to ensure that webview renders after the widget tree is rendered, does it make sense?

---

<div class="post-metadata">

### Author: ![Lucretia](https://forum.ada-lang.io/user_avatar/forum.ada-lang.io/lucretia/32/17_2.png) [@Lucretia](https://forum.ada-lang.io/u/Lucretia)
#### Post date: [August 27, 2026, 2:25pm UTC](https://forum.ada-lang.io/t/adi2-a-modern-gui-library-for-ada-css-styling-xml-ui-sdl3-released-as-open-source/4663/18 "2026-08-27T14:25:31Z")

</div>

The only dimensions I see in api.h and the bindings is webview\_set\_size and set\_size, which only sets the width and height, not the origin.

---

<div class="post-metadata">

### Author: ![ovenpasta](https://forum.ada-lang.io/user_avatar/forum.ada-lang.io/ovenpasta/32/1061_2.png) [@ovenpasta](https://forum.ada-lang.io/u/ovenpasta)
#### Post date: [August 27, 2026, 2:45pm UTC](https://forum.ada-lang.io/t/adi2-a-modern-gui-library-for-ada-css-styling-xml-ui-sdl3-released-as-open-source/4663/19 "2026-08-27T14:45:20Z")

</div>

You are right and there are open webview issues regarding this, I think cef is a better bet right now.  
The webview was a nice idea because it uses the native system browser, and it should be relatively easy to patch to set the widget area, on windows, linux and macos, except on wayland, where things get complicated.

---

<div class="post-metadata">

### Author: ![ThyMYthOS](https://forum.ada-lang.io/user_avatar/forum.ada-lang.io/thymythos/32/870_2.png) [@ThyMYthOS](https://forum.ada-lang.io/u/ThyMYthOS)
#### Post date: [August 28, 2026, 7:53am UTC](https://forum.ada-lang.io/t/adi2-a-modern-gui-library-for-ada-css-styling-xml-ui-sdl3-released-as-open-source/4663/20 "2026-08-28T07:53:33Z")

</div>

There is a shift in how most “modern” GUI frameworks (react, Android, …) are designed.

Widgets cannot generate events at arbitrary time, but only in the cycle of `state` → `render` and then `event` → `update state`. So both `render` and `state update` are pure functions without side effects by default.

There are different techniques to reduce the effort required for `render`, e.g. “shadow DOM”, etc.

This design method has not been used for any native GUI SDKs as far as I know.

[Next page](https://forum.ada-lang.io/t/adi2-a-modern-gui-library-for-ada-css-styling-xml-ui-sdl3-released-as-open-source/4663.md?page=2)
