Atlas - SDL_render_ngage_c.hpp
Home / ext / SDL / src / render / ngage Lines: 1 | Size: 2933 bytes [Download] [Show on GitHub] [Search similar files] [Raw] [Raw (proxy)][FILE BEGIN]1/* 2 Simple DirectMedia Layer 3 Copyright (C) 1997-2025 Sam Lantinga <[email protected]> 4 5 This software is provided 'as-is', without any express or implied 6 warranty. In no event will the authors be held liable for any damages 7 arising from the use of this software. 8 9 Permission is granted to anyone to use this software for any purpose, 10 including commercial applications, and to alter it and redistribute it 11 freely, subject to the following restrictions: 12 13 1. The origin of this software must not be misrepresented; you must not 14 claim that you wrote the original software. If you use this software 15 in a product, an acknowledgment in the product documentation would be 16 appreciated but is not required. 17 2. Altered source versions must be plainly marked as such, and must not be 18 misrepresented as being the original software. 19 3. This notice may not be removed or altered from any source distribution. 20*/ 21 22#ifndef ngage_video_render_ngage_c_hpp 23#define ngage_video_render_ngage_c_hpp 24 25#include "SDL_render_ngage_c.h" 26#include <NRenderer.h> 27#include <e32std.h> 28#include <w32std.h> 29 30class CRenderer : public MDirectScreenAccess 31{ 32 public: 33 static CRenderer *NewL(); 34 virtual ~CRenderer(); 35 36 // Rendering functions. 37 void Clear(TUint32 iColor); 38 bool Copy(SDL_Renderer *renderer, SDL_Texture *texture, const SDL_Rect *srcrect, const SDL_Rect *dstrect); 39 bool CopyEx(SDL_Renderer *renderer, SDL_Texture *texture, const NGAGE_CopyExData *copydata); 40 bool CreateTextureData(NGAGE_TextureData *aTextureData, const TInt aWidth, const TInt aHeight); 41 void DrawLines(NGAGE_Vertex *aVerts, const TInt aCount); 42 void DrawPoints(NGAGE_Vertex *aVerts, const TInt aCount); 43 void FillRects(NGAGE_Vertex *aVerts, const TInt aCount); 44 void Flip(); 45 void SetDrawColor(TUint32 iColor); 46 void SetClipRect(TInt aX, TInt aY, TInt aWidth, TInt aHeight); 47 void UpdateFPS(); 48 void SuspendScreenSaver(TBool aSuspend); 49 50 // Event handling. 51 void DisableKeyBlocking(); 52 void HandleEvent(const TWsEvent &aWsEvent); 53 void PumpEvents(); 54 55 private: 56 CRenderer(); 57 void ConstructL(void); 58 59 // BackBuffer. 60 CNRenderer *iRenderer; 61 62 // Direct screen access. 63 CDirectScreenAccess *iDirectScreen; 64 CFbsBitGc *iScreenGc; 65 TBool iIsFocused; 66 67 // Window server session. 68 RWsSession iWsSession; 69 RWindowGroup iWsWindowGroup; 70 TInt iWsWindowGroupID; 71 RWindow iWsWindow; 72 CWsScreenDevice *iWsScreen; 73 74 // Event handling. 75 TRequestStatus iWsEventStatus; 76 TWsEvent iWsEvent; 77 78 // MDirectScreenAccess functions. 79 void Restart(RDirectScreenAccess::TTerminationReasons aReason); 80 void AbortNow(RDirectScreenAccess::TTerminationReasons aReason); 81 82 // Frame per second. 83 TBool iShowFPS; 84 TUint iFPS; 85 const CFont *iFont; 86 87 // Screen saver. 88 TBool iSuspendScreenSaver; 89}; 90 91#endif // ngage_video_render_ngage_c_hpp 92[FILE END](C) 2025 0x4248 (C) 2025 4248 Media and 4248 Systems, All part of 0x4248 See LICENCE files for more information. Not all files are by 0x4248 always check Licencing.