summaryrefslogtreecommitdiffstats
path: root/ksnapshot
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2012-03-02 02:14:25 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2012-03-02 02:14:25 -0600
commitb1a161ba3a4e6e5152a20549be63656d0584a218 (patch)
tree6a8d7343a028794da8f3c56d50000703581cd707 /ksnapshot
parentc509088a31cffd8e6d25c00a00414025426fc737 (diff)
downloadtdegraphics-b1a161ba3a4e6e5152a20549be63656d0584a218.tar.gz
tdegraphics-b1a161ba3a4e6e5152a20549be63656d0584a218.zip
Rename additional global functions and variables for tqt3
Diffstat (limited to 'ksnapshot')
-rw-r--r--ksnapshot/ksnapshot.cpp4
-rw-r--r--ksnapshot/regiongrabber.cpp4
-rw-r--r--ksnapshot/windowgrabber.cpp38
3 files changed, 23 insertions, 23 deletions
diff --git a/ksnapshot/ksnapshot.cpp b/ksnapshot/ksnapshot.cpp
index 05dfd185..f7d85254 100644
--- a/ksnapshot/ksnapshot.cpp
+++ b/ksnapshot/ksnapshot.cpp
@@ -83,7 +83,7 @@ KSnapshot::KSnapshot(TQWidget *parent, const char *name, bool grabCurrent)
grabber->grabMouse( waitCursor );
if ( !grabCurrent )
- snapshot = TQPixmap::grabWindow( qt_xrootwin() );
+ snapshot = TQPixmap::grabWindow( tqt_xrootwin() );
else {
mainWidget->setMode( WindowUnderCursor );
mainWidget->setIncludeDecorations( true );
@@ -454,7 +454,7 @@ void KSnapshot::performGrab()
snapshot = WindowGrabber::grabCurrent( mainWidget->includeDecorations() );
}
else {
- snapshot = TQPixmap::grabWindow( qt_xrootwin() );
+ snapshot = TQPixmap::grabWindow( tqt_xrootwin() );
}
updatePreview();
TQApplication::restoreOverrideCursor();
diff --git a/ksnapshot/regiongrabber.cpp b/ksnapshot/regiongrabber.cpp
index 2ba1ea76..101f3ef6 100644
--- a/ksnapshot/regiongrabber.cpp
+++ b/ksnapshot/regiongrabber.cpp
@@ -86,7 +86,7 @@ RegionGrabber::~RegionGrabber()
void RegionGrabber::initGrabber()
{
- pixmap = TQPixmap::grabWindow( qt_xrootwin() );
+ pixmap = TQPixmap::grabWindow( tqt_xrootwin() );
setPaletteBackgroundPixmap( pixmap );
TQDesktopWidget desktopWidget;
@@ -94,7 +94,7 @@ void RegionGrabber::initGrabber()
if ( desktopWidget.isVirtualDesktop() )
desktopSize = desktopWidget.geometry();
else
- desktopSize = desktopWidget.screenGeometry( qt_xrootwin() );
+ desktopSize = desktopWidget.screenGeometry( tqt_xrootwin() );
setGeometry( desktopSize );
showFullScreen();
diff --git a/ksnapshot/windowgrabber.cpp b/ksnapshot/windowgrabber.cpp
index afc337e5..eac0fa6e 100644
--- a/ksnapshot/windowgrabber.cpp
+++ b/ksnapshot/windowgrabber.cpp
@@ -47,7 +47,7 @@ void getWindowsRecursive( std::vector<TQRect>& windows, Window w,
int rx = 0, int ry = 0, int depth = 0 )
{
XWindowAttributes atts;
- XGetWindowAttributes( qt_xdisplay(), w, &atts );
+ XGetWindowAttributes( tqt_xdisplay(), w, &atts );
if ( atts.map_state == IsViewable &&
atts.width >= minSize && atts.height >= minSize ) {
int x = 0, y = 0;
@@ -65,7 +65,7 @@ void getWindowsRecursive( std::vector<TQRect>& windows, Window w,
Window* children;
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 ) {
getWindowsRecursive( windows, children[ i ], x, y, depth + 1 );
}
@@ -82,12 +82,12 @@ Window findRealWindow( Window w, int depth = 0 )
{
if( depth > 5 )
return None;
- static Atom wm_state = XInternAtom( qt_xdisplay(), "WM_STATE", False );
+ static Atom wm_state = XInternAtom( tqt_xdisplay(), "WM_STATE", False );
Atom type;
int format;
unsigned long nitems, after;
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 ) {
if( prop != NULL )
XFree( prop );
@@ -98,7 +98,7 @@ Window findRealWindow( Window w, int depth = 0 )
Window* children;
unsigned int nchildren;
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;
i < nchildren && ret == None;
++i )
@@ -116,11 +116,11 @@ Window windowUnderCursor( bool includeDecorations = true )
Window child;
uint mask;
int rootX, rootY, winX, winY;
- XGrabServer( qt_xdisplay() );
- XQueryPointer( qt_xdisplay(), qt_xrootwin(), &root, &child,
+ XGrabServer( tqt_xdisplay() );
+ XQueryPointer( tqt_xdisplay(), tqt_xrootwin(), &root, &child,
&rootX, &rootY, &winX, &winY, &mask );
if( child == None )
- child = qt_xrootwin();
+ child = tqt_xrootwin();
if( !includeDecorations ) {
Window real_child = findRealWindow( child );
if( real_child != None ) // test just in case
@@ -132,16 +132,16 @@ Window windowUnderCursor( bool includeDecorations = true )
static
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
int tmp1, tmp2;
//Check whether the extension is available
- if ( XShapeQueryExtension( qt_xdisplay(), &tmp1, &tmp2 ) ) {
+ if ( XShapeQueryExtension( tqt_xdisplay(), &tmp1, &tmp2 ) ) {
TQBitmap mask( w, h );
//As the first step, get the mask from XShape.
int count, order;
- XRectangle* rects = XShapeGetRectangles( qt_xdisplay(), child,
+ XRectangle* rects = XShapeGetRectangles( tqt_xdisplay(), child,
ShapeBounding, &count, &order );
//The ShapeBounding region is the outermost shape of the window;
//ShapeBounding - ShapeClipping is defined to be the border.
@@ -193,12 +193,12 @@ WindowGrabber::WindowGrabber()
Window root;
int y, x;
uint w, h, border, depth;
- XGrabServer( qt_xdisplay() );
+ XGrabServer( tqt_xdisplay() );
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 ) );
getWindowsRecursive( windows, child );
- XUngrabServer( qt_xdisplay() );
+ XUngrabServer( tqt_xdisplay() );
setPaletteBackgroundPixmap( pm );
setFixedSize( pm.size() );
@@ -215,26 +215,26 @@ TQPixmap WindowGrabber::grabCurrent( bool includeDecorations )
Window root;
int y, x;
uint w, h, border, depth;
- XGrabServer( qt_xdisplay() );
+ XGrabServer( tqt_xdisplay() );
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* children;
unsigned int nchildren;
- if( XQueryTree( qt_xdisplay(), child, &root, &parent,
+ if( XQueryTree( tqt_xdisplay(), child, &root, &parent,
&children, &nchildren ) != 0 ) {
if( children != NULL )
XFree( children );
int newx, newy;
Window dummy;
- if( XTranslateCoordinates( qt_xdisplay(), parent, qt_xrootwin(),
+ if( XTranslateCoordinates( tqt_xdisplay(), parent, tqt_xrootwin(),
x, y, &newx, &newy, &dummy )) {
x = newx;
y = newy;
}
}
TQPixmap pm( grabWindow( child, x, y, w, h, border ) );
- XUngrabServer( qt_xdisplay() );
+ XUngrabServer( tqt_xdisplay() );
return pm;
}