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 )
{
d = new KScienceData;
d->gc = XCreateGC(qt_xdisplay(), id, 0, 0);
d->gc = XCreateGC(tqt_xdisplay(), id, 0, 0);
d->xRootWin = 0;
d->buffer = 0;
@ -159,7 +159,7 @@ KScienceSaver::~KScienceSaver()
releaseLens();
if ( d->xRootWin )
XDestroyImage( d->xRootWin );
XFreeGC(qt_xdisplay(), d->gc );
XFreeGC(tqt_xdisplay(), d->gc );
delete d;
}
@ -592,14 +592,14 @@ void KScienceSaver::do_refresh( const TQRect & rect )
if( hideBG[mode] )
{
XSetWindowBackground( qt_xdisplay(), winId(), black.pixel() );
XClearArea( qt_xdisplay(), winId(), rect.left(), rect.top(),
XSetWindowBackground( tqt_xdisplay(), winId(), black.pixel() );
XClearArea( tqt_xdisplay(), winId(), rect.left(), rect.top(),
rect.width(), rect.height(), false );
}
else
{
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.width(), rect.height() );
@ -700,15 +700,15 @@ void KScienceSaver::slotTimeout()
if( hideBG[mode] )
blackPixel( xcoord, ycoord );
(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] )
blackPixelUndo( xcoord, ycoord );
}
void KScienceSaver::grabRootWindow()
{
Display *dsp = qt_xdisplay();
Window rootwin = RootWindow( dsp, qt_xscreen() );
Display *dsp = tqt_xdisplay();
Window rootwin = RootWindow( dsp, tqt_xscreen() );
// grab contents of root window
if( d->xRootWin )
@ -729,7 +729,7 @@ void KScienceSaver::grabPreviewWidget()
if( d->xRootWin )
XDestroyImage( d->xRootWin );
Display *dsp = qt_xdisplay();
Display *dsp = tqt_xdisplay();
d->xRootWin = XGetImage( dsp, winId(), 0, 0, width(), height(), AllPlanes, ZPixmap);
myAssert( d->xRootWin, "unable to grab preview window\n" );
@ -739,7 +739,7 @@ void KScienceSaver::grabPreviewWidget()
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;
for(int i=0; i<bpp; i++) {

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

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

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

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

Loading…
Cancel
Save