00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046 #ifndef KXT_H
00047 #define KXT_H
00048
00049 #include <tqglobal.h>
00050 #if QT_VERSION < 0x030100
00051
00052 #include <kapplication.h>
00053 #include <tqwidget.h>
00054 #include <X11/Intrinsic.h>
00055
00056 class KXtApplication : public KApplication {
00057 Q_OBJECT
00058 void init();
00059
00060 public:
00061 KXtApplication(int& argc, char** argv,
00062 const TQCString& rAppName, bool allowStyles=true, bool GUIenabled=true,
00063 XrmOptionDescRec *options=0, int num_options=0, char** resources=0);
00064 KXtApplication(Display*, int& argc, char** argv, const TQCString& rAppName,
00065 bool allowStyles=true, bool GUIenabled=true);
00066 ~KXtApplication();
00067 };
00068
00069 class KXtWidget : public TQWidget {
00070 Q_OBJECT
00071 Widget xtw;
00072 Widget xtparent;
00073 bool need_reroot;
00074 void init(const char* name, WidgetClass widget_class,
00075 Widget parent, TQWidget* qparent,
00076 ArgList args, Cardinal num_args,
00077 bool managed);
00078 friend void qwidget_realize( Widget widget, XtValueMask* mask,
00079 XSetWindowAttributes* attributes );
00080
00081 public:
00082 KXtWidget(const char* name, Widget parent, bool managed=FALSE);
00083 KXtWidget(const char* name, WidgetClass widget_class,
00084 TQWidget *parent=0, ArgList args=0, Cardinal num_args=0,
00085 bool managed=FALSE);
00086 ~KXtWidget();
00087
00088 Widget xtWidget() const { return xtw; }
00089 bool isActiveWindow() const;
00090 void setActiveWindow();
00091
00092 protected:
00093 void moveEvent( TQMoveEvent* );
00094 void resizeEvent( TQResizeEvent* );
00095 bool x11Event( XEvent * );
00096 };
00097
00098 #endif
00099 #endif