Nuklear icon indicating copy to clipboard operation
Nuklear copied to clipboard

Xcb cairo

Open riri opened this issue 3 years ago • 3 comments

As announced on the gallery thread, I adapted a backend xcb+cairo to be included in nuklear demos, and fixed the rect multi-color (thanks to twidgets project).

Two more little additions (I forgot to remove them before doing the commits, so if they are ok, so far so good ^^):

  • added .vscode to .gitignore (that way auto-generated IDE directory does not mess up the git tree)
  • added a style selector through a combo to the demo (with INCLUDE_STYLE defined)

If you don't want them, I will make a new commit to revert.

Note: this configuration is pretty interesting for little desktop apps, by reducing both CPU usage (blocking on events) and memory (at least on Linux, where cairo is mostly loaded in shared library as part of gtk loaded elsewhere). I come with a demo using only about 8MB of RSS)

riri avatar May 12 '21 23:05 riri

To be honest, I am not familiar either with the cairo API, learning as I adapted an external implementation to nuklear and from various other projects.

I think the font stuff needs improvement, but those are mostly demo implementation to serve as a base (what I did for my pugl/cairo backend).

riri avatar May 13 '21 13:05 riri

Would it be okay if we kept this in a repo somewhere? Sounds like not many people are familiar with the APIs behind these. They seem pretty awesome though! Having it in your own repo will give you a lot more control over changes too, which is nice.

RobLoach avatar Dec 22 '21 17:12 RobLoach

Our policy is to accept backends despite them being incomplete or buggy or whatnot. Just document the downsides and we'll merge it :wink:. We appreciate the effort. Thanks a lot!

dumblob avatar Dec 22 '21 19:12 dumblob