4 ms·
As I'm looking through the Skia APIs I have the dumb question: why doesn't Skia have its own wrappers for input method editors (at least on Windows and macOS)?
by eatonphil 3y ago
As I'm looking through the Skia APIs I have the dumb question: why doesn't Skia have its own wrappers for input method editors (at least on Windows and macOS)? Or maybe it does and I'm missing it.
Implementing these APIs for Windows and macOS seem super arcane. It's hard to find docs on implementing them. I guess there must be a good reason there are not cross-platform libraries that abstract IME specifically.
- adamnemecek 3y agoPresumably to keep the focus of the library small.
- eatonphil 3y agoI wasn't under the impression Skia had a focus on being particularly small. (Though I have no clue. I'm just getting into this stuff.)
- adamnemecek 3y agoCheck out nanovg and all the alternatives.
- sporedro 3y agoI can’t answer from rust perspective, but just my opinion. GUI frameworks in general seem like an atrocity, you have QT and that seems like it besides proper native development and targeting 1 platform. Java still seems like the only language with cross platform GUI and swing/awt are on the way out with javaFX being “abandoned”? (Probably not the right term but it never was made main stream). You got to Python, etc and it’s an absolute mess. C/c++ have a few but cross platform still seems tough. Don’t even get me started on the mess of electron.
- chairhairair 3y agoYou haven’t heard of Flutter?
- brabel 3y agoExactly... looks like most people don't know that Flutter uses Skia... and it's a real multi-platform framework (Windows, MacOS, Linux, Android, iOS, even Web), whether you like it or not.
- giraffe_lady 3y agoWhat's interesting to me is that there are a handful of languages that include gui frameworks: tcl with tk, erlang binds wxwidgets, and racket has its own thing built on gtk. It's curious what these languages have in common too: as languages almost nothing. But they're all venerable, proven & respected in their domains if not beloved, and relatively unpopular. I don't know how to interpret that. Maybe it's just a coincidence. Or stdlib gui frameworks are just out of style and it's survivorship from the old ones. But then python is from around the same time, why doesn't it?
- remexre 3y agotkinter is the Python one!
- vram22 3y agoRuby has a Tk-based one too, but I don't remember the name, since I used it only a little, years ago, though I did some non-GUI Ruby and Rails web work.
- beeburrt 3y agoRubyMotion? http://www.rubymotion.com/ http://www.rubymotion.com/
- vram22 3y agoNo, I think it had a bundled one like Python's Tkinter, which was a wrapper over Tcl's Tk. Edit: this is it, Ruby Tk. https://ruby-doc.com/docs/ProgrammingRuby/html/ext_tk.html https://ruby-doc.com/docs/ProgrammingRuby/html/ext_tk.html
- ReactiveJelly 3y agoSkia only does rendering, not input, right?
- c-smile 3y agoIME handling must be implemented at OS level. IME is not Skia's responsibility.
- throwaway2037 3y agoIME handling must be implemented at OS level. Really? X11 has a wide variety of IMEs. That's user space, not "OS level" (kernel?). A different view: It might be possible to write an IME for X11 using Skia. :)
- okanat 3y agoOS level includes the core system libraries in the userspace. Of course you can argue no such thing exist in Linux. It is the odd one among all OSes, both major and minor, in not providing any stable and well-defined system layer. The lack of unified standards in X11 and especially in Wayland/libinput is a huge source of problems in accessiblity and user experience of traditional Linux environments. Each of those IMEs (ibus, fctx,...) are a major pain to setup and configure correctly. They often don't look "native" to the toolkit of the desktop.
- TazeTSchnitzel 3y agoSDL2, which is an abstraction intended for games (gives you a window, sets up OpenGL and handles input events, but leaves the drawing to you), has a very simple text input API that can handle IMEs: https://wiki.libsdl.org/SDL2/SDL_StartTextInput https://wiki.libsdl.org/SDL2/SDL_StartTextInput + https://wiki.libsdl.org/SDL2/SDL_SetTextInputRect https://wiki.libsdl.org/SDL2/SDL_SetTextInputRect. But the trade-off is that you can't write a text editor with this. It just lets the user type text using the OS's text field or similar and the app is not in control while they do so.