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
14 #include "graphicsWindowProcCallbackData.h"
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 */
35 bool GraphicsWindowProcCallbackData::
36 is_touch_event(){
37 return _graphicsWindow->is_touch_event(this);
38 }
39
40 /**
41 * Returns the current number of touches on the window.
42 *
43 */
44 int GraphicsWindowProcCallbackData::
45 get_num_touches(){
46 return _graphicsWindow->get_num_touches();
47 }
48
49 /**
50 * Returns the TouchInfo object describing the specified touch.
51 *
52 */
53 TouchInfo GraphicsWindowProcCallbackData::
54 get_touch_info(int index){
55 return _graphicsWindow->get_touch_info(index);
56 }
GraphicsWindowProcCallbackData::is_touch_event
bool is_touch_event()
Returns whether the event is a touch event.
Definition: graphicsWindowProcCallbackData.cxx:36
GraphicsWindowProcCallbackData::get_num_touches
int get_num_touches()
Returns the current number of touches on the window.
Definition: graphicsWindowProcCallbackData.cxx:45
GraphicsWindowProcCallbackData::get_touch_info
TouchInfo get_touch_info(int index)
Returns the TouchInfo object describing the specified touch.
Definition: graphicsWindowProcCallbackData.cxx:54
GraphicsWindow::is_touch_event
virtual bool is_touch_event(GraphicsWindowProcCallbackData *callbackData)
Returns whether the specified event msg is a touch message.
Definition: graphicsWindow.cxx:720
GraphicsWindow::get_num_touches
virtual int get_num_touches()
Returns the current number of touches on this window.
Definition: graphicsWindow.cxx:729
GraphicsWindow::get_touch_info
virtual TouchInfo get_touch_info(int index)
Returns the TouchInfo object describing the specified touch.
Definition: graphicsWindow.cxx:738
TouchInfo
Stores information for a single touch event.
Definition: touchInfo.h:22
TypeHandle
TypeHandle is the identifier used to differentiate C++ class types.
Definition: typeHandle.h:81
graphicsWindowProcCallbackData.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
graphicsWindow.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.