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