22static const char *getButtonActionString(
const GHOST_TButtonAction action)
46 std::cout <<
"GHOST_EventPrinter::processEvent, time: " <<
int32_t(event->
getTime())
49#define CASE_TYPE(ty) \
60 std::cout <<
"GHOST_kEventUnknown";
66 std::cout <<
"GHOST_kEventCursorMove, (x,y): (" << cursorData->
x <<
"," << cursorData->
y
73 std::cout <<
"GHOST_kEventButtonDown, button: " << buttonData->
button;
79 std::cout <<
"GHOST_kEventCursorButtonUp, button: " << buttonData->
button;
85 std::cout <<
"GHOST_kEventWheel, z: " << wheelData->
z;
93 case GHOST_kEventNDOFMotion: {
94 const GHOST_TEventNDOFMotionData *ndof_motion =
95 static_cast<const GHOST_TEventNDOFMotionData *
>(
data);
96 std::cout <<
"GHOST_kEventNDOFMotion: ";
97 std::cout << std::fixed << std::setprecision(2) <<
99 "tx=" << ndof_motion->tx <<
" ty=" << ndof_motion->tx <<
" tz=" << ndof_motion->tz <<
101 "rx=" << ndof_motion->rx <<
" ry=" << ndof_motion->ry <<
" rz=" << ndof_motion->rz;
102 std::cout << std::fixed << std::setprecision(4) <<
" dt=" << ndof_motion->dt;
106 case GHOST_kEventNDOFButton: {
107 const GHOST_TEventNDOFButtonData *ndof_button =
108 static_cast<const GHOST_TEventNDOFButtonData *
>(
data);
109 std::cout <<
"GHOST_kEventNDOFButton: " << getButtonActionString(ndof_button->action)
110 <<
" button=" << ndof_button->button;
118 std::cout <<
"GHOST_kEventKeyDown, key: " <<
getKeyString(keyData->
key);
142 std::cout <<
"GHOST_kEventDraggingEntered, dragged object type : "
144 std::cout <<
" mouse at x=" << dragnDropData->
x <<
" y=" << dragnDropData->
y;
151 std::cout <<
"GHOST_kEventDraggingUpdated, dragged object type : "
153 std::cout <<
" mouse at x=" << dragnDropData->
x <<
" y=" << dragnDropData->
y;
160 std::cout <<
"GHOST_kEventDraggingExited, dragged object type : " << dragnDropData->
dataType;
167 std::cout <<
"GHOST_kEventDraggingDropDone,";
168 std::cout <<
" mouse at x=" << dragnDropData->
x <<
" y=" << dragnDropData->
y;
171 std::cout <<
" type : GHOST_kDragnDropTypeString,";
172 std::cout <<
"\n String received = " << (
char *)dragnDropData->
data;
178 std::cout <<
" type : GHOST_kDragnDropTypeFilenames,";
179 std::cout <<
"\n Received " << strArray->
count <<
" filename"
180 << (strArray->
count > 1 ?
"s:" :
":");
181 for (i = 0; i < strArray->
count; i++) {
182 std::cout <<
"\n File[" << i <<
"] : " << strArray->
strings[i];
195 std::cout <<
"GHOST_kEventOpenMainFile for path: " <<
static_cast<const char *
>(
data);
198 std::cout <<
"GHOST_kEventOpenMainFile with no path specified!!";
214 std::cout <<
"not found";
217 std::cout << std::endl;
226 const char *tstr =
nullptr;
228#define CASE_KEY(k, v) \
368 if (tstr ==
nullptr) {
#define GHOST_ASSERT(x, info)
@ GHOST_kEventWindowClose
@ GHOST_kEventDraggingDropDone
@ GHOST_kEventDraggingExited
@ GHOST_kEventNativeResolutionChange
@ GHOST_kEventImeComposition
@ GHOST_kEventDraggingUpdated
@ GHOST_kEventOpenMainFile
@ GHOST_kEventDraggingEntered
@ GHOST_kEventWindowActivate
@ GHOST_kEventWindowUpdateDecor
@ GHOST_kEventWindowUpdate
@ GHOST_kEventWindowDeactivate
@ GHOST_kEventImeCompositionStart
@ GHOST_kEventImeCompositionEnd
@ GHOST_kEventWindowDPIHintChanged
@ GHOST_kEventQuitRequest
@ GHOST_kKeyNumpadAsterisk
const void * GHOST_TEventDataPtr
@ GHOST_kDragnDropTypeFilenames
@ GHOST_kDragnDropTypeString
bool processEvent(const GHOST_IEvent *event)
const char * getKeyString(GHOST_TKey key) const
virtual GHOST_TEventType getType() const =0
virtual uint64_t getTime() const =0
GHOST_TDragnDropTypes dataType
GHOST_TDragnDropDataPtr data