Fichier texte en cours : OIS explications.txt
class Win32Keyboard : public Keyboard
enum Modifier
{
Shift = 0x0000001,
Ctrl = 0x0000010,
Alt = 0x0000100
};
ToUnicodeEx
WideCharToMultiByte
DIDEVICEOBJECTDATA diBuff[KEYBOARD_DX_BUFFERSIZE];
DWORD entries = KEYBOARD_DX_BUFFERSIZE;
mKeyboard->GetDeviceData
KEYBOARD_DX_BUFFERSIZE =
virtual bool keyPressed(const OIS::KeyEvent& arg);
virtual bool keyReleased(const OIS::KeyEvent& arg);
virtual bool mouseMoved(const OIS::MouseEvent& arg);
virtual bool mousePressed(const OIS::MouseEvent& arg, OIS::MouseButtonID id);
virtual bool mouseReleased(const OIS::MouseEvent& arg, OIS::MouseButtonID id);
*/
class _OISExport KeyEvent : public EventArg
{
public:
KeyEvent(Object* obj, KeyCode kc, unsigned int txt) : EventArg(obj), key(kc), text(txt) {}
virtual ~KeyEvent() {}
//! KeyCode of event
const KeyCode key;
//! Text character, depends on current TextTranslationMode
unsigned int text;
};
class _OISExport KeyListener
{
public:
virtual ~KeyListener() {}
virtual bool keyPressed(const KeyEvent &arg) = 0;
virtual bool keyReleased(const KeyEvent &arg) = 0;
};
class _OISExport MouseListener
{
public:
virtual ~MouseListener() {}
virtual bool mouseMoved( const MouseEvent &arg ) = 0;
virtual bool mousePressed( const MouseEvent &arg, MouseButtonID id ) = 0;
virtual bool mouseReleased( const MouseEvent &arg, MouseButtonID id ) = 0;
};
Buffer input :
Non-buffered input :
-------------------------------
WideCharToMultiByte :
z
ToUnicodeEx :
ToAscii : convertit le key code passé en paramètre en fonction du layout du clavier
GetKeyboardState :
MapVirtualKeyEx : converti le key code de direct input en vitual key code
FoldStringW :
GetKeyboardLayout :
DIPROPSTRING : sert à transmetre des propriétés