17 ms·
Libui: a portable GUI library for C
- dang 8y agoDiscussed in 2016: https://news.ycombinator.com/item?id=11735393 https://news.ycombinator.com/item?id=11735393
- akkartik 8y agoThanks! The first thing I did was to click on the 'past' link. But that was no help here because the project has changed its title in between.
- fernly 8y agoI might be interested, esp. since it claims Python bindings, but documentation appears to be nil. Seriously, nonexistent. A GUI lib surely has an API complex enough to require _some_ kind of reference docs, at least. But the contents of the doc folder[1] are just a joke, most of the files contain single lines, and the .md files are fragments with many "TODO" notes. So OK maybe I can get some insight reading the code. The "common" folder seems a good place to start[2]. Um, no. Short, generic uninformative filenames ("matrix.c", "control.c") and very few introductory comments. The opposite of "literate programming". [1] https://github.com/andlabs/libui/blob/master/doc/main https://github.com/andlabs/libui/blob/master/doc/main [2] https://github.com/andlabs/libui/tree/master/common https://github.com/andlabs/libui/tree/master/common
- noobermin 8y agoThe readme specifically says it has no docs and asks users to look at the main header file.
- krapp 8y agotry the examples folder.
- saagarjha 8y agoThat's nice, but falls quite short of proper documentation.
- vortico 8y agoThe entire API is 1100 lines. https://github.com/andlabs/libui/blob/master/ui.h https://github.com/andlabs/libui/blob/master/ui.h You don't need a separate documentation for that. In fact, most functions have sufficient docstrings if their names don't fully describe their function. Your hostility toward an MIT licensed project is what is ruining the open-contribution model of developing software. In 2005, it was "Hey, this looks great, want me to write up a documentation?" Now it's "Not up to my standards, it's a joke." Absolutely disgusting behavior that is becoming gradually more common.
- stochastic_monk 8y agoWith that many digits, uiPi should definitely have an L suffix.
- andlabs 8y agoExcept that would make uiPi a long double, whereas every drawing API in libui just takes a double. Now as to whether the drawing APIs should use long double instead of double, I don't know; I will say that both cairo and Quartz/Core Graphics use double, so... (And on Windows, Direct2D takes floats, so at least on that platform, it's probably not going to make a difference at all...)
- geofft 8y agoI got to the first function in the API: _UI_EXTERN const char *uiInit(uiInitOptions *options); uiInitOptions is a struct that contains a single size_t Size. What's it the size of? Can I pass a NULL pointer? Does this function take ownership of the pointer, and if so, does it need to be allocated with malloc? If not, when can I free it - can I use a pointer onto my stack? Why does it take a non-const pointer - does the size (of whatever) change? What's the string that's returned? What's the lifetime of the string that's returned? Can another thread call uiInit, or does that break everything horribly? Or does it only break horribly if you don't copy the returned string first? You don't need documentation, sure. But it's a good way to get users of the library that make wild assumptions so that you can no longer make reasonable upgrades to the library without breaking them, and that makes nobody (neither the library author, who wants people to use it, nor the users themselves, nor end users) happy.
- dman 8y agoI find it a bit sad that this is the top comment. I have witnessed free software/OSS have tremendous amount of positive effect on the world, however as the years go by I can't help feeling that we have trained a generation of users to act in an entitled manner towards software that is free and often the labor of love of some fellow developer trying to get better at their craft.
- vortico 8y agoDefinitely agree that this has started happening in the last ~10 years. The solution is to convince programmers to maintain their own open-source projects so they can discover for themselves the reasons developers do this. (e.g. it's not magic or altruism, there are real reasons.)
- kodablah 8y agoI view it a bit differently. I can't help feeling that we have trained a generation of devs to act in an entitled manner towards documentation that is easy and formerly seen as requisite as the code itself. Personally, I find documenting my projects a labor of love because it's where I can distill all of my hard work in a presentable format.
- behringer 8y agoI've been programming for a long time, but if it's undocumented I don't use it, period. It takes too much time, gets too buggy, and I can just write it myself and understand it completely (and document it as I go).
- saagarjha 8y ago> I have witnessed free software/OSS have tremendous amount of positive effect on the world, however as the years go by I can't help feeling that we have trained a generation of users to act in an entitled manner towards software that is free and often the labor of love of some fellow developer trying to get better at their craft The only issue I see with the parent comment is that it's a bit harsh. But it's good advice to someone "trying to get better at their craft": writing software, especially one intended to be used by others, without documentation, is generally poor practice. It's not entitled at all, as far as I can see: it's not saying "I should have documentation for this project I use for free"–as far as I'm aware, they're not even using it at all. They're just evaluating whether as an interesting project they might want to take a look at later.
- tacostakohashi 8y agoI have no doubt that the author would accept a patch should you see fit to contribute some documentation.
- saagarjha 8y agoSure, but I hope you agree that I have no obligation to submit a patch, given that I'm not using this software, just as the author has no obligation to provide documentation for me either.
- kleiba 8y agoBut let's be honest: how many people write up a really good documentation for their github project? I mean, something that actually adds substantial value on top of what the source code, code comments and examples programs can provide? And is not outdated, i.e., actually always in sync with the code portion of the project? I'm sure the answer is > 0, but I would be very astonished if the percentage would be a high double-digit number. Let's just stay realistic: this guy is not selling a product, he's coding up something out of his own interest and is showing it to the world on github. I'm sure his interest in coding this up is much greater than his interest in writing documentation, so why should he focus on the latter? "So that anybody else can use his stuff" comes to mind as a first answer, and that's fair enough. But maybe that hasn't been his foremost interest. One aspect that I see here is that with all the different language bindings, we're not talking about a documentation that would be trivial to write. I could imagine that an effort like that requires a lot of subtle changes to the API as more functionality is added which makes keeping the documentation up-to-date a tedious and quite hard thing to do -- so something that isn't a lot of fun. And isn't fun the main reason hobby projects get started on github in the first place? I see your point that the current state of the project makes it very hard to use for you. Fair enough. But maybe it can become interesting again in the future when more documentation has been added -- perhaps even though the help of others. After all, it's an open source project.
- jventura 8y agoI'm maintaining the python bindings at https://github.com/joaoventura/pylibui/ https://github.com/joaoventura/pylibui/. Happy to accept pull requests for it..
- billsix 8y agoFor imgui (https://github.com/ocornut/imgui/ https://github.com/ocornut/imgui/) and uklear (https://github.com/vurtun/nuklear https://github.com/vurtun/nuklear), docs are basically unnecessary. You just have to look at the examples/demos and copy pasta. Immediate mode GUIs are great.
- LeoNatan25 8y agoWhat a surprise, so there are alternatives to Electron garbage! Who knew!
- __sr__ 8y agoQt? Although it has its own problems, the end product is often way better than Electron.
- kitsunesoba 8y agoIt may have changed since I last gave it a shot previously one annoyance I had with Qt was binary distribution. Getting it all packaged up correctly for each platform is much less than straightforward and if your app isn’t FOSS it’s exacerbated by LGPL linking requirements. It should really be a simple, single button process.
- sanxiyn 8y agoThere is no LGPL linking requirements if you buy Qt commercial license.
- jcelerier 8y ago> Getting it all packaged up correctly for each platform is much less than straightforward and if your app isn’t FOSS it’s exacerbated by LGPL linking requirements. Electron also has LGPL dependencies (Blink, FFMPEG) and libui depends on GTK which is also under LGPL so...
- chris_wot 8y agoThere is also gtkmm
- chris_wot 8y agoNot sure why I've been downvoted. What is wrong with gtkmm? It's a reasonable C++ binding to GTK+
- 8y ago
- waynecochran 8y agoNo Documentation? Documentation as an afterthought is not a good sign that this was well thought out. How about a white paper? A tutorial? Just code?
- vortico 8y agoWhy would you need an entire whitepaper for wrapping OS widgets in a window? The API is the documentation, and the example code gives you everything you need to get going. Why would you need anything else?
- pacaro 8y agoI’m mixed on whether api docs are needed, if you have them, they have to be kept in sync, if you don’t then examples have to cover as much of the api surface area as possible Higher level docs would be nice though, goals and non-goals, high level feature roadmap etc. For example a cursory reading of the code suggests that there is no a11y support, which is a deal breaker for some projects and not so important for others, it would be nice to know where that sits on the roadmap
- vultour 8y agoA whitepaper for some dude’s personal project, the sense of entitlement is astonishing.
- waynecochran 8y agoI am sorry -- I assumed since this reached the top page of HN that this was a bit more serious that just some dude's personal project. This portable graphics API thing has been tried 10000x and they are almost never useful for any significant app you want to write. I see one of these and I hope that maybe someone has figured it out -- one glance and I see no documentation nor any rational as to why this effort is unique, then I know this is not a serious offering.
- andlabs 8y ago
- discussedbefore 8y agoAnother option (C++ LGPL w/ Lua,JS bindings): https://github.com/yue/yue https://github.com/yue/yue Other projects building on andlabs/ui and https://github.com/parro-it/libui-node https://github.com/parro-it/libui-node: https://github.com/mimecorg/vuido https://github.com/mimecorg/vuido - vue https://github.com/kusti8/proton-native https://github.com/kusti8/proton-native - react
- behringer 8y agoThis is great, and they're fully documented. Thanks.
- fithisux 8y agoI had my eye on yue, but it does not seem that a Golang port exists. Persoanally I would like a guide (hints) to port it to Golang or other language.
- taesis 8y agoThere's a golang wrapper for libui written by the same author [1], if that's of interest. Same standard of documentation, though. [1]: https://github.com/andlabs/ui https://github.com/andlabs/ui
- chucky_z 8y agohttps://godoc.org/github.com/andlabs/ui https://godoc.org/github.com/andlabs/ui
- erlend_sh 8y agoAnother one: https://github.com/zserge/webview https://github.com/zserge/webview
- diego_moita 8y agoThis is very, very interesting. It allows to build the whole UI using HTML, CSS and JS and leverage it with all the tooling and libraries already built for the web.
- mark_l_watson 8y agoNice project and I like seeing the many language bindings other people have contributed. I am definitely going to try this. I did something a little similar about 20 years ago in my two McGraw Hill books Portable GUI in C++. But Libui looks very much better.
- c-smile 8y agoInteresting, never saw such way of std::vector/std::map allocations: g->children = new std::vector<struct gridChild *>; g->indexof = new std::map<uiControl *, size_t>; At least needless level of indirection ... https://github.com/andlabs/libui/blob/master/windows/grid.cpp#L654 https://github.com/andlabs/libui/blob/master/windows/grid.cp...
- saagarjha 8y agoA lot of the comments have mentioned the lack of documentation this project has, and then they've received replies of the form "you should submit a pull request, the author doesn't owe you anything". Here's my take on it: I don't owe the author anything either. But if I'm considering which project to use, I'd probably choose the one with documentation, since it signals better goals and higher code quality. It's absurd to think that I should just pick up a random project and be obligated to make it better, and that I should be called out for giving advice on how I think a project can be improved. This isn't to say that I've never submitted an unsolicited pull request to a project to get it improved–on the contrary, this is something I do very often–but I do this because I feel that the project has something of value and can be improved. I shouldn't be forced to make a contribution to a project if I just don't think it's doing everything right. (This comment isn't mean to be aimed at this project in particular, by the way, it's just a general response to all the people in this thread.)
- Jach 8y agoPeople suck at communicating, but people want to communicate. People love to complain more than they love to fix things. A lot of the time a complaint is half frustration, half trying-to-be-helpful-suggestion. Sometimes it's just people complaining about other people complaining (like the "fix it yourself" crowd or the "didn't you reflect before posting that the issue of X is already a known concern?" crowd) but this just goes back to people wanting to communicate. I suppose all I really wanted to say was that maybe people in general should open their mouths / comment boxes less. (Yeah my comment sucks, doesn't listen to its own advice...)
- ljm 8y agoIt's a hell of a lot easier to be negative or express a frustration than it is to put the energy into a positive, constructive conversation. It's not an easy problem to solve because the different parties to the conversation have different experiences and are often unaware of the situation for the other people involved. For example, what might have been an innocent question for one person is actually an annoying nag to somebody else, because they've been answering that sort of question for a long time and have built up an expectation for everyone else to do more research first. The person asking the innocent question doesn't know that they're the hundredth person to ask, so to them the response seems harsh and unkind. Someone observing the exchange from the outside is going to have their own judgments on the quality of the community. The solution to difficult communication isn't to communicate less, it's generally to communicate more and that doesn't necessarily mean more conversations, because communication can take place in many different ways. What would help even more is to approach communication with some level of empathy and compassion, and accountability for how you react to those reaching out to you (or those you're reaching out to, of course). If it always seems difficult and sucky then you need to understand why you continue to see it that way, why you get frustrated, and what you can do for your part in that communication to make it more pleasant for yourself. And then make that position clear so there's no misunderstanding of intent. A large part of communication in those terms, and at the scale we're looking at here, is setting clear boundaries on how you wish to be communicated with and how you'll do your best to respond. It's not useful to act out and complain and moan because nobody can guess what it is you want from them.
- yani 8y agoI have arrived at this library yesterday while trying to do a cross platform drag and drop app. I decided to go with x/screen package instead. The documentation and lack of examples threw me off. If I have to read the source in details to understand the app, I am better off writing the code x 3 with native tools. The library is supposed to save time not steal from it. It is wonderdul idea and I really like the name. I wish the author will make it more dev and contributor friendly so we can take it off the ground.
- andlabs 8y agoNot only does libui not yet do drag-and-drop, but drag-and-drop is sufficiently complex enough that simple libraries are probably not going to have this out of the box. That being said, I do plan on adding drag-and-drop later.
- rohan1024 8y agoThe same library for Go https://github.com/andlabs/ui https://github.com/andlabs/ui
- secure 8y agoNote that this is a Go wrapper around the C libui library, not a Go implementation of it.
- guessmyname 8y ago> libui was originally written as part of my package ui for Go. > Now that libui is separate, package ui has become a binding to libui. > As such, package ui is the only official binding. From the README — https://github.com/andlabs/libui#language-bindings https://github.com/andlabs/libui#language-bindings
- signa11 8y agonuklear (https://github.com/vurtun/nuklear https://github.com/vurtun/nuklear) is also pretty cool. and it seems to have bindings for various languages (besides C) f.e. go, rust, lua etc.
- CyberDildonics 8y agoHave you ever actually used nuklear? It is awkward and confusing to even change an example and have it work, let alone creating what you really want. There is no documentation that will help you either.
- sametmax 8y agoI wish more projects lile this existed. Most of the tools don't need a huge UI but something simple to install and well integrated is very much needed. I like the toga project in python : https://pybee.org/project/projects/libraries/toga/ https://pybee.org/project/projects/libraries/toga/ Tkinter is terribly integrated and QT hard to install so toga hits a sweet spot. But it's very immature. My favorite toolkit is still wx, however it just reached V3 compat so it's considered unstable. You can pip install it (well, linux support is so so yet) and all the UI looks native, including the file dialogs.
- terminalcommand 8y agoI think GTK is an excellent library for C. If you use Glade and GTKBuilder, you don't have to write the boilerplate either. You design you UI in Glade visually, add your signals, set your id's etc. Then you save your design as an XML file. In your C code you load that design with a simple function, then assign the function names for the signals you've created in the visual designer. Then you're all set to go. The library (GTK) feels the same in every language, whether it's C, Python, Go, etc. I admit, it can be a hassle to get the library up and running, but once you do that, it is surprisingly simple to code in.
- rapsey 8y agoThe UI's look like garbage on anything non linux though.
- Vogtinator 8y agoIt looks like garbage on anything not GNOME 3 with default settings.
- terminalcommand 8y agoWell, GIMP uses GTK and it looks really sharp on all platforms. It all comes down to theming. I wouldn't say it looks like garbage, but if you want a more native look and feel you could certainly set it up in the settings. (For example: you could look at https://stackoverflow.com/questions/37035936/how-to-get-native-windows-decorations-on-gtk3-on-windows-7-and-msys2 https://stackoverflow.com/questions/37035936/how-to-get-nati... ) As a library purely coded in C, I still believe that GTK and GNOME lay a solid foundation for easy development in C. Before downvoting you might want to give GTK another chance. Even this libui library uses GTK under the hood for linux.
- hawski 8y agoLately I was thinking about the Right Thing [0] of Native Crosspostform UI - write a spare frontend for every platform and write the backend in something portable. It could be a nice idea to come up with a document that would describe every platform APIs for: - accessibility - localization - text rendering - input methods - widget toolkit - event loop - HIG The document should also contain example code for something basic for every platform. All this information could be then used to create the Right Thing Toolkit. Probably it should aim for the future. So only include APIs that most probably would not be deprecated in 5 years. The platforms that I'm thinking about: Android, Freedesktop/Unix-like, iOS, macOS and Windows. I was wondering what is current situation with Windows. Is UWP the future or will it be soon replaced by yet another API? Is side-loading currently as effortless as running of Win32 apps? Or maybe Win32 is good enough, because they will always support it? [0] as opposed to the Worse is Better, because that's current situation and it's not all that hard, use SDL or whatever and draw everything yourself.
- chris_wot 8y agoI would love to see a boost library that does all of this :-)
- chris_wot 8y agoIs there a portable C++ GUI library though?
- guessmyname 8y agoDo you mean a C++ bindings for libui? If yes, then you can check these two [1][2]. [1] https://github.com/billyquith/libui-cpp https://github.com/billyquith/libui-cpp [2] https://github.com/aoloe/cpp-libui-qtlike https://github.com/aoloe/cpp-libui-qtlike
- jcelerier 8y agoQt is the most portable GUI library. It can run on bare metal.
- chris_wot 8y agoExcept it doesn't run native controls, at least so far as I'm aware.
- jcelerier 8y agowell, yes, because it runs on platforms that don't have any kind of "native" controls. Besides, in KDE/Lumina/LXQt, Jolla phone, LG WebOS, or AsteroidOS (currently on the front page just above this!) and many automotive environments & medical devices, it is the native UI system.
- Vogtinator 8y ago> Except it doesn't run native controls, at least so far as I'm aware. Can you tell the difference? https://3.bp.blogspot.com/-O1Naap_IGVQ/VGJsRBEfQjI/AAAAAAAAAiM/3_eoqupIMlQ/s1600/VLC_MediaPlayer-215.png https://3.bp.blogspot.com/-O1Naap_IGVQ/VGJsRBEfQjI/AAAAAAAAA...
- criddell 8y agoWell, it's not the prettiest Mac application, but it works great!
- rajeevk 8y agoHow does it compare to wxwidgets? I have used neither of these. I need a platform independent(mac/Linux/windows) GUI for a upcoming project and I was comparing Qt and wxwidgets and decided to use wxwidgets. Now wonder whether I can use libui instead of wxwidgets?
- jhasse 8y agowxWidgets is a lot more mature. If you are fine with a C++ API instead of plain C, I'd go with wxWidgets.
- iveqy 8y agoSo what I can understand this is "just" a wrapper for existing GUI frameworks? Why is this better than just using GTK that already is portable?
- guessmyname 8y agoWriting a GTK UI for macOS, for example, will make the interface look very different to the look and feel that the operation system is offering. If you use a library like libui, the ABI is the same for every major operating system, but the result matches what the OS is using. If you don't care about the look and feel of the interface then I guess this library is not for you. As someone who is responsible for maintaining the UI of a big application for three major systems (macOS, Windows and Linux) a library like this would have been a blessing years ago before the project started.
- wruza 8y agoApart from being curious why your comment is downvoted, did you consider using e.g. wx or tk? They both had their disadvantages last time we checked (~10 years ago), but it would be nice to hear someone’s opinion on them in this thread.
- unwind 8y agoOn Unix this seems to map to GTK+, so I guess it's a bit like wxWidgets then? Interesting but since GTK+ itself is cross-platforms it feels a bit heavy to wrap it.
- Vogtinator 8y ago> GTK+ itself is cross-platforms Only in theory. It does not look and behave even close to native anywhere except on GNOME 3 with default settings.
- unwind 8y agoUh, no, it's not aiming to be a "native-looking" interface, it's GTK+ on all supported platforms.
- jxub 8y agoOne of the funniest commit messages I've ever seen: https://github.com/andlabs/libui/commit/422ec83162de7b9689b7fb066404119a020f1b0e https://github.com/andlabs/libui/commit/422ec83162de7b9689b7...
- wruza 8y agoFor those interested, it seems to use classical grids to align elements, and it is the only way to do it, since there is no mention on coordinates (if I read it thoroughly enough). void uiGridInsertAt(uiGrid *g, uiControl *c, uiControl *existing, uiAt at, int xspan, int yspan, int hexpand, uiAlign halign, int vexpand, uiAlign valign); The overall feeling is that it’s a [small] subset of GTK. I think they try to fill an empty cross-platform niche between lightweight and native-looking Tk and heavies like GTK and Qt. Doc could explain how is that better than Tk itself, but it has to be written. The other possibility is that they do it for fun and distinctive use cases are shallow – this is often seen in second order ui kits.
- jsd1982 8y agoI think the point of this library is more to offer a native wrapping UI toolkit, including windows and Darwin, not necessarily a GTK subset, though you probably meant that in terms of a subset of components rather than implementation. This library has no renderer of its own and instead delegates that away.
- andlabs 8y agoAlso the design of uiGrid was directly based on that of GtkGrid.
- ktpsns 8y agoHow does it compare to the good old (and mature) https://www.wxwidgets.org/ https://www.wxwidgets.org/ ? It is one of the C++ toolkits which was famous for using native widgets.
- valera_rozuvan 8y agoI am surprised that ocornut/imgui [1] is not mentioned anywhere here. I used it for an admin interface in a past project. The author makes it a point to do work on the library based on donations (such as from Patreon, or PayPal). I suppose that's the main reason the project is alive and kicking today. OpenSource projects that are somehow financed - are in a much better situation than projects done on a spare time budget. --- [1] https://github.com/ocornut/imgui https://github.com/ocornut/imgui
- ComodoHacker 8y agoThe title should be "GUI library written in C", not "GUI library for C". There are bindings for many languages. Also "libui was originally written as part of my package ui for Go".
- criddell 8y agoI was just reading ui.h. It's been quite a while since I wrote anything in C so this might be a dumb question, but does C not have namespaces? How can major projects use third party libraries and not have to deal with naming collisions?
- detaro 8y agoNo, C doesn't have namespaces as a language feature. Guess why all the function names start with ui.
- criddell 8y agoBut ui is a super common prefix. I've seen it used for user-interface variable and function names and also in Microsoft-world in projects that abuse Hungarian notation (unsigned int). Clearly it must not be a problem, I just don't understand how people work around it.
- detaro 8y agoYeah, only ui might not be a great prefix. It is a problem when names clash, and annoying to work around. Either you rename one of them, or you can wrap one library in a library of your own that changes the names.
- yawaramin 8y agoC compilation units have a static section which isn't exposed to the outside world (i.e. other compilation units): https://www.codingfriends.com/index.php/2010/07/13/static-in-c-hide-that-function/ https://www.codingfriends.com/index.php/2010/07/13/static-in...
- andlabs 8y agoI don't know, but I do know I'm in the middle of making sure any non-static symbol name in libui either has a prefix of ui[capital letter] or uipriv[capital letter] to at least ameliorate this madness.
- oblio 8y agoGithub badly needs a prototype/alpha/beta/rc/production tag, like Sourceforge and Pypi have. It should be set to prototype by default.
- andlabs 8y agoIt does this for "Releases", but not for entire projects. And if someone starts browsing files, then you'd have to worry about what that status is at the commit for the file you are reading; this will vary based on how the projects organize their git branches, tags, and releases.
- nineteen999 8y agoOne thing I have noticed about programmers in general, and this thread tended to remind me of it, is that everyone has high expectations of other's documentation, but when put on the spot, rarely meet those expectations themselves. At my most recent stint in a software company once of the most frequently heard retorts about absent documentation was "the code IS the documentation". Yet often these same people were the first to complain when another developer or operations staff hadn't documented something and they'd got themselves into a pickle trying to guess what was going on rather than read the code themselves. Often the people most vocal about documentation are the worst at preparing it themselves in my experience, a form of projection onto others. YMMV.
- andlabs 8y agoJudging from the comments here, it appears I have completely failed at properly getting across just how early this thing is in development. I've since updated my README with a status report. As for documentation, that is an active WIP. I have recently pinned down a documentation style I like, and applied it to the newest APIs; all that's left to do really is to spread it to the older APIs as well, and write a tool to turn that documentation into HTML, because I have not found a documentation tool that operates how I want it to.
- andlabs 8y agoOh, and one other thing I forgot to mention about documentation: the nature of this project requires me to balance what I can get behaving identically across platforms, what I can guarantee about behavior across platforms that must differ, and what I am forced to leave as "implementation-defined" with no further specification. If this was a non-native project like GTK+ and Qt, I would be the one making these decisions, but in this case I am not, so I must take a lot of factors into consideration when writing documentation. If you read through the docs I did have on package ui, you'll find a lot of TODOs about behavior.