-// SALOME VTKViewer : build VTK viewer into Salome desktop
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
-// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+// SALOME VTKViewer : build VTK viewer into Salome desktop
// File : SVTK_SpaceMouse.cxx
// Author : Alexander SLADKOV
-// Module : SALOME
-// $Header$
#include <string.h>
#include <math.h>
PropReturn = NULL;
XGetWindowProperty( display, root, XCommandEvent, 0,1, 0,
- AnyPropertyType, &type, &format, &NItems,
- &BytesReturn, &PropReturn );
+ AnyPropertyType, &type, &format, &NItems,
+ &BytesReturn, &PropReturn );
win = InputFocus;
if ( PropReturn != NULL ) {
Custom event handler
*/
int SVTK_SpaceMouse::translateEvent( Display* display, XEvent* xEvent, MoveEvent* spaceMouseEvent,
- double scale, double rScale )
+ double scale, double rScale )
{
if ( !spaceMouseOn )
return 0;
if ( xEvent->xclient.message_type == XMotionEvent ) {
spaceMouseEvent->type = SpaceMouseMove;
spaceMouseEvent->data[ x ] =
- xEvent->xclient.data.s[2] * scale;
+ xEvent->xclient.data.s[2] * scale;
spaceMouseEvent->data[ y ] =
- xEvent->xclient.data.s[3] * scale;
+ xEvent->xclient.data.s[3] * scale;
spaceMouseEvent->data[ z ] =
- xEvent->xclient.data.s[4] * scale;
+ xEvent->xclient.data.s[4] * scale;
spaceMouseEvent->data[ a ] =
- xEvent->xclient.data.s[5] * rScale;
+ xEvent->xclient.data.s[5] * rScale;
spaceMouseEvent->data[ b ] =
- xEvent->xclient.data.s[6] * rScale;
+ xEvent->xclient.data.s[6] * rScale;
spaceMouseEvent->data[ c ] =
- xEvent->xclient.data.s[7] * rScale;
+ xEvent->xclient.data.s[7] * rScale;
spaceMouseEvent->period = xEvent->xclient.data.s[8];
return 1;
}