| 1 | /* |
| 2 | * |
| 3 | * Copyright (C) 2000 Silicon Graphics, Inc. All Rights Reserved. |
| 4 | * |
| 5 | * This library is free software; you can redistribute it and/or |
| 6 | * modify it under the terms of the GNU Lesser General Public |
| 7 | * License as published by the Free Software Foundation; either |
| 8 | * version 2.1 of the License, or (at your option) any later version. |
| 9 | * |
| 10 | * This library is distributed in the hope that it will be useful, |
| 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 13 | * Lesser General Public License for more details. |
| 14 | * |
| 15 | * Further, this software is distributed without any warranty that it is |
| 16 | * free of the rightful claim of any third person regarding infringement |
| 17 | * or the like. Any license provided herein, whether implied or |
| 18 | * otherwise, applies only to this software file. Patent licenses, if |
| 19 | * any, provided herein do not apply to combinations of this program with |
| 20 | * other software, or any other product whatsoever. |
| 21 | * |
| 22 | * You should have received a copy of the GNU Lesser General Public |
| 23 | * License along with this library; if not, write to the Free Software |
| 24 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
| 25 | * |
| 26 | * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, |
| 27 | * Mountain View, CA 94043, or: |
| 28 | * |
| 29 | * http://www.sgi.com |
| 30 | * |
| 31 | * For further information regarding this notice, see: |
| 32 | * |
| 33 | * http://oss.sgi.com/projects/GenInfo/NoticeExplan/ |
| 34 | * |
| 35 | */ |
| 36 | |
| 37 | // -*- C++ -*- |
| 38 | |
| 39 | /* |
| 40 | * Copyright (C) 1990,91,92 Silicon Graphics, Inc. |
| 41 | * |
| 42 | _______________________________________________________________________ |
| 43 | ______________ S I L I C O N G R A P H I C S I N C . ____________ |
| 44 | | |
| 45 | | $Revision: 1.1.1.1 $ |
| 46 | | |
| 47 | | Classes: |
| 48 | | SoXtInputFocus |
| 49 | | |
| 50 | | Author(s): David Mott, Gavin Bell |
| 51 | | |
| 52 | ______________ S I L I C O N G R A P H I C S I N C . ____________ |
| 53 | _______________________________________________________________________ |
| 54 | */ |
| 55 | |
| 56 | #ifndef _SO_XT_FOCUS_ |
| 57 | #define _SO_XT_FOCUS_cxx . . $ `libSoXt/include/Inventor/Xt/devices/SoXtInputFocus.h:57:10`! |
| 58 | |
| 59 | #include <X11/X.h> |
| 60 | #include <Inventor/Xt/devices/SoXtDevice.h>cxx . . $ `<file>/libSoXt/include/Inventor/Xt/devices/SoXtDevice.h`/ |
| 61 | |
| 62 | #define SO_XT_ALL_FOCUS_EVENTScxx . . $ `libSoXt/include/Inventor/Xt/devices/SoXtInputFocus.h:62:9`! \ |
| 63 | (EnterWindowMaskcxx . . $ `<external>/1208737181511191802/X.h:155:9`! | LeaveWindowMaskcxx . . $ `<external>/1208737181511191802/X.h:156:9`!) |
| 64 | |
| 65 | // NOTE: this does not generate any SoEvent. |
| 66 | // It simply makes sure the passed X events occur in the widget. |
| 67 | |
| 68 | // C-api: prefix=SoXtInFocus |
| 69 | class SoXtInputFocuscxx . . $ SoXtInputFocus# : public SoXtDevicecxx . . $ SoXtDevice# { |
| 70 | public: |
| 71 | // |
| 72 | // valid event mask values: |
| 73 | // EnterWindowMask - input focus entered this window |
| 74 | // LeaveWindowMask - input focus left this window |
| 75 | // Bitwise OR these to specify whichEvents this device should queue. |
| 76 | // |
| 77 | SoXtInputFocuscxx . . $ SoXtInputFocus#SoXtInputFocus(2c44cd906ae4e829).(EventMaskcxx . . $ EventMask# mask = SO_XT_ALL_FOCUS_EVENTScxx . . $ `libSoXt/include/Inventor/Xt/devices/SoXtInputFocus.h:62:9`!); |
| 78 | ~cxx . . $ SoXtInputFocus#`~SoXtInputFocus`(49f6e7a06ebc5aa8).SoXtInputFocuscxx . . $ SoXtInputFocus#() {} |
| 79 | |
| 80 | // these functions will enable/disable this device for the passed widget. |
| 81 | // the callback function f will be invoked when events occur in w. |
| 82 | // data is the clientData which will be passed. |
| 83 | virtual void enablecxx . . $ SoXtInputFocus#enable(9c674ea9982a9afc).(Widgetcxx . . $ Widget# w, XtEventHandlercxx . . $ XtEventHandler# f, |
| 84 | XtPointercxx . . $ XtPointer# data, Windowcxx . . $ Window# win = 0); |
| 85 | virtual void disablecxx . . $ SoXtInputFocus#disable(b8a5051fa1f1a67d).(Widgetcxx . . $ Widget# w, XtEventHandlercxx . . $ XtEventHandler# f, XtPointercxx . . $ XtPointer# data); |
| 86 | |
| 87 | // |
| 88 | // this converts an X event into an SoEvent, |
| 89 | // returning NULL if the event is not from this device. |
| 90 | // |
| 91 | // C-api: name=xlateEv |
| 92 | virtual const SoEventcxx . . $ SoEvent# * translateEventcxx . . $ SoXtInputFocus#translateEvent(feae03549c58797f).(XAnyEventcxx . . $ XAnyEvent# *xevent); |
| 93 | |
| 94 | private: |
| 95 | EventMaskcxx . . $ EventMask# eventMaskcxx . . $ SoXtInputFocus#eventMask.; |
| 96 | }; |
| 97 | |
| 98 | #endif /* _SO_XT_FOCUS_ */ |