Rename additional global functions and variables for tqt3

pull/1/head
Timothy Pearson 13 years ago
parent 7d18baa666
commit 5e4daf07fe

@ -176,10 +176,10 @@ KisProfile * KisProfile::getScreenProfile (int screen)
unsigned long bytes_after; unsigned long bytes_after;
TQ_UINT8 * str; TQ_UINT8 * str;
static Atom icc_atom = XInternAtom( qt_xdisplay(), "_ICC_PROFILE", False ); static Atom icc_atom = XInternAtom( tqt_xdisplay(), "_ICC_PROFILE", False );
if ( XGetWindowProperty ( qt_xdisplay(), if ( XGetWindowProperty ( tqt_xdisplay(),
qt_xrootwin( screen ), tqt_xrootwin( screen ),
icc_atom, icc_atom,
0, 0,
INT_MAX, INT_MAX,

@ -69,7 +69,7 @@ KSnapshot::KSnapshot(TQWidget *parent, const char *name)
#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
haveXShape = XShapeQueryExtension( qt_xdisplay(), &tmp1, &tmp2 ); haveXShape = XShapeQueryExtension( tqt_xdisplay(), &tmp1, &tmp2 );
#endif #endif
TQVBox *vbox = makeVBoxMainWidget(); TQVBox *vbox = makeVBoxMainWidget();
@ -86,7 +86,7 @@ KSnapshot::KSnapshot(TQWidget *parent, const char *name)
grabber->show(); grabber->show();
grabber->grabMouse( waitCursor ); grabber->grabMouse( waitCursor );
snapshot = TQPixmap::grabWindow( qt_xrootwin() ); snapshot = TQPixmap::grabWindow( tqt_xrootwin() );
updatePreview(); updatePreview();
grabber->releaseMouse(); grabber->releaseMouse();
grabber->hide(); grabber->hide();
@ -307,12 +307,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 );
@ -323,7 +323,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 )
@ -339,17 +339,17 @@ void KSnapshot::performGrab()
grabber->releaseMouse(); grabber->releaseMouse();
grabber->hide(); grabber->hide();
grabTimer.stop(); grabTimer.stop();
XGrabServer( qt_xdisplay()); XGrabServer( tqt_xdisplay());
if ( mainWidget->mode() == WindowUnderCursor ) { if ( mainWidget->mode() == WindowUnderCursor ) {
Window root; Window root;
Window child; Window child;
uint mask; uint mask;
int rootX, rootY, winX, winY; int rootX, rootY, winX, winY;
XQueryPointer( qt_xdisplay(), qt_xrootwin(), &root, &child, XQueryPointer( tqt_xdisplay(), tqt_xrootwin(), &root, &child,
&rootX, &rootY, &winX, &winY, &rootX, &rootY, &winX, &winY,
&mask); &mask);
if( child == None ) if( child == None )
child = qt_xrootwin(); child = tqt_xrootwin();
if( !mainWidget->includeDecorations()) { if( !mainWidget->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
@ -359,7 +359,7 @@ void KSnapshot::performGrab()
unsigned int w, h; unsigned int w, h;
unsigned int border; unsigned int border;
unsigned int depth; unsigned int depth;
XGetGeometry( qt_xdisplay(), child, &root, &x, &y, XGetGeometry( tqt_xdisplay(), child, &root, &x, &y,
&w, &h, &border, &depth ); &w, &h, &border, &depth );
w += 2 * border; w += 2 * border;
h += 2 * border; h += 2 * border;
@ -367,20 +367,20 @@ void KSnapshot::performGrab()
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;
} }
} }
snapshot = TQPixmap::grabWindow( qt_xrootwin(), x, y, w, h ); snapshot = TQPixmap::grabWindow( tqt_xrootwin(), x, y, w, h );
#ifdef HAVE_X11_EXTENSIONS_SHAPE_H #ifdef HAVE_X11_EXTENSIONS_SHAPE_H
//No XShape - no work. //No XShape - no work.
@ -388,7 +388,7 @@ void KSnapshot::performGrab()
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.
@ -430,9 +430,9 @@ void KSnapshot::performGrab()
#endif #endif
} }
else { else {
snapshot = TQPixmap::grabWindow( qt_xrootwin() ); snapshot = TQPixmap::grabWindow( tqt_xrootwin() );
} }
XUngrabServer( qt_xdisplay()); XUngrabServer( tqt_xdisplay());
updatePreview(); updatePreview();
TQApplication::restoreOverrideCursor(); TQApplication::restoreOverrideCursor();
modified = true; modified = true;

@ -87,7 +87,7 @@ RegionGrabber::~RegionGrabber()
void RegionGrabber::initGrabber() void RegionGrabber::initGrabber()
{ {
pixmap = TQPixmap::grabWindow( qt_xrootwin() ); pixmap = TQPixmap::grabWindow( tqt_xrootwin() );
setPaletteBackgroundPixmap( pixmap ); setPaletteBackgroundPixmap( pixmap );
showFullScreen(); showFullScreen();

@ -316,15 +316,15 @@ KoToolDockMoveManager::KoToolDockMoveManager()
noLast=true; noLast=true;
#if defined Q_WS_X11 && !defined K_WS_TQTONLY #if defined Q_WS_X11 && !defined K_WS_TQTONLY
scr = qt_xscreen(); scr = tqt_xscreen();
root = qt_xrootwin(); root = tqt_xrootwin();
gv.function = GXxor; gv.function = GXxor;
gv.line_width = 2; gv.line_width = 2;
gv.foreground = WhitePixel(qt_xdisplay(), scr)^BlackPixel(qt_xdisplay(), scr); gv.foreground = WhitePixel(tqt_xdisplay(), scr)^BlackPixel(tqt_xdisplay(), scr);
gv.subwindow_mode = IncludeInferiors; gv.subwindow_mode = IncludeInferiors;
long mask = GCForeground | GCFunction | GCLineWidth | GCSubwindowMode; long mask = GCForeground | GCFunction | GCLineWidth | GCSubwindowMode;
rootgc = XCreateGC(qt_xdisplay(), qt_xrootwin(), mask, &gv); rootgc = XCreateGC(tqt_xdisplay(), tqt_xrootwin(), mask, &gv);
#endif #endif
timer = new TQTimer(this); timer = new TQTimer(this);
@ -387,8 +387,8 @@ void KoToolDockMoveManager::doMoveInternal()
paintProcess(false,xp, yp, w, h); paintProcess(false,xp, yp, w, h);
#if defined Q_WS_X11 && !defined K_WS_TQTONLY #if defined Q_WS_X11 && !defined K_WS_TQTONLY
XFlush(qt_xdisplay()); XFlush(tqt_xdisplay());
XSync(qt_xdisplay(),false); XSync(tqt_xdisplay(),false);
#endif #endif
} }
} }
@ -403,7 +403,7 @@ void KoToolDockMoveManager::stop()
paintProcess(); paintProcess();
#if defined Q_WS_X11 && !defined K_WS_TQTONLY #if defined Q_WS_X11 && !defined K_WS_TQTONLY
XFlush(qt_xdisplay()); XFlush(tqt_xdisplay());
#endif #endif
working = false; working = false;
@ -425,8 +425,8 @@ void KoToolDockMoveManager::setGeometry(int _x, int _y, int _w, int _h)
paintProcess(false,_x, _y, _w, _h); paintProcess(false,_x, _y, _w, _h);
#if defined Q_WS_X11 && !defined K_WS_TQTONLY #if defined Q_WS_X11 && !defined K_WS_TQTONLY
XFlush(qt_xdisplay()); XFlush(tqt_xdisplay());
XSync(qt_xdisplay(),false); XSync(tqt_xdisplay(),false);
#endif #endif
} }
@ -441,7 +441,7 @@ void KoToolDockMoveManager::drawRectangle( int _x, int _y, int _w, int _h)
oh = _h; oh = _h;
#if defined Q_WS_X11 && !defined K_WS_TQTONLY #if defined Q_WS_X11 && !defined K_WS_TQTONLY
XDrawRectangle(qt_xdisplay(), root, rootgc, _x, _y, _w, _h); XDrawRectangle(tqt_xdisplay(), root, rootgc, _x, _y, _w, _h);
#endif #endif
noLast = false; noLast = false;
} }
@ -455,7 +455,7 @@ void KoToolDockMoveManager::paintProcess( bool onlyDelete, int _x, int _y, int _
return; return;
#if defined Q_WS_X11 && !defined K_WS_TQTONLY #if defined Q_WS_X11 && !defined K_WS_TQTONLY
XDrawRectangle(qt_xdisplay(), root, rootgc, ox, oy, ow, oh); XDrawRectangle(tqt_xdisplay(), root, rootgc, ox, oy, ow, oh);
#endif #endif
noLast = true; noLast = true;
@ -547,8 +547,8 @@ void KoToolDockMoveManager::doResizeInternal()
paintProcess(false,xp, yp, w, h); paintProcess(false,xp, yp, w, h);
#if defined Q_WS_X11 && !defined K_WS_TQTONLY #if defined Q_WS_X11 && !defined K_WS_TQTONLY
XFlush(qt_xdisplay()); XFlush(tqt_xdisplay());
XSync(qt_xdisplay(),false); XSync(tqt_xdisplay(),false);
#endif #endif
} }
} }

@ -230,7 +230,7 @@ extern "C" {
static void enableDPMS(bool enable) static void enableDPMS(bool enable)
{ {
#ifdef HAVE_DPMS #ifdef HAVE_DPMS
Display *display = qt_xdisplay(); Display *display = tqt_xdisplay();
int dummy; int dummy;
bool hasDPMS = DPMSQueryExtension(display, &dummy, &dummy); bool hasDPMS = DPMSQueryExtension(display, &dummy, &dummy);
@ -260,7 +260,7 @@ static bool isDPMSEnabled()
CARD16 x_standby; CARD16 x_standby;
CARD16 x_suspend; CARD16 x_suspend;
CARD16 x_off; CARD16 x_off;
Display *display = qt_xdisplay(); Display *display = tqt_xdisplay();
if (DPMSQueryExtension(display, &event_base, &error_base)) if (DPMSQueryExtension(display, &event_base, &error_base))
if (DPMSCapable(display)) if (DPMSCapable(display))
result = (DPMSGetTimeouts(display, &x_standby, &x_suspend, &x_off)); result = (DPMSGetTimeouts(display, &x_standby, &x_suspend, &x_off));

@ -34,7 +34,7 @@
#include <kstandarddirs.h> #include <kstandarddirs.h>
#include <stdlib.h> #include <stdlib.h>
void qt_generate_epsf( bool b ); void tqt_generate_epsf( bool b );
static const KCmdLineOptions options[]= static const KCmdLineOptions options[]=
{ {

Loading…
Cancel
Save