1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/epoc32/include/mw/eikvcurs.h Wed Mar 31 12:27:01 2010 +0100
1.3 @@ -0,0 +1,77 @@
1.4 +// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
1.5 +// All rights reserved.
1.6 +// This component and the accompanying materials are made available
1.7 +// 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.8 +// which accompanies this distribution, and is available
1.9 +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
1.10 +//
1.11 +// Initial Contributors:
1.12 +// Nokia Corporation - initial contribution.
1.13 +//
1.14 +// Contributors:
1.15 +//
1.16 +// Description:
1.17 +// class TEikVirtualCursor
1.18 +//
1.19 +//
1.20 +
1.21 +#ifndef __EIKVCURS_H__
1.22 +#define __EIKVCURS_H__
1.23 +
1.24 +#include <e32std.h>
1.25 +#include <coemain.h>
1.26 +
1.27 +
1.28 +/** Provides support for the virtual cursor's state within an application.
1.29 +
1.30 +There is one instance of this object per CEikonEnv.
1.31 +
1.32 +@publishedAll
1.33 +@released */
1.34 +class TEikVirtualCursor
1.35 + {
1.36 +public:
1.37 + /** Specifies the virtual cursor's state.
1.38 +
1.39 + The state may be on, off or suspended. The suspended state is for use by applications
1.40 + that wish to temporarily disable the cursor, but do not want to switch it
1.41 + off completely. For example, an editor control which when focused needs to
1.42 + capture arrow keys would disable the virtual cursor when it gains focus,
1.43 + and enable it when unfocused. */
1.44 + enum TState
1.45 + {
1.46 + /** Sets the virtual cursor off. */
1.47 + EOff=0,
1.48 + /** Sets the virtual cursor on. */
1.49 + EOn,
1.50 + /** Sets the virtual cursor as suspended. */
1.51 + ESuspended
1.52 + };
1.53 +public:
1.54 + TEikVirtualCursor();
1.55 +private: //prevent passing by value
1.56 + inline TEikVirtualCursor(const TEikVirtualCursor&);
1.57 +public:
1.58 + IMPORT_C void SetCursorStateL(TState aState, CCoeEnv& aEnv);
1.59 + IMPORT_C TState CursorState(CCoeEnv& aEnv);
1.60 +public: // but not exported
1.61 + void HandleAppToForeground(CCoeEnv& aEnv);
1.62 +private:
1.63 + void SwitchOffEmulationAndBitmap(CCoeEnv& aEnv);
1.64 + void SwitchOnEmulationAndBitmap(CCoeEnv& aEnv);
1.65 +private:
1.66 + TState iState;
1.67 + };
1.68 +
1.69 +
1.70 +// inlines
1.71 +
1.72 +/** Constructor.
1.73 +
1.74 +Sets the cursor's state to ESuspended so that the call to switch off the virtual
1.75 +cursor will succeed when the application starts. Required due to the efficient
1.76 +implementation of SetCursorState(). */
1.77 +inline TEikVirtualCursor::TEikVirtualCursor(const TEikVirtualCursor&)
1.78 + {}
1.79 +
1.80 +#endif