39107b3133
The last good commit was8474716abb. After this commits from main were pushed to blender-v4.0-release. These are being reverted. Commitsa4880576dcfrom tob26f176d1athat happend afterwards were meant for 4.0, and their contents is preserved.
42 lines
962 B
C++
42 lines
962 B
C++
/* SPDX-FileCopyrightText: 2001-2002 NaN Holding BV. All rights reserved.
|
|
*
|
|
* SPDX-License-Identifier: GPL-2.0-or-later */
|
|
|
|
/** \file
|
|
* \ingroup GHOST
|
|
* Declaration of GHOST_EventString class.
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include "GHOST_Event.hh"
|
|
|
|
/**
|
|
* Generic class for events with string data
|
|
*/
|
|
class GHOST_EventString : public GHOST_Event {
|
|
public:
|
|
/**
|
|
* Constructor.
|
|
* \param msec: The time this event was generated.
|
|
* \param type: The type of this event.
|
|
* \param window: The generating window (or nullptr if system event).
|
|
* \param data_ptr: Pointer to the (un-formatted) data associated with the event.
|
|
*/
|
|
GHOST_EventString(uint64_t msec,
|
|
GHOST_TEventType type,
|
|
GHOST_IWindow *window,
|
|
GHOST_TEventDataPtr data_ptr)
|
|
: GHOST_Event(msec, type, window)
|
|
{
|
|
m_data = data_ptr;
|
|
}
|
|
|
|
~GHOST_EventString()
|
|
{
|
|
if (m_data) {
|
|
free((void *)m_data);
|
|
}
|
|
}
|
|
};
|