graphicscomposition/openwfcompositionengine/adaptation/include/owfdisplaycontextgeneral.h
changeset 0 5d03bc08d59c
child 99 ac1910f6e7cb
child 152 9f1c3fea0f87
equal deleted inserted replaced
-1:000000000000 0:5d03bc08d59c
       
     1 /* Copyright (c) 2009 The Khronos Group Inc.
       
     2  *
       
     3  * Permission is hereby granted, free of charge, to any person obtaining a
       
     4  * copy of this software and/or associated documentation files (the
       
     5  * "Materials"), to deal in the Materials without restriction, including
       
     6  * without limitation the rights to use, copy, modify, merge, publish,
       
     7  * distribute, sublicense, and/or sell copies of the Materials, and to
       
     8  * permit persons to whom the Materials are furnished to do so, subject to
       
     9  * the following conditions:
       
    10  *
       
    11  * The above copyright notice and this permission notice shall be included
       
    12  * in all copies or substantial portions of the Materials.
       
    13  *
       
    14  * THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
       
    15  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
       
    16  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
       
    17  * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
       
    18  * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
       
    19  * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
       
    20  * MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
       
    21  */
       
    22 #ifndef OWFDISPLAYCONTEXTGENERAL_H_
       
    23 #define OWFDISPLAYCONTEXTGENERAL_H_
       
    24 
       
    25 #include <e32def.h>
       
    26 #include <WF/wfc.h>
       
    27 #include <KHR/khrplatform.h>
       
    28 
       
    29 #ifdef __cplusplus
       
    30 extern "C" {
       
    31 #endif
       
    32 
       
    33 typedef void*   OWF_DISPCTX;
       
    34 
       
    35 OWF_DISPCTX OWF_DisplayContext_Create(TInt screenNum);
       
    36 void OWF_DisplayContext_Destroy(TInt screenNum, OWF_DISPCTX dc);
       
    37 
       
    38 /**
       
    39 Create a chunk for a new scratch buffer that is at least size bytes large.
       
    40 @param  dc      The display context that owns the scratch buffer.
       
    41 @param  size    The minimum size of the buffer required.
       
    42 @return A pointer to the base of the new buffer if successful; otherwise null is returned. 
       
    43 */
       
    44 void* OWF_DisplayContext_ScratchBuffer_Allocate(OWF_DISPCTX dc, int size);
       
    45 
       
    46 /**
       
    47 Destroys the buffer with base address aAddress
       
    48 @param  dc      The display context that owns the scratch buffer
       
    49 @param  buffer  A pointer to the buffer to destroy.
       
    50 */
       
    51 void OWF_DisplayContext_ScratchBuffer_Destroy(OWF_DISPCTX dc, void* buffer);
       
    52 
       
    53 /**
       
    54 Increments the serial number of the display context
       
    55 @param  dc      The display context who's serial number is to be incremented
       
    56 */
       
    57 void OWF_DisplayContext_IncrementSerialNumber(OWF_DISPCTX dc);
       
    58 
       
    59 /**
       
    60 Sets the composition ongoing flag
       
    61 @param  dc      The display context who's composition ongoing flag is to be set
       
    62 @param val      The boolean value
       
    63 */
       
    64 void OWF_DisplayContext_SetCompositionOngoing(OWF_DISPCTX dc, WFCboolean val);
       
    65 
       
    66 #ifdef __cplusplus
       
    67 }
       
    68 #endif
       
    69 
       
    70 #endif /* OWFDISPLAYCONTEXTGENERAL_H_ */