11 class CWsScreenDevice
;
18 typedef int (*mainfunc1
) ();
19 typedef int (*mainfunc2
) (int argc
, char* argv
[]);
20 typedef int (*mainfunc3
) (int argc
, char* argv
[], char* env
[]);
21 typedef void (*mainfunc4
) ();
22 typedef void (*mainfunc5
) (int argc
, char* argv
[]);
23 typedef void (*mainfunc6
) (int argc
, char* argv
[], char* env
[]);
29 int SDL_main (int argc
, char* argv
[]);
43 const void* operator[](TInt aIndex
) const;
52 enum //these events indicates the state changes in SDL
54 EEventWindowReserved
, //window is created, nothing else should use the window
55 EEventWindowNotAvailable
, //window not available, can be ignored
56 EEventKeyMapInit
, //Keymap is inited and can now be rewritten
58 virtual TInt
SdlEvent(TInt aEvent
, TInt aParam
) = 0; //event is called in application thread
65 enum TFlags
//these flags set SDL modes
68 EEnableFocusStop
= 0x1, //let SDL thread to be stopped if not on top
71 static TInt
Init(TInt aFlags
= SDL::ENoFlags
);
73 static MSDLObserver
* Observer(); //get current observer
74 static void SetObserver(MSDLObserver
* aObserver
); //set observer to receive events, if NULL then observer is removed
75 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
76 static TInt
AppendWsEvent(const TWsEvent
& aEvent
); //give event to SDL, return error code if event buffer is full (insert in application HandleWsEvent)
77 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
78 static TInt
SetSDLCode(TInt aScanCode
, TInt aSDLCode
); //set internal SDL code with given key code, return replaced code
79 static TInt
SDLCodesCount(); //return count of scancodes
80 static void ResetSDLCodes(); //rest all code replacement to their initial values
81 static void Suspend();
83 inline static void CallMainL(); //call SDL main() function
84 inline static void CallMainL(const CDesC8Array
& iArg
); //call SDL main(int argc, char* argv[]) function with given parameters
85 void static CallMainL(const TMainFunc
& aFunc
, const CDesC8Array
* const iArg
); //internal
92 inline void SDL::CallMainL()
94 CallMainL(TMainFunc(SDL_main
), NULL
);
97 inline void SDL::CallMainL(const CDesC8Array
& iArg
)
99 CallMainL(TMainFunc(SDL_main
), &iArg
);