Panda3D
graphicsWindowProcCallbackData.cxx
Go to the documentation of this file.
1 /**
2  * PANDA 3D SOFTWARE
3  * Copyright (c) Carnegie Mellon University. All rights reserved.
4  *
5  * All use of this software is subject to the terms of the revised BSD
6  * license. You should have received a copy of this license along
7  * with this source code in a file named "LICENSE."
8  *
9  * @file graphicsWindowProcCallbackData.cxx
10  * @author Walt Destler
11  * @date 2010-06
12  */
13 
15 #include "graphicsWindow.h"
16 
17 TypeHandle GraphicsWindowProcCallbackData::_type_handle;
18 
19 /**
20  *
21  */
22 void GraphicsWindowProcCallbackData::
23 output(std::ostream &out) const {
24 #ifdef WIN32
25  out << get_type() << "(" << (void*)_graphicsWindow << ", " << _hwnd << ", "
26  << _msg << ", " << _wparam << ", " << _lparam << ")";
27 #else
28  out << get_type() << "()";
29 #endif
30 }
31 /**
32  * Returns whether the event is a touch event.
33  *
34  */
37  return _graphicsWindow->is_touch_event(this);
38 }
39 
40 /**
41  * Returns the current number of touches on the window.
42  *
43  */
46  return _graphicsWindow->get_num_touches();
47 }
48 
49 /**
50  * Returns the TouchInfo object describing the specified touch.
51  *
52  */
54 get_touch_info(int index){
55  return _graphicsWindow->get_touch_info(index);
56 }
bool is_touch_event()
Returns whether the event is a touch event.
int get_num_touches()
Returns the current number of touches on the window.
virtual int get_num_touches()
Returns the current number of touches on this window.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
Stores information for a single touch event.
Definition: touchInfo.h:22
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
virtual TouchInfo get_touch_info(int index)
Returns the TouchInfo object describing the specified touch.
virtual bool is_touch_event(GraphicsWindowProcCallbackData *callbackData)
Returns whether the specified event msg is a touch message.
TypeHandle is the identifier used to differentiate C++ class types.
Definition: typeHandle.h:81
TouchInfo get_touch_info(int index)
Returns the TouchInfo object describing the specified touch.