Blender  V3.3
GHOST_EventKey.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-or-later
2  * Copyright 2001-2002 NaN Holding BV. All rights reserved. */
3 
9 #pragma once
10 
11 #include <string.h>
12 
13 #include "GHOST_Event.h"
14 
18 class GHOST_EventKey : public GHOST_Event {
19  public:
28  uint64_t msec, GHOST_TEventType type, GHOST_IWindow *window, GHOST_TKey key, bool is_repeat)
29  : GHOST_Event(msec, type, window)
30  {
31  m_keyEventData.key = key;
32  m_keyEventData.utf8_buf[0] = '\0';
33  m_keyEventData.is_repeat = is_repeat;
35  }
36 
47  GHOST_IWindow *window,
48  GHOST_TKey key,
49  bool is_repeat,
50  const char utf8_buf[6])
51  : GHOST_Event(msec, type, window)
52  {
53  m_keyEventData.key = key;
54  if (utf8_buf) {
55  memcpy(m_keyEventData.utf8_buf, utf8_buf, sizeof(m_keyEventData.utf8_buf));
56  }
57  else {
58  m_keyEventData.utf8_buf[0] = '\0';
59  }
60  m_keyEventData.is_repeat = is_repeat;
62  }
63 
64  protected:
67 };
GHOST_TEventType
Definition: GHOST_Types.h:169
GHOST_TKey
Definition: GHOST_Types.h:259
_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
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
Definition: GHOST_Event.h:74
unsigned __int64 uint64_t
Definition: stdint.h:90