Rename additional global functions and variables for tqt3

pull/1/head
Timothy Pearson 13 years ago
parent c509088a31
commit b1a161ba3a

@ -1662,7 +1662,7 @@ int main (int argc, char **argv)
MyApp a; MyApp a;
qtdisplay = qt_xdisplay(); qtdisplay = tqt_xdisplay();
viewfaxmain(); viewfaxmain();

@ -2088,7 +2088,7 @@ DisplayFontParam *GlobalParams::getDisplayFont(GString *fontName) {
FC_SLANT, FcTypeInteger, slant, FC_WEIGHT, FcTypeInteger, weight, FC_SLANT, FcTypeInteger, slant, FC_WEIGHT, FcTypeInteger, weight,
FC_WIDTH, FcTypeInteger, width, FC_LANG, FcTypeString, "xx", (char*)0); FC_WIDTH, FcTypeInteger, width, FC_LANG, FcTypeString, "xx", (char*)0);
if (!p) goto fin; if (!p) goto fin;
m = XftFontMatch(qt_xdisplay(),qt_xscreen(),p,&res); m = XftFontMatch(tqt_xdisplay(),tqt_xscreen(),p,&res);
if (!m) goto fin; if (!m) goto fin;
res = FcPatternGetString (m, FC_FILE, 0, &s); res = FcPatternGetString (m, FC_FILE, 0, &s);
if (res != FcResultMatch || !s) goto fin; if (res != FcResultMatch || !s) goto fin;

@ -594,7 +594,7 @@ void PMDockWidget::applyToWidget( TQWidget* s, const TQPoint& p )
#ifndef NO_KDE2 #ifndef NO_KDE2
#ifdef TQ_WS_X11 #ifdef TQ_WS_X11
if (d->transient && d->_parent) if (d->transient && d->_parent)
XSetTransientForHint( qt_xdisplay(), winId(), d->_parent->winId() ); XSetTransientForHint( tqt_xdisplay(), winId(), d->_parent->winId() );
KWin::setType( winId(), d->windowType ); KWin::setType( winId(), d->windowType );
#endif #endif

@ -1631,7 +1631,7 @@ bool PMRenderManager::hasOpenGL( )
{ {
if( !s_hasOpenGLChecked ) if( !s_hasOpenGLChecked )
{ {
s_hasOpenGL = ( glXQueryExtension( qt_xdisplay( ), 0, 0 ) != 0 ); s_hasOpenGL = ( glXQueryExtension( tqt_xdisplay( ), 0, 0 ) != 0 );
s_hasOpenGLChecked = true; s_hasOpenGLChecked = true;
} }

@ -83,7 +83,7 @@ KSnapshot::KSnapshot(TQWidget *parent, const char *name, bool grabCurrent)
grabber->grabMouse( waitCursor ); grabber->grabMouse( waitCursor );
if ( !grabCurrent ) if ( !grabCurrent )
snapshot = TQPixmap::grabWindow( qt_xrootwin() ); snapshot = TQPixmap::grabWindow( tqt_xrootwin() );
else { else {
mainWidget->setMode( WindowUnderCursor ); mainWidget->setMode( WindowUnderCursor );
mainWidget->setIncludeDecorations( true ); mainWidget->setIncludeDecorations( true );
@ -454,7 +454,7 @@ void KSnapshot::performGrab()
snapshot = WindowGrabber::grabCurrent( mainWidget->includeDecorations() ); snapshot = WindowGrabber::grabCurrent( mainWidget->includeDecorations() );
} }
else { else {
snapshot = TQPixmap::grabWindow( qt_xrootwin() ); snapshot = TQPixmap::grabWindow( tqt_xrootwin() );
} }
updatePreview(); updatePreview();
TQApplication::restoreOverrideCursor(); TQApplication::restoreOverrideCursor();

@ -86,7 +86,7 @@ RegionGrabber::~RegionGrabber()
void RegionGrabber::initGrabber() void RegionGrabber::initGrabber()
{ {
pixmap = TQPixmap::grabWindow( qt_xrootwin() ); pixmap = TQPixmap::grabWindow( tqt_xrootwin() );
setPaletteBackgroundPixmap( pixmap ); setPaletteBackgroundPixmap( pixmap );
TQDesktopWidget desktopWidget; TQDesktopWidget desktopWidget;
@ -94,7 +94,7 @@ void RegionGrabber::initGrabber()
if ( desktopWidget.isVirtualDesktop() ) if ( desktopWidget.isVirtualDesktop() )
desktopSize = desktopWidget.geometry(); desktopSize = desktopWidget.geometry();
else else
desktopSize = desktopWidget.screenGeometry( qt_xrootwin() ); desktopSize = desktopWidget.screenGeometry( tqt_xrootwin() );
setGeometry( desktopSize ); setGeometry( desktopSize );
showFullScreen(); showFullScreen();

@ -47,7 +47,7 @@ void getWindowsRecursive( std::vector<TQRect>& windows, Window w,
int rx = 0, int ry = 0, int depth = 0 ) int rx = 0, int ry = 0, int depth = 0 )
{ {
XWindowAttributes atts; XWindowAttributes atts;
XGetWindowAttributes( qt_xdisplay(), w, &atts ); XGetWindowAttributes( tqt_xdisplay(), w, &atts );
if ( atts.map_state == IsViewable && if ( atts.map_state == IsViewable &&
atts.width >= minSize && atts.height >= minSize ) { atts.width >= minSize && atts.height >= minSize ) {
int x = 0, y = 0; int x = 0, y = 0;
@ -65,7 +65,7 @@ void getWindowsRecursive( std::vector<TQRect>& windows, Window w,
Window* children; Window* children;
unsigned int nchildren; unsigned int nchildren;
if( XQueryTree( qt_xdisplay(), w, &root, &parent, &children, &nchildren ) != 0 ) { if( XQueryTree( tqt_xdisplay(), w, &root, &parent, &children, &nchildren ) != 0 ) {
for( unsigned int i = 0; i < nchildren; ++i ) { for( unsigned int i = 0; i < nchildren; ++i ) {
getWindowsRecursive( windows, children[ i ], x, y, depth + 1 ); getWindowsRecursive( windows, children[ i ], x, y, depth + 1 );
} }
@ -82,12 +82,12 @@ Window findRealWindow( Window w, int depth = 0 )
{ {
if( depth > 5 ) if( depth > 5 )
return None; return None;
static Atom wm_state = XInternAtom( qt_xdisplay(), "WM_STATE", False ); static Atom wm_state = XInternAtom( tqt_xdisplay(), "WM_STATE", False );
Atom type; Atom type;
int format; int format;
unsigned long nitems, after; unsigned long nitems, after;
unsigned char* prop; unsigned char* prop;
if( XGetWindowProperty( qt_xdisplay(), w, wm_state, 0, 0, False, AnyPropertyType, if( XGetWindowProperty( tqt_xdisplay(), w, wm_state, 0, 0, False, AnyPropertyType,
&type, &format, &nitems, &after, &prop ) == Success ) { &type, &format, &nitems, &after, &prop ) == Success ) {
if( prop != NULL ) if( prop != NULL )
XFree( prop ); XFree( prop );
@ -98,7 +98,7 @@ Window findRealWindow( Window w, int depth = 0 )
Window* children; Window* children;
unsigned int nchildren; unsigned int nchildren;
Window ret = None; Window ret = None;
if( XQueryTree( qt_xdisplay(), w, &root, &parent, &children, &nchildren ) != 0 ) { if( XQueryTree( tqt_xdisplay(), w, &root, &parent, &children, &nchildren ) != 0 ) {
for( unsigned int i = 0; for( unsigned int i = 0;
i < nchildren && ret == None; i < nchildren && ret == None;
++i ) ++i )
@ -116,11 +116,11 @@ Window windowUnderCursor( bool includeDecorations = true )
Window child; Window child;
uint mask; uint mask;
int rootX, rootY, winX, winY; int rootX, rootY, winX, winY;
XGrabServer( qt_xdisplay() ); XGrabServer( tqt_xdisplay() );
XQueryPointer( qt_xdisplay(), qt_xrootwin(), &root, &child, XQueryPointer( tqt_xdisplay(), tqt_xrootwin(), &root, &child,
&rootX, &rootY, &winX, &winY, &mask ); &rootX, &rootY, &winX, &winY, &mask );
if( child == None ) if( child == None )
child = qt_xrootwin(); child = tqt_xrootwin();
if( !includeDecorations ) { if( !includeDecorations ) {
Window real_child = findRealWindow( child ); Window real_child = findRealWindow( child );
if( real_child != None ) // test just in case if( real_child != None ) // test just in case
@ -132,16 +132,16 @@ Window windowUnderCursor( bool includeDecorations = true )
static static
TQPixmap grabWindow( Window child, int x, int y, uint w, uint h, uint border ) TQPixmap grabWindow( Window child, int x, int y, uint w, uint h, uint border )
{ {
TQPixmap pm( TQPixmap::grabWindow( qt_xrootwin(), x, y, w, h ) ); TQPixmap pm( TQPixmap::grabWindow( tqt_xrootwin(), x, y, w, h ) );
#ifdef HAVE_X11_EXTENSIONS_SHAPE_H #ifdef HAVE_X11_EXTENSIONS_SHAPE_H
int tmp1, tmp2; int tmp1, tmp2;
//Check whether the extension is available //Check whether the extension is available
if ( XShapeQueryExtension( qt_xdisplay(), &tmp1, &tmp2 ) ) { if ( XShapeQueryExtension( tqt_xdisplay(), &tmp1, &tmp2 ) ) {
TQBitmap mask( w, h ); TQBitmap mask( w, h );
//As the first step, get the mask from XShape. //As the first step, get the mask from XShape.
int count, order; int count, order;
XRectangle* rects = XShapeGetRectangles( qt_xdisplay(), child, XRectangle* rects = XShapeGetRectangles( tqt_xdisplay(), child,
ShapeBounding, &count, &order ); ShapeBounding, &count, &order );
//The ShapeBounding region is the outermost shape of the window; //The ShapeBounding region is the outermost shape of the window;
//ShapeBounding - ShapeClipping is defined to be the border. //ShapeBounding - ShapeClipping is defined to be the border.
@ -193,12 +193,12 @@ WindowGrabber::WindowGrabber()
Window root; Window root;
int y, x; int y, x;
uint w, h, border, depth; uint w, h, border, depth;
XGrabServer( qt_xdisplay() ); XGrabServer( tqt_xdisplay() );
Window child = windowUnderCursor(); Window child = windowUnderCursor();
XGetGeometry( qt_xdisplay(), child, &root, &x, &y, &w, &h, &border, &depth ); XGetGeometry( tqt_xdisplay(), child, &root, &x, &y, &w, &h, &border, &depth );
TQPixmap pm( grabWindow( child, x, y, w, h, border ) ); TQPixmap pm( grabWindow( child, x, y, w, h, border ) );
getWindowsRecursive( windows, child ); getWindowsRecursive( windows, child );
XUngrabServer( qt_xdisplay() ); XUngrabServer( tqt_xdisplay() );
setPaletteBackgroundPixmap( pm ); setPaletteBackgroundPixmap( pm );
setFixedSize( pm.size() ); setFixedSize( pm.size() );
@ -215,26 +215,26 @@ TQPixmap WindowGrabber::grabCurrent( bool includeDecorations )
Window root; Window root;
int y, x; int y, x;
uint w, h, border, depth; uint w, h, border, depth;
XGrabServer( qt_xdisplay() ); XGrabServer( tqt_xdisplay() );
Window child = windowUnderCursor( includeDecorations ); Window child = windowUnderCursor( includeDecorations );
XGetGeometry( qt_xdisplay(), child, &root, &x, &y, &w, &h, &border, &depth ); XGetGeometry( tqt_xdisplay(), child, &root, &x, &y, &w, &h, &border, &depth );
Window parent; Window parent;
Window* children; Window* children;
unsigned int nchildren; unsigned int nchildren;
if( XQueryTree( qt_xdisplay(), child, &root, &parent, if( XQueryTree( tqt_xdisplay(), child, &root, &parent,
&children, &nchildren ) != 0 ) { &children, &nchildren ) != 0 ) {
if( children != NULL ) if( children != NULL )
XFree( children ); XFree( children );
int newx, newy; int newx, newy;
Window dummy; Window dummy;
if( XTranslateCoordinates( qt_xdisplay(), parent, qt_xrootwin(), if( XTranslateCoordinates( tqt_xdisplay(), parent, tqt_xrootwin(),
x, y, &newx, &newy, &dummy )) { x, y, &newx, &newy, &dummy )) {
x = newx; x = newx;
y = newy; y = newy;
} }
} }
TQPixmap pm( grabWindow( child, x, y, w, h, border ) ); TQPixmap pm( grabWindow( child, x, y, w, h, border ) );
XUngrabServer( qt_xdisplay() ); XUngrabServer( tqt_xdisplay() );
return pm; return pm;
} }

@ -37,7 +37,7 @@
const int MOUSECURSORHIDETIME = 3000; const int MOUSECURSORHIDETIME = 3000;
//extern bool qt_use_xrender; //extern bool tqt_use_xrender;
typedef KGenericFactory<KImageCanvas> KImageCanvasFactory; typedef KGenericFactory<KImageCanvas> KImageCanvasFactory;
K_EXPORT_COMPONENT_FACTORY( libkviewcanvas, K_EXPORT_COMPONENT_FACTORY( libkviewcanvas,
@ -723,7 +723,7 @@ void KImageCanvas::timerEvent( TQTimerEvent * ev )
break; break;
case AlphaBlend: case AlphaBlend:
finishNewClient(); finishNewClient();
//if( qt_use_xrender ) //if( tqt_use_xrender )
//{ //{
//} //}
//else //else

Loading…
Cancel
Save