You are right Gonzalo, my previous post was inadequate.
Instructions given by the documentation of Fl::compose(int&) apply to the situation
where one creates a new widget that inputs text and wants to support dead keys,
composed characters, and even complex input methods such as those used for CJK.
But what you're asking is more: give text input support to a new FLTK platform.
I recommend you don't code something that would tie together the Vulkan code and your new
text input widget, and rather work on two fronts:
1) give full text input support to the Vulkan platform;
2) have your text input widget call Fl::compose(), Fl::compose_reset(), fl_set_spot() and fl_reset_spot()
as described in the documentation.
With this, Vulkan should support all sorts of text input in Fl_Input, Fl_Text_Editor and your new widget.
There's no real documentation of what to do on front 1), only comments here and there
in platform-specific code. You may find inspiration in what Wayland does dealing with variables
Fl::compose_state and Fl_Wayland_Screen_Driver::next_marked_length in file Fl_Wayland_Screen_Driver.cxx.
Thus, you would have to implement these member functions:
- Fl_Vulkan_Screen_Driver::compose(int& del)
- Fl_Vulkan_Screen_Driver::compose_reset()
- Fl_Vulkan_Screen_Driver::reset_spot()
- the Vulkan equivalent of wl_keyboard_key() that runs each time a key is pressed or released.
I also recommend you to use the xkb library that interfaces very cleanly a client program to
keyboard input operations.