From b963c6f03d9e4057981bc02a5f9ca7f4e9cc6fdc Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Sun, 27 Jul 2008 20:23:41 +0200 Subject: [PATCH] Remove mouse pointer related event handling. --- src/main/symbian/SDL_main.cpp | 5 ----- src/video/symbian/SDL_epocevents.cpp | 31 ------------------------------- src/video/symbian/dsa.cpp | 17 ----------------- symbian/include/internal/dsa.h | 2 -- symbian/include/internal/epoc_sdl.h | 1 - 5 files changed, 56 deletions(-) diff --git a/src/main/symbian/SDL_main.cpp b/src/main/symbian/SDL_main.cpp index 96f7298..4229c58 100644 --- a/src/main/symbian/SDL_main.cpp +++ b/src/main/symbian/SDL_main.cpp @@ -606,11 +606,6 @@ void EpocSdlEnv::ObserverEvent(int aService, int aParam) } } -TPoint EpocSdlEnv::WindowCoordinates(const TPoint& aPoint) -{ - return gEpocEnv->iDsa == NULL ? aPoint : gEpocEnv->iDsa->WindowCoordinates(aPoint); -} - void EpocSdlEnv::PanicMain(const TDesC& aInfo, int aErr) { gEpocEnv->iAppSrv->PanicMain(aInfo, aErr); diff --git a/src/video/symbian/SDL_epocevents.cpp b/src/video/symbian/SDL_epocevents.cpp index 177a2b3..18cc7c0 100644 --- a/src/video/symbian/SDL_epocevents.cpp +++ b/src/video/symbian/SDL_epocevents.cpp @@ -149,37 +149,6 @@ int EPOC_HandleWsEvent(_THIS, const TWsEvent& aWsEvent) SDL_PrivateQuit(); break; - case EEventPointer: /* Mouse pointer events */ - { - const TPointerEvent* pointerEvent = aWsEvent.Pointer(); - const TPoint mousePos = EpocSdlEnv::WindowCoordinates(pointerEvent->iPosition); - - posted += SDL_PrivateMouseMotion(0, 0, mousePos.iX, mousePos.iY); /* Absolute position on screen */ - - switch (pointerEvent->iType) - { - case TPointerEvent::EButton1Down: - posted += SDL_PrivateMouseButton(SDL_PRESSED, SDL_BUTTON_LEFT, 0, 0); - break; - case TPointerEvent::EButton1Up: - posted += SDL_PrivateMouseButton(SDL_RELEASED, SDL_BUTTON_LEFT, 0, 0); - break; - case TPointerEvent::EButton2Down: - posted += SDL_PrivateMouseButton(SDL_PRESSED, SDL_BUTTON_RIGHT, 0, 0); - break; - case TPointerEvent::EButton2Up: - posted += SDL_PrivateMouseButton(SDL_RELEASED, SDL_BUTTON_RIGHT, 0, 0); - break; - case TPointerEvent::EButton3Down: - posted += SDL_PrivateMouseButton(SDL_PRESSED, SDL_BUTTON_MIDDLE, 0, 0); - break; - case TPointerEvent::EButton3Up: - posted += SDL_PrivateMouseButton(SDL_RELEASED, SDL_BUTTON_MIDDLE, 0, 0); - break; - } - break; - } - case EEventKeyDown: /* Key events */ { posted += SDL_PrivateKeyboard(SDL_PRESSED, TranslateKey(_this, aWsEvent.Key()->iScanCode, &keysym)); diff --git a/src/video/symbian/dsa.cpp b/src/video/symbian/dsa.cpp index c9fb483..3062431 100644 --- a/src/video/symbian/dsa.cpp +++ b/src/video/symbian/dsa.cpp @@ -483,23 +483,6 @@ void CDsa::Start() EpocSdlEnv::ObserverEvent(MSDLObserver::EEventWindowReserved); } -TPoint CDsa::WindowCoordinates(const TPoint& aPoint) const -{ - TPoint pos = aPoint - iScreenRect.iTl; - const TSize asz = iScreenRect.Size(); - - pos.iX <<= 16; - pos.iY <<= 16; - pos.iX /= asz.iWidth; - pos.iY /= asz.iHeight; - pos.iX *= iSwSize.iWidth; - pos.iY *= iSwSize.iHeight; - pos.iX >>= 16; - pos.iY >>= 16; - - return pos; -} - void CDsa::SetTargetRect() { iTargetRect = iScreenRect; diff --git a/symbian/include/internal/dsa.h b/symbian/include/internal/dsa.h index f3c1623..cebebaf 100644 --- a/symbian/include/internal/dsa.h +++ b/symbian/include/internal/dsa.h @@ -43,8 +43,6 @@ NONSHARABLE_CLASS(CDsa) : public CBase void DoStop(); - TPoint WindowCoordinates(const TPoint& aPoint) const; - virtual void Free(); virtual void ConstructL(RWindow& aWindow, CWsScreenDevice& aDevice); diff --git a/symbian/include/internal/epoc_sdl.h b/symbian/include/internal/epoc_sdl.h index fbcae19..4350ca8 100644 --- a/symbian/include/internal/epoc_sdl.h +++ b/symbian/include/internal/epoc_sdl.h @@ -68,7 +68,6 @@ NONSHARABLE_CLASS(EpocSdlEnv) static void RemoveCleanupItem(TAny* aItem); static void CleanupItems(); static void SetWaitDsa(); - static TPoint WindowCoordinates(const TPoint& aPoint); static void FreeSurface(); static TInt ApplyGlesDsa(); static RWindow* Window(); -- 2.11.4.GIT