Rename additional global functions and variables for tqt3

pull/1/head
Timothy Pearson 13 years ago
parent 598bc03646
commit ed7719e0e3

@ -1171,7 +1171,7 @@ KDE_NO_EXPORT void KMPlayerApp::readOptions() {
KDE_NO_EXPORT void KMPlayerApp::minimalMode (bool by_user) { KDE_NO_EXPORT void KMPlayerApp::minimalMode (bool by_user) {
unsigned long props = NET::WMWindowType; unsigned long props = NET::WMWindowType;
NETWinInfo winfo (qt_xdisplay (), winId (), qt_xrootwin (), props); NETWinInfo winfo (tqt_xdisplay (), winId (), tqt_xrootwin (), props);
if (m_minimal_mode) { if (m_minimal_mode) {
winfo.setWindowType (NET::Normal); winfo.setWindowType (NET::Normal);
readOptions (); readOptions ();

@ -577,7 +577,7 @@ KDE_NO_EXPORT void View::playingStop () {
m_playing = false; m_playing = false;
WId w = m_viewer->embeddedWinId (); WId w = m_viewer->embeddedWinId ();
if (w) if (w)
XClearWindow (qt_xdisplay(), w); XClearWindow (tqt_xdisplay(), w);
m_view_area->resizeEvent (0L); m_view_area->resizeEvent (0L);
} }
@ -689,12 +689,12 @@ KDE_NO_CDTOR_EXPORT Viewer::Viewer (TQWidget *parent, View * view)
: QXEmbed (parent), m_plain_window (0), m_bgcolor (0), m_aspect (0.0), : QXEmbed (parent), m_plain_window (0), m_bgcolor (0), m_aspect (0.0),
m_view (view) { m_view (view) {
/*XWindowAttributes xwa; /*XWindowAttributes xwa;
XGetWindowAttributes (qt_xdisplay(), winId (), &xwa); XGetWindowAttributes (tqt_xdisplay(), winId (), &xwa);
XSetWindowAttributes xswa; XSetWindowAttributes xswa;
xswa.background_pixel = 0; xswa.background_pixel = 0;
xswa.border_pixel = 0; xswa.border_pixel = 0;
xswa.colormap = xwa.colormap; xswa.colormap = xwa.colormap;
create (XCreateWindow (qt_xdisplay (), parent->winId (), 0, 0, 10, 10, 0, create (XCreateWindow (tqt_xdisplay (), parent->winId (), 0, 0, 10, 10, 0,
x11Depth (), InputOutput, (Visual*)x11Visual (), x11Depth (), InputOutput, (Visual*)x11Visual (),
CWBackPixel | CWBorderPixel | CWColormap, &xswa));*/ CWBackPixel | CWBorderPixel | CWColormap, &xswa));*/
setAcceptDrops (true); setAcceptDrops (true);
@ -711,22 +711,22 @@ KDE_NO_EXPORT void Viewer::changeProtocol (QXEmbed::Protocol p) {
if (p == QXEmbed::XPLAIN) { if (p == QXEmbed::XPLAIN) {
setProtocol (p); setProtocol (p);
if (!m_plain_window) { if (!m_plain_window) {
int scr = DefaultScreen (qt_xdisplay ()); int scr = DefaultScreen (tqt_xdisplay ());
m_plain_window = XCreateSimpleWindow ( m_plain_window = XCreateSimpleWindow (
qt_xdisplay(), tqt_xdisplay(),
m_view->winId (), m_view->winId (),
0, 0, width(), height(), 0, 0, width(), height(),
1, 1,
BlackPixel (qt_xdisplay(), scr), BlackPixel (tqt_xdisplay(), scr),
BlackPixel (qt_xdisplay(), scr)); BlackPixel (tqt_xdisplay(), scr));
embed (m_plain_window); embed (m_plain_window);
} }
XClearWindow (qt_xdisplay(), m_plain_window); XClearWindow (tqt_xdisplay(), m_plain_window);
} else { } else {
if (m_plain_window) { if (m_plain_window) {
XDestroyWindow (qt_xdisplay(), m_plain_window); XDestroyWindow (tqt_xdisplay(), m_plain_window);
m_plain_window = 0; m_plain_window = 0;
XSync (qt_xdisplay (), false); XSync (tqt_xdisplay (), false);
} }
//setProtocol (p); //setProtocol (p);
setProtocol (QXEmbed::XPLAIN); setProtocol (QXEmbed::XPLAIN);
@ -737,7 +737,7 @@ KDE_NO_EXPORT void Viewer::changeProtocol (QXEmbed::Protocol p) {
KDE_NO_EXPORT void Viewer::windowChanged (WId w) { KDE_NO_EXPORT void Viewer::windowChanged (WId w) {
kdDebug () << "windowChanged " << (int)w << endl; kdDebug () << "windowChanged " << (int)w << endl;
if (w /*&& m_plain_window*/) if (w /*&& m_plain_window*/)
XSelectInput (qt_xdisplay (), w, XSelectInput (tqt_xdisplay (), w,
//KeyPressMask | KeyReleaseMask | //KeyPressMask | KeyReleaseMask |
KeyPressMask | KeyPressMask |
//EnterWindowMask | LeaveWindowMask | //EnterWindowMask | LeaveWindowMask |
@ -781,12 +781,12 @@ void Viewer::sendKeyEvent (int key) {
KeySym keysym = XStringToKeysym (buf); KeySym keysym = XStringToKeysym (buf);
XKeyEvent event = { XKeyEvent event = {
XKeyPress, 0, true, XKeyPress, 0, true,
qt_xdisplay (), w, qt_xrootwin(), w, tqt_xdisplay (), w, tqt_xrootwin(), w,
/*time*/ 0, 0, 0, 0, 0, /*time*/ 0, 0, 0, 0, 0,
0, XKeysymToKeycode (qt_xdisplay (), keysym), true 0, XKeysymToKeycode (tqt_xdisplay (), keysym), true
}; };
XSendEvent (qt_xdisplay(), w, false, KeyPressMask, (XEvent *) &event); XSendEvent (tqt_xdisplay(), w, false, KeyPressMask, (XEvent *) &event);
XFlush (qt_xdisplay ()); XFlush (tqt_xdisplay ());
} }
} }
@ -795,12 +795,12 @@ KDE_NO_EXPORT void Viewer::sendConfigureEvent () {
if (w) { if (w) {
XConfigureEvent c = { XConfigureEvent c = {
ConfigureNotify, 0UL, True, ConfigureNotify, 0UL, True,
qt_xdisplay (), w, winId (), tqt_xdisplay (), w, winId (),
x (), y (), width (), height (), x (), y (), width (), height (),
0, None, False 0, None, False
}; };
XSendEvent(qt_xdisplay(),c.event,true,StructureNotifyMask,(XEvent*)&c); XSendEvent(tqt_xdisplay(),c.event,true,StructureNotifyMask,(XEvent*)&c);
XFlush (qt_xdisplay ()); XFlush (tqt_xdisplay ());
} }
} }
@ -823,8 +823,8 @@ KDE_NO_EXPORT void Viewer::setCurrentBackgroundColor (const TQColor & c) {
setPaletteBackgroundColor (c); setPaletteBackgroundColor (c);
WId w = embeddedWinId (); WId w = embeddedWinId ();
if (w) { if (w) {
XSetWindowBackground (qt_xdisplay (), w, c.rgb ()); XSetWindowBackground (tqt_xdisplay (), w, c.rgb ());
XFlush (qt_xdisplay ()); XFlush (tqt_xdisplay ());
} }
} }

@ -222,16 +222,16 @@ KDE_NO_EXPORT void ViewSurface::video () {
#ifdef HAVE_CAIRO #ifdef HAVE_CAIRO
static cairo_surface_t * cairoCreateSurface (Window id, int w, int h) { static cairo_surface_t * cairoCreateSurface (Window id, int w, int h) {
Display * display = qt_xdisplay (); Display * display = tqt_xdisplay ();
return cairo_xlib_surface_create (display, id, return cairo_xlib_surface_create (display, id,
DefaultVisual (display, DefaultScreen (display)), w, h); DefaultVisual (display, DefaultScreen (display)), w, h);
/*return cairo_xlib_surface_create_with_xrender_format ( /*return cairo_xlib_surface_create_with_xrender_format (
qt_xdisplay (), tqt_xdisplay (),
id, id,
DefaultScreenOfDisplay (qt_xdisplay ()), DefaultScreenOfDisplay (tqt_xdisplay ()),
XRenderFindVisualFormat (qt_xdisplay (), XRenderFindVisualFormat (tqt_xdisplay (),
DefaultVisual (qt_xdisplay (), DefaultVisual (tqt_xdisplay (),
DefaultScreen (qt_xdisplay ()))), DefaultScreen (tqt_xdisplay ()))),
w, h);*/ w, h);*/
} }
@ -1487,7 +1487,7 @@ KDE_NO_EXPORT void ViewArea::syncVisual (const IRect & rect) {
killTimer (m_repaint_timer); killTimer (m_repaint_timer);
m_repaint_timer = 0; m_repaint_timer = 0;
} }
//XFlush (qt_xdisplay ()); //XFlush (tqt_xdisplay ());
} }
KDE_NO_EXPORT void ViewArea::paintEvent (TQPaintEvent * pe) { KDE_NO_EXPORT void ViewArea::paintEvent (TQPaintEvent * pe) {

Loading…
Cancel
Save