Blender V4.3
GHOST_EventKey.hh
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2001-2002 NaN Holding BV. All rights reserved.
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
10#pragma once
11
12#include <string.h>
13
14#include "GHOST_Event.hh"
15
20 public:
29 uint64_t msec, GHOST_TEventType type, GHOST_IWindow *window, GHOST_TKey key, bool is_repeat)
30 : GHOST_Event(msec, type, window)
31 {
32 m_keyEventData.key = key;
33 m_keyEventData.utf8_buf[0] = '\0';
34 m_keyEventData.is_repeat = is_repeat;
36 }
37
48 GHOST_IWindow *window,
49 GHOST_TKey key,
50 bool is_repeat,
51 const char utf8_buf[6])
52 : GHOST_Event(msec, type, window)
53 {
54 m_keyEventData.key = key;
55 if (utf8_buf) {
56 memcpy(m_keyEventData.utf8_buf, utf8_buf, sizeof(m_keyEventData.utf8_buf));
57 }
58 else {
59 m_keyEventData.utf8_buf[0] = '\0';
60 }
61 m_keyEventData.is_repeat = is_repeat;
63 }
64
65 protected:
68};
GHOST_TEventType
GHOST_TKey
GHOST_TEventKeyData m_keyEventData
GHOST_EventKey(uint64_t msec, GHOST_TEventType type, GHOST_IWindow *window, GHOST_TKey key, bool is_repeat)
GHOST_EventKey(uint64_t msec, GHOST_TEventType type, GHOST_IWindow *window, GHOST_TKey key, bool is_repeat, const char utf8_buf[6])
GHOST_TEventDataPtr m_data
unsigned __int64 uint64_t
Definition stdint.h:90