epoc32/include/mw/aknscreenmode.h
branchSymbian2
changeset 2 2fe1408b6811
parent 1 666f914201fb
child 4 837f303aceeb
     1.1 --- a/epoc32/include/mw/aknscreenmode.h	Tue Nov 24 13:55:44 2009 +0000
     1.2 +++ b/epoc32/include/mw/aknscreenmode.h	Tue Mar 16 16:12:26 2010 +0000
     1.3 @@ -1,1 +1,135 @@
     1.4 -aknscreenmode.h
     1.5 +/*
     1.6 +* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
     1.7 +* All rights reserved.
     1.8 +* This component and the accompanying materials are made available
     1.9 +* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
    1.10 +* which accompanies this distribution, and is available
    1.11 +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
    1.12 +*
    1.13 +* Initial Contributors:
    1.14 +* Nokia Corporation - initial contribution.
    1.15 +*
    1.16 +* Contributors:
    1.17 +*
    1.18 +* Description:  Interface to product screen mode data.
    1.19 +*
    1.20 +*
    1.21 +*/
    1.22 +
    1.23 +
    1.24 +#ifndef AKNSCREENMODE_H
    1.25 +#define AKNSCREENMODE_H
    1.26 +
    1.27 +#include <w32std.h>
    1.28 +
    1.29 +class CAknAppUiBase;
    1.30 +class SAknLayoutConfig;
    1.31 +class SAknScreenModeInfo;
    1.32 +
    1.33 +
    1.34 +/**
    1.35 +*  Information about a screen mode
    1.36 +*
    1.37 +*  @since 3.1
    1.38 +*/
    1.39 +class TAknScreenMode
    1.40 +    {
    1.41 +public:
    1.42 +    /**
    1.43 +    * Gets the size of the screen for this screen mode in pixels..
    1.44 +    * @return The screen size.
    1.45 +    */
    1.46 +    IMPORT_C TSize SizeInPixels() const;
    1.47 +    /**
    1.48 +    * Gets the display mode (color depth) for this screen mode.
    1.49 +    * @return The display mode.
    1.50 +    */
    1.51 +    IMPORT_C TDisplayMode DisplayMode() const;
    1.52 +	/**
    1.53 +	* Gets the screen mode number. This is the screen mode number
    1.54 +	* as used by @c CWsScreenDevice APIs, which start from zero.
    1.55 +	* It is one less than the number of the coresponding entry 
    1.56 +	* in wsini.ini, which start from one.
    1.57 +	* @return The screen mode number.
    1.58 +	*/
    1.59 +	IMPORT_C TInt ModeNumber() const;
    1.60 +
    1.61 +public:
    1.62 +    TAknScreenMode(const SAknScreenModeInfo& aInfo);
    1.63 +    
    1.64 +protected:
    1.65 +    const SAknScreenModeInfo& iInfo;
    1.66 +    };
    1.67 +
    1.68 +
    1.69 +/**
    1.70 +*  TAknScreenModes is a collection of available screen 
    1.71 +*  modes on this device, with API for setting an application's
    1.72 +*  screen mode.
    1.73 +*
    1.74 +*  @since 3.1
    1.75 +*/
    1.76 +class TAknScreenModes
    1.77 +    {
    1.78 +public:
    1.79 +    /**
    1.80 +    * Factory function.
    1.81 +    * @return A constructed TAknScreenModes object.
    1.82 +    */
    1.83 +    IMPORT_C static TAknScreenModes GetModes();
    1.84 +    /**
    1.85 +    * Get the number of screen modes.
    1.86 +    * @return The number of screen modes.
    1.87 +    */
    1.88 +    IMPORT_C TInt Count() const;
    1.89 +    /**
    1.90 +    * Get screen mode information by index.
    1.91 +    * @param aIndex, the screen mode index, must be in the
    1.92 +    * range [0, Count()).
    1.93 +    * @return Information about a screen mode.
    1.94 +    */
    1.95 +    IMPORT_C TAknScreenMode operator[](TInt aIndex) const;
    1.96 +    /**
    1.97 +    * Set the screen mode for an application UI.
    1.98 +    * The application will be displayed in the selected
    1.99 +    * screen mode. The application will no longer respond to
   1.100 +    * hardware or software events which would normally affect
   1.101 +    * screen mode. It will be permanently fixed to the selected
   1.102 +    * screen mode.
   1.103 +    * By using this API, the application effectively declares
   1.104 +    * itself to be non-scalable.
   1.105 +    * Notifier dialogs and other non-full-screen UI will appear
   1.106 +    * in the selected screen mode when displayed over this app.
   1.107 +    * Other full-screen applications will not be affected by
   1.108 +    * this call, except in that switching between this app and
   1.109 +    * other apps using different screen modes will be slow.
   1.110 +    * The screen mode selected must be one returned through
   1.111 +    * the API of this class. There are no fixed screen modes
   1.112 +    * which will appear on every device. The emulator may
   1.113 +    * support many screen modes, but any particular device
   1.114 +    * will probably only support one or two modes.
   1.115 +    * Setting a screen mode may result in the application looking
   1.116 +    * low resolution, badly positioned, the wrong shape,
   1.117 +    * incorrect for certain hardware configurations (eg softkeys
   1.118 +    * in the wrong place), only taking up part of the screen,
   1.119 +    * other applications being visible behind it and generally
   1.120 +    * bad in many other ways.
   1.121 +    * It is strongly recommended that application authors write
   1.122 +    * their applications to be scalable, rather than use this API.
   1.123 +    * If an application wants a fixed orientation, it should use
   1.124 +    * @c CAknAppUiBase::SetOrientationL().
   1.125 +    * Note: this API has no effect on non-full-screen app UIs.
   1.126 +    * @param aAppUi The app UI.
   1.127 +    * @param aMode A screen mode accessed through this API.
   1.128 +    */
   1.129 +    IMPORT_C static void SetAppUiScreenModeL(CAknAppUiBase* aAppUi, const TAknScreenMode& aMode);
   1.130 +
   1.131 +public:
   1.132 +    TAknScreenModes(const SAknLayoutConfig& aInfo);
   1.133 +
   1.134 +protected:
   1.135 +    const SAknLayoutConfig& iInfo;
   1.136 +    };
   1.137 +
   1.138 +
   1.139 +#endif
   1.140 \ No newline at end of file