2 * Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
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".
9 * Initial Contributors:
10 * Nokia Corporation - initial contribution.
14 * Description: Interface to product screen mode data.
20 #ifndef AKNSCREENMODE_H
21 #define AKNSCREENMODE_H
26 class SAknLayoutConfig;
27 class SAknScreenModeInfo;
31 * Information about a screen mode
39 * Gets the size of the screen for this screen mode in pixels..
40 * @return The screen size.
42 IMPORT_C TSize SizeInPixels() const;
44 * Gets the display mode (color depth) for this screen mode.
45 * @return The display mode.
47 IMPORT_C TDisplayMode DisplayMode() const;
49 * Gets the screen mode number. This is the screen mode number
50 * as used by @c CWsScreenDevice APIs, which start from zero.
51 * It is one less than the number of the coresponding entry
52 * in wsini.ini, which start from one.
53 * @return The screen mode number.
55 IMPORT_C TInt ModeNumber() const;
58 TAknScreenMode(const SAknScreenModeInfo& aInfo);
61 const SAknScreenModeInfo& iInfo;
66 * TAknScreenModes is a collection of available screen
67 * modes on this device, with API for setting an application's
77 * @return A constructed TAknScreenModes object.
79 IMPORT_C static TAknScreenModes GetModes();
81 * Get the number of screen modes.
82 * @return The number of screen modes.
84 IMPORT_C TInt Count() const;
86 * Get screen mode information by index.
87 * @param aIndex, the screen mode index, must be in the
89 * @return Information about a screen mode.
91 IMPORT_C TAknScreenMode operator[](TInt aIndex) const;
93 * Set the screen mode for an application UI.
94 * The application will be displayed in the selected
95 * screen mode. The application will no longer respond to
96 * hardware or software events which would normally affect
97 * screen mode. It will be permanently fixed to the selected
99 * By using this API, the application effectively declares
100 * itself to be non-scalable.
101 * Notifier dialogs and other non-full-screen UI will appear
102 * in the selected screen mode when displayed over this app.
103 * Other full-screen applications will not be affected by
104 * this call, except in that switching between this app and
105 * other apps using different screen modes will be slow.
106 * The screen mode selected must be one returned through
107 * the API of this class. There are no fixed screen modes
108 * which will appear on every device. The emulator may
109 * support many screen modes, but any particular device
110 * will probably only support one or two modes.
111 * Setting a screen mode may result in the application looking
112 * low resolution, badly positioned, the wrong shape,
113 * incorrect for certain hardware configurations (eg softkeys
114 * in the wrong place), only taking up part of the screen,
115 * other applications being visible behind it and generally
116 * bad in many other ways.
117 * It is strongly recommended that application authors write
118 * their applications to be scalable, rather than use this API.
119 * If an application wants a fixed orientation, it should use
120 * @c CAknAppUiBase::SetOrientationL().
121 * Note: this API has no effect on non-full-screen app UIs.
122 * @param aAppUi The app UI.
123 * @param aMode A screen mode accessed through this API.
125 IMPORT_C static void SetAppUiScreenModeL(CAknAppUiBase* aAppUi, const TAknScreenMode& aMode);
128 TAknScreenModes(const SAknLayoutConfig& aInfo);
131 const SAknLayoutConfig& iInfo;