Doxygen documentation for text.h, SFont.h, setup.h, realpath.h, readline.h, palette.h, keyboard.h, io.h, input.h, hotkeys.h, helpfile.h, errors.h; and a basic description for all other headers.

Removed 2 unused function prototypes (They escaped translation)
In each C file, added a #include of its own header, to help doxygen generate a more complete documentation for the C files (and also double-check function prototypes)

All these changes don't change the generated executable, it's still beta 99.0.

git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@752 416bcca6-2ee7-4201-b75f-2eb2f807beb1
This commit is contained in:
Yves Rizoud
2009-04-18 19:58:19 +00:00
parent 563b935615
commit c09f5819c2
50 changed files with 493 additions and 122 deletions

View File

@@ -20,8 +20,26 @@
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
//////////////////////////////////////////////////////////////////////////////
///@file keyboard.h
/// Functions to convert bewteen the SDL key formats and the keycode we use
/// in grafx2.
/// The keycode we're using is generalized to handle mouse and joystick shortcuts
/// as well. The format can be broken down as:
/// - 0x0000 + a number between 0 and SDLK_LAST (about 324) : the SDL "sym" key number.
/// - 0x0000 + SDLK_LAST+1: Mouse middle button.
/// - 0x0000 + SDLK_LAST+2: Mouse wheel up.
/// - 0x0000 + SDLK_LAST+3: Mouse wheel down.
/// - 0x0000 + SDLK_LAST+4+B : Joystick button number "B", starting at B=0.
/// - 0x0800 + a number between 0 and 0x7FF: The scancode key number, for keys which have no "sym", such as keys from multimedia keyboards, and "fn" and "Thinkpad" key for a laptop.
/// Add 0x1000 for the Shift modifier MOD_SHIFT
/// Add 0x2000 for the Control modifier ::MOD_CONTROL
/// Add 0x4000 for the Alt modifier ::MOD_ALT
//////////////////////////////////////////////////////////////////////////////
/*!
Convert an SDL keysym to an ANSI/ASCII character.
This is used to type text and numeric values in input boxes.
@param keysym SDL symbol to convert
*/
word Keysym_to_ANSI(SDL_keysym keysym);
@@ -30,12 +48,15 @@ word Keysym_to_ANSI(SDL_keysym keysym);
Convert an SDL keysym to an internal keycode number.
This is needed because SDL tends to split the information across the unicode sym, the regular sym, and the raw keycode.
We also need to differenciate 1 (keypad) and 1 (regular keyboard), and some other things.
See the notice at the beginning of keyboard.h for the format of a keycode.
@param keysym SDL symbol to convert
*/
word Keysym_to_keycode(SDL_keysym keysym);
/*!
Helper function to convert between SDL system and old coding for keycodes. This is needed because some SDL keycode are actually unicode and won't fit in 8 bits.
Helper function to convert between SDL system and the old coding for PC keycodes.
This is only used to convert configuration files from the DOS version of
Grafx2, where keyboard codes are in in the IBM PC AT form.
@param scancode Scancode to convert
*/
word Key_for_scancode(word scancode);
@@ -48,6 +69,7 @@ const char * Key_name(word Key);
/*!
Gets the modifiers in our format from the SDL_Mod information.
Returns a combination of ::MOD_SHIFT, ::MOD_ALT, ::MOD_CONTROL
@param mod SDL modifiers state
*/
word Key_modifiers(SDLMod mod);