os/graphics/graphicsresourceservices/graphicsresource/inc/sgconst.h
author sl
Tue, 10 Jun 2014 14:32:02 +0200
changeset 1 260cb5ec6c19
permissions -rw-r--r--
Update contrib.
     1 // Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
     2 // All rights reserved.
     3 // This component and the accompanying materials are made available
     4 // under the terms of "Eclipse Public License v1.0"
     5 // which accompanies this distribution, and is available
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
     7 //
     8 // Initial Contributors:
     9 // Nokia Corporation - initial contribution.
    10 //
    11 // Contributors:
    12 //
    13 // Description:
    14 //
    15 
    16 /**
    17  @file
    18  @publishedPartner
    19  @prototype
    20 */
    21 
    22 #ifndef SGCONST_H
    23 #define SGCONST_H
    24 
    25 #include <graphics/sgerror.h>
    26 
    27 
    28 /**
    29 @publishedPartner
    30 @prototype
    31 @deprecated
    32 
    33 Identifier of the primary screen, which always exists.
    34 */
    35 const TInt KSgScreenIdMain = 0;
    36 
    37 
    38 /**
    39 @publishedPartner
    40 @prototype
    41 @deprecated
    42 
    43 Value that specifies, when passed in as screen identifier, that a resource can be
    44 used on all screens.
    45 */
    46 const TInt KSgScreenIdAny = -1;
    47 
    48 
    49 /**
    50 @publishedPartner
    51 @prototype
    52 @deprecated
    53 
    54 Set of flags that specify how a graphics resource can be used in different rendering
    55 pipelines.
    56 */
    57 enum TSgUsageFlags
    58 	{
    59 	/** The resource cannot be used in any rendering pipeline. */
    60 	ESgUsageNone = 0,
    61 	/** The resource can be bound as source of DirectGDI rendering. */
    62 	ESgUsageDirectGdiSource = 0x0001,
    63 	/** The resource can be bound as target of DirectGDI rendering. */
    64 	ESgUsageDirectGdiTarget = 0x0002,
    65 	/** The resource can be bound as source of the composition engine. */
    66 	ESgUsageCompositionSource = 0x0004,
    67 	/** The resource can be bound as target of the composition engine. */
    68 	ESgUsageCompositionTarget = 0x0008,
    69 	/** The resource can be used directly as screen contents. */
    70 	ESgUsageScreenSource = 0x0010,
    71 	/** The resource can be bound as OpenGL ES 1.X 2D texture. */
    72 	ESgUsageOpenGlesTexture2D = 0x0020,
    73 	/** The resource can be bound as target of OpenGL ES 1.X rendering. */
    74 	ESgUsageOpenGlesTarget = 0x0040,
    75 	/** The resource can be bound as OpenVG image. */
    76 	ESgUsageOpenVgImage = 0x0080,
    77 	/** The resource can be bound as target of OpenVG rendering. */
    78 	ESgUsageOpenVgTarget = 0x0100,
    79 	/** The resource can be used as destination in calls to eglCopyBuffers(). */
    80 	ESgUsageEglCopyBuffersTarget = 0x0200,
    81 	/** The resource can be bound as OpenGL ES 2.0 2D texture. */
    82 	ESgUsageOpenGles2Texture2D = 0x0400,
    83 	/** The resource can be bound as target of OpenGL ES 2.0 rendering. */
    84 	ESgUsageOpenGles2Target = 0x0800,
    85 	/** The resource can be bound as source of window graphics context rendering. @see CWindowGc */
    86 	ESgUsageWindowGcSource = 0x1000
    87 	};
    88 
    89 
    90 /**
    91 @publishedPartner
    92 @prototype
    93 @deprecated
    94 
    95 Components of TSgCpuAccess. This enumeration is not intended to be used directly, but
    96 provides components for the definition of TSgCpuAccess.
    97 */
    98 enum TSgCpuAccessComponents
    99 	{
   100 	/** Value of the bit in TSgCpuAccess that indicates ability to read when set. */
   101 	ESgCpuAccessReadable = 1,
   102 	/** Value of the bit in TSgCpuAccess that indicates ability to write when set. */
   103 	ESgCpuAccessWritable = 2
   104 	};
   105 
   106 
   107 /**
   108 @publishedPartner
   109 @prototype
   110 @deprecated
   111 
   112 Enumeration used to specify how a graphics resource can be accessed by the CPU.
   113 */
   114 enum TSgCpuAccess
   115 	{
   116 	/** The resource cannot be accessed by the CPU. */
   117 	ESgCpuAccessNone = 0,
   118 	/** The resource can only be read by the CPU. */
   119 	ESgCpuAccessReadOnly = ESgCpuAccessReadable,
   120 	/** The resource can only be written by the CPU. */
   121 	ESgCpuAccessWriteOnly = ESgCpuAccessWritable,
   122 	/** The resource can be both read and written by the CPU. */
   123 	ESgCpuAccessReadWrite = ESgCpuAccessReadable | ESgCpuAccessWritable
   124 	};
   125 
   126 
   127 #endif // SGCONST_H