summaryrefslogtreecommitdiffstats
path: root/src/viewarea.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/viewarea.cpp')
-rw-r--r--src/viewarea.cpp104
1 files changed, 52 insertions, 52 deletions
diff --git a/src/viewarea.cpp b/src/viewarea.cpp
index c76af9b..8a5c1f9 100644
--- a/src/viewarea.cpp
+++ b/src/viewarea.cpp
@@ -173,7 +173,7 @@ SurfacePtr ViewSurface::createSurface (NodePtr owner, const SRect & rect) {
return surface;
}
-KDE_NO_EXPORT void ViewSurface::resize (const SRect &r) {
+TDE_NO_EXPORT void ViewSurface::resize (const SRect &r) {
bounds = r;
#ifdef HAVE_CAIRO
if (surface)
@@ -185,7 +185,7 @@ KDE_NO_EXPORT void ViewSurface::resize (const SRect &r) {
rect = nrect;*/
}
-KDE_NO_EXPORT IRect ViewSurface::toScreen (Single x, Single y, Single w, Single h) {
+TDE_NO_EXPORT IRect ViewSurface::toScreen (Single x, Single y, Single w, Single h) {
Matrix matrix (0, 0, xscale, yscale);
matrix.translate (bounds.x (), bounds.y ());
for (SurfacePtr s = parentNode(); s; s = s->parentNode()) {
@@ -196,20 +196,20 @@ KDE_NO_EXPORT IRect ViewSurface::toScreen (Single x, Single y, Single w, Single
return IRect (x, y, w, h);
}
-KDE_NO_EXPORT
+TDE_NO_EXPORT
void ViewSurface::repaint (const SRect &r) {
markDirty ();
view_widget->scheduleRepaint (toScreen (r.x (), r.y (), r.width (), r.height ()));
//kdDebug() << "Surface::repaint x:" << (int)x << " y:" << (int)y << " w:" << (int)w << " h:" << (int)h << endl;
}
-KDE_NO_EXPORT
+TDE_NO_EXPORT
void ViewSurface::repaint () {
markDirty ();
view_widget->scheduleRepaint (toScreen (0, 0, bounds.width (), bounds.height ()));
}
-KDE_NO_EXPORT void ViewSurface::video () {
+TDE_NO_EXPORT void ViewSurface::video () {
view_widget->setAudioVideoNode (node);
kdDebug() << "Surface::video:" << background_color << " " << (background_color & 0xff000000) << endl;
xscale = yscale = 1; // either scale width/heigt or use bounds
@@ -315,11 +315,11 @@ KDE_NO_CDTOR_EXPORT CairoPaintVisitor::~CairoPaintVisitor () {
cairo_destroy (cr);
}
-KDE_NO_EXPORT void CairoPaintVisitor::visit (Node * n) {
+TDE_NO_EXPORT void CairoPaintVisitor::visit (Node * n) {
kdWarning() << "Paint called on " << n->nodeName() << endl;
}
-KDE_NO_EXPORT void CairoPaintVisitor::traverseRegion (SMIL::RegionBase * reg) {
+TDE_NO_EXPORT void CairoPaintVisitor::traverseRegion (SMIL::RegionBase * reg) {
// next visit listeners
NodeRefListPtr nl = reg->listeners (mediatype_attached);
if (nl) {
@@ -346,7 +346,7 @@ KDE_NO_EXPORT void CairoPaintVisitor::traverseRegion (SMIL::RegionBase * reg) {
r->data->accept (this);
}
-KDE_NO_EXPORT void CairoPaintVisitor::visit (SMIL::Layout * reg) {
+TDE_NO_EXPORT void CairoPaintVisitor::visit (SMIL::Layout * reg) {
//kdDebug() << "Visit " << reg->nodeName() << endl;
SMIL::RegionBase *rb = convertNode <SMIL::RegionBase> (reg->rootLayout);
if (reg->surface () && rb) {
@@ -382,7 +382,7 @@ KDE_NO_EXPORT void CairoPaintVisitor::visit (SMIL::Layout * reg) {
}
}
-KDE_NO_EXPORT void CairoPaintVisitor::visit (SMIL::Region * reg) {
+TDE_NO_EXPORT void CairoPaintVisitor::visit (SMIL::Region * reg) {
Surface *s = reg->surface ();
if (s) {
SRect rect = s->bounds;
@@ -441,7 +441,7 @@ KDE_NO_EXPORT void CairoPaintVisitor::visit (SMIL::Region * reg) {
cairo_set_source (cr, pat); \
}
-KDE_NO_EXPORT void CairoPaintVisitor::visit (SMIL::Transition *trans) {
+TDE_NO_EXPORT void CairoPaintVisitor::visit (SMIL::Transition *trans) {
float perc = trans->start_progress + (trans->end_progress - trans->start_progress)*cur_media->trans_step / cur_media->trans_steps;
if (cur_media->trans_out_active)
perc = 1.0 - perc;
@@ -588,7 +588,7 @@ KDE_NO_EXPORT void CairoPaintVisitor::visit (SMIL::Transition *trans) {
}
}
-KDE_NO_EXPORT void CairoPaintVisitor::visit (SMIL::RefMediaType *ref) {
+TDE_NO_EXPORT void CairoPaintVisitor::visit (SMIL::RefMediaType *ref) {
Surface *s = ref->surface ();
if (s) {
if (ref->external_tree)
@@ -598,7 +598,7 @@ KDE_NO_EXPORT void CairoPaintVisitor::visit (SMIL::RefMediaType *ref) {
}
}
-KDE_NO_EXPORT void CairoPaintVisitor::paint (SMIL::MediaType *mt, Surface *s,
+TDE_NO_EXPORT void CairoPaintVisitor::paint (SMIL::MediaType *mt, Surface *s,
int x, int y, const IRect &rect) {
cairo_save (cr);
opacity = 1.0;
@@ -628,7 +628,7 @@ KDE_NO_EXPORT void CairoPaintVisitor::paint (SMIL::MediaType *mt, Surface *s,
cairo_restore (cr);
}
-KDE_NO_EXPORT
+TDE_NO_EXPORT
void CairoPaintVisitor::updateExternal (SMIL::MediaType *av, SurfacePtr s) {
SRect rect = s->bounds;
Single x = rect.x ();
@@ -656,7 +656,7 @@ void CairoPaintVisitor::updateExternal (SMIL::MediaType *av, SurfacePtr s) {
paint (av, s.ptr (), x, y, clip_rect);
}
-KDE_NO_EXPORT void CairoPaintVisitor::visit (SMIL::AVMediaType *av) {
+TDE_NO_EXPORT void CairoPaintVisitor::visit (SMIL::AVMediaType *av) {
Surface *s = av->surface ();
if (s) {
if (av->external_tree)
@@ -666,7 +666,7 @@ KDE_NO_EXPORT void CairoPaintVisitor::visit (SMIL::AVMediaType *av) {
}
}
-KDE_NO_EXPORT void CairoPaintVisitor::visit (SMIL::ImageMediaType * img) {
+TDE_NO_EXPORT void CairoPaintVisitor::visit (SMIL::ImageMediaType * img) {
//kdDebug() << "Visit " << img->nodeName() << " " << img->src << endl;
Surface *s = img->surface ();
if (!s)
@@ -696,7 +696,7 @@ KDE_NO_EXPORT void CairoPaintVisitor::visit (SMIL::ImageMediaType * img) {
s->dirty = false;
}
-KDE_NO_EXPORT void CairoPaintVisitor::visit (SMIL::TextMediaType * txt) {
+TDE_NO_EXPORT void CairoPaintVisitor::visit (SMIL::TextMediaType * txt) {
TextRuntime * td = static_cast <TextRuntime *> (txt->runtime ());
Surface *s = txt->surface ();
//kdDebug() << "Visit " << txt->nodeName() << " " << td->text << endl;
@@ -844,7 +844,7 @@ KDE_NO_EXPORT void CairoPaintVisitor::visit (SMIL::TextMediaType * txt) {
s->dirty = false;
}
-KDE_NO_EXPORT void CairoPaintVisitor::visit (SMIL::Brush * brush) {
+TDE_NO_EXPORT void CairoPaintVisitor::visit (SMIL::Brush * brush) {
//kdDebug() << "Visit " << brush->nodeName() << endl;
Surface *s = brush->surface ();
if (s) {
@@ -876,7 +876,7 @@ KDE_NO_EXPORT void CairoPaintVisitor::visit (SMIL::Brush * brush) {
}
}
-KDE_NO_EXPORT void CairoPaintVisitor::visit (RP::Imfl * imfl) {
+TDE_NO_EXPORT void CairoPaintVisitor::visit (RP::Imfl * imfl) {
if (imfl->surface ()) {
cairo_save (cr);
Matrix m = matrix;
@@ -926,7 +926,7 @@ KDE_NO_EXPORT void CairoPaintVisitor::visit (RP::Imfl * imfl) {
}
}
-KDE_NO_EXPORT void CairoPaintVisitor::visit (RP::Fill * fi) {
+TDE_NO_EXPORT void CairoPaintVisitor::visit (RP::Fill * fi) {
//kdDebug() << "Visit " << fi->nodeName() << endl;
CAIRO_SET_SOURCE_RGB (cr, fi->color);
if ((int)fi->w && (int)fi->h) {
@@ -935,7 +935,7 @@ KDE_NO_EXPORT void CairoPaintVisitor::visit (RP::Fill * fi) {
}
}
-KDE_NO_EXPORT void CairoPaintVisitor::visit (RP::Fadein * fi) {
+TDE_NO_EXPORT void CairoPaintVisitor::visit (RP::Fadein * fi) {
//kdDebug() << "Visit " << fi->nodeName() << endl;
if (fi->target && fi->target->id == RP::id_node_image) {
RP::Image *img = convertNode <RP::Image> (fi->target);
@@ -971,7 +971,7 @@ KDE_NO_EXPORT void CairoPaintVisitor::visit (RP::Fadein * fi) {
}
}
-KDE_NO_EXPORT void CairoPaintVisitor::visit (RP::Fadeout * fo) {
+TDE_NO_EXPORT void CairoPaintVisitor::visit (RP::Fadeout * fo) {
//kdDebug() << "Visit " << fo->nodeName() << endl;
if (fo->progress > 0) {
CAIRO_SET_SOURCE_RGB (cr, fo->to_color);
@@ -985,7 +985,7 @@ KDE_NO_EXPORT void CairoPaintVisitor::visit (RP::Fadeout * fo) {
}
}
-KDE_NO_EXPORT void CairoPaintVisitor::visit (RP::Crossfade * cf) {
+TDE_NO_EXPORT void CairoPaintVisitor::visit (RP::Crossfade * cf) {
//kdDebug() << "Visit " << cf->nodeName() << endl;
if (cf->target && cf->target->id == RP::id_node_image) {
RP::Image *img = convertNode <RP::Image> (cf->target);
@@ -1021,7 +1021,7 @@ KDE_NO_EXPORT void CairoPaintVisitor::visit (RP::Crossfade * cf) {
}
}
-KDE_NO_EXPORT void CairoPaintVisitor::visit (RP::Wipe * wipe) {
+TDE_NO_EXPORT void CairoPaintVisitor::visit (RP::Wipe * wipe) {
//kdDebug() << "Visit " << wipe->nodeName() << endl;
if (wipe->target && wipe->target->id == RP::id_node_image) {
RP::Image *img = convertNode <RP::Image> (wipe->target);
@@ -1077,7 +1077,7 @@ KDE_NO_EXPORT void CairoPaintVisitor::visit (RP::Wipe * wipe) {
}
}
-KDE_NO_EXPORT void CairoPaintVisitor::visit (RP::ViewChange * vc) {
+TDE_NO_EXPORT void CairoPaintVisitor::visit (RP::ViewChange * vc) {
//kdDebug() << "Visit " << vc->nodeName() << endl;
if (vc->unfinished () || vc->progress < 100) {
cairo_pattern_t * pat = cairo_pop_group (cr); // from imfl
@@ -1139,11 +1139,11 @@ MouseVisitor::MouseVisitor (unsigned int evt, int a, int b)
: event (evt), x (a), y (b), handled (false), bubble_up (false) {
}
-KDE_NO_EXPORT void MouseVisitor::visit (Node * n) {
+TDE_NO_EXPORT void MouseVisitor::visit (Node * n) {
kdDebug () << "Mouse event ignored for " << n->nodeName () << endl;
}
-KDE_NO_EXPORT void MouseVisitor::visit (SMIL::Layout * layout) {
+TDE_NO_EXPORT void MouseVisitor::visit (SMIL::Layout * layout) {
if (layout->surface ()) {
Matrix m = matrix;
SRect rect = layout->region_surface->bounds;
@@ -1165,7 +1165,7 @@ KDE_NO_EXPORT void MouseVisitor::visit (SMIL::Layout * layout) {
}
}
-KDE_NO_EXPORT void MouseVisitor::visit (SMIL::Region * region) {
+TDE_NO_EXPORT void MouseVisitor::visit (SMIL::Region * region) {
if (region->surface ()) {
SRect rect = region->region_surface->bounds;
Single rx = rect.x(), ry = rect.y(), rw = rect.width(), rh = rect.height();
@@ -1243,14 +1243,14 @@ static void followLink (SMIL::LinkingBase * link) {
}
}
-KDE_NO_EXPORT void MouseVisitor::visit (SMIL::Anchor * anchor) {
+TDE_NO_EXPORT void MouseVisitor::visit (SMIL::Anchor * anchor) {
if (event == event_pointer_moved)
cursor.setShape (TQt::PointingHandCursor);
else if (event == event_pointer_clicked)
followLink (anchor);
}
-KDE_NO_EXPORT void MouseVisitor::visit (SMIL::Area * area) {
+TDE_NO_EXPORT void MouseVisitor::visit (SMIL::Area * area) {
NodePtr n = area->parentNode ();
if (n->id >= SMIL::id_node_first_mediatype &&
n->id < SMIL::id_node_last_mediatype) {
@@ -1293,11 +1293,11 @@ KDE_NO_EXPORT void MouseVisitor::visit (SMIL::Area * area) {
}
}
-KDE_NO_EXPORT void MouseVisitor::visit (SMIL::TimedMrl * timedmrl) {
+TDE_NO_EXPORT void MouseVisitor::visit (SMIL::TimedMrl * timedmrl) {
timedmrl->runtime ()->processEvent (event);
}
-KDE_NO_EXPORT void MouseVisitor::visit (SMIL::MediaType * mediatype) {
+TDE_NO_EXPORT void MouseVisitor::visit (SMIL::MediaType * mediatype) {
if (mediatype->sensitivity == SMIL::MediaType::sens_transparent) {
bubble_up = true;
return;
@@ -1362,7 +1362,7 @@ KDE_NO_CDTOR_EXPORT ViewArea::ViewArea (TQWidget * parent, View * view)
KDE_NO_CDTOR_EXPORT ViewArea::~ViewArea () {
}
-KDE_NO_EXPORT void ViewArea::fullScreen () {
+TDE_NO_EXPORT void ViewArea::fullScreen () {
this->killTimers ();
m_mouse_invisible_timer = m_repaint_timer = 0;
if (m_fullscreen) {
@@ -1428,11 +1428,11 @@ void ViewArea::minimalMode () {
m_topwindow_rect = topLevelWidget ()->geometry ();
}
-KDE_NO_EXPORT void ViewArea::accelActivated () {
+TDE_NO_EXPORT void ViewArea::accelActivated () {
m_view->controlPanel()->popupMenu ()->activateItemAt (m_view->controlPanel()->popupMenu ()->indexOf (ControlPanel::menu_fullscreen));
}
-KDE_NO_EXPORT void ViewArea::mousePressEvent (TQMouseEvent * e) {
+TDE_NO_EXPORT void ViewArea::mousePressEvent (TQMouseEvent * e) {
if (surface->node) {
MouseVisitor visitor (event_pointer_clicked, e->x(), e->y());
surface->node->accept (&visitor);
@@ -1440,11 +1440,11 @@ KDE_NO_EXPORT void ViewArea::mousePressEvent (TQMouseEvent * e) {
e->accept ();
}
-KDE_NO_EXPORT void ViewArea::mouseDoubleClickEvent (TQMouseEvent *) {
+TDE_NO_EXPORT void ViewArea::mouseDoubleClickEvent (TQMouseEvent *) {
m_view->fullScreen (); // screensaver stuff
}
-KDE_NO_EXPORT void ViewArea::mouseMoveEvent (TQMouseEvent * e) {
+TDE_NO_EXPORT void ViewArea::mouseMoveEvent (TQMouseEvent * e) {
if (e->state () == TQt::NoButton) {
int vert_buttons_pos = height () - m_view->statusBarHeight ();
int cp_height = m_view->controlPanel ()->maximumSize ().height ();
@@ -1460,7 +1460,7 @@ KDE_NO_EXPORT void ViewArea::mouseMoveEvent (TQMouseEvent * e) {
mouseMoved (); // for m_mouse_invisible_timer
}
-KDE_NO_EXPORT void ViewArea::syncVisual (const IRect & rect) {
+TDE_NO_EXPORT void ViewArea::syncVisual (const IRect & rect) {
#ifdef HAVE_CAIRO
int ex = rect.x;
if (ex > 0)
@@ -1490,7 +1490,7 @@ KDE_NO_EXPORT void ViewArea::syncVisual (const IRect & rect) {
//XFlush (tqt_xdisplay ());
}
-KDE_NO_EXPORT void ViewArea::paintEvent (TQPaintEvent * pe) {
+TDE_NO_EXPORT void ViewArea::paintEvent (TQPaintEvent * pe) {
#ifdef HAVE_CAIRO
if (surface->node)
scheduleRepaint (IRect (pe->rect ().x (), pe->rect ().y (), pe->rect ().width (), pe->rect ().height ()));
@@ -1499,12 +1499,12 @@ KDE_NO_EXPORT void ViewArea::paintEvent (TQPaintEvent * pe) {
TQWidget::paintEvent (pe);
}
-KDE_NO_EXPORT void ViewArea::scale (int val) {
+TDE_NO_EXPORT void ViewArea::scale (int val) {
m_fullscreen_scale = val;
resizeEvent (0L);
}
-KDE_NO_EXPORT void ViewArea::updateSurfaceBounds () {
+TDE_NO_EXPORT void ViewArea::updateSurfaceBounds () {
Single x, y, w = width (), h = height ();
h -= m_view->statusBarHeight ();
h -= m_view->controlPanel ()->isVisible ()
@@ -1538,7 +1538,7 @@ KDE_NO_EXPORT void ViewArea::updateSurfaceBounds () {
scheduleRepaint (IRect (0, 0, width (), height ()));
}
-KDE_NO_EXPORT void ViewArea::resizeEvent (TQResizeEvent *) {
+TDE_NO_EXPORT void ViewArea::resizeEvent (TQResizeEvent *) {
if (!m_view->controlPanel ()) return;
Single x, y, w = width (), h = height ();
Single hsb = m_view->statusBarHeight ();
@@ -1576,7 +1576,7 @@ KDE_NO_EXPORT void ViewArea::resizeEvent (TQResizeEvent *) {
setAudioVideoGeometry (IRect (x, y, wws, hws), 0L);
}
-KDE_NO_EXPORT
+TDE_NO_EXPORT
void ViewArea::setAudioVideoGeometry (const IRect &rect, unsigned int * bg_color) {
int x = rect.x, y = rect.y, w = rect.w, h = rect.h;
if (m_view->controlPanelMode() == View::CP_Only) {
@@ -1609,11 +1609,11 @@ void ViewArea::setAudioVideoGeometry (const IRect &rect, unsigned int * bg_color
}
}
-KDE_NO_EXPORT void ViewArea::setAudioVideoNode (NodePtr n) {
+TDE_NO_EXPORT void ViewArea::setAudioVideoNode (NodePtr n) {
video_node = n;
}
-KDE_NO_EXPORT SurfacePtr ViewArea::getSurface (NodePtr node) {
+TDE_NO_EXPORT SurfacePtr ViewArea::getSurface (NodePtr node) {
static_cast <ViewSurface *> (surface.ptr ())->clear ();
surface->node = node;
m_view->viewer()->resetBackgroundColor ();
@@ -1625,23 +1625,23 @@ KDE_NO_EXPORT SurfacePtr ViewArea::getSurface (NodePtr node) {
return 0L;
}
-KDE_NO_EXPORT void ViewArea::showEvent (TQShowEvent *) {
+TDE_NO_EXPORT void ViewArea::showEvent (TQShowEvent *) {
resizeEvent (0L);
}
-KDE_NO_EXPORT void ViewArea::dropEvent (TQDropEvent * de) {
+TDE_NO_EXPORT void ViewArea::dropEvent (TQDropEvent * de) {
m_view->dropEvent (de);
}
-KDE_NO_EXPORT void ViewArea::dragEnterEvent (TQDragEnterEvent* dee) {
+TDE_NO_EXPORT void ViewArea::dragEnterEvent (TQDragEnterEvent* dee) {
m_view->dragEnterEvent (dee);
}
-KDE_NO_EXPORT void ViewArea::contextMenuEvent (TQContextMenuEvent * e) {
+TDE_NO_EXPORT void ViewArea::contextMenuEvent (TQContextMenuEvent * e) {
m_view->controlPanel ()->popupMenu ()->exec (e->globalPos ());
}
-KDE_NO_EXPORT void ViewArea::mouseMoved () {
+TDE_NO_EXPORT void ViewArea::mouseMoved () {
if (m_fullscreen) {
if (m_mouse_invisible_timer)
killTimer (m_mouse_invisible_timer);
@@ -1650,7 +1650,7 @@ KDE_NO_EXPORT void ViewArea::mouseMoved () {
}
}
-KDE_NO_EXPORT void ViewArea::scheduleRepaint (const IRect &rect) {
+TDE_NO_EXPORT void ViewArea::scheduleRepaint (const IRect &rect) {
if (m_repaint_timer) {
m_repaint_rect = m_repaint_rect.unite (rect);
} else {
@@ -1659,7 +1659,7 @@ KDE_NO_EXPORT void ViewArea::scheduleRepaint (const IRect &rect) {
}
}
-KDE_NO_EXPORT void ViewArea::timerEvent (TQTimerEvent * e) {
+TDE_NO_EXPORT void ViewArea::timerEvent (TQTimerEvent * e) {
if (e->timerId () == m_mouse_invisible_timer) {
killTimer (m_mouse_invisible_timer);
m_mouse_invisible_timer = 0;
@@ -1676,7 +1676,7 @@ KDE_NO_EXPORT void ViewArea::timerEvent (TQTimerEvent * e) {
}
}
-KDE_NO_EXPORT void ViewArea::closeEvent (TQCloseEvent * e) {
+TDE_NO_EXPORT void ViewArea::closeEvent (TQCloseEvent * e) {
//kdDebug () << "closeEvent" << endl;
if (m_fullscreen) {
fullScreen ();