40
* @author Maarten Gribnau
40
* \author Maarten Gribnau
43
43
class GHOST_EventKey : public GHOST_Event
48
* @param msec The time this event was generated.
49
* @param type The type of key event.
50
* @param key The key code of the key.
48
* \param msec The time this event was generated.
49
* \param type The type of key event.
50
* \param key The key code of the key.
52
52
GHOST_EventKey(GHOST_TUns64 msec,
53
53
GHOST_TEventType type,
54
GHOST_IWindow* window,
54
GHOST_IWindow *window,
56
56
: GHOST_Event(msec, type, window)
58
58
m_keyEventData.key = key;
59
59
m_keyEventData.ascii = '\0';
60
m_keyEventData.utf8_buf[0]= '\0';
60
m_keyEventData.utf8_buf[0] = '\0';
61
61
m_data = &m_keyEventData;
66
* @param msec The time this event was generated.
67
* @param type The type of key event.
68
* @param key The key code of the key.
69
* @param ascii The ascii code for the key event.
66
* \param msec The time this event was generated.
67
* \param type The type of key event.
68
* \param key The key code of the key.
69
* \param ascii The ascii code for the key event.
71
71
GHOST_EventKey(GHOST_TUns64 msec,
72
72
GHOST_TEventType type,
73
GHOST_IWindow* window,
73
GHOST_IWindow *window,
76
76
const char utf8_buf[6])
79
79
m_keyEventData.key = key;
80
80
m_keyEventData.ascii = ascii;
81
81
if (utf8_buf) memcpy(m_keyEventData.utf8_buf, utf8_buf, sizeof(m_keyEventData.utf8_buf));
82
else m_keyEventData.utf8_buf[0]= '\0';
82
else m_keyEventData.utf8_buf[0] = '\0';
83
83
m_data = &m_keyEventData;