GdkKeymap already has support for _get_num_lock_state() and
_get_caps_lock_state(). Adding _get_scroll_lock_state() would be good
for completness and some backends (Windows?) could take advantage of
this.
-Don't include unistd.h unconditionally as it's not available in Visual
Studio, but include io.h where necessary.
-Avoid C99isms, and use _chsize_s in place of ftruncate when unistd.h is
not available (as in the case of Visual Studio)
We can't really know the client side keymaps, so we use the keysym
as the hardware keycode (essentially claiming to have a keyboard with
one key for all possible keysyms). This is not ideal, but its hard to
do better with no knowledge of the client side keyboard mappings.
(And html keyboard events suck badly...)
This just runs:
for i in *.[ch]; do
sed -i s/DisplayX11/DisplayBroadway/g $i;
sed -i s/PrivateX11/PrivateBroadway/g $i;
sed -i s/ImplX11/ImplBroadway/g $i;
sed -i s/KeymapX11/KeymapBroadway/g $i;
sed -i s/ScreenX11/ScreenBroadway/g $i;
sed -i s/GdkX11Monitor/GdkBroadwayMonitor/g $i;
sed -i s/_X11/_BROADWAY/g $i;
sed -i s/x11/broadway/g $i;
done