45 #include <Inventor/Qt/SoQtBasic.h>
49 typedef void SoQtEventHandler(QWidget *,
void *, QEvent *,
bool *);
50 #endif // __COIN_SOQT__
52 #include <X11/Intrinsic.h>
53 typedef void SoQtEventHandler(QWidget *, XtPointer, XEvent *, Boolean *);
54 #endif // __COIN_SOXT__
57 typedef gint SoQtEventHandler(QWidget *, QEvent *, gpointer);
58 #endif // __COIN_SOGTK__
61 typedef LRESULT SoQtEventHandler(QWidget *, UINT, WPARAM, LPARAM);
62 #endif // __COIN_SOWIN__
66 #include <Inventor/SbLinear.h>
67 #include <Inventor/Qt/SoQtObject.h>
79 virtual void enable(QWidget * w, SoQtEventHandler * handler,
void * closure) = 0;
80 virtual void disable(QWidget * w, SoQtEventHandler * handler,
void * closure) = 0;
82 virtual const SoEvent * translateEvent(QEvent * event) = 0;
84 void setWindowSize(
const SbVec2s size);
85 SbVec2s getWindowSize(
void)
const;
87 static void initClasses(
void);
92 void setEventPosition(SoEvent * event,
int x,
int y)
const;
93 static SbVec2s getLastEventPosition(
void);
95 void addEventHandler(QWidget *, SoQtEventHandler *,
void *);
96 void removeEventHandler(QWidget *, SoQtEventHandler *,
void *);
97 void invokeHandlers(QEvent * event);
100 class SoQtDeviceP * pimpl;
101 friend class SoQtDeviceP;
106 #endif // !SOQT_DEVICE_H