Rename additional global functions and variables for tqt3

pull/1/head
Timothy Pearson 13 years ago
parent fcd2154ede
commit f909dc7bca

@ -131,7 +131,7 @@ KScienceSaver::KScienceSaver( WId id, bool s, bool gP )
: KScreenSaver( id ) : KScreenSaver( id )
{ {
d = new KScienceData; d = new KScienceData;
d->gc = XCreateGC(qt_xdisplay(), id, 0, 0); d->gc = XCreateGC(tqt_xdisplay(), id, 0, 0);
d->xRootWin = 0; d->xRootWin = 0;
d->buffer = 0; d->buffer = 0;
@ -159,7 +159,7 @@ KScienceSaver::~KScienceSaver()
releaseLens(); releaseLens();
if ( d->xRootWin ) if ( d->xRootWin )
XDestroyImage( d->xRootWin ); XDestroyImage( d->xRootWin );
XFreeGC(qt_xdisplay(), d->gc ); XFreeGC(tqt_xdisplay(), d->gc );
delete d; delete d;
} }
@ -592,14 +592,14 @@ void KScienceSaver::do_refresh( const TQRect & rect )
if( hideBG[mode] ) if( hideBG[mode] )
{ {
XSetWindowBackground( qt_xdisplay(), winId(), black.pixel() ); XSetWindowBackground( tqt_xdisplay(), winId(), black.pixel() );
XClearArea( qt_xdisplay(), winId(), rect.left(), rect.top(), XClearArea( tqt_xdisplay(), winId(), rect.left(), rect.top(),
rect.width(), rect.height(), false ); rect.width(), rect.height(), false );
} }
else else
{ {
myAssert( d->xRootWin != 0, "root window not grabbed" ); myAssert( d->xRootWin != 0, "root window not grabbed" );
XPutImage( qt_xdisplay(), winId(), d->gc, d->xRootWin, XPutImage( tqt_xdisplay(), winId(), d->gc, d->xRootWin,
rect.left(), rect.top(), rect.left(), rect.top(),
rect.left(), rect.top(), rect.left(), rect.top(),
rect.width(), rect.height() ); rect.width(), rect.height() );
@ -700,15 +700,15 @@ void KScienceSaver::slotTimeout()
if( hideBG[mode] ) if( hideBG[mode] )
blackPixel( xcoord, ycoord ); blackPixel( xcoord, ycoord );
(this->*applyLens)(xs, ys, xd, yd, w, h); (this->*applyLens)(xs, ys, xd, yd, w, h);
XPutImage( qt_xdisplay(), winId(), d->gc, d->buffer, 0, 0, xd, yd, w, h ); XPutImage( tqt_xdisplay(), winId(), d->gc, d->buffer, 0, 0, xd, yd, w, h );
if( hideBG[mode] ) if( hideBG[mode] )
blackPixelUndo( xcoord, ycoord ); blackPixelUndo( xcoord, ycoord );
} }
void KScienceSaver::grabRootWindow() void KScienceSaver::grabRootWindow()
{ {
Display *dsp = qt_xdisplay(); Display *dsp = tqt_xdisplay();
Window rootwin = RootWindow( dsp, qt_xscreen() ); Window rootwin = RootWindow( dsp, tqt_xscreen() );
// grab contents of root window // grab contents of root window
if( d->xRootWin ) if( d->xRootWin )
@ -729,7 +729,7 @@ void KScienceSaver::grabPreviewWidget()
if( d->xRootWin ) if( d->xRootWin )
XDestroyImage( d->xRootWin ); XDestroyImage( d->xRootWin );
Display *dsp = qt_xdisplay(); Display *dsp = tqt_xdisplay();
d->xRootWin = XGetImage( dsp, winId(), 0, 0, width(), height(), AllPlanes, ZPixmap); d->xRootWin = XGetImage( dsp, winId(), 0, 0, width(), height(), AllPlanes, ZPixmap);
myAssert( d->xRootWin, "unable to grab preview window\n" ); myAssert( d->xRootWin, "unable to grab preview window\n" );
@ -739,7 +739,7 @@ void KScienceSaver::grabPreviewWidget()
void KScienceSaver::blackPixel( int x, int y ) void KScienceSaver::blackPixel( int x, int y )
{ {
unsigned char black = (char) BlackPixel( qt_xdisplay(), qt_xscreen() ); unsigned char black = (char) BlackPixel( tqt_xdisplay(), tqt_xscreen() );
unsigned int adr = x*bpp + y*imgnext; unsigned int adr = x*bpp + y*imgnext;
for(int i=0; i<bpp; i++) { for(int i=0; i<bpp; i++) {

@ -181,7 +181,7 @@ bool KXSConfigDialog::create()
show(); show();
// So that hacks can XSelectInput ButtonPressMask // So that hacks can XSelectInput ButtonPressMask
XSelectInput(qt_xdisplay(), mPreview->winId(), widgetEventMask ); XSelectInput(tqt_xdisplay(), mPreview->winId(), widgetEventMask );
slotPreviewExited(0); slotPreviewExited(0);
return true; return true;
@ -357,7 +357,7 @@ int main(int argc, char *argv[])
// Teach Xt to use the Display that TQt has already opened. // Teach Xt to use the Display that TQt has already opened.
XtToolkitInitialize (); XtToolkitInitialize ();
XtAppContext xtApp = XtCreateApplicationContext (); XtAppContext xtApp = XtCreateApplicationContext ();
Display *dpy = qt_xdisplay(); Display *dpy = tqt_xdisplay();
XtAppSetFallbackResources (xtApp, const_cast<char**>(defaults)); XtAppSetFallbackResources (xtApp, const_cast<char**>(defaults));
XtDisplayInitialize (xtApp, dpy, progname, progclass, 0, 0, XtDisplayInitialize (xtApp, dpy, progname, progclass, 0, 0,
&dummyargc, &dummyargc,

@ -16,14 +16,14 @@ kScreenSaver::kScreenSaver(Drawable drawable) : TQObject()
unsigned int au; unsigned int au;
mDrawable = drawable; mDrawable = drawable;
mGc = XCreateGC(qt_xdisplay(), mDrawable, 0, 0); mGc = XCreateGC(tqt_xdisplay(), mDrawable, 0, 0);
XGetGeometry(qt_xdisplay(), mDrawable, &root, &ai, &ai, XGetGeometry(tqt_xdisplay(), mDrawable, &root, &ai, &ai,
&mWidth, &mHeight, &au, &au); &mWidth, &mHeight, &au, &au);
} }
kScreenSaver::~kScreenSaver() kScreenSaver::~kScreenSaver()
{ {
XFreeGC(qt_xdisplay(), mGc); XFreeGC(tqt_xdisplay(), mGc);
} }
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------

@ -261,8 +261,8 @@ kSwarmSaver::kSwarmSaver( Drawable drawable ) : kScreenSaver( drawable )
readSettings(); readSettings();
// Clear to background colour when exposed // Clear to background colour when exposed
XSetWindowBackground(qt_xdisplay(), mDrawable, XSetWindowBackground(tqt_xdisplay(), mDrawable,
BlackPixel(qt_xdisplay(), qt_xscreen())); BlackPixel(tqt_xdisplay(), tqt_xscreen()));
colorContext = TQColor::enterAllocContext(); colorContext = TQColor::enterAllocContext();

@ -62,8 +62,8 @@ void initXLock( GC gc )
{ {
SetRNG( time(NULL) ); SetRNG( time(NULL) );
dsp = qt_xdisplay(); dsp = tqt_xdisplay();
screen = qt_xscreen(); screen = tqt_xscreen();
Screen *scr = ScreenOfDisplay(dsp, screen); Screen *scr = ScreenOfDisplay(dsp, screen);

Loading…
Cancel
Save