Blender
V2.93
intern
ghost
intern
GHOST_EventKey.h
Go to the documentation of this file.
1
/*
2
* This program is free software; you can redistribute it and/or
3
* modify it under the terms of the GNU General Public License
4
* as published by the Free Software Foundation; either version 2
5
* of the License, or (at your option) any later version.
6
*
7
* This program is distributed in the hope that it will be useful,
8
* but WITHOUT ANY WARRANTY; without even the implied warranty of
9
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10
* GNU General Public License for more details.
11
*
12
* You should have received a copy of the GNU General Public License
13
* along with this program; if not, write to the Free Software Foundation,
14
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
15
*
16
* The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
17
* All rights reserved.
18
*/
19
25
#pragma once
26
27
#include <string.h>
28
29
#include "
GHOST_Event.h
"
30
34
class
GHOST_EventKey
:
public
GHOST_Event
{
35
public
:
42
GHOST_EventKey
(
GHOST_TUns64
msec,
43
GHOST_TEventType
type
,
44
GHOST_IWindow
*window,
45
GHOST_TKey
key,
46
bool
is_repeat)
47
:
GHOST_Event
(msec,
type
, window)
48
{
49
m_keyEventData
.
key
= key;
50
m_keyEventData
.
ascii
=
'\0'
;
51
m_keyEventData
.
utf8_buf
[0] =
'\0'
;
52
m_keyEventData
.
is_repeat
= is_repeat;
53
m_data
= &
m_keyEventData
;
54
}
55
63
GHOST_EventKey
(
GHOST_TUns64
msec,
64
GHOST_TEventType
type
,
65
GHOST_IWindow
*window,
66
GHOST_TKey
key,
67
char
ascii,
68
const
char
utf8_buf[6],
69
bool
is_repeat)
70
:
GHOST_Event
(msec,
type
, window)
71
{
72
m_keyEventData
.
key
= key;
73
m_keyEventData
.
ascii
= ascii;
74
if
(utf8_buf)
75
memcpy(
m_keyEventData
.
utf8_buf
, utf8_buf,
sizeof
(
m_keyEventData
.
utf8_buf
));
76
else
77
m_keyEventData
.
utf8_buf
[0] =
'\0'
;
78
m_keyEventData
.
is_repeat
= is_repeat;
79
m_data
= &
m_keyEventData
;
80
}
81
82
protected
:
84
GHOST_TEventKeyData
m_keyEventData
;
85
};
GHOST_Event.h
GHOST_TUns64
unsigned long long GHOST_TUns64
Definition:
GHOST_Types.h:86
GHOST_TEventType
GHOST_TEventType
Definition:
GHOST_Types.h:177
GHOST_TKey
GHOST_TKey
Definition:
GHOST_Types.h:267
type
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum type
Definition:
GPU_legacy_stubs.h:167
GHOST_EventKey
Definition:
GHOST_EventKey.h:34
GHOST_EventKey::m_keyEventData
GHOST_TEventKeyData m_keyEventData
Definition:
GHOST_EventKey.h:84
GHOST_EventKey::GHOST_EventKey
GHOST_EventKey(GHOST_TUns64 msec, GHOST_TEventType type, GHOST_IWindow *window, GHOST_TKey key, bool is_repeat)
Definition:
GHOST_EventKey.h:42
GHOST_EventKey::GHOST_EventKey
GHOST_EventKey(GHOST_TUns64 msec, GHOST_TEventType type, GHOST_IWindow *window, GHOST_TKey key, char ascii, const char utf8_buf[6], bool is_repeat)
Definition:
GHOST_EventKey.h:63
GHOST_Event
Definition:
GHOST_Event.h:32
GHOST_Event::m_data
GHOST_TEventDataPtr m_data
Definition:
GHOST_Event.h:90
GHOST_IWindow
Definition:
GHOST_IWindow.h:47
GHOST_TEventKeyData
Definition:
GHOST_Types.h:546
GHOST_TEventKeyData::is_repeat
char is_repeat
Definition:
GHOST_Types.h:565
GHOST_TEventKeyData::key
GHOST_TKey key
Definition:
GHOST_Types.h:548
GHOST_TEventKeyData::utf8_buf
char utf8_buf[6]
Definition:
GHOST_Types.h:562
GHOST_TEventKeyData::ascii
char ascii
Definition:
GHOST_Types.h:560
Generated on Tue Jan 31 2023 14:37:24 for Blender by
doxygen
1.9.1