diff options
Diffstat (limited to 'tizen/src/ui/input/multitouchtracker.cpp')
-rw-r--r-- | tizen/src/ui/input/multitouchtracker.cpp | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/tizen/src/ui/input/multitouchtracker.cpp b/tizen/src/ui/input/multitouchtracker.cpp index 8f1bc33588..04594f58f5 100644 --- a/tizen/src/ui/input/multitouchtracker.cpp +++ b/tizen/src/ui/input/multitouchtracker.cpp @@ -34,6 +34,12 @@ #include "multitouchtracker.h" #include "displaybase.h" +float *qt5_mt_points = 0; +int qt5_mt_count = 0; +const void *qt5_mt_pixels = 0; +int qt5_mt_width = 0; +int qt5_mt_height = 0; + extern "C" { bool virtio_touchscreen_ready(void); void virtio_touchscreen_event(int x, int y, int z, int buttons_state); @@ -73,6 +79,8 @@ void TouchPoint::updatePos(QPoint hostPos, QPoint guestPos) this->hostPos = hostPos; this->guestPos = guestPos; + qt5_mt_points[2 * (this->id - 1) + 0] = hostPos.x(); + qt5_mt_points[2 * (this->id - 1) + 1] = hostPos.y(); qt5_graphic_hw_invalidate(); } @@ -101,6 +109,11 @@ MultiTouchTracker::MultiTouchTracker( painter.setBrush(QBrush(QColor(128, 128, 128, 128))); painter.setRenderHint(QPainter::Antialiasing, true); painter.drawEllipse(1, 1, 30, 30); + + qt5_mt_points = new float[2 * maxTouchPoint](); + qt5_mt_count = 0; + qt5_mt_pixels = touchPointImage.constBits(); + qt5_mt_width = qt5_mt_height = 32; } int MultiTouchTracker::getPointRadius() @@ -156,6 +169,9 @@ int MultiTouchTracker::addTouchPoint(QPoint hostPos, QPoint guestPos) touchPointList.append(point); qDebug() << "ID" << point->getID() << "point touching" << hostPos << guestPos; + qt5_mt_points[2 * qt5_mt_count + 0] = hostPos.x(); + qt5_mt_points[2 * qt5_mt_count + 1] = hostPos.y(); + qt5_mt_count++; qt5_graphic_hw_invalidate(); return touchPointList.count(); @@ -223,6 +239,8 @@ int MultiTouchTracker::limitTouchCnt(int max) delete point; } touchPointList.removeLast(); + + qt5_mt_count--; } diff = beforeCnt - touchPointList.count(); @@ -504,6 +522,7 @@ void MultiTouchTracker::finishTracking() } touchPointList.clear(); + qt5_mt_count = 0; qt5_graphic_hw_invalidate(); } @@ -512,4 +531,10 @@ MultiTouchTracker::~MultiTouchTracker() qDebug("destroy multi-touch tracker"); finishTracking(); + + delete[] qt5_mt_points; + qt5_mt_points = 0; + qt5_mt_count = 0; + qt5_mt_pixels = 0; + qt5_mt_width = qt5_mt_height = 0; } |