sl@0: /* Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies). sl@0: * sl@0: * Permission is hereby granted, free of charge, to any person obtaining a sl@0: * copy of this software and/or associated documentation files (the sl@0: * "Materials"), to deal in the Materials without restriction, including sl@0: * without limitation the rights to use, copy, modify, merge, publish, sl@0: * distribute, sublicense, and/or sell copies of the Materials, and to sl@0: * permit persons to whom the Materials are furnished to do so, subject to sl@0: * the following conditions: sl@0: * sl@0: * The above copyright notice and this permission notice shall be included sl@0: * in all copies or substantial portions of the Materials. sl@0: * sl@0: * THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, sl@0: * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF sl@0: * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. sl@0: * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY sl@0: * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, sl@0: * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE sl@0: * MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. sl@0: */ sl@0: sl@0: #ifndef OWFDISPLAYCONTEXT_H sl@0: #define OWFDISPLAYCONTEXT_H sl@0: sl@0: #include sl@0: #include sl@0: sl@0: #include sl@0: #include "owfmemory.h" sl@0: #include "owfscreen.h" sl@0: #include "owfdisplaycontextgeneral.h" sl@0: #include sl@0: sl@0: #define _OWF_DISPLAYCONTEXT(x) (static_cast(x)) sl@0: sl@0: struct TBufferAddress sl@0: { sl@0: RChunk iChunk; sl@0: TInt iOffset; sl@0: TUint8* iAddress; sl@0: }; sl@0: sl@0: /** sl@0: Container that allocates and destroys the chunks used by the scratch buffers. sl@0: */ sl@0: class COwfScratchBuffers : public CBase sl@0: { sl@0: public: sl@0: void* Allocate(TInt aMinSize); sl@0: void Destroy(void* aAddress); sl@0: ~COwfScratchBuffers(); sl@0: private: sl@0: RArray iBuffers; sl@0: }; sl@0: sl@0: typedef struct OWFDisplayContext_ sl@0: { sl@0: public: sl@0: COpenWFC_RI_Display *iScreenContext; sl@0: COwfScratchBuffers iBuffers; sl@0: WFCint iEventServerUpdate; sl@0: WFCboolean iCompositionOngoing; sl@0: WFCint iPreviousCommit; sl@0: WFCint iSerialNumber; sl@0: OWF_SEMAPHORE iRendezvous; sl@0: OWFNativeStreamType fastpathStream; sl@0: WFCboolean fastpathChecked; sl@0: WFCboolean iInternalStreamAccessed; sl@0: public: sl@0: virtual ~OWFDisplayContext_(); sl@0: } OWFDisplayContext; sl@0: sl@0: #endif //OWFDISPLAYCONTEXT_H