specific to X windows. I changed a few names of variables and methods to
sound less X windows specific, for example in the BXKeyEntry struct
the "xwinKey" field is now called "hostKey".
- remove the hacks in bx_keymap_c::loadKeymap that checked that every
keysym started with "XK_". Now I can still make that check, but it
is done in x.cc's convertStringToXKeysym() instead.
- in sdl.cc, load the keymap in specific_init function. I had to
create a conversion function from SDL key names to SDLkey values.
I created a table of key names and associated values, and I just
do a strcmp on each name. It's not a fast algorithm obviously but this
conversion only has to be done for maybe 200 keys at startup time.
- added a key map file for SDL called sdl-pc-us.map. Since this has
basically all the SDLK_* symbols defined, it is a good starting point
if you need to make any other keymaps.
- modified: gui/keymap.cc gui/keymap.h gui/sdl.cc gui/x.cc iodev/keyboard.cc
- added: gui/sdlkeys.h gui/keymaps/sdl-pc-us.map
This must be done carefully though, because the call to SDL_WarpPointer
generates a mouse motion event of its own. To work around this, I have
added code that should ignore motion events generated by SDL_WarpPointer.
This should fix bug [ 619283 ] SDL: os mouse pointer leaves the window.
On Linux, SDL 1.2.3 it works fine.
set_text_charbyte()
- vga: store the address of the active charmap in the new variable
charmap_address
- vga: text mode hack removed. The write modes, operations and masks must be
used in text mode too.
- sdl: clear_screen() is not necessary when the charmap has changed
- win32: update only the changed font bitmaps before drawing the text
vga_charmap
- the SDL gui uses the charmap data for the vga text display
* TODO: implement this feature for other guis
- removed unused variables in sdl.cc and gui.cc
- fixed a warning in vga.cc
- The emulated vga card issues a dimension_update() using the real
screen dimensions and the real font height.
- The gui selects a font with the requested height or it recalculates
the screen height if the font height is not available.
- The text_update() function uses a new variable 'ncols' instead of the
fixed value of 80 for the number of text columns.
I have tested the changes with X11/Linux, SDL, wxGTK and win32. The changes
in the other guis are not tested yet.
- added toggle_mouse_enable() call to the handling of the middle mouse button
- removed break statement between SDL_MOUSEBUTTONDOWN and SDL_MOUSEBUTTONUP
- added prefix "SDL" in specific init
GUI specific paste functions for X11 and WIN32 in paste_handler() moved to
the new function
- get_clipboard_text() prepared for other GUIs
- set_clipboard_text() has now a return value (0 = failed or not implemented)
- use portable code in copy_handler() if set_clipboard_text() fails
- snapshot_handler() prepared for adding a file dialog call
- writing snapshot file in binary mode (LF->CRLF conversion already done)
GUI specific copy functions for X11 and WIN32 in copy_handler() moved to
the new function
- set_clipboard_text() prepared for other GUIs
- value of text mode cursor variables fixed (and renamed in x.cc)
- BX_ERROR message in snapshot_handler() fixed
Added control for 80x50 fonts
Added mouse input
Added mouse grabbing
Added automatic mouse grabbing when entering full screen
Added autoremoval of header when going fullscreen
Simplified a couple of graphic routines