Blender
V4.3
intern
ghost
intern
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
19
class
GHOST_EventKey
:
public
GHOST_Event
{
20
public
:
28
GHOST_EventKey
(
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;
35
m_data
= &
m_keyEventData
;
36
}
37
46
GHOST_EventKey
(
uint64_t
msec,
47
GHOST_TEventType
type,
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;
62
m_data
= &
m_keyEventData
;
63
}
64
65
protected
:
67
GHOST_TEventKeyData
m_keyEventData
;
68
};
GHOST_Event.hh
GHOST_TEventType
GHOST_TEventType
Definition
GHOST_Types.h:246
GHOST_TKey
GHOST_TKey
Definition
GHOST_Types.h:375
GHOST_EventKey
Definition
GHOST_EventKey.hh:19
GHOST_EventKey::m_keyEventData
GHOST_TEventKeyData m_keyEventData
Definition
GHOST_EventKey.hh:67
GHOST_EventKey::GHOST_EventKey
GHOST_EventKey(uint64_t msec, GHOST_TEventType type, GHOST_IWindow *window, GHOST_TKey key, bool is_repeat)
Definition
GHOST_EventKey.hh:28
GHOST_EventKey::GHOST_EventKey
GHOST_EventKey(uint64_t msec, GHOST_TEventType type, GHOST_IWindow *window, GHOST_TKey key, bool is_repeat, const char utf8_buf[6])
Definition
GHOST_EventKey.hh:46
GHOST_Event
Definition
GHOST_Event.hh:17
GHOST_Event::m_data
GHOST_TEventDataPtr m_data
Definition
GHOST_Event.hh:75
GHOST_IWindow
Definition
GHOST_IWindow.hh:34
uint64_t
unsigned __int64 uint64_t
Definition
stdint.h:90
string.h
GHOST_TEventKeyData
Definition
GHOST_Types.h:678
GHOST_TEventKeyData::is_repeat
char is_repeat
Definition
GHOST_Types.h:691
GHOST_TEventKeyData::key
GHOST_TKey key
Definition
GHOST_Types.h:680
GHOST_TEventKeyData::utf8_buf
char utf8_buf[6]
Definition
GHOST_Types.h:683
Generated on Thu Feb 6 2025 07:36:39 for Blender by
doxygen
1.11.0