vghwinterface/vghwapiwrapper/inc/egltypes.h
branchbug235_bringup_0
changeset 53 c2ef9095503a
parent 24 a3f46bb01be2
equal deleted inserted replaced
52:39e5f73667ba 53:c2ef9095503a
       
     1 // Copyright (c) 2010 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 // EGL/EGLTYPES.H
       
    15 // 
       
    16 //
       
    17 
       
    18 /* NOTE: If you change the signature of the library and it causes a build
       
    19          break, please see readme.txt on EGL root folder
       
    20 */
       
    21 
       
    22 #ifndef __EGL_EGLTYPES_H__
       
    23 #define __EGL_EGLTYPES_H__
       
    24 
       
    25 
       
    26 
       
    27 
       
    28 /**
       
    29 @publishedAll
       
    30 @released
       
    31 */
       
    32 
       
    33 /*
       
    34 ** egltypes.h is platform dependent. It defines:
       
    35 **
       
    36 **     - EGL types and resources
       
    37 **     - Native types
       
    38 **     - EGL and native handle values
       
    39 **
       
    40 ** EGL types and resources are to be typedef'ed with appropriate platform
       
    41 ** dependent resource handle types. EGLint must be an integer of at least
       
    42 ** 32-bit.
       
    43 **
       
    44 ** NativeDisplayType, NativeWindowType and NativePixmapType are to be
       
    45 ** replaced with corresponding types of the native window system in egl.h.
       
    46 **
       
    47 ** EGL and native handle values must match their types.
       
    48 **
       
    49 */
       
    50 
       
    51 typedef struct
       
    52 {
       
    53 	void* buffer0;
       
    54 	void* buffer1;
       
    55 } PlatformSpecificSurface;
       
    56 
       
    57 enum TDisplayMode
       
    58 	{
       
    59 	/** No display mode */
       
    60 	ENone,
       
    61 	/** Monochrome display mode (1 bpp) */
       
    62 	EGray2,
       
    63 	/** Four grayscales display mode (2 bpp) */
       
    64 	EGray4,
       
    65 	/** 16 grayscales display mode (4 bpp) */
       
    66 	EGray16,
       
    67 	/** 256 grayscales display mode (8 bpp) */
       
    68 	EGray256,
       
    69 	/** Low colour EGA 16 colour display mode (4 bpp) */
       
    70 	EColor16,
       
    71 	/** 256 colour display mode (8 bpp) */
       
    72 	EColor256,
       
    73 	/** 64,000 colour display mode (16 bpp) */
       
    74 	EColor64K,
       
    75 	/** True colour display mode (24 bpp) */
       
    76 	EColor16M,
       
    77 	/** (Not an actual display mode used for moving buffers containing bitmaps) */
       
    78 	ERgb,
       
    79 	/** 4096 colour display (12 bpp). */
       
    80 	EColor4K,
       
    81 	/** True colour display mode (32 bpp, but top byte is unused and unspecified) */
       
    82 	EColor16MU,
       
    83 	/** Display mode with alpha (24bpp colour plus 8bpp alpha) */
       
    84 	EColor16MA,
       
    85 	/** Pre-multiplied Alpha display mode (24bpp color multiplied with the alpha channel value, plus 8bpp alpha) */
       
    86 	EColor16MAP,
       
    87 	//Any new display mode should be insterted here!
       
    88 	//There might be up to 255 display modes, so value of the last
       
    89 	//inserted EColorXXX enum item should be less than 256 -
       
    90 	//BC reasons!
       
    91 	EColorLast
       
    92 	};
       
    93 
       
    94 struct SymbianWindow
       
    95 {
       
    96 	int id;
       
    97 	int width;
       
    98 	int height;
       
    99 	int horizontalPitch;
       
   100     int verticalPitch;
       
   101 };
       
   102 
       
   103 struct SymbianPixmap
       
   104 {
       
   105 	enum TDisplayMode format;
       
   106 	unsigned long* data;
       
   107 	int width;
       
   108 	int height;
       
   109 	int stride;
       
   110 	int type;
       
   111 };
       
   112 
       
   113 #endif // __EGL_EGLTYPES_H__