summaryrefslogtreecommitdiffstats
path: root/tdehtml/tdehtml_events.cpp
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2013-01-26 13:17:21 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2013-01-26 13:17:21 -0600
commitdfe289850f068f19ba4a83ab4e7e22a7e09c13c9 (patch)
treec297348a55df66c571de4525646e0b9762427353 /tdehtml/tdehtml_events.cpp
parentb7658a0d5eca24a9d37c6e04f88298ef02389db0 (diff)
downloadtdelibs-dfe289850f068f19ba4a83ab4e7e22a7e09c13c9.tar.gz
tdelibs-dfe289850f068f19ba4a83ab4e7e22a7e09c13c9.zip
Rename a number of libraries and executables to avoid conflicts with KDE4
Diffstat (limited to 'tdehtml/tdehtml_events.cpp')
-rw-r--r--tdehtml/tdehtml_events.cpp92
1 files changed, 92 insertions, 0 deletions
diff --git a/tdehtml/tdehtml_events.cpp b/tdehtml/tdehtml_events.cpp
new file mode 100644
index 000000000..0bb9c6fc3
--- /dev/null
+++ b/tdehtml/tdehtml_events.cpp
@@ -0,0 +1,92 @@
+/* This file is part of the KDE project
+ Copyright (C) 2000 Simon Hausmann <hausmann@kde.org>
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "tdehtml_events.h"
+#include "rendering/render_object.h"
+#include "xml/dom_nodeimpl.h"
+
+using namespace tdehtml;
+
+class tdehtml::MouseEvent::MouseEventPrivate
+{
+};
+
+tdehtml::MouseEvent::MouseEvent( const char *name, TQMouseEvent *qmouseEvent, int x, int y,
+ const DOM::DOMString &url, const DOM::DOMString& target,
+ const DOM::Node &innerNode )
+: KParts::Event( name ), m_qmouseEvent( qmouseEvent ), m_x( x ), m_y( y ),
+ m_url( url ), m_target(target), m_innerNode( innerNode )
+{
+ d = 0;
+ if (innerNode.handle() && innerNode.handle()->renderer())
+ innerNode.handle()->renderer()->absolutePosition(m_nodeAbsX, m_nodeAbsY);
+}
+
+tdehtml::MouseEvent::~MouseEvent()
+{
+ delete d;
+}
+
+long tdehtml::MouseEvent::offset() const
+{
+ int offset = 0;
+ DOM::NodeImpl* tempNode = 0;
+ int absX, absY;
+ absX = absY = 0;
+ if (innerNode().handle()->renderer()) {
+ innerNode().handle()->renderer()->absolutePosition(absX, absY);
+ tdehtml::RenderObject::SelPointState state;
+ innerNode().handle()->renderer()->checkSelectionPoint( x(), y(), absX, absY, tempNode, offset, state );
+ }
+ return offset;
+}
+
+const char *tdehtml::MousePressEvent::s_strMousePressEvent = "tdehtml/Events/MousePressEvent";
+
+const char *tdehtml::MouseDoubleClickEvent::s_strMouseDoubleClickEvent = "tdehtml/Events/MouseDoubleClickEvent";
+
+const char *tdehtml::MouseMoveEvent::s_strMouseMoveEvent = "tdehtml/Events/MouseMoveEvent";
+
+const char *tdehtml::MouseReleaseEvent::s_strMouseReleaseEvent = "tdehtml/Events/MouseReleaseEvent";
+
+const char *tdehtml::DrawContentsEvent::s_strDrawContentsEvent = "tdehtml/Events/DrawContentsEvent";
+
+class tdehtml::DrawContentsEvent::DrawContentsEventPrivate
+{
+public:
+ DrawContentsEventPrivate()
+ {
+ }
+ ~DrawContentsEventPrivate()
+ {
+ }
+};
+
+tdehtml::DrawContentsEvent::DrawContentsEvent( TQPainter *painter, int clipx, int clipy, int clipw, int cliph )
+ : KParts::Event( s_strDrawContentsEvent ), m_painter( painter ), m_clipx( clipx ), m_clipy( clipy ),
+ m_clipw( clipw ), m_cliph( cliph )
+{
+ d = new DrawContentsEventPrivate;
+}
+
+tdehtml::DrawContentsEvent::~DrawContentsEvent()
+{
+ delete d;
+}
+