diff options
author | Timothy Pearson <[email protected]> | 2012-03-02 02:13:02 -0600 |
---|---|---|
committer | Timothy Pearson <[email protected]> | 2012-03-02 02:13:02 -0600 |
commit | 8bd291c0e8a9d8b6eec6f5217e4d5c2f1fd06b96 (patch) | |
tree | bf71d4bfa94d0561e80456400ae5fe2bb501fbd8 /nsplugins | |
parent | e8a1cdc01d38125bea12d5494db977ae6429919a (diff) | |
download | tdebase-8bd291c0e8a9d8b6eec6f5217e4d5c2f1fd06b96.tar.gz tdebase-8bd291c0e8a9d8b6eec6f5217e4d5c2f1fd06b96.zip |
Rename additional global functions and variables for tqt3
Diffstat (limited to 'nsplugins')
-rw-r--r-- | nsplugins/viewer/kxt.cpp | 34 | ||||
-rw-r--r-- | nsplugins/viewer/nsplugin.cpp | 30 |
2 files changed, 32 insertions, 32 deletions
diff --git a/nsplugins/viewer/kxt.cpp b/nsplugins/viewer/kxt.cpp index 05b2673be..b8992b171 100644 --- a/nsplugins/viewer/kxt.cpp +++ b/nsplugins/viewer/kxt.cpp @@ -74,7 +74,7 @@ const int XKeyRelease = KeyRelease; #undef KeyPress #undef KeyRelease -extern Atom qt_wm_state; +extern Atom tqt_wm_state; //#define HAVE_MOTIF #ifdef HAVE_MOTIF @@ -145,13 +145,13 @@ void reparentChildrenOf(TQWidget* parent) for ( TQObjectListIt it( *parent->children() ); it.current(); ++it ) { if ( it.current()->isWidgetType() ) { TQWidget* widget = (TQWidget*)it.current(); - XReparentWindow( qt_xdisplay(), + XReparentWindow( tqt_xdisplay(), widget->winId(), parent->winId(), widget->x(), widget->y() ); if ( widget->isVisible() ) - XMapWindow( qt_xdisplay(), widget->winId() ); + XMapWindow( tqt_xdisplay(), widget->winId() ); } } @@ -170,7 +170,7 @@ void qwidget_realize( reparentChildrenOf(qxtw); } qxtw->show(); - XMapWindow( qt_xdisplay(), qxtw->winId() ); + XMapWindow( tqt_xdisplay(), qxtw->winId() ); } static @@ -232,7 +232,7 @@ void installXtEventFilters() // Get Xt out of our face - install filter on every event type for (int et=2; et < LASTEvent; et++) { qt_np_cascade_event_handler[et] = XtSetEventDispatcher( - qt_xdisplay(), et, qt_event_handler_wrapper ); + tqt_xdisplay(), et, qt_event_handler_wrapper ); } filters_installed = TRUE; } @@ -244,7 +244,7 @@ void removeXtEventFilters() // We aren't needed any more... slink back into the shadows. for (int et=2; et < LASTEvent; et++) { XtSetEventDispatcher( - qt_xdisplay(), et, qt_np_cascade_event_handler[et] ); + tqt_xdisplay(), et, qt_np_cascade_event_handler[et] ); } filters_installed = FALSE; } @@ -321,7 +321,7 @@ KXtApplication::KXtApplication(int& argc, char** argv, XtToolkitInitialize(); appcon = XtCreateApplicationContext(); if (resources) XtAppSetFallbackResources(appcon, (char**)resources); - XtDisplayInitialize(appcon, qt_xdisplay(), name(), rAppName, options, + XtDisplayInitialize(appcon, tqt_xdisplay(), name(), rAppName, options, num_options, &argc, argv); init(); } @@ -403,8 +403,8 @@ void KXtWidget::init(const char* name, WidgetClass widget_class, Q_ASSERT(!managed); String n, c; - XtGetApplicationNameAndClass(qt_xdisplay(), &n, &c); - xtw = XtAppCreateShell(n, c, widget_class, qt_xdisplay(), + XtGetApplicationNameAndClass(tqt_xdisplay(), &n, &c); + xtw = XtAppCreateShell(n, c, widget_class, tqt_xdisplay(), args, num_args); if ( widget_class == qWidgetClass ) ((QWidgetRec*)xtw)->qwidget.qxtwidget = this; @@ -414,8 +414,8 @@ void KXtWidget::init(const char* name, WidgetClass widget_class, XtResizeWidget( xtw, 100, 100, 0 ); XtSetMappedWhenManaged(xtw, False); XtRealizeWidget(xtw); - XSync(qt_xdisplay(), False); // I want all windows to be created now - XReparentWindow(qt_xdisplay(), XtWindow(xtw), qparent->winId(), x(), y()); + XSync(tqt_xdisplay(), False); // I want all windows to be created now + XReparentWindow(tqt_xdisplay(), XtWindow(xtw), qparent->winId(), x(), y()); XtSetMappedWhenManaged(xtw, True); need_reroot=TRUE; } @@ -505,7 +505,7 @@ KXtWidget::~KXtWidget() if ( need_reroot ) { hide(); - XReparentWindow(qt_xdisplay(), winId(), tqApp->desktop()->winId(), + XReparentWindow(tqt_xdisplay(), winId(), tqApp->desktop()->winId(), x(), y()); } @@ -546,7 +546,7 @@ void KXtWidget::setActiveWindow() e.window = winId(); e.mode = NotifyNormal; e.detail = NotifyInferior; - XSendEvent( qt_xdisplay(), e.window, TRUE, NoEventMask, (XEvent*)&e ); + XSendEvent( tqt_xdisplay(), e.window, TRUE, NoEventMask, (XEvent*)&e ); } } else { TQWidget::setActiveWindow(); @@ -560,7 +560,7 @@ bool KXtWidget::isActiveWindow() const { Window win; int revert; - XGetInputFocus( qt_xdisplay(), &win, &revert ); + XGetInputFocus( tqt_xdisplay(), &win, &revert ); if ( win == None) return FALSE; @@ -574,7 +574,7 @@ bool KXtWidget::isActiveWindow() const Window cursor = winId(); Window *ch; unsigned int nch; - while ( XQueryTree(qt_xdisplay(), cursor, &root, &parent, &ch, &nch) ) { + while ( XQueryTree(tqt_xdisplay(), cursor, &root, &parent, &ch, &nch) ) { if (ch) XFree( (char*)ch); if ( parent == win ) return TRUE; if ( parent == root ) return FALSE; @@ -599,7 +599,7 @@ void KXtWidget::moveEvent( TQMoveEvent* ) c.width = width(); c.height = height(); c.border_width = 0; - XSendEvent( qt_xdisplay(), c.event, TRUE, NoEventMask, (XEvent*)&c ); + XSendEvent( tqt_xdisplay(), c.event, TRUE, NoEventMask, (XEvent*)&c ); XtMoveWidget( xtw, x(), y() ); } @@ -620,7 +620,7 @@ void KXtWidget::resizeEvent( TQResizeEvent* ) c.width = width(); c.height = height(); c.border_width = 0; - XSendEvent( qt_xdisplay(), c.event, TRUE, NoEventMask, (XEvent*)&c ); + XSendEvent( tqt_xdisplay(), c.event, TRUE, NoEventMask, (XEvent*)&c ); XtResizeWidget( xtw, width(), height(), preferred.border_width ); } diff --git a/nsplugins/viewer/nsplugin.cpp b/nsplugins/viewer/nsplugin.cpp index 7092d1024..f8e3a37f8 100644 --- a/nsplugins/viewer/nsplugin.cpp +++ b/nsplugins/viewer/nsplugin.cpp @@ -164,10 +164,10 @@ NPError g_NPN_GetValue(NPP /*instance*/, NPNVariable variable, void *value) switch (variable) { case NPNVxDisplay: - *(void**)value = qt_xdisplay(); + *(void**)value = tqt_xdisplay(); return NPERR_NO_ERROR; case NPNVxtAppContext: - *(void**)value = XtDisplayToApplicationContext(qt_xdisplay()); + *(void**)value = XtDisplayToApplicationContext(tqt_xdisplay()); return NPERR_NO_ERROR; case NPNVjavascriptEnabledBool: *(bool*)value = true; @@ -638,10 +638,10 @@ NSPluginInstance::NSPluginInstance(NPP privateData, NPPluginFuncs *pluginFuncs, XtSetArg(args[nargs], XtNborderWidth, 0); nargs++; String n, c; - XtGetApplicationNameAndClass(qt_xdisplay(), &n, &c); + XtGetApplicationNameAndClass(tqt_xdisplay(), &n, &c); _toplevel = XtAppCreateShell("drawingArea", c, applicationShellWidgetClass, - qt_xdisplay(), args, nargs); + tqt_xdisplay(), args, nargs); // What exactly does widget mapping mean? Without this call the widget isn't // embedded correctly. With it the viewer doesn't show anything in standalone mode. @@ -655,13 +655,13 @@ NSPluginInstance::NSPluginInstance(NPP privateData, NPPluginFuncs *pluginFuncs, XtSetArg(args[nargs], XtNdepth, TQPaintDevice::x11AppDepth()); nargs++; XtSetArg(args[nargs], XtNcolormap, TQPaintDevice::x11AppColormap()); nargs++; XtSetValues(_form, args, nargs); - XSync(qt_xdisplay(), false); + XSync(tqt_xdisplay(), false); // From mozilla - not sure if it's needed yet, nor what to use for embedder #if 0 /* this little trick seems to finish initializing the widget */ #if XlibSpecificationRelease >= 6 - XtRegisterDrawable(qt_xdisplay(), embedderid, _toplevel); + XtRegisterDrawable(tqt_xdisplay(), embedderid, _toplevel); #else _XtRegisterWindow(embedderid, _toplevel); #endif @@ -674,7 +674,7 @@ NSPluginInstance::NSPluginInstance(NPP privateData, NPPluginFuncs *pluginFuncs, False, forwarder, (XtPointer)this ); XtAddEventHandler(_form, (KeyPressMask|KeyReleaseMask), False, forwarder, (XtPointer)this ); - XSync(qt_xdisplay(), false); + XSync(tqt_xdisplay(), false); } } @@ -942,10 +942,10 @@ int NSPluginInstance::setWindow(TQ_INT8 remove) if( _xembed_window ) { _win.window = (void*) _xembed_window; _win_info.type = NP_SETWINDOW; - _win_info.display = qt_xdisplay(); - _win_info.visual = DefaultVisualOfScreen(DefaultScreenOfDisplay(qt_xdisplay())); - _win_info.colormap = DefaultColormapOfScreen(DefaultScreenOfDisplay(qt_xdisplay())); - _win_info.depth = DefaultDepthOfScreen(DefaultScreenOfDisplay(qt_xdisplay())); + _win_info.display = tqt_xdisplay(); + _win_info.visual = DefaultVisualOfScreen(DefaultScreenOfDisplay(tqt_xdisplay())); + _win_info.colormap = DefaultColormapOfScreen(DefaultScreenOfDisplay(tqt_xdisplay())); + _win_info.depth = DefaultDepthOfScreen(DefaultScreenOfDisplay(tqt_xdisplay())); } else { _win.window = (void*) XtWindow(_form); @@ -971,9 +971,9 @@ static void resizeWidgets(Window w, int width, int height) { Window rroot, parent, *children; unsigned int nchildren = 0; - if (XQueryTree(qt_xdisplay(), w, &rroot, &parent, &children, &nchildren)) { + if (XQueryTree(tqt_xdisplay(), w, &rroot, &parent, &children, &nchildren)) { for (unsigned int i = 0; i < nchildren; i++) { - XResizeWindow(qt_xdisplay(), children[i], width, height); + XResizeWindow(tqt_xdisplay(), children[i], width, height); } XFree(children); } @@ -991,8 +991,8 @@ void NSPluginInstance::resizePlugin(TQ_INT32 w, TQ_INT32 h) _height = h; if( _form != 0 ) { - XResizeWindow(qt_xdisplay(), XtWindow(_form), w, h); - XResizeWindow(qt_xdisplay(), XtWindow(_toplevel), w, h); + XResizeWindow(tqt_xdisplay(), XtWindow(_form), w, h); + XResizeWindow(tqt_xdisplay(), XtWindow(_toplevel), w, h); Arg args[7]; Cardinal nargs = 0; |