1 /**************************************************************************\ 2 * 3 * This file is part of the Coin 3D visualization library. 4 * Copyright (C) by Kongsberg Oil & Gas Technologies. 5 * 6 * This library is free software; you can redistribute it and/or 7 * modify it under the terms of the GNU General Public License 8 * ("GPL") version 2 as published by the Free Software Foundation. 9 * See the file LICENSE.GPL at the root directory of this source 10 * distribution for additional information about the GNU GPL. 11 * 12 * For using Coin with software that can not be combined with the GNU 13 * GPL, and for taking advantage of the additional benefits of our 14 * support services, please contact Kongsberg Oil & Gas Technologies 15 * about acquiring a Coin Professional Edition License. 16 * 17 * See http://www.coin3d.org/ for more information. 18 * 19 * Kongsberg Oil & Gas Technologies, Bygdoy Alle 5, 0257 Oslo, NORWAY. 20 * http://www.sim.no/ sales@sim.no coin-support@coin3d.org 21 * 22 \**************************************************************************/ 23 24 /* $Id$ */ 25 26 #ifndef SOXT_THUMBWHEEL_H 27 #define SOXT_THUMBWHEEL_H 28 29 #include <Xm/Xm.h> 30 31 #ifdef __cplusplus 32 extern "C" { 33 #endif /* __cplusplus */ 34 35 /* ********************************************************************** */ 36 37 extern WidgetClass soxtThumbWheelWidgetClass; 38 39 typedef struct _SoXtThumbWheelRec * SoXtThumbWheelWidget; 40 typedef struct _SoXtThumbWheelClassRec * SoXtThumbWheelWidgetClass; 41 42 typedef struct _SoXtThumbWheelCallbackData { 43 int reason; 44 XEvent * event; 45 float current; 46 float previous; 47 int ticks; 48 } SoXtThumbWheelCallbackData; 49 50 /* Callback reasons */ 51 #define SoXtCR_ARM 0x01 52 #define SoXtCR_DISARM 0x02 53 #define SoXtCR_MOVE 0x03 54 55 void SoXtThumbWheelSetValue(Widget w, float value); 56 float SoXtThumbWheelGetValue(Widget w); 57 58 #ifndef XtIsSoXtThumbWheel 59 #define XtIsSoXtThumbWheel(w) XtIsSubclass(w, soxtThumbWheelWidgetClass) 60 #endif /* ! SoXtIsThumbWheel */ 61 62 /* ********************************************************************** */ 63 64 #ifdef __cplusplus 65 } /* extern "C" */ 66 #endif /* __cplusplus */ 67 68 #endif /* ! SOXT_THUMBWHEEL_H */ 69