Remove CSDL::EOwnThread.
[SDL.s60v3.git] / symbian / include / internal / epoc_sdl.h
blob00a7b65e7f7bf6f92db50972a58e5d82f15c62bc
1 #ifndef EPOCSDL_H
2 #define EPOCSDL_H
4 #include <e32def.h>
5 #include <e32std.h>
6 #include <gdi.h>
7 #include <w32std.h>
8 #include <aknappui.h>
9 #include "SDL_config_symbian.h"
11 #define PANIC(x) Panic(x, __LINE__)
12 #define PANIC_IF_ERROR(x) (x == KErrNone || Panic(x, __LINE__))
14 TInt Panic(TInt aErr, TInt aLine);
16 class MEventQueue
18 public:
19 virtual TInt Append(const TWsEvent& aEvent) = 0;
20 virtual TBool HasData() = 0;
21 virtual const TWsEvent Shift() = 0;
24 typedef void (*TSdlCleanupOperation) (TAny* aThis);
26 class TSdlCleanupItem
28 public:
29 TSdlCleanupItem(TSdlCleanupOperation aOperation, TAny* aItem);
30 TSdlCleanupOperation iOperation;
31 TAny* iItem;
32 TThreadId iThread;
35 class EpocSdlEnv
37 public:
38 enum {ELastService=100};
39 static void Request(TInt aService);
40 static MEventQueue& EventQueue();
41 static TSize WindowSize(const TSize& aRequestedSize);
42 static TSize WindowSize();
43 static TDisplayMode DisplayMode();
44 static TPointerCursorMode PointerMode();
45 static TBool Flags(TInt aFlag);
46 static TInt Argc();
47 static char** Argv();
48 static TBool IsDsaAvailable();
49 static TInt AllocSurface(const TSize& aSize, TDisplayMode aMode);
50 static void UnlockHwSurface();
51 static TUint8* LockHwSurface();
52 static void UpdateSwSurface();
53 static TBool AddUpdateRect(TUint8* aAddress, const TRect& aUpdateRect, const TRect& aTargetRect);
54 static void PanicMain(TInt aErr);
55 static void PanicMain(const TDesC& aInfo, TInt aErr);
56 static void WaitDeviceChange();
57 static TInt SetPalette(TInt aFirstcolor, TInt aColorCount, TUint32* aPalette);
58 static void ObserverEvent(TInt aService, TInt aParam = 0);
59 static void WaitDsaAvailable();
60 static void Resume();
61 static void Suspend();
62 static TInt AppendCleanupItem(const TSdlCleanupItem& aItem);
63 static void RemoveCleanupItem(TAny* aItem);
64 static void CleanupItems();
65 static void SetWaitDsa();
66 static void FreeSurface();
67 static TInt ApplyGlesDsa();
68 static RWindow* Window();
69 static void UpdateWholeScreen(bool val);
70 static bool GetUpdateWholeScreen();
71 static void SetOrientation(CAknAppUi::TAppUiOrientation orientation, const TSize& aSize, TDisplayMode aMode);
72 };
74 #endif