From a1175435aab27c01fb6408c1e18b1e39e747d292 Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Fri, 3 Oct 2008 01:01:57 +0200 Subject: [PATCH] Remove IMPORT_C / EXPORT_C. --- src/main/symbian/SDL_main.cpp | 36 ++++++++++++++-------------- src/main/symbian/sdlexe.cpp | 2 +- symbian/include/internal/sdlmain.h | 2 +- symbian/include/internal/sdls60api.h | 40 +++++++++++++++---------------- symbian/include/sdlepocapi.h | 46 ++++++++++++++++++------------------ 5 files changed, 63 insertions(+), 63 deletions(-) diff --git a/src/main/symbian/SDL_main.cpp b/src/main/symbian/SDL_main.cpp index 5f3e752..b6fe5fa 100644 --- a/src/main/symbian/SDL_main.cpp +++ b/src/main/symbian/SDL_main.cpp @@ -124,7 +124,7 @@ TSdlCleanupItem::TSdlCleanupItem(TSdlCleanupOperation aOperation, TAny* aItem) : iOperation(aOperation), iItem(aItem), iThread(RThread().Id()) {} -#define MAINFUNC(x) EXPORT_C TMainFunc::TMainFunc(mainfunc##x aFunc){Mem::FillZ(iMainFunc, sizeof(iMainFunc)); iMainFunc[x - 1] = (void*) aFunc;} +#define MAINFUNC(x) TMainFunc::TMainFunc(mainfunc##x aFunc){Mem::FillZ(iMainFunc, sizeof(iMainFunc)); iMainFunc[x - 1] = (void*) aFunc;} MAINFUNC(1) MAINFUNC(2) @@ -133,7 +133,7 @@ MAINFUNC(4) MAINFUNC(5) MAINFUNC(6) -EXPORT_C TMainFunc::TMainFunc() +TMainFunc::TMainFunc() { Mem::FillZ(iMainFunc, sizeof(iMainFunc)); } @@ -655,7 +655,7 @@ LOCAL_C int DoMain(TAny* /*aParam*/) } } -EXPORT_C CSDL::~CSDL() +CSDL::~CSDL() { gEpocEnv->Free(); gEpocEnv->Delete(); @@ -664,7 +664,7 @@ EXPORT_C CSDL::~CSDL() gEpocEnv = NULL; } -EXPORT_C CSDL* CSDL::NewL(int aFlags) +CSDL* CSDL::NewL(int aFlags) { __ASSERT_ALWAYS(gEpocEnv == NULL, PANIC(KErrAlreadyExists)); gEpocEnv = new EpocSdlEnvData; @@ -681,7 +681,7 @@ EXPORT_C CSDL* CSDL::NewL(int aFlags) return sdl; } -EXPORT_C void CSDL::SetContainerWindowL(RWindow& aWindow, RWsSession& aSession, CWsScreenDevice& aDevice) +void CSDL::SetContainerWindowL(RWindow& aWindow, RWsSession& aSession, CWsScreenDevice& aDevice) { if(gEpocEnv->iDsa == NULL) gEpocEnv->iDsa = CDsa::CreateL(aSession); @@ -720,7 +720,7 @@ void EpocSdlEnv::SetOrientation(CAknAppUi::TAppUiOrientation orientation, const TRAPD(err, static_cast(CEikonEnv::Static()->EikAppUi())->SetOrientationL(orientation)); } -EXPORT_C TThreadId CSDL::CallMainL(const TMainFunc& aFunc, TRequestStatus* const aStatus, const CDesC8Array* const aArg, int aStackSize) +TThreadId CSDL::CallMainL(const TMainFunc& aFunc, TRequestStatus* const aStatus, const CDesC8Array* const aArg, int aStackSize) { ASSERT(gEpocEnv != NULL); gEpocEnv->iMain = aFunc; @@ -770,17 +770,17 @@ EXPORT_C TThreadId CSDL::CallMainL(const TMainFunc& aFunc, TRequestStatus* const return gEpocEnv->iId; } -EXPORT_C int CSDL::AppendWsEvent(const TWsEvent& aEvent) +int CSDL::AppendWsEvent(const TWsEvent& aEvent) { return EpocSdlEnv::EventQueue().Append(aEvent); } -EXPORT_C void CSDL::SDLPanic(const TDesC& aInfo, int aErr) +void CSDL::SDLPanic(const TDesC& aInfo, int aErr) { EpocSdlEnv::PanicMain(aInfo, aErr); } -EXPORT_C int CSDL::GetSDLCode(int aScanCode) +int CSDL::GetSDLCode(int aScanCode) { if(aScanCode < 0) return MAX_SCANCODE; @@ -789,17 +789,17 @@ EXPORT_C int CSDL::GetSDLCode(int aScanCode) return KeyMap()[aScanCode]; } -EXPORT_C int CSDL::SDLCodesCount() const +int CSDL::SDLCodesCount() const { return MAX_SCANCODE; } -EXPORT_C void CSDL::ResetSDLCodes() +void CSDL::ResetSDLCodes() { ResetKeyMap(); } -EXPORT_C int CSDL::SetSDLCode(int aScanCode, int aSDLCode) +int CSDL::SetSDLCode(int aScanCode, int aSDLCode) { const int current = GetSDLCode(aScanCode); if(aScanCode >= 0 && aScanCode < MAX_SCANCODE) @@ -808,28 +808,28 @@ EXPORT_C int CSDL::SetSDLCode(int aScanCode, int aSDLCode) } -EXPORT_C MSDLObserver* CSDL::Observer() +MSDLObserver* CSDL::Observer() { return gEpocEnv->iAppSrv->Observer(); } -EXPORT_C void CSDL::SetObserver(MSDLObserver* aObserver) +void CSDL::SetObserver(MSDLObserver* aObserver) { gEpocEnv->iAppSrv->SetObserver(aObserver); } -EXPORT_C void CSDL::Resume() +void CSDL::Resume() { EpocSdlEnv::Resume(); } -EXPORT_C void CSDL::Suspend() +void CSDL::Suspend() { if(gEpocEnv->iDsa != NULL) gEpocEnv->iDsa->DoStop(); } -EXPORT_C void CSDL::Resize() +void CSDL::Resize() { if(gEpocEnv->iWaitingForOrientationChange) { @@ -843,7 +843,7 @@ EXPORT_C void CSDL::Resize() } } -EXPORT_C CSDL::CSDL() +CSDL::CSDL() {} void CSDL::MrccatoCommand(TRemConCoreApiOperationId aOperationId, TRemConCoreApiButtonAction aButtonAct) diff --git a/src/main/symbian/sdlexe.cpp b/src/main/symbian/sdlexe.cpp index 3b1aabc..9ddd8d8 100644 --- a/src/main/symbian/sdlexe.cpp +++ b/src/main/symbian/sdlexe.cpp @@ -479,7 +479,7 @@ CApaApplication* NewApplication() return new CSDLApplication(); } -EXPORT_C int SDLEnv::SetMain(const TMainFunc& aFunc, int aSdlFlags, MSDLMainObs* aObs, int aSdlExeFlags) +int SDLEnv::SetMain(const TMainFunc& aFunc, int aSdlFlags, MSDLMainObs* aObs, int aSdlExeFlags) { gSDLClass.SetMain(aFunc, aSdlFlags, aObs, aSdlExeFlags); return EikStart::RunApplication(NewApplication); diff --git a/symbian/include/internal/sdlmain.h b/symbian/include/internal/sdlmain.h index c27906e..7389a87 100644 --- a/symbian/include/internal/sdlmain.h +++ b/symbian/include/internal/sdlmain.h @@ -22,7 +22,7 @@ class SDLEnv EVirtualMouse = 0x2, EParamQueryDialog = 0x5 }; - IMPORT_C static TInt SetMain(const TMainFunc& aFunc, TInt aSdlFlags, MSDLMainObs* aObs = NULL, TInt aEnvFlags = EFlagsNone); + static TInt SetMain(const TMainFunc& aFunc, TInt aSdlFlags, MSDLMainObs* aObs = NULL, TInt aEnvFlags = EFlagsNone); }; #endif diff --git a/symbian/include/internal/sdls60api.h b/symbian/include/internal/sdls60api.h index 27edbb4..65416b4 100644 --- a/symbian/include/internal/sdls60api.h +++ b/symbian/include/internal/sdls60api.h @@ -33,13 +33,13 @@ extern "C" class TMainFunc { public: - IMPORT_C TMainFunc(); - IMPORT_C TMainFunc(mainfunc1); - IMPORT_C TMainFunc(mainfunc2); - IMPORT_C TMainFunc(mainfunc3); - IMPORT_C TMainFunc(mainfunc4); - IMPORT_C TMainFunc(mainfunc5); - IMPORT_C TMainFunc(mainfunc6); + TMainFunc(); + TMainFunc(mainfunc1); + TMainFunc(mainfunc2); + TMainFunc(mainfunc3); + TMainFunc(mainfunc4); + TMainFunc(mainfunc5); + TMainFunc(mainfunc6); const void* operator[](TInt aIndex) const; private: @@ -68,21 +68,21 @@ class SDL EEnableFocusStop = 0x1, //let SDL thread to be stopped if not on top }; - IMPORT_C static TInt Init(TInt aFlags = SDL::ENoFlags); - IMPORT_C static TInt UnInit(); - IMPORT_C static MSDLObserver* Observer(); //get current observer - IMPORT_C static void SetObserver(MSDLObserver* aObserver); //set observer to receive events, if NULL then observer is removed - IMPORT_C static void SetContainerWindowL(RWindow& aWindow, RWsSession& aSession, CWsScreenDevice& aDevice); //the window where drawn happens, should be recalled (propably in application HandleResourceChange) if screen device changes - IMPORT_C static TInt AppendWsEvent(const TWsEvent& aEvent); //give event to SDL, return error code if event buffer is full (insert in application HandleWsEvent) - IMPORT_C static TInt GetSDLCode(TInt aScanCode); //get SDL internal key code bind to given scancode, return -1 if scancode is not found, aScancode must be postive number - IMPORT_C static TInt SetSDLCode(TInt aScanCode, TInt aSDLCode); //set internal SDL code with given key code, return replaced code - IMPORT_C static TInt SDLCodesCount(); //return count of scancodes - IMPORT_C static void ResetSDLCodes(); //rest all code replacement to their initial values - IMPORT_C static void Suspend(); - IMPORT_C static void Resume(); + static TInt Init(TInt aFlags = SDL::ENoFlags); + static TInt UnInit(); + static MSDLObserver* Observer(); //get current observer + static void SetObserver(MSDLObserver* aObserver); //set observer to receive events, if NULL then observer is removed + static void SetContainerWindowL(RWindow& aWindow, RWsSession& aSession, CWsScreenDevice& aDevice); //the window where drawn happens, should be recalled (propably in application HandleResourceChange) if screen device changes + static TInt AppendWsEvent(const TWsEvent& aEvent); //give event to SDL, return error code if event buffer is full (insert in application HandleWsEvent) + static TInt GetSDLCode(TInt aScanCode); //get SDL internal key code bind to given scancode, return -1 if scancode is not found, aScancode must be postive number + static TInt SetSDLCode(TInt aScanCode, TInt aSDLCode); //set internal SDL code with given key code, return replaced code + static TInt SDLCodesCount(); //return count of scancodes + static void ResetSDLCodes(); //rest all code replacement to their initial values + static void Suspend(); + static void Resume(); inline static void CallMainL(); //call SDL main() function inline static void CallMainL(const CDesC8Array& iArg); //call SDL main(int argc, char* argv[]) function with given parameters - IMPORT_C void static CallMainL(const TMainFunc& aFunc, const CDesC8Array* const iArg); //internal + void static CallMainL(const TMainFunc& aFunc, const CDesC8Array* const iArg); //internal protected: SDL(); diff --git a/symbian/include/sdlepocapi.h b/symbian/include/sdlepocapi.h index 20c20d1..49d44d9 100644 --- a/symbian/include/sdlepocapi.h +++ b/symbian/include/sdlepocapi.h @@ -34,13 +34,13 @@ extern "C" class TMainFunc { public: - IMPORT_C TMainFunc(); - IMPORT_C TMainFunc(mainfunc1); - IMPORT_C TMainFunc(mainfunc2); - IMPORT_C TMainFunc(mainfunc3); - IMPORT_C TMainFunc(mainfunc4); - IMPORT_C TMainFunc(mainfunc5); - IMPORT_C TMainFunc(mainfunc6); + TMainFunc(); + TMainFunc(mainfunc1); + TMainFunc(mainfunc2); + TMainFunc(mainfunc3); + TMainFunc(mainfunc4); + TMainFunc(mainfunc5); + TMainFunc(mainfunc6); const void* operator[](TInt aIndex) const; private: @@ -78,26 +78,26 @@ class CSDL : public CBase, public MRemConCoreApiTargetObserver EMainThread = 0x2000, //always put SDL in application thread }; - IMPORT_C static CSDL* NewL(TInt aFlags = CSDL::ENoFlags); - IMPORT_C MSDLObserver* Observer(); //get current observer - IMPORT_C void SetObserver(MSDLObserver* aObserver); //set observer to receive events, if NULL then observer is removed - IMPORT_C void SetContainerWindowL(RWindow& aWindow, RWsSession& aSession, CWsScreenDevice& aDevice); //the window where drawn happens, should be recalled (propably in application HandleResourceChange) if screen device changes - IMPORT_C ~CSDL(); - IMPORT_C TInt AppendWsEvent(const TWsEvent& aEvent); //give event to SDL, return error code if event buffer is full (insert in application HandleWsEvent) - IMPORT_C TInt GetSDLCode(TInt aScanCode); //get SDL internal key code bind to given scancode, return -1 if scancode is not found, aScancode must be postive number - IMPORT_C TInt SetSDLCode(TInt aScanCode, TInt aSDLCode); //set internal SDL code with given key code, return replaced code - IMPORT_C TInt SDLCodesCount() const; //return count of scancodes - IMPORT_C void ResetSDLCodes(); //rest all code replacement to their initial values - IMPORT_C void Resume(); //restart SDL main - IMPORT_C void Suspend(); //stop SDL main - IMPORT_C void SDLPanic(const TDesC& aInfo, TInt aErr); //Panic from SDL thread (see SDLThreadEvent) - IMPORT_C TThreadId CallMainL(const TMainFunc& aFunc, TRequestStatus* const aStatus, const CDesC8Array* const iArg, TInt aStackSize); //internal - IMPORT_C void Resize(); + static CSDL* NewL(TInt aFlags = CSDL::ENoFlags); + MSDLObserver* Observer(); //get current observer + void SetObserver(MSDLObserver* aObserver); //set observer to receive events, if NULL then observer is removed + void SetContainerWindowL(RWindow& aWindow, RWsSession& aSession, CWsScreenDevice& aDevice); //the window where drawn happens, should be recalled (propably in application HandleResourceChange) if screen device changes + ~CSDL(); + TInt AppendWsEvent(const TWsEvent& aEvent); //give event to SDL, return error code if event buffer is full (insert in application HandleWsEvent) + TInt GetSDLCode(TInt aScanCode); //get SDL internal key code bind to given scancode, return -1 if scancode is not found, aScancode must be postive number + TInt SetSDLCode(TInt aScanCode, TInt aSDLCode); //set internal SDL code with given key code, return replaced code + TInt SDLCodesCount() const; //return count of scancodes + void ResetSDLCodes(); //rest all code replacement to their initial values + void Resume(); //restart SDL main + void Suspend(); //stop SDL main + void SDLPanic(const TDesC& aInfo, TInt aErr); //Panic from SDL thread (see SDLThreadEvent) + TThreadId CallMainL(const TMainFunc& aFunc, TRequestStatus* const aStatus, const CDesC8Array* const iArg, TInt aStackSize); //internal + void Resize(); void MrccatoCommand(TRemConCoreApiOperationId aOperationId, TRemConCoreApiButtonAction aButtonAct); protected: - IMPORT_C CSDL(); + CSDL(); }; #endif -- 2.11.4.GIT