Panda3D
 All Classes Functions Variables Enumerations
graphicsWindowProcCallbackData.cxx
00001 // Filename: graphicsWindowProcCallbackData.cxx
00002 // Created by:  Walt Destler (June 2010)
00003 //
00004 ////////////////////////////////////////////////////////////////////
00005 //
00006 // PANDA 3D SOFTWARE
00007 // Copyright (c) Carnegie Mellon University.  All rights reserved.
00008 //
00009 // All use of this software is subject to the terms of the revised BSD
00010 // license.  You should have received a copy of this license along
00011 // with this source code in a file named "LICENSE."
00012 //
00013 ////////////////////////////////////////////////////////////////////
00014 
00015 #include "graphicsWindowProcCallbackData.h"
00016 
00017 TypeHandle GraphicsWindowProcCallbackData::_type_handle;
00018 
00019 ////////////////////////////////////////////////////////////////////
00020 //     Function: GraphicsWindowProcCallbackData::output
00021 //       Access: Published, Virtual
00022 //  Description:
00023 ////////////////////////////////////////////////////////////////////
00024 void GraphicsWindowProcCallbackData::
00025 output(ostream &out) const {
00026 #ifdef WIN32
00027   out << get_type() << "(" << (void*)_graphicsWindow << ", " << _hwnd << ", "
00028       << _msg << ", " << _wparam << ", " << _lparam << ")";
00029 #else
00030   out << get_type() << "()";
00031 #endif
00032 }
00033 ////////////////////////////////////////////////////////////////////
00034 //     Function: GraphicsWindowProcCallbackData::is_touch_event
00035 //       Access: Public, Virtual
00036 //  Description: Returns whether the event is a touch event.
00037 //               
00038 ////////////////////////////////////////////////////////////////////
00039 bool GraphicsWindowProcCallbackData::
00040 is_touch_event(){
00041   return _graphicsWindow->is_touch_event(this);
00042 }
00043 
00044 ////////////////////////////////////////////////////////////////////
00045 //     Function: GraphicsWindowProcCallbackData::get_num_touches
00046 //       Access: Public, Virtual
00047 //  Description: Returns the current number of touches on the window.
00048 //               
00049 ////////////////////////////////////////////////////////////////////
00050 int GraphicsWindowProcCallbackData::
00051 get_num_touches(){
00052   return _graphicsWindow->get_num_touches();
00053 }
00054 
00055 ////////////////////////////////////////////////////////////////////
00056 //     Function: GraphicsWindowProcCallbackData::get_touch_info
00057 //       Access: Public, Virtual
00058 //  Description: Returns the TouchInfo object describing the specified touch.
00059 //               
00060 ////////////////////////////////////////////////////////////////////
00061 TouchInfo GraphicsWindowProcCallbackData::
00062 get_touch_info(int index){
00063   return _graphicsWindow->get_touch_info(index);
00064 }
 All Classes Functions Variables Enumerations