javauis/lcdui_akn/lcdgr/src/lcdgr.rss
branchRCL_3
changeset 26 2455ef1f5bbc
parent 14 04becd199f91
equal deleted inserted replaced
25:ae942d28ec0e 26:2455ef1f5bbc
       
     1 /*
       
     2 * Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description: 
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #include <uikon.rh>
       
    20 
       
    21 NAME LCGR
       
    22 
       
    23 RESOURCE RSS_SIGNATURE { }
       
    24 
       
    25 // TTransparency - from lcdgdrv.h
       
    26 enum TTransparency
       
    27     {
       
    28     ETransparencyNone           = 0x0,
       
    29     ETransparencyMaskBitmap     = 0x1,
       
    30     ETransparencyAlphaBitmap    = 0x2,
       
    31     ETransparencyAlphaChannel   = 0x3,
       
    32     ETransparencyMaskChannel    = 0x4
       
    33     };
       
    34 
       
    35 // TDisplayMode - from gdi.h
       
    36 enum TDisplayMode
       
    37     {
       
    38     ENone       = 0,
       
    39     EGray2      = 1,
       
    40     EGray256    = 4,
       
    41     EColor64K   = 7,
       
    42     EColor16M   = 8,
       
    43     EColor4K    = 10,
       
    44     EColor16MU  = 11,
       
    45     EColor16MA  = 12
       
    46     };
       
    47 
       
    48 /**
       
    49  * EDefaultDisplayMode - from MMIDBitmapImage in lcdgr.h
       
    50  * match screen display mode
       
    51  */
       
    52 #define EDefaultDisplayMode -1
       
    53 
       
    54 STRUCT GRAPHICS_MODE
       
    55     {
       
    56     /**
       
    57      * The screen displaymode.
       
    58      */
       
    59     WORD    screenMode;
       
    60 
       
    61     /**
       
    62      * Primary mode used for Images and Canvas and CustomItem framebuffers.
       
    63      */
       
    64     WORD    primaryMode;
       
    65 
       
    66     /**
       
    67      * Display mode for images with binary transparency. Note that images
       
    68      * with full 256 level alpha transparency will always use either the
       
    69      * alpha channel in the primary mode (if available) or will use EGray256
       
    70      * alpha bitmaps.
       
    71      *
       
    72      * This will be ignored if the primary mode supports transparency.
       
    73      */
       
    74     WORD    transparencyMode;
       
    75 
       
    76     /**
       
    77      * Default display mode to use for color bitmaps in Items and
       
    78      * Displayble titlebar icons.
       
    79      */
       
    80     WORD    uiColorBitmapMode;
       
    81 
       
    82     /**
       
    83      * Default display mode to use for alpha/transparency bitmaps in
       
    84      * Items and Displayable titlebar icons.
       
    85      */
       
    86     WORD    uiAlphaBitmapMode;
       
    87 
       
    88     /**
       
    89      * Whether alpha/transparency bitmaps for Items and Displayable titlebar
       
    90      * icons should be inverted.
       
    91      */
       
    92     WORD    uiAlphaBitmapInverted;
       
    93     }
       
    94 
       
    95 STRUCT GRAPHICS_CONFIG
       
    96     {
       
    97     /**
       
    98      * Array of graphics modes indicating primary displaymode to use for Canvas/CustomItem/Image
       
    99      * for each supported screen displaymode. Also contains default displaymodes to use for
       
   100      * bitmap images for UI components.
       
   101      */
       
   102     STRUCT graphicsModes[];
       
   103 
       
   104     /**
       
   105      * Set to true if your hardware requires CFbsScreenDevice::Update(region) for
       
   106      * the framebuffer to update the screen.
       
   107      */
       
   108     WORD updateRequired;
       
   109 
       
   110     /**
       
   111      * Set to true if you wish Canvas to be double buffered. Note that GameCanvas is always
       
   112      * double buffered so this will not effect games that use GameCanvas. Furthermore some
       
   113      * MIDlets always allocate their own double buffer ( in effect triple buffering ), so
       
   114      * the value of double buffered canvas may have reduced given that MIDlet writers could
       
   115      * do the right thing - either use GameCanvas, or roll their own after testing
       
   116      * Canvas.isDoubleBuffered().
       
   117      *
       
   118      * NOTE: This configuration parameter will be overridden to true if your MMIDCanvas
       
   119      * implementation supplies a native frame buffer.
       
   120      */
       
   121     WORD useDoubleBuffer;
       
   122     }
       
   123 
       
   124 /**
       
   125  * lcdgr graphics configuration. This version contains a fairly extensive
       
   126  * list of graphics modes that should cover all modes supported by lcdgd.
       
   127  *
       
   128  * To test lcdgr in a particular mode, ensure that there is a GRAPHICS_MODE
       
   129  * entry for each screen mode your device supports and set the primary mode
       
   130  * in each entry to the mode you wish to test.
       
   131  */
       
   132 RESOURCE GRAPHICS_CONFIG R_GRAPHICS_CONFIG
       
   133     {
       
   134     graphicsModes=
       
   135         {
       
   136         GRAPHICS_MODE
       
   137             {
       
   138             screenMode        = EColor64K;
       
   139             primaryMode       = EColor64K;
       
   140             transparencyMode  = EDefaultDisplayMode;
       
   141             uiColorBitmapMode = EDefaultDisplayMode;
       
   142             uiAlphaBitmapMode = EDefaultDisplayMode;
       
   143             uiAlphaBitmapInverted = 0;
       
   144             },
       
   145         GRAPHICS_MODE
       
   146             {
       
   147             screenMode        = EColor16M;
       
   148             primaryMode       = EColor16MA;
       
   149             transparencyMode  = ENone;
       
   150             uiColorBitmapMode = EDefaultDisplayMode;
       
   151             uiAlphaBitmapMode = EDefaultDisplayMode;
       
   152             uiAlphaBitmapInverted = 0;
       
   153             },
       
   154         GRAPHICS_MODE
       
   155             {
       
   156             screenMode        = EColor4K;
       
   157             primaryMode       = EColor4K;
       
   158             transparencyMode  = EDefaultDisplayMode;
       
   159             uiColorBitmapMode = EDefaultDisplayMode;
       
   160             uiAlphaBitmapMode = EDefaultDisplayMode;
       
   161             uiAlphaBitmapInverted = 0;
       
   162             },
       
   163         GRAPHICS_MODE
       
   164             {
       
   165             screenMode        = EColor16MU;
       
   166             primaryMode       = EColor16MA;
       
   167             transparencyMode  = EDefaultDisplayMode;
       
   168             uiColorBitmapMode = EDefaultDisplayMode;
       
   169             uiAlphaBitmapMode = EDefaultDisplayMode;
       
   170             uiAlphaBitmapInverted = 0;
       
   171             },
       
   172         GRAPHICS_MODE
       
   173             {
       
   174             screenMode        = EColor16MA;
       
   175             primaryMode       = EColor16MA;
       
   176             transparencyMode  = ENone;
       
   177             uiColorBitmapMode = EColor16MU;
       
   178             uiAlphaBitmapMode = EGray2;
       
   179             uiAlphaBitmapInverted = 0;
       
   180             }
       
   181         };
       
   182 
       
   183 
       
   184     updateRequired = 0;
       
   185     useDoubleBuffer = 1;
       
   186     }